Package io.voucherify.client.model
Class CustomersCreateRequestBody
java.lang.Object
io.voucherify.client.model.CustomersCreateRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class CustomersCreateRequestBody
extends Object
Request body schema for **POST** `v1/customers`.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress(CustomersCreateRequestBodyAddress address) description(String description) booleanstatic CustomersCreateRequestBodyCreate an instance of CustomersCreateRequestBody given an JSON stringGet addressCustomer's birthdate; format YYYY-MM-DD.`Deprecated`.An arbitrary string that you can attach to a customer object.getEmail()Customer's email address.getId()The ID of an existing customer.A set of custom key/value pairs that you can attach to a customer.getName()Customer's first and last name.getPhone()Customer's phone number.A unique identifier of the customer who validates a voucher.inthashCode()voidvoidsetBirthdate(LocalDate birthdate) voidsetBirthday(LocalDate birthday) voidsetDescription(String description) voidvoidvoidsetMetadata(Object metadata) voidvoidvoidsetSourceId(String sourceId) toJson()Convert an instance of CustomersCreateRequestBody to an JSON stringtoString()
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_SOURCE_ID
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_EMAIL
- See Also:
-
SERIALIZED_NAME_PHONE
- See Also:
-
SERIALIZED_NAME_BIRTHDAY
- See Also:
-
SERIALIZED_NAME_BIRTHDATE
- See Also:
-
SERIALIZED_NAME_ADDRESS
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CustomersCreateRequestBody
public CustomersCreateRequestBody()
-
-
Method Details
-
id
-
getId
The ID of an existing customer.- Returns:
- id
-
setId
-
sourceId
-
getSourceId
A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.- Returns:
- sourceId
-
setSourceId
-
name
-
getName
Customer's first and last name.- Returns:
- name
-
setName
-
description
-
getDescription
An arbitrary string that you can attach to a customer object.- Returns:
- description
-
setDescription
-
email
-
getEmail
Customer's email address.- Returns:
-
setEmail
-
phone
-
getPhone
Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.- Returns:
- phone
-
setPhone
-
birthday
-
getBirthday
`Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~.- Returns:
- birthday
-
setBirthday
-
birthdate
-
getBirthdate
Customer's birthdate; format YYYY-MM-DD.- Returns:
- birthdate
-
setBirthdate
-
address
-
getAddress
Get address- Returns:
- address
-
setAddress
-
metadata
-
getMetadata
A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.- Returns:
- metadata
-
setMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of CustomersCreateRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CustomersCreateRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to CustomersCreateRequestBody
-
toJson
Convert an instance of CustomersCreateRequestBody to an JSON string- Returns:
- JSON string
-