Class: AuthorizeNet::LineItem
- Inherits:
-
Object
- Object
- AuthorizeNet::LineItem
- Includes:
- Model
- Defined in:
- lib/authorize_net/line_item.rb
Overview
Models an line item.
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#price ⇒ Object
Returns the value of attribute price.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#taxable ⇒ Object
Returns the value of attribute taxable.
Instance Method Summary collapse
Methods included from Model
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/authorize_net/line_item.rb', line 8 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/authorize_net/line_item.rb', line 8 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/authorize_net/line_item.rb', line 8 def name @name end |
#price ⇒ Object
Returns the value of attribute price.
8 9 10 |
# File 'lib/authorize_net/line_item.rb', line 8 def price @price end |
#quantity ⇒ Object
Returns the value of attribute quantity.
8 9 10 |
# File 'lib/authorize_net/line_item.rb', line 8 def quantity @quantity end |
#taxable ⇒ Object
Returns the value of attribute taxable.
8 9 10 |
# File 'lib/authorize_net/line_item.rb', line 8 def taxable @taxable end |
Instance Method Details
#to_hash ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/authorize_net/line_item.rb', line 10 def to_hash hash = { :line_item_id => @id, :line_item_name => @name, :line_item_description => @description, :line_item_quantity => @quantity, :line_item_price => @price, :line_item_taxable => @taxable } hash.delete_if {|k, v| v.nil?} hash end |