@randock/nameshift-api-client 0.0.354 → 0.0.355
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/.openapi-generator/FILES +6 -0
- package/README.md +3 -3
- package/dist/apis/AccountsApi.d.ts +75 -1
- package/dist/apis/AccountsApi.js +300 -1
- package/dist/models/AccountPaymentDto.d.ts +100 -0
- package/dist/models/AccountPaymentDto.js +101 -0
- package/dist/models/AccountPaymentMethodDto.d.ts +80 -0
- package/dist/models/AccountPaymentMethodDto.js +83 -0
- package/dist/models/AccountPaymentMethodProfileDto.d.ts +71 -0
- package/dist/models/AccountPaymentMethodProfileDto.js +80 -0
- package/dist/models/AuctionConfigurationDto.d.ts +7 -0
- package/dist/models/AuctionConfigurationDto.js +5 -0
- package/dist/models/BuyerNotificationDto.d.ts +1 -0
- package/dist/models/BuyerNotificationDto.js +1 -0
- package/dist/models/BuyerNotificationListItemDto.d.ts +1 -0
- package/dist/models/BuyerNotificationListItemDto.js +1 -0
- package/dist/models/CreateAccountPaymentInput.d.ts +51 -0
- package/dist/models/CreateAccountPaymentInput.js +62 -0
- package/dist/models/CreateAccountPaymentManualTransactionInput.d.ts +58 -0
- package/dist/models/CreateAccountPaymentManualTransactionInput.js +65 -0
- package/dist/models/DomainAuctionDto.d.ts +6 -0
- package/dist/models/DomainAuctionDto.js +4 -0
- package/dist/models/IntersectionDomainDtoWithAccountDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithAccountDto.js +4 -0
- package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.js +4 -0
- package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.js +4 -0
- package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.d.ts +6 -0
- package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.js +4 -0
- package/dist/models/PayAccountPaymentInput.d.ts +32 -0
- package/dist/models/PayAccountPaymentInput.js +51 -0
- package/dist/models/StartAuctionInput.d.ts +6 -13
- package/dist/models/StartAuctionInput.js +2 -5
- package/dist/models/UpdateAuctionConfigurationDto.d.ts +7 -0
- package/dist/models/UpdateAuctionConfigurationDto.js +3 -0
- package/dist/models/UserNotificationDto.d.ts +1 -0
- package/dist/models/UserNotificationDto.js +1 -0
- package/dist/models/UserNotificationListItemDto.d.ts +1 -0
- package/dist/models/UserNotificationListItemDto.js +1 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +319 -0
- package/src/models/AccountPaymentDto.ts +189 -0
- package/src/models/AccountPaymentMethodDto.ts +138 -0
- package/src/models/AccountPaymentMethodProfileDto.ts +130 -0
- package/src/models/AuctionConfigurationDto.ts +16 -0
- package/src/models/BuyerNotificationDto.ts +1 -0
- package/src/models/BuyerNotificationListItemDto.ts +1 -0
- package/src/models/CreateAccountPaymentInput.ts +92 -0
- package/src/models/CreateAccountPaymentManualTransactionInput.ts +101 -0
- package/src/models/DomainAuctionDto.ts +9 -0
- package/src/models/IntersectionDomainDtoWithAccountDto.ts +9 -0
- package/src/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.ts +9 -0
- package/src/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.ts +9 -0
- package/src/models/IntersectionDomainDtoWithSeoMetricsDto.ts +9 -0
- package/src/models/PayAccountPaymentInput.ts +66 -0
- package/src/models/StartAuctionInput.ts +8 -24
- package/src/models/UpdateAuctionConfigurationDto.ts +15 -0
- package/src/models/UserNotificationDto.ts +1 -0
- package/src/models/UserNotificationListItemDto.ts +1 -0
- package/src/models/index.ts +6 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -44,6 +44,9 @@ src/models/AccountNotificationDto.ts
|
|
|
44
44
|
src/models/AccountNotificationReadStatusDto.ts
|
|
45
45
|
src/models/AccountOnboardingDto.ts
|
|
46
46
|
src/models/AccountOnboardingSessionDto.ts
|
|
47
|
+
src/models/AccountPaymentDto.ts
|
|
48
|
+
src/models/AccountPaymentMethodDto.ts
|
|
49
|
+
src/models/AccountPaymentMethodProfileDto.ts
|
|
47
50
|
src/models/AccountPayoutDto.ts
|
|
48
51
|
src/models/AccountSettingsAffiliateCommissionDto.ts
|
|
49
52
|
src/models/AccountSettingsAffiliateCommissionReferralDuration.ts
|
|
@@ -129,6 +132,8 @@ src/models/CompanyInformationDto.ts
|
|
|
129
132
|
src/models/CompanyTaxIdDto.ts
|
|
130
133
|
src/models/ConcreteDomainTransferTaskData.ts
|
|
131
134
|
src/models/ConflictException.ts
|
|
135
|
+
src/models/CreateAccountPaymentInput.ts
|
|
136
|
+
src/models/CreateAccountPaymentManualTransactionInput.ts
|
|
132
137
|
src/models/CreateBankAccountInput.ts
|
|
133
138
|
src/models/CreateBuyerLeadMessageInput.ts
|
|
134
139
|
src/models/CreateLeadInput.ts
|
|
@@ -275,6 +280,7 @@ src/models/PaginateResponseLinks.ts
|
|
|
275
280
|
src/models/PaginateResponseMeta.ts
|
|
276
281
|
src/models/ParsedDomainDto.ts
|
|
277
282
|
src/models/PartnerAuctionDto.ts
|
|
283
|
+
src/models/PayAccountPaymentInput.ts
|
|
278
284
|
src/models/PrivateAccountGetMeResponse.ts
|
|
279
285
|
src/models/PublicAccountInformationDto.ts
|
|
280
286
|
src/models/PublicAuctionListItemDto.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.355
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @randock/nameshift-api-client@0.0.
|
|
39
|
+
npm install @randock/nameshift-api-client@0.0.355 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
|
|
|
44
44
|
```
|
|
45
45
|
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
46
|
```
|
|
47
|
-
|
|
47
|
+
8064070caeb253e8512d5408dbfd4483801370b7e89c6915e5d5d76a889fbad74cd97e7ba9b4d01785cd71ad8adcc7e4
|
|
@@ -10,7 +10,24 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AccountOnboardingSessionDto, AccountSettingsDto, AccountSettingsInput, GetAllAffiliateCommissions200Response, GetAllReferrals200Response, MoneyDto, PrivateAccountGetMeResponse, SetPayoutProviderInput, UpdateAccountBillingInformationInput } from '../models/index';
|
|
13
|
+
import type { AccountOnboardingSessionDto, AccountPaymentDto, AccountPaymentMethodDto, AccountSettingsDto, AccountSettingsInput, CreateAccountPaymentInput, CreateAccountPaymentManualTransactionInput, GetAllAffiliateCommissions200Response, GetAllReferrals200Response, MoneyDto, ObjectId, PayAccountPaymentInput, PrivateAccountGetMeResponse, SetPayoutProviderInput, UpdateAccountBillingInformationInput } from '../models/index';
|
|
14
|
+
export interface AccountsApiCreateAccountPaymentRequest {
|
|
15
|
+
accountId: string;
|
|
16
|
+
createAccountPaymentInput: CreateAccountPaymentInput;
|
|
17
|
+
}
|
|
18
|
+
export interface AccountsApiCreateAccountPaymentManualTransactionRequest {
|
|
19
|
+
accountId: string;
|
|
20
|
+
paymentId: string;
|
|
21
|
+
createAccountPaymentManualTransactionInput: CreateAccountPaymentManualTransactionInput;
|
|
22
|
+
}
|
|
23
|
+
export interface AccountsApiGetAccountPaymentRequest {
|
|
24
|
+
accountId: string;
|
|
25
|
+
paymentId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface AccountsApiGetAccountPaymentMethodsRequest {
|
|
28
|
+
accountId: string;
|
|
29
|
+
gateway: GetAccountPaymentMethodsGatewayEnum;
|
|
30
|
+
}
|
|
14
31
|
export interface AccountsApiGetAccountPaymentProviderSessionRequest {
|
|
15
32
|
accountId: string;
|
|
16
33
|
}
|
|
@@ -31,6 +48,11 @@ export interface AccountsApiGetAllReferralsRequest {
|
|
|
31
48
|
limit?: number;
|
|
32
49
|
sortBy?: Array<string>;
|
|
33
50
|
}
|
|
51
|
+
export interface AccountsApiPayAccountPaymentRequest {
|
|
52
|
+
accountId: string;
|
|
53
|
+
paymentId: string;
|
|
54
|
+
payAccountPaymentInput: PayAccountPaymentInput;
|
|
55
|
+
}
|
|
34
56
|
export interface AccountsApiPostBillingInformationRequest {
|
|
35
57
|
accountId: string;
|
|
36
58
|
updateAccountBillingInformationInput: UpdateAccountBillingInformationInput;
|
|
@@ -55,6 +77,24 @@ export interface AccountsApiUpdateSettingsRequest {
|
|
|
55
77
|
*
|
|
56
78
|
*/
|
|
57
79
|
export declare class AccountsApi extends runtime.BaseAPI {
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
*/
|
|
83
|
+
createAccountPaymentRaw(requestParameters: AccountsApiCreateAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ObjectId>>;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
87
|
+
createAccountPayment(requestParameters: AccountsApiCreateAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectId>;
|
|
88
|
+
/**
|
|
89
|
+
* Creates a new manual transaction for account payment with specified open invoice
|
|
90
|
+
* Create a new manual transaction for account payment invoice
|
|
91
|
+
*/
|
|
92
|
+
createAccountPaymentManualTransactionRaw(requestParameters: AccountsApiCreateAccountPaymentManualTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
93
|
+
/**
|
|
94
|
+
* Creates a new manual transaction for account payment with specified open invoice
|
|
95
|
+
* Create a new manual transaction for account payment invoice
|
|
96
|
+
*/
|
|
97
|
+
createAccountPaymentManualTransaction(requestParameters: AccountsApiCreateAccountPaymentManualTransactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
58
98
|
/**
|
|
59
99
|
*
|
|
60
100
|
*/
|
|
@@ -63,6 +103,22 @@ export declare class AccountsApi extends runtime.BaseAPI {
|
|
|
63
103
|
*
|
|
64
104
|
*/
|
|
65
105
|
deleteMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
*/
|
|
109
|
+
getAccountPaymentRaw(requestParameters: AccountsApiGetAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountPaymentDto>>;
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
*/
|
|
113
|
+
getAccountPayment(requestParameters: AccountsApiGetAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountPaymentDto>;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
getAccountPaymentMethodsRaw(requestParameters: AccountsApiGetAccountPaymentMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AccountPaymentMethodDto>>>;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
*/
|
|
121
|
+
getAccountPaymentMethods(requestParameters: AccountsApiGetAccountPaymentMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AccountPaymentMethodDto>>;
|
|
66
122
|
/**
|
|
67
123
|
*
|
|
68
124
|
*/
|
|
@@ -111,6 +167,16 @@ export declare class AccountsApi extends runtime.BaseAPI {
|
|
|
111
167
|
*
|
|
112
168
|
*/
|
|
113
169
|
me(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PrivateAccountGetMeResponse>;
|
|
170
|
+
/**
|
|
171
|
+
* Pays an account payment by confirming the payment intent using the specified payment method
|
|
172
|
+
* Pay an account payment
|
|
173
|
+
*/
|
|
174
|
+
payAccountPaymentRaw(requestParameters: AccountsApiPayAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
175
|
+
/**
|
|
176
|
+
* Pays an account payment by confirming the payment intent using the specified payment method
|
|
177
|
+
* Pay an account payment
|
|
178
|
+
*/
|
|
179
|
+
payAccountPayment(requestParameters: AccountsApiPayAccountPaymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
114
180
|
/**
|
|
115
181
|
*
|
|
116
182
|
*/
|
|
@@ -152,3 +218,11 @@ export declare class AccountsApi extends runtime.BaseAPI {
|
|
|
152
218
|
*/
|
|
153
219
|
updateSettings(requestParameters: AccountsApiUpdateSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
154
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* @export
|
|
223
|
+
*/
|
|
224
|
+
export declare const GetAccountPaymentMethodsGatewayEnum: {
|
|
225
|
+
readonly STRIPE: "stripe";
|
|
226
|
+
readonly NICKY: "nicky";
|
|
227
|
+
};
|
|
228
|
+
export type GetAccountPaymentMethodsGatewayEnum = typeof GetAccountPaymentMethodsGatewayEnum[keyof typeof GetAccountPaymentMethodsGatewayEnum];
|
package/dist/apis/AccountsApi.js
CHANGED
|
@@ -64,7 +64,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.AccountsApi = void 0;
|
|
67
|
+
exports.GetAccountPaymentMethodsGatewayEnum = exports.AccountsApi = void 0;
|
|
68
68
|
var runtime = require("../runtime");
|
|
69
69
|
var index_1 = require("../models/index");
|
|
70
70
|
/**
|
|
@@ -75,6 +75,125 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function AccountsApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
AccountsApi.prototype.createAccountPaymentRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters['accountId'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling createAccountPayment().');
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters['createAccountPaymentInput'] == null) {
|
|
91
|
+
throw new runtime.RequiredError('createAccountPaymentInput', 'Required parameter "createAccountPaymentInput" was null or undefined when calling createAccountPayment().');
|
|
92
|
+
}
|
|
93
|
+
queryParameters = {};
|
|
94
|
+
headerParameters = {};
|
|
95
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
96
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
97
|
+
token = this.configuration.accessToken;
|
|
98
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
99
|
+
case 1:
|
|
100
|
+
tokenString = _a.sent();
|
|
101
|
+
if (tokenString) {
|
|
102
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
103
|
+
}
|
|
104
|
+
_a.label = 2;
|
|
105
|
+
case 2: return [4 /*yield*/, this.request({
|
|
106
|
+
path: "/private/accounts/{accountId}/payments".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
107
|
+
method: 'POST',
|
|
108
|
+
headers: headerParameters,
|
|
109
|
+
query: queryParameters,
|
|
110
|
+
body: (0, index_1.CreateAccountPaymentInputToJSON)(requestParameters['createAccountPaymentInput']),
|
|
111
|
+
}, initOverrides)];
|
|
112
|
+
case 3:
|
|
113
|
+
response = _a.sent();
|
|
114
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ObjectIdFromJSON)(jsonValue); })];
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
122
|
+
AccountsApi.prototype.createAccountPayment = function (requestParameters, initOverrides) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
+
var response;
|
|
125
|
+
return __generator(this, function (_a) {
|
|
126
|
+
switch (_a.label) {
|
|
127
|
+
case 0: return [4 /*yield*/, this.createAccountPaymentRaw(requestParameters, initOverrides)];
|
|
128
|
+
case 1:
|
|
129
|
+
response = _a.sent();
|
|
130
|
+
return [4 /*yield*/, response.value()];
|
|
131
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Creates a new manual transaction for account payment with specified open invoice
|
|
138
|
+
* Create a new manual transaction for account payment invoice
|
|
139
|
+
*/
|
|
140
|
+
AccountsApi.prototype.createAccountPaymentManualTransactionRaw = function (requestParameters, initOverrides) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
142
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
143
|
+
return __generator(this, function (_a) {
|
|
144
|
+
switch (_a.label) {
|
|
145
|
+
case 0:
|
|
146
|
+
if (requestParameters['accountId'] == null) {
|
|
147
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling createAccountPaymentManualTransaction().');
|
|
148
|
+
}
|
|
149
|
+
if (requestParameters['paymentId'] == null) {
|
|
150
|
+
throw new runtime.RequiredError('paymentId', 'Required parameter "paymentId" was null or undefined when calling createAccountPaymentManualTransaction().');
|
|
151
|
+
}
|
|
152
|
+
if (requestParameters['createAccountPaymentManualTransactionInput'] == null) {
|
|
153
|
+
throw new runtime.RequiredError('createAccountPaymentManualTransactionInput', 'Required parameter "createAccountPaymentManualTransactionInput" was null or undefined when calling createAccountPaymentManualTransaction().');
|
|
154
|
+
}
|
|
155
|
+
queryParameters = {};
|
|
156
|
+
headerParameters = {};
|
|
157
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
158
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
159
|
+
token = this.configuration.accessToken;
|
|
160
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
161
|
+
case 1:
|
|
162
|
+
tokenString = _a.sent();
|
|
163
|
+
if (tokenString) {
|
|
164
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
165
|
+
}
|
|
166
|
+
_a.label = 2;
|
|
167
|
+
case 2: return [4 /*yield*/, this.request({
|
|
168
|
+
path: "/private/accounts/{accountId}/payments/{paymentId}/transactions".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("paymentId", "}"), encodeURIComponent(String(requestParameters['paymentId']))),
|
|
169
|
+
method: 'POST',
|
|
170
|
+
headers: headerParameters,
|
|
171
|
+
query: queryParameters,
|
|
172
|
+
body: (0, index_1.CreateAccountPaymentManualTransactionInputToJSON)(requestParameters['createAccountPaymentManualTransactionInput']),
|
|
173
|
+
}, initOverrides)];
|
|
174
|
+
case 3:
|
|
175
|
+
response = _a.sent();
|
|
176
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Creates a new manual transaction for account payment with specified open invoice
|
|
183
|
+
* Create a new manual transaction for account payment invoice
|
|
184
|
+
*/
|
|
185
|
+
AccountsApi.prototype.createAccountPaymentManualTransaction = function (requestParameters, initOverrides) {
|
|
186
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
187
|
+
return __generator(this, function (_a) {
|
|
188
|
+
switch (_a.label) {
|
|
189
|
+
case 0: return [4 /*yield*/, this.createAccountPaymentManualTransactionRaw(requestParameters, initOverrides)];
|
|
190
|
+
case 1:
|
|
191
|
+
_a.sent();
|
|
192
|
+
return [2 /*return*/];
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
};
|
|
78
197
|
/**
|
|
79
198
|
*
|
|
80
199
|
*/
|
|
@@ -123,6 +242,118 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
123
242
|
});
|
|
124
243
|
});
|
|
125
244
|
};
|
|
245
|
+
/**
|
|
246
|
+
*
|
|
247
|
+
*/
|
|
248
|
+
AccountsApi.prototype.getAccountPaymentRaw = function (requestParameters, initOverrides) {
|
|
249
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
250
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
251
|
+
return __generator(this, function (_a) {
|
|
252
|
+
switch (_a.label) {
|
|
253
|
+
case 0:
|
|
254
|
+
if (requestParameters['accountId'] == null) {
|
|
255
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAccountPayment().');
|
|
256
|
+
}
|
|
257
|
+
if (requestParameters['paymentId'] == null) {
|
|
258
|
+
throw new runtime.RequiredError('paymentId', 'Required parameter "paymentId" was null or undefined when calling getAccountPayment().');
|
|
259
|
+
}
|
|
260
|
+
queryParameters = {};
|
|
261
|
+
headerParameters = {};
|
|
262
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
263
|
+
token = this.configuration.accessToken;
|
|
264
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
265
|
+
case 1:
|
|
266
|
+
tokenString = _a.sent();
|
|
267
|
+
if (tokenString) {
|
|
268
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
269
|
+
}
|
|
270
|
+
_a.label = 2;
|
|
271
|
+
case 2: return [4 /*yield*/, this.request({
|
|
272
|
+
path: "/private/accounts/{accountId}/payments/{paymentId}".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("paymentId", "}"), encodeURIComponent(String(requestParameters['paymentId']))),
|
|
273
|
+
method: 'GET',
|
|
274
|
+
headers: headerParameters,
|
|
275
|
+
query: queryParameters,
|
|
276
|
+
}, initOverrides)];
|
|
277
|
+
case 3:
|
|
278
|
+
response = _a.sent();
|
|
279
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AccountPaymentDtoFromJSON)(jsonValue); })];
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
*
|
|
286
|
+
*/
|
|
287
|
+
AccountsApi.prototype.getAccountPayment = function (requestParameters, initOverrides) {
|
|
288
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
289
|
+
var response;
|
|
290
|
+
return __generator(this, function (_a) {
|
|
291
|
+
switch (_a.label) {
|
|
292
|
+
case 0: return [4 /*yield*/, this.getAccountPaymentRaw(requestParameters, initOverrides)];
|
|
293
|
+
case 1:
|
|
294
|
+
response = _a.sent();
|
|
295
|
+
return [4 /*yield*/, response.value()];
|
|
296
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
*
|
|
303
|
+
*/
|
|
304
|
+
AccountsApi.prototype.getAccountPaymentMethodsRaw = function (requestParameters, initOverrides) {
|
|
305
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
306
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
307
|
+
return __generator(this, function (_a) {
|
|
308
|
+
switch (_a.label) {
|
|
309
|
+
case 0:
|
|
310
|
+
if (requestParameters['accountId'] == null) {
|
|
311
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAccountPaymentMethods().');
|
|
312
|
+
}
|
|
313
|
+
if (requestParameters['gateway'] == null) {
|
|
314
|
+
throw new runtime.RequiredError('gateway', 'Required parameter "gateway" was null or undefined when calling getAccountPaymentMethods().');
|
|
315
|
+
}
|
|
316
|
+
queryParameters = {};
|
|
317
|
+
headerParameters = {};
|
|
318
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
319
|
+
token = this.configuration.accessToken;
|
|
320
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
321
|
+
case 1:
|
|
322
|
+
tokenString = _a.sent();
|
|
323
|
+
if (tokenString) {
|
|
324
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
325
|
+
}
|
|
326
|
+
_a.label = 2;
|
|
327
|
+
case 2: return [4 /*yield*/, this.request({
|
|
328
|
+
path: "/private/accounts/{accountId}/payment-methods/{gateway}".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("gateway", "}"), encodeURIComponent(String(requestParameters['gateway']))),
|
|
329
|
+
method: 'GET',
|
|
330
|
+
headers: headerParameters,
|
|
331
|
+
query: queryParameters,
|
|
332
|
+
}, initOverrides)];
|
|
333
|
+
case 3:
|
|
334
|
+
response = _a.sent();
|
|
335
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.AccountPaymentMethodDtoFromJSON); })];
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
*
|
|
342
|
+
*/
|
|
343
|
+
AccountsApi.prototype.getAccountPaymentMethods = function (requestParameters, initOverrides) {
|
|
344
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
345
|
+
var response;
|
|
346
|
+
return __generator(this, function (_a) {
|
|
347
|
+
switch (_a.label) {
|
|
348
|
+
case 0: return [4 /*yield*/, this.getAccountPaymentMethodsRaw(requestParameters, initOverrides)];
|
|
349
|
+
case 1:
|
|
350
|
+
response = _a.sent();
|
|
351
|
+
return [4 /*yield*/, response.value()];
|
|
352
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
};
|
|
126
357
|
/**
|
|
127
358
|
*
|
|
128
359
|
*/
|
|
@@ -459,6 +690,67 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
459
690
|
});
|
|
460
691
|
});
|
|
461
692
|
};
|
|
693
|
+
/**
|
|
694
|
+
* Pays an account payment by confirming the payment intent using the specified payment method
|
|
695
|
+
* Pay an account payment
|
|
696
|
+
*/
|
|
697
|
+
AccountsApi.prototype.payAccountPaymentRaw = function (requestParameters, initOverrides) {
|
|
698
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
699
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
700
|
+
return __generator(this, function (_a) {
|
|
701
|
+
switch (_a.label) {
|
|
702
|
+
case 0:
|
|
703
|
+
if (requestParameters['accountId'] == null) {
|
|
704
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling payAccountPayment().');
|
|
705
|
+
}
|
|
706
|
+
if (requestParameters['paymentId'] == null) {
|
|
707
|
+
throw new runtime.RequiredError('paymentId', 'Required parameter "paymentId" was null or undefined when calling payAccountPayment().');
|
|
708
|
+
}
|
|
709
|
+
if (requestParameters['payAccountPaymentInput'] == null) {
|
|
710
|
+
throw new runtime.RequiredError('payAccountPaymentInput', 'Required parameter "payAccountPaymentInput" was null or undefined when calling payAccountPayment().');
|
|
711
|
+
}
|
|
712
|
+
queryParameters = {};
|
|
713
|
+
headerParameters = {};
|
|
714
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
715
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
716
|
+
token = this.configuration.accessToken;
|
|
717
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
718
|
+
case 1:
|
|
719
|
+
tokenString = _a.sent();
|
|
720
|
+
if (tokenString) {
|
|
721
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
722
|
+
}
|
|
723
|
+
_a.label = 2;
|
|
724
|
+
case 2: return [4 /*yield*/, this.request({
|
|
725
|
+
path: "/private/accounts/{accountId}/payments/{paymentId}/pay".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("paymentId", "}"), encodeURIComponent(String(requestParameters['paymentId']))),
|
|
726
|
+
method: 'POST',
|
|
727
|
+
headers: headerParameters,
|
|
728
|
+
query: queryParameters,
|
|
729
|
+
body: (0, index_1.PayAccountPaymentInputToJSON)(requestParameters['payAccountPaymentInput']),
|
|
730
|
+
}, initOverrides)];
|
|
731
|
+
case 3:
|
|
732
|
+
response = _a.sent();
|
|
733
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
});
|
|
737
|
+
};
|
|
738
|
+
/**
|
|
739
|
+
* Pays an account payment by confirming the payment intent using the specified payment method
|
|
740
|
+
* Pay an account payment
|
|
741
|
+
*/
|
|
742
|
+
AccountsApi.prototype.payAccountPayment = function (requestParameters, initOverrides) {
|
|
743
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
744
|
+
return __generator(this, function (_a) {
|
|
745
|
+
switch (_a.label) {
|
|
746
|
+
case 0: return [4 /*yield*/, this.payAccountPaymentRaw(requestParameters, initOverrides)];
|
|
747
|
+
case 1:
|
|
748
|
+
_a.sent();
|
|
749
|
+
return [2 /*return*/];
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
};
|
|
462
754
|
/**
|
|
463
755
|
*
|
|
464
756
|
*/
|
|
@@ -753,3 +1045,10 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
753
1045
|
return AccountsApi;
|
|
754
1046
|
}(runtime.BaseAPI));
|
|
755
1047
|
exports.AccountsApi = AccountsApi;
|
|
1048
|
+
/**
|
|
1049
|
+
* @export
|
|
1050
|
+
*/
|
|
1051
|
+
exports.GetAccountPaymentMethodsGatewayEnum = {
|
|
1052
|
+
STRIPE: 'stripe',
|
|
1053
|
+
NICKY: 'nicky'
|
|
1054
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nameshift
|
|
3
|
+
* Nameshift API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { AccountPaymentMethodProfileDto } from './AccountPaymentMethodProfileDto';
|
|
13
|
+
import type { InvoiceItemDto } from './InvoiceItemDto';
|
|
14
|
+
import type { InvoiceTransactionDto } from './InvoiceTransactionDto';
|
|
15
|
+
import type { MoneyDto } from './MoneyDto';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AccountPaymentDto
|
|
20
|
+
*/
|
|
21
|
+
export interface AccountPaymentDto {
|
|
22
|
+
/**
|
|
23
|
+
* The uuid for this account payment.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AccountPaymentDto
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AccountPaymentDto
|
|
32
|
+
*/
|
|
33
|
+
status: AccountPaymentDtoStatusEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Array<AccountPaymentMethodProfileDto>}
|
|
37
|
+
* @memberof AccountPaymentDto
|
|
38
|
+
*/
|
|
39
|
+
paymentMethodProfiles: Array<AccountPaymentMethodProfileDto>;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {MoneyDto}
|
|
43
|
+
* @memberof AccountPaymentDto
|
|
44
|
+
*/
|
|
45
|
+
basePrice: MoneyDto;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {MoneyDto}
|
|
49
|
+
* @memberof AccountPaymentDto
|
|
50
|
+
*/
|
|
51
|
+
totalPrice: MoneyDto;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {MoneyDto}
|
|
55
|
+
* @memberof AccountPaymentDto
|
|
56
|
+
*/
|
|
57
|
+
totalTaxPrice: MoneyDto;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<InvoiceItemDto>}
|
|
61
|
+
* @memberof AccountPaymentDto
|
|
62
|
+
*/
|
|
63
|
+
items: Array<InvoiceItemDto>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Array<string>}
|
|
67
|
+
* @memberof AccountPaymentDto
|
|
68
|
+
*/
|
|
69
|
+
allowedPaymentMethods: Array<string>;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {InvoiceTransactionDto}
|
|
73
|
+
* @memberof AccountPaymentDto
|
|
74
|
+
*/
|
|
75
|
+
transaction: InvoiceTransactionDto;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
* @memberof AccountPaymentDto
|
|
80
|
+
*/
|
|
81
|
+
hasPendingTransaction: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* @export
|
|
85
|
+
*/
|
|
86
|
+
export declare const AccountPaymentDtoStatusEnum: {
|
|
87
|
+
readonly DRAFT: "draft";
|
|
88
|
+
readonly PENDING_PAYMENT: "pending_payment";
|
|
89
|
+
readonly PAID: "paid";
|
|
90
|
+
readonly CANCELLED: "cancelled";
|
|
91
|
+
};
|
|
92
|
+
export type AccountPaymentDtoStatusEnum = typeof AccountPaymentDtoStatusEnum[keyof typeof AccountPaymentDtoStatusEnum];
|
|
93
|
+
/**
|
|
94
|
+
* Check if a given object implements the AccountPaymentDto interface.
|
|
95
|
+
*/
|
|
96
|
+
export declare function instanceOfAccountPaymentDto(value: object): value is AccountPaymentDto;
|
|
97
|
+
export declare function AccountPaymentDtoFromJSON(json: any): AccountPaymentDto;
|
|
98
|
+
export declare function AccountPaymentDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountPaymentDto;
|
|
99
|
+
export declare function AccountPaymentDtoToJSON(json: any): AccountPaymentDto;
|
|
100
|
+
export declare function AccountPaymentDtoToJSONTyped(value?: AccountPaymentDto | null, ignoreDiscriminator?: boolean): any;
|