Package io.voucherify.client.model
Class OrderItemProduct
java.lang.Object
io.voucherify.client.model.OrderItemProduct
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class OrderItemProduct
extends Object
An object containing details of the related product.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic OrderItemProductCreate an instance of OrderItemProduct given an JSON stringgetId()A unique identifier that represents the product and is assigned by Voucherify.A set of custom key/value pairs that you can attach to a product.getName()Product name.The override set to `true` is used to store the product information in the system.getPrice()Product price.The merchant's product ID (if it is different than Voucherify's product ID).inthashCode()price(BigDecimal price) voidvoidsetMetadata(Object metadata) voidvoidsetOverride(Boolean override) voidsetPrice(BigDecimal price) voidsetSourceId(String sourceId) toJson()Convert an instance of OrderItemProduct to an JSON stringtoString()
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_SOURCE_ID
- See Also:
-
SERIALIZED_NAME_OVERRIDE
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_PRICE
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
OrderItemProduct
public OrderItemProduct()
-
-
Method Details
-
id
-
getId
A unique identifier that represents the product and is assigned by Voucherify.- Returns:
- id
-
setId
-
sourceId
-
getSourceId
The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.- Returns:
- sourceId
-
setSourceId
-
override
-
getOverride
The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. Override works only for endpoints that create an order in the database.- Returns:
- override
-
setOverride
-
name
-
getName
Product name.- Returns:
- name
-
setName
-
metadata
-
getMetadata
A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.- Returns:
- metadata
-
setMetadata
-
price
-
getPrice
Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).- Returns:
- price
-
setPrice
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of OrderItemProduct given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of OrderItemProduct
- Throws:
IOException- if the JSON string is invalid with respect to OrderItemProduct
-
toJson
Convert an instance of OrderItemProduct to an JSON string- Returns:
- JSON string
-