@randock/nameshift-api-client 0.0.497 → 0.0.499
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 +7 -0
- package/README.md +3 -3
- package/dist/apis/AccountsApi.d.ts +15 -1
- package/dist/apis/AccountsApi.js +66 -0
- package/dist/apis/AdminApi.d.ts +27 -15
- package/dist/apis/AdminApi.js +78 -22
- package/dist/models/AccountBankAccountDto.d.ts +21 -0
- package/dist/models/AccountBankAccountDto.js +17 -1
- package/dist/models/AccountPayoutDto.d.ts +13 -0
- package/dist/models/AccountPayoutDto.js +9 -0
- package/dist/models/BankAccountFormatCountryDto.d.ts +7 -1
- package/dist/models/BankAccountFormatCountryDto.js +4 -0
- package/dist/models/BankAccountFormatDto.d.ts +14 -0
- package/dist/models/BankAccountFormatDto.js +10 -0
- package/dist/models/BankAccountTransferMethod.d.ts +25 -0
- package/dist/models/BankAccountTransferMethod.js +51 -0
- package/dist/models/InvoiceDto.d.ts +13 -0
- package/dist/models/InvoiceDto.js +9 -0
- package/dist/models/InvoicePayoutDto.d.ts +71 -0
- package/dist/models/InvoicePayoutDto.js +78 -0
- package/dist/models/InvoiceSellerAccountDto.d.ts +13 -0
- package/dist/models/InvoiceSellerAccountDto.js +9 -0
- package/dist/models/PaySellerInvoicesInput.d.ts +32 -0
- package/dist/models/PaySellerInvoicesInput.js +51 -0
- package/dist/models/PayoutFrequency.d.ts +28 -0
- package/dist/models/PayoutFrequency.js +54 -0
- package/dist/models/SellerInvoiceDto.d.ts +13 -0
- package/dist/models/SellerInvoiceDto.js +9 -0
- package/dist/models/SellerPayoutPreviewDto.d.ts +60 -0
- package/dist/models/SellerPayoutPreviewDto.js +73 -0
- package/dist/models/SellerPayoutStatus.d.ts +26 -0
- package/dist/models/SellerPayoutStatus.js +52 -0
- package/dist/models/SetPayoutFrequencyInput.d.ts +39 -0
- package/dist/models/SetPayoutFrequencyInput.js +54 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +64 -0
- package/src/apis/AdminApi.ts +82 -31
- package/src/models/AccountBankAccountDto.ts +34 -0
- package/src/models/AccountPayoutDto.ts +26 -0
- package/src/models/BankAccountFormatCountryDto.ts +10 -1
- package/src/models/BankAccountFormatDto.ts +34 -0
- package/src/models/BankAccountTransferMethod.ts +53 -0
- package/src/models/InvoiceDto.ts +25 -0
- package/src/models/InvoicePayoutDto.ts +144 -0
- package/src/models/InvoiceSellerAccountDto.ts +26 -0
- package/src/models/PaySellerInvoicesInput.ts +66 -0
- package/src/models/PayoutFrequency.ts +56 -0
- package/src/models/SellerInvoiceDto.ts +25 -0
- package/src/models/SellerPayoutPreviewDto.ts +119 -0
- package/src/models/SellerPayoutStatus.ts +54 -0
- package/src/models/SetPayoutFrequencyInput.ts +84 -0
- package/src/models/index.ts +7 -0
package/src/apis/AdminApi.ts
CHANGED
|
@@ -67,7 +67,9 @@ import type {
|
|
|
67
67
|
ListLeads200Response,
|
|
68
68
|
NotFoundException,
|
|
69
69
|
ObjectId,
|
|
70
|
+
PaySellerInvoicesInput,
|
|
70
71
|
SellerLeadDetails,
|
|
72
|
+
SellerPayoutPreviewDto,
|
|
71
73
|
SellerSalesByTldStatsItemDto,
|
|
72
74
|
SellerSalesCountStatsItemDto,
|
|
73
75
|
SendAdminLeadAiPriceNegotiatorAgentChatMessageInput,
|
|
@@ -189,8 +191,12 @@ import {
|
|
|
189
191
|
NotFoundExceptionToJSON,
|
|
190
192
|
ObjectIdFromJSON,
|
|
191
193
|
ObjectIdToJSON,
|
|
194
|
+
PaySellerInvoicesInputFromJSON,
|
|
195
|
+
PaySellerInvoicesInputToJSON,
|
|
192
196
|
SellerLeadDetailsFromJSON,
|
|
193
197
|
SellerLeadDetailsToJSON,
|
|
198
|
+
SellerPayoutPreviewDtoFromJSON,
|
|
199
|
+
SellerPayoutPreviewDtoToJSON,
|
|
194
200
|
SellerSalesByTldStatsItemDtoFromJSON,
|
|
195
201
|
SellerSalesByTldStatsItemDtoToJSON,
|
|
196
202
|
SellerSalesCountStatsItemDtoFromJSON,
|
|
@@ -541,13 +547,12 @@ export interface AdminApiLoginAsBuyerRequest {
|
|
|
541
547
|
buyerId: string;
|
|
542
548
|
}
|
|
543
549
|
|
|
544
|
-
export interface
|
|
545
|
-
transferId: string;
|
|
550
|
+
export interface AdminApiPaySellerInvoiceRequest {
|
|
546
551
|
invoiceId: string;
|
|
547
552
|
}
|
|
548
553
|
|
|
549
|
-
export interface
|
|
550
|
-
|
|
554
|
+
export interface AdminApiPaySellerInvoicesRequest {
|
|
555
|
+
paySellerInvoicesInput: PaySellerInvoicesInput;
|
|
551
556
|
}
|
|
552
557
|
|
|
553
558
|
export interface AdminApiPostAdminCompleteDomainTransferRequest {
|
|
@@ -564,6 +569,10 @@ export interface AdminApiPostAiPriceNegotiatorAgentChatMessageRequest {
|
|
|
564
569
|
sendAdminLeadAiPriceNegotiatorAgentChatMessageInput: SendAdminLeadAiPriceNegotiatorAgentChatMessageInput;
|
|
565
570
|
}
|
|
566
571
|
|
|
572
|
+
export interface AdminApiPreviewSellerPayoutRequest {
|
|
573
|
+
paySellerInvoicesInput: PaySellerInvoicesInput;
|
|
574
|
+
}
|
|
575
|
+
|
|
567
576
|
export interface AdminApiPurgeDomainCdnCacheRequest {
|
|
568
577
|
domainId: string;
|
|
569
578
|
}
|
|
@@ -3588,21 +3597,14 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
3588
3597
|
}
|
|
3589
3598
|
|
|
3590
3599
|
/**
|
|
3591
|
-
*
|
|
3592
|
-
* Pay
|
|
3600
|
+
* Marks a seller invoice transaction as paid when the payout has been processed.
|
|
3601
|
+
* Pay seller invoice
|
|
3593
3602
|
*/
|
|
3594
|
-
async
|
|
3595
|
-
if (requestParameters['transferId'] == null) {
|
|
3596
|
-
throw new runtime.RequiredError(
|
|
3597
|
-
'transferId',
|
|
3598
|
-
'Required parameter "transferId" was null or undefined when calling payDomainTransferSellerInvoice().'
|
|
3599
|
-
);
|
|
3600
|
-
}
|
|
3601
|
-
|
|
3603
|
+
async paySellerInvoiceRaw(requestParameters: AdminApiPaySellerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
3602
3604
|
if (requestParameters['invoiceId'] == null) {
|
|
3603
3605
|
throw new runtime.RequiredError(
|
|
3604
3606
|
'invoiceId',
|
|
3605
|
-
'Required parameter "invoiceId" was null or undefined when calling
|
|
3607
|
+
'Required parameter "invoiceId" was null or undefined when calling paySellerInvoice().'
|
|
3606
3608
|
);
|
|
3607
3609
|
}
|
|
3608
3610
|
|
|
@@ -3619,7 +3621,7 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
3619
3621
|
}
|
|
3620
3622
|
}
|
|
3621
3623
|
const response = await this.request({
|
|
3622
|
-
path: `/admin/
|
|
3624
|
+
path: `/admin/invoices/{invoiceId}/pay`.replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))),
|
|
3623
3625
|
method: 'POST',
|
|
3624
3626
|
headers: headerParameters,
|
|
3625
3627
|
query: queryParameters,
|
|
@@ -3629,22 +3631,22 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
3629
3631
|
}
|
|
3630
3632
|
|
|
3631
3633
|
/**
|
|
3632
|
-
*
|
|
3633
|
-
* Pay
|
|
3634
|
+
* Marks a seller invoice transaction as paid when the payout has been processed.
|
|
3635
|
+
* Pay seller invoice
|
|
3634
3636
|
*/
|
|
3635
|
-
async
|
|
3636
|
-
await this.
|
|
3637
|
+
async paySellerInvoice(requestParameters: AdminApiPaySellerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
3638
|
+
await this.paySellerInvoiceRaw(requestParameters, initOverrides);
|
|
3637
3639
|
}
|
|
3638
3640
|
|
|
3639
3641
|
/**
|
|
3640
|
-
*
|
|
3641
|
-
* Pay seller
|
|
3642
|
+
* Pays several invoices of one seller out together. To a bank account they go in one transfer, so the seller pays the fee of an international transfer once; they then have to be in one currency. Through Stripe each invoice is its own transfer.
|
|
3643
|
+
* Pay seller invoices in one payout
|
|
3642
3644
|
*/
|
|
3643
|
-
async
|
|
3644
|
-
if (requestParameters['
|
|
3645
|
+
async paySellerInvoicesRaw(requestParameters: AdminApiPaySellerInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
3646
|
+
if (requestParameters['paySellerInvoicesInput'] == null) {
|
|
3645
3647
|
throw new runtime.RequiredError(
|
|
3646
|
-
'
|
|
3647
|
-
'Required parameter "
|
|
3648
|
+
'paySellerInvoicesInput',
|
|
3649
|
+
'Required parameter "paySellerInvoicesInput" was null or undefined when calling paySellerInvoices().'
|
|
3648
3650
|
);
|
|
3649
3651
|
}
|
|
3650
3652
|
|
|
@@ -3652,6 +3654,8 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
3652
3654
|
|
|
3653
3655
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
3654
3656
|
|
|
3657
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
3658
|
+
|
|
3655
3659
|
if (this.configuration && this.configuration.accessToken) {
|
|
3656
3660
|
const token = this.configuration.accessToken;
|
|
3657
3661
|
const tokenString = await token("bearer", []);
|
|
@@ -3661,21 +3665,22 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
3661
3665
|
}
|
|
3662
3666
|
}
|
|
3663
3667
|
const response = await this.request({
|
|
3664
|
-
path: `/admin/invoices/
|
|
3668
|
+
path: `/admin/invoices/pay`,
|
|
3665
3669
|
method: 'POST',
|
|
3666
3670
|
headers: headerParameters,
|
|
3667
3671
|
query: queryParameters,
|
|
3672
|
+
body: PaySellerInvoicesInputToJSON(requestParameters['paySellerInvoicesInput']),
|
|
3668
3673
|
}, initOverrides);
|
|
3669
3674
|
|
|
3670
3675
|
return new runtime.VoidApiResponse(response);
|
|
3671
3676
|
}
|
|
3672
3677
|
|
|
3673
3678
|
/**
|
|
3674
|
-
*
|
|
3675
|
-
* Pay seller
|
|
3679
|
+
* Pays several invoices of one seller out together. To a bank account they go in one transfer, so the seller pays the fee of an international transfer once; they then have to be in one currency. Through Stripe each invoice is its own transfer.
|
|
3680
|
+
* Pay seller invoices in one payout
|
|
3676
3681
|
*/
|
|
3677
|
-
async
|
|
3678
|
-
await this.
|
|
3682
|
+
async paySellerInvoices(requestParameters: AdminApiPaySellerInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
3683
|
+
await this.paySellerInvoicesRaw(requestParameters, initOverrides);
|
|
3679
3684
|
}
|
|
3680
3685
|
|
|
3681
3686
|
/**
|
|
@@ -3822,6 +3827,52 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
3822
3827
|
return await response.value();
|
|
3823
3828
|
}
|
|
3824
3829
|
|
|
3830
|
+
/**
|
|
3831
|
+
* Tells what paying these invoices out together would do, without doing it: the bank account the transfer goes to, and the fee taken out of what the seller receives. Refuses what paying them would refuse.
|
|
3832
|
+
* Preview a payout of seller invoices
|
|
3833
|
+
*/
|
|
3834
|
+
async previewSellerPayoutRaw(requestParameters: AdminApiPreviewSellerPayoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SellerPayoutPreviewDto>> {
|
|
3835
|
+
if (requestParameters['paySellerInvoicesInput'] == null) {
|
|
3836
|
+
throw new runtime.RequiredError(
|
|
3837
|
+
'paySellerInvoicesInput',
|
|
3838
|
+
'Required parameter "paySellerInvoicesInput" was null or undefined when calling previewSellerPayout().'
|
|
3839
|
+
);
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3842
|
+
const queryParameters: any = {};
|
|
3843
|
+
|
|
3844
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
3845
|
+
|
|
3846
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
3847
|
+
|
|
3848
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
3849
|
+
const token = this.configuration.accessToken;
|
|
3850
|
+
const tokenString = await token("bearer", []);
|
|
3851
|
+
|
|
3852
|
+
if (tokenString) {
|
|
3853
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
3854
|
+
}
|
|
3855
|
+
}
|
|
3856
|
+
const response = await this.request({
|
|
3857
|
+
path: `/admin/invoices/pay/preview`,
|
|
3858
|
+
method: 'POST',
|
|
3859
|
+
headers: headerParameters,
|
|
3860
|
+
query: queryParameters,
|
|
3861
|
+
body: PaySellerInvoicesInputToJSON(requestParameters['paySellerInvoicesInput']),
|
|
3862
|
+
}, initOverrides);
|
|
3863
|
+
|
|
3864
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SellerPayoutPreviewDtoFromJSON(jsonValue));
|
|
3865
|
+
}
|
|
3866
|
+
|
|
3867
|
+
/**
|
|
3868
|
+
* Tells what paying these invoices out together would do, without doing it: the bank account the transfer goes to, and the fee taken out of what the seller receives. Refuses what paying them would refuse.
|
|
3869
|
+
* Preview a payout of seller invoices
|
|
3870
|
+
*/
|
|
3871
|
+
async previewSellerPayout(requestParameters: AdminApiPreviewSellerPayoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SellerPayoutPreviewDto> {
|
|
3872
|
+
const response = await this.previewSellerPayoutRaw(requestParameters, initOverrides);
|
|
3873
|
+
return await response.value();
|
|
3874
|
+
}
|
|
3875
|
+
|
|
3825
3876
|
/**
|
|
3826
3877
|
* Purges the CDN cache for the specified domain landing page.
|
|
3827
3878
|
* Purge domain CDN cache
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { MoneyDto } from './MoneyDto';
|
|
17
|
+
import {
|
|
18
|
+
MoneyDtoFromJSON,
|
|
19
|
+
MoneyDtoFromJSONTyped,
|
|
20
|
+
MoneyDtoToJSON,
|
|
21
|
+
MoneyDtoToJSONTyped,
|
|
22
|
+
} from './MoneyDto';
|
|
16
23
|
import type { AccountBankAccountDetailsDto } from './AccountBankAccountDetailsDto';
|
|
17
24
|
import {
|
|
18
25
|
AccountBankAccountDetailsDtoFromJSON,
|
|
@@ -75,6 +82,18 @@ export interface AccountBankAccountDto {
|
|
|
75
82
|
* @memberof AccountBankAccountDto
|
|
76
83
|
*/
|
|
77
84
|
payable: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* How we pay out to this bank account: LOCAL over the country's own clearing system, which costs the seller nothing, or SWIFT, an international transfer whose fee is taken out of each payout. Null when we can't pay out to it.
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof AccountBankAccountDto
|
|
89
|
+
*/
|
|
90
|
+
transferMethod: AccountBankAccountDtoTransferMethodEnum | null;
|
|
91
|
+
/**
|
|
92
|
+
* What a payout to this bank account costs the seller, as an indication: the fee of a SWIFT transfer in the account currency at the rate of the day. Null for a local payout, and when the fee is not known.
|
|
93
|
+
* @type {MoneyDto}
|
|
94
|
+
* @memberof AccountBankAccountDto
|
|
95
|
+
*/
|
|
96
|
+
payoutFee: MoneyDto | null;
|
|
78
97
|
}
|
|
79
98
|
|
|
80
99
|
|
|
@@ -100,6 +119,15 @@ export const AccountBankAccountDtoNameCheckStatusEnum = {
|
|
|
100
119
|
} as const;
|
|
101
120
|
export type AccountBankAccountDtoNameCheckStatusEnum = typeof AccountBankAccountDtoNameCheckStatusEnum[keyof typeof AccountBankAccountDtoNameCheckStatusEnum];
|
|
102
121
|
|
|
122
|
+
/**
|
|
123
|
+
* @export
|
|
124
|
+
*/
|
|
125
|
+
export const AccountBankAccountDtoTransferMethodEnum = {
|
|
126
|
+
LOCAL: 'LOCAL',
|
|
127
|
+
SWIFT: 'SWIFT'
|
|
128
|
+
} as const;
|
|
129
|
+
export type AccountBankAccountDtoTransferMethodEnum = typeof AccountBankAccountDtoTransferMethodEnum[keyof typeof AccountBankAccountDtoTransferMethodEnum];
|
|
130
|
+
|
|
103
131
|
|
|
104
132
|
/**
|
|
105
133
|
* Check if a given object implements the AccountBankAccountDto interface.
|
|
@@ -113,6 +141,8 @@ export function instanceOfAccountBankAccountDto(value: object): value is Account
|
|
|
113
141
|
if (!('bankStatementSubmittedAt' in value) || value['bankStatementSubmittedAt'] === undefined) return false;
|
|
114
142
|
if (!('details' in value) || value['details'] === undefined) return false;
|
|
115
143
|
if (!('payable' in value) || value['payable'] === undefined) return false;
|
|
144
|
+
if (!('transferMethod' in value) || value['transferMethod'] === undefined) return false;
|
|
145
|
+
if (!('payoutFee' in value) || value['payoutFee'] === undefined) return false;
|
|
116
146
|
return true;
|
|
117
147
|
}
|
|
118
148
|
|
|
@@ -134,6 +164,8 @@ export function AccountBankAccountDtoFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
134
164
|
'bankStatementSubmittedAt': (json['bankStatementSubmittedAt'] == null ? null : new Date(json['bankStatementSubmittedAt'])),
|
|
135
165
|
'details': AccountBankAccountDetailsDtoFromJSON(json['details']),
|
|
136
166
|
'payable': json['payable'],
|
|
167
|
+
'transferMethod': json['transferMethod'],
|
|
168
|
+
'payoutFee': MoneyDtoFromJSON(json['payoutFee']),
|
|
137
169
|
};
|
|
138
170
|
}
|
|
139
171
|
|
|
@@ -156,6 +188,8 @@ export function AccountBankAccountDtoToJSONTyped(value?: AccountBankAccountDto |
|
|
|
156
188
|
'bankStatementSubmittedAt': (value['bankStatementSubmittedAt'] == null ? null : (value['bankStatementSubmittedAt'] as any).toISOString()),
|
|
157
189
|
'details': AccountBankAccountDetailsDtoToJSON(value['details']),
|
|
158
190
|
'payable': value['payable'],
|
|
191
|
+
'transferMethod': value['transferMethod'],
|
|
192
|
+
'payoutFee': MoneyDtoToJSON(value['payoutFee']),
|
|
159
193
|
};
|
|
160
194
|
}
|
|
161
195
|
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PayoutFrequency } from './PayoutFrequency';
|
|
17
|
+
import {
|
|
18
|
+
PayoutFrequencyFromJSON,
|
|
19
|
+
PayoutFrequencyFromJSONTyped,
|
|
20
|
+
PayoutFrequencyToJSON,
|
|
21
|
+
PayoutFrequencyToJSONTyped,
|
|
22
|
+
} from './PayoutFrequency';
|
|
23
|
+
|
|
16
24
|
/**
|
|
17
25
|
*
|
|
18
26
|
* @export
|
|
@@ -31,6 +39,18 @@ export interface AccountPayoutDto {
|
|
|
31
39
|
* @memberof AccountPayoutDto
|
|
32
40
|
*/
|
|
33
41
|
provider: AccountPayoutDtoProviderEnum;
|
|
42
|
+
/**
|
|
43
|
+
* How often the seller is paid out when they are paid out automatically: each invoice as soon as it can be (immediate), or what came in during a week, two weeks, month or quarter when the next one starts. An admin pays out the others, whatever this says.
|
|
44
|
+
* @type {PayoutFrequency}
|
|
45
|
+
* @memberof AccountPayoutDto
|
|
46
|
+
*/
|
|
47
|
+
frequency: PayoutFrequency;
|
|
48
|
+
/**
|
|
49
|
+
* Whether payouts that cost the seller nothing (a local transfer to their bank account) wait for the frequency too. When false, those are made as soon as they can be, and only payouts with a transfer fee wait, to go out together.
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof AccountPayoutDto
|
|
52
|
+
*/
|
|
53
|
+
batchFreePayouts: boolean;
|
|
34
54
|
}
|
|
35
55
|
|
|
36
56
|
|
|
@@ -50,6 +70,8 @@ export type AccountPayoutDtoProviderEnum = typeof AccountPayoutDtoProviderEnum[k
|
|
|
50
70
|
export function instanceOfAccountPayoutDto(value: object): value is AccountPayoutDto {
|
|
51
71
|
if (!('automatic' in value) || value['automatic'] === undefined) return false;
|
|
52
72
|
if (!('provider' in value) || value['provider'] === undefined) return false;
|
|
73
|
+
if (!('frequency' in value) || value['frequency'] === undefined) return false;
|
|
74
|
+
if (!('batchFreePayouts' in value) || value['batchFreePayouts'] === undefined) return false;
|
|
53
75
|
return true;
|
|
54
76
|
}
|
|
55
77
|
|
|
@@ -65,6 +87,8 @@ export function AccountPayoutDtoFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
65
87
|
|
|
66
88
|
'automatic': json['automatic'],
|
|
67
89
|
'provider': json['provider'],
|
|
90
|
+
'frequency': PayoutFrequencyFromJSON(json['frequency']),
|
|
91
|
+
'batchFreePayouts': json['batchFreePayouts'],
|
|
68
92
|
};
|
|
69
93
|
}
|
|
70
94
|
|
|
@@ -81,6 +105,8 @@ export function AccountPayoutDtoToJSONTyped(value?: AccountPayoutDto | null, ign
|
|
|
81
105
|
|
|
82
106
|
'automatic': value['automatic'],
|
|
83
107
|
'provider': value['provider'],
|
|
108
|
+
'frequency': PayoutFrequencyToJSON(value['frequency']),
|
|
109
|
+
'batchFreePayouts': value['batchFreePayouts'],
|
|
84
110
|
};
|
|
85
111
|
}
|
|
86
112
|
|
|
@@ -26,11 +26,17 @@ export interface BankAccountFormatCountryDto {
|
|
|
26
26
|
*/
|
|
27
27
|
countryCode: string;
|
|
28
28
|
/**
|
|
29
|
-
* ISO 4217 codes of the currencies we pay out to in this country, the country's own currency
|
|
29
|
+
* ISO 4217 codes of the currencies we pay out to in this country: first the ones paid out locally, the country's own currency ahead, then the ones in `swiftCurrencyCodes`.
|
|
30
30
|
* @type {Array<string>}
|
|
31
31
|
* @memberof BankAccountFormatCountryDto
|
|
32
32
|
*/
|
|
33
33
|
currencyCodes: Array<string>;
|
|
34
|
+
/**
|
|
35
|
+
* The currencies among `currencyCodes` that are paid out by SWIFT, an international transfer with a fee per payout, because there is no local payout for them in this country.
|
|
36
|
+
* @type {Array<string>}
|
|
37
|
+
* @memberof BankAccountFormatCountryDto
|
|
38
|
+
*/
|
|
39
|
+
swiftCurrencyCodes: Array<string>;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
/**
|
|
@@ -39,6 +45,7 @@ export interface BankAccountFormatCountryDto {
|
|
|
39
45
|
export function instanceOfBankAccountFormatCountryDto(value: object): value is BankAccountFormatCountryDto {
|
|
40
46
|
if (!('countryCode' in value) || value['countryCode'] === undefined) return false;
|
|
41
47
|
if (!('currencyCodes' in value) || value['currencyCodes'] === undefined) return false;
|
|
48
|
+
if (!('swiftCurrencyCodes' in value) || value['swiftCurrencyCodes'] === undefined) return false;
|
|
42
49
|
return true;
|
|
43
50
|
}
|
|
44
51
|
|
|
@@ -54,6 +61,7 @@ export function BankAccountFormatCountryDtoFromJSONTyped(json: any, ignoreDiscri
|
|
|
54
61
|
|
|
55
62
|
'countryCode': json['countryCode'],
|
|
56
63
|
'currencyCodes': json['currencyCodes'],
|
|
64
|
+
'swiftCurrencyCodes': json['swiftCurrencyCodes'],
|
|
57
65
|
};
|
|
58
66
|
}
|
|
59
67
|
|
|
@@ -70,6 +78,7 @@ export function BankAccountFormatCountryDtoToJSONTyped(value?: BankAccountFormat
|
|
|
70
78
|
|
|
71
79
|
'countryCode': value['countryCode'],
|
|
72
80
|
'currencyCodes': value['currencyCodes'],
|
|
81
|
+
'swiftCurrencyCodes': value['swiftCurrencyCodes'],
|
|
73
82
|
};
|
|
74
83
|
}
|
|
75
84
|
|
|
@@ -20,6 +20,20 @@ import {
|
|
|
20
20
|
BankAccountFormatFieldDtoToJSON,
|
|
21
21
|
BankAccountFormatFieldDtoToJSONTyped,
|
|
22
22
|
} from './BankAccountFormatFieldDto';
|
|
23
|
+
import type { MoneyDto } from './MoneyDto';
|
|
24
|
+
import {
|
|
25
|
+
MoneyDtoFromJSON,
|
|
26
|
+
MoneyDtoFromJSONTyped,
|
|
27
|
+
MoneyDtoToJSON,
|
|
28
|
+
MoneyDtoToJSONTyped,
|
|
29
|
+
} from './MoneyDto';
|
|
30
|
+
import type { BankAccountTransferMethod } from './BankAccountTransferMethod';
|
|
31
|
+
import {
|
|
32
|
+
BankAccountTransferMethodFromJSON,
|
|
33
|
+
BankAccountTransferMethodFromJSONTyped,
|
|
34
|
+
BankAccountTransferMethodToJSON,
|
|
35
|
+
BankAccountTransferMethodToJSONTyped,
|
|
36
|
+
} from './BankAccountTransferMethod';
|
|
23
37
|
|
|
24
38
|
/**
|
|
25
39
|
*
|
|
@@ -39,6 +53,18 @@ export interface BankAccountFormatDto {
|
|
|
39
53
|
* @memberof BankAccountFormatDto
|
|
40
54
|
*/
|
|
41
55
|
currencyCode: string;
|
|
56
|
+
/**
|
|
57
|
+
* How we pay out to such an account: LOCAL over the country's own clearing system, which costs the seller nothing, or SWIFT, an international transfer whose fee is taken out of each payout.
|
|
58
|
+
* @type {BankAccountTransferMethod}
|
|
59
|
+
* @memberof BankAccountFormatDto
|
|
60
|
+
*/
|
|
61
|
+
transferMethod: BankAccountTransferMethod;
|
|
62
|
+
/**
|
|
63
|
+
* What a payout to such an account costs the seller, as an indication: the fee of a SWIFT transfer in the account currency at the rate of the day. Null for a local payout, and when the fee is not known.
|
|
64
|
+
* @type {MoneyDto}
|
|
65
|
+
* @memberof BankAccountFormatDto
|
|
66
|
+
*/
|
|
67
|
+
payoutFee: MoneyDto | null;
|
|
42
68
|
/**
|
|
43
69
|
* The fields to fill in, in display order.
|
|
44
70
|
* @type {Array<BankAccountFormatFieldDto>}
|
|
@@ -47,12 +73,16 @@ export interface BankAccountFormatDto {
|
|
|
47
73
|
fields: Array<BankAccountFormatFieldDto>;
|
|
48
74
|
}
|
|
49
75
|
|
|
76
|
+
|
|
77
|
+
|
|
50
78
|
/**
|
|
51
79
|
* Check if a given object implements the BankAccountFormatDto interface.
|
|
52
80
|
*/
|
|
53
81
|
export function instanceOfBankAccountFormatDto(value: object): value is BankAccountFormatDto {
|
|
54
82
|
if (!('countryCode' in value) || value['countryCode'] === undefined) return false;
|
|
55
83
|
if (!('currencyCode' in value) || value['currencyCode'] === undefined) return false;
|
|
84
|
+
if (!('transferMethod' in value) || value['transferMethod'] === undefined) return false;
|
|
85
|
+
if (!('payoutFee' in value) || value['payoutFee'] === undefined) return false;
|
|
56
86
|
if (!('fields' in value) || value['fields'] === undefined) return false;
|
|
57
87
|
return true;
|
|
58
88
|
}
|
|
@@ -69,6 +99,8 @@ export function BankAccountFormatDtoFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
69
99
|
|
|
70
100
|
'countryCode': json['countryCode'],
|
|
71
101
|
'currencyCode': json['currencyCode'],
|
|
102
|
+
'transferMethod': BankAccountTransferMethodFromJSON(json['transferMethod']),
|
|
103
|
+
'payoutFee': MoneyDtoFromJSON(json['payoutFee']),
|
|
72
104
|
'fields': ((json['fields'] as Array<any>).map(BankAccountFormatFieldDtoFromJSON)),
|
|
73
105
|
};
|
|
74
106
|
}
|
|
@@ -86,6 +118,8 @@ export function BankAccountFormatDtoToJSONTyped(value?: BankAccountFormatDto | n
|
|
|
86
118
|
|
|
87
119
|
'countryCode': value['countryCode'],
|
|
88
120
|
'currencyCode': value['currencyCode'],
|
|
121
|
+
'transferMethod': BankAccountTransferMethodToJSON(value['transferMethod']),
|
|
122
|
+
'payoutFee': MoneyDtoToJSON(value['payoutFee']),
|
|
89
123
|
'fields': ((value['fields'] as Array<any>).map(BankAccountFormatFieldDtoToJSON)),
|
|
90
124
|
};
|
|
91
125
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
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
|
+
/**
|
|
17
|
+
* How the payout reaches the bank account: LOCAL over the country's own clearing system, or SWIFT, an international transfer with a fee.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const BankAccountTransferMethod = {
|
|
21
|
+
LOCAL: 'LOCAL',
|
|
22
|
+
SWIFT: 'SWIFT'
|
|
23
|
+
} as const;
|
|
24
|
+
export type BankAccountTransferMethod = typeof BankAccountTransferMethod[keyof typeof BankAccountTransferMethod];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfBankAccountTransferMethod(value: any): boolean {
|
|
28
|
+
for (const key in BankAccountTransferMethod) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(BankAccountTransferMethod, key)) {
|
|
30
|
+
if (BankAccountTransferMethod[key as keyof typeof BankAccountTransferMethod] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function BankAccountTransferMethodFromJSON(json: any): BankAccountTransferMethod {
|
|
39
|
+
return BankAccountTransferMethodFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function BankAccountTransferMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankAccountTransferMethod {
|
|
43
|
+
return json as BankAccountTransferMethod;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function BankAccountTransferMethodToJSON(value?: BankAccountTransferMethod | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function BankAccountTransferMethodToJSONTyped(value: any, ignoreDiscriminator: boolean): BankAccountTransferMethod {
|
|
51
|
+
return value as BankAccountTransferMethod;
|
|
52
|
+
}
|
|
53
|
+
|
package/src/models/InvoiceDto.ts
CHANGED
|
@@ -27,6 +27,13 @@ import {
|
|
|
27
27
|
InvoiceSellerAccountDtoToJSON,
|
|
28
28
|
InvoiceSellerAccountDtoToJSONTyped,
|
|
29
29
|
} from './InvoiceSellerAccountDto';
|
|
30
|
+
import type { InvoicePayoutDto } from './InvoicePayoutDto';
|
|
31
|
+
import {
|
|
32
|
+
InvoicePayoutDtoFromJSON,
|
|
33
|
+
InvoicePayoutDtoFromJSONTyped,
|
|
34
|
+
InvoicePayoutDtoToJSON,
|
|
35
|
+
InvoicePayoutDtoToJSONTyped,
|
|
36
|
+
} from './InvoicePayoutDto';
|
|
30
37
|
import type { MoneyDto } from './MoneyDto';
|
|
31
38
|
import {
|
|
32
39
|
MoneyDtoFromJSON,
|
|
@@ -126,6 +133,18 @@ export interface InvoiceDto {
|
|
|
126
133
|
* @memberof InvoiceDto
|
|
127
134
|
*/
|
|
128
135
|
transaction: InvoiceDtoTransaction | null;
|
|
136
|
+
/**
|
|
137
|
+
* For a seller invoice awaiting its payout: when it is due, by how often the seller wants to be paid out. A payout that costs the seller nothing is due right away, unless they want those to wait too, and so is every invoice of a seller who is not paid out automatically. Null when it awaits no payout.
|
|
138
|
+
* @type {Date}
|
|
139
|
+
* @memberof InvoiceDto
|
|
140
|
+
*/
|
|
141
|
+
payoutDueAt: Date | null;
|
|
142
|
+
/**
|
|
143
|
+
* The bank transfer a seller invoice is or was last paid out with. Null when it was in none.
|
|
144
|
+
* @type {InvoicePayoutDto}
|
|
145
|
+
* @memberof InvoiceDto
|
|
146
|
+
*/
|
|
147
|
+
payout: InvoicePayoutDto | null;
|
|
129
148
|
}
|
|
130
149
|
|
|
131
150
|
|
|
@@ -167,6 +186,8 @@ export function instanceOfInvoiceDto(value: object): value is InvoiceDto {
|
|
|
167
186
|
if (!('isAffiliateCommission' in value) || value['isAffiliateCommission'] === undefined) return false;
|
|
168
187
|
if (!('buyerEmail' in value) || value['buyerEmail'] === undefined) return false;
|
|
169
188
|
if (!('transaction' in value) || value['transaction'] === undefined) return false;
|
|
189
|
+
if (!('payoutDueAt' in value) || value['payoutDueAt'] === undefined) return false;
|
|
190
|
+
if (!('payout' in value) || value['payout'] === undefined) return false;
|
|
170
191
|
return true;
|
|
171
192
|
}
|
|
172
193
|
|
|
@@ -193,6 +214,8 @@ export function InvoiceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
193
214
|
'isAffiliateCommission': json['isAffiliateCommission'],
|
|
194
215
|
'buyerEmail': json['buyerEmail'],
|
|
195
216
|
'transaction': InvoiceDtoTransactionFromJSON(json['transaction']),
|
|
217
|
+
'payoutDueAt': (json['payoutDueAt'] == null ? null : new Date(json['payoutDueAt'])),
|
|
218
|
+
'payout': InvoicePayoutDtoFromJSON(json['payout']),
|
|
196
219
|
};
|
|
197
220
|
}
|
|
198
221
|
|
|
@@ -220,6 +243,8 @@ export function InvoiceDtoToJSONTyped(value?: InvoiceDto | null, ignoreDiscrimin
|
|
|
220
243
|
'isAffiliateCommission': value['isAffiliateCommission'],
|
|
221
244
|
'buyerEmail': value['buyerEmail'],
|
|
222
245
|
'transaction': InvoiceDtoTransactionToJSON(value['transaction']),
|
|
246
|
+
'payoutDueAt': (value['payoutDueAt'] == null ? null : (value['payoutDueAt'] as any).toISOString()),
|
|
247
|
+
'payout': InvoicePayoutDtoToJSON(value['payout']),
|
|
223
248
|
};
|
|
224
249
|
}
|
|
225
250
|
|