Class: PaysonAPI::V2::Requests::Order
- Inherits:
-
Object
- Object
- PaysonAPI::V2::Requests::Order
- Defined in:
- lib/payson_api/v2/requests/order.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#items ⇒ Object
Returns the value of attribute items.
Instance Method Summary collapse
-
#initialize ⇒ Order
constructor
A new instance of Order.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Order
Returns a new instance of Order.
9 10 11 |
# File 'lib/payson_api/v2/requests/order.rb', line 9 def initialize @items = [] end |
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
7 8 9 |
# File 'lib/payson_api/v2/requests/order.rb', line 7 def currency @currency end |
#items ⇒ Object
Returns the value of attribute items.
7 8 9 |
# File 'lib/payson_api/v2/requests/order.rb', line 7 def items @items end |
Instance Method Details
#to_hash ⇒ Object
13 14 15 16 17 18 |
# File 'lib/payson_api/v2/requests/order.rb', line 13 def to_hash {}.tap do |hash| hash['currency'] = @currency hash['items'] = @items.map(&:to_hash) end end |