Class PaymentRequest
- java.lang.Object
-
- aero.panasonic.inflight.services.paymentclient.v1.model.PaymentRequest
-
public class PaymentRequest extends java.lang.ObjectThis class helps to create payment request to be processed. Payment Request can be initiated usingbuild(String referenceId, Price price, PaymentAttributes attribute ,BillingInfo billingInfo).
-
-
Constructor Summary
Constructors Constructor Description PaymentRequest(java.lang.String referenceId, Price price, PaymentAttributes paymentAttributes, BillingInfo billingInfo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PaymentRequestbuild(java.lang.String referenceId, Price price, PaymentAttributes attributes, BillingInfo billingInfo)Creates a newPaymentRequestinstance using the provided parameters.BillingInfogetBillingInfo()Returns theBillingInfoassociated with this payment request.PaymentAttributesgetPaymentAttributes()This api returns the additional attributes of the currentPaymentAttributesif any.PaymentStatusgetPaymentStatus()This api returns thePaymentStatusof the currentPaymentRequest.PricegetPrice()This api returns the price of the currentPriceif any.java.lang.StringgetReferenceId()This api returns the referenceId.voidsetPrice(Price price)This api sets thePriceof the currentPaymentRequest.voidsetReferenceId(java.lang.String referenceId)This api sets the referenceId.java.lang.StringtoString()
-
-
-
Constructor Detail
-
PaymentRequest
public PaymentRequest(java.lang.String referenceId, Price price, PaymentAttributes paymentAttributes, BillingInfo billingInfo)
-
-
Method Detail
-
getReferenceId
public java.lang.String getReferenceId()
This api returns the referenceId.- Returns:
- String
-
setReferenceId
public void setReferenceId(java.lang.String referenceId)
This api sets the referenceId.- Parameters:
referenceId-
-
build
public static PaymentRequest build(java.lang.String referenceId, Price price, PaymentAttributes attributes, BillingInfo billingInfo)
Creates a newPaymentRequestinstance using the provided parameters. ThePaymentRequestis initialized with the givenreferenceId,Price,PaymentAttributes, andBillingInfo.- Parameters:
referenceId- the unique identifier for the payment request; must not benullprice- thePricedetails for the payment request; must not benullattributes- thePaymentAttributesassociated with the payment request; must not benullbillingInfo- theBillingInfofor the payment request; ifnull, an emptyBillingInfowill be used- Returns:
- a new
PaymentRequestinitialized with the provided parameters - Throws:
java.lang.IllegalArgumentException- if any required parameter isnull
-
getPrice
public Price getPrice()
This api returns the price of the currentPriceif any.- Returns:
Price
-
setPrice
public void setPrice(Price price)
This api sets thePriceof the currentPaymentRequest.- Parameters:
price-
-
getPaymentAttributes
public PaymentAttributes getPaymentAttributes()
This api returns the additional attributes of the currentPaymentAttributesif any.- Returns:
PaymentAttributes
-
getBillingInfo
public BillingInfo getBillingInfo()
Returns theBillingInfoassociated with this payment request. If the billing information is not available (i.e., is null), this method returns an emptyBillingInfoobject.- Returns:
- the
BillingInfoassociated with this payment request, or an emptyBillingInfoif not available.
-
getPaymentStatus
public PaymentStatus getPaymentStatus()
This api returns thePaymentStatusof the currentPaymentRequest.- Returns:
PaymentStatus
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-