Class: FastSpring::LocalizedStorePrice
- Inherits:
-
Object
- Object
- FastSpring::LocalizedStorePrice
- Defined in:
- lib/fastspring-saasy/localized_store_price.rb
Instance Attribute Summary collapse
-
#product ⇒ Object
readonly
Returns the value of attribute product.
Instance Method Summary collapse
- #fetch(key) ⇒ Object
-
#initialize(product, params) ⇒ LocalizedStorePrice
constructor
A new instance of LocalizedStorePrice.
- #path ⇒ Object
- #quantity ⇒ Object
- #unit_currency ⇒ Object
- #unit_display ⇒ Object
- #unit_html ⇒ Object
- #unit_value ⇒ Object
Constructor Details
#initialize(product, params) ⇒ LocalizedStorePrice
Returns a new instance of LocalizedStorePrice.
5 6 7 8 |
# File 'lib/fastspring-saasy/localized_store_price.rb', line 5 def initialize(product, params) @product = product @params = params end |
Instance Attribute Details
#product ⇒ Object (readonly)
Returns the value of attribute product.
3 4 5 |
# File 'lib/fastspring-saasy/localized_store_price.rb', line 3 def product @product end |
Instance Method Details
#fetch(key) ⇒ Object
34 35 36 |
# File 'lib/fastspring-saasy/localized_store_price.rb', line 34 def fetch(key) @params["#{product}_#{key}"] end |
#path ⇒ Object
10 11 12 |
# File 'lib/fastspring-saasy/localized_store_price.rb', line 10 def path fetch('path') end |
#quantity ⇒ Object
14 15 16 |
# File 'lib/fastspring-saasy/localized_store_price.rb', line 14 def quantity fetch('quantity') end |
#unit_currency ⇒ Object
22 23 24 |
# File 'lib/fastspring-saasy/localized_store_price.rb', line 22 def unit_currency fetch('unit_currency') end |
#unit_display ⇒ Object
26 27 28 |
# File 'lib/fastspring-saasy/localized_store_price.rb', line 26 def unit_display fetch('unit_display') end |
#unit_html ⇒ Object
30 31 32 |
# File 'lib/fastspring-saasy/localized_store_price.rb', line 30 def unit_html fetch('unit_html') end |
#unit_value ⇒ Object
18 19 20 |
# File 'lib/fastspring-saasy/localized_store_price.rb', line 18 def unit_value fetch('unit_value') end |