@passly-nl/data 1.0.0-rc.1 → 1.0.0-rc.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@passly-nl/data",
3
3
  "description": "API implementation for Passly.",
4
- "version": "1.0.0-rc.1",
4
+ "version": "1.0.0-rc.3",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/basmilius",
@@ -15,14 +15,14 @@ export class MerchantService extends BaseService {
15
15
  .runAdapter(MerchantAdapter.parseMerchant);
16
16
  }
17
17
 
18
- async getAccountManager(merchantId: string): Promise<BaseResponse<UserDto | null>> {
18
+ async getAccountManagers(merchantId: string): Promise<BaseResponse<UserDto[]>> {
19
19
  return await this
20
- .request(`/merchants/${merchantId}/account-manager`)
20
+ .request(`/merchants/${merchantId}/account-managers`)
21
21
  .method('get')
22
22
  .queryString(QueryString.builder()
23
23
  .append('language', 'nl'))
24
24
  .bearerToken()
25
- .runAdapter(AuthAdapter.parseUser);
25
+ .runArrayAdapter(AuthAdapter.parseUser);
26
26
  }
27
27
 
28
28
  async getClaims(merchantId: string): Promise<BaseResponse<Claim[]>> {
@@ -21,6 +21,15 @@ export class PublicOrderService extends BaseService {
21
21
  .runArrayAdapter(PublicPayAdapter.parsePublicPaymentMethod);
22
22
  }
23
23
 
24
+ async postCancel(orderId: string): Promise<BaseResponse<OrderDto>> {
25
+ return await this
26
+ .request(`/orders/${orderId}/cancel`)
27
+ .method('post')
28
+ .queryString(QueryString.builder()
29
+ .append('language', 'nl'))
30
+ .runAdapter(OrderAdapter.parseOrder);
31
+ }
32
+
24
33
  async postPay(orderId: string, paymentMethodId: string): Promise<BaseResponse<TransactionDto>> {
25
34
  return await this
26
35
  .request(`/orders/${orderId}/pay`)