From 26532c4402b3b477fc507c59266bd274215e3641 Mon Sep 17 00:00:00 2001 From: Recurly Integrations Date: Sat, 14 Dec 2024 00:56:16 +0000 Subject: [PATCH] Generated Latest Changes for v2021-02-25 --- openapi/api.yaml | 452 +++++++++++++++++- src/main/java/com/recurly/v3/Client.java | 50 +- src/main/java/com/recurly/v3/Constants.java | 45 +- .../requests/AccountExternalSubscription.java | 38 ++ .../v3/requests/ExternalAccountCreate.java | 8 +- .../v3/requests/ExternalAccountUpdate.java | 8 +- .../ExternalProductReferenceBase.java | 14 +- ...xternalProductReferenceConnectionType.java | 11 + .../ExternalProductReferenceCreate.java | 14 +- .../ExternalProductReferenceUpdate.java | 57 +++ .../requests/ExternalSubscriptionCreate.java | 249 ++++++++++ .../requests/ExternalSubscriptionUpdate.java | 236 +++++++++ .../recurly/v3/requests/InvoiceCreate.java | 60 +++ .../recurly/v3/requests/PurchaseCreate.java | 93 ++++ .../v3/requests/SubscriptionChangeCreate.java | 72 +++ .../v3/requests/SubscriptionCreate.java | 68 +++ .../v3/resources/BusinessEntityMini.java | 73 +++ .../recurly/v3/resources/Subscription.java | 24 + .../v3/resources/SubscriptionChange.java | 15 + .../com/recurly/v3/resources/Transaction.java | 104 ++++ 20 files changed, 1651 insertions(+), 40 deletions(-) create mode 100644 src/main/java/com/recurly/v3/requests/AccountExternalSubscription.java create mode 100644 src/main/java/com/recurly/v3/requests/ExternalProductReferenceConnectionType.java create mode 100644 src/main/java/com/recurly/v3/requests/ExternalProductReferenceUpdate.java create mode 100644 src/main/java/com/recurly/v3/requests/ExternalSubscriptionCreate.java create mode 100644 src/main/java/com/recurly/v3/requests/ExternalSubscriptionUpdate.java create mode 100644 src/main/java/com/recurly/v3/resources/BusinessEntityMini.java diff --git a/openapi/api.yaml b/openapi/api.yaml index bcad8e3..460dd35 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -8198,11 +8198,49 @@ paths: "$ref": "#/components/schemas/Error" x-code-samples: [] "/external_subscriptions": + post: + tags: + - external_subscriptions + operationId: create_external_subscription + summary: Create an external subscription + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalSubscriptionCreate" + required: true + responses: + '201': + description: Returns the external subscription + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalSubscription" + '400': + description: Bad request; perhaps missing or invalid parameters. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '404': + description: External subscription cannot be completed for the specified + reason. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] get: tags: - external_subscriptions operationId: list_external_subscriptions - summary: List a site's external subscriptions + summary: List the external subscriptions on a site description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: @@ -8228,9 +8266,9 @@ paths: "$ref": "#/components/schemas/Error" x-code-samples: [] "/external_subscriptions/{external_subscription_id}": - parameters: - - "$ref": "#/components/parameters/external_subscription_id_fetch" get: + parameters: + - "$ref": "#/components/parameters/external_subscription_id_fetch" tags: - external_subscriptions operationId: get_external_subscription @@ -8262,6 +8300,52 @@ paths: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] + put: + parameters: + - "$ref": "#/components/parameters/external_subscription_id" + tags: + - external_subscriptions + operationId: put_external_subscription + summary: Update an external subscription + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalSubscriptionUpdate" + required: false + responses: + '200': + description: Settings for an external subscription. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalSubscription" + '400': + description: Bad request; perhaps missing or invalid parameters. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '404': + description: Incorrect site or external subscription ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '422': + description: Validation error with external resource connection or feature + flag. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/external_subscriptions/{external_subscription_id}/external_invoices": parameters: - "$ref": "#/components/parameters/external_subscription_id" @@ -20294,6 +20378,22 @@ components: title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 + business_entity_id: + type: string + title: Business Entity ID + description: The `business_entity_id` is the value that represents a specific + business entity for an end customer which will be assigned to the invoice. + Available when the `Multiple Business Entities` feature is enabled. If + both `business_entity_id` and `business_entity_code` are present, `business_entity_id` + will be used. + business_entity_code: + type: string + title: Business Entity Code + description: The `business_entity_code` is the value that represents a specific + business entity for an end customer which will be assigned to the invoice. + Available when the `Multiple Business Entities` feature is enabled. If + both `business_entity_id` and `business_entity_code` are present, `business_entity_id` + will be used. collection_method: title: Collection method description: An automatic invoice means a corresponding transaction is run @@ -22820,6 +22920,13 @@ components: subscription. maxLength: 13 readOnly: true + business_entity_id: + type: string + title: Business Entity ID + description: The ID of the business entity associated with the subscription. + This will be `null` if the subscription relies on resolving the business + entity during renewal. + maxLength: 13 started_with_gift: type: boolean default: false @@ -23186,6 +23293,9 @@ components: invoice_collection: title: Invoice Collection "$ref": "#/components/schemas/InvoiceCollection" + business_entity: + title: Business Entity + "$ref": "#/components/schemas/BusinessEntityMini" custom_fields: "$ref": "#/components/schemas/CustomFields" created_at: @@ -23251,6 +23361,26 @@ components: maxLength: 50 description: If you want to change to a new plan, you can provide the plan's code or id. If both are provided the `plan_id` will be used. + business_entity_id: + type: string + title: Business Entity ID + description: The `business_entity_id` is the value that represents a specific + business entity for an end customer. When `business_entity_id` is used + to assign a business entity to the subscription, all future billing events + for the subscription will bill to the specified business entity. Available + when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` + and `business_entity_code` are present, `business_entity_id` will be used. + Only allowed if the `timeframe` is not `now`. + business_entity_code: + type: string + title: Business Entity Code + description: The `business_entity_code` is the value that represents a specific + business entity for an end customer. When `business_entity_code` is used + to assign a business entity to the subscription, all future billing events + for the subscription will bill to the specified business entity. Available + when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` + and `business_entity_code` are present, `business_entity_id` will be used. + Only allowed if the `timeframe` is not `now`. unit_amount: type: number format: float @@ -23399,6 +23529,24 @@ components: maxLength: 13 description: You must provide either a `plan_code` or `plan_id`. If both are provided the `plan_id` will be used. + business_entity_id: + type: string + title: Business Entity ID + description: The `business_entity_id` is the value that represents a specific + business entity for an end customer. When `business_entity_id` is used + to assign a business entity to the subscription, all future billing events + for the subscription will bill to the specified business entity. Available + when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` + and `business_entity_code` are present, `business_entity_id` will be used. + business_entity_code: + type: string + title: Business Entity Code + description: The `business_entity_code` is the value that represents a specific + business entity for an end customer. When `business_entity_code` is used + to assign a business entity to the subscription, all future billing events + for the subscription will bill to the specified business entity. Available + when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` + and `business_entity_code` are present, `business_entity_id` will be used. account: "$ref": "#/components/schemas/AccountCreate" billing_info_id: @@ -24023,8 +24171,12 @@ components: maxLength: 13 account: "$ref": "#/components/schemas/AccountMini" + indicator: + "$ref": "#/components/schemas/TransactionIndicatorEnum" invoice: "$ref": "#/components/schemas/InvoiceMini" + merchant_reason_code: + "$ref": "#/components/schemas/TransactionMerchantReasonCodeEnum" voided_by_invoice: "$ref": "#/components/schemas/InvoiceMini" subscription_ids: @@ -24511,6 +24663,24 @@ components: billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. + business_entity_id: + type: string + title: Business Entity ID + description: The `business_entity_id` is the value that represents a specific + business entity for an end customer. When `business_entity_id` is used + to assign a business entity to the subscription, all future billing events + for the subscription will bill to the specified business entity. Available + when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` + and `business_entity_code` are present, `business_entity_id` will be used. + business_entity_code: + type: string + title: Business Entity Code + description: The `business_entity_code` is the value that represents a specific + business entity for an end customer. When `business_entity_code` is used + to assign a business entity to the subscription, all future billing events + for the subscription will bill to the specified business entity. Available + when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` + and `business_entity_code` are present, `business_entity_id` will be used. collection_method: title: Collection method description: Must be set to manual in order to preview a purchase for an @@ -24552,6 +24722,17 @@ components: type: string title: Terms and conditions description: Terms and conditions to be put on the purchase invoice. + transaction: + type: object + description: "(Transaction Data, Card on File) - Options for flagging transactions + as Customer or Merchant Initiated Unscheduled." + allOf: + - type: object + properties: + indicator: + "$ref": "#/components/schemas/Transaction/properties/indicator" + merchant_reason_code: + "$ref": "#/components/schemas/Transaction/properties/merchant_reason_code" customer_notes: type: string title: Customer notes @@ -24807,6 +24988,38 @@ components: type: string format: date-time description: Time the object was last updated + ExternalChargeCreate: + type: object + properties: + currency: + type: string + title: Currency + description: 3-letter ISO 4217 currency code. + maxLength: 3 + unit_amount: + type: string + format: decimal + quantity: + type: integer + description: + type: string + external_product_reference: + "$ref": "#/components/schemas/ExternalProductReferenceCreate" + required: + - quantity + - currency + - unit_amount + AccountExternalSubscription: + allOf: + - type: object + properties: + account_code: + type: string + description: The account code of a new or existing account to be used + when creating the external subscription. + maxLength: 50 + required: + - account_code ExternalPaymentPhase: type: object description: Details of payments in the lifecycle of a subscription from an @@ -24974,7 +25187,7 @@ components: Google Play Store. maxLength: 255 external_connection_type: - "$ref": "#/components/schemas/ExternalProductReferenceConnectionTypeEnum" + "$ref": "#/components/schemas/ExternalProductReferenceConnectionType" ExternalProductReferenceCollection: type: object properties: @@ -25001,11 +25214,10 @@ components: ExternalProductReferenceUpdate: allOf: - "$ref": "#/components/schemas/ExternalProductReferenceBase" - ExternalProductReferenceConnectionTypeEnum: + ExternalProductReferenceConnectionType: type: string - enum: - - apple_app_store - - google_play_store + description: Represents the connection type. One of the connection types of + your enabled App Connectors ExternalAccountList: type: object properties: @@ -25031,7 +25243,8 @@ components: description: Represents the account code for the external account. external_connection_type: type: string - description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` + description: Represents the connection type. One of the connection types + of your enabled App Connectors required: - external_account_code - external_connection_type @@ -25043,7 +25256,8 @@ components: description: Represents the account code for the external account. external_connection_type: type: string - description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` + description: Represents the connection type. One of the connection types + of your enabled App Connectors ExternalAccount: type: object title: External Account @@ -25217,6 +25431,91 @@ components: format: date-time title: Updated at description: When the external subscription was updated in Recurly. + ExternalSubscriptionBase: + type: object + properties: + external_id: + type: string + title: External Id + description: Id of the subscription in the external system, i.e. Apple App + Store or Google Play Store. + last_purchased: + type: string + format: date-time + title: Last purchased + description: When a new billing event occurred on the external subscription + in conjunction with a recent billing period, reactivation or upgrade/downgrade. + auto_renew: + type: boolean + title: Auto-renew + description: An indication of whether or not the external subscription will + auto-renew at the expiration date. + default: false + state: + type: string + description: External subscriptions can be active, canceled, expired, past_due, + voided, revoked, or paused. + default: active + app_identifier: + type: string + title: App identifier + description: Identifier of the app that generated the external subscription. + quantity: + type: integer + title: Quantity + description: An indication of the quantity of a subscribed item's quantity. + default: 1 + minimum: 0 + activated_at: + type: string + format: date-time + title: Activated at + description: When the external subscription was activated in the external + platform. + expires_at: + type: string + format: date-time + title: Expires at + description: When the external subscription expires in the external platform. + trial_started_at: + type: string + format: date-time + title: Trial started at + description: When the external subscription trial period started in the + external platform. + trial_ends_at: + type: string + format: date-time + title: Trial ends at + description: When the external subscription trial period ends in the external + platform. + imported: + type: boolean + title: Import + description: An indication of whether or not the external subscription was + being created by a historical data import. + default: false + ExternalSubscriptionCreate: + allOf: + - type: object + properties: + account: + "$ref": "#/components/schemas/AccountExternalSubscription" + external_product_reference: + "$ref": "#/components/schemas/ExternalProductReferenceCreate" + - "$ref": "#/components/schemas/ExternalSubscriptionBase" + required: + - external_id + - quantity + - activated_at + - expires_at + ExternalSubscriptionUpdate: + allOf: + - type: object + properties: + external_product_reference: + "$ref": "#/components/schemas/ExternalProductReferenceUpdate" + - "$ref": "#/components/schemas/ExternalSubscriptionBase" ExternalSubscriptionList: type: object properties: @@ -25282,6 +25581,86 @@ components: format: date-time title: Updated at description: When the external invoice was updated in Recurly. + ExternalPaymentPhaseBase: + type: object + properties: + started_at: + type: string + format: date-time + title: Started At + ends_at: + type: string + format: date-time + title: Ends At + starting_billing_period_index: + type: integer + title: Starting Billing Period Index + ending_billing_period_index: + type: integer + title: Ending Billing Period Index + offer_type: + type: string + title: Offer Type + description: Type of discount offer given, e.g. "FREE_TRIAL" + offer_name: + type: string + title: Offer Name + description: Name of the discount offer given, e.g. "introductory" + period_count: + type: integer + title: Period Count + description: Number of billing periods + period_length: + type: string + title: Period Length + description: Billing cycle length + amount: + type: string + format: decimal + title: Amount + minimum: 0 + description: Allows up to 9 decimal places + currency: + type: string + title: Currency + description: 3-letter ISO 4217 currency code. + maxLength: 3 + ExternalInvoiceCreate: + type: object + properties: + external_id: + type: string + description: An identifier which associates the external invoice to a corresponding + object in an external platform. + state: + "$ref": "#/components/schemas/ExternalInvoiceStateEnum" + total: + type: string + format: decimal + currency: + type: string + title: Currency + description: 3-letter ISO 4217 currency code. + maxLength: 3 + purchased_at: + type: string + format: date-time + description: When the invoice was created in the external platform. + line_items: + type: array + items: + "$ref": "#/components/schemas/ExternalChargeCreate" + external_payment_phase: + "$ref": "#/components/schemas/ExternalPaymentPhaseBase" + external_payment_phase_id: + type: string + description: External payment phase ID, e.g. `a34ypb2ef9w1`. + required: + - external_id + - state + - total + - currency + - purchased_at ExternalInvoiceList: type: object properties: @@ -25584,6 +25963,30 @@ components: format: date-time title: Last updated at readOnly: true + BusinessEntityMini: + type: object + description: Business entity details + properties: + id: + title: Business entity ID + type: string + maxLength: 13 + readOnly: true + object: + title: Object type + type: string + readOnly: true + code: + title: Business entity code + type: string + maxLength: 50 + description: The entity code of the business entity. + name: + type: string + title: Name + description: This name describes your business entity and will appear on + the invoice. + maxLength: 255 GiftCardList: type: object properties: @@ -26907,3 +27310,32 @@ components: enum: - destination - origin + TransactionMerchantReasonCodeEnum: + type: string + default: none + description: | + This conditional parameter is useful for merchants in specific industries who need to submit one-time Merchant Initiated transactions in specific cases. + Not all gateways support these methods, but will support a generic one-time Merchant Initiated transaction. + Only use this if the initiator value is "merchant". Otherwise, it will be ignored. + - Incremental: Send `incremental` with an additional purchase if the original authorization amount is not sufficient to cover the costs of your service or product. For example, if the customer adds goods or services or there are additional expenses. + - No Show: Send `no_show` if you charge customers a fee due to an agreed-upon cancellation policy in your industry. + - Resubmission: Send `resubmission` if you need to attempt collection on a declined transaction. You may also use the force collection behavior which has the same effect. + - Service Extension: Send `service_extension` if you are in a service industry and the customer has increased/extended their service in some way. For example: adding a day onto a car rental agreement. + - Split Shipment: Send `split_shipment` if you sell physical product and need to split up a shipment into multiple transactions when the customer is no longer in session. + - Top Up: Send `top_up` if you process one-time transactions based on a pre-arranged agreement with your customer where there is a pre-arranged account balance that needs maintaining. For example, if the customer has agreed to maintain an account balance of 30.00 and their current balance is 20.00, the MIT amount would be at least 10.00 to meet that 30.00 threshold. + enum: + - incremental + - no_show + - resubmission + - service_extension + - split_shipment + - top_up + TransactionIndicatorEnum: + type: string + description: Must be sent for one-time transactions in order to provide context + on which entity is submitting the transaction to ensure proper fraud checks + are observed, such as 3DS. If the customer is in session, send `customer`. + If this is a merchant initiated one-time transaction, send `merchant`. + enum: + - customer + - merchant diff --git a/src/main/java/com/recurly/v3/Client.java b/src/main/java/com/recurly/v3/Client.java index 98ec58b..19bffda 100644 --- a/src/main/java/com/recurly/v3/Client.java +++ b/src/main/java/com/recurly/v3/Client.java @@ -1537,7 +1537,22 @@ public ExternalProductReferenceMini deactivateExternalProductExternalProductRefe } /** - * List a site's external subscriptions + * Create an external subscription + * + * @see create_external_subscription api documentation + * @param body The body of the request. + * @return Returns the external subscription + */ + public ExternalSubscription createExternalSubscription(ExternalSubscriptionCreate body) { + final String url = "/external_subscriptions"; + final HashMap urlParams = new HashMap(); + final String path = this.interpolatePath(url, urlParams); + Type returnType = ExternalSubscription.class; + return this.makeRequest("POST", path, body, returnType); + } + + /** + * List the external subscriptions on a site * * @see list_external_subscriptions api documentation * @param queryParams The {@link QueryParams} for this endpoint. @@ -1569,6 +1584,39 @@ public ExternalSubscription getExternalSubscription(String externalSubscriptionI return this.makeRequest("GET", path, returnType); } + /** + * Update an external subscription + * + * @see put_external_subscription api documentation + * @param externalSubscriptionId External subscription id + * @return Settings for an external subscription. + */ + public ExternalSubscription putExternalSubscription(String externalSubscriptionId) { + final String url = "/external_subscriptions/{external_subscription_id}"; + final HashMap urlParams = new HashMap(); + urlParams.put("external_subscription_id", externalSubscriptionId); + final String path = this.interpolatePath(url, urlParams); + Type returnType = ExternalSubscription.class; + return this.makeRequest("PUT", path, returnType); + } + + /** + * Update an external subscription + * + * @see put_external_subscription api documentation + * @param externalSubscriptionId External subscription id + * @param body The body of the request. + * @return Settings for an external subscription. + */ + public ExternalSubscription putExternalSubscription(String externalSubscriptionId, ExternalSubscriptionUpdate body) { + final String url = "/external_subscriptions/{external_subscription_id}"; + final HashMap urlParams = new HashMap(); + urlParams.put("external_subscription_id", externalSubscriptionId); + final String path = this.interpolatePath(url, urlParams); + Type returnType = ExternalSubscription.class; + return this.makeRequest("PUT", path, body, returnType); + } + /** * List the external invoices on an external subscription * diff --git a/src/main/java/com/recurly/v3/Constants.java b/src/main/java/com/recurly/v3/Constants.java index dcfd713..5d57957 100644 --- a/src/main/java/com/recurly/v3/Constants.java +++ b/src/main/java/com/recurly/v3/Constants.java @@ -38,17 +38,6 @@ public enum ProrationSettingsCredit { }; - public enum ExternalProductReferenceConnectionType { - UNDEFINED, - - @SerializedName("apple_app_store") - APPLE_APP_STORE, - - @SerializedName("google_play_store") - GOOGLE_PLAY_STORE, - - }; - public enum RelatedType { UNDEFINED, @@ -2315,4 +2304,38 @@ public enum DestinationTaxAddressSource { }; + public enum TransactionMerchantReasonCode { + UNDEFINED, + + @SerializedName("incremental") + INCREMENTAL, + + @SerializedName("no_show") + NO_SHOW, + + @SerializedName("resubmission") + RESUBMISSION, + + @SerializedName("service_extension") + SERVICE_EXTENSION, + + @SerializedName("split_shipment") + SPLIT_SHIPMENT, + + @SerializedName("top_up") + TOP_UP, + + }; + + public enum TransactionIndicator { + UNDEFINED, + + @SerializedName("customer") + CUSTOMER, + + @SerializedName("merchant") + MERCHANT, + + }; + } diff --git a/src/main/java/com/recurly/v3/requests/AccountExternalSubscription.java b/src/main/java/com/recurly/v3/requests/AccountExternalSubscription.java new file mode 100644 index 0000000..da29b75 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/AccountExternalSubscription.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.requests; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import com.recurly.v3.Request; +import com.recurly.v3.resources.*; + +public class AccountExternalSubscription extends Request { + + /** + * The account code of a new or existing account to be used when creating the external + * subscription. + */ + @SerializedName("account_code") + @Expose + private String accountCode; + + /** + * The account code of a new or existing account to be used when creating the external + * subscription. + */ + public String getAccountCode() { + return this.accountCode; + } + + /** + * @param accountCode The account code of a new or existing account to be used when creating the + * external subscription. + */ + public void setAccountCode(final String accountCode) { + this.accountCode = accountCode; + } +} diff --git a/src/main/java/com/recurly/v3/requests/ExternalAccountCreate.java b/src/main/java/com/recurly/v3/requests/ExternalAccountCreate.java index 3dfdf65..428004d 100644 --- a/src/main/java/com/recurly/v3/requests/ExternalAccountCreate.java +++ b/src/main/java/com/recurly/v3/requests/ExternalAccountCreate.java @@ -17,7 +17,7 @@ public class ExternalAccountCreate extends Request { @Expose private String externalAccountCode; - /** Represents the connection type. `AppleAppStore` or `GooglePlayStore` */ + /** Represents the connection type. One of the connection types of your enabled App Connectors */ @SerializedName("external_connection_type") @Expose private String externalConnectionType; @@ -32,14 +32,14 @@ public void setExternalAccountCode(final String externalAccountCode) { this.externalAccountCode = externalAccountCode; } - /** Represents the connection type. `AppleAppStore` or `GooglePlayStore` */ + /** Represents the connection type. One of the connection types of your enabled App Connectors */ public String getExternalConnectionType() { return this.externalConnectionType; } /** - * @param externalConnectionType Represents the connection type. `AppleAppStore` or - * `GooglePlayStore` + * @param externalConnectionType Represents the connection type. One of the connection types of + * your enabled App Connectors */ public void setExternalConnectionType(final String externalConnectionType) { this.externalConnectionType = externalConnectionType; diff --git a/src/main/java/com/recurly/v3/requests/ExternalAccountUpdate.java b/src/main/java/com/recurly/v3/requests/ExternalAccountUpdate.java index f5dbcb9..70601bd 100644 --- a/src/main/java/com/recurly/v3/requests/ExternalAccountUpdate.java +++ b/src/main/java/com/recurly/v3/requests/ExternalAccountUpdate.java @@ -17,7 +17,7 @@ public class ExternalAccountUpdate extends Request { @Expose private String externalAccountCode; - /** Represents the connection type. `AppleAppStore` or `GooglePlayStore` */ + /** Represents the connection type. One of the connection types of your enabled App Connectors */ @SerializedName("external_connection_type") @Expose private String externalConnectionType; @@ -32,14 +32,14 @@ public void setExternalAccountCode(final String externalAccountCode) { this.externalAccountCode = externalAccountCode; } - /** Represents the connection type. `AppleAppStore` or `GooglePlayStore` */ + /** Represents the connection type. One of the connection types of your enabled App Connectors */ public String getExternalConnectionType() { return this.externalConnectionType; } /** - * @param externalConnectionType Represents the connection type. `AppleAppStore` or - * `GooglePlayStore` + * @param externalConnectionType Represents the connection type. One of the connection types of + * your enabled App Connectors */ public void setExternalConnectionType(final String externalConnectionType) { this.externalConnectionType = externalConnectionType; diff --git a/src/main/java/com/recurly/v3/requests/ExternalProductReferenceBase.java b/src/main/java/com/recurly/v3/requests/ExternalProductReferenceBase.java index d55b2ec..21128d1 100644 --- a/src/main/java/com/recurly/v3/requests/ExternalProductReferenceBase.java +++ b/src/main/java/com/recurly/v3/requests/ExternalProductReferenceBase.java @@ -7,15 +7,15 @@ import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; -import com.recurly.v3.Constants; import com.recurly.v3.Request; import com.recurly.v3.resources.*; public class ExternalProductReferenceBase extends Request { + /** Represents the connection type. One of the connection types of your enabled App Connectors */ @SerializedName("external_connection_type") @Expose - private Constants.ExternalProductReferenceConnectionType externalConnectionType; + private ExternalProductReferenceConnectionType externalConnectionType; /** * A code which associates the external product to a corresponding object or resource in an @@ -25,13 +25,17 @@ public class ExternalProductReferenceBase extends Request { @Expose private String referenceCode; - public Constants.ExternalProductReferenceConnectionType getExternalConnectionType() { + /** Represents the connection type. One of the connection types of your enabled App Connectors */ + public ExternalProductReferenceConnectionType getExternalConnectionType() { return this.externalConnectionType; } - /** @param externalConnectionType */ + /** + * @param externalConnectionType Represents the connection type. One of the connection types of + * your enabled App Connectors + */ public void setExternalConnectionType( - final Constants.ExternalProductReferenceConnectionType externalConnectionType) { + final ExternalProductReferenceConnectionType externalConnectionType) { this.externalConnectionType = externalConnectionType; } diff --git a/src/main/java/com/recurly/v3/requests/ExternalProductReferenceConnectionType.java b/src/main/java/com/recurly/v3/requests/ExternalProductReferenceConnectionType.java new file mode 100644 index 0000000..3894270 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/ExternalProductReferenceConnectionType.java @@ -0,0 +1,11 @@ +/** + * 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.requests; + +import com.recurly.v3.Request; +import com.recurly.v3.resources.*; + +public class ExternalProductReferenceConnectionType extends Request {} diff --git a/src/main/java/com/recurly/v3/requests/ExternalProductReferenceCreate.java b/src/main/java/com/recurly/v3/requests/ExternalProductReferenceCreate.java index fa78443..c764f7e 100644 --- a/src/main/java/com/recurly/v3/requests/ExternalProductReferenceCreate.java +++ b/src/main/java/com/recurly/v3/requests/ExternalProductReferenceCreate.java @@ -7,15 +7,15 @@ import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; -import com.recurly.v3.Constants; import com.recurly.v3.Request; import com.recurly.v3.resources.*; public class ExternalProductReferenceCreate extends Request { + /** Represents the connection type. One of the connection types of your enabled App Connectors */ @SerializedName("external_connection_type") @Expose - private Constants.ExternalProductReferenceConnectionType externalConnectionType; + private ExternalProductReferenceConnectionType externalConnectionType; /** * A code which associates the external product to a corresponding object or resource in an @@ -25,13 +25,17 @@ public class ExternalProductReferenceCreate extends Request { @Expose private String referenceCode; - public Constants.ExternalProductReferenceConnectionType getExternalConnectionType() { + /** Represents the connection type. One of the connection types of your enabled App Connectors */ + public ExternalProductReferenceConnectionType getExternalConnectionType() { return this.externalConnectionType; } - /** @param externalConnectionType */ + /** + * @param externalConnectionType Represents the connection type. One of the connection types of + * your enabled App Connectors + */ public void setExternalConnectionType( - final Constants.ExternalProductReferenceConnectionType externalConnectionType) { + final ExternalProductReferenceConnectionType externalConnectionType) { this.externalConnectionType = externalConnectionType; } diff --git a/src/main/java/com/recurly/v3/requests/ExternalProductReferenceUpdate.java b/src/main/java/com/recurly/v3/requests/ExternalProductReferenceUpdate.java new file mode 100644 index 0000000..56a9a0c --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/ExternalProductReferenceUpdate.java @@ -0,0 +1,57 @@ +/** + * 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.requests; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import com.recurly.v3.Request; +import com.recurly.v3.resources.*; + +public class ExternalProductReferenceUpdate extends Request { + + /** Represents the connection type. One of the connection types of your enabled App Connectors */ + @SerializedName("external_connection_type") + @Expose + private ExternalProductReferenceConnectionType externalConnectionType; + + /** + * A code which associates the external product to a corresponding object or resource in an + * external platform like the Apple App Store or Google Play Store. + */ + @SerializedName("reference_code") + @Expose + private String referenceCode; + + /** Represents the connection type. One of the connection types of your enabled App Connectors */ + public ExternalProductReferenceConnectionType getExternalConnectionType() { + return this.externalConnectionType; + } + + /** + * @param externalConnectionType Represents the connection type. One of the connection types of + * your enabled App Connectors + */ + public void setExternalConnectionType( + final ExternalProductReferenceConnectionType externalConnectionType) { + this.externalConnectionType = externalConnectionType; + } + + /** + * A code which associates the external product to a corresponding object or resource in an + * external platform like the Apple App Store or Google Play Store. + */ + public String getReferenceCode() { + return this.referenceCode; + } + + /** + * @param referenceCode A code which associates the external product to a corresponding object or + * resource in an external platform like the Apple App Store or Google Play Store. + */ + public void setReferenceCode(final String referenceCode) { + this.referenceCode = referenceCode; + } +} diff --git a/src/main/java/com/recurly/v3/requests/ExternalSubscriptionCreate.java b/src/main/java/com/recurly/v3/requests/ExternalSubscriptionCreate.java new file mode 100644 index 0000000..682c81b --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/ExternalSubscriptionCreate.java @@ -0,0 +1,249 @@ +/** + * 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.requests; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import com.recurly.v3.Request; +import com.recurly.v3.resources.*; +import org.joda.time.DateTime; + +public class ExternalSubscriptionCreate extends Request { + + @SerializedName("account") + @Expose + private AccountExternalSubscription account; + + /** When the external subscription was activated in the external platform. */ + @SerializedName("activated_at") + @Expose + private DateTime activatedAt; + + /** Identifier of the app that generated the external subscription. */ + @SerializedName("app_identifier") + @Expose + private String appIdentifier; + + /** + * An indication of whether or not the external subscription will auto-renew at the expiration + * date. + */ + @SerializedName("auto_renew") + @Expose + private Boolean autoRenew; + + /** When the external subscription expires in the external platform. */ + @SerializedName("expires_at") + @Expose + private DateTime expiresAt; + + /** Id of the subscription in the external system, i.e. Apple App Store or Google Play Store. */ + @SerializedName("external_id") + @Expose + private String externalId; + + @SerializedName("external_product_reference") + @Expose + private ExternalProductReferenceCreate externalProductReference; + + /** + * An indication of whether or not the external subscription was being created by a historical + * data import. + */ + @SerializedName("imported") + @Expose + private Boolean imported; + + /** + * When a new billing event occurred on the external subscription in conjunction with a recent + * billing period, reactivation or upgrade/downgrade. + */ + @SerializedName("last_purchased") + @Expose + private DateTime lastPurchased; + + /** An indication of the quantity of a subscribed item's quantity. */ + @SerializedName("quantity") + @Expose + private Integer quantity; + + /** + * External subscriptions can be active, canceled, expired, past_due, voided, revoked, or paused. + */ + @SerializedName("state") + @Expose + private String state; + + /** When the external subscription trial period ends in the external platform. */ + @SerializedName("trial_ends_at") + @Expose + private DateTime trialEndsAt; + + /** When the external subscription trial period started in the external platform. */ + @SerializedName("trial_started_at") + @Expose + private DateTime trialStartedAt; + + public AccountExternalSubscription getAccount() { + return this.account; + } + + /** @param account */ + public void setAccount(final AccountExternalSubscription account) { + this.account = account; + } + + /** When the external subscription was activated in the external platform. */ + public DateTime getActivatedAt() { + return this.activatedAt; + } + + /** @param activatedAt When the external subscription was activated in the external platform. */ + public void setActivatedAt(final DateTime activatedAt) { + this.activatedAt = activatedAt; + } + + /** Identifier of the app that generated the external subscription. */ + public String getAppIdentifier() { + return this.appIdentifier; + } + + /** @param appIdentifier Identifier of the app that generated the external subscription. */ + public void setAppIdentifier(final String appIdentifier) { + this.appIdentifier = appIdentifier; + } + + /** + * An indication of whether or not the external subscription will auto-renew at the expiration + * date. + */ + public Boolean getAutoRenew() { + return this.autoRenew; + } + + /** + * @param autoRenew An indication of whether or not the external subscription will auto-renew at + * the expiration date. + */ + public void setAutoRenew(final Boolean autoRenew) { + this.autoRenew = autoRenew; + } + + /** When the external subscription expires in the external platform. */ + public DateTime getExpiresAt() { + return this.expiresAt; + } + + /** @param expiresAt When the external subscription expires in the external platform. */ + public void setExpiresAt(final DateTime expiresAt) { + this.expiresAt = expiresAt; + } + + /** Id of the subscription in the external system, i.e. Apple App Store or Google Play Store. */ + public String getExternalId() { + return this.externalId; + } + + /** + * @param externalId Id of the subscription in the external system, i.e. Apple App Store or Google + * Play Store. + */ + public void setExternalId(final String externalId) { + this.externalId = externalId; + } + + public ExternalProductReferenceCreate getExternalProductReference() { + return this.externalProductReference; + } + + /** @param externalProductReference */ + public void setExternalProductReference( + final ExternalProductReferenceCreate externalProductReference) { + this.externalProductReference = externalProductReference; + } + + /** + * An indication of whether or not the external subscription was being created by a historical + * data import. + */ + public Boolean getImported() { + return this.imported; + } + + /** + * @param imported An indication of whether or not the external subscription was being created by + * a historical data import. + */ + public void setImported(final Boolean imported) { + this.imported = imported; + } + + /** + * When a new billing event occurred on the external subscription in conjunction with a recent + * billing period, reactivation or upgrade/downgrade. + */ + public DateTime getLastPurchased() { + return this.lastPurchased; + } + + /** + * @param lastPurchased When a new billing event occurred on the external subscription in + * conjunction with a recent billing period, reactivation or upgrade/downgrade. + */ + public void setLastPurchased(final DateTime lastPurchased) { + this.lastPurchased = lastPurchased; + } + + /** An indication of the quantity of a subscribed item's quantity. */ + public Integer getQuantity() { + return this.quantity; + } + + /** @param quantity An indication of the quantity of a subscribed item's quantity. */ + public void setQuantity(final Integer quantity) { + this.quantity = quantity; + } + + /** + * External subscriptions can be active, canceled, expired, past_due, voided, revoked, or paused. + */ + public String getState() { + return this.state; + } + + /** + * @param state External subscriptions can be active, canceled, expired, past_due, voided, + * revoked, or paused. + */ + public void setState(final String state) { + this.state = state; + } + + /** When the external subscription trial period ends in the external platform. */ + public DateTime getTrialEndsAt() { + return this.trialEndsAt; + } + + /** + * @param trialEndsAt When the external subscription trial period ends in the external platform. + */ + public void setTrialEndsAt(final DateTime trialEndsAt) { + this.trialEndsAt = trialEndsAt; + } + + /** When the external subscription trial period started in the external platform. */ + public DateTime getTrialStartedAt() { + return this.trialStartedAt; + } + + /** + * @param trialStartedAt When the external subscription trial period started in the external + * platform. + */ + public void setTrialStartedAt(final DateTime trialStartedAt) { + this.trialStartedAt = trialStartedAt; + } +} diff --git a/src/main/java/com/recurly/v3/requests/ExternalSubscriptionUpdate.java b/src/main/java/com/recurly/v3/requests/ExternalSubscriptionUpdate.java new file mode 100644 index 0000000..9625bd8 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/ExternalSubscriptionUpdate.java @@ -0,0 +1,236 @@ +/** + * 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.requests; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import com.recurly.v3.Request; +import com.recurly.v3.resources.*; +import org.joda.time.DateTime; + +public class ExternalSubscriptionUpdate extends Request { + + /** When the external subscription was activated in the external platform. */ + @SerializedName("activated_at") + @Expose + private DateTime activatedAt; + + /** Identifier of the app that generated the external subscription. */ + @SerializedName("app_identifier") + @Expose + private String appIdentifier; + + /** + * An indication of whether or not the external subscription will auto-renew at the expiration + * date. + */ + @SerializedName("auto_renew") + @Expose + private Boolean autoRenew; + + /** When the external subscription expires in the external platform. */ + @SerializedName("expires_at") + @Expose + private DateTime expiresAt; + + /** Id of the subscription in the external system, i.e. Apple App Store or Google Play Store. */ + @SerializedName("external_id") + @Expose + private String externalId; + + @SerializedName("external_product_reference") + @Expose + private ExternalProductReferenceUpdate externalProductReference; + + /** + * An indication of whether or not the external subscription was being created by a historical + * data import. + */ + @SerializedName("imported") + @Expose + private Boolean imported; + + /** + * When a new billing event occurred on the external subscription in conjunction with a recent + * billing period, reactivation or upgrade/downgrade. + */ + @SerializedName("last_purchased") + @Expose + private DateTime lastPurchased; + + /** An indication of the quantity of a subscribed item's quantity. */ + @SerializedName("quantity") + @Expose + private Integer quantity; + + /** + * External subscriptions can be active, canceled, expired, past_due, voided, revoked, or paused. + */ + @SerializedName("state") + @Expose + private String state; + + /** When the external subscription trial period ends in the external platform. */ + @SerializedName("trial_ends_at") + @Expose + private DateTime trialEndsAt; + + /** When the external subscription trial period started in the external platform. */ + @SerializedName("trial_started_at") + @Expose + private DateTime trialStartedAt; + + /** When the external subscription was activated in the external platform. */ + public DateTime getActivatedAt() { + return this.activatedAt; + } + + /** @param activatedAt When the external subscription was activated in the external platform. */ + public void setActivatedAt(final DateTime activatedAt) { + this.activatedAt = activatedAt; + } + + /** Identifier of the app that generated the external subscription. */ + public String getAppIdentifier() { + return this.appIdentifier; + } + + /** @param appIdentifier Identifier of the app that generated the external subscription. */ + public void setAppIdentifier(final String appIdentifier) { + this.appIdentifier = appIdentifier; + } + + /** + * An indication of whether or not the external subscription will auto-renew at the expiration + * date. + */ + public Boolean getAutoRenew() { + return this.autoRenew; + } + + /** + * @param autoRenew An indication of whether or not the external subscription will auto-renew at + * the expiration date. + */ + public void setAutoRenew(final Boolean autoRenew) { + this.autoRenew = autoRenew; + } + + /** When the external subscription expires in the external platform. */ + public DateTime getExpiresAt() { + return this.expiresAt; + } + + /** @param expiresAt When the external subscription expires in the external platform. */ + public void setExpiresAt(final DateTime expiresAt) { + this.expiresAt = expiresAt; + } + + /** Id of the subscription in the external system, i.e. Apple App Store or Google Play Store. */ + public String getExternalId() { + return this.externalId; + } + + /** + * @param externalId Id of the subscription in the external system, i.e. Apple App Store or Google + * Play Store. + */ + public void setExternalId(final String externalId) { + this.externalId = externalId; + } + + public ExternalProductReferenceUpdate getExternalProductReference() { + return this.externalProductReference; + } + + /** @param externalProductReference */ + public void setExternalProductReference( + final ExternalProductReferenceUpdate externalProductReference) { + this.externalProductReference = externalProductReference; + } + + /** + * An indication of whether or not the external subscription was being created by a historical + * data import. + */ + public Boolean getImported() { + return this.imported; + } + + /** + * @param imported An indication of whether or not the external subscription was being created by + * a historical data import. + */ + public void setImported(final Boolean imported) { + this.imported = imported; + } + + /** + * When a new billing event occurred on the external subscription in conjunction with a recent + * billing period, reactivation or upgrade/downgrade. + */ + public DateTime getLastPurchased() { + return this.lastPurchased; + } + + /** + * @param lastPurchased When a new billing event occurred on the external subscription in + * conjunction with a recent billing period, reactivation or upgrade/downgrade. + */ + public void setLastPurchased(final DateTime lastPurchased) { + this.lastPurchased = lastPurchased; + } + + /** An indication of the quantity of a subscribed item's quantity. */ + public Integer getQuantity() { + return this.quantity; + } + + /** @param quantity An indication of the quantity of a subscribed item's quantity. */ + public void setQuantity(final Integer quantity) { + this.quantity = quantity; + } + + /** + * External subscriptions can be active, canceled, expired, past_due, voided, revoked, or paused. + */ + public String getState() { + return this.state; + } + + /** + * @param state External subscriptions can be active, canceled, expired, past_due, voided, + * revoked, or paused. + */ + public void setState(final String state) { + this.state = state; + } + + /** When the external subscription trial period ends in the external platform. */ + public DateTime getTrialEndsAt() { + return this.trialEndsAt; + } + + /** + * @param trialEndsAt When the external subscription trial period ends in the external platform. + */ + public void setTrialEndsAt(final DateTime trialEndsAt) { + this.trialEndsAt = trialEndsAt; + } + + /** When the external subscription trial period started in the external platform. */ + public DateTime getTrialStartedAt() { + return this.trialStartedAt; + } + + /** + * @param trialStartedAt When the external subscription trial period started in the external + * platform. + */ + public void setTrialStartedAt(final DateTime trialStartedAt) { + this.trialStartedAt = trialStartedAt; + } +} diff --git a/src/main/java/com/recurly/v3/requests/InvoiceCreate.java b/src/main/java/com/recurly/v3/requests/InvoiceCreate.java index a90652e..c77844c 100644 --- a/src/main/java/com/recurly/v3/requests/InvoiceCreate.java +++ b/src/main/java/com/recurly/v3/requests/InvoiceCreate.java @@ -13,6 +13,26 @@ public class InvoiceCreate extends Request { + /** + * The `business_entity_code` is the value that represents a specific business entity for an end + * customer which will be assigned to the invoice. Available when the `Multiple Business Entities` + * feature is enabled. If both `business_entity_id` and `business_entity_code` are present, + * `business_entity_id` will be used. + */ + @SerializedName("business_entity_code") + @Expose + private String businessEntityCode; + + /** + * The `business_entity_id` is the value that represents a specific business entity for an end + * customer which will be assigned to the invoice. Available when the `Multiple Business Entities` + * feature is enabled. If both `business_entity_id` and `business_entity_code` are present, + * `business_entity_id` will be used. + */ + @SerializedName("business_entity_id") + @Expose + private String businessEntityId; + /** * This will default to the Customer Notes text specified on the Invoice Settings for charge * invoices. Specify custom notes to add or override Customer Notes on charge invoices. @@ -105,6 +125,46 @@ public class InvoiceCreate extends Request { @Expose private String vatReverseChargeNotes; + /** + * The `business_entity_code` is the value that represents a specific business entity for an end + * customer which will be assigned to the invoice. Available when the `Multiple Business Entities` + * feature is enabled. If both `business_entity_id` and `business_entity_code` are present, + * `business_entity_id` will be used. + */ + public String getBusinessEntityCode() { + return this.businessEntityCode; + } + + /** + * @param businessEntityCode The `business_entity_code` is the value that represents a specific + * business entity for an end customer which will be assigned to the invoice. Available when + * the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and + * `business_entity_code` are present, `business_entity_id` will be used. + */ + public void setBusinessEntityCode(final String businessEntityCode) { + this.businessEntityCode = businessEntityCode; + } + + /** + * The `business_entity_id` is the value that represents a specific business entity for an end + * customer which will be assigned to the invoice. Available when the `Multiple Business Entities` + * feature is enabled. If both `business_entity_id` and `business_entity_code` are present, + * `business_entity_id` will be used. + */ + public String getBusinessEntityId() { + return this.businessEntityId; + } + + /** + * @param businessEntityId The `business_entity_id` is the value that represents a specific + * business entity for an end customer which will be assigned to the invoice. Available when + * the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and + * `business_entity_code` are present, `business_entity_id` will be used. + */ + public void setBusinessEntityId(final String businessEntityId) { + this.businessEntityId = businessEntityId; + } + /** * This will default to the Customer Notes text specified on the Invoice Settings for charge * invoices. Specify custom notes to add or override Customer Notes on charge invoices. diff --git a/src/main/java/com/recurly/v3/requests/PurchaseCreate.java b/src/main/java/com/recurly/v3/requests/PurchaseCreate.java index 9b6460e..72e1f0e 100644 --- a/src/main/java/com/recurly/v3/requests/PurchaseCreate.java +++ b/src/main/java/com/recurly/v3/requests/PurchaseCreate.java @@ -11,6 +11,7 @@ import com.recurly.v3.Request; import com.recurly.v3.resources.*; import java.util.List; +import java.util.Map; public class PurchaseCreate extends Request { @@ -28,6 +29,28 @@ public class PurchaseCreate extends Request { @Expose private String billingInfoId; + /** + * The `business_entity_code` is the value that represents a specific business entity for an end + * customer. When `business_entity_code` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + */ + @SerializedName("business_entity_code") + @Expose + private String businessEntityCode; + + /** + * The `business_entity_id` is the value that represents a specific business entity for an end + * customer. When `business_entity_id` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + */ + @SerializedName("business_entity_id") + @Expose + private String businessEntityId; + /** * Must be set to manual in order to preview a purchase for an Account that does not have payment * information associated with the Billing Info. @@ -129,6 +152,14 @@ public class PurchaseCreate extends Request { @Expose private String termsAndConditions; + /** + * (Transaction Data, Card on File) - Options for flagging transactions as Customer or Merchant + * Initiated Unscheduled. + */ + @SerializedName("transaction") + @Expose + private Map transaction; + /** * An optional type designation for the payment gateway transaction created by this request. * Supports 'moto' value, which is the acronym for mail order and telephone transactions. @@ -171,6 +202,52 @@ public void setBillingInfoId(final String billingInfoId) { this.billingInfoId = billingInfoId; } + /** + * The `business_entity_code` is the value that represents a specific business entity for an end + * customer. When `business_entity_code` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + */ + public String getBusinessEntityCode() { + return this.businessEntityCode; + } + + /** + * @param businessEntityCode The `business_entity_code` is the value that represents a specific + * business entity for an end customer. When `business_entity_code` is used to assign a + * business entity to the subscription, all future billing events for the subscription will + * bill to the specified business entity. Available when the `Multiple Business Entities` + * feature is enabled. If both `business_entity_id` and `business_entity_code` are present, + * `business_entity_id` will be used. + */ + public void setBusinessEntityCode(final String businessEntityCode) { + this.businessEntityCode = businessEntityCode; + } + + /** + * The `business_entity_id` is the value that represents a specific business entity for an end + * customer. When `business_entity_id` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + */ + public String getBusinessEntityId() { + return this.businessEntityId; + } + + /** + * @param businessEntityId The `business_entity_id` is the value that represents a specific + * business entity for an end customer. When `business_entity_id` is used to assign a business + * entity to the subscription, all future billing events for the subscription will bill to the + * specified business entity. Available when the `Multiple Business Entities` feature is + * enabled. If both `business_entity_id` and `business_entity_code` are present, + * `business_entity_id` will be used. + */ + public void setBusinessEntityId(final String businessEntityId) { + this.businessEntityId = businessEntityId; + } + /** * Must be set to manual in order to preview a purchase for an Account that does not have payment * information associated with the Billing Info. @@ -384,6 +461,22 @@ public void setTermsAndConditions(final String termsAndConditions) { this.termsAndConditions = termsAndConditions; } + /** + * (Transaction Data, Card on File) - Options for flagging transactions as Customer or Merchant + * Initiated Unscheduled. + */ + public Map getTransaction() { + return this.transaction; + } + + /** + * @param transaction (Transaction Data, Card on File) - Options for flagging transactions as + * Customer or Merchant Initiated Unscheduled. + */ + public void setTransaction(final Map transaction) { + this.transaction = transaction; + } + /** * An optional type designation for the payment gateway transaction created by this request. * Supports 'moto' value, which is the acronym for mail order and telephone transactions. diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionChangeCreate.java b/src/main/java/com/recurly/v3/requests/SubscriptionChangeCreate.java index a59b029..c62af61 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionChangeCreate.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionChangeCreate.java @@ -39,6 +39,30 @@ public class SubscriptionChangeCreate extends Request { @Expose private SubscriptionChangeBillingInfoCreate billingInfo; + /** + * The `business_entity_code` is the value that represents a specific business entity for an end + * customer. When `business_entity_code` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + * Only allowed if the `timeframe` is not `now`. + */ + @SerializedName("business_entity_code") + @Expose + private String businessEntityCode; + + /** + * The `business_entity_id` is the value that represents a specific business entity for an end + * customer. When `business_entity_id` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + * Only allowed if the `timeframe` is not `now`. + */ + @SerializedName("business_entity_id") + @Expose + private String businessEntityId; + /** Collection method */ @SerializedName("collection_method") @Expose @@ -218,6 +242,54 @@ public void setBillingInfo(final SubscriptionChangeBillingInfoCreate billingInfo this.billingInfo = billingInfo; } + /** + * The `business_entity_code` is the value that represents a specific business entity for an end + * customer. When `business_entity_code` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + * Only allowed if the `timeframe` is not `now`. + */ + public String getBusinessEntityCode() { + return this.businessEntityCode; + } + + /** + * @param businessEntityCode The `business_entity_code` is the value that represents a specific + * business entity for an end customer. When `business_entity_code` is used to assign a + * business entity to the subscription, all future billing events for the subscription will + * bill to the specified business entity. Available when the `Multiple Business Entities` + * feature is enabled. If both `business_entity_id` and `business_entity_code` are present, + * `business_entity_id` will be used. Only allowed if the `timeframe` is not `now`. + */ + public void setBusinessEntityCode(final String businessEntityCode) { + this.businessEntityCode = businessEntityCode; + } + + /** + * The `business_entity_id` is the value that represents a specific business entity for an end + * customer. When `business_entity_id` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + * Only allowed if the `timeframe` is not `now`. + */ + public String getBusinessEntityId() { + return this.businessEntityId; + } + + /** + * @param businessEntityId The `business_entity_id` is the value that represents a specific + * business entity for an end customer. When `business_entity_id` is used to assign a business + * entity to the subscription, all future billing events for the subscription will bill to the + * specified business entity. Available when the `Multiple Business Entities` feature is + * enabled. If both `business_entity_id` and `business_entity_code` are present, + * `business_entity_id` will be used. Only allowed if the `timeframe` is not `now`. + */ + public void setBusinessEntityId(final String businessEntityId) { + this.businessEntityId = businessEntityId; + } + /** Collection method */ public Constants.CollectionMethod getCollectionMethod() { return this.collectionMethod; diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java b/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java index 4508dbb..1766934 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java @@ -48,6 +48,28 @@ public class SubscriptionCreate extends Request { @Expose private Boolean bulk; + /** + * The `business_entity_code` is the value that represents a specific business entity for an end + * customer. When `business_entity_code` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + */ + @SerializedName("business_entity_code") + @Expose + private String businessEntityCode; + + /** + * The `business_entity_id` is the value that represents a specific business entity for an end + * customer. When `business_entity_id` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + */ + @SerializedName("business_entity_id") + @Expose + private String businessEntityId; + /** Collection method */ @SerializedName("collection_method") @Expose @@ -322,6 +344,52 @@ public void setBulk(final Boolean bulk) { this.bulk = bulk; } + /** + * The `business_entity_code` is the value that represents a specific business entity for an end + * customer. When `business_entity_code` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + */ + public String getBusinessEntityCode() { + return this.businessEntityCode; + } + + /** + * @param businessEntityCode The `business_entity_code` is the value that represents a specific + * business entity for an end customer. When `business_entity_code` is used to assign a + * business entity to the subscription, all future billing events for the subscription will + * bill to the specified business entity. Available when the `Multiple Business Entities` + * feature is enabled. If both `business_entity_id` and `business_entity_code` are present, + * `business_entity_id` will be used. + */ + public void setBusinessEntityCode(final String businessEntityCode) { + this.businessEntityCode = businessEntityCode; + } + + /** + * The `business_entity_id` is the value that represents a specific business entity for an end + * customer. When `business_entity_id` is used to assign a business entity to the subscription, + * all future billing events for the subscription will bill to the specified business entity. + * Available when the `Multiple Business Entities` feature is enabled. If both + * `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. + */ + public String getBusinessEntityId() { + return this.businessEntityId; + } + + /** + * @param businessEntityId The `business_entity_id` is the value that represents a specific + * business entity for an end customer. When `business_entity_id` is used to assign a business + * entity to the subscription, all future billing events for the subscription will bill to the + * specified business entity. Available when the `Multiple Business Entities` feature is + * enabled. If both `business_entity_id` and `business_entity_code` are present, + * `business_entity_id` will be used. + */ + public void setBusinessEntityId(final String businessEntityId) { + this.businessEntityId = businessEntityId; + } + /** Collection method */ public Constants.CollectionMethod getCollectionMethod() { return this.collectionMethod; diff --git a/src/main/java/com/recurly/v3/resources/BusinessEntityMini.java b/src/main/java/com/recurly/v3/resources/BusinessEntityMini.java new file mode 100644 index 0000000..b308993 --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/BusinessEntityMini.java @@ -0,0 +1,73 @@ +/** + * 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.resources; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import com.recurly.v3.Resource; + +public class BusinessEntityMini extends Resource { + + /** The entity code of the business entity. */ + @SerializedName("code") + @Expose + private String code; + + /** Business entity ID */ + @SerializedName("id") + @Expose + private String id; + + /** This name describes your business entity and will appear on the invoice. */ + @SerializedName("name") + @Expose + private String name; + + /** Object type */ + @SerializedName("object") + @Expose + private String object; + + /** The entity code of the business entity. */ + public String getCode() { + return this.code; + } + + /** @param code The entity code of the business entity. */ + public void setCode(final String code) { + this.code = code; + } + + /** Business entity ID */ + public String getId() { + return this.id; + } + + /** @param id Business entity ID */ + public void setId(final String id) { + this.id = id; + } + + /** This name describes your business entity and will appear on the invoice. */ + public String getName() { + return this.name; + } + + /** @param name This name describes your business entity and will appear on the invoice. */ + public void setName(final String name) { + this.name = name; + } + + /** Object type */ + public String getObject() { + return this.object; + } + + /** @param object Object type */ + public void setObject(final String object) { + this.object = object; + } +} diff --git a/src/main/java/com/recurly/v3/resources/Subscription.java b/src/main/java/com/recurly/v3/resources/Subscription.java index 5eb16b1..277441f 100644 --- a/src/main/java/com/recurly/v3/resources/Subscription.java +++ b/src/main/java/com/recurly/v3/resources/Subscription.java @@ -68,6 +68,14 @@ public class Subscription extends Resource { @Expose private String billingInfoId; + /** + * The ID of the business entity associated with the subscription. This will be `null` if the + * subscription relies on resolving the business entity during renewal. + */ + @SerializedName("business_entity_id") + @Expose + private String businessEntityId; + /** Canceled at */ @SerializedName("canceled_at") @Expose @@ -444,6 +452,22 @@ public void setBillingInfoId(final String billingInfoId) { this.billingInfoId = billingInfoId; } + /** + * The ID of the business entity associated with the subscription. This will be `null` if the + * subscription relies on resolving the business entity during renewal. + */ + public String getBusinessEntityId() { + return this.businessEntityId; + } + + /** + * @param businessEntityId The ID of the business entity associated with the subscription. This + * will be `null` if the subscription relies on resolving the business entity during renewal. + */ + public void setBusinessEntityId(final String businessEntityId) { + this.businessEntityId = businessEntityId; + } + /** Canceled at */ public DateTime getCanceledAt() { return this.canceledAt; diff --git a/src/main/java/com/recurly/v3/resources/SubscriptionChange.java b/src/main/java/com/recurly/v3/resources/SubscriptionChange.java index 78c9be5..eab1d8b 100644 --- a/src/main/java/com/recurly/v3/resources/SubscriptionChange.java +++ b/src/main/java/com/recurly/v3/resources/SubscriptionChange.java @@ -35,6 +35,11 @@ public class SubscriptionChange extends Resource { @Expose private SubscriptionChangeBillingInfo billingInfo; + /** Business entity details */ + @SerializedName("business_entity") + @Expose + private BusinessEntityMini businessEntity; + /** Created at */ @SerializedName("created_at") @Expose @@ -154,6 +159,16 @@ public void setBillingInfo(final SubscriptionChangeBillingInfo billingInfo) { this.billingInfo = billingInfo; } + /** Business entity details */ + public BusinessEntityMini getBusinessEntity() { + return this.businessEntity; + } + + /** @param businessEntity Business entity details */ + public void setBusinessEntity(final BusinessEntityMini businessEntity) { + this.businessEntity = businessEntity; + } + /** Created at */ public DateTime getCreatedAt() { return this.createdAt; diff --git a/src/main/java/com/recurly/v3/resources/Transaction.java b/src/main/java/com/recurly/v3/resources/Transaction.java index adf3120..8a8cb33 100644 --- a/src/main/java/com/recurly/v3/resources/Transaction.java +++ b/src/main/java/com/recurly/v3/resources/Transaction.java @@ -123,6 +123,16 @@ public class Transaction extends Resource { @Expose private String id; + /** + * Must be sent for one-time transactions in order to provide context on which entity is + * submitting the transaction to ensure proper fraud checks are observed, such as 3DS. If the + * customer is in session, send `customer`. If this is a merchant initiated one-time transaction, + * send `merchant`. + */ + @SerializedName("indicator") + @Expose + private Constants.TransactionIndicator indicator; + /** Invoice mini details */ @SerializedName("invoice") @Expose @@ -145,6 +155,30 @@ public class Transaction extends Resource { @Expose private String ipAddressV4; + /** + * This conditional parameter is useful for merchants in specific industries who need to submit + * one-time Merchant Initiated transactions in specific cases. Not all gateways support these + * methods, but will support a generic one-time Merchant Initiated transaction. Only use this if + * the initiator value is "merchant". Otherwise, it will be ignored. - Incremental: Send + * `incremental` with an additional purchase if the original authorization amount is not + * sufficient to cover the costs of your service or product. For example, if the customer adds + * goods or services or there are additional expenses. - No Show: Send `no_show` if you charge + * customers a fee due to an agreed-upon cancellation policy in your industry. - Resubmission: + * Send `resubmission` if you need to attempt collection on a declined transaction. You may also + * use the force collection behavior which has the same effect. - Service Extension: Send + * `service_extension` if you are in a service industry and the customer has increased/extended + * their service in some way. For example: adding a day onto a car rental agreement. - Split + * Shipment: Send `split_shipment` if you sell physical product and need to split up a shipment + * into multiple transactions when the customer is no longer in session. - Top Up: Send `top_up` + * if you process one-time transactions based on a pre-arranged agreement with your customer where + * there is a pre-arranged account balance that needs maintaining. For example, if the customer + * has agreed to maintain an account balance of 30.00 and their current balance is 20.00, the MIT + * amount would be at least 10.00 to meet that 30.00 threshold. + */ + @SerializedName("merchant_reason_code") + @Expose + private Constants.TransactionMerchantReasonCode merchantReasonCode; + /** Object type */ @SerializedName("object") @Expose @@ -474,6 +508,26 @@ public void setId(final String id) { this.id = id; } + /** + * Must be sent for one-time transactions in order to provide context on which entity is + * submitting the transaction to ensure proper fraud checks are observed, such as 3DS. If the + * customer is in session, send `customer`. If this is a merchant initiated one-time transaction, + * send `merchant`. + */ + public Constants.TransactionIndicator getIndicator() { + return this.indicator; + } + + /** + * @param indicator Must be sent for one-time transactions in order to provide context on which + * entity is submitting the transaction to ensure proper fraud checks are observed, such as + * 3DS. If the customer is in session, send `customer`. If this is a merchant initiated + * one-time transaction, send `merchant`. + */ + public void setIndicator(final Constants.TransactionIndicator indicator) { + this.indicator = indicator; + } + /** Invoice mini details */ public InvoiceMini getInvoice() { return this.invoice; @@ -520,6 +574,56 @@ public void setIpAddressV4(final String ipAddressV4) { this.ipAddressV4 = ipAddressV4; } + /** + * This conditional parameter is useful for merchants in specific industries who need to submit + * one-time Merchant Initiated transactions in specific cases. Not all gateways support these + * methods, but will support a generic one-time Merchant Initiated transaction. Only use this if + * the initiator value is "merchant". Otherwise, it will be ignored. - Incremental: Send + * `incremental` with an additional purchase if the original authorization amount is not + * sufficient to cover the costs of your service or product. For example, if the customer adds + * goods or services or there are additional expenses. - No Show: Send `no_show` if you charge + * customers a fee due to an agreed-upon cancellation policy in your industry. - Resubmission: + * Send `resubmission` if you need to attempt collection on a declined transaction. You may also + * use the force collection behavior which has the same effect. - Service Extension: Send + * `service_extension` if you are in a service industry and the customer has increased/extended + * their service in some way. For example: adding a day onto a car rental agreement. - Split + * Shipment: Send `split_shipment` if you sell physical product and need to split up a shipment + * into multiple transactions when the customer is no longer in session. - Top Up: Send `top_up` + * if you process one-time transactions based on a pre-arranged agreement with your customer where + * there is a pre-arranged account balance that needs maintaining. For example, if the customer + * has agreed to maintain an account balance of 30.00 and their current balance is 20.00, the MIT + * amount would be at least 10.00 to meet that 30.00 threshold. + */ + public Constants.TransactionMerchantReasonCode getMerchantReasonCode() { + return this.merchantReasonCode; + } + + /** + * @param merchantReasonCode This conditional parameter is useful for merchants in specific + * industries who need to submit one-time Merchant Initiated transactions in specific cases. + * Not all gateways support these methods, but will support a generic one-time Merchant + * Initiated transaction. Only use this if the initiator value is "merchant". Otherwise, it + * will be ignored. - Incremental: Send `incremental` with an additional purchase if the + * original authorization amount is not sufficient to cover the costs of your service or + * product. For example, if the customer adds goods or services or there are additional + * expenses. - No Show: Send `no_show` if you charge customers a fee due to an agreed-upon + * cancellation policy in your industry. - Resubmission: Send `resubmission` if you need to + * attempt collection on a declined transaction. You may also use the force collection + * behavior which has the same effect. - Service Extension: Send `service_extension` if you + * are in a service industry and the customer has increased/extended their service in some + * way. For example: adding a day onto a car rental agreement. - Split Shipment: Send + * `split_shipment` if you sell physical product and need to split up a shipment into multiple + * transactions when the customer is no longer in session. - Top Up: Send `top_up` if you + * process one-time transactions based on a pre-arranged agreement with your customer where + * there is a pre-arranged account balance that needs maintaining. For example, if the + * customer has agreed to maintain an account balance of 30.00 and their current balance is + * 20.00, the MIT amount would be at least 10.00 to meet that 30.00 threshold. + */ + public void setMerchantReasonCode( + final Constants.TransactionMerchantReasonCode merchantReasonCode) { + this.merchantReasonCode = merchantReasonCode; + } + /** Object type */ public String getObject() { return this.object;