Class: SynapsePay::Order
- Inherits:
-
APIResource
- Object
- APIResource
- SynapsePay::Order
- Defined in:
- lib/synapse_pay/resources/order.rb
Instance Attribute Summary collapse
-
#account_type ⇒ Object
Returns the value of attribute account_type.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#date ⇒ Object
Returns the value of attribute date.
-
#date_settled ⇒ Object
Returns the value of attribute date_settled.
-
#discount ⇒ Object
Returns the value of attribute discount.
-
#facilitator_fee ⇒ Object
Returns the value of attribute facilitator_fee.
-
#fee ⇒ Object
Returns the value of attribute fee.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_buyer ⇒ Object
Returns the value of attribute is_buyer.
-
#note ⇒ Object
Returns the value of attribute note.
-
#resource_uri ⇒ Object
Returns the value of attribute resource_uri.
-
#seller ⇒ Object
Returns the value of attribute seller.
-
#status ⇒ Object
Returns the value of attribute status.
-
#status_url ⇒ Object
Returns the value of attribute status_url.
-
#supp_id ⇒ Object
Returns the value of attribute supp_id.
-
#ticket_number ⇒ Object
Returns the value of attribute ticket_number.
-
#tip ⇒ Object
Returns the value of attribute tip.
-
#total ⇒ Object
Returns the value of attribute total.
Attributes inherited from APIResource
Instance Method Summary collapse
Methods inherited from APIResource
api_attribute_names, #api_attributes, api_subclass_fetch, api_subclasses, #changed_api_attributes, #clear_api_attributes, #determine_api_attribute_value, determine_api_attribute_value, #initialize, #inspect, #inspect_api_attributes, #inspect_nested, #refresh_from, register_api_subclass, #to_json
Constructor Details
This class inherits a constructor from SynapsePay::APIResource
Instance Attribute Details
#account_type ⇒ Object
Returns the value of attribute account_type.
3 4 5 |
# File 'lib/synapse_pay/resources/order.rb', line 3 def account_type @account_type end |
#amount ⇒ Object
Returns the value of attribute amount.
4 5 6 |
# File 'lib/synapse_pay/resources/order.rb', line 4 def amount @amount end |
#date ⇒ Object
Returns the value of attribute date.
5 6 7 |
# File 'lib/synapse_pay/resources/order.rb', line 5 def date @date end |
#date_settled ⇒ Object
Returns the value of attribute date_settled.
6 7 8 |
# File 'lib/synapse_pay/resources/order.rb', line 6 def date_settled @date_settled end |
#discount ⇒ Object
Returns the value of attribute discount.
7 8 9 |
# File 'lib/synapse_pay/resources/order.rb', line 7 def discount @discount end |
#facilitator_fee ⇒ Object
Returns the value of attribute facilitator_fee.
8 9 10 |
# File 'lib/synapse_pay/resources/order.rb', line 8 def facilitator_fee @facilitator_fee end |
#fee ⇒ Object
Returns the value of attribute fee.
9 10 11 |
# File 'lib/synapse_pay/resources/order.rb', line 9 def fee @fee end |
#id ⇒ Object
Returns the value of attribute id.
10 11 12 |
# File 'lib/synapse_pay/resources/order.rb', line 10 def id @id end |
#is_buyer ⇒ Object
Returns the value of attribute is_buyer.
11 12 13 |
# File 'lib/synapse_pay/resources/order.rb', line 11 def is_buyer @is_buyer end |
#note ⇒ Object
Returns the value of attribute note.
12 13 14 |
# File 'lib/synapse_pay/resources/order.rb', line 12 def note @note end |
#resource_uri ⇒ Object
Returns the value of attribute resource_uri.
13 14 15 |
# File 'lib/synapse_pay/resources/order.rb', line 13 def resource_uri @resource_uri end |
#seller ⇒ Object
Returns the value of attribute seller.
14 15 16 |
# File 'lib/synapse_pay/resources/order.rb', line 14 def seller @seller end |
#status ⇒ Object
Returns the value of attribute status.
15 16 17 |
# File 'lib/synapse_pay/resources/order.rb', line 15 def status @status end |
#status_url ⇒ Object
Returns the value of attribute status_url.
16 17 18 |
# File 'lib/synapse_pay/resources/order.rb', line 16 def status_url @status_url end |
#supp_id ⇒ Object
Returns the value of attribute supp_id.
17 18 19 |
# File 'lib/synapse_pay/resources/order.rb', line 17 def supp_id @supp_id end |
#ticket_number ⇒ Object
Returns the value of attribute ticket_number.
18 19 20 |
# File 'lib/synapse_pay/resources/order.rb', line 18 def ticket_number @ticket_number end |
#tip ⇒ Object
Returns the value of attribute tip.
19 20 21 |
# File 'lib/synapse_pay/resources/order.rb', line 19 def tip @tip end |
#total ⇒ Object
Returns the value of attribute total.
20 21 22 |
# File 'lib/synapse_pay/resources/order.rb', line 20 def total @total end |
Instance Method Details
#update(params = {}, headers = {}) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/synapse_pay/resources/order.rb', line 22 def update(params={}, headers={}) params = ParamsBuilder.merge({ :order_id => id, }, params) method = APIMethod.new(:post, "/order/update", params, headers, self) json = @client.execute(method) self.refresh_from(json[:order], method, @client) end |
#void(params = {}, headers = {}) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/synapse_pay/resources/order.rb', line 31 def void(params={}, headers={}) params = ParamsBuilder.merge({ :order_id => id, }, params) method = APIMethod.new(:post, "/order/void", params, headers, self) json = @client.execute(method) self.refresh_from(json[:order], method, @client) end |