Class: Softlayer::Billing::Currency::ExchangeRate
- 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
-
#effective_date ⇒ Object
Returns the value of attribute effective_date.
-
#expiration_date ⇒ Object
Returns the value of attribute expiration_date.
-
#funding_currency ⇒ Object
Returns the value of attribute funding_currency.
-
#id ⇒ Object
Returns the value of attribute id.
-
#local_currency ⇒ Object
Returns the value of attribute local_currency.
-
#rate ⇒ Object
Returns the value of attribute rate.
Class Method Summary collapse
Instance Method Summary collapse
- #get_all_currency_exchange_rates(string_date = nil) ⇒ Object
- #get_funding_currency ⇒ Object
- #get_local_currency ⇒ Object
- #get_object ⇒ Object
- #get_price(price = nil, format_options = nil) ⇒ Object
Methods inherited from Model
all, all_request_for, create, find, parse, request, #request, #to_hash
Instance Attribute Details
#effective_date ⇒ Object
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_date ⇒ Object
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_currency ⇒ Object
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 |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/softlayer/billing/currency/exchange_rate.rb', line 8 def id @id end |
#local_currency ⇒ Object
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 |
#rate ⇒ Object
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_currencies ⇒ Object
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) = {to: to, from: from, effective_date: effective_date} request(:get_exchange_rate, Softlayer::Billing::Currency::ExchangeRate, ) 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) = {string_date: string_date} request(:get_all_currency_exchange_rates, Array[Softlayer::Billing::Currency::ExchangeRate], ) end |
#get_funding_currency ⇒ Object
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_currency ⇒ Object
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_object ⇒ Object
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, = nil) = {price: price, format_options: } request(:get_price, String, ) end |