Class: Braintree::TransactionLineItem
- Inherits:
 - 
      Object
      
        
- Object
 - Braintree::TransactionLineItem
 
 
- Includes:
 - BaseModule
 
- Defined in:
 - lib/braintree/transaction_line_item.rb
 
Instance Attribute Summary collapse
- 
  
    
      #commodity_code  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute commodity_code.
 - 
  
    
      #description  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute description.
 - 
  
    
      #discount_amount  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute discount_amount.
 - 
  
    
      #image_url  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute image_url.
 - 
  
    
      #kind  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute kind.
 - 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 - 
  
    
      #product_code  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute product_code.
 - 
  
    
      #quantity  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute quantity.
 - 
  
    
      #tax_amount  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute tax_amount.
 - 
  
    
      #total_amount  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute total_amount.
 - 
  
    
      #unit_amount  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute unit_amount.
 - 
  
    
      #unit_of_measure  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute unit_of_measure.
 - 
  
    
      #unit_tax_amount  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute unit_tax_amount.
 - 
  
    
      #upc_code  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute upc_code.
 - 
  
    
      #upc_type  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute upc_type.
 - 
  
    
      #url  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute url.
 
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize(gateway, attributes)  ⇒ TransactionLineItem 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of TransactionLineItem.
 
Methods included from BaseModule
Methods included from BaseModule::Methods
#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class
Constructor Details
#initialize(gateway, attributes) ⇒ TransactionLineItem
Returns a new instance of TransactionLineItem.
      21 22 23 24 25 26 27 28 29 30  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 21 def initialize(gateway, attributes) @gateway = gateway set_instance_variables_from_hash(attributes) @quantity = Util.to_big_decimal(quantity) @unit_amount = Util.to_big_decimal(unit_amount) @unit_tax_amount = Util.to_big_decimal(unit_tax_amount) @discount_amount = Util.to_big_decimal(discount_amount) @tax_amount = Util.to_big_decimal(tax_amount) @total_amount = Util.to_big_decimal(total_amount) end  | 
  
Instance Attribute Details
#commodity_code ⇒ Object (readonly)
Returns the value of attribute commodity_code.
      4 5 6  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 4 def commodity_code @commodity_code end  | 
  
#description ⇒ Object (readonly)
Returns the value of attribute description.
      5 6 7  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 5 def description @description end  | 
  
#discount_amount ⇒ Object (readonly)
Returns the value of attribute discount_amount.
      6 7 8  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 6 def discount_amount @discount_amount end  | 
  
#image_url ⇒ Object (readonly)
Returns the value of attribute image_url.
      7 8 9  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 7 def image_url @image_url end  | 
  
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
      8 9 10  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 8 def kind @kind end  | 
  
#name ⇒ Object (readonly)
Returns the value of attribute name.
      9 10 11  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 9 def name @name end  | 
  
#product_code ⇒ Object (readonly)
Returns the value of attribute product_code.
      10 11 12  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 10 def product_code @product_code end  | 
  
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
      11 12 13  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 11 def quantity @quantity end  | 
  
#tax_amount ⇒ Object (readonly)
Returns the value of attribute tax_amount.
      12 13 14  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 12 def tax_amount @tax_amount end  | 
  
#total_amount ⇒ Object (readonly)
Returns the value of attribute total_amount.
      13 14 15  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 13 def total_amount @total_amount end  | 
  
#unit_amount ⇒ Object (readonly)
Returns the value of attribute unit_amount.
      14 15 16  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 14 def unit_amount @unit_amount end  | 
  
#unit_of_measure ⇒ Object (readonly)
Returns the value of attribute unit_of_measure.
      15 16 17  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 15 def unit_of_measure @unit_of_measure end  | 
  
#unit_tax_amount ⇒ Object (readonly)
Returns the value of attribute unit_tax_amount.
      16 17 18  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 16 def unit_tax_amount @unit_tax_amount end  | 
  
#upc_code ⇒ Object (readonly)
Returns the value of attribute upc_code.
      17 18 19  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 17 def upc_code @upc_code end  | 
  
#upc_type ⇒ Object (readonly)
Returns the value of attribute upc_type.
      18 19 20  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 18 def upc_type @upc_type end  | 
  
#url ⇒ Object (readonly)
Returns the value of attribute url.
      19 20 21  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 19 def url @url end  | 
  
Class Method Details
._new(*args) ⇒ Object
      34 35 36  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 34 def _new(*args) self.new(*args) end  | 
  
.find_all(*args) ⇒ Object
      39 40 41  | 
    
      # File 'lib/braintree/transaction_line_item.rb', line 39 def self.find_all(*args) Configuration.gateway.transaction_line_item.find_all(*args) end  |