@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
|
@@ -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";
|
|
@@ -3352,6 +3708,28 @@ var RefundReason = /* @__PURE__ */ ((RefundReason2) => {
|
|
|
3352
3708
|
RefundReason2["OTHER"] = "OTHER";
|
|
3353
3709
|
return RefundReason2;
|
|
3354
3710
|
})(RefundReason || {});
|
|
3711
|
+
var ChangeEffectiveTime = /* @__PURE__ */ ((ChangeEffectiveTime2) => {
|
|
3712
|
+
ChangeEffectiveTime2["UNKNOWN"] = "UNKNOWN";
|
|
3713
|
+
ChangeEffectiveTime2["IMMEDIATELY"] = "IMMEDIATELY";
|
|
3714
|
+
ChangeEffectiveTime2["AT_NEXT_RENEWAL"] = "AT_NEXT_RENEWAL";
|
|
3715
|
+
return ChangeEffectiveTime2;
|
|
3716
|
+
})(ChangeEffectiveTime || {});
|
|
3717
|
+
var ProrationBehavior = /* @__PURE__ */ ((ProrationBehavior2) => {
|
|
3718
|
+
ProrationBehavior2["UNKNOWN"] = "UNKNOWN";
|
|
3719
|
+
ProrationBehavior2["PRORATE_AND_CHARGE"] = "PRORATE_AND_CHARGE";
|
|
3720
|
+
ProrationBehavior2["PRORATE_AND_REFUND"] = "PRORATE_AND_REFUND";
|
|
3721
|
+
ProrationBehavior2["PRORATE_AND_EXTEND"] = "PRORATE_AND_EXTEND";
|
|
3722
|
+
ProrationBehavior2["NO_PRORATION"] = "NO_PRORATION";
|
|
3723
|
+
return ProrationBehavior2;
|
|
3724
|
+
})(ProrationBehavior || {});
|
|
3725
|
+
var ProrationAction = /* @__PURE__ */ ((ProrationAction2) => {
|
|
3726
|
+
ProrationAction2["UNKNOWN"] = "UNKNOWN";
|
|
3727
|
+
ProrationAction2["CHARGE"] = "CHARGE";
|
|
3728
|
+
ProrationAction2["REFUND"] = "REFUND";
|
|
3729
|
+
ProrationAction2["EXTEND_PERIOD"] = "EXTEND_PERIOD";
|
|
3730
|
+
ProrationAction2["NO_CHANGE"] = "NO_CHANGE";
|
|
3731
|
+
return ProrationAction2;
|
|
3732
|
+
})(ProrationAction || {});
|
|
3355
3733
|
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
|
|
3356
3734
|
IdentityType2["UNDEFINED"] = "UNDEFINED";
|
|
3357
3735
|
IdentityType2["MEMBER"] = "MEMBER";
|
|
@@ -3757,6 +4135,256 @@ async function customerInitiatePaymentMethodSetup2(_id, options) {
|
|
|
3757
4135
|
throw transformedError;
|
|
3758
4136
|
}
|
|
3759
4137
|
}
|
|
4138
|
+
async function customerSkipCycle2(_id, cyclesToSkip, options) {
|
|
4139
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
4140
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
4141
|
+
id: _id,
|
|
4142
|
+
cyclesToSkip,
|
|
4143
|
+
pauseAtSchedule: options?.pauseAtSchedule,
|
|
4144
|
+
autoResumeAtSchedule: options?.autoResumeAtSchedule,
|
|
4145
|
+
reason: options?.reason
|
|
4146
|
+
});
|
|
4147
|
+
const reqOpts = customerSkipCycle(payload);
|
|
4148
|
+
sideEffects?.onSiteCall?.();
|
|
4149
|
+
try {
|
|
4150
|
+
const result = await httpClient.request(reqOpts);
|
|
4151
|
+
sideEffects?.onSuccess?.(result);
|
|
4152
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
4153
|
+
transformPaths2(result.data, [
|
|
4154
|
+
{
|
|
4155
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
4156
|
+
paths: [
|
|
4157
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
4158
|
+
{ path: "subscription.shippingAddress.address" }
|
|
4159
|
+
]
|
|
4160
|
+
}
|
|
4161
|
+
])
|
|
4162
|
+
);
|
|
4163
|
+
} catch (err) {
|
|
4164
|
+
const transformedError = sdkTransformError(
|
|
4165
|
+
err,
|
|
4166
|
+
{
|
|
4167
|
+
spreadPathsToArguments: {},
|
|
4168
|
+
explicitPathsToArguments: {
|
|
4169
|
+
id: "$[0]",
|
|
4170
|
+
cyclesToSkip: "$[1]",
|
|
4171
|
+
pauseAtSchedule: "$[2].pauseAtSchedule",
|
|
4172
|
+
autoResumeAtSchedule: "$[2].autoResumeAtSchedule",
|
|
4173
|
+
reason: "$[2].reason"
|
|
4174
|
+
},
|
|
4175
|
+
singleArgumentUnchanged: false
|
|
4176
|
+
},
|
|
4177
|
+
["_id", "cyclesToSkip", "options"]
|
|
4178
|
+
);
|
|
4179
|
+
sideEffects?.onError?.(err);
|
|
4180
|
+
throw transformedError;
|
|
4181
|
+
}
|
|
4182
|
+
}
|
|
4183
|
+
async function customerCancelScheduledSkip2(_id, options) {
|
|
4184
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
4185
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
4186
|
+
id: _id,
|
|
4187
|
+
reason: options?.reason
|
|
4188
|
+
});
|
|
4189
|
+
const reqOpts = customerCancelScheduledSkip(payload);
|
|
4190
|
+
sideEffects?.onSiteCall?.();
|
|
4191
|
+
try {
|
|
4192
|
+
const result = await httpClient.request(reqOpts);
|
|
4193
|
+
sideEffects?.onSuccess?.(result);
|
|
4194
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
4195
|
+
transformPaths2(result.data, [
|
|
4196
|
+
{
|
|
4197
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
4198
|
+
paths: [
|
|
4199
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
4200
|
+
{ path: "subscription.shippingAddress.address" }
|
|
4201
|
+
]
|
|
4202
|
+
}
|
|
4203
|
+
])
|
|
4204
|
+
);
|
|
4205
|
+
} catch (err) {
|
|
4206
|
+
const transformedError = sdkTransformError(
|
|
4207
|
+
err,
|
|
4208
|
+
{
|
|
4209
|
+
spreadPathsToArguments: {},
|
|
4210
|
+
explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
|
|
4211
|
+
singleArgumentUnchanged: false
|
|
4212
|
+
},
|
|
4213
|
+
["_id", "options"]
|
|
4214
|
+
);
|
|
4215
|
+
sideEffects?.onError?.(err);
|
|
4216
|
+
throw transformedError;
|
|
4217
|
+
}
|
|
4218
|
+
}
|
|
4219
|
+
async function customerPauseSubscription2(_id, options) {
|
|
4220
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
4221
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
4222
|
+
id: _id,
|
|
4223
|
+
pausePolicy: options?.pausePolicy,
|
|
4224
|
+
reason: options?.reason,
|
|
4225
|
+
pauseAt: options?.pauseAt,
|
|
4226
|
+
pauseAtSchedule: options?.pauseAtSchedule,
|
|
4227
|
+
autoResumeAtSchedule: options?.autoResumeAtSchedule
|
|
4228
|
+
});
|
|
4229
|
+
const reqOpts = customerPauseSubscription(payload);
|
|
4230
|
+
sideEffects?.onSiteCall?.();
|
|
4231
|
+
try {
|
|
4232
|
+
const result = await httpClient.request(reqOpts);
|
|
4233
|
+
sideEffects?.onSuccess?.(result);
|
|
4234
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
4235
|
+
transformPaths2(result.data, [
|
|
4236
|
+
{
|
|
4237
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
4238
|
+
paths: [
|
|
4239
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
4240
|
+
{ path: "subscription.shippingAddress.address" }
|
|
4241
|
+
]
|
|
4242
|
+
}
|
|
4243
|
+
])
|
|
4244
|
+
);
|
|
4245
|
+
} catch (err) {
|
|
4246
|
+
const transformedError = sdkTransformError(
|
|
4247
|
+
err,
|
|
4248
|
+
{
|
|
4249
|
+
spreadPathsToArguments: {},
|
|
4250
|
+
explicitPathsToArguments: {
|
|
4251
|
+
id: "$[0]",
|
|
4252
|
+
pausePolicy: "$[1].pausePolicy",
|
|
4253
|
+
reason: "$[1].reason",
|
|
4254
|
+
pauseAt: "$[1].pauseAt",
|
|
4255
|
+
pauseAtSchedule: "$[1].pauseAtSchedule",
|
|
4256
|
+
autoResumeAtSchedule: "$[1].autoResumeAtSchedule"
|
|
4257
|
+
},
|
|
4258
|
+
singleArgumentUnchanged: false
|
|
4259
|
+
},
|
|
4260
|
+
["_id", "options"]
|
|
4261
|
+
);
|
|
4262
|
+
sideEffects?.onError?.(err);
|
|
4263
|
+
throw transformedError;
|
|
4264
|
+
}
|
|
4265
|
+
}
|
|
4266
|
+
async function customerResumeSubscription2(_id, options) {
|
|
4267
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
4268
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
4269
|
+
id: _id,
|
|
4270
|
+
reason: options?.reason,
|
|
4271
|
+
resumeAt: options?.resumeAt,
|
|
4272
|
+
resumeAtSchedule: options?.resumeAtSchedule
|
|
4273
|
+
});
|
|
4274
|
+
const reqOpts = customerResumeSubscription(payload);
|
|
4275
|
+
sideEffects?.onSiteCall?.();
|
|
4276
|
+
try {
|
|
4277
|
+
const result = await httpClient.request(reqOpts);
|
|
4278
|
+
sideEffects?.onSuccess?.(result);
|
|
4279
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
4280
|
+
transformPaths2(result.data, [
|
|
4281
|
+
{
|
|
4282
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
4283
|
+
paths: [
|
|
4284
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
4285
|
+
{ path: "subscription.shippingAddress.address" }
|
|
4286
|
+
]
|
|
4287
|
+
}
|
|
4288
|
+
])
|
|
4289
|
+
);
|
|
4290
|
+
} catch (err) {
|
|
4291
|
+
const transformedError = sdkTransformError(
|
|
4292
|
+
err,
|
|
4293
|
+
{
|
|
4294
|
+
spreadPathsToArguments: {},
|
|
4295
|
+
explicitPathsToArguments: {
|
|
4296
|
+
id: "$[0]",
|
|
4297
|
+
reason: "$[1].reason",
|
|
4298
|
+
resumeAt: "$[1].resumeAt",
|
|
4299
|
+
resumeAtSchedule: "$[1].resumeAtSchedule"
|
|
4300
|
+
},
|
|
4301
|
+
singleArgumentUnchanged: false
|
|
4302
|
+
},
|
|
4303
|
+
["_id", "options"]
|
|
4304
|
+
);
|
|
4305
|
+
sideEffects?.onError?.(err);
|
|
4306
|
+
throw transformedError;
|
|
4307
|
+
}
|
|
4308
|
+
}
|
|
4309
|
+
async function customerCancelScheduledPause2(_id, options) {
|
|
4310
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
4311
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
4312
|
+
id: _id,
|
|
4313
|
+
reason: options?.reason
|
|
4314
|
+
});
|
|
4315
|
+
const reqOpts = customerCancelScheduledPause(payload);
|
|
4316
|
+
sideEffects?.onSiteCall?.();
|
|
4317
|
+
try {
|
|
4318
|
+
const result = await httpClient.request(reqOpts);
|
|
4319
|
+
sideEffects?.onSuccess?.(result);
|
|
4320
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
4321
|
+
transformPaths2(result.data, [
|
|
4322
|
+
{
|
|
4323
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
4324
|
+
paths: [
|
|
4325
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
4326
|
+
{ path: "subscription.shippingAddress.address" }
|
|
4327
|
+
]
|
|
4328
|
+
}
|
|
4329
|
+
])
|
|
4330
|
+
);
|
|
4331
|
+
} catch (err) {
|
|
4332
|
+
const transformedError = sdkTransformError(
|
|
4333
|
+
err,
|
|
4334
|
+
{
|
|
4335
|
+
spreadPathsToArguments: {},
|
|
4336
|
+
explicitPathsToArguments: { id: "$[0]", reason: "$[1].reason" },
|
|
4337
|
+
singleArgumentUnchanged: false
|
|
4338
|
+
},
|
|
4339
|
+
["_id", "options"]
|
|
4340
|
+
);
|
|
4341
|
+
sideEffects?.onError?.(err);
|
|
4342
|
+
throw transformedError;
|
|
4343
|
+
}
|
|
4344
|
+
}
|
|
4345
|
+
async function customerUpdateBillingDate2(_id, billingDate, options) {
|
|
4346
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
4347
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
4348
|
+
id: _id,
|
|
4349
|
+
billingDate,
|
|
4350
|
+
proration: options?.proration,
|
|
4351
|
+
reason: options?.reason
|
|
4352
|
+
});
|
|
4353
|
+
const reqOpts = customerUpdateBillingDate(payload);
|
|
4354
|
+
sideEffects?.onSiteCall?.();
|
|
4355
|
+
try {
|
|
4356
|
+
const result = await httpClient.request(reqOpts);
|
|
4357
|
+
sideEffects?.onSuccess?.(result);
|
|
4358
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
4359
|
+
transformPaths2(result.data, [
|
|
4360
|
+
{
|
|
4361
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
4362
|
+
paths: [
|
|
4363
|
+
{ path: "subscription.billingSettings.billingAddress.address" },
|
|
4364
|
+
{ path: "subscription.shippingAddress.address" }
|
|
4365
|
+
]
|
|
4366
|
+
}
|
|
4367
|
+
])
|
|
4368
|
+
);
|
|
4369
|
+
} catch (err) {
|
|
4370
|
+
const transformedError = sdkTransformError(
|
|
4371
|
+
err,
|
|
4372
|
+
{
|
|
4373
|
+
spreadPathsToArguments: {},
|
|
4374
|
+
explicitPathsToArguments: {
|
|
4375
|
+
id: "$[0]",
|
|
4376
|
+
billingDate: "$[1]",
|
|
4377
|
+
proration: "$[2].proration",
|
|
4378
|
+
reason: "$[2].reason"
|
|
4379
|
+
},
|
|
4380
|
+
singleArgumentUnchanged: false
|
|
4381
|
+
},
|
|
4382
|
+
["_id", "billingDate", "options"]
|
|
4383
|
+
);
|
|
4384
|
+
sideEffects?.onError?.(err);
|
|
4385
|
+
throw transformedError;
|
|
4386
|
+
}
|
|
4387
|
+
}
|
|
3760
4388
|
async function payCycle2(subscriptionId, options) {
|
|
3761
4389
|
const { httpClient, sideEffects } = arguments[2];
|
|
3762
4390
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -4796,6 +5424,7 @@ export {
|
|
|
4796
5424
|
ActionType,
|
|
4797
5425
|
AdditionalFeeTrigger,
|
|
4798
5426
|
CancellationInitiator,
|
|
5427
|
+
ChangeEffectiveTime,
|
|
4799
5428
|
CollectionMethod,
|
|
4800
5429
|
CollectionMethodEnumCollectionMethod,
|
|
4801
5430
|
CreationMode,
|
|
@@ -4815,6 +5444,9 @@ export {
|
|
|
4815
5444
|
PaymentStatus,
|
|
4816
5445
|
PaymentStatusEnumPaymentStatus,
|
|
4817
5446
|
PaymentTestMode,
|
|
5447
|
+
PriceAdjustmentReason,
|
|
5448
|
+
ProrationAction,
|
|
5449
|
+
ProrationBehavior,
|
|
4818
5450
|
RefundReason,
|
|
4819
5451
|
RequestedFields,
|
|
4820
5452
|
ResumeAt,
|
|
@@ -4833,14 +5465,20 @@ export {
|
|
|
4833
5465
|
cancelSubscription2 as cancelSubscription,
|
|
4834
5466
|
countSubscriptions2 as countSubscriptions,
|
|
4835
5467
|
customerAllowedActions2 as customerAllowedActions,
|
|
5468
|
+
customerCancelScheduledPause2 as customerCancelScheduledPause,
|
|
5469
|
+
customerCancelScheduledSkip2 as customerCancelScheduledSkip,
|
|
4836
5470
|
customerCancelSubscription2 as customerCancelSubscription,
|
|
4837
5471
|
customerExtendSubscription2 as customerExtendSubscription,
|
|
4838
5472
|
customerGetSubscription2 as customerGetSubscription,
|
|
4839
5473
|
customerInitiatePaymentMethodSetup2 as customerInitiatePaymentMethodSetup,
|
|
4840
5474
|
customerListUpcomingCharges2 as customerListUpcomingCharges,
|
|
5475
|
+
customerPauseSubscription2 as customerPauseSubscription,
|
|
4841
5476
|
customerQuerySubscriptions2 as customerQuerySubscriptions,
|
|
5477
|
+
customerResumeSubscription2 as customerResumeSubscription,
|
|
5478
|
+
customerSkipCycle2 as customerSkipCycle,
|
|
4842
5479
|
customerTurnOffSubscriptionAutoRenewal2 as customerTurnOffSubscriptionAutoRenewal,
|
|
4843
5480
|
customerTurnOnSubscriptionAutoRenewal2 as customerTurnOnSubscriptionAutoRenewal,
|
|
5481
|
+
customerUpdateBillingDate2 as customerUpdateBillingDate,
|
|
4844
5482
|
customerUpdateSubscriptionPaymentMethod2 as customerUpdateSubscriptionPaymentMethod,
|
|
4845
5483
|
extendSubscription2 as extendSubscription,
|
|
4846
5484
|
getSubscription2 as getSubscription,
|