From b74af64e44134f7804ed1edcb90a982615bb9363 Mon Sep 17 00:00:00 2001 From: Douglas Miller Date: Mon, 13 Apr 2026 17:11:46 -0500 Subject: [PATCH] Adding a query param class for each operation instead of sharing a single class for all operations --- .github/workflows/pr-review.yml | 2 +- openapi/api.yaml | 58 ++-- .../com/recurly/v3/AbstractQueryParams.java | 22 ++ src/main/java/com/recurly/v3/Client.java | 295 +++++++++--------- src/main/java/com/recurly/v3/QueryParams.java | 104 ------ .../ListAccountAcquisitionParams.java | 38 +++ .../ListAccountCouponRedemptionsParams.java | 34 ++ .../ListAccountCreditPaymentsParams.java | 33 ++ .../ListAccountExternalInvoicesParams.java | 24 ++ ...istAccountExternalSubscriptionsParams.java | 16 + .../ListAccountInvoicesParams.java | 46 +++ .../ListAccountLineItemsParams.java | 50 +++ .../ListAccountNotesParams.java} | 13 +- .../ListAccountSubscriptionsParams.java | 42 +++ .../ListAccountTransactionsParams.java | 46 +++ .../v3/queryparams/ListAccountsParams.java | 50 +++ .../v3/queryparams/ListAddOnsParams.java | 42 +++ .../queryparams/ListBillingInfosParams.java | 30 ++ .../ListBusinessEntityInvoicesParams.java | 46 +++ .../queryparams/ListChildAccountsParams.java | 50 +++ .../v3/queryparams/ListCouponsParams.java | 38 +++ .../queryparams/ListCreditPaymentsParams.java | 33 ++ .../ListCustomFieldDefinitionsParams.java | 42 +++ .../ListDunningCampaignsParams.java | 16 + .../queryparams/ListEntitlementsParams.java | 16 + .../ListExternalInvoicesParams.java | 24 ++ ...roductExternalProductReferencesParams.java | 16 + .../ListExternalProductsParams.java | 16 + ...nalSubscriptionExternalInvoicesParams.java | 24 ++ ...bscriptionExternalPaymentPhasesParams.java | 24 ++ .../ListExternalSubscriptionsParams.java | 16 + .../ListGeneralLedgerAccountsParams.java | 33 ++ .../ListInvoiceCouponRedemptionsParams.java | 30 ++ .../ListInvoiceLineItemsParams.java | 50 +++ .../ListInvoiceTemplateAccountsParams.java | 50 +++ .../ListInvoiceTemplatesParams.java | 16 + .../v3/queryparams/ListInvoicesParams.java | 46 +++ .../v3/queryparams/ListItemsParams.java | 42 +++ .../v3/queryparams/ListLineItemsParams.java | 50 +++ .../queryparams/ListMeasuredUnitParams.java | 42 +++ .../v3/queryparams/ListPlanAddOnsParams.java | 42 +++ .../v3/queryparams/ListPlansParams.java | 42 +++ .../queryparams/ListPriceSegmentsParams.java | 25 ++ .../ListShippingAddressesParams.java | 38 +++ .../ListShippingMethodsParams.java | 38 +++ .../v3/queryparams/ListSitesParams.java | 33 ++ ...stSubscriptionCouponRedemptionsParams.java | 30 ++ .../ListSubscriptionInvoicesParams.java | 46 +++ .../ListSubscriptionLineItemsParams.java | 50 +++ .../queryparams/ListSubscriptionsParams.java | 42 +++ .../queryparams/ListTransactionsParams.java | 46 +++ .../ListUniqueCouponCodesParams.java | 42 +++ .../v3/queryparams/ListUsageParams.java | 42 +++ .../TerminateSubscriptionParams.java | 20 ++ ...Test.java => AbstractQueryParamsTest.java} | 13 +- .../com/recurly/v3/fixtures/MockClient.java | 6 +- .../recurly/v3/fixtures/MockQueryParams.java | 4 +- 57 files changed, 1931 insertions(+), 293 deletions(-) create mode 100644 src/main/java/com/recurly/v3/AbstractQueryParams.java delete mode 100644 src/main/java/com/recurly/v3/QueryParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAccountAcquisitionParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAccountCouponRedemptionsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAccountCreditPaymentsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAccountExternalInvoicesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAccountExternalSubscriptionsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAccountInvoicesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAccountLineItemsParams.java rename src/main/java/com/recurly/v3/{requests/ExternalProductReferenceConnectionType.java => queryparams/ListAccountNotesParams.java} (52%) create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAccountSubscriptionsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAccountTransactionsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAccountsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListAddOnsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListBillingInfosParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListBusinessEntityInvoicesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListChildAccountsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListCouponsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListCreditPaymentsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListCustomFieldDefinitionsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListDunningCampaignsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListEntitlementsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListExternalInvoicesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListExternalProductExternalProductReferencesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListExternalProductsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionExternalInvoicesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionExternalPaymentPhasesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListGeneralLedgerAccountsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListInvoiceCouponRedemptionsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListInvoiceLineItemsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListInvoiceTemplateAccountsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListInvoiceTemplatesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListInvoicesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListItemsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListLineItemsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListMeasuredUnitParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListPlanAddOnsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListPlansParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListPriceSegmentsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListShippingAddressesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListShippingMethodsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListSitesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListSubscriptionCouponRedemptionsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListSubscriptionInvoicesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListSubscriptionLineItemsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListSubscriptionsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListTransactionsParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListUniqueCouponCodesParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/ListUsageParams.java create mode 100644 src/main/java/com/recurly/v3/queryparams/TerminateSubscriptionParams.java rename src/test/java/com/recurly/v3/{QueryParamsTest.java => AbstractQueryParamsTest.java} (58%) diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml index 13075b1c..55d497f1 100644 --- a/.github/workflows/pr-review.yml +++ b/.github/workflows/pr-review.yml @@ -22,6 +22,6 @@ jobs: - name: Check Labels uses: docker://agilepathway/pull-request-label-checker:latest with: - one_of: V5 + one_of: V6 repo_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/openapi/api.yaml b/openapi/api.yaml index dc43a640..199173fe 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -511,7 +511,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListSitesParams params = new ListSitesParams(); params.setLimit(200); // Pull 200 records at a time final Pager sites = client.listSites(params); @@ -733,7 +733,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListAccountsParams params = new ListAccountsParams(); params.setLimit(200); // Pull 200 records at a time Pager accounts = client.listAccounts(params); @@ -2956,7 +2956,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListAccountCouponRedemptionsParams params = new ListAccountCouponRedemptionsParams(); params.setLimit(200); // Pull 200 records at a time final Pager redemptions = client.listAccountCouponRedemptions(accountId, params); @@ -3455,7 +3455,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListAccountCreditPaymentsParams params = new ListAccountCreditPaymentsParams(); params.setLimit(200); // Pull 200 records at a time Pager payments = client.listAccountCreditPayments(accountId, params); @@ -3797,7 +3797,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListAccountInvoicesParams params = new ListAccountInvoicesParams(); params.setLimit(200); // Pull 200 records at a time final Pager invoices = client.listAccountInvoices(accountId, params); @@ -4241,7 +4241,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListAccountLineItemsParams params = new ListAccountLineItemsParams(); params.setLimit(200); // Pull 200 records at a time final Pager lineItems = client.listAccountLineItems(accountId, params); @@ -4500,7 +4500,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListAccountNotesParams params = new ListAccountNotesParams(); params.setLimit(200); // Pull 200 records at a time final Pager notes = client.listAccountNotes(accountId, params); @@ -4785,7 +4785,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListShippingAddressesParams params = new ListShippingAddressesParams(); params.setLimit(200); // Pull 200 records at a time final Pager addresses = client.listShippingAddresses(accountId, params); @@ -5474,7 +5474,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListAccountSubscriptionsParams params = new ListAccountSubscriptionsParams(); params.setLimit(200); // Pull 200 records at a time final Pager subscriptions = client.listAccountSubscriptions(accountId, params); @@ -5580,7 +5580,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListAccountTransactionsParams params = new ListAccountTransactionsParams(); params.setLimit(200); // Pull 200 records at a time final Pager transactions = client.listAccountTransactions(accountId, params); @@ -5763,7 +5763,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListAccountAcquisitionParams params = new ListAccountAcquisitionParams(); params.setLimit(200); // Pull 200 records at a time final Pager acquisitions = client.listAccountAcquisition(params); @@ -5866,7 +5866,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListCouponsParams params = new ListCouponsParams(); params.setLimit(200); // Pull 200 records at a time final Pager coupons = client.listCoupons(params); @@ -6665,7 +6665,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListCreditPaymentsParams params = new ListCreditPaymentsParams(); params.setLimit(200); // Pull 200 records at a time final Pager payments = client.listCreditPayments(params); @@ -6801,7 +6801,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListCustomFieldDefinitionsParams params = new ListCustomFieldDefinitionsParams(); params.setLimit(200); // Pull 200 records at a time final Pager fields = client.listCustomFieldDefinitions(params); @@ -7211,7 +7211,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListItemsParams params = new ListItemsParams(); params.setLimit(200); // Pull 200 records at a time Pager items = client.listItems(params); @@ -8718,7 +8718,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListInvoicesParams params = new ListInvoicesParams(); params.setLimit(200); // Pull 200 records at a time final Pager invoices = client.listInvoices(params); @@ -10037,7 +10037,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListInvoiceLineItemsParams params = new ListInvoiceLineItemsParams(); params.setLimit(200); Pager lineItems = client.listInvoiceLineItems(invoiceId, params); @@ -10131,7 +10131,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListInvoiceCouponRedemptionsParams params = new ListInvoiceCouponRedemptionsParams(); params.setLimit(200); // Pull 200 records at a time final Pager redemptions = client.listInvoiceCouponRedemptions(invoiceId, params); @@ -10499,7 +10499,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListLineItemsParams params = new ListLineItemsParams(); params.setLimit(200); // Pull 200 records at a time final Pager lineItems = client.listLineItems(params); @@ -10836,7 +10836,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListPlansParams params = new ListPlansParams(); params.setLimit(200); // Pull 200 records at a time final Pager plans = client.listPlans(params); @@ -11505,7 +11505,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListPlanAddOnsParams params = new ListPlanAddOnsParams(); params.setLimit(200); // Pull 200 records at a time final Pager addOns = client.listPlanAddOns(planId, params); @@ -12235,7 +12235,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListAddOnsParams params = new ListAddOnsParams(); params.setLimit(200); // Pull 200 records at a time final Pager addOns = client.listAddOns(params); @@ -12452,7 +12452,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListShippingMethodsParams params = new ListShippingMethodsParams(); params.setLimit(200); // Pull 200 records at a time final Pager shippingMethods = client.listShippingMethods(params); @@ -12701,7 +12701,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListSubscriptionsParams params = new ListSubscriptionsParams(); params.setLimit(200); // Pull 200 records at a time final Pager subscriptions = client.listSubscriptions(params); @@ -13294,7 +13294,7 @@ paths: - lang: Java source: | try { - QueryParams queryParams = new QueryParams(); + TerminateSubscriptionParams queryParams = new TerminateSubscriptionParams(); queryParams.setRefund(Constants.RefundType.NONE); // "full" for a full refund, "partial" for prorated refund client.terminateSubscription(subscriptionId, queryParams); System.out.println("Terminated Subscription: " + subscriptionId); @@ -14582,7 +14582,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListSubscriptionInvoicesParams params = new ListSubscriptionInvoicesParams(); params.setLimit(200); // Pull 200 records at a time final Pager invoices = client.listSubscriptionInvoices(subscriptionId, params); @@ -14688,7 +14688,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListSubscriptionLineItemsParams params = new ListSubscriptionLineItemsParams(); params.setLimit(200); // Pull 200 records at a time final Pager lineItems = client.listSubscriptionLineItems(subscriptionId, params); @@ -14786,7 +14786,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListSubscriptionCouponRedemptionsParams params = new ListSubscriptionCouponRedemptionsParams(); params.setLimit(200); // Pull 200 records at a time final Pager redemptions = client.listSubscriptionCouponRedemptions(subscriptionId, params); @@ -15157,7 +15157,7 @@ paths: end - lang: Java source: | - QueryParams params = new QueryParams(); + ListTransactionsParams params = new ListTransactionsParams(); params.setLimit(200); // Pull 200 records at a time final Pager transactions = client.listTransactions(params); diff --git a/src/main/java/com/recurly/v3/AbstractQueryParams.java b/src/main/java/com/recurly/v3/AbstractQueryParams.java new file mode 100644 index 00000000..93b0ff4b --- /dev/null +++ b/src/main/java/com/recurly/v3/AbstractQueryParams.java @@ -0,0 +1,22 @@ +package com.recurly.v3; + +import java.util.HashMap; +import java.util.List; + +public abstract class AbstractQueryParams + { + + private HashMap params; + + public AbstractQueryParams() { + this.params = new HashMap(); + } + + public HashMap getParams() { + return this.params; + } + + protected void add(final String key, final Object value) { + this.params.put(key, value); + } +} diff --git a/src/main/java/com/recurly/v3/Client.java b/src/main/java/com/recurly/v3/Client.java index c0494352..31a9cf44 100644 --- a/src/main/java/com/recurly/v3/Client.java +++ b/src/main/java/com/recurly/v3/Client.java @@ -9,6 +9,7 @@ import com.google.gson.reflect.TypeToken; import com.recurly.v3.requests.*; import com.recurly.v3.resources.*; +import com.recurly.v3.queryparams.*; import okhttp3.OkHttpClient; import org.joda.time.DateTime; @@ -31,13 +32,13 @@ public Client(final String apiKey, final ClientOptions clientOptions) { * List sites * * @see list_sites api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListSitesParams} for this endpoint. * @return A list of sites. */ - public Pager listSites(QueryParams queryParams) { + public Pager listSites(ListSitesParams queryParams) { final String url = "/sites"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListSitesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Site.class).getType(); @@ -64,13 +65,13 @@ public Site getSite(String siteId) { * List a site's accounts * * @see list_accounts api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountsParams} for this endpoint. * @return A list of the site's accounts. */ - public Pager listAccounts(QueryParams queryParams) { + public Pager listAccounts(ListAccountsParams queryParams) { final String url = "/accounts"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Account.class).getType(); @@ -322,14 +323,14 @@ public Transaction verifyBillingInfoCvv(String accountId, BillingInfoVerifyCVV b * * @see list_billing_infos api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListBillingInfosParams} for this endpoint. * @return A list of the the billing information for an account's */ - public Pager listBillingInfos(String accountId, QueryParams queryParams) { + public Pager listBillingInfos(String accountId, ListBillingInfosParams queryParams) { final String url = "/accounts/{account_id}/billing_infos"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListBillingInfosParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, BillingInfo.class).getType(); @@ -467,14 +468,14 @@ public Transaction verifyBillingInfosCvv(String accountId, String billingInfoId, * * @see list_account_coupon_redemptions api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountCouponRedemptionsParams} for this endpoint. * @return A list of the the coupon redemptions on an account. */ - public Pager listAccountCouponRedemptions(String accountId, QueryParams queryParams) { + public Pager listAccountCouponRedemptions(String accountId, ListAccountCouponRedemptionsParams queryParams) { final String url = "/accounts/{account_id}/coupon_redemptions"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountCouponRedemptionsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, CouponRedemption.class).getType(); @@ -571,14 +572,14 @@ public CouponRedemption removeCouponRedemptionById(String accountId, String coup * * @see list_account_credit_payments api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountCreditPaymentsParams} for this endpoint. * @return A list of the account's credit payments. */ - public Pager listAccountCreditPayments(String accountId, QueryParams queryParams) { + public Pager listAccountCreditPayments(String accountId, ListAccountCreditPaymentsParams queryParams) { final String url = "/accounts/{account_id}/credit_payments"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountCreditPaymentsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, CreditPayment.class).getType(); @@ -678,14 +679,14 @@ public ExternalAccount deleteAccountExternalAccount(String accountId, String ext * * @see list_account_external_invoices api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountExternalInvoicesParams} for this endpoint. * @return A list of the the external_invoices on an account. */ - public Pager listAccountExternalInvoices(String accountId, QueryParams queryParams) { + public Pager listAccountExternalInvoices(String accountId, ListAccountExternalInvoicesParams queryParams) { final String url = "/accounts/{account_id}/external_invoices"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountExternalInvoicesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, ExternalInvoice.class).getType(); @@ -697,14 +698,14 @@ public Pager listAccountExternalInvoices(String accountId, Quer * * @see list_account_invoices api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountInvoicesParams} for this endpoint. * @return A list of the account's invoices. */ - public Pager listAccountInvoices(String accountId, QueryParams queryParams) { + public Pager listAccountInvoices(String accountId, ListAccountInvoicesParams queryParams) { final String url = "/accounts/{account_id}/invoices"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountInvoicesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Invoice.class).getType(); @@ -750,14 +751,14 @@ public InvoiceCollection previewInvoice(String accountId, InvoiceCreate body) { * * @see list_account_line_items api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountLineItemsParams} for this endpoint. * @return A list of the account's line items. */ - public Pager listAccountLineItems(String accountId, QueryParams queryParams) { + public Pager listAccountLineItems(String accountId, ListAccountLineItemsParams queryParams) { final String url = "/accounts/{account_id}/line_items"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountLineItemsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, LineItem.class).getType(); @@ -786,14 +787,14 @@ public LineItem createLineItem(String accountId, LineItemCreate body) { * * @see list_account_notes api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountNotesParams} for this endpoint. * @return A list of an account's notes. */ - public Pager listAccountNotes(String accountId, QueryParams queryParams) { + public Pager listAccountNotes(String accountId, ListAccountNotesParams queryParams) { final String url = "/accounts/{account_id}/notes"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountNotesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, AccountNote.class).getType(); @@ -856,14 +857,14 @@ public void removeAccountNote(String accountId, String accountNoteId) { * * @see list_shipping_addresses api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListShippingAddressesParams} for this endpoint. * @return A list of an account's shipping addresses. */ - public Pager listShippingAddresses(String accountId, QueryParams queryParams) { + public Pager listShippingAddresses(String accountId, ListShippingAddressesParams queryParams) { final String url = "/accounts/{account_id}/shipping_addresses"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListShippingAddressesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, ShippingAddress.class).getType(); @@ -945,14 +946,14 @@ public void removeShippingAddress(String accountId, String shippingAddressId) { * * @see list_account_subscriptions api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountSubscriptionsParams} for this endpoint. * @return A list of the account's subscriptions. */ - public Pager listAccountSubscriptions(String accountId, QueryParams queryParams) { + public Pager listAccountSubscriptions(String accountId, ListAccountSubscriptionsParams queryParams) { final String url = "/accounts/{account_id}/subscriptions"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountSubscriptionsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Subscription.class).getType(); @@ -964,14 +965,14 @@ public Pager listAccountSubscriptions(String accountId, QueryParam * * @see list_account_transactions api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountTransactionsParams} for this endpoint. * @return A list of the account's transactions. */ - public Pager listAccountTransactions(String accountId, QueryParams queryParams) { + public Pager listAccountTransactions(String accountId, ListAccountTransactionsParams queryParams) { final String url = "/accounts/{account_id}/transactions"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountTransactionsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Transaction.class).getType(); @@ -983,14 +984,14 @@ public Pager listAccountTransactions(String accountId, QueryParams * * @see list_child_accounts api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListChildAccountsParams} for this endpoint. * @return A list of an account's child accounts. */ - public Pager listChildAccounts(String accountId, QueryParams queryParams) { + public Pager listChildAccounts(String accountId, ListChildAccountsParams queryParams) { final String url = "/accounts/{account_id}/accounts"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListChildAccountsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Account.class).getType(); @@ -1001,13 +1002,13 @@ public Pager listChildAccounts(String accountId, QueryParams queryParam * List a site's account acquisition data * * @see list_account_acquisition api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountAcquisitionParams} for this endpoint. * @return A list of the site's account acquisition data. */ - public Pager listAccountAcquisition(QueryParams queryParams) { + public Pager listAccountAcquisition(ListAccountAcquisitionParams queryParams) { final String url = "/acquisitions"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountAcquisitionParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, AccountAcquisition.class).getType(); @@ -1018,13 +1019,13 @@ public Pager listAccountAcquisition(QueryParams queryParams) * List a site's coupons * * @see list_coupons api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListCouponsParams} for this endpoint. * @return A list of the site's coupons. */ - public Pager listCoupons(QueryParams queryParams) { + public Pager listCoupons(ListCouponsParams queryParams) { final String url = "/coupons"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListCouponsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Coupon.class).getType(); @@ -1136,14 +1137,14 @@ public Coupon restoreCoupon(String couponId, CouponUpdate body) { * * @see list_unique_coupon_codes api documentation * @param couponId Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListUniqueCouponCodesParams} for this endpoint. * @return A list of unique coupon codes that were generated */ - public Pager listUniqueCouponCodes(String couponId, QueryParams queryParams) { + public Pager listUniqueCouponCodes(String couponId, ListUniqueCouponCodesParams queryParams) { final String url = "/coupons/{coupon_id}/unique_coupon_codes"; final HashMap urlParams = new HashMap(); urlParams.put("coupon_id", couponId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListUniqueCouponCodesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, UniqueCouponCode.class).getType(); @@ -1154,13 +1155,13 @@ public Pager listUniqueCouponCodes(String couponId, QueryParam * List a site's credit payments * * @see list_credit_payments api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListCreditPaymentsParams} for this endpoint. * @return A list of the site's credit payments. */ - public Pager listCreditPayments(QueryParams queryParams) { + public Pager listCreditPayments(ListCreditPaymentsParams queryParams) { final String url = "/credit_payments"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListCreditPaymentsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, CreditPayment.class).getType(); @@ -1187,13 +1188,13 @@ public CreditPayment getCreditPayment(String creditPaymentId) { * List a site's custom field definitions * * @see list_custom_field_definitions api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListCustomFieldDefinitionsParams} for this endpoint. * @return A list of the site's custom field definitions. */ - public Pager listCustomFieldDefinitions(QueryParams queryParams) { + public Pager listCustomFieldDefinitions(ListCustomFieldDefinitionsParams queryParams) { final String url = "/custom_field_definitions"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListCustomFieldDefinitionsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, CustomFieldDefinition.class).getType(); @@ -1235,13 +1236,13 @@ public GeneralLedgerAccount createGeneralLedgerAccount(GeneralLedgerAccountCreat * List a site's general ledger accounts * * @see list_general_ledger_accounts api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListGeneralLedgerAccountsParams} for this endpoint. * @return A list of the site's general ledger accounts. */ - public Pager listGeneralLedgerAccounts(QueryParams queryParams) { + public Pager listGeneralLedgerAccounts(ListGeneralLedgerAccountsParams queryParams) { final String url = "/general_ledger_accounts"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListGeneralLedgerAccountsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, GeneralLedgerAccount.class).getType(); @@ -1316,14 +1317,14 @@ public Pager getPerformanceObligations() { * * @see list_invoice_template_accounts api documentation * @param invoiceTemplateId Invoice template ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListInvoiceTemplateAccountsParams} for this endpoint. * @return A list of an invoice template's associated accounts. */ - public Pager listInvoiceTemplateAccounts(String invoiceTemplateId, QueryParams queryParams) { + public Pager listInvoiceTemplateAccounts(String invoiceTemplateId, ListInvoiceTemplateAccountsParams queryParams) { final String url = "/invoice_templates/{invoice_template_id}/accounts"; final HashMap urlParams = new HashMap(); urlParams.put("invoice_template_id", invoiceTemplateId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListInvoiceTemplateAccountsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Account.class).getType(); @@ -1334,13 +1335,13 @@ public Pager listInvoiceTemplateAccounts(String invoiceTemplateId, Quer * List a site's items * * @see list_items api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListItemsParams} for this endpoint. * @return A list of the site's items. */ - public Pager listItems(QueryParams queryParams) { + public Pager listItems(ListItemsParams queryParams) { final String url = "/items"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListItemsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Item.class).getType(); @@ -1431,13 +1432,13 @@ public Item reactivateItem(String itemId) { * List a site's measured units * * @see list_measured_unit api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListMeasuredUnitParams} for this endpoint. * @return A list of the site's measured units. */ - public Pager listMeasuredUnit(QueryParams queryParams) { + public Pager listMeasuredUnit(ListMeasuredUnitParams queryParams) { final String url = "/measured_units"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListMeasuredUnitParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, MeasuredUnit.class).getType(); @@ -1512,13 +1513,13 @@ public MeasuredUnit removeMeasuredUnit(String measuredUnitId) { * List a site's external products * * @see list_external_products api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListExternalProductsParams} for this endpoint. * @return A list of the the external_products on a site. */ - public Pager listExternalProducts(QueryParams queryParams) { + public Pager listExternalProducts(ListExternalProductsParams queryParams) { final String url = "/external_products"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListExternalProductsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, ExternalProduct.class).getType(); @@ -1594,14 +1595,14 @@ public ExternalProduct deactivateExternalProducts(String externalProductId) { * * @see list_external_product_external_product_references api documentation * @param externalProductId External product id - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListExternalProductExternalProductReferencesParams} for this endpoint. * @return A list of the the external product references for an external product. */ - public Pager listExternalProductExternalProductReferences(String externalProductId, QueryParams queryParams) { + public Pager listExternalProductExternalProductReferences(String externalProductId, ListExternalProductExternalProductReferencesParams queryParams) { final String url = "/external_products/{external_product_id}/external_product_references"; final HashMap urlParams = new HashMap(); urlParams.put("external_product_id", externalProductId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListExternalProductExternalProductReferencesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, ExternalProductReferenceCollection.class).getType(); @@ -1680,13 +1681,13 @@ public ExternalSubscription createExternalSubscription(ExternalSubscriptionCreat * List the external subscriptions on a site * * @see list_external_subscriptions api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListExternalSubscriptionsParams} for this endpoint. * @return A list of the the external_subscriptions on a site. */ - public Pager listExternalSubscriptions(QueryParams queryParams) { + public Pager listExternalSubscriptions(ListExternalSubscriptionsParams queryParams) { final String url = "/external_subscriptions"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListExternalSubscriptionsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, ExternalSubscription.class).getType(); @@ -1747,14 +1748,14 @@ public ExternalSubscription putExternalSubscription(String externalSubscriptionI * * @see list_external_subscription_external_invoices api documentation * @param externalSubscriptionId External subscription id - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListExternalSubscriptionExternalInvoicesParams} for this endpoint. * @return A list of the the external_invoices on a site. */ - public Pager listExternalSubscriptionExternalInvoices(String externalSubscriptionId, QueryParams queryParams) { + public Pager listExternalSubscriptionExternalInvoices(String externalSubscriptionId, ListExternalSubscriptionExternalInvoicesParams queryParams) { final String url = "/external_subscriptions/{external_subscription_id}/external_invoices"; final HashMap urlParams = new HashMap(); urlParams.put("external_subscription_id", externalSubscriptionId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListExternalSubscriptionExternalInvoicesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, ExternalInvoice.class).getType(); @@ -1782,13 +1783,13 @@ public ExternalInvoice createExternalInvoice(String externalSubscriptionId, Exte * List a site's invoices * * @see list_invoices api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListInvoicesParams} for this endpoint. * @return A list of the site's invoices. */ - public Pager listInvoices(QueryParams queryParams) { + public Pager listInvoices(ListInvoicesParams queryParams) { final String url = "/invoices"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListInvoicesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Invoice.class).getType(); @@ -1979,14 +1980,14 @@ public Transaction recordExternalTransaction(String invoiceId, ExternalTransacti * * @see list_invoice_line_items api documentation * @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001` - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListInvoiceLineItemsParams} for this endpoint. * @return A list of the invoice's line items. */ - public Pager listInvoiceLineItems(String invoiceId, QueryParams queryParams) { + public Pager listInvoiceLineItems(String invoiceId, ListInvoiceLineItemsParams queryParams) { final String url = "/invoices/{invoice_id}/line_items"; final HashMap urlParams = new HashMap(); urlParams.put("invoice_id", invoiceId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListInvoiceLineItemsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, LineItem.class).getType(); @@ -1998,14 +1999,14 @@ public Pager listInvoiceLineItems(String invoiceId, QueryParams queryP * * @see list_invoice_coupon_redemptions api documentation * @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001` - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListInvoiceCouponRedemptionsParams} for this endpoint. * @return A list of the the coupon redemptions associated with the invoice. */ - public Pager listInvoiceCouponRedemptions(String invoiceId, QueryParams queryParams) { + public Pager listInvoiceCouponRedemptions(String invoiceId, ListInvoiceCouponRedemptionsParams queryParams) { final String url = "/invoices/{invoice_id}/coupon_redemptions"; final HashMap urlParams = new HashMap(); urlParams.put("invoice_id", invoiceId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListInvoiceCouponRedemptionsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, CouponRedemption.class).getType(); @@ -2049,13 +2050,13 @@ public Invoice refundInvoice(String invoiceId, InvoiceRefund body) { * List a site's line items * * @see list_line_items api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListLineItemsParams} for this endpoint. * @return A list of the site's line items. */ - public Pager listLineItems(QueryParams queryParams) { + public Pager listLineItems(ListLineItemsParams queryParams) { final String url = "/line_items"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListLineItemsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, LineItem.class).getType(); @@ -2096,13 +2097,13 @@ public void removeLineItem(String lineItemId) { * List a site's plans * * @see list_plans api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListPlansParams} for this endpoint. * @return A list of plans. */ - public Pager listPlans(QueryParams queryParams) { + public Pager listPlans(ListPlansParams queryParams) { final String url = "/plans"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListPlansParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Plan.class).getType(); @@ -2178,14 +2179,14 @@ public Plan removePlan(String planId) { * * @see list_plan_add_ons api documentation * @param planId Plan ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListPlanAddOnsParams} for this endpoint. * @return A list of add-ons. */ - public Pager listPlanAddOns(String planId, QueryParams queryParams) { + public Pager listPlanAddOns(String planId, ListPlanAddOnsParams queryParams) { final String url = "/plans/{plan_id}/add_ons"; final HashMap urlParams = new HashMap(); urlParams.put("plan_id", planId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListPlanAddOnsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, AddOn.class).getType(); @@ -2268,13 +2269,13 @@ public AddOn removePlanAddOn(String planId, String addOnId) { * List a site's price segments * * @see list_price_segments api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListPriceSegmentsParams} for this endpoint. * @return A list of price segments. */ - public Pager listPriceSegments(QueryParams queryParams) { + public Pager listPriceSegments(ListPriceSegmentsParams queryParams) { final String url = "/price_segments"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListPriceSegmentsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, PriceSegment.class).getType(); @@ -2301,13 +2302,13 @@ public PriceSegment getPriceSegment(String priceSegmentId) { * List a site's add-ons * * @see list_add_ons api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAddOnsParams} for this endpoint. * @return A list of add-ons. */ - public Pager listAddOns(QueryParams queryParams) { + public Pager listAddOns(ListAddOnsParams queryParams) { final String url = "/add_ons"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAddOnsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, AddOn.class).getType(); @@ -2334,13 +2335,13 @@ public AddOn getAddOn(String addOnId) { * List a site's shipping methods * * @see list_shipping_methods api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListShippingMethodsParams} for this endpoint. * @return A list of the site's shipping methods. */ - public Pager listShippingMethods(QueryParams queryParams) { + public Pager listShippingMethods(ListShippingMethodsParams queryParams) { final String url = "/shipping_methods"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListShippingMethodsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, ShippingMethod.class).getType(); @@ -2415,13 +2416,13 @@ public ShippingMethod deactivateShippingMethod(String shippingMethodId) { * List a site's subscriptions * * @see list_subscriptions api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListSubscriptionsParams} for this endpoint. * @return A list of the site's subscriptions. */ - public Pager listSubscriptions(QueryParams queryParams) { + public Pager listSubscriptions(ListSubscriptionsParams queryParams) { final String url = "/subscriptions"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListSubscriptionsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Subscription.class).getType(); @@ -2481,14 +2482,14 @@ public Subscription updateSubscription(String subscriptionId, SubscriptionUpdate * * @see terminate_subscription api documentation * @param subscriptionId Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link TerminateSubscriptionParams} for this endpoint. * @return An expired subscription. */ - public Subscription terminateSubscription(String subscriptionId, QueryParams queryParams) { + public Subscription terminateSubscription(String subscriptionId, TerminateSubscriptionParams queryParams) { final String url = "/subscriptions/{subscription_id}"; final HashMap urlParams = new HashMap(); urlParams.put("subscription_id", subscriptionId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new TerminateSubscriptionParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type returnType = Subscription.class; @@ -2678,14 +2679,14 @@ public SubscriptionChange previewSubscriptionChange(String subscriptionId, Subsc * * @see list_subscription_invoices api documentation * @param subscriptionId Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListSubscriptionInvoicesParams} for this endpoint. * @return A list of the subscription's invoices. */ - public Pager listSubscriptionInvoices(String subscriptionId, QueryParams queryParams) { + public Pager listSubscriptionInvoices(String subscriptionId, ListSubscriptionInvoicesParams queryParams) { final String url = "/subscriptions/{subscription_id}/invoices"; final HashMap urlParams = new HashMap(); urlParams.put("subscription_id", subscriptionId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListSubscriptionInvoicesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Invoice.class).getType(); @@ -2697,14 +2698,14 @@ public Pager listSubscriptionInvoices(String subscriptionId, QueryParam * * @see list_subscription_line_items api documentation * @param subscriptionId Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListSubscriptionLineItemsParams} for this endpoint. * @return A list of the subscription's line items. */ - public Pager listSubscriptionLineItems(String subscriptionId, QueryParams queryParams) { + public Pager listSubscriptionLineItems(String subscriptionId, ListSubscriptionLineItemsParams queryParams) { final String url = "/subscriptions/{subscription_id}/line_items"; final HashMap urlParams = new HashMap(); urlParams.put("subscription_id", subscriptionId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListSubscriptionLineItemsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, LineItem.class).getType(); @@ -2716,14 +2717,14 @@ public Pager listSubscriptionLineItems(String subscriptionId, QueryPar * * @see list_subscription_coupon_redemptions api documentation * @param subscriptionId Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListSubscriptionCouponRedemptionsParams} for this endpoint. * @return A list of the the coupon redemptions on a subscription. */ - public Pager listSubscriptionCouponRedemptions(String subscriptionId, QueryParams queryParams) { + public Pager listSubscriptionCouponRedemptions(String subscriptionId, ListSubscriptionCouponRedemptionsParams queryParams) { final String url = "/subscriptions/{subscription_id}/coupon_redemptions"; final HashMap urlParams = new HashMap(); urlParams.put("subscription_id", subscriptionId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListSubscriptionCouponRedemptionsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, CouponRedemption.class).getType(); @@ -2772,15 +2773,15 @@ public CouponRedemption removeSubscriptionCouponRedemption(String subscriptionId * @see list_usage api documentation * @param subscriptionId Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. * @param addOnId Add-on ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListUsageParams} for this endpoint. * @return A list of the subscription add-on's usage records. */ - public Pager listUsage(String subscriptionId, String addOnId, QueryParams queryParams) { + public Pager listUsage(String subscriptionId, String addOnId, ListUsageParams queryParams) { final String url = "/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage"; final HashMap urlParams = new HashMap(); urlParams.put("subscription_id", subscriptionId); urlParams.put("add_on_id", addOnId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListUsageParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Usage.class).getType(); @@ -2857,13 +2858,13 @@ public void removeUsage(String usageId) { * List a site's transactions * * @see list_transactions api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListTransactionsParams} for this endpoint. * @return A list of the site's transactions. */ - public Pager listTransactions(QueryParams queryParams) { + public Pager listTransactions(ListTransactionsParams queryParams) { final String url = "/transactions"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListTransactionsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Transaction.class).getType(); @@ -3060,13 +3061,13 @@ public ExportFiles getExportFiles(String exportDate) { * List the dunning campaigns for a site * * @see list_dunning_campaigns api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListDunningCampaignsParams} for this endpoint. * @return A list of the the dunning_campaigns on an account. */ - public Pager listDunningCampaigns(QueryParams queryParams) { + public Pager listDunningCampaigns(ListDunningCampaignsParams queryParams) { final String url = "/dunning_campaigns"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListDunningCampaignsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, DunningCampaign.class).getType(); @@ -3110,13 +3111,13 @@ public DunningCampaignsBulkUpdateResponse putDunningCampaignBulkUpdate(String du * Show the invoice templates for a site * * @see list_invoice_templates api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListInvoiceTemplatesParams} for this endpoint. * @return A list of the the invoice templates on a site. */ - public Pager listInvoiceTemplates(QueryParams queryParams) { + public Pager listInvoiceTemplates(ListInvoiceTemplatesParams queryParams) { final String url = "/invoice_templates"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListInvoiceTemplatesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, InvoiceTemplate.class).getType(); @@ -3143,13 +3144,13 @@ public InvoiceTemplate getInvoiceTemplate(String invoiceTemplateId) { * List the external invoices on a site * * @see list_external_invoices api documentation - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListExternalInvoicesParams} for this endpoint. * @return A list of the the external_invoices on a site. */ - public Pager listExternalInvoices(QueryParams queryParams) { + public Pager listExternalInvoices(ListExternalInvoicesParams queryParams) { final String url = "/external_invoices"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListExternalInvoicesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, ExternalInvoice.class).getType(); @@ -3177,14 +3178,14 @@ public ExternalInvoice showExternalInvoice(String externalInvoiceId) { * * @see list_external_subscription_external_payment_phases api documentation * @param externalSubscriptionId External subscription id - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListExternalSubscriptionExternalPaymentPhasesParams} for this endpoint. * @return A list of the the external_payment_phases on a site. */ - public Pager listExternalSubscriptionExternalPaymentPhases(String externalSubscriptionId, QueryParams queryParams) { + public Pager listExternalSubscriptionExternalPaymentPhases(String externalSubscriptionId, ListExternalSubscriptionExternalPaymentPhasesParams queryParams) { final String url = "/external_subscriptions/{external_subscription_id}/external_payment_phases"; final HashMap urlParams = new HashMap(); urlParams.put("external_subscription_id", externalSubscriptionId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListExternalSubscriptionExternalPaymentPhasesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, ExternalPaymentPhase.class).getType(); @@ -3214,14 +3215,14 @@ public ExternalPaymentPhase getExternalSubscriptionExternalPaymentPhase(String e * * @see list_entitlements api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListEntitlementsParams} for this endpoint. * @return A list of the entitlements granted to an account. */ - public Pager listEntitlements(String accountId, QueryParams queryParams) { + public Pager listEntitlements(String accountId, ListEntitlementsParams queryParams) { final String url = "/accounts/{account_id}/entitlements"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListEntitlementsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Entitlements.class).getType(); @@ -3233,14 +3234,14 @@ public Pager listEntitlements(String accountId, QueryParams queryP * * @see list_account_external_subscriptions api documentation * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListAccountExternalSubscriptionsParams} for this endpoint. * @return A list of the the external_subscriptions on an account. */ - public Pager listAccountExternalSubscriptions(String accountId, QueryParams queryParams) { + public Pager listAccountExternalSubscriptions(String accountId, ListAccountExternalSubscriptionsParams queryParams) { final String url = "/accounts/{account_id}/external_subscriptions"; final HashMap urlParams = new HashMap(); urlParams.put("account_id", accountId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListAccountExternalSubscriptionsParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, ExternalSubscription.class).getType(); @@ -3359,14 +3360,14 @@ public GiftCard redeemGiftCard(String redemptionCode, GiftCardRedeem body) { * * @see list_business_entity_invoices api documentation * @param businessEntityId Business Entity ID. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-entity1`. - * @param queryParams The {@link QueryParams} for this endpoint. + * @param queryParams The {@link ListBusinessEntityInvoicesParams} for this endpoint. * @return A list of the business entity's invoices. */ - public Pager listBusinessEntityInvoices(String businessEntityId, QueryParams queryParams) { + public Pager listBusinessEntityInvoices(String businessEntityId, ListBusinessEntityInvoicesParams queryParams) { final String url = "/business_entities/{business_entity_id}/invoices"; final HashMap urlParams = new HashMap(); urlParams.put("business_entity_id", businessEntityId); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new ListBusinessEntityInvoicesParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, Invoice.class).getType(); diff --git a/src/main/java/com/recurly/v3/QueryParams.java b/src/main/java/com/recurly/v3/QueryParams.java deleted file mode 100644 index df1f88aa..00000000 --- a/src/main/java/com/recurly/v3/QueryParams.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This file is automatically created by Recurly's OpenAPI generation process - * and thus any edits you make by hand will be lost. If you wish to make a - * change to this file, please create a Github issue explaining the changes you - * need and we will usher them to the appropriate places. - */ -package com.recurly.v3; - -import java.util.HashMap; -import java.util.List; -import org.joda.time.DateTime; - -public class QueryParams { - - private HashMap params; - - public QueryParams() { - this.params = new HashMap(); - } - - public HashMap getParams() { - return this.params; - } - - protected void add(final String key, final Object value) { - this.params.put(key, value); - } - - public void setIds(final List ids) { - this.add("ids", String.join(",", ids)); - } - - public void setLimit(final Integer limit) { - this.add("limit", limit); - } - - public void setOrder(final Constants.AlphanumericSort order) { - this.add("order", order); - } - - public void setSort(final Constants.TimestampSort sort) { - this.add("sort", sort); - } - - public void setState(final Constants.ActiveState state) { - this.add("state", state); - } - - public void setBeginTime(final DateTime beginTime) { - this.add("begin_time", beginTime); - } - - public void setEndTime(final DateTime endTime) { - this.add("end_time", endTime); - } - - public void setEmail(final String email) { - this.add("email", email); - } - - public void setSubscriber(final Boolean subscriber) { - this.add("subscriber", subscriber); - } - - public void setPastDue(final Constants.True pastDue) { - this.add("past_due", pastDue); - } - - public void setType(final Constants.FilterInvoiceType type) { - this.add("type", type); - } - - public void setOriginal(final Constants.True original) { - this.add("original", original); - } - - public void setSuccess(final Constants.True success) { - this.add("success", success); - } - - public void setRedeemed(final Constants.FilterRedeemed redeemed) { - this.add("redeemed", redeemed); - } - - public void setRelatedType(final Constants.RelatedType relatedType) { - this.add("related_type", relatedType); - } - - public void setAccountType(final Constants.GeneralLedgerAccountType accountType) { - this.add("account_type", accountType); - } - - public void setRefund(final Constants.RefundType refund) { - this.add("refund", refund); - } - - public void setCharge(final Boolean charge) { - this.add("charge", charge); - } - - public void setBillingStatus(final Constants.BillingStatus billingStatus) { - this.add("billing_status", billingStatus); - } -} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAccountAcquisitionParams.java b/src/main/java/com/recurly/v3/queryparams/ListAccountAcquisitionParams.java new file mode 100644 index 00000000..657a034b --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountAcquisitionParams.java @@ -0,0 +1,38 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListAccountAcquisitionParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAccountCouponRedemptionsParams.java b/src/main/java/com/recurly/v3/queryparams/ListAccountCouponRedemptionsParams.java new file mode 100644 index 00000000..fd235f6a --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountCouponRedemptionsParams.java @@ -0,0 +1,34 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListAccountCouponRedemptionsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setState(final Constants.ActiveState state) { + this.add("state", state); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAccountCreditPaymentsParams.java b/src/main/java/com/recurly/v3/queryparams/ListAccountCreditPaymentsParams.java new file mode 100644 index 00000000..362d8d45 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountCreditPaymentsParams.java @@ -0,0 +1,33 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import org.joda.time.DateTime; + +public class ListAccountCreditPaymentsParams extends AbstractQueryParams { + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAccountExternalInvoicesParams.java b/src/main/java/com/recurly/v3/queryparams/ListAccountExternalInvoicesParams.java new file mode 100644 index 00000000..98434d77 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountExternalInvoicesParams.java @@ -0,0 +1,24 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListAccountExternalInvoicesParams extends AbstractQueryParams { + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAccountExternalSubscriptionsParams.java b/src/main/java/com/recurly/v3/queryparams/ListAccountExternalSubscriptionsParams.java new file mode 100644 index 00000000..8aa6e97c --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountExternalSubscriptionsParams.java @@ -0,0 +1,16 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListAccountExternalSubscriptionsParams extends AbstractQueryParams { + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAccountInvoicesParams.java b/src/main/java/com/recurly/v3/queryparams/ListAccountInvoicesParams.java new file mode 100644 index 00000000..e83c0484 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountInvoicesParams.java @@ -0,0 +1,46 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListAccountInvoicesParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setState(final Constants.InvoiceStateQueryParam state) { + this.add("state", state); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setType(final Constants.FilterInvoiceType type) { + this.add("type", type); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAccountLineItemsParams.java b/src/main/java/com/recurly/v3/queryparams/ListAccountLineItemsParams.java new file mode 100644 index 00000000..1813680f --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountLineItemsParams.java @@ -0,0 +1,50 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListAccountLineItemsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setOriginal(final Constants.True original) { + this.add("original", original); + } + + public void setState(final Constants.LineItemState state) { + this.add("state", state); + } + + public void setType(final Constants.LineItemType type) { + this.add("type", type); + } +} diff --git a/src/main/java/com/recurly/v3/requests/ExternalProductReferenceConnectionType.java b/src/main/java/com/recurly/v3/queryparams/ListAccountNotesParams.java similarity index 52% rename from src/main/java/com/recurly/v3/requests/ExternalProductReferenceConnectionType.java rename to src/main/java/com/recurly/v3/queryparams/ListAccountNotesParams.java index 38942700..34e03f61 100644 --- a/src/main/java/com/recurly/v3/requests/ExternalProductReferenceConnectionType.java +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountNotesParams.java @@ -3,9 +3,14 @@ * make by hand will be lost. If you wish to make a change to this file, please create a Github * issue explaining the changes you need and we will usher them to the appropriate places. */ -package com.recurly.v3.requests; +package com.recurly.v3.queryparams; -import com.recurly.v3.Request; -import com.recurly.v3.resources.*; +import com.recurly.v3.AbstractQueryParams; +import java.util.List; -public class ExternalProductReferenceConnectionType extends Request {} +public class ListAccountNotesParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAccountSubscriptionsParams.java b/src/main/java/com/recurly/v3/queryparams/ListAccountSubscriptionsParams.java new file mode 100644 index 00000000..bcbed4de --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountSubscriptionsParams.java @@ -0,0 +1,42 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListAccountSubscriptionsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setState(final Constants.FilterSubscriptionState state) { + this.add("state", state); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAccountTransactionsParams.java b/src/main/java/com/recurly/v3/queryparams/ListAccountTransactionsParams.java new file mode 100644 index 00000000..78815cd1 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountTransactionsParams.java @@ -0,0 +1,46 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListAccountTransactionsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setType(final Constants.FilterTransactionType type) { + this.add("type", type); + } + + public void setSuccess(final Constants.True success) { + this.add("success", success); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAccountsParams.java b/src/main/java/com/recurly/v3/queryparams/ListAccountsParams.java new file mode 100644 index 00000000..c3ced482 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAccountsParams.java @@ -0,0 +1,50 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListAccountsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setEmail(final String email) { + this.add("email", email); + } + + public void setSubscriber(final Boolean subscriber) { + this.add("subscriber", subscriber); + } + + public void setPastDue(final Constants.True pastDue) { + this.add("past_due", pastDue); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListAddOnsParams.java b/src/main/java/com/recurly/v3/queryparams/ListAddOnsParams.java new file mode 100644 index 00000000..b4f54623 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListAddOnsParams.java @@ -0,0 +1,42 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListAddOnsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setState(final Constants.ActiveState state) { + this.add("state", state); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListBillingInfosParams.java b/src/main/java/com/recurly/v3/queryparams/ListBillingInfosParams.java new file mode 100644 index 00000000..fa479ff1 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListBillingInfosParams.java @@ -0,0 +1,30 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListBillingInfosParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListBusinessEntityInvoicesParams.java b/src/main/java/com/recurly/v3/queryparams/ListBusinessEntityInvoicesParams.java new file mode 100644 index 00000000..49bbba25 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListBusinessEntityInvoicesParams.java @@ -0,0 +1,46 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListBusinessEntityInvoicesParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setState(final Constants.InvoiceStateQueryParam state) { + this.add("state", state); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setType(final Constants.FilterInvoiceType type) { + this.add("type", type); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListChildAccountsParams.java b/src/main/java/com/recurly/v3/queryparams/ListChildAccountsParams.java new file mode 100644 index 00000000..5f100929 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListChildAccountsParams.java @@ -0,0 +1,50 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListChildAccountsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setEmail(final String email) { + this.add("email", email); + } + + public void setSubscriber(final Boolean subscriber) { + this.add("subscriber", subscriber); + } + + public void setPastDue(final Constants.True pastDue) { + this.add("past_due", pastDue); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListCouponsParams.java b/src/main/java/com/recurly/v3/queryparams/ListCouponsParams.java new file mode 100644 index 00000000..2c270b5e --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListCouponsParams.java @@ -0,0 +1,38 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListCouponsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListCreditPaymentsParams.java b/src/main/java/com/recurly/v3/queryparams/ListCreditPaymentsParams.java new file mode 100644 index 00000000..26e92658 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListCreditPaymentsParams.java @@ -0,0 +1,33 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import org.joda.time.DateTime; + +public class ListCreditPaymentsParams extends AbstractQueryParams { + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListCustomFieldDefinitionsParams.java b/src/main/java/com/recurly/v3/queryparams/ListCustomFieldDefinitionsParams.java new file mode 100644 index 00000000..ea1b3e6e --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListCustomFieldDefinitionsParams.java @@ -0,0 +1,42 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListCustomFieldDefinitionsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setRelatedType(final Constants.RelatedType relatedType) { + this.add("related_type", relatedType); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListDunningCampaignsParams.java b/src/main/java/com/recurly/v3/queryparams/ListDunningCampaignsParams.java new file mode 100644 index 00000000..43a5bafb --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListDunningCampaignsParams.java @@ -0,0 +1,16 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListDunningCampaignsParams extends AbstractQueryParams { + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListEntitlementsParams.java b/src/main/java/com/recurly/v3/queryparams/ListEntitlementsParams.java new file mode 100644 index 00000000..a117e301 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListEntitlementsParams.java @@ -0,0 +1,16 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListEntitlementsParams extends AbstractQueryParams { + + public void setState(final Constants.FilterLimitedSubscriptionState state) { + this.add("state", state); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListExternalInvoicesParams.java b/src/main/java/com/recurly/v3/queryparams/ListExternalInvoicesParams.java new file mode 100644 index 00000000..4b1e1653 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListExternalInvoicesParams.java @@ -0,0 +1,24 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListExternalInvoicesParams extends AbstractQueryParams { + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListExternalProductExternalProductReferencesParams.java b/src/main/java/com/recurly/v3/queryparams/ListExternalProductExternalProductReferencesParams.java new file mode 100644 index 00000000..d76e50fa --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListExternalProductExternalProductReferencesParams.java @@ -0,0 +1,16 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListExternalProductExternalProductReferencesParams extends AbstractQueryParams { + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListExternalProductsParams.java b/src/main/java/com/recurly/v3/queryparams/ListExternalProductsParams.java new file mode 100644 index 00000000..96cefe54 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListExternalProductsParams.java @@ -0,0 +1,16 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListExternalProductsParams extends AbstractQueryParams { + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionExternalInvoicesParams.java b/src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionExternalInvoicesParams.java new file mode 100644 index 00000000..d474480c --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionExternalInvoicesParams.java @@ -0,0 +1,24 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListExternalSubscriptionExternalInvoicesParams extends AbstractQueryParams { + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionExternalPaymentPhasesParams.java b/src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionExternalPaymentPhasesParams.java new file mode 100644 index 00000000..6e68bbd1 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionExternalPaymentPhasesParams.java @@ -0,0 +1,24 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListExternalSubscriptionExternalPaymentPhasesParams extends AbstractQueryParams { + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionsParams.java b/src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionsParams.java new file mode 100644 index 00000000..3d2a24e3 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListExternalSubscriptionsParams.java @@ -0,0 +1,16 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListExternalSubscriptionsParams extends AbstractQueryParams { + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListGeneralLedgerAccountsParams.java b/src/main/java/com/recurly/v3/queryparams/ListGeneralLedgerAccountsParams.java new file mode 100644 index 00000000..934bd5aa --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListGeneralLedgerAccountsParams.java @@ -0,0 +1,33 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; + +public class ListGeneralLedgerAccountsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setAccountType(final Constants.GeneralLedgerAccountType accountType) { + this.add("account_type", accountType); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListInvoiceCouponRedemptionsParams.java b/src/main/java/com/recurly/v3/queryparams/ListInvoiceCouponRedemptionsParams.java new file mode 100644 index 00000000..a3543a1c --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListInvoiceCouponRedemptionsParams.java @@ -0,0 +1,30 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListInvoiceCouponRedemptionsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListInvoiceLineItemsParams.java b/src/main/java/com/recurly/v3/queryparams/ListInvoiceLineItemsParams.java new file mode 100644 index 00000000..74e4a530 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListInvoiceLineItemsParams.java @@ -0,0 +1,50 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListInvoiceLineItemsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setOriginal(final Constants.True original) { + this.add("original", original); + } + + public void setState(final Constants.LineItemState state) { + this.add("state", state); + } + + public void setType(final Constants.LineItemType type) { + this.add("type", type); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListInvoiceTemplateAccountsParams.java b/src/main/java/com/recurly/v3/queryparams/ListInvoiceTemplateAccountsParams.java new file mode 100644 index 00000000..3c2cd490 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListInvoiceTemplateAccountsParams.java @@ -0,0 +1,50 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListInvoiceTemplateAccountsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setEmail(final String email) { + this.add("email", email); + } + + public void setSubscriber(final Boolean subscriber) { + this.add("subscriber", subscriber); + } + + public void setPastDue(final Constants.True pastDue) { + this.add("past_due", pastDue); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListInvoiceTemplatesParams.java b/src/main/java/com/recurly/v3/queryparams/ListInvoiceTemplatesParams.java new file mode 100644 index 00000000..690bde08 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListInvoiceTemplatesParams.java @@ -0,0 +1,16 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class ListInvoiceTemplatesParams extends AbstractQueryParams { + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListInvoicesParams.java b/src/main/java/com/recurly/v3/queryparams/ListInvoicesParams.java new file mode 100644 index 00000000..fb0270af --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListInvoicesParams.java @@ -0,0 +1,46 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListInvoicesParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setState(final Constants.InvoiceStateQueryParam state) { + this.add("state", state); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setType(final Constants.FilterInvoiceType type) { + this.add("type", type); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListItemsParams.java b/src/main/java/com/recurly/v3/queryparams/ListItemsParams.java new file mode 100644 index 00000000..6a2b95c7 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListItemsParams.java @@ -0,0 +1,42 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListItemsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setState(final Constants.ActiveState state) { + this.add("state", state); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListLineItemsParams.java b/src/main/java/com/recurly/v3/queryparams/ListLineItemsParams.java new file mode 100644 index 00000000..65129c4b --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListLineItemsParams.java @@ -0,0 +1,50 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListLineItemsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setOriginal(final Constants.True original) { + this.add("original", original); + } + + public void setState(final Constants.LineItemState state) { + this.add("state", state); + } + + public void setType(final Constants.LineItemType type) { + this.add("type", type); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListMeasuredUnitParams.java b/src/main/java/com/recurly/v3/queryparams/ListMeasuredUnitParams.java new file mode 100644 index 00000000..078a1728 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListMeasuredUnitParams.java @@ -0,0 +1,42 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListMeasuredUnitParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setState(final Constants.ActiveState state) { + this.add("state", state); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListPlanAddOnsParams.java b/src/main/java/com/recurly/v3/queryparams/ListPlanAddOnsParams.java new file mode 100644 index 00000000..6c497686 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListPlanAddOnsParams.java @@ -0,0 +1,42 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListPlanAddOnsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setState(final Constants.ActiveState state) { + this.add("state", state); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListPlansParams.java b/src/main/java/com/recurly/v3/queryparams/ListPlansParams.java new file mode 100644 index 00000000..2126ab63 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListPlansParams.java @@ -0,0 +1,42 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListPlansParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setState(final Constants.ActiveState state) { + this.add("state", state); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListPriceSegmentsParams.java b/src/main/java/com/recurly/v3/queryparams/ListPriceSegmentsParams.java new file mode 100644 index 00000000..bc2f7db3 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListPriceSegmentsParams.java @@ -0,0 +1,25 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; + +public class ListPriceSegmentsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListShippingAddressesParams.java b/src/main/java/com/recurly/v3/queryparams/ListShippingAddressesParams.java new file mode 100644 index 00000000..c7ad5929 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListShippingAddressesParams.java @@ -0,0 +1,38 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListShippingAddressesParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListShippingMethodsParams.java b/src/main/java/com/recurly/v3/queryparams/ListShippingMethodsParams.java new file mode 100644 index 00000000..ff555f4f --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListShippingMethodsParams.java @@ -0,0 +1,38 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListShippingMethodsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListSitesParams.java b/src/main/java/com/recurly/v3/queryparams/ListSitesParams.java new file mode 100644 index 00000000..0543dbc0 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListSitesParams.java @@ -0,0 +1,33 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; + +public class ListSitesParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setState(final Constants.ActiveState state) { + this.add("state", state); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListSubscriptionCouponRedemptionsParams.java b/src/main/java/com/recurly/v3/queryparams/ListSubscriptionCouponRedemptionsParams.java new file mode 100644 index 00000000..50b0b88d --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListSubscriptionCouponRedemptionsParams.java @@ -0,0 +1,30 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListSubscriptionCouponRedemptionsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListSubscriptionInvoicesParams.java b/src/main/java/com/recurly/v3/queryparams/ListSubscriptionInvoicesParams.java new file mode 100644 index 00000000..10a0b610 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListSubscriptionInvoicesParams.java @@ -0,0 +1,46 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListSubscriptionInvoicesParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setState(final Constants.InvoiceStateQueryParam state) { + this.add("state", state); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setType(final Constants.FilterInvoiceType type) { + this.add("type", type); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListSubscriptionLineItemsParams.java b/src/main/java/com/recurly/v3/queryparams/ListSubscriptionLineItemsParams.java new file mode 100644 index 00000000..28eb8925 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListSubscriptionLineItemsParams.java @@ -0,0 +1,50 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListSubscriptionLineItemsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setOriginal(final Constants.True original) { + this.add("original", original); + } + + public void setState(final Constants.LineItemState state) { + this.add("state", state); + } + + public void setType(final Constants.LineItemType type) { + this.add("type", type); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListSubscriptionsParams.java b/src/main/java/com/recurly/v3/queryparams/ListSubscriptionsParams.java new file mode 100644 index 00000000..5d37ef36 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListSubscriptionsParams.java @@ -0,0 +1,42 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListSubscriptionsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setState(final Constants.FilterSubscriptionState state) { + this.add("state", state); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListTransactionsParams.java b/src/main/java/com/recurly/v3/queryparams/ListTransactionsParams.java new file mode 100644 index 00000000..83675c30 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListTransactionsParams.java @@ -0,0 +1,46 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListTransactionsParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setType(final Constants.FilterTransactionType type) { + this.add("type", type); + } + + public void setSuccess(final Constants.True success) { + this.add("success", success); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListUniqueCouponCodesParams.java b/src/main/java/com/recurly/v3/queryparams/ListUniqueCouponCodesParams.java new file mode 100644 index 00000000..4030725c --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListUniqueCouponCodesParams.java @@ -0,0 +1,42 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListUniqueCouponCodesParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.TimestampSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setRedeemed(final Constants.FilterRedeemed redeemed) { + this.add("redeemed", redeemed); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/ListUsageParams.java b/src/main/java/com/recurly/v3/queryparams/ListUsageParams.java new file mode 100644 index 00000000..7e213f8c --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/ListUsageParams.java @@ -0,0 +1,42 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; +import java.util.List; +import org.joda.time.DateTime; + +public class ListUsageParams extends AbstractQueryParams { + + public void setIds(final List ids) { + this.add("ids", String.join(",", ids)); + } + + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + + public void setOrder(final Constants.AlphanumericSort order) { + this.add("order", order); + } + + public void setSort(final Constants.UsageSort sort) { + this.add("sort", sort); + } + + public void setBeginTime(final DateTime beginTime) { + this.add("begin_time", beginTime); + } + + public void setEndTime(final DateTime endTime) { + this.add("end_time", endTime); + } + + public void setBillingStatus(final Constants.BillingStatus billingStatus) { + this.add("billing_status", billingStatus); + } +} diff --git a/src/main/java/com/recurly/v3/queryparams/TerminateSubscriptionParams.java b/src/main/java/com/recurly/v3/queryparams/TerminateSubscriptionParams.java new file mode 100644 index 00000000..58bddde2 --- /dev/null +++ b/src/main/java/com/recurly/v3/queryparams/TerminateSubscriptionParams.java @@ -0,0 +1,20 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.queryparams; + +import com.recurly.v3.AbstractQueryParams; +import com.recurly.v3.Constants; + +public class TerminateSubscriptionParams extends AbstractQueryParams { + + public void setRefund(final Constants.RefundType refund) { + this.add("refund", refund); + } + + public void setCharge(final Boolean charge) { + this.add("charge", charge); + } +} diff --git a/src/test/java/com/recurly/v3/QueryParamsTest.java b/src/test/java/com/recurly/v3/AbstractQueryParamsTest.java similarity index 58% rename from src/test/java/com/recurly/v3/QueryParamsTest.java rename to src/test/java/com/recurly/v3/AbstractQueryParamsTest.java index f4af32a7..9ec1103d 100644 --- a/src/test/java/com/recurly/v3/QueryParamsTest.java +++ b/src/test/java/com/recurly/v3/AbstractQueryParamsTest.java @@ -5,16 +5,23 @@ import java.util.HashMap; import org.junit.jupiter.api.Test; -public class QueryParamsTest { +public class AbstractQueryParamsTest { + + private static class TestParams extends AbstractQueryParams { + public void setLimit(final Integer limit) { + this.add("limit", limit); + } + } + @Test public void testConstructor() { - QueryParams qp = new QueryParams(); + TestParams qp = new TestParams(); assertEquals(qp.getParams(), new HashMap()); } @Test public void testSetLimit() { - QueryParams qp = new QueryParams(); + TestParams qp = new TestParams(); qp.setLimit(200); assertEquals(qp.getParams().get("limit"), 200); } diff --git a/src/test/java/com/recurly/v3/fixtures/MockClient.java b/src/test/java/com/recurly/v3/fixtures/MockClient.java index 74d77227..7b2be9b8 100644 --- a/src/test/java/com/recurly/v3/fixtures/MockClient.java +++ b/src/test/java/com/recurly/v3/fixtures/MockClient.java @@ -3,8 +3,8 @@ import com.google.gson.reflect.TypeToken; import com.recurly.v3.BaseClient; import com.recurly.v3.Pager; -import com.recurly.v3.QueryParams; import com.recurly.v3.ClientOptions; +import com.recurly.v3.fixtures.MockQueryParams; import org.mockito.stubbing.Answer; @@ -51,10 +51,10 @@ public MyResource getResource(String resourceId) { return this.makeRequest("GET", path, returnType); } - public Pager listResources(QueryParams queryParams) { + public Pager listResources(MockQueryParams queryParams) { final String url = "/resources"; final HashMap urlParams = new HashMap(); - if (queryParams == null) queryParams = new QueryParams(); + if (queryParams == null) queryParams = new MockQueryParams(); final HashMap paramsMap = queryParams.getParams(); final String path = this.interpolatePath(url, urlParams); Type parameterizedType = TypeToken.getParameterized(Pager.class, MyResource.class).getType(); diff --git a/src/test/java/com/recurly/v3/fixtures/MockQueryParams.java b/src/test/java/com/recurly/v3/fixtures/MockQueryParams.java index dc864b0d..425f979c 100644 --- a/src/test/java/com/recurly/v3/fixtures/MockQueryParams.java +++ b/src/test/java/com/recurly/v3/fixtures/MockQueryParams.java @@ -1,10 +1,10 @@ package com.recurly.v3.fixtures; -import com.recurly.v3.QueryParams; +import com.recurly.v3.AbstractQueryParams; import java.util.ArrayList; import org.joda.time.DateTime; -public class MockQueryParams extends QueryParams { +public class MockQueryParams extends AbstractQueryParams { public void setMyString(String myString) { this.add("my_string", myString); }