public class PaymentRequest extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PaymentRequest.PaymentRequestStatus |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
PAYMENT_REQUESTS_PATH |
| Modifier | Constructor and Description |
|---|---|
protected |
PaymentRequest() |
|
PaymentRequest(String merchantId) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLineItem(LineItem item) |
ApruveResponse<PaymentRequestUpdateResponse> |
finalizeRequest()
Invokes the "finalize" action on the payment request.
|
static ApruveResponse<PaymentRequest> |
get(String paymentRequestId)
Fetches the PaymentRequest with the given ID from Apruve.
|
Integer |
getAmountCents() |
URL |
getApiUrl() |
Date |
getCreatedAt() |
Currency |
getCurrency() |
static String |
getFinalizePath(String paymentRequestId) |
String |
getId() |
List<LineItem> |
getLineItems() |
String |
getMerchantId() |
String |
getMerchantOrderId() |
static String |
getPaymentRequestsPath() |
Boolean |
getRecurring()
Deprecated.
|
Integer |
getShippingCents() |
PaymentRequest.PaymentRequestStatus |
getStatus() |
Integer |
getTaxCents() |
Date |
getUpdatedAt() |
String |
getUsername() |
URL |
getViewUrl() |
void |
setAmountCents(Integer amountCents) |
void |
setAmountCents(String amountCents) |
protected void |
setApiUrl(String apiUrl) |
protected void |
setApiUrl(URL apiUrl) |
protected void |
setCreatedAt(Date createdAt) |
protected void |
setCreatedAt(String createdAt) |
void |
setCurrency(Currency currency) |
void |
setCurrency(String currency) |
void |
setId(String id) |
void |
setLineItems(List<LineItem> lineItems) |
void |
setMerchantId(String merchantId) |
void |
setMerchantOrderId(String merchantOrderId) |
void |
setRecurring(Boolean recurring)
Deprecated.
|
void |
setShippingCents(Integer shippingCents) |
void |
setShippingCents(String shippingCents) |
protected void |
setStatus(PaymentRequest.PaymentRequestStatus status) |
void |
setStatus(String status) |
void |
setTaxCents(Integer taxCents) |
void |
setTaxCents(String taxCents) |
protected void |
setUpdatedAt(Date updatedAt) |
protected void |
setUpdatedAt(String updatedAt) |
protected void |
setViewUrl(String viewUrl) |
protected void |
setViewUrl(URL viewUrl) |
String |
toJson()
Returns the JSON string for a PaymentRequest.
|
String |
toSecureHash()
For use by merchants, and depends on proper initialization of
ApruveClient.
|
String |
toString() |
protected String |
toValueString() |
ApruveResponse<PaymentRequestUpdateResponse> |
update()
Updates the PaymentRequest state at Apruve to match the current object
state.
|
protected static final String PAYMENT_REQUESTS_PATH
protected PaymentRequest()
public PaymentRequest(String merchantId)
public static ApruveResponse<PaymentRequest> get(String paymentRequestId)
paymentRequestId - public ApruveResponse<PaymentRequestUpdateResponse> update()
Only the following fields are updated by this API call, and then only if the payment request status is NEW:
public ApruveResponse<PaymentRequestUpdateResponse> finalizeRequest()
public String toJson()
paymentRequest - public String toSecureHash()
protected String toValueString()
public void addLineItem(LineItem item)
public String getId()
public void setId(String id)
id - the id to setpublic String getMerchantId()
public void setMerchantId(String merchantId)
merchantId - the merchantId to setpublic PaymentRequest.PaymentRequestStatus getStatus()
protected void setStatus(PaymentRequest.PaymentRequestStatus status)
status - the status to setpublic void setStatus(String status)
status - the status to setpublic String getMerchantOrderId()
public void setMerchantOrderId(String merchantOrderId)
merchantOrderId - the merchantOrderId to setpublic Integer getAmountCents()
public void setAmountCents(Integer amountCents)
amountCents - the amountCents to setpublic void setAmountCents(String amountCents)
amountCents - the amountCents to setpublic Boolean getRecurring()
public void setRecurring(Boolean recurring)
recurring - the recurring to setpublic Integer getTaxCents()
public void setTaxCents(Integer taxCents)
taxCents - the taxCents to setpublic void setTaxCents(String taxCents)
taxCents - the taxCents to setpublic Integer getShippingCents()
public void setShippingCents(Integer shippingCents)
shippingCents - the shippingCents to setpublic void setShippingCents(String shippingCents)
shippingCents - public Currency getCurrency()
public void setCurrency(Currency currency)
currency - the currency to setpublic void setCurrency(String currency)
currency - the currency to setpublic void setLineItems(List<LineItem> lineItems)
lineItems - the lineItems to setpublic URL getApiUrl()
protected void setApiUrl(URL apiUrl)
apiUrl - the apiUrl to setprotected void setApiUrl(String apiUrl) throws MalformedURLException
apiUrl - the apiUrl to setMalformedURLExceptionpublic URL getViewUrl()
protected void setViewUrl(URL viewUrl)
viewUrl - the viewUrl to setprotected void setViewUrl(String viewUrl) throws MalformedURLException
viewUrl - the viewUrl to setMalformedURLExceptionpublic Date getCreatedAt()
protected void setCreatedAt(Date createdAt)
createdAt - the createdAt to setprotected void setCreatedAt(String createdAt)
createdAt - the createdAt to setpublic Date getUpdatedAt()
protected void setUpdatedAt(Date updatedAt)
updatedAt - the updatedAt to setprotected void setUpdatedAt(String updatedAt)
updatedAt - public String getUsername()
public static String getPaymentRequestsPath()
Copyright © 2014. All rights reserved.