Class: Paymill::ShoppingCartItem
- Inherits:
-
Object
- Object
- Paymill::ShoppingCartItem
- Defined in:
- lib/paymill/models/shopping_cart_item.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#description ⇒ Object
Returns the value of attribute description.
-
#item_number ⇒ Object
Returns the value of attribute item_number.
-
#name ⇒ Object
Returns the value of attribute name.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(arguments = {}) ⇒ ShoppingCartItem
constructor
A new instance of ShoppingCartItem.
Constructor Details
#initialize(arguments = {}) ⇒ ShoppingCartItem
Returns a new instance of ShoppingCartItem.
5 6 7 8 9 10 |
# File 'lib/paymill/models/shopping_cart_item.rb', line 5 def initialize( arguments = {} ) arguments.each do |key, value| raise ArgumentError.new( "parameter #{key} is not allowed" ) unless ShoppingCartItem.instance_methods( false ).include? key instance_variable_set( "@#{key}", ( Integer( value ) rescue value ) ) end end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
3 4 5 |
# File 'lib/paymill/models/shopping_cart_item.rb', line 3 def amount @amount end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/paymill/models/shopping_cart_item.rb', line 3 def description @description end |
#item_number ⇒ Object
Returns the value of attribute item_number.
3 4 5 |
# File 'lib/paymill/models/shopping_cart_item.rb', line 3 def item_number @item_number end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/paymill/models/shopping_cart_item.rb', line 3 def name @name end |
#quantity ⇒ Object
Returns the value of attribute quantity.
3 4 5 |
# File 'lib/paymill/models/shopping_cart_item.rb', line 3 def quantity @quantity end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/paymill/models/shopping_cart_item.rb', line 3 def url @url end |