@voucherify/sdk 2.3.0 → 2.4.0

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.
@@ -873,6 +873,22 @@
873
873
  const customerWithoutId = omit(customer, ['id']);
874
874
  return this.client.put(`/customers/${encode(id)}`, customerWithoutId);
875
875
  }
876
+ /**
877
+ * @see https://docs.voucherify.io/reference/update-customers-in-bulk
878
+ */
879
+
880
+
881
+ updateInBulk(customers) {
882
+ return this.client.post(`/customers/bulk/async`, customers);
883
+ }
884
+ /**
885
+ * @see https://docs.voucherify.io/reference/update-customers-metadata-in-bulk
886
+ */
887
+
888
+
889
+ updateMetadataInBulk(sourceIdsAndMetadata) {
890
+ return this.client.post(`/customers/metadata/async`, sourceIdsAndMetadata);
891
+ }
876
892
  /**
877
893
  * @see https://docs.voucherify.io/reference/delete-customer
878
894
  */
@@ -881,6 +897,14 @@
881
897
  delete(customerId) {
882
898
  return this.client.delete(`/customers/${encode(customerId)}`);
883
899
  }
900
+ /**
901
+ * @see https://docs.voucherify.io/reference/delete-customer-permanently
902
+ */
903
+
904
+
905
+ deletePermanently(customerId) {
906
+ return this.client.post(`/customers/${encode(customerId)}/permanent-deletion`, {});
907
+ }
884
908
  /**
885
909
  * @see https://docs.voucherify.io/reference/update-customers-consents
886
910
  */
@@ -1292,6 +1316,30 @@
1292
1316
  deleteEarningRule(campaignId, earningRuleId) {
1293
1317
  return this.client.delete(`/loyalties/${encode(campaignId)}/earning-rules/${earningRuleId}`);
1294
1318
  }
1319
+ /**
1320
+ * @see https://docs.voucherify.io/reference/get-earning-rule
1321
+ */
1322
+
1323
+
1324
+ getEarningRule(campaignId, earningRuleId) {
1325
+ return this.client.get(`/loyalties/${encode(campaignId)}/earning-rules/${encode(earningRuleId)}`);
1326
+ }
1327
+ /**
1328
+ * @see https://docs.voucherify.io/reference/enable-earning-rule
1329
+ */
1330
+
1331
+
1332
+ enableEarningRule(campaignId, earningRuleId) {
1333
+ return this.client.post(`/loyalties/${encode(campaignId)}/earning-rules/${earningRuleId}/enable`, {});
1334
+ }
1335
+ /**
1336
+ * @see https://docs.voucherify.io/reference/disable-earning-rule
1337
+ */
1338
+
1339
+
1340
+ disableEarningRule(campaignId, earningRuleId) {
1341
+ return this.client.post(`/loyalties/${encode(campaignId)}/earning-rules/${earningRuleId}/disable`, {});
1342
+ }
1295
1343
  /**
1296
1344
  * @see https://docs.voucherify.io/reference/list-members
1297
1345
  */
@@ -1598,7 +1646,7 @@
1598
1646
  let headers = {
1599
1647
  'X-App-Id': options.applicationId,
1600
1648
  'X-App-Token': options.secretKey,
1601
- 'X-Voucherify-Channel': options.channel || `${environment()}-SDK-v${"2.3.0"}`,
1649
+ 'X-Voucherify-Channel': options.channel || `${environment()}-SDK-v${"2.4.0"}`,
1602
1650
  'Content-Type': 'application/json'
1603
1651
  };
1604
1652
 
@@ -1851,7 +1899,7 @@
1851
1899
  let headers = {
1852
1900
  'X-Client-Application-Id': options.clientApplicationId,
1853
1901
  'X-Client-Token': options.clientSecretKey,
1854
- 'X-Voucherify-Channel': `${environment()}-ClientSide-SDK-v${"2.3.0"}`
1902
+ 'X-Voucherify-Channel': `${environment()}-ClientSide-SDK-v${"2.4.0"}`
1855
1903
  };
1856
1904
 
1857
1905
  if (environment().startsWith('Node')) {