Skip to content

Instantly share code, notes, and snippets.

@neverett
Created August 2, 2013 20:51
Show Gist options
  • Save neverett/6143366 to your computer and use it in GitHub Desktop.
Save neverett/6143366 to your computer and use it in GitHub Desktop.
test description once more
# Rails 3.2.14
[27] pry(Spree):1> order
=> #<Spree::Order id: 4, number: "R668780026", item_total: #<BigDecimal:c3126b0,'0.15992E3',18(36)>, total: #<BigDecimal:c3566a8,'0.14393E3',18(36)>, state: "cart", adjustment_total: #<BigDecimal:c35684c,'-0.1599E2',18(18)>, user_id: 1, completed_at: nil, bill_address_id: nil, ship_address_id: nil, payment_total: #<BigDecimal:c356504,'0.0',9(36)>, shipping_method_id: nil, shipment_state: "pending", payment_state: "balance_due", email: "spree@example.com", special_instructions: nil, created_at: "2013-08-02 06:11:13", updated_at: "2013-08-02 15:45:51", currency: "USD", last_ip_address: "127.0.0.1", created_by_id: 1>
[28] pry(Spree):1> shipment
=> #<Spree::Shipment id: 22, tracking: nil, number: "H47677816488", cost: nil, shipped_at: nil, order_id: 4, address_id: nil, state: "pending", created_at: "2013-08-02 18:14:03", updated_at: "2013-08-02 18:14:03", stock_location_id: nil>
[29] pry(Spree):1> order.adjustments.create({source: shipment, label: "ha", amount: 0}, without_protection: true)
=> #<Spree::Adjustment id: 50, source_id: 22, source_type: "Spree::Shipment", adjustable_id: 4, adjustable_type: "Spree::Order", originator_id: nil, originator_type: nil, amount: #<BigDecimal:ca829a4,'0.0',9(36)>, label: "ha", mandatory: nil, eligible: true, created_at: "2013-08-02 18:16:29", updated_at: "2013-08-02 18:16:29", state: "open">
# Rails 4.0.0
[9] pry(Spree):1> order
=> #<Spree::Order id: 13, number: "R085433244", item_total: #<BigDecimal:d6650c8,'0.1999E2',18(45)>, total: #<BigDecimal:d66a154,'0.1999E2',18(36)>, state: "address", adjustment_total: #<BigDecimal:d66a17c,'0.0',9(36)>, user_id: 1, completed_at: nil, bill_address_id: 20, ship_address_id: 21, payment_total: #<BigDecimal:d66a0a0,'0.0',9(36)>, shipping_method_id: nil, shipment_state: "pending", payment_state: "balance_due", email: "spree@example.com", special_instructions: nil, created_at: "2013-08-02 06:27:38", updated_at: "2013-08-02 06:28:07", currency: "USD", last_ip_address: "127.0.0.1", created_by_id: 1>
[10] pry(Spree):1> shipment
=> #<Spree::Shipment id: 16, tracking: nil, number: "H33417384040", cost: nil, shipped_at: nil, order_id: 13, address_id: nil, state: "pending", created_at: "2013-08-02 18:17:40", updated_at: "2013-08-02 18:17:40", stock_location_id: nil>
[11] pry(Spree):1> order.adjustments.create(source: shipment, label: "ha", amount: 0)
=> #<Spree::Adjustment id: 41, source_id: 13, source_type: "Spree::Shipment", adjustable_id: 13, adjustable_type: "Spree::Order", originator_id: nil, originator_type: nil, amount: #<BigDecimal:d52fb68,'0.0',9(36)>, label: "ha", mandatory: nil, eligible: true, created_at: "2013-08-02 18:18:22", updated_at: "2013-08-02 18:18:22", state: "open">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment