Class: Fugle::Intraday::Meta::Price Private

Inherits:
Object
  • Object
show all
Defined in:
lib/fugle/intraday/meta.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Price

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Price.

Since:

  • 0.1.0



98
99
100
101
102
103
# File 'lib/fugle/intraday/meta.rb', line 98

def initialize(data)
  @reference = data['priceReference']
  @high_limit = data['priceHighLimit']
  @low_limit = data['priceLowLimit']
  @currency = data['currency']
end

Instance Attribute Details

#currencyObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



94
95
96
# File 'lib/fugle/intraday/meta.rb', line 94

def currency
  @currency
end

#high_limitObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



94
95
96
# File 'lib/fugle/intraday/meta.rb', line 94

def high_limit
  @high_limit
end

#low_limitObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



94
95
96
# File 'lib/fugle/intraday/meta.rb', line 94

def low_limit
  @low_limit
end

#referenceObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



94
95
96
# File 'lib/fugle/intraday/meta.rb', line 94

def reference
  @reference
end

Instance Method Details

#to_hHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Convert to Hash

Returns:

  • (Hash)

    the response as hash

Since:

  • 0.1.0



111
112
113
114
115
116
117
118
# File 'lib/fugle/intraday/meta.rb', line 111

def to_h
  {
    reference: @reference,
    high_limit: @high_limit,
    low_limit: @low_limit,
    currency: @currency
  }
end

#to_json(*args) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Convert to JSON

Returns:

  • (String)

    the json string

Since:

  • 0.1.0



126
127
128
# File 'lib/fugle/intraday/meta.rb', line 126

def to_json(*args)
  to_h.to_json(*args)
end