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.
6 7 8 |
# File 'lib/authorize_net/line_item.rb', line 6 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/authorize_net/line_item.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/authorize_net/line_item.rb', line 6 def name @name end |
#price ⇒ Object
Returns the value of attribute price.
6 7 8 |
# File 'lib/authorize_net/line_item.rb', line 6 def price @price end |
#quantity ⇒ Object
Returns the value of attribute quantity.
6 7 8 |
# File 'lib/authorize_net/line_item.rb', line 6 def quantity @quantity end |
#taxable ⇒ Object
Returns the value of attribute taxable.
6 7 8 |
# File 'lib/authorize_net/line_item.rb', line 6 def taxable @taxable end |
Instance Method Details
#to_hash ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/authorize_net/line_item.rb', line 8 def to_hash hash = { line_item_id: @id, line_item_name: @name, line_item_description: @description, line_item_quantity: @quantity, line_item_unit_price: @price, line_item_taxable: @taxable } hash.delete_if { |_k, v| v.nil? } hash end |