Package com.adyen.model.tapi
Class PaymentRequest
- java.lang.Object
-
- com.adyen.model.tapi.PaymentRequest
-
public class PaymentRequest extends Object
Request sent to terminal to initiate payment. It conveys Information related to the Payment transaction to process. Content of the `PaymentRequest` message.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_LOYALTY_DATAstatic StringJSON_PROPERTY_PAYMENT_DATAstatic StringJSON_PROPERTY_PAYMENT_TRANSACTIONstatic StringJSON_PROPERTY_SALE_DATA
-
Constructor Summary
Constructors Constructor Description PaymentRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PaymentRequestaddLoyaltyDataItem(LoyaltyData loyaltyDataItem)booleanequals(Object o)Return true if this PaymentRequest object is equal to o.static PaymentRequestfromJson(String jsonString)Create an instance of PaymentRequest given an JSON stringMap<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.List<LoyaltyData>getLoyaltyData()Data related to a Loyalty program or account.PaymentDatagetPaymentData()Get paymentDataPaymentTransactiongetPaymentTransaction()Get paymentTransactionSaleDatagetSaleData()Get saleDatainthashCode()PaymentRequestincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.PaymentRequestloyaltyData(List<LoyaltyData> loyaltyData)Data related to a Loyalty program or account.PaymentRequestpaymentData(PaymentData paymentData)paymentDataPaymentRequestpaymentTransaction(PaymentTransaction paymentTransaction)paymentTransactionPaymentRequestsaleData(SaleData saleData)saleDatavoidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetLoyaltyData(List<LoyaltyData> loyaltyData)Data related to a Loyalty program or account.voidsetPaymentData(PaymentData paymentData)paymentDatavoidsetPaymentTransaction(PaymentTransaction paymentTransaction)paymentTransactionvoidsetSaleData(SaleData saleData)saleDataStringtoJson()Convert an instance of PaymentRequest to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_SALE_DATA
public static final String JSON_PROPERTY_SALE_DATA
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PAYMENT_TRANSACTION
public static final String JSON_PROPERTY_PAYMENT_TRANSACTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PAYMENT_DATA
public static final String JSON_PROPERTY_PAYMENT_DATA
- See Also:
- Constant Field Values
-
JSON_PROPERTY_LOYALTY_DATA
public static final String JSON_PROPERTY_LOYALTY_DATA
- See Also:
- Constant Field Values
-
-
Method Detail
-
saleData
public PaymentRequest saleData(SaleData saleData)
saleData- Parameters:
saleData-- Returns:
- the current
PaymentRequestinstance, allowing for method chaining
-
getSaleData
public SaleData getSaleData()
Get saleData- Returns:
- saleData
-
setSaleData
public void setSaleData(SaleData saleData)
saleData- Parameters:
saleData-
-
paymentTransaction
public PaymentRequest paymentTransaction(PaymentTransaction paymentTransaction)
paymentTransaction- Parameters:
paymentTransaction-- Returns:
- the current
PaymentRequestinstance, allowing for method chaining
-
getPaymentTransaction
public PaymentTransaction getPaymentTransaction()
Get paymentTransaction- Returns:
- paymentTransaction
-
setPaymentTransaction
public void setPaymentTransaction(PaymentTransaction paymentTransaction)
paymentTransaction- Parameters:
paymentTransaction-
-
paymentData
public PaymentRequest paymentData(PaymentData paymentData)
paymentData- Parameters:
paymentData-- Returns:
- the current
PaymentRequestinstance, allowing for method chaining
-
getPaymentData
public PaymentData getPaymentData()
Get paymentData- Returns:
- paymentData
-
setPaymentData
public void setPaymentData(PaymentData paymentData)
paymentData- Parameters:
paymentData-
-
loyaltyData
public PaymentRequest loyaltyData(List<LoyaltyData> loyaltyData)
Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.- Parameters:
loyaltyData- Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.- Returns:
- the current
PaymentRequestinstance, allowing for method chaining
-
addLoyaltyDataItem
public PaymentRequest addLoyaltyDataItem(LoyaltyData loyaltyDataItem)
-
getLoyaltyData
public List<LoyaltyData> getLoyaltyData()
Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.- Returns:
- loyaltyData Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.
-
setLoyaltyData
public void setLoyaltyData(List<LoyaltyData> loyaltyData)
Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.- Parameters:
loyaltyData- Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.
-
includeNullValues
public PaymentRequest includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this PaymentRequest object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
fromJson
public static PaymentRequest fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of PaymentRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PaymentRequest
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to PaymentRequest
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of PaymentRequest to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-