class TaxCloud::CartItem

A CartItem defines a single line item for the purchase. Used to calculate the tax amount.

Attributes

index[RW]

The unique index number for the line item. Must be unique for the scope of the cart.

item_id[RW]

The stock keeping unit (SKU) number.

price[RW]

The price of the item. All prices are USD. Do not include currency symbol.

quantity[RW]

The total number of items.

tic[RW]

The taxable information code. See TaxCloud::TaxCodes.

Public Instance Methods

to_hash() click to toggle source

Convert the object to a usable hash for SOAP requests.

# File lib/tax_cloud/cart_item.rb, line 18
def to_hash
  {
    'Index' => index,
    'ItemID' => item_id,
    'TIC' => tic,
    'Price' => price,
    'Qty' => quantity
  }
end