From 978e934ff3ecc675d2704ef837dac57e8fdabdf2 Mon Sep 17 00:00:00 2001 From: DX Codefresh Date: Mon, 22 May 2023 20:47:28 +0000 Subject: [PATCH] Generated Latest Changes for v2019-10-10 --- lib/recurly.d.ts | 24 +++++++++++++++++++++ lib/recurly/resources/GatewayAttributes.js | 25 ++++++++++++++++++++++ lib/recurly/resources/PaymentMethod.js | 2 ++ lib/recurly/resources/index.js | 1 + openapi/api.yaml | 23 ++++++++++++++++++++ package-lock.json | 4 ++-- 6 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 lib/recurly/resources/GatewayAttributes.js diff --git a/lib/recurly.d.ts b/lib/recurly.d.ts index 1a65446b..2c60d9ea 100644 --- a/lib/recurly.d.ts +++ b/lib/recurly.d.ts @@ -351,6 +351,10 @@ export declare class PaymentMethod { * An identifier for a specific payment gateway. */ gatewayCode?: string | null; + /** + * Gateway specific attributes associated with this PaymentMethod + */ + gatewayAttributes?: GatewayAttributes | null; /** * Billing Agreement identifier. Only present for Amazon or Paypal payment methods. */ @@ -374,6 +378,14 @@ export declare class PaymentMethod { } +export declare class GatewayAttributes { + /** + * Used by Adyen gateways. The Shopper Reference value used when the external token was created. + */ + accountReference?: string | null; + +} + export declare class FraudInfo { /** * Kount score @@ -3225,6 +3237,10 @@ export interface BillingInfoCreate { * An identifier for a specific payment gateway. Must be used in conjunction with `gateway_token`. */ gatewayCode?: string | null; + /** + * Additional attributes to send to the gateway. + */ + gatewayAttributes?: GatewayAttributes | null; /** * Amazon billing agreement ID */ @@ -3292,6 +3308,14 @@ 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. + */ + accountReference?: string | null; + +} + export interface CustomField { /** * Fields must be created in the UI before values can be assigned to them. diff --git a/lib/recurly/resources/GatewayAttributes.js b/lib/recurly/resources/GatewayAttributes.js new file mode 100644 index 00000000..25191d19 --- /dev/null +++ b/lib/recurly/resources/GatewayAttributes.js @@ -0,0 +1,25 @@ +/* istanbul ignore file */ +/** + * 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. + */ +'use strict' + +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. + */ +class GatewayAttributes extends Resource { + static getSchema () { + return { + accountReference: String + } + } +} + +module.exports = GatewayAttributes diff --git a/lib/recurly/resources/PaymentMethod.js b/lib/recurly/resources/PaymentMethod.js index 974f7105..57796072 100644 --- a/lib/recurly/resources/PaymentMethod.js +++ b/lib/recurly/resources/PaymentMethod.js @@ -19,6 +19,7 @@ const Resource = require('../Resource') * @prop {number} expMonth - Expiration month. * @prop {number} expYear - Expiration year. * @prop {string} firstSix - Credit card number's first six digits. + * @prop {GatewayAttributes} gatewayAttributes - Gateway specific attributes associated with this PaymentMethod * @prop {string} gatewayCode - An identifier for a specific payment gateway. * @prop {string} gatewayToken - A token used in place of a credit card in order to perform transactions. * @prop {string} lastFour - Credit card number's last four digits. Will refer to bank account if payment method is ACH. @@ -38,6 +39,7 @@ class PaymentMethod extends Resource { expMonth: Number, expYear: Number, firstSix: String, + gatewayAttributes: 'GatewayAttributes', gatewayCode: String, gatewayToken: String, lastFour: String, diff --git a/lib/recurly/resources/index.js b/lib/recurly/resources/index.js index 30b8dc77..aa9c5fcb 100644 --- a/lib/recurly/resources/index.js +++ b/lib/recurly/resources/index.js @@ -15,6 +15,7 @@ module.exports.Account = require('./Account') module.exports.ShippingAddress = require('./ShippingAddress') module.exports.BillingInfo = require('./BillingInfo') module.exports.PaymentMethod = require('./PaymentMethod') +module.exports.GatewayAttributes = require('./GatewayAttributes') module.exports.FraudInfo = require('./FraudInfo') module.exports.BillingInfoUpdatedBy = require('./BillingInfoUpdatedBy') module.exports.CustomField = require('./CustomField') diff --git a/openapi/api.yaml b/openapi/api.yaml index d59c2683..f32d168d 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -16645,6 +16645,17 @@ components: title: An identifier for a specific payment gateway. Must be used in conjunction with `gateway_token`. maxLength: 12 + gateway_attributes: + type: object + description: Additional attributes to send to the gateway. + x-class-name: GatewayAttributes + 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. + maxLength: 264 amazon_billing_agreement_id: type: string title: Amazon billing agreement ID @@ -21470,6 +21481,7 @@ components: - force_collect - refunded_externally - chargeback + - external_recovery currency: type: string title: Currency @@ -22185,6 +22197,7 @@ components: object: type: string enum: + - bacs - credit_card - paypal - amazon @@ -22255,6 +22268,16 @@ components: type: string description: An identifier for a specific payment gateway. maxLength: 13 + gateway_attributes: + type: object + description: Gateway specific attributes associated with this PaymentMethod + x-class-name: GatewayAttributes + properties: + account_reference: + type: string + description: Used by Adyen gateways. The Shopper Reference value used + when the external token was created. + maxLength: 264 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 66031c31..0f301be0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "recurly", - "version": "3.27.0", + "version": "3.28.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "recurly", - "version": "3.27.0", + "version": "3.28.0", "license": "MIT", "devDependencies": { "@types/node": "^12.11.1",