@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
@@ -583,6 +583,348 @@ function customerInitiatePaymentMethodSetup(payload) {
583
583
  }
584
584
  return __customerInitiatePaymentMethodSetup;
585
585
  }
586
+ function customerSkipCycle(payload) {
587
+ function __customerSkipCycle({ host }) {
588
+ const serializedData = transformPaths(payload, [
589
+ {
590
+ transformFn: transformSDKTimestampToRESTTimestamp,
591
+ paths: [
592
+ { path: "pauseAtSchedule.specificDate" },
593
+ { path: "autoResumeAtSchedule.specificDate" }
594
+ ]
595
+ }
596
+ ]);
597
+ const metadata = {
598
+ entityFqdn: "wix.billing.v1.subscription",
599
+ method: "POST",
600
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerSkipCycle",
601
+ packageName: PACKAGE_NAME,
602
+ migrationOptions: {
603
+ optInTransformResponse: true
604
+ },
605
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
606
+ {
607
+ protoPath: "/v1/customer_subscriptions/{id}/skip_cycle",
608
+ data: serializedData,
609
+ host
610
+ }
611
+ ),
612
+ data: serializedData,
613
+ transformResponse: (payload2) => transformPaths(payload2, [
614
+ {
615
+ transformFn: transformRESTTimestampToSDKTimestamp,
616
+ paths: [
617
+ { path: "subscription.createdDate" },
618
+ { path: "subscription.updatedDate" },
619
+ { path: "subscription.startDate" },
620
+ { path: "subscription.endDate" },
621
+ { path: "subscription.billingStatus.nextBillingDate" },
622
+ { path: "subscription.billingStatus.previousBillingDate" },
623
+ {
624
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
625
+ },
626
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
627
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
628
+ {
629
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
630
+ },
631
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
632
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
633
+ { path: "subscription.pauseInfo.startDate" },
634
+ { path: "subscription.pauseInfo.resumeDate" },
635
+ { path: "subscription.cancellationInfo.cancellationDate" },
636
+ {
637
+ path: "subscription.specificDatePendingUpdateData.executionDate"
638
+ }
639
+ ]
640
+ }
641
+ ])
642
+ };
643
+ return metadata;
644
+ }
645
+ return __customerSkipCycle;
646
+ }
647
+ function customerCancelScheduledSkip(payload) {
648
+ function __customerCancelScheduledSkip({ host }) {
649
+ const metadata = {
650
+ entityFqdn: "wix.billing.v1.subscription",
651
+ method: "POST",
652
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelScheduledSkip",
653
+ packageName: PACKAGE_NAME,
654
+ migrationOptions: {
655
+ optInTransformResponse: true
656
+ },
657
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
658
+ {
659
+ protoPath: "/v1/customer_subscriptions/{id}/cancel_scheduled_skip",
660
+ data: payload,
661
+ host
662
+ }
663
+ ),
664
+ data: payload,
665
+ transformResponse: (payload2) => transformPaths(payload2, [
666
+ {
667
+ transformFn: transformRESTTimestampToSDKTimestamp,
668
+ paths: [
669
+ { path: "subscription.createdDate" },
670
+ { path: "subscription.updatedDate" },
671
+ { path: "subscription.startDate" },
672
+ { path: "subscription.endDate" },
673
+ { path: "subscription.billingStatus.nextBillingDate" },
674
+ { path: "subscription.billingStatus.previousBillingDate" },
675
+ {
676
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
677
+ },
678
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
679
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
680
+ {
681
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
682
+ },
683
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
684
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
685
+ { path: "subscription.pauseInfo.startDate" },
686
+ { path: "subscription.pauseInfo.resumeDate" },
687
+ { path: "subscription.cancellationInfo.cancellationDate" },
688
+ {
689
+ path: "subscription.specificDatePendingUpdateData.executionDate"
690
+ }
691
+ ]
692
+ }
693
+ ])
694
+ };
695
+ return metadata;
696
+ }
697
+ return __customerCancelScheduledSkip;
698
+ }
699
+ function customerPauseSubscription(payload) {
700
+ function __customerPauseSubscription({ host }) {
701
+ const serializedData = transformPaths(payload, [
702
+ {
703
+ transformFn: transformSDKTimestampToRESTTimestamp,
704
+ paths: [
705
+ { path: "pauseAtSchedule.specificDate" },
706
+ { path: "autoResumeAtSchedule.specificDate" }
707
+ ]
708
+ }
709
+ ]);
710
+ const metadata = {
711
+ entityFqdn: "wix.billing.v1.subscription",
712
+ method: "POST",
713
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerPauseSubscription",
714
+ packageName: PACKAGE_NAME,
715
+ migrationOptions: {
716
+ optInTransformResponse: true
717
+ },
718
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
719
+ {
720
+ protoPath: "/v1/customer_subscriptions/{id}/pause",
721
+ data: serializedData,
722
+ host
723
+ }
724
+ ),
725
+ data: serializedData,
726
+ transformResponse: (payload2) => transformPaths(payload2, [
727
+ {
728
+ transformFn: transformRESTTimestampToSDKTimestamp,
729
+ paths: [
730
+ { path: "subscription.createdDate" },
731
+ { path: "subscription.updatedDate" },
732
+ { path: "subscription.startDate" },
733
+ { path: "subscription.endDate" },
734
+ { path: "subscription.billingStatus.nextBillingDate" },
735
+ { path: "subscription.billingStatus.previousBillingDate" },
736
+ {
737
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
738
+ },
739
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
740
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
741
+ {
742
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
743
+ },
744
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
745
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
746
+ { path: "subscription.pauseInfo.startDate" },
747
+ { path: "subscription.pauseInfo.resumeDate" },
748
+ { path: "subscription.cancellationInfo.cancellationDate" },
749
+ {
750
+ path: "subscription.specificDatePendingUpdateData.executionDate"
751
+ }
752
+ ]
753
+ }
754
+ ])
755
+ };
756
+ return metadata;
757
+ }
758
+ return __customerPauseSubscription;
759
+ }
760
+ function customerResumeSubscription(payload) {
761
+ function __customerResumeSubscription({ host }) {
762
+ const serializedData = transformPaths(payload, [
763
+ {
764
+ transformFn: transformSDKTimestampToRESTTimestamp,
765
+ paths: [{ path: "resumeAtSchedule.specificDate" }]
766
+ }
767
+ ]);
768
+ const metadata = {
769
+ entityFqdn: "wix.billing.v1.subscription",
770
+ method: "POST",
771
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerResumeSubscription",
772
+ packageName: PACKAGE_NAME,
773
+ migrationOptions: {
774
+ optInTransformResponse: true
775
+ },
776
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
777
+ {
778
+ protoPath: "/v1/customer_subscriptions/{id}/resume",
779
+ data: serializedData,
780
+ host
781
+ }
782
+ ),
783
+ data: serializedData,
784
+ transformResponse: (payload2) => transformPaths(payload2, [
785
+ {
786
+ transformFn: 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 __customerResumeSubscription;
817
+ }
818
+ function customerCancelScheduledPause(payload) {
819
+ function __customerCancelScheduledPause({ host }) {
820
+ const metadata = {
821
+ entityFqdn: "wix.billing.v1.subscription",
822
+ method: "POST",
823
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelScheduledPause",
824
+ packageName: PACKAGE_NAME,
825
+ migrationOptions: {
826
+ optInTransformResponse: true
827
+ },
828
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
829
+ {
830
+ protoPath: "/v1/customer_subscriptions/{id}/cancel_scheduled_pause",
831
+ data: payload,
832
+ host
833
+ }
834
+ ),
835
+ data: payload,
836
+ transformResponse: (payload2) => transformPaths(payload2, [
837
+ {
838
+ transformFn: transformRESTTimestampToSDKTimestamp,
839
+ paths: [
840
+ { path: "subscription.createdDate" },
841
+ { path: "subscription.updatedDate" },
842
+ { path: "subscription.startDate" },
843
+ { path: "subscription.endDate" },
844
+ { path: "subscription.billingStatus.nextBillingDate" },
845
+ { path: "subscription.billingStatus.previousBillingDate" },
846
+ {
847
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
848
+ },
849
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
850
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
851
+ {
852
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
853
+ },
854
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
855
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
856
+ { path: "subscription.pauseInfo.startDate" },
857
+ { path: "subscription.pauseInfo.resumeDate" },
858
+ { path: "subscription.cancellationInfo.cancellationDate" },
859
+ {
860
+ path: "subscription.specificDatePendingUpdateData.executionDate"
861
+ }
862
+ ]
863
+ }
864
+ ])
865
+ };
866
+ return metadata;
867
+ }
868
+ return __customerCancelScheduledPause;
869
+ }
870
+ function customerUpdateBillingDate(payload) {
871
+ function __customerUpdateBillingDate({ host }) {
872
+ const serializedData = transformPaths(payload, [
873
+ {
874
+ transformFn: transformSDKTimestampToRESTTimestamp,
875
+ paths: [{ path: "billingDate" }]
876
+ }
877
+ ]);
878
+ const metadata = {
879
+ entityFqdn: "wix.billing.v1.subscription",
880
+ method: "POST",
881
+ methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerUpdateBillingDate",
882
+ packageName: PACKAGE_NAME,
883
+ migrationOptions: {
884
+ optInTransformResponse: true
885
+ },
886
+ url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
887
+ {
888
+ protoPath: "/v1/customer_subscriptions/{id}/update_billing_date",
889
+ data: serializedData,
890
+ host
891
+ }
892
+ ),
893
+ data: serializedData,
894
+ transformResponse: (payload2) => transformPaths(payload2, [
895
+ {
896
+ transformFn: transformRESTTimestampToSDKTimestamp,
897
+ paths: [
898
+ { path: "subscription.createdDate" },
899
+ { path: "subscription.updatedDate" },
900
+ { path: "subscription.startDate" },
901
+ { path: "subscription.endDate" },
902
+ { path: "subscription.billingStatus.nextBillingDate" },
903
+ { path: "subscription.billingStatus.previousBillingDate" },
904
+ {
905
+ path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
906
+ },
907
+ { path: "subscription.billingStatus.freeTrialData.startDate" },
908
+ { path: "subscription.billingStatus.freeTrialData.endDate" },
909
+ {
910
+ path: "subscription.billingStatus.updateBillingDateData.paidUntil"
911
+ },
912
+ { path: "subscription.billingStatus.gracePeriodData.startDate" },
913
+ { path: "subscription.billingStatus.gracePeriodData.endDate" },
914
+ { path: "subscription.pauseInfo.startDate" },
915
+ { path: "subscription.pauseInfo.resumeDate" },
916
+ { path: "subscription.cancellationInfo.cancellationDate" },
917
+ {
918
+ path: "subscription.specificDatePendingUpdateData.executionDate"
919
+ }
920
+ ]
921
+ }
922
+ ])
923
+ };
924
+ return metadata;
925
+ }
926
+ return __customerUpdateBillingDate;
927
+ }
586
928
  function payCycle(payload) {
587
929
  function __payCycle({ host }) {
588
930
  const metadata = {
@@ -3250,6 +3592,8 @@ var ActionType = /* @__PURE__ */ ((ActionType2) => {
3250
3592
  ActionType2["UPM"] = "UPM";
3251
3593
  ActionType2["UPDATE_BILLING_DATE"] = "UPDATE_BILLING_DATE";
3252
3594
  ActionType2["UPDATE_COLLECTION_METHOD"] = "UPDATE_COLLECTION_METHOD";
3595
+ ActionType2["SKIP_CYCLE"] = "SKIP_CYCLE";
3596
+ ActionType2["CUSTOMER_UPDATE_BILLING_DATE"] = "CUSTOMER_UPDATE_BILLING_DATE";
3253
3597
  return ActionType2;
3254
3598
  })(ActionType || {});
3255
3599
  var ExtendPolicyType = /* @__PURE__ */ ((ExtendPolicyType2) => {
@@ -3317,6 +3661,7 @@ var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
3317
3661
  InvoiceStatus2["ATTEMPT_FAILED"] = "ATTEMPT_FAILED";
3318
3662
  InvoiceStatus2["CANCELED"] = "CANCELED";
3319
3663
  InvoiceStatus2["REFUNDED"] = "REFUNDED";
3664
+ InvoiceStatus2["CHARGEBACKED"] = "CHARGEBACKED";
3320
3665
  return InvoiceStatus2;
3321
3666
  })(InvoiceStatus || {});
3322
3667
  var CollectionMethod = /* @__PURE__ */ ((CollectionMethod2) => {
@@ -3341,8 +3686,19 @@ var PaymentAttemptStatus = /* @__PURE__ */ ((PaymentAttemptStatus2) => {
3341
3686
  PaymentAttemptStatus2["TECHNICAL_FAILURE"] = "TECHNICAL_FAILURE";
3342
3687
  PaymentAttemptStatus2["CANCELED"] = "CANCELED";
3343
3688
  PaymentAttemptStatus2["PENDING"] = "PENDING";
3689
+ PaymentAttemptStatus2["REFUNDED"] = "REFUNDED";
3690
+ PaymentAttemptStatus2["CHARGEBACKED"] = "CHARGEBACKED";
3344
3691
  return PaymentAttemptStatus2;
3345
3692
  })(PaymentAttemptStatus || {});
3693
+ var PriceAdjustmentReason = /* @__PURE__ */ ((PriceAdjustmentReason2) => {
3694
+ PriceAdjustmentReason2["PRICE_ADJUSTMENT_REASON_UNSPECIFIED"] = "PRICE_ADJUSTMENT_REASON_UNSPECIFIED";
3695
+ PriceAdjustmentReason2["BILLING_DATE_CHANGE"] = "BILLING_DATE_CHANGE";
3696
+ PriceAdjustmentReason2["PLAN_CHANGE_PRORATION"] = "PLAN_CHANGE_PRORATION";
3697
+ PriceAdjustmentReason2["CYCLE_CHANGE_PRORATION"] = "CYCLE_CHANGE_PRORATION";
3698
+ PriceAdjustmentReason2["QUANTITY_CHANGE_PRORATION"] = "QUANTITY_CHANGE_PRORATION";
3699
+ PriceAdjustmentReason2["CUSTOM_PRICE_ADJUSTMENT"] = "CUSTOM_PRICE_ADJUSTMENT";
3700
+ return PriceAdjustmentReason2;
3701
+ })(PriceAdjustmentReason || {});
3346
3702
  var RefundReason = /* @__PURE__ */ ((RefundReason2) => {
3347
3703
  RefundReason2["UNKNOWN_REFUND_REASON"] = "UNKNOWN_REFUND_REASON";
3348
3704
  RefundReason2["DUPLICATE_CHARGE"] = "DUPLICATE_CHARGE";
@@ -3757,6 +4113,256 @@ async function customerInitiatePaymentMethodSetup2(_id, options) {
3757
4113
  throw transformedError;
3758
4114
  }
3759
4115
  }
4116
+ async function customerSkipCycle2(_id, cyclesToSkip, options) {
4117
+ const { httpClient, sideEffects } = arguments[3];
4118
+ const payload = renameKeysFromSDKRequestToRESTRequest({
4119
+ id: _id,
4120
+ cyclesToSkip,
4121
+ pauseAtSchedule: options?.pauseAtSchedule,
4122
+ autoResumeAtSchedule: options?.autoResumeAtSchedule,
4123
+ reason: options?.reason
4124
+ });
4125
+ const reqOpts = customerSkipCycle(payload);
4126
+ sideEffects?.onSiteCall?.();
4127
+ try {
4128
+ const result = await httpClient.request(reqOpts);
4129
+ sideEffects?.onSuccess?.(result);
4130
+ return renameKeysFromRESTResponseToSDKResponse(
4131
+ transformPaths2(result.data, [
4132
+ {
4133
+ transformFn: transformRESTAddressToSDKAddress,
4134
+ paths: [
4135
+ { path: "subscription.billingSettings.billingAddress.address" },
4136
+ { path: "subscription.shippingAddress.address" }
4137
+ ]
4138
+ }
4139
+ ])
4140
+ );
4141
+ } catch (err) {
4142
+ const transformedError = sdkTransformError(
4143
+ err,
4144
+ {
4145
+ spreadPathsToArguments: {},
4146
+ explicitPathsToArguments: {
4147
+ id: "$[0]",
4148
+ cyclesToSkip: "$[1]",
4149
+ pauseAtSchedule: "$[2].pauseAtSchedule",
4150
+ autoResumeAtSchedule: "$[2].autoResumeAtSchedule",
4151
+ reason: "$[2].reason"
4152
+ },
4153
+ singleArgumentUnchanged: false
4154
+ },
4155
+ ["_id", "cyclesToSkip", "options"]
4156
+ );
4157
+ sideEffects?.onError?.(err);
4158
+ throw transformedError;
4159
+ }
4160
+ }
4161
+ async function customerCancelScheduledSkip2(_id, options) {
4162
+ const { httpClient, sideEffects } = arguments[2];
4163
+ const payload = renameKeysFromSDKRequestToRESTRequest({
4164
+ id: _id,
4165
+ reason: options?.reason
4166
+ });
4167
+ const reqOpts = customerCancelScheduledSkip(payload);
4168
+ sideEffects?.onSiteCall?.();
4169
+ try {
4170
+ const result = await httpClient.request(reqOpts);
4171
+ sideEffects?.onSuccess?.(result);
4172
+ return renameKeysFromRESTResponseToSDKResponse(
4173
+ transformPaths2(result.data, [
4174
+ {
4175
+ transformFn: transformRESTAddressToSDKAddress,
4176
+ paths: [
4177
+ { path: "subscription.billingSettings.billingAddress.address" },
4178
+ { path: "subscription.shippingAddress.address" }
4179
+ ]
4180
+ }
4181
+ ])
4182
+ );
4183
+ } catch (err) {
4184
+ const transformedError = sdkTransformError(
4185
+ err,
4186
+ {
4187
+ spreadPathsToArguments: {},
4188
+ explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
4189
+ singleArgumentUnchanged: false
4190
+ },
4191
+ ["_id", "options"]
4192
+ );
4193
+ sideEffects?.onError?.(err);
4194
+ throw transformedError;
4195
+ }
4196
+ }
4197
+ async function customerPauseSubscription2(_id, options) {
4198
+ const { httpClient, sideEffects } = arguments[2];
4199
+ const payload = renameKeysFromSDKRequestToRESTRequest({
4200
+ id: _id,
4201
+ pausePolicy: options?.pausePolicy,
4202
+ reason: options?.reason,
4203
+ pauseAt: options?.pauseAt,
4204
+ pauseAtSchedule: options?.pauseAtSchedule,
4205
+ autoResumeAtSchedule: options?.autoResumeAtSchedule
4206
+ });
4207
+ const reqOpts = customerPauseSubscription(payload);
4208
+ sideEffects?.onSiteCall?.();
4209
+ try {
4210
+ const result = await httpClient.request(reqOpts);
4211
+ sideEffects?.onSuccess?.(result);
4212
+ return renameKeysFromRESTResponseToSDKResponse(
4213
+ transformPaths2(result.data, [
4214
+ {
4215
+ transformFn: transformRESTAddressToSDKAddress,
4216
+ paths: [
4217
+ { path: "subscription.billingSettings.billingAddress.address" },
4218
+ { path: "subscription.shippingAddress.address" }
4219
+ ]
4220
+ }
4221
+ ])
4222
+ );
4223
+ } catch (err) {
4224
+ const transformedError = sdkTransformError(
4225
+ err,
4226
+ {
4227
+ spreadPathsToArguments: {},
4228
+ explicitPathsToArguments: {
4229
+ id: "$[0]",
4230
+ pausePolicy: "$[1].pausePolicy",
4231
+ reason: "$[1].reason",
4232
+ pauseAt: "$[1].pauseAt",
4233
+ pauseAtSchedule: "$[1].pauseAtSchedule",
4234
+ autoResumeAtSchedule: "$[1].autoResumeAtSchedule"
4235
+ },
4236
+ singleArgumentUnchanged: false
4237
+ },
4238
+ ["_id", "options"]
4239
+ );
4240
+ sideEffects?.onError?.(err);
4241
+ throw transformedError;
4242
+ }
4243
+ }
4244
+ async function customerResumeSubscription2(_id, options) {
4245
+ const { httpClient, sideEffects } = arguments[2];
4246
+ const payload = renameKeysFromSDKRequestToRESTRequest({
4247
+ id: _id,
4248
+ reason: options?.reason,
4249
+ resumeAt: options?.resumeAt,
4250
+ resumeAtSchedule: options?.resumeAtSchedule
4251
+ });
4252
+ const reqOpts = customerResumeSubscription(payload);
4253
+ sideEffects?.onSiteCall?.();
4254
+ try {
4255
+ const result = await httpClient.request(reqOpts);
4256
+ sideEffects?.onSuccess?.(result);
4257
+ return renameKeysFromRESTResponseToSDKResponse(
4258
+ transformPaths2(result.data, [
4259
+ {
4260
+ transformFn: transformRESTAddressToSDKAddress,
4261
+ paths: [
4262
+ { path: "subscription.billingSettings.billingAddress.address" },
4263
+ { path: "subscription.shippingAddress.address" }
4264
+ ]
4265
+ }
4266
+ ])
4267
+ );
4268
+ } catch (err) {
4269
+ const transformedError = sdkTransformError(
4270
+ err,
4271
+ {
4272
+ spreadPathsToArguments: {},
4273
+ explicitPathsToArguments: {
4274
+ id: "$[0]",
4275
+ reason: "$[1].reason",
4276
+ resumeAt: "$[1].resumeAt",
4277
+ resumeAtSchedule: "$[1].resumeAtSchedule"
4278
+ },
4279
+ singleArgumentUnchanged: false
4280
+ },
4281
+ ["_id", "options"]
4282
+ );
4283
+ sideEffects?.onError?.(err);
4284
+ throw transformedError;
4285
+ }
4286
+ }
4287
+ async function customerCancelScheduledPause2(_id, options) {
4288
+ const { httpClient, sideEffects } = arguments[2];
4289
+ const payload = renameKeysFromSDKRequestToRESTRequest({
4290
+ id: _id,
4291
+ reason: options?.reason
4292
+ });
4293
+ const reqOpts = customerCancelScheduledPause(payload);
4294
+ sideEffects?.onSiteCall?.();
4295
+ try {
4296
+ const result = await httpClient.request(reqOpts);
4297
+ sideEffects?.onSuccess?.(result);
4298
+ return renameKeysFromRESTResponseToSDKResponse(
4299
+ transformPaths2(result.data, [
4300
+ {
4301
+ transformFn: transformRESTAddressToSDKAddress,
4302
+ paths: [
4303
+ { path: "subscription.billingSettings.billingAddress.address" },
4304
+ { path: "subscription.shippingAddress.address" }
4305
+ ]
4306
+ }
4307
+ ])
4308
+ );
4309
+ } catch (err) {
4310
+ const transformedError = sdkTransformError(
4311
+ err,
4312
+ {
4313
+ spreadPathsToArguments: {},
4314
+ explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
4315
+ singleArgumentUnchanged: false
4316
+ },
4317
+ ["_id", "options"]
4318
+ );
4319
+ sideEffects?.onError?.(err);
4320
+ throw transformedError;
4321
+ }
4322
+ }
4323
+ async function customerUpdateBillingDate2(_id, billingDate, options) {
4324
+ const { httpClient, sideEffects } = arguments[3];
4325
+ const payload = renameKeysFromSDKRequestToRESTRequest({
4326
+ id: _id,
4327
+ billingDate,
4328
+ proration: options?.proration,
4329
+ reason: options?.reason
4330
+ });
4331
+ const reqOpts = customerUpdateBillingDate(payload);
4332
+ sideEffects?.onSiteCall?.();
4333
+ try {
4334
+ const result = await httpClient.request(reqOpts);
4335
+ sideEffects?.onSuccess?.(result);
4336
+ return renameKeysFromRESTResponseToSDKResponse(
4337
+ transformPaths2(result.data, [
4338
+ {
4339
+ transformFn: transformRESTAddressToSDKAddress,
4340
+ paths: [
4341
+ { path: "subscription.billingSettings.billingAddress.address" },
4342
+ { path: "subscription.shippingAddress.address" }
4343
+ ]
4344
+ }
4345
+ ])
4346
+ );
4347
+ } catch (err) {
4348
+ const transformedError = sdkTransformError(
4349
+ err,
4350
+ {
4351
+ spreadPathsToArguments: {},
4352
+ explicitPathsToArguments: {
4353
+ id: "$[0]",
4354
+ billingDate: "$[1]",
4355
+ proration: "$[2].proration",
4356
+ reason: "$[2].reason"
4357
+ },
4358
+ singleArgumentUnchanged: false
4359
+ },
4360
+ ["_id", "billingDate", "options"]
4361
+ );
4362
+ sideEffects?.onError?.(err);
4363
+ throw transformedError;
4364
+ }
4365
+ }
3760
4366
  async function payCycle2(subscriptionId, options) {
3761
4367
  const { httpClient, sideEffects } = arguments[2];
3762
4368
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -4815,6 +5421,7 @@ export {
4815
5421
  PaymentStatus,
4816
5422
  PaymentStatusEnumPaymentStatus,
4817
5423
  PaymentTestMode,
5424
+ PriceAdjustmentReason,
4818
5425
  RefundReason,
4819
5426
  RequestedFields,
4820
5427
  ResumeAt,
@@ -4833,14 +5440,20 @@ export {
4833
5440
  cancelSubscription2 as cancelSubscription,
4834
5441
  countSubscriptions2 as countSubscriptions,
4835
5442
  customerAllowedActions2 as customerAllowedActions,
5443
+ customerCancelScheduledPause2 as customerCancelScheduledPause,
5444
+ customerCancelScheduledSkip2 as customerCancelScheduledSkip,
4836
5445
  customerCancelSubscription2 as customerCancelSubscription,
4837
5446
  customerExtendSubscription2 as customerExtendSubscription,
4838
5447
  customerGetSubscription2 as customerGetSubscription,
4839
5448
  customerInitiatePaymentMethodSetup2 as customerInitiatePaymentMethodSetup,
4840
5449
  customerListUpcomingCharges2 as customerListUpcomingCharges,
5450
+ customerPauseSubscription2 as customerPauseSubscription,
4841
5451
  customerQuerySubscriptions2 as customerQuerySubscriptions,
5452
+ customerResumeSubscription2 as customerResumeSubscription,
5453
+ customerSkipCycle2 as customerSkipCycle,
4842
5454
  customerTurnOffSubscriptionAutoRenewal2 as customerTurnOffSubscriptionAutoRenewal,
4843
5455
  customerTurnOnSubscriptionAutoRenewal2 as customerTurnOnSubscriptionAutoRenewal,
5456
+ customerUpdateBillingDate2 as customerUpdateBillingDate,
4844
5457
  customerUpdateSubscriptionPaymentMethod2 as customerUpdateSubscriptionPaymentMethod,
4845
5458
  extendSubscription2 as extendSubscription,
4846
5459
  getSubscription2 as getSubscription,