Class: Buda::Deposit

Inherits:
Object
  • Object
show all
Defined in:
lib/buda/resources/deposit.rb

Overview

for handling deposited amount

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = 
  @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_idObject (readonly)

Returns the value of attribute account_id.



8
9
10
# File 'lib/buda/resources/deposit.rb', line 8

def 
  @account_id
end

#amountObject (readonly)

Returns the value of attribute amount.



8
9
10
# File 'lib/buda/resources/deposit.rb', line 8

def amount
  @amount
end

#created_atObject (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

#currencyObject (readonly)

Returns the value of attribute currency.



8
9
10
# File 'lib/buda/resources/deposit.rb', line 8

def currency
  @currency
end

#deposit_dataObject (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_timeObject (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

#feeObject (readonly)

Returns the value of attribute fee.



8
9
10
# File 'lib/buda/resources/deposit.rb', line 8

def fee
  @fee
end

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/buda/resources/deposit.rb', line 8

def id
  @id
end

#order_idObject (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_typeObject (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_codeObject (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_nameObject (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

#stateObject (readonly)

Returns the value of attribute state.



8
9
10
# File 'lib/buda/resources/deposit.rb', line 8

def state
  @state
end

#state_reasonObject (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_idObject (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

#inspectObject



41
42
43
# File 'lib/buda/resources/deposit.rb', line 41

def inspect
  "<Deposit #{@amount} (#{@currency})>"
end

#to_sObject



37
38
39
# File 'lib/buda/resources/deposit.rb', line 37

def to_s
  "#{@amount} (#{@currency})"
end