@wix/auto_sdk_subscription_subscriptions 1.0.40 → 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 +4 -4
@@ -43,6 +43,7 @@ __export(index_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_exports, {
61
62
  cancelSubscription: () => cancelSubscription4,
62
63
  countSubscriptions: () => countSubscriptions4,
63
64
  customerAllowedActions: () => customerAllowedActions4,
65
+ customerCancelScheduledPause: () => customerCancelScheduledPause4,
66
+ customerCancelScheduledSkip: () => customerCancelScheduledSkip4,
64
67
  customerCancelSubscription: () => customerCancelSubscription4,
65
68
  customerExtendSubscription: () => customerExtendSubscription4,
66
69
  customerGetSubscription: () => customerGetSubscription4,
67
70
  customerInitiatePaymentMethodSetup: () => customerInitiatePaymentMethodSetup4,
68
71
  customerListUpcomingCharges: () => customerListUpcomingCharges4,
72
+ customerPauseSubscription: () => customerPauseSubscription4,
69
73
  customerQuerySubscriptions: () => customerQuerySubscriptions4,
74
+ customerResumeSubscription: () => customerResumeSubscription4,
75
+ customerSkipCycle: () => customerSkipCycle4,
70
76
  customerTurnOffSubscriptionAutoRenewal: () => customerTurnOffSubscriptionAutoRenewal4,
71
77
  customerTurnOnSubscriptionAutoRenewal: () => customerTurnOnSubscriptionAutoRenewal4,
78
+ customerUpdateBillingDate: () => customerUpdateBillingDate4,
72
79
  customerUpdateSubscriptionPaymentMethod: () => customerUpdateSubscriptionPaymentMethod4,
73
80
  extendSubscription: () => extendSubscription4,
74
81
  getSubscription: () => getSubscription4,
@@ -695,6 +702,348 @@ function customerInitiatePaymentMethodSetup(payload) {
695
702
  }
696
703
  return __customerInitiatePaymentMethodSetup;
697
704
  }
705
+ function customerSkipCycle(payload) {
706
+ function __customerSkipCycle({ host }) {
707
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
708
+ {
709
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
710
+ paths: [
711
+ { path: "pauseAtSchedule.specificDate" },
712
+ { path: "autoResumeAtSchedule.specificDate" }
713
+ ]
714
+ }
715
+ ]);
716
+ const metadata = {
717
+ entityFqdn: "wix.billing.v1.subscription",
718
+ method: "POST",
719
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerSkipCycle",
720
+ packageName: PACKAGE_NAME,
721
+ migrationOptions: {
722
+ optInTransformResponse: true
723
+ },
724
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
725
+ {
726
+ protoPath: "/v1/customer_subscriptions/{id}/skip_cycle",
727
+ data: serializedData,
728
+ host
729
+ }
730
+ ),
731
+ data: serializedData,
732
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
733
+ {
734
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
735
+ paths: [
736
+ { path: "subscription.createdDate" },
737
+ { path: "subscription.updatedDate" },
738
+ { path: "subscription.startDate" },
739
+ { path: "subscription.endDate" },
740
+ { path: "subscription.billingStatus.nextBillingDate" },
741
+ { path: "subscription.billingStatus.previousBillingDate" },
742
+ {
743
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
744
+ },
745
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
746
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
747
+ {
748
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
749
+ },
750
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
751
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
752
+ { path: "subscription.pauseInfo.startDate" },
753
+ { path: "subscription.pauseInfo.resumeDate" },
754
+ { path: "subscription.cancellationInfo.cancellationDate" },
755
+ {
756
+ path: "subscription.specificDatePendingUpdateData.executionDate"
757
+ }
758
+ ]
759
+ }
760
+ ])
761
+ };
762
+ return metadata;
763
+ }
764
+ return __customerSkipCycle;
765
+ }
766
+ function customerCancelScheduledSkip(payload) {
767
+ function __customerCancelScheduledSkip({ host }) {
768
+ const metadata = {
769
+ entityFqdn: "wix.billing.v1.subscription",
770
+ method: "POST",
771
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelScheduledSkip",
772
+ packageName: PACKAGE_NAME,
773
+ migrationOptions: {
774
+ optInTransformResponse: true
775
+ },
776
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
777
+ {
778
+ protoPath: "/v1/customer_subscriptions/{id}/cancel_scheduled_skip",
779
+ data: payload,
780
+ host
781
+ }
782
+ ),
783
+ data: payload,
784
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
785
+ {
786
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
787
+ paths: [
788
+ { path: "subscription.createdDate" },
789
+ { path: "subscription.updatedDate" },
790
+ { path: "subscription.startDate" },
791
+ { path: "subscription.endDate" },
792
+ { path: "subscription.billingStatus.nextBillingDate" },
793
+ { path: "subscription.billingStatus.previousBillingDate" },
794
+ {
795
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
796
+ },
797
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
798
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
799
+ {
800
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
801
+ },
802
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
803
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
804
+ { path: "subscription.pauseInfo.startDate" },
805
+ { path: "subscription.pauseInfo.resumeDate" },
806
+ { path: "subscription.cancellationInfo.cancellationDate" },
807
+ {
808
+ path: "subscription.specificDatePendingUpdateData.executionDate"
809
+ }
810
+ ]
811
+ }
812
+ ])
813
+ };
814
+ return metadata;
815
+ }
816
+ return __customerCancelScheduledSkip;
817
+ }
818
+ function customerPauseSubscription(payload) {
819
+ function __customerPauseSubscription({ host }) {
820
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
821
+ {
822
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
823
+ paths: [
824
+ { path: "pauseAtSchedule.specificDate" },
825
+ { path: "autoResumeAtSchedule.specificDate" }
826
+ ]
827
+ }
828
+ ]);
829
+ const metadata = {
830
+ entityFqdn: "wix.billing.v1.subscription",
831
+ method: "POST",
832
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerPauseSubscription",
833
+ packageName: PACKAGE_NAME,
834
+ migrationOptions: {
835
+ optInTransformResponse: true
836
+ },
837
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
838
+ {
839
+ protoPath: "/v1/customer_subscriptions/{id}/pause",
840
+ data: serializedData,
841
+ host
842
+ }
843
+ ),
844
+ data: serializedData,
845
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
846
+ {
847
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
848
+ paths: [
849
+ { path: "subscription.createdDate" },
850
+ { path: "subscription.updatedDate" },
851
+ { path: "subscription.startDate" },
852
+ { path: "subscription.endDate" },
853
+ { path: "subscription.billingStatus.nextBillingDate" },
854
+ { path: "subscription.billingStatus.previousBillingDate" },
855
+ {
856
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
857
+ },
858
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
859
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
860
+ {
861
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
862
+ },
863
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
864
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
865
+ { path: "subscription.pauseInfo.startDate" },
866
+ { path: "subscription.pauseInfo.resumeDate" },
867
+ { path: "subscription.cancellationInfo.cancellationDate" },
868
+ {
869
+ path: "subscription.specificDatePendingUpdateData.executionDate"
870
+ }
871
+ ]
872
+ }
873
+ ])
874
+ };
875
+ return metadata;
876
+ }
877
+ return __customerPauseSubscription;
878
+ }
879
+ function customerResumeSubscription(payload) {
880
+ function __customerResumeSubscription({ host }) {
881
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
882
+ {
883
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
884
+ paths: [{ path: "resumeAtSchedule.specificDate" }]
885
+ }
886
+ ]);
887
+ const metadata = {
888
+ entityFqdn: "wix.billing.v1.subscription",
889
+ method: "POST",
890
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerResumeSubscription",
891
+ packageName: PACKAGE_NAME,
892
+ migrationOptions: {
893
+ optInTransformResponse: true
894
+ },
895
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
896
+ {
897
+ protoPath: "/v1/customer_subscriptions/{id}/resume",
898
+ data: serializedData,
899
+ host
900
+ }
901
+ ),
902
+ data: serializedData,
903
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
904
+ {
905
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
906
+ paths: [
907
+ { path: "subscription.createdDate" },
908
+ { path: "subscription.updatedDate" },
909
+ { path: "subscription.startDate" },
910
+ { path: "subscription.endDate" },
911
+ { path: "subscription.billingStatus.nextBillingDate" },
912
+ { path: "subscription.billingStatus.previousBillingDate" },
913
+ {
914
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
915
+ },
916
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
917
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
918
+ {
919
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
920
+ },
921
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
922
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
923
+ { path: "subscription.pauseInfo.startDate" },
924
+ { path: "subscription.pauseInfo.resumeDate" },
925
+ { path: "subscription.cancellationInfo.cancellationDate" },
926
+ {
927
+ path: "subscription.specificDatePendingUpdateData.executionDate"
928
+ }
929
+ ]
930
+ }
931
+ ])
932
+ };
933
+ return metadata;
934
+ }
935
+ return __customerResumeSubscription;
936
+ }
937
+ function customerCancelScheduledPause(payload) {
938
+ function __customerCancelScheduledPause({ host }) {
939
+ const metadata = {
940
+ entityFqdn: "wix.billing.v1.subscription",
941
+ method: "POST",
942
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelScheduledPause",
943
+ packageName: PACKAGE_NAME,
944
+ migrationOptions: {
945
+ optInTransformResponse: true
946
+ },
947
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
948
+ {
949
+ protoPath: "/v1/customer_subscriptions/{id}/cancel_scheduled_pause",
950
+ data: payload,
951
+ host
952
+ }
953
+ ),
954
+ data: payload,
955
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
956
+ {
957
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
958
+ paths: [
959
+ { path: "subscription.createdDate" },
960
+ { path: "subscription.updatedDate" },
961
+ { path: "subscription.startDate" },
962
+ { path: "subscription.endDate" },
963
+ { path: "subscription.billingStatus.nextBillingDate" },
964
+ { path: "subscription.billingStatus.previousBillingDate" },
965
+ {
966
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
967
+ },
968
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
969
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
970
+ {
971
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
972
+ },
973
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
974
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
975
+ { path: "subscription.pauseInfo.startDate" },
976
+ { path: "subscription.pauseInfo.resumeDate" },
977
+ { path: "subscription.cancellationInfo.cancellationDate" },
978
+ {
979
+ path: "subscription.specificDatePendingUpdateData.executionDate"
980
+ }
981
+ ]
982
+ }
983
+ ])
984
+ };
985
+ return metadata;
986
+ }
987
+ return __customerCancelScheduledPause;
988
+ }
989
+ function customerUpdateBillingDate(payload) {
990
+ function __customerUpdateBillingDate({ host }) {
991
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
992
+ {
993
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
994
+ paths: [{ path: "billingDate" }]
995
+ }
996
+ ]);
997
+ const metadata = {
998
+ entityFqdn: "wix.billing.v1.subscription",
999
+ method: "POST",
1000
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerUpdateBillingDate",
1001
+ packageName: PACKAGE_NAME,
1002
+ migrationOptions: {
1003
+ optInTransformResponse: true
1004
+ },
1005
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
1006
+ {
1007
+ protoPath: "/v1/customer_subscriptions/{id}/update_billing_date",
1008
+ data: serializedData,
1009
+ host
1010
+ }
1011
+ ),
1012
+ data: serializedData,
1013
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1014
+ {
1015
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1016
+ paths: [
1017
+ { path: "subscription.createdDate" },
1018
+ { path: "subscription.updatedDate" },
1019
+ { path: "subscription.startDate" },
1020
+ { path: "subscription.endDate" },
1021
+ { path: "subscription.billingStatus.nextBillingDate" },
1022
+ { path: "subscription.billingStatus.previousBillingDate" },
1023
+ {
1024
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
1025
+ },
1026
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
1027
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
1028
+ {
1029
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
1030
+ },
1031
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
1032
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
1033
+ { path: "subscription.pauseInfo.startDate" },
1034
+ { path: "subscription.pauseInfo.resumeDate" },
1035
+ { path: "subscription.cancellationInfo.cancellationDate" },
1036
+ {
1037
+ path: "subscription.specificDatePendingUpdateData.executionDate"
1038
+ }
1039
+ ]
1040
+ }
1041
+ ])
1042
+ };
1043
+ return metadata;
1044
+ }
1045
+ return __customerUpdateBillingDate;
1046
+ }
698
1047
  function payCycle(payload) {
699
1048
  function __payCycle({ host }) {
700
1049
  const metadata = {
@@ -3362,6 +3711,8 @@ var ActionType = /* @__PURE__ */ ((ActionType2) => {
3362
3711
  ActionType2["UPM"] = "UPM";
3363
3712
  ActionType2["UPDATE_BILLING_DATE"] = "UPDATE_BILLING_DATE";
3364
3713
  ActionType2["UPDATE_COLLECTION_METHOD"] = "UPDATE_COLLECTION_METHOD";
3714
+ ActionType2["SKIP_CYCLE"] = "SKIP_CYCLE";
3715
+ ActionType2["CUSTOMER_UPDATE_BILLING_DATE"] = "CUSTOMER_UPDATE_BILLING_DATE";
3365
3716
  return ActionType2;
3366
3717
  })(ActionType || {});
3367
3718
  var ExtendPolicyType = /* @__PURE__ */ ((ExtendPolicyType2) => {
@@ -3429,6 +3780,7 @@ var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
3429
3780
  InvoiceStatus2["ATTEMPT_FAILED"] = "ATTEMPT_FAILED";
3430
3781
  InvoiceStatus2["CANCELED"] = "CANCELED";
3431
3782
  InvoiceStatus2["REFUNDED"] = "REFUNDED";
3783
+ InvoiceStatus2["CHARGEBACKED"] = "CHARGEBACKED";
3432
3784
  return InvoiceStatus2;
3433
3785
  })(InvoiceStatus || {});
3434
3786
  var CollectionMethod = /* @__PURE__ */ ((CollectionMethod2) => {
@@ -3453,8 +3805,19 @@ var PaymentAttemptStatus = /* @__PURE__ */ ((PaymentAttemptStatus2) => {
3453
3805
  PaymentAttemptStatus2["TECHNICAL_FAILURE"] = "TECHNICAL_FAILURE";
3454
3806
  PaymentAttemptStatus2["CANCELED"] = "CANCELED";
3455
3807
  PaymentAttemptStatus2["PENDING"] = "PENDING";
3808
+ PaymentAttemptStatus2["REFUNDED"] = "REFUNDED";
3809
+ PaymentAttemptStatus2["CHARGEBACKED"] = "CHARGEBACKED";
3456
3810
  return PaymentAttemptStatus2;
3457
3811
  })(PaymentAttemptStatus || {});
3812
+ var PriceAdjustmentReason = /* @__PURE__ */ ((PriceAdjustmentReason2) => {
3813
+ PriceAdjustmentReason2["PRICE_ADJUSTMENT_REASON_UNSPECIFIED"] = "PRICE_ADJUSTMENT_REASON_UNSPECIFIED";
3814
+ PriceAdjustmentReason2["BILLING_DATE_CHANGE"] = "BILLING_DATE_CHANGE";
3815
+ PriceAdjustmentReason2["PLAN_CHANGE_PRORATION"] = "PLAN_CHANGE_PRORATION";
3816
+ PriceAdjustmentReason2["CYCLE_CHANGE_PRORATION"] = "CYCLE_CHANGE_PRORATION";
3817
+ PriceAdjustmentReason2["QUANTITY_CHANGE_PRORATION"] = "QUANTITY_CHANGE_PRORATION";
3818
+ PriceAdjustmentReason2["CUSTOM_PRICE_ADJUSTMENT"] = "CUSTOM_PRICE_ADJUSTMENT";
3819
+ return PriceAdjustmentReason2;
3820
+ })(PriceAdjustmentReason || {});
3458
3821
  var RefundReason = /* @__PURE__ */ ((RefundReason2) => {
3459
3822
  RefundReason2["UNKNOWN_REFUND_REASON"] = "UNKNOWN_REFUND_REASON";
3460
3823
  RefundReason2["DUPLICATE_CHARGE"] = "DUPLICATE_CHARGE";
@@ -3555,22 +3918,212 @@ async function customerGetSubscription2(_id) {
3555
3918
  err,
3556
3919
  {
3557
3920
  spreadPathsToArguments: {},
3558
- explicitPathsToArguments: { id: "$[0]" },
3921
+ explicitPathsToArguments: { id: "$[0]" },
3922
+ singleArgumentUnchanged: false
3923
+ },
3924
+ ["_id"]
3925
+ );
3926
+ sideEffects?.onError?.(err);
3927
+ throw transformedError;
3928
+ }
3929
+ }
3930
+ async function customerCancelSubscription2(_id, options) {
3931
+ const { httpClient, sideEffects } = arguments[2];
3932
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
3933
+ id: _id,
3934
+ reason: options?.reason
3935
+ });
3936
+ const reqOpts = customerCancelSubscription(payload);
3937
+ sideEffects?.onSiteCall?.();
3938
+ try {
3939
+ const result = await httpClient.request(reqOpts);
3940
+ sideEffects?.onSuccess?.(result);
3941
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
3942
+ (0, import_transform_paths2.transformPaths)(result.data, [
3943
+ {
3944
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
3945
+ paths: [
3946
+ { path: "subscription.billingSettings.billingAddress.address" },
3947
+ { path: "subscription.shippingAddress.address" }
3948
+ ]
3949
+ }
3950
+ ])
3951
+ );
3952
+ } catch (err) {
3953
+ const transformedError = (0, import_transform_error.transformError)(
3954
+ err,
3955
+ {
3956
+ spreadPathsToArguments: {},
3957
+ explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
3958
+ singleArgumentUnchanged: false
3959
+ },
3960
+ ["_id", "options"]
3961
+ );
3962
+ sideEffects?.onError?.(err);
3963
+ throw transformedError;
3964
+ }
3965
+ }
3966
+ async function customerTurnOnSubscriptionAutoRenewal2(_id, options) {
3967
+ const { httpClient, sideEffects } = arguments[2];
3968
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
3969
+ id: _id,
3970
+ reason: options?.reason
3971
+ });
3972
+ const reqOpts = customerTurnOnSubscriptionAutoRenewal(
3973
+ payload
3974
+ );
3975
+ sideEffects?.onSiteCall?.();
3976
+ try {
3977
+ const result = await httpClient.request(reqOpts);
3978
+ sideEffects?.onSuccess?.(result);
3979
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
3980
+ (0, import_transform_paths2.transformPaths)(result.data, [
3981
+ {
3982
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
3983
+ paths: [
3984
+ { path: "subscription.billingSettings.billingAddress.address" },
3985
+ { path: "subscription.shippingAddress.address" }
3986
+ ]
3987
+ }
3988
+ ])
3989
+ );
3990
+ } catch (err) {
3991
+ const transformedError = (0, import_transform_error.transformError)(
3992
+ err,
3993
+ {
3994
+ spreadPathsToArguments: {},
3995
+ explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
3996
+ singleArgumentUnchanged: false
3997
+ },
3998
+ ["_id", "options"]
3999
+ );
4000
+ sideEffects?.onError?.(err);
4001
+ throw transformedError;
4002
+ }
4003
+ }
4004
+ async function customerTurnOffSubscriptionAutoRenewal2(_id, options) {
4005
+ const { httpClient, sideEffects } = arguments[2];
4006
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4007
+ id: _id,
4008
+ reason: options?.reason
4009
+ });
4010
+ const reqOpts = customerTurnOffSubscriptionAutoRenewal(
4011
+ payload
4012
+ );
4013
+ sideEffects?.onSiteCall?.();
4014
+ try {
4015
+ const result = await httpClient.request(reqOpts);
4016
+ sideEffects?.onSuccess?.(result);
4017
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4018
+ (0, import_transform_paths2.transformPaths)(result.data, [
4019
+ {
4020
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4021
+ paths: [
4022
+ { path: "subscription.billingSettings.billingAddress.address" },
4023
+ { path: "subscription.shippingAddress.address" }
4024
+ ]
4025
+ }
4026
+ ])
4027
+ );
4028
+ } catch (err) {
4029
+ const transformedError = (0, import_transform_error.transformError)(
4030
+ err,
4031
+ {
4032
+ spreadPathsToArguments: {},
4033
+ explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
4034
+ singleArgumentUnchanged: false
4035
+ },
4036
+ ["_id", "options"]
4037
+ );
4038
+ sideEffects?.onError?.(err);
4039
+ throw transformedError;
4040
+ }
4041
+ }
4042
+ async function customerExtendSubscription2(_id, options) {
4043
+ const { httpClient, sideEffects } = arguments[2];
4044
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4045
+ id: _id,
4046
+ reason: options?.reason,
4047
+ billingCyclesToAdd: options?.billingCyclesToAdd
4048
+ });
4049
+ const reqOpts = customerExtendSubscription(payload);
4050
+ sideEffects?.onSiteCall?.();
4051
+ try {
4052
+ const result = await httpClient.request(reqOpts);
4053
+ sideEffects?.onSuccess?.(result);
4054
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4055
+ (0, import_transform_paths2.transformPaths)(result.data, [
4056
+ {
4057
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4058
+ paths: [
4059
+ { path: "subscription.billingSettings.billingAddress.address" },
4060
+ { path: "subscription.shippingAddress.address" }
4061
+ ]
4062
+ }
4063
+ ])
4064
+ );
4065
+ } catch (err) {
4066
+ const transformedError = (0, import_transform_error.transformError)(
4067
+ err,
4068
+ {
4069
+ spreadPathsToArguments: {},
4070
+ explicitPathsToArguments: {
4071
+ id: "$[0]",
4072
+ reason: "$[1].reason",
4073
+ billingCyclesToAdd: "$[1].billingCyclesToAdd"
4074
+ },
4075
+ singleArgumentUnchanged: false
4076
+ },
4077
+ ["_id", "options"]
4078
+ );
4079
+ sideEffects?.onError?.(err);
4080
+ throw transformedError;
4081
+ }
4082
+ }
4083
+ async function customerQuerySubscriptions2(options) {
4084
+ const { httpClient, sideEffects } = arguments[1];
4085
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4086
+ query: options?.query
4087
+ });
4088
+ const reqOpts = customerQuerySubscriptions(payload);
4089
+ sideEffects?.onSiteCall?.();
4090
+ try {
4091
+ const result = await httpClient.request(reqOpts);
4092
+ sideEffects?.onSuccess?.(result);
4093
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4094
+ (0, import_transform_paths2.transformPaths)(result.data, [
4095
+ {
4096
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4097
+ paths: [
4098
+ { path: "subscriptions.billingSettings.billingAddress.address" },
4099
+ { path: "subscriptions.shippingAddress.address" }
4100
+ ]
4101
+ }
4102
+ ])
4103
+ );
4104
+ } catch (err) {
4105
+ const transformedError = (0, import_transform_error.transformError)(
4106
+ err,
4107
+ {
4108
+ spreadPathsToArguments: {},
4109
+ explicitPathsToArguments: { query: "$[0].query" },
3559
4110
  singleArgumentUnchanged: false
3560
4111
  },
3561
- ["_id"]
4112
+ ["options"]
3562
4113
  );
3563
4114
  sideEffects?.onError?.(err);
3564
4115
  throw transformedError;
3565
4116
  }
3566
4117
  }
3567
- async function customerCancelSubscription2(_id, options) {
4118
+ async function customerUpdateSubscriptionPaymentMethod2(_id, paymentMethodId) {
3568
4119
  const { httpClient, sideEffects } = arguments[2];
3569
4120
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
3570
4121
  id: _id,
3571
- reason: options?.reason
4122
+ paymentMethodId
3572
4123
  });
3573
- const reqOpts = customerCancelSubscription(payload);
4124
+ const reqOpts = customerUpdateSubscriptionPaymentMethod(
4125
+ payload
4126
+ );
3574
4127
  sideEffects?.onSiteCall?.();
3575
4128
  try {
3576
4129
  const result = await httpClient.request(reqOpts);
@@ -3591,83 +4144,86 @@ async function customerCancelSubscription2(_id, options) {
3591
4144
  err,
3592
4145
  {
3593
4146
  spreadPathsToArguments: {},
3594
- explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
4147
+ explicitPathsToArguments: { id: "$[0]", paymentMethodId: "$[1]" },
3595
4148
  singleArgumentUnchanged: false
3596
4149
  },
3597
- ["_id", "options"]
4150
+ ["_id", "paymentMethodId"]
3598
4151
  );
3599
4152
  sideEffects?.onError?.(err);
3600
4153
  throw transformedError;
3601
4154
  }
3602
4155
  }
3603
- async function customerTurnOnSubscriptionAutoRenewal2(_id, options) {
3604
- const { httpClient, sideEffects } = arguments[2];
3605
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
3606
- id: _id,
3607
- reason: options?.reason
3608
- });
3609
- const reqOpts = customerTurnOnSubscriptionAutoRenewal(
3610
- payload
3611
- );
4156
+ async function customerAllowedActions2(_id) {
4157
+ const { httpClient, sideEffects } = arguments[1];
4158
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
4159
+ const reqOpts = customerAllowedActions(payload);
3612
4160
  sideEffects?.onSiteCall?.();
3613
4161
  try {
3614
4162
  const result = await httpClient.request(reqOpts);
3615
4163
  sideEffects?.onSuccess?.(result);
3616
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
3617
- (0, import_transform_paths2.transformPaths)(result.data, [
3618
- {
3619
- transformFn: import_address2.transformRESTAddressToSDKAddress,
3620
- paths: [
3621
- { path: "subscription.billingSettings.billingAddress.address" },
3622
- { path: "subscription.shippingAddress.address" }
3623
- ]
3624
- }
3625
- ])
4164
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
4165
+ } catch (err) {
4166
+ const transformedError = (0, import_transform_error.transformError)(
4167
+ err,
4168
+ {
4169
+ spreadPathsToArguments: {},
4170
+ explicitPathsToArguments: { id: "$[0]" },
4171
+ singleArgumentUnchanged: false
4172
+ },
4173
+ ["_id"]
3626
4174
  );
4175
+ sideEffects?.onError?.(err);
4176
+ throw transformedError;
4177
+ }
4178
+ }
4179
+ async function customerListUpcomingCharges2(_id) {
4180
+ const { httpClient, sideEffects } = arguments[1];
4181
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
4182
+ const reqOpts = customerListUpcomingCharges(payload);
4183
+ sideEffects?.onSiteCall?.();
4184
+ try {
4185
+ const result = await httpClient.request(reqOpts);
4186
+ sideEffects?.onSuccess?.(result);
4187
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
3627
4188
  } catch (err) {
3628
4189
  const transformedError = (0, import_transform_error.transformError)(
3629
4190
  err,
3630
4191
  {
3631
4192
  spreadPathsToArguments: {},
3632
- explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
4193
+ explicitPathsToArguments: { id: "$[0]" },
3633
4194
  singleArgumentUnchanged: false
3634
4195
  },
3635
- ["_id", "options"]
4196
+ ["_id"]
3636
4197
  );
3637
4198
  sideEffects?.onError?.(err);
3638
4199
  throw transformedError;
3639
4200
  }
3640
4201
  }
3641
- async function customerTurnOffSubscriptionAutoRenewal2(_id, options) {
4202
+ async function customerInitiatePaymentMethodSetup2(_id, options) {
3642
4203
  const { httpClient, sideEffects } = arguments[2];
3643
4204
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
3644
4205
  id: _id,
3645
- reason: options?.reason
4206
+ paymentMode: options?.paymentMode,
4207
+ paymentSettings: options?.paymentSettings
3646
4208
  });
3647
- const reqOpts = customerTurnOffSubscriptionAutoRenewal(
4209
+ const reqOpts = customerInitiatePaymentMethodSetup(
3648
4210
  payload
3649
4211
  );
3650
4212
  sideEffects?.onSiteCall?.();
3651
4213
  try {
3652
4214
  const result = await httpClient.request(reqOpts);
3653
4215
  sideEffects?.onSuccess?.(result);
3654
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
3655
- (0, import_transform_paths2.transformPaths)(result.data, [
3656
- {
3657
- transformFn: import_address2.transformRESTAddressToSDKAddress,
3658
- paths: [
3659
- { path: "subscription.billingSettings.billingAddress.address" },
3660
- { path: "subscription.shippingAddress.address" }
3661
- ]
3662
- }
3663
- ])
3664
- );
4216
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
3665
4217
  } catch (err) {
3666
4218
  const transformedError = (0, import_transform_error.transformError)(
3667
4219
  err,
3668
4220
  {
3669
4221
  spreadPathsToArguments: {},
3670
- explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
4222
+ explicitPathsToArguments: {
4223
+ id: "$[0]",
4224
+ paymentMode: "$[1].paymentMode",
4225
+ paymentSettings: "$[1].paymentSettings"
4226
+ },
3671
4227
  singleArgumentUnchanged: false
3672
4228
  },
3673
4229
  ["_id", "options"]
@@ -3676,14 +4232,16 @@ async function customerTurnOffSubscriptionAutoRenewal2(_id, options) {
3676
4232
  throw transformedError;
3677
4233
  }
3678
4234
  }
3679
- async function customerExtendSubscription2(_id, options) {
3680
- const { httpClient, sideEffects } = arguments[2];
4235
+ async function customerSkipCycle2(_id, cyclesToSkip, options) {
4236
+ const { httpClient, sideEffects } = arguments[3];
3681
4237
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
3682
4238
  id: _id,
3683
- reason: options?.reason,
3684
- billingCyclesToAdd: options?.billingCyclesToAdd
4239
+ cyclesToSkip,
4240
+ pauseAtSchedule: options?.pauseAtSchedule,
4241
+ autoResumeAtSchedule: options?.autoResumeAtSchedule,
4242
+ reason: options?.reason
3685
4243
  });
3686
- const reqOpts = customerExtendSubscription(payload);
4244
+ const reqOpts = customerSkipCycle(payload);
3687
4245
  sideEffects?.onSiteCall?.();
3688
4246
  try {
3689
4247
  const result = await httpClient.request(reqOpts);
@@ -3706,23 +4264,26 @@ async function customerExtendSubscription2(_id, options) {
3706
4264
  spreadPathsToArguments: {},
3707
4265
  explicitPathsToArguments: {
3708
4266
  id: "$[0]",
3709
- reason: "$[1].reason",
3710
- billingCyclesToAdd: "$[1].billingCyclesToAdd"
4267
+ cyclesToSkip: "$[1]",
4268
+ pauseAtSchedule: "$[2].pauseAtSchedule",
4269
+ autoResumeAtSchedule: "$[2].autoResumeAtSchedule",
4270
+ reason: "$[2].reason"
3711
4271
  },
3712
4272
  singleArgumentUnchanged: false
3713
4273
  },
3714
- ["_id", "options"]
4274
+ ["_id", "cyclesToSkip", "options"]
3715
4275
  );
3716
4276
  sideEffects?.onError?.(err);
3717
4277
  throw transformedError;
3718
4278
  }
3719
4279
  }
3720
- async function customerQuerySubscriptions2(options) {
3721
- const { httpClient, sideEffects } = arguments[1];
4280
+ async function customerCancelScheduledSkip2(_id, options) {
4281
+ const { httpClient, sideEffects } = arguments[2];
3722
4282
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
3723
- query: options?.query
4283
+ id: _id,
4284
+ reason: options?.reason
3724
4285
  });
3725
- const reqOpts = customerQuerySubscriptions(payload);
4286
+ const reqOpts = customerCancelScheduledSkip(payload);
3726
4287
  sideEffects?.onSiteCall?.();
3727
4288
  try {
3728
4289
  const result = await httpClient.request(reqOpts);
@@ -3732,8 +4293,8 @@ async function customerQuerySubscriptions2(options) {
3732
4293
  {
3733
4294
  transformFn: import_address2.transformRESTAddressToSDKAddress,
3734
4295
  paths: [
3735
- { path: "subscriptions.billingSettings.billingAddress.address" },
3736
- { path: "subscriptions.shippingAddress.address" }
4296
+ { path: "subscription.billingSettings.billingAddress.address" },
4297
+ { path: "subscription.shippingAddress.address" }
3737
4298
  ]
3738
4299
  }
3739
4300
  ])
@@ -3743,24 +4304,26 @@ async function customerQuerySubscriptions2(options) {
3743
4304
  err,
3744
4305
  {
3745
4306
  spreadPathsToArguments: {},
3746
- explicitPathsToArguments: { query: "$[0].query" },
4307
+ explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
3747
4308
  singleArgumentUnchanged: false
3748
4309
  },
3749
- ["options"]
4310
+ ["_id", "options"]
3750
4311
  );
3751
4312
  sideEffects?.onError?.(err);
3752
4313
  throw transformedError;
3753
4314
  }
3754
4315
  }
3755
- async function customerUpdateSubscriptionPaymentMethod2(_id, paymentMethodId) {
4316
+ async function customerPauseSubscription2(_id, options) {
3756
4317
  const { httpClient, sideEffects } = arguments[2];
3757
4318
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
3758
4319
  id: _id,
3759
- paymentMethodId
4320
+ pausePolicy: options?.pausePolicy,
4321
+ reason: options?.reason,
4322
+ pauseAt: options?.pauseAt,
4323
+ pauseAtSchedule: options?.pauseAtSchedule,
4324
+ autoResumeAtSchedule: options?.autoResumeAtSchedule
3760
4325
  });
3761
- const reqOpts = customerUpdateSubscriptionPaymentMethod(
3762
- payload
3763
- );
4326
+ const reqOpts = customerPauseSubscription(payload);
3764
4327
  sideEffects?.onSiteCall?.();
3765
4328
  try {
3766
4329
  const result = await httpClient.request(reqOpts);
@@ -3781,76 +4344,125 @@ async function customerUpdateSubscriptionPaymentMethod2(_id, paymentMethodId) {
3781
4344
  err,
3782
4345
  {
3783
4346
  spreadPathsToArguments: {},
3784
- explicitPathsToArguments: { id: "$[0]", paymentMethodId: "$[1]" },
4347
+ explicitPathsToArguments: {
4348
+ id: "$[0]",
4349
+ pausePolicy: "$[1].pausePolicy",
4350
+ reason: "$[1].reason",
4351
+ pauseAt: "$[1].pauseAt",
4352
+ pauseAtSchedule: "$[1].pauseAtSchedule",
4353
+ autoResumeAtSchedule: "$[1].autoResumeAtSchedule"
4354
+ },
3785
4355
  singleArgumentUnchanged: false
3786
4356
  },
3787
- ["_id", "paymentMethodId"]
4357
+ ["_id", "options"]
3788
4358
  );
3789
4359
  sideEffects?.onError?.(err);
3790
4360
  throw transformedError;
3791
4361
  }
3792
4362
  }
3793
- async function customerAllowedActions2(_id) {
3794
- const { httpClient, sideEffects } = arguments[1];
3795
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
3796
- const reqOpts = customerAllowedActions(payload);
4363
+ async function customerResumeSubscription2(_id, options) {
4364
+ const { httpClient, sideEffects } = arguments[2];
4365
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4366
+ id: _id,
4367
+ reason: options?.reason,
4368
+ resumeAt: options?.resumeAt,
4369
+ resumeAtSchedule: options?.resumeAtSchedule
4370
+ });
4371
+ const reqOpts = customerResumeSubscription(payload);
3797
4372
  sideEffects?.onSiteCall?.();
3798
4373
  try {
3799
4374
  const result = await httpClient.request(reqOpts);
3800
4375
  sideEffects?.onSuccess?.(result);
3801
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
4376
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4377
+ (0, import_transform_paths2.transformPaths)(result.data, [
4378
+ {
4379
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4380
+ paths: [
4381
+ { path: "subscription.billingSettings.billingAddress.address" },
4382
+ { path: "subscription.shippingAddress.address" }
4383
+ ]
4384
+ }
4385
+ ])
4386
+ );
3802
4387
  } catch (err) {
3803
4388
  const transformedError = (0, import_transform_error.transformError)(
3804
4389
  err,
3805
4390
  {
3806
4391
  spreadPathsToArguments: {},
3807
- explicitPathsToArguments: { id: "$[0]" },
4392
+ explicitPathsToArguments: {
4393
+ id: "$[0]",
4394
+ reason: "$[1].reason",
4395
+ resumeAt: "$[1].resumeAt",
4396
+ resumeAtSchedule: "$[1].resumeAtSchedule"
4397
+ },
3808
4398
  singleArgumentUnchanged: false
3809
4399
  },
3810
- ["_id"]
4400
+ ["_id", "options"]
3811
4401
  );
3812
4402
  sideEffects?.onError?.(err);
3813
4403
  throw transformedError;
3814
4404
  }
3815
4405
  }
3816
- async function customerListUpcomingCharges2(_id) {
3817
- const { httpClient, sideEffects } = arguments[1];
3818
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
3819
- const reqOpts = customerListUpcomingCharges(payload);
4406
+ async function customerCancelScheduledPause2(_id, options) {
4407
+ const { httpClient, sideEffects } = arguments[2];
4408
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
4409
+ id: _id,
4410
+ reason: options?.reason
4411
+ });
4412
+ const reqOpts = customerCancelScheduledPause(payload);
3820
4413
  sideEffects?.onSiteCall?.();
3821
4414
  try {
3822
4415
  const result = await httpClient.request(reqOpts);
3823
4416
  sideEffects?.onSuccess?.(result);
3824
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
4417
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4418
+ (0, import_transform_paths2.transformPaths)(result.data, [
4419
+ {
4420
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4421
+ paths: [
4422
+ { path: "subscription.billingSettings.billingAddress.address" },
4423
+ { path: "subscription.shippingAddress.address" }
4424
+ ]
4425
+ }
4426
+ ])
4427
+ );
3825
4428
  } catch (err) {
3826
4429
  const transformedError = (0, import_transform_error.transformError)(
3827
4430
  err,
3828
4431
  {
3829
4432
  spreadPathsToArguments: {},
3830
- explicitPathsToArguments: { id: "$[0]" },
4433
+ explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
3831
4434
  singleArgumentUnchanged: false
3832
4435
  },
3833
- ["_id"]
4436
+ ["_id", "options"]
3834
4437
  );
3835
4438
  sideEffects?.onError?.(err);
3836
4439
  throw transformedError;
3837
4440
  }
3838
4441
  }
3839
- async function customerInitiatePaymentMethodSetup2(_id, options) {
3840
- const { httpClient, sideEffects } = arguments[2];
4442
+ async function customerUpdateBillingDate2(_id, billingDate, options) {
4443
+ const { httpClient, sideEffects } = arguments[3];
3841
4444
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
3842
4445
  id: _id,
3843
- paymentMode: options?.paymentMode,
3844
- paymentSettings: options?.paymentSettings
4446
+ billingDate,
4447
+ proration: options?.proration,
4448
+ reason: options?.reason
3845
4449
  });
3846
- const reqOpts = customerInitiatePaymentMethodSetup(
3847
- payload
3848
- );
4450
+ const reqOpts = customerUpdateBillingDate(payload);
3849
4451
  sideEffects?.onSiteCall?.();
3850
4452
  try {
3851
4453
  const result = await httpClient.request(reqOpts);
3852
4454
  sideEffects?.onSuccess?.(result);
3853
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
4455
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
4456
+ (0, import_transform_paths2.transformPaths)(result.data, [
4457
+ {
4458
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
4459
+ paths: [
4460
+ { path: "subscription.billingSettings.billingAddress.address" },
4461
+ { path: "subscription.shippingAddress.address" }
4462
+ ]
4463
+ }
4464
+ ])
4465
+ );
3854
4466
  } catch (err) {
3855
4467
  const transformedError = (0, import_transform_error.transformError)(
3856
4468
  err,
@@ -3858,12 +4470,13 @@ async function customerInitiatePaymentMethodSetup2(_id, options) {
3858
4470
  spreadPathsToArguments: {},
3859
4471
  explicitPathsToArguments: {
3860
4472
  id: "$[0]",
3861
- paymentMode: "$[1].paymentMode",
3862
- paymentSettings: "$[1].paymentSettings"
4473
+ billingDate: "$[1]",
4474
+ proration: "$[2].proration",
4475
+ reason: "$[2].reason"
3863
4476
  },
3864
4477
  singleArgumentUnchanged: false
3865
4478
  },
3866
- ["_id", "options"]
4479
+ ["_id", "billingDate", "options"]
3867
4480
  );
3868
4481
  sideEffects?.onError?.(err);
3869
4482
  throw transformedError;
@@ -4981,6 +5594,56 @@ function customerInitiatePaymentMethodSetup3(httpClient) {
4981
5594
  { httpClient }
4982
5595
  );
4983
5596
  }
5597
+ function customerSkipCycle3(httpClient) {
5598
+ return (_id, cyclesToSkip, options) => customerSkipCycle2(
5599
+ _id,
5600
+ cyclesToSkip,
5601
+ options,
5602
+ // @ts-ignore
5603
+ { httpClient }
5604
+ );
5605
+ }
5606
+ function customerCancelScheduledSkip3(httpClient) {
5607
+ return (_id, options) => customerCancelScheduledSkip2(
5608
+ _id,
5609
+ options,
5610
+ // @ts-ignore
5611
+ { httpClient }
5612
+ );
5613
+ }
5614
+ function customerPauseSubscription3(httpClient) {
5615
+ return (_id, options) => customerPauseSubscription2(
5616
+ _id,
5617
+ options,
5618
+ // @ts-ignore
5619
+ { httpClient }
5620
+ );
5621
+ }
5622
+ function customerResumeSubscription3(httpClient) {
5623
+ return (_id, options) => customerResumeSubscription2(
5624
+ _id,
5625
+ options,
5626
+ // @ts-ignore
5627
+ { httpClient }
5628
+ );
5629
+ }
5630
+ function customerCancelScheduledPause3(httpClient) {
5631
+ return (_id, options) => customerCancelScheduledPause2(
5632
+ _id,
5633
+ options,
5634
+ // @ts-ignore
5635
+ { httpClient }
5636
+ );
5637
+ }
5638
+ function customerUpdateBillingDate3(httpClient) {
5639
+ return (_id, billingDate, options) => customerUpdateBillingDate2(
5640
+ _id,
5641
+ billingDate,
5642
+ options,
5643
+ // @ts-ignore
5644
+ { httpClient }
5645
+ );
5646
+ }
4984
5647
  function payCycle3(httpClient) {
4985
5648
  return (subscriptionId, options) => payCycle2(
4986
5649
  subscriptionId,
@@ -5782,6 +6445,12 @@ var customerUpdateSubscriptionPaymentMethod4 = /* @__PURE__ */ (0, import_rest_m
5782
6445
  var customerAllowedActions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerAllowedActions3);
5783
6446
  var customerListUpcomingCharges4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerListUpcomingCharges3);
5784
6447
  var customerInitiatePaymentMethodSetup4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerInitiatePaymentMethodSetup3);
6448
+ var customerSkipCycle4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerSkipCycle3);
6449
+ var customerCancelScheduledSkip4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerCancelScheduledSkip3);
6450
+ var customerPauseSubscription4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerPauseSubscription3);
6451
+ var customerResumeSubscription4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerResumeSubscription3);
6452
+ var customerCancelScheduledPause4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerCancelScheduledPause3);
6453
+ var customerUpdateBillingDate4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customerUpdateBillingDate3);
5785
6454
  var payCycle4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(payCycle3);
5786
6455
  var getSubscription4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSubscription3);
5787
6456
  var updateSubscriptionPaymentMethod4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateSubscriptionPaymentMethod3);
@@ -5869,6 +6538,7 @@ var onSubscriptionResumed2 = (0, import_event_definition_modules.createEventModu
5869
6538
  PaymentStatus,
5870
6539
  PaymentStatusEnumPaymentStatus,
5871
6540
  PaymentTestMode,
6541
+ PriceAdjustmentReason,
5872
6542
  RefundReason,
5873
6543
  RequestedFields,
5874
6544
  ResumeAt,
@@ -5887,14 +6557,20 @@ var onSubscriptionResumed2 = (0, import_event_definition_modules.createEventModu
5887
6557
  cancelSubscription,
5888
6558
  countSubscriptions,
5889
6559
  customerAllowedActions,
6560
+ customerCancelScheduledPause,
6561
+ customerCancelScheduledSkip,
5890
6562
  customerCancelSubscription,
5891
6563
  customerExtendSubscription,
5892
6564
  customerGetSubscription,
5893
6565
  customerInitiatePaymentMethodSetup,
5894
6566
  customerListUpcomingCharges,
6567
+ customerPauseSubscription,
5895
6568
  customerQuerySubscriptions,
6569
+ customerResumeSubscription,
6570
+ customerSkipCycle,
5896
6571
  customerTurnOffSubscriptionAutoRenewal,
5897
6572
  customerTurnOnSubscriptionAutoRenewal,
6573
+ customerUpdateBillingDate,
5898
6574
  customerUpdateSubscriptionPaymentMethod,
5899
6575
  extendSubscription,
5900
6576
  getSubscription,