@astrada.co/ts-astrada-sdk 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/api-sdk-release.yml +33 -20
- package/CHANGELOG.md +2 -2
- package/LICENSE +21 -0
- package/README.md +0 -2
- package/dist/apis/CardApi.js +218 -0
- package/dist/apis/CardSubscriptionApi.js +268 -0
- package/dist/apis/CardholderApi.js +138 -0
- package/dist/apis/EnrollmentMethodsApi.js +139 -0
- package/dist/apis/NetworkBulkFeedsApi.js +264 -0
- package/dist/apis/SubaccountsApi.js +319 -0
- package/dist/apis/TransactionMessagesApi.js +138 -0
- package/dist/apis/TransactionsApi.js +215 -0
- package/dist/apis/WebhooksApi.js +380 -0
- package/{lib → dist}/models/Card.js +5 -4
- package/{lib → dist}/models/CardLinks.js +3 -2
- package/{lib → dist}/models/CardSubscription.js +7 -6
- package/{lib → dist}/models/CardSubscriptionLinks.js +3 -2
- package/{lib → dist}/models/Cardholder.js +6 -5
- package/{lib → dist}/models/CardholderCorporate.js +2 -1
- package/{lib → dist}/models/CardholderLinks.js +3 -2
- package/{lib → dist}/models/Conflict.js +2 -1
- package/{lib → dist}/models/CreateNetworkBulkFeedRequest.js +2 -1
- package/{lib → dist}/models/CreateSubaccountRequest.js +3 -2
- package/{lib → dist}/models/CreateWebhook201Response.d.ts +2 -0
- package/{lib → dist}/models/CreateWebhook201Response.js +8 -5
- package/{lib → dist}/models/CreateWebhookRequest.d.ts +2 -0
- package/{lib → dist}/models/CreateWebhookRequest.js +5 -2
- package/{lib → dist}/models/EnrollmentMethods200Response.js +2 -1
- package/dist/models/EnrollmentMethods413Response.d.ts +45 -0
- package/dist/models/EnrollmentMethods413Response.js +62 -0
- package/{lib → dist}/models/EnrollmentMethodsRequest.js +2 -1
- package/dist/models/GetCardSubscription404Response.d.ts +57 -0
- package/dist/models/GetCardSubscription404Response.js +66 -0
- package/{lib → dist}/models/GetSubaccounts200Response.js +4 -3
- package/{lib → dist}/models/GetSubaccounts200ResponseEmbedded.js +3 -2
- package/{lib → dist}/models/GetSubaccounts200ResponseLinks.js +3 -2
- package/{lib → dist}/models/GetTransactions200Response.js +4 -3
- package/{lib → dist}/models/GetTransactions200ResponseEmbedded.js +3 -2
- package/{lib → dist}/models/InlineObject.js +3 -2
- package/{lib → dist}/models/InlineObject1.js +2 -1
- package/{lib → dist}/models/InlineObject2.js +2 -1
- package/{lib → dist}/models/InlineObject3.js +2 -1
- package/{lib → dist}/models/InlineObject4.js +2 -1
- package/{lib → dist}/models/InlineObject5.js +2 -1
- package/{lib → dist}/models/InlineObjectErrorsInner.js +2 -1
- package/{lib → dist}/models/Link.js +2 -1
- package/{lib → dist}/models/ListCardSubscriptions200Response.js +4 -3
- package/{lib → dist}/models/ListCardSubscriptions200ResponseEmbedded.js +3 -2
- package/{lib → dist}/models/ListCardSubscriptions200ResponseLinks.js +3 -2
- package/dist/models/ListCardSubscriptions400Response.d.ts +52 -0
- package/dist/models/ListCardSubscriptions400Response.js +65 -0
- package/dist/models/ListCardSubscriptions400ResponseErrorsInner.d.ts +38 -0
- package/dist/models/ListCardSubscriptions400ResponseErrorsInner.js +55 -0
- package/dist/models/ListCardSubscriptions401Response.d.ts +45 -0
- package/dist/models/ListCardSubscriptions401Response.js +62 -0
- package/dist/models/ListCardSubscriptions403Response.d.ts +45 -0
- package/dist/models/ListCardSubscriptions403Response.js +62 -0
- package/dist/models/ListCardSubscriptions500Response.d.ts +45 -0
- package/dist/models/ListCardSubscriptions500Response.js +62 -0
- package/{lib → dist}/models/ListCards200Response.js +4 -3
- package/{lib → dist}/models/ListCards200ResponseEmbedded.js +3 -2
- package/{lib → dist}/models/ListNetworkBulkFeeds200Response.js +4 -3
- package/{lib → dist}/models/ListNetworkBulkFeeds200ResponseEmbedded.js +3 -2
- package/{lib → dist}/models/ListWebhooks200Response.js +4 -3
- package/{lib → dist}/models/ListWebhooks200ResponseEmbedded.js +3 -2
- package/{lib → dist}/models/ListWebhooks200ResponseLinks.js +3 -2
- package/{lib → dist}/models/NetworkBulkFeeds.d.ts +16 -1
- package/{lib → dist}/models/NetworkBulkFeeds.js +18 -5
- package/{lib → dist}/models/Subaccount.js +6 -5
- package/{lib → dist}/models/SubaccountConfiguration.js +3 -2
- package/{lib → dist}/models/SubaccountConfigurationVISA.js +2 -1
- package/{lib → dist}/models/Transaction.js +7 -6
- package/{lib → dist}/models/TransactionAcceptor.js +2 -1
- package/{lib → dist}/models/TransactionLinks.js +3 -2
- package/{lib → dist}/models/TransactionMessage.js +7 -6
- package/{lib → dist}/models/TransactionMessageAcceptor.js +2 -1
- package/{lib → dist}/models/UnprocessableEntity.js +2 -1
- package/{lib → dist}/models/UpdateCardSubscriptionRequest.js +2 -1
- package/{lib → dist}/models/UpdateSubaccountRequest.js +3 -2
- package/{lib → dist}/models/UpdateWebhookRequest.d.ts +2 -0
- package/{lib → dist}/models/UpdateWebhookRequest.js +5 -2
- package/{lib → dist}/models/Webhook.d.ts +2 -0
- package/{lib → dist}/models/Webhook.js +8 -5
- package/{lib → dist}/models/index.d.ts +7 -7
- package/{lib → dist}/models/index.js +7 -7
- package/dist/runtime.js +638 -0
- package/docs/Card.md +54 -0
- package/docs/CardApi.md +176 -0
- package/docs/CardLinks.md +36 -0
- package/docs/CardSubscription.md +56 -0
- package/docs/CardSubscriptionApi.md +252 -0
- package/docs/CardSubscriptionLinks.md +38 -0
- package/docs/Cardholder.md +44 -0
- package/docs/CardholderApi.md +85 -0
- package/docs/CardholderCorporate.md +37 -0
- package/docs/CardholderLinks.md +34 -0
- package/docs/Conflict.md +40 -0
- package/docs/CreateNetworkBulkFeedRequest.md +38 -0
- package/docs/CreateSubaccountRequest.md +36 -0
- package/docs/CreateWebhook201Response.md +52 -0
- package/docs/CreateWebhookRequest.md +42 -0
- package/docs/EnrollmentMethods200Response.md +34 -0
- package/docs/EnrollmentMethods413Response.md +36 -0
- package/docs/EnrollmentMethodsApi.md +85 -0
- package/docs/EnrollmentMethodsRequest.md +34 -0
- package/docs/GetCardSubscription404Response.md +40 -0
- package/docs/GetSubaccounts200Response.md +36 -0
- package/docs/GetSubaccounts200ResponseEmbedded.md +34 -0
- package/docs/GetSubaccounts200ResponseLinks.md +36 -0
- package/docs/GetTransactions200Response.md +36 -0
- package/docs/GetTransactions200ResponseEmbedded.md +34 -0
- package/docs/Link.md +48 -0
- package/docs/ListCardSubscriptions200Response.md +38 -0
- package/docs/ListCardSubscriptions200ResponseEmbedded.md +34 -0
- package/docs/ListCardSubscriptions200ResponseLinks.md +42 -0
- package/docs/ListCardSubscriptions400Response.md +38 -0
- package/docs/ListCardSubscriptions400ResponseErrorsInner.md +36 -0
- package/docs/ListCardSubscriptions401Response.md +36 -0
- package/docs/ListCardSubscriptions403Response.md +36 -0
- package/docs/ListCardSubscriptions500Response.md +36 -0
- package/docs/ListCards200Response.md +38 -0
- package/docs/ListCards200ResponseEmbedded.md +34 -0
- package/docs/ListNetworkBulkFeeds200Response.md +38 -0
- package/docs/ListNetworkBulkFeeds200ResponseEmbedded.md +34 -0
- package/docs/ListWebhooks200Response.md +37 -0
- package/docs/ListWebhooks200ResponseEmbedded.md +34 -0
- package/docs/ListWebhooks200ResponseLinks.md +36 -0
- package/docs/NetworkBulkFeeds.md +48 -0
- package/docs/NetworkBulkFeedsApi.md +247 -0
- package/docs/Subaccount.md +46 -0
- package/docs/SubaccountConfiguration.md +37 -0
- package/docs/SubaccountConfigurationVISA.md +34 -0
- package/docs/SubaccountsApi.md +321 -0
- package/docs/Transaction.md +66 -0
- package/docs/TransactionAcceptor.md +41 -0
- package/docs/TransactionLinks.md +40 -0
- package/docs/TransactionMessage.md +70 -0
- package/docs/TransactionMessageAcceptor.md +47 -0
- package/docs/TransactionMessagesApi.md +85 -0
- package/docs/TransactionsApi.md +174 -0
- package/docs/UnprocessableEntity.md +36 -0
- package/docs/UpdateCardSubscriptionRequest.md +34 -0
- package/docs/UpdateSubaccountRequest.md +36 -0
- package/docs/UpdateWebhookRequest.md +40 -0
- package/docs/Webhook.md +51 -0
- package/docs/WebhooksApi.md +401 -0
- package/openapitools.json +7 -0
- package/package.json +11 -11
- package/src/apis/CardApi.ts +15 -15
- package/src/apis/CardSubscriptionApi.ts +15 -15
- package/src/apis/CardholderApi.ts +15 -15
- package/src/apis/EnrollmentMethodsApi.ts +15 -15
- package/src/apis/NetworkBulkFeedsApi.ts +15 -15
- package/src/apis/SubaccountsApi.ts +15 -15
- package/src/apis/TransactionMessagesApi.ts +15 -15
- package/src/apis/TransactionsApi.ts +15 -15
- package/src/apis/WebhooksApi.ts +15 -15
- package/src/models/Card.ts +2 -2
- package/src/models/CardSubscription.ts +4 -4
- package/src/models/Cardholder.ts +2 -2
- package/src/models/CreateWebhook201Response.ts +5 -3
- package/src/models/CreateWebhookRequest.ts +3 -1
- package/src/models/EnrollmentMethods413Response.ts +85 -0
- package/src/models/GetCardSubscription404Response.ts +101 -0
- package/src/models/ListCardSubscriptions400Response.ts +101 -0
- package/src/models/ListCardSubscriptions400ResponseErrorsInner.ts +75 -0
- package/src/models/ListCardSubscriptions401Response.ts +85 -0
- package/src/models/ListCardSubscriptions403Response.ts +85 -0
- package/src/models/ListCardSubscriptions500Response.ts +85 -0
- package/src/models/NetworkBulkFeeds.ts +22 -3
- package/src/models/Subaccount.ts +2 -2
- package/src/models/Transaction.ts +3 -3
- package/src/models/TransactionMessage.ts +3 -3
- package/src/models/UpdateWebhookRequest.ts +3 -1
- package/src/models/Webhook.ts +5 -3
- package/src/models/index.ts +7 -7
- package/src/runtime.ts +0 -1
- package/tsconfig.json +14 -7
- package/dist/astrada.co-ts-astrada-sdk-1.1.0.tgz +0 -0
- package/lib/apis/CardApi.js +0 -109
- package/lib/apis/CardSubscriptionApi.js +0 -133
- package/lib/apis/CardholderApi.js +0 -56
- package/lib/apis/EnrollmentMethodsApi.js +0 -57
- package/lib/apis/NetworkBulkFeedsApi.js +0 -129
- package/lib/apis/SubaccountsApi.js +0 -157
- package/lib/apis/TransactionMessagesApi.js +0 -56
- package/lib/apis/TransactionsApi.js +0 -106
- package/lib/apis/WebhooksApi.js +0 -194
- package/lib/runtime.js +0 -394
- package/openapi-generator/templates/README.mustache +0 -274
- package/openapi-generator/templates/runtime.mustache +0 -515
- /package/{lib → dist}/apis/CardApi.d.ts +0 -0
- /package/{lib → dist}/apis/CardSubscriptionApi.d.ts +0 -0
- /package/{lib → dist}/apis/CardholderApi.d.ts +0 -0
- /package/{lib → dist}/apis/EnrollmentMethodsApi.d.ts +0 -0
- /package/{lib → dist}/apis/NetworkBulkFeedsApi.d.ts +0 -0
- /package/{lib → dist}/apis/SubaccountsApi.d.ts +0 -0
- /package/{lib → dist}/apis/TransactionMessagesApi.d.ts +0 -0
- /package/{lib → dist}/apis/TransactionsApi.d.ts +0 -0
- /package/{lib → dist}/apis/WebhooksApi.d.ts +0 -0
- /package/{lib → dist}/apis/index.d.ts +0 -0
- /package/{lib → dist}/apis/index.js +0 -0
- /package/{lib → dist}/index.d.ts +0 -0
- /package/{lib → dist}/index.js +0 -0
- /package/{lib → dist}/models/Card.d.ts +0 -0
- /package/{lib → dist}/models/CardLinks.d.ts +0 -0
- /package/{lib → dist}/models/CardSubscription.d.ts +0 -0
- /package/{lib → dist}/models/CardSubscriptionLinks.d.ts +0 -0
- /package/{lib → dist}/models/Cardholder.d.ts +0 -0
- /package/{lib → dist}/models/CardholderCorporate.d.ts +0 -0
- /package/{lib → dist}/models/CardholderLinks.d.ts +0 -0
- /package/{lib → dist}/models/Conflict.d.ts +0 -0
- /package/{lib → dist}/models/CreateNetworkBulkFeedRequest.d.ts +0 -0
- /package/{lib → dist}/models/CreateSubaccountRequest.d.ts +0 -0
- /package/{lib → dist}/models/EnrollmentMethods200Response.d.ts +0 -0
- /package/{lib → dist}/models/EnrollmentMethodsRequest.d.ts +0 -0
- /package/{lib → dist}/models/GetSubaccounts200Response.d.ts +0 -0
- /package/{lib → dist}/models/GetSubaccounts200ResponseEmbedded.d.ts +0 -0
- /package/{lib → dist}/models/GetSubaccounts200ResponseLinks.d.ts +0 -0
- /package/{lib → dist}/models/GetTransactions200Response.d.ts +0 -0
- /package/{lib → dist}/models/GetTransactions200ResponseEmbedded.d.ts +0 -0
- /package/{lib → dist}/models/InlineObject.d.ts +0 -0
- /package/{lib → dist}/models/InlineObject1.d.ts +0 -0
- /package/{lib → dist}/models/InlineObject2.d.ts +0 -0
- /package/{lib → dist}/models/InlineObject3.d.ts +0 -0
- /package/{lib → dist}/models/InlineObject4.d.ts +0 -0
- /package/{lib → dist}/models/InlineObject5.d.ts +0 -0
- /package/{lib → dist}/models/InlineObjectErrorsInner.d.ts +0 -0
- /package/{lib → dist}/models/Link.d.ts +0 -0
- /package/{lib → dist}/models/ListCardSubscriptions200Response.d.ts +0 -0
- /package/{lib → dist}/models/ListCardSubscriptions200ResponseEmbedded.d.ts +0 -0
- /package/{lib → dist}/models/ListCardSubscriptions200ResponseLinks.d.ts +0 -0
- /package/{lib → dist}/models/ListCards200Response.d.ts +0 -0
- /package/{lib → dist}/models/ListCards200ResponseEmbedded.d.ts +0 -0
- /package/{lib → dist}/models/ListNetworkBulkFeeds200Response.d.ts +0 -0
- /package/{lib → dist}/models/ListNetworkBulkFeeds200ResponseEmbedded.d.ts +0 -0
- /package/{lib → dist}/models/ListWebhooks200Response.d.ts +0 -0
- /package/{lib → dist}/models/ListWebhooks200ResponseEmbedded.d.ts +0 -0
- /package/{lib → dist}/models/ListWebhooks200ResponseLinks.d.ts +0 -0
- /package/{lib → dist}/models/Subaccount.d.ts +0 -0
- /package/{lib → dist}/models/SubaccountConfiguration.d.ts +0 -0
- /package/{lib → dist}/models/SubaccountConfigurationVISA.d.ts +0 -0
- /package/{lib → dist}/models/Transaction.d.ts +0 -0
- /package/{lib → dist}/models/TransactionAcceptor.d.ts +0 -0
- /package/{lib → dist}/models/TransactionLinks.d.ts +0 -0
- /package/{lib → dist}/models/TransactionMessage.d.ts +0 -0
- /package/{lib → dist}/models/TransactionMessageAcceptor.d.ts +0 -0
- /package/{lib → dist}/models/UnprocessableEntity.d.ts +0 -0
- /package/{lib → dist}/models/UpdateCardSubscriptionRequest.d.ts +0 -0
- /package/{lib → dist}/models/UpdateSubaccountRequest.d.ts +0 -0
- /package/{lib → dist}/runtime.d.ts +0 -0
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Astrada API
|
|
6
|
-
* Welcome to our API Reference. 👋
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 2024-02-28
|
|
9
|
-
* Contact: developer@astrada.co
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.CardSubscriptionApi = void 0;
|
|
17
|
-
const runtime = require("../runtime");
|
|
18
|
-
const index_1 = require("../models/index");
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
class CardSubscriptionApi extends runtime.BaseAPI {
|
|
23
|
-
/**
|
|
24
|
-
* Returns detailed information about a specific card subscription by its identifier, including its data-sharing state.
|
|
25
|
-
* Retrieve card subscription
|
|
26
|
-
*/
|
|
27
|
-
async getCardSubscriptionRaw(requestParameters, initOverrides) {
|
|
28
|
-
if (requestParameters['subscriptionId'] == null) {
|
|
29
|
-
throw new runtime.RequiredError('subscriptionId', 'Required parameter "subscriptionId" was null or undefined when calling getCardSubscription().');
|
|
30
|
-
}
|
|
31
|
-
const queryParameters = {};
|
|
32
|
-
const headerParameters = {};
|
|
33
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
34
|
-
// oauth required
|
|
35
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["card-subscriptions:read"]);
|
|
36
|
-
}
|
|
37
|
-
let urlPath = `/card-subscriptions/{subscriptionId}`;
|
|
38
|
-
urlPath = urlPath.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId'])));
|
|
39
|
-
const response = await this.request({
|
|
40
|
-
path: urlPath,
|
|
41
|
-
method: 'GET',
|
|
42
|
-
headers: headerParameters,
|
|
43
|
-
query: queryParameters,
|
|
44
|
-
}, initOverrides);
|
|
45
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CardSubscriptionFromJSON)(jsonValue));
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Returns detailed information about a specific card subscription by its identifier, including its data-sharing state.
|
|
49
|
-
* Retrieve card subscription
|
|
50
|
-
*/
|
|
51
|
-
async getCardSubscription(requestParameters, initOverrides) {
|
|
52
|
-
const response = await this.getCardSubscriptionRaw(requestParameters, initOverrides);
|
|
53
|
-
return await response.value();
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Returns all card subscriptions under the account. By default, `GET /card-subscriptions` returns card subscriptions ordered by the latest `updatedAt`. The `cardId` and `subaccountId` filters are mutual exclusive. The `cardId` takes precedence over `subaccountId`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
57
|
-
* List card subscriptions
|
|
58
|
-
*/
|
|
59
|
-
async listCardSubscriptionsRaw(requestParameters, initOverrides) {
|
|
60
|
-
const queryParameters = {};
|
|
61
|
-
if (requestParameters['subaccountId'] != null) {
|
|
62
|
-
queryParameters['subaccountId'] = requestParameters['subaccountId'];
|
|
63
|
-
}
|
|
64
|
-
if (requestParameters['cardId'] != null) {
|
|
65
|
-
queryParameters['cardId'] = requestParameters['cardId'];
|
|
66
|
-
}
|
|
67
|
-
if (requestParameters['limit'] != null) {
|
|
68
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
69
|
-
}
|
|
70
|
-
if (requestParameters['offset'] != null) {
|
|
71
|
-
queryParameters['offset'] = requestParameters['offset'];
|
|
72
|
-
}
|
|
73
|
-
const headerParameters = {};
|
|
74
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
75
|
-
// oauth required
|
|
76
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["card-subscriptions:read"]);
|
|
77
|
-
}
|
|
78
|
-
let urlPath = `/card-subscriptions`;
|
|
79
|
-
const response = await this.request({
|
|
80
|
-
path: urlPath,
|
|
81
|
-
method: 'GET',
|
|
82
|
-
headers: headerParameters,
|
|
83
|
-
query: queryParameters,
|
|
84
|
-
}, initOverrides);
|
|
85
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListCardSubscriptions200ResponseFromJSON)(jsonValue));
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Returns all card subscriptions under the account. By default, `GET /card-subscriptions` returns card subscriptions ordered by the latest `updatedAt`. The `cardId` and `subaccountId` filters are mutual exclusive. The `cardId` takes precedence over `subaccountId`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
89
|
-
* List card subscriptions
|
|
90
|
-
*/
|
|
91
|
-
async listCardSubscriptions(requestParameters = {}, initOverrides) {
|
|
92
|
-
const response = await this.listCardSubscriptionsRaw(requestParameters, initOverrides);
|
|
93
|
-
return await response.value();
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Updates an existing card subscription, allowing changes to its data-sharing state. Subscriptions that were enrolled in bulk, and where `enrollmentType = \'network-bulk\'` cannot be updated. **Note:** setting a card subscription to a `deactivated` state is a final action that cannot be undone.
|
|
97
|
-
* Update card subscription
|
|
98
|
-
*/
|
|
99
|
-
async updateCardSubscriptionRaw(requestParameters, initOverrides) {
|
|
100
|
-
if (requestParameters['subscriptionId'] == null) {
|
|
101
|
-
throw new runtime.RequiredError('subscriptionId', 'Required parameter "subscriptionId" was null or undefined when calling updateCardSubscription().');
|
|
102
|
-
}
|
|
103
|
-
if (requestParameters['updateCardSubscriptionRequest'] == null) {
|
|
104
|
-
throw new runtime.RequiredError('updateCardSubscriptionRequest', 'Required parameter "updateCardSubscriptionRequest" was null or undefined when calling updateCardSubscription().');
|
|
105
|
-
}
|
|
106
|
-
const queryParameters = {};
|
|
107
|
-
const headerParameters = {};
|
|
108
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
109
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
110
|
-
// oauth required
|
|
111
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["card-subscriptions:write"]);
|
|
112
|
-
}
|
|
113
|
-
let urlPath = `/card-subscriptions/{subscriptionId}`;
|
|
114
|
-
urlPath = urlPath.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId'])));
|
|
115
|
-
const response = await this.request({
|
|
116
|
-
path: urlPath,
|
|
117
|
-
method: 'PATCH',
|
|
118
|
-
headers: headerParameters,
|
|
119
|
-
query: queryParameters,
|
|
120
|
-
body: (0, index_1.UpdateCardSubscriptionRequestToJSON)(requestParameters['updateCardSubscriptionRequest']),
|
|
121
|
-
}, initOverrides);
|
|
122
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CardSubscriptionFromJSON)(jsonValue));
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Updates an existing card subscription, allowing changes to its data-sharing state. Subscriptions that were enrolled in bulk, and where `enrollmentType = \'network-bulk\'` cannot be updated. **Note:** setting a card subscription to a `deactivated` state is a final action that cannot be undone.
|
|
126
|
-
* Update card subscription
|
|
127
|
-
*/
|
|
128
|
-
async updateCardSubscription(requestParameters, initOverrides) {
|
|
129
|
-
const response = await this.updateCardSubscriptionRaw(requestParameters, initOverrides);
|
|
130
|
-
return await response.value();
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
exports.CardSubscriptionApi = CardSubscriptionApi;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Astrada API
|
|
6
|
-
* Welcome to our API Reference. 👋
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 2024-02-28
|
|
9
|
-
* Contact: developer@astrada.co
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.CardholderApi = void 0;
|
|
17
|
-
const runtime = require("../runtime");
|
|
18
|
-
const index_1 = require("../models/index");
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
class CardholderApi extends runtime.BaseAPI {
|
|
23
|
-
/**
|
|
24
|
-
* Returns cardholder information, related to a specific cardId, when it\'s available.
|
|
25
|
-
* Retrieve cardholder information
|
|
26
|
-
*/
|
|
27
|
-
async getCardholderRaw(requestParameters, initOverrides) {
|
|
28
|
-
if (requestParameters['cardId'] == null) {
|
|
29
|
-
throw new runtime.RequiredError('cardId', 'Required parameter "cardId" was null or undefined when calling getCardholder().');
|
|
30
|
-
}
|
|
31
|
-
const queryParameters = {};
|
|
32
|
-
const headerParameters = {};
|
|
33
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
34
|
-
// oauth required
|
|
35
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["cardholder:read"]);
|
|
36
|
-
}
|
|
37
|
-
let urlPath = `/cards/{cardId}/cardholder`;
|
|
38
|
-
urlPath = urlPath.replace(`{${"cardId"}}`, encodeURIComponent(String(requestParameters['cardId'])));
|
|
39
|
-
const response = await this.request({
|
|
40
|
-
path: urlPath,
|
|
41
|
-
method: 'GET',
|
|
42
|
-
headers: headerParameters,
|
|
43
|
-
query: queryParameters,
|
|
44
|
-
}, initOverrides);
|
|
45
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CardholderFromJSON)(jsonValue));
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Returns cardholder information, related to a specific cardId, when it\'s available.
|
|
49
|
-
* Retrieve cardholder information
|
|
50
|
-
*/
|
|
51
|
-
async getCardholder(requestParameters, initOverrides) {
|
|
52
|
-
const response = await this.getCardholderRaw(requestParameters, initOverrides);
|
|
53
|
-
return await response.value();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.CardholderApi = CardholderApi;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Astrada API
|
|
6
|
-
* Welcome to our API Reference. 👋
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 2024-02-28
|
|
9
|
-
* Contact: developer@astrada.co
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.EnrollmentMethodsApi = void 0;
|
|
17
|
-
const runtime = require("../runtime");
|
|
18
|
-
const index_1 = require("../models/index");
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
class EnrollmentMethodsApi extends runtime.BaseAPI {
|
|
23
|
-
/**
|
|
24
|
-
* List the available enrollment methods given a card BIN
|
|
25
|
-
* List the available enrollment methods given a card BIN
|
|
26
|
-
*/
|
|
27
|
-
async enrollmentMethodsRaw(requestParameters, initOverrides) {
|
|
28
|
-
if (requestParameters['enrollmentMethodsRequest'] == null) {
|
|
29
|
-
throw new runtime.RequiredError('enrollmentMethodsRequest', 'Required parameter "enrollmentMethodsRequest" was null or undefined when calling enrollmentMethods().');
|
|
30
|
-
}
|
|
31
|
-
const queryParameters = {};
|
|
32
|
-
const headerParameters = {};
|
|
33
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
34
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
35
|
-
// oauth required
|
|
36
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["enrollment-methods:write"]);
|
|
37
|
-
}
|
|
38
|
-
let urlPath = `/enrollment-methods`;
|
|
39
|
-
const response = await this.request({
|
|
40
|
-
path: urlPath,
|
|
41
|
-
method: 'POST',
|
|
42
|
-
headers: headerParameters,
|
|
43
|
-
query: queryParameters,
|
|
44
|
-
body: (0, index_1.EnrollmentMethodsRequestToJSON)(requestParameters['enrollmentMethodsRequest']),
|
|
45
|
-
}, initOverrides);
|
|
46
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EnrollmentMethods200ResponseFromJSON)(jsonValue));
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* List the available enrollment methods given a card BIN
|
|
50
|
-
* List the available enrollment methods given a card BIN
|
|
51
|
-
*/
|
|
52
|
-
async enrollmentMethods(requestParameters, initOverrides) {
|
|
53
|
-
const response = await this.enrollmentMethodsRaw(requestParameters, initOverrides);
|
|
54
|
-
return await response.value();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.EnrollmentMethodsApi = EnrollmentMethodsApi;
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Astrada API
|
|
6
|
-
* Welcome to our API Reference. 👋
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 2024-02-28
|
|
9
|
-
* Contact: developer@astrada.co
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.NetworkBulkFeedsApi = void 0;
|
|
17
|
-
const runtime = require("../runtime");
|
|
18
|
-
const index_1 = require("../models/index");
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
class NetworkBulkFeedsApi extends runtime.BaseAPI {
|
|
23
|
-
/**
|
|
24
|
-
* Registers a new feed for network bulk
|
|
25
|
-
* Create network bulk feed
|
|
26
|
-
*/
|
|
27
|
-
async createNetworkBulkFeedRaw(requestParameters, initOverrides) {
|
|
28
|
-
if (requestParameters['createNetworkBulkFeedRequest'] == null) {
|
|
29
|
-
throw new runtime.RequiredError('createNetworkBulkFeedRequest', 'Required parameter "createNetworkBulkFeedRequest" was null or undefined when calling createNetworkBulkFeed().');
|
|
30
|
-
}
|
|
31
|
-
const queryParameters = {};
|
|
32
|
-
const headerParameters = {};
|
|
33
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
34
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
35
|
-
// oauth required
|
|
36
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["network-bulk-feeds:write"]);
|
|
37
|
-
}
|
|
38
|
-
let urlPath = `/network-bulk-feeds`;
|
|
39
|
-
const response = await this.request({
|
|
40
|
-
path: urlPath,
|
|
41
|
-
method: 'POST',
|
|
42
|
-
headers: headerParameters,
|
|
43
|
-
query: queryParameters,
|
|
44
|
-
body: (0, index_1.CreateNetworkBulkFeedRequestToJSON)(requestParameters['createNetworkBulkFeedRequest']),
|
|
45
|
-
}, initOverrides);
|
|
46
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NetworkBulkFeedsFromJSON)(jsonValue));
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Registers a new feed for network bulk
|
|
50
|
-
* Create network bulk feed
|
|
51
|
-
*/
|
|
52
|
-
async createNetworkBulkFeed(requestParameters, initOverrides) {
|
|
53
|
-
const response = await this.createNetworkBulkFeedRaw(requestParameters, initOverrides);
|
|
54
|
-
return await response.value();
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Returns detailed information about a specific network bulk feed by its identifier.
|
|
58
|
-
* Retrieve a network bulk feed
|
|
59
|
-
*/
|
|
60
|
-
async getNetworkBulkFeedRaw(requestParameters, initOverrides) {
|
|
61
|
-
if (requestParameters['networkBulkFeedId'] == null) {
|
|
62
|
-
throw new runtime.RequiredError('networkBulkFeedId', 'Required parameter "networkBulkFeedId" was null or undefined when calling getNetworkBulkFeed().');
|
|
63
|
-
}
|
|
64
|
-
const queryParameters = {};
|
|
65
|
-
const headerParameters = {};
|
|
66
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
67
|
-
// oauth required
|
|
68
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["network-bulk-feeds:read"]);
|
|
69
|
-
}
|
|
70
|
-
let urlPath = `/network-bulk-feeds/{networkBulkFeedId}`;
|
|
71
|
-
urlPath = urlPath.replace(`{${"networkBulkFeedId"}}`, encodeURIComponent(String(requestParameters['networkBulkFeedId'])));
|
|
72
|
-
const response = await this.request({
|
|
73
|
-
path: urlPath,
|
|
74
|
-
method: 'GET',
|
|
75
|
-
headers: headerParameters,
|
|
76
|
-
query: queryParameters,
|
|
77
|
-
}, initOverrides);
|
|
78
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.NetworkBulkFeedsFromJSON)(jsonValue));
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Returns detailed information about a specific network bulk feed by its identifier.
|
|
82
|
-
* Retrieve a network bulk feed
|
|
83
|
-
*/
|
|
84
|
-
async getNetworkBulkFeed(requestParameters, initOverrides) {
|
|
85
|
-
const response = await this.getNetworkBulkFeedRaw(requestParameters, initOverrides);
|
|
86
|
-
return await response.value();
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Returns all network bulk feeds under the account. By default, `GET /network-bulk-feeds` returns network bulk feeds ordered by the latest `createdAt`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
90
|
-
* List network bulk feed
|
|
91
|
-
*/
|
|
92
|
-
async listNetworkBulkFeedsRaw(requestParameters, initOverrides) {
|
|
93
|
-
const queryParameters = {};
|
|
94
|
-
if (requestParameters['networkReference'] != null) {
|
|
95
|
-
queryParameters['networkReference'] = requestParameters['networkReference'];
|
|
96
|
-
}
|
|
97
|
-
if (requestParameters['subaccountId'] != null) {
|
|
98
|
-
queryParameters['subaccountId'] = requestParameters['subaccountId'];
|
|
99
|
-
}
|
|
100
|
-
if (requestParameters['limit'] != null) {
|
|
101
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
102
|
-
}
|
|
103
|
-
if (requestParameters['offset'] != null) {
|
|
104
|
-
queryParameters['offset'] = requestParameters['offset'];
|
|
105
|
-
}
|
|
106
|
-
const headerParameters = {};
|
|
107
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
108
|
-
// oauth required
|
|
109
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["network-bulk-feeds:read"]);
|
|
110
|
-
}
|
|
111
|
-
let urlPath = `/network-bulk-feeds`;
|
|
112
|
-
const response = await this.request({
|
|
113
|
-
path: urlPath,
|
|
114
|
-
method: 'GET',
|
|
115
|
-
headers: headerParameters,
|
|
116
|
-
query: queryParameters,
|
|
117
|
-
}, initOverrides);
|
|
118
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListNetworkBulkFeeds200ResponseFromJSON)(jsonValue));
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Returns all network bulk feeds under the account. By default, `GET /network-bulk-feeds` returns network bulk feeds ordered by the latest `createdAt`. This endpoint supports [offset-based pagination](https://docs.astrada.co/reference/pagination).
|
|
122
|
-
* List network bulk feed
|
|
123
|
-
*/
|
|
124
|
-
async listNetworkBulkFeeds(requestParameters = {}, initOverrides) {
|
|
125
|
-
const response = await this.listNetworkBulkFeedsRaw(requestParameters, initOverrides);
|
|
126
|
-
return await response.value();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.NetworkBulkFeedsApi = NetworkBulkFeedsApi;
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Astrada API
|
|
6
|
-
* Welcome to our API Reference. 👋
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 2024-02-28
|
|
9
|
-
* Contact: developer@astrada.co
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.SubaccountsApi = void 0;
|
|
17
|
-
const runtime = require("../runtime");
|
|
18
|
-
const index_1 = require("../models/index");
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
class SubaccountsApi extends runtime.BaseAPI {
|
|
23
|
-
/**
|
|
24
|
-
* Creates a new subaccount, allowing you to set network and regional configurations.
|
|
25
|
-
* Create subaccount
|
|
26
|
-
*/
|
|
27
|
-
async createSubaccountRaw(requestParameters, initOverrides) {
|
|
28
|
-
const queryParameters = {};
|
|
29
|
-
const headerParameters = {};
|
|
30
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
31
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
32
|
-
// oauth required
|
|
33
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["subaccounts:write"]);
|
|
34
|
-
}
|
|
35
|
-
let urlPath = `/subaccounts`;
|
|
36
|
-
const response = await this.request({
|
|
37
|
-
path: urlPath,
|
|
38
|
-
method: 'POST',
|
|
39
|
-
headers: headerParameters,
|
|
40
|
-
query: queryParameters,
|
|
41
|
-
body: (0, index_1.CreateSubaccountRequestToJSON)(requestParameters['createSubaccountRequest']),
|
|
42
|
-
}, initOverrides);
|
|
43
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubaccountFromJSON)(jsonValue));
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Creates a new subaccount, allowing you to set network and regional configurations.
|
|
47
|
-
* Create subaccount
|
|
48
|
-
*/
|
|
49
|
-
async createSubaccount(requestParameters = {}, initOverrides) {
|
|
50
|
-
const response = await this.createSubaccountRaw(requestParameters, initOverrides);
|
|
51
|
-
return await response.value();
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Returns detailed information about a specific subaccount by its identifier, including configuration details and associated data.
|
|
55
|
-
* Retrieve subaccount
|
|
56
|
-
*/
|
|
57
|
-
async getSubaccountRaw(requestParameters, initOverrides) {
|
|
58
|
-
if (requestParameters['subaccountId'] == null) {
|
|
59
|
-
throw new runtime.RequiredError('subaccountId', 'Required parameter "subaccountId" was null or undefined when calling getSubaccount().');
|
|
60
|
-
}
|
|
61
|
-
const queryParameters = {};
|
|
62
|
-
const headerParameters = {};
|
|
63
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
64
|
-
// oauth required
|
|
65
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["subaccounts:read"]);
|
|
66
|
-
}
|
|
67
|
-
let urlPath = `/subaccounts/{subaccountId}`;
|
|
68
|
-
urlPath = urlPath.replace(`{${"subaccountId"}}`, encodeURIComponent(String(requestParameters['subaccountId'])));
|
|
69
|
-
const response = await this.request({
|
|
70
|
-
path: urlPath,
|
|
71
|
-
method: 'GET',
|
|
72
|
-
headers: headerParameters,
|
|
73
|
-
query: queryParameters,
|
|
74
|
-
}, initOverrides);
|
|
75
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubaccountFromJSON)(jsonValue));
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Returns detailed information about a specific subaccount by its identifier, including configuration details and associated data.
|
|
79
|
-
* Retrieve subaccount
|
|
80
|
-
*/
|
|
81
|
-
async getSubaccount(requestParameters, initOverrides) {
|
|
82
|
-
const response = await this.getSubaccountRaw(requestParameters, initOverrides);
|
|
83
|
-
return await response.value();
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Returns a list of all subaccounts associated with the account. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
|
|
87
|
-
* List subaccounts
|
|
88
|
-
*/
|
|
89
|
-
async getSubaccountsRaw(requestParameters, initOverrides) {
|
|
90
|
-
const queryParameters = {};
|
|
91
|
-
if (requestParameters['cursor'] != null) {
|
|
92
|
-
queryParameters['cursor'] = requestParameters['cursor'];
|
|
93
|
-
}
|
|
94
|
-
if (requestParameters['limit'] != null) {
|
|
95
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
96
|
-
}
|
|
97
|
-
const headerParameters = {};
|
|
98
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
99
|
-
// oauth required
|
|
100
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["subaccounts:read"]);
|
|
101
|
-
}
|
|
102
|
-
let urlPath = `/subaccounts`;
|
|
103
|
-
const response = await this.request({
|
|
104
|
-
path: urlPath,
|
|
105
|
-
method: 'GET',
|
|
106
|
-
headers: headerParameters,
|
|
107
|
-
query: queryParameters,
|
|
108
|
-
}, initOverrides);
|
|
109
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetSubaccounts200ResponseFromJSON)(jsonValue));
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Returns a list of all subaccounts associated with the account. This endpoint supports [cursor-based pagination](https://docs.astrada.co/reference/pagination).
|
|
113
|
-
* List subaccounts
|
|
114
|
-
*/
|
|
115
|
-
async getSubaccounts(requestParameters = {}, initOverrides) {
|
|
116
|
-
const response = await this.getSubaccountsRaw(requestParameters, initOverrides);
|
|
117
|
-
return await response.value();
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Update a subaccount name and configurations. All updated configurations are validated against the capabilities of the main account to ensure compliance. It is possible to add new networks and/or regions but it is not possible to remove any configurations that were previously set.
|
|
121
|
-
* Update subaccount configurations
|
|
122
|
-
*/
|
|
123
|
-
async updateSubaccountRaw(requestParameters, initOverrides) {
|
|
124
|
-
if (requestParameters['subaccountId'] == null) {
|
|
125
|
-
throw new runtime.RequiredError('subaccountId', 'Required parameter "subaccountId" was null or undefined when calling updateSubaccount().');
|
|
126
|
-
}
|
|
127
|
-
if (requestParameters['updateSubaccountRequest'] == null) {
|
|
128
|
-
throw new runtime.RequiredError('updateSubaccountRequest', 'Required parameter "updateSubaccountRequest" was null or undefined when calling updateSubaccount().');
|
|
129
|
-
}
|
|
130
|
-
const queryParameters = {};
|
|
131
|
-
const headerParameters = {};
|
|
132
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
133
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
134
|
-
// oauth required
|
|
135
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["subaccounts:write"]);
|
|
136
|
-
}
|
|
137
|
-
let urlPath = `/subaccounts/{subaccountId}`;
|
|
138
|
-
urlPath = urlPath.replace(`{${"subaccountId"}}`, encodeURIComponent(String(requestParameters['subaccountId'])));
|
|
139
|
-
const response = await this.request({
|
|
140
|
-
path: urlPath,
|
|
141
|
-
method: 'PATCH',
|
|
142
|
-
headers: headerParameters,
|
|
143
|
-
query: queryParameters,
|
|
144
|
-
body: (0, index_1.UpdateSubaccountRequestToJSON)(requestParameters['updateSubaccountRequest']),
|
|
145
|
-
}, initOverrides);
|
|
146
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubaccountFromJSON)(jsonValue));
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Update a subaccount name and configurations. All updated configurations are validated against the capabilities of the main account to ensure compliance. It is possible to add new networks and/or regions but it is not possible to remove any configurations that were previously set.
|
|
150
|
-
* Update subaccount configurations
|
|
151
|
-
*/
|
|
152
|
-
async updateSubaccount(requestParameters, initOverrides) {
|
|
153
|
-
const response = await this.updateSubaccountRaw(requestParameters, initOverrides);
|
|
154
|
-
return await response.value();
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
exports.SubaccountsApi = SubaccountsApi;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Astrada API
|
|
6
|
-
* Welcome to our API Reference. 👋
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 2024-02-28
|
|
9
|
-
* Contact: developer@astrada.co
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.TransactionMessagesApi = void 0;
|
|
17
|
-
const runtime = require("../runtime");
|
|
18
|
-
const index_1 = require("../models/index");
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
class TransactionMessagesApi extends runtime.BaseAPI {
|
|
23
|
-
/**
|
|
24
|
-
* Return a transaction message by its unique identifier, including details about the transaction\'s type and relevant transactional data.
|
|
25
|
-
* Retrieve transaction message
|
|
26
|
-
*/
|
|
27
|
-
async getTransactionMessageByIdRaw(requestParameters, initOverrides) {
|
|
28
|
-
if (requestParameters['transactionMessageId'] == null) {
|
|
29
|
-
throw new runtime.RequiredError('transactionMessageId', 'Required parameter "transactionMessageId" was null or undefined when calling getTransactionMessageById().');
|
|
30
|
-
}
|
|
31
|
-
const queryParameters = {};
|
|
32
|
-
const headerParameters = {};
|
|
33
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
34
|
-
// oauth required
|
|
35
|
-
headerParameters["Authorization"] = await this.configuration.accessToken("main-auth", ["transaction-messages:read"]);
|
|
36
|
-
}
|
|
37
|
-
let urlPath = `/transaction-messages/{transactionMessageId}`;
|
|
38
|
-
urlPath = urlPath.replace(`{${"transactionMessageId"}}`, encodeURIComponent(String(requestParameters['transactionMessageId'])));
|
|
39
|
-
const response = await this.request({
|
|
40
|
-
path: urlPath,
|
|
41
|
-
method: 'GET',
|
|
42
|
-
headers: headerParameters,
|
|
43
|
-
query: queryParameters,
|
|
44
|
-
}, initOverrides);
|
|
45
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TransactionMessageFromJSON)(jsonValue));
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Return a transaction message by its unique identifier, including details about the transaction\'s type and relevant transactional data.
|
|
49
|
-
* Retrieve transaction message
|
|
50
|
-
*/
|
|
51
|
-
async getTransactionMessageById(requestParameters, initOverrides) {
|
|
52
|
-
const response = await this.getTransactionMessageByIdRaw(requestParameters, initOverrides);
|
|
53
|
-
return await response.value();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.TransactionMessagesApi = TransactionMessagesApi;
|