mirror of
https://github.com/jlengrand/adyen-node-api-library.git
synced 2026-03-09 23:51:22 +00:00
PW-7514: Fully Generated Management API client (#1064)
* PW-7514: Update models * PW-7514: Switch to JAR based installation * PW-7514: Default API template * PW-7514: Customize API template * PW-7514: Serialize request * PW-7514: Query string * PW-7514: Fix version patch * PW-7514: Client generated * PW-7514: Export class by default * PW-7514: Make path and body params required * PW-7514: Dynamic service name * PW-7514: Link all classes into one parent * PW-7514: Dynamic method names * PW-7514: Fix merge issues * PW-7514: Generate using latest specs Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com>
This commit is contained in:
39
Makefile
39
Makefile
@@ -1,5 +1,8 @@
|
||||
generator:=typescript-node
|
||||
openapi-generator-cli:=docker run --user $(shell id -u):$(shell id -g) --rm -v ${PWD}:/local -w /local openapitools/openapi-generator-cli:v5.4.0
|
||||
openapi-generator-version:=5.4.0
|
||||
openapi-generator-url:=https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$(openapi-generator-version)/openapi-generator-cli-$(openapi-generator-version).jar
|
||||
openapi-generator-jar:=build/openapi-generator-cli.jar
|
||||
openapi-generator-cli:=java -jar $(openapi-generator-jar)
|
||||
services:=balancePlatform binlookup checkout dataProtection legalEntityManagement management payments payouts platformsAccount platformsFund platformsHostedOnboardingPage platformsNotificationConfiguration recurring storedValue terminalManagement transfer
|
||||
|
||||
# Generate models (for each service)
|
||||
@@ -14,6 +17,8 @@ payments: spec=PaymentService-v68
|
||||
recurring: spec=RecurringService-v68
|
||||
payouts: spec=PayoutService-v68
|
||||
management: spec=ManagementService-v1
|
||||
managementapi: spec=ManagementService-v1
|
||||
managementapi: service=management
|
||||
legalEntityManagement: spec=LegalEntityService-v2
|
||||
balancePlatform: spec=BalancePlatformService-v2
|
||||
platformsAccount: spec=AccountService-v6
|
||||
@@ -22,28 +27,48 @@ platformsNotificationConfiguration: spec=NotificationConfigurationService-v6
|
||||
platformsHostedOnboardingPage: spec=HopService-v6
|
||||
transfer: spec=TransferService-v3
|
||||
|
||||
$(services): build/spec
|
||||
$(services): build/spec $(openapi-generator-jar)
|
||||
rm -rf src/typings/$@ build/model
|
||||
$(openapi-generator-cli) generate \
|
||||
-i build/spec/json/$(spec).json \
|
||||
-g $(generator) \
|
||||
-t templates/typescript \
|
||||
-o build \
|
||||
--global-property models,supportingFiles
|
||||
--global-property models,supportingFiles \
|
||||
--additional-properties=serviceName=$@
|
||||
mv build/model src/typings/$@
|
||||
|
||||
# Service
|
||||
managementapi: build/spec $(openapi-generator-jar)
|
||||
$(openapi-generator-cli) generate \
|
||||
-i build/spec/json/$(spec).json \
|
||||
-g $(generator) \
|
||||
-t templates/typescript \
|
||||
-o build \
|
||||
--api-package $(service) \
|
||||
--model-package typings/$(service) \
|
||||
--global-property apis \
|
||||
--additional-properties=serviceName=$(service)
|
||||
cp build/$(service)/* src/services/$(service)
|
||||
sed -i.bak '/RestServiceError/d' src/services/$(service)/*
|
||||
rm src/services/$(service)/*.bak
|
||||
|
||||
# Checkout spec (and patch version)
|
||||
build/spec:
|
||||
git clone https://github.com/Adyen/adyen-openapi.git build/spec
|
||||
sed -i 's/"openapi" : "3.[0-9].[0-9]"/"openapi" : "3.0.0"/' build/spec/json/*.json
|
||||
perl -i -pe's/"openapi" : "3.[0-9].[0-9]"/"openapi" : "3.0.0"/' build/spec/json/*.json
|
||||
|
||||
# Extract templates (copy them for modifications)
|
||||
templates:
|
||||
templates: $(openapi-generator-jar)
|
||||
$(openapi-generator-cli) author template -g $(generator) -o build/templates/typescript
|
||||
|
||||
# Download the generator
|
||||
$(openapi-generator-jar):
|
||||
wget --quiet -o /dev/null $(openapi-generator-url) -O $(openapi-generator-jar)
|
||||
|
||||
# Discard generated artifacts and changed models
|
||||
clean:
|
||||
git checkout src/typings
|
||||
git clean -f -d src/typings
|
||||
git checkout src/typings src/services/management
|
||||
git clean -f -d src/typings src/services/management
|
||||
|
||||
.PHONY: templates models $(services)
|
||||
|
||||
@@ -690,4 +690,40 @@ describe("Management", (): void => {
|
||||
expect(response).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe("AllowedOriginsMerchantLevelApi", (): void => {
|
||||
test("Delete an allowed origin", async () => {
|
||||
scope.delete("/merchants/foo/apiCredentials/BAR123/allowedOrigins/fishy%20one").reply(204);
|
||||
|
||||
await managementService.AllowedOriginsMerchantLevelApi
|
||||
.deleteAllowedOrigin("foo", "BAR123", "fishy one");
|
||||
});
|
||||
|
||||
test("Create an allowed origin", async () => {
|
||||
const requestBody = {
|
||||
"domain": "https://www.eu.mystore.com"
|
||||
};
|
||||
scope.post("/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins", requestBody)
|
||||
.reply(200, {
|
||||
"id": "YOUR_ALLOWED_ORIGIN",
|
||||
"data": [
|
||||
{
|
||||
"domain": "https://www.eu.mystore.com",
|
||||
}
|
||||
],
|
||||
"_links": {
|
||||
"self": {
|
||||
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const response: management.AllowedOriginsResponse = await managementService.AllowedOriginsMerchantLevelApi
|
||||
.createAllowedOrigin("YOUR_MERCHANT_ACCOUNT", "YOUR_API_CREDENTIAL", {
|
||||
domain: "https://www.eu.mystore.com",
|
||||
});
|
||||
|
||||
expect(response.data![0].domain).toEqual("https://www.eu.mystore.com");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Service from "../service";
|
||||
import Client from "../client";
|
||||
|
||||
// Deprecated classes
|
||||
import MeApi from "./management/meApi";
|
||||
import MerchantAccount from "./management/merchantAccount";
|
||||
import MerchantAllowedOrigins from "./management/merchantAllowedOrigins";
|
||||
@@ -14,59 +15,208 @@ import MerchantTerminalSettings from "./management/merchantTerminalSettings";
|
||||
import MerchantUsers from "./management/merchantUsers";
|
||||
import MerchantWebhooks from "./management/merchantWebhooks";
|
||||
|
||||
// Recommended classes
|
||||
import APICredentialsCompanyLevelApi from './management/aPICredentialsCompanyLevelApi';
|
||||
import APICredentialsMerchantLevelApi from './management/aPICredentialsMerchantLevelApi';
|
||||
import APIKeyCompanyLevelApi from './management/aPIKeyCompanyLevelApi';
|
||||
import APIKeyMerchantLevelApi from './management/aPIKeyMerchantLevelApi';
|
||||
import AccountCompanyLevelApi from './management/accountCompanyLevelApi';
|
||||
import AccountMerchantLevelApi from './management/accountMerchantLevelApi';
|
||||
import AccountStoreLevelApi from './management/accountStoreLevelApi';
|
||||
import AllowedOriginsCompanyLevelApi from './management/allowedOriginsCompanyLevelApi';
|
||||
import AllowedOriginsMerchantLevelApi from './management/allowedOriginsMerchantLevelApi';
|
||||
import ClientKeyCompanyLevelApi from './management/clientKeyCompanyLevelApi';
|
||||
import ClientKeyMerchantLevelApi from './management/clientKeyMerchantLevelApi';
|
||||
import MyAPICredentialApi from './management/myAPICredentialApi';
|
||||
import PaymentMethodsMerchantLevelApi from './management/paymentMethodsMerchantLevelApi';
|
||||
import PayoutSettingsMerchantLevelApi from './management/payoutSettingsMerchantLevelApi';
|
||||
import TerminalActionsCompanyLevelApi from './management/terminalActionsCompanyLevelApi';
|
||||
import TerminalActionsTerminalLevelApi from './management/terminalActionsTerminalLevelApi';
|
||||
import TerminalOrdersCompanyLevelApi from './management/terminalOrdersCompanyLevelApi';
|
||||
import TerminalOrdersMerchantLevelApi from './management/terminalOrdersMerchantLevelApi';
|
||||
import TerminalSettingsCompanyLevelApi from './management/terminalSettingsCompanyLevelApi';
|
||||
import TerminalSettingsMerchantLevelApi from './management/terminalSettingsMerchantLevelApi';
|
||||
import TerminalSettingsStoreLevelApi from './management/terminalSettingsStoreLevelApi';
|
||||
import TerminalSettingsTerminalLevelApi from './management/terminalSettingsTerminalLevelApi';
|
||||
import TerminalsTerminalLevelApi from './management/terminalsTerminalLevelApi';
|
||||
import UsersCompanyLevelApi from './management/usersCompanyLevelApi';
|
||||
import UsersMerchantLevelApi from './management/usersMerchantLevelApi';
|
||||
import WebhooksCompanyLevelApi from './management/webhooksCompanyLevelApi';
|
||||
import WebhooksMerchantLevelApi from './management/webhooksMerchantLevelApi';
|
||||
|
||||
class Management extends Service {
|
||||
public constructor(client: Client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get Me() {
|
||||
const meApi = new MeApi(this.client);
|
||||
return meApi.Me;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantAccount() {
|
||||
return new MerchantAccount(this.client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantAllowedOrigins() {
|
||||
return new MerchantAllowedOrigins(this.client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantApiCredentials() {
|
||||
return new MerchantApiCredentials(this.client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantApiKey() {
|
||||
return new MerchantApiKey(this.client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantClientKey() {
|
||||
return new MerchantClientKey(this.client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantPaymentMethods() {
|
||||
return new MerchantPaymentMethods(this.client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantPayoutSettings() {
|
||||
return new MerchantPayoutSettings(this.client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantTerminalOrders() {
|
||||
return new MerchantTerminalOrders(this.client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantTerminalSettings() {
|
||||
return new MerchantTerminalSettings(this.client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantUsers() {
|
||||
return new MerchantUsers(this.client);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public get MerchantWebhooks() {
|
||||
return new MerchantWebhooks(this.client);
|
||||
}
|
||||
|
||||
// ## Recommended classes
|
||||
|
||||
public get APICredentialsCompanyLevelApi() {
|
||||
return new APICredentialsCompanyLevelApi(this.client);
|
||||
}
|
||||
public get APICredentialsMerchantLevelApi() {
|
||||
return new APICredentialsMerchantLevelApi(this.client);
|
||||
}
|
||||
public get APIKeyCompanyLevelApi() {
|
||||
return new APIKeyCompanyLevelApi(this.client);
|
||||
}
|
||||
public get APIKeyMerchantLevelApi() {
|
||||
return new APIKeyMerchantLevelApi(this.client);
|
||||
}
|
||||
public get AccountCompanyLevelApi() {
|
||||
return new AccountCompanyLevelApi(this.client);
|
||||
}
|
||||
public get AccountMerchantLevelApi() {
|
||||
return new AccountMerchantLevelApi(this.client);
|
||||
}
|
||||
public get AccountStoreLevelApi() {
|
||||
return new AccountStoreLevelApi(this.client);
|
||||
}
|
||||
public get AllowedOriginsCompanyLevelApi() {
|
||||
return new AllowedOriginsCompanyLevelApi(this.client);
|
||||
}
|
||||
public get AllowedOriginsMerchantLevelApi() {
|
||||
return new AllowedOriginsMerchantLevelApi(this.client);
|
||||
}
|
||||
public get ClientKeyCompanyLevelApi() {
|
||||
return new ClientKeyCompanyLevelApi(this.client);
|
||||
}
|
||||
public get ClientKeyMerchantLevelApi() {
|
||||
return new ClientKeyMerchantLevelApi(this.client);
|
||||
}
|
||||
public get MyAPICredentialApi() {
|
||||
return new MyAPICredentialApi(this.client);
|
||||
}
|
||||
public get PaymentMethodsMerchantLevelApi() {
|
||||
return new PaymentMethodsMerchantLevelApi(this.client);
|
||||
}
|
||||
public get PayoutSettingsMerchantLevelApi() {
|
||||
return new PayoutSettingsMerchantLevelApi(this.client);
|
||||
}
|
||||
public get TerminalActionsCompanyLevelApi() {
|
||||
return new TerminalActionsCompanyLevelApi(this.client);
|
||||
}
|
||||
public get TerminalActionsTerminalLevelApi() {
|
||||
return new TerminalActionsTerminalLevelApi(this.client);
|
||||
}
|
||||
public get TerminalOrdersCompanyLevelApi() {
|
||||
return new TerminalOrdersCompanyLevelApi(this.client);
|
||||
}
|
||||
public get TerminalOrdersMerchantLevelApi() {
|
||||
return new TerminalOrdersMerchantLevelApi(this.client);
|
||||
}
|
||||
public get TerminalSettingsCompanyLevelApi() {
|
||||
return new TerminalSettingsCompanyLevelApi(this.client);
|
||||
}
|
||||
public get TerminalSettingsMerchantLevelApi() {
|
||||
return new TerminalSettingsMerchantLevelApi(this.client);
|
||||
}
|
||||
public get TerminalSettingsStoreLevelApi() {
|
||||
return new TerminalSettingsStoreLevelApi(this.client);
|
||||
}
|
||||
public get TerminalSettingsTerminalLevelApi() {
|
||||
return new TerminalSettingsTerminalLevelApi(this.client);
|
||||
}
|
||||
public get TerminalsTerminalLevelApi() {
|
||||
return new TerminalsTerminalLevelApi(this.client);
|
||||
}
|
||||
public get UsersCompanyLevelApi() {
|
||||
return new UsersCompanyLevelApi(this.client);
|
||||
}
|
||||
public get UsersMerchantLevelApi() {
|
||||
return new UsersMerchantLevelApi(this.client);
|
||||
}
|
||||
public get WebhooksCompanyLevelApi() {
|
||||
return new WebhooksCompanyLevelApi(this.client);
|
||||
}
|
||||
public get WebhooksMerchantLevelApi() {
|
||||
return new WebhooksMerchantLevelApi(this.client);
|
||||
}
|
||||
}
|
||||
|
||||
export default Management;
|
||||
|
||||
95
src/services/management/aPICredentialsCompanyLevelApi.ts
Normal file
95
src/services/management/aPICredentialsCompanyLevelApi.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { CompanyApiCredential } from '../../typings/management/models';
|
||||
import { CreateCompanyApiCredentialRequest } from '../../typings/management/models';
|
||||
import { CreateCompanyApiCredentialResponse } from '../../typings/management/models';
|
||||
import { ListCompanyApiCredentialsResponse } from '../../typings/management/models';
|
||||
import { UpdateCompanyApiCredentialRequest } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class APICredentialsCompanyLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of API credentials
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 10 items on a page.
|
||||
*/
|
||||
public async listApiCredentials(companyId: string, requestOptions?: IRequest.Options): Promise<ListCompanyApiCredentialsResponse> {
|
||||
const localVarPath = "/companies/{companyId}/apiCredentials"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListCompanyApiCredentialsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListCompanyApiCredentialsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get an API credential
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
*/
|
||||
public async getApiCredential(companyId: string, apiCredentialId: string, requestOptions?: IRequest.Options): Promise<CompanyApiCredential> {
|
||||
const localVarPath = "/companies/{companyId}/apiCredentials/{apiCredentialId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, CompanyApiCredential>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "CompanyApiCredential");
|
||||
}
|
||||
/**
|
||||
* @summary Update an API credential.
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
* @param updateCompanyApiCredentialRequest
|
||||
*/
|
||||
public async updateApiCredential(companyId: string, apiCredentialId: string, updateCompanyApiCredentialRequest: UpdateCompanyApiCredentialRequest, requestOptions?: IRequest.Options): Promise<CompanyApiCredential> {
|
||||
const localVarPath = "/companies/{companyId}/apiCredentials/{apiCredentialId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: UpdateCompanyApiCredentialRequest = ObjectSerializer.serialize(updateCompanyApiCredentialRequest, "UpdateCompanyApiCredentialRequest");
|
||||
const response = await getJsonResponse<UpdateCompanyApiCredentialRequest, CompanyApiCredential>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "CompanyApiCredential");
|
||||
}
|
||||
/**
|
||||
* @summary Create an API credential.
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param createCompanyApiCredentialRequest
|
||||
*/
|
||||
public async createApiCredential(companyId: string, createCompanyApiCredentialRequest: CreateCompanyApiCredentialRequest, requestOptions?: IRequest.Options): Promise<CreateCompanyApiCredentialResponse> {
|
||||
const localVarPath = "/companies/{companyId}/apiCredentials"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: CreateCompanyApiCredentialRequest = ObjectSerializer.serialize(createCompanyApiCredentialRequest, "CreateCompanyApiCredentialRequest");
|
||||
const response = await getJsonResponse<CreateCompanyApiCredentialRequest, CreateCompanyApiCredentialResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "CreateCompanyApiCredentialResponse");
|
||||
}
|
||||
}
|
||||
95
src/services/management/aPICredentialsMerchantLevelApi.ts
Normal file
95
src/services/management/aPICredentialsMerchantLevelApi.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ApiCredential } from '../../typings/management/models';
|
||||
import { CreateApiCredentialResponse } from '../../typings/management/models';
|
||||
import { CreateMerchantApiCredentialRequest } from '../../typings/management/models';
|
||||
import { ListMerchantApiCredentialsResponse } from '../../typings/management/models';
|
||||
import { UpdateMerchantApiCredentialRequest } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class APICredentialsMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of API credentials
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 10 items on a page.
|
||||
*/
|
||||
public async listApiCredentials(merchantId: string, requestOptions?: IRequest.Options): Promise<ListMerchantApiCredentialsResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/apiCredentials"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListMerchantApiCredentialsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListMerchantApiCredentialsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get an API credential
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
*/
|
||||
public async getApiCredential(merchantId: string, apiCredentialId: string, requestOptions?: IRequest.Options): Promise<ApiCredential> {
|
||||
const localVarPath = "/merchants/{merchantId}/apiCredentials/{apiCredentialId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ApiCredential>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ApiCredential");
|
||||
}
|
||||
/**
|
||||
* @summary Update an API credential
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
* @param updateMerchantApiCredentialRequest
|
||||
*/
|
||||
public async updateApiCredential(merchantId: string, apiCredentialId: string, updateMerchantApiCredentialRequest: UpdateMerchantApiCredentialRequest, requestOptions?: IRequest.Options): Promise<ApiCredential> {
|
||||
const localVarPath = "/merchants/{merchantId}/apiCredentials/{apiCredentialId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: UpdateMerchantApiCredentialRequest = ObjectSerializer.serialize(updateMerchantApiCredentialRequest, "UpdateMerchantApiCredentialRequest");
|
||||
const response = await getJsonResponse<UpdateMerchantApiCredentialRequest, ApiCredential>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ApiCredential");
|
||||
}
|
||||
/**
|
||||
* @summary Create an API credential
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param createMerchantApiCredentialRequest
|
||||
*/
|
||||
public async createApiCredential(merchantId: string, createMerchantApiCredentialRequest: CreateMerchantApiCredentialRequest, requestOptions?: IRequest.Options): Promise<CreateApiCredentialResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/apiCredentials"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: CreateMerchantApiCredentialRequest = ObjectSerializer.serialize(createMerchantApiCredentialRequest, "CreateMerchantApiCredentialRequest");
|
||||
const response = await getJsonResponse<CreateMerchantApiCredentialRequest, CreateApiCredentialResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "CreateApiCredentialResponse");
|
||||
}
|
||||
}
|
||||
38
src/services/management/aPIKeyCompanyLevelApi.ts
Normal file
38
src/services/management/aPIKeyCompanyLevelApi.ts
Normal file
@@ -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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GenerateApiKeyResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class APIKeyCompanyLevelApi extends Service {
|
||||
/**
|
||||
* @summary Generate new API key
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
*/
|
||||
public async generateNewApiKey(companyId: string, apiCredentialId: string, requestOptions?: IRequest.Options): Promise<GenerateApiKeyResponse> {
|
||||
const localVarPath = "/companies/{companyId}/apiCredentials/{apiCredentialId}/generateApiKey"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, GenerateApiKeyResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "GenerateApiKeyResponse");
|
||||
}
|
||||
}
|
||||
38
src/services/management/aPIKeyMerchantLevelApi.ts
Normal file
38
src/services/management/aPIKeyMerchantLevelApi.ts
Normal file
@@ -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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GenerateApiKeyResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class APIKeyMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Generate new API key
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
*/
|
||||
public async generateNewApiKey(merchantId: string, apiCredentialId: string, requestOptions?: IRequest.Options): Promise<GenerateApiKeyResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateApiKey"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, GenerateApiKeyResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "GenerateApiKeyResponse");
|
||||
}
|
||||
}
|
||||
70
src/services/management/accountCompanyLevelApi.ts
Normal file
70
src/services/management/accountCompanyLevelApi.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { Company } from '../../typings/management/models';
|
||||
import { ListCompanyResponse } from '../../typings/management/models';
|
||||
import { ListMerchantResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class AccountCompanyLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of company accounts
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 10 items on a page.
|
||||
*/
|
||||
public async listCompanyAccounts(requestOptions?: IRequest.Options): Promise<ListCompanyResponse> {
|
||||
const localVarPath = "/companies";
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListCompanyResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListCompanyResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a company account
|
||||
* @param companyId The unique identifier of the company account.
|
||||
*/
|
||||
public async getCompanyAccount(companyId: string, requestOptions?: IRequest.Options): Promise<Company> {
|
||||
const localVarPath = "/companies/{companyId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Company>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Company");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of merchant accounts
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 10 items on a page.
|
||||
*/
|
||||
public async listMerchantAccounts(companyId: string, requestOptions?: IRequest.Options): Promise<ListMerchantResponse> {
|
||||
const localVarPath = "/companies/{companyId}/merchants"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListMerchantResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListMerchantResponse");
|
||||
}
|
||||
}
|
||||
85
src/services/management/accountMerchantLevelApi.ts
Normal file
85
src/services/management/accountMerchantLevelApi.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { CreateMerchantRequest } from '../../typings/management/models';
|
||||
import { CreateMerchantResponse } from '../../typings/management/models';
|
||||
import { ListMerchantResponse } from '../../typings/management/models';
|
||||
import { Merchant } from '../../typings/management/models';
|
||||
import { RequestActivationResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class AccountMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of merchant accounts
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 10 items on a page.
|
||||
*/
|
||||
public async listMerchantAccounts(requestOptions?: IRequest.Options): Promise<ListMerchantResponse> {
|
||||
const localVarPath = "/merchants";
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListMerchantResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListMerchantResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a merchant account
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
*/
|
||||
public async getMerchantAccount(merchantId: string, requestOptions?: IRequest.Options): Promise<Merchant> {
|
||||
const localVarPath = "/merchants/{merchantId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Merchant>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Merchant");
|
||||
}
|
||||
/**
|
||||
* @summary Create a merchant account
|
||||
* @param createMerchantRequest
|
||||
*/
|
||||
public async createMerchantAccount(createMerchantRequest: CreateMerchantRequest, requestOptions?: IRequest.Options): Promise<CreateMerchantResponse> {
|
||||
const localVarPath = "/merchants";
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: CreateMerchantRequest = ObjectSerializer.serialize(createMerchantRequest, "CreateMerchantRequest");
|
||||
const response = await getJsonResponse<CreateMerchantRequest, CreateMerchantResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "CreateMerchantResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Request to activate a merchant account
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
*/
|
||||
public async requestToActivateMerchantAccount(merchantId: string, requestOptions?: IRequest.Options): Promise<RequestActivationResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/activate"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, RequestActivationResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "RequestActivationResponse");
|
||||
}
|
||||
}
|
||||
160
src/services/management/accountStoreLevelApi.ts
Normal file
160
src/services/management/accountStoreLevelApi.ts
Normal file
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ListStoresResponse } from '../../typings/management/models';
|
||||
import { Store } from '../../typings/management/models';
|
||||
import { StoreCreationRequest } from '../../typings/management/models';
|
||||
import { StoreCreationWithMerchantCodeRequest } from '../../typings/management/models';
|
||||
import { UpdateStoreRequest } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class AccountStoreLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of stores
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 10 items on a page.
|
||||
* @param reference The reference of the store.
|
||||
*/
|
||||
public async listStoresByMerchantId(merchantId: string, requestOptions?: IRequest.Options): Promise<ListStoresResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/stores"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListStoresResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListStoresResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a store
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param storeId The unique identifier of the store.
|
||||
*/
|
||||
public async getStore(merchantId: string, storeId: string, requestOptions?: IRequest.Options): Promise<Store> {
|
||||
const localVarPath = "/merchants/{merchantId}/stores/{storeId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'storeId' + '}', encodeURIComponent(String(storeId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Store>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Store");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of stores
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 10 items on a page.
|
||||
* @param reference The reference of the store.
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
*/
|
||||
public async listStores(requestOptions?: IRequest.Options): Promise<ListStoresResponse> {
|
||||
const localVarPath = "/stores";
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListStoresResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListStoresResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a store
|
||||
* @param storeId The unique identifier of the store.
|
||||
*/
|
||||
public async getStoreById(storeId: string, requestOptions?: IRequest.Options): Promise<Store> {
|
||||
const localVarPath = "/stores/{storeId}"
|
||||
.replace('{' + 'storeId' + '}', encodeURIComponent(String(storeId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Store>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Store");
|
||||
}
|
||||
/**
|
||||
* @summary Update a store
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param storeId The unique identifier of the store.
|
||||
* @param updateStoreRequest
|
||||
*/
|
||||
public async updateStore(merchantId: string, storeId: string, updateStoreRequest: UpdateStoreRequest, requestOptions?: IRequest.Options): Promise<Store> {
|
||||
const localVarPath = "/merchants/{merchantId}/stores/{storeId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'storeId' + '}', encodeURIComponent(String(storeId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: UpdateStoreRequest = ObjectSerializer.serialize(updateStoreRequest, "UpdateStoreRequest");
|
||||
const response = await getJsonResponse<UpdateStoreRequest, Store>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Store");
|
||||
}
|
||||
/**
|
||||
* @summary Update a store
|
||||
* @param storeId The unique identifier of the store.
|
||||
* @param updateStoreRequest
|
||||
*/
|
||||
public async updateStoreById(storeId: string, updateStoreRequest: UpdateStoreRequest, requestOptions?: IRequest.Options): Promise<Store> {
|
||||
const localVarPath = "/stores/{storeId}"
|
||||
.replace('{' + 'storeId' + '}', encodeURIComponent(String(storeId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: UpdateStoreRequest = ObjectSerializer.serialize(updateStoreRequest, "UpdateStoreRequest");
|
||||
const response = await getJsonResponse<UpdateStoreRequest, Store>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Store");
|
||||
}
|
||||
/**
|
||||
* @summary Create a store
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param storeCreationRequest
|
||||
*/
|
||||
public async createStoreByMerchantId(merchantId: string, storeCreationRequest: StoreCreationRequest, requestOptions?: IRequest.Options): Promise<Store> {
|
||||
const localVarPath = "/merchants/{merchantId}/stores"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: StoreCreationRequest = ObjectSerializer.serialize(storeCreationRequest, "StoreCreationRequest");
|
||||
const response = await getJsonResponse<StoreCreationRequest, Store>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Store");
|
||||
}
|
||||
/**
|
||||
* @summary Create a store
|
||||
* @param storeCreationWithMerchantCodeRequest
|
||||
*/
|
||||
public async createStore(storeCreationWithMerchantCodeRequest: StoreCreationWithMerchantCodeRequest, requestOptions?: IRequest.Options): Promise<Store> {
|
||||
const localVarPath = "/stores";
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: StoreCreationWithMerchantCodeRequest = ObjectSerializer.serialize(storeCreationWithMerchantCodeRequest, "StoreCreationWithMerchantCodeRequest");
|
||||
const response = await getJsonResponse<StoreCreationWithMerchantCodeRequest, Store>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Store");
|
||||
}
|
||||
}
|
||||
95
src/services/management/allowedOriginsCompanyLevelApi.ts
Normal file
95
src/services/management/allowedOriginsCompanyLevelApi.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { AllowedOrigin } from '../../typings/management/models';
|
||||
import { AllowedOriginsResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class AllowedOriginsCompanyLevelApi extends Service {
|
||||
/**
|
||||
* @summary Delete an allowed origin
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
* @param originId Unique identifier of the allowed origin.
|
||||
*/
|
||||
public async deleteAllowedOrigin(companyId: string, apiCredentialId: string, originId: string, requestOptions?: IRequest.Options): Promise<void> {
|
||||
const localVarPath = "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)))
|
||||
.replace('{' + 'originId' + '}', encodeURIComponent(String(originId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
await getJsonResponse<string, void>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "DELETE" }
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of allowed origins
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
*/
|
||||
public async listAllowedOrigins(companyId: string, apiCredentialId: string, requestOptions?: IRequest.Options): Promise<AllowedOriginsResponse> {
|
||||
const localVarPath = "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, AllowedOriginsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AllowedOriginsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get an allowed origin
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
* @param originId Unique identifier of the allowed origin.
|
||||
*/
|
||||
public async getAllowedOrigin(companyId: string, apiCredentialId: string, originId: string, requestOptions?: IRequest.Options): Promise<AllowedOrigin> {
|
||||
const localVarPath = "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)))
|
||||
.replace('{' + 'originId' + '}', encodeURIComponent(String(originId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, AllowedOrigin>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AllowedOrigin");
|
||||
}
|
||||
/**
|
||||
* @summary Create an allowed origin
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
* @param allowedOrigin
|
||||
*/
|
||||
public async createAllowedOrigin(companyId: string, apiCredentialId: string, allowedOrigin: AllowedOrigin, requestOptions?: IRequest.Options): Promise<AllowedOriginsResponse> {
|
||||
const localVarPath = "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: AllowedOrigin = ObjectSerializer.serialize(allowedOrigin, "AllowedOrigin");
|
||||
const response = await getJsonResponse<AllowedOrigin, AllowedOriginsResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AllowedOriginsResponse");
|
||||
}
|
||||
}
|
||||
95
src/services/management/allowedOriginsMerchantLevelApi.ts
Normal file
95
src/services/management/allowedOriginsMerchantLevelApi.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { AllowedOrigin } from '../../typings/management/models';
|
||||
import { AllowedOriginsResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class AllowedOriginsMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Delete an allowed origin
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
* @param originId Unique identifier of the allowed origin.
|
||||
*/
|
||||
public async deleteAllowedOrigin(merchantId: string, apiCredentialId: string, originId: string, requestOptions?: IRequest.Options): Promise<void> {
|
||||
const localVarPath = "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)))
|
||||
.replace('{' + 'originId' + '}', encodeURIComponent(String(originId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
await getJsonResponse<string, void>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "DELETE" }
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of allowed origins
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
*/
|
||||
public async listAllowedOrigins(merchantId: string, apiCredentialId: string, requestOptions?: IRequest.Options): Promise<AllowedOriginsResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, AllowedOriginsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AllowedOriginsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get an allowed origin
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
* @param originId Unique identifier of the allowed origin.
|
||||
*/
|
||||
public async getAllowedOrigin(merchantId: string, apiCredentialId: string, originId: string, requestOptions?: IRequest.Options): Promise<AllowedOrigin> {
|
||||
const localVarPath = "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)))
|
||||
.replace('{' + 'originId' + '}', encodeURIComponent(String(originId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, AllowedOrigin>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AllowedOrigin");
|
||||
}
|
||||
/**
|
||||
* @summary Create an allowed origin
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
* @param allowedOrigin
|
||||
*/
|
||||
public async createAllowedOrigin(merchantId: string, apiCredentialId: string, allowedOrigin: AllowedOrigin, requestOptions?: IRequest.Options): Promise<AllowedOriginsResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: AllowedOrigin = ObjectSerializer.serialize(allowedOrigin, "AllowedOrigin");
|
||||
const response = await getJsonResponse<AllowedOrigin, AllowedOriginsResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AllowedOriginsResponse");
|
||||
}
|
||||
}
|
||||
38
src/services/management/clientKeyCompanyLevelApi.ts
Normal file
38
src/services/management/clientKeyCompanyLevelApi.ts
Normal file
@@ -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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GenerateClientKeyResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class ClientKeyCompanyLevelApi extends Service {
|
||||
/**
|
||||
* @summary Generate new client key
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
*/
|
||||
public async generateNewClientKey(companyId: string, apiCredentialId: string, requestOptions?: IRequest.Options): Promise<GenerateClientKeyResponse> {
|
||||
const localVarPath = "/companies/{companyId}/apiCredentials/{apiCredentialId}/generateClientKey"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, GenerateClientKeyResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "GenerateClientKeyResponse");
|
||||
}
|
||||
}
|
||||
38
src/services/management/clientKeyMerchantLevelApi.ts
Normal file
38
src/services/management/clientKeyMerchantLevelApi.ts
Normal file
@@ -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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { GenerateClientKeyResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class ClientKeyMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Generate new client key
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param apiCredentialId Unique identifier of the API credential.
|
||||
*/
|
||||
public async generateNewClientKey(merchantId: string, apiCredentialId: string, requestOptions?: IRequest.Options): Promise<GenerateClientKeyResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateClientKey"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'apiCredentialId' + '}', encodeURIComponent(String(apiCredentialId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, GenerateClientKeyResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "GenerateClientKeyResponse");
|
||||
}
|
||||
}
|
||||
94
src/services/management/myAPICredentialApi.ts
Normal file
94
src/services/management/myAPICredentialApi.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { AllowedOrigin } from '../../typings/management/models';
|
||||
import { AllowedOriginsResponse } from '../../typings/management/models';
|
||||
import { CreateAllowedOriginRequest } from '../../typings/management/models';
|
||||
import { MeApiCredential } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class MyAPICredentialApi extends Service {
|
||||
/**
|
||||
* @summary Remove allowed origin
|
||||
* @param originId Unique identifier of the allowed origin.
|
||||
*/
|
||||
public async removeAllowedOrigin(originId: string, requestOptions?: IRequest.Options): Promise<void> {
|
||||
const localVarPath = "/me/allowedOrigins/{originId}"
|
||||
.replace('{' + 'originId' + '}', encodeURIComponent(String(originId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
await getJsonResponse<string, void>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "DELETE" }
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @summary Get API credential details
|
||||
*/
|
||||
public async getApiCredentialDetails(requestOptions?: IRequest.Options): Promise<MeApiCredential> {
|
||||
const localVarPath = "/me";
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, MeApiCredential>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "MeApiCredential");
|
||||
}
|
||||
/**
|
||||
* @summary Get allowed origins
|
||||
*/
|
||||
public async getAllowedOrigins(requestOptions?: IRequest.Options): Promise<AllowedOriginsResponse> {
|
||||
const localVarPath = "/me/allowedOrigins";
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, AllowedOriginsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AllowedOriginsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get allowed origin details
|
||||
* @param originId Unique identifier of the allowed origin.
|
||||
*/
|
||||
public async getAllowedOriginDetails(originId: string, requestOptions?: IRequest.Options): Promise<AllowedOrigin> {
|
||||
const localVarPath = "/me/allowedOrigins/{originId}"
|
||||
.replace('{' + 'originId' + '}', encodeURIComponent(String(originId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, AllowedOrigin>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AllowedOrigin");
|
||||
}
|
||||
/**
|
||||
* @summary Add allowed origin
|
||||
* @param createAllowedOriginRequest
|
||||
*/
|
||||
public async addAllowedOrigin(createAllowedOriginRequest: CreateAllowedOriginRequest, requestOptions?: IRequest.Options): Promise<AllowedOriginsResponse> {
|
||||
const localVarPath = "/me/allowedOrigins";
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: CreateAllowedOriginRequest = ObjectSerializer.serialize(createAllowedOriginRequest, "CreateAllowedOriginRequest");
|
||||
const response = await getJsonResponse<CreateAllowedOriginRequest, AllowedOriginsResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AllowedOriginsResponse");
|
||||
}
|
||||
}
|
||||
132
src/services/management/paymentMethodsMerchantLevelApi.ts
Normal file
132
src/services/management/paymentMethodsMerchantLevelApi.ts
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ApplePayInfo } from '../../typings/management/models';
|
||||
import { PaymentMethod } from '../../typings/management/models';
|
||||
import { PaymentMethodResponse } from '../../typings/management/models';
|
||||
import { PaymentMethodSetupInfo } from '../../typings/management/models';
|
||||
import { UpdatePaymentMethodInfo } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class PaymentMethodsMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get all payment methods
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param storeId The unique identifier of the store for which to return the payment methods.
|
||||
* @param businessLineId The unique identifier of the Business Line for which to return the payment methods.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 10 items on a page.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
*/
|
||||
public async getAllPaymentMethods(merchantId: string, requestOptions?: IRequest.Options): Promise<PaymentMethodResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/paymentMethodSettings"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, PaymentMethodResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "PaymentMethodResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get payment method details
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param paymentMethodId The unique identifier of the payment method.
|
||||
*/
|
||||
public async getPaymentMethodDetails(merchantId: string, paymentMethodId: string, requestOptions?: IRequest.Options): Promise<PaymentMethod> {
|
||||
const localVarPath = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'paymentMethodId' + '}', encodeURIComponent(String(paymentMethodId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, PaymentMethod>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "PaymentMethod");
|
||||
}
|
||||
/**
|
||||
* @summary Get Apple Pay domains
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param paymentMethodId The unique identifier of the payment method.
|
||||
*/
|
||||
public async getApplePayDomains(merchantId: string, paymentMethodId: string, requestOptions?: IRequest.Options): Promise<ApplePayInfo> {
|
||||
const localVarPath = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/getApplePayDomains"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'paymentMethodId' + '}', encodeURIComponent(String(paymentMethodId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ApplePayInfo>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ApplePayInfo");
|
||||
}
|
||||
/**
|
||||
* @summary Update a payment method
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param paymentMethodId The unique identifier of the payment method.
|
||||
* @param updatePaymentMethodInfo
|
||||
*/
|
||||
public async updatePaymentMethod(merchantId: string, paymentMethodId: string, updatePaymentMethodInfo: UpdatePaymentMethodInfo, requestOptions?: IRequest.Options): Promise<PaymentMethod> {
|
||||
const localVarPath = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'paymentMethodId' + '}', encodeURIComponent(String(paymentMethodId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: UpdatePaymentMethodInfo = ObjectSerializer.serialize(updatePaymentMethodInfo, "UpdatePaymentMethodInfo");
|
||||
const response = await getJsonResponse<UpdatePaymentMethodInfo, PaymentMethod>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "PaymentMethod");
|
||||
}
|
||||
/**
|
||||
* @summary Request a payment method
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param paymentMethodSetupInfo
|
||||
*/
|
||||
public async requestPaymentMethod(merchantId: string, paymentMethodSetupInfo: PaymentMethodSetupInfo, requestOptions?: IRequest.Options): Promise<PaymentMethod> {
|
||||
const localVarPath = "/merchants/{merchantId}/paymentMethodSettings"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: PaymentMethodSetupInfo = ObjectSerializer.serialize(paymentMethodSetupInfo, "PaymentMethodSetupInfo");
|
||||
const response = await getJsonResponse<PaymentMethodSetupInfo, PaymentMethod>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "PaymentMethod");
|
||||
}
|
||||
/**
|
||||
* @summary Add an Apple Pay domain
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param paymentMethodId The unique identifier of the payment method.
|
||||
* @param applePayInfo
|
||||
*/
|
||||
public async addApplePayDomain(merchantId: string, paymentMethodId: string, applePayInfo: ApplePayInfo, requestOptions?: IRequest.Options): Promise<void> {
|
||||
const localVarPath = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'paymentMethodId' + '}', encodeURIComponent(String(paymentMethodId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: ApplePayInfo = ObjectSerializer.serialize(applePayInfo, "ApplePayInfo");
|
||||
await getJsonResponse<ApplePayInfo, void>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
}
|
||||
}
|
||||
108
src/services/management/payoutSettingsMerchantLevelApi.ts
Normal file
108
src/services/management/payoutSettingsMerchantLevelApi.ts
Normal file
@@ -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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { PayoutSettings } from '../../typings/management/models';
|
||||
import { PayoutSettingsRequest } from '../../typings/management/models';
|
||||
import { PayoutSettingsResponse } from '../../typings/management/models';
|
||||
import { UpdatePayoutSettingsRequest } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class PayoutSettingsMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Delete a payout setting
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param payoutSettingsId The unique identifier of the payout setting.
|
||||
*/
|
||||
public async deletePayoutSetting(merchantId: string, payoutSettingsId: string, requestOptions?: IRequest.Options): Promise<void> {
|
||||
const localVarPath = "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'payoutSettingsId' + '}', encodeURIComponent(String(payoutSettingsId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
await getJsonResponse<string, void>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "DELETE" }
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of payout settings
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
*/
|
||||
public async listPayoutSettings(merchantId: string, requestOptions?: IRequest.Options): Promise<PayoutSettingsResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/payoutSettings"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, PayoutSettingsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "PayoutSettingsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a payout setting
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param payoutSettingsId The unique identifier of the payout setting.
|
||||
*/
|
||||
public async getPayoutSetting(merchantId: string, payoutSettingsId: string, requestOptions?: IRequest.Options): Promise<PayoutSettings> {
|
||||
const localVarPath = "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'payoutSettingsId' + '}', encodeURIComponent(String(payoutSettingsId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, PayoutSettings>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "PayoutSettings");
|
||||
}
|
||||
/**
|
||||
* @summary Update a payout setting
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param payoutSettingsId The unique identifier of the payout setting.
|
||||
* @param updatePayoutSettingsRequest
|
||||
*/
|
||||
public async updatePayoutSetting(merchantId: string, payoutSettingsId: string, updatePayoutSettingsRequest: UpdatePayoutSettingsRequest, requestOptions?: IRequest.Options): Promise<PayoutSettings> {
|
||||
const localVarPath = "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'payoutSettingsId' + '}', encodeURIComponent(String(payoutSettingsId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: UpdatePayoutSettingsRequest = ObjectSerializer.serialize(updatePayoutSettingsRequest, "UpdatePayoutSettingsRequest");
|
||||
const response = await getJsonResponse<UpdatePayoutSettingsRequest, PayoutSettings>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "PayoutSettings");
|
||||
}
|
||||
/**
|
||||
* @summary Add a payout setting
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param payoutSettingsRequest
|
||||
*/
|
||||
public async addPayoutSetting(merchantId: string, payoutSettingsRequest: PayoutSettingsRequest, requestOptions?: IRequest.Options): Promise<PayoutSettings> {
|
||||
const localVarPath = "/merchants/{merchantId}/payoutSettings"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: PayoutSettingsRequest = ObjectSerializer.serialize(payoutSettingsRequest, "PayoutSettingsRequest");
|
||||
const response = await getJsonResponse<PayoutSettingsRequest, PayoutSettings>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "PayoutSettings");
|
||||
}
|
||||
}
|
||||
94
src/services/management/terminalActionsCompanyLevelApi.ts
Normal file
94
src/services/management/terminalActionsCompanyLevelApi.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { AndroidAppsResponse } from '../../typings/management/models';
|
||||
import { AndroidCertificatesResponse } from '../../typings/management/models';
|
||||
import { ExternalTerminalAction } from '../../typings/management/models';
|
||||
import { ListExternalTerminalActionsResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class TerminalActionsCompanyLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of Android apps
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 20 items on a page.
|
||||
*/
|
||||
public async listAndroidApps(companyId: string, requestOptions?: IRequest.Options): Promise<AndroidAppsResponse> {
|
||||
const localVarPath = "/companies/{companyId}/androidApps"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, AndroidAppsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AndroidAppsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of Android certificates
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 20 items on a page.
|
||||
*/
|
||||
public async listAndroidCertificates(companyId: string, requestOptions?: IRequest.Options): Promise<AndroidCertificatesResponse> {
|
||||
const localVarPath = "/companies/{companyId}/androidCertificates"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, AndroidCertificatesResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "AndroidCertificatesResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of terminal actions
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 20 items on a page.
|
||||
* @param status Returns terminal actions with the specified status. Allowed values: **pending**, **successful**, **failed**, **cancelled**, **tryLater**.
|
||||
* @param type Returns terminal actions of the specified type. Allowed values: **InstallAndroidApp**, **UninstallAndroidApp**, **InstallAndroidCertificate**, **UninstallAndroidCertificate**.
|
||||
*/
|
||||
public async listTerminalActions(companyId: string, requestOptions?: IRequest.Options): Promise<ListExternalTerminalActionsResponse> {
|
||||
const localVarPath = "/companies/{companyId}/terminalActions"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListExternalTerminalActionsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListExternalTerminalActionsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get terminal action
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param actionId The unique identifier of the terminal action.
|
||||
*/
|
||||
public async getTerminalAction(companyId: string, actionId: string, requestOptions?: IRequest.Options): Promise<ExternalTerminalAction> {
|
||||
const localVarPath = "/companies/{companyId}/terminalActions/{actionId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'actionId' + '}', encodeURIComponent(String(actionId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ExternalTerminalAction>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ExternalTerminalAction");
|
||||
}
|
||||
}
|
||||
37
src/services/management/terminalActionsTerminalLevelApi.ts
Normal file
37
src/services/management/terminalActionsTerminalLevelApi.ts
Normal file
@@ -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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ScheduleTerminalActionsRequest } from '../../typings/management/models';
|
||||
import { ScheduleTerminalActionsResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class TerminalActionsTerminalLevelApi extends Service {
|
||||
/**
|
||||
* @summary Create a terminal action
|
||||
* @param scheduleTerminalActionsRequest
|
||||
*/
|
||||
public async createTerminalAction(scheduleTerminalActionsRequest: ScheduleTerminalActionsRequest, requestOptions?: IRequest.Options): Promise<ScheduleTerminalActionsResponse> {
|
||||
const localVarPath = "/terminals/scheduleActions";
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: ScheduleTerminalActionsRequest = ObjectSerializer.serialize(scheduleTerminalActionsRequest, "ScheduleTerminalActionsRequest");
|
||||
const response = await getJsonResponse<ScheduleTerminalActionsRequest, ScheduleTerminalActionsResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ScheduleTerminalActionsResponse");
|
||||
}
|
||||
}
|
||||
202
src/services/management/terminalOrdersCompanyLevelApi.ts
Normal file
202
src/services/management/terminalOrdersCompanyLevelApi.ts
Normal file
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BillingEntitiesResponse } from '../../typings/management/models';
|
||||
import { ShippingLocation } from '../../typings/management/models';
|
||||
import { ShippingLocationsResponse } from '../../typings/management/models';
|
||||
import { TerminalModelsResponse } from '../../typings/management/models';
|
||||
import { TerminalOrder } from '../../typings/management/models';
|
||||
import { TerminalOrderRequest } from '../../typings/management/models';
|
||||
import { TerminalOrdersResponse } from '../../typings/management/models';
|
||||
import { TerminalProductsResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class TerminalOrdersCompanyLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of billing entities
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param name The name of the billing entity.
|
||||
*/
|
||||
public async listBillingEntities(companyId: string, requestOptions?: IRequest.Options): Promise<BillingEntitiesResponse> {
|
||||
const localVarPath = "/companies/{companyId}/billingEntities"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, BillingEntitiesResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "BillingEntitiesResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of shipping locations
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param name The name of the shipping location.
|
||||
* @param offset The number of locations to skip.
|
||||
* @param limit The number of locations to return.
|
||||
*/
|
||||
public async listShippingLocations(companyId: string, requestOptions?: IRequest.Options): Promise<ShippingLocationsResponse> {
|
||||
const localVarPath = "/companies/{companyId}/shippingLocations"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ShippingLocationsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ShippingLocationsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of terminal models
|
||||
* @param companyId The unique identifier of the company account.
|
||||
*/
|
||||
public async listTerminalModels(companyId: string, requestOptions?: IRequest.Options): Promise<TerminalModelsResponse> {
|
||||
const localVarPath = "/companies/{companyId}/terminalModels"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalModelsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalModelsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of orders
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param customerOrderReference Your purchase order number.
|
||||
* @param status The order status. Possible values (not case-sensitive): Placed, Confirmed, Cancelled, Shipped, Delivered.
|
||||
* @param offset The number of orders to skip.
|
||||
* @param limit The number of orders to return.
|
||||
*/
|
||||
public async listOrders(companyId: string, requestOptions?: IRequest.Options): Promise<TerminalOrdersResponse> {
|
||||
const localVarPath = "/companies/{companyId}/terminalOrders"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalOrdersResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalOrdersResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get an order
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param orderId The unique identifier of the order.
|
||||
*/
|
||||
public async getOrder(companyId: string, orderId: string, requestOptions?: IRequest.Options): Promise<TerminalOrder> {
|
||||
const localVarPath = "/companies/{companyId}/terminalOrders/{orderId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalOrder>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalOrder");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of terminal products
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param country The country to return products for, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **US**
|
||||
* @param terminalModelId The terminal model to return products for. Use the ID returned in the [GET `/terminalModels`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/terminalModels) response. For example, **Verifone.M400**
|
||||
* @param offset The number of products to skip.
|
||||
* @param limit The number of products to return.
|
||||
*/
|
||||
public async listTerminalProducts(companyId: string, requestOptions?: IRequest.Options): Promise<TerminalProductsResponse> {
|
||||
const localVarPath = "/companies/{companyId}/terminalProducts"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalProductsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalProductsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Update an order
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param orderId The unique identifier of the order.
|
||||
* @param terminalOrderRequest
|
||||
*/
|
||||
public async updateOrder(companyId: string, orderId: string, terminalOrderRequest: TerminalOrderRequest, requestOptions?: IRequest.Options): Promise<TerminalOrder> {
|
||||
const localVarPath = "/companies/{companyId}/terminalOrders/{orderId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TerminalOrderRequest = ObjectSerializer.serialize(terminalOrderRequest, "TerminalOrderRequest");
|
||||
const response = await getJsonResponse<TerminalOrderRequest, TerminalOrder>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalOrder");
|
||||
}
|
||||
/**
|
||||
* @summary Create a shipping location
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param shippingLocation
|
||||
*/
|
||||
public async createShippingLocation(companyId: string, shippingLocation: ShippingLocation, requestOptions?: IRequest.Options): Promise<ShippingLocation> {
|
||||
const localVarPath = "/companies/{companyId}/shippingLocations"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: ShippingLocation = ObjectSerializer.serialize(shippingLocation, "ShippingLocation");
|
||||
const response = await getJsonResponse<ShippingLocation, ShippingLocation>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ShippingLocation");
|
||||
}
|
||||
/**
|
||||
* @summary Create an order
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param terminalOrderRequest
|
||||
*/
|
||||
public async createOrder(companyId: string, terminalOrderRequest: TerminalOrderRequest, requestOptions?: IRequest.Options): Promise<TerminalOrder> {
|
||||
const localVarPath = "/companies/{companyId}/terminalOrders"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TerminalOrderRequest = ObjectSerializer.serialize(terminalOrderRequest, "TerminalOrderRequest");
|
||||
const response = await getJsonResponse<TerminalOrderRequest, TerminalOrder>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalOrder");
|
||||
}
|
||||
/**
|
||||
* @summary Cancel an order
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param orderId The unique identifier of the order.
|
||||
*/
|
||||
public async cancelOrder(companyId: string, orderId: string, requestOptions?: IRequest.Options): Promise<TerminalOrder> {
|
||||
const localVarPath = "/companies/{companyId}/terminalOrders/{orderId}/cancel"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalOrder>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalOrder");
|
||||
}
|
||||
}
|
||||
202
src/services/management/terminalOrdersMerchantLevelApi.ts
Normal file
202
src/services/management/terminalOrdersMerchantLevelApi.ts
Normal file
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { BillingEntitiesResponse } from '../../typings/management/models';
|
||||
import { ShippingLocation } from '../../typings/management/models';
|
||||
import { ShippingLocationsResponse } from '../../typings/management/models';
|
||||
import { TerminalModelsResponse } from '../../typings/management/models';
|
||||
import { TerminalOrder } from '../../typings/management/models';
|
||||
import { TerminalOrderRequest } from '../../typings/management/models';
|
||||
import { TerminalOrdersResponse } from '../../typings/management/models';
|
||||
import { TerminalProductsResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class TerminalOrdersMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of billing entities
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param name The name of the billing entity.
|
||||
*/
|
||||
public async listBillingEntities(merchantId: string, requestOptions?: IRequest.Options): Promise<BillingEntitiesResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/billingEntities"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, BillingEntitiesResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "BillingEntitiesResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of shipping locations
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param name The name of the shipping location.
|
||||
* @param offset The number of locations to skip.
|
||||
* @param limit The number of locations to return.
|
||||
*/
|
||||
public async listShippingLocations(merchantId: string, requestOptions?: IRequest.Options): Promise<ShippingLocationsResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/shippingLocations"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ShippingLocationsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ShippingLocationsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of terminal models
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
*/
|
||||
public async listTerminalModels(merchantId: string, requestOptions?: IRequest.Options): Promise<TerminalModelsResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalModels"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalModelsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalModelsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of orders
|
||||
* @param merchantId
|
||||
* @param customerOrderReference Your purchase order number.
|
||||
* @param status The order status. Possible values (not case-sensitive): Placed, Confirmed, Cancelled, Shipped, Delivered.
|
||||
* @param offset The number of orders to skip.
|
||||
* @param limit The number of orders to return.
|
||||
*/
|
||||
public async listOrders(merchantId: string, requestOptions?: IRequest.Options): Promise<TerminalOrdersResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalOrders"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalOrdersResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalOrdersResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get an order
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param orderId The unique identifier of the order.
|
||||
*/
|
||||
public async getOrder(merchantId: string, orderId: string, requestOptions?: IRequest.Options): Promise<TerminalOrder> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalOrders/{orderId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalOrder>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalOrder");
|
||||
}
|
||||
/**
|
||||
* @summary Get a list of terminal products
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param country The country to return products for, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **US**
|
||||
* @param terminalModelId The terminal model to return products for. Use the ID returned in the [GET `/terminalModels`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/terminalModels) response. For example, **Verifone.M400**
|
||||
* @param offset The number of products to skip.
|
||||
* @param limit The number of products to return.
|
||||
*/
|
||||
public async listTerminalProducts(merchantId: string, requestOptions?: IRequest.Options): Promise<TerminalProductsResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalProducts"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalProductsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalProductsResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Update an order
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param orderId The unique identifier of the order.
|
||||
* @param terminalOrderRequest
|
||||
*/
|
||||
public async updateOrder(merchantId: string, orderId: string, terminalOrderRequest: TerminalOrderRequest, requestOptions?: IRequest.Options): Promise<TerminalOrder> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalOrders/{orderId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TerminalOrderRequest = ObjectSerializer.serialize(terminalOrderRequest, "TerminalOrderRequest");
|
||||
const response = await getJsonResponse<TerminalOrderRequest, TerminalOrder>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalOrder");
|
||||
}
|
||||
/**
|
||||
* @summary Create a shipping location
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param shippingLocation
|
||||
*/
|
||||
public async createShippingLocation(merchantId: string, shippingLocation: ShippingLocation, requestOptions?: IRequest.Options): Promise<ShippingLocation> {
|
||||
const localVarPath = "/merchants/{merchantId}/shippingLocations"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: ShippingLocation = ObjectSerializer.serialize(shippingLocation, "ShippingLocation");
|
||||
const response = await getJsonResponse<ShippingLocation, ShippingLocation>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ShippingLocation");
|
||||
}
|
||||
/**
|
||||
* @summary Create an order
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param terminalOrderRequest
|
||||
*/
|
||||
public async createOrder(merchantId: string, terminalOrderRequest: TerminalOrderRequest, requestOptions?: IRequest.Options): Promise<TerminalOrder> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalOrders"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TerminalOrderRequest = ObjectSerializer.serialize(terminalOrderRequest, "TerminalOrderRequest");
|
||||
const response = await getJsonResponse<TerminalOrderRequest, TerminalOrder>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalOrder");
|
||||
}
|
||||
/**
|
||||
* @summary Cancel an order
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param orderId The unique identifier of the order.
|
||||
*/
|
||||
public async cancelOrder(merchantId: string, orderId: string, requestOptions?: IRequest.Options): Promise<TerminalOrder> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalOrders/{orderId}/cancel"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalOrder>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalOrder");
|
||||
}
|
||||
}
|
||||
88
src/services/management/terminalSettingsCompanyLevelApi.ts
Normal file
88
src/services/management/terminalSettingsCompanyLevelApi.ts
Normal file
@@ -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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { Logo } from '../../typings/management/models';
|
||||
import { TerminalSettings } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class TerminalSettingsCompanyLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get the terminal logo
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param model The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T.
|
||||
*/
|
||||
public async getTerminalLogo(companyId: string, requestOptions?: IRequest.Options): Promise<Logo> {
|
||||
const localVarPath = "/companies/{companyId}/terminalLogos"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Logo>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Logo");
|
||||
}
|
||||
/**
|
||||
* @summary Get terminal settings
|
||||
* @param companyId The unique identifier of the company account.
|
||||
*/
|
||||
public async getTerminalSettings(companyId: string, requestOptions?: IRequest.Options): Promise<TerminalSettings> {
|
||||
const localVarPath = "/companies/{companyId}/terminalSettings"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalSettings>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalSettings");
|
||||
}
|
||||
/**
|
||||
* @summary Update the terminal logo
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param model The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T.
|
||||
* @param logo
|
||||
*/
|
||||
public async updateTerminalLogo(companyId: string, logo: Logo, requestOptions?: IRequest.Options): Promise<Logo> {
|
||||
const localVarPath = "/companies/{companyId}/terminalLogos"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: Logo = ObjectSerializer.serialize(logo, "Logo");
|
||||
const response = await getJsonResponse<Logo, Logo>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Logo");
|
||||
}
|
||||
/**
|
||||
* @summary Update terminal settings
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param terminalSettings
|
||||
*/
|
||||
public async updateTerminalSettings(companyId: string, terminalSettings: TerminalSettings, requestOptions?: IRequest.Options): Promise<TerminalSettings> {
|
||||
const localVarPath = "/companies/{companyId}/terminalSettings"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TerminalSettings = ObjectSerializer.serialize(terminalSettings, "TerminalSettings");
|
||||
const response = await getJsonResponse<TerminalSettings, TerminalSettings>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalSettings");
|
||||
}
|
||||
}
|
||||
88
src/services/management/terminalSettingsMerchantLevelApi.ts
Normal file
88
src/services/management/terminalSettingsMerchantLevelApi.ts
Normal file
@@ -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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { Logo } from '../../typings/management/models';
|
||||
import { TerminalSettings } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class TerminalSettingsMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get the terminal logo
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param model The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T.
|
||||
*/
|
||||
public async getTerminalLogo(merchantId: string, requestOptions?: IRequest.Options): Promise<Logo> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalLogos"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Logo>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Logo");
|
||||
}
|
||||
/**
|
||||
* @summary Get terminal settings
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
*/
|
||||
public async getTerminalSettings(merchantId: string, requestOptions?: IRequest.Options): Promise<TerminalSettings> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalSettings"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalSettings>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalSettings");
|
||||
}
|
||||
/**
|
||||
* @summary Update the terminal logo
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param model The terminal model. Allowed values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T.
|
||||
* @param logo
|
||||
*/
|
||||
public async updateTerminalLogo(merchantId: string, logo: Logo, requestOptions?: IRequest.Options): Promise<Logo> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalLogos"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: Logo = ObjectSerializer.serialize(logo, "Logo");
|
||||
const response = await getJsonResponse<Logo, Logo>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Logo");
|
||||
}
|
||||
/**
|
||||
* @summary Update terminal settings
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param terminalSettings
|
||||
*/
|
||||
public async updateTerminalSettings(merchantId: string, terminalSettings: TerminalSettings, requestOptions?: IRequest.Options): Promise<TerminalSettings> {
|
||||
const localVarPath = "/merchants/{merchantId}/terminalSettings"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TerminalSettings = ObjectSerializer.serialize(terminalSettings, "TerminalSettings");
|
||||
const response = await getJsonResponse<TerminalSettings, TerminalSettings>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalSettings");
|
||||
}
|
||||
}
|
||||
162
src/services/management/terminalSettingsStoreLevelApi.ts
Normal file
162
src/services/management/terminalSettingsStoreLevelApi.ts
Normal file
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { Logo } from '../../typings/management/models';
|
||||
import { TerminalSettings } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class TerminalSettingsStoreLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get the terminal logo
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param reference The reference that identifies the store.
|
||||
* @param model The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T.
|
||||
*/
|
||||
public async getTerminalLogo(merchantId: string, reference: string, requestOptions?: IRequest.Options): Promise<Logo> {
|
||||
const localVarPath = "/merchants/{merchantId}/stores/{reference}/terminalLogos"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'reference' + '}', encodeURIComponent(String(reference)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Logo>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Logo");
|
||||
}
|
||||
/**
|
||||
* @summary Get terminal settings
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param reference The reference that identifies the store.
|
||||
*/
|
||||
public async getTerminalSettings(merchantId: string, reference: string, requestOptions?: IRequest.Options): Promise<TerminalSettings> {
|
||||
const localVarPath = "/merchants/{merchantId}/stores/{reference}/terminalSettings"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'reference' + '}', encodeURIComponent(String(reference)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalSettings>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalSettings");
|
||||
}
|
||||
/**
|
||||
* @summary Get the terminal logo
|
||||
* @param storeId The unique identifier of the store.
|
||||
* @param model The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T.
|
||||
*/
|
||||
public async getTerminalLogoByStoreId(storeId: string, requestOptions?: IRequest.Options): Promise<Logo> {
|
||||
const localVarPath = "/stores/{storeId}/terminalLogos"
|
||||
.replace('{' + 'storeId' + '}', encodeURIComponent(String(storeId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Logo>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Logo");
|
||||
}
|
||||
/**
|
||||
* @summary Get terminal settings
|
||||
* @param storeId The unique identifier of the store.
|
||||
*/
|
||||
public async getTerminalSettingsByStoreId(storeId: string, requestOptions?: IRequest.Options): Promise<TerminalSettings> {
|
||||
const localVarPath = "/stores/{storeId}/terminalSettings"
|
||||
.replace('{' + 'storeId' + '}', encodeURIComponent(String(storeId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalSettings>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalSettings");
|
||||
}
|
||||
/**
|
||||
* @summary Update the terminal logo
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param reference The reference that identifies the store.
|
||||
* @param model The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T
|
||||
* @param logo
|
||||
*/
|
||||
public async updateTerminalLogo(merchantId: string, reference: string, logo: Logo, requestOptions?: IRequest.Options): Promise<Logo> {
|
||||
const localVarPath = "/merchants/{merchantId}/stores/{reference}/terminalLogos"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'reference' + '}', encodeURIComponent(String(reference)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: Logo = ObjectSerializer.serialize(logo, "Logo");
|
||||
const response = await getJsonResponse<Logo, Logo>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Logo");
|
||||
}
|
||||
/**
|
||||
* @summary Update terminal settings
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param reference The reference that identifies the store.
|
||||
* @param terminalSettings
|
||||
*/
|
||||
public async updateTerminalSettings(merchantId: string, reference: string, terminalSettings: TerminalSettings, requestOptions?: IRequest.Options): Promise<TerminalSettings> {
|
||||
const localVarPath = "/merchants/{merchantId}/stores/{reference}/terminalSettings"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'reference' + '}', encodeURIComponent(String(reference)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TerminalSettings = ObjectSerializer.serialize(terminalSettings, "TerminalSettings");
|
||||
const response = await getJsonResponse<TerminalSettings, TerminalSettings>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalSettings");
|
||||
}
|
||||
/**
|
||||
* @summary Update the terminal logo
|
||||
* @param storeId The unique identifier of the store.
|
||||
* @param model The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T.
|
||||
* @param logo
|
||||
*/
|
||||
public async updateTerminalLogoByStoreId(storeId: string, logo: Logo, requestOptions?: IRequest.Options): Promise<Logo> {
|
||||
const localVarPath = "/stores/{storeId}/terminalLogos"
|
||||
.replace('{' + 'storeId' + '}', encodeURIComponent(String(storeId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: Logo = ObjectSerializer.serialize(logo, "Logo");
|
||||
const response = await getJsonResponse<Logo, Logo>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Logo");
|
||||
}
|
||||
/**
|
||||
* @summary Update terminal settings
|
||||
* @param storeId The unique identifier of the store.
|
||||
* @param terminalSettings
|
||||
*/
|
||||
public async updateTerminalSettingsByStoreId(storeId: string, terminalSettings: TerminalSettings, requestOptions?: IRequest.Options): Promise<TerminalSettings> {
|
||||
const localVarPath = "/stores/{storeId}/terminalSettings"
|
||||
.replace('{' + 'storeId' + '}', encodeURIComponent(String(storeId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TerminalSettings = ObjectSerializer.serialize(terminalSettings, "TerminalSettings");
|
||||
const response = await getJsonResponse<TerminalSettings, TerminalSettings>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalSettings");
|
||||
}
|
||||
}
|
||||
86
src/services/management/terminalSettingsTerminalLevelApi.ts
Normal file
86
src/services/management/terminalSettingsTerminalLevelApi.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { Logo } from '../../typings/management/models';
|
||||
import { TerminalSettings } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class TerminalSettingsTerminalLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get the terminal logo
|
||||
* @param terminalId The unique identifier of the payment terminal.
|
||||
*/
|
||||
public async getTerminalLogo(terminalId: string, requestOptions?: IRequest.Options): Promise<Logo> {
|
||||
const localVarPath = "/terminals/{terminalId}/terminalLogos"
|
||||
.replace('{' + 'terminalId' + '}', encodeURIComponent(String(terminalId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Logo>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Logo");
|
||||
}
|
||||
/**
|
||||
* @summary Get terminal settings
|
||||
* @param terminalId The unique identifier of the payment terminal.
|
||||
*/
|
||||
public async getTerminalSettings(terminalId: string, requestOptions?: IRequest.Options): Promise<TerminalSettings> {
|
||||
const localVarPath = "/terminals/{terminalId}/terminalSettings"
|
||||
.replace('{' + 'terminalId' + '}', encodeURIComponent(String(terminalId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, TerminalSettings>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalSettings");
|
||||
}
|
||||
/**
|
||||
* @summary Update the logo
|
||||
* @param terminalId The unique identifier of the payment terminal.
|
||||
* @param logo
|
||||
*/
|
||||
public async updateLogo(terminalId: string, logo: Logo, requestOptions?: IRequest.Options): Promise<Logo> {
|
||||
const localVarPath = "/terminals/{terminalId}/terminalLogos"
|
||||
.replace('{' + 'terminalId' + '}', encodeURIComponent(String(terminalId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: Logo = ObjectSerializer.serialize(logo, "Logo");
|
||||
const response = await getJsonResponse<Logo, Logo>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Logo");
|
||||
}
|
||||
/**
|
||||
* @summary Update terminal settings
|
||||
* @param terminalId The unique identifier of the payment terminal.
|
||||
* @param terminalSettings
|
||||
*/
|
||||
public async updateTerminalSettings(terminalId: string, terminalSettings: TerminalSettings, requestOptions?: IRequest.Options): Promise<TerminalSettings> {
|
||||
const localVarPath = "/terminals/{terminalId}/terminalSettings"
|
||||
.replace('{' + 'terminalId' + '}', encodeURIComponent(String(terminalId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TerminalSettings = ObjectSerializer.serialize(terminalSettings, "TerminalSettings");
|
||||
const response = await getJsonResponse<TerminalSettings, TerminalSettings>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TerminalSettings");
|
||||
}
|
||||
}
|
||||
41
src/services/management/terminalsTerminalLevelApi.ts
Normal file
41
src/services/management/terminalsTerminalLevelApi.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { ListTerminalsResponse } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class TerminalsTerminalLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of terminals
|
||||
* @param searchQuery Returns terminals with an ID that contains the specified string. If present, other query parameters are ignored.
|
||||
* @param countries Returns terminals located in the countries specified by their [two-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
|
||||
* @param merchantIds Returns terminals that belong to the merchant accounts specified by their unique merchant account ID.
|
||||
* @param storeIds Returns terminals that are assigned to the [stores](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores) specified by their unique store ID.
|
||||
* @param brandModels Returns terminals of the [models](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/companies/{companyId}/terminalModels) specified in the format *brand.model*.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 20 items on a page.
|
||||
*/
|
||||
public async listTerminals(requestOptions?: IRequest.Options): Promise<ListTerminalsResponse> {
|
||||
const localVarPath = "/terminals";
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListTerminalsResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListTerminalsResponse");
|
||||
}
|
||||
}
|
||||
95
src/services/management/usersCompanyLevelApi.ts
Normal file
95
src/services/management/usersCompanyLevelApi.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { CompanyUser } from '../../typings/management/models';
|
||||
import { CreateCompanyUserRequest } from '../../typings/management/models';
|
||||
import { CreateCompanyUserResponse } from '../../typings/management/models';
|
||||
import { ListCompanyUsersResponse } from '../../typings/management/models';
|
||||
import { UpdateCompanyUserRequest } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class UsersCompanyLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of users
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param pageNumber The number of the page to return.
|
||||
* @param pageSize The number of items to have on a page. Maximum value is **100**. The default is **10** items on a page.
|
||||
*/
|
||||
public async listUsers(companyId: string, requestOptions?: IRequest.Options): Promise<ListCompanyUsersResponse> {
|
||||
const localVarPath = "/companies/{companyId}/users"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListCompanyUsersResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListCompanyUsersResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get user details
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param userId The unique identifier of the user.
|
||||
*/
|
||||
public async getUserDetails(companyId: string, userId: string, requestOptions?: IRequest.Options): Promise<CompanyUser> {
|
||||
const localVarPath = "/companies/{companyId}/users/{userId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, CompanyUser>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "CompanyUser");
|
||||
}
|
||||
/**
|
||||
* @summary Update user details
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param userId The unique identifier of the user.
|
||||
* @param updateCompanyUserRequest
|
||||
*/
|
||||
public async updateUserDetails(companyId: string, userId: string, updateCompanyUserRequest: UpdateCompanyUserRequest, requestOptions?: IRequest.Options): Promise<CompanyUser> {
|
||||
const localVarPath = "/companies/{companyId}/users/{userId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: UpdateCompanyUserRequest = ObjectSerializer.serialize(updateCompanyUserRequest, "UpdateCompanyUserRequest");
|
||||
const response = await getJsonResponse<UpdateCompanyUserRequest, CompanyUser>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "CompanyUser");
|
||||
}
|
||||
/**
|
||||
* @summary Create a new user
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param createCompanyUserRequest
|
||||
*/
|
||||
public async createNewUser(companyId: string, createCompanyUserRequest: CreateCompanyUserRequest, requestOptions?: IRequest.Options): Promise<CreateCompanyUserResponse> {
|
||||
const localVarPath = "/companies/{companyId}/users"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: CreateCompanyUserRequest = ObjectSerializer.serialize(createCompanyUserRequest, "CreateCompanyUserRequest");
|
||||
const response = await getJsonResponse<CreateCompanyUserRequest, CreateCompanyUserResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "CreateCompanyUserResponse");
|
||||
}
|
||||
}
|
||||
95
src/services/management/usersMerchantLevelApi.ts
Normal file
95
src/services/management/usersMerchantLevelApi.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { CreateMerchantUserRequest } from '../../typings/management/models';
|
||||
import { CreateUserResponse } from '../../typings/management/models';
|
||||
import { ListMerchantUsersResponse } from '../../typings/management/models';
|
||||
import { UpdateMerchantUserRequest } from '../../typings/management/models';
|
||||
import { User } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class UsersMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Get a list of users
|
||||
* @param merchantId Unique identifier of the merchant.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page. Maximum value is **100**. The default is **10** items on a page.
|
||||
*/
|
||||
public async listUsers(merchantId: string, requestOptions?: IRequest.Options): Promise<ListMerchantUsersResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/users"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListMerchantUsersResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListMerchantUsersResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get user details
|
||||
* @param merchantId Unique identifier of the merchant.
|
||||
* @param userId Unique identifier of the user.
|
||||
*/
|
||||
public async getUserDetails(merchantId: string, userId: string, requestOptions?: IRequest.Options): Promise<User> {
|
||||
const localVarPath = "/merchants/{merchantId}/users/{userId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, User>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "User");
|
||||
}
|
||||
/**
|
||||
* @summary Update a user
|
||||
* @param merchantId Unique identifier of the merchant.
|
||||
* @param userId Unique identifier of the user.
|
||||
* @param updateMerchantUserRequest
|
||||
*/
|
||||
public async updateUser(merchantId: string, userId: string, updateMerchantUserRequest: UpdateMerchantUserRequest, requestOptions?: IRequest.Options): Promise<User> {
|
||||
const localVarPath = "/merchants/{merchantId}/users/{userId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: UpdateMerchantUserRequest = ObjectSerializer.serialize(updateMerchantUserRequest, "UpdateMerchantUserRequest");
|
||||
const response = await getJsonResponse<UpdateMerchantUserRequest, User>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "User");
|
||||
}
|
||||
/**
|
||||
* @summary Create a new user
|
||||
* @param merchantId Unique identifier of the merchant.
|
||||
* @param createMerchantUserRequest
|
||||
*/
|
||||
public async createNewUser(merchantId: string, createMerchantUserRequest: CreateMerchantUserRequest, requestOptions?: IRequest.Options): Promise<CreateUserResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/users"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: CreateMerchantUserRequest = ObjectSerializer.serialize(createMerchantUserRequest, "CreateMerchantUserRequest");
|
||||
const response = await getJsonResponse<CreateMerchantUserRequest, CreateUserResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "CreateUserResponse");
|
||||
}
|
||||
}
|
||||
149
src/services/management/webhooksCompanyLevelApi.ts
Normal file
149
src/services/management/webhooksCompanyLevelApi.ts
Normal file
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { CreateCompanyWebhookRequest } from '../../typings/management/models';
|
||||
import { GenerateHmacKeyResponse } from '../../typings/management/models';
|
||||
import { ListWebhooksResponse } from '../../typings/management/models';
|
||||
import { TestCompanyWebhookRequest } from '../../typings/management/models';
|
||||
import { TestWebhookResponse } from '../../typings/management/models';
|
||||
import { UpdateCompanyWebhookRequest } from '../../typings/management/models';
|
||||
import { Webhook } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class WebhooksCompanyLevelApi extends Service {
|
||||
/**
|
||||
* @summary Remove a webhook
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param webhookId Unique identifier of the webhook configuration.
|
||||
*/
|
||||
public async removeWebhook(companyId: string, webhookId: string, requestOptions?: IRequest.Options): Promise<void> {
|
||||
const localVarPath = "/companies/{companyId}/webhooks/{webhookId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
await getJsonResponse<string, void>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "DELETE" }
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @summary List all webhooks
|
||||
* @param companyId Unique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account).
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 10 items on a page.
|
||||
*/
|
||||
public async listAllWebhooks(companyId: string, requestOptions?: IRequest.Options): Promise<ListWebhooksResponse> {
|
||||
const localVarPath = "/companies/{companyId}/webhooks"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListWebhooksResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListWebhooksResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a webhook
|
||||
* @param companyId Unique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account).
|
||||
* @param webhookId Unique identifier of the webhook configuration.
|
||||
*/
|
||||
public async getWebhook(companyId: string, webhookId: string, requestOptions?: IRequest.Options): Promise<Webhook> {
|
||||
const localVarPath = "/companies/{companyId}/webhooks/{webhookId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Webhook>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Webhook");
|
||||
}
|
||||
/**
|
||||
* @summary Update a webhook
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param webhookId Unique identifier of the webhook configuration.
|
||||
* @param updateCompanyWebhookRequest
|
||||
*/
|
||||
public async updateWebhook(companyId: string, webhookId: string, updateCompanyWebhookRequest: UpdateCompanyWebhookRequest, requestOptions?: IRequest.Options): Promise<Webhook> {
|
||||
const localVarPath = "/companies/{companyId}/webhooks/{webhookId}"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: UpdateCompanyWebhookRequest = ObjectSerializer.serialize(updateCompanyWebhookRequest, "UpdateCompanyWebhookRequest");
|
||||
const response = await getJsonResponse<UpdateCompanyWebhookRequest, Webhook>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Webhook");
|
||||
}
|
||||
/**
|
||||
* @summary Set up a webhook
|
||||
* @param companyId Unique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account).
|
||||
* @param createCompanyWebhookRequest
|
||||
*/
|
||||
public async setUpWebhook(companyId: string, createCompanyWebhookRequest: CreateCompanyWebhookRequest, requestOptions?: IRequest.Options): Promise<Webhook> {
|
||||
const localVarPath = "/companies/{companyId}/webhooks"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: CreateCompanyWebhookRequest = ObjectSerializer.serialize(createCompanyWebhookRequest, "CreateCompanyWebhookRequest");
|
||||
const response = await getJsonResponse<CreateCompanyWebhookRequest, Webhook>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Webhook");
|
||||
}
|
||||
/**
|
||||
* @summary Generate an HMAC key
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param webhookId Unique identifier of the webhook configuration.
|
||||
*/
|
||||
public async generateHmacKey(companyId: string, webhookId: string, requestOptions?: IRequest.Options): Promise<GenerateHmacKeyResponse> {
|
||||
const localVarPath = "/companies/{companyId}/webhooks/{webhookId}/generateHmac"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, GenerateHmacKeyResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "GenerateHmacKeyResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Test a webhook
|
||||
* @param companyId The unique identifier of the company account.
|
||||
* @param webhookId Unique identifier of the webhook configuration.
|
||||
* @param testCompanyWebhookRequest
|
||||
*/
|
||||
public async testWebhook(companyId: string, webhookId: string, testCompanyWebhookRequest: TestCompanyWebhookRequest, requestOptions?: IRequest.Options): Promise<TestWebhookResponse> {
|
||||
const localVarPath = "/companies/{companyId}/webhooks/{webhookId}/test"
|
||||
.replace('{' + 'companyId' + '}', encodeURIComponent(String(companyId)))
|
||||
.replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TestCompanyWebhookRequest = ObjectSerializer.serialize(testCompanyWebhookRequest, "TestCompanyWebhookRequest");
|
||||
const response = await getJsonResponse<TestCompanyWebhookRequest, TestWebhookResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TestWebhookResponse");
|
||||
}
|
||||
}
|
||||
149
src/services/management/webhooksMerchantLevelApi.ts
Normal file
149
src/services/management/webhooksMerchantLevelApi.ts
Normal file
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* 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 getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
import { CreateMerchantWebhookRequest } from '../../typings/management/models';
|
||||
import { GenerateHmacKeyResponse } from '../../typings/management/models';
|
||||
import { ListWebhooksResponse } from '../../typings/management/models';
|
||||
import { TestWebhookRequest } from '../../typings/management/models';
|
||||
import { TestWebhookResponse } from '../../typings/management/models';
|
||||
import { UpdateMerchantWebhookRequest } from '../../typings/management/models';
|
||||
import { Webhook } from '../../typings/management/models';
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import ManagementResource from "../resource/management/managementResource";
|
||||
import { ObjectSerializer } from "../../typings/management/models";
|
||||
|
||||
|
||||
export default class WebhooksMerchantLevelApi extends Service {
|
||||
/**
|
||||
* @summary Remove a webhook
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param webhookId Unique identifier of the webhook configuration.
|
||||
*/
|
||||
public async removeWebhook(merchantId: string, webhookId: string, requestOptions?: IRequest.Options): Promise<void> {
|
||||
const localVarPath = "/merchants/{merchantId}/webhooks/{webhookId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
await getJsonResponse<string, void>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "DELETE" }
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @summary List all webhooks
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param pageNumber The number of the page to fetch.
|
||||
* @param pageSize The number of items to have on a page, maximum 100. The default is 10 items on a page.
|
||||
*/
|
||||
public async listAllWebhooks(merchantId: string, requestOptions?: IRequest.Options): Promise<ListWebhooksResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/webhooks"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, ListWebhooksResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "ListWebhooksResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Get a webhook
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param webhookId Unique identifier of the webhook configuration.
|
||||
*/
|
||||
public async getWebhook(merchantId: string, webhookId: string, requestOptions?: IRequest.Options): Promise<Webhook> {
|
||||
const localVarPath = "/merchants/{merchantId}/webhooks/{webhookId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, Webhook>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "GET" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Webhook");
|
||||
}
|
||||
/**
|
||||
* @summary Update a webhook
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param webhookId Unique identifier of the webhook configuration.
|
||||
* @param updateMerchantWebhookRequest
|
||||
*/
|
||||
public async updateWebhook(merchantId: string, webhookId: string, updateMerchantWebhookRequest: UpdateMerchantWebhookRequest, requestOptions?: IRequest.Options): Promise<Webhook> {
|
||||
const localVarPath = "/merchants/{merchantId}/webhooks/{webhookId}"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: UpdateMerchantWebhookRequest = ObjectSerializer.serialize(updateMerchantWebhookRequest, "UpdateMerchantWebhookRequest");
|
||||
const response = await getJsonResponse<UpdateMerchantWebhookRequest, Webhook>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "PATCH" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Webhook");
|
||||
}
|
||||
/**
|
||||
* @summary Set up a webhook
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param createMerchantWebhookRequest
|
||||
*/
|
||||
public async setUpWebhook(merchantId: string, createMerchantWebhookRequest: CreateMerchantWebhookRequest, requestOptions?: IRequest.Options): Promise<Webhook> {
|
||||
const localVarPath = "/merchants/{merchantId}/webhooks"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: CreateMerchantWebhookRequest = ObjectSerializer.serialize(createMerchantWebhookRequest, "CreateMerchantWebhookRequest");
|
||||
const response = await getJsonResponse<CreateMerchantWebhookRequest, Webhook>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "Webhook");
|
||||
}
|
||||
/**
|
||||
* @summary Generate an HMAC key
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param webhookId
|
||||
*/
|
||||
public async generateHmacKey(merchantId: string, webhookId: string, requestOptions?: IRequest.Options): Promise<GenerateHmacKeyResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/webhooks/{webhookId}/generateHmac"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const response = await getJsonResponse<string, GenerateHmacKeyResponse>(
|
||||
resource,
|
||||
"",
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "GenerateHmacKeyResponse");
|
||||
}
|
||||
/**
|
||||
* @summary Test a webhook
|
||||
* @param merchantId The unique identifier of the merchant account.
|
||||
* @param webhookId Unique identifier of the webhook configuration.
|
||||
* @param testWebhookRequest
|
||||
*/
|
||||
public async testWebhook(merchantId: string, webhookId: string, testWebhookRequest: TestWebhookRequest, requestOptions?: IRequest.Options): Promise<TestWebhookResponse> {
|
||||
const localVarPath = "/merchants/{merchantId}/webhooks/{webhookId}/test"
|
||||
.replace('{' + 'merchantId' + '}', encodeURIComponent(String(merchantId)))
|
||||
.replace('{' + 'webhookId' + '}', encodeURIComponent(String(webhookId)));
|
||||
const resource = new ManagementResource(this, localVarPath);
|
||||
const request: TestWebhookRequest = ObjectSerializer.serialize(testWebhookRequest, "TestWebhookRequest");
|
||||
const response = await getJsonResponse<TestWebhookRequest, TestWebhookResponse>(
|
||||
resource,
|
||||
request,
|
||||
{ ...requestOptions, method: "POST" }
|
||||
);
|
||||
return ObjectSerializer.deserialize(response, "TestWebhookResponse");
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
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).
|
||||
* The list of merchant domains. Maximum: 99 domains per request. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/web-drop-in?tab=adyen-certificate-live_1#going-live).
|
||||
*/
|
||||
'domains': Array<string>;
|
||||
'domains'?: Array<string>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export class CompanyUser {
|
||||
/**
|
||||
* The username for this user.
|
||||
*/
|
||||
'username': string;
|
||||
'username'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export class Configuration {
|
||||
/**
|
||||
* Funding source. Possible values: * **Credit** * **Debit**
|
||||
*/
|
||||
'sources'?: Configuration.SourcesEnum;
|
||||
'sources'?: Array<string>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
@@ -39,7 +39,7 @@ export class Configuration {
|
||||
{
|
||||
"name": "sources",
|
||||
"baseName": "sources",
|
||||
"type": "Configuration.SourcesEnum"
|
||||
"type": "Array<string>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
@@ -47,7 +47,3 @@ export class Configuration {
|
||||
}
|
||||
}
|
||||
|
||||
export namespace Configuration {
|
||||
export enum SourcesEnum {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ export class CreateCompanyUserRequest {
|
||||
/**
|
||||
* The email address of the user.
|
||||
*/
|
||||
'email': string;
|
||||
'name': Name;
|
||||
'email'?: string;
|
||||
'name'?: Name;
|
||||
/**
|
||||
* The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
|
||||
*/
|
||||
@@ -34,7 +34,7 @@ export class CreateCompanyUserRequest {
|
||||
/**
|
||||
* The username for this user. Allowed length: 255 alphanumeric characters.
|
||||
*/
|
||||
'username': string;
|
||||
'username'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export class CreateCompanyUserResponse {
|
||||
/**
|
||||
* The username for this user.
|
||||
*/
|
||||
'username': string;
|
||||
'username'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ export class CreateMerchantRequest {
|
||||
* Your reference for the merchant account. To make this reference the unique identifier of the merchant account, your Adyen contact can set up a template on your company account. The template can have 6 to 255 characters with upper- and lower-case letters, underscores, and numbers. When your company account has a template, then the `reference` is required and must be unique within the company account.
|
||||
*/
|
||||
'reference'?: string;
|
||||
/**
|
||||
* List of sales channels that the merchant will process payments with
|
||||
*/
|
||||
'salesChannels'?: Array<string>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
@@ -66,6 +70,11 @@ export class CreateMerchantRequest {
|
||||
"name": "reference",
|
||||
"baseName": "reference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "salesChannels",
|
||||
"baseName": "salesChannels",
|
||||
"type": "Array<string>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
|
||||
@@ -17,8 +17,8 @@ export class CreateMerchantUserRequest {
|
||||
/**
|
||||
* The email address of the user.
|
||||
*/
|
||||
'email': string;
|
||||
'name': Name;
|
||||
'email'?: string;
|
||||
'name'?: Name;
|
||||
/**
|
||||
* The list of [roles](https://docs.adyen.com/account/user-roles) for this user.
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ export class CreateMerchantUserRequest {
|
||||
/**
|
||||
* The username for this user. Allowed length: 255 alphanumeric characters.
|
||||
*/
|
||||
'username': string;
|
||||
'username'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ export class CreateUserResponse {
|
||||
/**
|
||||
* The username for this user.
|
||||
*/
|
||||
'username': string;
|
||||
'username'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
|
||||
30
src/typings/management/googlePayInfo.ts
Normal file
30
src/typings/management/googlePayInfo.ts
Normal file
@@ -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 GooglePayInfo {
|
||||
/**
|
||||
* Google Pay [Merchant ID](https://support.google.com/paymentscenter/answer/7163092?hl=en). Character length and limitations: 16 alphanumeric characters or 20 numeric characters.
|
||||
*/
|
||||
'merchantId'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "merchantId",
|
||||
"baseName": "merchantId",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return GooglePayInfo.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
48
src/typings/management/key.ts
Normal file
48
src/typings/management/key.ts
Normal file
@@ -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 Key {
|
||||
/**
|
||||
* Identifier
|
||||
*/
|
||||
'identifier'?: string;
|
||||
/**
|
||||
* Passphrase
|
||||
*/
|
||||
'passphrase'?: string;
|
||||
/**
|
||||
* Version number
|
||||
*/
|
||||
'version'?: number;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "identifier",
|
||||
"baseName": "identifier",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "passphrase",
|
||||
"baseName": "passphrase",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "version",
|
||||
"baseName": "version",
|
||||
"type": "number"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return Key.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export class KlarnaInfo {
|
||||
/**
|
||||
* The region of operation. For example, **NA**, **EU**, **CH**, **AU**.
|
||||
*/
|
||||
'region': KlarnaInfo.RegionEnum;
|
||||
'region'?: KlarnaInfo.RegionEnum;
|
||||
/**
|
||||
* The email address of merchant support.
|
||||
*/
|
||||
|
||||
52
src/typings/management/mealVoucherFRInfo.ts
Normal file
52
src/typings/management/mealVoucherFRInfo.ts
Normal file
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
export class MealVoucherFRInfo {
|
||||
/**
|
||||
* Meal Voucher conecsId. Format: digits only
|
||||
*/
|
||||
'conecsId': string;
|
||||
/**
|
||||
* Meal Voucher siret. Format: 14 digits.
|
||||
*/
|
||||
'siret': string;
|
||||
/**
|
||||
* The list of additional payment methods
|
||||
*/
|
||||
'subTypes'?: MealVoucherFRInfo.SubTypesEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "conecsId",
|
||||
"baseName": "conecsId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "siret",
|
||||
"baseName": "siret",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subTypes",
|
||||
"baseName": "subTypes",
|
||||
"type": "MealVoucherFRInfo.SubTypesEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return MealVoucherFRInfo.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace MealVoucherFRInfo {
|
||||
export enum SubTypesEnum {
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,7 @@ export * from './generateApiKeyResponse';
|
||||
export * from './generateClientKeyResponse';
|
||||
export * from './generateHmacKeyResponse';
|
||||
export * from './giroPayInfo';
|
||||
export * from './googlePayInfo';
|
||||
export * from './gratuity';
|
||||
export * from './hardware';
|
||||
export * from './idName';
|
||||
@@ -65,6 +66,7 @@ export * from './installAndroidCertificateDetails';
|
||||
export * from './invalidField';
|
||||
export * from './jSONObject';
|
||||
export * from './jSONPath';
|
||||
export * from './key';
|
||||
export * from './klarnaInfo';
|
||||
export * from './links';
|
||||
export * from './linksElement';
|
||||
@@ -80,6 +82,7 @@ export * from './listTerminalsResponse';
|
||||
export * from './listWebhooksResponse';
|
||||
export * from './logo';
|
||||
export * from './meApiCredential';
|
||||
export * from './mealVoucherFRInfo';
|
||||
export * from './merchant';
|
||||
export * from './merchantLinks';
|
||||
export * from './minorUnitsMonetaryValue';
|
||||
@@ -87,10 +90,12 @@ export * from './modelFile';
|
||||
export * from './name';
|
||||
export * from './name2';
|
||||
export * from './nexo';
|
||||
export * from './notificationUrl';
|
||||
export * from './offlineProcessing';
|
||||
export * from './opi';
|
||||
export * from './orderItem';
|
||||
export * from './paginationLinks';
|
||||
export * from './passcodes';
|
||||
export * from './payPalInfo';
|
||||
export * from './paymentMethod';
|
||||
export * from './paymentMethodResponse';
|
||||
@@ -112,6 +117,7 @@ export * from './shippingLocationsResponse';
|
||||
export * from './shopperStatement';
|
||||
export * from './signature';
|
||||
export * from './sofortInfo';
|
||||
export * from './standalone';
|
||||
export * from './store';
|
||||
export * from './storeCreationRequest';
|
||||
export * from './storeCreationWithMerchantCodeRequest';
|
||||
@@ -200,6 +206,7 @@ import { GenerateApiKeyResponse } from './generateApiKeyResponse';
|
||||
import { GenerateClientKeyResponse } from './generateClientKeyResponse';
|
||||
import { GenerateHmacKeyResponse } from './generateHmacKeyResponse';
|
||||
import { GiroPayInfo } from './giroPayInfo';
|
||||
import { GooglePayInfo } from './googlePayInfo';
|
||||
import { Gratuity } from './gratuity';
|
||||
import { Hardware } from './hardware';
|
||||
import { IdName } from './idName';
|
||||
@@ -208,6 +215,7 @@ import { InstallAndroidCertificateDetails } from './installAndroidCertificateDet
|
||||
import { InvalidField } from './invalidField';
|
||||
import { JSONObject } from './jSONObject';
|
||||
import { JSONPath } from './jSONPath';
|
||||
import { Key } from './key';
|
||||
import { KlarnaInfo } from './klarnaInfo';
|
||||
import { Links } from './links';
|
||||
import { LinksElement } from './linksElement';
|
||||
@@ -223,6 +231,7 @@ import { ListTerminalsResponse } from './listTerminalsResponse';
|
||||
import { ListWebhooksResponse } from './listWebhooksResponse';
|
||||
import { Logo } from './logo';
|
||||
import { MeApiCredential } from './meApiCredential';
|
||||
import { MealVoucherFRInfo } from './mealVoucherFRInfo';
|
||||
import { Merchant } from './merchant';
|
||||
import { MerchantLinks } from './merchantLinks';
|
||||
import { MinorUnitsMonetaryValue } from './minorUnitsMonetaryValue';
|
||||
@@ -230,10 +239,12 @@ import { ModelFile } from './modelFile';
|
||||
import { Name } from './name';
|
||||
import { Name2 } from './name2';
|
||||
import { Nexo } from './nexo';
|
||||
import { NotificationUrl } from './notificationUrl';
|
||||
import { OfflineProcessing } from './offlineProcessing';
|
||||
import { Opi } from './opi';
|
||||
import { OrderItem } from './orderItem';
|
||||
import { PaginationLinks } from './paginationLinks';
|
||||
import { Passcodes } from './passcodes';
|
||||
import { PayPalInfo } from './payPalInfo';
|
||||
import { PaymentMethod } from './paymentMethod';
|
||||
import { PaymentMethodResponse } from './paymentMethodResponse';
|
||||
@@ -255,6 +266,7 @@ import { ShippingLocationsResponse } from './shippingLocationsResponse';
|
||||
import { ShopperStatement } from './shopperStatement';
|
||||
import { Signature } from './signature';
|
||||
import { SofortInfo } from './sofortInfo';
|
||||
import { Standalone } from './standalone';
|
||||
import { Store } from './store';
|
||||
import { StoreCreationRequest } from './storeCreationRequest';
|
||||
import { StoreCreationWithMerchantCodeRequest } from './storeCreationWithMerchantCodeRequest';
|
||||
@@ -306,7 +318,6 @@ let primitives = [
|
||||
];
|
||||
|
||||
let enumsMap: {[index: string]: any} = {
|
||||
"Configuration.SourcesEnum": Configuration.SourcesEnum,
|
||||
"Connectivity.SimcardStatusEnum": Connectivity.SimcardStatusEnum,
|
||||
"CreateCompanyWebhookRequest.CommunicationFormatEnum": CreateCompanyWebhookRequest.CommunicationFormatEnum,
|
||||
"CreateCompanyWebhookRequest.FilterMerchantAccountTypeEnum": CreateCompanyWebhookRequest.FilterMerchantAccountTypeEnum,
|
||||
@@ -318,7 +329,9 @@ let enumsMap: {[index: string]: any} = {
|
||||
"InstallAndroidAppDetails.TypeEnum": InstallAndroidAppDetails.TypeEnum,
|
||||
"InstallAndroidCertificateDetails.TypeEnum": InstallAndroidCertificateDetails.TypeEnum,
|
||||
"KlarnaInfo.RegionEnum": KlarnaInfo.RegionEnum,
|
||||
"MealVoucherFRInfo.SubTypesEnum": MealVoucherFRInfo.SubTypesEnum,
|
||||
"PaymentMethod.VerificationStatusEnum": PaymentMethod.VerificationStatusEnum,
|
||||
"PaymentMethodResponse.TypesWithErrorsEnum": PaymentMethodResponse.TypesWithErrorsEnum,
|
||||
"PaymentMethodSetupInfo.ShopperInteractionEnum": PaymentMethodSetupInfo.ShopperInteractionEnum,
|
||||
"PaymentMethodSetupInfo.TypeEnum": PaymentMethodSetupInfo.TypeEnum,
|
||||
"PayoutSettings.PriorityEnum": PayoutSettings.PriorityEnum,
|
||||
@@ -392,6 +405,7 @@ let typeMap: {[index: string]: any} = {
|
||||
"GenerateClientKeyResponse": GenerateClientKeyResponse,
|
||||
"GenerateHmacKeyResponse": GenerateHmacKeyResponse,
|
||||
"GiroPayInfo": GiroPayInfo,
|
||||
"GooglePayInfo": GooglePayInfo,
|
||||
"Gratuity": Gratuity,
|
||||
"Hardware": Hardware,
|
||||
"IdName": IdName,
|
||||
@@ -400,6 +414,7 @@ let typeMap: {[index: string]: any} = {
|
||||
"InvalidField": InvalidField,
|
||||
"JSONObject": JSONObject,
|
||||
"JSONPath": JSONPath,
|
||||
"Key": Key,
|
||||
"KlarnaInfo": KlarnaInfo,
|
||||
"Links": Links,
|
||||
"LinksElement": LinksElement,
|
||||
@@ -415,6 +430,7 @@ let typeMap: {[index: string]: any} = {
|
||||
"ListWebhooksResponse": ListWebhooksResponse,
|
||||
"Logo": Logo,
|
||||
"MeApiCredential": MeApiCredential,
|
||||
"MealVoucherFRInfo": MealVoucherFRInfo,
|
||||
"Merchant": Merchant,
|
||||
"MerchantLinks": MerchantLinks,
|
||||
"MinorUnitsMonetaryValue": MinorUnitsMonetaryValue,
|
||||
@@ -422,10 +438,12 @@ let typeMap: {[index: string]: any} = {
|
||||
"Name": Name,
|
||||
"Name2": Name2,
|
||||
"Nexo": Nexo,
|
||||
"NotificationUrl": NotificationUrl,
|
||||
"OfflineProcessing": OfflineProcessing,
|
||||
"Opi": Opi,
|
||||
"OrderItem": OrderItem,
|
||||
"PaginationLinks": PaginationLinks,
|
||||
"Passcodes": Passcodes,
|
||||
"PayPalInfo": PayPalInfo,
|
||||
"PaymentMethod": PaymentMethod,
|
||||
"PaymentMethodResponse": PaymentMethodResponse,
|
||||
@@ -447,6 +465,7 @@ let typeMap: {[index: string]: any} = {
|
||||
"ShopperStatement": ShopperStatement,
|
||||
"Signature": Signature,
|
||||
"SofortInfo": SofortInfo,
|
||||
"Standalone": Standalone,
|
||||
"Store": Store,
|
||||
"StoreCreationRequest": StoreCreationRequest,
|
||||
"StoreCreationWithMerchantCodeRequest": StoreCreationWithMerchantCodeRequest,
|
||||
|
||||
@@ -8,8 +8,12 @@
|
||||
*/
|
||||
|
||||
import { EventUrl } from './eventUrl';
|
||||
import { Key } from './key';
|
||||
import { NotificationUrl } from './notificationUrl';
|
||||
|
||||
export class Nexo {
|
||||
'displayUrls'?: NotificationUrl;
|
||||
'encryptionKey'?: Key;
|
||||
'eventUrls'?: EventUrl;
|
||||
/**
|
||||
* @deprecated One or more URLs to send event messages to when using Terminal API.
|
||||
@@ -19,6 +23,16 @@ export class Nexo {
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "displayUrls",
|
||||
"baseName": "displayUrls",
|
||||
"type": "NotificationUrl"
|
||||
},
|
||||
{
|
||||
"name": "encryptionKey",
|
||||
"baseName": "encryptionKey",
|
||||
"type": "Key"
|
||||
},
|
||||
{
|
||||
"name": "eventUrls",
|
||||
"baseName": "eventUrls",
|
||||
|
||||
40
src/typings/management/notificationUrl.ts
Normal file
40
src/typings/management/notificationUrl.ts
Normal file
@@ -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 NotificationUrl {
|
||||
/**
|
||||
* One or more local URLs to send notifications to when using Terminal API.
|
||||
*/
|
||||
'localUrls'?: Array<Url>;
|
||||
/**
|
||||
* One or more public URLs to send notifications to when using Terminal API.
|
||||
*/
|
||||
'publicUrls'?: Array<Url>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "localUrls",
|
||||
"baseName": "localUrls",
|
||||
"type": "Array<Url>"
|
||||
},
|
||||
{
|
||||
"name": "publicUrls",
|
||||
"baseName": "publicUrls",
|
||||
"type": "Array<Url>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return NotificationUrl.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
57
src/typings/management/passcodes.ts
Normal file
57
src/typings/management/passcodes.ts
Normal file
@@ -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 Passcodes {
|
||||
/**
|
||||
* The pin code used to enter the admin menu
|
||||
*/
|
||||
'adminMenuPin'?: string;
|
||||
/**
|
||||
* Allows merchant to create a dedicated PIN for standalone refund functionality
|
||||
*/
|
||||
'refundPin'?: string;
|
||||
/**
|
||||
* Passcode to unlock screen after sleep
|
||||
*/
|
||||
'screenLockPin'?: string;
|
||||
/**
|
||||
* The PIN code used to enter the transaction menu
|
||||
*/
|
||||
'txMenuPin'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "adminMenuPin",
|
||||
"baseName": "adminMenuPin",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "refundPin",
|
||||
"baseName": "refundPin",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "screenLockPin",
|
||||
"baseName": "screenLockPin",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "txMenuPin",
|
||||
"baseName": "txMenuPin",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return Passcodes.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,9 @@ import { ApplePayInfo } from './applePayInfo';
|
||||
import { BcmcInfo } from './bcmcInfo';
|
||||
import { CartesBancairesInfo } from './cartesBancairesInfo';
|
||||
import { GiroPayInfo } from './giroPayInfo';
|
||||
import { GooglePayInfo } from './googlePayInfo';
|
||||
import { KlarnaInfo } from './klarnaInfo';
|
||||
import { MealVoucherFRInfo } from './mealVoucherFRInfo';
|
||||
import { PayPalInfo } from './payPalInfo';
|
||||
import { SofortInfo } from './sofortInfo';
|
||||
import { SwishInfo } from './swishInfo';
|
||||
@@ -37,17 +39,27 @@ export class PaymentMethod {
|
||||
*/
|
||||
'currencies'?: Array<string>;
|
||||
/**
|
||||
* The list of custom routing flags to route payment to the intended acquirer.
|
||||
*/
|
||||
'customRoutingFlags'?: Array<string>;
|
||||
/**
|
||||
* Indicates whether the payment method is enabled (**true**) or disabled (**false**).
|
||||
*/
|
||||
'enabled'?: boolean;
|
||||
'giroPay'?: GiroPayInfo;
|
||||
'googlePay'?: GooglePayInfo;
|
||||
/**
|
||||
* The identifier of the resource.
|
||||
*/
|
||||
'id': string;
|
||||
'klarna'?: KlarnaInfo;
|
||||
'mealVoucherFR'?: MealVoucherFRInfo;
|
||||
'paypal'?: PayPalInfo;
|
||||
/**
|
||||
* Your reference for the payment method. Supported characters a-z, A-Z, 0-9.
|
||||
*/
|
||||
'reference'?: string;
|
||||
/**
|
||||
* The sales channel.
|
||||
*/
|
||||
'shopperInteraction'?: string;
|
||||
@@ -104,6 +116,11 @@ export class PaymentMethod {
|
||||
"baseName": "currencies",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "customRoutingFlags",
|
||||
"baseName": "customRoutingFlags",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "enabled",
|
||||
"baseName": "enabled",
|
||||
@@ -114,6 +131,11 @@ export class PaymentMethod {
|
||||
"baseName": "giroPay",
|
||||
"type": "GiroPayInfo"
|
||||
},
|
||||
{
|
||||
"name": "googlePay",
|
||||
"baseName": "googlePay",
|
||||
"type": "GooglePayInfo"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"baseName": "id",
|
||||
@@ -124,11 +146,21 @@ export class PaymentMethod {
|
||||
"baseName": "klarna",
|
||||
"type": "KlarnaInfo"
|
||||
},
|
||||
{
|
||||
"name": "mealVoucherFR",
|
||||
"baseName": "mealVoucher_FR",
|
||||
"type": "MealVoucherFRInfo"
|
||||
},
|
||||
{
|
||||
"name": "paypal",
|
||||
"baseName": "paypal",
|
||||
"type": "PayPalInfo"
|
||||
},
|
||||
{
|
||||
"name": "reference",
|
||||
"baseName": "reference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "shopperInteraction",
|
||||
"baseName": "shopperInteraction",
|
||||
|
||||
@@ -24,6 +24,10 @@ export class PaymentMethodResponse {
|
||||
* Total number of pages.
|
||||
*/
|
||||
'pagesTotal': number;
|
||||
/**
|
||||
* Payment method types with errors.
|
||||
*/
|
||||
'typesWithErrors'?: Array<PaymentMethodResponse.TypesWithErrorsEnum>;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
@@ -47,6 +51,11 @@ export class PaymentMethodResponse {
|
||||
"name": "pagesTotal",
|
||||
"baseName": "pagesTotal",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "typesWithErrors",
|
||||
"baseName": "typesWithErrors",
|
||||
"type": "Array<PaymentMethodResponse.TypesWithErrorsEnum>"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
@@ -54,3 +63,50 @@ export class PaymentMethodResponse {
|
||||
}
|
||||
}
|
||||
|
||||
export namespace PaymentMethodResponse {
|
||||
export enum TypesWithErrorsEnum {
|
||||
Alipay = <any> 'alipay',
|
||||
Amex = <any> 'amex',
|
||||
Applepay = <any> 'applepay',
|
||||
Bcmc = <any> 'bcmc',
|
||||
Blik = <any> 'blik',
|
||||
Cartebancaire = <any> 'cartebancaire',
|
||||
Cup = <any> 'cup',
|
||||
Diners = <any> 'diners',
|
||||
DirectEbanking = <any> 'directEbanking',
|
||||
DirectdebitGb = <any> 'directdebit_GB',
|
||||
Discover = <any> 'discover',
|
||||
EbankingFi = <any> 'ebanking_FI',
|
||||
EftposAustralia = <any> 'eftpos_australia',
|
||||
Elo = <any> 'elo',
|
||||
Elocredit = <any> 'elocredit',
|
||||
Elodebit = <any> 'elodebit',
|
||||
Girocard = <any> 'girocard',
|
||||
Giropay = <any> 'giropay',
|
||||
Googlepay = <any> 'googlepay',
|
||||
Hiper = <any> 'hiper',
|
||||
Hipercard = <any> 'hipercard',
|
||||
Ideal = <any> 'ideal',
|
||||
InteracCard = <any> 'interac_card',
|
||||
Jcb = <any> 'jcb',
|
||||
Klarna = <any> 'klarna',
|
||||
KlarnaAccount = <any> 'klarna_account',
|
||||
KlarnaPaynow = <any> 'klarna_paynow',
|
||||
Maestro = <any> 'maestro',
|
||||
Mbway = <any> 'mbway',
|
||||
Mc = <any> 'mc',
|
||||
Mcdebit = <any> 'mcdebit',
|
||||
MealVoucherFr = <any> 'mealVoucher_FR',
|
||||
Mobilepay = <any> 'mobilepay',
|
||||
Multibanco = <any> 'multibanco',
|
||||
Paypal = <any> 'paypal',
|
||||
Payshop = <any> 'payshop',
|
||||
Swish = <any> 'swish',
|
||||
Trustly = <any> 'trustly',
|
||||
Visa = <any> 'visa',
|
||||
Visadebit = <any> 'visadebit',
|
||||
Vpay = <any> 'vpay',
|
||||
Wechatpay = <any> 'wechatpay',
|
||||
WechatpayPos = <any> 'wechatpay_pos'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,9 @@ import { ApplePayInfo } from './applePayInfo';
|
||||
import { BcmcInfo } from './bcmcInfo';
|
||||
import { CartesBancairesInfo } from './cartesBancairesInfo';
|
||||
import { GiroPayInfo } from './giroPayInfo';
|
||||
import { GooglePayInfo } from './googlePayInfo';
|
||||
import { KlarnaInfo } from './klarnaInfo';
|
||||
import { MealVoucherFRInfo } from './mealVoucherFRInfo';
|
||||
import { PayPalInfo } from './payPalInfo';
|
||||
import { SofortInfo } from './sofortInfo';
|
||||
import { SwishInfo } from './swishInfo';
|
||||
@@ -32,10 +34,20 @@ export class PaymentMethodSetupInfo {
|
||||
* The list of currencies that a payment method supports. By default, all currencies supported by the payment method.
|
||||
*/
|
||||
'currencies'?: Array<string>;
|
||||
/**
|
||||
* The list of custom routing flags to route payment to the intended acquirer.
|
||||
*/
|
||||
'customRoutingFlags'?: Array<string>;
|
||||
'giroPay'?: GiroPayInfo;
|
||||
'googlePay'?: GooglePayInfo;
|
||||
'klarna'?: KlarnaInfo;
|
||||
'mealVoucherFR'?: MealVoucherFRInfo;
|
||||
'paypal'?: PayPalInfo;
|
||||
/**
|
||||
* Your reference for the payment method. Supported characters a-z, A-Z, 0-9.
|
||||
*/
|
||||
'reference'?: string;
|
||||
/**
|
||||
* The sales channel. Required if the merchant account does not have a sales channel. When you provide this field, it overrides the default sales channel set on the merchant account. Possible values: **eCommerce**, **pos**, **contAuth**, and **moto**.
|
||||
*/
|
||||
'shopperInteraction'?: PaymentMethodSetupInfo.ShopperInteractionEnum;
|
||||
@@ -48,7 +60,7 @@ export class PaymentMethodSetupInfo {
|
||||
/**
|
||||
* Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).
|
||||
*/
|
||||
'type': PaymentMethodSetupInfo.TypeEnum;
|
||||
'type'?: PaymentMethodSetupInfo.TypeEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
@@ -83,21 +95,41 @@ export class PaymentMethodSetupInfo {
|
||||
"baseName": "currencies",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "customRoutingFlags",
|
||||
"baseName": "customRoutingFlags",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "giroPay",
|
||||
"baseName": "giroPay",
|
||||
"type": "GiroPayInfo"
|
||||
},
|
||||
{
|
||||
"name": "googlePay",
|
||||
"baseName": "googlePay",
|
||||
"type": "GooglePayInfo"
|
||||
},
|
||||
{
|
||||
"name": "klarna",
|
||||
"baseName": "klarna",
|
||||
"type": "KlarnaInfo"
|
||||
},
|
||||
{
|
||||
"name": "mealVoucherFR",
|
||||
"baseName": "mealVoucher_FR",
|
||||
"type": "MealVoucherFRInfo"
|
||||
},
|
||||
{
|
||||
"name": "paypal",
|
||||
"baseName": "paypal",
|
||||
"type": "PayPalInfo"
|
||||
},
|
||||
{
|
||||
"name": "reference",
|
||||
"baseName": "reference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "shopperInteraction",
|
||||
"baseName": "shopperInteraction",
|
||||
@@ -150,8 +182,14 @@ export namespace PaymentMethodSetupInfo {
|
||||
Discover = <any> 'discover',
|
||||
EbankingFi = <any> 'ebanking_FI',
|
||||
EftposAustralia = <any> 'eftpos_australia',
|
||||
Elo = <any> 'elo',
|
||||
Elocredit = <any> 'elocredit',
|
||||
Elodebit = <any> 'elodebit',
|
||||
Girocard = <any> 'girocard',
|
||||
Giropay = <any> 'giropay',
|
||||
Googlepay = <any> 'googlepay',
|
||||
Hiper = <any> 'hiper',
|
||||
Hipercard = <any> 'hipercard',
|
||||
Ideal = <any> 'ideal',
|
||||
InteracCard = <any> 'interac_card',
|
||||
Jcb = <any> 'jcb',
|
||||
@@ -161,6 +199,8 @@ export namespace PaymentMethodSetupInfo {
|
||||
Maestro = <any> 'maestro',
|
||||
Mbway = <any> 'mbway',
|
||||
Mc = <any> 'mc',
|
||||
Mcdebit = <any> 'mcdebit',
|
||||
MealVoucherFr = <any> 'mealVoucher_FR',
|
||||
Mobilepay = <any> 'mobilepay',
|
||||
Multibanco = <any> 'multibanco',
|
||||
Paypal = <any> 'paypal',
|
||||
@@ -168,6 +208,8 @@ export namespace PaymentMethodSetupInfo {
|
||||
Swish = <any> 'swish',
|
||||
Trustly = <any> 'trustly',
|
||||
Visa = <any> 'visa',
|
||||
Visadebit = <any> 'visadebit',
|
||||
Vpay = <any> 'vpay',
|
||||
Wechatpay = <any> 'wechatpay',
|
||||
WechatpayPos = <any> 'wechatpay_pos'
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export class ShopperStatement {
|
||||
/**
|
||||
* The name you want to be shown on the shopper\'s bank or credit card statement. Maximum length: 22 characters; can\'t be all numbers.
|
||||
*/
|
||||
'doingBusinessAsName': string;
|
||||
'doingBusinessAsName'?: string;
|
||||
/**
|
||||
* The type of shopperstatement you want to use: fixed, append or dynamic
|
||||
*/
|
||||
|
||||
@@ -18,6 +18,10 @@ export class Signature {
|
||||
*/
|
||||
'deviceName'?: string;
|
||||
/**
|
||||
* Slogan shown on the start screen of the device.
|
||||
*/
|
||||
'deviceSlogan'?: 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;
|
||||
@@ -35,6 +39,11 @@ export class Signature {
|
||||
"baseName": "deviceName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "deviceSlogan",
|
||||
"baseName": "deviceSlogan",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "skipSignature",
|
||||
"baseName": "skipSignature",
|
||||
|
||||
39
src/typings/management/standalone.ts
Normal file
39
src/typings/management/standalone.ts
Normal file
@@ -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 Standalone {
|
||||
/**
|
||||
* The default currency that will be used when the device is in standalone mode (ISO 4217 - 3 letter code).
|
||||
*/
|
||||
'currencyCode'?: string;
|
||||
/**
|
||||
* Enable standalone mode.
|
||||
*/
|
||||
'enableStandalone'?: boolean;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "currencyCode",
|
||||
"baseName": "currencyCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enableStandalone",
|
||||
"baseName": "enableStandalone",
|
||||
"type": "boolean"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return Standalone.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export class SwishInfo {
|
||||
/**
|
||||
* Swish number. Format: 10 digits without spaces. For example, **1231111111**.
|
||||
*/
|
||||
'swishNumber': string;
|
||||
'swishNumber'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
|
||||
@@ -14,9 +14,11 @@ import { Hardware } from './hardware';
|
||||
import { Nexo } from './nexo';
|
||||
import { OfflineProcessing } from './offlineProcessing';
|
||||
import { Opi } from './opi';
|
||||
import { Passcodes } from './passcodes';
|
||||
import { ReceiptOptions } from './receiptOptions';
|
||||
import { ReceiptPrinting } from './receiptPrinting';
|
||||
import { Signature } from './signature';
|
||||
import { Standalone } from './standalone';
|
||||
import { Surcharge } from './surcharge';
|
||||
import { Timeouts } from './timeouts';
|
||||
import { WifiProfiles } from './wifiProfiles';
|
||||
@@ -32,9 +34,11 @@ export class TerminalSettings {
|
||||
'nexo'?: Nexo;
|
||||
'offlineProcessing'?: OfflineProcessing;
|
||||
'opi'?: Opi;
|
||||
'passcodes'?: Passcodes;
|
||||
'receiptOptions'?: ReceiptOptions;
|
||||
'receiptPrinting'?: ReceiptPrinting;
|
||||
'signature'?: Signature;
|
||||
'standalone'?: Standalone;
|
||||
'surcharge'?: Surcharge;
|
||||
'timeouts'?: Timeouts;
|
||||
'wifiProfiles'?: WifiProfiles;
|
||||
@@ -77,6 +81,11 @@ export class TerminalSettings {
|
||||
"baseName": "opi",
|
||||
"type": "Opi"
|
||||
},
|
||||
{
|
||||
"name": "passcodes",
|
||||
"baseName": "passcodes",
|
||||
"type": "Passcodes"
|
||||
},
|
||||
{
|
||||
"name": "receiptOptions",
|
||||
"baseName": "receiptOptions",
|
||||
@@ -92,6 +101,11 @@ export class TerminalSettings {
|
||||
"baseName": "signature",
|
||||
"type": "Signature"
|
||||
},
|
||||
{
|
||||
"name": "standalone",
|
||||
"baseName": "standalone",
|
||||
"type": "Standalone"
|
||||
},
|
||||
{
|
||||
"name": "surcharge",
|
||||
"baseName": "surcharge",
|
||||
|
||||
@@ -19,6 +19,10 @@ export class UpdatePaymentMethodInfo {
|
||||
*/
|
||||
'currencies'?: Array<string>;
|
||||
/**
|
||||
* Custom routing flags for acquirer routing.
|
||||
*/
|
||||
'customRoutingFlags'?: Array<string>;
|
||||
/**
|
||||
* Indicates whether the payment method is enabled (**true**) or disabled (**false**).
|
||||
*/
|
||||
'enabled'?: boolean;
|
||||
@@ -37,6 +41,11 @@ export class UpdatePaymentMethodInfo {
|
||||
"baseName": "currencies",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "customRoutingFlags",
|
||||
"baseName": "customRoutingFlags",
|
||||
"type": "Array<string>"
|
||||
},
|
||||
{
|
||||
"name": "enabled",
|
||||
"baseName": "enabled",
|
||||
|
||||
@@ -40,7 +40,7 @@ export class User {
|
||||
/**
|
||||
* The username for this user.
|
||||
*/
|
||||
'username': string;
|
||||
'username'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
|
||||
25
templates/typescript/api-all.mustache
Normal file
25
templates/typescript/api-all.mustache
Normal file
@@ -0,0 +1,25 @@
|
||||
{{>licenseInfo}}
|
||||
|
||||
{{#apiInfo}}
|
||||
import Service from "../service";
|
||||
import Client from "../client";
|
||||
|
||||
{{#apis}}
|
||||
{{#operations}}
|
||||
import {{ classname }} from './{{serviceName}}/{{ classFilename }}';
|
||||
{{/operations}}
|
||||
{{/apis}}
|
||||
|
||||
export default class {{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}} extends Service {
|
||||
public constructor(client: Client) {
|
||||
super(client);
|
||||
}
|
||||
{{#apis}}
|
||||
{{#operations}}
|
||||
public get {{ classname }}() {
|
||||
return new {{ classname }}(this.client);
|
||||
}
|
||||
{{/operations}}
|
||||
{{/apis}}
|
||||
}
|
||||
{{/apiInfo}}
|
||||
43
templates/typescript/api-single.mustache
Normal file
43
templates/typescript/api-single.mustache
Normal file
@@ -0,0 +1,43 @@
|
||||
{{>licenseInfo}}
|
||||
|
||||
import getJsonResponse from "../../helpers/getJsonResponse";
|
||||
import Service from "../../service";
|
||||
/* tslint:disable:no-unused-locals */
|
||||
{{#imports}}
|
||||
import { {{classname}} } from '../../typings/{{serviceName}}/models';
|
||||
{{/imports}}
|
||||
import { IRequest } from "../../typings/requestOptions";
|
||||
import {{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}Resource from "../resource/{{serviceName}}/{{serviceName}}Resource";
|
||||
import { ObjectSerializer } from "../../typings/{{serviceName}}/models";
|
||||
|
||||
{{#operations}}
|
||||
|
||||
export default class {{classname}} extends Service {
|
||||
{{#operation}}
|
||||
/**
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#allParams}}
|
||||
* @param {{paramName}} {{description}}
|
||||
{{/allParams}}
|
||||
*/
|
||||
public async {{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}({{#pathParams}}{{paramName}}: {{{dataType}}}, {{/pathParams}}{{#bodyParams}}{{paramName}}: {{{dataType}}}, {{/bodyParams}}requestOptions?: IRequest.Options): Promise<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
|
||||
const localVarPath = "{{{path}}}"{{#pathParams}}
|
||||
.replace('{' + '{{baseName}}' + '}', encodeURIComponent(String({{paramName}}))){{/pathParams}};
|
||||
const resource = new {{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}Resource(this, localVarPath);
|
||||
{{#bodyParam}}
|
||||
const request: {{{dataType}}} = ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}");
|
||||
{{/bodyParam}}
|
||||
{{#returnType}}const response = {{/returnType}}await getJsonResponse<{{#bodyParam}}{{{dataType}}}{{/bodyParam}}{{^bodyParam}}string{{/bodyParam}}, {{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}}>(
|
||||
resource,
|
||||
{{#bodyParam}}request{{/bodyParam}}{{^bodyParam}}""{{/bodyParam}},
|
||||
{ ...requestOptions, method: "{{httpMethod}}" }
|
||||
);
|
||||
{{#returnType}}
|
||||
return ObjectSerializer.deserialize(response, "{{{.}}}");
|
||||
{{/returnType}}
|
||||
}
|
||||
{{/operation}}
|
||||
}
|
||||
{{/operations}}
|
||||
Reference in New Issue
Block a user