From 37f4109e16bf034a724fdda0b5104d1379377ce7 Mon Sep 17 00:00:00 2001 From: DX Codefresh Date: Thu, 19 Jan 2023 18:02:33 +0000 Subject: [PATCH] Generated Latest Changes for v2019-10-10 --- lib/recurly.d.ts | 9 ++++++++ lib/recurly/Client.js | 1 + lib/recurly/resources/LineItem.js | 2 ++ openapi/api.yaml | 34 +++++++++++++++++++++---------- package-lock.json | 4 ++-- 5 files changed, 37 insertions(+), 13 deletions(-) diff --git a/lib/recurly.d.ts b/lib/recurly.d.ts index 0fae8f30..df6361fd 100644 --- a/lib/recurly.d.ts +++ b/lib/recurly.d.ts @@ -1518,6 +1518,10 @@ export declare class LineItem { * If this date is provided, it indicates the end of a time range. */ endDate?: Date | null; + /** + * 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; /** * When the line item was created. */ @@ -3482,6 +3486,10 @@ export interface LineItemCreate { * If this date is provided, it indicates the end of a time range. */ endDate?: Date | null; + /** + * 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; } @@ -5285,6 +5293,7 @@ export declare class Client { * code: accountCode, * firstName: 'Benjamin', * lastName: 'Du Monde', + * preferredTimeZone: 'America/Chicago', * address: { * street1: '900 Camp St', * city: 'New Orleans', diff --git a/lib/recurly/Client.js b/lib/recurly/Client.js index 2af960c2..a65c05e8 100644 --- a/lib/recurly/Client.js +++ b/lib/recurly/Client.js @@ -151,6 +151,7 @@ class Client extends BaseClient { * code: accountCode, * firstName: 'Benjamin', * lastName: 'Du Monde', + * preferredTimeZone: 'America/Chicago', * address: { * street1: '900 Camp St', * city: 'New Orleans', diff --git a/lib/recurly/resources/LineItem.js b/lib/recurly/resources/LineItem.js index c4a140ed..879b0cd5 100644 --- a/lib/recurly/resources/LineItem.js +++ b/lib/recurly/resources/LineItem.js @@ -24,6 +24,7 @@ const Resource = require('../Resource') * @prop {number} creditApplied - The amount of credit from this line item that was applied to the invoice. * @prop {string} creditReasonCode - The reason the credit was given when line item is `type=credit`. * @prop {string} currency - 3-letter ISO 4217 currency code. + * @prop {Array.} customFields - 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. * @prop {string} description - Description that appears on the invoice. For subscription related items this will be filled in automatically. * @prop {number} discount - The discount applied to the line item. * @prop {Date} endDate - If this date is provided, it indicates the end of a time range. @@ -79,6 +80,7 @@ class LineItem extends Resource { creditApplied: Number, creditReasonCode: String, currency: String, + customFields: ['CustomField'], description: String, discount: Number, endDate: Date, diff --git a/openapi/api.yaml b/openapi/api.yaml index 8cfc1cd9..10fdb231 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -686,6 +686,7 @@ paths: code: accountCode, firstName: 'Benjamin', lastName: 'Du Monde', + preferredTimeZone: 'America/Chicago', address: { street1: '900 Camp St', city: 'New Orleans', @@ -714,6 +715,7 @@ paths: "code": account_code, "first_name": "Benjamin", "last_name": "Du Monde", + "preferred_time_zone": "America/Chicago", "acquisition": { "campaign": "podcast-marketing", "channel": "social_media", @@ -749,6 +751,7 @@ paths: Code = accountCode, FirstName = "Benjamin", LastName = "Du Monde", + PreferredTimeZone = "America/Chicago", Address = new Address() { City = "New Orleans", @@ -779,6 +782,7 @@ paths: code: account_code, first_name: "Benjamin", last_name: "Du Monde", + preferred_time_zone: "America/Chicago", acquisition: { campaign: "podcast-marketing", channel: "social_media", @@ -817,6 +821,7 @@ paths: accountReq.setCode(accountCode); accountReq.setFirstName("Aaron"); accountReq.setLastName("Du Monde"); + accountReq.setPreferredTimeZone("America/Chicago"); address.setStreet1("900 Camp St."); address.setCity("New Orleans"); @@ -843,6 +848,7 @@ paths: "code" => $account_code, "first_name" => "Douglas", "last_name" => "DuMonde", + "preferred_time_zone" => "America/Chicago", "shipping_addresses" => [ [ "first_name" => "Douglas", @@ -872,17 +878,17 @@ paths: - lang: Go source: "accountReq := &recurly.AccountCreate{\n\tCode: &accountCode,\n\tFirstName: recurly.String(\"Isaac\"),\n\tLastName: recurly.String(\"Du Monde\"),\n\tEmail: - \ recurly.String(\"isaac@example.com\"),\n\tBillingInfo: &recurly.BillingInfoCreate{\n\t\tFirstName: - recurly.String(\"Isaac\"),\n\t\tLastName: recurly.String(\"Du Monde\"),\n\t\tAddress: - &recurly.AddressCreate{\n\t\t\tPhone: recurly.String(\"415-555-5555\"),\n\t\t\tStreet1: - \ recurly.String(\"400 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(\"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 + \ recurly.String(\"isaac@example.com\"),\n\tPreferredTimeZone: recurly.String(\"America/Los_Angeles\"),\n\tBillingInfo: + &recurly.BillingInfoCreate{\n\t\tFirstName: recurly.String(\"Isaac\"),\n\t\tLastName: + \ recurly.String(\"Du Monde\"),\n\t\tAddress: &recurly.AddressCreate{\n\t\t\tPhone: + \ recurly.String(\"415-555-5555\"),\n\t\t\tStreet1: recurly.String(\"400 + 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(\"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 Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Created Account: %s\", account.Id)" "/sites/{site_id}/accounts/{account_id}": @@ -6175,6 +6181,7 @@ paths: - item - plan - subscription + - charge responses: '200': description: A list of the site's custom field definitions. @@ -17444,6 +17451,7 @@ components: - item - plan - subscription + - charge name: type: string title: Name @@ -18696,6 +18704,8 @@ components: format: date-time title: End date description: If this date is provided, it indicates the end of a time range. + custom_fields: + "$ref": "#/components/schemas/CustomFields" created_at: type: string format: date-time @@ -18890,6 +18900,8 @@ components: format: date-time title: End date description: If this date is provided, it indicates the end of a time range. + custom_fields: + "$ref": "#/components/schemas/CustomFields" required: - currency - unit_amount diff --git a/package-lock.json b/package-lock.json index 6543783b..f761eeae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "recurly", - "version": "3.24.0", + "version": "3.25.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "recurly", - "version": "3.24.0", + "version": "3.25.0", "license": "MIT", "devDependencies": { "@types/node": "^12.11.1",