Package com.adyen.model.checkout
Class ItemDetailLine
- java.lang.Object
-
- com.adyen.model.checkout.ItemDetailLine
-
public class ItemDetailLine extends Object
ItemDetailLine
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_COMMODITY_CODEstatic StringJSON_PROPERTY_DESCRIPTIONstatic StringJSON_PROPERTY_DISCOUNT_AMOUNTstatic StringJSON_PROPERTY_PRODUCT_CODEstatic StringJSON_PROPERTY_QUANTITYstatic StringJSON_PROPERTY_TOTAL_AMOUNTstatic StringJSON_PROPERTY_UNIT_OF_MEASUREstatic StringJSON_PROPERTY_UNIT_PRICE
-
Constructor Summary
Constructors Constructor Description ItemDetailLine()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemDetailLinecommodityCode(String commodityCode)The code that identifies the item in a standardized commodity coding scheme.ItemDetailLinedescription(String description)A description of the item, that provides details about the purchase.ItemDetailLinediscountAmount(Long discountAmount)The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000booleanequals(Object o)Return true if this ItemDetailLine object is equal to o.static ItemDetailLinefromJson(String jsonString)Create an instance of ItemDetailLine given an JSON stringStringgetCommodityCode()The code that identifies the item in a standardized commodity coding scheme.StringgetDescription()A description of the item, that provides details about the purchase.LonggetDiscountAmount()The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.StringgetProductCode()The product code.LonggetQuantity()The number of items.LonggetTotalAmount()The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total.StringgetUnitOfMeasure()The unit of measurement for an item. * Encoding: ASCII * Max length: 3 charactersLonggetUnitPrice()The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes)inthashCode()ItemDetailLineincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.ItemDetailLineproductCode(String productCode)The product code.ItemDetailLinequantity(Long quantity)The number of items.voidsetCommodityCode(String commodityCode)The code that identifies the item in a standardized commodity coding scheme.voidsetDescription(String description)A description of the item, that provides details about the purchase.voidsetDiscountAmount(Long discountAmount)The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetProductCode(String productCode)The product code.voidsetQuantity(Long quantity)The number of items.voidsetTotalAmount(Long totalAmount)The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total.voidsetUnitOfMeasure(String unitOfMeasure)The unit of measurement for an item. * Encoding: ASCII * Max length: 3 charactersvoidsetUnitPrice(Long unitPrice)The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes)StringtoJson()Convert an instance of ItemDetailLine to an JSON stringStringtoString()ItemDetailLinetotalAmount(Long totalAmount)The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total.ItemDetailLineunitOfMeasure(String unitOfMeasure)The unit of measurement for an item. * Encoding: ASCII * Max length: 3 charactersItemDetailLineunitPrice(Long unitPrice)The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes)
-
-
-
Field Detail
-
JSON_PROPERTY_COMMODITY_CODE
public static final String JSON_PROPERTY_COMMODITY_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DESCRIPTION
public static final String JSON_PROPERTY_DESCRIPTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DISCOUNT_AMOUNT
public static final String JSON_PROPERTY_DISCOUNT_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PRODUCT_CODE
public static final String JSON_PROPERTY_PRODUCT_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_QUANTITY
public static final String JSON_PROPERTY_QUANTITY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TOTAL_AMOUNT
public static final String JSON_PROPERTY_TOTAL_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_UNIT_OF_MEASURE
public static final String JSON_PROPERTY_UNIT_OF_MEASURE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_UNIT_PRICE
public static final String JSON_PROPERTY_UNIT_PRICE
- See Also:
- Constant Field Values
-
-
Method Detail
-
commodityCode
public ItemDetailLine commodityCode(String commodityCode)
The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.ungm.org/public/unspsc) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros.- Parameters:
commodityCode- The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.ungm.org/public/unspsc) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros.- Returns:
- the current
ItemDetailLineinstance, allowing for method chaining
-
getCommodityCode
public String getCommodityCode()
The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.ungm.org/public/unspsc) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros.- Returns:
- commodityCode The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.ungm.org/public/unspsc) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros.
-
setCommodityCode
public void setCommodityCode(String commodityCode)
The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.ungm.org/public/unspsc) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros.- Parameters:
commodityCode- The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.ungm.org/public/unspsc) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros.
-
description
public ItemDetailLine description(String description)
A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not start with a space or be all spaces. * Must not be all zeros.- Parameters:
description- A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not start with a space or be all spaces. * Must not be all zeros.- Returns:
- the current
ItemDetailLineinstance, allowing for method chaining
-
getDescription
public String getDescription()
A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not start with a space or be all spaces. * Must not be all zeros.- Returns:
- description A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not start with a space or be all spaces. * Must not be all zeros.
-
setDescription
public void setDescription(String description)
A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not start with a space or be all spaces. * Must not be all zeros.- Parameters:
description- A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not start with a space or be all spaces. * Must not be all zeros.
-
discountAmount
public ItemDetailLine discountAmount(Long discountAmount)
The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000- Parameters:
discountAmount- The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000- Returns:
- the current
ItemDetailLineinstance, allowing for method chaining
-
getDiscountAmount
public Long getDiscountAmount()
The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000- Returns:
- discountAmount The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000
-
setDiscountAmount
public void setDiscountAmount(Long discountAmount)
The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000- Parameters:
discountAmount- The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000
-
productCode
public ItemDetailLine productCode(String productCode)
The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * Max length: 12 characters- Parameters:
productCode- The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * Max length: 12 characters- Returns:
- the current
ItemDetailLineinstance, allowing for method chaining
-
getProductCode
public String getProductCode()
The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * Max length: 12 characters- Returns:
- productCode The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * Max length: 12 characters
-
setProductCode
public void setProductCode(String productCode)
The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * Max length: 12 characters- Parameters:
productCode- The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * Max length: 12 characters
-
quantity
public ItemDetailLine quantity(Long quantity)
The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max value: 9999- Parameters:
quantity- The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max value: 9999- Returns:
- the current
ItemDetailLineinstance, allowing for method chaining
-
getQuantity
public Long getQuantity()
The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max value: 9999- Returns:
- quantity The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max value: 9999
-
setQuantity
public void setQuantity(Long quantity)
The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max value: 9999- Parameters:
quantity- The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max value: 9999
-
totalAmount
public ItemDetailLine totalAmount(Long totalAmount)
The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total.- Parameters:
totalAmount- The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total.- Returns:
- the current
ItemDetailLineinstance, allowing for method chaining
-
getTotalAmount
public Long getTotalAmount()
The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total.- Returns:
- totalAmount The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total.
-
setTotalAmount
public void setTotalAmount(Long totalAmount)
The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total.- Parameters:
totalAmount- The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000 See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total.
-
unitOfMeasure
public ItemDetailLine unitOfMeasure(String unitOfMeasure)
The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters- Parameters:
unitOfMeasure- The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters- Returns:
- the current
ItemDetailLineinstance, allowing for method chaining
-
getUnitOfMeasure
public String getUnitOfMeasure()
The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters- Returns:
- unitOfMeasure The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters
-
setUnitOfMeasure
public void setUnitOfMeasure(String unitOfMeasure)
The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters- Parameters:
unitOfMeasure- The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters
-
unitPrice
public ItemDetailLine unitPrice(Long unitPrice)
The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000- Parameters:
unitPrice- The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000- Returns:
- the current
ItemDetailLineinstance, allowing for method chaining
-
getUnitPrice
public Long getUnitPrice()
The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000- Returns:
- unitPrice The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000
-
setUnitPrice
public void setUnitPrice(Long unitPrice)
The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000- Parameters:
unitPrice- The unit price, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max value: 10000000000
-
includeNullValues
public ItemDetailLine includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this ItemDetailLine object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
fromJson
public static ItemDetailLine fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of ItemDetailLine given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ItemDetailLine
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to ItemDetailLine
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of ItemDetailLine to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-