@adyen/api-library
Version:
The Adyen API Library for NodeJS enables you to work with Adyen APIs.
46 lines • 2.04 kB
JavaScript
;
/*
* The version of the OpenAPI document: v2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit this class manually.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GrantAccountsApi = void 0;
const getJsonResponse_1 = __importDefault(require("../../helpers/getJsonResponse"));
const service_1 = __importDefault(require("../../service"));
const resource_1 = __importDefault(require("../resource"));
const objectSerializer_1 = require("../../typings/balancePlatform/objectSerializer");
/**
* API handler for GrantAccountsApi
*/
class GrantAccountsApi extends service_1.default {
constructor(client) {
super(client);
this.API_BASEPATH = "https://balanceplatform-api-test.adyen.com/bcl/v2";
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
}
/**
* @summary Get a grant account
* @param id {@link string } The unique identifier of the grant account.
* @param requestOptions {@link IRequest.Options }
* @return {@link CapitalGrantAccount }
*
* @deprecated since Configuration API v2
* Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead.
*/
async getGrantAccount(id, requestOptions) {
const endpoint = `${this.baseUrl}/grantAccounts/{id}`
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
const resource = new resource_1.default(this, endpoint);
const response = await (0, getJsonResponse_1.default)(resource, "", { ...requestOptions, method: "GET" });
return objectSerializer_1.ObjectSerializer.deserialize(response, "CapitalGrantAccount");
}
}
exports.GrantAccountsApi = GrantAccountsApi;
//# sourceMappingURL=grantAccountsApi.js.map