Class: Moip2::Resource::MultiOrder
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Moip2::Resource::MultiOrder
- Defined in:
- lib/moip2/resource/multi_order.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#external_id ⇒ Object
readonly
Returns the value of attribute external_id.
-
#multi_payment_api ⇒ Object
readonly
Returns the value of attribute multi_payment_api.
Instance Method Summary collapse
- #create_multi_payment(payment) ⇒ Object
-
#initialize(client, response) ⇒ MultiOrder
constructor
A new instance of MultiOrder.
Constructor Details
#initialize(client, response) ⇒ MultiOrder
Returns a new instance of MultiOrder.
8 9 10 11 12 13 14 15 16 |
# File 'lib/moip2/resource/multi_order.rb', line 8 def initialize(client, response) super(response) @client = client if response.respond_to?(:external_id) @multi_payment_api = MultiPaymentApi.new(client) @external_id = response.external_id end end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/moip2/resource/multi_order.rb', line 6 def client @client end |
#external_id ⇒ Object (readonly)
Returns the value of attribute external_id.
6 7 8 |
# File 'lib/moip2/resource/multi_order.rb', line 6 def external_id @external_id end |
#multi_payment_api ⇒ Object (readonly)
Returns the value of attribute multi_payment_api.
6 7 8 |
# File 'lib/moip2/resource/multi_order.rb', line 6 def multi_payment_api @multi_payment_api end |
Instance Method Details
#create_multi_payment(payment) ⇒ Object
18 19 20 |
# File 'lib/moip2/resource/multi_order.rb', line 18 def create_multi_payment(payment) multi_payment_api.create end |