@wix/auto_sdk_subscription_subscriptions 1.0.41 → 1.0.43
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.
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/index.js +795 -91
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +690 -51
- package/build/cjs/index.typings.js +648 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +666 -51
- package/build/cjs/meta.js +506 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/index.mjs +785 -91
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +690 -51
- package/build/es/index.typings.mjs +638 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +666 -51
- package/build/es/meta.mjs +496 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +90 -4
- package/build/internal/cjs/index.js +795 -91
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +766 -51
- package/build/internal/cjs/index.typings.js +648 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +666 -51
- package/build/internal/cjs/meta.js +506 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +90 -4
- package/build/internal/es/index.mjs +785 -91
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +766 -51
- package/build/internal/es/index.typings.mjs +638 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +666 -51
- package/build/internal/es/meta.mjs +496 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -590,6 +590,348 @@ function customerInitiatePaymentMethodSetup(payload) {
|
|
|
590
590
|
}
|
|
591
591
|
return __customerInitiatePaymentMethodSetup;
|
|
592
592
|
}
|
|
593
|
+
function customerSkipCycle(payload) {
|
|
594
|
+
function __customerSkipCycle({ host }) {
|
|
595
|
+
const serializedData = transformPaths(payload, [
|
|
596
|
+
{
|
|
597
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
598
|
+
paths: [
|
|
599
|
+
{ path: "pauseAtSchedule.specificDate" },
|
|
600
|
+
{ path: "autoResumeAtSchedule.specificDate" }
|
|
601
|
+
]
|
|
602
|
+
}
|
|
603
|
+
]);
|
|
604
|
+
const metadata = {
|
|
605
|
+
entityFqdn: "wix.billing.v1.subscription",
|
|
606
|
+
method: "POST",
|
|
607
|
+
methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerSkipCycle",
|
|
608
|
+
packageName: PACKAGE_NAME,
|
|
609
|
+
migrationOptions: {
|
|
610
|
+
optInTransformResponse: true
|
|
611
|
+
},
|
|
612
|
+
url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
|
|
613
|
+
{
|
|
614
|
+
protoPath: "/v1/customer_subscriptions/{id}/skip_cycle",
|
|
615
|
+
data: serializedData,
|
|
616
|
+
host
|
|
617
|
+
}
|
|
618
|
+
),
|
|
619
|
+
data: serializedData,
|
|
620
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
621
|
+
{
|
|
622
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
623
|
+
paths: [
|
|
624
|
+
{ path: "subscription.createdDate" },
|
|
625
|
+
{ path: "subscription.updatedDate" },
|
|
626
|
+
{ path: "subscription.startDate" },
|
|
627
|
+
{ path: "subscription.endDate" },
|
|
628
|
+
{ path: "subscription.billingStatus.nextBillingDate" },
|
|
629
|
+
{ path: "subscription.billingStatus.previousBillingDate" },
|
|
630
|
+
{
|
|
631
|
+
path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
|
|
632
|
+
},
|
|
633
|
+
{ path: "subscription.billingStatus.freeTrialData.startDate" },
|
|
634
|
+
{ path: "subscription.billingStatus.freeTrialData.endDate" },
|
|
635
|
+
{
|
|
636
|
+
path: "subscription.billingStatus.updateBillingDateData.paidUntil"
|
|
637
|
+
},
|
|
638
|
+
{ path: "subscription.billingStatus.gracePeriodData.startDate" },
|
|
639
|
+
{ path: "subscription.billingStatus.gracePeriodData.endDate" },
|
|
640
|
+
{ path: "subscription.pauseInfo.startDate" },
|
|
641
|
+
{ path: "subscription.pauseInfo.resumeDate" },
|
|
642
|
+
{ path: "subscription.cancellationInfo.cancellationDate" },
|
|
643
|
+
{
|
|
644
|
+
path: "subscription.specificDatePendingUpdateData.executionDate"
|
|
645
|
+
}
|
|
646
|
+
]
|
|
647
|
+
}
|
|
648
|
+
])
|
|
649
|
+
};
|
|
650
|
+
return metadata;
|
|
651
|
+
}
|
|
652
|
+
return __customerSkipCycle;
|
|
653
|
+
}
|
|
654
|
+
function customerCancelScheduledSkip(payload) {
|
|
655
|
+
function __customerCancelScheduledSkip({ host }) {
|
|
656
|
+
const metadata = {
|
|
657
|
+
entityFqdn: "wix.billing.v1.subscription",
|
|
658
|
+
method: "POST",
|
|
659
|
+
methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelScheduledSkip",
|
|
660
|
+
packageName: PACKAGE_NAME,
|
|
661
|
+
migrationOptions: {
|
|
662
|
+
optInTransformResponse: true
|
|
663
|
+
},
|
|
664
|
+
url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
|
|
665
|
+
{
|
|
666
|
+
protoPath: "/v1/customer_subscriptions/{id}/cancel_scheduled_skip",
|
|
667
|
+
data: payload,
|
|
668
|
+
host
|
|
669
|
+
}
|
|
670
|
+
),
|
|
671
|
+
data: payload,
|
|
672
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
673
|
+
{
|
|
674
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
675
|
+
paths: [
|
|
676
|
+
{ path: "subscription.createdDate" },
|
|
677
|
+
{ path: "subscription.updatedDate" },
|
|
678
|
+
{ path: "subscription.startDate" },
|
|
679
|
+
{ path: "subscription.endDate" },
|
|
680
|
+
{ path: "subscription.billingStatus.nextBillingDate" },
|
|
681
|
+
{ path: "subscription.billingStatus.previousBillingDate" },
|
|
682
|
+
{
|
|
683
|
+
path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
|
|
684
|
+
},
|
|
685
|
+
{ path: "subscription.billingStatus.freeTrialData.startDate" },
|
|
686
|
+
{ path: "subscription.billingStatus.freeTrialData.endDate" },
|
|
687
|
+
{
|
|
688
|
+
path: "subscription.billingStatus.updateBillingDateData.paidUntil"
|
|
689
|
+
},
|
|
690
|
+
{ path: "subscription.billingStatus.gracePeriodData.startDate" },
|
|
691
|
+
{ path: "subscription.billingStatus.gracePeriodData.endDate" },
|
|
692
|
+
{ path: "subscription.pauseInfo.startDate" },
|
|
693
|
+
{ path: "subscription.pauseInfo.resumeDate" },
|
|
694
|
+
{ path: "subscription.cancellationInfo.cancellationDate" },
|
|
695
|
+
{
|
|
696
|
+
path: "subscription.specificDatePendingUpdateData.executionDate"
|
|
697
|
+
}
|
|
698
|
+
]
|
|
699
|
+
}
|
|
700
|
+
])
|
|
701
|
+
};
|
|
702
|
+
return metadata;
|
|
703
|
+
}
|
|
704
|
+
return __customerCancelScheduledSkip;
|
|
705
|
+
}
|
|
706
|
+
function customerPauseSubscription(payload) {
|
|
707
|
+
function __customerPauseSubscription({ host }) {
|
|
708
|
+
const serializedData = transformPaths(payload, [
|
|
709
|
+
{
|
|
710
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
711
|
+
paths: [
|
|
712
|
+
{ path: "pauseAtSchedule.specificDate" },
|
|
713
|
+
{ path: "autoResumeAtSchedule.specificDate" }
|
|
714
|
+
]
|
|
715
|
+
}
|
|
716
|
+
]);
|
|
717
|
+
const metadata = {
|
|
718
|
+
entityFqdn: "wix.billing.v1.subscription",
|
|
719
|
+
method: "POST",
|
|
720
|
+
methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerPauseSubscription",
|
|
721
|
+
packageName: PACKAGE_NAME,
|
|
722
|
+
migrationOptions: {
|
|
723
|
+
optInTransformResponse: true
|
|
724
|
+
},
|
|
725
|
+
url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
|
|
726
|
+
{
|
|
727
|
+
protoPath: "/v1/customer_subscriptions/{id}/pause",
|
|
728
|
+
data: serializedData,
|
|
729
|
+
host
|
|
730
|
+
}
|
|
731
|
+
),
|
|
732
|
+
data: serializedData,
|
|
733
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
734
|
+
{
|
|
735
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
736
|
+
paths: [
|
|
737
|
+
{ path: "subscription.createdDate" },
|
|
738
|
+
{ path: "subscription.updatedDate" },
|
|
739
|
+
{ path: "subscription.startDate" },
|
|
740
|
+
{ path: "subscription.endDate" },
|
|
741
|
+
{ path: "subscription.billingStatus.nextBillingDate" },
|
|
742
|
+
{ path: "subscription.billingStatus.previousBillingDate" },
|
|
743
|
+
{
|
|
744
|
+
path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
|
|
745
|
+
},
|
|
746
|
+
{ path: "subscription.billingStatus.freeTrialData.startDate" },
|
|
747
|
+
{ path: "subscription.billingStatus.freeTrialData.endDate" },
|
|
748
|
+
{
|
|
749
|
+
path: "subscription.billingStatus.updateBillingDateData.paidUntil"
|
|
750
|
+
},
|
|
751
|
+
{ path: "subscription.billingStatus.gracePeriodData.startDate" },
|
|
752
|
+
{ path: "subscription.billingStatus.gracePeriodData.endDate" },
|
|
753
|
+
{ path: "subscription.pauseInfo.startDate" },
|
|
754
|
+
{ path: "subscription.pauseInfo.resumeDate" },
|
|
755
|
+
{ path: "subscription.cancellationInfo.cancellationDate" },
|
|
756
|
+
{
|
|
757
|
+
path: "subscription.specificDatePendingUpdateData.executionDate"
|
|
758
|
+
}
|
|
759
|
+
]
|
|
760
|
+
}
|
|
761
|
+
])
|
|
762
|
+
};
|
|
763
|
+
return metadata;
|
|
764
|
+
}
|
|
765
|
+
return __customerPauseSubscription;
|
|
766
|
+
}
|
|
767
|
+
function customerResumeSubscription(payload) {
|
|
768
|
+
function __customerResumeSubscription({ host }) {
|
|
769
|
+
const serializedData = transformPaths(payload, [
|
|
770
|
+
{
|
|
771
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
772
|
+
paths: [{ path: "resumeAtSchedule.specificDate" }]
|
|
773
|
+
}
|
|
774
|
+
]);
|
|
775
|
+
const metadata = {
|
|
776
|
+
entityFqdn: "wix.billing.v1.subscription",
|
|
777
|
+
method: "POST",
|
|
778
|
+
methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerResumeSubscription",
|
|
779
|
+
packageName: PACKAGE_NAME,
|
|
780
|
+
migrationOptions: {
|
|
781
|
+
optInTransformResponse: true
|
|
782
|
+
},
|
|
783
|
+
url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
|
|
784
|
+
{
|
|
785
|
+
protoPath: "/v1/customer_subscriptions/{id}/resume",
|
|
786
|
+
data: serializedData,
|
|
787
|
+
host
|
|
788
|
+
}
|
|
789
|
+
),
|
|
790
|
+
data: serializedData,
|
|
791
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
792
|
+
{
|
|
793
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
794
|
+
paths: [
|
|
795
|
+
{ path: "subscription.createdDate" },
|
|
796
|
+
{ path: "subscription.updatedDate" },
|
|
797
|
+
{ path: "subscription.startDate" },
|
|
798
|
+
{ path: "subscription.endDate" },
|
|
799
|
+
{ path: "subscription.billingStatus.nextBillingDate" },
|
|
800
|
+
{ path: "subscription.billingStatus.previousBillingDate" },
|
|
801
|
+
{
|
|
802
|
+
path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
|
|
803
|
+
},
|
|
804
|
+
{ path: "subscription.billingStatus.freeTrialData.startDate" },
|
|
805
|
+
{ path: "subscription.billingStatus.freeTrialData.endDate" },
|
|
806
|
+
{
|
|
807
|
+
path: "subscription.billingStatus.updateBillingDateData.paidUntil"
|
|
808
|
+
},
|
|
809
|
+
{ path: "subscription.billingStatus.gracePeriodData.startDate" },
|
|
810
|
+
{ path: "subscription.billingStatus.gracePeriodData.endDate" },
|
|
811
|
+
{ path: "subscription.pauseInfo.startDate" },
|
|
812
|
+
{ path: "subscription.pauseInfo.resumeDate" },
|
|
813
|
+
{ path: "subscription.cancellationInfo.cancellationDate" },
|
|
814
|
+
{
|
|
815
|
+
path: "subscription.specificDatePendingUpdateData.executionDate"
|
|
816
|
+
}
|
|
817
|
+
]
|
|
818
|
+
}
|
|
819
|
+
])
|
|
820
|
+
};
|
|
821
|
+
return metadata;
|
|
822
|
+
}
|
|
823
|
+
return __customerResumeSubscription;
|
|
824
|
+
}
|
|
825
|
+
function customerCancelScheduledPause(payload) {
|
|
826
|
+
function __customerCancelScheduledPause({ host }) {
|
|
827
|
+
const metadata = {
|
|
828
|
+
entityFqdn: "wix.billing.v1.subscription",
|
|
829
|
+
method: "POST",
|
|
830
|
+
methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerCancelScheduledPause",
|
|
831
|
+
packageName: PACKAGE_NAME,
|
|
832
|
+
migrationOptions: {
|
|
833
|
+
optInTransformResponse: true
|
|
834
|
+
},
|
|
835
|
+
url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
|
|
836
|
+
{
|
|
837
|
+
protoPath: "/v1/customer_subscriptions/{id}/cancel_scheduled_pause",
|
|
838
|
+
data: payload,
|
|
839
|
+
host
|
|
840
|
+
}
|
|
841
|
+
),
|
|
842
|
+
data: payload,
|
|
843
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
844
|
+
{
|
|
845
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
846
|
+
paths: [
|
|
847
|
+
{ path: "subscription.createdDate" },
|
|
848
|
+
{ path: "subscription.updatedDate" },
|
|
849
|
+
{ path: "subscription.startDate" },
|
|
850
|
+
{ path: "subscription.endDate" },
|
|
851
|
+
{ path: "subscription.billingStatus.nextBillingDate" },
|
|
852
|
+
{ path: "subscription.billingStatus.previousBillingDate" },
|
|
853
|
+
{
|
|
854
|
+
path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
|
|
855
|
+
},
|
|
856
|
+
{ path: "subscription.billingStatus.freeTrialData.startDate" },
|
|
857
|
+
{ path: "subscription.billingStatus.freeTrialData.endDate" },
|
|
858
|
+
{
|
|
859
|
+
path: "subscription.billingStatus.updateBillingDateData.paidUntil"
|
|
860
|
+
},
|
|
861
|
+
{ path: "subscription.billingStatus.gracePeriodData.startDate" },
|
|
862
|
+
{ path: "subscription.billingStatus.gracePeriodData.endDate" },
|
|
863
|
+
{ path: "subscription.pauseInfo.startDate" },
|
|
864
|
+
{ path: "subscription.pauseInfo.resumeDate" },
|
|
865
|
+
{ path: "subscription.cancellationInfo.cancellationDate" },
|
|
866
|
+
{
|
|
867
|
+
path: "subscription.specificDatePendingUpdateData.executionDate"
|
|
868
|
+
}
|
|
869
|
+
]
|
|
870
|
+
}
|
|
871
|
+
])
|
|
872
|
+
};
|
|
873
|
+
return metadata;
|
|
874
|
+
}
|
|
875
|
+
return __customerCancelScheduledPause;
|
|
876
|
+
}
|
|
877
|
+
function customerUpdateBillingDate(payload) {
|
|
878
|
+
function __customerUpdateBillingDate({ host }) {
|
|
879
|
+
const serializedData = transformPaths(payload, [
|
|
880
|
+
{
|
|
881
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
882
|
+
paths: [{ path: "billingDate" }]
|
|
883
|
+
}
|
|
884
|
+
]);
|
|
885
|
+
const metadata = {
|
|
886
|
+
entityFqdn: "wix.billing.v1.subscription",
|
|
887
|
+
method: "POST",
|
|
888
|
+
methodFqn: "com.wixpress.billing.subscriptions.api.v1.CustomerSubscriptionsService.CustomerUpdateBillingDate",
|
|
889
|
+
packageName: PACKAGE_NAME,
|
|
890
|
+
migrationOptions: {
|
|
891
|
+
optInTransformResponse: true
|
|
892
|
+
},
|
|
893
|
+
url: resolveComWixpressBillingSubscriptionsApiV1CustomerSubscriptionsServiceUrl(
|
|
894
|
+
{
|
|
895
|
+
protoPath: "/v1/customer_subscriptions/{id}/update_billing_date",
|
|
896
|
+
data: serializedData,
|
|
897
|
+
host
|
|
898
|
+
}
|
|
899
|
+
),
|
|
900
|
+
data: serializedData,
|
|
901
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
902
|
+
{
|
|
903
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
904
|
+
paths: [
|
|
905
|
+
{ path: "subscription.createdDate" },
|
|
906
|
+
{ path: "subscription.updatedDate" },
|
|
907
|
+
{ path: "subscription.startDate" },
|
|
908
|
+
{ path: "subscription.endDate" },
|
|
909
|
+
{ path: "subscription.billingStatus.nextBillingDate" },
|
|
910
|
+
{ path: "subscription.billingStatus.previousBillingDate" },
|
|
911
|
+
{
|
|
912
|
+
path: "subscription.billingStatus.latestPaymentData.initialFailedPaymentDate"
|
|
913
|
+
},
|
|
914
|
+
{ path: "subscription.billingStatus.freeTrialData.startDate" },
|
|
915
|
+
{ path: "subscription.billingStatus.freeTrialData.endDate" },
|
|
916
|
+
{
|
|
917
|
+
path: "subscription.billingStatus.updateBillingDateData.paidUntil"
|
|
918
|
+
},
|
|
919
|
+
{ path: "subscription.billingStatus.gracePeriodData.startDate" },
|
|
920
|
+
{ path: "subscription.billingStatus.gracePeriodData.endDate" },
|
|
921
|
+
{ path: "subscription.pauseInfo.startDate" },
|
|
922
|
+
{ path: "subscription.pauseInfo.resumeDate" },
|
|
923
|
+
{ path: "subscription.cancellationInfo.cancellationDate" },
|
|
924
|
+
{
|
|
925
|
+
path: "subscription.specificDatePendingUpdateData.executionDate"
|
|
926
|
+
}
|
|
927
|
+
]
|
|
928
|
+
}
|
|
929
|
+
])
|
|
930
|
+
};
|
|
931
|
+
return metadata;
|
|
932
|
+
}
|
|
933
|
+
return __customerUpdateBillingDate;
|
|
934
|
+
}
|
|
593
935
|
function payCycle(payload) {
|
|
594
936
|
function __payCycle({ host }) {
|
|
595
937
|
const metadata = {
|
|
@@ -3257,6 +3599,8 @@ var ActionType = /* @__PURE__ */ ((ActionType2) => {
|
|
|
3257
3599
|
ActionType2["UPM"] = "UPM";
|
|
3258
3600
|
ActionType2["UPDATE_BILLING_DATE"] = "UPDATE_BILLING_DATE";
|
|
3259
3601
|
ActionType2["UPDATE_COLLECTION_METHOD"] = "UPDATE_COLLECTION_METHOD";
|
|
3602
|
+
ActionType2["SKIP_CYCLE"] = "SKIP_CYCLE";
|
|
3603
|
+
ActionType2["CUSTOMER_UPDATE_BILLING_DATE"] = "CUSTOMER_UPDATE_BILLING_DATE";
|
|
3260
3604
|
return ActionType2;
|
|
3261
3605
|
})(ActionType || {});
|
|
3262
3606
|
var ExtendPolicyType = /* @__PURE__ */ ((ExtendPolicyType2) => {
|
|
@@ -3324,6 +3668,7 @@ var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
|
|
|
3324
3668
|
InvoiceStatus2["ATTEMPT_FAILED"] = "ATTEMPT_FAILED";
|
|
3325
3669
|
InvoiceStatus2["CANCELED"] = "CANCELED";
|
|
3326
3670
|
InvoiceStatus2["REFUNDED"] = "REFUNDED";
|
|
3671
|
+
InvoiceStatus2["CHARGEBACKED"] = "CHARGEBACKED";
|
|
3327
3672
|
return InvoiceStatus2;
|
|
3328
3673
|
})(InvoiceStatus || {});
|
|
3329
3674
|
var CollectionMethod = /* @__PURE__ */ ((CollectionMethod2) => {
|
|
@@ -3348,8 +3693,19 @@ var PaymentAttemptStatus = /* @__PURE__ */ ((PaymentAttemptStatus2) => {
|
|
|
3348
3693
|
PaymentAttemptStatus2["TECHNICAL_FAILURE"] = "TECHNICAL_FAILURE";
|
|
3349
3694
|
PaymentAttemptStatus2["CANCELED"] = "CANCELED";
|
|
3350
3695
|
PaymentAttemptStatus2["PENDING"] = "PENDING";
|
|
3696
|
+
PaymentAttemptStatus2["REFUNDED"] = "REFUNDED";
|
|
3697
|
+
PaymentAttemptStatus2["CHARGEBACKED"] = "CHARGEBACKED";
|
|
3351
3698
|
return PaymentAttemptStatus2;
|
|
3352
3699
|
})(PaymentAttemptStatus || {});
|
|
3700
|
+
var PriceAdjustmentReason = /* @__PURE__ */ ((PriceAdjustmentReason2) => {
|
|
3701
|
+
PriceAdjustmentReason2["PRICE_ADJUSTMENT_REASON_UNSPECIFIED"] = "PRICE_ADJUSTMENT_REASON_UNSPECIFIED";
|
|
3702
|
+
PriceAdjustmentReason2["BILLING_DATE_CHANGE"] = "BILLING_DATE_CHANGE";
|
|
3703
|
+
PriceAdjustmentReason2["PLAN_CHANGE_PRORATION"] = "PLAN_CHANGE_PRORATION";
|
|
3704
|
+
PriceAdjustmentReason2["CYCLE_CHANGE_PRORATION"] = "CYCLE_CHANGE_PRORATION";
|
|
3705
|
+
PriceAdjustmentReason2["QUANTITY_CHANGE_PRORATION"] = "QUANTITY_CHANGE_PRORATION";
|
|
3706
|
+
PriceAdjustmentReason2["CUSTOM_PRICE_ADJUSTMENT"] = "CUSTOM_PRICE_ADJUSTMENT";
|
|
3707
|
+
return PriceAdjustmentReason2;
|
|
3708
|
+
})(PriceAdjustmentReason || {});
|
|
3353
3709
|
var RefundReason = /* @__PURE__ */ ((RefundReason2) => {
|
|
3354
3710
|
RefundReason2["UNKNOWN_REFUND_REASON"] = "UNKNOWN_REFUND_REASON";
|
|
3355
3711
|
RefundReason2["DUPLICATE_CHARGE"] = "DUPLICATE_CHARGE";
|
|
@@ -3359,6 +3715,28 @@ var RefundReason = /* @__PURE__ */ ((RefundReason2) => {
|
|
|
3359
3715
|
RefundReason2["OTHER"] = "OTHER";
|
|
3360
3716
|
return RefundReason2;
|
|
3361
3717
|
})(RefundReason || {});
|
|
3718
|
+
var ChangeEffectiveTime = /* @__PURE__ */ ((ChangeEffectiveTime2) => {
|
|
3719
|
+
ChangeEffectiveTime2["UNKNOWN"] = "UNKNOWN";
|
|
3720
|
+
ChangeEffectiveTime2["IMMEDIATELY"] = "IMMEDIATELY";
|
|
3721
|
+
ChangeEffectiveTime2["AT_NEXT_RENEWAL"] = "AT_NEXT_RENEWAL";
|
|
3722
|
+
return ChangeEffectiveTime2;
|
|
3723
|
+
})(ChangeEffectiveTime || {});
|
|
3724
|
+
var ProrationBehavior = /* @__PURE__ */ ((ProrationBehavior2) => {
|
|
3725
|
+
ProrationBehavior2["UNKNOWN"] = "UNKNOWN";
|
|
3726
|
+
ProrationBehavior2["PRORATE_AND_CHARGE"] = "PRORATE_AND_CHARGE";
|
|
3727
|
+
ProrationBehavior2["PRORATE_AND_REFUND"] = "PRORATE_AND_REFUND";
|
|
3728
|
+
ProrationBehavior2["PRORATE_AND_EXTEND"] = "PRORATE_AND_EXTEND";
|
|
3729
|
+
ProrationBehavior2["NO_PRORATION"] = "NO_PRORATION";
|
|
3730
|
+
return ProrationBehavior2;
|
|
3731
|
+
})(ProrationBehavior || {});
|
|
3732
|
+
var ProrationAction = /* @__PURE__ */ ((ProrationAction2) => {
|
|
3733
|
+
ProrationAction2["UNKNOWN"] = "UNKNOWN";
|
|
3734
|
+
ProrationAction2["CHARGE"] = "CHARGE";
|
|
3735
|
+
ProrationAction2["REFUND"] = "REFUND";
|
|
3736
|
+
ProrationAction2["EXTEND_PERIOD"] = "EXTEND_PERIOD";
|
|
3737
|
+
ProrationAction2["NO_CHANGE"] = "NO_CHANGE";
|
|
3738
|
+
return ProrationAction2;
|
|
3739
|
+
})(ProrationAction || {});
|
|
3362
3740
|
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
|
|
3363
3741
|
IdentityType2["UNDEFINED"] = "UNDEFINED";
|
|
3364
3742
|
IdentityType2["MEMBER"] = "MEMBER";
|
|
@@ -3450,22 +3828,212 @@ async function customerGetSubscription2(_id) {
|
|
|
3450
3828
|
err,
|
|
3451
3829
|
{
|
|
3452
3830
|
spreadPathsToArguments: {},
|
|
3453
|
-
explicitPathsToArguments: { id: "$[0]" },
|
|
3831
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
3832
|
+
singleArgumentUnchanged: false
|
|
3833
|
+
},
|
|
3834
|
+
["_id"]
|
|
3835
|
+
);
|
|
3836
|
+
sideEffects?.onError?.(err);
|
|
3837
|
+
throw transformedError;
|
|
3838
|
+
}
|
|
3839
|
+
}
|
|
3840
|
+
async function customerCancelSubscription2(_id, options) {
|
|
3841
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3842
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3843
|
+
id: _id,
|
|
3844
|
+
reason: options?.reason
|
|
3845
|
+
});
|
|
3846
|
+
const reqOpts = customerCancelSubscription(payload);
|
|
3847
|
+
sideEffects?.onSiteCall?.();
|
|
3848
|
+
try {
|
|
3849
|
+
const result = await httpClient.request(reqOpts);
|
|
3850
|
+
sideEffects?.onSuccess?.(result);
|
|
3851
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3852
|
+
transformPaths2(result.data, [
|
|
3853
|
+
{
|
|
3854
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
3855
|
+
paths: [
|
|
3856
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
3857
|
+
{ path: "subscription.shippingAddress.address" }
|
|
3858
|
+
]
|
|
3859
|
+
}
|
|
3860
|
+
])
|
|
3861
|
+
);
|
|
3862
|
+
} catch (err) {
|
|
3863
|
+
const transformedError = sdkTransformError(
|
|
3864
|
+
err,
|
|
3865
|
+
{
|
|
3866
|
+
spreadPathsToArguments: {},
|
|
3867
|
+
explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
|
|
3868
|
+
singleArgumentUnchanged: false
|
|
3869
|
+
},
|
|
3870
|
+
["_id", "options"]
|
|
3871
|
+
);
|
|
3872
|
+
sideEffects?.onError?.(err);
|
|
3873
|
+
throw transformedError;
|
|
3874
|
+
}
|
|
3875
|
+
}
|
|
3876
|
+
async function customerTurnOnSubscriptionAutoRenewal2(_id, options) {
|
|
3877
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3878
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3879
|
+
id: _id,
|
|
3880
|
+
reason: options?.reason
|
|
3881
|
+
});
|
|
3882
|
+
const reqOpts = customerTurnOnSubscriptionAutoRenewal(
|
|
3883
|
+
payload
|
|
3884
|
+
);
|
|
3885
|
+
sideEffects?.onSiteCall?.();
|
|
3886
|
+
try {
|
|
3887
|
+
const result = await httpClient.request(reqOpts);
|
|
3888
|
+
sideEffects?.onSuccess?.(result);
|
|
3889
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3890
|
+
transformPaths2(result.data, [
|
|
3891
|
+
{
|
|
3892
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
3893
|
+
paths: [
|
|
3894
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
3895
|
+
{ path: "subscription.shippingAddress.address" }
|
|
3896
|
+
]
|
|
3897
|
+
}
|
|
3898
|
+
])
|
|
3899
|
+
);
|
|
3900
|
+
} catch (err) {
|
|
3901
|
+
const transformedError = sdkTransformError(
|
|
3902
|
+
err,
|
|
3903
|
+
{
|
|
3904
|
+
spreadPathsToArguments: {},
|
|
3905
|
+
explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
|
|
3906
|
+
singleArgumentUnchanged: false
|
|
3907
|
+
},
|
|
3908
|
+
["_id", "options"]
|
|
3909
|
+
);
|
|
3910
|
+
sideEffects?.onError?.(err);
|
|
3911
|
+
throw transformedError;
|
|
3912
|
+
}
|
|
3913
|
+
}
|
|
3914
|
+
async function customerTurnOffSubscriptionAutoRenewal2(_id, options) {
|
|
3915
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3916
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3917
|
+
id: _id,
|
|
3918
|
+
reason: options?.reason
|
|
3919
|
+
});
|
|
3920
|
+
const reqOpts = customerTurnOffSubscriptionAutoRenewal(
|
|
3921
|
+
payload
|
|
3922
|
+
);
|
|
3923
|
+
sideEffects?.onSiteCall?.();
|
|
3924
|
+
try {
|
|
3925
|
+
const result = await httpClient.request(reqOpts);
|
|
3926
|
+
sideEffects?.onSuccess?.(result);
|
|
3927
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3928
|
+
transformPaths2(result.data, [
|
|
3929
|
+
{
|
|
3930
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
3931
|
+
paths: [
|
|
3932
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
3933
|
+
{ path: "subscription.shippingAddress.address" }
|
|
3934
|
+
]
|
|
3935
|
+
}
|
|
3936
|
+
])
|
|
3937
|
+
);
|
|
3938
|
+
} catch (err) {
|
|
3939
|
+
const transformedError = sdkTransformError(
|
|
3940
|
+
err,
|
|
3941
|
+
{
|
|
3942
|
+
spreadPathsToArguments: {},
|
|
3943
|
+
explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
|
|
3944
|
+
singleArgumentUnchanged: false
|
|
3945
|
+
},
|
|
3946
|
+
["_id", "options"]
|
|
3947
|
+
);
|
|
3948
|
+
sideEffects?.onError?.(err);
|
|
3949
|
+
throw transformedError;
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
async function customerExtendSubscription2(_id, options) {
|
|
3953
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3954
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3955
|
+
id: _id,
|
|
3956
|
+
reason: options?.reason,
|
|
3957
|
+
billingCyclesToAdd: options?.billingCyclesToAdd
|
|
3958
|
+
});
|
|
3959
|
+
const reqOpts = customerExtendSubscription(payload);
|
|
3960
|
+
sideEffects?.onSiteCall?.();
|
|
3961
|
+
try {
|
|
3962
|
+
const result = await httpClient.request(reqOpts);
|
|
3963
|
+
sideEffects?.onSuccess?.(result);
|
|
3964
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3965
|
+
transformPaths2(result.data, [
|
|
3966
|
+
{
|
|
3967
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
3968
|
+
paths: [
|
|
3969
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
3970
|
+
{ path: "subscription.shippingAddress.address" }
|
|
3971
|
+
]
|
|
3972
|
+
}
|
|
3973
|
+
])
|
|
3974
|
+
);
|
|
3975
|
+
} catch (err) {
|
|
3976
|
+
const transformedError = sdkTransformError(
|
|
3977
|
+
err,
|
|
3978
|
+
{
|
|
3979
|
+
spreadPathsToArguments: {},
|
|
3980
|
+
explicitPathsToArguments: {
|
|
3981
|
+
id: "$[0]",
|
|
3982
|
+
reason: "$[1].reason",
|
|
3983
|
+
billingCyclesToAdd: "$[1].billingCyclesToAdd"
|
|
3984
|
+
},
|
|
3985
|
+
singleArgumentUnchanged: false
|
|
3986
|
+
},
|
|
3987
|
+
["_id", "options"]
|
|
3988
|
+
);
|
|
3989
|
+
sideEffects?.onError?.(err);
|
|
3990
|
+
throw transformedError;
|
|
3991
|
+
}
|
|
3992
|
+
}
|
|
3993
|
+
async function customerQuerySubscriptions2(options) {
|
|
3994
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
3995
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3996
|
+
query: options?.query
|
|
3997
|
+
});
|
|
3998
|
+
const reqOpts = customerQuerySubscriptions(payload);
|
|
3999
|
+
sideEffects?.onSiteCall?.();
|
|
4000
|
+
try {
|
|
4001
|
+
const result = await httpClient.request(reqOpts);
|
|
4002
|
+
sideEffects?.onSuccess?.(result);
|
|
4003
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
4004
|
+
transformPaths2(result.data, [
|
|
4005
|
+
{
|
|
4006
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
4007
|
+
paths: [
|
|
4008
|
+
{ path: "subscriptions.billingSettings.billingAddress.address" },
|
|
4009
|
+
{ path: "subscriptions.shippingAddress.address" }
|
|
4010
|
+
]
|
|
4011
|
+
}
|
|
4012
|
+
])
|
|
4013
|
+
);
|
|
4014
|
+
} catch (err) {
|
|
4015
|
+
const transformedError = sdkTransformError(
|
|
4016
|
+
err,
|
|
4017
|
+
{
|
|
4018
|
+
spreadPathsToArguments: {},
|
|
4019
|
+
explicitPathsToArguments: { query: "$[0].query" },
|
|
3454
4020
|
singleArgumentUnchanged: false
|
|
3455
4021
|
},
|
|
3456
|
-
["
|
|
4022
|
+
["options"]
|
|
3457
4023
|
);
|
|
3458
4024
|
sideEffects?.onError?.(err);
|
|
3459
4025
|
throw transformedError;
|
|
3460
4026
|
}
|
|
3461
4027
|
}
|
|
3462
|
-
async function
|
|
4028
|
+
async function customerUpdateSubscriptionPaymentMethod2(_id, paymentMethodId) {
|
|
3463
4029
|
const { httpClient, sideEffects } = arguments[2];
|
|
3464
4030
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3465
4031
|
id: _id,
|
|
3466
|
-
|
|
4032
|
+
paymentMethodId
|
|
3467
4033
|
});
|
|
3468
|
-
const reqOpts =
|
|
4034
|
+
const reqOpts = customerUpdateSubscriptionPaymentMethod(
|
|
4035
|
+
payload
|
|
4036
|
+
);
|
|
3469
4037
|
sideEffects?.onSiteCall?.();
|
|
3470
4038
|
try {
|
|
3471
4039
|
const result = await httpClient.request(reqOpts);
|
|
@@ -3486,83 +4054,86 @@ async function customerCancelSubscription2(_id, options) {
|
|
|
3486
4054
|
err,
|
|
3487
4055
|
{
|
|
3488
4056
|
spreadPathsToArguments: {},
|
|
3489
|
-
explicitPathsToArguments: { id: "$[0]",
|
|
4057
|
+
explicitPathsToArguments: { id: "$[0]", paymentMethodId: "$[1]" },
|
|
3490
4058
|
singleArgumentUnchanged: false
|
|
3491
4059
|
},
|
|
3492
|
-
["_id", "
|
|
4060
|
+
["_id", "paymentMethodId"]
|
|
3493
4061
|
);
|
|
3494
4062
|
sideEffects?.onError?.(err);
|
|
3495
4063
|
throw transformedError;
|
|
3496
4064
|
}
|
|
3497
4065
|
}
|
|
3498
|
-
async function
|
|
3499
|
-
const { httpClient, sideEffects } = arguments[
|
|
3500
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3501
|
-
|
|
3502
|
-
reason: options?.reason
|
|
3503
|
-
});
|
|
3504
|
-
const reqOpts = customerTurnOnSubscriptionAutoRenewal(
|
|
3505
|
-
payload
|
|
3506
|
-
);
|
|
4066
|
+
async function customerAllowedActions2(_id) {
|
|
4067
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
4068
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
4069
|
+
const reqOpts = customerAllowedActions(payload);
|
|
3507
4070
|
sideEffects?.onSiteCall?.();
|
|
3508
4071
|
try {
|
|
3509
4072
|
const result = await httpClient.request(reqOpts);
|
|
3510
4073
|
sideEffects?.onSuccess?.(result);
|
|
3511
|
-
return renameKeysFromRESTResponseToSDKResponse(
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
]
|
|
4074
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
4075
|
+
} catch (err) {
|
|
4076
|
+
const transformedError = sdkTransformError(
|
|
4077
|
+
err,
|
|
4078
|
+
{
|
|
4079
|
+
spreadPathsToArguments: {},
|
|
4080
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
4081
|
+
singleArgumentUnchanged: false
|
|
4082
|
+
},
|
|
4083
|
+
["_id"]
|
|
3521
4084
|
);
|
|
4085
|
+
sideEffects?.onError?.(err);
|
|
4086
|
+
throw transformedError;
|
|
4087
|
+
}
|
|
4088
|
+
}
|
|
4089
|
+
async function customerListUpcomingCharges2(_id) {
|
|
4090
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
4091
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
4092
|
+
const reqOpts = customerListUpcomingCharges(payload);
|
|
4093
|
+
sideEffects?.onSiteCall?.();
|
|
4094
|
+
try {
|
|
4095
|
+
const result = await httpClient.request(reqOpts);
|
|
4096
|
+
sideEffects?.onSuccess?.(result);
|
|
4097
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
3522
4098
|
} catch (err) {
|
|
3523
4099
|
const transformedError = sdkTransformError(
|
|
3524
4100
|
err,
|
|
3525
4101
|
{
|
|
3526
4102
|
spreadPathsToArguments: {},
|
|
3527
|
-
explicitPathsToArguments: { id: "$[0]"
|
|
4103
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
3528
4104
|
singleArgumentUnchanged: false
|
|
3529
4105
|
},
|
|
3530
|
-
["_id"
|
|
4106
|
+
["_id"]
|
|
3531
4107
|
);
|
|
3532
4108
|
sideEffects?.onError?.(err);
|
|
3533
4109
|
throw transformedError;
|
|
3534
4110
|
}
|
|
3535
4111
|
}
|
|
3536
|
-
async function
|
|
4112
|
+
async function customerInitiatePaymentMethodSetup2(_id, options) {
|
|
3537
4113
|
const { httpClient, sideEffects } = arguments[2];
|
|
3538
4114
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3539
4115
|
id: _id,
|
|
3540
|
-
|
|
4116
|
+
paymentMode: options?.paymentMode,
|
|
4117
|
+
paymentSettings: options?.paymentSettings
|
|
3541
4118
|
});
|
|
3542
|
-
const reqOpts =
|
|
4119
|
+
const reqOpts = customerInitiatePaymentMethodSetup(
|
|
3543
4120
|
payload
|
|
3544
4121
|
);
|
|
3545
4122
|
sideEffects?.onSiteCall?.();
|
|
3546
4123
|
try {
|
|
3547
4124
|
const result = await httpClient.request(reqOpts);
|
|
3548
4125
|
sideEffects?.onSuccess?.(result);
|
|
3549
|
-
return renameKeysFromRESTResponseToSDKResponse(
|
|
3550
|
-
transformPaths2(result.data, [
|
|
3551
|
-
{
|
|
3552
|
-
transformFn: transformRESTAddressToSDKAddress,
|
|
3553
|
-
paths: [
|
|
3554
|
-
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
3555
|
-
{ path: "subscription.shippingAddress.address" }
|
|
3556
|
-
]
|
|
3557
|
-
}
|
|
3558
|
-
])
|
|
3559
|
-
);
|
|
4126
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
3560
4127
|
} catch (err) {
|
|
3561
4128
|
const transformedError = sdkTransformError(
|
|
3562
4129
|
err,
|
|
3563
4130
|
{
|
|
3564
4131
|
spreadPathsToArguments: {},
|
|
3565
|
-
explicitPathsToArguments: {
|
|
4132
|
+
explicitPathsToArguments: {
|
|
4133
|
+
id: "$[0]",
|
|
4134
|
+
paymentMode: "$[1].paymentMode",
|
|
4135
|
+
paymentSettings: "$[1].paymentSettings"
|
|
4136
|
+
},
|
|
3566
4137
|
singleArgumentUnchanged: false
|
|
3567
4138
|
},
|
|
3568
4139
|
["_id", "options"]
|
|
@@ -3571,14 +4142,16 @@ async function customerTurnOffSubscriptionAutoRenewal2(_id, options) {
|
|
|
3571
4142
|
throw transformedError;
|
|
3572
4143
|
}
|
|
3573
4144
|
}
|
|
3574
|
-
async function
|
|
3575
|
-
const { httpClient, sideEffects } = arguments[
|
|
4145
|
+
async function customerSkipCycle2(_id, cyclesToSkip, options) {
|
|
4146
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
3576
4147
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3577
4148
|
id: _id,
|
|
3578
|
-
|
|
3579
|
-
|
|
4149
|
+
cyclesToSkip,
|
|
4150
|
+
pauseAtSchedule: options?.pauseAtSchedule,
|
|
4151
|
+
autoResumeAtSchedule: options?.autoResumeAtSchedule,
|
|
4152
|
+
reason: options?.reason
|
|
3580
4153
|
});
|
|
3581
|
-
const reqOpts =
|
|
4154
|
+
const reqOpts = customerSkipCycle(payload);
|
|
3582
4155
|
sideEffects?.onSiteCall?.();
|
|
3583
4156
|
try {
|
|
3584
4157
|
const result = await httpClient.request(reqOpts);
|
|
@@ -3601,23 +4174,26 @@ async function customerExtendSubscription2(_id, options) {
|
|
|
3601
4174
|
spreadPathsToArguments: {},
|
|
3602
4175
|
explicitPathsToArguments: {
|
|
3603
4176
|
id: "$[0]",
|
|
3604
|
-
|
|
3605
|
-
|
|
4177
|
+
cyclesToSkip: "$[1]",
|
|
4178
|
+
pauseAtSchedule: "$[2].pauseAtSchedule",
|
|
4179
|
+
autoResumeAtSchedule: "$[2].autoResumeAtSchedule",
|
|
4180
|
+
reason: "$[2].reason"
|
|
3606
4181
|
},
|
|
3607
4182
|
singleArgumentUnchanged: false
|
|
3608
4183
|
},
|
|
3609
|
-
["_id", "options"]
|
|
4184
|
+
["_id", "cyclesToSkip", "options"]
|
|
3610
4185
|
);
|
|
3611
4186
|
sideEffects?.onError?.(err);
|
|
3612
4187
|
throw transformedError;
|
|
3613
4188
|
}
|
|
3614
4189
|
}
|
|
3615
|
-
async function
|
|
3616
|
-
const { httpClient, sideEffects } = arguments[
|
|
4190
|
+
async function customerCancelScheduledSkip2(_id, options) {
|
|
4191
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3617
4192
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3618
|
-
|
|
4193
|
+
id: _id,
|
|
4194
|
+
reason: options?.reason
|
|
3619
4195
|
});
|
|
3620
|
-
const reqOpts =
|
|
4196
|
+
const reqOpts = customerCancelScheduledSkip(payload);
|
|
3621
4197
|
sideEffects?.onSiteCall?.();
|
|
3622
4198
|
try {
|
|
3623
4199
|
const result = await httpClient.request(reqOpts);
|
|
@@ -3627,8 +4203,8 @@ async function customerQuerySubscriptions2(options) {
|
|
|
3627
4203
|
{
|
|
3628
4204
|
transformFn: transformRESTAddressToSDKAddress,
|
|
3629
4205
|
paths: [
|
|
3630
|
-
{ path: "
|
|
3631
|
-
{ path: "
|
|
4206
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
4207
|
+
{ path: "subscription.shippingAddress.address" }
|
|
3632
4208
|
]
|
|
3633
4209
|
}
|
|
3634
4210
|
])
|
|
@@ -3638,24 +4214,26 @@ async function customerQuerySubscriptions2(options) {
|
|
|
3638
4214
|
err,
|
|
3639
4215
|
{
|
|
3640
4216
|
spreadPathsToArguments: {},
|
|
3641
|
-
explicitPathsToArguments: {
|
|
4217
|
+
explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
|
|
3642
4218
|
singleArgumentUnchanged: false
|
|
3643
4219
|
},
|
|
3644
|
-
["options"]
|
|
4220
|
+
["_id", "options"]
|
|
3645
4221
|
);
|
|
3646
4222
|
sideEffects?.onError?.(err);
|
|
3647
4223
|
throw transformedError;
|
|
3648
4224
|
}
|
|
3649
4225
|
}
|
|
3650
|
-
async function
|
|
4226
|
+
async function customerPauseSubscription2(_id, options) {
|
|
3651
4227
|
const { httpClient, sideEffects } = arguments[2];
|
|
3652
4228
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3653
4229
|
id: _id,
|
|
3654
|
-
|
|
4230
|
+
pausePolicy: options?.pausePolicy,
|
|
4231
|
+
reason: options?.reason,
|
|
4232
|
+
pauseAt: options?.pauseAt,
|
|
4233
|
+
pauseAtSchedule: options?.pauseAtSchedule,
|
|
4234
|
+
autoResumeAtSchedule: options?.autoResumeAtSchedule
|
|
3655
4235
|
});
|
|
3656
|
-
const reqOpts =
|
|
3657
|
-
payload
|
|
3658
|
-
);
|
|
4236
|
+
const reqOpts = customerPauseSubscription(payload);
|
|
3659
4237
|
sideEffects?.onSiteCall?.();
|
|
3660
4238
|
try {
|
|
3661
4239
|
const result = await httpClient.request(reqOpts);
|
|
@@ -3676,76 +4254,125 @@ async function customerUpdateSubscriptionPaymentMethod2(_id, paymentMethodId) {
|
|
|
3676
4254
|
err,
|
|
3677
4255
|
{
|
|
3678
4256
|
spreadPathsToArguments: {},
|
|
3679
|
-
explicitPathsToArguments: {
|
|
4257
|
+
explicitPathsToArguments: {
|
|
4258
|
+
id: "$[0]",
|
|
4259
|
+
pausePolicy: "$[1].pausePolicy",
|
|
4260
|
+
reason: "$[1].reason",
|
|
4261
|
+
pauseAt: "$[1].pauseAt",
|
|
4262
|
+
pauseAtSchedule: "$[1].pauseAtSchedule",
|
|
4263
|
+
autoResumeAtSchedule: "$[1].autoResumeAtSchedule"
|
|
4264
|
+
},
|
|
3680
4265
|
singleArgumentUnchanged: false
|
|
3681
4266
|
},
|
|
3682
|
-
["_id", "
|
|
4267
|
+
["_id", "options"]
|
|
3683
4268
|
);
|
|
3684
4269
|
sideEffects?.onError?.(err);
|
|
3685
4270
|
throw transformedError;
|
|
3686
4271
|
}
|
|
3687
4272
|
}
|
|
3688
|
-
async function
|
|
3689
|
-
const { httpClient, sideEffects } = arguments[
|
|
3690
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3691
|
-
|
|
4273
|
+
async function customerResumeSubscription2(_id, options) {
|
|
4274
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
4275
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
4276
|
+
id: _id,
|
|
4277
|
+
reason: options?.reason,
|
|
4278
|
+
resumeAt: options?.resumeAt,
|
|
4279
|
+
resumeAtSchedule: options?.resumeAtSchedule
|
|
4280
|
+
});
|
|
4281
|
+
const reqOpts = customerResumeSubscription(payload);
|
|
3692
4282
|
sideEffects?.onSiteCall?.();
|
|
3693
4283
|
try {
|
|
3694
4284
|
const result = await httpClient.request(reqOpts);
|
|
3695
4285
|
sideEffects?.onSuccess?.(result);
|
|
3696
|
-
return renameKeysFromRESTResponseToSDKResponse(
|
|
4286
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
4287
|
+
transformPaths2(result.data, [
|
|
4288
|
+
{
|
|
4289
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
4290
|
+
paths: [
|
|
4291
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
4292
|
+
{ path: "subscription.shippingAddress.address" }
|
|
4293
|
+
]
|
|
4294
|
+
}
|
|
4295
|
+
])
|
|
4296
|
+
);
|
|
3697
4297
|
} catch (err) {
|
|
3698
4298
|
const transformedError = sdkTransformError(
|
|
3699
4299
|
err,
|
|
3700
4300
|
{
|
|
3701
4301
|
spreadPathsToArguments: {},
|
|
3702
|
-
explicitPathsToArguments: {
|
|
4302
|
+
explicitPathsToArguments: {
|
|
4303
|
+
id: "$[0]",
|
|
4304
|
+
reason: "$[1].reason",
|
|
4305
|
+
resumeAt: "$[1].resumeAt",
|
|
4306
|
+
resumeAtSchedule: "$[1].resumeAtSchedule"
|
|
4307
|
+
},
|
|
3703
4308
|
singleArgumentUnchanged: false
|
|
3704
4309
|
},
|
|
3705
|
-
["_id"]
|
|
4310
|
+
["_id", "options"]
|
|
3706
4311
|
);
|
|
3707
4312
|
sideEffects?.onError?.(err);
|
|
3708
4313
|
throw transformedError;
|
|
3709
4314
|
}
|
|
3710
4315
|
}
|
|
3711
|
-
async function
|
|
3712
|
-
const { httpClient, sideEffects } = arguments[
|
|
3713
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3714
|
-
|
|
4316
|
+
async function customerCancelScheduledPause2(_id, options) {
|
|
4317
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
4318
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
4319
|
+
id: _id,
|
|
4320
|
+
reason: options?.reason
|
|
4321
|
+
});
|
|
4322
|
+
const reqOpts = customerCancelScheduledPause(payload);
|
|
3715
4323
|
sideEffects?.onSiteCall?.();
|
|
3716
4324
|
try {
|
|
3717
4325
|
const result = await httpClient.request(reqOpts);
|
|
3718
4326
|
sideEffects?.onSuccess?.(result);
|
|
3719
|
-
return renameKeysFromRESTResponseToSDKResponse(
|
|
4327
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
4328
|
+
transformPaths2(result.data, [
|
|
4329
|
+
{
|
|
4330
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
4331
|
+
paths: [
|
|
4332
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
4333
|
+
{ path: "subscription.shippingAddress.address" }
|
|
4334
|
+
]
|
|
4335
|
+
}
|
|
4336
|
+
])
|
|
4337
|
+
);
|
|
3720
4338
|
} catch (err) {
|
|
3721
4339
|
const transformedError = sdkTransformError(
|
|
3722
4340
|
err,
|
|
3723
4341
|
{
|
|
3724
4342
|
spreadPathsToArguments: {},
|
|
3725
|
-
explicitPathsToArguments: { id: "$[0]" },
|
|
4343
|
+
explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
|
|
3726
4344
|
singleArgumentUnchanged: false
|
|
3727
4345
|
},
|
|
3728
|
-
["_id"]
|
|
4346
|
+
["_id", "options"]
|
|
3729
4347
|
);
|
|
3730
4348
|
sideEffects?.onError?.(err);
|
|
3731
4349
|
throw transformedError;
|
|
3732
4350
|
}
|
|
3733
4351
|
}
|
|
3734
|
-
async function
|
|
3735
|
-
const { httpClient, sideEffects } = arguments[
|
|
4352
|
+
async function customerUpdateBillingDate2(_id, billingDate, options) {
|
|
4353
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
3736
4354
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3737
4355
|
id: _id,
|
|
3738
|
-
|
|
3739
|
-
|
|
4356
|
+
billingDate,
|
|
4357
|
+
proration: options?.proration,
|
|
4358
|
+
reason: options?.reason
|
|
3740
4359
|
});
|
|
3741
|
-
const reqOpts =
|
|
3742
|
-
payload
|
|
3743
|
-
);
|
|
4360
|
+
const reqOpts = customerUpdateBillingDate(payload);
|
|
3744
4361
|
sideEffects?.onSiteCall?.();
|
|
3745
4362
|
try {
|
|
3746
4363
|
const result = await httpClient.request(reqOpts);
|
|
3747
4364
|
sideEffects?.onSuccess?.(result);
|
|
3748
|
-
return renameKeysFromRESTResponseToSDKResponse(
|
|
4365
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
4366
|
+
transformPaths2(result.data, [
|
|
4367
|
+
{
|
|
4368
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
4369
|
+
paths: [
|
|
4370
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
4371
|
+
{ path: "subscription.shippingAddress.address" }
|
|
4372
|
+
]
|
|
4373
|
+
}
|
|
4374
|
+
])
|
|
4375
|
+
);
|
|
3749
4376
|
} catch (err) {
|
|
3750
4377
|
const transformedError = sdkTransformError(
|
|
3751
4378
|
err,
|
|
@@ -3753,12 +4380,13 @@ async function customerInitiatePaymentMethodSetup2(_id, options) {
|
|
|
3753
4380
|
spreadPathsToArguments: {},
|
|
3754
4381
|
explicitPathsToArguments: {
|
|
3755
4382
|
id: "$[0]",
|
|
3756
|
-
|
|
3757
|
-
|
|
4383
|
+
billingDate: "$[1]",
|
|
4384
|
+
proration: "$[2].proration",
|
|
4385
|
+
reason: "$[2].reason"
|
|
3758
4386
|
},
|
|
3759
4387
|
singleArgumentUnchanged: false
|
|
3760
4388
|
},
|
|
3761
|
-
["_id", "options"]
|
|
4389
|
+
["_id", "billingDate", "options"]
|
|
3762
4390
|
);
|
|
3763
4391
|
sideEffects?.onError?.(err);
|
|
3764
4392
|
throw transformedError;
|
|
@@ -4876,6 +5504,56 @@ function customerInitiatePaymentMethodSetup3(httpClient) {
|
|
|
4876
5504
|
{ httpClient }
|
|
4877
5505
|
);
|
|
4878
5506
|
}
|
|
5507
|
+
function customerSkipCycle3(httpClient) {
|
|
5508
|
+
return (_id, cyclesToSkip, options) => customerSkipCycle2(
|
|
5509
|
+
_id,
|
|
5510
|
+
cyclesToSkip,
|
|
5511
|
+
options,
|
|
5512
|
+
// @ts-ignore
|
|
5513
|
+
{ httpClient }
|
|
5514
|
+
);
|
|
5515
|
+
}
|
|
5516
|
+
function customerCancelScheduledSkip3(httpClient) {
|
|
5517
|
+
return (_id, options) => customerCancelScheduledSkip2(
|
|
5518
|
+
_id,
|
|
5519
|
+
options,
|
|
5520
|
+
// @ts-ignore
|
|
5521
|
+
{ httpClient }
|
|
5522
|
+
);
|
|
5523
|
+
}
|
|
5524
|
+
function customerPauseSubscription3(httpClient) {
|
|
5525
|
+
return (_id, options) => customerPauseSubscription2(
|
|
5526
|
+
_id,
|
|
5527
|
+
options,
|
|
5528
|
+
// @ts-ignore
|
|
5529
|
+
{ httpClient }
|
|
5530
|
+
);
|
|
5531
|
+
}
|
|
5532
|
+
function customerResumeSubscription3(httpClient) {
|
|
5533
|
+
return (_id, options) => customerResumeSubscription2(
|
|
5534
|
+
_id,
|
|
5535
|
+
options,
|
|
5536
|
+
// @ts-ignore
|
|
5537
|
+
{ httpClient }
|
|
5538
|
+
);
|
|
5539
|
+
}
|
|
5540
|
+
function customerCancelScheduledPause3(httpClient) {
|
|
5541
|
+
return (_id, options) => customerCancelScheduledPause2(
|
|
5542
|
+
_id,
|
|
5543
|
+
options,
|
|
5544
|
+
// @ts-ignore
|
|
5545
|
+
{ httpClient }
|
|
5546
|
+
);
|
|
5547
|
+
}
|
|
5548
|
+
function customerUpdateBillingDate3(httpClient) {
|
|
5549
|
+
return (_id, billingDate, options) => customerUpdateBillingDate2(
|
|
5550
|
+
_id,
|
|
5551
|
+
billingDate,
|
|
5552
|
+
options,
|
|
5553
|
+
// @ts-ignore
|
|
5554
|
+
{ httpClient }
|
|
5555
|
+
);
|
|
5556
|
+
}
|
|
4879
5557
|
function payCycle3(httpClient) {
|
|
4880
5558
|
return (subscriptionId, options) => payCycle2(
|
|
4881
5559
|
subscriptionId,
|
|
@@ -5677,6 +6355,12 @@ var customerUpdateSubscriptionPaymentMethod4 = /* @__PURE__ */ createRESTModule(
|
|
|
5677
6355
|
var customerAllowedActions4 = /* @__PURE__ */ createRESTModule(customerAllowedActions3);
|
|
5678
6356
|
var customerListUpcomingCharges4 = /* @__PURE__ */ createRESTModule(customerListUpcomingCharges3);
|
|
5679
6357
|
var customerInitiatePaymentMethodSetup4 = /* @__PURE__ */ createRESTModule(customerInitiatePaymentMethodSetup3);
|
|
6358
|
+
var customerSkipCycle4 = /* @__PURE__ */ createRESTModule(customerSkipCycle3);
|
|
6359
|
+
var customerCancelScheduledSkip4 = /* @__PURE__ */ createRESTModule(customerCancelScheduledSkip3);
|
|
6360
|
+
var customerPauseSubscription4 = /* @__PURE__ */ createRESTModule(customerPauseSubscription3);
|
|
6361
|
+
var customerResumeSubscription4 = /* @__PURE__ */ createRESTModule(customerResumeSubscription3);
|
|
6362
|
+
var customerCancelScheduledPause4 = /* @__PURE__ */ createRESTModule(customerCancelScheduledPause3);
|
|
6363
|
+
var customerUpdateBillingDate4 = /* @__PURE__ */ createRESTModule(customerUpdateBillingDate3);
|
|
5680
6364
|
var payCycle4 = /* @__PURE__ */ createRESTModule(payCycle3);
|
|
5681
6365
|
var getSubscription4 = /* @__PURE__ */ createRESTModule(getSubscription3);
|
|
5682
6366
|
var updateSubscriptionPaymentMethod4 = /* @__PURE__ */ createRESTModule(updateSubscriptionPaymentMethod3);
|
|
@@ -5744,6 +6428,7 @@ export {
|
|
|
5744
6428
|
ActionType,
|
|
5745
6429
|
AdditionalFeeTrigger,
|
|
5746
6430
|
CancellationInitiator,
|
|
6431
|
+
ChangeEffectiveTime,
|
|
5747
6432
|
CollectionMethod,
|
|
5748
6433
|
CollectionMethodEnumCollectionMethod,
|
|
5749
6434
|
CreationMode,
|
|
@@ -5763,6 +6448,9 @@ export {
|
|
|
5763
6448
|
PaymentStatus,
|
|
5764
6449
|
PaymentStatusEnumPaymentStatus,
|
|
5765
6450
|
PaymentTestMode,
|
|
6451
|
+
PriceAdjustmentReason,
|
|
6452
|
+
ProrationAction,
|
|
6453
|
+
ProrationBehavior,
|
|
5766
6454
|
RefundReason,
|
|
5767
6455
|
RequestedFields,
|
|
5768
6456
|
ResumeAt,
|
|
@@ -5781,14 +6469,20 @@ export {
|
|
|
5781
6469
|
cancelSubscription4 as cancelSubscription,
|
|
5782
6470
|
countSubscriptions4 as countSubscriptions,
|
|
5783
6471
|
customerAllowedActions4 as customerAllowedActions,
|
|
6472
|
+
customerCancelScheduledPause4 as customerCancelScheduledPause,
|
|
6473
|
+
customerCancelScheduledSkip4 as customerCancelScheduledSkip,
|
|
5784
6474
|
customerCancelSubscription4 as customerCancelSubscription,
|
|
5785
6475
|
customerExtendSubscription4 as customerExtendSubscription,
|
|
5786
6476
|
customerGetSubscription4 as customerGetSubscription,
|
|
5787
6477
|
customerInitiatePaymentMethodSetup4 as customerInitiatePaymentMethodSetup,
|
|
5788
6478
|
customerListUpcomingCharges4 as customerListUpcomingCharges,
|
|
6479
|
+
customerPauseSubscription4 as customerPauseSubscription,
|
|
5789
6480
|
customerQuerySubscriptions4 as customerQuerySubscriptions,
|
|
6481
|
+
customerResumeSubscription4 as customerResumeSubscription,
|
|
6482
|
+
customerSkipCycle4 as customerSkipCycle,
|
|
5790
6483
|
customerTurnOffSubscriptionAutoRenewal4 as customerTurnOffSubscriptionAutoRenewal,
|
|
5791
6484
|
customerTurnOnSubscriptionAutoRenewal4 as customerTurnOnSubscriptionAutoRenewal,
|
|
6485
|
+
customerUpdateBillingDate4 as customerUpdateBillingDate,
|
|
5792
6486
|
customerUpdateSubscriptionPaymentMethod4 as customerUpdateSubscriptionPaymentMethod,
|
|
5793
6487
|
extendSubscription4 as extendSubscription,
|
|
5794
6488
|
getSubscription4 as getSubscription,
|