Class: Buda::Withdrawal
- Inherits:
-
Object
- Object
- Buda::Withdrawal
- Defined in:
- lib/buda/resources/withdrawal.rb
Overview
for handling the total balance
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(**kwargs) ⇒ Withdrawal
constructor
A new instance of Withdrawal.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(**kwargs) ⇒ Withdrawal
Returns a new instance of Withdrawal.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/buda/resources/withdrawal.rb', line 13 def initialize(**kwargs) @id = kwargs[:id] @uuid = kwargs[:uuid] @currency = kwargs[:currency] @created_at = kwargs[:created_at] @forced_reason = kwargs[:forced_reason] @account_id = kwargs[:account_id] @user_id = kwargs[:user_id] @expected_execution_time = kwargs[:expected_execution_time] @expected_arrival_time = kwargs[:expected_arrival_time] @hold_execution = kwargs[:hold_execution] @amount = kwargs[:amount][0] @fee = kwargs[:fee] @usd_amount = kwargs[:usd_amount] @deposit_data = WithdrawalData.new(**kwargs[:withdrawal_data]) end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
8 9 10 |
# File 'lib/buda/resources/withdrawal.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/withdrawal.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/withdrawal.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/withdrawal.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/withdrawal.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/withdrawal.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/withdrawal.rb', line 8 def fee @fee end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/buda/resources/withdrawal.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/withdrawal.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/withdrawal.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/withdrawal.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/withdrawal.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/withdrawal.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/withdrawal.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/withdrawal.rb', line 8 def user_id @user_id end |
Instance Method Details
#inspect ⇒ Object
34 35 36 |
# File 'lib/buda/resources/withdrawal.rb', line 34 def inspect "<Withdrawal #{@amount} (#{@currency})>" end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/buda/resources/withdrawal.rb', line 30 def to_s "#{@amount} (#{@currency})" end |