From 0a79e2b5dbd8edd83dec75dca79df77ff266bd6f Mon Sep 17 00:00:00 2001 From: Recurly Integrations Date: Tue, 22 Jul 2025 18:41:31 +0000 Subject: [PATCH] Generated Latest Changes for v2021-02-25 --- openapi/api.yaml | 942 ++++++++---------- src/main/java/com/recurly/v3/Client.java | 63 +- .../com/recurly/v3/requests/CurrencyCode.java | 11 + .../v3/requests/GeneralLedgerAccountId.java | 11 + .../v3/requests/PerformanceObligationId.java | 11 + .../com/recurly/v3/requests/PlanCode.java | 11 + .../com/recurly/v3/requests/PlanCreate.java | 38 +- .../v3/requests/PlanIntervalLength.java | 11 + .../com/recurly/v3/requests/PlanName.java | 11 + .../com/recurly/v3/requests/PlanPricing.java | 53 +- .../recurly/v3/requests/PlanRampPricing.java | 25 + .../v3/requests/PlanSetupPricingCreate.java | 58 ++ .../com/recurly/v3/requests/PlanUpdate.java | 44 +- .../recurly/v3/requests/PriceSegmentId.java | 11 + .../v3/requests/PriceSegmentIdOrCode.java | 11 + .../java/com/recurly/v3/requests/Pricing.java | 4 +- .../v3/requests/SubscriptionChangeCreate.java | 15 + .../v3/requests/SubscriptionCreate.java | 15 + .../v3/requests/SubscriptionPurchase.java | 25 + .../v3/requests/SubscriptionUpdate.java | 15 + .../com/recurly/v3/requests/TaxInclusive.java | 11 + .../com/recurly/v3/requests/UnitAmount.java | 11 + .../recurly/v3/resources/CurrencyCode.java | 10 + .../v3/resources/GeneralLedgerAccountId.java | 10 + .../v3/resources/PerformanceObligationId.java | 10 + .../java/com/recurly/v3/resources/Plan.java | 170 +++- .../com/recurly/v3/resources/PlanCode.java | 10 + .../v3/resources/PlanIntervalLength.java | 10 + .../com/recurly/v3/resources/PlanName.java | 10 + .../com/recurly/v3/resources/PlanPricing.java | 53 +- .../recurly/v3/resources/PlanRampPricing.java | 25 + .../v3/resources/PlanSetupPricing.java | 57 ++ .../recurly/v3/resources/PriceSegment.java | 58 ++ .../v3/resources/PriceSegmentCode.java | 10 + .../recurly/v3/resources/PriceSegmentId.java | 10 + .../v3/resources/PriceSegmentIdOrCode.java | 10 + .../com/recurly/v3/resources/Pricing.java | 4 +- .../recurly/v3/resources/Subscription.java | 25 + .../recurly/v3/resources/TaxInclusive.java | 10 + .../com/recurly/v3/resources/UnitAmount.java | 10 + 40 files changed, 1288 insertions(+), 621 deletions(-) create mode 100644 src/main/java/com/recurly/v3/requests/CurrencyCode.java create mode 100644 src/main/java/com/recurly/v3/requests/GeneralLedgerAccountId.java create mode 100644 src/main/java/com/recurly/v3/requests/PerformanceObligationId.java create mode 100644 src/main/java/com/recurly/v3/requests/PlanCode.java create mode 100644 src/main/java/com/recurly/v3/requests/PlanIntervalLength.java create mode 100644 src/main/java/com/recurly/v3/requests/PlanName.java create mode 100644 src/main/java/com/recurly/v3/requests/PlanSetupPricingCreate.java create mode 100644 src/main/java/com/recurly/v3/requests/PriceSegmentId.java create mode 100644 src/main/java/com/recurly/v3/requests/PriceSegmentIdOrCode.java create mode 100644 src/main/java/com/recurly/v3/requests/TaxInclusive.java create mode 100644 src/main/java/com/recurly/v3/requests/UnitAmount.java create mode 100644 src/main/java/com/recurly/v3/resources/CurrencyCode.java create mode 100644 src/main/java/com/recurly/v3/resources/GeneralLedgerAccountId.java create mode 100644 src/main/java/com/recurly/v3/resources/PerformanceObligationId.java create mode 100644 src/main/java/com/recurly/v3/resources/PlanCode.java create mode 100644 src/main/java/com/recurly/v3/resources/PlanIntervalLength.java create mode 100644 src/main/java/com/recurly/v3/resources/PlanName.java create mode 100644 src/main/java/com/recurly/v3/resources/PlanSetupPricing.java create mode 100644 src/main/java/com/recurly/v3/resources/PriceSegment.java create mode 100644 src/main/java/com/recurly/v3/resources/PriceSegmentCode.java create mode 100644 src/main/java/com/recurly/v3/resources/PriceSegmentId.java create mode 100644 src/main/java/com/recurly/v3/resources/PriceSegmentIdOrCode.java create mode 100644 src/main/java/com/recurly/v3/resources/TaxInclusive.java create mode 100644 src/main/java/com/recurly/v3/resources/UnitAmount.java diff --git a/openapi/api.yaml b/openapi/api.yaml index 19909f0a..e6f54b57 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -217,6 +217,7 @@ x-tagGroups: - coupon - coupon_redemption - unique_coupon_code + - price_segment - name: Invoices and Payments tags: - invoice @@ -274,6 +275,8 @@ tags: x-displayName: Account Acquisition Info description: Recurly offers the ability to record marketing data on customer accounts to match this data with revenue and billing data events in Recurly. +- name: price_segment + x-displayName: Price Segment - name: billing_info x-displayName: Billing Info description: Without the premium Wallet feature, an account can only have one stored @@ -11963,6 +11966,72 @@ paths: {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Removed Plan Add-On: %v\", planAddOn)" + "/price_segments": + get: + tags: + - price_segment + operationId: list_price_segments + summary: List a site's price segments + description: See the [Pagination Guide](/developers/guides/pagination.html) + to learn how to use pagination in the API and Client Libraries. + parameters: + - "$ref": "#/components/parameters/ids" + - "$ref": "#/components/parameters/limit" + - "$ref": "#/components/parameters/order" + responses: + '200': + description: A list of price segments. + content: + application/json: + schema: + "$ref": "#/components/schemas/PriceSegmentList" + '400': + description: Invalid or unpermitted parameter. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '404': + description: Incorrect site ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + "/price_segments/{price_segment_id}": + get: + tags: + - price_segment + operationId: get_price_segment + summary: Fetch a price segment + parameters: + - "$ref": "#/components/parameters/price_segment_id" + responses: + '200': + description: A price segment. + content: + application/json: + schema: + "$ref": "#/components/schemas/PriceSegment" + '404': + description: Incorrect site or price segment ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/add_ons": get: tags: @@ -17016,7 +17085,8 @@ components: name: invoice_id in: path description: Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. - For number use prefix `number-`, e.g. `number-1000`. + 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` required: true schema: type: string @@ -17062,6 +17132,14 @@ components: required: true schema: type: string + price_segment_id: + name: price_segment_id + in: path + description: The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. + For code use prefix `code-`, e.g. `code-gold`. + required: true + schema: + "$ref": "#/components/schemas/PriceSegmentIdOrCode" shipping_address_id: name: shipping_address_id in: path @@ -17581,6 +17659,33 @@ components: type: array items: "$ref": "#/components/schemas/Plan" + PriceSegmentList: + type: object + properties: + object: + type: string + title: Object type + description: Will always be List. + has_more: + type: boolean + description: Indicates there are more results on subsequent pages. + next: + type: string + description: Path to subsequent page of results. + data: + type: array + items: + "$ref": "#/components/schemas/PriceSegment" + PriceSegment: + type: object + properties: + object: + type: string + title: Object type + id: + "$ref": "#/components/schemas/PriceSegmentId" + code: + "$ref": "#/components/schemas/PriceSegmentCode" SiteList: type: object properties: @@ -19793,6 +19898,11 @@ components: are removed from the accouts or subscriptions, will be hard deleted an no longer visible. readOnly: true + CurrencyCode: + type: string + title: Currency + description: 3-letter ISO 4217 currency code. + maxLength: 3 GeneralLedgerAccountId: type: string title: General Ledger Account ID @@ -21501,6 +21611,25 @@ components: type: string title: Reference Type "$ref": "#/components/schemas/PaymentGatewayReferencesEnum" + PlanCode: + type: string + title: Plan code + description: Unique code to identify the plan. This is used in Hosted Payment + Page URLs and in the invoice exports. + pattern: "/^[a-z0-9_+-]+$/" + maxLength: 50 + PlanName: + type: string + title: Name + description: This name describes your plan and will appear on the Hosted Payment + Page and the subscriber's invoice. + maxLength: 255 + PlanIntervalLength: + type: integer + title: Interval length + description: Length of the plan's billing interval in `interval_unit`. + default: 1 + minimum: 1 PlanMini: type: object title: Plan mini details @@ -21516,64 +21645,48 @@ components: title: Object type readOnly: true code: - type: string - title: Plan code - description: Unique code to identify the plan. This is used in Hosted Payment - Page URLs and in the invoice exports. - pattern: "/^[a-z0-9_+-]+$/i" - maxLength: 50 + "$ref": "#/components/schemas/PlanCode" name: - type: string - title: Name - description: This name describes your plan and will appear on the Hosted - Payment Page and the subscriber's invoice. - maxLength: 255 - Plan: + "$ref": "#/components/schemas/PlanName" + PlanCommon: type: object - description: Full plan details. properties: - id: - type: string - title: Plan ID - maxLength: 13 - readOnly: true - object: - type: string - title: Object type - readOnly: true - code: - type: string - title: Plan code - description: Unique code to identify the plan. This is used in Hosted Payment - Page URLs and in the invoice exports. - pattern: "/^[a-z0-9_+-]+$/i" - maxLength: 50 - state: - title: State - description: The current state of the plan. - readOnly: true - "$ref": "#/components/schemas/ActiveStateEnum" - name: - type: string - title: Name - description: This name describes your plan and will appear on the Hosted - Payment Page and the subscriber's invoice. - maxLength: 255 description: type: string title: Description description: Optional description, not displayed. - interval_unit: - title: Interval unit - description: Unit for the plan's billing interval. - default: months - "$ref": "#/components/schemas/IntervalUnitEnum" - interval_length: - type: integer - title: Interval length - description: Length of the plan's billing interval in `interval_unit`. - default: 1 - minimum: 1 + accounting_code: + type: string + title: Plan accounting code + description: Accounting code for invoice line items for the plan. If no + value is provided, it defaults to plan's code. + pattern: "/^[a-z0-9_+-]+$/" + maxLength: 20 + revenue_schedule_type: + title: Revenue schedule type + "$ref": "#/components/schemas/RevenueScheduleTypeEnum" + liability_gl_account_id: + "$ref": "#/components/schemas/GeneralLedgerAccountId" + revenue_gl_account_id: + "$ref": "#/components/schemas/GeneralLedgerAccountId" + performance_obligation_id: + "$ref": "#/components/schemas/PerformanceObligationId" + setup_fee_accounting_code: + type: string + title: Setup fee accounting code + description: Accounting code for invoice line items for the plan's setup + fee. If no value is provided, it defaults to plan's accounting code. + pattern: "/^[a-z0-9_+-]+$/" + maxLength: 20 + setup_fee_revenue_schedule_type: + title: Setup fee revenue schedule type + "$ref": "#/components/schemas/RevenueScheduleTypeEnum" + setup_fee_liability_gl_account_id: + "$ref": "#/components/schemas/GeneralLedgerAccountId" + setup_fee_revenue_gl_account_id: + "$ref": "#/components/schemas/GeneralLedgerAccountId" + setup_fee_performance_obligation_id: + "$ref": "#/components/schemas/PerformanceObligationId" trial_unit: title: Trial unit description: Units for the plan's trial period. @@ -21609,36 +21722,8 @@ components: renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself. - pricing_model: - title: Pricing Model - "$ref": "#/components/schemas/PricingModelTypeEnum" - ramp_intervals: - type: array - title: Ramp Intervals - items: - "$ref": "#/components/schemas/PlanRampInterval" custom_fields: "$ref": "#/components/schemas/CustomFields" - revenue_schedule_type: - title: Revenue schedule type - "$ref": "#/components/schemas/RevenueScheduleTypeEnum" - setup_fee_revenue_schedule_type: - title: Setup fee revenue schedule type - "$ref": "#/components/schemas/RevenueScheduleTypeEnum" - accounting_code: - type: string - title: Plan accounting code - description: Accounting code for invoice line items for the plan. If no - value is provided, it defaults to plan's code. - pattern: "/^[a-z0-9_+-]+$/" - maxLength: 20 - setup_fee_accounting_code: - type: string - title: Setup fee accounting code - description: Accounting code for invoice line items for the plan's setup - fee. If no value is provided, it defaults to plan's accounting code. - pattern: "/^[a-z0-9_+-]+$/" - maxLength: 20 avalara_transaction_type: type: integer title: Avalara Transaction Type @@ -21674,12 +21759,6 @@ components: title: Vertex Transaction Type description: Used by Vertex for tax calculations. Possible values are `sale`, `rental`, `lease`. - currencies: - type: array - title: Pricing - items: - "$ref": "#/components/schemas/PlanPricing" - minItems: 1 hosted_pages: type: object title: Hosted pages settings @@ -21698,244 +21777,117 @@ components: a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. - created_at: - type: string - format: date-time - title: Created at - readOnly: true - updated_at: - type: string - format: date-time - title: Last updated at - readOnly: true - deleted_at: - type: string - format: date-time - title: Deleted at - readOnly: true + PlanCreate: + type: object + allOf: + - type: object + properties: + code: + "$ref": "#/components/schemas/PlanCode" + name: + "$ref": "#/components/schemas/PlanName" + pricing_model: + title: Pricing Model + "$ref": "#/components/schemas/PricingModelTypeEnum" + currencies: + title: Pricing + description: Required only when `pricing_model` is `'fixed'`. + type: array + items: + "$ref": "#/components/schemas/PlanPricing" + minItems: 1 + ramp_intervals: + type: array + title: Ramp Intervals + items: + title: PlanRampInterval + "$ref": "#/components/schemas/PlanRampInterval" + setup_fees: + type: array + title: Setup Fees + items: + "$ref": "#/components/schemas/PlanSetupPricingCreate" + add_ons: + type: array + title: Add Ons + items: + "$ref": "#/components/schemas/AddOnCreate" + interval_unit: + title: Interval unit + description: Unit for the plan's billing interval. + default: months + "$ref": "#/components/schemas/IntervalUnitEnum" + interval_length: + "$ref": "#/components/schemas/PlanIntervalLength" + - "$ref": "#/components/schemas/PlanCommon" required: - code - name - PlanCreate: + - currencies + Plan: + type: object + allOf: + - "$ref": "#/components/schemas/PlanMini" + - type: object + properties: + state: + title: State + description: The current state of the plan. + readOnly: true + "$ref": "#/components/schemas/ActiveStateEnum" + pricing_model: + title: Pricing Model + "$ref": "#/components/schemas/PricingModelTypeEnum" + currencies: + title: Pricing + description: Present only when `pricing_model` is `'fixed'`. + "$ref": "#/components/schemas/PlanCurrencies" + ramp_intervals: + type: array + title: Ramp Intervals + items: + "$ref": "#/components/schemas/PlanRampInterval" + setup_fees: + type: array + title: Setup Fees + items: + "$ref": "#/components/schemas/PlanSetupPricing" + interval_unit: + title: Interval unit + description: Unit for the plan's billing interval. + default: months + "$ref": "#/components/schemas/IntervalUnitEnum" + interval_length: + "$ref": "#/components/schemas/PlanIntervalLength" + - "$ref": "#/components/schemas/PlanCommon" + - type: object + properties: + created_at: + type: string + format: date-time + title: Created at + readOnly: true + updated_at: + type: string + format: date-time + title: Last updated at + readOnly: true + deleted_at: + type: string + format: date-time + title: Deleted at + readOnly: true + required: + - code + - name + PlanHostedPages: type: object properties: - code: - type: string - title: Plan code - description: Unique code to identify the plan. This is used in Hosted Payment - Page URLs and in the invoice exports. - pattern: "/^[a-z0-9_+-]+$/i" - maxLength: 50 - name: - type: string - title: Name - description: This name describes your plan and will appear on the Hosted - Payment Page and the subscriber's invoice. - maxLength: 255 - description: + success_url: type: string - title: Description - description: Optional description, not displayed. - accounting_code: - type: string - title: Plan accounting code - description: Accounting code for invoice line items for the plan. If no - value is provided, it defaults to plan's code. - pattern: "/^[a-z0-9_+-]+$/" - maxLength: 20 - interval_unit: - title: Interval unit - description: Unit for the plan's billing interval. - default: months - "$ref": "#/components/schemas/IntervalUnitEnum" - interval_length: - type: integer - title: Interval length - description: Length of the plan's billing interval in `interval_unit`. - default: 1 - minimum: 1 - trial_unit: - title: Trial unit - description: Units for the plan's trial period. - default: months - "$ref": "#/components/schemas/IntervalUnitEnum" - trial_length: - type: integer - title: Trial length - description: Length of plan's trial period in `trial_units`. `0` means `no - trial`. - default: 0 - minimum: 0 - trial_requires_billing_info: - type: boolean - title: Trial Requires BillingInfo - description: Allow free trial subscriptions to be created without billing - info. Should not be used if billing info is needed for initial invoice - due to existing uninvoiced charges or setup fee. - default: true - total_billing_cycles: - type: integer - title: Total billing cycles - description: Automatically terminate plans after a defined number of billing - cycles. - minimum: 0 - auto_renew: - type: boolean - title: Auto renew - default: true - description: Subscriptions will automatically inherit this value once they - are active. If `auto_renew` is `true`, then a subscription will automatically - renew its term at renewal. If `auto_renew` is `false`, then a subscription - will expire at the end of its term. `auto_renew` can be overridden on - the subscription record itself. - pricing_model: - title: Pricing Model - "$ref": "#/components/schemas/PricingModelTypeEnum" - ramp_intervals: - type: array - title: Ramp Intervals - items: - "$ref": "#/components/schemas/PlanRampInterval" - custom_fields: - "$ref": "#/components/schemas/CustomFields" - revenue_schedule_type: - title: Revenue schedule type - "$ref": "#/components/schemas/RevenueScheduleTypeEnum" - liability_gl_account_id: - type: string - title: General Ledger Account ID - description: | - The ID of a general ledger account. General ledger accounts are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - revenue_gl_account_id: - type: string - title: General Ledger Account ID - description: | - The ID of a general ledger account. General ledger accounts are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - performance_obligation_id: - type: string - title: Performance Obligation ID - description: | - The ID of a performance obligation. Performance obligations are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - setup_fee_liability_gl_account_id: - type: string - title: General Ledger Account ID - description: | - The ID of a general ledger account. General ledger accounts are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - setup_fee_revenue_gl_account_id: - type: string - title: General Ledger Account ID - description: | - The ID of a general ledger account. General ledger accounts are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - setup_fee_performance_obligation_id: - type: string - title: Performance Obligation ID - description: | - The ID of a performance obligation. Performance obligations are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - setup_fee_revenue_schedule_type: - title: Setup fee revenue schedule type - "$ref": "#/components/schemas/RevenueScheduleTypeEnum" - setup_fee_accounting_code: - type: string - title: Setup fee accounting code - description: Accounting code for invoice line items for the plan's setup - fee. If no value is provided, it defaults to plan's accounting code. - pattern: "/^[a-z0-9_+-]+$/" - maxLength: 20 - avalara_transaction_type: - type: integer - title: Avalara Transaction Type - description: Used by Avalara for Communications taxes. The transaction type - in combination with the service type describe how the plan is taxed. Refer - to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) - for more available t/s types. - minimum: 0 - avalara_service_type: - type: integer - title: Avalara Service Type - description: Used by Avalara for Communications taxes. The transaction type - in combination with the service type describe how the plan is taxed. Refer - to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) - for more available t/s types. - minimum: 0 - tax_code: - type: string - maxLength: 50 - title: Tax code - description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box - tax solution to determine taxation rules. You can pass in specific tax - codes using any of these tax integrations. For Recurly's In-the-Box tax - offering you can also choose to instead use simple values of `unknown`, - `physical`, or `digital` tax codes. - tax_exempt: - type: boolean - title: Tax exempt? - description: "`true` exempts tax on the plan, `false` applies tax on the - plan." - vertex_transaction_type: - type: string - title: Vertex Transaction Type - description: Used by Vertex for tax calculations. Possible values are `sale`, - `rental`, `lease`. - currencies: - type: array - title: Pricing - items: - "$ref": "#/components/schemas/PlanPricing" - minItems: 1 - hosted_pages: - type: object - title: Hosted pages settings - "$ref": "#/components/schemas/PlanHostedPages" - add_ons: - type: array - title: Add Ons - items: - "$ref": "#/components/schemas/AddOnCreate" - allow_any_item_on_subscriptions: - type: boolean - title: Allow any item on subscriptions - default: false - description: | - Used to determine whether items can be assigned as add-ons to individual subscriptions. - If `true`, items can be assigned as add-ons to individual subscription add-ons. - If `false`, only plan add-ons can be used. - dunning_campaign_id: - type: string - title: Dunning Campaign ID - description: Unique ID to identify a dunning campaign. Used to specify if - a non-default dunning campaign should be assigned to this plan. For sites - without multiple dunning campaigns enabled, the default dunning campaign - will always be used. - required: - - code - - name - - currencies - PlanHostedPages: - type: object - properties: - success_url: - type: string - title: Success redirect URL - description: URL to redirect to after signup on the hosted payment pages. - cancel_url: + title: Success redirect URL + description: URL to redirect to after signup on the hosted payment pages. + cancel_url: type: string title: Cancel redirect URL (deprecated) description: URL to redirect to on canceled signup on the hosted payment @@ -21954,33 +21906,54 @@ components: type: object properties: currency: - type: string - title: Currency - description: 3-letter ISO 4217 currency code. - maxLength: 3 + "$ref": "#/components/schemas/CurrencyCode" setup_fee: - type: number - format: float - title: Setup fee - description: Amount of one-time setup fee automatically charged at the beginning + "$ref": "#/components/schemas/UnitAmount" + title: Setup Fee + description: This field is deprecated, please use top level `setup_fees` + instead. Amount of one-time setup fee automatically charged at the beginning of a subscription billing cycle. For subscription plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not increase with the quantity of a subscription plan. - minimum: 0 - maximum: 1000000 + deprecated: true unit_amount: - type: number - format: float - title: Unit price - description: This field should not be sent when the pricing model is 'ramp'. - minimum: 0 - maximum: 1000000 + "$ref": "#/components/schemas/UnitAmount" + title: Unit Price + description: This field should not be sent when the pricing model is `'ramp'`. + price_segment_id: + "$ref": "#/components/schemas/PriceSegmentIdOrCode" tax_inclusive: - type: boolean - title: Tax Inclusive? - default: false - description: This field is deprecated. Please do not use it. - deprecated: true + "$ref": "#/components/schemas/TaxInclusive" + PlanCurrencies: + title: Pricing + type: array + items: + "$ref": "#/components/schemas/PlanPricing" + minItems: 1 + PlanSetupPricingCreate: + type: object + properties: + currency: + "$ref": "#/components/schemas/CurrencyCode" + unit_amount: + "$ref": "#/components/schemas/UnitAmount" + title: Setup Fee + description: Amount of one-time setup fee automatically charged at the beginning + of a subscription billing cycle. For subscription plans with a trial, + the setup fee will be charged at the time of signup. Setup fees do not + increase with the quantity of a subscription plan. + PlanSetupPricing: + type: object + properties: + currency: + "$ref": "#/components/schemas/CurrencyCode" + unit_amount: + "$ref": "#/components/schemas/UnitAmount" + title: Setup Fee + description: Amount of one-time setup fee automatically charged at the beginning + of a subscription billing cycle. For subscription plans with a trial, + the setup fee will be charged at the time of signup. Setup fees do not + increase with the quantity of a subscription plan. PlanRampInterval: type: object title: Plan Ramp Interval @@ -21996,198 +21969,38 @@ components: "$ref": "#/components/schemas/PlanRampPricing" PlanUpdate: type: object - properties: - id: - type: string - title: Plan ID - maxLength: 13 - readOnly: true - code: - type: string - title: Plan code - description: Unique code to identify the plan. This is used in Hosted Payment - Page URLs and in the invoice exports. - pattern: "/^[a-z0-9_+-]+$/i" - maxLength: 50 - name: - type: string - title: Name - description: This name describes your plan and will appear on the Hosted - Payment Page and the subscriber's invoice. - maxLength: 255 - description: - type: string - title: Description - description: Optional description, not displayed. - accounting_code: - type: string - title: Plan accounting code - description: Accounting code for invoice line items for the plan. If no - value is provided, it defaults to plan's code. - pattern: "/^[a-z0-9_+-]+$/" - maxLength: 20 - trial_unit: - title: Trial unit - description: Units for the plan's trial period. - default: months - "$ref": "#/components/schemas/IntervalUnitEnum" - trial_length: - type: integer - title: Trial length - description: Length of plan's trial period in `trial_units`. `0` means `no - trial`. - default: 0 - minimum: 0 - trial_requires_billing_info: - type: boolean - title: Trial Requires BillingInfo - description: Allow free trial subscriptions to be created without billing - info. Should not be used if billing info is needed for initial invoice - due to existing uninvoiced charges or setup fee. - default: true - total_billing_cycles: - type: integer - title: Total billing cycles - description: Automatically terminate plans after a defined number of billing - cycles. - minimum: 0 - auto_renew: - type: boolean - title: Auto renew - default: true - description: Subscriptions will automatically inherit this value once they - are active. If `auto_renew` is `true`, then a subscription will automatically - renew its term at renewal. If `auto_renew` is `false`, then a subscription - will expire at the end of its term. `auto_renew` can be overridden on - the subscription record itself. - ramp_intervals: - type: array - title: Ramp Intervals - items: - "$ref": "#/components/schemas/PlanRampInterval" - custom_fields: - "$ref": "#/components/schemas/CustomFields" - revenue_schedule_type: - title: Revenue schedule type - "$ref": "#/components/schemas/RevenueScheduleTypeEnum" - liability_gl_account_id: - type: string - title: General Ledger Account ID - description: | - The ID of a general ledger account. General ledger accounts are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - revenue_gl_account_id: - type: string - title: General Ledger Account ID - description: | - The ID of a general ledger account. General ledger accounts are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - performance_obligation_id: - type: string - title: Performance Obligation ID - description: | - The ID of a performance obligation. Performance obligations are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - setup_fee_liability_gl_account_id: - type: string - title: General Ledger Account ID - description: | - The ID of a general ledger account. General ledger accounts are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - setup_fee_revenue_gl_account_id: - type: string - title: General Ledger Account ID - description: | - The ID of a general ledger account. General ledger accounts are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - setup_fee_performance_obligation_id: - type: string - title: Performance Obligation ID - description: | - The ID of a performance obligation. Performance obligations are - only accessible as a part of the Recurly RevRec Standard and - Recurly RevRec Advanced features. - maxLength: 13 - setup_fee_revenue_schedule_type: - title: Setup fee revenue schedule type - "$ref": "#/components/schemas/RevenueScheduleTypeEnum" - setup_fee_accounting_code: - type: string - title: Setup fee accounting code - description: Accounting code for invoice line items for the plan's setup - fee. If no value is provided, it defaults to plan's accounting code. - pattern: "/^[a-z0-9_+-]+$/" - maxLength: 20 - avalara_transaction_type: - type: integer - title: Avalara Transaction Type - description: Used by Avalara for Communications taxes. The transaction type - in combination with the service type describe how the plan is taxed. Refer - to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) - for more available t/s types. - minimum: 0 - avalara_service_type: - type: integer - title: Avalara Service Type - description: Used by Avalara for Communications taxes. The transaction type - in combination with the service type describe how the plan is taxed. Refer - to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) - for more available t/s types. - minimum: 0 - tax_code: - type: string - maxLength: 50 - title: Tax code - description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box - tax solution to determine taxation rules. You can pass in specific tax - codes using any of these tax integrations. For Recurly's In-the-Box tax - offering you can also choose to instead use simple values of `unknown`, - `physical`, or `digital` tax codes. - tax_exempt: - type: boolean - title: Tax exempt? - description: "`true` exempts tax on the plan, `false` applies tax on the - plan." - vertex_transaction_type: - type: string - title: Vertex Transaction Type - description: Used by Vertex for tax calculations. Possible values are `sale`, - `rental`, `lease`. - currencies: - type: array - title: Pricing - description: Optional when the pricing model is 'ramp'. - items: - "$ref": "#/components/schemas/PlanPricing" - minItems: 1 - hosted_pages: - type: object - title: Hosted pages settings - "$ref": "#/components/schemas/PlanHostedPages" - allow_any_item_on_subscriptions: - type: boolean - title: Allow any item on subscriptions - description: | - Used to determine whether items can be assigned as add-ons to individual subscriptions. - If `true`, items can be assigned as add-ons to individual subscription add-ons. - If `false`, only plan add-ons can be used. - dunning_campaign_id: - type: string - title: Dunning Campaign ID - description: Unique ID to identify a dunning campaign. Used to specify if - a non-default dunning campaign should be assigned to this plan. For sites - without multiple dunning campaigns enabled, the default dunning campaign - will always be used. + allOf: + - type: object + properties: + id: + type: string + title: Plan ID + description: This field has no effect on the request/response. + maxLength: 13 + readOnly: true + deprecated: true + code: + "$ref": "#/components/schemas/PlanCode" + name: + "$ref": "#/components/schemas/PlanName" + currencies: + title: Pricing + description: Required only when `pricing_model` is `'fixed'`. + type: array + items: + "$ref": "#/components/schemas/PlanPricing" + minItems: 1 + ramp_intervals: + type: array + title: Ramp Intervals + items: + "$ref": "#/components/schemas/PlanRampInterval" + setup_fees: + type: array + title: Setup Fees + items: + "$ref": "#/components/schemas/PlanSetupPricingCreate" + - "$ref": "#/components/schemas/PlanCommon" AddOnPricing: type: object properties: @@ -22250,17 +22063,13 @@ components: type: object properties: currency: - type: string - title: Currency - description: 3-letter ISO 4217 currency code. - maxLength: 3 + "$ref": "#/components/schemas/CurrencyCode" unit_amount: - type: number - format: float - title: Unit price + "$ref": "#/components/schemas/UnitAmount" + title: Unit Price description: Represents the price for the Ramp Interval. - minimum: 0 - maximum: 1000000 + price_segment_id: + "$ref": "#/components/schemas/PriceSegmentIdOrCode" required: - currency - unit_amount @@ -22268,25 +22077,29 @@ components: type: object properties: currency: - type: string - title: Currency - description: 3-letter ISO 4217 currency code. - maxLength: 3 + "$ref": "#/components/schemas/CurrencyCode" unit_amount: - type: number - format: float - title: Unit price - minimum: 0 - maximum: 1000000 + "$ref": "#/components/schemas/UnitAmount" tax_inclusive: - type: boolean - title: Tax Inclusive? - default: false - description: This field is deprecated. Please do not use it. - deprecated: true + "$ref": "#/components/schemas/TaxInclusive" required: - currency - unit_amount + PriceSegmentId: + type: string + description: The price segment ID, e.g. `e28zov4fw0v2`. + maxLength: 50 + PriceSegmentCode: + type: string + description: The price segment code, e.g. `my-price-segment`. + maxLength: 50 + pattern: "/^[a-z0-9_+-]+$/" + PriceSegmentIdOrCode: + type: string + description: The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. + For requests, the code can also be used. Use prefix `code-`, e.g. `code-gold`. + maxLength: 55 + pattern: "/^[a-z0-9_+-]+$/" Tier: type: object properties: @@ -23061,6 +22874,8 @@ components: description: Only for merchants using Recurly's In-The-Box taxes. tax_info: "$ref": "#/components/schemas/TaxInfo" + price_segment_id: + "$ref": "#/components/schemas/PriceSegmentIdOrCode" total: type: number format: float @@ -23616,6 +23431,8 @@ components: 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`. + price_segment_id: + "$ref": "#/components/schemas/PriceSegmentId" unit_amount: type: number format: float @@ -23784,6 +23601,8 @@ components: and `business_entity_code` are present, `business_entity_id` will be used. account: "$ref": "#/components/schemas/AccountCreate" + price_segment_id: + "$ref": "#/components/schemas/PriceSegmentId" billing_info_id: type: string title: Billing Info ID @@ -23991,6 +23810,8 @@ components: the subscription plan for the provided currency. minimum: 0 maximum: 1000000 + price_segment_id: + "$ref": "#/components/schemas/PriceSegmentIdOrCode" tax_inclusive: type: boolean title: Tax Inclusive? @@ -24131,6 +23952,8 @@ components: description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 + price_segment_id: + "$ref": "#/components/schemas/PriceSegmentId" net_terms: type: integer title: Terms that the subscription is due on @@ -24317,6 +24140,12 @@ components: format: float title: Unit price description: Represents the price for the ramp interval. + TaxInclusive: + type: boolean + title: Tax Inclusive? + default: false + description: This field is deprecated. Please do not use it. + deprecated: true TaxInfo: type: object title: Tax info @@ -24742,6 +24571,11 @@ components: title: Begin time query parameter description: The date-time to be included when listing UniqueCouponCodes format: date-time + UnitAmount: + type: number + format: float + minimum: 0 + maximum: 1000000 Usage: type: object properties: diff --git a/src/main/java/com/recurly/v3/Client.java b/src/main/java/com/recurly/v3/Client.java index 62567006..a4af080a 100644 --- a/src/main/java/com/recurly/v3/Client.java +++ b/src/main/java/com/recurly/v3/Client.java @@ -1730,7 +1730,7 @@ public Pager listInvoices(QueryParams queryParams) { * Fetch an invoice * * @see get_invoice 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`. + * @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` * @return An invoice. */ public Invoice getInvoice(String invoiceId) { @@ -1746,7 +1746,7 @@ public Invoice getInvoice(String invoiceId) { * Update an invoice * * @see update_invoice 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`. + * @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 body The body of the request. * @return An invoice. */ @@ -1763,7 +1763,7 @@ public Invoice updateInvoice(String invoiceId, InvoiceUpdate body) { * Fetch an invoice as a PDF * * @see get_invoice_pdf 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`. + * @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` * @return An invoice as a PDF. */ public BinaryFile getInvoicePdf(String invoiceId) { @@ -1779,7 +1779,7 @@ public BinaryFile getInvoicePdf(String invoiceId) { * Apply available credit to a pending or past due charge invoice * * @see apply_credit_balance 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`. + * @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` * @return The updated invoice. */ public Invoice applyCreditBalance(String invoiceId) { @@ -1795,7 +1795,7 @@ public Invoice applyCreditBalance(String invoiceId) { * Collect a pending or past due, automatic invoice * * @see collect_invoice 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`. + * @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` * @return The updated invoice. */ public Invoice collectInvoice(String invoiceId) { @@ -1811,7 +1811,7 @@ public Invoice collectInvoice(String invoiceId) { * Collect a pending or past due, automatic invoice * * @see collect_invoice 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`. + * @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 body The body of the request. * @return The updated invoice. */ @@ -1828,7 +1828,7 @@ public Invoice collectInvoice(String invoiceId, InvoiceCollect body) { * Mark an open invoice as failed * * @see mark_invoice_failed 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`. + * @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` * @return The updated invoice. */ public Invoice markInvoiceFailed(String invoiceId) { @@ -1844,7 +1844,7 @@ public Invoice markInvoiceFailed(String invoiceId) { * Mark an open invoice as successful * * @see mark_invoice_successful 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`. + * @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` * @return The updated invoice. */ public Invoice markInvoiceSuccessful(String invoiceId) { @@ -1860,7 +1860,7 @@ public Invoice markInvoiceSuccessful(String invoiceId) { * Reopen a closed, manual invoice * * @see reopen_invoice 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`. + * @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` * @return The updated invoice. */ public Invoice reopenInvoice(String invoiceId) { @@ -1876,7 +1876,7 @@ public Invoice reopenInvoice(String invoiceId) { * Void a credit invoice. * * @see void_invoice 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`. + * @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` * @return The updated invoice. */ public Invoice voidInvoice(String invoiceId) { @@ -1892,7 +1892,7 @@ public Invoice voidInvoice(String invoiceId) { * Record an external payment for a manual invoices. * * @see record_external_transaction 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`. + * @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 body The body of the request. * @return The recorded transaction. */ @@ -1909,7 +1909,7 @@ public Transaction recordExternalTransaction(String invoiceId, ExternalTransacti * List an invoice's line items * * @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`. + * @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. * @return A list of the invoice's line items. */ @@ -1928,7 +1928,7 @@ public Pager listInvoiceLineItems(String invoiceId, QueryParams queryP * List the coupon redemptions applied to an invoice * * @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`. + * @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. * @return A list of the the coupon redemptions associated with the invoice. */ @@ -1947,7 +1947,7 @@ public Pager listInvoiceCouponRedemptions(String invoiceId, Qu * List an invoice's related credit or charge invoices * * @see list_related_invoices 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`. + * @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` * @return A list of the credit or charge invoices associated with the invoice. */ public Pager listRelatedInvoices(String invoiceId) { @@ -1963,7 +1963,7 @@ public Pager listRelatedInvoices(String invoiceId) { * Refund an invoice * * @see refund_invoice 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`. + * @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 body The body of the request. * @return Returns the new credit invoice. */ @@ -2195,6 +2195,39 @@ public AddOn removePlanAddOn(String planId, String addOnId) { return this.makeRequest("DELETE", path, returnType); } + /** + * List a site's price segments + * + * @see list_price_segments api documentation + * @param queryParams The {@link QueryParams} for this endpoint. + * @return A list of price segments. + */ + public Pager listPriceSegments(QueryParams queryParams) { + final String url = "/price_segments"; + final HashMap urlParams = new HashMap(); + if (queryParams == null) queryParams = new QueryParams(); + final HashMap paramsMap = queryParams.getParams(); + final String path = this.interpolatePath(url, urlParams); + Type parameterizedType = TypeToken.getParameterized(Pager.class, PriceSegment.class).getType(); + return new Pager<>(path, paramsMap, this, parameterizedType); + } + + /** + * Fetch a price segment + * + * @see get_price_segment api documentation + * @param priceSegmentId The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. + * @return A price segment. + */ + public PriceSegment getPriceSegment(String priceSegmentId) { + final String url = "/price_segments/{price_segment_id}"; + final HashMap urlParams = new HashMap(); + urlParams.put("price_segment_id", priceSegmentId); + final String path = this.interpolatePath(url, urlParams); + Type returnType = PriceSegment.class; + return this.makeRequest("GET", path, returnType); + } + /** * List a site's add-ons * diff --git a/src/main/java/com/recurly/v3/requests/CurrencyCode.java b/src/main/java/com/recurly/v3/requests/CurrencyCode.java new file mode 100644 index 00000000..7847f66b --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/CurrencyCode.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 CurrencyCode extends Request {} diff --git a/src/main/java/com/recurly/v3/requests/GeneralLedgerAccountId.java b/src/main/java/com/recurly/v3/requests/GeneralLedgerAccountId.java new file mode 100644 index 00000000..54a54740 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/GeneralLedgerAccountId.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 GeneralLedgerAccountId extends Request {} diff --git a/src/main/java/com/recurly/v3/requests/PerformanceObligationId.java b/src/main/java/com/recurly/v3/requests/PerformanceObligationId.java new file mode 100644 index 00000000..e9502d1a --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/PerformanceObligationId.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 PerformanceObligationId extends Request {} diff --git a/src/main/java/com/recurly/v3/requests/PlanCode.java b/src/main/java/com/recurly/v3/requests/PlanCode.java new file mode 100644 index 00000000..13e1e533 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/PlanCode.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 PlanCode extends Request {} diff --git a/src/main/java/com/recurly/v3/requests/PlanCreate.java b/src/main/java/com/recurly/v3/requests/PlanCreate.java index 59a7dcc9..6c9ba29c 100644 --- a/src/main/java/com/recurly/v3/requests/PlanCreate.java +++ b/src/main/java/com/recurly/v3/requests/PlanCreate.java @@ -74,7 +74,7 @@ public class PlanCreate extends Request { @Expose private String code; - /** Pricing */ + /** Required only when `pricing_model` is `'fixed'`. */ @SerializedName("currencies") @Expose private List currencies; @@ -205,6 +205,11 @@ public class PlanCreate extends Request { @Expose private Constants.RevenueScheduleType setupFeeRevenueScheduleType; + /** Setup Fees */ + @SerializedName("setup_fees") + @Expose + private List setupFees; + /** * Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine * taxation rules. You can pass in specific tax codes using any of these tax integrations. For @@ -220,7 +225,11 @@ public class PlanCreate extends Request { @Expose private Boolean taxExempt; - /** Automatically terminate plans after a defined number of billing cycles. */ + /** + * Automatically terminate subscriptions after a defined number of billing cycles. Number of + * billing cycles before the plan automatically stops renewing, defaults to `null` for continuous, + * automatic renewal. + */ @SerializedName("total_billing_cycles") @Expose private Integer totalBillingCycles; @@ -368,12 +377,12 @@ public void setCode(final String code) { this.code = code; } - /** Pricing */ + /** Required only when `pricing_model` is `'fixed'`. */ public List getCurrencies() { return this.currencies; } - /** @param currencies Pricing */ + /** @param currencies Required only when `pricing_model` is `'fixed'`. */ public void setCurrencies(final List currencies) { this.currencies = currencies; } @@ -636,6 +645,16 @@ public void setSetupFeeRevenueScheduleType( this.setupFeeRevenueScheduleType = setupFeeRevenueScheduleType; } + /** Setup Fees */ + public List getSetupFees() { + return this.setupFees; + } + + /** @param setupFees Setup Fees */ + public void setSetupFees(final List setupFees) { + this.setupFees = setupFees; + } + /** * Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine * taxation rules. You can pass in specific tax codes using any of these tax integrations. For @@ -666,14 +685,19 @@ public void setTaxExempt(final Boolean taxExempt) { this.taxExempt = taxExempt; } - /** Automatically terminate plans after a defined number of billing cycles. */ + /** + * Automatically terminate subscriptions after a defined number of billing cycles. Number of + * billing cycles before the plan automatically stops renewing, defaults to `null` for continuous, + * automatic renewal. + */ public Integer getTotalBillingCycles() { return this.totalBillingCycles; } /** - * @param totalBillingCycles Automatically terminate plans after a defined number of billing - * cycles. + * @param totalBillingCycles Automatically terminate subscriptions after a defined number of + * billing cycles. Number of billing cycles before the plan automatically stops renewing, + * defaults to `null` for continuous, automatic renewal. */ public void setTotalBillingCycles(final Integer totalBillingCycles) { this.totalBillingCycles = totalBillingCycles; diff --git a/src/main/java/com/recurly/v3/requests/PlanIntervalLength.java b/src/main/java/com/recurly/v3/requests/PlanIntervalLength.java new file mode 100644 index 00000000..fde8bdc8 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/PlanIntervalLength.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 PlanIntervalLength extends Request {} diff --git a/src/main/java/com/recurly/v3/requests/PlanName.java b/src/main/java/com/recurly/v3/requests/PlanName.java new file mode 100644 index 00000000..cbd8c942 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/PlanName.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 PlanName extends Request {} diff --git a/src/main/java/com/recurly/v3/requests/PlanPricing.java b/src/main/java/com/recurly/v3/requests/PlanPricing.java index 42326ba3..0e2f8d30 100644 --- a/src/main/java/com/recurly/v3/requests/PlanPricing.java +++ b/src/main/java/com/recurly/v3/requests/PlanPricing.java @@ -19,9 +19,18 @@ public class PlanPricing extends Request { private String currency; /** - * Amount of one-time setup fee automatically charged at the beginning of a subscription billing - * cycle. For subscription plans with a trial, the setup fee will be charged at the time of - * signup. Setup fees do not increase with the quantity of a subscription plan. + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + @SerializedName("price_segment_id") + @Expose + private String priceSegmentId; + + /** + * This field is deprecated, please use top level `setup_fees` instead. Amount of one-time setup + * fee automatically charged at the beginning of a subscription billing cycle. For subscription + * plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not + * increase with the quantity of a subscription plan. */ @SerializedName("setup_fee") @Expose @@ -32,7 +41,7 @@ public class PlanPricing extends Request { @Expose private Boolean taxInclusive; - /** This field should not be sent when the pricing model is 'ramp'. */ + /** This field should not be sent when the pricing model is `'ramp'`. */ @SerializedName("unit_amount") @Expose private BigDecimal unitAmount; @@ -48,19 +57,37 @@ public void setCurrency(final String currency) { } /** - * Amount of one-time setup fee automatically charged at the beginning of a subscription billing - * cycle. For subscription plans with a trial, the setup fee will be charged at the time of - * signup. Setup fees do not increase with the quantity of a subscription plan. + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + public String getPriceSegmentId() { + return this.priceSegmentId; + } + + /** + * @param priceSegmentId The price segment ID or code. For ID no prefix is used e.g. + * `e28zov4fw0v2`. For requests, the code can also be used. Use prefix `code-`, e.g. + * `code-gold`. + */ + public void setPriceSegmentId(final String priceSegmentId) { + this.priceSegmentId = priceSegmentId; + } + + /** + * This field is deprecated, please use top level `setup_fees` instead. Amount of one-time setup + * fee automatically charged at the beginning of a subscription billing cycle. For subscription + * plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not + * increase with the quantity of a subscription plan. */ public BigDecimal getSetupFee() { return this.setupFee; } /** - * @param setupFee Amount of one-time setup fee automatically charged at the beginning of a - * subscription billing cycle. For subscription plans with a trial, the setup fee will be - * charged at the time of signup. Setup fees do not increase with the quantity of a - * subscription plan. + * @param setupFee This field is deprecated, please use top level `setup_fees` instead. Amount of + * one-time setup fee automatically charged at the beginning of a subscription billing cycle. + * For subscription plans with a trial, the setup fee will be charged at the time of signup. + * Setup fees do not increase with the quantity of a subscription plan. */ public void setSetupFee(final BigDecimal setupFee) { this.setupFee = setupFee; @@ -76,12 +103,12 @@ public void setTaxInclusive(final Boolean taxInclusive) { this.taxInclusive = taxInclusive; } - /** This field should not be sent when the pricing model is 'ramp'. */ + /** This field should not be sent when the pricing model is `'ramp'`. */ public BigDecimal getUnitAmount() { return this.unitAmount; } - /** @param unitAmount This field should not be sent when the pricing model is 'ramp'. */ + /** @param unitAmount This field should not be sent when the pricing model is `'ramp'`. */ public void setUnitAmount(final BigDecimal unitAmount) { this.unitAmount = unitAmount; } diff --git a/src/main/java/com/recurly/v3/requests/PlanRampPricing.java b/src/main/java/com/recurly/v3/requests/PlanRampPricing.java index 5a6a2519..0837bb64 100644 --- a/src/main/java/com/recurly/v3/requests/PlanRampPricing.java +++ b/src/main/java/com/recurly/v3/requests/PlanRampPricing.java @@ -18,6 +18,14 @@ public class PlanRampPricing extends Request { @Expose private String currency; + /** + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + @SerializedName("price_segment_id") + @Expose + private String priceSegmentId; + /** Represents the price for the Ramp Interval. */ @SerializedName("unit_amount") @Expose @@ -33,6 +41,23 @@ public void setCurrency(final String currency) { this.currency = currency; } + /** + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + public String getPriceSegmentId() { + return this.priceSegmentId; + } + + /** + * @param priceSegmentId The price segment ID or code. For ID no prefix is used e.g. + * `e28zov4fw0v2`. For requests, the code can also be used. Use prefix `code-`, e.g. + * `code-gold`. + */ + public void setPriceSegmentId(final String priceSegmentId) { + this.priceSegmentId = priceSegmentId; + } + /** Represents the price for the Ramp Interval. */ public BigDecimal getUnitAmount() { return this.unitAmount; diff --git a/src/main/java/com/recurly/v3/requests/PlanSetupPricingCreate.java b/src/main/java/com/recurly/v3/requests/PlanSetupPricingCreate.java new file mode 100644 index 00000000..a06b780b --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/PlanSetupPricingCreate.java @@ -0,0 +1,58 @@ +/** + * 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 java.math.BigDecimal; + +public class PlanSetupPricingCreate extends Request { + + /** 3-letter ISO 4217 currency code. */ + @SerializedName("currency") + @Expose + private String currency; + + /** + * Amount of one-time setup fee automatically charged at the beginning of a subscription billing + * cycle. For subscription plans with a trial, the setup fee will be charged at the time of + * signup. Setup fees do not increase with the quantity of a subscription plan. + */ + @SerializedName("unit_amount") + @Expose + private BigDecimal unitAmount; + + /** 3-letter ISO 4217 currency code. */ + public String getCurrency() { + return this.currency; + } + + /** @param currency 3-letter ISO 4217 currency code. */ + public void setCurrency(final String currency) { + this.currency = currency; + } + + /** + * Amount of one-time setup fee automatically charged at the beginning of a subscription billing + * cycle. For subscription plans with a trial, the setup fee will be charged at the time of + * signup. Setup fees do not increase with the quantity of a subscription plan. + */ + public BigDecimal getUnitAmount() { + return this.unitAmount; + } + + /** + * @param unitAmount Amount of one-time setup fee automatically charged at the beginning of a + * subscription billing cycle. For subscription plans with a trial, the setup fee will be + * charged at the time of signup. Setup fees do not increase with the quantity of a + * subscription plan. + */ + public void setUnitAmount(final BigDecimal unitAmount) { + this.unitAmount = unitAmount; + } +} diff --git a/src/main/java/com/recurly/v3/requests/PlanUpdate.java b/src/main/java/com/recurly/v3/requests/PlanUpdate.java index 835d22f9..e3818e8b 100644 --- a/src/main/java/com/recurly/v3/requests/PlanUpdate.java +++ b/src/main/java/com/recurly/v3/requests/PlanUpdate.java @@ -69,7 +69,7 @@ public class PlanUpdate extends Request { @Expose private String code; - /** Optional when the pricing model is 'ramp'. */ + /** Required only when `pricing_model` is `'fixed'`. */ @SerializedName("currencies") @Expose private List currencies; @@ -102,7 +102,7 @@ public class PlanUpdate extends Request { @Expose private PlanHostedPages hostedPages; - /** Plan ID */ + /** This field has no effect on the request/response. */ @SerializedName("id") @Expose private String id; @@ -186,6 +186,11 @@ public class PlanUpdate extends Request { @Expose private Constants.RevenueScheduleType setupFeeRevenueScheduleType; + /** Setup Fees */ + @SerializedName("setup_fees") + @Expose + private List setupFees; + /** * Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine * taxation rules. You can pass in specific tax codes using any of these tax integrations. For @@ -201,7 +206,11 @@ public class PlanUpdate extends Request { @Expose private Boolean taxExempt; - /** Automatically terminate plans after a defined number of billing cycles. */ + /** + * Automatically terminate subscriptions after a defined number of billing cycles. Number of + * billing cycles before the plan automatically stops renewing, defaults to `null` for continuous, + * automatic renewal. + */ @SerializedName("total_billing_cycles") @Expose private Integer totalBillingCycles; @@ -339,12 +348,12 @@ public void setCode(final String code) { this.code = code; } - /** Optional when the pricing model is 'ramp'. */ + /** Required only when `pricing_model` is `'fixed'`. */ public List getCurrencies() { return this.currencies; } - /** @param currencies Optional when the pricing model is 'ramp'. */ + /** @param currencies Required only when `pricing_model` is `'fixed'`. */ public void setCurrencies(final List currencies) { this.currencies = currencies; } @@ -405,12 +414,12 @@ public void setHostedPages(final PlanHostedPages hostedPages) { this.hostedPages = hostedPages; } - /** Plan ID */ + /** This field has no effect on the request/response. */ public String getId() { return this.id; } - /** @param id Plan ID */ + /** @param id This field has no effect on the request/response. */ public void setId(final String id) { this.id = id; } @@ -579,6 +588,16 @@ public void setSetupFeeRevenueScheduleType( this.setupFeeRevenueScheduleType = setupFeeRevenueScheduleType; } + /** Setup Fees */ + public List getSetupFees() { + return this.setupFees; + } + + /** @param setupFees Setup Fees */ + public void setSetupFees(final List setupFees) { + this.setupFees = setupFees; + } + /** * Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine * taxation rules. You can pass in specific tax codes using any of these tax integrations. For @@ -609,14 +628,19 @@ public void setTaxExempt(final Boolean taxExempt) { this.taxExempt = taxExempt; } - /** Automatically terminate plans after a defined number of billing cycles. */ + /** + * Automatically terminate subscriptions after a defined number of billing cycles. Number of + * billing cycles before the plan automatically stops renewing, defaults to `null` for continuous, + * automatic renewal. + */ public Integer getTotalBillingCycles() { return this.totalBillingCycles; } /** - * @param totalBillingCycles Automatically terminate plans after a defined number of billing - * cycles. + * @param totalBillingCycles Automatically terminate subscriptions after a defined number of + * billing cycles. Number of billing cycles before the plan automatically stops renewing, + * defaults to `null` for continuous, automatic renewal. */ public void setTotalBillingCycles(final Integer totalBillingCycles) { this.totalBillingCycles = totalBillingCycles; diff --git a/src/main/java/com/recurly/v3/requests/PriceSegmentId.java b/src/main/java/com/recurly/v3/requests/PriceSegmentId.java new file mode 100644 index 00000000..044fa2ce --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/PriceSegmentId.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 PriceSegmentId extends Request {} diff --git a/src/main/java/com/recurly/v3/requests/PriceSegmentIdOrCode.java b/src/main/java/com/recurly/v3/requests/PriceSegmentIdOrCode.java new file mode 100644 index 00000000..3487a619 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/PriceSegmentIdOrCode.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 PriceSegmentIdOrCode extends Request {} diff --git a/src/main/java/com/recurly/v3/requests/Pricing.java b/src/main/java/com/recurly/v3/requests/Pricing.java index bb3c074f..94b256ab 100644 --- a/src/main/java/com/recurly/v3/requests/Pricing.java +++ b/src/main/java/com/recurly/v3/requests/Pricing.java @@ -23,7 +23,6 @@ public class Pricing extends Request { @Expose private Boolean taxInclusive; - /** Unit price */ @SerializedName("unit_amount") @Expose private BigDecimal unitAmount; @@ -48,12 +47,11 @@ public void setTaxInclusive(final Boolean taxInclusive) { this.taxInclusive = taxInclusive; } - /** Unit price */ public BigDecimal getUnitAmount() { return this.unitAmount; } - /** @param unitAmount Unit price */ + /** @param unitAmount */ public void setUnitAmount(final BigDecimal unitAmount) { this.unitAmount = unitAmount; } diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionChangeCreate.java b/src/main/java/com/recurly/v3/requests/SubscriptionChangeCreate.java index c62af615..deec1c1d 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionChangeCreate.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionChangeCreate.java @@ -131,6 +131,11 @@ public class SubscriptionChangeCreate extends Request { @Expose private String poNumber; + /** The price segment ID, e.g. `e28zov4fw0v2`. */ + @SerializedName("price_segment_id") + @Expose + private String priceSegmentId; + /** * Allows you to control how any resulting charges and credits will be calculated and prorated. */ @@ -430,6 +435,16 @@ public void setPoNumber(final String poNumber) { this.poNumber = poNumber; } + /** The price segment ID, e.g. `e28zov4fw0v2`. */ + public String getPriceSegmentId() { + return this.priceSegmentId; + } + + /** @param priceSegmentId The price segment ID, e.g. `e28zov4fw0v2`. */ + public void setPriceSegmentId(final String priceSegmentId) { + this.priceSegmentId = priceSegmentId; + } + /** * Allows you to control how any resulting charges and credits will be calculated and prorated. */ diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java b/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java index 52776d4d..d7823aa7 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java @@ -190,6 +190,11 @@ public class SubscriptionCreate extends Request { @Expose private String poNumber; + /** The price segment ID, e.g. `e28zov4fw0v2`. */ + @SerializedName("price_segment_id") + @Expose + private String priceSegmentId; + /** Optionally override the default quantity of 1. */ @SerializedName("quantity") @Expose @@ -641,6 +646,16 @@ public void setPoNumber(final String poNumber) { this.poNumber = poNumber; } + /** The price segment ID, e.g. `e28zov4fw0v2`. */ + public String getPriceSegmentId() { + return this.priceSegmentId; + } + + /** @param priceSegmentId The price segment ID, e.g. `e28zov4fw0v2`. */ + public void setPriceSegmentId(final String priceSegmentId) { + this.priceSegmentId = priceSegmentId; + } + /** Optionally override the default quantity of 1. */ public Integer getQuantity() { return this.quantity; diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java b/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java index cf47fa0f..1e26e895 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java @@ -65,6 +65,14 @@ public class SubscriptionPurchase extends Request { @Expose private String planId; + /** + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + @SerializedName("price_segment_id") + @Expose + private String priceSegmentId; + /** Optionally override the default quantity of 1. */ @SerializedName("quantity") @Expose @@ -236,6 +244,23 @@ public void setPlanId(final String planId) { this.planId = planId; } + /** + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + public String getPriceSegmentId() { + return this.priceSegmentId; + } + + /** + * @param priceSegmentId The price segment ID or code. For ID no prefix is used e.g. + * `e28zov4fw0v2`. For requests, the code can also be used. Use prefix `code-`, e.g. + * `code-gold`. + */ + public void setPriceSegmentId(final String priceSegmentId) { + this.priceSegmentId = priceSegmentId; + } + /** Optionally override the default quantity of 1. */ public Integer getQuantity() { return this.quantity; diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java b/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java index c5efe376..24eb5733 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java @@ -109,6 +109,11 @@ public class SubscriptionUpdate extends Request { @Expose private String poNumber; + /** The price segment ID, e.g. `e28zov4fw0v2`. */ + @SerializedName("price_segment_id") + @Expose + private String priceSegmentId; + /** The remaining billing cycles in the current term. */ @SerializedName("remaining_billing_cycles") @Expose @@ -336,6 +341,16 @@ public void setPoNumber(final String poNumber) { this.poNumber = poNumber; } + /** The price segment ID, e.g. `e28zov4fw0v2`. */ + public String getPriceSegmentId() { + return this.priceSegmentId; + } + + /** @param priceSegmentId The price segment ID, e.g. `e28zov4fw0v2`. */ + public void setPriceSegmentId(final String priceSegmentId) { + this.priceSegmentId = priceSegmentId; + } + /** The remaining billing cycles in the current term. */ public Integer getRemainingBillingCycles() { return this.remainingBillingCycles; diff --git a/src/main/java/com/recurly/v3/requests/TaxInclusive.java b/src/main/java/com/recurly/v3/requests/TaxInclusive.java new file mode 100644 index 00000000..73efcd48 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/TaxInclusive.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 TaxInclusive extends Request {} diff --git a/src/main/java/com/recurly/v3/requests/UnitAmount.java b/src/main/java/com/recurly/v3/requests/UnitAmount.java new file mode 100644 index 00000000..9a046274 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/UnitAmount.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 UnitAmount extends Request {} diff --git a/src/main/java/com/recurly/v3/resources/CurrencyCode.java b/src/main/java/com/recurly/v3/resources/CurrencyCode.java new file mode 100644 index 00000000..d9ebca6b --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/CurrencyCode.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class CurrencyCode extends Resource {} diff --git a/src/main/java/com/recurly/v3/resources/GeneralLedgerAccountId.java b/src/main/java/com/recurly/v3/resources/GeneralLedgerAccountId.java new file mode 100644 index 00000000..2b9c92b0 --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/GeneralLedgerAccountId.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class GeneralLedgerAccountId extends Resource {} diff --git a/src/main/java/com/recurly/v3/resources/PerformanceObligationId.java b/src/main/java/com/recurly/v3/resources/PerformanceObligationId.java new file mode 100644 index 00000000..592c7a1e --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/PerformanceObligationId.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class PerformanceObligationId extends Resource {} diff --git a/src/main/java/com/recurly/v3/resources/Plan.java b/src/main/java/com/recurly/v3/resources/Plan.java index 0a255524..53ab7b6e 100644 --- a/src/main/java/com/recurly/v3/resources/Plan.java +++ b/src/main/java/com/recurly/v3/resources/Plan.java @@ -74,7 +74,7 @@ public class Plan extends Resource { @Expose private DateTime createdAt; - /** Pricing */ + /** Present only when `pricing_model` is `'fixed'`. */ @SerializedName("currencies") @Expose private List currencies; @@ -127,6 +127,14 @@ public class Plan extends Resource { @Expose private Constants.IntervalUnit intervalUnit; + /** + * The ID of a general ledger account. General ledger accounts are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + @SerializedName("liability_gl_account_id") + @Expose + private String liabilityGlAccountId; + /** * This name describes your plan and will appear on the Hosted Payment Page and the subscriber's * invoice. @@ -140,6 +148,14 @@ public class Plan extends Resource { @Expose private String object; + /** + * The ID of a performance obligation. Performance obligations are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + @SerializedName("performance_obligation_id") + @Expose + private String performanceObligationId; + /** * A fixed pricing model has the same price for each billing period. A ramp pricing model defines * a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing @@ -154,6 +170,14 @@ public class Plan extends Resource { @Expose private List rampIntervals; + /** + * The ID of a general ledger account. General ledger accounts are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + @SerializedName("revenue_gl_account_id") + @Expose + private String revenueGlAccountId; + /** Revenue schedule type */ @SerializedName("revenue_schedule_type") @Expose @@ -167,11 +191,40 @@ public class Plan extends Resource { @Expose private String setupFeeAccountingCode; + /** + * The ID of a general ledger account. General ledger accounts are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + @SerializedName("setup_fee_liability_gl_account_id") + @Expose + private String setupFeeLiabilityGlAccountId; + + /** + * The ID of a performance obligation. Performance obligations are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + @SerializedName("setup_fee_performance_obligation_id") + @Expose + private String setupFeePerformanceObligationId; + + /** + * The ID of a general ledger account. General ledger accounts are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + @SerializedName("setup_fee_revenue_gl_account_id") + @Expose + private String setupFeeRevenueGlAccountId; + /** Setup fee revenue schedule type */ @SerializedName("setup_fee_revenue_schedule_type") @Expose private Constants.RevenueScheduleType setupFeeRevenueScheduleType; + /** Setup Fees */ + @SerializedName("setup_fees") + @Expose + private List setupFees; + /** The current state of the plan. */ @SerializedName("state") @Expose @@ -349,12 +402,12 @@ public void setCreatedAt(final DateTime createdAt) { this.createdAt = createdAt; } - /** Pricing */ + /** Present only when `pricing_model` is `'fixed'`. */ public List getCurrencies() { return this.currencies; } - /** @param currencies Pricing */ + /** @param currencies Present only when `pricing_model` is `'fixed'`. */ public void setCurrencies(final List currencies) { this.currencies = currencies; } @@ -455,6 +508,23 @@ public void setIntervalUnit(final Constants.IntervalUnit intervalUnit) { this.intervalUnit = intervalUnit; } + /** + * The ID of a general ledger account. General ledger accounts are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + public String getLiabilityGlAccountId() { + return this.liabilityGlAccountId; + } + + /** + * @param liabilityGlAccountId The ID of a general ledger account. General ledger accounts are + * only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced + * features. + */ + public void setLiabilityGlAccountId(final String liabilityGlAccountId) { + this.liabilityGlAccountId = liabilityGlAccountId; + } + /** * This name describes your plan and will appear on the Hosted Payment Page and the subscriber's * invoice. @@ -481,6 +551,23 @@ public void setObject(final String object) { this.object = object; } + /** + * The ID of a performance obligation. Performance obligations are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + public String getPerformanceObligationId() { + return this.performanceObligationId; + } + + /** + * @param performanceObligationId The ID of a performance obligation. Performance obligations are + * only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced + * features. + */ + public void setPerformanceObligationId(final String performanceObligationId) { + this.performanceObligationId = performanceObligationId; + } + /** * A fixed pricing model has the same price for each billing period. A ramp pricing model defines * a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing @@ -509,6 +596,22 @@ public void setRampIntervals(final List rampIntervals) { this.rampIntervals = rampIntervals; } + /** + * The ID of a general ledger account. General ledger accounts are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + public String getRevenueGlAccountId() { + return this.revenueGlAccountId; + } + + /** + * @param revenueGlAccountId The ID of a general ledger account. General ledger accounts are only + * accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + public void setRevenueGlAccountId(final String revenueGlAccountId) { + this.revenueGlAccountId = revenueGlAccountId; + } + /** Revenue schedule type */ public Constants.RevenueScheduleType getRevenueScheduleType() { return this.revenueScheduleType; @@ -535,6 +638,57 @@ public void setSetupFeeAccountingCode(final String setupFeeAccountingCode) { this.setupFeeAccountingCode = setupFeeAccountingCode; } + /** + * The ID of a general ledger account. General ledger accounts are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + public String getSetupFeeLiabilityGlAccountId() { + return this.setupFeeLiabilityGlAccountId; + } + + /** + * @param setupFeeLiabilityGlAccountId The ID of a general ledger account. General ledger accounts + * are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced + * features. + */ + public void setSetupFeeLiabilityGlAccountId(final String setupFeeLiabilityGlAccountId) { + this.setupFeeLiabilityGlAccountId = setupFeeLiabilityGlAccountId; + } + + /** + * The ID of a performance obligation. Performance obligations are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + public String getSetupFeePerformanceObligationId() { + return this.setupFeePerformanceObligationId; + } + + /** + * @param setupFeePerformanceObligationId The ID of a performance obligation. Performance + * obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec + * Advanced features. + */ + public void setSetupFeePerformanceObligationId(final String setupFeePerformanceObligationId) { + this.setupFeePerformanceObligationId = setupFeePerformanceObligationId; + } + + /** + * The ID of a general ledger account. General ledger accounts are only accessible as a part of + * the Recurly RevRec Standard and Recurly RevRec Advanced features. + */ + public String getSetupFeeRevenueGlAccountId() { + return this.setupFeeRevenueGlAccountId; + } + + /** + * @param setupFeeRevenueGlAccountId The ID of a general ledger account. General ledger accounts + * are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced + * features. + */ + public void setSetupFeeRevenueGlAccountId(final String setupFeeRevenueGlAccountId) { + this.setupFeeRevenueGlAccountId = setupFeeRevenueGlAccountId; + } + /** Setup fee revenue schedule type */ public Constants.RevenueScheduleType getSetupFeeRevenueScheduleType() { return this.setupFeeRevenueScheduleType; @@ -546,6 +700,16 @@ public void setSetupFeeRevenueScheduleType( this.setupFeeRevenueScheduleType = setupFeeRevenueScheduleType; } + /** Setup Fees */ + public List getSetupFees() { + return this.setupFees; + } + + /** @param setupFees Setup Fees */ + public void setSetupFees(final List setupFees) { + this.setupFees = setupFees; + } + /** The current state of the plan. */ public Constants.ActiveState getState() { return this.state; diff --git a/src/main/java/com/recurly/v3/resources/PlanCode.java b/src/main/java/com/recurly/v3/resources/PlanCode.java new file mode 100644 index 00000000..c6dbf32f --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/PlanCode.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class PlanCode extends Resource {} diff --git a/src/main/java/com/recurly/v3/resources/PlanIntervalLength.java b/src/main/java/com/recurly/v3/resources/PlanIntervalLength.java new file mode 100644 index 00000000..90c84c24 --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/PlanIntervalLength.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class PlanIntervalLength extends Resource {} diff --git a/src/main/java/com/recurly/v3/resources/PlanName.java b/src/main/java/com/recurly/v3/resources/PlanName.java new file mode 100644 index 00000000..7425391a --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/PlanName.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class PlanName extends Resource {} diff --git a/src/main/java/com/recurly/v3/resources/PlanPricing.java b/src/main/java/com/recurly/v3/resources/PlanPricing.java index aa9c46ac..2ce308f6 100644 --- a/src/main/java/com/recurly/v3/resources/PlanPricing.java +++ b/src/main/java/com/recurly/v3/resources/PlanPricing.java @@ -18,9 +18,18 @@ public class PlanPricing extends Resource { private String currency; /** - * Amount of one-time setup fee automatically charged at the beginning of a subscription billing - * cycle. For subscription plans with a trial, the setup fee will be charged at the time of - * signup. Setup fees do not increase with the quantity of a subscription plan. + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + @SerializedName("price_segment_id") + @Expose + private String priceSegmentId; + + /** + * This field is deprecated, please use top level `setup_fees` instead. Amount of one-time setup + * fee automatically charged at the beginning of a subscription billing cycle. For subscription + * plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not + * increase with the quantity of a subscription plan. */ @SerializedName("setup_fee") @Expose @@ -31,7 +40,7 @@ public class PlanPricing extends Resource { @Expose private Boolean taxInclusive; - /** This field should not be sent when the pricing model is 'ramp'. */ + /** This field should not be sent when the pricing model is `'ramp'`. */ @SerializedName("unit_amount") @Expose private BigDecimal unitAmount; @@ -47,19 +56,37 @@ public void setCurrency(final String currency) { } /** - * Amount of one-time setup fee automatically charged at the beginning of a subscription billing - * cycle. For subscription plans with a trial, the setup fee will be charged at the time of - * signup. Setup fees do not increase with the quantity of a subscription plan. + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + public String getPriceSegmentId() { + return this.priceSegmentId; + } + + /** + * @param priceSegmentId The price segment ID or code. For ID no prefix is used e.g. + * `e28zov4fw0v2`. For requests, the code can also be used. Use prefix `code-`, e.g. + * `code-gold`. + */ + public void setPriceSegmentId(final String priceSegmentId) { + this.priceSegmentId = priceSegmentId; + } + + /** + * This field is deprecated, please use top level `setup_fees` instead. Amount of one-time setup + * fee automatically charged at the beginning of a subscription billing cycle. For subscription + * plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not + * increase with the quantity of a subscription plan. */ public BigDecimal getSetupFee() { return this.setupFee; } /** - * @param setupFee Amount of one-time setup fee automatically charged at the beginning of a - * subscription billing cycle. For subscription plans with a trial, the setup fee will be - * charged at the time of signup. Setup fees do not increase with the quantity of a - * subscription plan. + * @param setupFee This field is deprecated, please use top level `setup_fees` instead. Amount of + * one-time setup fee automatically charged at the beginning of a subscription billing cycle. + * For subscription plans with a trial, the setup fee will be charged at the time of signup. + * Setup fees do not increase with the quantity of a subscription plan. */ public void setSetupFee(final BigDecimal setupFee) { this.setupFee = setupFee; @@ -75,12 +102,12 @@ public void setTaxInclusive(final Boolean taxInclusive) { this.taxInclusive = taxInclusive; } - /** This field should not be sent when the pricing model is 'ramp'. */ + /** This field should not be sent when the pricing model is `'ramp'`. */ public BigDecimal getUnitAmount() { return this.unitAmount; } - /** @param unitAmount This field should not be sent when the pricing model is 'ramp'. */ + /** @param unitAmount This field should not be sent when the pricing model is `'ramp'`. */ public void setUnitAmount(final BigDecimal unitAmount) { this.unitAmount = unitAmount; } diff --git a/src/main/java/com/recurly/v3/resources/PlanRampPricing.java b/src/main/java/com/recurly/v3/resources/PlanRampPricing.java index 36f336ae..665bfb6b 100644 --- a/src/main/java/com/recurly/v3/resources/PlanRampPricing.java +++ b/src/main/java/com/recurly/v3/resources/PlanRampPricing.java @@ -17,6 +17,14 @@ public class PlanRampPricing extends Resource { @Expose private String currency; + /** + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + @SerializedName("price_segment_id") + @Expose + private String priceSegmentId; + /** Represents the price for the Ramp Interval. */ @SerializedName("unit_amount") @Expose @@ -32,6 +40,23 @@ public void setCurrency(final String currency) { this.currency = currency; } + /** + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + public String getPriceSegmentId() { + return this.priceSegmentId; + } + + /** + * @param priceSegmentId The price segment ID or code. For ID no prefix is used e.g. + * `e28zov4fw0v2`. For requests, the code can also be used. Use prefix `code-`, e.g. + * `code-gold`. + */ + public void setPriceSegmentId(final String priceSegmentId) { + this.priceSegmentId = priceSegmentId; + } + /** Represents the price for the Ramp Interval. */ public BigDecimal getUnitAmount() { return this.unitAmount; diff --git a/src/main/java/com/recurly/v3/resources/PlanSetupPricing.java b/src/main/java/com/recurly/v3/resources/PlanSetupPricing.java new file mode 100644 index 00000000..f6cfad7a --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/PlanSetupPricing.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.resources; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import com.recurly.v3.Resource; +import java.math.BigDecimal; + +public class PlanSetupPricing extends Resource { + + /** 3-letter ISO 4217 currency code. */ + @SerializedName("currency") + @Expose + private String currency; + + /** + * Amount of one-time setup fee automatically charged at the beginning of a subscription billing + * cycle. For subscription plans with a trial, the setup fee will be charged at the time of + * signup. Setup fees do not increase with the quantity of a subscription plan. + */ + @SerializedName("unit_amount") + @Expose + private BigDecimal unitAmount; + + /** 3-letter ISO 4217 currency code. */ + public String getCurrency() { + return this.currency; + } + + /** @param currency 3-letter ISO 4217 currency code. */ + public void setCurrency(final String currency) { + this.currency = currency; + } + + /** + * Amount of one-time setup fee automatically charged at the beginning of a subscription billing + * cycle. For subscription plans with a trial, the setup fee will be charged at the time of + * signup. Setup fees do not increase with the quantity of a subscription plan. + */ + public BigDecimal getUnitAmount() { + return this.unitAmount; + } + + /** + * @param unitAmount Amount of one-time setup fee automatically charged at the beginning of a + * subscription billing cycle. For subscription plans with a trial, the setup fee will be + * charged at the time of signup. Setup fees do not increase with the quantity of a + * subscription plan. + */ + public void setUnitAmount(final BigDecimal unitAmount) { + this.unitAmount = unitAmount; + } +} diff --git a/src/main/java/com/recurly/v3/resources/PriceSegment.java b/src/main/java/com/recurly/v3/resources/PriceSegment.java new file mode 100644 index 00000000..efd72e9f --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/PriceSegment.java @@ -0,0 +1,58 @@ +/** + * 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 PriceSegment extends Resource { + + /** The price segment code, e.g. `my-price-segment`. */ + @SerializedName("code") + @Expose + private String code; + + /** The price segment ID, e.g. `e28zov4fw0v2`. */ + @SerializedName("id") + @Expose + private String id; + + /** Object type */ + @SerializedName("object") + @Expose + private String object; + + /** The price segment code, e.g. `my-price-segment`. */ + public String getCode() { + return this.code; + } + + /** @param code The price segment code, e.g. `my-price-segment`. */ + public void setCode(final String code) { + this.code = code; + } + + /** The price segment ID, e.g. `e28zov4fw0v2`. */ + public String getId() { + return this.id; + } + + /** @param id The price segment ID, e.g. `e28zov4fw0v2`. */ + public void setId(final String id) { + this.id = id; + } + + /** 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/PriceSegmentCode.java b/src/main/java/com/recurly/v3/resources/PriceSegmentCode.java new file mode 100644 index 00000000..1a51b3e0 --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/PriceSegmentCode.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class PriceSegmentCode extends Resource {} diff --git a/src/main/java/com/recurly/v3/resources/PriceSegmentId.java b/src/main/java/com/recurly/v3/resources/PriceSegmentId.java new file mode 100644 index 00000000..1cc752a5 --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/PriceSegmentId.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class PriceSegmentId extends Resource {} diff --git a/src/main/java/com/recurly/v3/resources/PriceSegmentIdOrCode.java b/src/main/java/com/recurly/v3/resources/PriceSegmentIdOrCode.java new file mode 100644 index 00000000..556ba1c6 --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/PriceSegmentIdOrCode.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class PriceSegmentIdOrCode extends Resource {} diff --git a/src/main/java/com/recurly/v3/resources/Pricing.java b/src/main/java/com/recurly/v3/resources/Pricing.java index 25b4e01e..b587c79e 100644 --- a/src/main/java/com/recurly/v3/resources/Pricing.java +++ b/src/main/java/com/recurly/v3/resources/Pricing.java @@ -22,7 +22,6 @@ public class Pricing extends Resource { @Expose private Boolean taxInclusive; - /** Unit price */ @SerializedName("unit_amount") @Expose private BigDecimal unitAmount; @@ -47,12 +46,11 @@ public void setTaxInclusive(final Boolean taxInclusive) { this.taxInclusive = taxInclusive; } - /** Unit price */ public BigDecimal getUnitAmount() { return this.unitAmount; } - /** @param unitAmount Unit price */ + /** @param unitAmount */ public void setUnitAmount(final BigDecimal unitAmount) { this.unitAmount = unitAmount; } diff --git a/src/main/java/com/recurly/v3/resources/Subscription.java b/src/main/java/com/recurly/v3/resources/Subscription.java index 277441f1..210b8173 100644 --- a/src/main/java/com/recurly/v3/resources/Subscription.java +++ b/src/main/java/com/recurly/v3/resources/Subscription.java @@ -228,6 +228,14 @@ public class Subscription extends Resource { @Expose private String poNumber; + /** + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + @SerializedName("price_segment_id") + @Expose + private String priceSegmentId; + /** Subscription quantity */ @SerializedName("quantity") @Expose @@ -782,6 +790,23 @@ public void setPoNumber(final String poNumber) { this.poNumber = poNumber; } + /** + * The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For requests, the + * code can also be used. Use prefix `code-`, e.g. `code-gold`. + */ + public String getPriceSegmentId() { + return this.priceSegmentId; + } + + /** + * @param priceSegmentId The price segment ID or code. For ID no prefix is used e.g. + * `e28zov4fw0v2`. For requests, the code can also be used. Use prefix `code-`, e.g. + * `code-gold`. + */ + public void setPriceSegmentId(final String priceSegmentId) { + this.priceSegmentId = priceSegmentId; + } + /** Subscription quantity */ public Integer getQuantity() { return this.quantity; diff --git a/src/main/java/com/recurly/v3/resources/TaxInclusive.java b/src/main/java/com/recurly/v3/resources/TaxInclusive.java new file mode 100644 index 00000000..37086a3e --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/TaxInclusive.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class TaxInclusive extends Resource {} diff --git a/src/main/java/com/recurly/v3/resources/UnitAmount.java b/src/main/java/com/recurly/v3/resources/UnitAmount.java new file mode 100644 index 00000000..8a80adb5 --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/UnitAmount.java @@ -0,0 +1,10 @@ +/** + * 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.recurly.v3.Resource; + +public class UnitAmount extends Resource {}