Class: Klarna::Checkout::CartItem
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/klarna/checkout/cart_item.rb
Instance Attribute Summary collapse
-
#discount_rate ⇒ Object
Returns the value of attribute discount_rate.
-
#ean ⇒ Object
Returns the value of attribute ean.
-
#image_uri ⇒ Object
Returns the value of attribute image_uri.
-
#name ⇒ Object
Returns the value of attribute name.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#tax_rate ⇒ Object
Returns the value of attribute tax_rate.
-
#total_price_excluding_tax ⇒ Object
Returns the value of attribute total_price_excluding_tax.
-
#total_price_including_tax ⇒ Object
Returns the value of attribute total_price_including_tax.
-
#total_tax_amount ⇒ Object
Returns the value of attribute total_tax_amount.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unit_price ⇒ Object
Returns the value of attribute unit_price.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
Methods inherited from Resource
defaults, defaults=, #initialize, #json_sanitize, #to_json
Methods included from HasOne
Methods included from HasMany
Constructor Details
This class inherits a constructor from Klarna::Checkout::Resource
Instance Attribute Details
#discount_rate ⇒ Object
Returns the value of attribute discount_rate.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def discount_rate @discount_rate end |
#ean ⇒ Object
Returns the value of attribute ean.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def ean @ean end |
#image_uri ⇒ Object
Returns the value of attribute image_uri.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def image_uri @image_uri end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def name @name end |
#quantity ⇒ Object
Returns the value of attribute quantity.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def quantity @quantity end |
#reference ⇒ Object
Returns the value of attribute reference.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def reference @reference end |
#tax_rate ⇒ Object
Returns the value of attribute tax_rate.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def tax_rate @tax_rate end |
#total_price_excluding_tax ⇒ Object
Returns the value of attribute total_price_excluding_tax.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def total_price_excluding_tax @total_price_excluding_tax end |
#total_price_including_tax ⇒ Object
Returns the value of attribute total_price_including_tax.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def total_price_including_tax @total_price_including_tax end |
#total_tax_amount ⇒ Object
Returns the value of attribute total_tax_amount.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def total_tax_amount @total_tax_amount end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def type @type end |
#unit_price ⇒ Object
Returns the value of attribute unit_price.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def unit_price @unit_price end |
#uri ⇒ Object
Returns the value of attribute uri.
8 9 10 |
# File 'lib/klarna/checkout/cart_item.rb', line 8 def uri @uri end |
Instance Method Details
#as_json ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/klarna/checkout/cart_item.rb', line 14 def as_json json_sanitize({ :type => @type, :ean => @ean, :reference => @reference, :name => @name, :uri => @uri, :image_uri => @image_uri, :quantity => @quantity, :unit_price => @unit_price, :discount_rate => @discount_rate, :tax_rate => @tax_rate }) end |