public class CustomData extends Object
| Constructor and Description |
|---|
CustomData()
Default Constructor.
|
CustomData(Float value,
String currency,
List<Content> contents,
String orderId,
String status,
UserData shippingContact,
UserData billingContact,
String externalOrderId,
String originalOrderId,
String message) |
| Modifier and Type | Method and Description |
|---|---|
CustomData |
billingContact(UserData billingContact)
Sets the billing contact of the order.
|
CustomData |
contents(List<Content> contents)
Sets the contents for the custom data.
|
CustomData |
currency(String currency)
Sets the currency for the custom data.
|
CustomData |
externalOrderId(String externalOrderId)
Sets the unique id of the order.
|
UserData |
getBillingContact()
Gets the billing contact of the order.
|
List<Content> |
getContents()
Gets the contents for the custom data.
|
String |
getCurrency()
Gets the currency for the custom data.
|
String |
getExternalOrderId()
Gets the unique id of the order.
|
String |
getMessage()
Gets the unique id of the original order.
|
String |
getOrderId()
Gets the order id for the custom data.
|
String |
getOriginalOrderId()
Gets the unique id of the original order.
|
UserData |
getShippingContact()
Gets the shipping contact of the order.
|
String |
getStatus()
Gets the status of order.
|
Float |
getValue()
Gets the total value of the order.
|
CustomData |
message(String message)
Sets the unique id of the original order.
|
CustomData |
orderId(String orderId)
Sets the order_id for the custom data.
|
CustomData |
originalOrderId(String originalOrderId)
Sets the unique id of the original order.
|
void |
setBillingContact(UserData billingContact)
Sets the billing contact of the order.
|
void |
setContents(List<Content> contents)
Sets the contents for the custom data.
|
void |
setCurrency(String currency)
Sets the currency for the custom data.
|
void |
setExternalOrderId(String externalOrderId)
Sets the unique id of the order.
|
void |
setMessage(String message)
Sets the unique id of the original order.
|
void |
setOrderId(String orderId)
Sets the order_id for the custom data.
|
void |
setOriginalOrderId(String originalOrderId)
Sets the unique id of the original order.
|
void |
setShippingContact(UserData shippingContact)
Sets the shipping contact of the order.
|
void |
setStatus(String status)
Gets the status of order.
|
void |
setValue(Float value)
Sets the value of the custom data.
|
CustomData |
shippingContact(UserData shippingContact)
Sets the shipping contact of the order.
|
CustomData |
status(String status)
Sets the status of the registration event.
|
CustomData |
value(Float value)
Sets the value of the custom data.
|
public CustomData()
public CustomData(Float value, String currency, List<Content> contents, String orderId, String status, UserData shippingContact, UserData billingContact, String externalOrderId, String originalOrderId, String message)
value - value of the order Eg: 123.45currency - currency involved in the transaction Eg: usdcontents - Array of Content Objects. Use {Content} class to
define a content.orderId - Unique id representing the orderstatus - Status of ordershippingContact - Shipping contact information. User {UserData} class to
define a contact.billingContact - Billing contact information. User {UserData} class to
define a contact.externalOrderId - Unique ID representing the order, universal across
multiple categories from the businessoriginalOrderId - Original order id for refund. For Refund event only.message - Reason for refund. For Refund event only.public Float getValue()
public void setValue(Float value)
value - A numeric value associated with this event. This could be a
monetary value or a value in some other metric. Example: 142.54.public CustomData value(Float value)
value - A numeric value associated with this event. This could be a
monetary value or a value in some other metric. Example: 142.54.public String getCurrency()
public void setCurrency(String currency)
currency - The currency for the value specified, if applicable. Currency
must be a valid ISO 4217 three digit currency code. Example:
'usd'public CustomData currency(String currency)
currency - The currency for the value specified, if applicable. Currency
must be a valid ISO 4217 three digit currency code. Example:
'usd'public List<Content> getContents()
public void setContents(List<Content> contents)
contents - An array of Content objects that contain the product IDs
associated with the event plus information about the
products. Example: [{'id':'ABC123','quantity'
:2,'price':5.99}, {'id':'XYZ789','quantity':2, 'price':9.99}]public CustomData contents(List<Content> contents)
contents - An array of Content objects that contain the product IDs
associated with the event plus information about the
products. Example: [{'id':'ABC123','quantity'
:2,'item_price':5.99}, {'id':'XYZ789','quantity':2,
'item_price':9.99}]public String getOrderId()
public void setOrderId(String orderId)
orderId - The order ID for this transaction as a String. Example:
'order1234'public CustomData orderId(String orderId)
orderId - The order ID for this transaction as a String. Example:
'order1234'public String getStatus()
public void setStatus(String status)
status - Status of the order, as a String.public CustomData status(String status)
status - Status of the registration event, as a String.public UserData getShippingContact()
public void setShippingContact(UserData shippingContact)
shippingContact - An Object contains the user data of shipping contact.
Use {UserData} to construct the object.public CustomData shippingContact(UserData shippingContact)
shippingContact - An Object contains the user data of shipping contact.
Use {UserData} to construct the object.public UserData getBillingContact()
public void setBillingContact(UserData billingContact)
billingContact - An Object contains the user data of billing contact.
Use {UserData} to construct the object.public CustomData billingContact(UserData billingContact)
billingContact - An Object contains the user data of billing contact.
Use {UserData} to construct the object.public String getExternalOrderId()
public void setExternalOrderId(String externalOrderId)
externalOrderId - Unique ID representing the order, universal across
multiple categories from the business.public CustomData externalOrderId(String externalOrderId)
externalOrderId - Unique ID representing the order, universal across
multiple categories from the business.public String getOriginalOrderId()
public void setOriginalOrderId(String originalOrderId)
originalOrderId - Original order id for refund. For Refund event only.public CustomData originalOrderId(String originalOrderId)
originalOrderId - Original order id for refund. For Refund event only.public String getMessage()
public void setMessage(String message)
message - Reason for refund. For Refund event only.public CustomData message(String message)
message - Reason for refund. For Refund event only.Copyright © 2021. All rights reserved.