Package com.adyen.model.management
Class OrderItem
- java.lang.Object
-
- com.adyen.model.management.OrderItem
-
public class OrderItem extends Object
OrderItem
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOrderItem.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_IDstatic StringSERIALIZED_NAME_NAMEstatic StringSERIALIZED_NAME_QUANTITY
-
Constructor Summary
Constructors Constructor Description OrderItem()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static OrderItemfromJson(String jsonString)Create an instance of OrderItem given an JSON stringStringgetId()The unique identifier of the product.StringgetName()The name of the product.IntegergetQuantity()The number of items with the specified product `id` included in the order.inthashCode()OrderItemid(String id)OrderItemname(String name)OrderItemquantity(Integer quantity)voidsetId(String id)voidsetName(String name)voidsetQuantity(Integer quantity)StringtoJson()Convert an instance of OrderItem to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NAME
public static final String SERIALIZED_NAME_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_QUANTITY
public static final String SERIALIZED_NAME_QUANTITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public String getId()
The unique identifier of the product.- Returns:
- id
-
setId
public void setId(String id)
-
getName
public String getName()
The name of the product.- Returns:
- name
-
setName
public void setName(String name)
-
getQuantity
public Integer getQuantity()
The number of items with the specified product `id` included in the order.- Returns:
- quantity
-
setQuantity
public void setQuantity(Integer quantity)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to OrderItem
-
fromJson
public static OrderItem fromJson(String jsonString) throws IOException
Create an instance of OrderItem given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of OrderItem
- Throws:
IOException- if the JSON string is invalid with respect to OrderItem
-
toJson
public String toJson()
Convert an instance of OrderItem to an JSON string- Returns:
- JSON string
-
-