Package io.voucherify.client.model
Class OrderCalculatedItemProduct
java.lang.Object
io.voucherify.client.model.OrderCalculatedItemProduct
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class OrderCalculatedItemProduct
extends Object
An object containing details of the related product.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic OrderCalculatedItemProductCreate an instance of OrderCalculatedItemProduct 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 OrderCalculatedItemProduct 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
-
OrderCalculatedItemProduct
public OrderCalculatedItemProduct()
-
-
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.- 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 OrderCalculatedItemProduct given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of OrderCalculatedItemProduct
- Throws:
IOException- if the JSON string is invalid with respect to OrderCalculatedItemProduct
-
toJson
Convert an instance of OrderCalculatedItemProduct to an JSON string- Returns:
- JSON string
-