diff --git a/README.md b/README.md index fe91ce6..b06e054 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ A Node.js client for the GoCardless API. For full details of the GoCardless API, see the [API docs](https://developer.gocardless.com/). +PLEASE NOTE that this is intended only to be used in server-side code. Using it in client side code would expose your API key to your users. + +If you are using React, we offer bindings in our [react-dropin](https://github.com/gocardless/react-dropin) library. + ## Installation ```bash diff --git a/package-lock.json b/package-lock.json index 5bf1663..01badbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -718,13 +718,13 @@ } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" @@ -3783,37 +3783,24 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, "node_modules/glob/node_modules/brace-expansion": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.3.tgz", - "integrity": "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" + "balanced-match": "^1.0.0" } }, "node_modules/glob/node_modules/minimatch": { - "version": "9.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.8.tgz", - "integrity": "sha512-reYkDYtj/b19TeqbNZCV4q9t+Yxylf/rYBsLb42SXJatTv4/ylq5lEiAmhA/IToxO7NI2UzNMghHoHuaqDkAjw==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^5.0.2" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -6681,13 +6668,13 @@ } }, "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" @@ -7307,13 +7294,13 @@ } }, "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" diff --git a/src/services/balanceService.ts b/src/services/balanceService.ts index aa3a822..9b39548 100644 --- a/src/services/balanceService.ts +++ b/src/services/balanceService.ts @@ -9,19 +9,19 @@ interface BalanceListResponse extends Types.APIResponse { } interface BalanceListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // ID of a [creditor](#core-endpoints-creditors). + // ID of a [creditor](#core-endpoints-creditors). creditor: string; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/bankAccountHolderVerificationService.ts b/src/services/bankAccountHolderVerificationService.ts index 0233bbf..7b0287d 100644 --- a/src/services/bankAccountHolderVerificationService.ts +++ b/src/services/bankAccountHolderVerificationService.ts @@ -12,9 +12,9 @@ interface BankAccountHolderVerificationCreateRequest { // Resources linked to this BankAccountHolderVerification. links: Types.BankAccountHolderVerificationCreateRequestLinks; - // Type of the verification that has been performed - // eg. [Confirmation of - // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) + // Type of the verification that has been performed + // eg. [Confirmation of + // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) type: Types.BankAccountHolderVerificationType; } diff --git a/src/services/bankAuthorisationService.ts b/src/services/bankAuthorisationService.ts index 78040b4..14c4455 100644 --- a/src/services/bankAuthorisationService.ts +++ b/src/services/bankAuthorisationService.ts @@ -12,28 +12,28 @@ interface BankAuthorisationCreateRequest { // Resources linked to this BankAuthorisation. links: Types.BankAuthorisationCreateRequestLinks; - // URL that the payer can be redirected to after authorising the payment. + // URL that the payer can be redirected to after authorising the payment. // - // On completion of bank authorisation, the query parameter of either - // `outcome=success` or `outcome=failure` will be - // appended to the `redirect_uri` to indicate the result of the bank - // authorisation. If the bank authorisation is - // expired, the query parameter `outcome=timeout` will be appended to the - // `redirect_uri`, in which case you should - // prompt the user to try the bank authorisation step again. + // On completion of bank authorisation, the query parameter of either + // `outcome=success` or `outcome=failure` will be + // appended to the `redirect_uri` to indicate the result of the bank + // authorisation. If the bank authorisation is + // expired, the query parameter `outcome=timeout` will be appended to the + // `redirect_uri`, in which case you should + // prompt the user to try the bank authorisation step again. // - // Please note: bank authorisations can still fail despite an `outcome=success` - // on the `redirect_uri`. It is therefore recommended to wait for the relevant - // bank authorisation event, such as - // [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), - // [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), or - // [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) in - // order to show the correct outcome to the user. + // Please note: bank authorisations can still fail despite an `outcome=success` + // on the `redirect_uri`. It is therefore recommended to wait for the relevant + // bank authorisation event, such as + // [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), + // [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), or + // [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) in + // order to show the correct outcome to the user. // - // The BillingRequestFlow ID will also be appended to the `redirect_uri` as - // query parameter `id=BRF123`. + // The BillingRequestFlow ID will also be appended to the `redirect_uri` as + // query parameter `id=BRF123`. // - // Defaults to `https://pay.gocardless.com/billing/static/thankyou`. + // Defaults to `https://pay.gocardless.com/billing/static/thankyou`. redirect_uri?: string; } diff --git a/src/services/bankDetailsLookupService.ts b/src/services/bankDetailsLookupService.ts index 74ad8f1..737f986 100644 --- a/src/services/bankDetailsLookupService.ts +++ b/src/services/bankDetailsLookupService.ts @@ -9,35 +9,35 @@ interface BankDetailsLookupListResponse extends Types.APIResponse { } interface BankDetailsLookupCreateRequest { - // The account holder name associated with the account number (if available). - // If provided and the country code is GB, a payer name verification will be - // performed. + // The account holder name associated with the account number (if available). If + // provided and the country code is GB, a payer name verification will be + // performed. account_holder_name?: string; - // Bank account number - see [local details](#appendix-local-bank-details) for - // more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) for + // more information. Alternatively you can provide an `iban`. account_number?: string; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string; - // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // alpha-2 code. Must be provided if specifying local details. + // [ISO + // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // alpha-2 code. Must be provided if specifying local details. country_code?: string; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). iban?: string; } diff --git a/src/services/billingRequestFlowService.ts b/src/services/billingRequestFlowService.ts index 87fdf83..0e6c451 100644 --- a/src/services/billingRequestFlowService.ts +++ b/src/services/billingRequestFlowService.ts @@ -9,92 +9,92 @@ interface BillingRequestFlowListResponse extends Types.APIResponse { } interface BillingRequestFlowCreateRequest { - // (Experimental feature) Fulfil the Billing Request on completion of the flow - // (true by default). Disabling the auto_fulfil is not allowed currently. + // (Experimental feature) Fulfil the Billing Request on completion of the flow + // (true by default). Disabling the auto_fulfil is not allowed currently. auto_fulfil?: boolean; - // Identifies whether a Billing Request belongs to a specific customer + // Identifies whether a Billing Request belongs to a specific customer customer_details_captured?: boolean; - // URL that the payer can be taken to if there isn't a way to progress ahead in - // flow, for example if the customer searches for a bank that doesn't exist or - // isn't supported on the scheme. + // URL that the payer can be taken to if there isn't a way to progress ahead in + // flow, for example if the customer searches for a bank that doesn't exist or + // isn't supported on the scheme. exit_uri?: string; - // Sets the default language of the Billing Request Flow and the customer. [ISO - // 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Sets the default language of the Billing Request Flow and the customer. [ISO + // 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. language?: string; // Resources linked to this BillingRequestFlow. links: Types.BillingRequestFlowCreateRequestLinks; - // If true, the payer will not be able to change their bank account within the - // flow. If the bank_account details are collected as part of - // bank_authorisation then GC will set this value to true mid flow. + // If true, the payer will not be able to change their bank account within the + // flow. If the bank_account details are collected as part of bank_authorisation + // then GC will set this value to true mid flow. // - // You can only lock bank account if these have already been completed as a - // part of the billing request. + // You can only lock bank account if these have already been completed as a part + // of the billing request. // lock_bank_account?: boolean; - // If true, the payer will not be able to change their currency/scheme manually - // within the flow. Note that this only applies to the mandate only flows - - // currency/scheme can never be changed when there is a specified subscription - // or payment. + // If true, the payer will not be able to change their currency/scheme manually + // within the flow. Note that this only applies to the mandate only flows - + // currency/scheme can never be changed when there is a specified subscription + // or payment. lock_currency?: boolean; - // If true, the payer will not be able to edit their customer details within - // the flow. If the customer details are collected as part of - // bank_authorisation then GC will set this value to true mid flow. + // If true, the payer will not be able to edit their customer details within the + // flow. If the customer details are collected as part of bank_authorisation + // then GC will set this value to true mid flow. // - // You can only lock customer details if these have already been completed as a - // part of the billing request. + // You can only lock customer details if these have already been completed as a + // part of the billing request. // lock_customer_details?: boolean; - // Bank account information used to prefill the payment page so your customer - // doesn't have to re-type details you already hold about them. It will be - // stored unvalidated and the customer will be able to review and amend it - // before completing the form. + // Bank account information used to prefill the payment page so your customer + // doesn't have to re-type details you already hold about them. It will be + // stored unvalidated and the customer will be able to review and amend it + // before completing the form. prefilled_bank_account?: Types.BillingRequestFlowPrefilledBankAccount; - // Customer information used to prefill the payment page so your customer - // doesn't have to re-type details you already hold about them. It will be - // stored unvalidated and the customer will be able to review and amend it - // before completing the form. + // Customer information used to prefill the payment page so your customer + // doesn't have to re-type details you already hold about them. It will be + // stored unvalidated and the customer will be able to review and amend it + // before completing the form. prefilled_customer?: Types.BillingRequestFlowPrefilledCustomer; - // URL that the payer can be redirected to after completing the request flow. + // URL that the payer can be redirected to after completing the request flow. redirect_uri?: string; - // If true, the payer will be able to see redirect action buttons on Thank You - // page. These action buttons will provide a way to connect back to the billing - // request flow app if opened within a mobile app. For successful flow, the - // button will take the payer back the billing request flow where they will see - // the success screen. For failure, button will take the payer to url being - // provided against exit_uri field. + // If true, the payer will be able to see redirect action buttons on Thank You + // page. These action buttons will provide a way to connect back to the billing + // request flow app if opened within a mobile app. For successful flow, the + // button will take the payer back the billing request flow where they will see + // the success screen. For failure, button will take the payer to url being + // provided against exit_uri field. show_redirect_buttons?: boolean; - // If true, the payer will be able to see a redirect action button on the - // Success page. This action button will provide a way to redirect the payer to - // the given redirect_uri. This functionality is helpful when merchants do not - // want payers to be automatically redirected or on Android devices, where - // automatic redirections are not possible. + // If true, the payer will be able to see a redirect action button on the + // Success page. This action button will provide a way to redirect the payer to + // the given redirect_uri. This functionality is helpful when merchants do not + // want payers to be automatically redirected or on Android devices, where + // automatic redirections are not possible. show_success_redirect_button?: boolean; - // If true, the payer will not be redirected to the success screen after - // completing the flow. A redirect_uri needs to be provided for this parameter - // to be taken into account. + // If true, the payer will not be redirected to the success screen after + // completing the flow. A redirect_uri needs to be provided for this parameter + // to be taken into account. skip_success_screen?: boolean; } diff --git a/src/services/billingRequestService.ts b/src/services/billingRequestService.ts index 6aaefc3..f2b0d57 100644 --- a/src/services/billingRequestService.ts +++ b/src/services/billingRequestService.ts @@ -9,13 +9,13 @@ interface BillingRequestListResponse extends Types.APIResponse { } interface BillingRequestCreateRequest { - // (Optional) If true, this billing request can fallback from instant payment - // to direct debit. - // Should not be set if GoCardless payment intelligence feature is used. + // (Optional) If true, this billing request can fallback from instant payment to + // direct debit. + // Should not be set if GoCardless payment intelligence feature is used. // - // See [Billing Requests: Retain customers with - // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) - // for more information. + // See [Billing Requests: Retain customers with + // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) + // for more information. fallback_enabled?: boolean; @@ -28,37 +28,37 @@ interface BillingRequestCreateRequest { // mandate_request?: Types.BillingRequestMandateRequest; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; - // Specifies the context or scenario in which the payment is being made. - // Defines whether the payment is for advance/arrears billing, point of sale - // transactions, ecommerce, or account transfers. This helps banks and payment - // processors understand the payment scenario and apply appropriate processing - // rules and risk controls. + // Specifies the context or scenario in which the payment is being made. Defines + // whether the payment is for advance/arrears billing, point of sale + // transactions, ecommerce, or account transfers. This helps banks and payment + // processors understand the payment scenario and apply appropriate processing + // rules and risk controls. payment_context_code?: Types.BillingRequestPaymentContextCode; - // Specifies the underlying purpose of the payment. Defines the specific reason - // or type of service/goods the payment relates to, improving straight-through - // processing and compliance. - // See [VRP Commercial Payment Purpose - // Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) - // for the complete list of valid codes. + // Specifies the underlying purpose of the payment. Defines the specific reason + // or type of service/goods the payment relates to, improving straight-through + // processing and compliance. + // See [VRP Commercial Payment Purpose + // Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) + // for the complete list of valid codes. payment_purpose_code?: string; // payment_request?: Types.BillingRequestPaymentRequest; - // Specifies the high-level purpose/category of a mandate and/or payment using - // a set of pre-defined categories. Provides context on the nature and reason - // for the payment to facilitate processing and compliance. - // See [Billing Request Purpose - // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for - // the complete list of valid codes. + // Specifies the high-level purpose/category of a mandate and/or payment using a + // set of pre-defined categories. Provides context on the nature and reason for + // the payment to facilitate processing and compliance. + // See [Billing Request Purpose + // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for + // the complete list of valid codes. purpose_code?: Types.BillingRequestPurposeCode; @@ -75,169 +75,168 @@ interface BillingRequestCollectCustomerDetailsRequest { } interface BillingRequestCollectBankAccountRequest { - // Name of the account holder, as known by the bank. The full name provided - // when the customer is created is stored and is available via the API, but is - // transliterated, upcased, and truncated to 18 characters in bank submissions. - // This field is required unless the request includes a [customer bank account - // token](#javascript-flow-customer-bank-account-tokens). + // Name of the account holder, as known by the bank. The full name provided when + // the customer is created is stored and is available via the API, but is + // transliterated, upcased, and truncated to 18 characters in bank submissions. + // This field is required unless the request includes a [customer bank account + // token](#javascript-flow-customer-bank-account-tokens). account_holder_name?: string; - // Bank account number - see [local details](#appendix-local-bank-details) for - // more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) for + // more information. Alternatively you can provide an `iban`. account_number?: string; - // Account number suffix (only for bank accounts denominated in NZD) - see - // [local details](#local-bank-details-new-zealand) for more information. + // Account number suffix (only for bank accounts denominated in NZD) - see + // [local details](#local-bank-details-new-zealand) for more information. account_number_suffix?: string; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: Types.BillingRequestAccountType; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // supported. currency?: string; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). IBANs are not accepted for Swedish - // bank accounts denominated in SEK - you must supply [local - // details](#local-bank-details-sweden). + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). IBANs are not accepted for Swedish + // bank accounts denominated in SEK - you must supply [local + // details](#local-bank-details-sweden). iban?: string; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; - // A unique record such as an email address, mobile number or company number, - // that can be used to make and accept payments. + // A unique record such as an email address, mobile number or company number, + // that can be used to make and accept payments. pay_id?: string; } interface BillingRequestConfirmPayerDetailsRequest { - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; - // This attribute can be set to true if the payer has indicated that multiple - // signatures are required for the mandate. As long as every other Billing - // Request actions have been completed, the payer will receive an email - // notification containing instructions on how to complete the additional - // signature. The dual signature flow can only be completed using GoCardless - // branded pages. + // This attribute can be set to true if the payer has indicated that multiple + // signatures are required for the mandate. As long as every other Billing + // Request actions have been completed, the payer will receive an email + // notification containing instructions on how to complete the additional + // signature. The dual signature flow can only be completed using GoCardless + // branded pages. payer_requested_dual_signature?: boolean; } interface BillingRequestFulfilRequest { - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; } interface BillingRequestCancelRequest { - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; } interface BillingRequestListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this BillingRequest. created_at?: Types.CreatedAtFilter; - // ID of a [customer](#core-endpoints-customers). If specified, this endpoint - // will return all requests for the given customer. + // ID of a [customer](#core-endpoints-customers). If specified, this endpoint + // will return all requests for the given customer. customer?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // One of: - //
Restricted: You can only specify - // a payment reference for Bacs payments (that is, when collecting from the UK) - // if you're on the GoCardless Plus, - // Pro or Enterprise packages.
Restricted: You can not specify a - // payment reference for Faster Payments.
+ // An optional reference that will appear on your customer's bank statement. The + // character limit for this reference is dependent on the scheme.Restricted: + // You can only specify a payment reference for Bacs payments (that is, when + // collecting from the UK) if you're on the GoCardless Plus, Pro or Enterprise + // packages.
Restricted: + // You can not specify a payment reference for Faster Payments.
payment_reference?: string; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; - // The total amount of the instalment schedule, defined as the sum of all - // individual - // payments, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in - // EUR). If the requested payment amounts do not sum up correctly, a validation - // error - // will be returned. + // The total amount of the instalment schedule, defined as the sum of all + // individual + // payments, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in + // EUR). If the requested payment amounts do not sum up correctly, a validation + // error + // will be returned. total_amount: string; } interface InstalmentScheduleCreateWithScheduleRequest { - // The amount to be deducted from each payment as an app fee, to be paid to the - // partner integration which created the subscription, in the lowest - // denomination for the currency (e.g. pence in GBP, cents in EUR). + // The amount to be deducted from each payment as an app fee, to be paid to the + // partner integration which created the subscription, in the lowest + // denomination for the currency (e.g. pence in GBP, cents in EUR). app_fee?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // supported. currency: Types.InstalmentScheduleCurrency; - // Frequency of the payments you want to create, together with an array of - // payment - // amounts to be collected, with a specified start date for the first payment. - // See [create (with schedule)](#instalment-schedules-create-with-schedule) + // Frequency of the payments you want to create, together with an array of + // payment + // amounts to be collected, with a specified start date for the first payment. + // See [create (with schedule)](#instalment-schedules-create-with-schedule) // instalments: Types.InstalmentScheduleInstalments; // Resources linked to this InstalmentSchedule. links: Types.InstalmentScheduleCreateWithScheduleRequestLinks; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; - // Name of the instalment schedule, up to 100 chars. This name will also be - // copied to the payments of the instalment schedule if you use schedule-based - // creation. + // Name of the instalment schedule, up to 100 chars. This name will also be + // copied to the payments of the instalment schedule if you use schedule-based + // creation. name: string; - // An optional reference that will appear on your customer's bank statement. - // The character limit for this reference is dependent on the scheme.Restricted: You can only specify - // a payment reference for Bacs payments (that is, when collecting from the UK) - // if you're on the GoCardless Plus, - // Pro or Enterprise packages.
Restricted: You can not specify a - // payment reference for Faster Payments.
+ // An optional reference that will appear on your customer's bank statement. The + // character limit for this reference is dependent on the scheme.Restricted: + // You can only specify a payment reference for Bacs payments (that is, when + // collecting from the UK) if you're on the GoCardless Plus, Pro or Enterprise + // packages.
Restricted: + // You can not specify a payment reference for Faster Payments.
payment_reference?: string; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; - // The total amount of the instalment schedule, defined as the sum of all - // individual - // payments, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in - // EUR). If the requested payment amounts do not sum up correctly, a validation - // error - // will be returned. + // The total amount of the instalment schedule, defined as the sum of all + // individual + // payments, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in + // EUR). If the requested payment amounts do not sum up correctly, a validation + // error + // will be returned. total_amount: string; } interface InstalmentScheduleListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this InstalmentSchedule. created_at?: Types.CreatedAtFilter; - // ID of the associated [customer](#core-endpoints-customers). + // ID of the associated [customer](#core-endpoints-customers). customer?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // ID of the associated [mandate](#core-endpoints-mandates) which the - // instalment schedule will create payments against. + // ID of the associated [mandate](#core-endpoints-mandates) which the instalment + // schedule will create payments against. mandate?: string; - // At most five valid status values + // At most five valid status values status?: Types.InstalmentScheduleStatus[]; } interface InstalmentScheduleUpdateRequest { - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; } diff --git a/src/services/institutionService.test.ts b/src/services/institutionService.test.ts new file mode 100644 index 0000000..82ac871 --- /dev/null +++ b/src/services/institutionService.test.ts @@ -0,0 +1,118 @@ +/** + * Tests for InstitutionService + * + * These tests verify that the generated institution service has the correct + * method signatures, particularly for list methods with URI parameters. + */ + +import * as nock from 'nock'; +import gocardless from '../index'; +import { Environments } from '../constants'; + +describe('InstitutionService', () => { + const token = 'Restricted: You can only specify - // a payment reference for Bacs payments (that is, when collecting from the UK) - // if you're on the GoCardless Plus, - // Pro or Enterprise packages.
Restricted: You can not specify a - // payment reference for Faster Payments.
+ // An optional reference that will appear on your customer's bank statement. The + // character limit for this reference is dependent on the scheme.Restricted: + // You can only specify a payment reference for Bacs payments (that is, when + // collecting from the UK) if you're on the GoCardless Plus, Pro or Enterprise + // packages.
Restricted: + // You can not specify a payment reference for Faster Payments.
reference?: string; - // On failure, automatically retry the payment using [intelligent - // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry the payment using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; } interface PaymentListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; @@ -111,114 +110,113 @@ interface PaymentListRequest { // The creation date of this Payment. created_at?: Types.CreatedAtFilter; - // ID of a creditor to filter payments by. If you pass this parameter, you - // cannot also pass `customer`. + // ID of a creditor to filter payments by. If you pass this parameter, you + // cannot also pass `customer`. creditor?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // supported. currency?: Types.PaymentCurrency; - // ID of a customer to filter payments by. If you pass this parameter, you - // cannot also pass `creditor`. + // ID of a customer to filter payments by. If you pass this parameter, you + // cannot also pass `creditor`. customer?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // Unique identifier, beginning with "MD". Note that this prefix may not apply - // to mandates created before 2016. + // Unique identifier, beginning with "MD". Note that this prefix may not apply + // to mandates created before 2016. mandate?: string; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. scheme?: string; - // The direction to sort in. - // One of: - //Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry the payment using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; } interface PaymentCancelRequest { - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; } interface PaymentRetryRequest { - // A future date on which the payment should be collected. If not specified, - // the payment will be collected as soon as possible. If the value is before - // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` - // creation will fail. If the value is not a working day it will be rolled - // forwards to the next available one. + // A future date on which the payment should be collected. If not specified, the + // payment will be collected as soon as possible. If the value is before the + // [mandate](#core-endpoints-mandates)'s `next_possible_charge_date` creation + // will fail. If the value is not a working day it will be rolled forwards to + // the next available one. charge_date?: string; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; } diff --git a/src/services/payoutItemService.ts b/src/services/payoutItemService.ts index 3576801..2fd1cf0 100644 --- a/src/services/payoutItemService.ts +++ b/src/services/payoutItemService.ts @@ -9,24 +9,24 @@ interface PayoutItemListResponse extends Types.APIResponse { } interface PayoutItemListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Boolean value indicating whether the API should return tax data for the - // cutover period of April to August 2020. Defaults to false. + // Boolean value indicating whether the API should return tax data for the + // cutover period of April to August 2020. Defaults to false. include_2020_tax_cutover?: Types.PayoutItemInclude2020TaxCutover; - // Number of records to return. + // Number of records to return. limit?: string; - // Unique identifier, beginning with "PO". + // Unique identifier, beginning with "PO". payout: string; } diff --git a/src/services/payoutService.ts b/src/services/payoutService.ts index c5dc2dc..b2a99a4 100644 --- a/src/services/payoutService.ts +++ b/src/services/payoutService.ts @@ -9,64 +9,64 @@ interface PayoutListResponse extends Types.APIResponse { } interface PayoutListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Payout. created_at?: Types.CreatedAtFilter; - // Unique identifier, beginning with "CR". + // Unique identifier, beginning with "CR". creditor?: string; - // Unique identifier, beginning with "BA". + // Unique identifier, beginning with "BA". creditor_bank_account?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // supported. currency?: Types.PayoutCurrency; - // Number of records to return. + // Number of records to return. limit?: string; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. _Note:_ This should not - // be used for storing PII data. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. _Note:_ This should not be + // used for storing PII data. metadata?: Types.JsonMap; - // Whether a payout contains merchant revenue or partner fees. + // Whether a payout contains merchant revenue or partner fees. payout_type?: Types.PayoutPayoutType; - // Reference which appears on the creditor's bank statement. + // Reference which appears on the creditor's bank statement. reference?: string; - // One of: - //Restricted: You can only specify - // a payment reference for Bacs payments (that is, when collecting from the UK) - // if you're on the GoCardless Plus, - // Pro or Enterprise packages.
Restricted: You can not specify a - // payment reference for Faster Payments.
+ // An optional reference that will appear on your customer's bank statement. The + // character limit for this reference is dependent on the scheme.Restricted: + // You can only specify a payment reference for Bacs payments (that is, when + // collecting from the UK) if you're on the GoCardless Plus, Pro or Enterprise + // packages.
Restricted: + // You can not specify a payment reference for Faster Payments.
reference?: string; - // Total expected refunded amount in minor unit (e.g. pence/cents/öre). If - // there are - // other partial refunds against this payment, this value should be the sum of - // the - // existing refunds plus the amount of the refund being created. - //It is possible to opt out of requiring - // `total_amount_confirmation`, please contact our support team for more - // information.
+ // Total expected refunded amount in minor unit (e.g. pence/cents/öre). If there + // are + // other partial refunds against this payment, this value should be the sum of + // the + // existing refunds plus the amount of the refund being created. + //It is possible to opt out of requiring + // `total_amount_confirmation`, please contact our support team for more + // information.
total_amount_confirmation?: string; } interface RefundListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Refund. created_at?: Types.CreatedAtFilter; - // Number of records to return. + // Number of records to return. limit?: string; - // Unique identifier, beginning with "MD". Note that this prefix may not apply - // to mandates created before 2016. + // Unique identifier, beginning with "MD". Note that this prefix may not apply + // to mandates created before 2016. mandate?: string; - // Unique identifier, beginning with "PM". + // Unique identifier, beginning with "PM". payment?: string; - // Whether a refund was issued against a mandate or a payment. One of: - //Deprecated: This field will be - // removed in a future API version. Use `count` to specify a number of payments - // instead.
+ // Date on or after which no further payments should be created. + //Deprecated: This field will be + // removed in a future API version. Use `count` to specify a number of payments + // instead.
end_date?: string; - // Number of `interval_units` between customer charge dates. Must be greater - // than or equal to `1`. Must result in at least one charge date per year. - // Defaults to `1`. + // Number of `interval_units` between customer charge dates. Must be greater + // than or equal to `1`. Must result in at least one charge date per year. + // Defaults to `1`. interval?: string; - // The unit of time between customer charge dates. One of `weekly`, `monthly` - // or `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` or + // `yearly`. interval_unit: Types.SubscriptionIntervalUnit; // Resources linked to this Subscription. links: Types.SubscriptionCreateRequestLinks; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; - // Name of the month on which to charge a customer. Must be lowercase. Only - // applies - // when the interval_unit is `yearly`. + // Name of the month on which to charge a customer. Must be lowercase. Only + // applies + // when the interval_unit is `yearly`. // month?: Types.SubscriptionMonth; - // Optional name for the subscription. This will be set as the description on - // each payment created. Must not exceed 255 characters. + // Optional name for the subscription. This will be set as the description on + // each payment created. Must not exceed 255 characters. name?: string; - // An optional payment reference. This will be set as the reference on each - // payment - // created and will appear on your customer's bank statement. See the - // documentation for - // the [create payment endpoint](#payments-create-a-payment) for more details. - //Restricted: You need your own - // Service User Number to specify a payment reference for Bacs payments.
+ // An optional payment reference. This will be set as the reference on each + // payment + // created and will appear on your customer's bank statement. See the + // documentation for + // the [create payment endpoint](#payments-create-a-payment) for more details. + //Restricted: You need your own + // Service User Number to specify a payment reference for Bacs payments.
payment_reference?: string; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; - // The date on which the first payment should be charged. Must be on or after - // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When - // left blank and `month` or `day_of_month` are provided, this will be set to - // the date of the first payment. If created without `month` or `day_of_month` - // this will be set as the mandate's `next_possible_charge_date` + // The date on which the first payment should be charged. Must be on or after + // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When + // left blank and `month` or `day_of_month` are provided, this will be set to + // the date of the first payment. If created without `month` or `day_of_month` + // this will be set as the mandate's `next_possible_charge_date` start_date?: string; } interface SubscriptionListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Subscription. created_at?: Types.CreatedAtFilter; - // Unique identifier, beginning with "CU". + // Unique identifier, beginning with "CU". customer?: string; - // Number of records to return. + // Number of records to return. limit?: string; - // Unique identifier, beginning with "MD". Note that this prefix may not apply - // to mandates created before 2016. + // Unique identifier, beginning with "MD". Note that this prefix may not apply + // to mandates created before 2016. mandate?: string; - // Upto 5 of: - //Restricted: You need your own - // Service User Number to specify a payment reference for Bacs payments.
+ // An optional payment reference. This will be set as the reference on each + // payment + // created and will appear on your customer's bank statement. See the + // documentation for + // the [create payment endpoint](#payments-create-a-payment) for more details. + //Restricted: You need your own + // Service User Number to specify a payment reference for Bacs payments.
payment_reference?: string; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; } interface SubscriptionPauseRequest { - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; - // The number of cycles to pause a subscription for. A cycle is one duration of - // `interval` and `interval_unit`. This should be a non zero positive value. - // For AUD subscriptions with `interval_unit: weekly` the minimum value varies - // between `3` & `4` because of the [mandatory minimum waiting - // period](#subscriptions-resume-a-subscription). - // For NZD subscriptions with `interval_unit: weekly` the minimum value is `2` - // because of the [mandatory minimum waiting - // period](#subscriptions-resume-a-subscription). + // The number of cycles to pause a subscription for. A cycle is one duration of + // `interval` and `interval_unit`. This should be a non zero positive value. + // For AUD subscriptions with `interval_unit: weekly` the minimum value varies + // between `3` & `4` because of the [mandatory minimum waiting + // period](#subscriptions-resume-a-subscription). + // For NZD subscriptions with `interval_unit: weekly` the minimum value is `2` + // because of the [mandatory minimum waiting + // period](#subscriptions-resume-a-subscription). pause_cycles?: number; } interface SubscriptionResumeRequest { - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; } interface SubscriptionCancelRequest { - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names up + // to 50 characters and values up to 500 characters. metadata?: Types.JsonMap; } diff --git a/src/services/taxRateService.ts b/src/services/taxRateService.ts index 2e49670..ec40327 100644 --- a/src/services/taxRateService.ts +++ b/src/services/taxRateService.ts @@ -9,19 +9,19 @@ interface TaxRateListResponse extends Types.APIResponse { } interface TaxRateListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // The jurisdiction this tax rate applies to + // The jurisdiction this tax rate applies to jurisdiction?: string; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/verificationDetailService.ts b/src/services/verificationDetailService.ts index 74cfd9d..11d0a61 100644 --- a/src/services/verificationDetailService.ts +++ b/src/services/verificationDetailService.ts @@ -9,60 +9,60 @@ interface VerificationDetailListResponse extends Types.APIResponse { } interface VerificationDetailCreateRequest { - // The first line of the company's address. + // The first line of the company's address. address_line1: string; - // The second line of the company's address. + // The second line of the company's address. address_line2?: string; - // The third line of the company's address. + // The third line of the company's address. address_line3?: string; - // The city of the company's address. + // The city of the company's address. city: string; - // The company's registration number. + // The company's registration number. company_number: string; - // A summary describing what the company does. + // A summary describing what the company does. description: string; - // The company's directors. + // The company's directors. directors: Types.VerificationDetailDirector[]; // Resources linked to this VerificationDetail. links: Types.VerificationDetailCreateRequestLinks; - // The company's legal name. + // The company's legal name. name: string; - // The company's postal code. + // The company's postal code. postal_code: string; } interface VerificationDetailListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; - // Unique identifier, beginning with "CR". + // Unique identifier, beginning with "CR". creditor: string; - // Number of records to return. + // Number of records to return. limit?: string; } diff --git a/src/services/webhookService.ts b/src/services/webhookService.ts index e7d4d7b..aa17118 100644 --- a/src/services/webhookService.ts +++ b/src/services/webhookService.ts @@ -9,26 +9,26 @@ interface WebhookListResponse extends Types.APIResponse { } interface WebhookListRequest { - // Cursor pointing to the start of the desired set. + // Cursor pointing to the start of the desired set. after?: string; - // Cursor pointing to the end of the desired set. + // Cursor pointing to the end of the desired set. before?: string; // The creation date of this Webhook. created_at?: Types.CreatedAtFilter; - // Show only test/non test webhooks + // Show only test/non test webhooks is_test?: boolean; - // Number of records to return. + // Number of records to return. limit?: string; - // Show only successful/failed webhooks + // Show only successful/failed webhooks successful?: boolean; } diff --git a/src/types/Types.ts b/src/types/Types.ts index 23b0557..2b83e13 100644 --- a/src/types/Types.ts +++ b/src/types/Types.ts @@ -1,35 +1,35 @@ /** Type for a balance resource. */ export type Balance = { - // The total amount in the balance, defined as the sum of all debits - // subtracted from the sum of all credits, - // in the lowest denomination for the currency (e.g. pence in GBP, cents in - // EUR). + // The total amount in the balance, defined as the sum of all debits + // subtracted from the sum of all credits, + // in the lowest denomination for the currency (e.g. pence in GBP, cents in + // EUR). amount?: number; - // Type of the balance. Could be one of - //Even if no BIC is returned for an account, GoCardless - // may still be able to collect payments from it - you should refer to the - // `available_debit_schemes` attribute to determine reachability.
+ //Even if no BIC is returned for an account, GoCardless may + // still be able to collect payments from it - you should refer to the + // `available_debit_schemes` attribute to determine reachability.
bic?: string | null; }; @@ -261,103 +260,103 @@ export enum BankDetailsLookupAvailableDebitScheme { /** Type for a billingrequest resource. */ export type BillingRequest = { - // List of actions that can be performed before this billing request can be - // fulfilled. + // List of actions that can be performed before this billing request can be + // fulfilled. actions?: BillingRequestAction[]; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this - // resource was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource + // was created. created_at?: string; - // (Optional) If true, this billing request can fallback from instant payment - // to direct debit. - // Should not be set if GoCardless payment intelligence feature is used. + // (Optional) If true, this billing request can fallback from instant payment + // to direct debit. + // Should not be set if GoCardless payment intelligence feature is used. // - // See [Billing Requests: Retain customers with - // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) - // for more information. + // See [Billing Requests: Retain customers with + // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) + // for more information. fallback_enabled?: boolean; - // True if the billing request was completed with direct debit. + // True if the billing request was completed with direct debit. fallback_occurred?: boolean; - // Unique identifier, beginning with "BRQ". + // Unique identifier, beginning with "BRQ". id: string; - // Request for an instalment schedule. Has to contain either - // `instalments_with_schedule` object or an array of `instalments_with_dates` - // objects + // Request for an instalment schedule. Has to contain either + // `instalments_with_schedule` object or an array of `instalments_with_dates` + // objects instalment_schedule_request?: BillingRequestInstalmentScheduleRequest | null; // Resources linked to this BillingRequest. links?: BillingRequestLinks; - // Request for a mandate + // Request for a mandate mandate_request?: BillingRequestMandateRequest; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. metadata?: JsonMap; - // Specifies the context or scenario in which the payment is being made. - // Defines whether the payment is for advance/arrears billing, point of sale - // transactions, ecommerce, or account transfers. This helps banks and - // payment processors understand the payment scenario and apply appropriate - // processing rules and risk controls. + // Specifies the context or scenario in which the payment is being made. + // Defines whether the payment is for advance/arrears billing, point of sale + // transactions, ecommerce, or account transfers. This helps banks and payment + // processors understand the payment scenario and apply appropriate processing + // rules and risk controls. payment_context_code?: BillingRequestPaymentContextCode; - // Specifies the underlying purpose of the payment. Defines the specific - // reason or type of service/goods the payment relates to, improving - // straight-through processing and compliance. - // See [VRP Commercial Payment Purpose - // Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) - // for the complete list of valid codes. + // Specifies the underlying purpose of the payment. Defines the specific + // reason or type of service/goods the payment relates to, improving + // straight-through processing and compliance. + // See [VRP Commercial Payment Purpose + // Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) + // for the complete list of valid codes. payment_purpose_code?: string; - // Request for a one-off strongly authorised payment + // Request for a one-off strongly authorised payment payment_request?: BillingRequestPaymentRequest; - // Specifies the high-level purpose/category of a mandate and/or payment - // using a set of pre-defined categories. Provides context on the nature and - // reason for the payment to facilitate processing and compliance. - // See [Billing Request Purpose - // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) - // for the complete list of valid codes. + // Specifies the high-level purpose/category of a mandate and/or payment using + // a set of pre-defined categories. Provides context on the nature and reason + // for the payment to facilitate processing and compliance. + // See [Billing Request Purpose + // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for + // the complete list of valid codes. purpose_code?: BillingRequestPurposeCode; // resources?: BillingRequestResources; - // One of: - //Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; - // The total amount of the instalment schedule, defined as the sum of all - // individual - // payments, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in - // EUR). If the requested payment amounts do not sum up correctly, a - // validation error - // will be returned. + // The total amount of the instalment schedule, defined as the sum of all + // individual + // payments, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in + // EUR). If the requested payment amounts do not sum up correctly, a + // validation error + // will be returned. total_amount?: string; }; /** Type for a billingrequestinstalmentschedulerequestinstalmentswithdate resource. */ export type BillingRequestInstalmentScheduleRequestInstalmentsWithDate = { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount: string; - // A future date on which the payment should be collected. If the date - // is before the next_possible_charge_date on the - // [mandate](#core-endpoints-mandates), it will be automatically rolled - // forwards to that date. + // A future date on which the payment should be collected. If the date + // is before the next_possible_charge_date on the + // [mandate](#core-endpoints-mandates), it will be automatically rolled + // forwards to that date. charge_date: string | null; - // A human-readable description of the payment. This will be included in the - // notification email GoCardless sends to your customer if your organisation - // does not send its own notifications (see [compliance - // requirements](#appendix-compliance-requirements)). + // A human-readable description of the payment. This will be included in the + // notification email GoCardless sends to your customer if your organisation + // does not send its own notifications (see [compliance + // requirements](#appendix-compliance-requirements)). description?: string | null; }; /** Type for a billingrequestinstalmentschedulerequestinstalmentswithschedule resource. */ export type BillingRequestInstalmentScheduleRequestInstalmentsWithSchedule = { - // List of amounts of each instalment, in the lowest denomination for the - // currency (e.g. cents in USD). + // List of amounts of each instalment, in the lowest denomination for the + // currency (e.g. cents in USD). // amounts: string[]; - // Number of `interval_units` between charge dates. Must be greater than or - // equal to `1`. + // Number of `interval_units` between charge dates. Must be greater than or + // equal to `1`. // interval: number; - // The unit of time between customer charge dates. One of `weekly`, `monthly` - // or `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` + // or `yearly`. interval_unit: BillingRequestInstalmentScheduleRequestInstalmentsWithScheduleIntervalUnit; - // The date on which the first payment should be charged. Must be on or after - // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. - // When left blank and `month` or `day_of_month` are provided, this will be - // set to the date of the first payment. If created without `month` or - // `day_of_month` this will be set as the mandate's - // `next_possible_charge_date` + // The date on which the first payment should be charged. Must be on or after + // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When + // left blank and `month` or `day_of_month` are provided, this will be set to + // the date of the first payment. If created without `month` or `day_of_month` + // this will be set as the mandate's `next_possible_charge_date` start_date?: string | null; }; @@ -750,170 +746,170 @@ export enum BillingRequestInstalmentScheduleRequestInstalmentsWithScheduleInterv /** Type for a billingrequestinstalmentschedulerequestlinks resource. */ export type BillingRequestInstalmentScheduleRequestLinks = { - // (Optional) ID of the - // [instalment_schedule](#core-endpoints-instalment-schedules) that was - // created from this instalment schedule request. + // (Optional) ID of the + // [instalment_schedule](#core-endpoints-instalment-schedules) that was + // created from this instalment schedule request. // instalment_schedule?: string; }; /** Type for a billingrequestlinks resource. */ export type BillingRequestLinks = { - // (Optional) ID of the [bank - // authorisation](#billing-requests-bank-authorisations) that was used to - // verify this request. + // (Optional) ID of the [bank + // authorisation](#billing-requests-bank-authorisations) that was used to + // verify this request. bank_authorisation?: string; - // ID of the associated [creditor](#core-endpoints-creditors). + // ID of the associated [creditor](#core-endpoints-creditors). creditor?: string; - // ID of the [customer](#core-endpoints-customers) that will be used for this - // request + // ID of the [customer](#core-endpoints-customers) that will be used for this + // request customer?: string; - // (Optional) ID of the - // [customer_bank_account](#core-endpoints-customer-bank-accounts) that will - // be used for this request + // (Optional) ID of the + // [customer_bank_account](#core-endpoints-customer-bank-accounts) that will + // be used for this request customer_bank_account?: string; - // ID of the customer billing detail that will be used for this request + // ID of the customer billing detail that will be used for this request customer_billing_detail?: string; - // (Optional) ID of the associated instalment schedule request + // (Optional) ID of the associated instalment schedule request instalment_schedule_request?: string; - // (Optional) ID of the - // [instalment_schedule](#core-endpoints-instalment-schedules) that was - // created from this instalment schedule request. + // (Optional) ID of the + // [instalment_schedule](#core-endpoints-instalment-schedules) that was + // created from this instalment schedule request. instalment_schedule_request_instalment_schedule?: string; - // (Optional) ID of the associated mandate request + // (Optional) ID of the associated mandate request mandate_request?: string; - // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created - // from this mandate request. this mandate request. + // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created + // from this mandate request. this mandate request. mandate_request_mandate?: string; - // ID of the associated organisation. + // ID of the associated organisation. organisation?: string; - // (Optional) ID of the associated payment provider + // (Optional) ID of the associated payment provider payment_provider?: string; - // (Optional) ID of the associated payment request + // (Optional) ID of the associated payment request payment_request?: string; - // (Optional) ID of the [payment](#core-endpoints-payments) that was created - // from this payment request. + // (Optional) ID of the [payment](#core-endpoints-payments) that was created + // from this payment request. payment_request_payment?: string; - // (Optional) ID of the associated subscription request + // (Optional) ID of the associated subscription request subscription_request?: string; - // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that - // was created from this subscription request. + // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was + // created from this subscription request. subscription_request_subscription?: string; }; /** Type for a billingrequestmandaterequest resource. */ export type BillingRequestMandateRequest = { - // This field is ACH specific, sometimes referred to as [SEC - // code](https://www.moderntreasury.com/learn/sec-codes). + // This field is ACH specific, sometimes referred to as [SEC + // code](https://www.moderntreasury.com/learn/sec-codes). // - // This is the way that the payer gives authorisation to the merchant. - // web: Authorisation is Internet Initiated or via Mobile Entry (maps to - // SEC code: WEB) - // telephone: Authorisation is provided orally over telephone (maps to SEC - // code: TEL) - // paper: Authorisation is provided in writing and signed, or similarly - // authenticated (maps to SEC code: PPD) + // This is the way that the payer gives authorisation to the merchant. + // web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC + // code: WEB) + // telephone: Authorisation is provided orally over telephone (maps to SEC + // code: TEL) + // paper: Authorisation is provided in writing and signed, or similarly + // authenticated (maps to SEC code: PPD) // authorisation_source?: BillingRequestMandateRequestAuthorisationSource; - // This attribute represents the authorisation type between the payer and - // merchant. It can be set to `one_off`, - // `recurring` or `standing` for ACH scheme. And `single`, `recurring` and - // `sporadic` for PAD scheme. _Note:_ This is only supported for ACH and PAD - // schemes. + // This attribute represents the authorisation type between the payer and + // merchant. It can be set to `one_off`, + // `recurring` or `standing` for ACH scheme. And `single`, `recurring` and + // `sporadic` for PAD scheme. _Note:_ This is only supported for ACH and PAD + // schemes. // consent_type?: string | null; - // Constraints that will apply to the mandate_request. (Optional) - // Specifically required for PayTo and VRP. + // Constraints that will apply to the mandate_request. (Optional) Specifically + // required for PayTo and VRP. constraints?: BillingRequestMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // description?: string | null; - // This field will decide how GoCardless handles settlement of funds from the - // customer. + // This field will decide how GoCardless handles settlement of funds from the + // customer. // - // - `managed` will be moved through GoCardless' account, batched, and payed - // out. - // - `direct` will be a direct transfer from the payer's account to the - // merchant where - // invoicing will be handled separately. + // - `managed` will be moved through GoCardless' account, batched, and payed + // out. + // - `direct` will be a direct transfer from the payer's account to the + // merchant where + // invoicing will be handled separately. // funds_settlement?: BillingRequestMandateRequestFundsSettlement; // Resources linked to this BillingRequestMandateRequest. links?: BillingRequestMandateRequestLinks; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. metadata?: JsonMap; - // This attribute can be set to true if the payer has indicated that multiple - // signatures are required for the mandate. As long as every other Billing - // Request actions have been completed, the payer will receive an email - // notification containing instructions on how to complete the additional - // signature. The dual signature flow can only be completed using GoCardless - // branded pages. + // This attribute can be set to true if the payer has indicated that multiple + // signatures are required for the mandate. As long as every other Billing + // Request actions have been completed, the payer will receive an email + // notification containing instructions on how to complete the additional + // signature. The dual signature flow can only be completed using GoCardless + // branded pages. payer_requested_dual_signature?: boolean; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. Optional for mandate only requests - if left - // blank, the payer will be able to select the currency/scheme to pay with - // from a list of your available schemes. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. Optional for mandate only requests - if left + // blank, the payer will be able to select the currency/scheme to pay with + // from a list of your available schemes. scheme?: string | null; - // If true, this billing request would be used to set up a mandate solely for - // moving (or sweeping) money from one account owned by the payer to another - // account that the payer also owns. This is required for Faster Payments + // If true, this billing request would be used to set up a mandate solely for + // moving (or sweeping) money from one account owned by the payer to another + // account that the payer also owns. This is required for Faster Payments sweeping?: boolean; - // Verification preference for the mandate. One of: - //Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; - // The date on which the first payment should be charged. If fulfilled after - // this date, this will be set as the mandate's `next_possible_charge_date`. - // When left blank and `month` or `day_of_month` are provided, this will be - // set to the date of the first payment. - // If created without `month` or `day_of_month` this will be set as the - // mandate's `next_possible_charge_date`. + // The date on which the first payment should be charged. If fulfilled after + // this date, this will be set as the mandate's `next_possible_charge_date`. + // When left blank and `month` or `day_of_month` are provided, this will be + // set to the date of the first payment. + // If created without `month` or `day_of_month` this will be set as the + // mandate's `next_possible_charge_date`. // start_date?: string | null; }; @@ -1347,8 +1341,8 @@ export enum BillingRequestSubscriptionRequestIntervalUnit { /** Type for a billingrequestsubscriptionrequestlinks resource. */ export type BillingRequestSubscriptionRequestLinks = { - // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that - // was created from this subscription request. + // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was + // created from this subscription request. // subscription?: string; }; @@ -1370,121 +1364,120 @@ export enum BillingRequestSubscriptionRequestMonth { /** Type for a billingrequestflow resource. */ export type BillingRequestFlow = { - // URL for a GC-controlled flow which will allow the payer to fulfil the - // billing request + // URL for a GC-controlled flow which will allow the payer to fulfil the + // billing request authorisation_url?: string; - // (Experimental feature) Fulfil the Billing Request on completion of the - // flow (true by default). Disabling the auto_fulfil is not allowed - // currently. + // (Experimental feature) Fulfil the Billing Request on completion of the flow + // (true by default). Disabling the auto_fulfil is not allowed currently. auto_fulfil?: boolean; - // Timestamp when the flow was created + // Timestamp when the flow was created created_at?: string; - // Identifies whether a Billing Request belongs to a specific customer + // Identifies whether a Billing Request belongs to a specific customer customer_details_captured?: boolean; - // URL that the payer can be taken to if there isn't a way to progress ahead - // in flow, for example if the customer searches for a bank that doesn't - // exist or isn't supported on the scheme. + // URL that the payer can be taken to if there isn't a way to progress ahead + // in flow, for example if the customer searches for a bank that doesn't exist + // or isn't supported on the scheme. exit_uri?: string | null; - // Timestamp when the flow will expire. Each flow currently lasts for 7 days. + // Timestamp when the flow will expire. Each flow currently lasts for 7 days. expires_at?: string; - // Unique identifier, beginning with "BRF". + // Unique identifier, beginning with "BRF". id: string; - // Sets the default language of the Billing Request Flow and the customer. - // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Sets the default language of the Billing Request Flow and the customer. + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. language?: string | null; // Resources linked to this BillingRequestFlow. links?: BillingRequestFlowLinks; - // If true, the payer will not be able to change their bank account within - // the flow. If the bank_account details are collected as part of - // bank_authorisation then GC will set this value to true mid flow. + // If true, the payer will not be able to change their bank account within the + // flow. If the bank_account details are collected as part of + // bank_authorisation then GC will set this value to true mid flow. // - // You can only lock bank account if these have already been completed as a - // part of the billing request. + // You can only lock bank account if these have already been completed as a + // part of the billing request. // lock_bank_account?: boolean; - // If true, the payer will not be able to change their currency/scheme - // manually within the flow. Note that this only applies to the mandate only - // flows - currency/scheme can never be changed when there is a specified - // subscription or payment. + // If true, the payer will not be able to change their currency/scheme + // manually within the flow. Note that this only applies to the mandate only + // flows - currency/scheme can never be changed when there is a specified + // subscription or payment. lock_currency?: boolean; - // If true, the payer will not be able to edit their customer details within - // the flow. If the customer details are collected as part of - // bank_authorisation then GC will set this value to true mid flow. + // If true, the payer will not be able to edit their customer details within + // the flow. If the customer details are collected as part of + // bank_authorisation then GC will set this value to true mid flow. // - // You can only lock customer details if these have already been completed as - // a part of the billing request. + // You can only lock customer details if these have already been completed as + // a part of the billing request. // lock_customer_details?: boolean; - // Bank account information used to prefill the payment page so your customer - // doesn't have to re-type details you already hold about them. It will be - // stored unvalidated and the customer will be able to review and amend it - // before completing the form. + // Bank account information used to prefill the payment page so your customer + // doesn't have to re-type details you already hold about them. It will be + // stored unvalidated and the customer will be able to review and amend it + // before completing the form. prefilled_bank_account?: BillingRequestFlowPrefilledBankAccount | null; - // Customer information used to prefill the payment page so your customer - // doesn't have to re-type details you already hold about them. It will be - // stored unvalidated and the customer will be able to review and amend it - // before completing the form. + // Customer information used to prefill the payment page so your customer + // doesn't have to re-type details you already hold about them. It will be + // stored unvalidated and the customer will be able to review and amend it + // before completing the form. prefilled_customer?: BillingRequestFlowPrefilledCustomer | null; - // URL that the payer can be redirected to after completing the request flow. + // URL that the payer can be redirected to after completing the request flow. redirect_uri?: string | null; - // Session token populated when responding to the initialise action + // Session token populated when responding to the initialise action session_token?: string | null; - // If true, the payer will be able to see redirect action buttons on Thank - // You page. These action buttons will provide a way to connect back to the - // billing request flow app if opened within a mobile app. For successful - // flow, the button will take the payer back the billing request flow where - // they will see the success screen. For failure, button will take the payer - // to url being provided against exit_uri field. + // If true, the payer will be able to see redirect action buttons on Thank You + // page. These action buttons will provide a way to connect back to the + // billing request flow app if opened within a mobile app. For successful + // flow, the button will take the payer back the billing request flow where + // they will see the success screen. For failure, button will take the payer + // to url being provided against exit_uri field. show_redirect_buttons?: boolean; - // If true, the payer will be able to see a redirect action button on the - // Success page. This action button will provide a way to redirect the payer - // to the given redirect_uri. This functionality is helpful when merchants do - // not want payers to be automatically redirected or on Android devices, - // where automatic redirections are not possible. + // If true, the payer will be able to see a redirect action button on the + // Success page. This action button will provide a way to redirect the payer + // to the given redirect_uri. This functionality is helpful when merchants do + // not want payers to be automatically redirected or on Android devices, where + // automatic redirections are not possible. show_success_redirect_button?: boolean; - // If true, the payer will not be redirected to the success screen after - // completing the flow. A redirect_uri needs to be provided for this - // parameter to be taken into account. + // If true, the payer will not be redirected to the success screen after + // completing the flow. A redirect_uri needs to be provided for this parameter + // to be taken into account. skip_success_screen?: boolean; }; /** Type for a billingrequestflowcreaterequestlinks resource. */ export type BillingRequestFlowCreateRequestLinks = { - // ID of the [billing request](#billing-requests-billing-requests) against - // which this flow was created. + // ID of the [billing request](#billing-requests-billing-requests) against + // which this flow was created. billing_request: string; }; /** Type for a billingrequestflowlinks resource. */ export type BillingRequestFlowLinks = { - // ID of the [billing request](#billing-requests-billing-requests) against - // which this flow was created. + // ID of the [billing request](#billing-requests-billing-requests) against + // which this flow was created. billing_request: string; }; /** Type for a billingrequestflowprefilledbankaccount resource. */ export type BillingRequestFlowPrefilledBankAccount = { - // Bank account type for USD-denominated bank accounts. Must not be provided - // for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type for USD-denominated bank accounts. Must not be provided + // for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: BillingRequestFlowPrefilledBankAccountAccountType; }; @@ -1495,161 +1488,161 @@ export enum BillingRequestFlowPrefilledBankAccountAccountType { /** Type for a billingrequestflowprefilledcustomer resource. */ export type BillingRequestFlowPrefilledCustomer = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // Customer's company name. Company name should only be provided if - // `given_name` and `family_name` are null. + // Customer's company name. Company name should only be provided if + // `given_name` and `family_name` are null. company_name?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. danish_identity_number?: string | null; - // Customer's email address. + // Customer's email address. email?: string | null; - // Customer's surname. + // Customer's surname. family_name?: string | null; - // Customer's first name. + // Customer's first name. given_name?: string | null; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. + // The customer's address region, county or department. region?: string | null; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. swedish_identity_number?: string | null; }; /** Type for a billingrequesttemplate resource. */ export type BillingRequestTemplate = { - // Permanent URL that customers can visit to allow them to complete a flow - // based on this template, before being returned to the `redirect_uri`. + // Permanent URL that customers can visit to allow them to complete a flow + // based on this template, before being returned to the `redirect_uri`. authorisation_url?: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this - // resource was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource + // was created. created_at?: string; - // Unique identifier, beginning with "BRT". + // Unique identifier, beginning with "BRT". id?: string; - // Constraints that will apply to the mandate_request. (Optional) - // Specifically required for PayTo and VRP. + // Constraints that will apply to the mandate_request. (Optional) Specifically + // required for PayTo and VRP. mandate_request_constraints?: BillingRequestTemplateMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. mandate_request_currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // mandate_request_description?: string | null; - // Key-value store of custom data that will be applied to the mandate created - // when this request is fulfilled. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data that will be applied to the mandate created + // when this request is fulfilled. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. mandate_request_metadata?: JsonMap | null; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. Optional for mandate only requests - if left - // blank, the payer will be able to select the currency/scheme to pay with - // from a list of your available schemes. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. Optional for mandate only requests - if left + // blank, the payer will be able to select the currency/scheme to pay with + // from a list of your available schemes. mandate_request_scheme?: string | null; - // Verification preference for the mandate. One of: - //Important: All properties associated with - // `subscription_request` and `instalment_schedule_request` are only - // supported for ACH and PAD schemes.
+ // Billing Requests help create resources that require input or action from a + // customer. An example of required input might be additional customer billing + // details, while an action would be asking a customer to authorise a payment + // using their mobile banking app. + // + // See [Billing Requests: + // Overview](https://developer.gocardless.com/getting-started/billing-requests/overview/) + // for how-to's, explanations and tutorials.Important: All properties associated with + // `subscription_request` and `instalment_schedule_request` are only supported + // for ACH and PAD schemes.
billing_requests: BillingRequestWithActionBillingRequests; }; /** Type for a billingrequestwithactionactions resource. */ export type BillingRequestWithActionActions = { - // URL for an oauth flow that will allow the user to authorise the payment + // URL for an oauth flow that will allow the user to authorise the payment bank_authorisation_redirect_uri?: string; // @@ -1779,7 +1772,7 @@ export type BillingRequestWithActionActions = { // confirm_payer_details?: BillingRequestWithActionActionsConfirmPayerDetails; - // Create a bank authorisation object as part of this request + // Create a bank authorisation object as part of this request create_bank_authorisation?: boolean; // @@ -1788,58 +1781,57 @@ export type BillingRequestWithActionActions = { /** Type for a billingrequestwithactionactionscollectbankaccount resource. */ export type BillingRequestWithActionActionsCollectBankAccount = { - // Name of the account holder, as known by the bank. The full name provided - // when the customer is created is stored and is available via the API, but - // is transliterated, upcased, and truncated to 18 characters in bank - // submissions. This field is required unless the request includes a - // [customer bank account - // token](#javascript-flow-customer-bank-account-tokens). + // Name of the account holder, as known by the bank. The full name provided + // when the customer is created is stored and is available via the API, but is + // transliterated, upcased, and truncated to 18 characters in bank + // submissions. This field is required unless the request includes a [customer + // bank account token](#javascript-flow-customer-bank-account-tokens). account_holder_name?: string; - // Bank account number - see [local details](#appendix-local-bank-details) - // for more information. Alternatively you can provide an `iban`. + // Bank account number - see [local details](#appendix-local-bank-details) for + // more information. Alternatively you can provide an `iban`. account_number?: string | null; - // Account number suffix (only for bank accounts denominated in NZD) - see - // [local details](#local-bank-details-new-zealand) for more information. + // Account number suffix (only for bank accounts denominated in NZD) - see + // [local details](#local-bank-details-new-zealand) for more information. account_number_suffix?: string | null; - // Bank account type. Required for USD-denominated bank accounts. Must not be - // provided for bank accounts in other currencies. See [local - // details](#local-bank-details-united-states) for more information. + // Bank account type. Required for USD-denominated bank accounts. Must not be + // provided for bank accounts in other currencies. See [local + // details](#local-bank-details-united-states) for more information. account_type?: BillingRequestWithActionActionsCollectBankAccountAccountType; - // Bank code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Bank code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. bank_code?: string | null; - // Branch code - see [local details](#appendix-local-bank-details) for more - // information. Alternatively you can provide an `iban`. + // Branch code - see [local details](#appendix-local-bank-details) for more + // information. Alternatively you can provide an `iban`. branch_code?: string | null; - // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). - // Defaults to the country code of the `iban` if supplied, otherwise is - // required. + // [ISO 3166-1 alpha-2 + // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // Defaults to the country code of the `iban` if supplied, otherwise is + // required. country_code?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" - // are supported. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" + // are supported. currency?: string | null; - // International Bank Account Number. Alternatively you can provide [local - // details](#appendix-local-bank-details). IBANs are not accepted for Swedish - // bank accounts denominated in SEK - you must supply [local - // details](#local-bank-details-sweden). + // International Bank Account Number. Alternatively you can provide [local + // details](#appendix-local-bank-details). IBANs are not accepted for Swedish + // bank accounts denominated in SEK - you must supply [local + // details](#local-bank-details-sweden). iban?: string | null; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. metadata?: JsonMap; - // A unique record such as an email address, mobile number or company number, - // that can be used to make and accept payments. + // A unique record such as an email address, mobile number or company number, + // that can be used to make and accept payments. pay_id?: string; }; @@ -1859,219 +1851,219 @@ export type BillingRequestWithActionActionsCollectCustomerDetails = { /** Type for a billingrequestwithactionactionscollectcustomerdetailscustomer resource. */ export type BillingRequestWithActionActionsCollectCustomerDetailsCustomer = { - // Customer's company name. Required unless a `given_name` and `family_name` - // are provided. For Canadian customers, the use of a `company_name` value - // will mean that any mandate created from this customer will be considered - // to be a "Business PAD" (otherwise, any mandate will be considered to be a - // "Personal PAD"). + // Customer's company name. Required unless a `given_name` and `family_name` + // are provided. For Canadian customers, the use of a `company_name` value + // will mean that any mandate created from this customer will be considered to + // be a "Business PAD" (otherwise, any mandate will be considered to be a + // "Personal PAD"). company_name?: string | null; - // Customer's email address. Required in most cases, as this allows - // GoCardless to send notifications to this customer. + // Customer's email address. Required in most cases, as this allows GoCardless + // to send notifications to this customer. email?: string | null; - // Customer's surname. Required unless a `company_name` is provided. + // Customer's surname. Required unless a `company_name` is provided. family_name?: string | null; - // Customer's first name. Required unless a `company_name` is provided. + // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. - // Used as the language for notification emails sent by GoCardless if your - // organisation does not send its own (see [compliance - // requirements](#appendix-compliance-requirements)). Currently only "en", - // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. - // If this is not provided and a customer was linked during billing request - // creation, the linked customer language will be used. Otherwise, the - // language is default to "en". + // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // Used as the language for notification emails sent by GoCardless if your + // organisation does not send its own (see [compliance + // requirements](#appendix-compliance-requirements)). Currently only "en", + // "fr", "de", "pt", "es", "it", "nl", "da", "nb", "sl", "sv" are supported. + // If this is not provided and a customer was linked during billing request + // creation, the linked customer language will be used. Otherwise, the + // language is default to "en". language?: string | null; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. metadata?: JsonMap; - // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, - // including country code. + // [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone number, + // including country code. phone_number?: string | null; }; /** Type for a billingrequestwithactionactionscollectcustomerdetailscustomerbillingdetail resource. */ export type BillingRequestWithActionActionsCollectCustomerDetailsCustomerBillingDetail = { - // The first line of the customer's address. + // The first line of the customer's address. address_line1?: string | null; - // The second line of the customer's address. + // The second line of the customer's address. address_line2?: string | null; - // The third line of the customer's address. + // The third line of the customer's address. address_line3?: string | null; - // The city of the customer's address. + // The city of the customer's address. city?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // For Danish customers only. The civic/company number (CPR or CVR) of the - // customer. Must be supplied if the customer's bank account is denominated - // in Danish krone (DKK). + // For Danish customers only. The civic/company number (CPR or CVR) of the + // customer. Must be supplied if the customer's bank account is denominated in + // Danish krone (DKK). danish_identity_number?: string | null; - // For ACH customers only. Required for ACH customers. A string containing - // the IP address of the payer to whom the mandate belongs (i.e. as a result - // of their completion of a mandate setup flow in their browser). + // For ACH customers only. Required for ACH customers. A string containing the + // IP address of the payer to whom the mandate belongs (i.e. as a result of + // their completion of a mandate setup flow in their browser). // - // Not required for creating offline mandates where `authorisation_source` is - // set to telephone or paper. + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. // ip_address?: string | null; - // The customer's postal code. + // The customer's postal code. postal_code?: string | null; - // The customer's address region, county or department. For US customers a 2 - // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state - // code is required (e.g. `CA` for California). + // The customer's address region, county or department. For US customers a 2 + // letter [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) state + // code is required (e.g. `CA` for California). region?: string | null; - // For Swedish customers only. The civic/company number (personnummer, - // samordningsnummer, or organisationsnummer) of the customer. Must be - // supplied if the customer's bank account is denominated in Swedish krona - // (SEK). This field cannot be changed once it has been set. + // For Swedish customers only. The civic/company number (personnummer, + // samordningsnummer, or organisationsnummer) of the customer. Must be + // supplied if the customer's bank account is denominated in Swedish krona + // (SEK). This field cannot be changed once it has been set. swedish_identity_number?: string | null; }; /** Type for a billingrequestwithactionactionsconfirmpayerdetails resource. */ export type BillingRequestWithActionActionsConfirmPayerDetails = { - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. metadata?: JsonMap; - // This attribute can be set to true if the payer has indicated that multiple - // signatures are required for the mandate. As long as every other Billing - // Request actions have been completed, the payer will receive an email - // notification containing instructions on how to complete the additional - // signature. The dual signature flow can only be completed using GoCardless - // branded pages. + // This attribute can be set to true if the payer has indicated that multiple + // signatures are required for the mandate. As long as every other Billing + // Request actions have been completed, the payer will receive an email + // notification containing instructions on how to complete the additional + // signature. The dual signature flow can only be completed using GoCardless + // branded pages. payer_requested_dual_signature?: boolean; }; /** Type for a billingrequestwithactionactionsselectinstitution resource. */ export type BillingRequestWithActionActionsSelectInstitution = { - // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // alpha-2 code. The country code of the institution. If nothing is provided, - // institutions with the country code 'GB' are returned by default. + // [ISO + // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // alpha-2 code. The country code of the institution. If nothing is provided, + // institutions with the country code 'GB' are returned by default. country_code: string; - // The unique identifier for this institution + // The unique identifier for this institution institution: string; }; /** Type for a billingrequestwithactioncreatewithactionsrequestlinks resource. */ export type BillingRequestWithActionCreateWithActionsRequestLinks = { - // ID of the associated [creditor](#core-endpoints-creditors). Only required - // if your account manages multiple creditors. + // ID of the associated [creditor](#core-endpoints-creditors). Only required + // if your account manages multiple creditors. creditor?: string; - // ID of the [customer](#core-endpoints-customers) against which this request - // should be made. + // ID of the [customer](#core-endpoints-customers) against which this request + // should be made. customer?: string; - // (Optional) ID of the - // [customer_bank_account](#core-endpoints-customer-bank-accounts) against - // which this request should be made. + // (Optional) ID of the + // [customer_bank_account](#core-endpoints-customer-bank-accounts) against + // which this request should be made. // customer_bank_account?: string; }; /** Type for a billingrequestwithactionmandaterequest resource. */ export type BillingRequestWithActionMandateRequest = { - // This field is ACH specific, sometimes referred to as [SEC - // code](https://www.moderntreasury.com/learn/sec-codes). + // This field is ACH specific, sometimes referred to as [SEC + // code](https://www.moderntreasury.com/learn/sec-codes). // - // This is the way that the payer gives authorisation to the merchant. - // web: Authorisation is Internet Initiated or via Mobile Entry (maps to - // SEC code: WEB) - // telephone: Authorisation is provided orally over telephone (maps to SEC - // code: TEL) - // paper: Authorisation is provided in writing and signed, or similarly - // authenticated (maps to SEC code: PPD) + // This is the way that the payer gives authorisation to the merchant. + // web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC + // code: WEB) + // telephone: Authorisation is provided orally over telephone (maps to SEC + // code: TEL) + // paper: Authorisation is provided in writing and signed, or similarly + // authenticated (maps to SEC code: PPD) // authorisation_source?: BillingRequestWithActionMandateRequestAuthorisationSource; - // Constraints that will apply to the mandate_request. (Optional) - // Specifically required for PayTo and VRP. + // Constraints that will apply to the mandate_request. (Optional) Specifically + // required for PayTo and VRP. constraints?: BillingRequestWithActionMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // description?: string | null; - // This field will decide how GoCardless handles settlement of funds from the - // customer. + // This field will decide how GoCardless handles settlement of funds from the + // customer. // - // - `managed` will be moved through GoCardless' account, batched, and payed - // out. - // - `direct` will be a direct transfer from the payer's account to the - // merchant where - // invoicing will be handled separately. + // - `managed` will be moved through GoCardless' account, batched, and payed + // out. + // - `direct` will be a direct transfer from the payer's account to the + // merchant where + // invoicing will be handled separately. // funds_settlement?: BillingRequestWithActionMandateRequestFundsSettlement; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. metadata?: JsonMap; - // Unique reference. Different schemes have different length and [character - // set](#appendix-character-sets) requirements. GoCardless will generate a - // unique reference satisfying the different scheme requirements if this - // field is left blank. + // Unique reference. Different schemes have different length and [character + // set](#appendix-character-sets) requirements. GoCardless will generate a + // unique reference satisfying the different scheme requirements if this field + // is left blank. reference?: string | null; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. Optional for mandate only requests - if left - // blank, the payer will be able to select the currency/scheme to pay with - // from a list of your available schemes. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. Optional for mandate only requests - if left + // blank, the payer will be able to select the currency/scheme to pay with + // from a list of your available schemes. scheme?: string | null; - // If true, this billing request would be used to set up a mandate solely for - // moving (or sweeping) money from one account owned by the payer to another - // account that the payer also owns. This is required for Faster Payments + // If true, this billing request would be used to set up a mandate solely for + // moving (or sweeping) money from one account owned by the payer to another + // account that the payer also owns. This is required for Faster Payments sweeping?: boolean; - // Verification preference for the mandate. One of: - //Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
Important: This is not applicable to IBP - // and VRP payments.
+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
Important: This is not applicable to IBP + // and VRP payments.
retry_if_possible?: boolean; - // (Optional) A scheme used for Open Banking payments. Currently - // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` - // and `sepa_instant_credit_transfer` are supported in supported Eurozone - // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as - // the default. Please be aware that `sepa_instant_credit_transfer` may incur - // an additional fee for your customer. + // (Optional) A scheme used for Open Banking payments. Currently + // `faster_payments` is supported in the UK (GBP) and `sepa_credit_transfer` + // and `sepa_instant_credit_transfer` are supported in supported Eurozone + // countries (EUR). For Eurozone countries, `sepa_credit_transfer` is used as + // the default. Please be aware that `sepa_instant_credit_transfer` may incur + // an additional fee for your customer. scheme?: string | null; }; @@ -2303,67 +2295,67 @@ export enum BillingRequestWithActionPurposeCode { /** Type for a billingrequestwithactionbankauthorisations resource. */ export type BillingRequestWithActionBankAuthorisations = { - // Type of authorisation, can be either 'mandate' or 'payment'. + // Type of authorisation, can be either 'mandate' or 'payment'. authorisation_type?: BillingRequestWithActionBankAuthorisationsAuthorisationType; - // Fixed [timestamp](#api-usage-dates-and-times), recording when the user has - // been authorised. + // Fixed [timestamp](#api-usage-dates-and-times), recording when the user has + // been authorised. authorised_at?: string | null; - // Timestamp when the flow was created + // Timestamp when the flow was created created_at?: string; - // Timestamp when the url will expire. Each authorisation url currently lasts - // for 15 minutes, but this can vary by bank. + // Timestamp when the url will expire. Each authorisation url currently lasts + // for 15 minutes, but this can vary by bank. expires_at?: string; - // Unique identifier, beginning with "BAU". + // Unique identifier, beginning with "BAU". id: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when the - // authorisation URL has been visited. + // Fixed [timestamp](#api-usage-dates-and-times), recording when the + // authorisation URL has been visited. last_visited_at?: string | null; // Resources linked to this BillingRequestWithActionBankAuthorisations. links?: BillingRequestWithActionBankAuthorisationsLinks; - // URL to a QR code PNG image of the bank authorisation url. - // This QR code can be used as an alternative to providing the `url` to the - // payer to allow them to authorise with their mobile devices. + // URL to a QR code PNG image of the bank authorisation url. + // This QR code can be used as an alternative to providing the `url` to the + // payer to allow them to authorise with their mobile devices. qr_code_url?: string | null; - // URL that the payer can be redirected to after authorising the payment. + // URL that the payer can be redirected to after authorising the payment. // - // On completion of bank authorisation, the query parameter of either - // `outcome=success` or `outcome=failure` will be - // appended to the `redirect_uri` to indicate the result of the bank - // authorisation. If the bank authorisation is - // expired, the query parameter `outcome=timeout` will be appended to the - // `redirect_uri`, in which case you should - // prompt the user to try the bank authorisation step again. + // On completion of bank authorisation, the query parameter of either + // `outcome=success` or `outcome=failure` will be + // appended to the `redirect_uri` to indicate the result of the bank + // authorisation. If the bank authorisation is + // expired, the query parameter `outcome=timeout` will be appended to the + // `redirect_uri`, in which case you should + // prompt the user to try the bank authorisation step again. // - // Please note: bank authorisations can still fail despite an - // `outcome=success` on the `redirect_uri`. It is therefore recommended to - // wait for the relevant bank authorisation event, such as - // [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), - // [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), - // or [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) - // in order to show the correct outcome to the user. + // Please note: bank authorisations can still fail despite an + // `outcome=success` on the `redirect_uri`. It is therefore recommended to + // wait for the relevant bank authorisation event, such as + // [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised), + // [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied), or + // [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed) in + // order to show the correct outcome to the user. // - // The BillingRequestFlow ID will also be appended to the `redirect_uri` as - // query parameter `id=BRF123`. + // The BillingRequestFlow ID will also be appended to the `redirect_uri` as + // query parameter `id=BRF123`. // - // Defaults to `https://pay.gocardless.com/billing/static/thankyou`. + // Defaults to `https://pay.gocardless.com/billing/static/thankyou`. redirect_uri?: string; - // URL for an oauth flow that will allow the user to authorise the payment + // URL for an oauth flow that will allow the user to authorise the payment url?: string; }; /** Type for a billingrequestwithactionbankauthorisationscreaterequestlinks resource. */ export type BillingRequestWithActionBankAuthorisationsCreateRequestLinks = { - // ID of the [billing request](#billing-requests-billing-requests) against - // which this authorisation was created. + // ID of the [billing request](#billing-requests-billing-requests) against + // which this authorisation was created. billing_request?: string; }; @@ -2374,114 +2366,114 @@ export enum BillingRequestWithActionBankAuthorisationsAuthorisationType { /** Type for a billingrequestwithactionbankauthorisationslinks resource. */ export type BillingRequestWithActionBankAuthorisationsLinks = { - // ID of the [billing request](#billing-requests-billing-requests) against - // which this authorisation was created. + // ID of the [billing request](#billing-requests-billing-requests) against + // which this authorisation was created. billing_request?: string; - // ID of the [institution](#billing-requests-institutions) against which this - // authorisation was created. + // ID of the [institution](#billing-requests-institutions) against which this + // authorisation was created. institution?: string; }; /** Type for a billingrequestwithactionbillingrequests resource. */ export type BillingRequestWithActionBillingRequests = { - // List of actions that can be performed before this billing request can be - // fulfilled. + // List of actions that can be performed before this billing request can be + // fulfilled. actions?: BillingRequestWithActionBillingRequestsAction[]; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this - // resource was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource + // was created. created_at?: string; - // (Optional) If true, this billing request can fallback from instant payment - // to direct debit. - // Should not be set if GoCardless payment intelligence feature is used. + // (Optional) If true, this billing request can fallback from instant payment + // to direct debit. + // Should not be set if GoCardless payment intelligence feature is used. // - // See [Billing Requests: Retain customers with - // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) - // for more information. + // See [Billing Requests: Retain customers with + // Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) + // for more information. fallback_enabled?: boolean; - // True if the billing request was completed with direct debit. + // True if the billing request was completed with direct debit. fallback_occurred?: boolean; - // Unique identifier, beginning with "BRQ". + // Unique identifier, beginning with "BRQ". id: string; - // Request for an instalment schedule. Has to contain either - // `instalments_with_schedule` object or an array of `instalments_with_dates` - // objects + // Request for an instalment schedule. Has to contain either + // `instalments_with_schedule` object or an array of `instalments_with_dates` + // objects instalment_schedule_request?: BillingRequestWithActionBillingRequestsInstalmentScheduleRequest | null; // Resources linked to this BillingRequestWithActionBillingRequests. links?: BillingRequestWithActionBillingRequestsLinks; - // Request for a mandate + // Request for a mandate mandate_request?: BillingRequestWithActionBillingRequestsMandateRequest; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. metadata?: JsonMap; - // Specifies the context or scenario in which the payment is being made. - // Defines whether the payment is for advance/arrears billing, point of sale - // transactions, ecommerce, or account transfers. This helps banks and - // payment processors understand the payment scenario and apply appropriate - // processing rules and risk controls. + // Specifies the context or scenario in which the payment is being made. + // Defines whether the payment is for advance/arrears billing, point of sale + // transactions, ecommerce, or account transfers. This helps banks and payment + // processors understand the payment scenario and apply appropriate processing + // rules and risk controls. payment_context_code?: BillingRequestWithActionBillingRequestsPaymentContextCode; - // Specifies the underlying purpose of the payment. Defines the specific - // reason or type of service/goods the payment relates to, improving - // straight-through processing and compliance. - // See [VRP Commercial Payment Purpose - // Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) - // for the complete list of valid codes. + // Specifies the underlying purpose of the payment. Defines the specific + // reason or type of service/goods the payment relates to, improving + // straight-through processing and compliance. + // See [VRP Commercial Payment Purpose + // Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) + // for the complete list of valid codes. payment_purpose_code?: string; - // Request for a one-off strongly authorised payment + // Request for a one-off strongly authorised payment payment_request?: BillingRequestWithActionBillingRequestsPaymentRequest; - // Specifies the high-level purpose/category of a mandate and/or payment - // using a set of pre-defined categories. Provides context on the nature and - // reason for the payment to facilitate processing and compliance. - // See [Billing Request Purpose - // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) - // for the complete list of valid codes. + // Specifies the high-level purpose/category of a mandate and/or payment using + // a set of pre-defined categories. Provides context on the nature and reason + // for the payment to facilitate processing and compliance. + // See [Billing Request Purpose + // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for + // the complete list of valid codes. purpose_code?: BillingRequestWithActionBillingRequestsPurposeCode; // resources?: BillingRequestWithActionBillingRequestsResources; - // One of: - //Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; - // The total amount of the instalment schedule, defined as the sum of all - // individual - // payments, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in - // EUR). If the requested payment amounts do not sum up correctly, a - // validation error - // will be returned. + // The total amount of the instalment schedule, defined as the sum of all + // individual + // payments, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in + // EUR). If the requested payment amounts do not sum up correctly, a + // validation error + // will be returned. total_amount?: string; }; /** Type for a billingrequestwithactionbillingrequestsinstalmentschedulerequestinstalmentswithdate resource. */ export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithDate = { - // Amount, in the lowest denomination for the currency (e.g. pence in GBP, - // cents in EUR). + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). amount: string; - // A future date on which the payment should be collected. If the date - // is before the next_possible_charge_date on the - // [mandate](#core-endpoints-mandates), it will be automatically rolled - // forwards to that date. + // A future date on which the payment should be collected. If the date + // is before the next_possible_charge_date on the + // [mandate](#core-endpoints-mandates), it will be automatically rolled + // forwards to that date. charge_date: string | null; - // A human-readable description of the payment. This will be included in the - // notification email GoCardless sends to your customer if your organisation - // does not send its own notifications (see [compliance - // requirements](#appendix-compliance-requirements)). + // A human-readable description of the payment. This will be included in the + // notification email GoCardless sends to your customer if your organisation + // does not send its own notifications (see [compliance + // requirements](#appendix-compliance-requirements)). description?: string | null; }; /** Type for a billingrequestwithactionbillingrequestsinstalmentschedulerequestinstalmentswithschedule resource. */ export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithSchedule = { - // List of amounts of each instalment, in the lowest denomination for the - // currency (e.g. cents in USD). + // List of amounts of each instalment, in the lowest denomination for the + // currency (e.g. cents in USD). // amounts: string[]; - // Number of `interval_units` between charge dates. Must be greater than or - // equal to `1`. + // Number of `interval_units` between charge dates. Must be greater than or + // equal to `1`. // interval: number; - // The unit of time between customer charge dates. One of `weekly`, `monthly` - // or `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` + // or `yearly`. interval_unit: BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithScheduleIntervalUnit; - // The date on which the first payment should be charged. Must be on or after - // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. - // When left blank and `month` or `day_of_month` are provided, this will be - // set to the date of the first payment. If created without `month` or - // `day_of_month` this will be set as the mandate's - // `next_possible_charge_date` + // The date on which the first payment should be charged. Must be on or after + // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When + // left blank and `month` or `day_of_month` are provided, this will be set to + // the date of the first payment. If created without `month` or `day_of_month` + // this will be set as the mandate's `next_possible_charge_date` start_date?: string | null; }; @@ -2874,170 +2863,170 @@ export enum BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInst /** Type for a billingrequestwithactionbillingrequestsinstalmentschedulerequestlinks resource. */ export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequestLinks = { - // (Optional) ID of the - // [instalment_schedule](#core-endpoints-instalment-schedules) that was - // created from this instalment schedule request. + // (Optional) ID of the + // [instalment_schedule](#core-endpoints-instalment-schedules) that was + // created from this instalment schedule request. // instalment_schedule?: string; }; /** Type for a billingrequestwithactionbillingrequestslinks resource. */ export type BillingRequestWithActionBillingRequestsLinks = { - // (Optional) ID of the [bank - // authorisation](#billing-requests-bank-authorisations) that was used to - // verify this request. + // (Optional) ID of the [bank + // authorisation](#billing-requests-bank-authorisations) that was used to + // verify this request. bank_authorisation?: string; - // ID of the associated [creditor](#core-endpoints-creditors). + // ID of the associated [creditor](#core-endpoints-creditors). creditor?: string; - // ID of the [customer](#core-endpoints-customers) that will be used for this - // request + // ID of the [customer](#core-endpoints-customers) that will be used for this + // request customer?: string; - // (Optional) ID of the - // [customer_bank_account](#core-endpoints-customer-bank-accounts) that will - // be used for this request + // (Optional) ID of the + // [customer_bank_account](#core-endpoints-customer-bank-accounts) that will + // be used for this request customer_bank_account?: string; - // ID of the customer billing detail that will be used for this request + // ID of the customer billing detail that will be used for this request customer_billing_detail?: string; - // (Optional) ID of the associated instalment schedule request + // (Optional) ID of the associated instalment schedule request instalment_schedule_request?: string; - // (Optional) ID of the - // [instalment_schedule](#core-endpoints-instalment-schedules) that was - // created from this instalment schedule request. + // (Optional) ID of the + // [instalment_schedule](#core-endpoints-instalment-schedules) that was + // created from this instalment schedule request. instalment_schedule_request_instalment_schedule?: string; - // (Optional) ID of the associated mandate request + // (Optional) ID of the associated mandate request mandate_request?: string; - // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created - // from this mandate request. this mandate request. + // (Optional) ID of the [mandate](#core-endpoints-mandates) that was created + // from this mandate request. this mandate request. mandate_request_mandate?: string; - // ID of the associated organisation. + // ID of the associated organisation. organisation?: string; - // (Optional) ID of the associated payment provider + // (Optional) ID of the associated payment provider payment_provider?: string; - // (Optional) ID of the associated payment request + // (Optional) ID of the associated payment request payment_request?: string; - // (Optional) ID of the [payment](#core-endpoints-payments) that was created - // from this payment request. + // (Optional) ID of the [payment](#core-endpoints-payments) that was created + // from this payment request. payment_request_payment?: string; - // (Optional) ID of the associated subscription request + // (Optional) ID of the associated subscription request subscription_request?: string; - // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that - // was created from this subscription request. + // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was + // created from this subscription request. subscription_request_subscription?: string; }; /** Type for a billingrequestwithactionbillingrequestsmandaterequest resource. */ export type BillingRequestWithActionBillingRequestsMandateRequest = { - // This field is ACH specific, sometimes referred to as [SEC - // code](https://www.moderntreasury.com/learn/sec-codes). + // This field is ACH specific, sometimes referred to as [SEC + // code](https://www.moderntreasury.com/learn/sec-codes). // - // This is the way that the payer gives authorisation to the merchant. - // web: Authorisation is Internet Initiated or via Mobile Entry (maps to - // SEC code: WEB) - // telephone: Authorisation is provided orally over telephone (maps to SEC - // code: TEL) - // paper: Authorisation is provided in writing and signed, or similarly - // authenticated (maps to SEC code: PPD) + // This is the way that the payer gives authorisation to the merchant. + // web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC + // code: WEB) + // telephone: Authorisation is provided orally over telephone (maps to SEC + // code: TEL) + // paper: Authorisation is provided in writing and signed, or similarly + // authenticated (maps to SEC code: PPD) // authorisation_source?: BillingRequestWithActionBillingRequestsMandateRequestAuthorisationSource; - // This attribute represents the authorisation type between the payer and - // merchant. It can be set to `one_off`, - // `recurring` or `standing` for ACH scheme. And `single`, `recurring` and - // `sporadic` for PAD scheme. _Note:_ This is only supported for ACH and PAD - // schemes. + // This attribute represents the authorisation type between the payer and + // merchant. It can be set to `one_off`, + // `recurring` or `standing` for ACH scheme. And `single`, `recurring` and + // `sporadic` for PAD scheme. _Note:_ This is only supported for ACH and PAD + // schemes. // consent_type?: string | null; - // Constraints that will apply to the mandate_request. (Optional) - // Specifically required for PayTo and VRP. + // Constraints that will apply to the mandate_request. (Optional) Specifically + // required for PayTo and VRP. constraints?: BillingRequestWithActionBillingRequestsMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency - // code. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. currency?: string; - // A human-readable description of the payment and/or mandate. This will be - // displayed to the payer when authorising the billing request. + // A human-readable description of the payment and/or mandate. This will be + // displayed to the payer when authorising the billing request. // description?: string | null; - // This field will decide how GoCardless handles settlement of funds from the - // customer. + // This field will decide how GoCardless handles settlement of funds from the + // customer. // - // - `managed` will be moved through GoCardless' account, batched, and payed - // out. - // - `direct` will be a direct transfer from the payer's account to the - // merchant where - // invoicing will be handled separately. + // - `managed` will be moved through GoCardless' account, batched, and payed + // out. + // - `direct` will be a direct transfer from the payer's account to the + // merchant where + // invoicing will be handled separately. // funds_settlement?: BillingRequestWithActionBillingRequestsMandateRequestFundsSettlement; // Resources linked to this BillingRequestWithActionBillingRequestsMandateRequest. links?: BillingRequestWithActionBillingRequestsMandateRequestLinks; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. metadata?: JsonMap; - // This attribute can be set to true if the payer has indicated that multiple - // signatures are required for the mandate. As long as every other Billing - // Request actions have been completed, the payer will receive an email - // notification containing instructions on how to complete the additional - // signature. The dual signature flow can only be completed using GoCardless - // branded pages. + // This attribute can be set to true if the payer has indicated that multiple + // signatures are required for the mandate. As long as every other Billing + // Request actions have been completed, the payer will receive an email + // notification containing instructions on how to complete the additional + // signature. The dual signature flow can only be completed using GoCardless + // branded pages. payer_requested_dual_signature?: boolean; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. Optional for mandate only requests - if left - // blank, the payer will be able to select the currency/scheme to pay with - // from a list of your available schemes. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. Optional for mandate only requests - if left + // blank, the payer will be able to select the currency/scheme to pay with + // from a list of your available schemes. scheme?: string | null; - // If true, this billing request would be used to set up a mandate solely for - // moving (or sweeping) money from one account owned by the payer to another - // account that the payer also owns. This is required for Faster Payments + // If true, this billing request would be used to set up a mandate solely for + // moving (or sweeping) money from one account owned by the payer to another + // account that the payer also owns. This is required for Faster Payments sweeping?: boolean; - // Verification preference for the mandate. One of: - //Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; - // The date on which the first payment should be charged. If fulfilled after - // this date, this will be set as the mandate's `next_possible_charge_date`. - // When left blank and `month` or `day_of_month` are provided, this will be - // set to the date of the first payment. - // If created without `month` or `day_of_month` this will be set as the - // mandate's `next_possible_charge_date`. + // The date on which the first payment should be charged. If fulfilled after + // this date, this will be set as the mandate's `next_possible_charge_date`. + // When left blank and `month` or `day_of_month` are provided, this will be + // set to the date of the first payment. + // If created without `month` or `day_of_month` this will be set as the + // mandate's `next_possible_charge_date`. // start_date?: string | null; }; @@ -3471,8 +3458,8 @@ export enum BillingRequestWithActionBillingRequestsSubscriptionRequestIntervalUn /** Type for a billingrequestwithactionbillingrequestssubscriptionrequestlinks resource. */ export type BillingRequestWithActionBillingRequestsSubscriptionRequestLinks = { - // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that - // was created from this subscription request. + // (Optional) ID of the [subscription](#core-endpoints-subscriptions) that was + // created from this subscription request. // subscription?: string; }; @@ -3494,54 +3481,54 @@ export enum BillingRequestWithActionBillingRequestsSubscriptionRequestMonth { /** Type for a block resource. */ export type Block = { - // Shows if the block is active or disabled. Only active blocks will be used - // when deciding - // if a mandate should be blocked. + // Shows if the block is active or disabled. Only active blocks will be used + // when deciding + // if a mandate should be blocked. active?: boolean | null; - // Type of entity we will seek to match against when blocking the mandate. - // This - // can currently be one of 'email', 'email_domain', 'bank_account', or - // 'bank_name'. + // Type of entity we will seek to match against when blocking the mandate. + // This + // can currently be one of 'email', 'email_domain', 'bank_account', or + // 'bank_name'. block_type?: BlockBlockType; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this - // resource was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was created. created_at?: string; - // Unique identifier, beginning with "BLC". + // Unique identifier, beginning with "BLC". id?: string; - // This field is required if the reason_type is other. It should be a - // description of - // the reason for why you wish to block this payer and why it does not align - // with the - // given reason_types. This is intended to help us improve our knowledge of - // types of - // fraud. + // This field is required if the reason_type is other. It should be a + // description of + // the reason for why you wish to block this payer and why it does not align + // with the + // given reason_types. This is intended to help us improve our knowledge of + // types of + // fraud. reason_description?: string | null; - // The reason you wish to block this payer, can currently be one of - // 'identity_fraud', - // 'no_intent_to_pay', 'unfair_chargeback'. If the reason isn't captured by - // one of the - // above then 'other' can be selected but you must provide a reason - // description. + // The reason you wish to block this payer, can currently be one of + // 'identity_fraud', + // 'no_intent_to_pay', 'unfair_chargeback'. If the reason isn't captured by + // one of the + // above then 'other' can be selected but you must provide a reason + // description. reason_type?: BlockReasonType; - // This field is a reference to the value you wish to block. This may be the - // raw value - // (in the case of emails or email domains) or the ID of the resource (in the - // case of - // bank accounts and bank names). This means in order to block a specific - // bank account - // (even if you wish to block generically by name) it must already have been - // created as - // a resource. + // This field is a reference to the value you wish to block. This may be the + // raw value + // (in the case of emails or email domains) or the ID of the resource (in the + // case of + // bank accounts and bank names). This means in order to block a specific bank + // account + // (even if you wish to block generically by name) it must already have been + // created as + // a resource. resource_reference?: string; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this - // resource was updated. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this + // resource was updated. updated_at?: string; }; @@ -3566,112 +3553,111 @@ export enum BlockReferenceType { /** Type for a creditor resource. */ export type Creditor = { - // The first line of the creditor's address. + // The first line of the creditor's address. address_line1?: string | null; - // The second line of the creditor's address. + // The second line of the creditor's address. address_line2?: string | null; - // The third line of the creditor's address. + // The third line of the creditor's address. address_line3?: string | null; - // Prefix for the bank reference of payouts sent to this creditor. For - // instance, if - // the creditor's `bank_reference_prefix` was `ACME`, the bank reference of a - // payout - // sent to that creditor could be `ACME-8G7Q8`. + // Prefix for the bank reference of payouts sent to this creditor. For + // instance, if + // the creditor's `bank_reference_prefix` was `ACME`, the bank reference of a + // payout + // sent to that creditor could be `ACME-8G7Q8`. // - // This prefix is also used for refunds in EUR and GBP. + // This prefix is also used for refunds in EUR and GBP. // bank_reference_prefix?: string; - // Boolean indicating whether the creditor is permitted to create refunds. + // Boolean indicating whether the creditor is permitted to create refunds. can_create_refunds?: boolean; - // The city of the creditor's address. + // The city of the creditor's address. city?: string | null; - // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; - // Fixed [timestamp](#api-usage-dates-and-times), recording when this - // resource was created. + // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource + // was created. created_at?: string; - // The type of business of the creditor. Currently, `individual`, `company`, - // `charity`, `partnership`, and `trust` are supported. + // The type of business of the creditor. Currently, `individual`, `company`, + // `charity`, `partnership`, and `trust` are supported. creditor_type?: CreditorCreditorType; - // Boolean value indicating whether creditor has the [Custom Payment - // Pages](https://hub.gocardless.com/s/article/Custom-payment-pages) - // functionality enabled. + // Boolean value indicating whether creditor has the [Custom Payment + // Pages](https://hub.gocardless.com/s/article/Custom-payment-pages) + // functionality enabled. custom_payment_pages_enabled?: boolean; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for - // the currency in which amounts will be paid out (after foreign exchange). - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. Present only if payouts will be (or were) made via foreign - // exchange. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the + // currency in which amounts will be paid out (after foreign exchange). + // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // supported. Present only if payouts will be (or were) made via foreign + // exchange. fx_payout_currency?: CreditorFxPayoutCurrency; - // Unique identifier, beginning with "CR". + // Unique identifier, beginning with "CR". id?: string; // Resources linked to this Creditor. links?: CreditorLinks; - // URL for the creditor's logo, which may be shown on their payment pages. + // URL for the creditor's logo, which may be shown on their payment pages. logo_url?: string | null; - // Boolean value indicating whether creditor has the [Mandate - // Imports](#core-endpoints-mandate-imports) functionality enabled. + // Boolean value indicating whether creditor has the [Mandate + // Imports](#core-endpoints-mandate-imports) functionality enabled. mandate_imports_enabled?: boolean; - // Boolean value indicating whether the organisation is responsible for - // sending all customer notifications (note this is separate from the - // functionality described - // [here](/getting-started/api/handling-customer-notifications/)). If you are - // a partner app, and this value is true, you should not send notifications - // on behalf of this organisation. + // Boolean value indicating whether the organisation is responsible for + // sending all customer notifications (note this is separate from the + // functionality described + // [here](/getting-started/api/handling-customer-notifications/)). If you are + // a partner app, and this value is true, you should not send notifications on + // behalf of this organisation. merchant_responsible_for_notifications?: boolean; - // The creditor's trading name. + // The creditor's trading name. name?: string; - // The creditor's postal code. + // The creditor's postal code. postal_code?: string | null; - // The creditor's address region, county or department. + // The creditor's address region, county or department. region?: string | null; - // An array of the scheme identifiers this creditor can create mandates - // against. + // An array of the scheme identifiers this creditor can create mandates + // against. // - // The support address, `phone_number` and `email` fields are for customers - // to contact the merchant for support purposes. They must be displayed on - // the payment page, please see our [compliance - // requirements](#appendix-compliance-requirements) for more details. + // The support address, `phone_number` and `email` fields are for customers to + // contact the merchant for support purposes. They must be displayed on the + // payment page, please see our [compliance + // requirements](#appendix-compliance-requirements) for more details. scheme_identifiers?: CreditorSchemeIdentifier[]; - // The creditor's verification status, indicating whether they can yet - // receive payouts. For more details on handling verification as a partner, - // see our ["Helping your users get verified" - // guide](/getting-started/partners/helping-your-users-get-verified/). One - // of: - //Restricted: You can only - // specify a payment reference for Bacs payments (that is, when collecting - // from the UK) if you're on the GoCardless Plus, Pro or Enterprise - // packages.
Restricted: You can not specify - // a payment reference for Faster Payments.
+ // An optional reference that will appear on your customer's bank statement. + // The character limit for this reference is dependent on the scheme.Restricted: You can only specify + // a payment reference for Bacs payments (that is, when collecting from the + // UK) if you're on the GoCardless + // Plus, Pro or Enterprise packages.
Restricted: You can not specify + // a payment reference for Faster Payments.
reference?: string | null; - // On failure, automatically retry the payment using [intelligent - // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry the payment using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; - // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", - // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and - // "sepa_core" are supported. + // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and + // "sepa_core" are supported. scheme?: string | null; - // One of: - //For accuracy, we store some of our fees to greater
- // precision than we can actually pay out (for example, a GoCardless fee we
- // record might come to 0.5 pence, but it is not possible to send a payout
- // via bank transfer including a half penny).
To calculate the final
- // amount of the payout, we sum all of the items and then round to the
- // nearest currency unit.
For accuracy, we store some of our fees to greater
+ // precision than we can actually pay out (for example, a GoCardless fee we
+ // record might come to 0.5 pence, but it is not possible to send a payout via
+ // bank transfer including a half penny).
To calculate the final amount
+ // of the payout, we sum all of the items and then round to the nearest
+ // currency unit.
Restricted: You can only - // specify a payment reference for Bacs payments (that is, when collecting - // from the UK) if you're on the GoCardless Plus, Pro or Enterprise - // packages.
Restricted: You can not specify - // a payment reference for Faster Payments.
+ // An optional reference that will appear on your customer's bank statement. + // The character limit for this reference is dependent on the scheme.Restricted: You can only specify + // a payment reference for Bacs payments (that is, when collecting from the + // UK) if you're on the GoCardless + // Plus, Pro or Enterprise packages.
Restricted: You can not specify + // a payment reference for Faster Payments.
reference?: string | null; - // One of: - //Restricted: You must request - // access to Mandate Refunds by contacting our support team.
+ // ID of the [mandate](#core-endpoints-mandates) against which the refund is + // being made.Restricted: You must request + // access to Mandate Refunds by contacting our support team.
mandate?: string; - // ID of the [payment](#core-endpoints-payments) against which the refund is - // being made. + // ID of the [payment](#core-endpoints-payments) against which the refund is + // being made. payment?: string; }; @@ -6659,26 +6629,26 @@ export enum RefundRefundType { /** Type for a refundfx resource. */ export type RefundFx = { - // Estimated rate that will be used in the foreign exchange of the `amount` - // into the `fx_currency`. - // This will vary based on the prevailing market rate until the moment that - // it is paid out. - // Present only before a resource is paid out. Has up to 10 decimal places. + // Estimated rate that will be used in the foreign exchange of the `amount` + // into the `fx_currency`. + // This will vary based on the prevailing market rate until the moment that it + // is paid out. + // Present only before a resource is paid out. Has up to 10 decimal places. estimated_exchange_rate?: string | null; - // Rate used in the foreign exchange of the `amount` into the `fx_currency`. - // Present only after a resource is paid out. Has up to 10 decimal places. + // Rate used in the foreign exchange of the `amount` into the `fx_currency`. + // Present only after a resource is paid out. Has up to 10 decimal places. exchange_rate?: string | null; - // Amount that was paid out in the `fx_currency` after foreign exchange. - // Present only after the resource has been paid out. + // Amount that was paid out in the `fx_currency` after foreign exchange. + // Present only after the resource has been paid out. fx_amount?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for - // the currency in which amounts will be paid out (after foreign exchange). - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are - // supported. Present only if payouts will be (or were) made via foreign - // exchange. + // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the + // currency in which amounts will be paid out (after foreign exchange). + // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // supported. Present only if payouts will be (or were) made via foreign + // exchange. fx_currency?: RefundFxFxCurrency; }; @@ -6695,12 +6665,12 @@ export enum RefundFxFxCurrency { /** Type for a refundlinks resource. */ export type RefundLinks = { - // ID of the [mandate](#core-endpoints-mandates) against which the refund is - // being made. + // ID of the [mandate](#core-endpoints-mandates) against which the refund is + // being made. mandate?: string; - // ID of the [payment](#core-endpoints-payments) against which the refund is - // being made. + // ID of the [payment](#core-endpoints-payments) against which the refund is + // being made. payment?: string; }; @@ -6716,218 +6686,217 @@ export enum RefundStatus { /** Type for a scenariosimulator resource. */ export type ScenarioSimulator = { - // The unique identifier of the simulator, used to initiate simulations. One - // of: - //Deprecated: This field will - // be removed in a future API version. Use `count` to specify a number of - // payments instead.
+ // Date on or after which no further payments should be created. + //Deprecated: This field will + // be removed in a future API version. Use `count` to specify a number of + // payments instead.
end_date?: string | null; - // Unique identifier, beginning with "SB". + // Unique identifier, beginning with "SB". id?: string; - // Number of `interval_units` between customer charge dates. Must be greater - // than or equal to `1`. Must result in at least one charge date per year. - // Defaults to `1`. + // Number of `interval_units` between customer charge dates. Must be greater + // than or equal to `1`. Must result in at least one charge date per year. + // Defaults to `1`. interval?: string; - // The unit of time between customer charge dates. One of `weekly`, `monthly` - // or `yearly`. + // The unit of time between customer charge dates. One of `weekly`, `monthly` + // or `yearly`. interval_unit?: SubscriptionIntervalUnit; // Resources linked to this Subscription. links?: SubscriptionLinks; - // Key-value store of custom data. Up to 3 keys are permitted, with key names - // up to 50 characters and values up to 500 characters. + // Key-value store of custom data. Up to 3 keys are permitted, with key names + // up to 50 characters and values up to 500 characters. metadata?: JsonMap; - // Name of the month on which to charge a customer. Must be lowercase. Only - // applies - // when the interval_unit is `yearly`. + // Name of the month on which to charge a customer. Must be lowercase. Only + // applies + // when the interval_unit is `yearly`. // month?: SubscriptionMonth; - // Optional name for the subscription. This will be set as the description on - // each payment created. Must not exceed 255 characters. + // Optional name for the subscription. This will be set as the description on + // each payment created. Must not exceed 255 characters. name?: string | null; - // Whether the parent plan of this subscription is paused. + // Whether the parent plan of this subscription is paused. parent_plan_paused?: boolean; - // An optional payment reference. This will be set as the reference on each - // payment - // created and will appear on your customer's bank statement. See the - // documentation for - // the [create payment endpoint](#payments-create-a-payment) for more - // details. - //Restricted: You need your - // own Service User Number to specify a payment reference for Bacs - // payments.
+ // An optional payment reference. This will be set as the reference on each + // payment + // created and will appear on your customer's bank statement. See the + // documentation for + // the [create payment endpoint](#payments-create-a-payment) for more details. + //Restricted: You need your own + // Service User Number to specify a payment reference for Bacs payments.
payment_reference?: string | null; - // On failure, automatically retry payments using [intelligent - // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent - // retries, Success+ needs to be enabled in [GoCardless - // dashboard](https://manage.gocardless.com/success-plus).
+ // On failure, automatically retry payments using [intelligent + // retries](/success-plus/overview). Default is `false`.Important: To be able to use intelligent + // retries, Success+ needs to be enabled in [GoCardless + // dashboard](https://manage.gocardless.com/success-plus).
retry_if_possible?: boolean; - // The date on which the first payment should be charged. Must be on or after - // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. - // When left blank and `month` or `day_of_month` are provided, this will be - // set to the date of the first payment. If created without `month` or - // `day_of_month` this will be set as the mandate's - // `next_possible_charge_date` + // The date on which the first payment should be charged. Must be on or after + // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When + // left blank and `month` or `day_of_month` are provided, this will be set to + // the date of the first payment. If created without `month` or `day_of_month` + // this will be set as the mandate's `next_possible_charge_date` start_date?: string | null; - // One of: - //