From c4e1c967366fc81cf244ad84f27777e819ead313 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Mon, 25 Jul 2022 08:57:09 +0200 Subject: [PATCH] Pw 6904/management api (#926) * create first version of management api structure and "me" endpoints * change me/allowedOrigins response to fix bug in API Spec file --- src/__mocks__/base.ts | 1 + src/__tests__/management.spec.ts | 120 ++++ src/__tests__/storedValue.spec.ts | 2 +- src/client.ts | 6 + src/config.ts | 4 + src/services/index.ts | 1 + src/services/management.ts | 17 + src/services/management/meApi.ts | 71 +++ src/services/resource/management/me.ts | 15 + src/typings/index.ts | 1 + src/typings/management/additionalSettings.ts | 39 ++ .../management/additionalSettingsResponse.ts | 48 ++ src/typings/management/address.ts | 84 +++ src/typings/management/address2.ts | 84 +++ src/typings/management/allowedOrigin.ts | 46 ++ .../management/allowedOriginsResponse.ts | 31 + src/typings/management/amount.ts | 36 ++ src/typings/management/amount2.ts | 39 ++ src/typings/management/androidApp.ts | 84 +++ src/typings/management/androidAppsResponse.ts | 31 + src/typings/management/androidCertificate.ts | 84 +++ .../management/androidCertificatesResponse.ts | 31 + src/typings/management/apiCredential.ts | 101 ++++ src/typings/management/apiCredentialLinks.ts | 58 ++ src/typings/management/applePayInfo.ts | 30 + src/typings/management/bcmcInfo.ts | 30 + .../management/billingEntitiesResponse.ts | 31 + src/typings/management/billingEntity.ts | 64 ++ src/typings/management/cardholderReceipt.ts | 30 + src/typings/management/company.ts | 65 ++ .../management/companyApiCredential.ts | 110 ++++ src/typings/management/companyLinks.ts | 46 ++ src/typings/management/companyUser.ts | 107 ++++ src/typings/management/configuration.ts | 53 ++ src/typings/management/connectivity.ts | 36 ++ src/typings/management/contact.ts | 66 +++ .../management/createAllowedOriginRequest.ts | 46 ++ .../management/createApiCredentialResponse.ts | 119 ++++ .../createCompanyApiCredentialRequest.ts | 57 ++ .../createCompanyApiCredentialResponse.ts | 128 ++++ .../management/createCompanyUserRequest.ts | 82 +++ .../management/createCompanyUserResponse.ts | 107 ++++ .../management/createCompanyWebhookRequest.ts | 190 ++++++ .../createMerchantApiCredentialRequest.ts | 48 ++ .../management/createMerchantUserRequest.ts | 73 +++ .../createMerchantWebhookRequest.ts | 167 ++++++ src/typings/management/createUserResponse.ts | 98 +++ src/typings/management/currency.ts | 48 ++ src/typings/management/customNotification.ts | 82 +++ src/typings/management/dataCenter.ts | 39 ++ src/typings/management/eventUrl.ts | 40 ++ .../management/externalTerminalAction.ts | 93 +++ .../management/generateApiKeyResponse.ts | 30 + .../management/generateClientKeyResponse.ts | 30 + .../management/generateHmacKeyResponse.ts | 30 + src/typings/management/giroPayInfo.ts | 30 + src/typings/management/gratuity.ts | 57 ++ src/typings/management/hardware.ts | 30 + src/typings/management/idName.ts | 39 ++ .../management/installAndroidAppDetails.ts | 44 ++ .../installAndroidCertificateDetails.ts | 44 ++ src/typings/management/invalidField.ts | 48 ++ src/typings/management/jSONObject.ts | 34 ++ src/typings/management/jSONPath.ts | 27 + src/typings/management/klarnaInfo.ts | 65 ++ src/typings/management/links.ts | 28 + src/typings/management/linksElement.ts | 27 + .../listCompanyApiCredentialsResponse.ts | 56 ++ src/typings/management/listCompanyResponse.ts | 56 ++ .../management/listCompanyUsersResponse.ts | 56 ++ .../listExternalTerminalActionsResponse.ts | 31 + .../listMerchantApiCredentialsResponse.ts | 56 ++ .../management/listMerchantResponse.ts | 56 ++ .../management/listMerchantUsersResponse.ts | 56 ++ src/typings/management/listStoresResponse.ts | 53 ++ .../management/listTerminalsResponse.ts | 31 + .../management/listWebhooksResponse.ts | 56 ++ src/typings/management/logo.ts | 30 + src/typings/management/meApiCredential.ts | 119 ++++ src/typings/management/merchant.ts | 109 ++++ src/typings/management/merchantLinks.ts | 46 ++ src/typings/management/modelFile.ts | 39 ++ src/typings/management/models.ts | 556 ++++++++++++++++++ src/typings/management/name.ts | 39 ++ src/typings/management/name2.ts | 39 ++ src/typings/management/nexo.ts | 37 ++ src/typings/management/opi.ts | 48 ++ src/typings/management/orderItem.ts | 48 ++ src/typings/management/paginationLinks.ts | 52 ++ src/typings/management/payPalInfo.ts | 57 ++ src/typings/management/paymentMethod.ts | 133 +++++ .../management/paymentMethodResponse.ts | 56 ++ .../management/paymentMethodSetupInfo.ts | 145 +++++ src/typings/management/profile.ts | 171 ++++++ src/typings/management/receiptOptions.ts | 30 + src/typings/management/receiptPrinting.ts | 165 ++++++ src/typings/management/restServiceError.ts | 101 ++++ .../scheduleTerminalActionsRequest.ts | 61 ++ .../scheduleTerminalActionsResponse.ts | 88 +++ src/typings/management/settings.ts | 48 ++ src/typings/management/shippingLocation.ts | 53 ++ .../management/shippingLocationsResponse.ts | 31 + src/typings/management/signature.ts | 48 ++ src/typings/management/sofortInfo.ts | 39 ++ src/typings/management/store.ts | 130 ++++ .../management/storeCreationRequest.ts | 89 +++ .../storeCreationWithMerchantCodeRequest.ts | 98 +++ .../management/storeSplitConfiguration.ts | 39 ++ src/typings/management/surcharge.ts | 40 ++ src/typings/management/swishInfo.ts | 30 + src/typings/management/terminal.ts | 48 ++ .../management/terminalModelsResponse.ts | 31 + src/typings/management/terminalOrder.ts | 90 +++ .../management/terminalOrderRequest.ts | 67 +++ .../management/terminalOrdersResponse.ts | 31 + src/typings/management/terminalProduct.ts | 64 ++ .../management/terminalProductsResponse.ts | 31 + src/typings/management/terminalSettings.ts | 108 ++++ .../management/testCompanyWebhookRequest.ts | 46 ++ src/typings/management/testOutput.ts | 75 +++ src/typings/management/testWebhookRequest.ts | 37 ++ src/typings/management/testWebhookResponse.ts | 31 + src/typings/management/timeouts.ts | 30 + .../management/uninstallAndroidAppDetails.ts | 44 ++ .../uninstallAndroidCertificateDetails.ts | 44 ++ src/typings/management/updatableAddress.ts | 75 +++ .../updateCompanyApiCredentialRequest.ts | 66 +++ .../management/updateCompanyUserRequest.ts | 82 +++ .../management/updateCompanyWebhookRequest.ts | 181 ++++++ .../updateMerchantApiCredentialRequest.ts | 57 ++ .../management/updateMerchantUserRequest.ts | 73 +++ .../updateMerchantWebhookRequest.ts | 158 +++++ .../management/updatePaymentMethodInfo.ts | 48 ++ src/typings/management/updateStoreRequest.ts | 78 +++ src/typings/management/url.ts | 48 ++ src/typings/management/user.ts | 98 +++ src/typings/management/webhook.ts | 233 ++++++++ src/typings/management/webhookLinks.ts | 52 ++ src/typings/management/wifiProfiles.ts | 38 ++ 139 files changed, 9066 insertions(+), 1 deletion(-) create mode 100644 src/__tests__/management.spec.ts create mode 100644 src/services/management.ts create mode 100644 src/services/management/meApi.ts create mode 100644 src/services/resource/management/me.ts create mode 100644 src/typings/management/additionalSettings.ts create mode 100644 src/typings/management/additionalSettingsResponse.ts create mode 100644 src/typings/management/address.ts create mode 100644 src/typings/management/address2.ts create mode 100644 src/typings/management/allowedOrigin.ts create mode 100644 src/typings/management/allowedOriginsResponse.ts create mode 100644 src/typings/management/amount.ts create mode 100644 src/typings/management/amount2.ts create mode 100644 src/typings/management/androidApp.ts create mode 100644 src/typings/management/androidAppsResponse.ts create mode 100644 src/typings/management/androidCertificate.ts create mode 100644 src/typings/management/androidCertificatesResponse.ts create mode 100644 src/typings/management/apiCredential.ts create mode 100644 src/typings/management/apiCredentialLinks.ts create mode 100644 src/typings/management/applePayInfo.ts create mode 100644 src/typings/management/bcmcInfo.ts create mode 100644 src/typings/management/billingEntitiesResponse.ts create mode 100644 src/typings/management/billingEntity.ts create mode 100644 src/typings/management/cardholderReceipt.ts create mode 100644 src/typings/management/company.ts create mode 100644 src/typings/management/companyApiCredential.ts create mode 100644 src/typings/management/companyLinks.ts create mode 100644 src/typings/management/companyUser.ts create mode 100644 src/typings/management/configuration.ts create mode 100644 src/typings/management/connectivity.ts create mode 100644 src/typings/management/contact.ts create mode 100644 src/typings/management/createAllowedOriginRequest.ts create mode 100644 src/typings/management/createApiCredentialResponse.ts create mode 100644 src/typings/management/createCompanyApiCredentialRequest.ts create mode 100644 src/typings/management/createCompanyApiCredentialResponse.ts create mode 100644 src/typings/management/createCompanyUserRequest.ts create mode 100644 src/typings/management/createCompanyUserResponse.ts create mode 100644 src/typings/management/createCompanyWebhookRequest.ts create mode 100644 src/typings/management/createMerchantApiCredentialRequest.ts create mode 100644 src/typings/management/createMerchantUserRequest.ts create mode 100644 src/typings/management/createMerchantWebhookRequest.ts create mode 100644 src/typings/management/createUserResponse.ts create mode 100644 src/typings/management/currency.ts create mode 100644 src/typings/management/customNotification.ts create mode 100644 src/typings/management/dataCenter.ts create mode 100644 src/typings/management/eventUrl.ts create mode 100644 src/typings/management/externalTerminalAction.ts create mode 100644 src/typings/management/generateApiKeyResponse.ts create mode 100644 src/typings/management/generateClientKeyResponse.ts create mode 100644 src/typings/management/generateHmacKeyResponse.ts create mode 100644 src/typings/management/giroPayInfo.ts create mode 100644 src/typings/management/gratuity.ts create mode 100644 src/typings/management/hardware.ts create mode 100644 src/typings/management/idName.ts create mode 100644 src/typings/management/installAndroidAppDetails.ts create mode 100644 src/typings/management/installAndroidCertificateDetails.ts create mode 100644 src/typings/management/invalidField.ts create mode 100644 src/typings/management/jSONObject.ts create mode 100644 src/typings/management/jSONPath.ts create mode 100644 src/typings/management/klarnaInfo.ts create mode 100644 src/typings/management/links.ts create mode 100644 src/typings/management/linksElement.ts create mode 100644 src/typings/management/listCompanyApiCredentialsResponse.ts create mode 100644 src/typings/management/listCompanyResponse.ts create mode 100644 src/typings/management/listCompanyUsersResponse.ts create mode 100644 src/typings/management/listExternalTerminalActionsResponse.ts create mode 100644 src/typings/management/listMerchantApiCredentialsResponse.ts create mode 100644 src/typings/management/listMerchantResponse.ts create mode 100644 src/typings/management/listMerchantUsersResponse.ts create mode 100644 src/typings/management/listStoresResponse.ts create mode 100644 src/typings/management/listTerminalsResponse.ts create mode 100644 src/typings/management/listWebhooksResponse.ts create mode 100644 src/typings/management/logo.ts create mode 100644 src/typings/management/meApiCredential.ts create mode 100644 src/typings/management/merchant.ts create mode 100644 src/typings/management/merchantLinks.ts create mode 100644 src/typings/management/modelFile.ts create mode 100644 src/typings/management/models.ts create mode 100644 src/typings/management/name.ts create mode 100644 src/typings/management/name2.ts create mode 100644 src/typings/management/nexo.ts create mode 100644 src/typings/management/opi.ts create mode 100644 src/typings/management/orderItem.ts create mode 100644 src/typings/management/paginationLinks.ts create mode 100644 src/typings/management/payPalInfo.ts create mode 100644 src/typings/management/paymentMethod.ts create mode 100644 src/typings/management/paymentMethodResponse.ts create mode 100644 src/typings/management/paymentMethodSetupInfo.ts create mode 100644 src/typings/management/profile.ts create mode 100644 src/typings/management/receiptOptions.ts create mode 100644 src/typings/management/receiptPrinting.ts create mode 100644 src/typings/management/restServiceError.ts create mode 100644 src/typings/management/scheduleTerminalActionsRequest.ts create mode 100644 src/typings/management/scheduleTerminalActionsResponse.ts create mode 100644 src/typings/management/settings.ts create mode 100644 src/typings/management/shippingLocation.ts create mode 100644 src/typings/management/shippingLocationsResponse.ts create mode 100644 src/typings/management/signature.ts create mode 100644 src/typings/management/sofortInfo.ts create mode 100644 src/typings/management/store.ts create mode 100644 src/typings/management/storeCreationRequest.ts create mode 100644 src/typings/management/storeCreationWithMerchantCodeRequest.ts create mode 100644 src/typings/management/storeSplitConfiguration.ts create mode 100644 src/typings/management/surcharge.ts create mode 100644 src/typings/management/swishInfo.ts create mode 100644 src/typings/management/terminal.ts create mode 100644 src/typings/management/terminalModelsResponse.ts create mode 100644 src/typings/management/terminalOrder.ts create mode 100644 src/typings/management/terminalOrderRequest.ts create mode 100644 src/typings/management/terminalOrdersResponse.ts create mode 100644 src/typings/management/terminalProduct.ts create mode 100644 src/typings/management/terminalProductsResponse.ts create mode 100644 src/typings/management/terminalSettings.ts create mode 100644 src/typings/management/testCompanyWebhookRequest.ts create mode 100644 src/typings/management/testOutput.ts create mode 100644 src/typings/management/testWebhookRequest.ts create mode 100644 src/typings/management/testWebhookResponse.ts create mode 100644 src/typings/management/timeouts.ts create mode 100644 src/typings/management/uninstallAndroidAppDetails.ts create mode 100644 src/typings/management/uninstallAndroidCertificateDetails.ts create mode 100644 src/typings/management/updatableAddress.ts create mode 100644 src/typings/management/updateCompanyApiCredentialRequest.ts create mode 100644 src/typings/management/updateCompanyUserRequest.ts create mode 100644 src/typings/management/updateCompanyWebhookRequest.ts create mode 100644 src/typings/management/updateMerchantApiCredentialRequest.ts create mode 100644 src/typings/management/updateMerchantUserRequest.ts create mode 100644 src/typings/management/updateMerchantWebhookRequest.ts create mode 100644 src/typings/management/updatePaymentMethodInfo.ts create mode 100644 src/typings/management/updateStoreRequest.ts create mode 100644 src/typings/management/url.ts create mode 100644 src/typings/management/user.ts create mode 100644 src/typings/management/webhook.ts create mode 100644 src/typings/management/webhookLinks.ts create mode 100644 src/typings/management/wifiProfiles.ts diff --git a/src/__mocks__/base.ts b/src/__mocks__/base.ts index 2284751..8827605 100644 --- a/src/__mocks__/base.ts +++ b/src/__mocks__/base.ts @@ -46,6 +46,7 @@ export const createClient = (apiKey = process.env.ADYEN_API_KEY): Client => { config.apiKey = apiKey; config.paymentEndpoint = Client.PAYMENT_API_ENDPOINT_TEST; config.storedValueEndpoint = Client.STOREDVALUE_API_ENDPOINT_TEST; + config.managementEndpoint = Client.MANAGEMENT_API_ENDPOINT_TEST; return new Client({ config }); }; diff --git a/src/__tests__/management.spec.ts b/src/__tests__/management.spec.ts new file mode 100644 index 0000000..4701383 --- /dev/null +++ b/src/__tests__/management.spec.ts @@ -0,0 +1,120 @@ +import nock from "nock"; +import Client from "../client"; +import {createClient} from "../__mocks__/base"; +import { Management } from "../services"; +import { AllowedOrigin, AllowedOriginsResponse, MeApiCredential } from "../typings/management/models"; + +let client: Client; +let management: Management; +let scope: nock.Scope; + +beforeEach((): void => { + if (!nock.isActive()) { + nock.activate(); + } + client = createClient(); + scope = nock(`${client.config.managementEndpoint}/${Client.MANAGEMENT_API_VERSION}`); + management = new Management(client); +}); + +afterEach(() => { + nock.cleanAll(); +}); + +describe("Management", (): void => { + describe("Me", (): void => { + test("Should get API credential details based on the API Key used in the request", async (): Promise => { + scope.get("/me") + .reply(200, { + "id": "S2-6262224667", + "username": "ws_123456@Company.Test", + "clientKey": "test_UCP6BO23234FFEFE33E4GWX63", + "allowedIpAddresses": [], + "roles": [ + "Management API - Users read and write", + "Management API - Accounts read", + "Trigger webhook notifications", + "Management API - Payout Account Settings Read And Write", + "Manage LegalEntities via API", + "Manage associated partner accounts via API", + "PSP Pos initial configuration", + + ], + "_links": { + "self": { + "href": "https://management-test.adyen.com/v1/me" + }, + "allowedOrigins": { + "href": "https://management-test.adyen.com/v1/me/allowedOrigins" + } + }, + "companyName": "Test", + "active": true, + }); + const meResponse: MeApiCredential = await management.Me.retrieve(); + expect(meResponse.id).toEqual("S2-6262224667"); + }); + + test("Should add an allowed origin to the list of allowed origins",async (): Promise => { + scope.post("/me/allowedOrigins") + .reply(200, { + "id": "S2-45597C41735B6D75433E2B396553453ertcdt347675B4E3B413B4C4571522A6B2921", + "domain": "https://www.us.mystore.com", + "_links": { + "self": { + "href": "https://management-test.adyen.com/v1/me/allowedOrigins/S2-45597C41735B6D75433E2B396553453ertcdt347675B4E3B413B4C4571522A6B2921" + } + } + }); + const allowedOriginRequest: AllowedOrigin = { + "domain": "https://www.us.mystore.com" + }; + + const allowedOriginsResponse: AllowedOrigin = await management.Me.createAllowedOrigin(allowedOriginRequest); + expect(allowedOriginsResponse.domain).toEqual("https://www.us.mystore.com"); + }); + + test("Should get the list of allowed origins of a API credential based on the API key used in the request", async(): Promise => { + scope.get("/me/allowedOrigins") + .reply(200, { + "data": [ + { + "id": "S2-45597C41735B6D75433E2B396553453ertcdt347675B4E3B413B4C4571522A6B2921", + "domain": "https://www.us.mystore.com", + "_links": { + "self": { + "href": "https://management-test.adyen.com/v1/me/allowedOrigins/S2-45597C41735B6D75433E2B396553453ertcdt347675B4E3B413B4C4571522A6B2921" + } + } + } + ] + }); + + const allowedOriginsResponse : AllowedOriginsResponse = await management.Me.retrieveAllowedOrigins(); + expect(allowedOriginsResponse.data?.length).toEqual(1); + }); + }); + + test("Should retrieve the details of the allowed origin specified in the path",async () => { + scope.get("/me/allowedOrigins/S2-123123123123123") + .reply(200, { + "id": "S2-123123123123123", + "domain": "https://www.us.mystore.com", + "_links": { + "self": { + "href": "https://management-test.adyen.com/v1/me/allowedOrigins/S2-123123123123123" + } + } + }); + + const allowedOriginResponse: AllowedOrigin = await management.Me.retrieveAllowedOrigin("S2-123123123123123"); + expect(allowedOriginResponse.id).toEqual("S2-123123123123123"); + }); + + test("Should remove the allowed origin specified in the path", async () => { + scope.delete("/me/allowedOrigins/S2-123123123123123").reply(204, {}); + const allowedOriginResponse: Record = await management.Me.deleteAllowerdOrigin("S2-123123123123123"); + expect(scope.isDone()).toBe(true); + expect(Object.entries(allowedOriginResponse).length).toBe(0); + }); +}); diff --git a/src/__tests__/storedValue.spec.ts b/src/__tests__/storedValue.spec.ts index 75e1979..ef24809 100644 --- a/src/__tests__/storedValue.spec.ts +++ b/src/__tests__/storedValue.spec.ts @@ -1,7 +1,7 @@ import nock from "nock"; import Client from "../client"; import {createClient} from "../__mocks__/base"; -import StoredValue from "../services/storedValue"; +import {StoredValue} from "../services"; import { StoredValueIssueRequest, StoredValueIssueResponse, StoredValueStatusChangeRequest, diff --git a/src/client.ts b/src/client.ts index 66de65b..9de3579 100644 --- a/src/client.ts +++ b/src/client.ts @@ -62,6 +62,7 @@ class Client { public static MARKETPAY_NOTIFICATION_CONFIGURATION_API_VERSION = "v6"; public static PAYMENT_API_VERSION = "v68"; public static STOREDVALUE_API_VERSION = "v46"; + public static MANAGEMENT_API_VERSION = "v1"; public static LIB_NAME = "adyen-node-api-library"; public static LIB_VERSION: string = version; public static CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com/checkout"; @@ -75,6 +76,8 @@ class Client { public static PAYMENT_API_ENDPOINT_LIVE = "https://pal-live.adyen.com/pal/servlet/Payment"; public static STOREDVALUE_API_ENDPOINT_TEST = "https://pal-test.adyen.com/pal/servlet/StoredValue"; public static STOREDVALUE_API_ENDPOINT_LIVE = "https://pal-live.adyen.com/pal/servlet/StoredValue"; + public static MANAGEMENT_API_ENDPOINT_TEST = "https://management-test.adyen.com"; + public static MANAGEMENT_API_ENDPOINT_LIVE = "https://management-live.adyen.com"; private _httpClient!: ClientInterface; @@ -116,6 +119,7 @@ class Client { this.config.terminalApiCloudEndpoint = Client.TERMINAL_API_ENDPOINT_TEST; this.config.paymentEndpoint = Client.PAYMENT_API_ENDPOINT_TEST; this.config.storedValueEndpoint = Client.STOREDVALUE_API_ENDPOINT_TEST; + this.config.managementEndpoint = Client.MANAGEMENT_API_ENDPOINT_TEST; } else if (environment === "LIVE") { this.config.endpoint = Client.ENDPOINT_LIVE; this.config.marketPayEndpoint = Client.MARKETPAY_ENDPOINT_LIVE; @@ -123,6 +127,8 @@ class Client { this.config.terminalApiCloudEndpoint = Client.TERMINAL_API_ENDPOINT_LIVE; this.config.paymentEndpoint = Client.PAYMENT_API_ENDPOINT_LIVE; this.config.storedValueEndpoint = Client.STOREDVALUE_API_ENDPOINT_LIVE; + this.config.managementEndpoint = Client.MANAGEMENT_API_ENDPOINT_LIVE; + if (liveEndpointUrlPrefix) { this.config.endpoint = `${Client.ENDPOINT_PROTOCOL}${liveEndpointUrlPrefix}${Client.ENDPOINT_LIVE_SUFFIX}`; diff --git a/src/config.ts b/src/config.ts index eab7bc7..5ca178e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -36,6 +36,7 @@ interface ConfigConstructor { terminalApiLocalEndpoint?: string; paymentEndpoint?: string; storedValueEndpoint?: string; + managementEndpoint?: string; } class Config { @@ -62,6 +63,7 @@ class Config { public paymentEndpoint?: string; public storedValueEndpoint?: string; + public managementEndpoint?: string; public constructor(options: ConfigConstructor = {}) { if (options.username) this.username = options.username; @@ -83,6 +85,8 @@ class Config { if (options.terminalApiLocalEndpoint) this.terminalApiLocalEndpoint = options.terminalApiLocalEndpoint; if (options.paymentEndpoint) this.paymentEndpoint = options.paymentEndpoint; if (options.storedValueEndpoint) this.storedValueEndpoint = options.storedValueEndpoint; + if (options.managementEndpoint) this.managementEndpoint = options.managementEndpoint; + } public set checkoutEndpoint(checkoutEndpoint: string | undefined) { diff --git a/src/services/index.ts b/src/services/index.ts index 9714855..4f2a409 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -7,3 +7,4 @@ export { default as BinLookup } from "./binLookup"; export { default as Payout } from "./payout"; export { default as Platforms } from "./platforms"; export { default as StoredValue} from "./storedValue"; +export { default as Management } from "./management"; diff --git a/src/services/management.ts b/src/services/management.ts new file mode 100644 index 0000000..796b1c0 --- /dev/null +++ b/src/services/management.ts @@ -0,0 +1,17 @@ +import Service from "../service"; +import Client from "../client"; + +import MeApi from "./management/meApi"; + +class Management extends Service { + public constructor(client: Client) { + super(client); + } + + public get Me() { + const meApi = new MeApi(this.client); + return meApi.Me; + } +} + +export default Management; diff --git a/src/services/management/meApi.ts b/src/services/management/meApi.ts new file mode 100644 index 0000000..79c92d7 --- /dev/null +++ b/src/services/management/meApi.ts @@ -0,0 +1,71 @@ +import Client from "../../client"; +import getJsonResponse from "../../helpers/getJsonResponse"; +import Service from "../../service"; +import { + AllowedOrigin, + AllowedOriginsResponse, + CreateAllowedOriginRequest, + MeApiCredential +} from "../../typings/management/models"; + +import Me from "../resource/management/me"; + +class MeApi extends Service { + //Me + private readonly _retrieveMe: Me; + private readonly _allowedOrigins: Me; + + + public constructor(client: Client) { + super(client); + this._retrieveMe = new Me(this, ""); + this._allowedOrigins = new Me(this, "/allowedOrigins"); + } + + public get Me(): { + retrieve:() => Promise; + createAllowedOrigin: (allowedOriginRequest: CreateAllowedOriginRequest) => Promise; + retrieveAllowedOrigins: () => Promise; + retrieveAllowedOrigin: (originId: string) => Promise; + deleteAllowerdOrigin: (originId: string) => Promise>; + } { + const retrieve = () => getJsonResponse, MeApiCredential>( + this._retrieveMe, + {}, + { method: "GET"} + ); + + const createAllowedOrigin = (allowedOriginRequest: CreateAllowedOriginRequest) => getJsonResponse( + this._allowedOrigins, + allowedOriginRequest, + ); + + const retrieveAllowedOrigins = () => getJsonResponse, AllowedOriginsResponse>( + this._allowedOrigins, + {}, + { method: "GET"} + ); + + const retrieveAllowedOrigin = (originId: string) => { + const allowedOrigin = new Me(this, `/allowedOrigins/${originId}`); + return getJsonResponse, AllowedOrigin>( + allowedOrigin, + {}, + { method: "GET"} + ); + }; + + const deleteAllowerdOrigin = (originId: string) => { + const allowedOrigin = new Me(this, `/allowedOrigins/${originId}`); + return getJsonResponse, Record>( + allowedOrigin, + {}, + { method: "DELETE"} + ); + }; + + return { retrieve, createAllowedOrigin, retrieveAllowedOrigins, retrieveAllowedOrigin, deleteAllowerdOrigin }; + } +} + +export default MeApi; diff --git a/src/services/resource/management/me.ts b/src/services/resource/management/me.ts new file mode 100644 index 0000000..6b393d7 --- /dev/null +++ b/src/services/resource/management/me.ts @@ -0,0 +1,15 @@ +import Client from "../../../client"; +import Service from "../../../service"; +import Resource from "../../resource"; + + +class Me extends Resource { + public constructor(service: Service, endpoint: string) { + super( + service, + `${service.client.config.managementEndpoint}/${Client.MANAGEMENT_API_VERSION}/me${endpoint}`, + ); + } +} + +export default Me; \ No newline at end of file diff --git a/src/typings/index.ts b/src/typings/index.ts index 0b86252..4393a6b 100644 --- a/src/typings/index.ts +++ b/src/typings/index.ts @@ -19,3 +19,4 @@ export * as platformsHostedOnboardingPage from './platformsHostedOnboardingPage/ export * as recurring from './recurring/models'; export * as storedValue from './storedValue/models'; export * as terminal from './terminal/models'; +export * as management from './management/models'; diff --git a/src/typings/management/additionalSettings.ts b/src/typings/management/additionalSettings.ts new file mode 100644 index 0000000..d098731 --- /dev/null +++ b/src/typings/management/additionalSettings.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class AdditionalSettings { + /** + * Object containing list of event codes for which the notifcation will be sent. + */ + 'includeEventCodes'?: Array; + /** + * Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. + */ + 'properties'?: { [key: string]: boolean; }; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "includeEventCodes", + "baseName": "includeEventCodes", + "type": "Array" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: boolean; }" + } ]; + + static getAttributeTypeMap() { + return AdditionalSettings.attributeTypeMap; + } +} + diff --git a/src/typings/management/additionalSettingsResponse.ts b/src/typings/management/additionalSettingsResponse.ts new file mode 100644 index 0000000..be04a20 --- /dev/null +++ b/src/typings/management/additionalSettingsResponse.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class AdditionalSettingsResponse { + /** + * Object containing list of event codes for which the notifcation will not be sent. + */ + 'excludeEventCodes'?: Array; + /** + * Object containing list of event codes for which the notifcation will be sent. + */ + 'includeEventCodes'?: Array; + /** + * Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. + */ + 'properties'?: { [key: string]: boolean; }; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "excludeEventCodes", + "baseName": "excludeEventCodes", + "type": "Array" + }, + { + "name": "includeEventCodes", + "baseName": "includeEventCodes", + "type": "Array" + }, + { + "name": "properties", + "baseName": "properties", + "type": "{ [key: string]: boolean; }" + } ]; + + static getAttributeTypeMap() { + return AdditionalSettingsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/address.ts b/src/typings/management/address.ts new file mode 100644 index 0000000..da9cb80 --- /dev/null +++ b/src/typings/management/address.ts @@ -0,0 +1,84 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Address { + /** + * The name of the city. + */ + 'city'?: string; + /** + * The name of the company. + */ + 'companyName'?: string; + /** + * The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. + */ + 'country'?: string; + /** + * The postal code. + */ + 'postalCode'?: string; + /** + * The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States + */ + 'stateOrProvince'?: string; + /** + * The name of the street, and the house or building number. + */ + 'streetAddress'?: string; + /** + * Additional address details, if any. + */ + 'streetAddress2'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "city", + "baseName": "city", + "type": "string" + }, + { + "name": "companyName", + "baseName": "companyName", + "type": "string" + }, + { + "name": "country", + "baseName": "country", + "type": "string" + }, + { + "name": "postalCode", + "baseName": "postalCode", + "type": "string" + }, + { + "name": "stateOrProvince", + "baseName": "stateOrProvince", + "type": "string" + }, + { + "name": "streetAddress", + "baseName": "streetAddress", + "type": "string" + }, + { + "name": "streetAddress2", + "baseName": "streetAddress2", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Address.attributeTypeMap; + } +} + diff --git a/src/typings/management/address2.ts b/src/typings/management/address2.ts new file mode 100644 index 0000000..ca753a8 --- /dev/null +++ b/src/typings/management/address2.ts @@ -0,0 +1,84 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Address2 { + /** + * The name of the city. + */ + 'city'?: string; + /** + * The two-letter country code in [ISO_3166-1_alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. + */ + 'country': string; + /** + * The street address. + */ + 'line1'?: string; + /** + * Second address line. + */ + 'line2'?: string; + /** + * Third address line. + */ + 'line3'?: string; + /** + * The postal code. + */ + 'postalCode'?: string; + /** + * The state or province code as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Required for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States + */ + 'stateOrProvince'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "city", + "baseName": "city", + "type": "string" + }, + { + "name": "country", + "baseName": "country", + "type": "string" + }, + { + "name": "line1", + "baseName": "line1", + "type": "string" + }, + { + "name": "line2", + "baseName": "line2", + "type": "string" + }, + { + "name": "line3", + "baseName": "line3", + "type": "string" + }, + { + "name": "postalCode", + "baseName": "postalCode", + "type": "string" + }, + { + "name": "stateOrProvince", + "baseName": "stateOrProvince", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Address2.attributeTypeMap; + } +} + diff --git a/src/typings/management/allowedOrigin.ts b/src/typings/management/allowedOrigin.ts new file mode 100644 index 0000000..5c7693a --- /dev/null +++ b/src/typings/management/allowedOrigin.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Links } from './links'; + +export class AllowedOrigin { + 'links'?: Links; + /** + * Domain of the allowed origin. + */ + 'domain': string; + /** + * Unique identifier of the allowed origin. + */ + 'id'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "Links" + }, + { + "name": "domain", + "baseName": "domain", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AllowedOrigin.attributeTypeMap; + } +} + diff --git a/src/typings/management/allowedOriginsResponse.ts b/src/typings/management/allowedOriginsResponse.ts new file mode 100644 index 0000000..f7a8002 --- /dev/null +++ b/src/typings/management/allowedOriginsResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AllowedOrigin } from './allowedOrigin'; + +export class AllowedOriginsResponse { + /** + * List of allowed origins. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AllowedOriginsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/amount.ts b/src/typings/management/amount.ts new file mode 100644 index 0000000..5505a56 --- /dev/null +++ b/src/typings/management/amount.ts @@ -0,0 +1,36 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Amount { + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + */ + 'currency'?: string; + 'value'?: any; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "currency", + "baseName": "currency", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "any" + } ]; + + static getAttributeTypeMap() { + return Amount.attributeTypeMap; + } +} + diff --git a/src/typings/management/amount2.ts b/src/typings/management/amount2.ts new file mode 100644 index 0000000..11afd1a --- /dev/null +++ b/src/typings/management/amount2.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Amount2 { + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + */ + 'currency': string; + /** + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + */ + 'value': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "currency", + "baseName": "currency", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Amount2.attributeTypeMap; + } +} + diff --git a/src/typings/management/androidApp.ts b/src/typings/management/androidApp.ts new file mode 100644 index 0000000..393820d --- /dev/null +++ b/src/typings/management/androidApp.ts @@ -0,0 +1,84 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class AndroidApp { + /** + * The description that was provided when uploading the app. The description is not shown on the terminal. + */ + 'description'?: string; + /** + * The unique identifier of the app. + */ + 'id': string; + /** + * The app name that is shown on the terminal. + */ + 'label'?: string; + /** + * The package name of the app. + */ + 'packageName'?: string; + /** + * The status of the app. Possible values: * `processing`: The app is being signed and converted to a format that the terminal can handle. * `error`: Something went wrong. Check that the app matches the [requirements](https://docs.adyen.com/point-of-sale/android-terminals/app-requirements). * `invalid`: There is something wrong with the APK file of the app. * `ready`: The app has been signed and converted. * `archived`: The app is no longer available. + */ + 'status': string; + /** + * The internal version number of the app. + */ + 'versionCode'?: number; + /** + * The app version number that is shown on the terminal. + */ + 'versionName'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "label", + "baseName": "label", + "type": "string" + }, + { + "name": "packageName", + "baseName": "packageName", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "versionCode", + "baseName": "versionCode", + "type": "number" + }, + { + "name": "versionName", + "baseName": "versionName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AndroidApp.attributeTypeMap; + } +} + diff --git a/src/typings/management/androidAppsResponse.ts b/src/typings/management/androidAppsResponse.ts new file mode 100644 index 0000000..99ca37a --- /dev/null +++ b/src/typings/management/androidAppsResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AndroidApp } from './androidApp'; + +export class AndroidAppsResponse { + /** + * Apps uploaded for Android payment terminals. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AndroidAppsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/androidCertificate.ts b/src/typings/management/androidCertificate.ts new file mode 100644 index 0000000..14c6953 --- /dev/null +++ b/src/typings/management/androidCertificate.ts @@ -0,0 +1,84 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class AndroidCertificate { + /** + * The description that was provided when uploading the certificate. + */ + 'description'?: string; + /** + * The file format of the certificate, as indicated by the file extension. For example, **.cert** or **.pem**. + */ + 'extension'?: string; + /** + * The unique identifier of the certificate. + */ + 'id': string; + /** + * The file name of the certificate. For example, **mycert**. + */ + 'name'?: string; + /** + * The date when the certificate stops to be valid. + */ + 'notAfter'?: Date; + /** + * The date when the certificate starts to be valid. + */ + 'notBefore'?: Date; + /** + * The status of the certificate. + */ + 'status'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "extension", + "baseName": "extension", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "notAfter", + "baseName": "notAfter", + "type": "Date" + }, + { + "name": "notBefore", + "baseName": "notBefore", + "type": "Date" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AndroidCertificate.attributeTypeMap; + } +} + diff --git a/src/typings/management/androidCertificatesResponse.ts b/src/typings/management/androidCertificatesResponse.ts new file mode 100644 index 0000000..20bb8c7 --- /dev/null +++ b/src/typings/management/androidCertificatesResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AndroidCertificate } from './androidCertificate'; + +export class AndroidCertificatesResponse { + /** + * Uploaded Android certificates for Android payment terminals. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AndroidCertificatesResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/apiCredential.ts b/src/typings/management/apiCredential.ts new file mode 100644 index 0000000..d14681e --- /dev/null +++ b/src/typings/management/apiCredential.ts @@ -0,0 +1,101 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AllowedOrigin } from './allowedOrigin'; +import { ApiCredentialLinks } from './apiCredentialLinks'; + +export class ApiCredential { + 'links'?: ApiCredentialLinks; + /** + * Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. + */ + 'active': boolean; + /** + * List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. + */ + 'allowedIpAddresses': Array; + /** + * List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. + */ + 'allowedOrigins'?: Array; + /** + * Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. + */ + 'clientKey': string; + /** + * Description of the API credential. + */ + 'description'?: string; + /** + * Unique identifier of the API credential. + */ + 'id': string; + /** + * List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + */ + 'roles': Array; + /** + * The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "ApiCredentialLinks" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "allowedIpAddresses", + "baseName": "allowedIpAddresses", + "type": "Array" + }, + { + "name": "allowedOrigins", + "baseName": "allowedOrigins", + "type": "Array" + }, + { + "name": "clientKey", + "baseName": "clientKey", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ApiCredential.attributeTypeMap; + } +} + diff --git a/src/typings/management/apiCredentialLinks.ts b/src/typings/management/apiCredentialLinks.ts new file mode 100644 index 0000000..0dff6ef --- /dev/null +++ b/src/typings/management/apiCredentialLinks.ts @@ -0,0 +1,58 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { LinksElement } from './linksElement'; + +export class ApiCredentialLinks { + 'allowedOrigins'?: LinksElement; + 'company'?: LinksElement; + 'generateApiKey'?: LinksElement; + 'generateClientKey'?: LinksElement; + 'merchant'?: LinksElement; + 'self': LinksElement; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allowedOrigins", + "baseName": "allowedOrigins", + "type": "LinksElement" + }, + { + "name": "company", + "baseName": "company", + "type": "LinksElement" + }, + { + "name": "generateApiKey", + "baseName": "generateApiKey", + "type": "LinksElement" + }, + { + "name": "generateClientKey", + "baseName": "generateClientKey", + "type": "LinksElement" + }, + { + "name": "merchant", + "baseName": "merchant", + "type": "LinksElement" + }, + { + "name": "self", + "baseName": "self", + "type": "LinksElement" + } ]; + + static getAttributeTypeMap() { + return ApiCredentialLinks.attributeTypeMap; + } +} + diff --git a/src/typings/management/applePayInfo.ts b/src/typings/management/applePayInfo.ts new file mode 100644 index 0000000..9bd89b6 --- /dev/null +++ b/src/typings/management/applePayInfo.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class ApplePayInfo { + /** + * The list of merchant domains. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/enable-apple-pay#register-merchant-domain). + */ + 'domains': Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "domains", + "baseName": "domains", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ApplePayInfo.attributeTypeMap; + } +} + diff --git a/src/typings/management/bcmcInfo.ts b/src/typings/management/bcmcInfo.ts new file mode 100644 index 0000000..c77219f --- /dev/null +++ b/src/typings/management/bcmcInfo.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class BcmcInfo { + /** + * Indicates if [Bancontact mobile](https://docs.adyen.com/payment-methods/bancontact/bancontact-mobile) is enabled. + */ + 'enableBcmcMobile'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enableBcmcMobile", + "baseName": "enableBcmcMobile", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return BcmcInfo.attributeTypeMap; + } +} + diff --git a/src/typings/management/billingEntitiesResponse.ts b/src/typings/management/billingEntitiesResponse.ts new file mode 100644 index 0000000..9360484 --- /dev/null +++ b/src/typings/management/billingEntitiesResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { BillingEntity } from './billingEntity'; + +export class BillingEntitiesResponse { + /** + * List of legal entities that can be used for the billing of orders. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return BillingEntitiesResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/billingEntity.ts b/src/typings/management/billingEntity.ts new file mode 100644 index 0000000..00b4206 --- /dev/null +++ b/src/typings/management/billingEntity.ts @@ -0,0 +1,64 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Address } from './address'; + +export class BillingEntity { + 'address'?: Address; + /** + * The email address of the billing entity. + */ + 'email'?: string; + /** + * The unique identifier of the billing entity, for use as `billingEntityId` when creating an order. + */ + 'id'?: string; + /** + * The unique name of the billing entity. + */ + 'name'?: string; + /** + * The tax number of the billing entity. + */ + 'taxId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "address", + "baseName": "address", + "type": "Address" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "taxId", + "baseName": "taxId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BillingEntity.attributeTypeMap; + } +} + diff --git a/src/typings/management/cardholderReceipt.ts b/src/typings/management/cardholderReceipt.ts new file mode 100644 index 0000000..5525ccc --- /dev/null +++ b/src/typings/management/cardholderReceipt.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class CardholderReceipt { + /** + * A custom header to show on the shopper receipt for an authorised transaction. Allows one or two comma-separated header lines, and blank lines. For example, `header,header,filler` + */ + 'headerForAuthorizedReceipt'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "headerForAuthorizedReceipt", + "baseName": "headerForAuthorizedReceipt", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CardholderReceipt.attributeTypeMap; + } +} + diff --git a/src/typings/management/company.ts b/src/typings/management/company.ts new file mode 100644 index 0000000..53c7938 --- /dev/null +++ b/src/typings/management/company.ts @@ -0,0 +1,65 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CompanyLinks } from './companyLinks'; +import { DataCenter } from './dataCenter'; + +export class Company { + 'links'?: CompanyLinks; + /** + * List of available data centers. Adyen has several data centers around the world.In the URL that you use for making API requests, we recommend you use the live URL prefix from the data center closest to your shoppers. + */ + 'dataCenters'?: Array; + /** + * The unique identifier of the company account. + */ + 'id'?: string; + /** + * The legal or trading name of the company. + */ + 'name'?: string; + /** + * The status of the company account. Possible values: * **Active**: Users can log in. Processing and payout capabilities depend on the status of the merchant account. * **Inactive**: Users can log in. Payment processing and payouts are disabled. * **Closed**: The company account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. + */ + 'status'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "CompanyLinks" + }, + { + "name": "dataCenters", + "baseName": "dataCenters", + "type": "Array" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Company.attributeTypeMap; + } +} + diff --git a/src/typings/management/companyApiCredential.ts b/src/typings/management/companyApiCredential.ts new file mode 100644 index 0000000..f53ba65 --- /dev/null +++ b/src/typings/management/companyApiCredential.ts @@ -0,0 +1,110 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AllowedOrigin } from './allowedOrigin'; +import { ApiCredentialLinks } from './apiCredentialLinks'; + +export class CompanyApiCredential { + 'links'?: ApiCredentialLinks; + /** + * Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. + */ + 'active': boolean; + /** + * List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. + */ + 'allowedIpAddresses': Array; + /** + * List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. + */ + 'allowedOrigins'?: Array; + /** + * List of merchant accounts that the API credential has access to. + */ + 'associatedMerchantAccounts'?: Array; + /** + * Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. + */ + 'clientKey': string; + /** + * Description of the API credential. + */ + 'description'?: string; + /** + * Unique identifier of the API credential. + */ + 'id': string; + /** + * List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + */ + 'roles': Array; + /** + * The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "ApiCredentialLinks" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "allowedIpAddresses", + "baseName": "allowedIpAddresses", + "type": "Array" + }, + { + "name": "allowedOrigins", + "baseName": "allowedOrigins", + "type": "Array" + }, + { + "name": "associatedMerchantAccounts", + "baseName": "associatedMerchantAccounts", + "type": "Array" + }, + { + "name": "clientKey", + "baseName": "clientKey", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CompanyApiCredential.attributeTypeMap; + } +} + diff --git a/src/typings/management/companyLinks.ts b/src/typings/management/companyLinks.ts new file mode 100644 index 0000000..a5f82c7 --- /dev/null +++ b/src/typings/management/companyLinks.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { LinksElement } from './linksElement'; + +export class CompanyLinks { + 'apiCredentials'?: LinksElement; + 'self': LinksElement; + 'users'?: LinksElement; + 'webhooks'?: LinksElement; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "apiCredentials", + "baseName": "apiCredentials", + "type": "LinksElement" + }, + { + "name": "self", + "baseName": "self", + "type": "LinksElement" + }, + { + "name": "users", + "baseName": "users", + "type": "LinksElement" + }, + { + "name": "webhooks", + "baseName": "webhooks", + "type": "LinksElement" + } ]; + + static getAttributeTypeMap() { + return CompanyLinks.attributeTypeMap; + } +} + diff --git a/src/typings/management/companyUser.ts b/src/typings/management/companyUser.ts new file mode 100644 index 0000000..5807652 --- /dev/null +++ b/src/typings/management/companyUser.ts @@ -0,0 +1,107 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Links } from './links'; +import { Name } from './name'; + +export class CompanyUser { + 'links'?: Links; + /** + * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. + */ + 'accountGroups'?: Array; + /** + * Indicates whether this user is active. + */ + 'active'?: boolean; + /** + * The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. + */ + 'associatedMerchantAccounts'?: Array; + /** + * The email address of the user. + */ + 'email': string; + /** + * The unique identifier of the user. + */ + 'id': string; + 'name'?: Name; + /** + * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. + */ + 'roles': Array; + /** + * The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. + */ + 'timeZoneCode': string; + /** + * The username for this user. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "Links" + }, + { + "name": "accountGroups", + "baseName": "accountGroups", + "type": "Array" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "associatedMerchantAccounts", + "baseName": "associatedMerchantAccounts", + "type": "Array" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "Name" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "timeZoneCode", + "baseName": "timeZoneCode", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CompanyUser.attributeTypeMap; + } +} + diff --git a/src/typings/management/configuration.ts b/src/typings/management/configuration.ts new file mode 100644 index 0000000..6eef6a9 --- /dev/null +++ b/src/typings/management/configuration.ts @@ -0,0 +1,53 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Currency } from './currency'; + +export class Configuration { + /** + * Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + */ + 'brand': string; + /** + * Currency, and surcharge percentage or amount. + */ + 'currencies': Array; + /** + * Funding source. Possible values: * **Credit** * **Debit** + */ + 'sources'?: Configuration.SourcesEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "brand", + "baseName": "brand", + "type": "string" + }, + { + "name": "currencies", + "baseName": "currencies", + "type": "Array" + }, + { + "name": "sources", + "baseName": "sources", + "type": "Configuration.SourcesEnum" + } ]; + + static getAttributeTypeMap() { + return Configuration.attributeTypeMap; + } +} + +export namespace Configuration { + export enum SourcesEnum { + } +} diff --git a/src/typings/management/connectivity.ts b/src/typings/management/connectivity.ts new file mode 100644 index 0000000..81ba1e0 --- /dev/null +++ b/src/typings/management/connectivity.ts @@ -0,0 +1,36 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Connectivity { + /** + * Indicates the status of the SIM card in the payment terminal. Can be updated and received only at terminal level, and only for models that support cellular connectivity. Possible values: * **ACTIVATED**: the SIM card is activated. Cellular connectivity may still need to be enabled on the terminal itself, in the **Network** settings. * **INVENTORY**: the SIM card is not activated. The terminal can\'t use cellular connectivity. + */ + 'simcardStatus'?: Connectivity.SimcardStatusEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "simcardStatus", + "baseName": "simcardStatus", + "type": "Connectivity.SimcardStatusEnum" + } ]; + + static getAttributeTypeMap() { + return Connectivity.attributeTypeMap; + } +} + +export namespace Connectivity { + export enum SimcardStatusEnum { + Activated = 'ACTIVATED', + Inventory = 'INVENTORY' + } +} diff --git a/src/typings/management/contact.ts b/src/typings/management/contact.ts new file mode 100644 index 0000000..55157ff --- /dev/null +++ b/src/typings/management/contact.ts @@ -0,0 +1,66 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Contact { + /** + * The individual\'s email address. + */ + 'email'?: string; + /** + * The individual\'s first name. + */ + 'firstName'?: string; + /** + * The infix in the individual\'s name, if any. + */ + 'infix'?: string; + /** + * The individual\'s last name. + */ + 'lastName'?: string; + /** + * The individual\'s phone number, specified as 10-14 digits with an optional `+` prefix. + */ + 'phoneNumber'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "firstName", + "baseName": "firstName", + "type": "string" + }, + { + "name": "infix", + "baseName": "infix", + "type": "string" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string" + }, + { + "name": "phoneNumber", + "baseName": "phoneNumber", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Contact.attributeTypeMap; + } +} + diff --git a/src/typings/management/createAllowedOriginRequest.ts b/src/typings/management/createAllowedOriginRequest.ts new file mode 100644 index 0000000..01f4213 --- /dev/null +++ b/src/typings/management/createAllowedOriginRequest.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Links } from './links'; + +export class CreateAllowedOriginRequest { + 'links'?: Links; + /** + * Domain of the allowed origin. + */ + 'domain': string; + /** + * Unique identifier of the allowed origin. + */ + 'id'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "Links" + }, + { + "name": "domain", + "baseName": "domain", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateAllowedOriginRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/createApiCredentialResponse.ts b/src/typings/management/createApiCredentialResponse.ts new file mode 100644 index 0000000..e30b783 --- /dev/null +++ b/src/typings/management/createApiCredentialResponse.ts @@ -0,0 +1,119 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AllowedOrigin } from './allowedOrigin'; +import { ApiCredentialLinks } from './apiCredentialLinks'; + +export class CreateApiCredentialResponse { + 'links'?: ApiCredentialLinks; + /** + * Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. + */ + 'active': boolean; + /** + * List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. + */ + 'allowedIpAddresses': Array; + /** + * List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. + */ + 'allowedOrigins'?: Array; + /** + * The API key for the API credential that was created. + */ + 'apiKey': string; + /** + * Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. + */ + 'clientKey': string; + /** + * Description of the API credential. + */ + 'description'?: string; + /** + * Unique identifier of the API credential. + */ + 'id': string; + /** + * The password for the API credential that was created. + */ + 'password': string; + /** + * List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + */ + 'roles': Array; + /** + * The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "ApiCredentialLinks" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "allowedIpAddresses", + "baseName": "allowedIpAddresses", + "type": "Array" + }, + { + "name": "allowedOrigins", + "baseName": "allowedOrigins", + "type": "Array" + }, + { + "name": "apiKey", + "baseName": "apiKey", + "type": "string" + }, + { + "name": "clientKey", + "baseName": "clientKey", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "password", + "baseName": "password", + "type": "string" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateApiCredentialResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/createCompanyApiCredentialRequest.ts b/src/typings/management/createCompanyApiCredentialRequest.ts new file mode 100644 index 0000000..7502e32 --- /dev/null +++ b/src/typings/management/createCompanyApiCredentialRequest.ts @@ -0,0 +1,57 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class CreateCompanyApiCredentialRequest { + /** + * List of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the new API credential. + */ + 'allowedOrigins'?: Array; + /** + * List of merchant accounts that the API credential has access to. + */ + 'associatedMerchantAccounts'?: Array; + /** + * Description of the API credential. + */ + 'description'?: string; + /** + * List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) of the API credential. + */ + 'roles'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allowedOrigins", + "baseName": "allowedOrigins", + "type": "Array" + }, + { + "name": "associatedMerchantAccounts", + "baseName": "associatedMerchantAccounts", + "type": "Array" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CreateCompanyApiCredentialRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/createCompanyApiCredentialResponse.ts b/src/typings/management/createCompanyApiCredentialResponse.ts new file mode 100644 index 0000000..552a827 --- /dev/null +++ b/src/typings/management/createCompanyApiCredentialResponse.ts @@ -0,0 +1,128 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AllowedOrigin } from './allowedOrigin'; +import { ApiCredentialLinks } from './apiCredentialLinks'; + +export class CreateCompanyApiCredentialResponse { + 'links'?: ApiCredentialLinks; + /** + * Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. + */ + 'active': boolean; + /** + * List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. + */ + 'allowedIpAddresses': Array; + /** + * List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. + */ + 'allowedOrigins'?: Array; + /** + * The API key for the API credential that was created. + */ + 'apiKey': string; + /** + * List of merchant accounts that the API credential has access to. + */ + 'associatedMerchantAccounts': Array; + /** + * Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. + */ + 'clientKey': string; + /** + * Description of the API credential. + */ + 'description'?: string; + /** + * Unique identifier of the API credential. + */ + 'id': string; + /** + * The password for the API credential that was created. + */ + 'password': string; + /** + * List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + */ + 'roles': Array; + /** + * The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "ApiCredentialLinks" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "allowedIpAddresses", + "baseName": "allowedIpAddresses", + "type": "Array" + }, + { + "name": "allowedOrigins", + "baseName": "allowedOrigins", + "type": "Array" + }, + { + "name": "apiKey", + "baseName": "apiKey", + "type": "string" + }, + { + "name": "associatedMerchantAccounts", + "baseName": "associatedMerchantAccounts", + "type": "Array" + }, + { + "name": "clientKey", + "baseName": "clientKey", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "password", + "baseName": "password", + "type": "string" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateCompanyApiCredentialResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/createCompanyUserRequest.ts b/src/typings/management/createCompanyUserRequest.ts new file mode 100644 index 0000000..ba24cb5 --- /dev/null +++ b/src/typings/management/createCompanyUserRequest.ts @@ -0,0 +1,82 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Name } from './name'; + +export class CreateCompanyUserRequest { + /** + * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. + */ + 'accountGroups'?: Array; + /** + * The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. + */ + 'associatedMerchantAccounts'?: Array; + /** + * The email address of the user. + */ + 'email': string; + 'name': Name; + /** + * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. + */ + 'roles'?: Array; + /** + * The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. + */ + 'timeZoneCode'?: string; + /** + * The username for this user. Allowed length: 255 alphanumeric characters. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountGroups", + "baseName": "accountGroups", + "type": "Array" + }, + { + "name": "associatedMerchantAccounts", + "baseName": "associatedMerchantAccounts", + "type": "Array" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "Name" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "timeZoneCode", + "baseName": "timeZoneCode", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateCompanyUserRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/createCompanyUserResponse.ts b/src/typings/management/createCompanyUserResponse.ts new file mode 100644 index 0000000..a1d8108 --- /dev/null +++ b/src/typings/management/createCompanyUserResponse.ts @@ -0,0 +1,107 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Links } from './links'; +import { Name } from './name'; + +export class CreateCompanyUserResponse { + 'links'?: Links; + /** + * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. + */ + 'accountGroups'?: Array; + /** + * Indicates whether this user is active. + */ + 'active'?: boolean; + /** + * The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. + */ + 'associatedMerchantAccounts'?: Array; + /** + * The email address of the user. + */ + 'email': string; + /** + * The unique identifier of the user. + */ + 'id': string; + 'name'?: Name; + /** + * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. + */ + 'roles': Array; + /** + * The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. + */ + 'timeZoneCode': string; + /** + * The username for this user. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "Links" + }, + { + "name": "accountGroups", + "baseName": "accountGroups", + "type": "Array" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "associatedMerchantAccounts", + "baseName": "associatedMerchantAccounts", + "type": "Array" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "Name" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "timeZoneCode", + "baseName": "timeZoneCode", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateCompanyUserResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/createCompanyWebhookRequest.ts b/src/typings/management/createCompanyWebhookRequest.ts new file mode 100644 index 0000000..0ce1ead --- /dev/null +++ b/src/typings/management/createCompanyWebhookRequest.ts @@ -0,0 +1,190 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AdditionalSettings } from './additionalSettings'; + +export class CreateCompanyWebhookRequest { + /** + * Indicates if expired SSL certificates are accepted. Default value: **false**. + */ + 'acceptsExpiredCertificate'?: boolean; + /** + * Indicates if self-signed SSL certificates are accepted. Default value: **false**. + */ + 'acceptsSelfSignedCertificate'?: boolean; + /** + * Indicates if untrusted SSL certificates are accepted. Default value: **false**. + */ + 'acceptsUntrustedRootCertificate'?: boolean; + /** + * Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. + */ + 'active': boolean; + 'additionalSettings'?: AdditionalSettings; + /** + * Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** + */ + 'communicationFormat': CreateCompanyWebhookRequest.CommunicationFormatEnum; + /** + * Your description for this webhook configuration. + */ + 'description'?: string; + /** + * Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. + */ + 'filterMerchantAccountType': CreateCompanyWebhookRequest.FilterMerchantAccountTypeEnum; + /** + * A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. + */ + 'filterMerchantAccounts': Array; + /** + * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. + */ + 'networkType'?: CreateCompanyWebhookRequest.NetworkTypeEnum; + /** + * Password to access the webhook URL. + */ + 'password'?: string; + /** + * Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. + */ + 'populateSoapActionHeader'?: boolean; + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.2** * **SSL** * **SSLv3** * **TLS** * **TLSv1** * **TLSv1.1** If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + */ + 'sslVersion'?: CreateCompanyWebhookRequest.SslVersionEnum; + /** + * The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). + */ + 'type': string; + /** + * Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. + */ + 'url': string; + /** + * Username to access the webhook URL. + */ + 'username'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "acceptsExpiredCertificate", + "baseName": "acceptsExpiredCertificate", + "type": "boolean" + }, + { + "name": "acceptsSelfSignedCertificate", + "baseName": "acceptsSelfSignedCertificate", + "type": "boolean" + }, + { + "name": "acceptsUntrustedRootCertificate", + "baseName": "acceptsUntrustedRootCertificate", + "type": "boolean" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "additionalSettings", + "baseName": "additionalSettings", + "type": "AdditionalSettings" + }, + { + "name": "communicationFormat", + "baseName": "communicationFormat", + "type": "CreateCompanyWebhookRequest.CommunicationFormatEnum" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "filterMerchantAccountType", + "baseName": "filterMerchantAccountType", + "type": "CreateCompanyWebhookRequest.FilterMerchantAccountTypeEnum" + }, + { + "name": "filterMerchantAccounts", + "baseName": "filterMerchantAccounts", + "type": "Array" + }, + { + "name": "networkType", + "baseName": "networkType", + "type": "CreateCompanyWebhookRequest.NetworkTypeEnum" + }, + { + "name": "password", + "baseName": "password", + "type": "string" + }, + { + "name": "populateSoapActionHeader", + "baseName": "populateSoapActionHeader", + "type": "boolean" + }, + { + "name": "sslVersion", + "baseName": "sslVersion", + "type": "CreateCompanyWebhookRequest.SslVersionEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateCompanyWebhookRequest.attributeTypeMap; + } +} + +export namespace CreateCompanyWebhookRequest { + export enum CommunicationFormatEnum { + Http = 'HTTP', + Json = 'JSON', + Soap = 'SOAP' + } + export enum FilterMerchantAccountTypeEnum { + ExcludeList = 'EXCLUDE_LIST', + IncludeAll = 'INCLUDE_ALL', + IncludeList = 'INCLUDE_LIST' + } + export enum NetworkTypeEnum { + Local = 'LOCAL', + Public = 'PUBLIC' + } + export enum SslVersionEnum { + Http = 'HTTP', + Ssl = 'SSL', + Sslv3 = 'SSLV3', + SslInsecureCiphers = 'SSL_INSECURE_CIPHERS', + Tls = 'TLS', + Tlsv1 = 'TLSV1', + Tlsv11 = 'TLSV1_1', + Tlsv12 = 'TLSV1_2', + Tlsv1InsecureCiphers = 'TLSV1_INSECURE_CIPHERS' + } +} diff --git a/src/typings/management/createMerchantApiCredentialRequest.ts b/src/typings/management/createMerchantApiCredentialRequest.ts new file mode 100644 index 0000000..a89c699 --- /dev/null +++ b/src/typings/management/createMerchantApiCredentialRequest.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class CreateMerchantApiCredentialRequest { + /** + * The list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the new API credential. + */ + 'allowedOrigins'?: Array; + /** + * Description of the API credential. + */ + 'description'?: string; + /** + * List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + */ + 'roles'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allowedOrigins", + "baseName": "allowedOrigins", + "type": "Array" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CreateMerchantApiCredentialRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/createMerchantUserRequest.ts b/src/typings/management/createMerchantUserRequest.ts new file mode 100644 index 0000000..ff4f783 --- /dev/null +++ b/src/typings/management/createMerchantUserRequest.ts @@ -0,0 +1,73 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Name } from './name'; + +export class CreateMerchantUserRequest { + /** + * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. + */ + 'accountGroups'?: Array; + /** + * The email address of the user. + */ + 'email': string; + 'name': Name; + /** + * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. + */ + 'roles'?: Array; + /** + * The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. + */ + 'timeZoneCode'?: string; + /** + * The username for this user. Allowed length: 255 alphanumeric characters. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountGroups", + "baseName": "accountGroups", + "type": "Array" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "Name" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "timeZoneCode", + "baseName": "timeZoneCode", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateMerchantUserRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/createMerchantWebhookRequest.ts b/src/typings/management/createMerchantWebhookRequest.ts new file mode 100644 index 0000000..6a3f029 --- /dev/null +++ b/src/typings/management/createMerchantWebhookRequest.ts @@ -0,0 +1,167 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AdditionalSettings } from './additionalSettings'; + +export class CreateMerchantWebhookRequest { + /** + * Indicates if expired SSL certificates are accepted. Default value: **false**. + */ + 'acceptsExpiredCertificate'?: boolean; + /** + * Indicates if self-signed SSL certificates are accepted. Default value: **false**. + */ + 'acceptsSelfSignedCertificate'?: boolean; + /** + * Indicates if untrusted SSL certificates are accepted. Default value: **false**. + */ + 'acceptsUntrustedRootCertificate'?: boolean; + /** + * Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. + */ + 'active': boolean; + 'additionalSettings'?: AdditionalSettings; + /** + * Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** + */ + 'communicationFormat': CreateMerchantWebhookRequest.CommunicationFormatEnum; + /** + * Your description for this webhook configuration. + */ + 'description'?: string; + /** + * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. + */ + 'networkType'?: CreateMerchantWebhookRequest.NetworkTypeEnum; + /** + * Password to access the webhook URL. + */ + 'password'?: string; + /** + * Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. + */ + 'populateSoapActionHeader'?: boolean; + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.2** * **SSL** * **SSLv3** * **TLS** * **TLSv1** * **TLSv1.1** If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + */ + 'sslVersion'?: CreateMerchantWebhookRequest.SslVersionEnum; + /** + * The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). + */ + 'type': string; + /** + * Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. + */ + 'url': string; + /** + * Username to access the webhook URL. + */ + 'username'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "acceptsExpiredCertificate", + "baseName": "acceptsExpiredCertificate", + "type": "boolean" + }, + { + "name": "acceptsSelfSignedCertificate", + "baseName": "acceptsSelfSignedCertificate", + "type": "boolean" + }, + { + "name": "acceptsUntrustedRootCertificate", + "baseName": "acceptsUntrustedRootCertificate", + "type": "boolean" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "additionalSettings", + "baseName": "additionalSettings", + "type": "AdditionalSettings" + }, + { + "name": "communicationFormat", + "baseName": "communicationFormat", + "type": "CreateMerchantWebhookRequest.CommunicationFormatEnum" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "networkType", + "baseName": "networkType", + "type": "CreateMerchantWebhookRequest.NetworkTypeEnum" + }, + { + "name": "password", + "baseName": "password", + "type": "string" + }, + { + "name": "populateSoapActionHeader", + "baseName": "populateSoapActionHeader", + "type": "boolean" + }, + { + "name": "sslVersion", + "baseName": "sslVersion", + "type": "CreateMerchantWebhookRequest.SslVersionEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateMerchantWebhookRequest.attributeTypeMap; + } +} + +export namespace CreateMerchantWebhookRequest { + export enum CommunicationFormatEnum { + Http = 'HTTP', + Json = 'JSON', + Soap = 'SOAP' + } + export enum NetworkTypeEnum { + Local = 'LOCAL', + Public = 'PUBLIC' + } + export enum SslVersionEnum { + Http = 'HTTP', + Ssl = 'SSL', + Sslv3 = 'SSLV3', + SslInsecureCiphers = 'SSL_INSECURE_CIPHERS', + Tls = 'TLS', + Tlsv1 = 'TLSV1', + Tlsv11 = 'TLSV1_1', + Tlsv12 = 'TLSV1_2', + Tlsv1InsecureCiphers = 'TLSV1_INSECURE_CIPHERS' + } +} diff --git a/src/typings/management/createUserResponse.ts b/src/typings/management/createUserResponse.ts new file mode 100644 index 0000000..58601c6 --- /dev/null +++ b/src/typings/management/createUserResponse.ts @@ -0,0 +1,98 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Links } from './links'; +import { Name } from './name'; + +export class CreateUserResponse { + 'links'?: Links; + /** + * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. + */ + 'accountGroups'?: Array; + /** + * Indicates whether this user is active. + */ + 'active'?: boolean; + /** + * The email address of the user. + */ + 'email': string; + /** + * The unique identifier of the user. + */ + 'id': string; + 'name'?: Name; + /** + * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. + */ + 'roles': Array; + /** + * The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. + */ + 'timeZoneCode': string; + /** + * The username for this user. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "Links" + }, + { + "name": "accountGroups", + "baseName": "accountGroups", + "type": "Array" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "Name" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "timeZoneCode", + "baseName": "timeZoneCode", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateUserResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/currency.ts b/src/typings/management/currency.ts new file mode 100644 index 0000000..63c2e67 --- /dev/null +++ b/src/typings/management/currency.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Currency { + /** + * Surcharge amount per transaction, in minor units. + */ + 'amount'?: number; + /** + * Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, **AUD**. + */ + 'currencyCode': string; + /** + * Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**. + */ + 'percentage'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "number" + }, + { + "name": "currencyCode", + "baseName": "currencyCode", + "type": "string" + }, + { + "name": "percentage", + "baseName": "percentage", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Currency.attributeTypeMap; + } +} + diff --git a/src/typings/management/customNotification.ts b/src/typings/management/customNotification.ts new file mode 100644 index 0000000..22bba6d --- /dev/null +++ b/src/typings/management/customNotification.ts @@ -0,0 +1,82 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Amount2 } from './amount2'; + +export class CustomNotification { + 'amount'?: Amount2; + /** + * The event that caused the notification to be sent.Currently supported values: * **AUTHORISATION** * **CANCELLATION** * **REFUND** * **CAPTURE** * **DEACTIVATE_RECURRING** * **REPORT_AVAILABLE** * **CHARGEBACK** * **REQUEST_FOR_INFORMATION** * **NOTIFICATION_OF_CHARGEBACK** * **NOTIFICATIONTEST** * **ORDER_OPENED** * **ORDER_CLOSED** * **CHARGEBACK_REVERSED** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** + */ + 'eventCode'?: string; + /** + * The time of the event. Format: [ISO 8601](http://www.w3.org/TR/NOTE-datetime), YYYY-MM-DDThh:mm:ssTZD. + */ + 'eventDate'?: Date; + /** + * Your reference for the custom test notification. + */ + 'merchantReference'?: string; + /** + * The payment method for the payment that the notification is about. Possible values: * **amex** * **visa** * **mc** * **maestro** * **bcmc** * **paypal** * **sms** * **bankTransfer_NL** * **bankTransfer_DE** * **bankTransfer_BE** * **ideal** * **elv** * **sepadirectdebit** + */ + 'paymentMethod'?: string; + /** + * A descripton of what caused the notification. + */ + 'reason'?: string; + /** + * The outcome of the event which the notification is about. Set to either **true** or **false**. + */ + 'success'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "Amount2" + }, + { + "name": "eventCode", + "baseName": "eventCode", + "type": "string" + }, + { + "name": "eventDate", + "baseName": "eventDate", + "type": "Date" + }, + { + "name": "merchantReference", + "baseName": "merchantReference", + "type": "string" + }, + { + "name": "paymentMethod", + "baseName": "paymentMethod", + "type": "string" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string" + }, + { + "name": "success", + "baseName": "success", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return CustomNotification.attributeTypeMap; + } +} + diff --git a/src/typings/management/dataCenter.ts b/src/typings/management/dataCenter.ts new file mode 100644 index 0000000..b835055 --- /dev/null +++ b/src/typings/management/dataCenter.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class DataCenter { + /** + * The unique [live URL prefix](https://docs.adyen.com/development-resources/live-endpoints#live-url-prefix) for your live endpoint. Each data center has its own live URL prefix. This field is empty for requests made in the test environment. + */ + 'livePrefix'?: string; + /** + * The name assigned to a data center, for example **EU** for the European data center. Possible values are: * **default**: the European data center. This value is always returned in the test environment. * **AU** * **EU** * **US** + */ + 'name'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "livePrefix", + "baseName": "livePrefix", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DataCenter.attributeTypeMap; + } +} + diff --git a/src/typings/management/eventUrl.ts b/src/typings/management/eventUrl.ts new file mode 100644 index 0000000..5e28494 --- /dev/null +++ b/src/typings/management/eventUrl.ts @@ -0,0 +1,40 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Url } from './url'; + +export class EventUrl { + /** + * One or more local URLs to send event notifications to when using Terminal API. + */ + 'eventLocalUrls'?: Array; + /** + * One or more public URLs to send event notifications to when using Terminal API. + */ + 'eventPublicUrls'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "eventLocalUrls", + "baseName": "eventLocalUrls", + "type": "Array" + }, + { + "name": "eventPublicUrls", + "baseName": "eventPublicUrls", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return EventUrl.attributeTypeMap; + } +} + diff --git a/src/typings/management/externalTerminalAction.ts b/src/typings/management/externalTerminalAction.ts new file mode 100644 index 0000000..e268e2d --- /dev/null +++ b/src/typings/management/externalTerminalAction.ts @@ -0,0 +1,93 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class ExternalTerminalAction { + /** + * The type of terminal action: **InstallAndroidApp**, **UninstallAndroidApp**, **InstallAndroidCertificate**, or **UninstallAndroidCertificate**. + */ + 'actionType'?: string; + /** + * Technical information about the terminal action. + */ + 'config'?: string; + /** + * The date and time when the action was carried out. + */ + 'confirmedAt'?: Date; + /** + * The unique ID of the terminal action. + */ + 'id'?: string; + /** + * The result message for the action. + */ + 'result'?: string; + /** + * The date and time when the action was scheduled to happen. + */ + 'scheduledAt'?: Date; + /** + * The status of the terminal action: **pending**, **successful**, **failed**, **cancelled**, or **tryLater**. + */ + 'status'?: string; + /** + * The unique ID of the terminal that the action applies to. + */ + 'terminalId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "actionType", + "baseName": "actionType", + "type": "string" + }, + { + "name": "config", + "baseName": "config", + "type": "string" + }, + { + "name": "confirmedAt", + "baseName": "confirmedAt", + "type": "Date" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "result", + "baseName": "result", + "type": "string" + }, + { + "name": "scheduledAt", + "baseName": "scheduledAt", + "type": "Date" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "terminalId", + "baseName": "terminalId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ExternalTerminalAction.attributeTypeMap; + } +} + diff --git a/src/typings/management/generateApiKeyResponse.ts b/src/typings/management/generateApiKeyResponse.ts new file mode 100644 index 0000000..0829637 --- /dev/null +++ b/src/typings/management/generateApiKeyResponse.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class GenerateApiKeyResponse { + /** + * The generated API key. + */ + 'apiKey': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "apiKey", + "baseName": "apiKey", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return GenerateApiKeyResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/generateClientKeyResponse.ts b/src/typings/management/generateClientKeyResponse.ts new file mode 100644 index 0000000..005787d --- /dev/null +++ b/src/typings/management/generateClientKeyResponse.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class GenerateClientKeyResponse { + /** + * Generated client key + */ + 'clientKey': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "clientKey", + "baseName": "clientKey", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return GenerateClientKeyResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/generateHmacKeyResponse.ts b/src/typings/management/generateHmacKeyResponse.ts new file mode 100644 index 0000000..f33a444 --- /dev/null +++ b/src/typings/management/generateHmacKeyResponse.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class GenerateHmacKeyResponse { + /** + * The HMAC key generated for this webhook. + */ + 'hmacKey': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "hmacKey", + "baseName": "hmacKey", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return GenerateHmacKeyResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/giroPayInfo.ts b/src/typings/management/giroPayInfo.ts new file mode 100644 index 0000000..6efbee0 --- /dev/null +++ b/src/typings/management/giroPayInfo.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class GiroPayInfo { + /** + * The email address of merchant support. + */ + 'supportEmail': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "supportEmail", + "baseName": "supportEmail", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return GiroPayInfo.attributeTypeMap; + } +} + diff --git a/src/typings/management/gratuity.ts b/src/typings/management/gratuity.ts new file mode 100644 index 0000000..bcb2df3 --- /dev/null +++ b/src/typings/management/gratuity.ts @@ -0,0 +1,57 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Gratuity { + /** + * Indicates whether one of the predefined tipping options is to let the shopper enter a custom tip. If **true**, only three of the other options defined in `predefinedTipEntries` are shown. + */ + 'allowCustomAmount'?: boolean; + /** + * The currency that the tipping settings apply to. + */ + 'currency'?: string; + /** + * Tipping options the shopper can choose from if `usePredefinedTipEntries` is **true**. The maximum number of predefined options is four, or three plus the option to enter a custom tip. The options can be a mix of: - A percentage of the transaction amount. Example: **5%** - A tip amount in minor units. Example: **500** for a EUR 5 tip. + */ + 'predefinedTipEntries'?: Array; + /** + * Indicates whether the terminal shows a prompt to enter a tip (**false**), or predefined tipping options to choose from (**true**). + */ + 'usePredefinedTipEntries'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allowCustomAmount", + "baseName": "allowCustomAmount", + "type": "boolean" + }, + { + "name": "currency", + "baseName": "currency", + "type": "string" + }, + { + "name": "predefinedTipEntries", + "baseName": "predefinedTipEntries", + "type": "Array" + }, + { + "name": "usePredefinedTipEntries", + "baseName": "usePredefinedTipEntries", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return Gratuity.attributeTypeMap; + } +} + diff --git a/src/typings/management/hardware.ts b/src/typings/management/hardware.ts new file mode 100644 index 0000000..e344218 --- /dev/null +++ b/src/typings/management/hardware.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Hardware { + /** + * The brightness of the display when the terminal is being used, expressed as a percentage. + */ + 'displayMaximumBackLight'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "displayMaximumBackLight", + "baseName": "displayMaximumBackLight", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Hardware.attributeTypeMap; + } +} + diff --git a/src/typings/management/idName.ts b/src/typings/management/idName.ts new file mode 100644 index 0000000..cf9ce89 --- /dev/null +++ b/src/typings/management/idName.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class IdName { + /** + * The identifier of the terminal model. + */ + 'id'?: string; + /** + * The name of the terminal model. + */ + 'name'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return IdName.attributeTypeMap; + } +} + diff --git a/src/typings/management/installAndroidAppDetails.ts b/src/typings/management/installAndroidAppDetails.ts new file mode 100644 index 0000000..770a8a9 --- /dev/null +++ b/src/typings/management/installAndroidAppDetails.ts @@ -0,0 +1,44 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class InstallAndroidAppDetails { + /** + * The unique identifier of the app to be installed. + */ + 'appId'?: string; + /** + * Type of terminal action: Install an Android app. + */ + 'type'?: InstallAndroidAppDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "appId", + "baseName": "appId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "InstallAndroidAppDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return InstallAndroidAppDetails.attributeTypeMap; + } +} + +export namespace InstallAndroidAppDetails { + export enum TypeEnum { + InstallAndroidApp = 'InstallAndroidApp' + } +} diff --git a/src/typings/management/installAndroidCertificateDetails.ts b/src/typings/management/installAndroidCertificateDetails.ts new file mode 100644 index 0000000..04b6d75 --- /dev/null +++ b/src/typings/management/installAndroidCertificateDetails.ts @@ -0,0 +1,44 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class InstallAndroidCertificateDetails { + /** + * The unique identifier of the certificate to be installed. + */ + 'certificateId'?: string; + /** + * Type of terminal action: Install an Android certificate. + */ + 'type'?: InstallAndroidCertificateDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "certificateId", + "baseName": "certificateId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "InstallAndroidCertificateDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return InstallAndroidCertificateDetails.attributeTypeMap; + } +} + +export namespace InstallAndroidCertificateDetails { + export enum TypeEnum { + InstallAndroidCertificate = 'InstallAndroidCertificate' + } +} diff --git a/src/typings/management/invalidField.ts b/src/typings/management/invalidField.ts new file mode 100644 index 0000000..8f5ec6d --- /dev/null +++ b/src/typings/management/invalidField.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class InvalidField { + /** + * Description of the validation error. + */ + 'message': string; + /** + * The field that has an invalid value. + */ + 'name': string; + /** + * The invalid value. + */ + 'value': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return InvalidField.attributeTypeMap; + } +} + diff --git a/src/typings/management/jSONObject.ts b/src/typings/management/jSONObject.ts new file mode 100644 index 0000000..81eccd9 --- /dev/null +++ b/src/typings/management/jSONObject.ts @@ -0,0 +1,34 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { JSONPath } from './jSONPath'; + +export class JSONObject { + 'paths'?: Array; + 'rootPath'?: JSONPath; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paths", + "baseName": "paths", + "type": "Array" + }, + { + "name": "rootPath", + "baseName": "rootPath", + "type": "JSONPath" + } ]; + + static getAttributeTypeMap() { + return JSONObject.attributeTypeMap; + } +} + diff --git a/src/typings/management/jSONPath.ts b/src/typings/management/jSONPath.ts new file mode 100644 index 0000000..a62c55b --- /dev/null +++ b/src/typings/management/jSONPath.ts @@ -0,0 +1,27 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class JSONPath { + 'content'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "content", + "baseName": "content", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return JSONPath.attributeTypeMap; + } +} + diff --git a/src/typings/management/klarnaInfo.ts b/src/typings/management/klarnaInfo.ts new file mode 100644 index 0000000..94a3b7e --- /dev/null +++ b/src/typings/management/klarnaInfo.ts @@ -0,0 +1,65 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class KlarnaInfo { + /** + * Indicates the status of [Automatic capture](https://docs.adyen.com/online-payments/capture#automatic-capture). Default value: **false**. + */ + 'autoCapture'?: boolean; + /** + * The email address for disputes. + */ + 'disputeEmail': string; + /** + * The region of operation. For example, **NA**, **EU**, **CH**, **AU**. + */ + 'region': KlarnaInfo.RegionEnum; + /** + * The email address of merchant support. + */ + 'supportEmail': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "autoCapture", + "baseName": "autoCapture", + "type": "boolean" + }, + { + "name": "disputeEmail", + "baseName": "disputeEmail", + "type": "string" + }, + { + "name": "region", + "baseName": "region", + "type": "KlarnaInfo.RegionEnum" + }, + { + "name": "supportEmail", + "baseName": "supportEmail", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return KlarnaInfo.attributeTypeMap; + } +} + +export namespace KlarnaInfo { + export enum RegionEnum { + Na = 'NA', + Eu = 'EU', + Ch = 'CH', + Au = 'AU' + } +} diff --git a/src/typings/management/links.ts b/src/typings/management/links.ts new file mode 100644 index 0000000..bd6ce91 --- /dev/null +++ b/src/typings/management/links.ts @@ -0,0 +1,28 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { LinksElement } from './linksElement'; + +export class Links { + 'self': LinksElement; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "self", + "baseName": "self", + "type": "LinksElement" + } ]; + + static getAttributeTypeMap() { + return Links.attributeTypeMap; + } +} + diff --git a/src/typings/management/linksElement.ts b/src/typings/management/linksElement.ts new file mode 100644 index 0000000..cf72b5a --- /dev/null +++ b/src/typings/management/linksElement.ts @@ -0,0 +1,27 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class LinksElement { + 'href'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "href", + "baseName": "href", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return LinksElement.attributeTypeMap; + } +} + diff --git a/src/typings/management/listCompanyApiCredentialsResponse.ts b/src/typings/management/listCompanyApiCredentialsResponse.ts new file mode 100644 index 0000000..9f60b54 --- /dev/null +++ b/src/typings/management/listCompanyApiCredentialsResponse.ts @@ -0,0 +1,56 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CompanyApiCredential } from './companyApiCredential'; +import { PaginationLinks } from './paginationLinks'; + +export class ListCompanyApiCredentialsResponse { + 'links'?: PaginationLinks; + /** + * The list of API credentials. + */ + 'data'?: Array; + /** + * Total number of items. + */ + 'itemsTotal': number; + /** + * Total number of pages. + */ + 'pagesTotal': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "PaginationLinks" + }, + { + "name": "data", + "baseName": "data", + "type": "Array" + }, + { + "name": "itemsTotal", + "baseName": "itemsTotal", + "type": "number" + }, + { + "name": "pagesTotal", + "baseName": "pagesTotal", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ListCompanyApiCredentialsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/listCompanyResponse.ts b/src/typings/management/listCompanyResponse.ts new file mode 100644 index 0000000..dbde568 --- /dev/null +++ b/src/typings/management/listCompanyResponse.ts @@ -0,0 +1,56 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Company } from './company'; +import { PaginationLinks } from './paginationLinks'; + +export class ListCompanyResponse { + 'links'?: PaginationLinks; + /** + * The list of companies. + */ + 'data'?: Array; + /** + * Total number of items. + */ + 'itemsTotal': number; + /** + * Total number of pages. + */ + 'pagesTotal': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "PaginationLinks" + }, + { + "name": "data", + "baseName": "data", + "type": "Array" + }, + { + "name": "itemsTotal", + "baseName": "itemsTotal", + "type": "number" + }, + { + "name": "pagesTotal", + "baseName": "pagesTotal", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ListCompanyResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/listCompanyUsersResponse.ts b/src/typings/management/listCompanyUsersResponse.ts new file mode 100644 index 0000000..3204d9b --- /dev/null +++ b/src/typings/management/listCompanyUsersResponse.ts @@ -0,0 +1,56 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CompanyUser } from './companyUser'; +import { PaginationLinks } from './paginationLinks'; + +export class ListCompanyUsersResponse { + 'links'?: PaginationLinks; + /** + * The list of users. + */ + 'data'?: Array; + /** + * Total number of items. + */ + 'itemsTotal': number; + /** + * Total number of pages. + */ + 'pagesTotal': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "PaginationLinks" + }, + { + "name": "data", + "baseName": "data", + "type": "Array" + }, + { + "name": "itemsTotal", + "baseName": "itemsTotal", + "type": "number" + }, + { + "name": "pagesTotal", + "baseName": "pagesTotal", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ListCompanyUsersResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/listExternalTerminalActionsResponse.ts b/src/typings/management/listExternalTerminalActionsResponse.ts new file mode 100644 index 0000000..4290cc7 --- /dev/null +++ b/src/typings/management/listExternalTerminalActionsResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ExternalTerminalAction } from './externalTerminalAction'; + +export class ListExternalTerminalActionsResponse { + /** + * The list of terminal actions. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ListExternalTerminalActionsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/listMerchantApiCredentialsResponse.ts b/src/typings/management/listMerchantApiCredentialsResponse.ts new file mode 100644 index 0000000..8d93b1b --- /dev/null +++ b/src/typings/management/listMerchantApiCredentialsResponse.ts @@ -0,0 +1,56 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ApiCredential } from './apiCredential'; +import { PaginationLinks } from './paginationLinks'; + +export class ListMerchantApiCredentialsResponse { + 'links'?: PaginationLinks; + /** + * The list of API credentials. + */ + 'data'?: Array; + /** + * Total number of items. + */ + 'itemsTotal': number; + /** + * Total number of pages. + */ + 'pagesTotal': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "PaginationLinks" + }, + { + "name": "data", + "baseName": "data", + "type": "Array" + }, + { + "name": "itemsTotal", + "baseName": "itemsTotal", + "type": "number" + }, + { + "name": "pagesTotal", + "baseName": "pagesTotal", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ListMerchantApiCredentialsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/listMerchantResponse.ts b/src/typings/management/listMerchantResponse.ts new file mode 100644 index 0000000..a7cf57f --- /dev/null +++ b/src/typings/management/listMerchantResponse.ts @@ -0,0 +1,56 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Merchant } from './merchant'; +import { PaginationLinks } from './paginationLinks'; + +export class ListMerchantResponse { + 'links'?: PaginationLinks; + /** + * The list of merchant accounts. + */ + 'data'?: Array; + /** + * Total number of items. + */ + 'itemsTotal': number; + /** + * Total number of pages. + */ + 'pagesTotal': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "PaginationLinks" + }, + { + "name": "data", + "baseName": "data", + "type": "Array" + }, + { + "name": "itemsTotal", + "baseName": "itemsTotal", + "type": "number" + }, + { + "name": "pagesTotal", + "baseName": "pagesTotal", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ListMerchantResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/listMerchantUsersResponse.ts b/src/typings/management/listMerchantUsersResponse.ts new file mode 100644 index 0000000..46270cd --- /dev/null +++ b/src/typings/management/listMerchantUsersResponse.ts @@ -0,0 +1,56 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { PaginationLinks } from './paginationLinks'; +import { User } from './user'; + +export class ListMerchantUsersResponse { + 'links'?: PaginationLinks; + /** + * The list of users. + */ + 'data'?: Array; + /** + * Total number of items. + */ + 'itemsTotal': number; + /** + * Total number of pages. + */ + 'pagesTotal': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "PaginationLinks" + }, + { + "name": "data", + "baseName": "data", + "type": "Array" + }, + { + "name": "itemsTotal", + "baseName": "itemsTotal", + "type": "number" + }, + { + "name": "pagesTotal", + "baseName": "pagesTotal", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ListMerchantUsersResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/listStoresResponse.ts b/src/typings/management/listStoresResponse.ts new file mode 100644 index 0000000..4e793f8 --- /dev/null +++ b/src/typings/management/listStoresResponse.ts @@ -0,0 +1,53 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { PaginationLinks } from './paginationLinks'; +import { Store } from './store'; + +export class ListStoresResponse { + 'links'?: PaginationLinks; + 'data'?: Array; + /** + * Total number of items. + */ + 'itemsTotal': number; + /** + * Total number of pages. + */ + 'pagesTotal': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "PaginationLinks" + }, + { + "name": "data", + "baseName": "data", + "type": "Array" + }, + { + "name": "itemsTotal", + "baseName": "itemsTotal", + "type": "number" + }, + { + "name": "pagesTotal", + "baseName": "pagesTotal", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ListStoresResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/listTerminalsResponse.ts b/src/typings/management/listTerminalsResponse.ts new file mode 100644 index 0000000..556f2e1 --- /dev/null +++ b/src/typings/management/listTerminalsResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Terminal } from './terminal'; + +export class ListTerminalsResponse { + /** + * The list of terminals. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ListTerminalsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/listWebhooksResponse.ts b/src/typings/management/listWebhooksResponse.ts new file mode 100644 index 0000000..b9efec7 --- /dev/null +++ b/src/typings/management/listWebhooksResponse.ts @@ -0,0 +1,56 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { PaginationLinks } from './paginationLinks'; +import { Webhook } from './webhook'; + +export class ListWebhooksResponse { + 'links'?: PaginationLinks; + /** + * The list of webhooks configured for this account. + */ + 'data'?: Array; + /** + * Total number of items. + */ + 'itemsTotal': number; + /** + * Total number of pages. + */ + 'pagesTotal': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "PaginationLinks" + }, + { + "name": "data", + "baseName": "data", + "type": "Array" + }, + { + "name": "itemsTotal", + "baseName": "itemsTotal", + "type": "number" + }, + { + "name": "pagesTotal", + "baseName": "pagesTotal", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ListWebhooksResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/logo.ts b/src/typings/management/logo.ts new file mode 100644 index 0000000..204c8d4 --- /dev/null +++ b/src/typings/management/logo.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Logo { + /** + * The image file, converted to a Base64-encoded string, of the logo to be shown on the terminal. + */ + 'data'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Logo.attributeTypeMap; + } +} + diff --git a/src/typings/management/meApiCredential.ts b/src/typings/management/meApiCredential.ts new file mode 100644 index 0000000..4e0efd7 --- /dev/null +++ b/src/typings/management/meApiCredential.ts @@ -0,0 +1,119 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AllowedOrigin } from './allowedOrigin'; +import { ApiCredentialLinks } from './apiCredentialLinks'; + +export class MeApiCredential { + 'links'?: ApiCredentialLinks; + /** + * Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. + */ + 'active': boolean; + /** + * List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. + */ + 'allowedIpAddresses': Array; + /** + * List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. + */ + 'allowedOrigins'?: Array; + /** + * List of merchant accounts that the API credential has access to. + */ + 'associatedMerchantAccounts'?: Array; + /** + * Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. + */ + 'clientKey': string; + /** + * Name of the company linked to the API credential. + */ + 'companyName'?: string; + /** + * Description of the API credential. + */ + 'description'?: string; + /** + * Unique identifier of the API credential. + */ + 'id': string; + /** + * List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + */ + 'roles': Array; + /** + * The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "ApiCredentialLinks" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "allowedIpAddresses", + "baseName": "allowedIpAddresses", + "type": "Array" + }, + { + "name": "allowedOrigins", + "baseName": "allowedOrigins", + "type": "Array" + }, + { + "name": "associatedMerchantAccounts", + "baseName": "associatedMerchantAccounts", + "type": "Array" + }, + { + "name": "clientKey", + "baseName": "clientKey", + "type": "string" + }, + { + "name": "companyName", + "baseName": "companyName", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MeApiCredential.attributeTypeMap; + } +} + diff --git a/src/typings/management/merchant.ts b/src/typings/management/merchant.ts new file mode 100644 index 0000000..e246e05 --- /dev/null +++ b/src/typings/management/merchant.ts @@ -0,0 +1,109 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { MerchantLinks } from './merchantLinks'; + +export class Merchant { + 'links'?: MerchantLinks; + /** + * The [capture delay](https://docs.adyen.com/online-payments/capture#capture-delay) set for the merchant account. Possible values: * **Immediate** * **Manual** * Number of days from **1** to **29** + */ + 'captureDelay'?: string; + /** + * The default [`shopperInteraction`](https://docs.adyen.com/api-explorer/#/CheckoutService/v68/post/payments__reqParam_shopperInteraction) value used when processing payments through this merchant account. + */ + 'defaultShopperInteraction'?: string; + /** + * The unique identifier of the merchant account. + */ + 'id'?: string; + /** + * The city where the legal entity of this merchant account is registered. + */ + 'merchantCity'?: string; + /** + * The name of the legal entity associated with the merchant account. + */ + 'name'?: string; + /** + * Only applies to merchant accounts managed by Adyen\'s partners. The name of the pricing plan assigned to the merchant account. + */ + 'pricingPlan'?: string; + /** + * The currency of the country where the legal entity of this merchant account is registered. Format: [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, a legal entity based in the United States has USD as the primary settlement currency. + */ + 'primarySettlementCurrency'?: string; + /** + * The URL for the ecommerce website used with this merchant account. + */ + 'shopWebAddress'?: string; + /** + * The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. You cannot process new payments but you can still modify payments, for example issue refunds. You can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. + */ + 'status'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "MerchantLinks" + }, + { + "name": "captureDelay", + "baseName": "captureDelay", + "type": "string" + }, + { + "name": "defaultShopperInteraction", + "baseName": "defaultShopperInteraction", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "merchantCity", + "baseName": "merchantCity", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "pricingPlan", + "baseName": "pricingPlan", + "type": "string" + }, + { + "name": "primarySettlementCurrency", + "baseName": "primarySettlementCurrency", + "type": "string" + }, + { + "name": "shopWebAddress", + "baseName": "shopWebAddress", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Merchant.attributeTypeMap; + } +} + diff --git a/src/typings/management/merchantLinks.ts b/src/typings/management/merchantLinks.ts new file mode 100644 index 0000000..b5436eb --- /dev/null +++ b/src/typings/management/merchantLinks.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { LinksElement } from './linksElement'; + +export class MerchantLinks { + 'apiCredentials'?: LinksElement; + 'self': LinksElement; + 'users'?: LinksElement; + 'webhooks'?: LinksElement; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "apiCredentials", + "baseName": "apiCredentials", + "type": "LinksElement" + }, + { + "name": "self", + "baseName": "self", + "type": "LinksElement" + }, + { + "name": "users", + "baseName": "users", + "type": "LinksElement" + }, + { + "name": "webhooks", + "baseName": "webhooks", + "type": "LinksElement" + } ]; + + static getAttributeTypeMap() { + return MerchantLinks.attributeTypeMap; + } +} + diff --git a/src/typings/management/modelFile.ts b/src/typings/management/modelFile.ts new file mode 100644 index 0000000..12df328 --- /dev/null +++ b/src/typings/management/modelFile.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class ModelFile { + /** + * The certificate content converted to a Base64-encoded string. + */ + 'data': string; + /** + * The name of the certificate. Must be unique across Wi-Fi profiles. + */ + 'name': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ModelFile.attributeTypeMap; + } +} + diff --git a/src/typings/management/models.ts b/src/typings/management/models.ts new file mode 100644 index 0000000..c3a7219 --- /dev/null +++ b/src/typings/management/models.ts @@ -0,0 +1,556 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export * from './additionalSettings'; +export * from './additionalSettingsResponse'; +export * from './address'; +export * from './address2'; +export * from './allowedOrigin'; +export * from './allowedOriginsResponse'; +export * from './amount'; +export * from './amount2'; +export * from './androidApp'; +export * from './androidAppsResponse'; +export * from './androidCertificate'; +export * from './androidCertificatesResponse'; +export * from './apiCredential'; +export * from './apiCredentialLinks'; +export * from './applePayInfo'; +export * from './bcmcInfo'; +export * from './billingEntitiesResponse'; +export * from './billingEntity'; +export * from './cardholderReceipt'; +export * from './company'; +export * from './companyApiCredential'; +export * from './companyLinks'; +export * from './companyUser'; +export * from './configuration'; +export * from './connectivity'; +export * from './contact'; +export * from './createAllowedOriginRequest'; +export * from './createApiCredentialResponse'; +export * from './createCompanyApiCredentialRequest'; +export * from './createCompanyApiCredentialResponse'; +export * from './createCompanyUserRequest'; +export * from './createCompanyUserResponse'; +export * from './createCompanyWebhookRequest'; +export * from './createMerchantApiCredentialRequest'; +export * from './createMerchantUserRequest'; +export * from './createMerchantWebhookRequest'; +export * from './createUserResponse'; +export * from './currency'; +export * from './customNotification'; +export * from './dataCenter'; +export * from './eventUrl'; +export * from './externalTerminalAction'; +export * from './generateApiKeyResponse'; +export * from './generateClientKeyResponse'; +export * from './generateHmacKeyResponse'; +export * from './giroPayInfo'; +export * from './gratuity'; +export * from './hardware'; +export * from './idName'; +export * from './installAndroidAppDetails'; +export * from './installAndroidCertificateDetails'; +export * from './invalidField'; +export * from './jSONObject'; +export * from './jSONPath'; +export * from './klarnaInfo'; +export * from './links'; +export * from './linksElement'; +export * from './listCompanyApiCredentialsResponse'; +export * from './listCompanyResponse'; +export * from './listCompanyUsersResponse'; +export * from './listExternalTerminalActionsResponse'; +export * from './listMerchantApiCredentialsResponse'; +export * from './listMerchantResponse'; +export * from './listMerchantUsersResponse'; +export * from './listStoresResponse'; +export * from './listTerminalsResponse'; +export * from './listWebhooksResponse'; +export * from './logo'; +export * from './meApiCredential'; +export * from './merchant'; +export * from './merchantLinks'; +export * from './modelFile'; +export * from './name'; +export * from './name2'; +export * from './nexo'; +export * from './opi'; +export * from './orderItem'; +export * from './paginationLinks'; +export * from './payPalInfo'; +export * from './paymentMethod'; +export * from './paymentMethodResponse'; +export * from './paymentMethodSetupInfo'; +export * from './profile'; +export * from './receiptOptions'; +export * from './receiptPrinting'; +export * from './restServiceError'; +export * from './scheduleTerminalActionsRequest'; +export * from './scheduleTerminalActionsResponse'; +export * from './settings'; +export * from './shippingLocation'; +export * from './shippingLocationsResponse'; +export * from './signature'; +export * from './sofortInfo'; +export * from './store'; +export * from './storeCreationRequest'; +export * from './storeCreationWithMerchantCodeRequest'; +export * from './storeSplitConfiguration'; +export * from './surcharge'; +export * from './swishInfo'; +export * from './terminal'; +export * from './terminalModelsResponse'; +export * from './terminalOrder'; +export * from './terminalOrderRequest'; +export * from './terminalOrdersResponse'; +export * from './terminalProduct'; +export * from './terminalProductsResponse'; +export * from './terminalSettings'; +export * from './testCompanyWebhookRequest'; +export * from './testOutput'; +export * from './testWebhookRequest'; +export * from './testWebhookResponse'; +export * from './timeouts'; +export * from './uninstallAndroidAppDetails'; +export * from './uninstallAndroidCertificateDetails'; +export * from './updatableAddress'; +export * from './updateCompanyApiCredentialRequest'; +export * from './updateCompanyUserRequest'; +export * from './updateCompanyWebhookRequest'; +export * from './updateMerchantApiCredentialRequest'; +export * from './updateMerchantUserRequest'; +export * from './updateMerchantWebhookRequest'; +export * from './updatePaymentMethodInfo'; +export * from './updateStoreRequest'; +export * from './url'; +export * from './user'; +export * from './webhook'; +export * from './webhookLinks'; +export * from './wifiProfiles'; + + +import { AdditionalSettings } from './additionalSettings'; +import { AdditionalSettingsResponse } from './additionalSettingsResponse'; +import { Address } from './address'; +import { Address2 } from './address2'; +import { AllowedOrigin } from './allowedOrigin'; +import { AllowedOriginsResponse } from './allowedOriginsResponse'; +import { Amount } from './amount'; +import { Amount2 } from './amount2'; +import { AndroidApp } from './androidApp'; +import { AndroidAppsResponse } from './androidAppsResponse'; +import { AndroidCertificate } from './androidCertificate'; +import { AndroidCertificatesResponse } from './androidCertificatesResponse'; +import { ApiCredential } from './apiCredential'; +import { ApiCredentialLinks } from './apiCredentialLinks'; +import { ApplePayInfo } from './applePayInfo'; +import { BcmcInfo } from './bcmcInfo'; +import { BillingEntitiesResponse } from './billingEntitiesResponse'; +import { BillingEntity } from './billingEntity'; +import { CardholderReceipt } from './cardholderReceipt'; +import { Company } from './company'; +import { CompanyApiCredential } from './companyApiCredential'; +import { CompanyLinks } from './companyLinks'; +import { CompanyUser } from './companyUser'; +import { Configuration } from './configuration'; +import { Connectivity } from './connectivity'; +import { Contact } from './contact'; +import { CreateAllowedOriginRequest } from './createAllowedOriginRequest'; +import { CreateApiCredentialResponse } from './createApiCredentialResponse'; +import { CreateCompanyApiCredentialRequest } from './createCompanyApiCredentialRequest'; +import { CreateCompanyApiCredentialResponse } from './createCompanyApiCredentialResponse'; +import { CreateCompanyUserRequest } from './createCompanyUserRequest'; +import { CreateCompanyUserResponse } from './createCompanyUserResponse'; +import { CreateCompanyWebhookRequest } from './createCompanyWebhookRequest'; +import { CreateMerchantApiCredentialRequest } from './createMerchantApiCredentialRequest'; +import { CreateMerchantUserRequest } from './createMerchantUserRequest'; +import { CreateMerchantWebhookRequest } from './createMerchantWebhookRequest'; +import { CreateUserResponse } from './createUserResponse'; +import { Currency } from './currency'; +import { CustomNotification } from './customNotification'; +import { DataCenter } from './dataCenter'; +import { EventUrl } from './eventUrl'; +import { ExternalTerminalAction } from './externalTerminalAction'; +import { GenerateApiKeyResponse } from './generateApiKeyResponse'; +import { GenerateClientKeyResponse } from './generateClientKeyResponse'; +import { GenerateHmacKeyResponse } from './generateHmacKeyResponse'; +import { GiroPayInfo } from './giroPayInfo'; +import { Gratuity } from './gratuity'; +import { Hardware } from './hardware'; +import { IdName } from './idName'; +import { InstallAndroidAppDetails } from './installAndroidAppDetails'; +import { InstallAndroidCertificateDetails } from './installAndroidCertificateDetails'; +import { InvalidField } from './invalidField'; +import { JSONObject } from './jSONObject'; +import { JSONPath } from './jSONPath'; +import { KlarnaInfo } from './klarnaInfo'; +import { Links } from './links'; +import { LinksElement } from './linksElement'; +import { ListCompanyApiCredentialsResponse } from './listCompanyApiCredentialsResponse'; +import { ListCompanyResponse } from './listCompanyResponse'; +import { ListCompanyUsersResponse } from './listCompanyUsersResponse'; +import { ListExternalTerminalActionsResponse } from './listExternalTerminalActionsResponse'; +import { ListMerchantApiCredentialsResponse } from './listMerchantApiCredentialsResponse'; +import { ListMerchantResponse } from './listMerchantResponse'; +import { ListMerchantUsersResponse } from './listMerchantUsersResponse'; +import { ListStoresResponse } from './listStoresResponse'; +import { ListTerminalsResponse } from './listTerminalsResponse'; +import { ListWebhooksResponse } from './listWebhooksResponse'; +import { Logo } from './logo'; +import { MeApiCredential } from './meApiCredential'; +import { Merchant } from './merchant'; +import { MerchantLinks } from './merchantLinks'; +import { ModelFile } from './modelFile'; +import { Name } from './name'; +import { Name2 } from './name2'; +import { Nexo } from './nexo'; +import { Opi } from './opi'; +import { OrderItem } from './orderItem'; +import { PaginationLinks } from './paginationLinks'; +import { PayPalInfo } from './payPalInfo'; +import { PaymentMethod } from './paymentMethod'; +import { PaymentMethodResponse } from './paymentMethodResponse'; +import { PaymentMethodSetupInfo } from './paymentMethodSetupInfo'; +import { Profile } from './profile'; +import { ReceiptOptions } from './receiptOptions'; +import { ReceiptPrinting } from './receiptPrinting'; +import { RestServiceError } from './restServiceError'; +import { ScheduleTerminalActionsRequest } from './scheduleTerminalActionsRequest'; +import { ScheduleTerminalActionsResponse } from './scheduleTerminalActionsResponse'; +import { Settings } from './settings'; +import { ShippingLocation } from './shippingLocation'; +import { ShippingLocationsResponse } from './shippingLocationsResponse'; +import { Signature } from './signature'; +import { SofortInfo } from './sofortInfo'; +import { Store } from './store'; +import { StoreCreationRequest } from './storeCreationRequest'; +import { StoreCreationWithMerchantCodeRequest } from './storeCreationWithMerchantCodeRequest'; +import { StoreSplitConfiguration } from './storeSplitConfiguration'; +import { Surcharge } from './surcharge'; +import { SwishInfo } from './swishInfo'; +import { Terminal } from './terminal'; +import { TerminalModelsResponse } from './terminalModelsResponse'; +import { TerminalOrder } from './terminalOrder'; +import { TerminalOrderRequest } from './terminalOrderRequest'; +import { TerminalOrdersResponse } from './terminalOrdersResponse'; +import { TerminalProduct } from './terminalProduct'; +import { TerminalProductsResponse } from './terminalProductsResponse'; +import { TerminalSettings } from './terminalSettings'; +import { TestCompanyWebhookRequest } from './testCompanyWebhookRequest'; +import { TestOutput } from './testOutput'; +import { TestWebhookRequest } from './testWebhookRequest'; +import { TestWebhookResponse } from './testWebhookResponse'; +import { Timeouts } from './timeouts'; +import { UninstallAndroidAppDetails } from './uninstallAndroidAppDetails'; +import { UninstallAndroidCertificateDetails } from './uninstallAndroidCertificateDetails'; +import { UpdatableAddress } from './updatableAddress'; +import { UpdateCompanyApiCredentialRequest } from './updateCompanyApiCredentialRequest'; +import { UpdateCompanyUserRequest } from './updateCompanyUserRequest'; +import { UpdateCompanyWebhookRequest } from './updateCompanyWebhookRequest'; +import { UpdateMerchantApiCredentialRequest } from './updateMerchantApiCredentialRequest'; +import { UpdateMerchantUserRequest } from './updateMerchantUserRequest'; +import { UpdateMerchantWebhookRequest } from './updateMerchantWebhookRequest'; +import { UpdatePaymentMethodInfo } from './updatePaymentMethodInfo'; +import { UpdateStoreRequest } from './updateStoreRequest'; +import { Url } from './url'; +import { User } from './user'; +import { Webhook } from './webhook'; +import { WebhookLinks } from './webhookLinks'; +import { WifiProfiles } from './wifiProfiles'; + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +let enumsMap: {[index: string]: any} = { + "Configuration.SourcesEnum": Configuration.SourcesEnum, + "Connectivity.SimcardStatusEnum": Connectivity.SimcardStatusEnum, + "CreateCompanyWebhookRequest.CommunicationFormatEnum": CreateCompanyWebhookRequest.CommunicationFormatEnum, + "CreateCompanyWebhookRequest.FilterMerchantAccountTypeEnum": CreateCompanyWebhookRequest.FilterMerchantAccountTypeEnum, + "CreateCompanyWebhookRequest.NetworkTypeEnum": CreateCompanyWebhookRequest.NetworkTypeEnum, + "CreateCompanyWebhookRequest.SslVersionEnum": CreateCompanyWebhookRequest.SslVersionEnum, + "CreateMerchantWebhookRequest.CommunicationFormatEnum": CreateMerchantWebhookRequest.CommunicationFormatEnum, + "CreateMerchantWebhookRequest.NetworkTypeEnum": CreateMerchantWebhookRequest.NetworkTypeEnum, + "CreateMerchantWebhookRequest.SslVersionEnum": CreateMerchantWebhookRequest.SslVersionEnum, + "InstallAndroidAppDetails.TypeEnum": InstallAndroidAppDetails.TypeEnum, + "InstallAndroidCertificateDetails.TypeEnum": InstallAndroidCertificateDetails.TypeEnum, + "KlarnaInfo.RegionEnum": KlarnaInfo.RegionEnum, + "PaymentMethodSetupInfo.TypeEnum": PaymentMethodSetupInfo.TypeEnum, + "Store.StatusEnum": Store.StatusEnum, + "UninstallAndroidAppDetails.TypeEnum": UninstallAndroidAppDetails.TypeEnum, + "UninstallAndroidCertificateDetails.TypeEnum": UninstallAndroidCertificateDetails.TypeEnum, + "UpdateCompanyWebhookRequest.CommunicationFormatEnum": UpdateCompanyWebhookRequest.CommunicationFormatEnum, + "UpdateCompanyWebhookRequest.FilterMerchantAccountTypeEnum": UpdateCompanyWebhookRequest.FilterMerchantAccountTypeEnum, + "UpdateCompanyWebhookRequest.NetworkTypeEnum": UpdateCompanyWebhookRequest.NetworkTypeEnum, + "UpdateCompanyWebhookRequest.SslVersionEnum": UpdateCompanyWebhookRequest.SslVersionEnum, + "UpdateMerchantWebhookRequest.CommunicationFormatEnum": UpdateMerchantWebhookRequest.CommunicationFormatEnum, + "UpdateMerchantWebhookRequest.NetworkTypeEnum": UpdateMerchantWebhookRequest.NetworkTypeEnum, + "UpdateMerchantWebhookRequest.SslVersionEnum": UpdateMerchantWebhookRequest.SslVersionEnum, + "UpdateStoreRequest.StatusEnum": UpdateStoreRequest.StatusEnum, + "Webhook.CommunicationFormatEnum": Webhook.CommunicationFormatEnum, + "Webhook.FilterMerchantAccountTypeEnum": Webhook.FilterMerchantAccountTypeEnum, + "Webhook.NetworkTypeEnum": Webhook.NetworkTypeEnum, + "Webhook.SslVersionEnum": Webhook.SslVersionEnum, +} + +let typeMap: {[index: string]: any} = { + "AdditionalSettings": AdditionalSettings, + "AdditionalSettingsResponse": AdditionalSettingsResponse, + "Address": Address, + "Address2": Address2, + "AllowedOrigin": AllowedOrigin, + "AllowedOriginsResponse": AllowedOriginsResponse, + "Amount": Amount, + "Amount2": Amount2, + "AndroidApp": AndroidApp, + "AndroidAppsResponse": AndroidAppsResponse, + "AndroidCertificate": AndroidCertificate, + "AndroidCertificatesResponse": AndroidCertificatesResponse, + "ApiCredential": ApiCredential, + "ApiCredentialLinks": ApiCredentialLinks, + "ApplePayInfo": ApplePayInfo, + "BcmcInfo": BcmcInfo, + "BillingEntitiesResponse": BillingEntitiesResponse, + "BillingEntity": BillingEntity, + "CardholderReceipt": CardholderReceipt, + "Company": Company, + "CompanyApiCredential": CompanyApiCredential, + "CompanyLinks": CompanyLinks, + "CompanyUser": CompanyUser, + "Configuration": Configuration, + "Connectivity": Connectivity, + "Contact": Contact, + "CreateAllowedOriginRequest": CreateAllowedOriginRequest, + "CreateApiCredentialResponse": CreateApiCredentialResponse, + "CreateCompanyApiCredentialRequest": CreateCompanyApiCredentialRequest, + "CreateCompanyApiCredentialResponse": CreateCompanyApiCredentialResponse, + "CreateCompanyUserRequest": CreateCompanyUserRequest, + "CreateCompanyUserResponse": CreateCompanyUserResponse, + "CreateCompanyWebhookRequest": CreateCompanyWebhookRequest, + "CreateMerchantApiCredentialRequest": CreateMerchantApiCredentialRequest, + "CreateMerchantUserRequest": CreateMerchantUserRequest, + "CreateMerchantWebhookRequest": CreateMerchantWebhookRequest, + "CreateUserResponse": CreateUserResponse, + "Currency": Currency, + "CustomNotification": CustomNotification, + "DataCenter": DataCenter, + "EventUrl": EventUrl, + "ExternalTerminalAction": ExternalTerminalAction, + "GenerateApiKeyResponse": GenerateApiKeyResponse, + "GenerateClientKeyResponse": GenerateClientKeyResponse, + "GenerateHmacKeyResponse": GenerateHmacKeyResponse, + "GiroPayInfo": GiroPayInfo, + "Gratuity": Gratuity, + "Hardware": Hardware, + "IdName": IdName, + "InstallAndroidAppDetails": InstallAndroidAppDetails, + "InstallAndroidCertificateDetails": InstallAndroidCertificateDetails, + "InvalidField": InvalidField, + "JSONObject": JSONObject, + "JSONPath": JSONPath, + "KlarnaInfo": KlarnaInfo, + "Links": Links, + "LinksElement": LinksElement, + "ListCompanyApiCredentialsResponse": ListCompanyApiCredentialsResponse, + "ListCompanyResponse": ListCompanyResponse, + "ListCompanyUsersResponse": ListCompanyUsersResponse, + "ListExternalTerminalActionsResponse": ListExternalTerminalActionsResponse, + "ListMerchantApiCredentialsResponse": ListMerchantApiCredentialsResponse, + "ListMerchantResponse": ListMerchantResponse, + "ListMerchantUsersResponse": ListMerchantUsersResponse, + "ListStoresResponse": ListStoresResponse, + "ListTerminalsResponse": ListTerminalsResponse, + "ListWebhooksResponse": ListWebhooksResponse, + "Logo": Logo, + "MeApiCredential": MeApiCredential, + "Merchant": Merchant, + "MerchantLinks": MerchantLinks, + "ModelFile": ModelFile, + "Name": Name, + "Name2": Name2, + "Nexo": Nexo, + "Opi": Opi, + "OrderItem": OrderItem, + "PaginationLinks": PaginationLinks, + "PayPalInfo": PayPalInfo, + "PaymentMethod": PaymentMethod, + "PaymentMethodResponse": PaymentMethodResponse, + "PaymentMethodSetupInfo": PaymentMethodSetupInfo, + "Profile": Profile, + "ReceiptOptions": ReceiptOptions, + "ReceiptPrinting": ReceiptPrinting, + "RestServiceError": RestServiceError, + "ScheduleTerminalActionsRequest": ScheduleTerminalActionsRequest, + "ScheduleTerminalActionsResponse": ScheduleTerminalActionsResponse, + "Settings": Settings, + "ShippingLocation": ShippingLocation, + "ShippingLocationsResponse": ShippingLocationsResponse, + "Signature": Signature, + "SofortInfo": SofortInfo, + "Store": Store, + "StoreCreationRequest": StoreCreationRequest, + "StoreCreationWithMerchantCodeRequest": StoreCreationWithMerchantCodeRequest, + "StoreSplitConfiguration": StoreSplitConfiguration, + "Surcharge": Surcharge, + "SwishInfo": SwishInfo, + "Terminal": Terminal, + "TerminalModelsResponse": TerminalModelsResponse, + "TerminalOrder": TerminalOrder, + "TerminalOrderRequest": TerminalOrderRequest, + "TerminalOrdersResponse": TerminalOrdersResponse, + "TerminalProduct": TerminalProduct, + "TerminalProductsResponse": TerminalProductsResponse, + "TerminalSettings": TerminalSettings, + "TestCompanyWebhookRequest": TestCompanyWebhookRequest, + "TestOutput": TestOutput, + "TestWebhookRequest": TestWebhookRequest, + "TestWebhookResponse": TestWebhookResponse, + "Timeouts": Timeouts, + "UninstallAndroidAppDetails": UninstallAndroidAppDetails, + "UninstallAndroidCertificateDetails": UninstallAndroidCertificateDetails, + "UpdatableAddress": UpdatableAddress, + "UpdateCompanyApiCredentialRequest": UpdateCompanyApiCredentialRequest, + "UpdateCompanyUserRequest": UpdateCompanyUserRequest, + "UpdateCompanyWebhookRequest": UpdateCompanyWebhookRequest, + "UpdateMerchantApiCredentialRequest": UpdateMerchantApiCredentialRequest, + "UpdateMerchantUserRequest": UpdateMerchantUserRequest, + "UpdateMerchantWebhookRequest": UpdateMerchantWebhookRequest, + "UpdatePaymentMethodInfo": UpdatePaymentMethodInfo, + "UpdateStoreRequest": UpdateStoreRequest, + "Url": Url, + "User": User, + "Webhook": Webhook, + "WebhookLinks": WebhookLinks, + "WifiProfiles": WifiProfiles, +} + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap[expectedType]) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string) { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.serialize(datum, subType)); + } + return transformedData; + } else if (type === "Date") { + return data.toISOString(); + } else if (type === "SaleToAcquirerData") { + const dataString = JSON.stringify(data); + return Buffer.from(dataString).toString("base64"); + } else { + if (enumsMap[type]) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); + } + return instance; + } + } + + public static deserialize(data: any, type: string) { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.deserialize(datum, subType)); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap[type]) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); + } + return instance; + } + } +} diff --git a/src/typings/management/name.ts b/src/typings/management/name.ts new file mode 100644 index 0000000..58ce525 --- /dev/null +++ b/src/typings/management/name.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Name { + /** + * The first name. + */ + 'firstName': string; + /** + * The last name. + */ + 'lastName': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "firstName", + "baseName": "firstName", + "type": "string" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Name.attributeTypeMap; + } +} + diff --git a/src/typings/management/name2.ts b/src/typings/management/name2.ts new file mode 100644 index 0000000..dba6bc4 --- /dev/null +++ b/src/typings/management/name2.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Name2 { + /** + * The first name. + */ + 'firstName'?: string; + /** + * The last name. + */ + 'lastName'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "firstName", + "baseName": "firstName", + "type": "string" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Name2.attributeTypeMap; + } +} + diff --git a/src/typings/management/nexo.ts b/src/typings/management/nexo.ts new file mode 100644 index 0000000..53b406e --- /dev/null +++ b/src/typings/management/nexo.ts @@ -0,0 +1,37 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { EventUrl } from './eventUrl'; + +export class Nexo { + 'eventUrls'?: EventUrl; + /** + * @deprecated One or more URLs to send event messages to when using Terminal API. + */ + 'nexoEventUrls'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "eventUrls", + "baseName": "eventUrls", + "type": "EventUrl" + }, + { + "name": "nexoEventUrls", + "baseName": "nexoEventUrls", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return Nexo.attributeTypeMap; + } +} + diff --git a/src/typings/management/opi.ts b/src/typings/management/opi.ts new file mode 100644 index 0000000..4590312 --- /dev/null +++ b/src/typings/management/opi.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Opi { + /** + * Indicates if Pay at Table is enabled. + */ + 'enablePayAtTable'?: boolean; + /** + * The store number to use for Pay at Table. + */ + 'payAtTableStoreNumber'?: string; + /** + * The URL and port number used for Pay at Table communication. + */ + 'payAtTableURL'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enablePayAtTable", + "baseName": "enablePayAtTable", + "type": "boolean" + }, + { + "name": "payAtTableStoreNumber", + "baseName": "payAtTableStoreNumber", + "type": "string" + }, + { + "name": "payAtTableURL", + "baseName": "payAtTableURL", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Opi.attributeTypeMap; + } +} + diff --git a/src/typings/management/orderItem.ts b/src/typings/management/orderItem.ts new file mode 100644 index 0000000..12264f9 --- /dev/null +++ b/src/typings/management/orderItem.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class OrderItem { + /** + * The unique identifier of the product. + */ + 'id'?: string; + /** + * The name of the product. + */ + 'name'?: string; + /** + * The number of items with the specified product `id` included in the order. + */ + 'quantity'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "quantity", + "baseName": "quantity", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return OrderItem.attributeTypeMap; + } +} + diff --git a/src/typings/management/paginationLinks.ts b/src/typings/management/paginationLinks.ts new file mode 100644 index 0000000..b2bc641 --- /dev/null +++ b/src/typings/management/paginationLinks.ts @@ -0,0 +1,52 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { LinksElement } from './linksElement'; + +export class PaginationLinks { + 'first': LinksElement; + 'last': LinksElement; + 'next'?: LinksElement; + 'prev'?: LinksElement; + 'self': LinksElement; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "first", + "baseName": "first", + "type": "LinksElement" + }, + { + "name": "last", + "baseName": "last", + "type": "LinksElement" + }, + { + "name": "next", + "baseName": "next", + "type": "LinksElement" + }, + { + "name": "prev", + "baseName": "prev", + "type": "LinksElement" + }, + { + "name": "self", + "baseName": "self", + "type": "LinksElement" + } ]; + + static getAttributeTypeMap() { + return PaginationLinks.attributeTypeMap; + } +} + diff --git a/src/typings/management/payPalInfo.ts b/src/typings/management/payPalInfo.ts new file mode 100644 index 0000000..8c335d0 --- /dev/null +++ b/src/typings/management/payPalInfo.ts @@ -0,0 +1,57 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class PayPalInfo { + /** + * Indicates if direct (immediate) capture for PayPal is enabled. If set to **true**, this setting overrides the [capture](https://docs.adyen.com/online-payments/capture) settings of your merchant account. Default value: **true**. + */ + 'directCapture'?: boolean; + /** + * Must be set to **true** to confirm that the settlement to your bank account is performed directly by PayPal. Default value: **null**. + */ + 'directSettlement': boolean; + /** + * PayPal Merchant ID. Character length and limitations: 13 single-byte alphanumeric characters. + */ + 'payerId': string; + /** + * Your business email address. + */ + 'subject': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "directCapture", + "baseName": "directCapture", + "type": "boolean" + }, + { + "name": "directSettlement", + "baseName": "directSettlement", + "type": "boolean" + }, + { + "name": "payerId", + "baseName": "payerId", + "type": "string" + }, + { + "name": "subject", + "baseName": "subject", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PayPalInfo.attributeTypeMap; + } +} + diff --git a/src/typings/management/paymentMethod.ts b/src/typings/management/paymentMethod.ts new file mode 100644 index 0000000..a7b5ab0 --- /dev/null +++ b/src/typings/management/paymentMethod.ts @@ -0,0 +1,133 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ApplePayInfo } from './applePayInfo'; +import { BcmcInfo } from './bcmcInfo'; +import { GiroPayInfo } from './giroPayInfo'; +import { KlarnaInfo } from './klarnaInfo'; +import { PayPalInfo } from './payPalInfo'; +import { SofortInfo } from './sofortInfo'; +import { SwishInfo } from './swishInfo'; + +export class PaymentMethod { + 'applePay'?: ApplePayInfo; + 'bcmc'?: BcmcInfo; + /** + * The unique identifier of the business line. + */ + 'businessLineId'?: string; + /** + * The list of countries where a payment method is available. By default, all countries supported by the payment method. + */ + 'countries'?: Array; + /** + * The list of currencies that a payment method supports. By default, all currencies supported by the payment method. + */ + 'currencies'?: Array; + /** + * Indicates whether the payment method is enabled (**true**) or disabled (**false**). + */ + 'enabled'?: boolean; + 'giroPay'?: GiroPayInfo; + /** + * The identifier of the resource. + */ + 'id': string; + 'klarna'?: KlarnaInfo; + 'paypal'?: PayPalInfo; + 'sofort'?: SofortInfo; + /** + * The ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/stores__resParam_id), if any. + */ + 'storeId'?: string; + 'swish'?: SwishInfo; + /** + * Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + */ + 'type'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "applePay", + "baseName": "applePay", + "type": "ApplePayInfo" + }, + { + "name": "bcmc", + "baseName": "bcmc", + "type": "BcmcInfo" + }, + { + "name": "businessLineId", + "baseName": "businessLineId", + "type": "string" + }, + { + "name": "countries", + "baseName": "countries", + "type": "Array" + }, + { + "name": "currencies", + "baseName": "currencies", + "type": "Array" + }, + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean" + }, + { + "name": "giroPay", + "baseName": "giroPay", + "type": "GiroPayInfo" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "klarna", + "baseName": "klarna", + "type": "KlarnaInfo" + }, + { + "name": "paypal", + "baseName": "paypal", + "type": "PayPalInfo" + }, + { + "name": "sofort", + "baseName": "sofort", + "type": "SofortInfo" + }, + { + "name": "storeId", + "baseName": "storeId", + "type": "string" + }, + { + "name": "swish", + "baseName": "swish", + "type": "SwishInfo" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentMethod.attributeTypeMap; + } +} + diff --git a/src/typings/management/paymentMethodResponse.ts b/src/typings/management/paymentMethodResponse.ts new file mode 100644 index 0000000..1e747a0 --- /dev/null +++ b/src/typings/management/paymentMethodResponse.ts @@ -0,0 +1,56 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { PaginationLinks } from './paginationLinks'; +import { PaymentMethod } from './paymentMethod'; + +export class PaymentMethodResponse { + 'links'?: PaginationLinks; + /** + * Payment methods details. + */ + 'data'?: Array; + /** + * Total number of items. + */ + 'itemsTotal': number; + /** + * Total number of pages. + */ + 'pagesTotal': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "PaginationLinks" + }, + { + "name": "data", + "baseName": "data", + "type": "Array" + }, + { + "name": "itemsTotal", + "baseName": "itemsTotal", + "type": "number" + }, + { + "name": "pagesTotal", + "baseName": "pagesTotal", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return PaymentMethodResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/paymentMethodSetupInfo.ts b/src/typings/management/paymentMethodSetupInfo.ts new file mode 100644 index 0000000..1cc0c4f --- /dev/null +++ b/src/typings/management/paymentMethodSetupInfo.ts @@ -0,0 +1,145 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ApplePayInfo } from './applePayInfo'; +import { BcmcInfo } from './bcmcInfo'; +import { GiroPayInfo } from './giroPayInfo'; +import { KlarnaInfo } from './klarnaInfo'; +import { PayPalInfo } from './payPalInfo'; +import { SofortInfo } from './sofortInfo'; +import { SwishInfo } from './swishInfo'; + +export class PaymentMethodSetupInfo { + 'applePay'?: ApplePayInfo; + 'bcmc'?: BcmcInfo; + /** + * The unique identifier of the business line. + */ + 'businessLineId'?: string; + /** + * The list of countries where a payment method is available. By default, all countries supported by the payment method. + */ + 'countries'?: Array; + /** + * The list of currencies that a payment method supports. By default, all currencies supported by the payment method. + */ + 'currencies'?: Array; + 'giroPay'?: GiroPayInfo; + 'klarna'?: KlarnaInfo; + 'paypal'?: PayPalInfo; + 'sofort'?: SofortInfo; + /** + * The ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/stores__resParam_id), if any. + */ + 'storeId'?: string; + 'swish'?: SwishInfo; + /** + * Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + */ + 'type': PaymentMethodSetupInfo.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "applePay", + "baseName": "applePay", + "type": "ApplePayInfo" + }, + { + "name": "bcmc", + "baseName": "bcmc", + "type": "BcmcInfo" + }, + { + "name": "businessLineId", + "baseName": "businessLineId", + "type": "string" + }, + { + "name": "countries", + "baseName": "countries", + "type": "Array" + }, + { + "name": "currencies", + "baseName": "currencies", + "type": "Array" + }, + { + "name": "giroPay", + "baseName": "giroPay", + "type": "GiroPayInfo" + }, + { + "name": "klarna", + "baseName": "klarna", + "type": "KlarnaInfo" + }, + { + "name": "paypal", + "baseName": "paypal", + "type": "PayPalInfo" + }, + { + "name": "sofort", + "baseName": "sofort", + "type": "SofortInfo" + }, + { + "name": "storeId", + "baseName": "storeId", + "type": "string" + }, + { + "name": "swish", + "baseName": "swish", + "type": "SwishInfo" + }, + { + "name": "type", + "baseName": "type", + "type": "PaymentMethodSetupInfo.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return PaymentMethodSetupInfo.attributeTypeMap; + } +} + +export namespace PaymentMethodSetupInfo { + export enum TypeEnum { + Alipay = 'alipay', + Amex = 'amex', + Applepay = 'applepay', + Bcmc = 'bcmc', + Blik = 'blik', + Cartebancaire = 'cartebancaire', + Cup = 'cup', + Diners = 'diners', + DirectEbanking = 'directEbanking', + Discover = 'discover', + EftposAustralia = 'eftpos_australia', + Girocard = 'girocard', + Giropay = 'giropay', + Ideal = 'ideal', + InteracCard = 'interac_card', + Jcb = 'jcb', + Klarna = 'klarna', + KlarnaAccount = 'klarna_account', + KlarnaPaynow = 'klarna_paynow', + Maestro = 'maestro', + Mc = 'mc', + Mobilepay = 'mobilepay', + Paypal = 'paypal', + Swish = 'swish', + Visa = 'visa', + WechatpayPos = 'wechatpay_pos' + } +} diff --git a/src/typings/management/profile.ts b/src/typings/management/profile.ts new file mode 100644 index 0000000..a7028bd --- /dev/null +++ b/src/typings/management/profile.ts @@ -0,0 +1,171 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Profile { + /** + * The type of Wi-Fi network. Possible values: **wpa-psk**, **wpa2-psk**, **wpa-eap**, **wpa2-eap**. + */ + 'authType': string; + /** + * Indicates whether to automatically select the best authentication method available. Does not work on older terminal models. + */ + 'autoWifi'?: boolean; + /** + * Use **infra** for infrastructure-based networks. This applies to most networks. Use **adhoc** only if the communication is p2p-based between base stations. + */ + 'bssType': string; + /** + * The channel number of the Wi-Fi network. The recommended setting is **0** for automatic channel selection. + */ + 'channel'?: number; + /** + * Indicates whether this is your preferred wireless network. If **true**, the terminal will try connecting to this network first. + */ + 'defaultProfile'?: boolean; + /** + * For `authType` **wpa-eap** or **wpa2-eap**. Possible values: **tls**, **peap**, **leap**, **fast** + */ + 'eap'?: string; + 'eapCaCert'?: any; + 'eapClientCert'?: any; + 'eapClientKey'?: any; + /** + * For `eap` **tls**. The password of the RSA key file, if that file is password-protected. + */ + 'eapClientPwd'?: string; + /** + * For `authType` **wpa-eap** or **wpa2-eap**. The EAP-PEAP username from your MS-CHAP account. Must match the configuration of your RADIUS server. + */ + 'eapIdentity'?: string; + 'eapIntermediateCert'?: any; + /** + * For `eap` **peap**. The EAP-PEAP password from your MS-CHAP account. Must match the configuration of your RADIUS server. + */ + 'eapPwd'?: string; + /** + * Indicates if a network does not broadcast its SSID, so an SSID-specific probe request must be used for scans. + */ + 'hiddenSsid'?: boolean; + /** + * Your name for the Wi-Fi profile. + */ + 'name'?: string; + /** + * For `authType` **wpa-psk or **wpa2-psk**. The password to the wireless network. + */ + 'psk'?: string; + /** + * The name of the wireless network. + */ + 'ssid': string; + /** + * The type of encryption. Possible values: **auto**, **ccmp** (recommended), **tkip** + */ + 'wsec': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "authType", + "baseName": "authType", + "type": "string" + }, + { + "name": "autoWifi", + "baseName": "autoWifi", + "type": "boolean" + }, + { + "name": "bssType", + "baseName": "bssType", + "type": "string" + }, + { + "name": "channel", + "baseName": "channel", + "type": "number" + }, + { + "name": "defaultProfile", + "baseName": "defaultProfile", + "type": "boolean" + }, + { + "name": "eap", + "baseName": "eap", + "type": "string" + }, + { + "name": "eapCaCert", + "baseName": "eapCaCert", + "type": "any" + }, + { + "name": "eapClientCert", + "baseName": "eapClientCert", + "type": "any" + }, + { + "name": "eapClientKey", + "baseName": "eapClientKey", + "type": "any" + }, + { + "name": "eapClientPwd", + "baseName": "eapClientPwd", + "type": "string" + }, + { + "name": "eapIdentity", + "baseName": "eapIdentity", + "type": "string" + }, + { + "name": "eapIntermediateCert", + "baseName": "eapIntermediateCert", + "type": "any" + }, + { + "name": "eapPwd", + "baseName": "eapPwd", + "type": "string" + }, + { + "name": "hiddenSsid", + "baseName": "hiddenSsid", + "type": "boolean" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "psk", + "baseName": "psk", + "type": "string" + }, + { + "name": "ssid", + "baseName": "ssid", + "type": "string" + }, + { + "name": "wsec", + "baseName": "wsec", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Profile.attributeTypeMap; + } +} + diff --git a/src/typings/management/receiptOptions.ts b/src/typings/management/receiptOptions.ts new file mode 100644 index 0000000..8b3cad7 --- /dev/null +++ b/src/typings/management/receiptOptions.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class ReceiptOptions { + /** + * The receipt logo converted to a Base64-encoded string. The image must be a .bmp file of < 256 KB, dimensions 240 (H) x 384 (W) px. + */ + 'logo'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "logo", + "baseName": "logo", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ReceiptOptions.attributeTypeMap; + } +} + diff --git a/src/typings/management/receiptPrinting.ts b/src/typings/management/receiptPrinting.ts new file mode 100644 index 0000000..3fab520 --- /dev/null +++ b/src/typings/management/receiptPrinting.ts @@ -0,0 +1,165 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class ReceiptPrinting { + /** + * Print a merchant receipt when the payment is approved. + */ + 'merchantApproved'?: boolean; + /** + * Print a merchant receipt when the transaction is cancelled. + */ + 'merchantCancelled'?: boolean; + /** + * Print a merchant receipt when capturing the payment is approved. + */ + 'merchantCaptureApproved'?: boolean; + /** + * Print a merchant receipt when capturing the payment is refused. + */ + 'merchantCaptureRefused'?: boolean; + /** + * Print a merchant receipt when the refund is approved. + */ + 'merchantRefundApproved'?: boolean; + /** + * Print a merchant receipt when the refund is refused. + */ + 'merchantRefundRefused'?: boolean; + /** + * Print a merchant receipt when the payment is refused. + */ + 'merchantRefused'?: boolean; + /** + * Print a merchant receipt when a previous transaction is voided. + */ + 'merchantVoid'?: boolean; + /** + * Print a shopper receipt when the payment is approved. + */ + 'shopperApproved'?: boolean; + /** + * Print a shopper receipt when the transaction is cancelled. + */ + 'shopperCancelled'?: boolean; + /** + * Print a shopper receipt when capturing the payment is approved. + */ + 'shopperCaptureApproved'?: boolean; + /** + * Print a shopper receipt when capturing the payment is refused. + */ + 'shopperCaptureRefused'?: boolean; + /** + * Print a shopper receipt when the refund is approved. + */ + 'shopperRefundApproved'?: boolean; + /** + * Print a shopper receipt when the refund is refused. + */ + 'shopperRefundRefused'?: boolean; + /** + * Print a shopper receipt when the payment is refused. + */ + 'shopperRefused'?: boolean; + /** + * Print a shopper receipt when a previous transaction is voided. + */ + 'shopperVoid'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "merchantApproved", + "baseName": "merchantApproved", + "type": "boolean" + }, + { + "name": "merchantCancelled", + "baseName": "merchantCancelled", + "type": "boolean" + }, + { + "name": "merchantCaptureApproved", + "baseName": "merchantCaptureApproved", + "type": "boolean" + }, + { + "name": "merchantCaptureRefused", + "baseName": "merchantCaptureRefused", + "type": "boolean" + }, + { + "name": "merchantRefundApproved", + "baseName": "merchantRefundApproved", + "type": "boolean" + }, + { + "name": "merchantRefundRefused", + "baseName": "merchantRefundRefused", + "type": "boolean" + }, + { + "name": "merchantRefused", + "baseName": "merchantRefused", + "type": "boolean" + }, + { + "name": "merchantVoid", + "baseName": "merchantVoid", + "type": "boolean" + }, + { + "name": "shopperApproved", + "baseName": "shopperApproved", + "type": "boolean" + }, + { + "name": "shopperCancelled", + "baseName": "shopperCancelled", + "type": "boolean" + }, + { + "name": "shopperCaptureApproved", + "baseName": "shopperCaptureApproved", + "type": "boolean" + }, + { + "name": "shopperCaptureRefused", + "baseName": "shopperCaptureRefused", + "type": "boolean" + }, + { + "name": "shopperRefundApproved", + "baseName": "shopperRefundApproved", + "type": "boolean" + }, + { + "name": "shopperRefundRefused", + "baseName": "shopperRefundRefused", + "type": "boolean" + }, + { + "name": "shopperRefused", + "baseName": "shopperRefused", + "type": "boolean" + }, + { + "name": "shopperVoid", + "baseName": "shopperVoid", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return ReceiptPrinting.attributeTypeMap; + } +} + diff --git a/src/typings/management/restServiceError.ts b/src/typings/management/restServiceError.ts new file mode 100644 index 0000000..d49c022 --- /dev/null +++ b/src/typings/management/restServiceError.ts @@ -0,0 +1,101 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { InvalidField } from './invalidField'; +import { JSONObject } from './jSONObject'; + +export class RestServiceError { + /** + * A human-readable explanation specific to this occurrence of the problem. + */ + 'detail': string; + /** + * A code that identifies the problem type. + */ + 'errorCode': string; + /** + * A URI that identifies the problem type, pointing to human-readable documentation on this problem type. + */ + 'errorType': string; + /** + * A unique URI that identifies the specific occurrence of the problem. + */ + 'instance'?: string; + /** + * Detailed explanation of each validation error, when applicable. + */ + 'invalidFields'?: Array; + /** + * A unique reference for the request, essentially the same as `pspReference`. + */ + 'requestId'?: string; + 'response'?: JSONObject; + /** + * The HTTP status code. + */ + 'status': number; + /** + * A short, human-readable summary of the problem type. + */ + 'title': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "detail", + "baseName": "detail", + "type": "string" + }, + { + "name": "errorCode", + "baseName": "errorCode", + "type": "string" + }, + { + "name": "errorType", + "baseName": "errorType", + "type": "string" + }, + { + "name": "instance", + "baseName": "instance", + "type": "string" + }, + { + "name": "invalidFields", + "baseName": "invalidFields", + "type": "Array" + }, + { + "name": "requestId", + "baseName": "requestId", + "type": "string" + }, + { + "name": "response", + "baseName": "response", + "type": "JSONObject" + }, + { + "name": "status", + "baseName": "status", + "type": "number" + }, + { + "name": "title", + "baseName": "title", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return RestServiceError.attributeTypeMap; + } +} + diff --git a/src/typings/management/scheduleTerminalActionsRequest.ts b/src/typings/management/scheduleTerminalActionsRequest.ts new file mode 100644 index 0000000..fcd077e --- /dev/null +++ b/src/typings/management/scheduleTerminalActionsRequest.ts @@ -0,0 +1,61 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { InstallAndroidAppDetails } from './installAndroidAppDetails'; +import { InstallAndroidCertificateDetails } from './installAndroidCertificateDetails'; +import { UninstallAndroidAppDetails } from './uninstallAndroidAppDetails'; +import { UninstallAndroidCertificateDetails } from './uninstallAndroidCertificateDetails'; + +export class ScheduleTerminalActionsRequest { + /** + * Information about the action to take. + */ + 'actionDetails'?: InstallAndroidAppDetails | InstallAndroidCertificateDetails | UninstallAndroidAppDetails | UninstallAndroidCertificateDetails; + /** + * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. + */ + 'scheduledAt'?: string; + /** + * The unique ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores). If present, all terminals in the `terminalIds` list must be assigned to this store. + */ + 'storeId'?: string; + /** + * A list of unique IDs of the terminals to apply the action to. You can extract the IDs from the [GET `/terminals`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/terminals) response. Maximum length: 100 IDs. + */ + 'terminalIds'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "actionDetails", + "baseName": "actionDetails", + "type": "InstallAndroidAppDetails | InstallAndroidCertificateDetails | UninstallAndroidAppDetails | UninstallAndroidCertificateDetails" + }, + { + "name": "scheduledAt", + "baseName": "scheduledAt", + "type": "string" + }, + { + "name": "storeId", + "baseName": "storeId", + "type": "string" + }, + { + "name": "terminalIds", + "baseName": "terminalIds", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ScheduleTerminalActionsRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/scheduleTerminalActionsResponse.ts b/src/typings/management/scheduleTerminalActionsResponse.ts new file mode 100644 index 0000000..be173d4 --- /dev/null +++ b/src/typings/management/scheduleTerminalActionsResponse.ts @@ -0,0 +1,88 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { InstallAndroidAppDetails } from './installAndroidAppDetails'; +import { InstallAndroidCertificateDetails } from './installAndroidCertificateDetails'; +import { UninstallAndroidAppDetails } from './uninstallAndroidAppDetails'; +import { UninstallAndroidCertificateDetails } from './uninstallAndroidCertificateDetails'; + +export class ScheduleTerminalActionsResponse { + /** + * Information about the action to take. + */ + 'actionDetails'?: InstallAndroidAppDetails | InstallAndroidCertificateDetails | UninstallAndroidAppDetails | UninstallAndroidCertificateDetails; + /** + * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+01:00** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. + */ + 'scheduledAt'?: string; + /** + * The unique ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores). If present, all terminals in the `terminalIds` list must be assigned to this store. + */ + 'storeId'?: string; + /** + * A list of unique IDs of the terminals to apply the action to. You can extract the IDs from the [GET `/terminals`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/terminals) response. Maximum length: 100 IDs. + */ + 'terminalIds'?: Array; + /** + * The validation errors that occurred in the list of terminals, and for each error the IDs of the terminals that the error applies to. + */ + 'terminalsWithErrors'?: { [key: string]: Array; }; + /** + * The number of terminals for which scheduling the action failed. + */ + 'totalErrors'?: number; + /** + * The number of terminals for which the action was successfully scheduled. This doesn\'t mean the action has happened yet. + */ + 'totalScheduled'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "actionDetails", + "baseName": "actionDetails", + "type": "InstallAndroidAppDetails | InstallAndroidCertificateDetails | UninstallAndroidAppDetails | UninstallAndroidCertificateDetails" + }, + { + "name": "scheduledAt", + "baseName": "scheduledAt", + "type": "string" + }, + { + "name": "storeId", + "baseName": "storeId", + "type": "string" + }, + { + "name": "terminalIds", + "baseName": "terminalIds", + "type": "Array" + }, + { + "name": "terminalsWithErrors", + "baseName": "terminalsWithErrors", + "type": "{ [key: string]: Array; }" + }, + { + "name": "totalErrors", + "baseName": "totalErrors", + "type": "number" + }, + { + "name": "totalScheduled", + "baseName": "totalScheduled", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ScheduleTerminalActionsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/settings.ts b/src/typings/management/settings.ts new file mode 100644 index 0000000..3248b34 --- /dev/null +++ b/src/typings/management/settings.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Settings { + /** + * The preferred Wi-Fi Band, for use if the terminals support multiple bands. Possible values: All, 2.4GHz, 5GHz. + */ + 'band'?: string; + /** + * Indicates whether roaming is enabled on the terminals. + */ + 'roaming'?: boolean; + /** + * The connection time-out in seconds. Minimum value: 0 + */ + 'timeout'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "band", + "baseName": "band", + "type": "string" + }, + { + "name": "roaming", + "baseName": "roaming", + "type": "boolean" + }, + { + "name": "timeout", + "baseName": "timeout", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Settings.attributeTypeMap; + } +} + diff --git a/src/typings/management/shippingLocation.ts b/src/typings/management/shippingLocation.ts new file mode 100644 index 0000000..e496f61 --- /dev/null +++ b/src/typings/management/shippingLocation.ts @@ -0,0 +1,53 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Address } from './address'; +import { Contact } from './contact'; + +export class ShippingLocation { + 'address'?: Address; + 'contact'?: Contact; + /** + * The unique identifier of the shipping location, for use as `shippingLocationId` when creating an order. + */ + 'id'?: string; + /** + * The unique name of the shipping location. + */ + 'name'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "address", + "baseName": "address", + "type": "Address" + }, + { + "name": "contact", + "baseName": "contact", + "type": "Contact" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ShippingLocation.attributeTypeMap; + } +} + diff --git a/src/typings/management/shippingLocationsResponse.ts b/src/typings/management/shippingLocationsResponse.ts new file mode 100644 index 0000000..c7004d9 --- /dev/null +++ b/src/typings/management/shippingLocationsResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ShippingLocation } from './shippingLocation'; + +export class ShippingLocationsResponse { + /** + * Physical locations where orders can be shipped to. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ShippingLocationsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/signature.ts b/src/typings/management/signature.ts new file mode 100644 index 0000000..06fd335 --- /dev/null +++ b/src/typings/management/signature.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Signature { + /** + * If `skipSignature` is false, indicates whether the shopper should provide a signature on the display (**true**) or on the merchant receipt (**false**). + */ + 'askSignatureOnScreen'?: boolean; + /** + * Name that identifies the terminal. + */ + 'deviceName'?: string; + /** + * Skip asking for a signature. This is possible because all global card schemes (American Express, Diners, Discover, JCB, MasterCard, VISA, and UnionPay) regard a signature as optional. + */ + 'skipSignature'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "askSignatureOnScreen", + "baseName": "askSignatureOnScreen", + "type": "boolean" + }, + { + "name": "deviceName", + "baseName": "deviceName", + "type": "string" + }, + { + "name": "skipSignature", + "baseName": "skipSignature", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return Signature.attributeTypeMap; + } +} + diff --git a/src/typings/management/sofortInfo.ts b/src/typings/management/sofortInfo.ts new file mode 100644 index 0000000..46b9f93 --- /dev/null +++ b/src/typings/management/sofortInfo.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class SofortInfo { + /** + * Sofort currency code. For example, **EUR**. + */ + 'currencyCode': string; + /** + * Sofort logo. Format: Base64-encoded string. + */ + 'logo': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "currencyCode", + "baseName": "currencyCode", + "type": "string" + }, + { + "name": "logo", + "baseName": "logo", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SofortInfo.attributeTypeMap; + } +} + diff --git a/src/typings/management/store.ts b/src/typings/management/store.ts new file mode 100644 index 0000000..b9bf3a5 --- /dev/null +++ b/src/typings/management/store.ts @@ -0,0 +1,130 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Address2 } from './address2'; +import { Links } from './links'; +import { StoreSplitConfiguration } from './storeSplitConfiguration'; + +export class Store { + 'links'?: Links; + 'address'?: Address2; + /** + * The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. + */ + 'businessLineIds'?: Array; + /** + * The description of the store. + */ + 'description'?: string; + /** + * When using the Zip payment method: The location ID that Zip has assigned to your store. + */ + 'externalReferenceId'?: string; + /** + * The unique identifier of the store. This value is generated by Adyen. + */ + 'id'?: string; + /** + * The unique identifier of the merchant account that the store belongs to. + */ + 'merchantId'?: string; + /** + * The phone number of the store, including \'+\' and country code. + */ + 'phoneNumber'?: string; + /** + * A reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_) + */ + 'reference'?: string; + /** + * The store name shown on the shopper\'s bank or credit card statement and on the shopper receipt. + */ + 'shopperStatement'?: string; + 'splitConfiguration'?: StoreSplitConfiguration; + /** + * The status of the store. Possible values are: - **active**. This value is assigned automatically when a store is created. - **inactive**. The terminals under the store are blocked from accepting new transactions, but capturing outstanding transactions is still possible. - **closed**. This status is irreversible. The terminals under the store are reassigned to the merchant inventory. + */ + 'status'?: Store.StatusEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "Links" + }, + { + "name": "address", + "baseName": "address", + "type": "Address2" + }, + { + "name": "businessLineIds", + "baseName": "businessLineIds", + "type": "Array" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "externalReferenceId", + "baseName": "externalReferenceId", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "merchantId", + "baseName": "merchantId", + "type": "string" + }, + { + "name": "phoneNumber", + "baseName": "phoneNumber", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "shopperStatement", + "baseName": "shopperStatement", + "type": "string" + }, + { + "name": "splitConfiguration", + "baseName": "splitConfiguration", + "type": "StoreSplitConfiguration" + }, + { + "name": "status", + "baseName": "status", + "type": "Store.StatusEnum" + } ]; + + static getAttributeTypeMap() { + return Store.attributeTypeMap; + } +} + +export namespace Store { + export enum StatusEnum { + Active = 'active', + Closed = 'closed', + Inactive = 'inactive' + } +} diff --git a/src/typings/management/storeCreationRequest.ts b/src/typings/management/storeCreationRequest.ts new file mode 100644 index 0000000..6589595 --- /dev/null +++ b/src/typings/management/storeCreationRequest.ts @@ -0,0 +1,89 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Address2 } from './address2'; +import { StoreSplitConfiguration } from './storeSplitConfiguration'; + +export class StoreCreationRequest { + 'address': Address2; + /** + * The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. + */ + 'businessLineIds'?: Array; + /** + * Your description of the store. + */ + 'description': string; + /** + * When using the Zip payment method: The location ID that Zip has assigned to your store. + */ + 'externalReferenceId'?: string; + /** + * The phone number of the store, including \'+\' and country code. + */ + 'phoneNumber': string; + /** + * Your reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). + */ + 'reference'?: string; + /** + * The store name to be shown on the shopper\'s bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can\'t be all numbers. + */ + 'shopperStatement': string; + 'splitConfiguration'?: StoreSplitConfiguration; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "address", + "baseName": "address", + "type": "Address2" + }, + { + "name": "businessLineIds", + "baseName": "businessLineIds", + "type": "Array" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "externalReferenceId", + "baseName": "externalReferenceId", + "type": "string" + }, + { + "name": "phoneNumber", + "baseName": "phoneNumber", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "shopperStatement", + "baseName": "shopperStatement", + "type": "string" + }, + { + "name": "splitConfiguration", + "baseName": "splitConfiguration", + "type": "StoreSplitConfiguration" + } ]; + + static getAttributeTypeMap() { + return StoreCreationRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/storeCreationWithMerchantCodeRequest.ts b/src/typings/management/storeCreationWithMerchantCodeRequest.ts new file mode 100644 index 0000000..02e576a --- /dev/null +++ b/src/typings/management/storeCreationWithMerchantCodeRequest.ts @@ -0,0 +1,98 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Address2 } from './address2'; +import { StoreSplitConfiguration } from './storeSplitConfiguration'; + +export class StoreCreationWithMerchantCodeRequest { + 'address': Address2; + /** + * The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. + */ + 'businessLineIds'?: Array; + /** + * Your description of the store. + */ + 'description': string; + /** + * When using the Zip payment method: The location ID that Zip has assigned to your store. + */ + 'externalReferenceId'?: string; + /** + * The unique identifier of the merchant account that the store belongs to. + */ + 'merchantId': string; + /** + * The phone number of the store, including \'+\' and country code. + */ + 'phoneNumber': string; + /** + * Your reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). + */ + 'reference'?: string; + /** + * The store name to be shown on the shopper\'s bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can\'t be all numbers. + */ + 'shopperStatement': string; + 'splitConfiguration'?: StoreSplitConfiguration; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "address", + "baseName": "address", + "type": "Address2" + }, + { + "name": "businessLineIds", + "baseName": "businessLineIds", + "type": "Array" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "externalReferenceId", + "baseName": "externalReferenceId", + "type": "string" + }, + { + "name": "merchantId", + "baseName": "merchantId", + "type": "string" + }, + { + "name": "phoneNumber", + "baseName": "phoneNumber", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "shopperStatement", + "baseName": "shopperStatement", + "type": "string" + }, + { + "name": "splitConfiguration", + "baseName": "splitConfiguration", + "type": "StoreSplitConfiguration" + } ]; + + static getAttributeTypeMap() { + return StoreCreationWithMerchantCodeRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/storeSplitConfiguration.ts b/src/typings/management/storeSplitConfiguration.ts new file mode 100644 index 0000000..016c8b3 --- /dev/null +++ b/src/typings/management/storeSplitConfiguration.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class StoreSplitConfiguration { + /** + * The [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id) linked to the account holder. + */ + 'balanceAccountId'?: string; + /** + * The UUID of the [split configuration](https://docs.adyen.com/platforms/split-configuration-for-stores) from the Customer Area. + */ + 'splitConfigurationId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceAccountId", + "baseName": "balanceAccountId", + "type": "string" + }, + { + "name": "splitConfigurationId", + "baseName": "splitConfigurationId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return StoreSplitConfiguration.attributeTypeMap; + } +} + diff --git a/src/typings/management/surcharge.ts b/src/typings/management/surcharge.ts new file mode 100644 index 0000000..be7452f --- /dev/null +++ b/src/typings/management/surcharge.ts @@ -0,0 +1,40 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Configuration } from './configuration'; + +export class Surcharge { + /** + * Show the surcharge details on the terminal, so the shopper can confirm. + */ + 'askConfirmation'?: boolean; + /** + * Surcharge fees or percentages for specific payment methods, funding sources (credit or debit), and currencies. + */ + 'configurations'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "askConfirmation", + "baseName": "askConfirmation", + "type": "boolean" + }, + { + "name": "configurations", + "baseName": "configurations", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return Surcharge.attributeTypeMap; + } +} + diff --git a/src/typings/management/swishInfo.ts b/src/typings/management/swishInfo.ts new file mode 100644 index 0000000..efb5187 --- /dev/null +++ b/src/typings/management/swishInfo.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class SwishInfo { + /** + * Swish number. Format: 10 digits without spaces. For example, **1231111111**. + */ + 'swishNumber': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "swishNumber", + "baseName": "swishNumber", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SwishInfo.attributeTypeMap; + } +} + diff --git a/src/typings/management/terminal.ts b/src/typings/management/terminal.ts new file mode 100644 index 0000000..bf70b00 --- /dev/null +++ b/src/typings/management/terminal.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Terminal { + /** + * The [assignment status](https://docs.adyen.com/point-of-sale/automating-terminal-management/assign-terminals-api) of the terminal. If true, the terminal is assigned. If false, the terminal is in inventory and can\'t be boarded. + */ + 'assigned'?: boolean; + /** + * The unique identifier of the terminal. + */ + 'id'?: string; + /** + * Indicates when the terminal was last online, whether the terminal is being reassigned, or whether the terminal is turned off. If the terminal was last online more that a week ago, it is also shown as turned off. + */ + 'status'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "assigned", + "baseName": "assigned", + "type": "boolean" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Terminal.attributeTypeMap; + } +} + diff --git a/src/typings/management/terminalModelsResponse.ts b/src/typings/management/terminalModelsResponse.ts new file mode 100644 index 0000000..5b2d0dc --- /dev/null +++ b/src/typings/management/terminalModelsResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { IdName } from './idName'; + +export class TerminalModelsResponse { + /** + * The terminal models that the API credential has access to. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TerminalModelsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/terminalOrder.ts b/src/typings/management/terminalOrder.ts new file mode 100644 index 0000000..767a32d --- /dev/null +++ b/src/typings/management/terminalOrder.ts @@ -0,0 +1,90 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { BillingEntity } from './billingEntity'; +import { OrderItem } from './orderItem'; +import { ShippingLocation } from './shippingLocation'; + +export class TerminalOrder { + 'billingEntity'?: BillingEntity; + /** + * The merchant-defined purchase order number. This will be printed on the packing list. + */ + 'customerOrderReference'?: string; + /** + * The unique identifier of the order. + */ + 'id'?: string; + /** + * The products included in the order. + */ + 'items'?: Array; + /** + * The date and time that the order was placed, in UTC ISO 8601 format. For example, \"2011-12-03T10:15:30Z\". + */ + 'orderDate'?: string; + 'shippingLocation'?: ShippingLocation; + /** + * The processing status of the order. + */ + 'status'?: string; + /** + * The URL, provided by the carrier company, where the shipment can be tracked. + */ + 'trackingUrl'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "billingEntity", + "baseName": "billingEntity", + "type": "BillingEntity" + }, + { + "name": "customerOrderReference", + "baseName": "customerOrderReference", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "orderDate", + "baseName": "orderDate", + "type": "string" + }, + { + "name": "shippingLocation", + "baseName": "shippingLocation", + "type": "ShippingLocation" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + }, + { + "name": "trackingUrl", + "baseName": "trackingUrl", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TerminalOrder.attributeTypeMap; + } +} + diff --git a/src/typings/management/terminalOrderRequest.ts b/src/typings/management/terminalOrderRequest.ts new file mode 100644 index 0000000..cad5f34 --- /dev/null +++ b/src/typings/management/terminalOrderRequest.ts @@ -0,0 +1,67 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { OrderItem } from './orderItem'; + +export class TerminalOrderRequest { + /** + * The identification of the billing entity to use for the order. + */ + 'billingEntityId'?: string; + /** + * The merchant-defined purchase order reference. + */ + 'customerOrderReference'?: string; + /** + * The products included in the order. + */ + 'items'?: Array; + /** + * The identification of the shipping location to use for the order. + */ + 'shippingLocationId'?: string; + /** + * The tax number of the billing entity. + */ + 'taxId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "billingEntityId", + "baseName": "billingEntityId", + "type": "string" + }, + { + "name": "customerOrderReference", + "baseName": "customerOrderReference", + "type": "string" + }, + { + "name": "items", + "baseName": "items", + "type": "Array" + }, + { + "name": "shippingLocationId", + "baseName": "shippingLocationId", + "type": "string" + }, + { + "name": "taxId", + "baseName": "taxId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TerminalOrderRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/terminalOrdersResponse.ts b/src/typings/management/terminalOrdersResponse.ts new file mode 100644 index 0000000..c87fa3e --- /dev/null +++ b/src/typings/management/terminalOrdersResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { TerminalOrder } from './terminalOrder'; + +export class TerminalOrdersResponse { + /** + * List of orders for payment terminal packages and parts. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TerminalOrdersResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/terminalProduct.ts b/src/typings/management/terminalProduct.ts new file mode 100644 index 0000000..e66bb7a --- /dev/null +++ b/src/typings/management/terminalProduct.ts @@ -0,0 +1,64 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Amount } from './amount'; + +export class TerminalProduct { + /** + * Information about items included and integration options. + */ + 'description'?: string; + /** + * The unique identifier of the product. + */ + 'id'?: string; + /** + * A list of parts included in the terminal package. + */ + 'itemsIncluded'?: Array; + /** + * The descriptive name of the product. + */ + 'name'?: string; + 'price'?: Amount; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "itemsIncluded", + "baseName": "itemsIncluded", + "type": "Array" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "price", + "baseName": "price", + "type": "Amount" + } ]; + + static getAttributeTypeMap() { + return TerminalProduct.attributeTypeMap; + } +} + diff --git a/src/typings/management/terminalProductsResponse.ts b/src/typings/management/terminalProductsResponse.ts new file mode 100644 index 0000000..10fbde7 --- /dev/null +++ b/src/typings/management/terminalProductsResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { TerminalProduct } from './terminalProduct'; + +export class TerminalProductsResponse { + /** + * Terminal products that can be ordered. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TerminalProductsResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/terminalSettings.ts b/src/typings/management/terminalSettings.ts new file mode 100644 index 0000000..eb317d8 --- /dev/null +++ b/src/typings/management/terminalSettings.ts @@ -0,0 +1,108 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CardholderReceipt } from './cardholderReceipt'; +import { Connectivity } from './connectivity'; +import { Gratuity } from './gratuity'; +import { Hardware } from './hardware'; +import { Nexo } from './nexo'; +import { Opi } from './opi'; +import { ReceiptOptions } from './receiptOptions'; +import { ReceiptPrinting } from './receiptPrinting'; +import { Signature } from './signature'; +import { Surcharge } from './surcharge'; +import { Timeouts } from './timeouts'; +import { WifiProfiles } from './wifiProfiles'; + +export class TerminalSettings { + 'cardholderReceipt'?: CardholderReceipt; + 'connectivity'?: Connectivity; + /** + * Settings for tipping with or without predefined options to choose from. The maximum number of predefined options is four, or three plus the option to enter a custom tip. + */ + 'gratuities'?: Array; + 'hardware'?: Hardware; + 'nexo'?: Nexo; + 'opi'?: Opi; + 'receiptOptions'?: ReceiptOptions; + 'receiptPrinting'?: ReceiptPrinting; + 'signature'?: Signature; + 'surcharge'?: Surcharge; + 'timeouts'?: Timeouts; + 'wifiProfiles'?: WifiProfiles; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "cardholderReceipt", + "baseName": "cardholderReceipt", + "type": "CardholderReceipt" + }, + { + "name": "connectivity", + "baseName": "connectivity", + "type": "Connectivity" + }, + { + "name": "gratuities", + "baseName": "gratuities", + "type": "Array" + }, + { + "name": "hardware", + "baseName": "hardware", + "type": "Hardware" + }, + { + "name": "nexo", + "baseName": "nexo", + "type": "Nexo" + }, + { + "name": "opi", + "baseName": "opi", + "type": "Opi" + }, + { + "name": "receiptOptions", + "baseName": "receiptOptions", + "type": "ReceiptOptions" + }, + { + "name": "receiptPrinting", + "baseName": "receiptPrinting", + "type": "ReceiptPrinting" + }, + { + "name": "signature", + "baseName": "signature", + "type": "Signature" + }, + { + "name": "surcharge", + "baseName": "surcharge", + "type": "Surcharge" + }, + { + "name": "timeouts", + "baseName": "timeouts", + "type": "Timeouts" + }, + { + "name": "wifiProfiles", + "baseName": "wifiProfiles", + "type": "WifiProfiles" + } ]; + + static getAttributeTypeMap() { + return TerminalSettings.attributeTypeMap; + } +} + diff --git a/src/typings/management/testCompanyWebhookRequest.ts b/src/typings/management/testCompanyWebhookRequest.ts new file mode 100644 index 0000000..5f7fef7 --- /dev/null +++ b/src/typings/management/testCompanyWebhookRequest.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CustomNotification } from './customNotification'; + +export class TestCompanyWebhookRequest { + /** + * List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications. + */ + 'merchantIds'?: Array; + 'notification'?: CustomNotification; + /** + * List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING** + */ + 'types'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "merchantIds", + "baseName": "merchantIds", + "type": "Array" + }, + { + "name": "notification", + "baseName": "notification", + "type": "CustomNotification" + }, + { + "name": "types", + "baseName": "types", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TestCompanyWebhookRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/testOutput.ts b/src/typings/management/testOutput.ts new file mode 100644 index 0000000..62af53d --- /dev/null +++ b/src/typings/management/testOutput.ts @@ -0,0 +1,75 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class TestOutput { + /** + * Unique identifier of the merchant account that the notification is about. + */ + 'merchantId'?: string; + /** + * The response your server returned for the test webhook. Your server must respond with **[accepted]** for the test webhook to be successful (`data.status`: **success**). Find out more about [accepting notifications](https://docs.adyen.com/development-resources/webhooks#accept-notifications) You can use the value of this field together with the [`responseCode`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-responseCode) value to troubleshoot unsuccessful test webhooks. + */ + 'output'?: string; + /** + * The [body of the notification webhook](https://docs.adyen.com/development-resources/webhooks/understand-notifications#notification-structure) that was sent to your server. + */ + 'requestSent'?: string; + /** + * The HTTP response code for your server\'s response to the test webhook. You can use the value of this field together with the the [`output`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-output) field value to troubleshoot failed test webhooks. + */ + 'responseCode'?: string; + /** + * The time between sending the test webhook and receiving the response from your server. You can use it as an indication of how long your server takes to process a webhook notification. Measured in milliseconds, for example **304 ms**. + */ + 'responseTime'?: string; + /** + * The status of the test request. Possible values are: * **success**, if `data.output`: **[accepted]** and `data.responseCode`: **200**. * **failed**, in all other cases. You can use the value of the [`output`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-output) field together with the [`responseCode`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-responseCode) value to troubleshoot failed test webhooks. + */ + 'status': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "merchantId", + "baseName": "merchantId", + "type": "string" + }, + { + "name": "output", + "baseName": "output", + "type": "string" + }, + { + "name": "requestSent", + "baseName": "requestSent", + "type": "string" + }, + { + "name": "responseCode", + "baseName": "responseCode", + "type": "string" + }, + { + "name": "responseTime", + "baseName": "responseTime", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TestOutput.attributeTypeMap; + } +} + diff --git a/src/typings/management/testWebhookRequest.ts b/src/typings/management/testWebhookRequest.ts new file mode 100644 index 0000000..2ee59e2 --- /dev/null +++ b/src/typings/management/testWebhookRequest.ts @@ -0,0 +1,37 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CustomNotification } from './customNotification'; + +export class TestWebhookRequest { + 'notification'?: CustomNotification; + /** + * List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING** + */ + 'types'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "notification", + "baseName": "notification", + "type": "CustomNotification" + }, + { + "name": "types", + "baseName": "types", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TestWebhookRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/testWebhookResponse.ts b/src/typings/management/testWebhookResponse.ts new file mode 100644 index 0000000..7ef7752 --- /dev/null +++ b/src/typings/management/testWebhookResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { TestOutput } from './testOutput'; + +export class TestWebhookResponse { + /** + * List with test results. Each test webhook we send has a list element with the result. + */ + 'data'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TestWebhookResponse.attributeTypeMap; + } +} + diff --git a/src/typings/management/timeouts.ts b/src/typings/management/timeouts.ts new file mode 100644 index 0000000..dfc3a4e --- /dev/null +++ b/src/typings/management/timeouts.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Timeouts { + /** + * Indicates the number of seconds of inactivity after which the terminal display goes into sleep mode. + */ + 'fromActiveToSleep'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "fromActiveToSleep", + "baseName": "fromActiveToSleep", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Timeouts.attributeTypeMap; + } +} + diff --git a/src/typings/management/uninstallAndroidAppDetails.ts b/src/typings/management/uninstallAndroidAppDetails.ts new file mode 100644 index 0000000..df5bdff --- /dev/null +++ b/src/typings/management/uninstallAndroidAppDetails.ts @@ -0,0 +1,44 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class UninstallAndroidAppDetails { + /** + * The unique identifier of the app to be uninstalled. + */ + 'appId'?: string; + /** + * Type of terminal action: Uninstall an Android app. + */ + 'type'?: UninstallAndroidAppDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "appId", + "baseName": "appId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "UninstallAndroidAppDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return UninstallAndroidAppDetails.attributeTypeMap; + } +} + +export namespace UninstallAndroidAppDetails { + export enum TypeEnum { + UninstallAndroidApp = 'UninstallAndroidApp' + } +} diff --git a/src/typings/management/uninstallAndroidCertificateDetails.ts b/src/typings/management/uninstallAndroidCertificateDetails.ts new file mode 100644 index 0000000..9a4e1a7 --- /dev/null +++ b/src/typings/management/uninstallAndroidCertificateDetails.ts @@ -0,0 +1,44 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class UninstallAndroidCertificateDetails { + /** + * The unique identifier of the certificate to be uninstalled. + */ + 'certificateId'?: string; + /** + * Type of terminal action: Uninstall an Android certificate. + */ + 'type'?: UninstallAndroidCertificateDetails.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "certificateId", + "baseName": "certificateId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "UninstallAndroidCertificateDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return UninstallAndroidCertificateDetails.attributeTypeMap; + } +} + +export namespace UninstallAndroidCertificateDetails { + export enum TypeEnum { + UninstallAndroidCertificate = 'UninstallAndroidCertificate' + } +} diff --git a/src/typings/management/updatableAddress.ts b/src/typings/management/updatableAddress.ts new file mode 100644 index 0000000..e02841b --- /dev/null +++ b/src/typings/management/updatableAddress.ts @@ -0,0 +1,75 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class UpdatableAddress { + /** + * The name of the city. + */ + 'city'?: string; + /** + * The street address. + */ + 'line1'?: string; + /** + * Second address line. + */ + 'line2'?: string; + /** + * Third address line. + */ + 'line3'?: string; + /** + * The postal code. + */ + 'postalCode'?: string; + /** + * The state or province code as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Required for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States + */ + 'stateOrProvince'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "city", + "baseName": "city", + "type": "string" + }, + { + "name": "line1", + "baseName": "line1", + "type": "string" + }, + { + "name": "line2", + "baseName": "line2", + "type": "string" + }, + { + "name": "line3", + "baseName": "line3", + "type": "string" + }, + { + "name": "postalCode", + "baseName": "postalCode", + "type": "string" + }, + { + "name": "stateOrProvince", + "baseName": "stateOrProvince", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdatableAddress.attributeTypeMap; + } +} + diff --git a/src/typings/management/updateCompanyApiCredentialRequest.ts b/src/typings/management/updateCompanyApiCredentialRequest.ts new file mode 100644 index 0000000..a3e482a --- /dev/null +++ b/src/typings/management/updateCompanyApiCredentialRequest.ts @@ -0,0 +1,66 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class UpdateCompanyApiCredentialRequest { + /** + * Indicates if the API credential is enabled. + */ + 'active'?: boolean; + /** + * The new list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the API credential. + */ + 'allowedOrigins'?: Array; + /** + * List of merchant accounts that the API credential has access to. + */ + 'associatedMerchantAccounts'?: Array; + /** + * Description of the API credential. + */ + 'description'?: string; + /** + * List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) of the API credential. + */ + 'roles'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "allowedOrigins", + "baseName": "allowedOrigins", + "type": "Array" + }, + { + "name": "associatedMerchantAccounts", + "baseName": "associatedMerchantAccounts", + "type": "Array" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return UpdateCompanyApiCredentialRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/updateCompanyUserRequest.ts b/src/typings/management/updateCompanyUserRequest.ts new file mode 100644 index 0000000..94f3412 --- /dev/null +++ b/src/typings/management/updateCompanyUserRequest.ts @@ -0,0 +1,82 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Name2 } from './name2'; + +export class UpdateCompanyUserRequest { + /** + * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. + */ + 'accountGroups'?: Array; + /** + * Indicates whether this user is active. + */ + 'active'?: boolean; + /** + * The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) to associate the user with. + */ + 'associatedMerchantAccounts'?: Array; + /** + * The email address of the user. + */ + 'email'?: string; + 'name'?: Name2; + /** + * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. + */ + 'roles'?: Array; + /** + * The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. + */ + 'timeZoneCode'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountGroups", + "baseName": "accountGroups", + "type": "Array" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "associatedMerchantAccounts", + "baseName": "associatedMerchantAccounts", + "type": "Array" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "Name2" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "timeZoneCode", + "baseName": "timeZoneCode", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateCompanyUserRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/updateCompanyWebhookRequest.ts b/src/typings/management/updateCompanyWebhookRequest.ts new file mode 100644 index 0000000..56e74ba --- /dev/null +++ b/src/typings/management/updateCompanyWebhookRequest.ts @@ -0,0 +1,181 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AdditionalSettings } from './additionalSettings'; + +export class UpdateCompanyWebhookRequest { + /** + * Indicates if expired SSL certificates are accepted. Default value: **false**. + */ + 'acceptsExpiredCertificate'?: boolean; + /** + * Indicates if self-signed SSL certificates are accepted. Default value: **false**. + */ + 'acceptsSelfSignedCertificate'?: boolean; + /** + * Indicates if untrusted SSL certificates are accepted. Default value: **false**. + */ + 'acceptsUntrustedRootCertificate'?: boolean; + /** + * Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. + */ + 'active'?: boolean; + 'additionalSettings'?: AdditionalSettings; + /** + * Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** + */ + 'communicationFormat'?: UpdateCompanyWebhookRequest.CommunicationFormatEnum; + /** + * Your description for this webhook configuration. + */ + 'description'?: string; + /** + * Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. + */ + 'filterMerchantAccountType'?: UpdateCompanyWebhookRequest.FilterMerchantAccountTypeEnum; + /** + * A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. + */ + 'filterMerchantAccounts'?: Array; + /** + * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. + */ + 'networkType'?: UpdateCompanyWebhookRequest.NetworkTypeEnum; + /** + * Password to access the webhook URL. + */ + 'password'?: string; + /** + * Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. + */ + 'populateSoapActionHeader'?: boolean; + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.2** * **SSL** * **SSLv3** * **TLS** * **TLSv1** * **TLSv1.1** If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + */ + 'sslVersion'?: UpdateCompanyWebhookRequest.SslVersionEnum; + /** + * Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. + */ + 'url': string; + /** + * Username to access the webhook URL. + */ + 'username'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "acceptsExpiredCertificate", + "baseName": "acceptsExpiredCertificate", + "type": "boolean" + }, + { + "name": "acceptsSelfSignedCertificate", + "baseName": "acceptsSelfSignedCertificate", + "type": "boolean" + }, + { + "name": "acceptsUntrustedRootCertificate", + "baseName": "acceptsUntrustedRootCertificate", + "type": "boolean" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "additionalSettings", + "baseName": "additionalSettings", + "type": "AdditionalSettings" + }, + { + "name": "communicationFormat", + "baseName": "communicationFormat", + "type": "UpdateCompanyWebhookRequest.CommunicationFormatEnum" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "filterMerchantAccountType", + "baseName": "filterMerchantAccountType", + "type": "UpdateCompanyWebhookRequest.FilterMerchantAccountTypeEnum" + }, + { + "name": "filterMerchantAccounts", + "baseName": "filterMerchantAccounts", + "type": "Array" + }, + { + "name": "networkType", + "baseName": "networkType", + "type": "UpdateCompanyWebhookRequest.NetworkTypeEnum" + }, + { + "name": "password", + "baseName": "password", + "type": "string" + }, + { + "name": "populateSoapActionHeader", + "baseName": "populateSoapActionHeader", + "type": "boolean" + }, + { + "name": "sslVersion", + "baseName": "sslVersion", + "type": "UpdateCompanyWebhookRequest.SslVersionEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateCompanyWebhookRequest.attributeTypeMap; + } +} + +export namespace UpdateCompanyWebhookRequest { + export enum CommunicationFormatEnum { + Http = 'HTTP', + Json = 'JSON', + Soap = 'SOAP' + } + export enum FilterMerchantAccountTypeEnum { + ExcludeList = 'EXCLUDE_LIST', + IncludeAll = 'INCLUDE_ALL', + IncludeList = 'INCLUDE_LIST' + } + export enum NetworkTypeEnum { + Local = 'LOCAL', + Public = 'PUBLIC' + } + export enum SslVersionEnum { + Http = 'HTTP', + Ssl = 'SSL', + Sslv3 = 'SSLV3', + SslInsecureCiphers = 'SSL_INSECURE_CIPHERS', + Tls = 'TLS', + Tlsv1 = 'TLSV1', + Tlsv11 = 'TLSV1_1', + Tlsv12 = 'TLSV1_2', + Tlsv1InsecureCiphers = 'TLSV1_INSECURE_CIPHERS' + } +} diff --git a/src/typings/management/updateMerchantApiCredentialRequest.ts b/src/typings/management/updateMerchantApiCredentialRequest.ts new file mode 100644 index 0000000..d8c7b67 --- /dev/null +++ b/src/typings/management/updateMerchantApiCredentialRequest.ts @@ -0,0 +1,57 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class UpdateMerchantApiCredentialRequest { + /** + * Indicates if the API credential is enabled. + */ + 'active'?: boolean; + /** + * The new list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the API credential. + */ + 'allowedOrigins'?: Array; + /** + * Description of the API credential. + */ + 'description'?: string; + /** + * List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + */ + 'roles'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "allowedOrigins", + "baseName": "allowedOrigins", + "type": "Array" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return UpdateMerchantApiCredentialRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/updateMerchantUserRequest.ts b/src/typings/management/updateMerchantUserRequest.ts new file mode 100644 index 0000000..69bc9df --- /dev/null +++ b/src/typings/management/updateMerchantUserRequest.ts @@ -0,0 +1,73 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Name2 } from './name2'; + +export class UpdateMerchantUserRequest { + /** + * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. + */ + 'accountGroups'?: Array; + /** + * Sets the status of the user to active (**true**) or inactive (**false**). + */ + 'active'?: boolean; + /** + * The email address of the user. + */ + 'email'?: string; + 'name'?: Name2; + /** + * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. + */ + 'roles'?: Array; + /** + * The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. + */ + 'timeZoneCode'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountGroups", + "baseName": "accountGroups", + "type": "Array" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "Name2" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "timeZoneCode", + "baseName": "timeZoneCode", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateMerchantUserRequest.attributeTypeMap; + } +} + diff --git a/src/typings/management/updateMerchantWebhookRequest.ts b/src/typings/management/updateMerchantWebhookRequest.ts new file mode 100644 index 0000000..7da8d92 --- /dev/null +++ b/src/typings/management/updateMerchantWebhookRequest.ts @@ -0,0 +1,158 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AdditionalSettings } from './additionalSettings'; + +export class UpdateMerchantWebhookRequest { + /** + * Indicates if expired SSL certificates are accepted. Default value: **false**. + */ + 'acceptsExpiredCertificate'?: boolean; + /** + * Indicates if self-signed SSL certificates are accepted. Default value: **false**. + */ + 'acceptsSelfSignedCertificate'?: boolean; + /** + * Indicates if untrusted SSL certificates are accepted. Default value: **false**. + */ + 'acceptsUntrustedRootCertificate'?: boolean; + /** + * Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. + */ + 'active': boolean; + 'additionalSettings'?: AdditionalSettings; + /** + * Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** + */ + 'communicationFormat': UpdateMerchantWebhookRequest.CommunicationFormatEnum; + /** + * Your description for this webhook configuration. + */ + 'description'?: string; + /** + * Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. + */ + 'networkType'?: UpdateMerchantWebhookRequest.NetworkTypeEnum; + /** + * Password to access the webhook URL. + */ + 'password'?: string; + /** + * Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. + */ + 'populateSoapActionHeader'?: boolean; + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.2** * **SSL** * **SSLv3** * **TLS** * **TLSv1** * **TLSv1.1** If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + */ + 'sslVersion'?: UpdateMerchantWebhookRequest.SslVersionEnum; + /** + * Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. + */ + 'url': string; + /** + * Username to access the webhook URL. + */ + 'username'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "acceptsExpiredCertificate", + "baseName": "acceptsExpiredCertificate", + "type": "boolean" + }, + { + "name": "acceptsSelfSignedCertificate", + "baseName": "acceptsSelfSignedCertificate", + "type": "boolean" + }, + { + "name": "acceptsUntrustedRootCertificate", + "baseName": "acceptsUntrustedRootCertificate", + "type": "boolean" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "additionalSettings", + "baseName": "additionalSettings", + "type": "AdditionalSettings" + }, + { + "name": "communicationFormat", + "baseName": "communicationFormat", + "type": "UpdateMerchantWebhookRequest.CommunicationFormatEnum" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "networkType", + "baseName": "networkType", + "type": "UpdateMerchantWebhookRequest.NetworkTypeEnum" + }, + { + "name": "password", + "baseName": "password", + "type": "string" + }, + { + "name": "populateSoapActionHeader", + "baseName": "populateSoapActionHeader", + "type": "boolean" + }, + { + "name": "sslVersion", + "baseName": "sslVersion", + "type": "UpdateMerchantWebhookRequest.SslVersionEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateMerchantWebhookRequest.attributeTypeMap; + } +} + +export namespace UpdateMerchantWebhookRequest { + export enum CommunicationFormatEnum { + Http = 'HTTP', + Json = 'JSON', + Soap = 'SOAP' + } + export enum NetworkTypeEnum { + Local = 'LOCAL', + Public = 'PUBLIC' + } + export enum SslVersionEnum { + Http = 'HTTP', + Ssl = 'SSL', + Sslv3 = 'SSLV3', + SslInsecureCiphers = 'SSL_INSECURE_CIPHERS', + Tls = 'TLS', + Tlsv1 = 'TLSV1', + Tlsv11 = 'TLSV1_1', + Tlsv12 = 'TLSV1_2', + Tlsv1InsecureCiphers = 'TLSV1_INSECURE_CIPHERS' + } +} diff --git a/src/typings/management/updatePaymentMethodInfo.ts b/src/typings/management/updatePaymentMethodInfo.ts new file mode 100644 index 0000000..fdfeb80 --- /dev/null +++ b/src/typings/management/updatePaymentMethodInfo.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class UpdatePaymentMethodInfo { + /** + * The list of countries where a payment method is available. By default, all countries supported by the payment method. + */ + 'countries'?: Array; + /** + * The list of currencies that a payment method supports. By default, all currencies supported by the payment method. + */ + 'currencies'?: Array; + /** + * Indicates whether the payment method is enabled (**true**) or disabled (**false**). + */ + 'enabled'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "countries", + "baseName": "countries", + "type": "Array" + }, + { + "name": "currencies", + "baseName": "currencies", + "type": "Array" + }, + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return UpdatePaymentMethodInfo.attributeTypeMap; + } +} + diff --git a/src/typings/management/updateStoreRequest.ts b/src/typings/management/updateStoreRequest.ts new file mode 100644 index 0000000..14be402 --- /dev/null +++ b/src/typings/management/updateStoreRequest.ts @@ -0,0 +1,78 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { StoreSplitConfiguration } from './storeSplitConfiguration'; +import { UpdatableAddress } from './updatableAddress'; + +export class UpdateStoreRequest { + 'address'?: UpdatableAddress; + /** + * The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. + */ + 'businessLineIds'?: Array; + /** + * The description of the store. + */ + 'description'?: string; + /** + * When using the Zip payment method: The location ID that Zip has assigned to your store. + */ + 'externalReferenceId'?: string; + 'splitConfiguration'?: StoreSplitConfiguration; + /** + * The status of the store. Possible values are: - **active**: This value is assigned automatically when a store is created. - **inactive**: The maximum [transaction limits and number of Store-and-Forward transactions](https://docs.adyen.com/point-of-sale/determine-account-structure/configure-features#payment-features) for the store are set to 0. This blocks new transactions, but captures are still possible. - **closed**: The terminals of the store are reassigned to the merchant inventory, so they can\'t process payments. You can change the status from **active** to **inactive**, and from **inactive** to **active** or **closed**. Once **closed**, a store can\'t be reopened. + */ + 'status'?: UpdateStoreRequest.StatusEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "address", + "baseName": "address", + "type": "UpdatableAddress" + }, + { + "name": "businessLineIds", + "baseName": "businessLineIds", + "type": "Array" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "externalReferenceId", + "baseName": "externalReferenceId", + "type": "string" + }, + { + "name": "splitConfiguration", + "baseName": "splitConfiguration", + "type": "StoreSplitConfiguration" + }, + { + "name": "status", + "baseName": "status", + "type": "UpdateStoreRequest.StatusEnum" + } ]; + + static getAttributeTypeMap() { + return UpdateStoreRequest.attributeTypeMap; + } +} + +export namespace UpdateStoreRequest { + export enum StatusEnum { + Active = 'active', + Closed = 'closed', + Inactive = 'inactive' + } +} diff --git a/src/typings/management/url.ts b/src/typings/management/url.ts new file mode 100644 index 0000000..fed0148 --- /dev/null +++ b/src/typings/management/url.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Url { + /** + * The password for authentication of the event notifications. + */ + 'password'?: string; + /** + * The URL in the format: http(s)://domain.com. + */ + 'url'?: string; + /** + * The username for authentication of the event notifications. + */ + 'username'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "password", + "baseName": "password", + "type": "string" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Url.attributeTypeMap; + } +} + diff --git a/src/typings/management/user.ts b/src/typings/management/user.ts new file mode 100644 index 0000000..e694b80 --- /dev/null +++ b/src/typings/management/user.ts @@ -0,0 +1,98 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Links } from './links'; +import { Name } from './name'; + +export class User { + 'links'?: Links; + /** + * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. + */ + 'accountGroups'?: Array; + /** + * Indicates whether this user is active. + */ + 'active'?: boolean; + /** + * The email address of the user. + */ + 'email': string; + /** + * The unique identifier of the user. + */ + 'id': string; + 'name'?: Name; + /** + * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. + */ + 'roles': Array; + /** + * The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. + */ + 'timeZoneCode': string; + /** + * The username for this user. + */ + 'username': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "Links" + }, + { + "name": "accountGroups", + "baseName": "accountGroups", + "type": "Array" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "email", + "baseName": "email", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "Name" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Array" + }, + { + "name": "timeZoneCode", + "baseName": "timeZoneCode", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return User.attributeTypeMap; + } +} + diff --git a/src/typings/management/webhook.ts b/src/typings/management/webhook.ts new file mode 100644 index 0000000..9ea1780 --- /dev/null +++ b/src/typings/management/webhook.ts @@ -0,0 +1,233 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AdditionalSettingsResponse } from './additionalSettingsResponse'; +import { WebhookLinks } from './webhookLinks'; + +export class Webhook { + 'links'?: WebhookLinks; + /** + * Indicates if expired SSL certificates are accepted. Default value: **false**. + */ + 'acceptsExpiredCertificate'?: boolean; + /** + * Indicates if self-signed SSL certificates are accepted. Default value: **false**. + */ + 'acceptsSelfSignedCertificate'?: boolean; + /** + * Indicates if untrusted SSL certificates are accepted. Default value: **false**. + */ + 'acceptsUntrustedRootCertificate'?: boolean; + /** + * Indicates if the webhook configuration is active. The field must be **true** for you to receive webhooks about events related an account. + */ + 'active': boolean; + 'additionalSettings'?: AdditionalSettingsResponse; + /** + * The alias of our SSL certificate. When you receive a notification from us, the alias from the HMAC signature will match this alias. + */ + 'certificateAlias'?: string; + /** + * Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** + */ + 'communicationFormat': Webhook.CommunicationFormatEnum; + /** + * Your description for this webhook configuration. + */ + 'description'?: string; + /** + * Shows how merchant accounts are included in company-level webhooks. Possible values: * **includeAccounts** * **excludeAccounts** * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. + */ + 'filterMerchantAccountType'?: Webhook.FilterMerchantAccountTypeEnum; + /** + * A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. + */ + 'filterMerchantAccounts'?: Array; + /** + * Indicates if the webhook configuration has errors that need troubleshooting. If the value is **true**, troubleshoot the configuration using the [testing endpoint](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookid}/test). + */ + 'hasError'?: boolean; + /** + * Indicates if the webhook is password protected. + */ + 'hasPassword'?: boolean; + /** + * The [checksum](https://en.wikipedia.org/wiki/Key_checksum_value) of the HMAC key generated for this webhook. You can use this value to uniquely identify the HMAC key configured for this webhook. + */ + 'hmacKeyCheckValue'?: string; + /** + * Unique identifier for this webhook. + */ + 'id'?: string; + /** + * Network type for Terminal API details webhooks. + */ + 'networkType'?: Webhook.NetworkTypeEnum; + /** + * Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. + */ + 'populateSoapActionHeader'?: boolean; + /** + * SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.2** * **SSL** * **SSLv3** * **TLS** * **TLSv1** * **TLSv1.1** If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + */ + 'sslVersion'?: Webhook.SslVersionEnum; + /** + * The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). + */ + 'type': string; + /** + * Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. + */ + 'url': string; + /** + * Username to access the webhook URL. + */ + 'username'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "links", + "baseName": "_links", + "type": "WebhookLinks" + }, + { + "name": "acceptsExpiredCertificate", + "baseName": "acceptsExpiredCertificate", + "type": "boolean" + }, + { + "name": "acceptsSelfSignedCertificate", + "baseName": "acceptsSelfSignedCertificate", + "type": "boolean" + }, + { + "name": "acceptsUntrustedRootCertificate", + "baseName": "acceptsUntrustedRootCertificate", + "type": "boolean" + }, + { + "name": "active", + "baseName": "active", + "type": "boolean" + }, + { + "name": "additionalSettings", + "baseName": "additionalSettings", + "type": "AdditionalSettingsResponse" + }, + { + "name": "certificateAlias", + "baseName": "certificateAlias", + "type": "string" + }, + { + "name": "communicationFormat", + "baseName": "communicationFormat", + "type": "Webhook.CommunicationFormatEnum" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "filterMerchantAccountType", + "baseName": "filterMerchantAccountType", + "type": "Webhook.FilterMerchantAccountTypeEnum" + }, + { + "name": "filterMerchantAccounts", + "baseName": "filterMerchantAccounts", + "type": "Array" + }, + { + "name": "hasError", + "baseName": "hasError", + "type": "boolean" + }, + { + "name": "hasPassword", + "baseName": "hasPassword", + "type": "boolean" + }, + { + "name": "hmacKeyCheckValue", + "baseName": "hmacKeyCheckValue", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "networkType", + "baseName": "networkType", + "type": "Webhook.NetworkTypeEnum" + }, + { + "name": "populateSoapActionHeader", + "baseName": "populateSoapActionHeader", + "type": "boolean" + }, + { + "name": "sslVersion", + "baseName": "sslVersion", + "type": "Webhook.SslVersionEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + }, + { + "name": "username", + "baseName": "username", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Webhook.attributeTypeMap; + } +} + +export namespace Webhook { + export enum CommunicationFormatEnum { + Http = 'HTTP', + Json = 'JSON', + Soap = 'SOAP' + } + export enum FilterMerchantAccountTypeEnum { + ExcludeList = 'EXCLUDE_LIST', + IncludeAll = 'INCLUDE_ALL', + IncludeList = 'INCLUDE_LIST' + } + export enum NetworkTypeEnum { + Local = 'LOCAL', + Public = 'PUBLIC' + } + export enum SslVersionEnum { + Http = 'HTTP', + Ssl = 'SSL', + Sslv3 = 'SSLV3', + SslInsecureCiphers = 'SSL_INSECURE_CIPHERS', + Tls = 'TLS', + Tlsv1 = 'TLSV1', + Tlsv11 = 'TLSV1_1', + Tlsv12 = 'TLSV1_2', + Tlsv1InsecureCiphers = 'TLSV1_INSECURE_CIPHERS' + } +} diff --git a/src/typings/management/webhookLinks.ts b/src/typings/management/webhookLinks.ts new file mode 100644 index 0000000..9fdab2a --- /dev/null +++ b/src/typings/management/webhookLinks.ts @@ -0,0 +1,52 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { LinksElement } from './linksElement'; + +export class WebhookLinks { + 'company'?: LinksElement; + 'generateHmac': LinksElement; + 'merchant'?: LinksElement; + 'self': LinksElement; + 'testWebhook': LinksElement; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "company", + "baseName": "company", + "type": "LinksElement" + }, + { + "name": "generateHmac", + "baseName": "generateHmac", + "type": "LinksElement" + }, + { + "name": "merchant", + "baseName": "merchant", + "type": "LinksElement" + }, + { + "name": "self", + "baseName": "self", + "type": "LinksElement" + }, + { + "name": "testWebhook", + "baseName": "testWebhook", + "type": "LinksElement" + } ]; + + static getAttributeTypeMap() { + return WebhookLinks.attributeTypeMap; + } +} + diff --git a/src/typings/management/wifiProfiles.ts b/src/typings/management/wifiProfiles.ts new file mode 100644 index 0000000..a5ae1d3 --- /dev/null +++ b/src/typings/management/wifiProfiles.ts @@ -0,0 +1,38 @@ +/* + * The version of the OpenAPI document: v1 + * Contact: developer-experience@adyen.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Profile } from './profile'; +import { Settings } from './settings'; + +export class WifiProfiles { + /** + * List of remote Wi-Fi profiles + */ + 'profiles'?: Array; + 'settings'?: Settings; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "profiles", + "baseName": "profiles", + "type": "Array" + }, + { + "name": "settings", + "baseName": "settings", + "type": "Settings" + } ]; + + static getAttributeTypeMap() { + return WifiProfiles.attributeTypeMap; + } +} +