Class: Order
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
- #authorize(credit_card = {}) ⇒ Object
- #capture ⇒ Object
- #credit(amount, credit_card_number) ⇒ Object
- #items ⇒ Object
- #process_paypal_express(token, payer_id) ⇒ Object
- #void ⇒ Object
Instance Method Details
#authorize(credit_card = {}) ⇒ Object
6 7 8 |
# File 'app/models/order.rb', line 6 def (credit_card={}) post(:authorize, :credit_card => credit_card) end |
#capture ⇒ Object
10 11 12 |
# File 'app/models/order.rb', line 10 def capture post(:capture) end |
#credit(amount, credit_card_number) ⇒ Object
14 15 16 |
# File 'app/models/order.rb', line 14 def credit(amount, credit_card_number) post(:credit, :amount => amount, :credit_card_number => credit_card_number) end |
#items ⇒ Object
2 3 4 |
# File 'app/models/order.rb', line 2 def items OrderItem.find(:all, :from => "/v1/orders/#{self.number}/items.xml") end |
#process_paypal_express(token, payer_id) ⇒ Object
22 23 24 |
# File 'app/models/order.rb', line 22 def process_paypal_express(token, payer_id) post(:process_paypal_express, :params => {:token => token, :payer_id => payer_id}) end |
#void ⇒ Object
18 19 20 |
# File 'app/models/order.rb', line 18 def void post(:void) end |