From 1817e1d2dced41aac63b8f2874096cacaa5c2607 Mon Sep 17 00:00:00 2001 From: Dmitriy Nevzorov Date: Thu, 13 May 2021 10:52:14 +0200 Subject: [PATCH] update schema --- src/api.ts | 72 ++++++++++++++++++++++++++++++++++++++------ src/base.ts | 4 +-- src/configuration.ts | 2 +- src/index.ts | 2 +- 4 files changed, 66 insertions(+), 14 deletions(-) diff --git a/src/api.ts b/src/api.ts index 5bea70f..77ce54c 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,7 +1,7 @@ // tslint:disable /** * MONEI API v1 - * The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. + * The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** * * The version of the OpenAPI document: 1.0.0 * @@ -14,7 +14,7 @@ import * as globalImportUrl from 'url'; import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance } from '../axios'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; @@ -118,6 +118,18 @@ export interface Card { * @memberof Card */ expYear?: string; + /** + * The cardholder\'s name, as stated in the credit card. + * @type {string} + * @memberof Card + */ + cardholderName?: string; + /** + * The cardholder\'s email address. + * @type {string} + * @memberof Card + */ + cardholderEmail?: string; } /** * @@ -126,11 +138,17 @@ export interface Card { */ export interface ConfirmPaymentRequest { /** - * A payment token generated by monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). + * A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). * @type {string} * @memberof ConfirmPaymentRequest */ paymentToken: string; + /** + * + * @type {ConfirmPaymentRequestPaymentMethod} + * @memberof ConfirmPaymentRequest + */ + paymentMethod?: ConfirmPaymentRequestPaymentMethod; /** * If set to true a permanent token that represents a payment method used in the payment will be generated. * @type {boolean} @@ -156,6 +174,38 @@ export interface ConfirmPaymentRequest { */ shippingDetails?: PaymentShippingDetails; } +/** + * Additional information about the payment method used for this payment. + * @export + * @interface ConfirmPaymentRequestPaymentMethod + */ +export interface ConfirmPaymentRequestPaymentMethod { + /** + * + * @type {ConfirmPaymentRequestPaymentMethodCard} + * @memberof ConfirmPaymentRequestPaymentMethod + */ + card?: ConfirmPaymentRequestPaymentMethodCard; +} +/** + * Additional information about the card used for this payment. + * @export + * @interface ConfirmPaymentRequestPaymentMethodCard + */ +export interface ConfirmPaymentRequestPaymentMethodCard { + /** + * The cardholder\'s name, as stated in the credit card. + * @type {string} + * @memberof ConfirmPaymentRequestPaymentMethodCard + */ + cardholderName?: string; + /** + * The cardholder\'s email address. + * @type {string} + * @memberof ConfirmPaymentRequestPaymentMethodCard + */ + cardholderEmail?: string; +} /** * * @export @@ -205,7 +255,7 @@ export interface CreatePaymentRequest { */ cancelUrl?: string; /** - * A payment token generated by monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. + * A payment token generated by monei.js [Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. * @type {string} * @memberof CreatePaymentRequest */ @@ -620,7 +670,9 @@ export enum PaymentPaymentMethodMethodEnum { Bizum = 'bizum', GooglePay = 'googlePay', ApplePay = 'applePay', - Paypal = 'paypal' + ClickToPay = 'clickToPay', + Paypal = 'paypal', + Cofidis = 'cofidis' } /** @@ -729,7 +781,7 @@ export interface PaymentPaymentMethodPaypal { orderId?: string; } /** - * An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `card` - `bizum` - `applePay` - `googlePay` - `paypal` + * An array of allowed payment methods (used in hosted payment page). Must be enabled payment methods. Possible values: - `card` - `bizum` - `applePay` - `googlePay` - `clickToPay` - `paypal` - `cofidis` * @export * @interface PaymentPaymentMethods */ @@ -1225,7 +1277,7 @@ export const PaymentsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. + * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. * @summary Confirm Payment * @param {string} id The payment ID * @param {ConfirmPaymentRequest} [confirmPaymentRequest] @@ -1502,7 +1554,7 @@ export const PaymentsApiFp = function(configuration?: Configuration) { }; }, /** - * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. + * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. * @summary Confirm Payment * @param {string} id The payment ID * @param {ConfirmPaymentRequest} [confirmPaymentRequest] @@ -1606,7 +1658,7 @@ export const PaymentsApiFactory = function (configuration?: Configuration, baseP return PaymentsApiFp(configuration).capture(id, capturePaymentRequest, options).then((request) => request(axios, basePath)); }, /** - * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. + * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. * @summary Confirm Payment * @param {string} id The payment ID * @param {ConfirmPaymentRequest} [confirmPaymentRequest] @@ -1695,7 +1747,7 @@ export class PaymentsApi extends BaseAPI { } /** - * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. + * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. * @summary Confirm Payment * @param {string} id The payment ID * @param {ConfirmPaymentRequest} [confirmPaymentRequest] diff --git a/src/base.ts b/src/base.ts index 3dfb34d..120a7f3 100644 --- a/src/base.ts +++ b/src/base.ts @@ -1,7 +1,7 @@ // tslint:disable /** * MONEI API v1 - * The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. + * The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** * * The version of the OpenAPI document: 1.0.0 * @@ -15,7 +15,7 @@ import { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance } from '../axios'; +import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; export const BASE_PATH = "https://api.monei.com/v1".replace(/\/+$/, ""); diff --git a/src/configuration.ts b/src/configuration.ts index ea3bbaf..0305f9e 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -1,7 +1,7 @@ // tslint:disable /** * MONEI API v1 - * The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. + * The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** * * The version of the OpenAPI document: 1.0.0 * diff --git a/src/index.ts b/src/index.ts index ad4956a..8f5b10a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ // tslint:disable /** * MONEI API v1 - * The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. + * The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

**Base URL:** https://api.monei.com/v1

**Client libraries:** * * The version of the OpenAPI document: 1.0.0 *