Class: Softlayer::Billing::Currency::ExchangeRate

Inherits:
Model
  • Object
show all
Defined in:
lib/softlayer/billing/currency/exchange_rate.rb

Defined Under Namespace

Classes: Representer

Constant Summary collapse

SERVICE =
'SoftLayer_Billing_Currency_ExchangeRate'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

all, all_request_for, create, find, parse, request, #request, #to_hash

Instance Attribute Details

#effective_dateObject

Returns the value of attribute effective_date.



6
7
8
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 6

def effective_date
  @effective_date
end

#expiration_dateObject

Returns the value of attribute expiration_date.



7
8
9
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 7

def expiration_date
  @expiration_date
end

#funding_currencyObject

Returns the value of attribute funding_currency.



10
11
12
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 10

def funding_currency
  @funding_currency
end

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 8

def id
  @id
end

#local_currencyObject

Returns the value of attribute local_currency.



11
12
13
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 11

def local_currency
  @local_currency
end

#rateObject

Returns the value of attribute rate.



9
10
11
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 9

def rate
  @rate
end

Class Method Details

.get_currenciesObject



18
19
20
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 18

def self.get_currencies
  request(:get_currencies, Array[Softlayer::Billing::Currency])
end

.get_exchange_rate(to = nil, from = nil, effective_date = nil) ⇒ Object



22
23
24
25
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 22

def self.get_exchange_rate(to = nil, from = nil, effective_date = nil)
  message = {to: to, from: from, effective_date: effective_date}
  request(:get_exchange_rate, Softlayer::Billing::Currency::ExchangeRate, message)
end

Instance Method Details

#get_all_currency_exchange_rates(string_date = nil) ⇒ Object



13
14
15
16
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 13

def get_all_currency_exchange_rates(string_date = nil)
  message = {string_date: string_date}
  request(:get_all_currency_exchange_rates, Array[Softlayer::Billing::Currency::ExchangeRate], message)
end

#get_funding_currencyObject



27
28
29
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 27

def get_funding_currency
  request(:get_funding_currency, Softlayer::Billing::Currency)
end

#get_local_currencyObject



31
32
33
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 31

def get_local_currency
  request(:get_local_currency, Softlayer::Billing::Currency)
end

#get_objectObject



35
36
37
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 35

def get_object
  request(:get_object, Softlayer::Billing::Currency::ExchangeRate)
end

#get_price(price = nil, format_options = nil) ⇒ Object



39
40
41
42
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 39

def get_price(price = nil, format_options = nil)
  message = {price: price, format_options: format_options}
  request(:get_price, String, message)
end