From b2d733cd281c898a4843fa09c82b117cd9cb5e5f Mon Sep 17 00:00:00 2001 From: Recurly Integrations Date: Fri, 24 May 2024 16:52:29 +0000 Subject: [PATCH] Generated Latest Changes for v2019-10-10 --- lib/recurly.d.ts | 71 +++++++++++++- lib/recurly/Client.js | 3 + lib/recurly/resources/Account.js | 2 + lib/recurly/resources/Address.js | 2 + lib/recurly/resources/GatewayAttributes.js | 2 +- lib/recurly/resources/InvoiceAddress.js | 2 + lib/recurly/resources/PaymentMethod.js | 2 + lib/recurly/resources/ShippingAddress.js | 2 + .../SubscriptionRampIntervalResponse.js | 4 + openapi/api.yaml | 92 +++++++++++++++++-- package-lock.json | 4 +- 11 files changed, 173 insertions(+), 13 deletions(-) diff --git a/lib/recurly.d.ts b/lib/recurly.d.ts index 2c60d9ea..c313a06c 100644 --- a/lib/recurly.d.ts +++ b/lib/recurly.d.ts @@ -80,6 +80,10 @@ export declare class Address { * Country, 2-letter ISO 3166-1 alpha-2 code. */ country?: string | null; + /** + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + */ + geoCode?: string | null; } @@ -223,6 +227,10 @@ export declare class Account { * The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value. */ customFields?: CustomField[] | null; + /** + * The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive. + */ + entityUseCode?: string | null; } @@ -261,6 +269,10 @@ export declare class ShippingAddress { * Country, 2-letter ISO 3166-1 alpha-2 code. */ country?: string | null; + /** + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + */ + geoCode?: string | null; /** * Created at */ @@ -355,6 +367,10 @@ export declare class PaymentMethod { * Gateway specific attributes associated with this PaymentMethod */ gatewayAttributes?: GatewayAttributes | null; + /** + * Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network. + */ + cardNetworkPreference?: string | null; /** * Billing Agreement identifier. Only present for Amazon or Paypal payment methods. */ @@ -380,7 +396,7 @@ export declare class PaymentMethod { export declare class GatewayAttributes { /** - * Used by Adyen gateways. The Shopper Reference value used when the external token was created. + * Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. For Braintree the PayPal PayerID is populated in the response. */ accountReference?: string | null; @@ -1280,6 +1296,10 @@ export declare class InvoiceAddress { * Country, 2-letter ISO 3166-1 alpha-2 code. */ country?: string | null; + /** + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + */ + geoCode?: string | null; } @@ -2102,6 +2122,14 @@ export declare class SubscriptionRampIntervalResponse { * Represents how many billing cycles are left in a ramp interval. */ remainingBillingCycles?: number | null; + /** + * Date the ramp interval starts + */ + startingOn?: Date | null; + /** + * Date the ramp interval ends + */ + endingOn?: Date | null; /** * Represents the price for the ramp interval. */ @@ -3082,6 +3110,10 @@ export interface AccountCreate { * The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value. */ customFields?: CustomField[] | null; + /** + * The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive. + */ + entityUseCode?: string | null; } @@ -3140,6 +3172,10 @@ export interface ShippingAddressCreate { * Country, 2-letter ISO 3166-1 alpha-2 code. */ country?: string | null; + /** + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + */ + geoCode?: string | null; } @@ -3180,6 +3216,10 @@ export interface Address { * Country, 2-letter ISO 3166-1 alpha-2 code. */ country?: string | null; + /** + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + */ + geoCode?: string | null; } @@ -3241,6 +3281,10 @@ export interface BillingInfoCreate { * Additional attributes to send to the gateway. */ gatewayAttributes?: GatewayAttributes | null; + /** + * Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network. + */ + cardNetworkPreference?: string | null; /** * Amazon billing agreement ID */ @@ -3249,6 +3293,10 @@ export interface BillingInfoCreate { * PayPal billing agreement ID */ paypalBillingAgreementId?: string | null; + /** + * Roku's CIB if billing through Roku + */ + rokuBillingAgreementId?: string | null; /** * Fraud Session ID */ @@ -3310,7 +3358,7 @@ export interface BillingInfoCreate { export interface GatewayAttributes { /** - * Used by Adyen gateways. The Shopper Reference value used when the external token was created. Must be used in conjunction with gateway_token and gateway_code. + * Used by Adyen and Braintree gateways. For Adyen The Shopper Reference value used when the external token was created. Must be used in conjunction with gateway_token and gateway_code. For Braintree the PayPal PayerID is populated in the response. */ accountReference?: string | null; @@ -3390,6 +3438,10 @@ export interface AccountUpdate { * The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value. */ customFields?: CustomField[] | null; + /** + * The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive. + */ + entityUseCode?: string | null; } @@ -3564,6 +3616,10 @@ export interface ShippingAddressUpdate { * Country, 2-letter ISO 3166-1 alpha-2 code. */ country?: string | null; + /** + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + */ + geoCode?: string | null; } @@ -3933,6 +3989,10 @@ export interface InvoiceAddress { * Country, 2-letter ISO 3166-1 alpha-2 code. */ country?: string | null; + /** + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + */ + geoCode?: string | null; } @@ -5089,6 +5149,10 @@ export interface AccountPurchase { * The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value. */ customFields?: CustomField[] | null; + /** + * The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive. + */ + entityUseCode?: string | null; } @@ -5908,6 +5972,7 @@ export declare class Client { * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * + * @param {string} options.state - Invoice state. * @param {number} options.limit - Limit number of records 1-200. * @param {string} options.order - Sort order. * @param {string} options.sort - Sort field. You *really* only want to sort by `updated_at` in ascending @@ -7043,6 +7108,7 @@ export declare class Client { * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * + * @param {string} options.state - Invoice state. * @param {number} options.limit - Limit number of records 1-200. * @param {string} options.order - Sort order. * @param {string} options.sort - Sort field. You *really* only want to sort by `updated_at` in ascending @@ -8443,6 +8509,7 @@ export declare class Client { * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * + * @param {string} options.state - Invoice state. * @param {number} options.limit - Limit number of records 1-200. * @param {string} options.order - Sort order. * @param {string} options.sort - Sort field. You *really* only want to sort by `updated_at` in ascending diff --git a/lib/recurly/Client.js b/lib/recurly/Client.js index a65c05e8..0c984379 100644 --- a/lib/recurly/Client.js +++ b/lib/recurly/Client.js @@ -838,6 +838,7 @@ class Client extends BaseClient { * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * + * @param {string} options.state - Invoice state. * @param {number} options.limit - Limit number of records 1-200. * @param {string} options.order - Sort order. * @param {string} options.sort - Sort field. You *really* only want to sort by `updated_at` in ascending @@ -2163,6 +2164,7 @@ class Client extends BaseClient { * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * + * @param {string} options.state - Invoice state. * @param {number} options.limit - Limit number of records 1-200. * @param {string} options.order - Sort order. * @param {string} options.sort - Sort field. You *really* only want to sort by `updated_at` in ascending @@ -3815,6 +3817,7 @@ class Client extends BaseClient { * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * + * @param {string} options.state - Invoice state. * @param {number} options.limit - Limit number of records 1-200. * @param {string} options.order - Sort order. * @param {string} options.sort - Sort field. You *really* only want to sort by `updated_at` in ascending diff --git a/lib/recurly/resources/Account.js b/lib/recurly/resources/Account.js index aa560146..0a634a98 100644 --- a/lib/recurly/resources/Account.js +++ b/lib/recurly/resources/Account.js @@ -23,6 +23,7 @@ const Resource = require('../Resource') * @prop {Date} deletedAt - If present, when the account was last marked inactive. * @prop {string} dunningCampaignId - Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. * @prop {string} email - The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique. + * @prop {string} entityUseCode - The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive. * @prop {string} exemptionCertificate - The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account. * @prop {string} firstName * @prop {boolean} hasActiveSubscription - Indicates if the account has an active subscription. @@ -59,6 +60,7 @@ class Account extends Resource { deletedAt: Date, dunningCampaignId: String, email: String, + entityUseCode: String, exemptionCertificate: String, firstName: String, hasActiveSubscription: Boolean, diff --git a/lib/recurly/resources/Address.js b/lib/recurly/resources/Address.js index 5672dfaa..cec7c07f 100644 --- a/lib/recurly/resources/Address.js +++ b/lib/recurly/resources/Address.js @@ -15,6 +15,7 @@ const Resource = require('../Resource') * @prop {string} city - City * @prop {string} country - Country, 2-letter ISO 3166-1 alpha-2 code. * @prop {string} firstName - First name + * @prop {string} geoCode - Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration * @prop {string} lastName - Last name * @prop {string} phone - Phone number * @prop {string} postalCode - Zip or postal code. @@ -28,6 +29,7 @@ class Address extends Resource { city: String, country: String, firstName: String, + geoCode: String, lastName: String, phone: String, postalCode: String, diff --git a/lib/recurly/resources/GatewayAttributes.js b/lib/recurly/resources/GatewayAttributes.js index 25191d19..90843fa1 100644 --- a/lib/recurly/resources/GatewayAttributes.js +++ b/lib/recurly/resources/GatewayAttributes.js @@ -12,7 +12,7 @@ const Resource = require('../Resource') /** * GatewayAttributes * @typedef {Object} GatewayAttributes - * @prop {string} accountReference - Used by Adyen gateways. The Shopper Reference value used when the external token was created. + * @prop {string} accountReference - Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. For Braintree the PayPal PayerID is populated in the response. */ class GatewayAttributes extends Resource { static getSchema () { diff --git a/lib/recurly/resources/InvoiceAddress.js b/lib/recurly/resources/InvoiceAddress.js index 211d8b42..b922a9ac 100644 --- a/lib/recurly/resources/InvoiceAddress.js +++ b/lib/recurly/resources/InvoiceAddress.js @@ -16,6 +16,7 @@ const Resource = require('../Resource') * @prop {string} company - Company * @prop {string} country - Country, 2-letter ISO 3166-1 alpha-2 code. * @prop {string} firstName - First name + * @prop {string} geoCode - Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration * @prop {string} lastName - Last name * @prop {string} nameOnAccount - Name on account * @prop {string} phone - Phone number @@ -31,6 +32,7 @@ class InvoiceAddress extends Resource { company: String, country: String, firstName: String, + geoCode: String, lastName: String, nameOnAccount: String, phone: String, diff --git a/lib/recurly/resources/PaymentMethod.js b/lib/recurly/resources/PaymentMethod.js index 57796072..7fc878a3 100644 --- a/lib/recurly/resources/PaymentMethod.js +++ b/lib/recurly/resources/PaymentMethod.js @@ -14,6 +14,7 @@ const Resource = require('../Resource') * @typedef {Object} PaymentMethod * @prop {string} accountType - The bank account type. Only present for ACH payment methods. * @prop {string} billingAgreementId - Billing Agreement identifier. Only present for Amazon or Paypal payment methods. + * @prop {string} cardNetworkPreference - Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network. * @prop {string} cardType - Visa, MasterCard, American Express, Discover, JCB, etc. * @prop {string} ccBinCountry - The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. * @prop {number} expMonth - Expiration month. @@ -34,6 +35,7 @@ class PaymentMethod extends Resource { return { accountType: String, billingAgreementId: String, + cardNetworkPreference: String, cardType: String, ccBinCountry: String, expMonth: Number, diff --git a/lib/recurly/resources/ShippingAddress.js b/lib/recurly/resources/ShippingAddress.js index 8308dbbf..5773a8c6 100644 --- a/lib/recurly/resources/ShippingAddress.js +++ b/lib/recurly/resources/ShippingAddress.js @@ -19,6 +19,7 @@ const Resource = require('../Resource') * @prop {Date} createdAt - Created at * @prop {string} email * @prop {string} firstName + * @prop {string} geoCode - Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration * @prop {string} id - Shipping Address ID * @prop {string} lastName * @prop {string} nickname @@ -41,6 +42,7 @@ class ShippingAddress extends Resource { createdAt: Date, email: String, firstName: String, + geoCode: String, id: String, lastName: String, nickname: String, diff --git a/lib/recurly/resources/SubscriptionRampIntervalResponse.js b/lib/recurly/resources/SubscriptionRampIntervalResponse.js index ead2f456..4924a03f 100644 --- a/lib/recurly/resources/SubscriptionRampIntervalResponse.js +++ b/lib/recurly/resources/SubscriptionRampIntervalResponse.js @@ -12,15 +12,19 @@ const Resource = require('../Resource') /** * SubscriptionRampIntervalResponse * @typedef {Object} SubscriptionRampIntervalResponse + * @prop {Date} endingOn - Date the ramp interval ends * @prop {number} remainingBillingCycles - Represents how many billing cycles are left in a ramp interval. * @prop {number} startingBillingCycle - Represents the billing cycle where a ramp interval starts. + * @prop {Date} startingOn - Date the ramp interval starts * @prop {number} unitAmount - Represents the price for the ramp interval. */ class SubscriptionRampIntervalResponse extends Resource { static getSchema () { return { + endingOn: Date, remainingBillingCycles: Number, startingBillingCycle: Number, + startingOn: Date, unitAmount: Number } } diff --git a/openapi/api.yaml b/openapi/api.yaml index f32d168d..79338fca 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -885,7 +885,7 @@ paths: Alabama St.\"),\n\t\t\tCity: recurly.String(\"San Francisco\"),\n\t\t\tPostalCode: recurly.String(\"94110\"),\n\t\t\tCountry: recurly.String(\"US\"),\n\t\t\tRegion: \ recurly.String(\"CA\"),\n\t\t},\n\t\tNumber: recurly.String(\"4111111111111111\"),\n\t\tMonth: - \ recurly.String(\"12\"),\n\t\tYear: recurly.String(\"22\"),\n\t\tCvv: + \ recurly.String(\"12\"),\n\t\tYear: recurly.String(\"30\"),\n\t\tCvv: \ recurly.String(\"123\"),\n\t},\n}\n\naccount, err := client.CreateAccount(accountReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected @@ -3195,6 +3195,7 @@ paths: - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" + - "$ref": "#/components/parameters/invoice_state" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -7394,6 +7395,7 @@ paths: parameters: - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" + - "$ref": "#/components/parameters/invoice_state" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -7888,8 +7890,6 @@ paths: summary: Apply available credit to a pending or past due charge invoice description: Apply credit payment to the outstanding balance on an existing charge invoice from an account’s available balance from existing credit invoices. - Credit that was refunded from the invoice cannot be applied back to the invoice - as payment. parameters: - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" @@ -13059,6 +13059,7 @@ paths: - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" - "$ref": "#/components/parameters/ids" + - "$ref": "#/components/parameters/invoice_state" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -14724,6 +14725,18 @@ components: required: true schema: type: string + invoice_state: + name: state + in: query + description: Invoice state. + schema: + type: string + default: all + enum: + - pending + - past_due + - paid + - failed measured_unit_id: name: measured_unit_id in: path @@ -15662,6 +15675,11 @@ components: "$ref": "#/components/schemas/BillingInfoCreate" custom_fields: "$ref": "#/components/schemas/CustomFields" + entity_use_code: + type: string + description: The Avalara AvaTax value that can be passed to identify the + customer type for tax purposes. The range of values can be A - R (more + info at Avalara). Value is case-sensitive. AccountResponse: type: object properties: @@ -15781,6 +15799,11 @@ components: "$ref": "#/components/schemas/BillingInfo" custom_fields: "$ref": "#/components/schemas/CustomFields" + entity_use_code: + type: string + description: The Avalara AvaTax value that can be passed to identify the + customer type for tax purposes. The range of values can be A - R (more + info at Avalara). Value is case-sensitive. AccountNote: type: object required: @@ -15932,6 +15955,11 @@ components: type: string title: Country description: Country, 2-letter ISO 3166-1 alpha-2 code. + geo_code: + type: string + maxLength: 20 + description: Code that represents a geographic entity (location or object). + Only returned for Sling Vertex Integration AddOnMini: type: object title: Add-on mini details @@ -16652,16 +16680,30 @@ components: properties: account_reference: type: string - description: Used by Adyen gateways. The Shopper Reference value used - when the external token was created. Must be used in conjunction with - gateway_token and gateway_code. + description: Used by Adyen and Braintree gateways. For Adyen The Shopper + Reference value used when the external token was created. Must be + used in conjunction with gateway_token and gateway_code. For Braintree + the PayPal PayerID is populated in the response. maxLength: 264 + card_network_preference: + type: string + description: Represents the card network preference associated with the + billing info for dual badged cards. Must be a supported card network. + enum: + - Bancontact + - CartesBancaires + - Dankort + - MasterCard + - Visa amazon_billing_agreement_id: type: string title: Amazon billing agreement ID paypal_billing_agreement_id: type: string title: PayPal billing agreement ID + roku_billing_agreement_id: + type: string + title: Roku's CIB if billing through Roku fraud_session_id: type: string title: Fraud Session ID @@ -19734,6 +19776,11 @@ components: type: string maxLength: 50 description: Country, 2-letter ISO 3166-1 alpha-2 code. + geo_code: + type: string + maxLength: 20 + description: Code that represents a geographic entity (location or object). + Only returned for Sling Vertex Integration created_at: type: string title: Created at @@ -19789,6 +19836,11 @@ components: type: string maxLength: 50 description: Country, 2-letter ISO 3166-1 alpha-2 code. + geo_code: + type: string + maxLength: 20 + description: Code that represents a geographic entity (location or object). + Only returned for Sling Vertex Integration required: - first_name - last_name @@ -20039,6 +20091,11 @@ components: type: string maxLength: 50 description: Country, 2-letter ISO 3166-1 alpha-2 code. + geo_code: + type: string + maxLength: 20 + description: Code that represents a geographic entity (location or object). + Only returned for Sling Vertex Integration Site: type: object properties: @@ -21334,6 +21391,14 @@ components: remaining_billing_cycles: type: integer description: Represents how many billing cycles are left in a ramp interval. + starting_on: + type: string + format: date-time + title: Date the ramp interval starts + ending_on: + type: string + format: date-time + title: Date the ramp interval ends unit_amount: type: integer description: Represents the price for the ramp interval. @@ -22275,9 +22340,20 @@ components: properties: account_reference: type: string - description: Used by Adyen gateways. The Shopper Reference value used - when the external token was created. + description: Used by Adyen and Braintree gateways. For Adyen the Shopper + Reference value used when the external token was created. For Braintree + the PayPal PayerID is populated in the response. maxLength: 264 + card_network_preference: + type: string + description: Represents the card network preference associated with the + billing info for dual badged cards. Must be a supported card network. + enum: + - Bancontact + - CartesBancaires + - Dankort + - MasterCard + - Visa billing_agreement_id: type: string description: Billing Agreement identifier. Only present for Amazon or Paypal diff --git a/package-lock.json b/package-lock.json index 0f301be0..e373ecad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "recurly", - "version": "3.28.0", + "version": "3.29.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "recurly", - "version": "3.28.0", + "version": "3.29.0", "license": "MIT", "devDependencies": { "@types/node": "^12.11.1",