Package io.voucherify.client.model
Class ProductsCreateRequestBody
java.lang.Object
io.voucherify.client.model.ProductsCreateRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class ProductsCreateRequestBody
extends Object
Request schema for **POST** `v1/products`.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAttributesItem(String attributesItem) attributes(List<String> attributes) booleanstatic ProductsCreateRequestBodyCreate an instance of ProductsCreateRequestBody given an JSON stringA list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`.getId()A unique identifier that represents the product and is assigned by Voucherify.The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.The metadata object stores all custom attributes assigned to the product.getName()Unique user-defined product name.getPrice()Unit price.Unique product source ID.inthashCode()voidsetAttributes(List<String> attributes) voidvoidsetImageUrl(String imageUrl) voidsetMetadata(Object metadata) voidvoidvoidsetSourceId(String sourceId) toJson()Convert an instance of ProductsCreateRequestBody to an JSON stringtoString()
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_SOURCE_ID
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_PRICE
- See Also:
-
SERIALIZED_NAME_ATTRIBUTES
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_IMAGE_URL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
ProductsCreateRequestBody
public ProductsCreateRequestBody()
-
-
Method Details
-
id
-
getId
A unique identifier that represents the product and is assigned by Voucherify.- Returns:
- id
-
setId
-
sourceId
-
getSourceId
Unique product source ID.- Returns:
- sourceId
-
setSourceId
-
name
-
getName
Unique user-defined product name.- Returns:
- name
-
setName
-
price
-
getPrice
Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`.- Returns:
- price
-
setPrice
-
attributes
-
addAttributesItem
-
getAttributes
A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute.- Returns:
- attributes
-
setAttributes
-
metadata
-
getMetadata
The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.- Returns:
- metadata
-
setMetadata
-
imageUrl
-
getImageUrl
The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.- Returns:
- imageUrl
-
setImageUrl
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of ProductsCreateRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ProductsCreateRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to ProductsCreateRequestBody
-
toJson
Convert an instance of ProductsCreateRequestBody to an JSON string- Returns:
- JSON string
-