Class: ProxyCheapClient::Configuration
- Defined in:
- lib/proxy_cheap_client/models/configuration.rb
Overview
module Models
Instance Attribute Summary collapse
-
#available ⇒ Object
readonly
Returns the value of attribute available.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#packages ⇒ Object
readonly
Returns the value of attribute packages.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Configuration
constructor
A new instance of Configuration.
- #to_h ⇒ Object
Methods inherited from Base
#conn, extract_error_body, extract_error_message, parse_response, request, #request
Constructor Details
#initialize(attrs) ⇒ Configuration
6 7 8 9 10 11 12 |
# File 'lib/proxy_cheap_client/models/configuration.rb', line 6 def initialize(attrs) @data = attrs @price = attrs["price"] || attrs["totalPrice"] @currency = attrs["currency"] || "USD" @packages = attrs["packages"] @available = attrs["available"] end |
Instance Attribute Details
#available ⇒ Object (readonly)
Returns the value of attribute available.
4 5 6 |
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4 def available @available end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
4 5 6 |
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4 def currency @currency end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4 def data @data end |
#packages ⇒ Object (readonly)
Returns the value of attribute packages.
4 5 6 |
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4 def packages @packages end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
4 5 6 |
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4 def price @price end |
Instance Method Details
#to_h ⇒ Object
14 15 16 |
# File 'lib/proxy_cheap_client/models/configuration.rb', line 14 def to_h data end |