public class RecurlyClient extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FETCH_RESOURCE |
static String |
RECURLY_API_VERSION |
static String |
RECURLY_DEBUG_KEY |
| Constructor and Description |
|---|
RecurlyClient(String apiKey) |
RecurlyClient(String apiKey,
String subDomain) |
RecurlyClient(String apiKey,
String host,
int port,
String version) |
RecurlyClient(String apiKey,
String scheme,
String host,
int port,
String version) |
| Modifier and Type | Method and Description |
|---|---|
InvoiceCollection |
authorizePurchase(Purchase purchase)
Purchases authorize endpoint.
|
Subscription |
cancelSubscription(String subscriptionUuid,
SubscriptionUpdate.Timeframe timeframe)
Cancel a subscription
|
Subscription |
cancelSubscription(Subscription subscription)
Cancel a subscription
|
void |
clearBillingInfo(String accountCode)
Clear an account's billing info
|
void |
close()
Close the underlying http client
|
void |
closeAccount(String accountCode)
Close Account
|
Subscription |
convertTrial(String subscriptionUuid)
Convert trial to paid subscription without 3DS token
|
Subscription |
convertTrial(String subscriptionUuid,
String ThreeDSecureActionResultTokenId)
Convert trial to paid subscription with 3DS token
|
Subscription |
convertTrialMoto(String subscriptionUuid)
Convert trial to paid subscription when TransactionType = "moto".
|
Account |
createAccount(Account account)
Create Account
|
AccountAcquisition |
createAccountAcquisition(String accountCode,
AccountAcquisition acquisition)
Sets the acquisition details for an account
|
Adjustment |
createAccountAdjustment(String accountCode,
Adjustment adjustment) |
Coupon |
createCoupon(Coupon coupon)
Create a
Coupon |
Item |
createItem(Item item)
Create an Item's info
|
MeasuredUnit |
createMeasuredUnit(MeasuredUnit measuredUnit)
Create a MeasuredUnit's info
|
BillingInfo |
createOrUpdateBillingInfo(BillingInfo billingInfo)
Deprecated.
Replaced by
createOrUpdateBillingInfo(String, BillingInfo) Please pass in the account code rather than setting the account on the BillingInfo object |
BillingInfo |
createOrUpdateBillingInfo(String accountCode,
BillingInfo billingInfo)
Update an account's billing info
|
Plan |
createPlan(Plan plan)
Create a Plan's info
|
AddOn |
createPlanAddOn(String planCode,
AddOn addOn)
Create an AddOn to a Plan
|
ShippingAddress |
createShippingAddress(String accountCode,
ShippingAddress shippingAddress)
Create a shipping address on an existing account
|
Subscription |
createSubscription(Subscription subscription)
Create a subscription
|
Transaction |
createTransaction(Transaction trans)
Creates a
Transaction through the Recurly API. |
void |
deleteAccountAcquisition(String accountCode)
Clear the acquisition details for an account
|
void |
deleteAccountAdjustment(String accountCode) |
void |
deleteAddOn(String planCode,
String addOnCode)
Deletes an
AddOn for a Plan |
void |
deleteAdjustment(String adjustmentUuid) |
void |
deleteCoupon(String couponCode)
Delete a
Coupon |
void |
deleteCouponRedemption(String accountCode)
Deletes a coupon redemption from an account.
|
void |
deleteCouponRedemption(String accountCode,
String redemptionUuid)
Deletes a specific redemption.
|
void |
deleteItem(String itemCode)
Deletes a
Item |
void |
deletePlan(String planCode)
Deletes a
Plan |
void |
deleteShippingAddress(String accountCode,
long shippingAddressId)
Delete an existing shipping address
|
<T> T |
doGETWithFullURL(Class<T> clazz,
String url) |
Transaction |
enterOfflinePayment(Integer invoiceId,
Transaction payment)
Deprecated.
Prefer using Invoice#getId() as the id param (which is a String)
|
Transaction |
enterOfflinePayment(String invoiceId,
Transaction payment)
Enter an offline payment for a manual invoice (beta) - Recurly Enterprise Feature
|
BillingInfo |
fetchBillingInfo(String recurlyToken)
Fetch BillingInfo
|
Invoice |
fetchInvoice(String recurlyToken)
Fetch Invoice
|
Subscription |
fetchSubscription(String recurlyToken)
Fetch Subscription
|
Invoice |
forceCollectInvoice(String invoiceId)
Force collect an invoice
|
Invoice |
forceCollectInvoice(String invoiceId,
String transactionType)
Force collect an invoice
|
Coupons |
generateUniqueCodes(String couponCode,
Coupon coupon)
Generates unique codes for a bulk coupon.
|
Account |
getAccount(String accountCode)
Get Account
|
AccountAcquisition |
getAccountAcquisition(String accountCode)
Gets the acquisition details for an account
|
Adjustments |
getAccountAdjustments(String accountCode)
Get Account Adjustments
|
Adjustments |
getAccountAdjustments(String accountCode,
Adjustments.AdjustmentType type)
Get Account Adjustments
|
Adjustments |
getAccountAdjustments(String accountCode,
Adjustments.AdjustmentType type,
Adjustments.AdjustmentState state)
Get Account Adjustments
|
Adjustments |
getAccountAdjustments(String accountCode,
Adjustments.AdjustmentType type,
Adjustments.AdjustmentState state,
QueryParams params)
Get Account Adjustments
|
AccountBalance |
getAccountBalance(String accountCode)
Get Account Balance
|
Invoices |
getAccountInvoices(String accountCode)
Lookup an account's invoices
|
Invoices |
getAccountInvoices(String accountCode,
InvoiceState state,
QueryParams params)
Lookup an account's invoices given query params
|
AccountNotes |
getAccountNotes(String accountCode)
List an account's notes
|
Accounts |
getAccounts()
Get Accounts
|
Accounts |
getAccounts(QueryParams params)
Get Accounts given query params
|
Integer |
getAccountsCount(QueryParams params)
Get number of Accounts matching the query params
|
ShippingAddresses |
getAccountShippingAddresses(String accountCode)
Lookup an account's shipping addresses
|
Subscriptions |
getAccountSubscriptions(String accountCode)
Get the subscriptions for an
Account. |
Subscriptions |
getAccountSubscriptions(String accountCode,
String status)
Deprecated.
|
Subscriptions |
getAccountSubscriptions(String accountCode,
SubscriptionState state,
QueryParams params)
Get the subscriptions for an
Account given query params |
Transactions |
getAccountTransactions(String accountCode)
Lookup an account's transactions history
|
Transactions |
getAccountTransactions(String accountCode,
TransactionState state,
TransactionType type,
QueryParams params)
Lookup an account's transactions history given query params
|
AddOn |
getAddOn(String planCode,
String addOnCode)
Get an AddOn's details
|
AddOns |
getAddOns(String planCode)
|
AddOns |
getAddOns(String planCode,
QueryParams params)
|
Adjustment |
getAdjustment(String adjustmentUuid) |
BillingInfo |
getBillingInfo(String accountCode)
Lookup an account's billing info
|
Accounts |
getChildAccounts(String accountCode)
Get Child Accounts
|
Coupon |
getCoupon(String couponCode)
Get a Coupon
|
Redemption |
getCouponRedemptionByAccount(String accountCode)
Lookup the first coupon redemption on an account.
|
Redemption |
getCouponRedemptionByInvoice(Integer invoiceNumber)
Deprecated.
Prefer using Invoice#getId() as the id param (which is a String)
|
Redemption |
getCouponRedemptionByInvoice(String invoiceId)
Lookup the first coupon redemption on an invoice.
|
Redemptions |
getCouponRedemptionsByAccount(String accountCode)
Lookup all coupon redemptions on an account.
|
Redemptions |
getCouponRedemptionsByAccount(String accountCode,
QueryParams params)
Lookup all coupon redemptions on an account given query params.
|
Redemptions |
getCouponRedemptionsByInvoice(Integer invoiceNumber)
Deprecated.
Prefer using Invoice#getId() as the id param (which is a String)
|
Redemptions |
getCouponRedemptionsByInvoice(Integer invoiceNumber,
QueryParams params)
Deprecated.
Prefer using Invoice#getId() as the id param (which is a String)
|
Redemptions |
getCouponRedemptionsByInvoice(String invoiceId)
Lookup all coupon redemptions on an invoice.
|
Redemptions |
getCouponRedemptionsByInvoice(String invoiceId,
QueryParams params)
Lookup all coupon redemptions on an invoice given query params.
|
Redemptions |
getCouponRedemptionsBySubscription(String subscriptionUuid,
QueryParams params)
Lookup all coupon redemptions on a subscription given query params.
|
Coupons |
getCoupons()
Get Coupons
|
Coupons |
getCoupons(QueryParams params)
Get Coupons given query params
|
Integer |
getCouponsCount(QueryParams params)
Get number of Coupons matching the query params
|
CreditPayments |
getCreditPayments()
Get Credit Payments
|
CreditPayments |
getCreditPayments(QueryParams params)
Get Credit Payments
|
CreditPayments |
getCreditPayments(String accountCode,
QueryParams params)
Get Credit Payments for a given account
|
GiftCard |
getGiftCard(Long giftCardId)
Get a Gift Card
|
GiftCards |
getGiftCards()
Get Gift Cards
|
GiftCards |
getGiftCards(QueryParams params)
Get Gift Cards given query params
|
Integer |
getGiftCardsCount(QueryParams params)
Get number of GiftCards matching the query params
|
Invoice |
getInvoice(Integer invoiceId)
Deprecated.
Please switch to using a string for invoice ids
|
Invoice |
getInvoice(String invoiceId)
Lookup an invoice given an invoice id
|
InputStream |
getInvoicePdf(Integer invoiceId)
Deprecated.
Prefer using Invoice#getId() as the id param (which is a String)
|
InputStream |
getInvoicePdf(String invoiceId)
Fetch invoice pdf
|
Invoices |
getInvoices()
Lookup all invoices
|
Invoices |
getInvoices(QueryParams params)
Return all the invoices given query params
|
int |
getInvoicesCount(QueryParams params)
Return all the invoices given query params
|
Subscriptions |
getInvoiceSubscriptions(String invoiceId)
Return all the subscriptions on an invoice.
|
Subscriptions |
getInvoiceSubscriptions(String invoiceId,
QueryParams params)
Return all the subscriptions on an invoice given query params.
|
Transactions |
getInvoiceTransactions(String invoiceId)
Return all the transactions on an invoice.
|
Item |
getItem(String itemCode)
Get a Item's details
|
Items |
getItems()
Return all the items
|
MeasuredUnits |
getMeasuredUnits()
Return all the MeasuredUnits
|
Invoices |
getOriginalInvoices(String invoiceId)
Lookup an invoice's original invoices (e.g.
|
Plan |
getPlan(String planCode)
Get a Plan's details
|
Plans |
getPlans()
Return all the plans
|
Plans |
getPlans(QueryParams params)
Return all the plans given query params
|
Integer |
getPlansCount(QueryParams params)
Get number of Plans matching the query params
|
int |
getRateLimitRemaining()
Returns the number of requests remaining until requests will be denied by rate limiting.
|
ShippingAddress |
getShippingAddress(String accountCode,
long shippingAddressId)
Get an existing shipping address
|
ShippingMethod |
getShippingMethod(String shippingMethodCode)
Look up a shipping method
|
ShippingMethods |
getShippingMethods()
Get Shipping Methods for the site
|
ShippingMethods |
getShippingMethods(QueryParams params)
Get Shipping Methods for the site
|
Subscription |
getSubscription(String uuid)
Get a particular
Subscription by it's UUID |
Subscriptions |
getSubscriptions()
Get all the subscriptions on the site
|
Subscriptions |
getSubscriptions(SubscriptionState state,
QueryParams params)
Get all the subscriptions on the site given some sort and filter params.
|
Integer |
getSubscriptionsCount(QueryParams params)
Get number of Subscriptions matching the query params
|
Usages |
getSubscriptionUsages(String subscriptionCode,
String addOnCode,
QueryParams params)
Get Subscription Addon Usages
|
Transaction |
getTransaction(String transactionId)
Lookup a transaction
|
Transactions |
getTransactions()
Get site's transaction history
|
Transactions |
getTransactions(TransactionState state,
TransactionType type,
QueryParams params)
Get site's transaction history
|
Integer |
getTransactionsCount(QueryParams params)
Get number of Transactions matching the query params
|
Subscriptions |
getTransactionSubscriptions(String transactionId)
Get the subscriptions for a
Transaction. |
Coupons |
getUniqueCouponCodes(String couponCode,
QueryParams params)
Lookup all unique codes for a bulk coupon given query params.
|
InvoiceCollection |
markInvoiceFailed(Integer invoiceId)
Deprecated.
Prefer using Invoice#getId() as the id param (which is a String)
|
InvoiceCollection |
markInvoiceFailed(String invoiceId)
Mark an invoice as failed collection
|
Invoice |
markInvoiceSuccessful(Integer invoiceId)
Deprecated.
Prefer using Invoice#getId() as the id param (which is a String)
|
Invoice |
markInvoiceSuccessful(String invoiceId)
Mark an invoice as paid successfully - Recurly Enterprise Feature
|
void |
open()
Open the underlying http client
|
Subscription |
pauseSubscription(String subscriptionUuid,
int remainingPauseCycles)
Pause a subscription or cancel a scheduled pause on a subscription.
|
InvoiceCollection |
pendingPurchase(Purchase purchase)
Purchases pending endpoint.
|
InvoiceCollection |
postAccountInvoice(String accountCode,
Invoice invoice)
Post an invoice: invoice pending charges on an account
|
Subscription |
postponeSubscription(Subscription subscription,
org.joda.time.DateTime renewaldate)
Postpone a subscription
|
Usage |
postSubscriptionUsage(String subscriptionCode,
String addOnCode,
Usage usage)
Post usage to subscription
|
GiftCard |
previewGiftCard(GiftCard giftCard)
Preview a GiftCard
|
InvoiceCollection |
previewPurchase(Purchase purchase)
Purchases preview endpoint
|
Subscription |
previewSubscription(Subscription subscription)
Preview a subscription
|
InvoiceCollection |
purchase(Purchase purchase)
Purchases endpoint
|
GiftCard |
purchaseGiftCard(GiftCard giftCard)
Purchase a GiftCard
|
Item |
reactivateItem(String itemCode)
Reactivating a canceled item
|
Subscription |
reactivateSubscription(Subscription subscription)
Reactivating a canceled subscription
|
Redemption |
redeemCoupon(String couponCode,
Redemption redemption)
Redeem a
Coupon on an account. |
GiftCard |
redeemGiftCard(String redemptionCode,
String accountCode)
Redeem a Gift Card
|
Invoice |
refundInvoice(String invoiceId,
Integer amountInCents,
RefundMethod method)
Deprecated.
Please use refundInvoice(String, InvoiceRefund)
|
Invoice |
refundInvoice(String invoiceId,
InvoiceRefund refundOptions)
Refund an invoice given some options
Returns the refunded invoice
|
Invoice |
refundInvoice(String invoiceId,
List<AdjustmentRefund> lineItems,
RefundMethod method)
Deprecated.
Please use refundInvoice(String, InvoiceRefund)
|
void |
refundTransaction(String transactionId,
BigDecimal amount)
Refund a transaction
|
Account |
reopenAccount(String accountCode)
Reopen Account
|
Subscription |
resumeSubscription(String subscriptionUuid)
Immediately resumes a currently paused subscription.
|
void |
setAcceptLanguage(String language)
Set the Accept-Language header
|
void |
terminateSubscription(Subscription subscription,
RefundOption refund)
Terminate a particular
Subscription by it's UUID |
Account |
updateAccount(String accountCode,
Account account)
Update Account
|
AccountAcquisition |
updateAccountAcquisition(String accountCode,
AccountAcquisition acquisition)
Updates the acquisition details for an account
|
AddOn |
updateAddOn(String planCode,
String addOnCode,
AddOn addOn)
Updates an
AddOn for a Plan |
Invoice |
updateInvoice(String invoiceId,
Invoice invoice)
Update an invoice
|
Item |
updateItem(String itemCode,
Item item)
Update an Item's info
|
Plan |
updatePlan(Plan plan)
Update a Plan's info
|
ShippingAddress |
updateShippingAddress(String accountCode,
long shippingAddressId,
ShippingAddress shippingAddress)
Update an existing shipping address
|
Subscription |
updateSubscription(String uuid,
SubscriptionUpdate subscriptionUpdate)
Update a particular
Subscription by it's UUID |
Subscription |
updateSubscriptionNotes(String uuid,
SubscriptionNotes subscriptionNotes)
Update to a particular
Subscription's notes by it's UUID |
Subscription |
updateSubscriptionPreview(String uuid,
SubscriptionUpdate subscriptionUpdate)
Preview an update to a particular
Subscription by it's UUID |
Invoice |
voidInvoice(String invoiceId)
Void Invoice
|
public static final String RECURLY_DEBUG_KEY
public static final String RECURLY_API_VERSION
public static final String FETCH_RESOURCE
public RecurlyClient(String apiKey)
public RecurlyClient(String apiKey, String subDomain)
public RecurlyClient(String apiKey, String host, int port, String version)
public RecurlyClient(String apiKey, String scheme, String host, int port, String version)
public void open() throws NoSuchAlgorithmException, KeyManagementException
public void close()
public void setAcceptLanguage(String language)
Sets the Accept-Language header for all requests made by this client. Note: this is not thread-safe! See https://github.com/killbilling/recurly-java-library/pull/298 for more details about thread safety.
language - The language to set in the header. E.g., "en-US"public int getRateLimitRemaining()
public Account createAccount(Account account)
Creates a new account. You may optionally include billing information.
account - account objectpublic Accounts getAccounts()
Returns information about all accounts.
public Accounts getAccounts(QueryParams params)
Returns information about all accounts.
params - QueryParamspublic Integer getAccountsCount(QueryParams params)
params - QueryParamspublic Coupons getCoupons()
Returns information about all accounts.
public Coupons getCoupons(QueryParams params)
Returns information about all accounts.
params - QueryParamspublic Integer getCouponsCount(QueryParams params)
params - QueryParamspublic Account getAccount(String accountCode)
Returns information about a single account.
accountCode - recurly account idpublic Account updateAccount(String accountCode, Account account)
Updates an existing account.
accountCode - recurly account idaccount - account objectpublic AccountBalance getAccountBalance(String accountCode)
Retrieves the remaining balance on the account
accountCode - recurly account idpublic void closeAccount(String accountCode)
Marks an account as closed and cancels any active subscriptions. Any saved billing information will also be permanently removed from the account.
accountCode - recurly account idpublic Account reopenAccount(String accountCode)
Transitions a closed account back to active.
accountCode - recurly account idpublic Accounts getChildAccounts(String accountCode)
Returns information about a the child accounts of an account.
accountCode - recurly account idpublic Adjustments getAccountAdjustments(String accountCode)
accountCode - recurly account idpublic Adjustments getAccountAdjustments(String accountCode, Adjustments.AdjustmentType type)
accountCode - recurly account idtype - Adjustments.AdjustmentTypepublic Adjustments getAccountAdjustments(String accountCode, Adjustments.AdjustmentType type, Adjustments.AdjustmentState state)
accountCode - recurly account idtype - Adjustments.AdjustmentTypestate - Adjustments.AdjustmentStatepublic Adjustments getAccountAdjustments(String accountCode, Adjustments.AdjustmentType type, Adjustments.AdjustmentState state, QueryParams params)
accountCode - recurly account idtype - Adjustments.AdjustmentTypestate - Adjustments.AdjustmentStateparams - QueryParamspublic Adjustment getAdjustment(String adjustmentUuid)
public Adjustment createAccountAdjustment(String accountCode, Adjustment adjustment)
public void deleteAccountAdjustment(String accountCode)
public void deleteAdjustment(String adjustmentUuid)
public Subscription createSubscription(Subscription subscription)
Creates a subscription for an account.
subscription - Subscription objectpublic Subscription previewSubscription(Subscription subscription)
Previews a subscription for an account.
subscription - Subscription objectpublic Subscription getSubscription(String uuid)
Subscription by it's UUID
Returns information about a single subscription.
uuid - UUID of the subscription to lookuppublic Subscription cancelSubscription(Subscription subscription)
Cancel a subscription so it remains active and then expires at the end of the current bill cycle.
subscription - Subscription objectpublic Subscription cancelSubscription(String subscriptionUuid, SubscriptionUpdate.Timeframe timeframe)
Cancel a subscription so it remains active and then expires at the end of the current bill cycle.
subscriptionUuid - String uuid of the subscription to canceltimeframe - SubscriptionUpdate.TimeFrame the timeframe in which to cancel. Only accepts bill_date or term_endpublic Subscription pauseSubscription(String subscriptionUuid, int remainingPauseCycles)
* For an active subscription without a pause scheduled already, this will schedule a pause period to begin at the next renewal date for the specified number of billing cycles (remaining_pause_cycles). * When a scheduled pause already exists, this will update the remaining pause cycles with the new value sent. When zero (0) remaining_pause_cycles is sent for a subscription with a scheduled pause, the pause will be canceled. * For a paused subscription, the remaining_pause_cycles will adjust the length of the current pause period. Sending zero (0) in the remaining_pause_cycles field will cause the subscription to be resumed at the next renewal date.
subscriptionUuid - The uuid for the subscription you wish to pause.remainingPauseCycles - The number of billing cycles that the subscription will be paused.public Subscription convertTrialMoto(String subscriptionUuid)
subscriptionUuid - The uuid for the subscription you want to convert from trial to paid.public Subscription convertTrial(String subscriptionUuid)
subscriptionUuid - The uuid for the subscription you want to convert from trial to paid.public Subscription convertTrial(String subscriptionUuid, String ThreeDSecureActionResultTokenId)
subscriptionUuid - The uuid for the subscription you want to convert from trial to paid.ThreeDSecureActionResultTokenId - 3DS secure action result token id in billing info.public Subscription resumeSubscription(String subscriptionUuid)
For a paused subscription, this will immediately resume the subscription from the pause, produce an invoice, and return the newly resumed subscription. Any at-renewal subscription changes will be immediately applied when the subscription resumes.
subscriptionUuid - The uuid for the subscription you wish to pause.public Subscription postponeSubscription(Subscription subscription, org.joda.time.DateTime renewaldate)
postpone a subscription, setting a new renewal date.
subscription - Subscription objectpublic void terminateSubscription(Subscription subscription, RefundOption refund)
Subscription by it's UUIDsubscription - Subscription to terminatepublic Subscription reactivateSubscription(Subscription subscription)
Reactivate a canceled subscription so it renews at the end of the current bill cycle.
subscription - Subscription objectpublic Subscription updateSubscription(String uuid, SubscriptionUpdate subscriptionUpdate)
Subscription by it's UUID
Returns information about a single subscription.
uuid - UUID of the subscription to updatesubscriptionUpdate - subscriptionUpdate objectpublic Subscription updateSubscriptionPreview(String uuid, SubscriptionUpdate subscriptionUpdate)
Subscription by it's UUID
Returns information about a single subscription.
uuid - UUID of the subscription to preview an update forpublic Subscription updateSubscriptionNotes(String uuid, SubscriptionNotes subscriptionNotes)
Subscription's notes by it's UUID
Returns information about a single subscription.
uuid - UUID of the subscription to preview an update forsubscriptionNotes - SubscriptionNotes objectpublic Subscriptions getAccountSubscriptions(String accountCode)
Account.
Returns subscriptions associated with an account
accountCode - recurly account idpublic Subscriptions getSubscriptions()
Returns all the subscriptions on the site
public Subscriptions getSubscriptions(SubscriptionState state, QueryParams params)
Returns all the subscriptions on the site
state - SubscriptionStateparams - QueryParamspublic Integer getSubscriptionsCount(QueryParams params)
params - QueryParamspublic Subscriptions getAccountSubscriptions(String accountCode, SubscriptionState state, QueryParams params)
Account given query params
Returns subscriptions associated with an account
accountCode - recurly account idstate - SubscriptionStateparams - QueryParamspublic Subscriptions getInvoiceSubscriptions(String invoiceId)
invoiceId - String Recurly Invoice IDpublic Subscriptions getInvoiceSubscriptions(String invoiceId, QueryParams params)
invoiceId - String Recurly Invoice IDparams - QueryParamspublic Usage postSubscriptionUsage(String subscriptionCode, String addOnCode, Usage usage)
subscriptionCode - The recurly id of the SubscriptionaddOnCode - recurly id of AddOnusage - the usage to post on recurlyUsage object as identified by the passed in objectpublic Usages getSubscriptionUsages(String subscriptionCode, String addOnCode, QueryParams params)
subscriptionCode - The recurly id of the SubscriptionaddOnCode - recurly id of AddOnUsages for the specified subscription and addOn@Deprecated public Subscriptions getAccountSubscriptions(String accountCode, String status)
Returns information about a single account.
accountCode - recurly account idstatus - Only accounts in this status will be returnedpublic BillingInfo createOrUpdateBillingInfo(String accountCode, BillingInfo billingInfo)
When new or updated credit card information is updated, the billing information is only saved if the credit card is valid. If the account has a past due invoice, the outstanding balance will be collected to validate the billing information.
If the account does not exist before the API request, the account will be created if the billing information is valid.
Please note: this API end-point may be used to import billing information without security codes (CVV). Recurly recommends requiring CVV from your customers when collecting new or updated billing information.
accountCode - recurly account idbillingInfo - billing info object to create or update@Deprecated public BillingInfo createOrUpdateBillingInfo(BillingInfo billingInfo)
createOrUpdateBillingInfo(String, BillingInfo) Please pass in the account code rather than setting the account on the BillingInfo objectWhen new or updated credit card information is updated, the billing information is only saved if the credit card is valid. If the account has a past due invoice, the outstanding balance will be collected to validate the billing information.
If the account does not exist before the API request, the account will be created if the billing information is valid.
Please note: this API end-point may be used to import billing information without security codes (CVV). Recurly recommends requiring CVV from your customers when collecting new or updated billing information.
billingInfo - billing info object to create or updatepublic BillingInfo getBillingInfo(String accountCode)
Returns only the account's current billing information.
accountCode - recurly account idpublic void clearBillingInfo(String accountCode)
You may remove any stored billing information for an account. If the account has a subscription, the renewal will go into past due unless you update the billing info before the renewal occurs
accountCode - recurly account idpublic AccountNotes getAccountNotes(String accountCode)
Returns the account's notes
accountCode - recurly account idpublic Transactions getAccountTransactions(String accountCode)
Returns the account's transaction history
accountCode - recurly account idpublic Transactions getAccountTransactions(String accountCode, TransactionState state, TransactionType type, QueryParams params)
Returns the account's transaction history
accountCode - recurly account idstate - TransactionStatetype - TransactionTypeparams - QueryParamspublic Transactions getTransactions()
All transactions on the site
public Transactions getTransactions(TransactionState state, TransactionType type, QueryParams params)
All transactions on the site
state - TransactionStatetype - TransactionTypeparams - QueryParamspublic Integer getTransactionsCount(QueryParams params)
params - QueryParamspublic Transaction getTransaction(String transactionId)
transactionId - recurly transaction idpublic Transaction createTransaction(Transaction trans)
Transaction through the Recurly API.trans - The Transaction to createTransaction objectpublic void refundTransaction(String transactionId, @Nullable BigDecimal amount)
transactionId - recurly transaction idamount - amount to refund, null for full refundpublic Subscriptions getTransactionSubscriptions(String transactionId)
Transaction.
Returns subscriptions associated with a transaction
transactionId - recurly transaction id@Deprecated public Invoice getInvoice(Integer invoiceId)
Returns the invoice given an integer id
invoiceId - Recurly Invoice IDpublic Invoice getInvoice(String invoiceId)
Returns the invoice given a string id. The invoice may or may not have acountry code prefix (ex: IE1023). For more information on invoicing and prefixes, see: https://docs.recurly.com/docs/site-settings#section-invoice-prefixing
invoiceId - String Recurly Invoice IDpublic Invoice updateInvoice(String invoiceId, Invoice invoice)
Updates an existing invoice.
invoiceId - String Recurly Invoice ID@Deprecated public InputStream getInvoicePdf(Integer invoiceId)
Returns the invoice pdf as an inputStream
invoiceId - Recurly Invoice IDpublic InputStream getInvoicePdf(String invoiceId)
Returns the invoice pdf as an inputStream
invoiceId - String Recurly Invoice IDpublic Invoices getInvoices()
Returns all invoices on the site
public Invoices getInvoices(QueryParams params)
params - QueryParamspublic int getInvoicesCount(QueryParams params)
params - QueryParamspublic Transactions getInvoiceTransactions(String invoiceId)
invoiceId - String Recurly Invoice IDpublic Invoices getAccountInvoices(String accountCode)
Returns the account's invoices
accountCode - recurly account idpublic Invoices getOriginalInvoices(String invoiceId)
Returns the invoice's original invoices
invoiceId - the invoice id@Deprecated public Invoice refundInvoice(String invoiceId, Integer amountInCents, RefundMethod method)
invoiceId - The id of the invoice to refundamountInCents - The open amount to refundmethod - If credit line items exist on the invoice, this parameter specifies which refund method to use first@Deprecated public Invoice refundInvoice(String invoiceId, List<AdjustmentRefund> lineItems, RefundMethod method)
invoiceId - The id of the invoice to refundlineItems - The list of adjustment refund objectsmethod - If credit line items exist on the invoice, this parameter specifies which refund method to use firstpublic Invoice refundInvoice(String invoiceId, InvoiceRefund refundOptions)
invoiceId - The id of the invoice to refundrefundOptions - The options for the refundpublic ShippingAddresses getAccountShippingAddresses(String accountCode)
Returns the account's shipping addresses
accountCode - recurly account idpublic ShippingAddress getShippingAddress(String accountCode, long shippingAddressId)
accountCode - recurly account idshippingAddressId - the shipping address id to fetchpublic ShippingAddress createShippingAddress(String accountCode, ShippingAddress shippingAddress)
accountCode - recurly account idshippingAddress - the shipping address request datapublic ShippingAddress updateShippingAddress(String accountCode, long shippingAddressId, ShippingAddress shippingAddress)
accountCode - recurly account idshippingAddressId - the shipping address id to updateshippingAddress - the shipping address request datapublic void deleteShippingAddress(String accountCode, long shippingAddressId)
accountCode - recurly account idshippingAddressId - the shipping address id to deletepublic Invoices getAccountInvoices(String accountCode, InvoiceState state, QueryParams params)
Returns the account's invoices
accountCode - recurly account idstate - InvoiceState state of the invoicesparams - QueryParamspublic InvoiceCollection postAccountInvoice(String accountCode, Invoice invoice)
Returns an invoice collection
accountCode - @Deprecated public Invoice markInvoiceSuccessful(Integer invoiceId)
invoiceId - Recurly Invoice IDpublic Invoice markInvoiceSuccessful(String invoiceId)
invoiceId - String Recurly Invoice ID@Deprecated public InvoiceCollection markInvoiceFailed(Integer invoiceId)
invoiceId - Recurly Invoice IDpublic InvoiceCollection markInvoiceFailed(String invoiceId)
invoiceId - String Recurly Invoice IDpublic Invoice forceCollectInvoice(String invoiceId)
invoiceId - String Recurly Invoice IDpublic Invoice forceCollectInvoice(String invoiceId, String transactionType)
transactionType - String The gateway transaction type. Currency accepts value "moto".invoiceId - String Recurly Invoice IDpublic Invoice voidInvoice(String invoiceId)
invoiceId - String Recurly Invoice ID@Deprecated public Transaction enterOfflinePayment(Integer invoiceId, Transaction payment)
invoiceId - Recurly Invoice IDpayment - The external paymentpublic Transaction enterOfflinePayment(String invoiceId, Transaction payment)
invoiceId - String Recurly Invoice IDpayment - The external paymentpublic Item createItem(Item item)
item - The item to create on recurlypublic Item updateItem(String itemCode, Item item)
item - The Item to update on recurlypublic Item getItem(String itemCode)
itemCode - recurly id of itempublic Items getItems()
public void deleteItem(String itemCode)
Item
itemCode - The Item object to delete.public Item reactivateItem(String itemCode)
Reactivate a canceled item.
item - Item objectpublic Plan createPlan(Plan plan)
plan - The plan to create on recurlypublic Plan updatePlan(Plan plan)
plan - The plan to update on recurlypublic Plan getPlan(String planCode)
planCode - recurly id of planpublic Plans getPlans()
public Plans getPlans(QueryParams params)
params - QueryParamspublic Integer getPlansCount(QueryParams params)
params - QueryParamspublic void deletePlan(String planCode)
Plan
planCode - The Plan object to delete.public AddOn createPlanAddOn(String planCode, AddOn addOn)
public AddOns getAddOns(String planCode)
planCode - AddOn objects as identified by the passed plan IDpublic AddOns getAddOns(String planCode, QueryParams params)
planCode - params - QueryParamsAddOn objects as identified by the passed plan IDpublic void deleteAddOn(String planCode, String addOnCode)
AddOn for a Plan
public AddOn updateAddOn(String planCode, String addOnCode, AddOn addOn)
AddOn for a Plan
public Coupon createCoupon(Coupon coupon)
Coupon
coupon - The coupon to create on recurlyCoupon objectpublic void deleteCoupon(String couponCode)
Coupon
couponCode - The code for the Couponpublic Redemption redeemCoupon(String couponCode, Redemption redemption)
Coupon on an account.couponCode - redeemed coupon idCoupon objectpublic Redemption getCouponRedemptionByAccount(String accountCode)
accountCode - recurly account idpublic Redemptions getCouponRedemptionsByAccount(String accountCode)
accountCode - recurly account idpublic Redemptions getCouponRedemptionsByAccount(String accountCode, QueryParams params)
accountCode - recurly account idparams - QueryParams@Deprecated public Redemption getCouponRedemptionByInvoice(Integer invoiceNumber)
invoiceNumber - invoice numberpublic Redemption getCouponRedemptionByInvoice(String invoiceId)
invoiceId - String invoice id@Deprecated public Redemptions getCouponRedemptionsByInvoice(Integer invoiceNumber)
invoiceNumber - invoice numberpublic Redemptions getCouponRedemptionsByInvoice(String invoiceId)
invoiceId - String invoice id@Deprecated public Redemptions getCouponRedemptionsByInvoice(Integer invoiceNumber, QueryParams params)
invoiceNumber - invoice numberparams - QueryParamspublic Redemptions getCouponRedemptionsByInvoice(String invoiceId, QueryParams params)
invoiceId - String invoice idparams - QueryParamspublic Redemptions getCouponRedemptionsBySubscription(String subscriptionUuid, QueryParams params)
subscriptionUuid - String subscription uuidparams - QueryParamspublic void deleteCouponRedemption(String accountCode)
accountCode - recurly account idpublic void deleteCouponRedemption(String accountCode, String redemptionUuid)
accountCode - recurly account idredemptionUuid - recurly coupon redemption uuidpublic Coupons generateUniqueCodes(String couponCode, Coupon coupon)
couponCode - recurly coupon code (must have been created as type: bulk)coupon - A coupon with number of unique codes setpublic Coupons getUniqueCouponCodes(String couponCode, QueryParams params)
couponCode - String coupon codeparams - QueryParamspublic Subscription fetchSubscription(String recurlyToken)
Returns subscription from a recurly.js token.
recurlyToken - token given by recurly.jspublic BillingInfo fetchBillingInfo(String recurlyToken)
Returns billing info from a recurly.js token.
recurlyToken - token given by recurly.jspublic Invoice fetchInvoice(String recurlyToken)
Returns invoice from a recurly.js token.
recurlyToken - token given by recurly.jspublic GiftCards getGiftCards(QueryParams params)
Returns information about all gift cards.
params - QueryParamspublic GiftCards getGiftCards()
Returns information about all gift cards.
public Integer getGiftCardsCount(QueryParams params)
params - QueryParamspublic GiftCard getGiftCard(Long giftCardId)
public GiftCard redeemGiftCard(String redemptionCode, String accountCode)
public GiftCard purchaseGiftCard(GiftCard giftCard)
giftCard - The giftCard datapublic GiftCard previewGiftCard(GiftCard giftCard)
giftCard - The giftCard datapublic MeasuredUnits getMeasuredUnits()
public MeasuredUnit createMeasuredUnit(MeasuredUnit measuredUnit)
measuredUnit - The measuredUnit to create on recurlypublic InvoiceCollection purchase(Purchase purchase)
https://dev.recurly.com/docs/create-purchase
purchase - The purchase datapublic InvoiceCollection previewPurchase(Purchase purchase)
https://dev.recurly.com/docs/preview-purchase
purchase - The purchase datapublic InvoiceCollection authorizePurchase(Purchase purchase)
https://dev.recurly.com/docs/authorize-purchase
purchase - The purchase datapublic InvoiceCollection pendingPurchase(Purchase purchase)
https://dev.recurly.com/docs/pending-purchase
purchase - The purchase datapublic AccountAcquisition createAccountAcquisition(String accountCode, AccountAcquisition acquisition)
https://dev.recurly.com/docs/create-account-acquisition
accountCode - The account's account codeacquisition - The AccountAcquisition datapublic AccountAcquisition getAccountAcquisition(String accountCode)
https://dev.recurly.com/docs/create-account-acquisition
accountCode - The account's account codepublic AccountAcquisition updateAccountAcquisition(String accountCode, AccountAcquisition acquisition)
https://dev.recurly.com/docs/update-account-acquisition
accountCode - The account's account codeacquisition - The AccountAcquisition datapublic void deleteAccountAcquisition(String accountCode)
https://dev.recurly.com/docs/clear-account-acquisition
accountCode - The account's account codepublic CreditPayments getCreditPayments()
Returns information about all credit payments.
public CreditPayments getCreditPayments(QueryParams params)
Returns information about all credit payments.
params - QueryParamspublic CreditPayments getCreditPayments(String accountCode, QueryParams params)
Returns information about all credit payments.
accountCode - The account code to filterparams - QueryParamspublic ShippingMethods getShippingMethods()
https://dev.recurly.com/docs/list-shipping-methods
public ShippingMethods getShippingMethods(QueryParams params)
https://dev.recurly.com/docs/list-shipping-methods
params - QueryParamspublic ShippingMethod getShippingMethod(String shippingMethodCode)
https://dev.recurly.com/docs/lookup-shipping-method
shippingMethodCode - The code for the ShippingMethodShippingMethod object as identified by the passed in codepublic <T> T doGETWithFullURL(Class<T> clazz, String url)
Copyright © 2012-2020. All Rights Reserved.