diff options
Diffstat (limited to 'packages/taler-util/src/http-client/merchant.ts')
-rw-r--r-- | packages/taler-util/src/http-client/merchant.ts | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/packages/taler-util/src/http-client/merchant.ts b/packages/taler-util/src/http-client/merchant.ts index 5fd001555..c223b0a16 100644 --- a/packages/taler-util/src/http-client/merchant.ts +++ b/packages/taler-util/src/http-client/merchant.ts @@ -512,7 +512,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#post-[-instances-$INSTANCE]-private-accounts */ - async addAccount(token: AccessToken | undefined, body: TalerMerchantApi.AccountAddDetails) { + async addBankAccount(token: AccessToken | undefined, body: TalerMerchantApi.AccountAddDetails) { const url = new URL(`private/accounts`, this.baseUrl); const headers: Record<string, string> = {} @@ -540,7 +540,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#patch-[-instances-$INSTANCE]-private-accounts-$H_WIRE */ - async updateAccount( + async updateBankAccount( token: AccessToken | undefined, wireAccount: string, body: TalerMerchantApi.AccountPatchDetails, @@ -569,9 +569,11 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCE]-private-accounts */ - async listAccounts(token: AccessToken) { + async listBankAccounts(token: AccessToken, params?: PaginationParams) { const url = new URL(`private/accounts`, this.baseUrl); + // addMerchantPaginationParams(url, params); + const headers: Record<string, string> = {} if (token) { headers.Authorization = makeBearerTokenAuthHeader(token) @@ -594,7 +596,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCE]-private-accounts-$H_WIRE */ - async getAccount(token: AccessToken | undefined, wireAccount: string) { + async getBankAccountDetails(token: AccessToken | undefined, wireAccount: string) { const url = new URL(`private/accounts/${wireAccount}`, this.baseUrl); const headers: Record<string, string> = {} @@ -619,7 +621,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#delete-[-instances-$INSTANCE]-private-accounts-$H_WIRE */ - async deleteAccount(token: AccessToken | undefined, wireAccount: string) { + async deleteBankAccount(token: AccessToken | undefined, wireAccount: string) { const url = new URL(`private/accounts/${wireAccount}`, this.baseUrl); const headers: Record<string, string> = {} @@ -733,7 +735,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCE]-private-products-$PRODUCT_ID */ - async getProduct(token: AccessToken | undefined, productId: string) { + async getProductDetails(token: AccessToken | undefined, productId: string) { const url = new URL(`private/products/${productId}`, this.baseUrl); const headers: Record<string, string> = {} @@ -902,7 +904,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCE]-private-orders-$ORDER_ID */ - async getOrder( + async getOrderDetails( token: AccessToken | undefined, orderId: string, params: TalerMerchantApi.GetOrderRequestParams = {}, @@ -1207,7 +1209,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCE]-private-otp-devices */ - async listOtpDevices(token: AccessToken | undefined,) { + async listOtpDevices(token: AccessToken | undefined, params?: PaginationParams) { const url = new URL(`private/otp-devices`, this.baseUrl); const headers: Record<string, string> = {} @@ -1231,7 +1233,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCE]-private-otp-devices-$DEVICE_ID */ - async getOtpDevice( + async getOtpDeviceDetails( token: AccessToken | undefined, deviceId: string, params: TalerMerchantApi.GetOtpDeviceRequestParams = {}, @@ -1350,7 +1352,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#inspecting-template */ - async listTemplates(token: AccessToken | undefined,) { + async listTemplates(token: AccessToken | undefined, params?: PaginationParams) { const url = new URL(`private/templates`, this.baseUrl); const headers: Record<string, string> = {} @@ -1374,7 +1376,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCE]-private-templates-$TEMPLATE_ID */ - async getTemplate(token: AccessToken | undefined, templateId: string) { + async getTemplateDetails(token: AccessToken | undefined, templateId: string) { const url = new URL(`private/templates/${templateId}`, this.baseUrl); const headers: Record<string, string> = {} @@ -1520,7 +1522,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCES]-private-webhooks */ - async listWebhooks(token: AccessToken | undefined,) { + async listWebhooks(token: AccessToken | undefined, params?: PaginationParams) { const url = new URL(`private/webhooks`, this.baseUrl); const headers: Record<string, string> = {} @@ -1545,7 +1547,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCES]-private-webhooks-$WEBHOOK_ID */ - async getWebhook(token: AccessToken | undefined, webhookId: string) { + async getWebhookDetails(token: AccessToken | undefined, webhookId: string) { const url = new URL(`private/webhooks/${webhookId}`, this.baseUrl); const headers: Record<string, string> = {} @@ -1652,7 +1654,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCES]-private-tokenfamilies */ - async listTokenFamilies(token: AccessToken | undefined,) { + async listTokenFamilies(token: AccessToken | undefined, params?: PaginationParams) { const url = new URL(`private/tokenfamilies`, this.baseUrl); const headers: Record<string, string> = {} @@ -1677,7 +1679,7 @@ export class TalerMerchantInstanceHttpClient { /** * https://docs.taler.net/core/api-merchant.html#get-[-instances-$INSTANCES]-private-tokenfamilies-$TOKEN_FAMILY_SLUG */ - async getTokenFamily(token: AccessToken | undefined, tokenSlug: string) { + async getTokenFamilyDetails(token: AccessToken | undefined, tokenSlug: string) { const url = new URL(`private/tokenfamilies/${tokenSlug}`, this.baseUrl); const headers: Record<string, string> = {} @@ -1853,7 +1855,7 @@ export class TalerMerchantManagementHttpClient extends TalerMerchantInstanceHttp /** * https://docs.taler.net/core/api-merchant.html#get--management-instances */ - async listInstances(token: AccessToken | undefined,) { + async listInstances(token: AccessToken | undefined, params?: PaginationParams) { const url = new URL(`management/instances`, this.baseUrl); const headers: Record<string, string> = {} |