@wix/auto_sdk_subscription_subscriptions 1.0.41 → 1.0.42

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +2 -2
  2. package/build/cjs/index.js +767 -91
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +469 -51
  5. package/build/cjs/index.typings.js +620 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +445 -51
  8. package/build/cjs/meta.js +478 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +2 -2
  11. package/build/es/index.mjs +760 -91
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +469 -51
  14. package/build/es/index.typings.mjs +613 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +445 -51
  17. package/build/es/meta.mjs +471 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +90 -4
  20. package/build/internal/cjs/index.js +767 -91
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +545 -51
  23. package/build/internal/cjs/index.typings.js +620 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +445 -51
  26. package/build/internal/cjs/meta.js +478 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +90 -4
  29. package/build/internal/es/index.mjs +760 -91
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +545 -51
  32. package/build/internal/es/index.typings.mjs +613 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +445 -51
  35. package/build/internal/es/meta.mjs +471 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -43,6 +43,7 @@ __export(index_typings_exports, {
43
43
  PaymentStatus: () => PaymentStatus,
44
44
  PaymentStatusEnumPaymentStatus: () => PaymentStatusEnumPaymentStatus,
45
45
  PaymentTestMode: () => PaymentTestMode,
46
+ PriceAdjustmentReason: () => PriceAdjustmentReason,
46
47
  RefundReason: () => RefundReason,
47
48
  RequestedFields: () => RequestedFields,
48
49
  ResumeAt: () => ResumeAt,
@@ -61,14 +62,20 @@ __export(index_typings_exports, {
61
62
  cancelSubscription: () => cancelSubscription2,
62
63
  countSubscriptions: () => countSubscriptions2,
63
64
  customerAllowedActions: () => customerAllowedActions2,
65
+ customerCancelScheduledPause: () => customerCancelScheduledPause2,
66
+ customerCancelScheduledSkip: () => customerCancelScheduledSkip2,
64
67
  customerCancelSubscription: () => customerCancelSubscription2,
65
68
  customerExtendSubscription: () => customerExtendSubscription2,
66
69
  customerGetSubscription: () => customerGetSubscription2,
67
70
  customerInitiatePaymentMethodSetup: () => customerInitiatePaymentMethodSetup2,
68
71
  customerListUpcomingCharges: () => customerListUpcomingCharges2,
72
+ customerPauseSubscription: () => customerPauseSubscription2,
69
73
  customerQuerySubscriptions: () => customerQuerySubscriptions2,
74
+ customerResumeSubscription: () => customerResumeSubscription2,
75
+ customerSkipCycle: () => customerSkipCycle2,
70
76
  customerTurnOffSubscriptionAutoRenewal: () => customerTurnOffSubscriptionAutoRenewal2,
71
77
  customerTurnOnSubscriptionAutoRenewal: () => customerTurnOnSubscriptionAutoRenewal2,
78
+ customerUpdateBillingDate: () => customerUpdateBillingDate2,
72
79
  customerUpdateSubscriptionPaymentMethod: () => customerUpdateSubscriptionPaymentMethod2,
73
80
  extendSubscription: () => extendSubscription2,
74
81
  getSubscription: () => getSubscription2,
@@ -675,6 +682,348 @@ function customerInitiatePaymentMethodSetup(payload) {
675
682
  }
676
683
  return __customerInitiatePaymentMethodSetup;
677
684
  }
685
+ function customerSkipCycle(payload) {
686
+ function __customerSkipCycle({ host }) {
687
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
688
+ {
689
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
690
+ paths: [
691
+ { path: "pauseAtSchedule.specificDate" },
692
+ { path: "autoResumeAtSchedule.specificDate" }
693
+ ]
694
+ }
695
+ ]);
696
+ const metadata = {
697
+ entityFqdn: "wix.billing.v1.subscription",
698
+ method: "POST",
699
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerSkipCycle",
700
+ packageName: PACKAGE_NAME,
701
+ migrationOptions: {
702
+ optInTransformResponse: true
703
+ },
704
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
705
+ {
706
+ protoPath: "/v1/customer_subscriptions/{id}/skip_cycle",
707
+ data: serializedData,
708
+ host
709
+ }
710
+ ),
711
+ data: serializedData,
712
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
713
+ {
714
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
715
+ paths: [
716
+ { path: "subscription.createdDate" },
717
+ { path: "subscription.updatedDate" },
718
+ { path: "subscription.startDate" },
719
+ { path: "subscription.endDate" },
720
+ { path: "subscription.billingStatus.nextBillingDate" },
721
+ { path: "subscription.billingStatus.previousBillingDate" },
722
+ {
723
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
724
+ },
725
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
726
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
727
+ {
728
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
729
+ },
730
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
731
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
732
+ { path: "subscription.pauseInfo.startDate" },
733
+ { path: "subscription.pauseInfo.resumeDate" },
734
+ { path: "subscription.cancellationInfo.cancellationDate" },
735
+ {
736
+ path: "subscription.specificDatePendingUpdateData.executionDate"
737
+ }
738
+ ]
739
+ }
740
+ ])
741
+ };
742
+ return metadata;
743
+ }
744
+ return __customerSkipCycle;
745
+ }
746
+ function customerCancelScheduledSkip(payload) {
747
+ function __customerCancelScheduledSkip({ host }) {
748
+ const metadata = {
749
+ entityFqdn: "wix.billing.v1.subscription",
750
+ method: "POST",
751
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelScheduledSkip",
752
+ packageName: PACKAGE_NAME,
753
+ migrationOptions: {
754
+ optInTransformResponse: true
755
+ },
756
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
757
+ {
758
+ protoPath: "/v1/customer_subscriptions/{id}/cancel_scheduled_skip",
759
+ data: payload,
760
+ host
761
+ }
762
+ ),
763
+ data: payload,
764
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
765
+ {
766
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
767
+ paths: [
768
+ { path: "subscription.createdDate" },
769
+ { path: "subscription.updatedDate" },
770
+ { path: "subscription.startDate" },
771
+ { path: "subscription.endDate" },
772
+ { path: "subscription.billingStatus.nextBillingDate" },
773
+ { path: "subscription.billingStatus.previousBillingDate" },
774
+ {
775
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
776
+ },
777
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
778
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
779
+ {
780
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
781
+ },
782
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
783
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
784
+ { path: "subscription.pauseInfo.startDate" },
785
+ { path: "subscription.pauseInfo.resumeDate" },
786
+ { path: "subscription.cancellationInfo.cancellationDate" },
787
+ {
788
+ path: "subscription.specificDatePendingUpdateData.executionDate"
789
+ }
790
+ ]
791
+ }
792
+ ])
793
+ };
794
+ return metadata;
795
+ }
796
+ return __customerCancelScheduledSkip;
797
+ }
798
+ function customerPauseSubscription(payload) {
799
+ function __customerPauseSubscription({ host }) {
800
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
801
+ {
802
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
803
+ paths: [
804
+ { path: "pauseAtSchedule.specificDate" },
805
+ { path: "autoResumeAtSchedule.specificDate" }
806
+ ]
807
+ }
808
+ ]);
809
+ const metadata = {
810
+ entityFqdn: "wix.billing.v1.subscription",
811
+ method: "POST",
812
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerPauseSubscription",
813
+ packageName: PACKAGE_NAME,
814
+ migrationOptions: {
815
+ optInTransformResponse: true
816
+ },
817
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
818
+ {
819
+ protoPath: "/v1/customer_subscriptions/{id}/pause",
820
+ data: serializedData,
821
+ host
822
+ }
823
+ ),
824
+ data: serializedData,
825
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
826
+ {
827
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
828
+ paths: [
829
+ { path: "subscription.createdDate" },
830
+ { path: "subscription.updatedDate" },
831
+ { path: "subscription.startDate" },
832
+ { path: "subscription.endDate" },
833
+ { path: "subscription.billingStatus.nextBillingDate" },
834
+ { path: "subscription.billingStatus.previousBillingDate" },
835
+ {
836
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
837
+ },
838
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
839
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
840
+ {
841
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
842
+ },
843
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
844
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
845
+ { path: "subscription.pauseInfo.startDate" },
846
+ { path: "subscription.pauseInfo.resumeDate" },
847
+ { path: "subscription.cancellationInfo.cancellationDate" },
848
+ {
849
+ path: "subscription.specificDatePendingUpdateData.executionDate"
850
+ }
851
+ ]
852
+ }
853
+ ])
854
+ };
855
+ return metadata;
856
+ }
857
+ return __customerPauseSubscription;
858
+ }
859
+ function customerResumeSubscription(payload) {
860
+ function __customerResumeSubscription({ host }) {
861
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
862
+ {
863
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
864
+ paths: [{ path: "resumeAtSchedule.specificDate" }]
865
+ }
866
+ ]);
867
+ const metadata = {
868
+ entityFqdn: "wix.billing.v1.subscription",
869
+ method: "POST",
870
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerResumeSubscription",
871
+ packageName: PACKAGE_NAME,
872
+ migrationOptions: {
873
+ optInTransformResponse: true
874
+ },
875
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
876
+ {
877
+ protoPath: "/v1/customer_subscriptions/{id}/resume",
878
+ data: serializedData,
879
+ host
880
+ }
881
+ ),
882
+ data: serializedData,
883
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
884
+ {
885
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
886
+ paths: [
887
+ { path: "subscription.createdDate" },
888
+ { path: "subscription.updatedDate" },
889
+ { path: "subscription.startDate" },
890
+ { path: "subscription.endDate" },
891
+ { path: "subscription.billingStatus.nextBillingDate" },
892
+ { path: "subscription.billingStatus.previousBillingDate" },
893
+ {
894
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
895
+ },
896
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
897
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
898
+ {
899
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
900
+ },
901
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
902
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
903
+ { path: "subscription.pauseInfo.startDate" },
904
+ { path: "subscription.pauseInfo.resumeDate" },
905
+ { path: "subscription.cancellationInfo.cancellationDate" },
906
+ {
907
+ path: "subscription.specificDatePendingUpdateData.executionDate"
908
+ }
909
+ ]
910
+ }
911
+ ])
912
+ };
913
+ return metadata;
914
+ }
915
+ return __customerResumeSubscription;
916
+ }
917
+ function customerCancelScheduledPause(payload) {
918
+ function __customerCancelScheduledPause({ host }) {
919
+ const metadata = {
920
+ entityFqdn: "wix.billing.v1.subscription",
921
+ method: "POST",
922
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelScheduledPause",
923
+ packageName: PACKAGE_NAME,
924
+ migrationOptions: {
925
+ optInTransformResponse: true
926
+ },
927
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
928
+ {
929
+ protoPath: "/v1/customer_subscriptions/{id}/cancel_scheduled_pause",
930
+ data: payload,
931
+ host
932
+ }
933
+ ),
934
+ data: payload,
935
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
936
+ {
937
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
938
+ paths: [
939
+ { path: "subscription.createdDate" },
940
+ { path: "subscription.updatedDate" },
941
+ { path: "subscription.startDate" },
942
+ { path: "subscription.endDate" },
943
+ { path: "subscription.billingStatus.nextBillingDate" },
944
+ { path: "subscription.billingStatus.previousBillingDate" },
945
+ {
946
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
947
+ },
948
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
949
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
950
+ {
951
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
952
+ },
953
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
954
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
955
+ { path: "subscription.pauseInfo.startDate" },
956
+ { path: "subscription.pauseInfo.resumeDate" },
957
+ { path: "subscription.cancellationInfo.cancellationDate" },
958
+ {
959
+ path: "subscription.specificDatePendingUpdateData.executionDate"
960
+ }
961
+ ]
962
+ }
963
+ ])
964
+ };
965
+ return metadata;
966
+ }
967
+ return __customerCancelScheduledPause;
968
+ }
969
+ function customerUpdateBillingDate(payload) {
970
+ function __customerUpdateBillingDate({ host }) {
971
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
972
+ {
973
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
974
+ paths: [{ path: "billingDate" }]
975
+ }
976
+ ]);
977
+ const metadata = {
978
+ entityFqdn: "wix.billing.v1.subscription",
979
+ method: "POST",
980
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerUpdateBillingDate",
981
+ packageName: PACKAGE_NAME,
982
+ migrationOptions: {
983
+ optInTransformResponse: true
984
+ },
985
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
986
+ {
987
+ protoPath: "/v1/customer_subscriptions/{id}/update_billing_date",
988
+ data: serializedData,
989
+ host
990
+ }
991
+ ),
992
+ data: serializedData,
993
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
994
+ {
995
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
996
+ paths: [
997
+ { path: "subscription.createdDate" },
998
+ { path: "subscription.updatedDate" },
999
+ { path: "subscription.startDate" },
1000
+ { path: "subscription.endDate" },
1001
+ { path: "subscription.billingStatus.nextBillingDate" },
1002
+ { path: "subscription.billingStatus.previousBillingDate" },
1003
+ {
1004
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
1005
+ },
1006
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
1007
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
1008
+ {
1009
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
1010
+ },
1011
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
1012
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
1013
+ { path: "subscription.pauseInfo.startDate" },
1014
+ { path: "subscription.pauseInfo.resumeDate" },
1015
+ { path: "subscription.cancellationInfo.cancellationDate" },
1016
+ {
1017
+ path: "subscription.specificDatePendingUpdateData.executionDate"
1018
+ }
1019
+ ]
1020
+ }
1021
+ ])
1022
+ };
1023
+ return metadata;
1024
+ }
1025
+ return __customerUpdateBillingDate;
1026
+ }
678
1027
  function payCycle(payload) {
679
1028
  function __payCycle({ host }) {
680
1029
  const metadata = {
@@ -3342,6 +3691,8 @@ var ActionType = /* @__PURE__ */ ((ActionType2) => {
3342
3691
  ActionType2["UPM"] = "UPM";
3343
3692
  ActionType2["UPDATE_BILLING_DATE"] = "UPDATE_BILLING_DATE";
3344
3693
  ActionType2["UPDATE_COLLECTION_METHOD"] = "UPDATE_COLLECTION_METHOD";
3694
+ ActionType2["SKIP_CYCLE"] = "SKIP_CYCLE";
3695
+ ActionType2["CUSTOMER_UPDATE_BILLING_DATE"] = "CUSTOMER_UPDATE_BILLING_DATE";
3345
3696
  return ActionType2;
3346
3697
  })(ActionType || {});
3347
3698
  var ExtendPolicyType = /* @__PURE__ */ ((ExtendPolicyType2) => {
@@ -3409,6 +3760,7 @@ var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
3409
3760
  InvoiceStatus2["ATTEMPT_FAILED"] = "ATTEMPT_FAILED";
3410
3761
  InvoiceStatus2["CANCELED"] = "CANCELED";
3411
3762
  InvoiceStatus2["REFUNDED"] = "REFUNDED";
3763
+ InvoiceStatus2["CHARGEBACKED"] = "CHARGEBACKED";
3412
3764
  return InvoiceStatus2;
3413
3765
  })(InvoiceStatus || {});
3414
3766
  var CollectionMethod = /* @__PURE__ */ ((CollectionMethod2) => {
@@ -3433,8 +3785,19 @@ var PaymentAttemptStatus = /* @__PURE__ */ ((PaymentAttemptStatus2) => {
3433
3785
  PaymentAttemptStatus2["TECHNICAL_FAILURE"] = "TECHNICAL_FAILURE";
3434
3786
  PaymentAttemptStatus2["CANCELED"] = "CANCELED";
3435
3787
  PaymentAttemptStatus2["PENDING"] = "PENDING";
3788
+ PaymentAttemptStatus2["REFUNDED"] = "REFUNDED";
3789
+ PaymentAttemptStatus2["CHARGEBACKED"] = "CHARGEBACKED";
3436
3790
  return PaymentAttemptStatus2;
3437
3791
  })(PaymentAttemptStatus || {});
3792
+ var PriceAdjustmentReason = /* @__PURE__ */ ((PriceAdjustmentReason2) => {
3793
+ PriceAdjustmentReason2["PRICE_ADJUSTMENT_REASON_UNSPECIFIED"] = "PRICE_ADJUSTMENT_REASON_UNSPECIFIED";
3794
+ PriceAdjustmentReason2["BILLING_DATE_CHANGE"] = "BILLING_DATE_CHANGE";
3795
+ PriceAdjustmentReason2["PLAN_CHANGE_PRORATION"] = "PLAN_CHANGE_PRORATION";
3796
+ PriceAdjustmentReason2["CYCLE_CHANGE_PRORATION"] = "CYCLE_CHANGE_PRORATION";
3797
+ PriceAdjustmentReason2["QUANTITY_CHANGE_PRORATION"] = "QUANTITY_CHANGE_PRORATION";
3798
+ PriceAdjustmentReason2["CUSTOM_PRICE_ADJUSTMENT"] = "CUSTOM_PRICE_ADJUSTMENT";
3799
+ return PriceAdjustmentReason2;
3800
+ })(PriceAdjustmentReason || {});
3438
3801
  var RefundReason = /* @__PURE__ */ ((RefundReason2) => {
3439
3802
  RefundReason2["UNKNOWN_REFUND_REASON"] = "UNKNOWN_REFUND_REASON";
3440
3803
  RefundReason2["DUPLICATE_CHARGE"] = "DUPLICATE_CHARGE";
@@ -3849,6 +4212,256 @@ async function customerInitiatePaymentMethodSetup2(_id, options) {
3849
4212
  throw transformedError;
3850
4213
  }
3851
4214
  }
4215
+ async function customerSkipCycle2(_id, cyclesToSkip, options) {
4216
+ const { httpClient, sideEffects } = arguments[3];
4217
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4218
+ id: _id,
4219
+ cyclesToSkip,
4220
+ pauseAtSchedule: options?.pauseAtSchedule,
4221
+ autoResumeAtSchedule: options?.autoResumeAtSchedule,
4222
+ reason: options?.reason
4223
+ });
4224
+ const reqOpts = customerSkipCycle(payload);
4225
+ sideEffects?.onSiteCall?.();
4226
+ try {
4227
+ const result = await httpClient.request(reqOpts);
4228
+ sideEffects?.onSuccess?.(result);
4229
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4230
+ (0, import_transform_paths2.transformPaths)(result.data, [
4231
+ {
4232
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4233
+ paths: [
4234
+ { path: "subscription.billingSettings.billingAddress.address" },
4235
+ { path: "subscription.shippingAddress.address" }
4236
+ ]
4237
+ }
4238
+ ])
4239
+ );
4240
+ } catch (err) {
4241
+ const transformedError = (0, import_transform_error.transformError)(
4242
+ err,
4243
+ {
4244
+ spreadPathsToArguments: {},
4245
+ explicitPathsToArguments: {
4246
+ id: "$[0]",
4247
+ cyclesToSkip: "$[1]",
4248
+ pauseAtSchedule: "$[2].pauseAtSchedule",
4249
+ autoResumeAtSchedule: "$[2].autoResumeAtSchedule",
4250
+ reason: "$[2].reason"
4251
+ },
4252
+ singleArgumentUnchanged: false
4253
+ },
4254
+ ["_id", "cyclesToSkip", "options"]
4255
+ );
4256
+ sideEffects?.onError?.(err);
4257
+ throw transformedError;
4258
+ }
4259
+ }
4260
+ async function customerCancelScheduledSkip2(_id, options) {
4261
+ const { httpClient, sideEffects } = arguments[2];
4262
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4263
+ id: _id,
4264
+ reason: options?.reason
4265
+ });
4266
+ const reqOpts = customerCancelScheduledSkip(payload);
4267
+ sideEffects?.onSiteCall?.();
4268
+ try {
4269
+ const result = await httpClient.request(reqOpts);
4270
+ sideEffects?.onSuccess?.(result);
4271
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4272
+ (0, import_transform_paths2.transformPaths)(result.data, [
4273
+ {
4274
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4275
+ paths: [
4276
+ { path: "subscription.billingSettings.billingAddress.address" },
4277
+ { path: "subscription.shippingAddress.address" }
4278
+ ]
4279
+ }
4280
+ ])
4281
+ );
4282
+ } catch (err) {
4283
+ const transformedError = (0, import_transform_error.transformError)(
4284
+ err,
4285
+ {
4286
+ spreadPathsToArguments: {},
4287
+ explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
4288
+ singleArgumentUnchanged: false
4289
+ },
4290
+ ["_id", "options"]
4291
+ );
4292
+ sideEffects?.onError?.(err);
4293
+ throw transformedError;
4294
+ }
4295
+ }
4296
+ async function customerPauseSubscription2(_id, options) {
4297
+ const { httpClient, sideEffects } = arguments[2];
4298
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4299
+ id: _id,
4300
+ pausePolicy: options?.pausePolicy,
4301
+ reason: options?.reason,
4302
+ pauseAt: options?.pauseAt,
4303
+ pauseAtSchedule: options?.pauseAtSchedule,
4304
+ autoResumeAtSchedule: options?.autoResumeAtSchedule
4305
+ });
4306
+ const reqOpts = customerPauseSubscription(payload);
4307
+ sideEffects?.onSiteCall?.();
4308
+ try {
4309
+ const result = await httpClient.request(reqOpts);
4310
+ sideEffects?.onSuccess?.(result);
4311
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4312
+ (0, import_transform_paths2.transformPaths)(result.data, [
4313
+ {
4314
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4315
+ paths: [
4316
+ { path: "subscription.billingSettings.billingAddress.address" },
4317
+ { path: "subscription.shippingAddress.address" }
4318
+ ]
4319
+ }
4320
+ ])
4321
+ );
4322
+ } catch (err) {
4323
+ const transformedError = (0, import_transform_error.transformError)(
4324
+ err,
4325
+ {
4326
+ spreadPathsToArguments: {},
4327
+ explicitPathsToArguments: {
4328
+ id: "$[0]",
4329
+ pausePolicy: "$[1].pausePolicy",
4330
+ reason: "$[1].reason",
4331
+ pauseAt: "$[1].pauseAt",
4332
+ pauseAtSchedule: "$[1].pauseAtSchedule",
4333
+ autoResumeAtSchedule: "$[1].autoResumeAtSchedule"
4334
+ },
4335
+ singleArgumentUnchanged: false
4336
+ },
4337
+ ["_id", "options"]
4338
+ );
4339
+ sideEffects?.onError?.(err);
4340
+ throw transformedError;
4341
+ }
4342
+ }
4343
+ async function customerResumeSubscription2(_id, options) {
4344
+ const { httpClient, sideEffects } = arguments[2];
4345
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4346
+ id: _id,
4347
+ reason: options?.reason,
4348
+ resumeAt: options?.resumeAt,
4349
+ resumeAtSchedule: options?.resumeAtSchedule
4350
+ });
4351
+ const reqOpts = customerResumeSubscription(payload);
4352
+ sideEffects?.onSiteCall?.();
4353
+ try {
4354
+ const result = await httpClient.request(reqOpts);
4355
+ sideEffects?.onSuccess?.(result);
4356
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4357
+ (0, import_transform_paths2.transformPaths)(result.data, [
4358
+ {
4359
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4360
+ paths: [
4361
+ { path: "subscription.billingSettings.billingAddress.address" },
4362
+ { path: "subscription.shippingAddress.address" }
4363
+ ]
4364
+ }
4365
+ ])
4366
+ );
4367
+ } catch (err) {
4368
+ const transformedError = (0, import_transform_error.transformError)(
4369
+ err,
4370
+ {
4371
+ spreadPathsToArguments: {},
4372
+ explicitPathsToArguments: {
4373
+ id: "$[0]",
4374
+ reason: "$[1].reason",
4375
+ resumeAt: "$[1].resumeAt",
4376
+ resumeAtSchedule: "$[1].resumeAtSchedule"
4377
+ },
4378
+ singleArgumentUnchanged: false
4379
+ },
4380
+ ["_id", "options"]
4381
+ );
4382
+ sideEffects?.onError?.(err);
4383
+ throw transformedError;
4384
+ }
4385
+ }
4386
+ async function customerCancelScheduledPause2(_id, options) {
4387
+ const { httpClient, sideEffects } = arguments[2];
4388
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4389
+ id: _id,
4390
+ reason: options?.reason
4391
+ });
4392
+ const reqOpts = customerCancelScheduledPause(payload);
4393
+ sideEffects?.onSiteCall?.();
4394
+ try {
4395
+ const result = await httpClient.request(reqOpts);
4396
+ sideEffects?.onSuccess?.(result);
4397
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4398
+ (0, import_transform_paths2.transformPaths)(result.data, [
4399
+ {
4400
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4401
+ paths: [
4402
+ { path: "subscription.billingSettings.billingAddress.address" },
4403
+ { path: "subscription.shippingAddress.address" }
4404
+ ]
4405
+ }
4406
+ ])
4407
+ );
4408
+ } catch (err) {
4409
+ const transformedError = (0, import_transform_error.transformError)(
4410
+ err,
4411
+ {
4412
+ spreadPathsToArguments: {},
4413
+ explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
4414
+ singleArgumentUnchanged: false
4415
+ },
4416
+ ["_id", "options"]
4417
+ );
4418
+ sideEffects?.onError?.(err);
4419
+ throw transformedError;
4420
+ }
4421
+ }
4422
+ async function customerUpdateBillingDate2(_id, billingDate, options) {
4423
+ const { httpClient, sideEffects } = arguments[3];
4424
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4425
+ id: _id,
4426
+ billingDate,
4427
+ proration: options?.proration,
4428
+ reason: options?.reason
4429
+ });
4430
+ const reqOpts = customerUpdateBillingDate(payload);
4431
+ sideEffects?.onSiteCall?.();
4432
+ try {
4433
+ const result = await httpClient.request(reqOpts);
4434
+ sideEffects?.onSuccess?.(result);
4435
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4436
+ (0, import_transform_paths2.transformPaths)(result.data, [
4437
+ {
4438
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4439
+ paths: [
4440
+ { path: "subscription.billingSettings.billingAddress.address" },
4441
+ { path: "subscription.shippingAddress.address" }
4442
+ ]
4443
+ }
4444
+ ])
4445
+ );
4446
+ } catch (err) {
4447
+ const transformedError = (0, import_transform_error.transformError)(
4448
+ err,
4449
+ {
4450
+ spreadPathsToArguments: {},
4451
+ explicitPathsToArguments: {
4452
+ id: "$[0]",
4453
+ billingDate: "$[1]",
4454
+ proration: "$[2].proration",
4455
+ reason: "$[2].reason"
4456
+ },
4457
+ singleArgumentUnchanged: false
4458
+ },
4459
+ ["_id", "billingDate", "options"]
4460
+ );
4461
+ sideEffects?.onError?.(err);
4462
+ throw transformedError;
4463
+ }
4464
+ }
3852
4465
  async function payCycle2(subscriptionId, options) {
3853
4466
  const { httpClient, sideEffects } = arguments[2];
3854
4467
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -4908,6 +5521,7 @@ async function listSubscriptionHistory2(subscriptionId, options) {
4908
5521
  PaymentStatus,
4909
5522
  PaymentStatusEnumPaymentStatus,
4910
5523
  PaymentTestMode,
5524
+ PriceAdjustmentReason,
4911
5525
  RefundReason,
4912
5526
  RequestedFields,
4913
5527
  ResumeAt,
@@ -4926,14 +5540,20 @@ async function listSubscriptionHistory2(subscriptionId, options) {
4926
5540
  cancelSubscription,
4927
5541
  countSubscriptions,
4928
5542
  customerAllowedActions,
5543
+ customerCancelScheduledPause,
5544
+ customerCancelScheduledSkip,
4929
5545
  customerCancelSubscription,
4930
5546
  customerExtendSubscription,
4931
5547
  customerGetSubscription,
4932
5548
  customerInitiatePaymentMethodSetup,
4933
5549
  customerListUpcomingCharges,
5550
+ customerPauseSubscription,
4934
5551
  customerQuerySubscriptions,
5552
+ customerResumeSubscription,
5553
+ customerSkipCycle,
4935
5554
  customerTurnOffSubscriptionAutoRenewal,
4936
5555
  customerTurnOnSubscriptionAutoRenewal,
5556
+ customerUpdateBillingDate,
4937
5557
  customerUpdateSubscriptionPaymentMethod,
4938
5558
  extendSubscription,
4939
5559
  getSubscription,