@kanmon/sdk 2.0.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/README.md +2 -0
- package/package.json +45 -0
- package/src/index.ts +65 -0
- package/src/openapi/.openapi-generator/FILES +130 -0
- package/src/openapi/.openapi-generator/VERSION +1 -0
- package/src/openapi/.openapi-generator-ignore +30 -0
- package/src/openapi/apis/BankAccountsApi.ts +503 -0
- package/src/openapi/apis/BusinessesApi.ts +614 -0
- package/src/openapi/apis/ConnectTokensApi.ts +133 -0
- package/src/openapi/apis/DocumentsApi.ts +150 -0
- package/src/openapi/apis/DrawRequestsApi.ts +258 -0
- package/src/openapi/apis/EmbeddedSessionsApi.ts +141 -0
- package/src/openapi/apis/InvoicesApi.ts +272 -0
- package/src/openapi/apis/IssuedProductsApi.ts +251 -0
- package/src/openapi/apis/OffersApi.ts +251 -0
- package/src/openapi/apis/PaymentsApi.ts +268 -0
- package/src/openapi/apis/PrequalificationsApi.ts +141 -0
- package/src/openapi/apis/UsersApi.ts +622 -0
- package/src/openapi/apis/baseapi.ts +37 -0
- package/src/openapi/apis/exception.ts +15 -0
- package/src/openapi/auth/auth.ts +79 -0
- package/src/openapi/configuration.ts +82 -0
- package/src/openapi/http/http.ts +247 -0
- package/src/openapi/http/isomorphic-fetch.ts +32 -0
- package/src/openapi/index.ts +12 -0
- package/src/openapi/middleware.ts +66 -0
- package/src/openapi/models/ActivityLog.ts +98 -0
- package/src/openapi/models/Address.ts +140 -0
- package/src/openapi/models/BadRequestException.ts +63 -0
- package/src/openapi/models/BankAccountAlreadyExistException.ts +63 -0
- package/src/openapi/models/BankAccountNotFoundException.ts +63 -0
- package/src/openapi/models/BankStatementsInvalidException.ts +63 -0
- package/src/openapi/models/Business.ts +126 -0
- package/src/openapi/models/BusinessAddress.ts +143 -0
- package/src/openapi/models/BusinessAlreadyExistsException.ts +63 -0
- package/src/openapi/models/BusinessBankAccount.ts +126 -0
- package/src/openapi/models/BusinessDocument.ts +98 -0
- package/src/openapi/models/BusinessDocumentType.ts +17 -0
- package/src/openapi/models/BusinessHasNoInvoiceFinancingProductException.ts +63 -0
- package/src/openapi/models/BusinessHasNoPrimaryOwnerException.ts +63 -0
- package/src/openapi/models/BusinessNotFoundException.ts +63 -0
- package/src/openapi/models/BusinessPlaidBankAccountNotFoundException.ts +63 -0
- package/src/openapi/models/BusinessPrequalification.ts +116 -0
- package/src/openapi/models/CheckingAccountRequiredException.ts +63 -0
- package/src/openapi/models/ConnectToken.ts +38 -0
- package/src/openapi/models/CreateBusinessBankAccountRequestBody.ts +116 -0
- package/src/openapi/models/CreateBusinessDocumentsResponse.ts +39 -0
- package/src/openapi/models/CreateBusinessRequestBody.ts +99 -0
- package/src/openapi/models/CreateConnectTokenRequestBody.ts +48 -0
- package/src/openapi/models/CreateEmbeddedSession409Response.ts +65 -0
- package/src/openapi/models/CreateSessionTokenRequestBody.ts +56 -0
- package/src/openapi/models/CreateSessionTokenRequestBodyData.ts +56 -0
- package/src/openapi/models/CreateUser409Response.ts +66 -0
- package/src/openapi/models/CreateUserRequestBody.ts +125 -0
- package/src/openapi/models/DrawRequest.ts +138 -0
- package/src/openapi/models/DrawRequestNotFoundException.ts +63 -0
- package/src/openapi/models/DrawRequestState.ts +21 -0
- package/src/openapi/models/EmbeddedSession.ts +38 -0
- package/src/openapi/models/FixedDateInvoiceRepaymentWindow.ts +50 -0
- package/src/openapi/models/FixedDurationInvoiceRepaymentWindow.ts +50 -0
- package/src/openapi/models/ForbiddenException.ts +63 -0
- package/src/openapi/models/GetActivityLogsResponse.ts +50 -0
- package/src/openapi/models/GetBusinessBankAccountsResponse.ts +50 -0
- package/src/openapi/models/GetBusinessesResponse.ts +50 -0
- package/src/openapi/models/GetDrawRequestsResponse.ts +50 -0
- package/src/openapi/models/GetInvoice404Response.ts +65 -0
- package/src/openapi/models/GetInvoicesResponse.ts +50 -0
- package/src/openapi/models/GetIssuedProductsResponse.ts +50 -0
- package/src/openapi/models/GetOffersResponse.ts +50 -0
- package/src/openapi/models/GetPaymentScheduleResponse.ts +50 -0
- package/src/openapi/models/GetPrequalificationsResponse.ts +50 -0
- package/src/openapi/models/GetUsersResponse.ts +50 -0
- package/src/openapi/models/InternalServerErrorException.ts +63 -0
- package/src/openapi/models/InvalidInvoiceDueDateException.ts +63 -0
- package/src/openapi/models/Invoice.ts +281 -0
- package/src/openapi/models/InvoiceFinancingOfferTerms.ts +61 -0
- package/src/openapi/models/InvoiceFinancingServicingData.ts +71 -0
- package/src/openapi/models/InvoiceFlowSessionTokenData.ts +51 -0
- package/src/openapi/models/InvoiceFlowWithInvoiceFileSessionTokenData.ts +51 -0
- package/src/openapi/models/InvoiceNotFoundException.ts +63 -0
- package/src/openapi/models/InvoicePaymentPlan.ts +58 -0
- package/src/openapi/models/InvoicePayorAddress.ts +143 -0
- package/src/openapi/models/InvoiceRepaymentSchedule.ts +39 -0
- package/src/openapi/models/InvoiceRepaymentScheduleItem.ts +68 -0
- package/src/openapi/models/InvoiceStatus.ts +22 -0
- package/src/openapi/models/IssuedProduct.ts +115 -0
- package/src/openapi/models/IssuedProductNotFoundException.ts +63 -0
- package/src/openapi/models/IssuedProductServicingData.ts +234 -0
- package/src/openapi/models/LineOfCreditOfferTerms.ts +80 -0
- package/src/openapi/models/LineOfCreditServicingData.ts +90 -0
- package/src/openapi/models/McaOfferTerms.ts +96 -0
- package/src/openapi/models/McaServicingData.ts +116 -0
- package/src/openapi/models/MergeUsersRequestBody.ts +68 -0
- package/src/openapi/models/MergeUsersResponseBody.ts +39 -0
- package/src/openapi/models/MultipleDurationInvoiceRepaymentWindow.ts +48 -0
- package/src/openapi/models/ObjectSerializer.ts +643 -0
- package/src/openapi/models/Offer.ts +106 -0
- package/src/openapi/models/OfferAlreadySelectedException.ts +63 -0
- package/src/openapi/models/OfferNotFoundException.ts +63 -0
- package/src/openapi/models/OfferNotLockedException.ts +63 -0
- package/src/openapi/models/OfferTerms.ts +184 -0
- package/src/openapi/models/PaginationResult.ts +58 -0
- package/src/openapi/models/PaymentOrder.ts +198 -0
- package/src/openapi/models/PaymentOrderNotFoundException.ts +63 -0
- package/src/openapi/models/PaymentOrderStatus.ts +19 -0
- package/src/openapi/models/PaymentPlanRepaymentSchedule.ts +39 -0
- package/src/openapi/models/PaymentPlanRepaymentScheduleItem.ts +48 -0
- package/src/openapi/models/PaymentScheduleItem.ts +56 -0
- package/src/openapi/models/PaymentScheduleItemPaymentOrder.ts +201 -0
- package/src/openapi/models/PlaidAssetReportsInvalidException.ts +63 -0
- package/src/openapi/models/PlatformInvoiceIdAlreadyExistsForAnotherIssuedProductException.ts +63 -0
- package/src/openapi/models/PrimaryBusinessOwnerAlreadyExistsForBusinessException.ts +63 -0
- package/src/openapi/models/PrimaryBusinessOwnerAlreadyExistsWithEmailException.ts +63 -0
- package/src/openapi/models/PrimaryBusinessOwnerNotFoundException.ts +63 -0
- package/src/openapi/models/SessionInvoice.ts +165 -0
- package/src/openapi/models/SessionInvoiceWithInvoiceFile.ts +175 -0
- package/src/openapi/models/SomeOffersHaveExpiredException.ts +63 -0
- package/src/openapi/models/TermLoanOfferTerms.ts +90 -0
- package/src/openapi/models/TermLoanServicingData.ts +100 -0
- package/src/openapi/models/UnmergeableBusinessException.ts +63 -0
- package/src/openapi/models/UpdateBusinessAccountRequestBody.ts +68 -0
- package/src/openapi/models/UpdateBusinessRequestBody.ts +99 -0
- package/src/openapi/models/UpdateUser409Response.ts +65 -0
- package/src/openapi/models/UpdateUserRequestBody.ts +95 -0
- package/src/openapi/models/User.ts +152 -0
- package/src/openapi/models/UserAddress.ts +143 -0
- package/src/openapi/models/UserAlreadyExistsWithEmailException.ts +63 -0
- package/src/openapi/models/UserAlreadyExistsWithPlatformUserIdException.ts +63 -0
- package/src/openapi/models/UserNotFoundException.ts +63 -0
- package/src/openapi/models/all.ts +102 -0
- package/src/openapi/rxjsStub.ts +27 -0
- package/src/openapi/servers.ts +58 -0
- package/src/openapi/types/ObjectParamAPI.ts +1403 -0
- package/src/openapi/types/ObservableAPI.ts +1348 -0
- package/src/openapi/types/PromiseAPI.ts +995 -0
- package/src/openapi/util.ts +37 -0
- package/tsconfig.json +32 -0
|
@@ -0,0 +1,1348 @@
|
|
|
1
|
+
import { ResponseContext, RequestContext, HttpFile, HttpInfo } from '../http/http';
|
|
2
|
+
import { Configuration} from '../configuration'
|
|
3
|
+
import { Observable, of, from } from '../rxjsStub';
|
|
4
|
+
import {mergeMap, map} from '../rxjsStub';
|
|
5
|
+
import { ActivityLog } from '../models/ActivityLog';
|
|
6
|
+
import { Address } from '../models/Address';
|
|
7
|
+
import { BadRequestException } from '../models/BadRequestException';
|
|
8
|
+
import { BankAccountAlreadyExistException } from '../models/BankAccountAlreadyExistException';
|
|
9
|
+
import { BankAccountNotFoundException } from '../models/BankAccountNotFoundException';
|
|
10
|
+
import { BankStatementsInvalidException } from '../models/BankStatementsInvalidException';
|
|
11
|
+
import { Business } from '../models/Business';
|
|
12
|
+
import { BusinessAddress } from '../models/BusinessAddress';
|
|
13
|
+
import { BusinessAlreadyExistsException } from '../models/BusinessAlreadyExistsException';
|
|
14
|
+
import { BusinessBankAccount } from '../models/BusinessBankAccount';
|
|
15
|
+
import { BusinessDocument } from '../models/BusinessDocument';
|
|
16
|
+
import { BusinessDocumentType } from '../models/BusinessDocumentType';
|
|
17
|
+
import { BusinessHasNoInvoiceFinancingProductException } from '../models/BusinessHasNoInvoiceFinancingProductException';
|
|
18
|
+
import { BusinessHasNoPrimaryOwnerException } from '../models/BusinessHasNoPrimaryOwnerException';
|
|
19
|
+
import { BusinessNotFoundException } from '../models/BusinessNotFoundException';
|
|
20
|
+
import { BusinessPlaidBankAccountNotFoundException } from '../models/BusinessPlaidBankAccountNotFoundException';
|
|
21
|
+
import { BusinessPrequalification } from '../models/BusinessPrequalification';
|
|
22
|
+
import { CheckingAccountRequiredException } from '../models/CheckingAccountRequiredException';
|
|
23
|
+
import { ConnectToken } from '../models/ConnectToken';
|
|
24
|
+
import { CreateBusinessBankAccountRequestBody } from '../models/CreateBusinessBankAccountRequestBody';
|
|
25
|
+
import { CreateBusinessDocumentsResponse } from '../models/CreateBusinessDocumentsResponse';
|
|
26
|
+
import { CreateBusinessRequestBody } from '../models/CreateBusinessRequestBody';
|
|
27
|
+
import { CreateConnectTokenRequestBody } from '../models/CreateConnectTokenRequestBody';
|
|
28
|
+
import { CreateEmbeddedSession409Response } from '../models/CreateEmbeddedSession409Response';
|
|
29
|
+
import { CreateSessionTokenRequestBody } from '../models/CreateSessionTokenRequestBody';
|
|
30
|
+
import { CreateSessionTokenRequestBodyData } from '../models/CreateSessionTokenRequestBodyData';
|
|
31
|
+
import { CreateUser409Response } from '../models/CreateUser409Response';
|
|
32
|
+
import { CreateUserRequestBody } from '../models/CreateUserRequestBody';
|
|
33
|
+
import { DrawRequest } from '../models/DrawRequest';
|
|
34
|
+
import { DrawRequestNotFoundException } from '../models/DrawRequestNotFoundException';
|
|
35
|
+
import { DrawRequestState } from '../models/DrawRequestState';
|
|
36
|
+
import { EmbeddedSession } from '../models/EmbeddedSession';
|
|
37
|
+
import { FixedDateInvoiceRepaymentWindow } from '../models/FixedDateInvoiceRepaymentWindow';
|
|
38
|
+
import { FixedDurationInvoiceRepaymentWindow } from '../models/FixedDurationInvoiceRepaymentWindow';
|
|
39
|
+
import { ForbiddenException } from '../models/ForbiddenException';
|
|
40
|
+
import { GetActivityLogsResponse } from '../models/GetActivityLogsResponse';
|
|
41
|
+
import { GetBusinessBankAccountsResponse } from '../models/GetBusinessBankAccountsResponse';
|
|
42
|
+
import { GetBusinessesResponse } from '../models/GetBusinessesResponse';
|
|
43
|
+
import { GetDrawRequestsResponse } from '../models/GetDrawRequestsResponse';
|
|
44
|
+
import { GetInvoice404Response } from '../models/GetInvoice404Response';
|
|
45
|
+
import { GetInvoicesResponse } from '../models/GetInvoicesResponse';
|
|
46
|
+
import { GetIssuedProductsResponse } from '../models/GetIssuedProductsResponse';
|
|
47
|
+
import { GetOffersResponse } from '../models/GetOffersResponse';
|
|
48
|
+
import { GetPaymentScheduleResponse } from '../models/GetPaymentScheduleResponse';
|
|
49
|
+
import { GetPrequalificationsResponse } from '../models/GetPrequalificationsResponse';
|
|
50
|
+
import { GetUsersResponse } from '../models/GetUsersResponse';
|
|
51
|
+
import { InternalServerErrorException } from '../models/InternalServerErrorException';
|
|
52
|
+
import { InvalidInvoiceDueDateException } from '../models/InvalidInvoiceDueDateException';
|
|
53
|
+
import { Invoice } from '../models/Invoice';
|
|
54
|
+
import { InvoiceFinancingOfferTerms } from '../models/InvoiceFinancingOfferTerms';
|
|
55
|
+
import { InvoiceFinancingServicingData } from '../models/InvoiceFinancingServicingData';
|
|
56
|
+
import { InvoiceFlowSessionTokenData } from '../models/InvoiceFlowSessionTokenData';
|
|
57
|
+
import { InvoiceFlowWithInvoiceFileSessionTokenData } from '../models/InvoiceFlowWithInvoiceFileSessionTokenData';
|
|
58
|
+
import { InvoiceNotFoundException } from '../models/InvoiceNotFoundException';
|
|
59
|
+
import { InvoicePaymentPlan } from '../models/InvoicePaymentPlan';
|
|
60
|
+
import { InvoicePayorAddress } from '../models/InvoicePayorAddress';
|
|
61
|
+
import { InvoiceRepaymentSchedule } from '../models/InvoiceRepaymentSchedule';
|
|
62
|
+
import { InvoiceRepaymentScheduleItem } from '../models/InvoiceRepaymentScheduleItem';
|
|
63
|
+
import { InvoiceStatus } from '../models/InvoiceStatus';
|
|
64
|
+
import { IssuedProduct } from '../models/IssuedProduct';
|
|
65
|
+
import { IssuedProductNotFoundException } from '../models/IssuedProductNotFoundException';
|
|
66
|
+
import { IssuedProductServicingData } from '../models/IssuedProductServicingData';
|
|
67
|
+
import { LineOfCreditOfferTerms } from '../models/LineOfCreditOfferTerms';
|
|
68
|
+
import { LineOfCreditServicingData } from '../models/LineOfCreditServicingData';
|
|
69
|
+
import { McaOfferTerms } from '../models/McaOfferTerms';
|
|
70
|
+
import { McaServicingData } from '../models/McaServicingData';
|
|
71
|
+
import { MergeUsersRequestBody } from '../models/MergeUsersRequestBody';
|
|
72
|
+
import { MergeUsersResponseBody } from '../models/MergeUsersResponseBody';
|
|
73
|
+
import { MultipleDurationInvoiceRepaymentWindow } from '../models/MultipleDurationInvoiceRepaymentWindow';
|
|
74
|
+
import { Offer } from '../models/Offer';
|
|
75
|
+
import { OfferAlreadySelectedException } from '../models/OfferAlreadySelectedException';
|
|
76
|
+
import { OfferNotFoundException } from '../models/OfferNotFoundException';
|
|
77
|
+
import { OfferNotLockedException } from '../models/OfferNotLockedException';
|
|
78
|
+
import { OfferTerms } from '../models/OfferTerms';
|
|
79
|
+
import { PaginationResult } from '../models/PaginationResult';
|
|
80
|
+
import { PaymentOrder } from '../models/PaymentOrder';
|
|
81
|
+
import { PaymentOrderNotFoundException } from '../models/PaymentOrderNotFoundException';
|
|
82
|
+
import { PaymentOrderStatus } from '../models/PaymentOrderStatus';
|
|
83
|
+
import { PaymentPlanRepaymentSchedule } from '../models/PaymentPlanRepaymentSchedule';
|
|
84
|
+
import { PaymentPlanRepaymentScheduleItem } from '../models/PaymentPlanRepaymentScheduleItem';
|
|
85
|
+
import { PaymentScheduleItem } from '../models/PaymentScheduleItem';
|
|
86
|
+
import { PaymentScheduleItemPaymentOrder } from '../models/PaymentScheduleItemPaymentOrder';
|
|
87
|
+
import { PlaidAssetReportsInvalidException } from '../models/PlaidAssetReportsInvalidException';
|
|
88
|
+
import { PlatformInvoiceIdAlreadyExistsForAnotherIssuedProductException } from '../models/PlatformInvoiceIdAlreadyExistsForAnotherIssuedProductException';
|
|
89
|
+
import { PrimaryBusinessOwnerAlreadyExistsForBusinessException } from '../models/PrimaryBusinessOwnerAlreadyExistsForBusinessException';
|
|
90
|
+
import { PrimaryBusinessOwnerAlreadyExistsWithEmailException } from '../models/PrimaryBusinessOwnerAlreadyExistsWithEmailException';
|
|
91
|
+
import { PrimaryBusinessOwnerNotFoundException } from '../models/PrimaryBusinessOwnerNotFoundException';
|
|
92
|
+
import { SessionInvoice } from '../models/SessionInvoice';
|
|
93
|
+
import { SessionInvoiceWithInvoiceFile } from '../models/SessionInvoiceWithInvoiceFile';
|
|
94
|
+
import { SomeOffersHaveExpiredException } from '../models/SomeOffersHaveExpiredException';
|
|
95
|
+
import { TermLoanOfferTerms } from '../models/TermLoanOfferTerms';
|
|
96
|
+
import { TermLoanServicingData } from '../models/TermLoanServicingData';
|
|
97
|
+
import { UnmergeableBusinessException } from '../models/UnmergeableBusinessException';
|
|
98
|
+
import { UpdateBusinessAccountRequestBody } from '../models/UpdateBusinessAccountRequestBody';
|
|
99
|
+
import { UpdateBusinessRequestBody } from '../models/UpdateBusinessRequestBody';
|
|
100
|
+
import { UpdateUser409Response } from '../models/UpdateUser409Response';
|
|
101
|
+
import { UpdateUserRequestBody } from '../models/UpdateUserRequestBody';
|
|
102
|
+
import { User } from '../models/User';
|
|
103
|
+
import { UserAddress } from '../models/UserAddress';
|
|
104
|
+
import { UserAlreadyExistsWithEmailException } from '../models/UserAlreadyExistsWithEmailException';
|
|
105
|
+
import { UserAlreadyExistsWithPlatformUserIdException } from '../models/UserAlreadyExistsWithPlatformUserIdException';
|
|
106
|
+
import { UserNotFoundException } from '../models/UserNotFoundException';
|
|
107
|
+
|
|
108
|
+
import { BankAccountsApiRequestFactory, BankAccountsApiResponseProcessor} from "../apis/BankAccountsApi";
|
|
109
|
+
export class ObservableBankAccountsApi {
|
|
110
|
+
private requestFactory: BankAccountsApiRequestFactory;
|
|
111
|
+
private responseProcessor: BankAccountsApiResponseProcessor;
|
|
112
|
+
private configuration: Configuration;
|
|
113
|
+
|
|
114
|
+
public constructor(
|
|
115
|
+
configuration: Configuration,
|
|
116
|
+
requestFactory?: BankAccountsApiRequestFactory,
|
|
117
|
+
responseProcessor?: BankAccountsApiResponseProcessor
|
|
118
|
+
) {
|
|
119
|
+
this.configuration = configuration;
|
|
120
|
+
this.requestFactory = requestFactory || new BankAccountsApiRequestFactory(configuration);
|
|
121
|
+
this.responseProcessor = responseProcessor || new BankAccountsApiResponseProcessor();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* We only support creating disbursement checking accounts at the moment. Each business can only have one disbursement checking account. Please contact Kanmon to enable access to bank account APIs.
|
|
126
|
+
* Create a business bank account
|
|
127
|
+
* @param createBusinessBankAccountRequestBody
|
|
128
|
+
*/
|
|
129
|
+
public createBusinessBankAccountWithHttpInfo(createBusinessBankAccountRequestBody: CreateBusinessBankAccountRequestBody, _options?: Configuration): Observable<HttpInfo<BusinessBankAccount>> {
|
|
130
|
+
const requestContextPromise = this.requestFactory.createBusinessBankAccount(createBusinessBankAccountRequestBody, _options);
|
|
131
|
+
|
|
132
|
+
// build promise chain
|
|
133
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
134
|
+
for (let middleware of this.configuration.middleware) {
|
|
135
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
139
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
140
|
+
let middlewarePostObservable = of(response);
|
|
141
|
+
for (let middleware of this.configuration.middleware) {
|
|
142
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
143
|
+
}
|
|
144
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createBusinessBankAccountWithHttpInfo(rsp)));
|
|
145
|
+
}));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* We only support creating disbursement checking accounts at the moment. Each business can only have one disbursement checking account. Please contact Kanmon to enable access to bank account APIs.
|
|
150
|
+
* Create a business bank account
|
|
151
|
+
* @param createBusinessBankAccountRequestBody
|
|
152
|
+
*/
|
|
153
|
+
public createBusinessBankAccount(createBusinessBankAccountRequestBody: CreateBusinessBankAccountRequestBody, _options?: Configuration): Observable<BusinessBankAccount> {
|
|
154
|
+
return this.createBusinessBankAccountWithHttpInfo(createBusinessBankAccountRequestBody, _options).pipe(map((apiResponse: HttpInfo<BusinessBankAccount>) => apiResponse.data));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Please contact Kanmon to enable access to bank account APIs.
|
|
159
|
+
* Fetch a business bank account
|
|
160
|
+
* @param id Either the Kanmon bank account UUID or your platform’s bank account ID, depending on `idType`.
|
|
161
|
+
* @param idType Which ID type to query the bank account by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
162
|
+
*/
|
|
163
|
+
public getBusinessBankAccountWithHttpInfo(id: string, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<HttpInfo<BusinessBankAccount>> {
|
|
164
|
+
const requestContextPromise = this.requestFactory.getBusinessBankAccount(id, idType, _options);
|
|
165
|
+
|
|
166
|
+
// build promise chain
|
|
167
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
168
|
+
for (let middleware of this.configuration.middleware) {
|
|
169
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
173
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
174
|
+
let middlewarePostObservable = of(response);
|
|
175
|
+
for (let middleware of this.configuration.middleware) {
|
|
176
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
177
|
+
}
|
|
178
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getBusinessBankAccountWithHttpInfo(rsp)));
|
|
179
|
+
}));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Please contact Kanmon to enable access to bank account APIs.
|
|
184
|
+
* Fetch a business bank account
|
|
185
|
+
* @param id Either the Kanmon bank account UUID or your platform’s bank account ID, depending on `idType`.
|
|
186
|
+
* @param idType Which ID type to query the bank account by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
187
|
+
*/
|
|
188
|
+
public getBusinessBankAccount(id: string, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<BusinessBankAccount> {
|
|
189
|
+
return this.getBusinessBankAccountWithHttpInfo(id, idType, _options).pipe(map((apiResponse: HttpInfo<BusinessBankAccount>) => apiResponse.data));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Please contact Kanmon to enable access to bank account APIs.
|
|
194
|
+
* Fetch business bank accounts
|
|
195
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for bank accounts.
|
|
196
|
+
* @param platformBankAccountIds A comma delimited list of your platform’s unique IDs for bank accounts.
|
|
197
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique business IDs for bannk accounts.
|
|
198
|
+
* @param businessIds A comma delimited list of your Kanmon’s unique business IDs for bannk accounts.
|
|
199
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
200
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
201
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
202
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
203
|
+
*/
|
|
204
|
+
public getBusinessBankAccountsWithHttpInfo(ids?: string, platformBankAccountIds?: string, platformBusinessIds?: string, businessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<HttpInfo<GetBusinessBankAccountsResponse>> {
|
|
205
|
+
const requestContextPromise = this.requestFactory.getBusinessBankAccounts(ids, platformBankAccountIds, platformBusinessIds, businessIds, offset, limit, createdAtStart, createdAtEnd, _options);
|
|
206
|
+
|
|
207
|
+
// build promise chain
|
|
208
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
209
|
+
for (let middleware of this.configuration.middleware) {
|
|
210
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
214
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
215
|
+
let middlewarePostObservable = of(response);
|
|
216
|
+
for (let middleware of this.configuration.middleware) {
|
|
217
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
218
|
+
}
|
|
219
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getBusinessBankAccountsWithHttpInfo(rsp)));
|
|
220
|
+
}));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Please contact Kanmon to enable access to bank account APIs.
|
|
225
|
+
* Fetch business bank accounts
|
|
226
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for bank accounts.
|
|
227
|
+
* @param platformBankAccountIds A comma delimited list of your platform’s unique IDs for bank accounts.
|
|
228
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique business IDs for bannk accounts.
|
|
229
|
+
* @param businessIds A comma delimited list of your Kanmon’s unique business IDs for bannk accounts.
|
|
230
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
231
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
232
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
233
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
234
|
+
*/
|
|
235
|
+
public getBusinessBankAccounts(ids?: string, platformBankAccountIds?: string, platformBusinessIds?: string, businessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<GetBusinessBankAccountsResponse> {
|
|
236
|
+
return this.getBusinessBankAccountsWithHttpInfo(ids, platformBankAccountIds, platformBusinessIds, businessIds, offset, limit, createdAtStart, createdAtEnd, _options).pipe(map((apiResponse: HttpInfo<GetBusinessBankAccountsResponse>) => apiResponse.data));
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* We only support creating disbursement checking accounts at the moment. Each business can only have one disbursement checking account. Please contact Kanmon to enable access to bank account APIs.
|
|
241
|
+
* Update a business bank account
|
|
242
|
+
* @param id Either the Kanmon bank account UUID or your platform’s bank account ID, depending on `idType`.
|
|
243
|
+
* @param updateBusinessAccountRequestBody
|
|
244
|
+
* @param idType Which ID type to query the bank account by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
245
|
+
*/
|
|
246
|
+
public updateBusinessBankAccountWithHttpInfo(id: string, updateBusinessAccountRequestBody: UpdateBusinessAccountRequestBody, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<HttpInfo<BusinessBankAccount>> {
|
|
247
|
+
const requestContextPromise = this.requestFactory.updateBusinessBankAccount(id, updateBusinessAccountRequestBody, idType, _options);
|
|
248
|
+
|
|
249
|
+
// build promise chain
|
|
250
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
251
|
+
for (let middleware of this.configuration.middleware) {
|
|
252
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
256
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
257
|
+
let middlewarePostObservable = of(response);
|
|
258
|
+
for (let middleware of this.configuration.middleware) {
|
|
259
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
260
|
+
}
|
|
261
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateBusinessBankAccountWithHttpInfo(rsp)));
|
|
262
|
+
}));
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* We only support creating disbursement checking accounts at the moment. Each business can only have one disbursement checking account. Please contact Kanmon to enable access to bank account APIs.
|
|
267
|
+
* Update a business bank account
|
|
268
|
+
* @param id Either the Kanmon bank account UUID or your platform’s bank account ID, depending on `idType`.
|
|
269
|
+
* @param updateBusinessAccountRequestBody
|
|
270
|
+
* @param idType Which ID type to query the bank account by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
271
|
+
*/
|
|
272
|
+
public updateBusinessBankAccount(id: string, updateBusinessAccountRequestBody: UpdateBusinessAccountRequestBody, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<BusinessBankAccount> {
|
|
273
|
+
return this.updateBusinessBankAccountWithHttpInfo(id, updateBusinessAccountRequestBody, idType, _options).pipe(map((apiResponse: HttpInfo<BusinessBankAccount>) => apiResponse.data));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
import { BusinessesApiRequestFactory, BusinessesApiResponseProcessor} from "../apis/BusinessesApi";
|
|
279
|
+
export class ObservableBusinessesApi {
|
|
280
|
+
private requestFactory: BusinessesApiRequestFactory;
|
|
281
|
+
private responseProcessor: BusinessesApiResponseProcessor;
|
|
282
|
+
private configuration: Configuration;
|
|
283
|
+
|
|
284
|
+
public constructor(
|
|
285
|
+
configuration: Configuration,
|
|
286
|
+
requestFactory?: BusinessesApiRequestFactory,
|
|
287
|
+
responseProcessor?: BusinessesApiResponseProcessor
|
|
288
|
+
) {
|
|
289
|
+
this.configuration = configuration;
|
|
290
|
+
this.requestFactory = requestFactory || new BusinessesApiRequestFactory(configuration);
|
|
291
|
+
this.responseProcessor = responseProcessor || new BusinessesApiResponseProcessor();
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Create a business
|
|
296
|
+
* @param createBusinessRequestBody
|
|
297
|
+
*/
|
|
298
|
+
public createBusinessWithHttpInfo(createBusinessRequestBody: CreateBusinessRequestBody, _options?: Configuration): Observable<HttpInfo<Business>> {
|
|
299
|
+
const requestContextPromise = this.requestFactory.createBusiness(createBusinessRequestBody, _options);
|
|
300
|
+
|
|
301
|
+
// build promise chain
|
|
302
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
303
|
+
for (let middleware of this.configuration.middleware) {
|
|
304
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
308
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
309
|
+
let middlewarePostObservable = of(response);
|
|
310
|
+
for (let middleware of this.configuration.middleware) {
|
|
311
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
312
|
+
}
|
|
313
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createBusinessWithHttpInfo(rsp)));
|
|
314
|
+
}));
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Create a business
|
|
319
|
+
* @param createBusinessRequestBody
|
|
320
|
+
*/
|
|
321
|
+
public createBusiness(createBusinessRequestBody: CreateBusinessRequestBody, _options?: Configuration): Observable<Business> {
|
|
322
|
+
return this.createBusinessWithHttpInfo(createBusinessRequestBody, _options).pipe(map((apiResponse: HttpInfo<Business>) => apiResponse.data));
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Fetch a business
|
|
327
|
+
* @param id Either the Kanmon business UUID or your platform’s business ID, depending on `idType`.
|
|
328
|
+
* @param idType Which ID type to query the business by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
329
|
+
*/
|
|
330
|
+
public getBusinessWithHttpInfo(id: any, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<HttpInfo<Business>> {
|
|
331
|
+
const requestContextPromise = this.requestFactory.getBusiness(id, idType, _options);
|
|
332
|
+
|
|
333
|
+
// build promise chain
|
|
334
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
335
|
+
for (let middleware of this.configuration.middleware) {
|
|
336
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
340
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
341
|
+
let middlewarePostObservable = of(response);
|
|
342
|
+
for (let middleware of this.configuration.middleware) {
|
|
343
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
344
|
+
}
|
|
345
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getBusinessWithHttpInfo(rsp)));
|
|
346
|
+
}));
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Fetch a business
|
|
351
|
+
* @param id Either the Kanmon business UUID or your platform’s business ID, depending on `idType`.
|
|
352
|
+
* @param idType Which ID type to query the business by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
353
|
+
*/
|
|
354
|
+
public getBusiness(id: any, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<Business> {
|
|
355
|
+
return this.getBusinessWithHttpInfo(id, idType, _options).pipe(map((apiResponse: HttpInfo<Business>) => apiResponse.data));
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Fetch activity logs for a business
|
|
360
|
+
* @param id Either the Kanmon business UUID or your platform’s business ID, depending on `idType`.
|
|
361
|
+
* @param idType Which ID type to query the business by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
362
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
363
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
364
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
365
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
366
|
+
*/
|
|
367
|
+
public getBusinessActivityLogWithHttpInfo(id: any, idType?: 'KANMON' | 'PLATFORM', offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<HttpInfo<GetActivityLogsResponse>> {
|
|
368
|
+
const requestContextPromise = this.requestFactory.getBusinessActivityLog(id, idType, offset, limit, createdAtStart, createdAtEnd, _options);
|
|
369
|
+
|
|
370
|
+
// build promise chain
|
|
371
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
372
|
+
for (let middleware of this.configuration.middleware) {
|
|
373
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
377
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
378
|
+
let middlewarePostObservable = of(response);
|
|
379
|
+
for (let middleware of this.configuration.middleware) {
|
|
380
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
381
|
+
}
|
|
382
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getBusinessActivityLogWithHttpInfo(rsp)));
|
|
383
|
+
}));
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Fetch activity logs for a business
|
|
388
|
+
* @param id Either the Kanmon business UUID or your platform’s business ID, depending on `idType`.
|
|
389
|
+
* @param idType Which ID type to query the business by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
390
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
391
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
392
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
393
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
394
|
+
*/
|
|
395
|
+
public getBusinessActivityLog(id: any, idType?: 'KANMON' | 'PLATFORM', offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<GetActivityLogsResponse> {
|
|
396
|
+
return this.getBusinessActivityLogWithHttpInfo(id, idType, offset, limit, createdAtStart, createdAtEnd, _options).pipe(map((apiResponse: HttpInfo<GetActivityLogsResponse>) => apiResponse.data));
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Fetch businesses
|
|
401
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for businesses.
|
|
402
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
403
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
404
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
405
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
406
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
407
|
+
*/
|
|
408
|
+
public getBusinessesWithHttpInfo(ids?: string, platformBusinessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<HttpInfo<GetBusinessesResponse>> {
|
|
409
|
+
const requestContextPromise = this.requestFactory.getBusinesses(ids, platformBusinessIds, offset, limit, createdAtStart, createdAtEnd, _options);
|
|
410
|
+
|
|
411
|
+
// build promise chain
|
|
412
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
413
|
+
for (let middleware of this.configuration.middleware) {
|
|
414
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
418
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
419
|
+
let middlewarePostObservable = of(response);
|
|
420
|
+
for (let middleware of this.configuration.middleware) {
|
|
421
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
422
|
+
}
|
|
423
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getBusinessesWithHttpInfo(rsp)));
|
|
424
|
+
}));
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Fetch businesses
|
|
429
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for businesses.
|
|
430
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
431
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
432
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
433
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
434
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
435
|
+
*/
|
|
436
|
+
public getBusinesses(ids?: string, platformBusinessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<GetBusinessesResponse> {
|
|
437
|
+
return this.getBusinessesWithHttpInfo(ids, platformBusinessIds, offset, limit, createdAtStart, createdAtEnd, _options).pipe(map((apiResponse: HttpInfo<GetBusinessesResponse>) => apiResponse.data));
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Update a business
|
|
442
|
+
* @param id Either the Kanmon business UUID or your platform’s business ID, depending on `idType`.
|
|
443
|
+
* @param updateBusinessRequestBody
|
|
444
|
+
* @param idType Which ID type to query the business by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
445
|
+
*/
|
|
446
|
+
public updateBusinessWithHttpInfo(id: any, updateBusinessRequestBody: UpdateBusinessRequestBody, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<HttpInfo<Business>> {
|
|
447
|
+
const requestContextPromise = this.requestFactory.updateBusiness(id, updateBusinessRequestBody, idType, _options);
|
|
448
|
+
|
|
449
|
+
// build promise chain
|
|
450
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
451
|
+
for (let middleware of this.configuration.middleware) {
|
|
452
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
456
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
457
|
+
let middlewarePostObservable = of(response);
|
|
458
|
+
for (let middleware of this.configuration.middleware) {
|
|
459
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
460
|
+
}
|
|
461
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateBusinessWithHttpInfo(rsp)));
|
|
462
|
+
}));
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Update a business
|
|
467
|
+
* @param id Either the Kanmon business UUID or your platform’s business ID, depending on `idType`.
|
|
468
|
+
* @param updateBusinessRequestBody
|
|
469
|
+
* @param idType Which ID type to query the business by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
470
|
+
*/
|
|
471
|
+
public updateBusiness(id: any, updateBusinessRequestBody: UpdateBusinessRequestBody, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<Business> {
|
|
472
|
+
return this.updateBusinessWithHttpInfo(id, updateBusinessRequestBody, idType, _options).pipe(map((apiResponse: HttpInfo<Business>) => apiResponse.data));
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
import { ConnectTokensApiRequestFactory, ConnectTokensApiResponseProcessor} from "../apis/ConnectTokensApi";
|
|
478
|
+
export class ObservableConnectTokensApi {
|
|
479
|
+
private requestFactory: ConnectTokensApiRequestFactory;
|
|
480
|
+
private responseProcessor: ConnectTokensApiResponseProcessor;
|
|
481
|
+
private configuration: Configuration;
|
|
482
|
+
|
|
483
|
+
public constructor(
|
|
484
|
+
configuration: Configuration,
|
|
485
|
+
requestFactory?: ConnectTokensApiRequestFactory,
|
|
486
|
+
responseProcessor?: ConnectTokensApiResponseProcessor
|
|
487
|
+
) {
|
|
488
|
+
this.configuration = configuration;
|
|
489
|
+
this.requestFactory = requestFactory || new ConnectTokensApiRequestFactory(configuration);
|
|
490
|
+
this.responseProcessor = responseProcessor || new ConnectTokensApiResponseProcessor();
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Create a connect token
|
|
495
|
+
* @param createConnectTokenRequestBody
|
|
496
|
+
*/
|
|
497
|
+
public connectTokenWithHttpInfo(createConnectTokenRequestBody: CreateConnectTokenRequestBody, _options?: Configuration): Observable<HttpInfo<ConnectToken>> {
|
|
498
|
+
const requestContextPromise = this.requestFactory.connectToken(createConnectTokenRequestBody, _options);
|
|
499
|
+
|
|
500
|
+
// build promise chain
|
|
501
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
502
|
+
for (let middleware of this.configuration.middleware) {
|
|
503
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
507
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
508
|
+
let middlewarePostObservable = of(response);
|
|
509
|
+
for (let middleware of this.configuration.middleware) {
|
|
510
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
511
|
+
}
|
|
512
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.connectTokenWithHttpInfo(rsp)));
|
|
513
|
+
}));
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Create a connect token
|
|
518
|
+
* @param createConnectTokenRequestBody
|
|
519
|
+
*/
|
|
520
|
+
public connectToken(createConnectTokenRequestBody: CreateConnectTokenRequestBody, _options?: Configuration): Observable<ConnectToken> {
|
|
521
|
+
return this.connectTokenWithHttpInfo(createConnectTokenRequestBody, _options).pipe(map((apiResponse: HttpInfo<ConnectToken>) => apiResponse.data));
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
import { DocumentsApiRequestFactory, DocumentsApiResponseProcessor} from "../apis/DocumentsApi";
|
|
527
|
+
export class ObservableDocumentsApi {
|
|
528
|
+
private requestFactory: DocumentsApiRequestFactory;
|
|
529
|
+
private responseProcessor: DocumentsApiResponseProcessor;
|
|
530
|
+
private configuration: Configuration;
|
|
531
|
+
|
|
532
|
+
public constructor(
|
|
533
|
+
configuration: Configuration,
|
|
534
|
+
requestFactory?: DocumentsApiRequestFactory,
|
|
535
|
+
responseProcessor?: DocumentsApiResponseProcessor
|
|
536
|
+
) {
|
|
537
|
+
this.configuration = configuration;
|
|
538
|
+
this.requestFactory = requestFactory || new DocumentsApiRequestFactory(configuration);
|
|
539
|
+
this.responseProcessor = responseProcessor || new DocumentsApiResponseProcessor();
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Upload documents for a business
|
|
544
|
+
* @param invoices Invoices to be uploaded. The file format must be PDF. The limit is 10 files, 10 MB per file.
|
|
545
|
+
* @param businessId The unique identifier for business in our system. Either of `businessId` or `platformBusinessId` is required.
|
|
546
|
+
* @param platformBusinessId The unique identifier for business in your platform. Either of `businessId` or `platformBusinessId` is required.
|
|
547
|
+
*/
|
|
548
|
+
public createBusinessDocumentWithHttpInfo(invoices: Array<HttpFile>, businessId?: string, platformBusinessId?: string, _options?: Configuration): Observable<HttpInfo<CreateBusinessDocumentsResponse>> {
|
|
549
|
+
const requestContextPromise = this.requestFactory.createBusinessDocument(invoices, businessId, platformBusinessId, _options);
|
|
550
|
+
|
|
551
|
+
// build promise chain
|
|
552
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
553
|
+
for (let middleware of this.configuration.middleware) {
|
|
554
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
558
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
559
|
+
let middlewarePostObservable = of(response);
|
|
560
|
+
for (let middleware of this.configuration.middleware) {
|
|
561
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
562
|
+
}
|
|
563
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createBusinessDocumentWithHttpInfo(rsp)));
|
|
564
|
+
}));
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Upload documents for a business
|
|
569
|
+
* @param invoices Invoices to be uploaded. The file format must be PDF. The limit is 10 files, 10 MB per file.
|
|
570
|
+
* @param businessId The unique identifier for business in our system. Either of `businessId` or `platformBusinessId` is required.
|
|
571
|
+
* @param platformBusinessId The unique identifier for business in your platform. Either of `businessId` or `platformBusinessId` is required.
|
|
572
|
+
*/
|
|
573
|
+
public createBusinessDocument(invoices: Array<HttpFile>, businessId?: string, platformBusinessId?: string, _options?: Configuration): Observable<CreateBusinessDocumentsResponse> {
|
|
574
|
+
return this.createBusinessDocumentWithHttpInfo(invoices, businessId, platformBusinessId, _options).pipe(map((apiResponse: HttpInfo<CreateBusinessDocumentsResponse>) => apiResponse.data));
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
import { DrawRequestsApiRequestFactory, DrawRequestsApiResponseProcessor} from "../apis/DrawRequestsApi";
|
|
580
|
+
export class ObservableDrawRequestsApi {
|
|
581
|
+
private requestFactory: DrawRequestsApiRequestFactory;
|
|
582
|
+
private responseProcessor: DrawRequestsApiResponseProcessor;
|
|
583
|
+
private configuration: Configuration;
|
|
584
|
+
|
|
585
|
+
public constructor(
|
|
586
|
+
configuration: Configuration,
|
|
587
|
+
requestFactory?: DrawRequestsApiRequestFactory,
|
|
588
|
+
responseProcessor?: DrawRequestsApiResponseProcessor
|
|
589
|
+
) {
|
|
590
|
+
this.configuration = configuration;
|
|
591
|
+
this.requestFactory = requestFactory || new DrawRequestsApiRequestFactory(configuration);
|
|
592
|
+
this.responseProcessor = responseProcessor || new DrawRequestsApiResponseProcessor();
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Fetch a draw request
|
|
597
|
+
* @param id The Kanmon draw request UUID.
|
|
598
|
+
*/
|
|
599
|
+
public getDrawRequestWithHttpInfo(id: string, _options?: Configuration): Observable<HttpInfo<DrawRequest>> {
|
|
600
|
+
const requestContextPromise = this.requestFactory.getDrawRequest(id, _options);
|
|
601
|
+
|
|
602
|
+
// build promise chain
|
|
603
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
604
|
+
for (let middleware of this.configuration.middleware) {
|
|
605
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
609
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
610
|
+
let middlewarePostObservable = of(response);
|
|
611
|
+
for (let middleware of this.configuration.middleware) {
|
|
612
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
613
|
+
}
|
|
614
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getDrawRequestWithHttpInfo(rsp)));
|
|
615
|
+
}));
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Fetch a draw request
|
|
620
|
+
* @param id The Kanmon draw request UUID.
|
|
621
|
+
*/
|
|
622
|
+
public getDrawRequest(id: string, _options?: Configuration): Observable<DrawRequest> {
|
|
623
|
+
return this.getDrawRequestWithHttpInfo(id, _options).pipe(map((apiResponse: HttpInfo<DrawRequest>) => apiResponse.data));
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Fetch draw requests
|
|
628
|
+
* @param statuses A comma delimited list of draw request statuses.
|
|
629
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for invoices.
|
|
630
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
631
|
+
* @param businessIds A comma delimited list of Kanmon’s unique IDs for businesses.
|
|
632
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
633
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
634
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
635
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
636
|
+
*/
|
|
637
|
+
public getDrawRequestsWithHttpInfo(statuses?: string, ids?: string, platformBusinessIds?: string, businessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<HttpInfo<GetDrawRequestsResponse>> {
|
|
638
|
+
const requestContextPromise = this.requestFactory.getDrawRequests(statuses, ids, platformBusinessIds, businessIds, offset, limit, createdAtStart, createdAtEnd, _options);
|
|
639
|
+
|
|
640
|
+
// build promise chain
|
|
641
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
642
|
+
for (let middleware of this.configuration.middleware) {
|
|
643
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
647
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
648
|
+
let middlewarePostObservable = of(response);
|
|
649
|
+
for (let middleware of this.configuration.middleware) {
|
|
650
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
651
|
+
}
|
|
652
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getDrawRequestsWithHttpInfo(rsp)));
|
|
653
|
+
}));
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Fetch draw requests
|
|
658
|
+
* @param statuses A comma delimited list of draw request statuses.
|
|
659
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for invoices.
|
|
660
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
661
|
+
* @param businessIds A comma delimited list of Kanmon’s unique IDs for businesses.
|
|
662
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
663
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
664
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
665
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
666
|
+
*/
|
|
667
|
+
public getDrawRequests(statuses?: string, ids?: string, platformBusinessIds?: string, businessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<GetDrawRequestsResponse> {
|
|
668
|
+
return this.getDrawRequestsWithHttpInfo(statuses, ids, platformBusinessIds, businessIds, offset, limit, createdAtStart, createdAtEnd, _options).pipe(map((apiResponse: HttpInfo<GetDrawRequestsResponse>) => apiResponse.data));
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
import { EmbeddedSessionsApiRequestFactory, EmbeddedSessionsApiResponseProcessor} from "../apis/EmbeddedSessionsApi";
|
|
674
|
+
export class ObservableEmbeddedSessionsApi {
|
|
675
|
+
private requestFactory: EmbeddedSessionsApiRequestFactory;
|
|
676
|
+
private responseProcessor: EmbeddedSessionsApiResponseProcessor;
|
|
677
|
+
private configuration: Configuration;
|
|
678
|
+
|
|
679
|
+
public constructor(
|
|
680
|
+
configuration: Configuration,
|
|
681
|
+
requestFactory?: EmbeddedSessionsApiRequestFactory,
|
|
682
|
+
responseProcessor?: EmbeddedSessionsApiResponseProcessor
|
|
683
|
+
) {
|
|
684
|
+
this.configuration = configuration;
|
|
685
|
+
this.requestFactory = requestFactory || new EmbeddedSessionsApiRequestFactory(configuration);
|
|
686
|
+
this.responseProcessor = responseProcessor || new EmbeddedSessionsApiResponseProcessor();
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* Create an embedded session
|
|
691
|
+
* @param createSessionTokenRequestBody
|
|
692
|
+
*/
|
|
693
|
+
public createEmbeddedSessionWithHttpInfo(createSessionTokenRequestBody: CreateSessionTokenRequestBody, _options?: Configuration): Observable<HttpInfo<EmbeddedSession>> {
|
|
694
|
+
const requestContextPromise = this.requestFactory.createEmbeddedSession(createSessionTokenRequestBody, _options);
|
|
695
|
+
|
|
696
|
+
// build promise chain
|
|
697
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
698
|
+
for (let middleware of this.configuration.middleware) {
|
|
699
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
703
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
704
|
+
let middlewarePostObservable = of(response);
|
|
705
|
+
for (let middleware of this.configuration.middleware) {
|
|
706
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
707
|
+
}
|
|
708
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createEmbeddedSessionWithHttpInfo(rsp)));
|
|
709
|
+
}));
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Create an embedded session
|
|
714
|
+
* @param createSessionTokenRequestBody
|
|
715
|
+
*/
|
|
716
|
+
public createEmbeddedSession(createSessionTokenRequestBody: CreateSessionTokenRequestBody, _options?: Configuration): Observable<EmbeddedSession> {
|
|
717
|
+
return this.createEmbeddedSessionWithHttpInfo(createSessionTokenRequestBody, _options).pipe(map((apiResponse: HttpInfo<EmbeddedSession>) => apiResponse.data));
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
import { InvoicesApiRequestFactory, InvoicesApiResponseProcessor} from "../apis/InvoicesApi";
|
|
723
|
+
export class ObservableInvoicesApi {
|
|
724
|
+
private requestFactory: InvoicesApiRequestFactory;
|
|
725
|
+
private responseProcessor: InvoicesApiResponseProcessor;
|
|
726
|
+
private configuration: Configuration;
|
|
727
|
+
|
|
728
|
+
public constructor(
|
|
729
|
+
configuration: Configuration,
|
|
730
|
+
requestFactory?: InvoicesApiRequestFactory,
|
|
731
|
+
responseProcessor?: InvoicesApiResponseProcessor
|
|
732
|
+
) {
|
|
733
|
+
this.configuration = configuration;
|
|
734
|
+
this.requestFactory = requestFactory || new InvoicesApiRequestFactory(configuration);
|
|
735
|
+
this.responseProcessor = responseProcessor || new InvoicesApiResponseProcessor();
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Fetch an invoice
|
|
740
|
+
* @param id Either the Kanmon invoice UUID or your platform’s invoice ID, depending on `idType`.
|
|
741
|
+
* @param idType Which ID type to query the invoice by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
742
|
+
*/
|
|
743
|
+
public getInvoiceWithHttpInfo(id: string, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<HttpInfo<Invoice>> {
|
|
744
|
+
const requestContextPromise = this.requestFactory.getInvoice(id, idType, _options);
|
|
745
|
+
|
|
746
|
+
// build promise chain
|
|
747
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
748
|
+
for (let middleware of this.configuration.middleware) {
|
|
749
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
753
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
754
|
+
let middlewarePostObservable = of(response);
|
|
755
|
+
for (let middleware of this.configuration.middleware) {
|
|
756
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
757
|
+
}
|
|
758
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getInvoiceWithHttpInfo(rsp)));
|
|
759
|
+
}));
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* Fetch an invoice
|
|
764
|
+
* @param id Either the Kanmon invoice UUID or your platform’s invoice ID, depending on `idType`.
|
|
765
|
+
* @param idType Which ID type to query the invoice by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
766
|
+
*/
|
|
767
|
+
public getInvoice(id: string, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<Invoice> {
|
|
768
|
+
return this.getInvoiceWithHttpInfo(id, idType, _options).pipe(map((apiResponse: HttpInfo<Invoice>) => apiResponse.data));
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Fetch invoices
|
|
773
|
+
* @param statuses A comma delimited list of invoice statuses.
|
|
774
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for invoices.
|
|
775
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
776
|
+
* @param businessIds A comma delimited list of Kanmon’s unique IDs for businesses.
|
|
777
|
+
* @param platformInvoiceIds A comma delimited list of your platforms’s unique IDs for invoices.
|
|
778
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
779
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
780
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
781
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
782
|
+
*/
|
|
783
|
+
public getInvoicesWithHttpInfo(statuses?: string, ids?: string, platformBusinessIds?: string, businessIds?: string, platformInvoiceIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<HttpInfo<GetInvoicesResponse>> {
|
|
784
|
+
const requestContextPromise = this.requestFactory.getInvoices(statuses, ids, platformBusinessIds, businessIds, platformInvoiceIds, offset, limit, createdAtStart, createdAtEnd, _options);
|
|
785
|
+
|
|
786
|
+
// build promise chain
|
|
787
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
788
|
+
for (let middleware of this.configuration.middleware) {
|
|
789
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
793
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
794
|
+
let middlewarePostObservable = of(response);
|
|
795
|
+
for (let middleware of this.configuration.middleware) {
|
|
796
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
797
|
+
}
|
|
798
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getInvoicesWithHttpInfo(rsp)));
|
|
799
|
+
}));
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* Fetch invoices
|
|
804
|
+
* @param statuses A comma delimited list of invoice statuses.
|
|
805
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for invoices.
|
|
806
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
807
|
+
* @param businessIds A comma delimited list of Kanmon’s unique IDs for businesses.
|
|
808
|
+
* @param platformInvoiceIds A comma delimited list of your platforms’s unique IDs for invoices.
|
|
809
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
810
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
811
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
812
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
813
|
+
*/
|
|
814
|
+
public getInvoices(statuses?: string, ids?: string, platformBusinessIds?: string, businessIds?: string, platformInvoiceIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<GetInvoicesResponse> {
|
|
815
|
+
return this.getInvoicesWithHttpInfo(statuses, ids, platformBusinessIds, businessIds, platformInvoiceIds, offset, limit, createdAtStart, createdAtEnd, _options).pipe(map((apiResponse: HttpInfo<GetInvoicesResponse>) => apiResponse.data));
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
import { IssuedProductsApiRequestFactory, IssuedProductsApiResponseProcessor} from "../apis/IssuedProductsApi";
|
|
821
|
+
export class ObservableIssuedProductsApi {
|
|
822
|
+
private requestFactory: IssuedProductsApiRequestFactory;
|
|
823
|
+
private responseProcessor: IssuedProductsApiResponseProcessor;
|
|
824
|
+
private configuration: Configuration;
|
|
825
|
+
|
|
826
|
+
public constructor(
|
|
827
|
+
configuration: Configuration,
|
|
828
|
+
requestFactory?: IssuedProductsApiRequestFactory,
|
|
829
|
+
responseProcessor?: IssuedProductsApiResponseProcessor
|
|
830
|
+
) {
|
|
831
|
+
this.configuration = configuration;
|
|
832
|
+
this.requestFactory = requestFactory || new IssuedProductsApiRequestFactory(configuration);
|
|
833
|
+
this.responseProcessor = responseProcessor || new IssuedProductsApiResponseProcessor();
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Fetch issued products
|
|
838
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for offers.
|
|
839
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
840
|
+
* @param businessIds A comma delimited list of Kanmon’s unique IDs for businesses.
|
|
841
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
842
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
843
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
844
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
845
|
+
*/
|
|
846
|
+
public getAllIssuedProductsWithHttpInfo(ids?: string, platformBusinessIds?: string, businessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<HttpInfo<GetIssuedProductsResponse>> {
|
|
847
|
+
const requestContextPromise = this.requestFactory.getAllIssuedProducts(ids, platformBusinessIds, businessIds, offset, limit, createdAtStart, createdAtEnd, _options);
|
|
848
|
+
|
|
849
|
+
// build promise chain
|
|
850
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
851
|
+
for (let middleware of this.configuration.middleware) {
|
|
852
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
856
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
857
|
+
let middlewarePostObservable = of(response);
|
|
858
|
+
for (let middleware of this.configuration.middleware) {
|
|
859
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
860
|
+
}
|
|
861
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAllIssuedProductsWithHttpInfo(rsp)));
|
|
862
|
+
}));
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Fetch issued products
|
|
867
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for offers.
|
|
868
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
869
|
+
* @param businessIds A comma delimited list of Kanmon’s unique IDs for businesses.
|
|
870
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
871
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
872
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
873
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
874
|
+
*/
|
|
875
|
+
public getAllIssuedProducts(ids?: string, platformBusinessIds?: string, businessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<GetIssuedProductsResponse> {
|
|
876
|
+
return this.getAllIssuedProductsWithHttpInfo(ids, platformBusinessIds, businessIds, offset, limit, createdAtStart, createdAtEnd, _options).pipe(map((apiResponse: HttpInfo<GetIssuedProductsResponse>) => apiResponse.data));
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Fetch an issued product
|
|
881
|
+
* @param id The Kanmon issued product UUID.
|
|
882
|
+
*/
|
|
883
|
+
public getIssuedProductByIdWithHttpInfo(id: string, _options?: Configuration): Observable<HttpInfo<IssuedProduct>> {
|
|
884
|
+
const requestContextPromise = this.requestFactory.getIssuedProductById(id, _options);
|
|
885
|
+
|
|
886
|
+
// build promise chain
|
|
887
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
888
|
+
for (let middleware of this.configuration.middleware) {
|
|
889
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
893
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
894
|
+
let middlewarePostObservable = of(response);
|
|
895
|
+
for (let middleware of this.configuration.middleware) {
|
|
896
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
897
|
+
}
|
|
898
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getIssuedProductByIdWithHttpInfo(rsp)));
|
|
899
|
+
}));
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Fetch an issued product
|
|
904
|
+
* @param id The Kanmon issued product UUID.
|
|
905
|
+
*/
|
|
906
|
+
public getIssuedProductById(id: string, _options?: Configuration): Observable<IssuedProduct> {
|
|
907
|
+
return this.getIssuedProductByIdWithHttpInfo(id, _options).pipe(map((apiResponse: HttpInfo<IssuedProduct>) => apiResponse.data));
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
import { OffersApiRequestFactory, OffersApiResponseProcessor} from "../apis/OffersApi";
|
|
913
|
+
export class ObservableOffersApi {
|
|
914
|
+
private requestFactory: OffersApiRequestFactory;
|
|
915
|
+
private responseProcessor: OffersApiResponseProcessor;
|
|
916
|
+
private configuration: Configuration;
|
|
917
|
+
|
|
918
|
+
public constructor(
|
|
919
|
+
configuration: Configuration,
|
|
920
|
+
requestFactory?: OffersApiRequestFactory,
|
|
921
|
+
responseProcessor?: OffersApiResponseProcessor
|
|
922
|
+
) {
|
|
923
|
+
this.configuration = configuration;
|
|
924
|
+
this.requestFactory = requestFactory || new OffersApiRequestFactory(configuration);
|
|
925
|
+
this.responseProcessor = responseProcessor || new OffersApiResponseProcessor();
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* Fetch offers
|
|
930
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for offers.
|
|
931
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
932
|
+
* @param businessIds A comma delimited list of Kanmon’s unique IDs for businesses.
|
|
933
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
934
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
935
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
936
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
937
|
+
*/
|
|
938
|
+
public getAllOffersWithHttpInfo(ids?: string, platformBusinessIds?: string, businessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<HttpInfo<GetOffersResponse>> {
|
|
939
|
+
const requestContextPromise = this.requestFactory.getAllOffers(ids, platformBusinessIds, businessIds, offset, limit, createdAtStart, createdAtEnd, _options);
|
|
940
|
+
|
|
941
|
+
// build promise chain
|
|
942
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
943
|
+
for (let middleware of this.configuration.middleware) {
|
|
944
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
948
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
949
|
+
let middlewarePostObservable = of(response);
|
|
950
|
+
for (let middleware of this.configuration.middleware) {
|
|
951
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
952
|
+
}
|
|
953
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAllOffersWithHttpInfo(rsp)));
|
|
954
|
+
}));
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Fetch offers
|
|
959
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for offers.
|
|
960
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
961
|
+
* @param businessIds A comma delimited list of Kanmon’s unique IDs for businesses.
|
|
962
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
963
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
964
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
965
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
966
|
+
*/
|
|
967
|
+
public getAllOffers(ids?: string, platformBusinessIds?: string, businessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<GetOffersResponse> {
|
|
968
|
+
return this.getAllOffersWithHttpInfo(ids, platformBusinessIds, businessIds, offset, limit, createdAtStart, createdAtEnd, _options).pipe(map((apiResponse: HttpInfo<GetOffersResponse>) => apiResponse.data));
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* Fetch an offer
|
|
973
|
+
* @param id The Kanmon offer UUID.
|
|
974
|
+
*/
|
|
975
|
+
public getOfferByIdWithHttpInfo(id: string, _options?: Configuration): Observable<HttpInfo<Offer>> {
|
|
976
|
+
const requestContextPromise = this.requestFactory.getOfferById(id, _options);
|
|
977
|
+
|
|
978
|
+
// build promise chain
|
|
979
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
980
|
+
for (let middleware of this.configuration.middleware) {
|
|
981
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
985
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
986
|
+
let middlewarePostObservable = of(response);
|
|
987
|
+
for (let middleware of this.configuration.middleware) {
|
|
988
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
989
|
+
}
|
|
990
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getOfferByIdWithHttpInfo(rsp)));
|
|
991
|
+
}));
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* Fetch an offer
|
|
996
|
+
* @param id The Kanmon offer UUID.
|
|
997
|
+
*/
|
|
998
|
+
public getOfferById(id: string, _options?: Configuration): Observable<Offer> {
|
|
999
|
+
return this.getOfferByIdWithHttpInfo(id, _options).pipe(map((apiResponse: HttpInfo<Offer>) => apiResponse.data));
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
import { PaymentsApiRequestFactory, PaymentsApiResponseProcessor} from "../apis/PaymentsApi";
|
|
1005
|
+
export class ObservablePaymentsApi {
|
|
1006
|
+
private requestFactory: PaymentsApiRequestFactory;
|
|
1007
|
+
private responseProcessor: PaymentsApiResponseProcessor;
|
|
1008
|
+
private configuration: Configuration;
|
|
1009
|
+
|
|
1010
|
+
public constructor(
|
|
1011
|
+
configuration: Configuration,
|
|
1012
|
+
requestFactory?: PaymentsApiRequestFactory,
|
|
1013
|
+
responseProcessor?: PaymentsApiResponseProcessor
|
|
1014
|
+
) {
|
|
1015
|
+
this.configuration = configuration;
|
|
1016
|
+
this.requestFactory = requestFactory || new PaymentsApiRequestFactory(configuration);
|
|
1017
|
+
this.responseProcessor = responseProcessor || new PaymentsApiResponseProcessor();
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Fetch a payment
|
|
1022
|
+
* @param id The Kanmon payment order UUID.
|
|
1023
|
+
*/
|
|
1024
|
+
public getPaymentByIdWithHttpInfo(id: string, _options?: Configuration): Observable<HttpInfo<PaymentOrder>> {
|
|
1025
|
+
const requestContextPromise = this.requestFactory.getPaymentById(id, _options);
|
|
1026
|
+
|
|
1027
|
+
// build promise chain
|
|
1028
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
1029
|
+
for (let middleware of this.configuration.middleware) {
|
|
1030
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
1034
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
1035
|
+
let middlewarePostObservable = of(response);
|
|
1036
|
+
for (let middleware of this.configuration.middleware) {
|
|
1037
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
1038
|
+
}
|
|
1039
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPaymentByIdWithHttpInfo(rsp)));
|
|
1040
|
+
}));
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* Fetch a payment
|
|
1045
|
+
* @param id The Kanmon payment order UUID.
|
|
1046
|
+
*/
|
|
1047
|
+
public getPaymentById(id: string, _options?: Configuration): Observable<PaymentOrder> {
|
|
1048
|
+
return this.getPaymentByIdWithHttpInfo(id, _options).pipe(map((apiResponse: HttpInfo<PaymentOrder>) => apiResponse.data));
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Fetch payment schedule for an issued product
|
|
1053
|
+
* @param id The Kanmon issued product UUID.
|
|
1054
|
+
* @param drawRequestIds A comma delimited list of Kanmon’s unique draw request IDs.
|
|
1055
|
+
* @param invoiceIds A comma delimited list of Kanmon’s unique IDs for invoices.
|
|
1056
|
+
* @param platformInvoiceIds A comma delimited list of your platform’s unique IDs for invoices.
|
|
1057
|
+
* @param direction The direction of the payment.
|
|
1058
|
+
* @param status The status of the payment.
|
|
1059
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
1060
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
1061
|
+
*/
|
|
1062
|
+
public getPaymentScheduleForAIssuedProductWithHttpInfo(id: string, drawRequestIds?: string, invoiceIds?: string, platformInvoiceIds?: string, direction?: 'DISBURSEMENT' | 'REPAYMENT', status?: PaymentOrderStatus, offset?: number, limit?: number, _options?: Configuration): Observable<HttpInfo<GetPaymentScheduleResponse>> {
|
|
1063
|
+
const requestContextPromise = this.requestFactory.getPaymentScheduleForAIssuedProduct(id, drawRequestIds, invoiceIds, platformInvoiceIds, direction, status, offset, limit, _options);
|
|
1064
|
+
|
|
1065
|
+
// build promise chain
|
|
1066
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
1067
|
+
for (let middleware of this.configuration.middleware) {
|
|
1068
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
1072
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
1073
|
+
let middlewarePostObservable = of(response);
|
|
1074
|
+
for (let middleware of this.configuration.middleware) {
|
|
1075
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
1076
|
+
}
|
|
1077
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPaymentScheduleForAIssuedProductWithHttpInfo(rsp)));
|
|
1078
|
+
}));
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* Fetch payment schedule for an issued product
|
|
1083
|
+
* @param id The Kanmon issued product UUID.
|
|
1084
|
+
* @param drawRequestIds A comma delimited list of Kanmon’s unique draw request IDs.
|
|
1085
|
+
* @param invoiceIds A comma delimited list of Kanmon’s unique IDs for invoices.
|
|
1086
|
+
* @param platformInvoiceIds A comma delimited list of your platform’s unique IDs for invoices.
|
|
1087
|
+
* @param direction The direction of the payment.
|
|
1088
|
+
* @param status The status of the payment.
|
|
1089
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
1090
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
1091
|
+
*/
|
|
1092
|
+
public getPaymentScheduleForAIssuedProduct(id: string, drawRequestIds?: string, invoiceIds?: string, platformInvoiceIds?: string, direction?: 'DISBURSEMENT' | 'REPAYMENT', status?: PaymentOrderStatus, offset?: number, limit?: number, _options?: Configuration): Observable<GetPaymentScheduleResponse> {
|
|
1093
|
+
return this.getPaymentScheduleForAIssuedProductWithHttpInfo(id, drawRequestIds, invoiceIds, platformInvoiceIds, direction, status, offset, limit, _options).pipe(map((apiResponse: HttpInfo<GetPaymentScheduleResponse>) => apiResponse.data));
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
import { PrequalificationsApiRequestFactory, PrequalificationsApiResponseProcessor} from "../apis/PrequalificationsApi";
|
|
1099
|
+
export class ObservablePrequalificationsApi {
|
|
1100
|
+
private requestFactory: PrequalificationsApiRequestFactory;
|
|
1101
|
+
private responseProcessor: PrequalificationsApiResponseProcessor;
|
|
1102
|
+
private configuration: Configuration;
|
|
1103
|
+
|
|
1104
|
+
public constructor(
|
|
1105
|
+
configuration: Configuration,
|
|
1106
|
+
requestFactory?: PrequalificationsApiRequestFactory,
|
|
1107
|
+
responseProcessor?: PrequalificationsApiResponseProcessor
|
|
1108
|
+
) {
|
|
1109
|
+
this.configuration = configuration;
|
|
1110
|
+
this.requestFactory = requestFactory || new PrequalificationsApiRequestFactory(configuration);
|
|
1111
|
+
this.responseProcessor = responseProcessor || new PrequalificationsApiResponseProcessor();
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* Fetch business prequalifications
|
|
1116
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
1117
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
1118
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
1119
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
1120
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
1121
|
+
*/
|
|
1122
|
+
public getPrequalifiedBusinessesWithHttpInfo(platformBusinessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<HttpInfo<Array<GetPrequalificationsResponse>>> {
|
|
1123
|
+
const requestContextPromise = this.requestFactory.getPrequalifiedBusinesses(platformBusinessIds, offset, limit, createdAtStart, createdAtEnd, _options);
|
|
1124
|
+
|
|
1125
|
+
// build promise chain
|
|
1126
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
1127
|
+
for (let middleware of this.configuration.middleware) {
|
|
1128
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
1132
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
1133
|
+
let middlewarePostObservable = of(response);
|
|
1134
|
+
for (let middleware of this.configuration.middleware) {
|
|
1135
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
1136
|
+
}
|
|
1137
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPrequalifiedBusinessesWithHttpInfo(rsp)));
|
|
1138
|
+
}));
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* Fetch business prequalifications
|
|
1143
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique IDs for businesses.
|
|
1144
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
1145
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
1146
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
1147
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
1148
|
+
*/
|
|
1149
|
+
public getPrequalifiedBusinesses(platformBusinessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<Array<GetPrequalificationsResponse>> {
|
|
1150
|
+
return this.getPrequalifiedBusinessesWithHttpInfo(platformBusinessIds, offset, limit, createdAtStart, createdAtEnd, _options).pipe(map((apiResponse: HttpInfo<Array<GetPrequalificationsResponse>>) => apiResponse.data));
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
import { UsersApiRequestFactory, UsersApiResponseProcessor} from "../apis/UsersApi";
|
|
1156
|
+
export class ObservableUsersApi {
|
|
1157
|
+
private requestFactory: UsersApiRequestFactory;
|
|
1158
|
+
private responseProcessor: UsersApiResponseProcessor;
|
|
1159
|
+
private configuration: Configuration;
|
|
1160
|
+
|
|
1161
|
+
public constructor(
|
|
1162
|
+
configuration: Configuration,
|
|
1163
|
+
requestFactory?: UsersApiRequestFactory,
|
|
1164
|
+
responseProcessor?: UsersApiResponseProcessor
|
|
1165
|
+
) {
|
|
1166
|
+
this.configuration = configuration;
|
|
1167
|
+
this.requestFactory = requestFactory || new UsersApiRequestFactory(configuration);
|
|
1168
|
+
this.responseProcessor = responseProcessor || new UsersApiResponseProcessor();
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Create a user
|
|
1173
|
+
* @param createUserRequestBody
|
|
1174
|
+
*/
|
|
1175
|
+
public createUserWithHttpInfo(createUserRequestBody: CreateUserRequestBody, _options?: Configuration): Observable<HttpInfo<User>> {
|
|
1176
|
+
const requestContextPromise = this.requestFactory.createUser(createUserRequestBody, _options);
|
|
1177
|
+
|
|
1178
|
+
// build promise chain
|
|
1179
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
1180
|
+
for (let middleware of this.configuration.middleware) {
|
|
1181
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
1185
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
1186
|
+
let middlewarePostObservable = of(response);
|
|
1187
|
+
for (let middleware of this.configuration.middleware) {
|
|
1188
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
1189
|
+
}
|
|
1190
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUserWithHttpInfo(rsp)));
|
|
1191
|
+
}));
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* Create a user
|
|
1196
|
+
* @param createUserRequestBody
|
|
1197
|
+
*/
|
|
1198
|
+
public createUser(createUserRequestBody: CreateUserRequestBody, _options?: Configuration): Observable<User> {
|
|
1199
|
+
return this.createUserWithHttpInfo(createUserRequestBody, _options).pipe(map((apiResponse: HttpInfo<User>) => apiResponse.data));
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* Fetch a user
|
|
1204
|
+
* @param id Either the Kanmon user UUID or your platform’s user ID, depending on `idType`.
|
|
1205
|
+
* @param idType Which ID type to query the user by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
1206
|
+
*/
|
|
1207
|
+
public getUserWithHttpInfo(id: string, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<HttpInfo<User>> {
|
|
1208
|
+
const requestContextPromise = this.requestFactory.getUser(id, idType, _options);
|
|
1209
|
+
|
|
1210
|
+
// build promise chain
|
|
1211
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
1212
|
+
for (let middleware of this.configuration.middleware) {
|
|
1213
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
1217
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
1218
|
+
let middlewarePostObservable = of(response);
|
|
1219
|
+
for (let middleware of this.configuration.middleware) {
|
|
1220
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
1221
|
+
}
|
|
1222
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getUserWithHttpInfo(rsp)));
|
|
1223
|
+
}));
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* Fetch a user
|
|
1228
|
+
* @param id Either the Kanmon user UUID or your platform’s user ID, depending on `idType`.
|
|
1229
|
+
* @param idType Which ID type to query the user by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
1230
|
+
*/
|
|
1231
|
+
public getUser(id: string, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<User> {
|
|
1232
|
+
return this.getUserWithHttpInfo(id, idType, _options).pipe(map((apiResponse: HttpInfo<User>) => apiResponse.data));
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* Fetch users
|
|
1237
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for users.
|
|
1238
|
+
* @param platformUserIds A comma delimited list of your platform’s unique IDs for users.
|
|
1239
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique business IDs for users.
|
|
1240
|
+
* @param businessIds A comma delimited list of your Kanmon’s unique business IDs for users.
|
|
1241
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
1242
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
1243
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
1244
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
1245
|
+
*/
|
|
1246
|
+
public getUsersWithHttpInfo(ids?: string, platformUserIds?: string, platformBusinessIds?: string, businessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<HttpInfo<GetUsersResponse>> {
|
|
1247
|
+
const requestContextPromise = this.requestFactory.getUsers(ids, platformUserIds, platformBusinessIds, businessIds, offset, limit, createdAtStart, createdAtEnd, _options);
|
|
1248
|
+
|
|
1249
|
+
// build promise chain
|
|
1250
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
1251
|
+
for (let middleware of this.configuration.middleware) {
|
|
1252
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
1256
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
1257
|
+
let middlewarePostObservable = of(response);
|
|
1258
|
+
for (let middleware of this.configuration.middleware) {
|
|
1259
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
1260
|
+
}
|
|
1261
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getUsersWithHttpInfo(rsp)));
|
|
1262
|
+
}));
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* Fetch users
|
|
1267
|
+
* @param ids A comma delimited list of Kanmon’s unique IDs for users.
|
|
1268
|
+
* @param platformUserIds A comma delimited list of your platform’s unique IDs for users.
|
|
1269
|
+
* @param platformBusinessIds A comma delimited list of your platform’s unique business IDs for users.
|
|
1270
|
+
* @param businessIds A comma delimited list of your Kanmon’s unique business IDs for users.
|
|
1271
|
+
* @param offset The number of records to skip when performing pagination. Defaults to `0`.
|
|
1272
|
+
* @param limit The number of records to limit when performing pagination. Defaults to `100`, which is the max.
|
|
1273
|
+
* @param createdAtStart Filter for records where `createdAt` is greater than or equal to this value. ISO 8601 format.
|
|
1274
|
+
* @param createdAtEnd Filter for records where `createdAt` is less than or equal to this value. ISO 8601 format.
|
|
1275
|
+
*/
|
|
1276
|
+
public getUsers(ids?: string, platformUserIds?: string, platformBusinessIds?: string, businessIds?: string, offset?: number, limit?: number, createdAtStart?: string, createdAtEnd?: string, _options?: Configuration): Observable<GetUsersResponse> {
|
|
1277
|
+
return this.getUsersWithHttpInfo(ids, platformUserIds, platformBusinessIds, businessIds, offset, limit, createdAtStart, createdAtEnd, _options).pipe(map((apiResponse: HttpInfo<GetUsersResponse>) => apiResponse.data));
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Users from the source business will be moved into the target business. This will only work if the source business has not started onboarding yet. After the merge, the source business will be deleted.
|
|
1282
|
+
* Merge users from a source business into a target business
|
|
1283
|
+
* @param mergeUsersRequestBody
|
|
1284
|
+
*/
|
|
1285
|
+
public mergeUserIntoBusinesWithHttpInfo(mergeUsersRequestBody: MergeUsersRequestBody, _options?: Configuration): Observable<HttpInfo<MergeUsersResponseBody>> {
|
|
1286
|
+
const requestContextPromise = this.requestFactory.mergeUserIntoBusines(mergeUsersRequestBody, _options);
|
|
1287
|
+
|
|
1288
|
+
// build promise chain
|
|
1289
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
1290
|
+
for (let middleware of this.configuration.middleware) {
|
|
1291
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
1295
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
1296
|
+
let middlewarePostObservable = of(response);
|
|
1297
|
+
for (let middleware of this.configuration.middleware) {
|
|
1298
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
1299
|
+
}
|
|
1300
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.mergeUserIntoBusinesWithHttpInfo(rsp)));
|
|
1301
|
+
}));
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
1305
|
+
* Users from the source business will be moved into the target business. This will only work if the source business has not started onboarding yet. After the merge, the source business will be deleted.
|
|
1306
|
+
* Merge users from a source business into a target business
|
|
1307
|
+
* @param mergeUsersRequestBody
|
|
1308
|
+
*/
|
|
1309
|
+
public mergeUserIntoBusines(mergeUsersRequestBody: MergeUsersRequestBody, _options?: Configuration): Observable<MergeUsersResponseBody> {
|
|
1310
|
+
return this.mergeUserIntoBusinesWithHttpInfo(mergeUsersRequestBody, _options).pipe(map((apiResponse: HttpInfo<MergeUsersResponseBody>) => apiResponse.data));
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Update a user
|
|
1315
|
+
* @param id Either the Kanmon user UUID or your platform’s user ID, depending on `idType`.
|
|
1316
|
+
* @param updateUserRequestBody
|
|
1317
|
+
* @param idType Which ID type to query the user by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
1318
|
+
*/
|
|
1319
|
+
public updateUserWithHttpInfo(id: string, updateUserRequestBody: UpdateUserRequestBody, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<HttpInfo<User>> {
|
|
1320
|
+
const requestContextPromise = this.requestFactory.updateUser(id, updateUserRequestBody, idType, _options);
|
|
1321
|
+
|
|
1322
|
+
// build promise chain
|
|
1323
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
1324
|
+
for (let middleware of this.configuration.middleware) {
|
|
1325
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
1329
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
1330
|
+
let middlewarePostObservable = of(response);
|
|
1331
|
+
for (let middleware of this.configuration.middleware) {
|
|
1332
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
1333
|
+
}
|
|
1334
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUserWithHttpInfo(rsp)));
|
|
1335
|
+
}));
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* Update a user
|
|
1340
|
+
* @param id Either the Kanmon user UUID or your platform’s user ID, depending on `idType`.
|
|
1341
|
+
* @param updateUserRequestBody
|
|
1342
|
+
* @param idType Which ID type to query the user by. Defaults to `KANMON`. Use `PLATFORM` if you want to query by your platform’s ID.
|
|
1343
|
+
*/
|
|
1344
|
+
public updateUser(id: string, updateUserRequestBody: UpdateUserRequestBody, idType?: 'KANMON' | 'PLATFORM', _options?: Configuration): Observable<User> {
|
|
1345
|
+
return this.updateUserWithHttpInfo(id, updateUserRequestBody, idType, _options).pipe(map((apiResponse: HttpInfo<User>) => apiResponse.data));
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
}
|