Class: ProxyCheapClient::Configuration

Inherits:
Base
  • Object
show all
Defined in:
lib/proxy_cheap_client/models/configuration.rb

Overview

module Models

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#availableObject (readonly)

Returns the value of attribute available.



4
5
6
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4

def available
  @available
end

#connObject (readonly)

Returns the value of attribute conn.



4
5
6
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4

def conn
  @conn
end

#currencyObject (readonly)

Returns the value of attribute currency.



4
5
6
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4

def currency
  @currency
end

#dataObject (readonly)

Returns the value of attribute data.



4
5
6
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4

def data
  @data
end

#packagesObject (readonly)

Returns the value of attribute packages.



4
5
6
# File 'lib/proxy_cheap_client/models/configuration.rb', line 4

def packages
  @packages
end

#priceObject (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_hObject



15
16
17
# File 'lib/proxy_cheap_client/models/configuration.rb', line 15

def to_h
  data
end