mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
in-app purchase pre-check api
This commit is contained in:
parent
00b248155a
commit
575a28e25f
@ -15,6 +15,7 @@ import { EmailTokenRequest } from '../models/request/emailTokenRequest';
|
|||||||
import { EventRequest } from '../models/request/eventRequest';
|
import { EventRequest } from '../models/request/eventRequest';
|
||||||
import { FolderRequest } from '../models/request/folderRequest';
|
import { FolderRequest } from '../models/request/folderRequest';
|
||||||
import { GroupRequest } from '../models/request/groupRequest';
|
import { GroupRequest } from '../models/request/groupRequest';
|
||||||
|
import { IapCheckRequest } from '../models/request/iapCheckRequest';
|
||||||
import { ImportCiphersRequest } from '../models/request/importCiphersRequest';
|
import { ImportCiphersRequest } from '../models/request/importCiphersRequest';
|
||||||
import { ImportDirectoryRequest } from '../models/request/importDirectoryRequest';
|
import { ImportDirectoryRequest } from '../models/request/importDirectoryRequest';
|
||||||
import { ImportOrganizationCiphersRequest } from '../models/request/importOrganizationCiphersRequest';
|
import { ImportOrganizationCiphersRequest } from '../models/request/importOrganizationCiphersRequest';
|
||||||
@ -120,6 +121,7 @@ export abstract class ApiService {
|
|||||||
postPasswordHint: (request: PasswordHintRequest) => Promise<any>;
|
postPasswordHint: (request: PasswordHintRequest) => Promise<any>;
|
||||||
postRegister: (request: RegisterRequest) => Promise<any>;
|
postRegister: (request: RegisterRequest) => Promise<any>;
|
||||||
postPremium: (data: FormData) => Promise<PaymentResponse>;
|
postPremium: (data: FormData) => Promise<PaymentResponse>;
|
||||||
|
postIapCheck: (request: IapCheckRequest) => Promise<any>;
|
||||||
postReinstatePremium: () => Promise<any>;
|
postReinstatePremium: () => Promise<any>;
|
||||||
postCancelPremium: () => Promise<any>;
|
postCancelPremium: () => Promise<any>;
|
||||||
postAccountStorage: (request: StorageRequest) => Promise<PaymentResponse>;
|
postAccountStorage: (request: StorageRequest) => Promise<PaymentResponse>;
|
||||||
|
5
src/models/request/iapCheckRequest.ts
Normal file
5
src/models/request/iapCheckRequest.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { PaymentMethodType } from '../../enums/paymentMethodType';
|
||||||
|
|
||||||
|
export class IapCheckRequest {
|
||||||
|
paymentMethodType: PaymentMethodType;
|
||||||
|
}
|
@ -21,6 +21,7 @@ import { EmailTokenRequest } from '../models/request/emailTokenRequest';
|
|||||||
import { EventRequest } from '../models/request/eventRequest';
|
import { EventRequest } from '../models/request/eventRequest';
|
||||||
import { FolderRequest } from '../models/request/folderRequest';
|
import { FolderRequest } from '../models/request/folderRequest';
|
||||||
import { GroupRequest } from '../models/request/groupRequest';
|
import { GroupRequest } from '../models/request/groupRequest';
|
||||||
|
import { IapCheckRequest } from '../models/request/iapCheckRequest';
|
||||||
import { ImportCiphersRequest } from '../models/request/importCiphersRequest';
|
import { ImportCiphersRequest } from '../models/request/importCiphersRequest';
|
||||||
import { ImportDirectoryRequest } from '../models/request/importDirectoryRequest';
|
import { ImportDirectoryRequest } from '../models/request/importDirectoryRequest';
|
||||||
import { ImportOrganizationCiphersRequest } from '../models/request/importOrganizationCiphersRequest';
|
import { ImportOrganizationCiphersRequest } from '../models/request/importOrganizationCiphersRequest';
|
||||||
@ -260,6 +261,10 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
return new PaymentResponse(r);
|
return new PaymentResponse(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async postIapCheck(request: IapCheckRequest): Promise<any> {
|
||||||
|
return this.send('POST', '/accounts/iap-check', request, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
postReinstatePremium(): Promise<any> {
|
postReinstatePremium(): Promise<any> {
|
||||||
return this.send('POST', '/accounts/reinstate-premium', null, true, false);
|
return this.send('POST', '/accounts/reinstate-premium', null, true, false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user