@randock/nameshift-api-client 0.0.210 → 0.0.211

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.
Files changed (51) hide show
  1. package/.openapi-generator/FILES +7 -2
  2. package/README.md +3 -3
  3. package/dist/apis/AccountsApi.d.ts +3 -3
  4. package/dist/apis/AccountsApi.js +1 -1
  5. package/dist/apis/AdminApi.d.ts +12 -1
  6. package/dist/apis/AdminApi.js +53 -0
  7. package/dist/apis/BankAccountsApi.d.ts +78 -0
  8. package/dist/apis/BankAccountsApi.js +356 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/models/AccountBankAccountDto.d.ts +68 -0
  12. package/dist/models/AccountBankAccountDto.js +75 -0
  13. package/dist/models/AccountDto.d.ts +10 -3
  14. package/dist/models/AccountDto.js +9 -4
  15. package/dist/models/AccountOnboardingDto.d.ts +65 -0
  16. package/dist/models/AccountOnboardingDto.js +77 -0
  17. package/dist/models/AccountOnboardingSessionDto.d.ts +32 -0
  18. package/dist/models/AccountOnboardingSessionDto.js +51 -0
  19. package/dist/models/AccountPayoutDto.d.ts +46 -0
  20. package/dist/models/AccountPayoutDto.js +63 -0
  21. package/dist/models/AccountSettingsDto.d.ts +0 -6
  22. package/dist/models/AccountSettingsDto.js +0 -4
  23. package/dist/models/CreateBankAccountInput.d.ts +56 -0
  24. package/dist/models/CreateBankAccountInput.js +63 -0
  25. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +11 -3
  26. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +11 -5
  27. package/dist/models/UpdateBankAccountInput.d.ts +56 -0
  28. package/dist/models/UpdateBankAccountInput.js +63 -0
  29. package/dist/models/index.d.ts +6 -2
  30. package/dist/models/index.js +6 -2
  31. package/package.json +1 -1
  32. package/src/apis/AccountsApi.ts +6 -6
  33. package/src/apis/AdminApi.ts +48 -0
  34. package/src/apis/BankAccountsApi.ts +309 -0
  35. package/src/apis/index.ts +1 -0
  36. package/src/models/AccountBankAccountDto.ts +120 -0
  37. package/src/models/AccountDto.ts +27 -11
  38. package/src/models/AccountOnboardingDto.ts +112 -0
  39. package/src/models/AccountOnboardingSessionDto.ts +66 -0
  40. package/src/models/AccountPayoutDto.ts +86 -0
  41. package/src/models/AccountSettingsDto.ts +0 -9
  42. package/src/models/CreateBankAccountInput.ts +100 -0
  43. package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +29 -12
  44. package/src/models/UpdateBankAccountInput.ts +100 -0
  45. package/src/models/index.ts +6 -2
  46. package/dist/models/AccountPaymentProviderSessionDto.d.ts +0 -32
  47. package/dist/models/AccountPaymentProviderSessionDto.js +0 -51
  48. package/dist/models/PaymentProviderDto.d.ts +0 -52
  49. package/dist/models/PaymentProviderDto.js +0 -67
  50. package/src/models/AccountPaymentProviderSessionDto.ts +0 -66
  51. package/src/models/PaymentProviderDto.ts +0 -95
@@ -0,0 +1,309 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ AccountBankAccountDto,
19
+ CreateBankAccountInput,
20
+ ThrottlerException,
21
+ UpdateBankAccountInput,
22
+ ValidationException,
23
+ } from '../models/index';
24
+ import {
25
+ AccountBankAccountDtoFromJSON,
26
+ AccountBankAccountDtoToJSON,
27
+ CreateBankAccountInputFromJSON,
28
+ CreateBankAccountInputToJSON,
29
+ ThrottlerExceptionFromJSON,
30
+ ThrottlerExceptionToJSON,
31
+ UpdateBankAccountInputFromJSON,
32
+ UpdateBankAccountInputToJSON,
33
+ ValidationExceptionFromJSON,
34
+ ValidationExceptionToJSON,
35
+ } from '../models/index';
36
+
37
+ export interface BankAccountsApiCreateBankAccountRequest {
38
+ accountId: string;
39
+ createBankAccountInput: CreateBankAccountInput;
40
+ }
41
+
42
+ export interface BankAccountsApiDeleteBankAccountRequest {
43
+ accountId: string;
44
+ bankAccountId: string;
45
+ }
46
+
47
+ export interface BankAccountsApiListBankAccountsRequest {
48
+ accountId: string;
49
+ }
50
+
51
+ export interface BankAccountsApiMakeBankAccountPrimaryRequest {
52
+ accountId: string;
53
+ bankAccountId: string;
54
+ }
55
+
56
+ export interface BankAccountsApiUpdateBankAccountRequest {
57
+ accountId: string;
58
+ bankAccountId: string;
59
+ updateBankAccountInput: UpdateBankAccountInput;
60
+ }
61
+
62
+ /**
63
+ *
64
+ */
65
+ export class BankAccountsApi extends runtime.BaseAPI {
66
+
67
+ /**
68
+ *
69
+ */
70
+ async createBankAccountRaw(requestParameters: BankAccountsApiCreateBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
71
+ if (requestParameters['accountId'] == null) {
72
+ throw new runtime.RequiredError(
73
+ 'accountId',
74
+ 'Required parameter "accountId" was null or undefined when calling createBankAccount().'
75
+ );
76
+ }
77
+
78
+ if (requestParameters['createBankAccountInput'] == null) {
79
+ throw new runtime.RequiredError(
80
+ 'createBankAccountInput',
81
+ 'Required parameter "createBankAccountInput" was null or undefined when calling createBankAccount().'
82
+ );
83
+ }
84
+
85
+ const queryParameters: any = {};
86
+
87
+ const headerParameters: runtime.HTTPHeaders = {};
88
+
89
+ headerParameters['Content-Type'] = 'application/json';
90
+
91
+ if (this.configuration && this.configuration.accessToken) {
92
+ const token = this.configuration.accessToken;
93
+ const tokenString = await token("bearer", []);
94
+
95
+ if (tokenString) {
96
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
97
+ }
98
+ }
99
+ const response = await this.request({
100
+ path: `/private/accounts/{accountId}/bank-accounts`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
101
+ method: 'POST',
102
+ headers: headerParameters,
103
+ query: queryParameters,
104
+ body: CreateBankAccountInputToJSON(requestParameters['createBankAccountInput']),
105
+ }, initOverrides);
106
+
107
+ return new runtime.VoidApiResponse(response);
108
+ }
109
+
110
+ /**
111
+ *
112
+ */
113
+ async createBankAccount(requestParameters: BankAccountsApiCreateBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
114
+ await this.createBankAccountRaw(requestParameters, initOverrides);
115
+ }
116
+
117
+ /**
118
+ *
119
+ */
120
+ async deleteBankAccountRaw(requestParameters: BankAccountsApiDeleteBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
121
+ if (requestParameters['accountId'] == null) {
122
+ throw new runtime.RequiredError(
123
+ 'accountId',
124
+ 'Required parameter "accountId" was null or undefined when calling deleteBankAccount().'
125
+ );
126
+ }
127
+
128
+ if (requestParameters['bankAccountId'] == null) {
129
+ throw new runtime.RequiredError(
130
+ 'bankAccountId',
131
+ 'Required parameter "bankAccountId" was null or undefined when calling deleteBankAccount().'
132
+ );
133
+ }
134
+
135
+ const queryParameters: any = {};
136
+
137
+ const headerParameters: runtime.HTTPHeaders = {};
138
+
139
+ if (this.configuration && this.configuration.accessToken) {
140
+ const token = this.configuration.accessToken;
141
+ const tokenString = await token("bearer", []);
142
+
143
+ if (tokenString) {
144
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
145
+ }
146
+ }
147
+ const response = await this.request({
148
+ path: `/private/accounts/{accountId}/bank-accounts/{bankAccountId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"bankAccountId"}}`, encodeURIComponent(String(requestParameters['bankAccountId']))),
149
+ method: 'DELETE',
150
+ headers: headerParameters,
151
+ query: queryParameters,
152
+ }, initOverrides);
153
+
154
+ return new runtime.VoidApiResponse(response);
155
+ }
156
+
157
+ /**
158
+ *
159
+ */
160
+ async deleteBankAccount(requestParameters: BankAccountsApiDeleteBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
161
+ await this.deleteBankAccountRaw(requestParameters, initOverrides);
162
+ }
163
+
164
+ /**
165
+ *
166
+ */
167
+ async listBankAccountsRaw(requestParameters: BankAccountsApiListBankAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AccountBankAccountDto>>> {
168
+ if (requestParameters['accountId'] == null) {
169
+ throw new runtime.RequiredError(
170
+ 'accountId',
171
+ 'Required parameter "accountId" was null or undefined when calling listBankAccounts().'
172
+ );
173
+ }
174
+
175
+ const queryParameters: any = {};
176
+
177
+ const headerParameters: runtime.HTTPHeaders = {};
178
+
179
+ if (this.configuration && this.configuration.accessToken) {
180
+ const token = this.configuration.accessToken;
181
+ const tokenString = await token("bearer", []);
182
+
183
+ if (tokenString) {
184
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
185
+ }
186
+ }
187
+ const response = await this.request({
188
+ path: `/private/accounts/{accountId}/bank-accounts`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
189
+ method: 'GET',
190
+ headers: headerParameters,
191
+ query: queryParameters,
192
+ }, initOverrides);
193
+
194
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AccountBankAccountDtoFromJSON));
195
+ }
196
+
197
+ /**
198
+ *
199
+ */
200
+ async listBankAccounts(requestParameters: BankAccountsApiListBankAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AccountBankAccountDto>> {
201
+ const response = await this.listBankAccountsRaw(requestParameters, initOverrides);
202
+ return await response.value();
203
+ }
204
+
205
+ /**
206
+ *
207
+ */
208
+ async makeBankAccountPrimaryRaw(requestParameters: BankAccountsApiMakeBankAccountPrimaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
209
+ if (requestParameters['accountId'] == null) {
210
+ throw new runtime.RequiredError(
211
+ 'accountId',
212
+ 'Required parameter "accountId" was null or undefined when calling makeBankAccountPrimary().'
213
+ );
214
+ }
215
+
216
+ if (requestParameters['bankAccountId'] == null) {
217
+ throw new runtime.RequiredError(
218
+ 'bankAccountId',
219
+ 'Required parameter "bankAccountId" was null or undefined when calling makeBankAccountPrimary().'
220
+ );
221
+ }
222
+
223
+ const queryParameters: any = {};
224
+
225
+ const headerParameters: runtime.HTTPHeaders = {};
226
+
227
+ if (this.configuration && this.configuration.accessToken) {
228
+ const token = this.configuration.accessToken;
229
+ const tokenString = await token("bearer", []);
230
+
231
+ if (tokenString) {
232
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
233
+ }
234
+ }
235
+ const response = await this.request({
236
+ path: `/private/accounts/{accountId}/bank-accounts/{bankAccountId}/make-primary`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"bankAccountId"}}`, encodeURIComponent(String(requestParameters['bankAccountId']))),
237
+ method: 'POST',
238
+ headers: headerParameters,
239
+ query: queryParameters,
240
+ }, initOverrides);
241
+
242
+ return new runtime.VoidApiResponse(response);
243
+ }
244
+
245
+ /**
246
+ *
247
+ */
248
+ async makeBankAccountPrimary(requestParameters: BankAccountsApiMakeBankAccountPrimaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
249
+ await this.makeBankAccountPrimaryRaw(requestParameters, initOverrides);
250
+ }
251
+
252
+ /**
253
+ *
254
+ */
255
+ async updateBankAccountRaw(requestParameters: BankAccountsApiUpdateBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
256
+ if (requestParameters['accountId'] == null) {
257
+ throw new runtime.RequiredError(
258
+ 'accountId',
259
+ 'Required parameter "accountId" was null or undefined when calling updateBankAccount().'
260
+ );
261
+ }
262
+
263
+ if (requestParameters['bankAccountId'] == null) {
264
+ throw new runtime.RequiredError(
265
+ 'bankAccountId',
266
+ 'Required parameter "bankAccountId" was null or undefined when calling updateBankAccount().'
267
+ );
268
+ }
269
+
270
+ if (requestParameters['updateBankAccountInput'] == null) {
271
+ throw new runtime.RequiredError(
272
+ 'updateBankAccountInput',
273
+ 'Required parameter "updateBankAccountInput" was null or undefined when calling updateBankAccount().'
274
+ );
275
+ }
276
+
277
+ const queryParameters: any = {};
278
+
279
+ const headerParameters: runtime.HTTPHeaders = {};
280
+
281
+ headerParameters['Content-Type'] = 'application/json';
282
+
283
+ if (this.configuration && this.configuration.accessToken) {
284
+ const token = this.configuration.accessToken;
285
+ const tokenString = await token("bearer", []);
286
+
287
+ if (tokenString) {
288
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
289
+ }
290
+ }
291
+ const response = await this.request({
292
+ path: `/private/accounts/{accountId}/bank-accounts/{bankAccountId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"bankAccountId"}}`, encodeURIComponent(String(requestParameters['bankAccountId']))),
293
+ method: 'PATCH',
294
+ headers: headerParameters,
295
+ query: queryParameters,
296
+ body: UpdateBankAccountInputToJSON(requestParameters['updateBankAccountInput']),
297
+ }, initOverrides);
298
+
299
+ return new runtime.VoidApiResponse(response);
300
+ }
301
+
302
+ /**
303
+ *
304
+ */
305
+ async updateBankAccount(requestParameters: BankAccountsApiUpdateBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
306
+ await this.updateBankAccountRaw(requestParameters, initOverrides);
307
+ }
308
+
309
+ }
package/src/apis/index.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  export * from './AccountsApi';
4
4
  export * from './AccountsPublicApi';
5
5
  export * from './AdminApi';
6
+ export * from './BankAccountsApi';
6
7
  export * from './BuyersApi';
7
8
  export * from './BuyersPublicApi';
8
9
  export * from './DefaultApi';
@@ -0,0 +1,120 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AccountBankAccountDto
20
+ */
21
+ export interface AccountBankAccountDto {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AccountBankAccountDto
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {boolean}
31
+ * @memberof AccountBankAccountDto
32
+ */
33
+ primary: boolean;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AccountBankAccountDto
38
+ */
39
+ bic: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AccountBankAccountDto
44
+ */
45
+ countryCode: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AccountBankAccountDto
50
+ */
51
+ currencyCode: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof AccountBankAccountDto
56
+ */
57
+ iban: string | null;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof AccountBankAccountDto
62
+ */
63
+ bban: string | null;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the AccountBankAccountDto interface.
68
+ */
69
+ export function instanceOfAccountBankAccountDto(value: object): value is AccountBankAccountDto {
70
+ if (!('id' in value) || value['id'] === undefined) return false;
71
+ if (!('primary' in value) || value['primary'] === undefined) return false;
72
+ if (!('bic' in value) || value['bic'] === undefined) return false;
73
+ if (!('countryCode' in value) || value['countryCode'] === undefined) return false;
74
+ if (!('currencyCode' in value) || value['currencyCode'] === undefined) return false;
75
+ if (!('iban' in value) || value['iban'] === undefined) return false;
76
+ if (!('bban' in value) || value['bban'] === undefined) return false;
77
+ return true;
78
+ }
79
+
80
+ export function AccountBankAccountDtoFromJSON(json: any): AccountBankAccountDto {
81
+ return AccountBankAccountDtoFromJSONTyped(json, false);
82
+ }
83
+
84
+ export function AccountBankAccountDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountBankAccountDto {
85
+ if (json == null) {
86
+ return json;
87
+ }
88
+ return {
89
+
90
+ 'id': json['id'],
91
+ 'primary': json['primary'],
92
+ 'bic': json['bic'],
93
+ 'countryCode': json['countryCode'],
94
+ 'currencyCode': json['currencyCode'],
95
+ 'iban': json['iban'],
96
+ 'bban': json['bban'],
97
+ };
98
+ }
99
+
100
+ export function AccountBankAccountDtoToJSON(json: any): AccountBankAccountDto {
101
+ return AccountBankAccountDtoToJSONTyped(json, false);
102
+ }
103
+
104
+ export function AccountBankAccountDtoToJSONTyped(value?: AccountBankAccountDto | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'id': value['id'],
112
+ 'primary': value['primary'],
113
+ 'bic': value['bic'],
114
+ 'countryCode': value['countryCode'],
115
+ 'currencyCode': value['currencyCode'],
116
+ 'iban': value['iban'],
117
+ 'bban': value['bban'],
118
+ };
119
+ }
120
+
@@ -13,13 +13,20 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { PaymentProviderDto } from './PaymentProviderDto';
16
+ import type { AccountPayoutDto } from './AccountPayoutDto';
17
17
  import {
18
- PaymentProviderDtoFromJSON,
19
- PaymentProviderDtoFromJSONTyped,
20
- PaymentProviderDtoToJSON,
21
- PaymentProviderDtoToJSONTyped,
22
- } from './PaymentProviderDto';
18
+ AccountPayoutDtoFromJSON,
19
+ AccountPayoutDtoFromJSONTyped,
20
+ AccountPayoutDtoToJSON,
21
+ AccountPayoutDtoToJSONTyped,
22
+ } from './AccountPayoutDto';
23
+ import type { AccountOnboardingDto } from './AccountOnboardingDto';
24
+ import {
25
+ AccountOnboardingDtoFromJSON,
26
+ AccountOnboardingDtoFromJSONTyped,
27
+ AccountOnboardingDtoToJSON,
28
+ AccountOnboardingDtoToJSONTyped,
29
+ } from './AccountOnboardingDto';
23
30
  import type { AccountMetricsDto } from './AccountMetricsDto';
24
31
  import {
25
32
  AccountMetricsDtoFromJSON,
@@ -67,10 +74,16 @@ export interface AccountDto {
67
74
  metrics: AccountMetricsDto;
68
75
  /**
69
76
  *
70
- * @type {PaymentProviderDto}
77
+ * @type {AccountOnboardingDto}
78
+ * @memberof AccountDto
79
+ */
80
+ onboarding: AccountOnboardingDto | null;
81
+ /**
82
+ *
83
+ * @type {AccountPayoutDto}
71
84
  * @memberof AccountDto
72
85
  */
73
- paymentProvider: PaymentProviderDto | null;
86
+ payout: AccountPayoutDto;
74
87
  /**
75
88
  *
76
89
  * @type {BillingInformationDto}
@@ -87,7 +100,8 @@ export function instanceOfAccountDto(value: object): value is AccountDto {
87
100
  if (!('identifier' in value) || value['identifier'] === undefined) return false;
88
101
  if (!('name' in value) || value['name'] === undefined) return false;
89
102
  if (!('metrics' in value) || value['metrics'] === undefined) return false;
90
- if (!('paymentProvider' in value) || value['paymentProvider'] === undefined) return false;
103
+ if (!('onboarding' in value) || value['onboarding'] === undefined) return false;
104
+ if (!('payout' in value) || value['payout'] === undefined) return false;
91
105
  if (!('billingInformation' in value) || value['billingInformation'] === undefined) return false;
92
106
  return true;
93
107
  }
@@ -106,7 +120,8 @@ export function AccountDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
106
120
  'identifier': json['identifier'],
107
121
  'name': json['name'],
108
122
  'metrics': AccountMetricsDtoFromJSON(json['metrics']),
109
- 'paymentProvider': PaymentProviderDtoFromJSON(json['paymentProvider']),
123
+ 'onboarding': AccountOnboardingDtoFromJSON(json['onboarding']),
124
+ 'payout': AccountPayoutDtoFromJSON(json['payout']),
110
125
  'billingInformation': BillingInformationDtoFromJSON(json['billingInformation']),
111
126
  };
112
127
  }
@@ -126,7 +141,8 @@ export function AccountDtoToJSONTyped(value?: AccountDto | null, ignoreDiscrimin
126
141
  'identifier': value['identifier'],
127
142
  'name': value['name'],
128
143
  'metrics': AccountMetricsDtoToJSON(value['metrics']),
129
- 'paymentProvider': PaymentProviderDtoToJSON(value['paymentProvider']),
144
+ 'onboarding': AccountOnboardingDtoToJSON(value['onboarding']),
145
+ 'payout': AccountPayoutDtoToJSON(value['payout']),
130
146
  'billingInformation': BillingInformationDtoToJSON(value['billingInformation']),
131
147
  };
132
148
  }
@@ -0,0 +1,112 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AccountOnboardingDto
20
+ */
21
+ export interface AccountOnboardingDto {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AccountOnboardingDto
26
+ */
27
+ accountId: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AccountOnboardingDto
32
+ */
33
+ status: AccountOnboardingDtoStatusEnum;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof AccountOnboardingDto
38
+ */
39
+ finished: boolean;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AccountOnboardingDto
44
+ */
45
+ provider: AccountOnboardingDtoProviderEnum;
46
+ }
47
+
48
+
49
+ /**
50
+ * @export
51
+ */
52
+ export const AccountOnboardingDtoStatusEnum = {
53
+ PENDING: 'pending',
54
+ ACTIVE: 'active'
55
+ } as const;
56
+ export type AccountOnboardingDtoStatusEnum = typeof AccountOnboardingDtoStatusEnum[keyof typeof AccountOnboardingDtoStatusEnum];
57
+
58
+ /**
59
+ * @export
60
+ */
61
+ export const AccountOnboardingDtoProviderEnum = {
62
+ STRIPE: 'stripe'
63
+ } as const;
64
+ export type AccountOnboardingDtoProviderEnum = typeof AccountOnboardingDtoProviderEnum[keyof typeof AccountOnboardingDtoProviderEnum];
65
+
66
+
67
+ /**
68
+ * Check if a given object implements the AccountOnboardingDto interface.
69
+ */
70
+ export function instanceOfAccountOnboardingDto(value: object): value is AccountOnboardingDto {
71
+ if (!('accountId' in value) || value['accountId'] === undefined) return false;
72
+ if (!('status' in value) || value['status'] === undefined) return false;
73
+ if (!('finished' in value) || value['finished'] === undefined) return false;
74
+ if (!('provider' in value) || value['provider'] === undefined) return false;
75
+ return true;
76
+ }
77
+
78
+ export function AccountOnboardingDtoFromJSON(json: any): AccountOnboardingDto {
79
+ return AccountOnboardingDtoFromJSONTyped(json, false);
80
+ }
81
+
82
+ export function AccountOnboardingDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountOnboardingDto {
83
+ if (json == null) {
84
+ return json;
85
+ }
86
+ return {
87
+
88
+ 'accountId': json['accountId'],
89
+ 'status': json['status'],
90
+ 'finished': json['finished'],
91
+ 'provider': json['provider'],
92
+ };
93
+ }
94
+
95
+ export function AccountOnboardingDtoToJSON(json: any): AccountOnboardingDto {
96
+ return AccountOnboardingDtoToJSONTyped(json, false);
97
+ }
98
+
99
+ export function AccountOnboardingDtoToJSONTyped(value?: AccountOnboardingDto | null, ignoreDiscriminator: boolean = false): any {
100
+ if (value == null) {
101
+ return value;
102
+ }
103
+
104
+ return {
105
+
106
+ 'accountId': value['accountId'],
107
+ 'status': value['status'],
108
+ 'finished': value['finished'],
109
+ 'provider': value['provider'],
110
+ };
111
+ }
112
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AccountOnboardingSessionDto
20
+ */
21
+ export interface AccountOnboardingSessionDto {
22
+ /**
23
+ * Account payment provider session token
24
+ * @type {string}
25
+ * @memberof AccountOnboardingSessionDto
26
+ */
27
+ accessToken: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the AccountOnboardingSessionDto interface.
32
+ */
33
+ export function instanceOfAccountOnboardingSessionDto(value: object): value is AccountOnboardingSessionDto {
34
+ if (!('accessToken' in value) || value['accessToken'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function AccountOnboardingSessionDtoFromJSON(json: any): AccountOnboardingSessionDto {
39
+ return AccountOnboardingSessionDtoFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function AccountOnboardingSessionDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountOnboardingSessionDto {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'accessToken': json['accessToken'],
49
+ };
50
+ }
51
+
52
+ export function AccountOnboardingSessionDtoToJSON(json: any): AccountOnboardingSessionDto {
53
+ return AccountOnboardingSessionDtoToJSONTyped(json, false);
54
+ }
55
+
56
+ export function AccountOnboardingSessionDtoToJSONTyped(value?: AccountOnboardingSessionDto | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'accessToken': value['accessToken'],
64
+ };
65
+ }
66
+