/** * Get a Coupon * <p> * * @param couponCode The code for the {@link Coupon} * @return The {@link Coupon} object as identified by the passed in code */ public Coupon getCoupon(final String couponCode) { return doGET(Coupon.COUPON_RESOURCE + "/" + couponCode, Coupon.class); }
/** * Lookup the first coupon redemption on an account. * * @param accountCode recurly account id * @return the coupon redemption for this account on success, null otherwise */ public Redemption getCouponRedemptionByAccount(final String accountCode) { return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTION_RESOURCE, Redemption.class); }
/** * Lookup the first coupon redemption on an invoice. * * @param invoiceId String invoice id * @return the coupon redemption for this invoice on success, null otherwise */ public Redemption getCouponRedemptionByInvoice(final String invoiceId) { return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId + Redemption.REDEMPTION_RESOURCE, Redemption.class); }
/** * Lookup an account's billing info * <p> * Returns only the account's current billing information. * * @param accountCode recurly account id * @return the current billing info object associated with this account on success, null otherwise */ public BillingInfo getBillingInfo(final String accountCode) { return doGET(Account.ACCOUNT_RESOURCE + "/" + accountCode + BillingInfo.BILLING_INFO_RESOURCE, BillingInfo.class); }
/** * Return all the invoices given query params * <p> * * @param params {@link QueryParams} * @return all invoices matching the query */ public Invoices getInvoices(final QueryParams params) { return doGET(Invoices.INVOICES_RESOURCE, Invoices.class, params); }
/** * Lookup all coupon redemptions on an account given query params. * * @param accountCode recurly account id * @param params {@link QueryParams} * @return the coupon redemptions for this account on success, null otherwise */ public Redemptions getCouponRedemptionsByAccount(final String accountCode, final QueryParams params) { return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE, Redemptions.class, params); }
/** * Get Gift Cards given query params * <p> * Returns information about all gift cards. * * @param params {@link QueryParams} * @return gitfcards object on success, null otherwise */ public GiftCards getGiftCards(final QueryParams params) { return doGET(GiftCards.GIFT_CARDS_RESOURCE, GiftCards.class, params); }
/** * Gets the acquisition details for an account * <p> * https://dev.recurly.com/docs/create-account-acquisition * * @param accountCode The account's account code * @return The created AccountAcquisition object */ public AccountAcquisition getAccountAcquisition(final String accountCode) { final String path = Account.ACCOUNT_RESOURCE + "/" + accountCode + AccountAcquisition.ACCOUNT_ACQUISITION_RESOURCE; return doGET(path, AccountAcquisition.class); }
/** * Get Accounts given query params * <p> * Returns information about all accounts. * * @param params {@link QueryParams} * @return Accounts on success, null otherwise */ public Accounts getAccounts(final QueryParams params) { return doGET(Accounts.ACCOUNTS_RESOURCE, Accounts.class, params); }
/** * Get Account * <p> * Returns information about a single account. * * @param accountCode recurly account id * @return account object on success, null otherwise */ public Account getAccount(final String accountCode) { return doGET(Account.ACCOUNT_RESOURCE + "/" + accountCode, Account.class); }
/** * Get Credit Payments * <p> * Returns information about all credit payments. * * @param params {@link QueryParams} * @return CreditPayments on success, null otherwise */ public CreditPayments getCreditPayments(final QueryParams params) { return doGET(CreditPayments.CREDIT_PAYMENTS_RESOURCE, CreditPayments.class, params); }
/** * Lookup all coupon redemptions on an account. * * @param accountCode recurly account id * @return the coupon redemptions for this account on success, null otherwise */ public Redemptions getCouponRedemptionsByAccount(final String accountCode) { return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE, Redemptions.class, new QueryParams()); }
/** * Get Gift Cards * <p> * Returns information about all gift cards. * * @return gitfcards object on success, null otherwise */ public GiftCards getGiftCards() { return doGET(GiftCards.GIFT_CARDS_RESOURCE, GiftCards.class, new QueryParams()); }
/** * Lookup all invoices * <p> * Returns all invoices on the site * * @return the invoices associated with this site on success, null otherwise */ public Invoices getInvoices() { return doGET(Invoices.INVOICES_RESOURCE, Invoices.class, new QueryParams()); }
/** * Return all the plans * <p> * * @return the plan object as identified by the passed in ID */ public Plans getPlans() { return doGET(Plans.PLANS_RESOURCE, Plans.class, new QueryParams()); }
/** * Get Accounts * <p> * Returns information about all accounts. * * @return Accounts on success, null otherwise */ public Accounts getAccounts() { return doGET(Accounts.ACCOUNTS_RESOURCE, Accounts.class, new QueryParams()); }
/** * Get all the subscriptions on the site * <p> * Returns all the subscriptions on the site * * @return Subscriptions on the site */ public Subscriptions getSubscriptions() { return doGET(Subscriptions.SUBSCRIPTIONS_RESOURCE, Subscriptions.class, new QueryParams()); }
/** * List an account's notes * <p> * Returns the account's notes * * @param accountCode recurly account id * @return the notes associated with this account on success, null otherwise */ public AccountNotes getAccountNotes(final String accountCode) { return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + AccountNotes.ACCOUNT_NOTES_RESOURCE, AccountNotes.class, new QueryParams()); }
/** * Get Credit Payments * <p> * Returns information about all credit payments. * * @return CreditPayments on success, null otherwise */ public CreditPayments getCreditPayments() { return doGET(CreditPayments.CREDIT_PAYMENTS_RESOURCE, CreditPayments.class, new QueryParams()); }
/** * Return all the transactions on an invoice. Only use this endpoint * if you have more than 500 transactions on an invoice. * <p> * * @param invoiceId String Recurly Invoice ID * @return all the transactions on the invoice */ public Transactions getInvoiceTransactions(final String invoiceId) { return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId + Transactions.TRANSACTIONS_RESOURCE, Transactions.class, new QueryParams()); }