Class: BinanceClient::Deposit

Inherits:
BaseModel show all
Defined in:
lib/binance_client/models/deposit.rb

Constant Summary collapse

METHODS =
%i[
  address
  address_tag
  amount
  coin
  network
  status
  tx_id
  source_address
  confirm_times
  insert_time
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**kwargs) ⇒ Deposit

Returns a new instance of Deposit.



25
26
27
28
29
# File 'lib/binance_client/models/deposit.rb', line 25

def initialize(**kwargs)
  kwargs.each do |key, value|
    self.send("#{key}=", value)
  end
end

Instance Attribute Details

#raw_hashObject

Returns the value of attribute raw_hash.



22
23
24
# File 'lib/binance_client/models/deposit.rb', line 22

def raw_hash
  @raw_hash
end

Instance Method Details

#default_sub_acccount_idObject



31
32
33
# File 'lib/binance_client/models/deposit.rb', line 31

def default_sub_acccount_id
  raw_hash["subAccountId"]
end

#insert_timeObject



43
44
45
# File 'lib/binance_client/models/deposit.rb', line 43

def insert_time
  @insert_time ||= Time.at(raw_hash["insertTime"] / 1_000)
end