Class: Buda::Deposit
- Inherits:
-
Object
- Object
- Buda::Deposit
- Defined in:
- lib/buda/resources/deposit.rb
Overview
for handling deposited amount
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#deposit_data ⇒ Object
readonly
Returns the value of attribute deposit_data.
-
#expected_arrival_time ⇒ Object
readonly
Returns the value of attribute expected_arrival_time.
-
#fee ⇒ Object
readonly
Returns the value of attribute fee.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#order_type ⇒ Object
readonly
Returns the value of attribute order_type.
-
#reserve_code ⇒ Object
readonly
Returns the value of attribute reserve_code.
-
#reserve_name ⇒ Object
readonly
Returns the value of attribute reserve_name.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#state_reason ⇒ Object
readonly
Returns the value of attribute state_reason.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(id:, created_at:, amount:, currency:, fee:, state:, account_id:, user_id:, order_id:, order_type:, state_reason:, expected_arrival_time:, reserve_name:, reserve_code:, deposit_data:) ⇒ Deposit
constructor
A new instance of Deposit.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(id:, created_at:, amount:, currency:, fee:, state:, account_id:, user_id:, order_id:, order_type:, state_reason:, expected_arrival_time:, reserve_name:, reserve_code:, deposit_data:) ⇒ Deposit
Returns a new instance of Deposit.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/buda/resources/deposit.rb', line 13 def initialize( id:, created_at:, amount:, currency:, fee:, state:, account_id:, user_id:, order_id:, order_type:, state_reason:, expected_arrival_time:, reserve_name:, reserve_code:, deposit_data:, ** ) @id = id @created_at = created_at @amount = amount[0] @currency = currency @fee = fee @state = state @account_id = account_id @user_id = user_id @order_id = order_id @order_type = order_type @state_reason = state_reason @expected_arrival_time = expected_arrival_time @reserve_name = reserve_name @reserve_code = reserve_code @deposit_data = DepositData.new(**deposit_data) end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def account_id @account_id end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def amount @amount end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def currency @currency end |
#deposit_data ⇒ Object (readonly)
Returns the value of attribute deposit_data.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def deposit_data @deposit_data end |
#expected_arrival_time ⇒ Object (readonly)
Returns the value of attribute expected_arrival_time.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def expected_arrival_time @expected_arrival_time end |
#fee ⇒ Object (readonly)
Returns the value of attribute fee.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def fee @fee end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def id @id end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def order_id @order_id end |
#order_type ⇒ Object (readonly)
Returns the value of attribute order_type.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def order_type @order_type end |
#reserve_code ⇒ Object (readonly)
Returns the value of attribute reserve_code.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def reserve_code @reserve_code end |
#reserve_name ⇒ Object (readonly)
Returns the value of attribute reserve_name.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def reserve_name @reserve_name end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def state @state end |
#state_reason ⇒ Object (readonly)
Returns the value of attribute state_reason.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def state_reason @state_reason end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
8 9 10 |
# File 'lib/buda/resources/deposit.rb', line 8 def user_id @user_id end |
Instance Method Details
#inspect ⇒ Object
41 42 43 |
# File 'lib/buda/resources/deposit.rb', line 41 def inspect "<Deposit #{@amount} (#{@currency})>" end |
#to_s ⇒ Object
37 38 39 |
# File 'lib/buda/resources/deposit.rb', line 37 def to_s "#{@amount} (#{@currency})" end |