Class: MonoMerchant::Invoice::Finalize
- Inherits:
-
ApiRequest
- Object
- ApiRequest
- MonoMerchant::Invoice::Finalize
- Defined in:
- lib/mono-merchant/invoice/finalize.rb
Overview
Finalize holding amount
Constant Summary
Constants inherited from ApiRequest
ApiRequest::API_URL, ApiRequest::DEFAULT_CURRENCY
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#invoice_id ⇒ Object
readonly
Returns the value of attribute invoice_id.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Attributes inherited from ApiRequest
Instance Method Summary collapse
-
#initialize(invoice_id, amount, items: []) ⇒ Finalize
constructor
A new instance of Finalize.
Methods inherited from ApiRequest
Constructor Details
#initialize(invoice_id, amount, items: []) ⇒ Finalize
Returns a new instance of Finalize.
10 11 12 13 14 15 |
# File 'lib/mono-merchant/invoice/finalize.rb', line 10 def initialize(invoice_id, amount, items: []) @invoice_id = invoice_id @amount = amount @items = items.map { |i| Item.new(i).to_hash } super() end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class MonoMerchant::ApiRequest
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
8 9 10 |
# File 'lib/mono-merchant/invoice/finalize.rb', line 8 def amount @amount end |
#invoice_id ⇒ Object (readonly)
Returns the value of attribute invoice_id.
8 9 10 |
# File 'lib/mono-merchant/invoice/finalize.rb', line 8 def invoice_id @invoice_id end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
8 9 10 |
# File 'lib/mono-merchant/invoice/finalize.rb', line 8 def items @items end |