Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/services/bookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,31 @@ export class Bookie {
}

public async deleteBillingAccount(billingAccountId: string): Promise<void> {
return ApiClient.handleResponse(await this.client.delete(`kyc_applicatons/${billingAccountId}`));
return ApiClient.handleResponse(await this.client.delete(`kyc_applications/${billingAccountId}`));
}

public async fetchKycApplications(params?: any): Promise<PaginatedResponse<KycApplication>> {
return ApiClient.handleResponse(await this.client.get(`kyc_applicatons`, params || {})) as PaginatedResponse<KycApplication>;
return ApiClient.handleResponse(await this.client.get(`kyc_applications`, params || {})) as PaginatedResponse<KycApplication>;
}

public async fetchKycApplicationDetails(kycApplicationId: string, params?: any): Promise<KycApplication> {
return ApiClient.handleResponse(await this.client.get(`kyc_applicatons/${kycApplicationId}`, params || {})) as KycApplication;
return ApiClient.handleResponse(await this.client.get(`kyc_applications/${kycApplicationId}`, params || {})) as KycApplication;
}

public async createKycApplication(params: KycApplicationParams): Promise<KycApplication> {
return ApiClient.handleResponse(await this.client.post('kyc_applicatons', params)) as KycApplication;
return ApiClient.handleResponse(await this.client.post('kyc_applications', params)) as KycApplication;
}

public async updateKycApplication(kycApplicationId: string, params: Partial<KycApplicationParams>): Promise<void> {
return ApiClient.handleResponse(await this.client.put(`kyc_applicatons/${kycApplicationId}`, params));
return ApiClient.handleResponse(await this.client.put(`kyc_applications/${kycApplicationId}`, params));
}

public async createPayment(params: any): Promise<Payment> {
return ApiClient.handleResponse(await this.client.post('payments', params)) as Payment;
}

public async createFacility(params: any): Promise<Facility> {
return ApiClient.handleResponse(await this.client.post('facilities', params)) as Facility;
return ApiClient.handleResponse(await this.client.post('facilities', params)) as Facility;
}

public async fetchFacilities(params?: any): Promise<PaginatedResponse<Facility>> {
Expand All @@ -85,19 +85,19 @@ export class Bookie {
}

public async createAgreement(facilityId: string, params: any): Promise<Agreement> {
return ApiClient.handleResponse(await this.client.post(`facilities/${facilityId}/agreements`, params)) as Agreement;
return ApiClient.handleResponse(await this.client.post(`facilities/${facilityId}/agreements`, params)) as Agreement;
}

public async fetchAgreements(facilityId: string, params?: any): Promise<PaginatedResponse<Agreement>> {
return ApiClient.handleResponse(await this.client.get(`facilities/${facilityId}/agreements`, params || {})) as PaginatedResponse<Agreement>;
return ApiClient.handleResponse(await this.client.get(`facilities/${facilityId}/agreements`, params || {})) as PaginatedResponse<Agreement>;
}

public async fetchAgreementDetails(facilityId: string, agreementId: string, params?: any): Promise<Agreement> {
return ApiClient.handleResponse(await this.client.get(`facilities/${facilityId}/agreements/${agreementId}`, params || {})) as Agreement;
}

public async createTokenizationPolicy(params: any): Promise<TokenizationPolicy> {
return ApiClient.handleResponse(await this.client.post('tokenization_policies', params)) as TokenizationPolicy;
return ApiClient.handleResponse(await this.client.post('tokenization_policies', params)) as TokenizationPolicy;
}

public async fetchTokenizationPolicies(params?: any): Promise<PaginatedResponse<TokenizationPolicy>> {
Expand All @@ -107,9 +107,9 @@ export class Bookie {
public async fetchTokenizationPolicyDetails(tokenizationPolicyId: string, params?: any): Promise<TokenizationPolicy> {
return ApiClient.handleResponse(await this.client.get(`tokenization_policies/${tokenizationPolicyId}`, params || {})) as TokenizationPolicy;
}

public async createBillingAccountTransaction(billingAccountId: string, params: any): Promise<Transaction> {
return ApiClient.handleResponse(await this.client.post(`billing_accounts/${billingAccountId}/transactions`, params)) as Transaction;
return ApiClient.handleResponse(await this.client.post(`billing_accounts/${billingAccountId}/transactions`, params)) as Transaction;
}

public async fetchBillingAccountTransactions(billingAccountId: string, params?: any): Promise<PaginatedResponse<Transaction>> {
Expand Down