Class LineItemModel
java.lang.Object
net.avalara.avatax.rest.client.models.LineItemModel
public class LineItemModel
extends java.lang.Object
Represents one line item in a transaction
-
Constructor Summary
Constructors Constructor Description LineItemModel()
-
Method Summary
Modifier and Type Method Description AddressesModel
getAddresses()
Getter for addressesjava.math.BigDecimal
getAmount()
Getter for amount Total amount for this line.java.lang.String
getBusinessIdentificationNo()
Getter for businessIdentificationNo VAT business identification number for the customer for this line item.java.lang.String
getCategory()
Getter for category Product category breadcrumbs.java.lang.String
getCustomerUsageType()
Getter for customerUsageType DEPRECATED - Date: 10/16/2017, Version: 17.11, Message: Please use `entityUseCode` instead.java.lang.String
getDescription()
Getter for description Item description.java.lang.Boolean
getDiscounted()
Getter for discounted True if the document discount should be applied to this line.java.lang.String
getEntityUseCode()
Getter for entityUseCode Entity Use Code - The client application customer or usage type.java.lang.String
getExemptionCode()
Getter for exemptionCode The customer Tax Id Number (tax_number) associated with a certificate - Sales tax calculation requests first determine if there is an applicable ECMS entry available, and will utilize it for exemption processing.java.lang.String
getHsCode()
Getter for hsCode The Item code for Custom Duty / Global Import tax determination Harmonized Tariff System code for this transaction.java.lang.String
getItemCode()
Getter for itemCode Item Code (SKU).MarketplaceLiabilityType
getMarketplaceLiabilityType()
Getter for marketplaceLiabilityType This field will identify who is remitting Marketplace or Seller.java.lang.Long
getMerchantSellerId()
Getter for merchantSellerId DEPRECATED - Date: 04/15/2021, Version: 21.4, Message: Please use merchantSellerIdentifier instead.java.lang.String
getMerchantSellerIdentifier()
Getter for merchantSellerIdentifier ID of the merchant selling on the Marketplace.java.lang.String
getNumber()
Getter for number The line number of this line within the document.java.lang.String
getOriginationDocumentId()
Getter for originationDocumentId The transaction's original ID in its origination systemjava.lang.String
getOriginationSite()
Getter for originationSite Synonym of Marketplace Origination.java.util.ArrayList<TransactionLineParameterModel>
getParameters()
Getter for parameters Special parameters that apply to this line within this transaction.java.math.BigDecimal
getQuantity()
Getter for quantity Quantity of items in this line.java.lang.String
getRef1()
Getter for ref1 Ref1 (Customer Defined Field) This field is available for you to use to provide whatever information your implementation requires.java.lang.String
getRef2()
Getter for ref2 Ref2 (Customer Defined Field) This field is available for you to use to provide whatever information your implementation requires.java.lang.String
getRevenueAccount()
Getter for revenueAccount Revenue Account (Customer Defined Field).java.lang.String
getSummary()
Getter for summary A long description of the product.java.lang.String
getTaxCode()
Getter for taxCode Tax Code - System or Custom Tax Code.java.lang.Boolean
getTaxIncluded()
Getter for taxIncluded Indicates whether the `amount` for this line already includes tax.TaxOverrideModel
getTaxOverride()
Getter for taxOverridejava.util.ArrayList<TransactionLineUserDefinedFieldModel>
getUserDefinedFields()
Getter for userDefinedFields Custom user fields/flex fields for this line.void
setAddresses(AddressesModel value)
Setter for addressesvoid
setAmount(java.math.BigDecimal value)
Setter for amount Total amount for this line.void
setBusinessIdentificationNo(java.lang.String value)
Setter for businessIdentificationNo VAT business identification number for the customer for this line item.void
setCategory(java.lang.String value)
Setter for category Product category breadcrumbs.void
setCustomerUsageType(java.lang.String value)
Setter for customerUsageType DEPRECATED - Date: 10/16/2017, Version: 17.11, Message: Please use `entityUseCode` instead.void
setDescription(java.lang.String value)
Setter for description Item description.void
setDiscounted(java.lang.Boolean value)
Setter for discounted True if the document discount should be applied to this line.void
setEntityUseCode(java.lang.String value)
Setter for entityUseCode Entity Use Code - The client application customer or usage type.void
setExemptionCode(java.lang.String value)
Setter for exemptionCode The customer Tax Id Number (tax_number) associated with a certificate - Sales tax calculation requests first determine if there is an applicable ECMS entry available, and will utilize it for exemption processing.void
setHsCode(java.lang.String value)
Setter for hsCode The Item code for Custom Duty / Global Import tax determination Harmonized Tariff System code for this transaction.void
setItemCode(java.lang.String value)
Setter for itemCode Item Code (SKU).void
setMarketplaceLiabilityType(MarketplaceLiabilityType value)
Setter for marketplaceLiabilityType This field will identify who is remitting Marketplace or Seller.void
setMerchantSellerId(java.lang.Long value)
Setter for merchantSellerId DEPRECATED - Date: 04/15/2021, Version: 21.4, Message: Please use merchantSellerIdentifier instead.void
setMerchantSellerIdentifier(java.lang.String value)
Setter for merchantSellerIdentifier ID of the merchant selling on the Marketplace.void
setNumber(java.lang.String value)
Setter for number The line number of this line within the document.void
setOriginationDocumentId(java.lang.String value)
Setter for originationDocumentId The transaction's original ID in its origination systemvoid
setOriginationSite(java.lang.String value)
Setter for originationSite Synonym of Marketplace Origination.void
setParameters(java.util.ArrayList<TransactionLineParameterModel> value)
Setter for parameters Special parameters that apply to this line within this transaction.void
setQuantity(java.math.BigDecimal value)
Setter for quantity Quantity of items in this line.void
setRef1(java.lang.String value)
Setter for ref1 Ref1 (Customer Defined Field) This field is available for you to use to provide whatever information your implementation requires.void
setRef2(java.lang.String value)
Setter for ref2 Ref2 (Customer Defined Field) This field is available for you to use to provide whatever information your implementation requires.void
setRevenueAccount(java.lang.String value)
Setter for revenueAccount Revenue Account (Customer Defined Field).void
setSummary(java.lang.String value)
Setter for summary A long description of the product.void
setTaxCode(java.lang.String value)
Setter for taxCode Tax Code - System or Custom Tax Code.void
setTaxIncluded(java.lang.Boolean value)
Setter for taxIncluded Indicates whether the `amount` for this line already includes tax.void
setTaxOverride(TaxOverrideModel value)
Setter for taxOverridevoid
setUserDefinedFields(java.util.ArrayList<TransactionLineUserDefinedFieldModel> value)
Setter for userDefinedFields Custom user fields/flex fields for this line.java.lang.String
toString()
Returns a JSON string representation of LineItemModel
-
Constructor Details
-
LineItemModel
public LineItemModel()
-
-
Method Details
-
getNumber
public java.lang.String getNumber()Getter for number The line number of this line within the document. This can be any text that is useful to you, such as numeric line numbers, alphabetic line numbers, or other text. -
setNumber
public void setNumber(java.lang.String value)Setter for number The line number of this line within the document. This can be any text that is useful to you, such as numeric line numbers, alphabetic line numbers, or other text. -
getQuantity
public java.math.BigDecimal getQuantity()Getter for quantity Quantity of items in this line. This quantity value should always be a positive value representing the quantity of product that changed hands, even when handling returns or refunds. If not provided, or if set to zero, the quantity value is assumed to be one (1). -
setQuantity
public void setQuantity(java.math.BigDecimal value)Setter for quantity Quantity of items in this line. This quantity value should always be a positive value representing the quantity of product that changed hands, even when handling returns or refunds. If not provided, or if set to zero, the quantity value is assumed to be one (1). -
getAmount
public java.math.BigDecimal getAmount()Getter for amount Total amount for this line. The amount represents the net currency value that changed hands from the customer (represented by the `customerCode` field) to the company (represented by the `companyCode`) field. For sale transactions, this value must be positive. It indicates the amount of money paid by the customer to the company. For refund or return transactions, this value must be negative. -
setAmount
public void setAmount(java.math.BigDecimal value)Setter for amount Total amount for this line. The amount represents the net currency value that changed hands from the customer (represented by the `customerCode` field) to the company (represented by the `companyCode`) field. For sale transactions, this value must be positive. It indicates the amount of money paid by the customer to the company. For refund or return transactions, this value must be negative. -
getAddresses
Getter for addresses -
setAddresses
Setter for addresses -
getTaxCode
public java.lang.String getTaxCode()Getter for taxCode Tax Code - System or Custom Tax Code. You can use your own tax code mapping or standard Avalara tax codes. For a full list of tax codes, see `ListTaxCodes`. -
setTaxCode
public void setTaxCode(java.lang.String value)Setter for taxCode Tax Code - System or Custom Tax Code. You can use your own tax code mapping or standard Avalara tax codes. For a full list of tax codes, see `ListTaxCodes`. -
getCustomerUsageType
public java.lang.String getCustomerUsageType()Getter for customerUsageType DEPRECATED - Date: 10/16/2017, Version: 17.11, Message: Please use `entityUseCode` instead. -
setCustomerUsageType
public void setCustomerUsageType(java.lang.String value)Setter for customerUsageType DEPRECATED - Date: 10/16/2017, Version: 17.11, Message: Please use `entityUseCode` instead. -
getEntityUseCode
public java.lang.String getEntityUseCode()Getter for entityUseCode Entity Use Code - The client application customer or usage type. This field allows you to designate a type of usage that may make this transaction considered exempt by reason of exempt usage. For a list of entity use codes, see the Definitions API `ListEntityUseCodes`. -
setEntityUseCode
public void setEntityUseCode(java.lang.String value)Setter for entityUseCode Entity Use Code - The client application customer or usage type. This field allows you to designate a type of usage that may make this transaction considered exempt by reason of exempt usage. For a list of entity use codes, see the Definitions API `ListEntityUseCodes`. -
getItemCode
public java.lang.String getItemCode()Getter for itemCode Item Code (SKU). If you provide an `itemCode` field, the AvaTax API will look up the item you created with the `CreateItems` API call and use all the information available about that item for this transaction. -
setItemCode
public void setItemCode(java.lang.String value)Setter for itemCode Item Code (SKU). If you provide an `itemCode` field, the AvaTax API will look up the item you created with the `CreateItems` API call and use all the information available about that item for this transaction. -
getExemptionCode
public java.lang.String getExemptionCode()Getter for exemptionCode The customer Tax Id Number (tax_number) associated with a certificate - Sales tax calculation requests first determine if there is an applicable ECMS entry available, and will utilize it for exemption processing. If no applicable ECMS entry is available, the AvaTax service will determine if an Exemption Number field is populated or an Entity/Use Code is included in the sales tax calculation request, and will perform exemption processing using either of those two options. Note: This is same as 'exemptNo' in TransactionModel. -
setExemptionCode
public void setExemptionCode(java.lang.String value)Setter for exemptionCode The customer Tax Id Number (tax_number) associated with a certificate - Sales tax calculation requests first determine if there is an applicable ECMS entry available, and will utilize it for exemption processing. If no applicable ECMS entry is available, the AvaTax service will determine if an Exemption Number field is populated or an Entity/Use Code is included in the sales tax calculation request, and will perform exemption processing using either of those two options. Note: This is same as 'exemptNo' in TransactionModel. -
getDiscounted
public java.lang.Boolean getDiscounted()Getter for discounted True if the document discount should be applied to this line. If this value is false, or not provided, discounts will not be applied to this line even if they are specified on the root `discount` element. -
setDiscounted
public void setDiscounted(java.lang.Boolean value)Setter for discounted True if the document discount should be applied to this line. If this value is false, or not provided, discounts will not be applied to this line even if they are specified on the root `discount` element. -
getTaxIncluded
public java.lang.Boolean getTaxIncluded()Getter for taxIncluded Indicates whether the `amount` for this line already includes tax. If this value is `true`, the final price of this line including tax will equal the value in `amount`. If this value is `null` or `false`, the final price will equal `amount` plus whatever taxes apply to this line. -
setTaxIncluded
public void setTaxIncluded(java.lang.Boolean value)Setter for taxIncluded Indicates whether the `amount` for this line already includes tax. If this value is `true`, the final price of this line including tax will equal the value in `amount`. If this value is `null` or `false`, the final price will equal `amount` plus whatever taxes apply to this line. -
getRevenueAccount
public java.lang.String getRevenueAccount()Getter for revenueAccount Revenue Account (Customer Defined Field). This field is available for you to use to provide whatever information your implementation requires. It does not affect tax calculation. -
setRevenueAccount
public void setRevenueAccount(java.lang.String value)Setter for revenueAccount Revenue Account (Customer Defined Field). This field is available for you to use to provide whatever information your implementation requires. It does not affect tax calculation. -
getRef1
public java.lang.String getRef1()Getter for ref1 Ref1 (Customer Defined Field) This field is available for you to use to provide whatever information your implementation requires. It does not affect tax calculation. -
setRef1
public void setRef1(java.lang.String value)Setter for ref1 Ref1 (Customer Defined Field) This field is available for you to use to provide whatever information your implementation requires. It does not affect tax calculation. -
getRef2
public java.lang.String getRef2()Getter for ref2 Ref2 (Customer Defined Field) This field is available for you to use to provide whatever information your implementation requires. It does not affect tax calculation. -
setRef2
public void setRef2(java.lang.String value)Setter for ref2 Ref2 (Customer Defined Field) This field is available for you to use to provide whatever information your implementation requires. It does not affect tax calculation. -
getDescription
public java.lang.String getDescription()Getter for description Item description. For Streamlined Sales Tax (SST) customers, this field is required if an unmapped `itemCode` is used. -
setDescription
public void setDescription(java.lang.String value)Setter for description Item description. For Streamlined Sales Tax (SST) customers, this field is required if an unmapped `itemCode` is used. -
getBusinessIdentificationNo
public java.lang.String getBusinessIdentificationNo()Getter for businessIdentificationNo VAT business identification number for the customer for this line item. If you leave this field empty, this line item will use whatever business identification number you provided at the transaction level. If you specify a VAT business identification number for the customer in this transaction and you have also set up a business identification number for your company during company setup, this transaction will be treated as a business-to-business transaction for VAT purposes and it will be calculated according to VAT tax rules. -
setBusinessIdentificationNo
public void setBusinessIdentificationNo(java.lang.String value)Setter for businessIdentificationNo VAT business identification number for the customer for this line item. If you leave this field empty, this line item will use whatever business identification number you provided at the transaction level. If you specify a VAT business identification number for the customer in this transaction and you have also set up a business identification number for your company during company setup, this transaction will be treated as a business-to-business transaction for VAT purposes and it will be calculated according to VAT tax rules. -
getTaxOverride
Getter for taxOverride -
setTaxOverride
Setter for taxOverride -
getParameters
Getter for parameters Special parameters that apply to this line within this transaction. To get a full list of available parameters, please use the `ListParameters` API. -
setParameters
Setter for parameters Special parameters that apply to this line within this transaction. To get a full list of available parameters, please use the `ListParameters` API. -
getUserDefinedFields
Getter for userDefinedFields Custom user fields/flex fields for this line. -
setUserDefinedFields
Setter for userDefinedFields Custom user fields/flex fields for this line. -
getHsCode
public java.lang.String getHsCode()Getter for hsCode The Item code for Custom Duty / Global Import tax determination Harmonized Tariff System code for this transaction. For a list of harmonized tariff codes, see the Definitions API for harmonized tariff codes. -
setHsCode
public void setHsCode(java.lang.String value)Setter for hsCode The Item code for Custom Duty / Global Import tax determination Harmonized Tariff System code for this transaction. For a list of harmonized tariff codes, see the Definitions API for harmonized tariff codes. -
getMerchantSellerId
public java.lang.Long getMerchantSellerId()Getter for merchantSellerId DEPRECATED - Date: 04/15/2021, Version: 21.4, Message: Please use merchantSellerIdentifier instead. ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. -
setMerchantSellerId
public void setMerchantSellerId(java.lang.Long value)Setter for merchantSellerId DEPRECATED - Date: 04/15/2021, Version: 21.4, Message: Please use merchantSellerIdentifier instead. ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. -
getMerchantSellerIdentifier
public java.lang.String getMerchantSellerIdentifier()Getter for merchantSellerIdentifier ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. -
setMerchantSellerIdentifier
public void setMerchantSellerIdentifier(java.lang.String value)Setter for merchantSellerIdentifier ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. -
getMarketplaceLiabilityType
Getter for marketplaceLiabilityType This field will identify who is remitting Marketplace or Seller. This field must be populated by Marketplace. -
setMarketplaceLiabilityType
Setter for marketplaceLiabilityType This field will identify who is remitting Marketplace or Seller. This field must be populated by Marketplace. -
getOriginationDocumentId
public java.lang.String getOriginationDocumentId()Getter for originationDocumentId The transaction's original ID in its origination system -
setOriginationDocumentId
public void setOriginationDocumentId(java.lang.String value)Setter for originationDocumentId The transaction's original ID in its origination system -
getOriginationSite
public java.lang.String getOriginationSite()Getter for originationSite Synonym of Marketplace Origination. Name of the Marketplace where the transaction originated from. -
setOriginationSite
public void setOriginationSite(java.lang.String value)Setter for originationSite Synonym of Marketplace Origination. Name of the Marketplace where the transaction originated from. -
getCategory
public java.lang.String getCategory()Getter for category Product category breadcrumbs. This is the full path to the category where item is included. Categories should be separated by “ > “. Multiple category paths per item are accepted. In this case, category paths should be separated by “;”. -
setCategory
public void setCategory(java.lang.String value)Setter for category Product category breadcrumbs. This is the full path to the category where item is included. Categories should be separated by “ > “. Multiple category paths per item are accepted. In this case, category paths should be separated by “;”. -
getSummary
public java.lang.String getSummary()Getter for summary A long description of the product. -
setSummary
public void setSummary(java.lang.String value)Setter for summary A long description of the product. -
toString
public java.lang.String toString()Returns a JSON string representation of LineItemModel- Overrides:
toString
in classjava.lang.Object
-