Class: GeminiApi::Address

Inherits:
Struct
  • Object
show all
Defined in:
lib/gemini_api/address.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#addressObject

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



2
3
4
# File 'lib/gemini_api/address.rb', line 2

def address
  @address
end

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



2
3
4
# File 'lib/gemini_api/address.rb', line 2

def created_at
  @created_at
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



2
3
4
# File 'lib/gemini_api/address.rb', line 2

def label
  @label
end

#networkObject

Returns the value of attribute network

Returns:

  • (Object)

    the current value of network



2
3
4
# File 'lib/gemini_api/address.rb', line 2

def network
  @network
end

#raw_dataObject

Returns the value of attribute raw_data

Returns:

  • (Object)

    the current value of raw_data



2
3
4
# File 'lib/gemini_api/address.rb', line 2

def raw_data
  @raw_data
end

#scopeObject

Returns the value of attribute scope

Returns:

  • (Object)

    the current value of scope



2
3
4
# File 'lib/gemini_api/address.rb', line 2

def scope
  @scope
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



2
3
4
# File 'lib/gemini_api/address.rb', line 2

def status
  @status
end

Class Method Details

.build(raw_data) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/gemini_api/address.rb', line 12

def self.build(raw_data)
  new(
    network: raw_data['network'],
    scope: raw_data['scope'],
    label: raw_data['label'],
    status: raw_data['status'],
    created_at: Time.at(raw_data['createdAt'].to_f / 1000),
    address: raw_data['address']
  )
end