starta.apiclient 1.112.11313 → 1.112.11319

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.
@@ -119,4 +119,5 @@ export default class Customers {
119
119
  }): Promise<import("../../../types").StartaResponse>;
120
120
  issueLoyaltyCard(organizationLogin: string, customerId: string, cardTypeId: string): Promise<import("../../../types").StartaResponse>;
121
121
  deleteLoyaltyCard(organizationLogin: string, customerId: string, cardId: string): Promise<import("../../../types").StartaResponse>;
122
+ getLoyaltyCard(organizationLogin: string, customerId: string, cardId: string): Promise<import("../../../types").StartaResponse>;
122
123
  }
@@ -126,16 +126,22 @@ class Customers {
126
126
  }
127
127
  issueLoyaltyCard(organizationLogin, customerId, cardTypeId) {
128
128
  return this._requestRunner.performRequest({
129
- url: `/accounts/${organizationLogin}/customers/${customerId}/loyalty/cards`,
129
+ url: `accounts/${organizationLogin}/customers/${customerId}/loyalty/cards`,
130
130
  method: 'POST',
131
131
  body: { cardTypeId },
132
132
  });
133
133
  }
134
134
  deleteLoyaltyCard(organizationLogin, customerId, cardId) {
135
135
  return this._requestRunner.performRequest({
136
- url: `/accounts/${organizationLogin}/customers/${customerId}/loyalty/cards/${cardId}`,
136
+ url: `accounts/${organizationLogin}/customers/${customerId}/loyalty/cards/${cardId}`,
137
137
  method: 'DELETE',
138
138
  });
139
139
  }
140
+ getLoyaltyCard(organizationLogin, customerId, cardId) {
141
+ return this._requestRunner.performRequest({
142
+ url: `accounts/${organizationLogin}/customers/${customerId}/loyalty/cards/${cardId}`,
143
+ method: 'GET',
144
+ });
145
+ }
140
146
  }
141
147
  exports.default = Customers;
@@ -6,16 +6,17 @@ export default class Payments {
6
6
  signature: any;
7
7
  data: any;
8
8
  }): Promise<import("../../types").StartaResponse>;
9
- addManual(organizationLogin: string, { orderId, date, amount, method, membershipId, serviceId, cashRegisterId, certificateId, certificateCode, }: {
9
+ addManual(organizationLogin: string, { orderId, date, amount, method, membershipId, serviceId, cashRegisterId, certificateId, certificateCode, loyaltyCardId, }: {
10
10
  orderId: string;
11
11
  date: string;
12
12
  amount?: number;
13
- method: 'card' | 'wire' | 'cash' | 'membership' | 'certificate';
13
+ method: 'card' | 'wire' | 'cash' | 'membership' | 'certificate' | 'loyaltyCard';
14
14
  certificateId?: string;
15
15
  certificateCode?: string;
16
16
  membershipId?: string;
17
17
  serviceId?: string;
18
18
  cashRegisterId?: string;
19
+ loyaltyCardId?: string;
19
20
  }): Promise<import("../../types").StartaResponse>;
20
21
  deletePayment(organizationLogin: string, { orderId, transactionId }: {
21
22
  orderId: string;
@@ -14,7 +14,7 @@ class Payments {
14
14
  },
15
15
  });
16
16
  }
17
- addManual(organizationLogin, { orderId, date, amount, method, membershipId, serviceId, cashRegisterId, certificateId, certificateCode, }) {
17
+ addManual(organizationLogin, { orderId, date, amount, method, membershipId, serviceId, cashRegisterId, certificateId, certificateCode, loyaltyCardId, }) {
18
18
  return this._requestRunner.performRequest({
19
19
  url: `accounts/${organizationLogin}/payments/manual`,
20
20
  method: 'POST',
@@ -28,6 +28,7 @@ class Payments {
28
28
  certificateCode,
29
29
  serviceId,
30
30
  cashRegisterId,
31
+ loyaltyCardId,
31
32
  },
32
33
  });
33
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.112.11313",
3
+ "version": "1.112.11319",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",