Class: Buda::DepositData

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

Overview

for handling deposit_data of Deposit Class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, upload_url:, created_at:, updated_at:, **kwargs) ⇒ DepositData

Returns a new instance of DepositData.



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/buda/resources/deposit_data.rb', line 9

def initialize(
  type:, upload_url:, created_at:,
  updated_at:, **kwargs
)
  @type = type
  @upload_url = upload_url
  @created_at = created_at
  @updated_at = updated_at
  @method = kwargs[:method]
  @address = kwargs[:address]
  @tx_hash = kwargs[:tx_hash]
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



6
7
8
# File 'lib/buda/resources/deposit_data.rb', line 6

def address
  @address
end

#created_atObject (readonly)

Returns the value of attribute created_at.



6
7
8
# File 'lib/buda/resources/deposit_data.rb', line 6

def created_at
  @created_at
end

#methodObject (readonly)

Returns the value of attribute method.



6
7
8
# File 'lib/buda/resources/deposit_data.rb', line 6

def method
  @method
end

#tx_hashObject (readonly)

Returns the value of attribute tx_hash.



6
7
8
# File 'lib/buda/resources/deposit_data.rb', line 6

def tx_hash
  @tx_hash
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/buda/resources/deposit_data.rb', line 6

def type
  @type
end

#update_atObject (readonly)

Returns the value of attribute update_at.



6
7
8
# File 'lib/buda/resources/deposit_data.rb', line 6

def update_at
  @update_at
end

#upload_urlObject (readonly)

Returns the value of attribute upload_url.



6
7
8
# File 'lib/buda/resources/deposit_data.rb', line 6

def upload_url
  @upload_url
end

Instance Method Details

#inspectObject



26
27
28
# File 'lib/buda/resources/deposit_data.rb', line 26

def inspect
  "<DepositData #{@type} (#{@created_at.to_date})>"
end

#to_sObject



22
23
24
# File 'lib/buda/resources/deposit_data.rb', line 22

def to_s
  "#{@type} (#{@created_at.to_date})"
end