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.
-
#conn ⇒ Object
readonly
Returns the value of attribute conn.
-
#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 = {}, client) ⇒ Configuration
constructor
A new instance of Configuration.
- #to_h ⇒ Object
Methods inherited from Base
#extract_error_body, #extract_error_message, #parse_response, #request
Constructor Details
#initialize(attrs = {}, client) ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 13 |
# File 'lib/proxy_cheap_client/models/configuration.rb', line 6 def initialize(attrs = {}, client) @data = attrs @price = attrs["price"] || attrs["totalPrice"] @currency = attrs["currency"] || "USD" @packages = attrs["packages"] @available = attrs["available"] @conn = client.conn 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 |
#conn ⇒ Object (readonly)
Returns the value of attribute conn.
4 5 6 |
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4 def conn @conn 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
15 16 17 |
# File 'lib/proxy_cheap_client/models/configuration.rb', line 15 def to_h data end |