@wix/subscription 1.0.32 → 1.0.33
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/package.json +3 -3
- package/type-bundles/context.bundle.d.ts +1294 -1261
- package/type-bundles/index.bundle.d.ts +1294 -1261
- package/type-bundles/meta.bundle.d.ts +1193 -1129
|
@@ -307,10 +307,32 @@ interface AdditionalFee$1 {
|
|
|
307
307
|
*
|
|
308
308
|
* + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.
|
|
309
309
|
* + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.
|
|
310
|
+
* @deprecated When the fee is added to the invoice.
|
|
311
|
+
*
|
|
312
|
+
* + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.
|
|
313
|
+
* + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.
|
|
314
|
+
* @replacedBy cycles
|
|
315
|
+
* @targetRemovalDate 2025-12-31
|
|
310
316
|
*/
|
|
311
317
|
trigger?: AdditionalFeeTrigger$1;
|
|
312
318
|
/** Information about the tax of the conditional fee. */
|
|
313
319
|
tax?: Tax$1;
|
|
320
|
+
/**
|
|
321
|
+
* Specifies the cycles during which the fee will be applied. If this field is provided,
|
|
322
|
+
* it determines the exact range of cycles the fee applies to. The logic is as follows:
|
|
323
|
+
*
|
|
324
|
+
* - `cycle_from`: The first cycle the fee will be added to. Must be greater than 0.
|
|
325
|
+
* - `number_of_cycles`: The number of consecutive cycles the fee will be applied to,
|
|
326
|
+
* starting from `cycle_from`. If not specified, the fee applies to all cycles starting
|
|
327
|
+
* from `cycle_from`.
|
|
328
|
+
*
|
|
329
|
+
* Example:
|
|
330
|
+
* - `cycle_from = 1, number_of_cycles = 3`: Fee applies to cycles 1, 2, and 3.
|
|
331
|
+
* - `cycle_from = 2, number_of_cycles = None`: Fee applies to cycles 2 and onward indefinitely.
|
|
332
|
+
*
|
|
333
|
+
* If `cycles` is not specified (`None`), the fee will only be applied to the first cycle of the subscription.
|
|
334
|
+
*/
|
|
335
|
+
cycles?: Cycles$1;
|
|
314
336
|
}
|
|
315
337
|
declare enum AdditionalFeeTrigger$1 {
|
|
316
338
|
UNKNOWN = "UNKNOWN",
|
|
@@ -373,6 +395,12 @@ declare enum TaxableAddressType$1 {
|
|
|
373
395
|
/** Tax will be calculated using multiple address (from BUSINESS to SHIPPING) */
|
|
374
396
|
SHIPPING = "SHIPPING"
|
|
375
397
|
}
|
|
398
|
+
interface Cycles$1 {
|
|
399
|
+
/** The cycle will start. Minimum cycle number is 1 */
|
|
400
|
+
cycleFrom?: number;
|
|
401
|
+
/** Number of cycles to be applied on. In order to apply a on all cycles until the end of the subscription, this field should be empty. */
|
|
402
|
+
numberOfCycles?: number | null;
|
|
403
|
+
}
|
|
376
404
|
interface ShippingCharges$1 {
|
|
377
405
|
/**
|
|
378
406
|
* Amount of the shipping fee in `0.00` format.
|
|
@@ -786,147 +814,18 @@ interface SpecificDateSubscriptionUpdateData$1 {
|
|
|
786
814
|
updateData?: SubscriptionUpdateData$1;
|
|
787
815
|
executionDate?: Date | null;
|
|
788
816
|
}
|
|
789
|
-
interface
|
|
790
|
-
|
|
791
|
-
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
792
|
-
mode?: HistoryViewMode$1;
|
|
793
|
-
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
794
|
-
cursor?: CursorPaging$1;
|
|
795
|
-
}
|
|
796
|
-
declare enum HistoryViewMode$1 {
|
|
797
|
-
UNKNOWN = "UNKNOWN",
|
|
798
|
-
/** Comprehensive view including all history events. */
|
|
799
|
-
BACKOFFICE = "BACKOFFICE",
|
|
800
|
-
/** User-centric view of the history. */
|
|
801
|
-
USER = "USER"
|
|
802
|
-
}
|
|
803
|
-
interface CursorPaging$1 {
|
|
804
|
-
/** Maximum number of items to return in the results. */
|
|
805
|
-
limit?: number | null;
|
|
806
|
-
/**
|
|
807
|
-
* Pointer to the next or previous page in the list of results.
|
|
808
|
-
*
|
|
809
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
810
|
-
* Not relevant for the first request.
|
|
811
|
-
*/
|
|
812
|
-
cursor?: string | null;
|
|
813
|
-
}
|
|
814
|
-
interface ListSubscriptionHistoryResponse$1 {
|
|
815
|
-
/** List of history entries for the subscription. */
|
|
816
|
-
historyEntries?: SubscriptionHistoryEntry$1[];
|
|
817
|
-
/** Paging metadata. A `next` cursor is returned if there are more results. */
|
|
818
|
-
pagingMetadata?: PagingMetadataV2$1;
|
|
819
|
-
}
|
|
820
|
-
interface SubscriptionHistoryEntry$1 {
|
|
821
|
-
entryId?: string;
|
|
822
|
-
/** TODO: add max length? it is not defined in domainevents, so should we? */
|
|
823
|
-
slug?: string;
|
|
824
|
-
entryTime?: Date | null;
|
|
825
|
-
event?: SubscriptionEvent$1;
|
|
826
|
-
}
|
|
827
|
-
interface SubscriptionEvent$1 extends SubscriptionEventPayloadOneOf$1 {
|
|
828
|
-
created?: SubscriptionCreated$1;
|
|
829
|
-
updated?: SubscriptionUpdated$1;
|
|
830
|
-
deleted?: SubscriptionDeleted$1;
|
|
831
|
-
activated?: SubscriptionActivated$1;
|
|
832
|
-
ended?: SubscriptionEnded$1;
|
|
833
|
-
canceled?: SubscriptionCanceled$1;
|
|
834
|
-
paused?: SubscriptionPaused$1;
|
|
835
|
-
resumed?: SubscriptionResumed$1;
|
|
836
|
-
pauseRequested?: PauseSubscriptionRequested$1;
|
|
837
|
-
resumeRequested?: ResumeSubscriptionRequested$1;
|
|
838
|
-
scheduledPauseCanceled?: ScheduledPauseCanceled$1;
|
|
839
|
-
scheduledResumeCanceled?: ScheduledResumeCanceled$1;
|
|
840
|
-
billingCycleStarted?: SubscriptionBillingCycleStarted$1;
|
|
841
|
-
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn$1;
|
|
842
|
-
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff$1;
|
|
843
|
-
cycleReadyToPay?: SubscriptionCycleReadyToPay$1;
|
|
844
|
-
extended?: SubscriptionExtended$1;
|
|
845
|
-
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted$1;
|
|
846
|
-
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid$1;
|
|
847
|
-
revived?: SubscriptionRevived$1;
|
|
848
|
-
billingDateUpdated?: SubscriptionBillingDateUpdated$1;
|
|
849
|
-
futureUpdatesRequested?: FutureUpdatesRequested$1;
|
|
850
|
-
updatesApplied?: UpdatesApplied$1;
|
|
851
|
-
resetPendingUpdates?: ResetPendingUpdates$1;
|
|
852
|
-
gracePeriodStarted?: GracePeriodStarted$1;
|
|
853
|
-
gracePeriodEnded?: GracePeriodEnded$1;
|
|
854
|
-
paymentMethodUpdated?: PaymentMethodUpdated$1;
|
|
855
|
-
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated$1;
|
|
856
|
-
freeTrailStarted?: FreeTrailStarted$1;
|
|
857
|
-
freeTrailEnded?: FreeTrailEnded$1;
|
|
858
|
-
subscriptionBoAction?: SubscriptionBackOfficeAction$1;
|
|
859
|
-
unknown?: UnknownSubscriptionEvent$1;
|
|
860
|
-
}
|
|
861
|
-
/** @oneof */
|
|
862
|
-
interface SubscriptionEventPayloadOneOf$1 {
|
|
863
|
-
created?: SubscriptionCreated$1;
|
|
864
|
-
updated?: SubscriptionUpdated$1;
|
|
865
|
-
deleted?: SubscriptionDeleted$1;
|
|
866
|
-
activated?: SubscriptionActivated$1;
|
|
867
|
-
ended?: SubscriptionEnded$1;
|
|
868
|
-
canceled?: SubscriptionCanceled$1;
|
|
869
|
-
paused?: SubscriptionPaused$1;
|
|
870
|
-
resumed?: SubscriptionResumed$1;
|
|
871
|
-
pauseRequested?: PauseSubscriptionRequested$1;
|
|
872
|
-
resumeRequested?: ResumeSubscriptionRequested$1;
|
|
873
|
-
scheduledPauseCanceled?: ScheduledPauseCanceled$1;
|
|
874
|
-
scheduledResumeCanceled?: ScheduledResumeCanceled$1;
|
|
875
|
-
billingCycleStarted?: SubscriptionBillingCycleStarted$1;
|
|
876
|
-
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn$1;
|
|
877
|
-
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff$1;
|
|
878
|
-
cycleReadyToPay?: SubscriptionCycleReadyToPay$1;
|
|
879
|
-
extended?: SubscriptionExtended$1;
|
|
880
|
-
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted$1;
|
|
881
|
-
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid$1;
|
|
882
|
-
revived?: SubscriptionRevived$1;
|
|
883
|
-
billingDateUpdated?: SubscriptionBillingDateUpdated$1;
|
|
884
|
-
futureUpdatesRequested?: FutureUpdatesRequested$1;
|
|
885
|
-
updatesApplied?: UpdatesApplied$1;
|
|
886
|
-
resetPendingUpdates?: ResetPendingUpdates$1;
|
|
887
|
-
gracePeriodStarted?: GracePeriodStarted$1;
|
|
888
|
-
gracePeriodEnded?: GracePeriodEnded$1;
|
|
889
|
-
paymentMethodUpdated?: PaymentMethodUpdated$1;
|
|
890
|
-
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated$1;
|
|
891
|
-
freeTrailStarted?: FreeTrailStarted$1;
|
|
892
|
-
freeTrailEnded?: FreeTrailEnded$1;
|
|
893
|
-
subscriptionBoAction?: SubscriptionBackOfficeAction$1;
|
|
894
|
-
unknown?: UnknownSubscriptionEvent$1;
|
|
817
|
+
interface GetSubscriptionRequest$1 {
|
|
818
|
+
id: string;
|
|
895
819
|
}
|
|
896
|
-
interface
|
|
820
|
+
interface GetSubscriptionResponse$1 {
|
|
897
821
|
subscription?: Subscription$1;
|
|
898
822
|
}
|
|
899
|
-
interface
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
}
|
|
904
|
-
interface SubscriptionDiff$1 {
|
|
905
|
-
added?: string | null;
|
|
906
|
-
changed?: string | null;
|
|
907
|
-
deleted?: string | null;
|
|
908
|
-
}
|
|
909
|
-
interface SubscriptionDeleted$1 {
|
|
910
|
-
subscriptionId?: string;
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* Sent each time a subscription status has been set to Active
|
|
914
|
-
* Active shows that a subscription is live and operational.
|
|
915
|
-
* For example:
|
|
916
|
-
* * For subscription with free trial, free trial start date is also the activation date.
|
|
917
|
-
* * For a subscription with future start date, the start date is also the activation date.
|
|
918
|
-
* * When a subscription is resumed from a pause status, the resume date is also the activation date.
|
|
919
|
-
*/
|
|
920
|
-
interface SubscriptionActivated$1 {
|
|
921
|
-
subscription?: Subscription$1;
|
|
823
|
+
interface CustomerCancelSubscriptionRequest$1 {
|
|
824
|
+
id: string;
|
|
825
|
+
/** Optional action reason message */
|
|
826
|
+
reason?: string | null;
|
|
922
827
|
}
|
|
923
|
-
|
|
924
|
-
* Sent each time a subscription status has been set to Ended
|
|
925
|
-
* Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
|
|
926
|
-
* This is different from a Canceled subscription which ends the subscription before a designated end date.
|
|
927
|
-
* Therefore, Ended and Canceled are mutually exclusive.
|
|
928
|
-
*/
|
|
929
|
-
interface SubscriptionEnded$1 {
|
|
828
|
+
interface CustomerCancelSubscriptionResponse$1 {
|
|
930
829
|
subscription?: Subscription$1;
|
|
931
830
|
}
|
|
932
831
|
/**
|
|
@@ -944,48 +843,32 @@ interface ActionDetails$1 {
|
|
|
944
843
|
initiator?: HistoryActionInitiator$1;
|
|
945
844
|
reason?: string | null;
|
|
946
845
|
}
|
|
947
|
-
interface
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
}
|
|
952
|
-
interface SubscriptionResumed$1 {
|
|
953
|
-
subscription?: Subscription$1;
|
|
954
|
-
actionDetails?: ActionDetails$1;
|
|
955
|
-
}
|
|
956
|
-
interface PauseSubscriptionRequested$1 {
|
|
957
|
-
subscription?: Subscription$1;
|
|
958
|
-
pauseAt?: PauseAt$1;
|
|
959
|
-
pausePolicy?: PausePolicy$1;
|
|
960
|
-
actionDetails?: ActionDetails$1;
|
|
961
|
-
}
|
|
962
|
-
interface ResumeSubscriptionRequested$1 {
|
|
963
|
-
subscription?: Subscription$1;
|
|
964
|
-
resumeAt?: ResumeAt$1;
|
|
965
|
-
actionDetails?: ActionDetails$1;
|
|
966
|
-
}
|
|
967
|
-
interface ScheduledPauseCanceled$1 {
|
|
968
|
-
subscription?: Subscription$1;
|
|
969
|
-
actionDetails?: ActionDetails$1;
|
|
846
|
+
interface CustomerTurnOnAutoRenewalRequest$1 {
|
|
847
|
+
id: string;
|
|
848
|
+
/** Optional action reason message */
|
|
849
|
+
reason?: string | null;
|
|
970
850
|
}
|
|
971
|
-
interface
|
|
851
|
+
interface CustomerTurnOnAutoRenewalResponse$1 {
|
|
972
852
|
subscription?: Subscription$1;
|
|
973
|
-
actionDetails?: ActionDetails$1;
|
|
974
853
|
}
|
|
975
|
-
interface
|
|
976
|
-
|
|
977
|
-
/**
|
|
978
|
-
|
|
854
|
+
interface CustomerTurnOffAutoRenewalRequest$1 {
|
|
855
|
+
id: string;
|
|
856
|
+
/** Optional action reason message */
|
|
857
|
+
reason?: string | null;
|
|
979
858
|
}
|
|
980
|
-
interface
|
|
859
|
+
interface CustomerTurnOffAutoRenewalResponse$1 {
|
|
981
860
|
subscription?: Subscription$1;
|
|
982
|
-
actionDetails?: ActionDetails$1;
|
|
983
861
|
}
|
|
984
|
-
interface
|
|
985
|
-
subscription
|
|
986
|
-
|
|
862
|
+
interface CustomerExtendSubscriptionRequest$1 {
|
|
863
|
+
/** The ID of the subscription to be extended */
|
|
864
|
+
id: string;
|
|
865
|
+
/** Optional action reason message */
|
|
866
|
+
reason?: string | null;
|
|
867
|
+
/** For termed - Subscription end date will be updated with the extension period and number of cycles will be added */
|
|
868
|
+
billingCyclesToAdd: number | null;
|
|
987
869
|
}
|
|
988
|
-
interface
|
|
870
|
+
interface CustomerExtendSubscriptionResponse$1 {
|
|
871
|
+
/** The now extended subscription */
|
|
989
872
|
subscription?: Subscription$1;
|
|
990
873
|
}
|
|
991
874
|
interface SubscriptionExtended$1 extends SubscriptionExtendedExtendPolicyOneOf$1 {
|
|
@@ -999,95 +882,68 @@ interface SubscriptionExtendedExtendPolicyOneOf$1 {
|
|
|
999
882
|
extensionPeriod?: Duration$1;
|
|
1000
883
|
extensionBillingCycles?: number;
|
|
1001
884
|
}
|
|
1002
|
-
interface
|
|
1003
|
-
|
|
1004
|
-
actionDetails?: ActionDetails$1;
|
|
1005
|
-
paymentTransactionId?: string | null;
|
|
885
|
+
interface QuerySubscriptionsRequest$1 {
|
|
886
|
+
query?: QueryV2$1;
|
|
1006
887
|
}
|
|
1007
|
-
interface
|
|
1008
|
-
|
|
888
|
+
interface QueryV2$1 extends QueryV2PagingMethodOneOf$1 {
|
|
889
|
+
/** Paging options to limit and skip the number of items. */
|
|
890
|
+
paging?: Paging$1;
|
|
891
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
892
|
+
cursorPaging?: CursorPaging$1;
|
|
893
|
+
/**
|
|
894
|
+
* Filter object.
|
|
895
|
+
*
|
|
896
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
897
|
+
*/
|
|
898
|
+
filter?: Record<string, any> | null;
|
|
899
|
+
/**
|
|
900
|
+
* Sort object.
|
|
901
|
+
*
|
|
902
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
903
|
+
*/
|
|
904
|
+
sort?: Sorting$1[];
|
|
905
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
906
|
+
fields?: string[];
|
|
907
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
908
|
+
fieldsets?: string[];
|
|
1009
909
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
910
|
+
/** @oneof */
|
|
911
|
+
interface QueryV2PagingMethodOneOf$1 {
|
|
912
|
+
/** Paging options to limit and skip the number of items. */
|
|
913
|
+
paging?: Paging$1;
|
|
914
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
915
|
+
cursorPaging?: CursorPaging$1;
|
|
1012
916
|
}
|
|
1013
|
-
interface
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
917
|
+
interface Sorting$1 {
|
|
918
|
+
/** Name of the field to sort by. */
|
|
919
|
+
fieldName?: string;
|
|
920
|
+
/** Sort order. */
|
|
921
|
+
order?: SortOrder$1;
|
|
1017
922
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
}
|
|
1022
|
-
interface UpdatesApplied$1 {
|
|
1023
|
-
subscription?: Subscription$1;
|
|
1024
|
-
updateAction?: UpdateAction$1;
|
|
1025
|
-
appliedUpdateData?: SubscriptionUpdateData$1;
|
|
1026
|
-
}
|
|
1027
|
-
declare enum UpdateAction$1 {
|
|
1028
|
-
NONE = "NONE",
|
|
1029
|
-
/** Update subscription immediately, please note proration for updates changing price are not yet supported */
|
|
1030
|
-
IMMEDIATELY = "IMMEDIATELY",
|
|
1031
|
-
/** Request updates that will take affect only at the start of the next billing cycle. */
|
|
1032
|
-
NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
|
|
1033
|
-
/** Reset all pending updates */
|
|
1034
|
-
RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
|
|
1035
|
-
/** Request updates that will take affect only at a specific date. */
|
|
1036
|
-
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
1037
|
-
}
|
|
1038
|
-
interface ResetPendingUpdates$1 {
|
|
1039
|
-
subscription?: Subscription$1;
|
|
1040
|
-
}
|
|
1041
|
-
interface GracePeriodStarted$1 {
|
|
1042
|
-
subscription?: Subscription$1;
|
|
1043
|
-
}
|
|
1044
|
-
interface GracePeriodEnded$1 {
|
|
1045
|
-
subscription?: Subscription$1;
|
|
1046
|
-
/** Indication for the payment settlement method. */
|
|
1047
|
-
paymentSettlementMethod?: PaymentSettlementMethod$1;
|
|
1048
|
-
}
|
|
1049
|
-
declare enum PaymentSettlementMethod$1 {
|
|
1050
|
-
UNKNOWN = "UNKNOWN",
|
|
1051
|
-
/** System-defined payment settlement. */
|
|
1052
|
-
SYSTEM = "SYSTEM",
|
|
1053
|
-
/** Manually mark the payment as paid. */
|
|
1054
|
-
MARK_AS_PAID = "MARK_AS_PAID",
|
|
1055
|
-
/** Require the customer to pay immediately, by insert a new payment method. */
|
|
1056
|
-
CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
|
|
1057
|
-
}
|
|
1058
|
-
interface PaymentMethodUpdated$1 {
|
|
1059
|
-
subscription?: Subscription$1;
|
|
1060
|
-
initiator?: HistoryActionInitiator$1;
|
|
1061
|
-
paymentMode?: PaymentMode$1;
|
|
1062
|
-
}
|
|
1063
|
-
declare enum PaymentMode$1 {
|
|
1064
|
-
NONE = "NONE",
|
|
1065
|
-
/** The latest invoice of the subscription will be charged. */
|
|
1066
|
-
CHARGE = "CHARGE",
|
|
1067
|
-
/** An authorization invoice with zero amount will be created. */
|
|
1068
|
-
AUTHORIZATION = "AUTHORIZATION"
|
|
1069
|
-
}
|
|
1070
|
-
interface SubscriptionCollectionMethodUpdated$1 {
|
|
1071
|
-
subscription?: Subscription$1;
|
|
1072
|
-
newCollectionMethod?: CollectionMethodEnumCollectionMethod$1;
|
|
1073
|
-
previousCollectionMethod?: CollectionMethodEnumCollectionMethod$1;
|
|
1074
|
-
}
|
|
1075
|
-
interface FreeTrailStarted$1 {
|
|
1076
|
-
subscription?: Subscription$1;
|
|
923
|
+
declare enum SortOrder$1 {
|
|
924
|
+
ASC = "ASC",
|
|
925
|
+
DESC = "DESC"
|
|
1077
926
|
}
|
|
1078
|
-
interface
|
|
1079
|
-
|
|
927
|
+
interface Paging$1 {
|
|
928
|
+
/** Number of items to load. */
|
|
929
|
+
limit?: number | null;
|
|
930
|
+
/** Number of items to skip in the current sort order. */
|
|
931
|
+
offset?: number | null;
|
|
1080
932
|
}
|
|
1081
|
-
interface
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
933
|
+
interface CursorPaging$1 {
|
|
934
|
+
/** Maximum number of items to return in the results. */
|
|
935
|
+
limit?: number | null;
|
|
936
|
+
/**
|
|
937
|
+
* Pointer to the next or previous page in the list of results.
|
|
938
|
+
*
|
|
939
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
940
|
+
* Not relevant for the first request.
|
|
941
|
+
*/
|
|
942
|
+
cursor?: string | null;
|
|
1087
943
|
}
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
944
|
+
interface QuerySubscriptionsResponse$1 {
|
|
945
|
+
subscriptions?: Subscription$1[];
|
|
946
|
+
metadata?: PagingMetadataV2$1;
|
|
1091
947
|
}
|
|
1092
948
|
interface PagingMetadataV2$1 {
|
|
1093
949
|
/** Number of items returned in the response. */
|
|
@@ -1107,100 +963,6 @@ interface Cursors$1 {
|
|
|
1107
963
|
/** Cursor pointing to the previous page in the list of results. */
|
|
1108
964
|
prev?: string | null;
|
|
1109
965
|
}
|
|
1110
|
-
interface GetSubscriptionRequest$1 {
|
|
1111
|
-
id: string;
|
|
1112
|
-
}
|
|
1113
|
-
interface GetSubscriptionResponse$1 {
|
|
1114
|
-
subscription?: Subscription$1;
|
|
1115
|
-
}
|
|
1116
|
-
interface CustomerCancelSubscriptionRequest$1 {
|
|
1117
|
-
id: string;
|
|
1118
|
-
/** Optional action reason message */
|
|
1119
|
-
reason?: string | null;
|
|
1120
|
-
}
|
|
1121
|
-
interface CustomerCancelSubscriptionResponse$1 {
|
|
1122
|
-
subscription?: Subscription$1;
|
|
1123
|
-
}
|
|
1124
|
-
interface CustomerTurnOnAutoRenewalRequest$1 {
|
|
1125
|
-
id: string;
|
|
1126
|
-
/** Optional action reason message */
|
|
1127
|
-
reason?: string | null;
|
|
1128
|
-
}
|
|
1129
|
-
interface CustomerTurnOnAutoRenewalResponse$1 {
|
|
1130
|
-
subscription?: Subscription$1;
|
|
1131
|
-
}
|
|
1132
|
-
interface CustomerTurnOffAutoRenewalRequest$1 {
|
|
1133
|
-
id: string;
|
|
1134
|
-
/** Optional action reason message */
|
|
1135
|
-
reason?: string | null;
|
|
1136
|
-
}
|
|
1137
|
-
interface CustomerTurnOffAutoRenewalResponse$1 {
|
|
1138
|
-
subscription?: Subscription$1;
|
|
1139
|
-
}
|
|
1140
|
-
interface CustomerExtendSubscriptionRequest$1 {
|
|
1141
|
-
/** The ID of the subscription to be extended */
|
|
1142
|
-
id: string;
|
|
1143
|
-
/** Optional action reason message */
|
|
1144
|
-
reason?: string | null;
|
|
1145
|
-
/** For termed - Subscription end date will be updated with the extension period and number of cycles will be added */
|
|
1146
|
-
billingCyclesToAdd: number | null;
|
|
1147
|
-
}
|
|
1148
|
-
interface CustomerExtendSubscriptionResponse$1 {
|
|
1149
|
-
/** The now extended subscription */
|
|
1150
|
-
subscription?: Subscription$1;
|
|
1151
|
-
}
|
|
1152
|
-
interface QuerySubscriptionsRequest$1 {
|
|
1153
|
-
query?: QueryV2$1;
|
|
1154
|
-
}
|
|
1155
|
-
interface QueryV2$1 extends QueryV2PagingMethodOneOf$1 {
|
|
1156
|
-
/** Paging options to limit and skip the number of items. */
|
|
1157
|
-
paging?: Paging$1;
|
|
1158
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1159
|
-
cursorPaging?: CursorPaging$1;
|
|
1160
|
-
/**
|
|
1161
|
-
* Filter object.
|
|
1162
|
-
*
|
|
1163
|
-
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
1164
|
-
*/
|
|
1165
|
-
filter?: Record<string, any> | null;
|
|
1166
|
-
/**
|
|
1167
|
-
* Sort object.
|
|
1168
|
-
*
|
|
1169
|
-
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1170
|
-
*/
|
|
1171
|
-
sort?: Sorting$1[];
|
|
1172
|
-
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
1173
|
-
fields?: string[];
|
|
1174
|
-
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
1175
|
-
fieldsets?: string[];
|
|
1176
|
-
}
|
|
1177
|
-
/** @oneof */
|
|
1178
|
-
interface QueryV2PagingMethodOneOf$1 {
|
|
1179
|
-
/** Paging options to limit and skip the number of items. */
|
|
1180
|
-
paging?: Paging$1;
|
|
1181
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1182
|
-
cursorPaging?: CursorPaging$1;
|
|
1183
|
-
}
|
|
1184
|
-
interface Sorting$1 {
|
|
1185
|
-
/** Name of the field to sort by. */
|
|
1186
|
-
fieldName?: string;
|
|
1187
|
-
/** Sort order. */
|
|
1188
|
-
order?: SortOrder$1;
|
|
1189
|
-
}
|
|
1190
|
-
declare enum SortOrder$1 {
|
|
1191
|
-
ASC = "ASC",
|
|
1192
|
-
DESC = "DESC"
|
|
1193
|
-
}
|
|
1194
|
-
interface Paging$1 {
|
|
1195
|
-
/** Number of items to load. */
|
|
1196
|
-
limit?: number | null;
|
|
1197
|
-
/** Number of items to skip in the current sort order. */
|
|
1198
|
-
offset?: number | null;
|
|
1199
|
-
}
|
|
1200
|
-
interface QuerySubscriptionsResponse$1 {
|
|
1201
|
-
subscriptions?: Subscription$1[];
|
|
1202
|
-
metadata?: PagingMetadataV2$1;
|
|
1203
|
-
}
|
|
1204
966
|
interface CountSubscriptionsRequest$1 {
|
|
1205
967
|
/** Filters to specify which subscriptions are counted. */
|
|
1206
968
|
filter?: CountSubscriptionFilter$1;
|
|
@@ -1504,6 +1266,13 @@ interface InitiatePaymentMethodSetupRequest$1 {
|
|
|
1504
1266
|
paymentMode?: PaymentMode$1;
|
|
1505
1267
|
paymentSettings?: PaymentSettings$1;
|
|
1506
1268
|
}
|
|
1269
|
+
declare enum PaymentMode$1 {
|
|
1270
|
+
NONE = "NONE",
|
|
1271
|
+
/** The latest invoice of the subscription will be charged. */
|
|
1272
|
+
CHARGE = "CHARGE",
|
|
1273
|
+
/** An authorization invoice with zero amount will be created. */
|
|
1274
|
+
AUTHORIZATION = "AUTHORIZATION"
|
|
1275
|
+
}
|
|
1507
1276
|
interface PaymentSettings$1 {
|
|
1508
1277
|
/** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with "Wix Payments" provider. */
|
|
1509
1278
|
allowedProviderIds?: string[];
|
|
@@ -1546,6 +1315,64 @@ interface PaymentOrigin$1 {
|
|
|
1546
1315
|
interface InitiatePaymentMethodSetupResponse$1 {
|
|
1547
1316
|
paymentOrderId?: string;
|
|
1548
1317
|
}
|
|
1318
|
+
interface PayCycleRequest$1 {
|
|
1319
|
+
subscriptionId: string;
|
|
1320
|
+
paymentTestMode?: PaymentTestMode$1;
|
|
1321
|
+
tenantId: string;
|
|
1322
|
+
}
|
|
1323
|
+
declare enum PaymentTestMode$1 {
|
|
1324
|
+
REGULAR = "REGULAR",
|
|
1325
|
+
FAIL_TECHNICAL = "FAIL_TECHNICAL",
|
|
1326
|
+
FAIL_DECLINE = "FAIL_DECLINE",
|
|
1327
|
+
FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
|
|
1328
|
+
}
|
|
1329
|
+
interface PayCycleResponse$1 {
|
|
1330
|
+
invoiceId?: string;
|
|
1331
|
+
paymentOrderId?: string | null;
|
|
1332
|
+
subscription?: Subscription$1;
|
|
1333
|
+
}
|
|
1334
|
+
declare enum ActionInitiator$1 {
|
|
1335
|
+
UNDEFINED = "UNDEFINED",
|
|
1336
|
+
BUSINESS = "BUSINESS",
|
|
1337
|
+
CUSTOMER = "CUSTOMER",
|
|
1338
|
+
SYSTEM = "SYSTEM"
|
|
1339
|
+
}
|
|
1340
|
+
interface SubscriptionBillingCycleStarted$1 {
|
|
1341
|
+
subscription?: Subscription$1;
|
|
1342
|
+
/** Wix Pay transaction id, optional. Exists if event was triggered by a payment. */
|
|
1343
|
+
paymentTransactionId?: string | null;
|
|
1344
|
+
}
|
|
1345
|
+
/**
|
|
1346
|
+
* Sent each time a subscription status has been set to Active
|
|
1347
|
+
* Active shows that a subscription is live and operational.
|
|
1348
|
+
* For example:
|
|
1349
|
+
* * For subscription with free trial, free trial start date is also the activation date.
|
|
1350
|
+
* * For a subscription with future start date, the start date is also the activation date.
|
|
1351
|
+
* * When a subscription is resumed from a pause status, the resume date is also the activation date.
|
|
1352
|
+
*/
|
|
1353
|
+
interface SubscriptionActivated$1 {
|
|
1354
|
+
subscription?: Subscription$1;
|
|
1355
|
+
}
|
|
1356
|
+
/**
|
|
1357
|
+
* Sent each time a subscription status has been set to Ended
|
|
1358
|
+
* Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
|
|
1359
|
+
* This is different from a Canceled subscription which ends the subscription before a designated end date.
|
|
1360
|
+
* Therefore, Ended and Canceled are mutually exclusive.
|
|
1361
|
+
*/
|
|
1362
|
+
interface SubscriptionEnded$1 {
|
|
1363
|
+
subscription?: Subscription$1;
|
|
1364
|
+
}
|
|
1365
|
+
interface SubscriptionInitialPurchaseCompleted$1 {
|
|
1366
|
+
subscription?: Subscription$1;
|
|
1367
|
+
actionDetails?: ActionDetails$1;
|
|
1368
|
+
paymentTransactionId?: string | null;
|
|
1369
|
+
}
|
|
1370
|
+
interface SubscriptionCycleReadyToPay$1 {
|
|
1371
|
+
subscription?: Subscription$1;
|
|
1372
|
+
}
|
|
1373
|
+
interface SubscriptionRevived$1 {
|
|
1374
|
+
subscription?: Subscription$1;
|
|
1375
|
+
}
|
|
1549
1376
|
interface UpdateSubscriptionBillingDateRequest$1 {
|
|
1550
1377
|
/** ID of the subscription to update the billing date for. */
|
|
1551
1378
|
id: string;
|
|
@@ -1566,12 +1393,28 @@ interface UpdateSubscriptionBillingDateResponse$1 {
|
|
|
1566
1393
|
/** Updated subscription. */
|
|
1567
1394
|
subscription?: Subscription$1;
|
|
1568
1395
|
}
|
|
1569
|
-
interface
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1396
|
+
interface SubscriptionBillingDateUpdated$1 {
|
|
1397
|
+
subscription?: Subscription$1;
|
|
1398
|
+
billingDate?: Date | null;
|
|
1399
|
+
proration?: Proration$1;
|
|
1400
|
+
}
|
|
1401
|
+
declare enum UpdateAction$1 {
|
|
1402
|
+
NONE = "NONE",
|
|
1403
|
+
/** Update subscription immediately, please note proration for updates changing price are not yet supported */
|
|
1404
|
+
IMMEDIATELY = "IMMEDIATELY",
|
|
1405
|
+
/** Request updates that will take affect only at the start of the next billing cycle. */
|
|
1406
|
+
NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
|
|
1407
|
+
/** Reset all pending updates */
|
|
1408
|
+
RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
|
|
1409
|
+
/** Request updates that will take affect only at a specific date. */
|
|
1410
|
+
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
1411
|
+
}
|
|
1412
|
+
interface ScheduleAdditionalInfo$1 extends ScheduleAdditionalInfoParamOneOf$1 {
|
|
1413
|
+
/**
|
|
1414
|
+
* Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
|
|
1415
|
+
* format. The use of this field may be restricted in various BASS endpoints.
|
|
1416
|
+
* For example, in _Bulk Update Subscription Items_ it's only available in
|
|
1417
|
+
* combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
|
|
1575
1418
|
* only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
|
|
1576
1419
|
* _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
|
|
1577
1420
|
*/
|
|
@@ -1614,12 +1457,6 @@ interface ActionContext$1 {
|
|
|
1614
1457
|
/** Optional action reason message */
|
|
1615
1458
|
reason?: string | null;
|
|
1616
1459
|
}
|
|
1617
|
-
declare enum ActionInitiator$1 {
|
|
1618
|
-
UNDEFINED = "UNDEFINED",
|
|
1619
|
-
BUSINESS = "BUSINESS",
|
|
1620
|
-
CUSTOMER = "CUSTOMER",
|
|
1621
|
-
SYSTEM = "SYSTEM"
|
|
1622
|
-
}
|
|
1623
1460
|
interface CancelSubscriptionResponse$1 {
|
|
1624
1461
|
subscription?: Subscription$1;
|
|
1625
1462
|
}
|
|
@@ -1636,6 +1473,21 @@ interface PauseSubscriptionRequest$1 {
|
|
|
1636
1473
|
interface PauseSubscriptionResponse$1 {
|
|
1637
1474
|
subscription?: Subscription$1;
|
|
1638
1475
|
}
|
|
1476
|
+
interface SubscriptionPaused$1 {
|
|
1477
|
+
subscription?: Subscription$1;
|
|
1478
|
+
pausePolicy?: PausePolicy$1;
|
|
1479
|
+
actionDetails?: ActionDetails$1;
|
|
1480
|
+
}
|
|
1481
|
+
interface PauseSubscriptionRequested$1 {
|
|
1482
|
+
subscription?: Subscription$1;
|
|
1483
|
+
pauseAt?: PauseAt$1;
|
|
1484
|
+
pausePolicy?: PausePolicy$1;
|
|
1485
|
+
actionDetails?: ActionDetails$1;
|
|
1486
|
+
}
|
|
1487
|
+
interface ScheduledPauseCanceled$1 {
|
|
1488
|
+
subscription?: Subscription$1;
|
|
1489
|
+
actionDetails?: ActionDetails$1;
|
|
1490
|
+
}
|
|
1639
1491
|
interface ResumeSubscriptionRequest$1 {
|
|
1640
1492
|
id: string;
|
|
1641
1493
|
resumeAt?: ResumeAt$1;
|
|
@@ -1646,6 +1498,19 @@ interface ResumeSubscriptionRequest$1 {
|
|
|
1646
1498
|
interface ResumeSubscriptionResponse$1 {
|
|
1647
1499
|
subscription?: Subscription$1;
|
|
1648
1500
|
}
|
|
1501
|
+
interface SubscriptionResumed$1 {
|
|
1502
|
+
subscription?: Subscription$1;
|
|
1503
|
+
actionDetails?: ActionDetails$1;
|
|
1504
|
+
}
|
|
1505
|
+
interface ResumeSubscriptionRequested$1 {
|
|
1506
|
+
subscription?: Subscription$1;
|
|
1507
|
+
resumeAt?: ResumeAt$1;
|
|
1508
|
+
actionDetails?: ActionDetails$1;
|
|
1509
|
+
}
|
|
1510
|
+
interface ScheduledResumeCanceled$1 {
|
|
1511
|
+
subscription?: Subscription$1;
|
|
1512
|
+
actionDetails?: ActionDetails$1;
|
|
1513
|
+
}
|
|
1649
1514
|
interface SearchSubscriptionsRequest$1 extends SearchSubscriptionsRequestPagingMethodOneOf$1 {
|
|
1650
1515
|
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
1651
1516
|
paging?: Paging$1;
|
|
@@ -1677,6 +1542,10 @@ interface TurnOnSubscriptionAutoRenewalRequest$1 {
|
|
|
1677
1542
|
interface TurnOnSubscriptionAutoRenewalResponse$1 {
|
|
1678
1543
|
subscription?: Subscription$1;
|
|
1679
1544
|
}
|
|
1545
|
+
interface SubscriptionAutoRenewalTurnedOn$1 {
|
|
1546
|
+
subscription?: Subscription$1;
|
|
1547
|
+
actionDetails?: ActionDetails$1;
|
|
1548
|
+
}
|
|
1680
1549
|
interface TurnOffSubscriptionAutoRenewalRequest$1 {
|
|
1681
1550
|
id: string;
|
|
1682
1551
|
actionContext: ActionContext$1;
|
|
@@ -1684,6 +1553,10 @@ interface TurnOffSubscriptionAutoRenewalRequest$1 {
|
|
|
1684
1553
|
interface TurnOffSubscriptionAutoRenewalResponse$1 {
|
|
1685
1554
|
subscription?: Subscription$1;
|
|
1686
1555
|
}
|
|
1556
|
+
interface SubscriptionAutoRenewalTurnedOff$1 {
|
|
1557
|
+
subscription?: Subscription$1;
|
|
1558
|
+
actionDetails?: ActionDetails$1;
|
|
1559
|
+
}
|
|
1687
1560
|
interface MarkLatestInvoiceAsPaidRequest$1 {
|
|
1688
1561
|
/** The ID of the offline subscription to mark as paid its latest invoice */
|
|
1689
1562
|
subscriptionId: string;
|
|
@@ -1691,6 +1564,9 @@ interface MarkLatestInvoiceAsPaidRequest$1 {
|
|
|
1691
1564
|
interface MarkLatestInvoiceAsPaidResponse$1 {
|
|
1692
1565
|
subscription?: Subscription$1;
|
|
1693
1566
|
}
|
|
1567
|
+
interface LatestInvoiceMarkedAsPaid$1 {
|
|
1568
|
+
subscription?: Subscription$1;
|
|
1569
|
+
}
|
|
1694
1570
|
interface GetSubscriptionsStatsRequest$1 {
|
|
1695
1571
|
}
|
|
1696
1572
|
interface GetSubscriptionsStatsResponse$1 {
|
|
@@ -1829,21 +1705,173 @@ interface SubscriptionCharges$1 {
|
|
|
1829
1705
|
/** Charges for subscription. */
|
|
1830
1706
|
charges?: Charge$1[];
|
|
1831
1707
|
}
|
|
1832
|
-
interface
|
|
1708
|
+
interface ListSubscriptionHistoryRequest$1 {
|
|
1833
1709
|
subscriptionId: string;
|
|
1834
|
-
|
|
1835
|
-
|
|
1710
|
+
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
1711
|
+
mode?: HistoryViewMode$1;
|
|
1712
|
+
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
1713
|
+
cursor?: CursorPaging$1;
|
|
1836
1714
|
}
|
|
1837
|
-
declare enum
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1715
|
+
declare enum HistoryViewMode$1 {
|
|
1716
|
+
UNKNOWN = "UNKNOWN",
|
|
1717
|
+
/** Comprehensive view including all history events. */
|
|
1718
|
+
BACKOFFICE = "BACKOFFICE",
|
|
1719
|
+
/** User-centric view of the history. */
|
|
1720
|
+
USER = "USER"
|
|
1842
1721
|
}
|
|
1843
|
-
interface
|
|
1844
|
-
|
|
1845
|
-
|
|
1722
|
+
interface ListSubscriptionHistoryResponse$1 {
|
|
1723
|
+
/** List of history entries for the subscription. */
|
|
1724
|
+
historyEntries?: SubscriptionHistoryEntry$1[];
|
|
1725
|
+
/** Paging metadata. A `next` cursor is returned if there are more results. */
|
|
1726
|
+
pagingMetadata?: PagingMetadataV2$1;
|
|
1727
|
+
}
|
|
1728
|
+
interface SubscriptionHistoryEntry$1 {
|
|
1729
|
+
entryId?: string;
|
|
1730
|
+
/** TODO: add max length? it is not defined in domainevents, so should we? */
|
|
1731
|
+
slug?: string;
|
|
1732
|
+
entryTime?: Date | null;
|
|
1733
|
+
event?: SubscriptionEvent$1;
|
|
1734
|
+
}
|
|
1735
|
+
interface SubscriptionEvent$1 extends SubscriptionEventPayloadOneOf$1 {
|
|
1736
|
+
created?: SubscriptionCreated$1;
|
|
1737
|
+
updated?: SubscriptionUpdated$1;
|
|
1738
|
+
deleted?: SubscriptionDeleted$1;
|
|
1739
|
+
activated?: SubscriptionActivated$1;
|
|
1740
|
+
ended?: SubscriptionEnded$1;
|
|
1741
|
+
canceled?: SubscriptionCanceled$1;
|
|
1742
|
+
paused?: SubscriptionPaused$1;
|
|
1743
|
+
resumed?: SubscriptionResumed$1;
|
|
1744
|
+
pauseRequested?: PauseSubscriptionRequested$1;
|
|
1745
|
+
resumeRequested?: ResumeSubscriptionRequested$1;
|
|
1746
|
+
scheduledPauseCanceled?: ScheduledPauseCanceled$1;
|
|
1747
|
+
scheduledResumeCanceled?: ScheduledResumeCanceled$1;
|
|
1748
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted$1;
|
|
1749
|
+
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn$1;
|
|
1750
|
+
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff$1;
|
|
1751
|
+
cycleReadyToPay?: SubscriptionCycleReadyToPay$1;
|
|
1752
|
+
extended?: SubscriptionExtended$1;
|
|
1753
|
+
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted$1;
|
|
1754
|
+
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid$1;
|
|
1755
|
+
revived?: SubscriptionRevived$1;
|
|
1756
|
+
billingDateUpdated?: SubscriptionBillingDateUpdated$1;
|
|
1757
|
+
futureUpdatesRequested?: FutureUpdatesRequested$1;
|
|
1758
|
+
updatesApplied?: UpdatesApplied$1;
|
|
1759
|
+
resetPendingUpdates?: ResetPendingUpdates$1;
|
|
1760
|
+
gracePeriodStarted?: GracePeriodStarted$1;
|
|
1761
|
+
gracePeriodEnded?: GracePeriodEnded$1;
|
|
1762
|
+
paymentMethodUpdated?: PaymentMethodUpdated$1;
|
|
1763
|
+
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated$1;
|
|
1764
|
+
freeTrailStarted?: FreeTrailStarted$1;
|
|
1765
|
+
freeTrailEnded?: FreeTrailEnded$1;
|
|
1766
|
+
subscriptionBoAction?: SubscriptionBackOfficeAction$1;
|
|
1767
|
+
unknown?: UnknownSubscriptionEvent$1;
|
|
1768
|
+
}
|
|
1769
|
+
/** @oneof */
|
|
1770
|
+
interface SubscriptionEventPayloadOneOf$1 {
|
|
1771
|
+
created?: SubscriptionCreated$1;
|
|
1772
|
+
updated?: SubscriptionUpdated$1;
|
|
1773
|
+
deleted?: SubscriptionDeleted$1;
|
|
1774
|
+
activated?: SubscriptionActivated$1;
|
|
1775
|
+
ended?: SubscriptionEnded$1;
|
|
1776
|
+
canceled?: SubscriptionCanceled$1;
|
|
1777
|
+
paused?: SubscriptionPaused$1;
|
|
1778
|
+
resumed?: SubscriptionResumed$1;
|
|
1779
|
+
pauseRequested?: PauseSubscriptionRequested$1;
|
|
1780
|
+
resumeRequested?: ResumeSubscriptionRequested$1;
|
|
1781
|
+
scheduledPauseCanceled?: ScheduledPauseCanceled$1;
|
|
1782
|
+
scheduledResumeCanceled?: ScheduledResumeCanceled$1;
|
|
1783
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted$1;
|
|
1784
|
+
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn$1;
|
|
1785
|
+
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff$1;
|
|
1786
|
+
cycleReadyToPay?: SubscriptionCycleReadyToPay$1;
|
|
1787
|
+
extended?: SubscriptionExtended$1;
|
|
1788
|
+
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted$1;
|
|
1789
|
+
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid$1;
|
|
1790
|
+
revived?: SubscriptionRevived$1;
|
|
1791
|
+
billingDateUpdated?: SubscriptionBillingDateUpdated$1;
|
|
1792
|
+
futureUpdatesRequested?: FutureUpdatesRequested$1;
|
|
1793
|
+
updatesApplied?: UpdatesApplied$1;
|
|
1794
|
+
resetPendingUpdates?: ResetPendingUpdates$1;
|
|
1795
|
+
gracePeriodStarted?: GracePeriodStarted$1;
|
|
1796
|
+
gracePeriodEnded?: GracePeriodEnded$1;
|
|
1797
|
+
paymentMethodUpdated?: PaymentMethodUpdated$1;
|
|
1798
|
+
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated$1;
|
|
1799
|
+
freeTrailStarted?: FreeTrailStarted$1;
|
|
1800
|
+
freeTrailEnded?: FreeTrailEnded$1;
|
|
1801
|
+
subscriptionBoAction?: SubscriptionBackOfficeAction$1;
|
|
1802
|
+
unknown?: UnknownSubscriptionEvent$1;
|
|
1803
|
+
}
|
|
1804
|
+
interface SubscriptionCreated$1 {
|
|
1805
|
+
subscription?: Subscription$1;
|
|
1806
|
+
}
|
|
1807
|
+
interface SubscriptionUpdated$1 {
|
|
1808
|
+
current?: Subscription$1;
|
|
1809
|
+
previous?: Subscription$1;
|
|
1810
|
+
diff?: SubscriptionDiff$1;
|
|
1811
|
+
}
|
|
1812
|
+
interface SubscriptionDiff$1 {
|
|
1813
|
+
added?: string | null;
|
|
1814
|
+
changed?: string | null;
|
|
1815
|
+
deleted?: string | null;
|
|
1816
|
+
}
|
|
1817
|
+
interface SubscriptionDeleted$1 {
|
|
1818
|
+
subscriptionId?: string;
|
|
1819
|
+
}
|
|
1820
|
+
interface FutureUpdatesRequested$1 {
|
|
1821
|
+
subscription?: Subscription$1;
|
|
1822
|
+
requestedUpdateData?: SubscriptionUpdateData$1;
|
|
1823
|
+
}
|
|
1824
|
+
interface UpdatesApplied$1 {
|
|
1846
1825
|
subscription?: Subscription$1;
|
|
1826
|
+
updateAction?: UpdateAction$1;
|
|
1827
|
+
appliedUpdateData?: SubscriptionUpdateData$1;
|
|
1828
|
+
}
|
|
1829
|
+
interface ResetPendingUpdates$1 {
|
|
1830
|
+
subscription?: Subscription$1;
|
|
1831
|
+
}
|
|
1832
|
+
interface GracePeriodStarted$1 {
|
|
1833
|
+
subscription?: Subscription$1;
|
|
1834
|
+
}
|
|
1835
|
+
interface GracePeriodEnded$1 {
|
|
1836
|
+
subscription?: Subscription$1;
|
|
1837
|
+
/** Indication for the payment settlement method. */
|
|
1838
|
+
paymentSettlementMethod?: PaymentSettlementMethod$1;
|
|
1839
|
+
}
|
|
1840
|
+
declare enum PaymentSettlementMethod$1 {
|
|
1841
|
+
UNKNOWN = "UNKNOWN",
|
|
1842
|
+
/** System-defined payment settlement. */
|
|
1843
|
+
SYSTEM = "SYSTEM",
|
|
1844
|
+
/** Manually mark the payment as paid. */
|
|
1845
|
+
MARK_AS_PAID = "MARK_AS_PAID",
|
|
1846
|
+
/** Require the customer to pay immediately, by insert a new payment method. */
|
|
1847
|
+
CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
|
|
1848
|
+
}
|
|
1849
|
+
interface PaymentMethodUpdated$1 {
|
|
1850
|
+
subscription?: Subscription$1;
|
|
1851
|
+
initiator?: HistoryActionInitiator$1;
|
|
1852
|
+
paymentMode?: PaymentMode$1;
|
|
1853
|
+
}
|
|
1854
|
+
interface SubscriptionCollectionMethodUpdated$1 {
|
|
1855
|
+
subscription?: Subscription$1;
|
|
1856
|
+
newCollectionMethod?: CollectionMethodEnumCollectionMethod$1;
|
|
1857
|
+
previousCollectionMethod?: CollectionMethodEnumCollectionMethod$1;
|
|
1858
|
+
}
|
|
1859
|
+
interface FreeTrailStarted$1 {
|
|
1860
|
+
subscription?: Subscription$1;
|
|
1861
|
+
}
|
|
1862
|
+
interface FreeTrailEnded$1 {
|
|
1863
|
+
subscription?: Subscription$1;
|
|
1864
|
+
}
|
|
1865
|
+
interface SubscriptionBackOfficeAction$1 {
|
|
1866
|
+
subscription?: Subscription$1;
|
|
1867
|
+
/** The backoffice method name */
|
|
1868
|
+
name?: string;
|
|
1869
|
+
/** json as string format, to store the flatted request object */
|
|
1870
|
+
params?: string;
|
|
1871
|
+
}
|
|
1872
|
+
/** Defines unknown events restored from the logs */
|
|
1873
|
+
interface UnknownSubscriptionEvent$1 {
|
|
1874
|
+
subscriptionAsString?: string | null;
|
|
1847
1875
|
}
|
|
1848
1876
|
interface CustomerNonNullableFields$1 {
|
|
1849
1877
|
visitorId: string;
|
|
@@ -1878,11 +1906,15 @@ interface TaxNonNullableFields$1 {
|
|
|
1878
1906
|
percentage: string;
|
|
1879
1907
|
dynamic?: DynamicTaxNonNullableFields$1;
|
|
1880
1908
|
}
|
|
1909
|
+
interface CyclesNonNullableFields$1 {
|
|
1910
|
+
cycleFrom: number;
|
|
1911
|
+
}
|
|
1881
1912
|
interface AdditionalFeeNonNullableFields$1 {
|
|
1882
1913
|
name: string;
|
|
1883
1914
|
amount: string;
|
|
1884
1915
|
trigger: AdditionalFeeTrigger$1;
|
|
1885
1916
|
tax?: TaxNonNullableFields$1;
|
|
1917
|
+
cycles?: CyclesNonNullableFields$1;
|
|
1886
1918
|
}
|
|
1887
1919
|
interface DiscountCyclesNonNullableFields$1 {
|
|
1888
1920
|
cycleFrom: number;
|
|
@@ -2014,20 +2046,180 @@ interface SubscriptionNonNullableFields$1 {
|
|
|
2014
2046
|
specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateDataNonNullableFields$1;
|
|
2015
2047
|
items: ItemNonNullableFields$1[];
|
|
2016
2048
|
}
|
|
2017
|
-
interface
|
|
2049
|
+
interface GetSubscriptionResponseNonNullableFields$1 {
|
|
2018
2050
|
subscription?: SubscriptionNonNullableFields$1;
|
|
2019
2051
|
}
|
|
2020
|
-
interface
|
|
2021
|
-
current?: SubscriptionNonNullableFields$1;
|
|
2022
|
-
previous?: SubscriptionNonNullableFields$1;
|
|
2023
|
-
}
|
|
2024
|
-
interface SubscriptionDeletedNonNullableFields$1 {
|
|
2025
|
-
subscriptionId: string;
|
|
2026
|
-
}
|
|
2027
|
-
interface SubscriptionActivatedNonNullableFields$1 {
|
|
2052
|
+
interface CustomerCancelSubscriptionResponseNonNullableFields$1 {
|
|
2028
2053
|
subscription?: SubscriptionNonNullableFields$1;
|
|
2029
2054
|
}
|
|
2030
|
-
interface
|
|
2055
|
+
interface CustomerTurnOnAutoRenewalResponseNonNullableFields$1 {
|
|
2056
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2057
|
+
}
|
|
2058
|
+
interface CustomerTurnOffAutoRenewalResponseNonNullableFields$1 {
|
|
2059
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2060
|
+
}
|
|
2061
|
+
interface CustomerExtendSubscriptionResponseNonNullableFields$1 {
|
|
2062
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2063
|
+
}
|
|
2064
|
+
interface QuerySubscriptionsResponseNonNullableFields$1 {
|
|
2065
|
+
subscriptions: SubscriptionNonNullableFields$1[];
|
|
2066
|
+
}
|
|
2067
|
+
interface UpdateSubscriptionPaymentMethodResponseNonNullableFields$1 {
|
|
2068
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2069
|
+
}
|
|
2070
|
+
interface ActionNonNullableFields$1 {
|
|
2071
|
+
actionType: ActionType$1;
|
|
2072
|
+
pausePolicies: PausePolicy$1[];
|
|
2073
|
+
pauseAt: PauseAt$1[];
|
|
2074
|
+
resumeAt: ResumeAt$1[];
|
|
2075
|
+
extendPolicies: ExtendPolicyType$1[];
|
|
2076
|
+
}
|
|
2077
|
+
interface CustomerAllowedActionsResponseNonNullableFields$1 {
|
|
2078
|
+
actions: ActionNonNullableFields$1[];
|
|
2079
|
+
}
|
|
2080
|
+
interface RecurringNonNullableFields$1 {
|
|
2081
|
+
cycleNumber: number;
|
|
2082
|
+
}
|
|
2083
|
+
interface InvoiceDiscountNonNullableFields$1 {
|
|
2084
|
+
amount: string;
|
|
2085
|
+
percentage: string;
|
|
2086
|
+
origin?: DiscountOriginNonNullableFields$1;
|
|
2087
|
+
}
|
|
2088
|
+
interface InvoiceApplicationFeeNonNullableFields$1 {
|
|
2089
|
+
amount: string;
|
|
2090
|
+
discount?: InvoiceDiscountNonNullableFields$1;
|
|
2091
|
+
}
|
|
2092
|
+
interface PriceDetailsNonNullableFields$1 {
|
|
2093
|
+
price: string;
|
|
2094
|
+
tax?: TaxNonNullableFields$1;
|
|
2095
|
+
discount?: InvoiceDiscountNonNullableFields$1;
|
|
2096
|
+
applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields$1;
|
|
2097
|
+
}
|
|
2098
|
+
interface LineItemTaxSummaryNonNullableFields$1 {
|
|
2099
|
+
aggregatedTaxAmount: string;
|
|
2100
|
+
aggregatedTaxRate: string;
|
|
2101
|
+
taxableAmount: string;
|
|
2102
|
+
}
|
|
2103
|
+
interface TaxBreakdownNonNullableFields$1 {
|
|
2104
|
+
taxType: string;
|
|
2105
|
+
taxRate: string;
|
|
2106
|
+
jurisdictionType: string;
|
|
2107
|
+
}
|
|
2108
|
+
interface ItemTaxDataNonNullableFields$1 {
|
|
2109
|
+
lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields$1;
|
|
2110
|
+
taxBreakdowns: TaxBreakdownNonNullableFields$1[];
|
|
2111
|
+
}
|
|
2112
|
+
interface InvoiceItemNonNullableFields$1 {
|
|
2113
|
+
recurring?: RecurringNonNullableFields$1;
|
|
2114
|
+
id: string;
|
|
2115
|
+
name: string;
|
|
2116
|
+
catalogReference?: CatalogReferenceNonNullableFields$1;
|
|
2117
|
+
category: ItemCategory$1;
|
|
2118
|
+
quantity: number;
|
|
2119
|
+
priceDetails?: PriceDetailsNonNullableFields$1;
|
|
2120
|
+
totals?: TotalsNonNullableFields$1;
|
|
2121
|
+
taxData?: ItemTaxDataNonNullableFields$1;
|
|
2122
|
+
}
|
|
2123
|
+
interface SubscriptionChargeNonNullableFields$1 {
|
|
2124
|
+
cycle: number;
|
|
2125
|
+
totals?: TotalsNonNullableFields$1;
|
|
2126
|
+
invoiceItems: InvoiceItemNonNullableFields$1[];
|
|
2127
|
+
discount?: InvoiceDiscountNonNullableFields$1;
|
|
2128
|
+
}
|
|
2129
|
+
interface CustomerListUpcomingChargesResponseNonNullableFields$1 {
|
|
2130
|
+
upcomingCharge?: SubscriptionChargeNonNullableFields$1;
|
|
2131
|
+
}
|
|
2132
|
+
interface InitiatePaymentMethodSetupResponseNonNullableFields$1 {
|
|
2133
|
+
paymentOrderId: string;
|
|
2134
|
+
}
|
|
2135
|
+
interface PayCycleResponseNonNullableFields$1 {
|
|
2136
|
+
invoiceId: string;
|
|
2137
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2138
|
+
}
|
|
2139
|
+
interface UpdateSubscriptionBillingDateResponseNonNullableFields$1 {
|
|
2140
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2141
|
+
}
|
|
2142
|
+
interface CancelSubscriptionResponseNonNullableFields$1 {
|
|
2143
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2144
|
+
}
|
|
2145
|
+
interface PauseSubscriptionResponseNonNullableFields$1 {
|
|
2146
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2147
|
+
}
|
|
2148
|
+
interface ResumeSubscriptionResponseNonNullableFields$1 {
|
|
2149
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2150
|
+
}
|
|
2151
|
+
interface SearchSubscriptionsResponseNonNullableFields$1 {
|
|
2152
|
+
subscriptions: SubscriptionNonNullableFields$1[];
|
|
2153
|
+
}
|
|
2154
|
+
interface CountByStatusNonNullableFields$1 {
|
|
2155
|
+
status: SubscriptionStatusEnumSubscriptionStatus$1;
|
|
2156
|
+
count: number;
|
|
2157
|
+
}
|
|
2158
|
+
interface CountSubscriptionsResponseNonNullableFields$1 {
|
|
2159
|
+
countByStatus: CountByStatusNonNullableFields$1[];
|
|
2160
|
+
total: number;
|
|
2161
|
+
}
|
|
2162
|
+
interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields$1 {
|
|
2163
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2164
|
+
}
|
|
2165
|
+
interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields$1 {
|
|
2166
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2167
|
+
}
|
|
2168
|
+
interface MarkLatestInvoiceAsPaidResponseNonNullableFields$1 {
|
|
2169
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2170
|
+
}
|
|
2171
|
+
interface AmountByStatusNonNullableFields$1 {
|
|
2172
|
+
status: SubscriptionStatusEnumSubscriptionStatus$1;
|
|
2173
|
+
amount: number;
|
|
2174
|
+
}
|
|
2175
|
+
interface GetSubscriptionsStatsResponseNonNullableFields$1 {
|
|
2176
|
+
amountByStatuses: AmountByStatusNonNullableFields$1[];
|
|
2177
|
+
total: number;
|
|
2178
|
+
}
|
|
2179
|
+
interface ExtendSubscriptionResponseNonNullableFields$1 {
|
|
2180
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2181
|
+
}
|
|
2182
|
+
interface UnsupportedReasonNonNullableFields$1 {
|
|
2183
|
+
code: string;
|
|
2184
|
+
}
|
|
2185
|
+
interface UnsupportedActionNonNullableFields$1 {
|
|
2186
|
+
actionType: ActionType$1;
|
|
2187
|
+
reasons: UnsupportedReasonNonNullableFields$1[];
|
|
2188
|
+
}
|
|
2189
|
+
interface AllowedActionsResponseNonNullableFields$1 {
|
|
2190
|
+
actions: ActionNonNullableFields$1[];
|
|
2191
|
+
unsupportedActions: UnsupportedActionNonNullableFields$1[];
|
|
2192
|
+
}
|
|
2193
|
+
interface ListUpcomingChargesResponseNonNullableFields$1 {
|
|
2194
|
+
upcomingCharges: SubscriptionChargeNonNullableFields$1[];
|
|
2195
|
+
}
|
|
2196
|
+
interface ChargeNonNullableFields$1 {
|
|
2197
|
+
cycleFrom: number;
|
|
2198
|
+
totals?: TotalsNonNullableFields$1;
|
|
2199
|
+
}
|
|
2200
|
+
interface PreviewSubscriptionChargesResponseNonNullableFields$1 {
|
|
2201
|
+
charges: ChargeNonNullableFields$1[];
|
|
2202
|
+
}
|
|
2203
|
+
interface SubscriptionChargesNonNullableFields$1 {
|
|
2204
|
+
charges: ChargeNonNullableFields$1[];
|
|
2205
|
+
}
|
|
2206
|
+
interface PreviewSubscriptionsChargesResponseNonNullableFields$1 {
|
|
2207
|
+
subscriptionsCharges: SubscriptionChargesNonNullableFields$1[];
|
|
2208
|
+
}
|
|
2209
|
+
interface SubscriptionCreatedNonNullableFields$1 {
|
|
2210
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2211
|
+
}
|
|
2212
|
+
interface SubscriptionUpdatedNonNullableFields$1 {
|
|
2213
|
+
current?: SubscriptionNonNullableFields$1;
|
|
2214
|
+
previous?: SubscriptionNonNullableFields$1;
|
|
2215
|
+
}
|
|
2216
|
+
interface SubscriptionDeletedNonNullableFields$1 {
|
|
2217
|
+
subscriptionId: string;
|
|
2218
|
+
}
|
|
2219
|
+
interface SubscriptionActivatedNonNullableFields$1 {
|
|
2220
|
+
subscription?: SubscriptionNonNullableFields$1;
|
|
2221
|
+
}
|
|
2222
|
+
interface SubscriptionEndedNonNullableFields$1 {
|
|
2031
2223
|
subscription?: SubscriptionNonNullableFields$1;
|
|
2032
2224
|
}
|
|
2033
2225
|
interface ActionDetailsNonNullableFields$1 {
|
|
@@ -2180,166 +2372,6 @@ interface SubscriptionHistoryEntryNonNullableFields$1 {
|
|
|
2180
2372
|
interface ListSubscriptionHistoryResponseNonNullableFields$1 {
|
|
2181
2373
|
historyEntries: SubscriptionHistoryEntryNonNullableFields$1[];
|
|
2182
2374
|
}
|
|
2183
|
-
interface GetSubscriptionResponseNonNullableFields$1 {
|
|
2184
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2185
|
-
}
|
|
2186
|
-
interface CustomerCancelSubscriptionResponseNonNullableFields$1 {
|
|
2187
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2188
|
-
}
|
|
2189
|
-
interface CustomerTurnOnAutoRenewalResponseNonNullableFields$1 {
|
|
2190
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2191
|
-
}
|
|
2192
|
-
interface CustomerTurnOffAutoRenewalResponseNonNullableFields$1 {
|
|
2193
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2194
|
-
}
|
|
2195
|
-
interface CustomerExtendSubscriptionResponseNonNullableFields$1 {
|
|
2196
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2197
|
-
}
|
|
2198
|
-
interface QuerySubscriptionsResponseNonNullableFields$1 {
|
|
2199
|
-
subscriptions: SubscriptionNonNullableFields$1[];
|
|
2200
|
-
}
|
|
2201
|
-
interface UpdateSubscriptionPaymentMethodResponseNonNullableFields$1 {
|
|
2202
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2203
|
-
}
|
|
2204
|
-
interface ActionNonNullableFields$1 {
|
|
2205
|
-
actionType: ActionType$1;
|
|
2206
|
-
pausePolicies: PausePolicy$1[];
|
|
2207
|
-
pauseAt: PauseAt$1[];
|
|
2208
|
-
resumeAt: ResumeAt$1[];
|
|
2209
|
-
extendPolicies: ExtendPolicyType$1[];
|
|
2210
|
-
}
|
|
2211
|
-
interface CustomerAllowedActionsResponseNonNullableFields$1 {
|
|
2212
|
-
actions: ActionNonNullableFields$1[];
|
|
2213
|
-
}
|
|
2214
|
-
interface RecurringNonNullableFields$1 {
|
|
2215
|
-
cycleNumber: number;
|
|
2216
|
-
}
|
|
2217
|
-
interface InvoiceDiscountNonNullableFields$1 {
|
|
2218
|
-
amount: string;
|
|
2219
|
-
percentage: string;
|
|
2220
|
-
origin?: DiscountOriginNonNullableFields$1;
|
|
2221
|
-
}
|
|
2222
|
-
interface InvoiceApplicationFeeNonNullableFields$1 {
|
|
2223
|
-
amount: string;
|
|
2224
|
-
discount?: InvoiceDiscountNonNullableFields$1;
|
|
2225
|
-
}
|
|
2226
|
-
interface PriceDetailsNonNullableFields$1 {
|
|
2227
|
-
price: string;
|
|
2228
|
-
tax?: TaxNonNullableFields$1;
|
|
2229
|
-
discount?: InvoiceDiscountNonNullableFields$1;
|
|
2230
|
-
applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields$1;
|
|
2231
|
-
}
|
|
2232
|
-
interface LineItemTaxSummaryNonNullableFields$1 {
|
|
2233
|
-
aggregatedTaxAmount: string;
|
|
2234
|
-
aggregatedTaxRate: string;
|
|
2235
|
-
taxableAmount: string;
|
|
2236
|
-
}
|
|
2237
|
-
interface TaxBreakdownNonNullableFields$1 {
|
|
2238
|
-
taxType: string;
|
|
2239
|
-
taxRate: string;
|
|
2240
|
-
jurisdictionType: string;
|
|
2241
|
-
}
|
|
2242
|
-
interface ItemTaxDataNonNullableFields$1 {
|
|
2243
|
-
lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields$1;
|
|
2244
|
-
taxBreakdowns: TaxBreakdownNonNullableFields$1[];
|
|
2245
|
-
}
|
|
2246
|
-
interface InvoiceItemNonNullableFields$1 {
|
|
2247
|
-
recurring?: RecurringNonNullableFields$1;
|
|
2248
|
-
id: string;
|
|
2249
|
-
name: string;
|
|
2250
|
-
catalogReference?: CatalogReferenceNonNullableFields$1;
|
|
2251
|
-
category: ItemCategory$1;
|
|
2252
|
-
quantity: number;
|
|
2253
|
-
priceDetails?: PriceDetailsNonNullableFields$1;
|
|
2254
|
-
totals?: TotalsNonNullableFields$1;
|
|
2255
|
-
taxData?: ItemTaxDataNonNullableFields$1;
|
|
2256
|
-
}
|
|
2257
|
-
interface SubscriptionChargeNonNullableFields$1 {
|
|
2258
|
-
cycle: number;
|
|
2259
|
-
totals?: TotalsNonNullableFields$1;
|
|
2260
|
-
invoiceItems: InvoiceItemNonNullableFields$1[];
|
|
2261
|
-
discount?: InvoiceDiscountNonNullableFields$1;
|
|
2262
|
-
}
|
|
2263
|
-
interface CustomerListUpcomingChargesResponseNonNullableFields$1 {
|
|
2264
|
-
upcomingCharge?: SubscriptionChargeNonNullableFields$1;
|
|
2265
|
-
}
|
|
2266
|
-
interface InitiatePaymentMethodSetupResponseNonNullableFields$1 {
|
|
2267
|
-
paymentOrderId: string;
|
|
2268
|
-
}
|
|
2269
|
-
interface UpdateSubscriptionBillingDateResponseNonNullableFields$1 {
|
|
2270
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2271
|
-
}
|
|
2272
|
-
interface CancelSubscriptionResponseNonNullableFields$1 {
|
|
2273
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2274
|
-
}
|
|
2275
|
-
interface PauseSubscriptionResponseNonNullableFields$1 {
|
|
2276
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2277
|
-
}
|
|
2278
|
-
interface ResumeSubscriptionResponseNonNullableFields$1 {
|
|
2279
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2280
|
-
}
|
|
2281
|
-
interface SearchSubscriptionsResponseNonNullableFields$1 {
|
|
2282
|
-
subscriptions: SubscriptionNonNullableFields$1[];
|
|
2283
|
-
}
|
|
2284
|
-
interface CountByStatusNonNullableFields$1 {
|
|
2285
|
-
status: SubscriptionStatusEnumSubscriptionStatus$1;
|
|
2286
|
-
count: number;
|
|
2287
|
-
}
|
|
2288
|
-
interface CountSubscriptionsResponseNonNullableFields$1 {
|
|
2289
|
-
countByStatus: CountByStatusNonNullableFields$1[];
|
|
2290
|
-
total: number;
|
|
2291
|
-
}
|
|
2292
|
-
interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields$1 {
|
|
2293
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2294
|
-
}
|
|
2295
|
-
interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields$1 {
|
|
2296
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2297
|
-
}
|
|
2298
|
-
interface MarkLatestInvoiceAsPaidResponseNonNullableFields$1 {
|
|
2299
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2300
|
-
}
|
|
2301
|
-
interface AmountByStatusNonNullableFields$1 {
|
|
2302
|
-
status: SubscriptionStatusEnumSubscriptionStatus$1;
|
|
2303
|
-
amount: number;
|
|
2304
|
-
}
|
|
2305
|
-
interface GetSubscriptionsStatsResponseNonNullableFields$1 {
|
|
2306
|
-
amountByStatuses: AmountByStatusNonNullableFields$1[];
|
|
2307
|
-
total: number;
|
|
2308
|
-
}
|
|
2309
|
-
interface ExtendSubscriptionResponseNonNullableFields$1 {
|
|
2310
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2311
|
-
}
|
|
2312
|
-
interface UnsupportedReasonNonNullableFields$1 {
|
|
2313
|
-
code: string;
|
|
2314
|
-
}
|
|
2315
|
-
interface UnsupportedActionNonNullableFields$1 {
|
|
2316
|
-
actionType: ActionType$1;
|
|
2317
|
-
reasons: UnsupportedReasonNonNullableFields$1[];
|
|
2318
|
-
}
|
|
2319
|
-
interface AllowedActionsResponseNonNullableFields$1 {
|
|
2320
|
-
actions: ActionNonNullableFields$1[];
|
|
2321
|
-
unsupportedActions: UnsupportedActionNonNullableFields$1[];
|
|
2322
|
-
}
|
|
2323
|
-
interface ListUpcomingChargesResponseNonNullableFields$1 {
|
|
2324
|
-
upcomingCharges: SubscriptionChargeNonNullableFields$1[];
|
|
2325
|
-
}
|
|
2326
|
-
interface ChargeNonNullableFields$1 {
|
|
2327
|
-
cycleFrom: number;
|
|
2328
|
-
totals?: TotalsNonNullableFields$1;
|
|
2329
|
-
}
|
|
2330
|
-
interface PreviewSubscriptionChargesResponseNonNullableFields$1 {
|
|
2331
|
-
charges: ChargeNonNullableFields$1[];
|
|
2332
|
-
}
|
|
2333
|
-
interface SubscriptionChargesNonNullableFields$1 {
|
|
2334
|
-
charges: ChargeNonNullableFields$1[];
|
|
2335
|
-
}
|
|
2336
|
-
interface PreviewSubscriptionsChargesResponseNonNullableFields$1 {
|
|
2337
|
-
subscriptionsCharges: SubscriptionChargesNonNullableFields$1[];
|
|
2338
|
-
}
|
|
2339
|
-
interface PayCycleResponseNonNullableFields$1 {
|
|
2340
|
-
invoiceId: string;
|
|
2341
|
-
subscription?: SubscriptionNonNullableFields$1;
|
|
2342
|
-
}
|
|
2343
2375
|
|
|
2344
2376
|
interface Subscription {
|
|
2345
2377
|
/**
|
|
@@ -2650,10 +2682,32 @@ interface AdditionalFee {
|
|
|
2650
2682
|
*
|
|
2651
2683
|
* + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.
|
|
2652
2684
|
* + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.
|
|
2685
|
+
* @deprecated When the fee is added to the invoice.
|
|
2686
|
+
*
|
|
2687
|
+
* + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.
|
|
2688
|
+
* + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.
|
|
2689
|
+
* @replacedBy cycles
|
|
2690
|
+
* @targetRemovalDate 2025-12-31
|
|
2653
2691
|
*/
|
|
2654
2692
|
trigger?: AdditionalFeeTrigger;
|
|
2655
2693
|
/** Information about the tax of the conditional fee. */
|
|
2656
2694
|
tax?: Tax;
|
|
2695
|
+
/**
|
|
2696
|
+
* Specifies the cycles during which the fee will be applied. If this field is provided,
|
|
2697
|
+
* it determines the exact range of cycles the fee applies to. The logic is as follows:
|
|
2698
|
+
*
|
|
2699
|
+
* - `cycle_from`: The first cycle the fee will be added to. Must be greater than 0.
|
|
2700
|
+
* - `number_of_cycles`: The number of consecutive cycles the fee will be applied to,
|
|
2701
|
+
* starting from `cycle_from`. If not specified, the fee applies to all cycles starting
|
|
2702
|
+
* from `cycle_from`.
|
|
2703
|
+
*
|
|
2704
|
+
* Example:
|
|
2705
|
+
* - `cycle_from = 1, number_of_cycles = 3`: Fee applies to cycles 1, 2, and 3.
|
|
2706
|
+
* - `cycle_from = 2, number_of_cycles = None`: Fee applies to cycles 2 and onward indefinitely.
|
|
2707
|
+
*
|
|
2708
|
+
* If `cycles` is not specified (`None`), the fee will only be applied to the first cycle of the subscription.
|
|
2709
|
+
*/
|
|
2710
|
+
cycles?: Cycles;
|
|
2657
2711
|
}
|
|
2658
2712
|
declare enum AdditionalFeeTrigger {
|
|
2659
2713
|
UNKNOWN = "UNKNOWN",
|
|
@@ -2716,6 +2770,12 @@ declare enum TaxableAddressType {
|
|
|
2716
2770
|
/** Tax will be calculated using multiple address (from BUSINESS to SHIPPING) */
|
|
2717
2771
|
SHIPPING = "SHIPPING"
|
|
2718
2772
|
}
|
|
2773
|
+
interface Cycles {
|
|
2774
|
+
/** The cycle will start. Minimum cycle number is 1 */
|
|
2775
|
+
cycleFrom?: number;
|
|
2776
|
+
/** Number of cycles to be applied on. In order to apply a on all cycles until the end of the subscription, this field should be empty. */
|
|
2777
|
+
numberOfCycles?: number | null;
|
|
2778
|
+
}
|
|
2719
2779
|
interface ShippingCharges {
|
|
2720
2780
|
/**
|
|
2721
2781
|
* Amount of the shipping fee in `0.00` format.
|
|
@@ -3129,147 +3189,18 @@ interface SpecificDateSubscriptionUpdateData {
|
|
|
3129
3189
|
updateData?: SubscriptionUpdateData;
|
|
3130
3190
|
executionDate?: Date | null;
|
|
3131
3191
|
}
|
|
3132
|
-
interface
|
|
3133
|
-
|
|
3134
|
-
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
3135
|
-
mode?: HistoryViewMode;
|
|
3136
|
-
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
3137
|
-
cursor?: CursorPaging;
|
|
3138
|
-
}
|
|
3139
|
-
declare enum HistoryViewMode {
|
|
3140
|
-
UNKNOWN = "UNKNOWN",
|
|
3141
|
-
/** Comprehensive view including all history events. */
|
|
3142
|
-
BACKOFFICE = "BACKOFFICE",
|
|
3143
|
-
/** User-centric view of the history. */
|
|
3144
|
-
USER = "USER"
|
|
3145
|
-
}
|
|
3146
|
-
interface CursorPaging {
|
|
3147
|
-
/** Maximum number of items to return in the results. */
|
|
3148
|
-
limit?: number | null;
|
|
3149
|
-
/**
|
|
3150
|
-
* Pointer to the next or previous page in the list of results.
|
|
3151
|
-
*
|
|
3152
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
3153
|
-
* Not relevant for the first request.
|
|
3154
|
-
*/
|
|
3155
|
-
cursor?: string | null;
|
|
3156
|
-
}
|
|
3157
|
-
interface ListSubscriptionHistoryResponse {
|
|
3158
|
-
/** List of history entries for the subscription. */
|
|
3159
|
-
historyEntries?: SubscriptionHistoryEntry[];
|
|
3160
|
-
/** Paging metadata. A `next` cursor is returned if there are more results. */
|
|
3161
|
-
pagingMetadata?: PagingMetadataV2;
|
|
3162
|
-
}
|
|
3163
|
-
interface SubscriptionHistoryEntry {
|
|
3164
|
-
entryId?: string;
|
|
3165
|
-
/** TODO: add max length? it is not defined in domainevents, so should we? */
|
|
3166
|
-
slug?: string;
|
|
3167
|
-
entryTime?: Date | null;
|
|
3168
|
-
event?: SubscriptionEvent;
|
|
3169
|
-
}
|
|
3170
|
-
interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
|
|
3171
|
-
created?: SubscriptionCreated;
|
|
3172
|
-
updated?: SubscriptionUpdated;
|
|
3173
|
-
deleted?: SubscriptionDeleted;
|
|
3174
|
-
activated?: SubscriptionActivated;
|
|
3175
|
-
ended?: SubscriptionEnded;
|
|
3176
|
-
canceled?: SubscriptionCanceled;
|
|
3177
|
-
paused?: SubscriptionPaused;
|
|
3178
|
-
resumed?: SubscriptionResumed;
|
|
3179
|
-
pauseRequested?: PauseSubscriptionRequested;
|
|
3180
|
-
resumeRequested?: ResumeSubscriptionRequested;
|
|
3181
|
-
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
3182
|
-
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
3183
|
-
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
3184
|
-
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
3185
|
-
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
3186
|
-
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
3187
|
-
extended?: SubscriptionExtended;
|
|
3188
|
-
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
3189
|
-
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
3190
|
-
revived?: SubscriptionRevived;
|
|
3191
|
-
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
3192
|
-
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
3193
|
-
updatesApplied?: UpdatesApplied;
|
|
3194
|
-
resetPendingUpdates?: ResetPendingUpdates;
|
|
3195
|
-
gracePeriodStarted?: GracePeriodStarted;
|
|
3196
|
-
gracePeriodEnded?: GracePeriodEnded;
|
|
3197
|
-
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
3198
|
-
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
3199
|
-
freeTrailStarted?: FreeTrailStarted;
|
|
3200
|
-
freeTrailEnded?: FreeTrailEnded;
|
|
3201
|
-
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
3202
|
-
unknown?: UnknownSubscriptionEvent;
|
|
3203
|
-
}
|
|
3204
|
-
/** @oneof */
|
|
3205
|
-
interface SubscriptionEventPayloadOneOf {
|
|
3206
|
-
created?: SubscriptionCreated;
|
|
3207
|
-
updated?: SubscriptionUpdated;
|
|
3208
|
-
deleted?: SubscriptionDeleted;
|
|
3209
|
-
activated?: SubscriptionActivated;
|
|
3210
|
-
ended?: SubscriptionEnded;
|
|
3211
|
-
canceled?: SubscriptionCanceled;
|
|
3212
|
-
paused?: SubscriptionPaused;
|
|
3213
|
-
resumed?: SubscriptionResumed;
|
|
3214
|
-
pauseRequested?: PauseSubscriptionRequested;
|
|
3215
|
-
resumeRequested?: ResumeSubscriptionRequested;
|
|
3216
|
-
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
3217
|
-
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
3218
|
-
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
3219
|
-
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
3220
|
-
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
3221
|
-
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
3222
|
-
extended?: SubscriptionExtended;
|
|
3223
|
-
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
3224
|
-
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
3225
|
-
revived?: SubscriptionRevived;
|
|
3226
|
-
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
3227
|
-
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
3228
|
-
updatesApplied?: UpdatesApplied;
|
|
3229
|
-
resetPendingUpdates?: ResetPendingUpdates;
|
|
3230
|
-
gracePeriodStarted?: GracePeriodStarted;
|
|
3231
|
-
gracePeriodEnded?: GracePeriodEnded;
|
|
3232
|
-
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
3233
|
-
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
3234
|
-
freeTrailStarted?: FreeTrailStarted;
|
|
3235
|
-
freeTrailEnded?: FreeTrailEnded;
|
|
3236
|
-
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
3237
|
-
unknown?: UnknownSubscriptionEvent;
|
|
3192
|
+
interface GetSubscriptionRequest {
|
|
3193
|
+
_id: string;
|
|
3238
3194
|
}
|
|
3239
|
-
interface
|
|
3195
|
+
interface GetSubscriptionResponse {
|
|
3240
3196
|
subscription?: Subscription;
|
|
3241
3197
|
}
|
|
3242
|
-
interface
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
}
|
|
3247
|
-
interface SubscriptionDiff {
|
|
3248
|
-
added?: string | null;
|
|
3249
|
-
changed?: string | null;
|
|
3250
|
-
deleted?: string | null;
|
|
3251
|
-
}
|
|
3252
|
-
interface SubscriptionDeleted {
|
|
3253
|
-
subscriptionId?: string;
|
|
3254
|
-
}
|
|
3255
|
-
/**
|
|
3256
|
-
* Sent each time a subscription status has been set to Active
|
|
3257
|
-
* Active shows that a subscription is live and operational.
|
|
3258
|
-
* For example:
|
|
3259
|
-
* * For subscription with free trial, free trial start date is also the activation date.
|
|
3260
|
-
* * For a subscription with future start date, the start date is also the activation date.
|
|
3261
|
-
* * When a subscription is resumed from a pause status, the resume date is also the activation date.
|
|
3262
|
-
*/
|
|
3263
|
-
interface SubscriptionActivated {
|
|
3264
|
-
subscription?: Subscription;
|
|
3198
|
+
interface CustomerCancelSubscriptionRequest {
|
|
3199
|
+
_id: string;
|
|
3200
|
+
/** Optional action reason message */
|
|
3201
|
+
reason?: string | null;
|
|
3265
3202
|
}
|
|
3266
|
-
|
|
3267
|
-
* Sent each time a subscription status has been set to Ended
|
|
3268
|
-
* Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
|
|
3269
|
-
* This is different from a Canceled subscription which ends the subscription before a designated end date.
|
|
3270
|
-
* Therefore, Ended and Canceled are mutually exclusive.
|
|
3271
|
-
*/
|
|
3272
|
-
interface SubscriptionEnded {
|
|
3203
|
+
interface CustomerCancelSubscriptionResponse {
|
|
3273
3204
|
subscription?: Subscription;
|
|
3274
3205
|
}
|
|
3275
3206
|
/**
|
|
@@ -3287,48 +3218,32 @@ interface ActionDetails {
|
|
|
3287
3218
|
initiator?: HistoryActionInitiator;
|
|
3288
3219
|
reason?: string | null;
|
|
3289
3220
|
}
|
|
3290
|
-
interface
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
}
|
|
3295
|
-
interface SubscriptionResumed {
|
|
3296
|
-
subscription?: Subscription;
|
|
3297
|
-
actionDetails?: ActionDetails;
|
|
3221
|
+
interface CustomerTurnOnAutoRenewalRequest {
|
|
3222
|
+
_id: string;
|
|
3223
|
+
/** Optional action reason message */
|
|
3224
|
+
reason?: string | null;
|
|
3298
3225
|
}
|
|
3299
|
-
interface
|
|
3226
|
+
interface CustomerTurnOnAutoRenewalResponse {
|
|
3300
3227
|
subscription?: Subscription;
|
|
3301
|
-
pauseAt?: PauseAt;
|
|
3302
|
-
pausePolicy?: PausePolicy;
|
|
3303
|
-
actionDetails?: ActionDetails;
|
|
3304
3228
|
}
|
|
3305
|
-
interface
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3229
|
+
interface CustomerTurnOffAutoRenewalRequest {
|
|
3230
|
+
_id: string;
|
|
3231
|
+
/** Optional action reason message */
|
|
3232
|
+
reason?: string | null;
|
|
3309
3233
|
}
|
|
3310
|
-
interface
|
|
3234
|
+
interface CustomerTurnOffAutoRenewalResponse {
|
|
3311
3235
|
subscription?: Subscription;
|
|
3312
|
-
actionDetails?: ActionDetails;
|
|
3313
3236
|
}
|
|
3314
|
-
interface
|
|
3315
|
-
subscription
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
paymentTransactionId?: string | null;
|
|
3322
|
-
}
|
|
3323
|
-
interface SubscriptionAutoRenewalTurnedOn {
|
|
3324
|
-
subscription?: Subscription;
|
|
3325
|
-
actionDetails?: ActionDetails;
|
|
3326
|
-
}
|
|
3327
|
-
interface SubscriptionAutoRenewalTurnedOff {
|
|
3328
|
-
subscription?: Subscription;
|
|
3329
|
-
actionDetails?: ActionDetails;
|
|
3237
|
+
interface CustomerExtendSubscriptionRequest {
|
|
3238
|
+
/** The ID of the subscription to be extended */
|
|
3239
|
+
_id: string;
|
|
3240
|
+
/** Optional action reason message */
|
|
3241
|
+
reason?: string | null;
|
|
3242
|
+
/** For termed - Subscription end date will be updated with the extension period and number of cycles will be added */
|
|
3243
|
+
billingCyclesToAdd: number | null;
|
|
3330
3244
|
}
|
|
3331
|
-
interface
|
|
3245
|
+
interface CustomerExtendSubscriptionResponse {
|
|
3246
|
+
/** The now extended subscription */
|
|
3332
3247
|
subscription?: Subscription;
|
|
3333
3248
|
}
|
|
3334
3249
|
interface SubscriptionExtended extends SubscriptionExtendedExtendPolicyOneOf {
|
|
@@ -3342,156 +3257,6 @@ interface SubscriptionExtendedExtendPolicyOneOf {
|
|
|
3342
3257
|
extensionPeriod?: Duration;
|
|
3343
3258
|
extensionBillingCycles?: number;
|
|
3344
3259
|
}
|
|
3345
|
-
interface SubscriptionInitialPurchaseCompleted {
|
|
3346
|
-
subscription?: Subscription;
|
|
3347
|
-
actionDetails?: ActionDetails;
|
|
3348
|
-
paymentTransactionId?: string | null;
|
|
3349
|
-
}
|
|
3350
|
-
interface LatestInvoiceMarkedAsPaid {
|
|
3351
|
-
subscription?: Subscription;
|
|
3352
|
-
}
|
|
3353
|
-
interface SubscriptionRevived {
|
|
3354
|
-
subscription?: Subscription;
|
|
3355
|
-
}
|
|
3356
|
-
interface SubscriptionBillingDateUpdated {
|
|
3357
|
-
subscription?: Subscription;
|
|
3358
|
-
billingDate?: Date | null;
|
|
3359
|
-
proration?: Proration;
|
|
3360
|
-
}
|
|
3361
|
-
interface FutureUpdatesRequested {
|
|
3362
|
-
subscription?: Subscription;
|
|
3363
|
-
requestedUpdateData?: SubscriptionUpdateData;
|
|
3364
|
-
}
|
|
3365
|
-
interface UpdatesApplied {
|
|
3366
|
-
subscription?: Subscription;
|
|
3367
|
-
updateAction?: UpdateAction;
|
|
3368
|
-
appliedUpdateData?: SubscriptionUpdateData;
|
|
3369
|
-
}
|
|
3370
|
-
declare enum UpdateAction {
|
|
3371
|
-
NONE = "NONE",
|
|
3372
|
-
/** Update subscription immediately, please note proration for updates changing price are not yet supported */
|
|
3373
|
-
IMMEDIATELY = "IMMEDIATELY",
|
|
3374
|
-
/** Request updates that will take affect only at the start of the next billing cycle. */
|
|
3375
|
-
NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
|
|
3376
|
-
/** Reset all pending updates */
|
|
3377
|
-
RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
|
|
3378
|
-
/** Request updates that will take affect only at a specific date. */
|
|
3379
|
-
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
3380
|
-
}
|
|
3381
|
-
interface ResetPendingUpdates {
|
|
3382
|
-
subscription?: Subscription;
|
|
3383
|
-
}
|
|
3384
|
-
interface GracePeriodStarted {
|
|
3385
|
-
subscription?: Subscription;
|
|
3386
|
-
}
|
|
3387
|
-
interface GracePeriodEnded {
|
|
3388
|
-
subscription?: Subscription;
|
|
3389
|
-
/** Indication for the payment settlement method. */
|
|
3390
|
-
paymentSettlementMethod?: PaymentSettlementMethod;
|
|
3391
|
-
}
|
|
3392
|
-
declare enum PaymentSettlementMethod {
|
|
3393
|
-
UNKNOWN = "UNKNOWN",
|
|
3394
|
-
/** System-defined payment settlement. */
|
|
3395
|
-
SYSTEM = "SYSTEM",
|
|
3396
|
-
/** Manually mark the payment as paid. */
|
|
3397
|
-
MARK_AS_PAID = "MARK_AS_PAID",
|
|
3398
|
-
/** Require the customer to pay immediately, by insert a new payment method. */
|
|
3399
|
-
CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
|
|
3400
|
-
}
|
|
3401
|
-
interface PaymentMethodUpdated {
|
|
3402
|
-
subscription?: Subscription;
|
|
3403
|
-
initiator?: HistoryActionInitiator;
|
|
3404
|
-
paymentMode?: PaymentMode;
|
|
3405
|
-
}
|
|
3406
|
-
declare enum PaymentMode {
|
|
3407
|
-
NONE = "NONE",
|
|
3408
|
-
/** The latest invoice of the subscription will be charged. */
|
|
3409
|
-
CHARGE = "CHARGE",
|
|
3410
|
-
/** An authorization invoice with zero amount will be created. */
|
|
3411
|
-
AUTHORIZATION = "AUTHORIZATION"
|
|
3412
|
-
}
|
|
3413
|
-
interface SubscriptionCollectionMethodUpdated {
|
|
3414
|
-
subscription?: Subscription;
|
|
3415
|
-
newCollectionMethod?: CollectionMethodEnumCollectionMethod;
|
|
3416
|
-
previousCollectionMethod?: CollectionMethodEnumCollectionMethod;
|
|
3417
|
-
}
|
|
3418
|
-
interface FreeTrailStarted {
|
|
3419
|
-
subscription?: Subscription;
|
|
3420
|
-
}
|
|
3421
|
-
interface FreeTrailEnded {
|
|
3422
|
-
subscription?: Subscription;
|
|
3423
|
-
}
|
|
3424
|
-
interface SubscriptionBackOfficeAction {
|
|
3425
|
-
subscription?: Subscription;
|
|
3426
|
-
/** The backoffice method name */
|
|
3427
|
-
name?: string;
|
|
3428
|
-
/** json as string format, to store the flatted request object */
|
|
3429
|
-
params?: string;
|
|
3430
|
-
}
|
|
3431
|
-
/** Defines unknown events restored from the logs */
|
|
3432
|
-
interface UnknownSubscriptionEvent {
|
|
3433
|
-
subscriptionAsString?: string | null;
|
|
3434
|
-
}
|
|
3435
|
-
interface PagingMetadataV2 {
|
|
3436
|
-
/** Number of items returned in the response. */
|
|
3437
|
-
count?: number | null;
|
|
3438
|
-
/** Offset that was requested. */
|
|
3439
|
-
offset?: number | null;
|
|
3440
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
3441
|
-
total?: number | null;
|
|
3442
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
3443
|
-
tooManyToCount?: boolean | null;
|
|
3444
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
3445
|
-
cursors?: Cursors;
|
|
3446
|
-
}
|
|
3447
|
-
interface Cursors {
|
|
3448
|
-
/** Cursor string pointing to the next page in the list of results. */
|
|
3449
|
-
next?: string | null;
|
|
3450
|
-
/** Cursor pointing to the previous page in the list of results. */
|
|
3451
|
-
prev?: string | null;
|
|
3452
|
-
}
|
|
3453
|
-
interface GetSubscriptionRequest {
|
|
3454
|
-
_id: string;
|
|
3455
|
-
}
|
|
3456
|
-
interface GetSubscriptionResponse {
|
|
3457
|
-
subscription?: Subscription;
|
|
3458
|
-
}
|
|
3459
|
-
interface CustomerCancelSubscriptionRequest {
|
|
3460
|
-
_id: string;
|
|
3461
|
-
/** Optional action reason message */
|
|
3462
|
-
reason?: string | null;
|
|
3463
|
-
}
|
|
3464
|
-
interface CustomerCancelSubscriptionResponse {
|
|
3465
|
-
subscription?: Subscription;
|
|
3466
|
-
}
|
|
3467
|
-
interface CustomerTurnOnAutoRenewalRequest {
|
|
3468
|
-
_id: string;
|
|
3469
|
-
/** Optional action reason message */
|
|
3470
|
-
reason?: string | null;
|
|
3471
|
-
}
|
|
3472
|
-
interface CustomerTurnOnAutoRenewalResponse {
|
|
3473
|
-
subscription?: Subscription;
|
|
3474
|
-
}
|
|
3475
|
-
interface CustomerTurnOffAutoRenewalRequest {
|
|
3476
|
-
_id: string;
|
|
3477
|
-
/** Optional action reason message */
|
|
3478
|
-
reason?: string | null;
|
|
3479
|
-
}
|
|
3480
|
-
interface CustomerTurnOffAutoRenewalResponse {
|
|
3481
|
-
subscription?: Subscription;
|
|
3482
|
-
}
|
|
3483
|
-
interface CustomerExtendSubscriptionRequest {
|
|
3484
|
-
/** The ID of the subscription to be extended */
|
|
3485
|
-
_id: string;
|
|
3486
|
-
/** Optional action reason message */
|
|
3487
|
-
reason?: string | null;
|
|
3488
|
-
/** For termed - Subscription end date will be updated with the extension period and number of cycles will be added */
|
|
3489
|
-
billingCyclesToAdd: number | null;
|
|
3490
|
-
}
|
|
3491
|
-
interface CustomerExtendSubscriptionResponse {
|
|
3492
|
-
/** The now extended subscription */
|
|
3493
|
-
subscription?: Subscription;
|
|
3494
|
-
}
|
|
3495
3260
|
interface QuerySubscriptionsRequest {
|
|
3496
3261
|
query?: QueryV2;
|
|
3497
3262
|
}
|
|
@@ -3540,10 +3305,39 @@ interface Paging {
|
|
|
3540
3305
|
/** Number of items to skip in the current sort order. */
|
|
3541
3306
|
offset?: number | null;
|
|
3542
3307
|
}
|
|
3308
|
+
interface CursorPaging {
|
|
3309
|
+
/** Maximum number of items to return in the results. */
|
|
3310
|
+
limit?: number | null;
|
|
3311
|
+
/**
|
|
3312
|
+
* Pointer to the next or previous page in the list of results.
|
|
3313
|
+
*
|
|
3314
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
3315
|
+
* Not relevant for the first request.
|
|
3316
|
+
*/
|
|
3317
|
+
cursor?: string | null;
|
|
3318
|
+
}
|
|
3543
3319
|
interface QuerySubscriptionsResponse {
|
|
3544
3320
|
subscriptions?: Subscription[];
|
|
3545
3321
|
metadata?: PagingMetadataV2;
|
|
3546
3322
|
}
|
|
3323
|
+
interface PagingMetadataV2 {
|
|
3324
|
+
/** Number of items returned in the response. */
|
|
3325
|
+
count?: number | null;
|
|
3326
|
+
/** Offset that was requested. */
|
|
3327
|
+
offset?: number | null;
|
|
3328
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
3329
|
+
total?: number | null;
|
|
3330
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
3331
|
+
tooManyToCount?: boolean | null;
|
|
3332
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
3333
|
+
cursors?: Cursors;
|
|
3334
|
+
}
|
|
3335
|
+
interface Cursors {
|
|
3336
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
3337
|
+
next?: string | null;
|
|
3338
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
3339
|
+
prev?: string | null;
|
|
3340
|
+
}
|
|
3547
3341
|
interface CountSubscriptionsRequest {
|
|
3548
3342
|
/** Filters to specify which subscriptions are counted. */
|
|
3549
3343
|
filter?: CountSubscriptionFilter;
|
|
@@ -3847,6 +3641,13 @@ interface InitiatePaymentMethodSetupRequest {
|
|
|
3847
3641
|
paymentMode?: PaymentMode;
|
|
3848
3642
|
paymentSettings?: PaymentSettings;
|
|
3849
3643
|
}
|
|
3644
|
+
declare enum PaymentMode {
|
|
3645
|
+
NONE = "NONE",
|
|
3646
|
+
/** The latest invoice of the subscription will be charged. */
|
|
3647
|
+
CHARGE = "CHARGE",
|
|
3648
|
+
/** An authorization invoice with zero amount will be created. */
|
|
3649
|
+
AUTHORIZATION = "AUTHORIZATION"
|
|
3650
|
+
}
|
|
3850
3651
|
interface PaymentSettings {
|
|
3851
3652
|
/** Allowed payment providers for Subscriptions, for example to limit subscriptions to be created only with "Wix Payments" provider. */
|
|
3852
3653
|
allowedProviderIds?: string[];
|
|
@@ -3889,41 +3690,115 @@ interface PaymentOrigin {
|
|
|
3889
3690
|
interface InitiatePaymentMethodSetupResponse {
|
|
3890
3691
|
paymentOrderId?: string;
|
|
3891
3692
|
}
|
|
3892
|
-
interface
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
billingDate: Date | null;
|
|
3897
|
-
/**
|
|
3898
|
-
* Information about how BASS adjusts the total of the next invoice. Extending
|
|
3899
|
-
* the current billing cycle results in a higher payment, while shortening it
|
|
3900
|
-
* leads to a lower payment. BASS offers automatic calculation of the proration
|
|
3901
|
-
* amount based on the number of days added to or removed from the current billing
|
|
3902
|
-
* cycle. Alternatively, you can use your own custom method to calculate the
|
|
3903
|
-
* proration amount. The custom proration amount can't exceed the total of the
|
|
3904
|
-
* current billing cycle.
|
|
3905
|
-
*/
|
|
3906
|
-
proration?: Proration;
|
|
3693
|
+
interface PayCycleRequest {
|
|
3694
|
+
subscriptionId: string;
|
|
3695
|
+
paymentTestMode?: PaymentTestMode;
|
|
3696
|
+
tenantId: string;
|
|
3907
3697
|
}
|
|
3908
|
-
|
|
3909
|
-
|
|
3698
|
+
declare enum PaymentTestMode {
|
|
3699
|
+
REGULAR = "REGULAR",
|
|
3700
|
+
FAIL_TECHNICAL = "FAIL_TECHNICAL",
|
|
3701
|
+
FAIL_DECLINE = "FAIL_DECLINE",
|
|
3702
|
+
FAIL_RETRYABLE_DECLINE = "FAIL_RETRYABLE_DECLINE"
|
|
3703
|
+
}
|
|
3704
|
+
interface PayCycleResponse {
|
|
3705
|
+
invoiceId?: string;
|
|
3706
|
+
paymentOrderId?: string | null;
|
|
3910
3707
|
subscription?: Subscription;
|
|
3911
3708
|
}
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3709
|
+
declare enum ActionInitiator {
|
|
3710
|
+
UNDEFINED = "UNDEFINED",
|
|
3711
|
+
BUSINESS = "BUSINESS",
|
|
3712
|
+
CUSTOMER = "CUSTOMER",
|
|
3713
|
+
SYSTEM = "SYSTEM"
|
|
3714
|
+
}
|
|
3715
|
+
interface SubscriptionBillingCycleStarted {
|
|
3716
|
+
subscription?: Subscription;
|
|
3717
|
+
/** Wix Pay transaction id, optional. Exists if event was triggered by a payment. */
|
|
3718
|
+
paymentTransactionId?: string | null;
|
|
3719
|
+
}
|
|
3720
|
+
/**
|
|
3721
|
+
* Sent each time a subscription status has been set to Active
|
|
3722
|
+
* Active shows that a subscription is live and operational.
|
|
3723
|
+
* For example:
|
|
3724
|
+
* * For subscription with free trial, free trial start date is also the activation date.
|
|
3725
|
+
* * For a subscription with future start date, the start date is also the activation date.
|
|
3726
|
+
* * When a subscription is resumed from a pause status, the resume date is also the activation date.
|
|
3727
|
+
*/
|
|
3728
|
+
interface SubscriptionActivated {
|
|
3729
|
+
subscription?: Subscription;
|
|
3730
|
+
}
|
|
3731
|
+
/**
|
|
3732
|
+
* Sent each time a subscription status has been set to Ended
|
|
3733
|
+
* Ended shows that a subscription reached its end date and ended its life cycle as a result of the agreement.
|
|
3734
|
+
* This is different from a Canceled subscription which ends the subscription before a designated end date.
|
|
3735
|
+
* Therefore, Ended and Canceled are mutually exclusive.
|
|
3736
|
+
*/
|
|
3737
|
+
interface SubscriptionEnded {
|
|
3738
|
+
subscription?: Subscription;
|
|
3739
|
+
}
|
|
3740
|
+
interface SubscriptionInitialPurchaseCompleted {
|
|
3741
|
+
subscription?: Subscription;
|
|
3742
|
+
actionDetails?: ActionDetails;
|
|
3743
|
+
paymentTransactionId?: string | null;
|
|
3744
|
+
}
|
|
3745
|
+
interface SubscriptionCycleReadyToPay {
|
|
3746
|
+
subscription?: Subscription;
|
|
3747
|
+
}
|
|
3748
|
+
interface SubscriptionRevived {
|
|
3749
|
+
subscription?: Subscription;
|
|
3750
|
+
}
|
|
3751
|
+
interface UpdateSubscriptionBillingDateRequest {
|
|
3752
|
+
/** ID of the subscription to update the billing date for. */
|
|
3753
|
+
_id: string;
|
|
3754
|
+
/** New billing date in `YYYY-MM-DDThh:mm:ss:sssZ` format. */
|
|
3755
|
+
billingDate: Date | null;
|
|
3756
|
+
/**
|
|
3757
|
+
* Information about how BASS adjusts the total of the next invoice. Extending
|
|
3758
|
+
* the current billing cycle results in a higher payment, while shortening it
|
|
3759
|
+
* leads to a lower payment. BASS offers automatic calculation of the proration
|
|
3760
|
+
* amount based on the number of days added to or removed from the current billing
|
|
3761
|
+
* cycle. Alternatively, you can use your own custom method to calculate the
|
|
3762
|
+
* proration amount. The custom proration amount can't exceed the total of the
|
|
3763
|
+
* current billing cycle.
|
|
3764
|
+
*/
|
|
3765
|
+
proration?: Proration;
|
|
3766
|
+
}
|
|
3767
|
+
interface UpdateSubscriptionBillingDateResponse {
|
|
3768
|
+
/** Updated subscription. */
|
|
3769
|
+
subscription?: Subscription;
|
|
3770
|
+
}
|
|
3771
|
+
interface SubscriptionBillingDateUpdated {
|
|
3772
|
+
subscription?: Subscription;
|
|
3773
|
+
billingDate?: Date | null;
|
|
3774
|
+
proration?: Proration;
|
|
3775
|
+
}
|
|
3776
|
+
declare enum UpdateAction {
|
|
3777
|
+
NONE = "NONE",
|
|
3778
|
+
/** Update subscription immediately, please note proration for updates changing price are not yet supported */
|
|
3779
|
+
IMMEDIATELY = "IMMEDIATELY",
|
|
3780
|
+
/** Request updates that will take affect only at the start of the next billing cycle. */
|
|
3781
|
+
NEXT_BILLING_CYCLE = "NEXT_BILLING_CYCLE",
|
|
3782
|
+
/** Reset all pending updates */
|
|
3783
|
+
RESET_PENDING_UPDATES = "RESET_PENDING_UPDATES",
|
|
3784
|
+
/** Request updates that will take affect only at a specific date. */
|
|
3785
|
+
SPECIFIC_DATE = "SPECIFIC_DATE"
|
|
3786
|
+
}
|
|
3787
|
+
interface ScheduleAdditionalInfo extends ScheduleAdditionalInfoParamOneOf {
|
|
3788
|
+
/**
|
|
3789
|
+
* Future date when the update becomes effective in `YYYY-MM-DDThh:mm:ss.sssZ`
|
|
3790
|
+
* format. The use of this field may be restricted in various BASS endpoints.
|
|
3791
|
+
* For example, in _Bulk Update Subscription Items_ it's only available in
|
|
3792
|
+
* combination with `{"updateAction": "SPECIFIC_DATE"}`, in _Resume Subscription_
|
|
3793
|
+
* only in combination with `{"resumeAt": "SPECIFIC_DATE"}`, and in
|
|
3794
|
+
* _Pause Subscription_ only in combination with `{"pauseAt": "SPECIFIC_DATE"}`.
|
|
3795
|
+
*/
|
|
3796
|
+
specificDate?: Date | null;
|
|
3797
|
+
/**
|
|
3798
|
+
* When the update becomes effective, as number of billing cycles from now.
|
|
3799
|
+
* The use of this field may be restricted in various BASS endpoints.
|
|
3800
|
+
* For example, in _Pause Subscription_ it's only available in
|
|
3801
|
+
* combination with `{"pauseAt": "NUMBER_OF_CYCLES_FROM_TODAY"}`.
|
|
3927
3802
|
* __Note__: Currently not supported in _Bulk Update Subscription Items by Filter_.
|
|
3928
3803
|
*/
|
|
3929
3804
|
numberOfCycles?: number;
|
|
@@ -3957,12 +3832,6 @@ interface ActionContext {
|
|
|
3957
3832
|
/** Optional action reason message */
|
|
3958
3833
|
reason?: string | null;
|
|
3959
3834
|
}
|
|
3960
|
-
declare enum ActionInitiator {
|
|
3961
|
-
UNDEFINED = "UNDEFINED",
|
|
3962
|
-
BUSINESS = "BUSINESS",
|
|
3963
|
-
CUSTOMER = "CUSTOMER",
|
|
3964
|
-
SYSTEM = "SYSTEM"
|
|
3965
|
-
}
|
|
3966
3835
|
interface CancelSubscriptionResponse {
|
|
3967
3836
|
subscription?: Subscription;
|
|
3968
3837
|
}
|
|
@@ -3979,6 +3848,21 @@ interface PauseSubscriptionRequest {
|
|
|
3979
3848
|
interface PauseSubscriptionResponse {
|
|
3980
3849
|
subscription?: Subscription;
|
|
3981
3850
|
}
|
|
3851
|
+
interface SubscriptionPaused {
|
|
3852
|
+
subscription?: Subscription;
|
|
3853
|
+
pausePolicy?: PausePolicy;
|
|
3854
|
+
actionDetails?: ActionDetails;
|
|
3855
|
+
}
|
|
3856
|
+
interface PauseSubscriptionRequested {
|
|
3857
|
+
subscription?: Subscription;
|
|
3858
|
+
pauseAt?: PauseAt;
|
|
3859
|
+
pausePolicy?: PausePolicy;
|
|
3860
|
+
actionDetails?: ActionDetails;
|
|
3861
|
+
}
|
|
3862
|
+
interface ScheduledPauseCanceled {
|
|
3863
|
+
subscription?: Subscription;
|
|
3864
|
+
actionDetails?: ActionDetails;
|
|
3865
|
+
}
|
|
3982
3866
|
interface ResumeSubscriptionRequest {
|
|
3983
3867
|
_id: string;
|
|
3984
3868
|
resumeAt?: ResumeAt;
|
|
@@ -3989,6 +3873,19 @@ interface ResumeSubscriptionRequest {
|
|
|
3989
3873
|
interface ResumeSubscriptionResponse {
|
|
3990
3874
|
subscription?: Subscription;
|
|
3991
3875
|
}
|
|
3876
|
+
interface SubscriptionResumed {
|
|
3877
|
+
subscription?: Subscription;
|
|
3878
|
+
actionDetails?: ActionDetails;
|
|
3879
|
+
}
|
|
3880
|
+
interface ResumeSubscriptionRequested {
|
|
3881
|
+
subscription?: Subscription;
|
|
3882
|
+
resumeAt?: ResumeAt;
|
|
3883
|
+
actionDetails?: ActionDetails;
|
|
3884
|
+
}
|
|
3885
|
+
interface ScheduledResumeCanceled {
|
|
3886
|
+
subscription?: Subscription;
|
|
3887
|
+
actionDetails?: ActionDetails;
|
|
3888
|
+
}
|
|
3992
3889
|
interface SearchSubscriptionsRequest extends SearchSubscriptionsRequestPagingMethodOneOf {
|
|
3993
3890
|
/** Limit number of results and enable to skip rows. The default limit is 25. */
|
|
3994
3891
|
paging?: Paging;
|
|
@@ -4020,6 +3917,10 @@ interface TurnOnSubscriptionAutoRenewalRequest {
|
|
|
4020
3917
|
interface TurnOnSubscriptionAutoRenewalResponse {
|
|
4021
3918
|
subscription?: Subscription;
|
|
4022
3919
|
}
|
|
3920
|
+
interface SubscriptionAutoRenewalTurnedOn {
|
|
3921
|
+
subscription?: Subscription;
|
|
3922
|
+
actionDetails?: ActionDetails;
|
|
3923
|
+
}
|
|
4023
3924
|
interface TurnOffSubscriptionAutoRenewalRequest {
|
|
4024
3925
|
_id: string;
|
|
4025
3926
|
actionContext: ActionContext;
|
|
@@ -4027,6 +3928,10 @@ interface TurnOffSubscriptionAutoRenewalRequest {
|
|
|
4027
3928
|
interface TurnOffSubscriptionAutoRenewalResponse {
|
|
4028
3929
|
subscription?: Subscription;
|
|
4029
3930
|
}
|
|
3931
|
+
interface SubscriptionAutoRenewalTurnedOff {
|
|
3932
|
+
subscription?: Subscription;
|
|
3933
|
+
actionDetails?: ActionDetails;
|
|
3934
|
+
}
|
|
4030
3935
|
interface MarkLatestInvoiceAsPaidRequest {
|
|
4031
3936
|
/** The ID of the offline subscription to mark as paid its latest invoice */
|
|
4032
3937
|
subscriptionId: string;
|
|
@@ -4034,6 +3939,9 @@ interface MarkLatestInvoiceAsPaidRequest {
|
|
|
4034
3939
|
interface MarkLatestInvoiceAsPaidResponse {
|
|
4035
3940
|
subscription?: Subscription;
|
|
4036
3941
|
}
|
|
3942
|
+
interface LatestInvoiceMarkedAsPaid {
|
|
3943
|
+
subscription?: Subscription;
|
|
3944
|
+
}
|
|
4037
3945
|
interface GetSubscriptionsStatsRequest {
|
|
4038
3946
|
}
|
|
4039
3947
|
interface GetSubscriptionsStatsResponse {
|
|
@@ -4172,21 +4080,173 @@ interface SubscriptionCharges {
|
|
|
4172
4080
|
/** Charges for subscription. */
|
|
4173
4081
|
charges?: Charge[];
|
|
4174
4082
|
}
|
|
4175
|
-
interface
|
|
4083
|
+
interface ListSubscriptionHistoryRequest {
|
|
4176
4084
|
subscriptionId: string;
|
|
4177
|
-
|
|
4178
|
-
|
|
4085
|
+
/** Determines the type of view for the history: either a comprehensive backoffice view or a user-centric view. */
|
|
4086
|
+
mode?: HistoryViewMode;
|
|
4087
|
+
/** Cursor for efficient paging. If paging through results, pass this field from the previous search response to continue to the next page. */
|
|
4088
|
+
cursor?: CursorPaging;
|
|
4179
4089
|
}
|
|
4180
|
-
declare enum
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4090
|
+
declare enum HistoryViewMode {
|
|
4091
|
+
UNKNOWN = "UNKNOWN",
|
|
4092
|
+
/** Comprehensive view including all history events. */
|
|
4093
|
+
BACKOFFICE = "BACKOFFICE",
|
|
4094
|
+
/** User-centric view of the history. */
|
|
4095
|
+
USER = "USER"
|
|
4185
4096
|
}
|
|
4186
|
-
interface
|
|
4187
|
-
|
|
4188
|
-
|
|
4097
|
+
interface ListSubscriptionHistoryResponse {
|
|
4098
|
+
/** List of history entries for the subscription. */
|
|
4099
|
+
historyEntries?: SubscriptionHistoryEntry[];
|
|
4100
|
+
/** Paging metadata. A `next` cursor is returned if there are more results. */
|
|
4101
|
+
pagingMetadata?: PagingMetadataV2;
|
|
4102
|
+
}
|
|
4103
|
+
interface SubscriptionHistoryEntry {
|
|
4104
|
+
entryId?: string;
|
|
4105
|
+
/** TODO: add max length? it is not defined in domainevents, so should we? */
|
|
4106
|
+
slug?: string;
|
|
4107
|
+
entryTime?: Date | null;
|
|
4108
|
+
event?: SubscriptionEvent;
|
|
4109
|
+
}
|
|
4110
|
+
interface SubscriptionEvent extends SubscriptionEventPayloadOneOf {
|
|
4111
|
+
created?: SubscriptionCreated;
|
|
4112
|
+
updated?: SubscriptionUpdated;
|
|
4113
|
+
deleted?: SubscriptionDeleted;
|
|
4114
|
+
activated?: SubscriptionActivated;
|
|
4115
|
+
ended?: SubscriptionEnded;
|
|
4116
|
+
canceled?: SubscriptionCanceled;
|
|
4117
|
+
paused?: SubscriptionPaused;
|
|
4118
|
+
resumed?: SubscriptionResumed;
|
|
4119
|
+
pauseRequested?: PauseSubscriptionRequested;
|
|
4120
|
+
resumeRequested?: ResumeSubscriptionRequested;
|
|
4121
|
+
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
4122
|
+
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
4123
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
4124
|
+
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
4125
|
+
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
4126
|
+
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
4127
|
+
extended?: SubscriptionExtended;
|
|
4128
|
+
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
4129
|
+
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
4130
|
+
revived?: SubscriptionRevived;
|
|
4131
|
+
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
4132
|
+
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
4133
|
+
updatesApplied?: UpdatesApplied;
|
|
4134
|
+
resetPendingUpdates?: ResetPendingUpdates;
|
|
4135
|
+
gracePeriodStarted?: GracePeriodStarted;
|
|
4136
|
+
gracePeriodEnded?: GracePeriodEnded;
|
|
4137
|
+
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
4138
|
+
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
4139
|
+
freeTrailStarted?: FreeTrailStarted;
|
|
4140
|
+
freeTrailEnded?: FreeTrailEnded;
|
|
4141
|
+
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
4142
|
+
unknown?: UnknownSubscriptionEvent;
|
|
4143
|
+
}
|
|
4144
|
+
/** @oneof */
|
|
4145
|
+
interface SubscriptionEventPayloadOneOf {
|
|
4146
|
+
created?: SubscriptionCreated;
|
|
4147
|
+
updated?: SubscriptionUpdated;
|
|
4148
|
+
deleted?: SubscriptionDeleted;
|
|
4149
|
+
activated?: SubscriptionActivated;
|
|
4150
|
+
ended?: SubscriptionEnded;
|
|
4151
|
+
canceled?: SubscriptionCanceled;
|
|
4152
|
+
paused?: SubscriptionPaused;
|
|
4153
|
+
resumed?: SubscriptionResumed;
|
|
4154
|
+
pauseRequested?: PauseSubscriptionRequested;
|
|
4155
|
+
resumeRequested?: ResumeSubscriptionRequested;
|
|
4156
|
+
scheduledPauseCanceled?: ScheduledPauseCanceled;
|
|
4157
|
+
scheduledResumeCanceled?: ScheduledResumeCanceled;
|
|
4158
|
+
billingCycleStarted?: SubscriptionBillingCycleStarted;
|
|
4159
|
+
autoRenewalTurnedOn?: SubscriptionAutoRenewalTurnedOn;
|
|
4160
|
+
autoRenewalTurnedOff?: SubscriptionAutoRenewalTurnedOff;
|
|
4161
|
+
cycleReadyToPay?: SubscriptionCycleReadyToPay;
|
|
4162
|
+
extended?: SubscriptionExtended;
|
|
4163
|
+
initialPurchaseCompleted?: SubscriptionInitialPurchaseCompleted;
|
|
4164
|
+
latestInvoiceMarkedAsPaid?: LatestInvoiceMarkedAsPaid;
|
|
4165
|
+
revived?: SubscriptionRevived;
|
|
4166
|
+
billingDateUpdated?: SubscriptionBillingDateUpdated;
|
|
4167
|
+
futureUpdatesRequested?: FutureUpdatesRequested;
|
|
4168
|
+
updatesApplied?: UpdatesApplied;
|
|
4169
|
+
resetPendingUpdates?: ResetPendingUpdates;
|
|
4170
|
+
gracePeriodStarted?: GracePeriodStarted;
|
|
4171
|
+
gracePeriodEnded?: GracePeriodEnded;
|
|
4172
|
+
paymentMethodUpdated?: PaymentMethodUpdated;
|
|
4173
|
+
collectionMethodUpdated?: SubscriptionCollectionMethodUpdated;
|
|
4174
|
+
freeTrailStarted?: FreeTrailStarted;
|
|
4175
|
+
freeTrailEnded?: FreeTrailEnded;
|
|
4176
|
+
subscriptionBoAction?: SubscriptionBackOfficeAction;
|
|
4177
|
+
unknown?: UnknownSubscriptionEvent;
|
|
4178
|
+
}
|
|
4179
|
+
interface SubscriptionCreated {
|
|
4180
|
+
subscription?: Subscription;
|
|
4181
|
+
}
|
|
4182
|
+
interface SubscriptionUpdated {
|
|
4183
|
+
current?: Subscription;
|
|
4184
|
+
previous?: Subscription;
|
|
4185
|
+
diff?: SubscriptionDiff;
|
|
4186
|
+
}
|
|
4187
|
+
interface SubscriptionDiff {
|
|
4188
|
+
added?: string | null;
|
|
4189
|
+
changed?: string | null;
|
|
4190
|
+
deleted?: string | null;
|
|
4191
|
+
}
|
|
4192
|
+
interface SubscriptionDeleted {
|
|
4193
|
+
subscriptionId?: string;
|
|
4194
|
+
}
|
|
4195
|
+
interface FutureUpdatesRequested {
|
|
4196
|
+
subscription?: Subscription;
|
|
4197
|
+
requestedUpdateData?: SubscriptionUpdateData;
|
|
4198
|
+
}
|
|
4199
|
+
interface UpdatesApplied {
|
|
4200
|
+
subscription?: Subscription;
|
|
4201
|
+
updateAction?: UpdateAction;
|
|
4202
|
+
appliedUpdateData?: SubscriptionUpdateData;
|
|
4203
|
+
}
|
|
4204
|
+
interface ResetPendingUpdates {
|
|
4205
|
+
subscription?: Subscription;
|
|
4206
|
+
}
|
|
4207
|
+
interface GracePeriodStarted {
|
|
4208
|
+
subscription?: Subscription;
|
|
4209
|
+
}
|
|
4210
|
+
interface GracePeriodEnded {
|
|
4211
|
+
subscription?: Subscription;
|
|
4212
|
+
/** Indication for the payment settlement method. */
|
|
4213
|
+
paymentSettlementMethod?: PaymentSettlementMethod;
|
|
4214
|
+
}
|
|
4215
|
+
declare enum PaymentSettlementMethod {
|
|
4216
|
+
UNKNOWN = "UNKNOWN",
|
|
4217
|
+
/** System-defined payment settlement. */
|
|
4218
|
+
SYSTEM = "SYSTEM",
|
|
4219
|
+
/** Manually mark the payment as paid. */
|
|
4220
|
+
MARK_AS_PAID = "MARK_AS_PAID",
|
|
4221
|
+
/** Require the customer to pay immediately, by insert a new payment method. */
|
|
4222
|
+
CUSTOMER_PAY_NOW = "CUSTOMER_PAY_NOW"
|
|
4223
|
+
}
|
|
4224
|
+
interface PaymentMethodUpdated {
|
|
4225
|
+
subscription?: Subscription;
|
|
4226
|
+
initiator?: HistoryActionInitiator;
|
|
4227
|
+
paymentMode?: PaymentMode;
|
|
4228
|
+
}
|
|
4229
|
+
interface SubscriptionCollectionMethodUpdated {
|
|
4189
4230
|
subscription?: Subscription;
|
|
4231
|
+
newCollectionMethod?: CollectionMethodEnumCollectionMethod;
|
|
4232
|
+
previousCollectionMethod?: CollectionMethodEnumCollectionMethod;
|
|
4233
|
+
}
|
|
4234
|
+
interface FreeTrailStarted {
|
|
4235
|
+
subscription?: Subscription;
|
|
4236
|
+
}
|
|
4237
|
+
interface FreeTrailEnded {
|
|
4238
|
+
subscription?: Subscription;
|
|
4239
|
+
}
|
|
4240
|
+
interface SubscriptionBackOfficeAction {
|
|
4241
|
+
subscription?: Subscription;
|
|
4242
|
+
/** The backoffice method name */
|
|
4243
|
+
name?: string;
|
|
4244
|
+
/** json as string format, to store the flatted request object */
|
|
4245
|
+
params?: string;
|
|
4246
|
+
}
|
|
4247
|
+
/** Defines unknown events restored from the logs */
|
|
4248
|
+
interface UnknownSubscriptionEvent {
|
|
4249
|
+
subscriptionAsString?: string | null;
|
|
4190
4250
|
}
|
|
4191
4251
|
interface CustomerNonNullableFields {
|
|
4192
4252
|
visitorId: string;
|
|
@@ -4221,11 +4281,15 @@ interface TaxNonNullableFields {
|
|
|
4221
4281
|
percentage: string;
|
|
4222
4282
|
dynamic?: DynamicTaxNonNullableFields;
|
|
4223
4283
|
}
|
|
4284
|
+
interface CyclesNonNullableFields {
|
|
4285
|
+
cycleFrom: number;
|
|
4286
|
+
}
|
|
4224
4287
|
interface AdditionalFeeNonNullableFields {
|
|
4225
4288
|
name: string;
|
|
4226
4289
|
amount: string;
|
|
4227
4290
|
trigger: AdditionalFeeTrigger;
|
|
4228
4291
|
tax?: TaxNonNullableFields;
|
|
4292
|
+
cycles?: CyclesNonNullableFields;
|
|
4229
4293
|
}
|
|
4230
4294
|
interface DiscountCyclesNonNullableFields {
|
|
4231
4295
|
cycleFrom: number;
|
|
@@ -4293,69 +4357,229 @@ interface BillingStatusNonNullableFields {
|
|
|
4293
4357
|
updateBillingDateData?: UpdateBillingDateDataNonNullableFields;
|
|
4294
4358
|
gracePeriodData?: GracePeriodDataNonNullableFields;
|
|
4295
4359
|
}
|
|
4296
|
-
interface SubscriptionPoliciesNonNullableFields {
|
|
4297
|
-
customerCanCancel: boolean;
|
|
4298
|
-
businessCanExtend: boolean;
|
|
4299
|
-
allowEndOfCycleCancellation: boolean;
|
|
4360
|
+
interface SubscriptionPoliciesNonNullableFields {
|
|
4361
|
+
customerCanCancel: boolean;
|
|
4362
|
+
businessCanExtend: boolean;
|
|
4363
|
+
allowEndOfCycleCancellation: boolean;
|
|
4364
|
+
}
|
|
4365
|
+
interface PauseInfoNonNullableFields {
|
|
4366
|
+
pausePolicy: PausePolicy;
|
|
4367
|
+
pauseAt: PauseAt;
|
|
4368
|
+
resumeAt: ResumeAt;
|
|
4369
|
+
}
|
|
4370
|
+
interface CancellationInfoNonNullableFields {
|
|
4371
|
+
initiator: HistoryActionInitiator;
|
|
4372
|
+
}
|
|
4373
|
+
interface FixedPriceNonNullableFields {
|
|
4374
|
+
itemPrice: string;
|
|
4375
|
+
}
|
|
4376
|
+
interface PricingModelNonNullableFields {
|
|
4377
|
+
fixedPrice?: FixedPriceNonNullableFields;
|
|
4378
|
+
}
|
|
4379
|
+
interface ItemChangeNonNullableFields {
|
|
4380
|
+
_id: string;
|
|
4381
|
+
pricingModel?: PricingModelNonNullableFields;
|
|
4382
|
+
tax?: TaxNonNullableFields;
|
|
4383
|
+
}
|
|
4384
|
+
interface CatalogReferenceNonNullableFields {
|
|
4385
|
+
catalogItemId: string;
|
|
4386
|
+
}
|
|
4387
|
+
interface ApplicationFeeNonNullableFields {
|
|
4388
|
+
amount: string;
|
|
4389
|
+
discounts: DiscountNonNullableFields[];
|
|
4390
|
+
}
|
|
4391
|
+
interface ItemNonNullableFields {
|
|
4392
|
+
name: string;
|
|
4393
|
+
catalogReference?: CatalogReferenceNonNullableFields;
|
|
4394
|
+
category: ItemCategory;
|
|
4395
|
+
quantity: number;
|
|
4396
|
+
pricingModel?: PricingModelNonNullableFields;
|
|
4397
|
+
tax?: TaxNonNullableFields;
|
|
4398
|
+
discounts: DiscountNonNullableFields[];
|
|
4399
|
+
applicationFee?: ApplicationFeeNonNullableFields;
|
|
4400
|
+
}
|
|
4401
|
+
interface SubscriptionUpdateDataNonNullableFields {
|
|
4402
|
+
itemsToUpdate: ItemChangeNonNullableFields[];
|
|
4403
|
+
itemsToAdd: ItemNonNullableFields[];
|
|
4404
|
+
numberOfRequests: number;
|
|
4405
|
+
}
|
|
4406
|
+
interface SpecificDateSubscriptionUpdateDataNonNullableFields {
|
|
4407
|
+
updateData?: SubscriptionUpdateDataNonNullableFields;
|
|
4408
|
+
}
|
|
4409
|
+
interface SubscriptionNonNullableFields {
|
|
4410
|
+
name: string;
|
|
4411
|
+
customer?: CustomerNonNullableFields;
|
|
4412
|
+
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
4413
|
+
billingSettings?: BillingSettingsNonNullableFields;
|
|
4414
|
+
billingStatus?: BillingStatusNonNullableFields;
|
|
4415
|
+
shippingAddress?: FullAddressDetailsNonNullableFields;
|
|
4416
|
+
policies?: SubscriptionPoliciesNonNullableFields;
|
|
4417
|
+
pauseInfo?: PauseInfoNonNullableFields;
|
|
4418
|
+
cancellationInfo?: CancellationInfoNonNullableFields;
|
|
4419
|
+
pendingUpdateData?: SubscriptionUpdateDataNonNullableFields;
|
|
4420
|
+
bassManaged: boolean;
|
|
4421
|
+
specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateDataNonNullableFields;
|
|
4422
|
+
items: ItemNonNullableFields[];
|
|
4423
|
+
}
|
|
4424
|
+
interface GetSubscriptionResponseNonNullableFields {
|
|
4425
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4426
|
+
}
|
|
4427
|
+
interface CustomerCancelSubscriptionResponseNonNullableFields {
|
|
4428
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4429
|
+
}
|
|
4430
|
+
interface CustomerTurnOnAutoRenewalResponseNonNullableFields {
|
|
4431
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4432
|
+
}
|
|
4433
|
+
interface CustomerTurnOffAutoRenewalResponseNonNullableFields {
|
|
4434
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4435
|
+
}
|
|
4436
|
+
interface CustomerExtendSubscriptionResponseNonNullableFields {
|
|
4437
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4438
|
+
}
|
|
4439
|
+
interface QuerySubscriptionsResponseNonNullableFields {
|
|
4440
|
+
subscriptions: SubscriptionNonNullableFields[];
|
|
4441
|
+
}
|
|
4442
|
+
interface UpdateSubscriptionPaymentMethodResponseNonNullableFields {
|
|
4443
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4444
|
+
}
|
|
4445
|
+
interface ActionNonNullableFields {
|
|
4446
|
+
actionType: ActionType;
|
|
4447
|
+
pausePolicies: PausePolicy[];
|
|
4448
|
+
pauseAt: PauseAt[];
|
|
4449
|
+
resumeAt: ResumeAt[];
|
|
4450
|
+
extendPolicies: ExtendPolicyType[];
|
|
4451
|
+
}
|
|
4452
|
+
interface CustomerAllowedActionsResponseNonNullableFields {
|
|
4453
|
+
actions: ActionNonNullableFields[];
|
|
4454
|
+
}
|
|
4455
|
+
interface RecurringNonNullableFields {
|
|
4456
|
+
cycleNumber: number;
|
|
4457
|
+
}
|
|
4458
|
+
interface InvoiceDiscountNonNullableFields {
|
|
4459
|
+
amount: string;
|
|
4460
|
+
percentage: string;
|
|
4461
|
+
origin?: DiscountOriginNonNullableFields;
|
|
4462
|
+
}
|
|
4463
|
+
interface InvoiceApplicationFeeNonNullableFields {
|
|
4464
|
+
amount: string;
|
|
4465
|
+
discount?: InvoiceDiscountNonNullableFields;
|
|
4466
|
+
}
|
|
4467
|
+
interface PriceDetailsNonNullableFields {
|
|
4468
|
+
price: string;
|
|
4469
|
+
tax?: TaxNonNullableFields;
|
|
4470
|
+
discount?: InvoiceDiscountNonNullableFields;
|
|
4471
|
+
applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields;
|
|
4472
|
+
}
|
|
4473
|
+
interface LineItemTaxSummaryNonNullableFields {
|
|
4474
|
+
aggregatedTaxAmount: string;
|
|
4475
|
+
aggregatedTaxRate: string;
|
|
4476
|
+
taxableAmount: string;
|
|
4477
|
+
}
|
|
4478
|
+
interface TaxBreakdownNonNullableFields {
|
|
4479
|
+
taxType: string;
|
|
4480
|
+
taxRate: string;
|
|
4481
|
+
jurisdictionType: string;
|
|
4482
|
+
}
|
|
4483
|
+
interface ItemTaxDataNonNullableFields {
|
|
4484
|
+
lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields;
|
|
4485
|
+
taxBreakdowns: TaxBreakdownNonNullableFields[];
|
|
4486
|
+
}
|
|
4487
|
+
interface InvoiceItemNonNullableFields {
|
|
4488
|
+
recurring?: RecurringNonNullableFields;
|
|
4489
|
+
_id: string;
|
|
4490
|
+
name: string;
|
|
4491
|
+
catalogReference?: CatalogReferenceNonNullableFields;
|
|
4492
|
+
category: ItemCategory;
|
|
4493
|
+
quantity: number;
|
|
4494
|
+
priceDetails?: PriceDetailsNonNullableFields;
|
|
4495
|
+
totals?: TotalsNonNullableFields;
|
|
4496
|
+
taxData?: ItemTaxDataNonNullableFields;
|
|
4497
|
+
}
|
|
4498
|
+
interface SubscriptionChargeNonNullableFields {
|
|
4499
|
+
cycle: number;
|
|
4500
|
+
totals?: TotalsNonNullableFields;
|
|
4501
|
+
invoiceItems: InvoiceItemNonNullableFields[];
|
|
4502
|
+
discount?: InvoiceDiscountNonNullableFields;
|
|
4503
|
+
}
|
|
4504
|
+
interface CustomerListUpcomingChargesResponseNonNullableFields {
|
|
4505
|
+
upcomingCharge?: SubscriptionChargeNonNullableFields;
|
|
4506
|
+
}
|
|
4507
|
+
interface InitiatePaymentMethodSetupResponseNonNullableFields {
|
|
4508
|
+
paymentOrderId: string;
|
|
4509
|
+
}
|
|
4510
|
+
interface PayCycleResponseNonNullableFields {
|
|
4511
|
+
invoiceId: string;
|
|
4512
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4513
|
+
}
|
|
4514
|
+
interface UpdateSubscriptionBillingDateResponseNonNullableFields {
|
|
4515
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4516
|
+
}
|
|
4517
|
+
interface CancelSubscriptionResponseNonNullableFields {
|
|
4518
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4519
|
+
}
|
|
4520
|
+
interface PauseSubscriptionResponseNonNullableFields {
|
|
4521
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4522
|
+
}
|
|
4523
|
+
interface ResumeSubscriptionResponseNonNullableFields {
|
|
4524
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4525
|
+
}
|
|
4526
|
+
interface SearchSubscriptionsResponseNonNullableFields {
|
|
4527
|
+
subscriptions: SubscriptionNonNullableFields[];
|
|
4528
|
+
}
|
|
4529
|
+
interface CountByStatusNonNullableFields {
|
|
4530
|
+
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
4531
|
+
count: number;
|
|
4532
|
+
}
|
|
4533
|
+
interface CountSubscriptionsResponseNonNullableFields {
|
|
4534
|
+
countByStatus: CountByStatusNonNullableFields[];
|
|
4535
|
+
total: number;
|
|
4536
|
+
}
|
|
4537
|
+
interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields {
|
|
4538
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4539
|
+
}
|
|
4540
|
+
interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields {
|
|
4541
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4300
4542
|
}
|
|
4301
|
-
interface
|
|
4302
|
-
|
|
4303
|
-
pauseAt: PauseAt;
|
|
4304
|
-
resumeAt: ResumeAt;
|
|
4543
|
+
interface MarkLatestInvoiceAsPaidResponseNonNullableFields {
|
|
4544
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4305
4545
|
}
|
|
4306
|
-
interface
|
|
4307
|
-
|
|
4546
|
+
interface AmountByStatusNonNullableFields {
|
|
4547
|
+
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
4548
|
+
amount: number;
|
|
4308
4549
|
}
|
|
4309
|
-
interface
|
|
4310
|
-
|
|
4550
|
+
interface GetSubscriptionsStatsResponseNonNullableFields {
|
|
4551
|
+
amountByStatuses: AmountByStatusNonNullableFields[];
|
|
4552
|
+
total: number;
|
|
4311
4553
|
}
|
|
4312
|
-
interface
|
|
4313
|
-
|
|
4554
|
+
interface ExtendSubscriptionResponseNonNullableFields {
|
|
4555
|
+
subscription?: SubscriptionNonNullableFields;
|
|
4314
4556
|
}
|
|
4315
|
-
interface
|
|
4316
|
-
|
|
4317
|
-
pricingModel?: PricingModelNonNullableFields;
|
|
4318
|
-
tax?: TaxNonNullableFields;
|
|
4557
|
+
interface UnsupportedReasonNonNullableFields {
|
|
4558
|
+
code: string;
|
|
4319
4559
|
}
|
|
4320
|
-
interface
|
|
4321
|
-
|
|
4560
|
+
interface UnsupportedActionNonNullableFields {
|
|
4561
|
+
actionType: ActionType;
|
|
4562
|
+
reasons: UnsupportedReasonNonNullableFields[];
|
|
4322
4563
|
}
|
|
4323
|
-
interface
|
|
4324
|
-
|
|
4325
|
-
|
|
4564
|
+
interface AllowedActionsResponseNonNullableFields {
|
|
4565
|
+
actions: ActionNonNullableFields[];
|
|
4566
|
+
unsupportedActions: UnsupportedActionNonNullableFields[];
|
|
4326
4567
|
}
|
|
4327
|
-
interface
|
|
4328
|
-
|
|
4329
|
-
catalogReference?: CatalogReferenceNonNullableFields;
|
|
4330
|
-
category: ItemCategory;
|
|
4331
|
-
quantity: number;
|
|
4332
|
-
pricingModel?: PricingModelNonNullableFields;
|
|
4333
|
-
tax?: TaxNonNullableFields;
|
|
4334
|
-
discounts: DiscountNonNullableFields[];
|
|
4335
|
-
applicationFee?: ApplicationFeeNonNullableFields;
|
|
4568
|
+
interface ListUpcomingChargesResponseNonNullableFields {
|
|
4569
|
+
upcomingCharges: SubscriptionChargeNonNullableFields[];
|
|
4336
4570
|
}
|
|
4337
|
-
interface
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
numberOfRequests: number;
|
|
4571
|
+
interface ChargeNonNullableFields {
|
|
4572
|
+
cycleFrom: number;
|
|
4573
|
+
totals?: TotalsNonNullableFields;
|
|
4341
4574
|
}
|
|
4342
|
-
interface
|
|
4343
|
-
|
|
4575
|
+
interface PreviewSubscriptionChargesResponseNonNullableFields {
|
|
4576
|
+
charges: ChargeNonNullableFields[];
|
|
4344
4577
|
}
|
|
4345
|
-
interface
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
billingStatus?: BillingStatusNonNullableFields;
|
|
4351
|
-
shippingAddress?: FullAddressDetailsNonNullableFields;
|
|
4352
|
-
policies?: SubscriptionPoliciesNonNullableFields;
|
|
4353
|
-
pauseInfo?: PauseInfoNonNullableFields;
|
|
4354
|
-
cancellationInfo?: CancellationInfoNonNullableFields;
|
|
4355
|
-
pendingUpdateData?: SubscriptionUpdateDataNonNullableFields;
|
|
4356
|
-
bassManaged: boolean;
|
|
4357
|
-
specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateDataNonNullableFields;
|
|
4358
|
-
items: ItemNonNullableFields[];
|
|
4578
|
+
interface SubscriptionChargesNonNullableFields {
|
|
4579
|
+
charges: ChargeNonNullableFields[];
|
|
4580
|
+
}
|
|
4581
|
+
interface PreviewSubscriptionsChargesResponseNonNullableFields {
|
|
4582
|
+
subscriptionsCharges: SubscriptionChargesNonNullableFields[];
|
|
4359
4583
|
}
|
|
4360
4584
|
interface SubscriptionCreatedNonNullableFields {
|
|
4361
4585
|
subscription?: SubscriptionNonNullableFields;
|
|
@@ -4523,166 +4747,6 @@ interface SubscriptionHistoryEntryNonNullableFields {
|
|
|
4523
4747
|
interface ListSubscriptionHistoryResponseNonNullableFields {
|
|
4524
4748
|
historyEntries: SubscriptionHistoryEntryNonNullableFields[];
|
|
4525
4749
|
}
|
|
4526
|
-
interface GetSubscriptionResponseNonNullableFields {
|
|
4527
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4528
|
-
}
|
|
4529
|
-
interface CustomerCancelSubscriptionResponseNonNullableFields {
|
|
4530
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4531
|
-
}
|
|
4532
|
-
interface CustomerTurnOnAutoRenewalResponseNonNullableFields {
|
|
4533
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4534
|
-
}
|
|
4535
|
-
interface CustomerTurnOffAutoRenewalResponseNonNullableFields {
|
|
4536
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4537
|
-
}
|
|
4538
|
-
interface CustomerExtendSubscriptionResponseNonNullableFields {
|
|
4539
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4540
|
-
}
|
|
4541
|
-
interface QuerySubscriptionsResponseNonNullableFields {
|
|
4542
|
-
subscriptions: SubscriptionNonNullableFields[];
|
|
4543
|
-
}
|
|
4544
|
-
interface UpdateSubscriptionPaymentMethodResponseNonNullableFields {
|
|
4545
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4546
|
-
}
|
|
4547
|
-
interface ActionNonNullableFields {
|
|
4548
|
-
actionType: ActionType;
|
|
4549
|
-
pausePolicies: PausePolicy[];
|
|
4550
|
-
pauseAt: PauseAt[];
|
|
4551
|
-
resumeAt: ResumeAt[];
|
|
4552
|
-
extendPolicies: ExtendPolicyType[];
|
|
4553
|
-
}
|
|
4554
|
-
interface CustomerAllowedActionsResponseNonNullableFields {
|
|
4555
|
-
actions: ActionNonNullableFields[];
|
|
4556
|
-
}
|
|
4557
|
-
interface RecurringNonNullableFields {
|
|
4558
|
-
cycleNumber: number;
|
|
4559
|
-
}
|
|
4560
|
-
interface InvoiceDiscountNonNullableFields {
|
|
4561
|
-
amount: string;
|
|
4562
|
-
percentage: string;
|
|
4563
|
-
origin?: DiscountOriginNonNullableFields;
|
|
4564
|
-
}
|
|
4565
|
-
interface InvoiceApplicationFeeNonNullableFields {
|
|
4566
|
-
amount: string;
|
|
4567
|
-
discount?: InvoiceDiscountNonNullableFields;
|
|
4568
|
-
}
|
|
4569
|
-
interface PriceDetailsNonNullableFields {
|
|
4570
|
-
price: string;
|
|
4571
|
-
tax?: TaxNonNullableFields;
|
|
4572
|
-
discount?: InvoiceDiscountNonNullableFields;
|
|
4573
|
-
applicationFeeDetails?: InvoiceApplicationFeeNonNullableFields;
|
|
4574
|
-
}
|
|
4575
|
-
interface LineItemTaxSummaryNonNullableFields {
|
|
4576
|
-
aggregatedTaxAmount: string;
|
|
4577
|
-
aggregatedTaxRate: string;
|
|
4578
|
-
taxableAmount: string;
|
|
4579
|
-
}
|
|
4580
|
-
interface TaxBreakdownNonNullableFields {
|
|
4581
|
-
taxType: string;
|
|
4582
|
-
taxRate: string;
|
|
4583
|
-
jurisdictionType: string;
|
|
4584
|
-
}
|
|
4585
|
-
interface ItemTaxDataNonNullableFields {
|
|
4586
|
-
lineItemTaxSummary?: LineItemTaxSummaryNonNullableFields;
|
|
4587
|
-
taxBreakdowns: TaxBreakdownNonNullableFields[];
|
|
4588
|
-
}
|
|
4589
|
-
interface InvoiceItemNonNullableFields {
|
|
4590
|
-
recurring?: RecurringNonNullableFields;
|
|
4591
|
-
_id: string;
|
|
4592
|
-
name: string;
|
|
4593
|
-
catalogReference?: CatalogReferenceNonNullableFields;
|
|
4594
|
-
category: ItemCategory;
|
|
4595
|
-
quantity: number;
|
|
4596
|
-
priceDetails?: PriceDetailsNonNullableFields;
|
|
4597
|
-
totals?: TotalsNonNullableFields;
|
|
4598
|
-
taxData?: ItemTaxDataNonNullableFields;
|
|
4599
|
-
}
|
|
4600
|
-
interface SubscriptionChargeNonNullableFields {
|
|
4601
|
-
cycle: number;
|
|
4602
|
-
totals?: TotalsNonNullableFields;
|
|
4603
|
-
invoiceItems: InvoiceItemNonNullableFields[];
|
|
4604
|
-
discount?: InvoiceDiscountNonNullableFields;
|
|
4605
|
-
}
|
|
4606
|
-
interface CustomerListUpcomingChargesResponseNonNullableFields {
|
|
4607
|
-
upcomingCharge?: SubscriptionChargeNonNullableFields;
|
|
4608
|
-
}
|
|
4609
|
-
interface InitiatePaymentMethodSetupResponseNonNullableFields {
|
|
4610
|
-
paymentOrderId: string;
|
|
4611
|
-
}
|
|
4612
|
-
interface UpdateSubscriptionBillingDateResponseNonNullableFields {
|
|
4613
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4614
|
-
}
|
|
4615
|
-
interface CancelSubscriptionResponseNonNullableFields {
|
|
4616
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4617
|
-
}
|
|
4618
|
-
interface PauseSubscriptionResponseNonNullableFields {
|
|
4619
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4620
|
-
}
|
|
4621
|
-
interface ResumeSubscriptionResponseNonNullableFields {
|
|
4622
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4623
|
-
}
|
|
4624
|
-
interface SearchSubscriptionsResponseNonNullableFields {
|
|
4625
|
-
subscriptions: SubscriptionNonNullableFields[];
|
|
4626
|
-
}
|
|
4627
|
-
interface CountByStatusNonNullableFields {
|
|
4628
|
-
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
4629
|
-
count: number;
|
|
4630
|
-
}
|
|
4631
|
-
interface CountSubscriptionsResponseNonNullableFields {
|
|
4632
|
-
countByStatus: CountByStatusNonNullableFields[];
|
|
4633
|
-
total: number;
|
|
4634
|
-
}
|
|
4635
|
-
interface TurnOnSubscriptionAutoRenewalResponseNonNullableFields {
|
|
4636
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4637
|
-
}
|
|
4638
|
-
interface TurnOffSubscriptionAutoRenewalResponseNonNullableFields {
|
|
4639
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4640
|
-
}
|
|
4641
|
-
interface MarkLatestInvoiceAsPaidResponseNonNullableFields {
|
|
4642
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4643
|
-
}
|
|
4644
|
-
interface AmountByStatusNonNullableFields {
|
|
4645
|
-
status: SubscriptionStatusEnumSubscriptionStatus;
|
|
4646
|
-
amount: number;
|
|
4647
|
-
}
|
|
4648
|
-
interface GetSubscriptionsStatsResponseNonNullableFields {
|
|
4649
|
-
amountByStatuses: AmountByStatusNonNullableFields[];
|
|
4650
|
-
total: number;
|
|
4651
|
-
}
|
|
4652
|
-
interface ExtendSubscriptionResponseNonNullableFields {
|
|
4653
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4654
|
-
}
|
|
4655
|
-
interface UnsupportedReasonNonNullableFields {
|
|
4656
|
-
code: string;
|
|
4657
|
-
}
|
|
4658
|
-
interface UnsupportedActionNonNullableFields {
|
|
4659
|
-
actionType: ActionType;
|
|
4660
|
-
reasons: UnsupportedReasonNonNullableFields[];
|
|
4661
|
-
}
|
|
4662
|
-
interface AllowedActionsResponseNonNullableFields {
|
|
4663
|
-
actions: ActionNonNullableFields[];
|
|
4664
|
-
unsupportedActions: UnsupportedActionNonNullableFields[];
|
|
4665
|
-
}
|
|
4666
|
-
interface ListUpcomingChargesResponseNonNullableFields {
|
|
4667
|
-
upcomingCharges: SubscriptionChargeNonNullableFields[];
|
|
4668
|
-
}
|
|
4669
|
-
interface ChargeNonNullableFields {
|
|
4670
|
-
cycleFrom: number;
|
|
4671
|
-
totals?: TotalsNonNullableFields;
|
|
4672
|
-
}
|
|
4673
|
-
interface PreviewSubscriptionChargesResponseNonNullableFields {
|
|
4674
|
-
charges: ChargeNonNullableFields[];
|
|
4675
|
-
}
|
|
4676
|
-
interface SubscriptionChargesNonNullableFields {
|
|
4677
|
-
charges: ChargeNonNullableFields[];
|
|
4678
|
-
}
|
|
4679
|
-
interface PreviewSubscriptionsChargesResponseNonNullableFields {
|
|
4680
|
-
subscriptionsCharges: SubscriptionChargesNonNullableFields[];
|
|
4681
|
-
}
|
|
4682
|
-
interface PayCycleResponseNonNullableFields {
|
|
4683
|
-
invoiceId: string;
|
|
4684
|
-
subscription?: SubscriptionNonNullableFields;
|
|
4685
|
-
}
|
|
4686
4750
|
|
|
4687
4751
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4688
4752
|
getUrl: (context: any) => string;
|
|
@@ -4694,9 +4758,6 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
4694
4758
|
__responseType: Q;
|
|
4695
4759
|
__originalResponseType: R;
|
|
4696
4760
|
};
|
|
4697
|
-
declare function listSubscriptionHistory(): __PublicMethodMetaInfo<'GET', {
|
|
4698
|
-
subscriptionId: string;
|
|
4699
|
-
}, ListSubscriptionHistoryRequest, ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryResponse & ListSubscriptionHistoryResponseNonNullableFields, ListSubscriptionHistoryResponse$1 & ListSubscriptionHistoryResponseNonNullableFields$1>;
|
|
4700
4761
|
declare function customerGetSubscription(): __PublicMethodMetaInfo<'GET', {
|
|
4701
4762
|
id: string;
|
|
4702
4763
|
}, GetSubscriptionRequest, GetSubscriptionRequest$1, GetSubscriptionResponse & GetSubscriptionResponseNonNullableFields, GetSubscriptionResponse$1 & GetSubscriptionResponseNonNullableFields$1>;
|
|
@@ -4725,6 +4786,9 @@ declare function customerListUpcomingCharges(): __PublicMethodMetaInfo<'GET', {
|
|
|
4725
4786
|
declare function customerInitiatePaymentMethodSetup(): __PublicMethodMetaInfo<'POST', {
|
|
4726
4787
|
id: string;
|
|
4727
4788
|
}, InitiatePaymentMethodSetupRequest, InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupResponse & InitiatePaymentMethodSetupResponseNonNullableFields, InitiatePaymentMethodSetupResponse$1 & InitiatePaymentMethodSetupResponseNonNullableFields$1>;
|
|
4789
|
+
declare function payCycle(): __PublicMethodMetaInfo<'POST', {
|
|
4790
|
+
subscriptionId: string;
|
|
4791
|
+
}, PayCycleRequest, PayCycleRequest$1, PayCycleResponse & PayCycleResponseNonNullableFields, PayCycleResponse$1 & PayCycleResponseNonNullableFields$1>;
|
|
4728
4792
|
declare function getSubscription(): __PublicMethodMetaInfo<'GET', {
|
|
4729
4793
|
id: string;
|
|
4730
4794
|
}, GetSubscriptionRequest, GetSubscriptionRequest$1, GetSubscriptionResponse & GetSubscriptionResponseNonNullableFields, GetSubscriptionResponse$1 & GetSubscriptionResponseNonNullableFields$1>;
|
|
@@ -4770,9 +4834,9 @@ declare function previewSubscriptionsCharges(): __PublicMethodMetaInfo<'GET', {}
|
|
|
4770
4834
|
declare function initiatePaymentMethodSetup(): __PublicMethodMetaInfo<'POST', {
|
|
4771
4835
|
id: string;
|
|
4772
4836
|
}, InitiatePaymentMethodSetupRequest, InitiatePaymentMethodSetupRequest$1, InitiatePaymentMethodSetupResponse & InitiatePaymentMethodSetupResponseNonNullableFields, InitiatePaymentMethodSetupResponse$1 & InitiatePaymentMethodSetupResponseNonNullableFields$1>;
|
|
4773
|
-
declare function
|
|
4837
|
+
declare function listSubscriptionHistory(): __PublicMethodMetaInfo<'GET', {
|
|
4774
4838
|
subscriptionId: string;
|
|
4775
|
-
},
|
|
4839
|
+
}, ListSubscriptionHistoryRequest, ListSubscriptionHistoryRequest$1, ListSubscriptionHistoryResponse & ListSubscriptionHistoryResponseNonNullableFields, ListSubscriptionHistoryResponse$1 & ListSubscriptionHistoryResponseNonNullableFields$1>;
|
|
4776
4840
|
|
|
4777
4841
|
type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
|
|
4778
4842
|
declare const meta_allowedActions: typeof allowedActions;
|