@tennac-booking/sdk 1.0.122 → 1.0.124
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/.openapi-generator/FILES +3 -0
- package/README.md +4 -0
- package/api.ts +255 -13
- package/dist/api.d.ts +208 -13
- package/dist/api.js +69 -4
- package/dist/esm/api.d.ts +208 -13
- package/dist/esm/api.js +69 -4
- package/docs/ClubPlayerSubscriptionSummary.md +3 -3
- package/docs/CreatePlan201Response.md +2 -0
- package/docs/CreateSubscriptionPlanRequest.md +2 -2
- package/docs/DeleteSubscriptionPlanResponse.md +2 -0
- package/docs/MonthlyTurnoverResponse.md +0 -1
- package/docs/PlanPrice.md +26 -0
- package/docs/PlanPriceInput.md +22 -0
- package/docs/PublicSubscriptionPlanResponse.md +5 -1
- package/docs/SendSubscriptionInvitationRequest.md +2 -0
- package/docs/SubscriptionPlanDiscountResponse.md +34 -0
- package/docs/SubscriptionPlanResponse.md +7 -1
- package/docs/SubscriptionsManagerApi.md +55 -1
- package/package.json +1 -1
package/dist/esm/api.d.ts
CHANGED
|
@@ -2705,11 +2705,11 @@ export interface ClubPlayerSubscriptionSummary {
|
|
|
2705
2705
|
*/
|
|
2706
2706
|
'name': string | null;
|
|
2707
2707
|
/**
|
|
2708
|
-
*
|
|
2709
|
-
* @type {
|
|
2708
|
+
* Tarifications disponibles
|
|
2709
|
+
* @type {Array<PlanPrice>}
|
|
2710
2710
|
* @memberof ClubPlayerSubscriptionSummary
|
|
2711
2711
|
*/
|
|
2712
|
-
'
|
|
2712
|
+
'prices': Array<PlanPrice>;
|
|
2713
2713
|
/**
|
|
2714
2714
|
* Devise
|
|
2715
2715
|
* @type {string}
|
|
@@ -2717,7 +2717,7 @@ export interface ClubPlayerSubscriptionSummary {
|
|
|
2717
2717
|
*/
|
|
2718
2718
|
'currency': string | null;
|
|
2719
2719
|
/**
|
|
2720
|
-
* Intervalle
|
|
2720
|
+
* Intervalle par défaut
|
|
2721
2721
|
* @type {string}
|
|
2722
2722
|
* @memberof ClubPlayerSubscriptionSummary
|
|
2723
2723
|
*/
|
|
@@ -3917,6 +3917,12 @@ export interface CreateOnsiteInvoiceResponseInvoice {
|
|
|
3917
3917
|
* @interface CreatePlan201Response
|
|
3918
3918
|
*/
|
|
3919
3919
|
export interface CreatePlan201Response {
|
|
3920
|
+
/**
|
|
3921
|
+
*
|
|
3922
|
+
* @type {Array<string>}
|
|
3923
|
+
* @memberof CreatePlan201Response
|
|
3924
|
+
*/
|
|
3925
|
+
'priceIds': Array<string>;
|
|
3920
3926
|
/**
|
|
3921
3927
|
*
|
|
3922
3928
|
* @type {string}
|
|
@@ -4031,10 +4037,10 @@ export interface CreateSubscriptionPlanRequest {
|
|
|
4031
4037
|
'description'?: string;
|
|
4032
4038
|
/**
|
|
4033
4039
|
*
|
|
4034
|
-
* @type {
|
|
4040
|
+
* @type {Array<PlanPriceInput>}
|
|
4035
4041
|
* @memberof CreateSubscriptionPlanRequest
|
|
4036
4042
|
*/
|
|
4037
|
-
'
|
|
4043
|
+
'prices': Array<PlanPriceInput>;
|
|
4038
4044
|
/**
|
|
4039
4045
|
*
|
|
4040
4046
|
* @type {string}
|
|
@@ -4230,6 +4236,12 @@ export interface DeleteSubscriptionPlanResponse {
|
|
|
4230
4236
|
* @memberof DeleteSubscriptionPlanResponse
|
|
4231
4237
|
*/
|
|
4232
4238
|
'message': string;
|
|
4239
|
+
/**
|
|
4240
|
+
*
|
|
4241
|
+
* @type {boolean}
|
|
4242
|
+
* @memberof DeleteSubscriptionPlanResponse
|
|
4243
|
+
*/
|
|
4244
|
+
'archivedInstead'?: boolean;
|
|
4233
4245
|
}
|
|
4234
4246
|
/**
|
|
4235
4247
|
*
|
|
@@ -6002,7 +6014,7 @@ export interface MonthlyBreakdown {
|
|
|
6002
6014
|
'invoiceCount': number;
|
|
6003
6015
|
}
|
|
6004
6016
|
/**
|
|
6005
|
-
*
|
|
6017
|
+
*
|
|
6006
6018
|
* @export
|
|
6007
6019
|
* @interface MonthlyTurnoverResponse
|
|
6008
6020
|
*/
|
|
@@ -6442,6 +6454,56 @@ export declare const PlanInterval: {
|
|
|
6442
6454
|
readonly Semester: "semester";
|
|
6443
6455
|
};
|
|
6444
6456
|
export type PlanInterval = typeof PlanInterval[keyof typeof PlanInterval];
|
|
6457
|
+
/**
|
|
6458
|
+
*
|
|
6459
|
+
* @export
|
|
6460
|
+
* @interface PlanPrice
|
|
6461
|
+
*/
|
|
6462
|
+
export interface PlanPrice {
|
|
6463
|
+
/**
|
|
6464
|
+
*
|
|
6465
|
+
* @type {number}
|
|
6466
|
+
* @memberof PlanPrice
|
|
6467
|
+
*/
|
|
6468
|
+
'amountInCents': number;
|
|
6469
|
+
/**
|
|
6470
|
+
*
|
|
6471
|
+
* @type {PlanInterval}
|
|
6472
|
+
* @memberof PlanPrice
|
|
6473
|
+
*/
|
|
6474
|
+
'interval': PlanInterval;
|
|
6475
|
+
/**
|
|
6476
|
+
*
|
|
6477
|
+
* @type {boolean}
|
|
6478
|
+
* @memberof PlanPrice
|
|
6479
|
+
*/
|
|
6480
|
+
'active'?: boolean;
|
|
6481
|
+
/**
|
|
6482
|
+
*
|
|
6483
|
+
* @type {string}
|
|
6484
|
+
* @memberof PlanPrice
|
|
6485
|
+
*/
|
|
6486
|
+
'stripePriceId'?: string;
|
|
6487
|
+
}
|
|
6488
|
+
/**
|
|
6489
|
+
*
|
|
6490
|
+
* @export
|
|
6491
|
+
* @interface PlanPriceInput
|
|
6492
|
+
*/
|
|
6493
|
+
export interface PlanPriceInput {
|
|
6494
|
+
/**
|
|
6495
|
+
*
|
|
6496
|
+
* @type {number}
|
|
6497
|
+
* @memberof PlanPriceInput
|
|
6498
|
+
*/
|
|
6499
|
+
'amountInCents': number;
|
|
6500
|
+
/**
|
|
6501
|
+
*
|
|
6502
|
+
* @type {PlanInterval}
|
|
6503
|
+
* @memberof PlanPriceInput
|
|
6504
|
+
*/
|
|
6505
|
+
'interval': PlanInterval;
|
|
6506
|
+
}
|
|
6445
6507
|
/**
|
|
6446
6508
|
*
|
|
6447
6509
|
* @export
|
|
@@ -6812,13 +6874,19 @@ export interface PublicSubscriptionPlanResponse {
|
|
|
6812
6874
|
* @type {number}
|
|
6813
6875
|
* @memberof PublicSubscriptionPlanResponse
|
|
6814
6876
|
*/
|
|
6815
|
-
'amountInCents'
|
|
6877
|
+
'amountInCents'?: number;
|
|
6816
6878
|
/**
|
|
6817
6879
|
*
|
|
6818
6880
|
* @type {string}
|
|
6819
6881
|
* @memberof PublicSubscriptionPlanResponse
|
|
6820
6882
|
*/
|
|
6821
6883
|
'currency': string;
|
|
6884
|
+
/**
|
|
6885
|
+
*
|
|
6886
|
+
* @type {Array<PlanPrice>}
|
|
6887
|
+
* @memberof PublicSubscriptionPlanResponse
|
|
6888
|
+
*/
|
|
6889
|
+
'prices': Array<PlanPrice>;
|
|
6822
6890
|
/**
|
|
6823
6891
|
*
|
|
6824
6892
|
* @type {PlanInterval}
|
|
@@ -6831,6 +6899,12 @@ export interface PublicSubscriptionPlanResponse {
|
|
|
6831
6899
|
* @memberof PublicSubscriptionPlanResponse
|
|
6832
6900
|
*/
|
|
6833
6901
|
'description'?: string;
|
|
6902
|
+
/**
|
|
6903
|
+
*
|
|
6904
|
+
* @type {SubscriptionPlanDiscountResponse}
|
|
6905
|
+
* @memberof PublicSubscriptionPlanResponse
|
|
6906
|
+
*/
|
|
6907
|
+
'discount'?: SubscriptionPlanDiscountResponse;
|
|
6834
6908
|
}
|
|
6835
6909
|
/**
|
|
6836
6910
|
*
|
|
@@ -7461,6 +7535,12 @@ export interface SendSubscriptionInvitationRequest {
|
|
|
7461
7535
|
* @memberof SendSubscriptionInvitationRequest
|
|
7462
7536
|
*/
|
|
7463
7537
|
'productId': string;
|
|
7538
|
+
/**
|
|
7539
|
+
* Price spécifique proposé dans l\'invitation (facultatif).
|
|
7540
|
+
* @type {string}
|
|
7541
|
+
* @memberof SendSubscriptionInvitationRequest
|
|
7542
|
+
*/
|
|
7543
|
+
'priceId'?: string;
|
|
7464
7544
|
}
|
|
7465
7545
|
/**
|
|
7466
7546
|
*
|
|
@@ -9564,6 +9644,61 @@ export interface SubscriptionMutationResponse {
|
|
|
9564
9644
|
[key: string]: any;
|
|
9565
9645
|
};
|
|
9566
9646
|
}
|
|
9647
|
+
/**
|
|
9648
|
+
*
|
|
9649
|
+
* @export
|
|
9650
|
+
* @interface SubscriptionPlanDiscountResponse
|
|
9651
|
+
*/
|
|
9652
|
+
export interface SubscriptionPlanDiscountResponse {
|
|
9653
|
+
/**
|
|
9654
|
+
*
|
|
9655
|
+
* @type {DiscountType}
|
|
9656
|
+
* @memberof SubscriptionPlanDiscountResponse
|
|
9657
|
+
*/
|
|
9658
|
+
'type': DiscountType;
|
|
9659
|
+
/**
|
|
9660
|
+
*
|
|
9661
|
+
* @type {number}
|
|
9662
|
+
* @memberof SubscriptionPlanDiscountResponse
|
|
9663
|
+
*/
|
|
9664
|
+
'percentage'?: number;
|
|
9665
|
+
/**
|
|
9666
|
+
*
|
|
9667
|
+
* @type {number}
|
|
9668
|
+
* @memberof SubscriptionPlanDiscountResponse
|
|
9669
|
+
*/
|
|
9670
|
+
'maxDiscountAmountInCents'?: number;
|
|
9671
|
+
/**
|
|
9672
|
+
*
|
|
9673
|
+
* @type {string}
|
|
9674
|
+
* @memberof SubscriptionPlanDiscountResponse
|
|
9675
|
+
*/
|
|
9676
|
+
'validFrom'?: string;
|
|
9677
|
+
/**
|
|
9678
|
+
*
|
|
9679
|
+
* @type {string}
|
|
9680
|
+
* @memberof SubscriptionPlanDiscountResponse
|
|
9681
|
+
*/
|
|
9682
|
+
'validTo'?: string;
|
|
9683
|
+
/**
|
|
9684
|
+
*
|
|
9685
|
+
* @type {Array<string>}
|
|
9686
|
+
* @memberof SubscriptionPlanDiscountResponse
|
|
9687
|
+
*/
|
|
9688
|
+
'offPeakRuleNames'?: Array<string>;
|
|
9689
|
+
/**
|
|
9690
|
+
*
|
|
9691
|
+
* @type {Array<OffPeakRule>}
|
|
9692
|
+
* @memberof SubscriptionPlanDiscountResponse
|
|
9693
|
+
*/
|
|
9694
|
+
'offPeakRules'?: Array<OffPeakRule>;
|
|
9695
|
+
/**
|
|
9696
|
+
*
|
|
9697
|
+
* @type {boolean}
|
|
9698
|
+
* @memberof SubscriptionPlanDiscountResponse
|
|
9699
|
+
*/
|
|
9700
|
+
'bookingFree'?: boolean;
|
|
9701
|
+
}
|
|
9567
9702
|
/**
|
|
9568
9703
|
*
|
|
9569
9704
|
* @export
|
|
@@ -9599,13 +9734,19 @@ export interface SubscriptionPlanResponse {
|
|
|
9599
9734
|
* @type {number}
|
|
9600
9735
|
* @memberof SubscriptionPlanResponse
|
|
9601
9736
|
*/
|
|
9602
|
-
'amountInCents'
|
|
9737
|
+
'amountInCents'?: number;
|
|
9603
9738
|
/**
|
|
9604
9739
|
*
|
|
9605
9740
|
* @type {string}
|
|
9606
9741
|
* @memberof SubscriptionPlanResponse
|
|
9607
9742
|
*/
|
|
9608
9743
|
'currency': string;
|
|
9744
|
+
/**
|
|
9745
|
+
*
|
|
9746
|
+
* @type {Array<PlanPrice>}
|
|
9747
|
+
* @memberof SubscriptionPlanResponse
|
|
9748
|
+
*/
|
|
9749
|
+
'prices': Array<PlanPrice>;
|
|
9609
9750
|
/**
|
|
9610
9751
|
*
|
|
9611
9752
|
* @type {PlanInterval}
|
|
@@ -9618,6 +9759,18 @@ export interface SubscriptionPlanResponse {
|
|
|
9618
9759
|
* @memberof SubscriptionPlanResponse
|
|
9619
9760
|
*/
|
|
9620
9761
|
'priceActive': boolean;
|
|
9762
|
+
/**
|
|
9763
|
+
*
|
|
9764
|
+
* @type {string}
|
|
9765
|
+
* @memberof SubscriptionPlanResponse
|
|
9766
|
+
*/
|
|
9767
|
+
'description'?: string;
|
|
9768
|
+
/**
|
|
9769
|
+
*
|
|
9770
|
+
* @type {SubscriptionPlanDiscountResponse}
|
|
9771
|
+
* @memberof SubscriptionPlanResponse
|
|
9772
|
+
*/
|
|
9773
|
+
'discount'?: SubscriptionPlanDiscountResponse;
|
|
9621
9774
|
}
|
|
9622
9775
|
/**
|
|
9623
9776
|
*
|
|
@@ -16672,6 +16825,13 @@ export declare class SportsPublicApi extends BaseAPI {
|
|
|
16672
16825
|
* @export
|
|
16673
16826
|
*/
|
|
16674
16827
|
export declare const SubscriptionsManagerApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
16828
|
+
/**
|
|
16829
|
+
* Supprime (archive) un plan par productId (manager)
|
|
16830
|
+
* @param {string} productId
|
|
16831
|
+
* @param {*} [options] Override http request option.
|
|
16832
|
+
* @throws {RequiredError}
|
|
16833
|
+
*/
|
|
16834
|
+
archivePlan: (productId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
16675
16835
|
/**
|
|
16676
16836
|
* Crée un nouveau plan d\'abonnement (produit + price) pour le club (manager)
|
|
16677
16837
|
* @param {CreateSubscriptionPlanRequest} createSubscriptionPlanRequest
|
|
@@ -16680,7 +16840,7 @@ export declare const SubscriptionsManagerApiAxiosParamCreator: (configuration?:
|
|
|
16680
16840
|
*/
|
|
16681
16841
|
createPlan: (createSubscriptionPlanRequest: CreateSubscriptionPlanRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
16682
16842
|
/**
|
|
16683
|
-
* Supprime
|
|
16843
|
+
* Supprime un plan par productId (manager)
|
|
16684
16844
|
* @param {string} productId
|
|
16685
16845
|
* @param {*} [options] Override http request option.
|
|
16686
16846
|
* @throws {RequiredError}
|
|
@@ -16699,6 +16859,13 @@ export declare const SubscriptionsManagerApiAxiosParamCreator: (configuration?:
|
|
|
16699
16859
|
* @export
|
|
16700
16860
|
*/
|
|
16701
16861
|
export declare const SubscriptionsManagerApiFp: (configuration?: Configuration) => {
|
|
16862
|
+
/**
|
|
16863
|
+
* Supprime (archive) un plan par productId (manager)
|
|
16864
|
+
* @param {string} productId
|
|
16865
|
+
* @param {*} [options] Override http request option.
|
|
16866
|
+
* @throws {RequiredError}
|
|
16867
|
+
*/
|
|
16868
|
+
archivePlan(productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteSubscriptionPlanResponse>>;
|
|
16702
16869
|
/**
|
|
16703
16870
|
* Crée un nouveau plan d\'abonnement (produit + price) pour le club (manager)
|
|
16704
16871
|
* @param {CreateSubscriptionPlanRequest} createSubscriptionPlanRequest
|
|
@@ -16707,7 +16874,7 @@ export declare const SubscriptionsManagerApiFp: (configuration?: Configuration)
|
|
|
16707
16874
|
*/
|
|
16708
16875
|
createPlan(createSubscriptionPlanRequest: CreateSubscriptionPlanRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePlan201Response>>;
|
|
16709
16876
|
/**
|
|
16710
|
-
* Supprime
|
|
16877
|
+
* Supprime un plan par productId (manager)
|
|
16711
16878
|
* @param {string} productId
|
|
16712
16879
|
* @param {*} [options] Override http request option.
|
|
16713
16880
|
* @throws {RequiredError}
|
|
@@ -16726,6 +16893,13 @@ export declare const SubscriptionsManagerApiFp: (configuration?: Configuration)
|
|
|
16726
16893
|
* @export
|
|
16727
16894
|
*/
|
|
16728
16895
|
export declare const SubscriptionsManagerApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
16896
|
+
/**
|
|
16897
|
+
* Supprime (archive) un plan par productId (manager)
|
|
16898
|
+
* @param {SubscriptionsManagerApiArchivePlanRequest} requestParameters Request parameters.
|
|
16899
|
+
* @param {*} [options] Override http request option.
|
|
16900
|
+
* @throws {RequiredError}
|
|
16901
|
+
*/
|
|
16902
|
+
archivePlan(requestParameters: SubscriptionsManagerApiArchivePlanRequest, options?: RawAxiosRequestConfig): AxiosPromise<DeleteSubscriptionPlanResponse>;
|
|
16729
16903
|
/**
|
|
16730
16904
|
* Crée un nouveau plan d\'abonnement (produit + price) pour le club (manager)
|
|
16731
16905
|
* @param {SubscriptionsManagerApiCreatePlanRequest} requestParameters Request parameters.
|
|
@@ -16734,7 +16908,7 @@ export declare const SubscriptionsManagerApiFactory: (configuration?: Configurat
|
|
|
16734
16908
|
*/
|
|
16735
16909
|
createPlan(requestParameters: SubscriptionsManagerApiCreatePlanRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreatePlan201Response>;
|
|
16736
16910
|
/**
|
|
16737
|
-
* Supprime
|
|
16911
|
+
* Supprime un plan par productId (manager)
|
|
16738
16912
|
* @param {SubscriptionsManagerApiDeletePlanRequest} requestParameters Request parameters.
|
|
16739
16913
|
* @param {*} [options] Override http request option.
|
|
16740
16914
|
* @throws {RequiredError}
|
|
@@ -16748,6 +16922,19 @@ export declare const SubscriptionsManagerApiFactory: (configuration?: Configurat
|
|
|
16748
16922
|
*/
|
|
16749
16923
|
updatePlan(requestParameters: SubscriptionsManagerApiUpdatePlanRequest, options?: RawAxiosRequestConfig): AxiosPromise<StripeStripeResponseStripeStripePrice>;
|
|
16750
16924
|
};
|
|
16925
|
+
/**
|
|
16926
|
+
* Request parameters for archivePlan operation in SubscriptionsManagerApi.
|
|
16927
|
+
* @export
|
|
16928
|
+
* @interface SubscriptionsManagerApiArchivePlanRequest
|
|
16929
|
+
*/
|
|
16930
|
+
export interface SubscriptionsManagerApiArchivePlanRequest {
|
|
16931
|
+
/**
|
|
16932
|
+
*
|
|
16933
|
+
* @type {string}
|
|
16934
|
+
* @memberof SubscriptionsManagerApiArchivePlan
|
|
16935
|
+
*/
|
|
16936
|
+
readonly productId: string;
|
|
16937
|
+
}
|
|
16751
16938
|
/**
|
|
16752
16939
|
* Request parameters for createPlan operation in SubscriptionsManagerApi.
|
|
16753
16940
|
* @export
|
|
@@ -16794,6 +16981,14 @@ export interface SubscriptionsManagerApiUpdatePlanRequest {
|
|
|
16794
16981
|
* @extends {BaseAPI}
|
|
16795
16982
|
*/
|
|
16796
16983
|
export declare class SubscriptionsManagerApi extends BaseAPI {
|
|
16984
|
+
/**
|
|
16985
|
+
* Supprime (archive) un plan par productId (manager)
|
|
16986
|
+
* @param {SubscriptionsManagerApiArchivePlanRequest} requestParameters Request parameters.
|
|
16987
|
+
* @param {*} [options] Override http request option.
|
|
16988
|
+
* @throws {RequiredError}
|
|
16989
|
+
* @memberof SubscriptionsManagerApi
|
|
16990
|
+
*/
|
|
16991
|
+
archivePlan(requestParameters: SubscriptionsManagerApiArchivePlanRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteSubscriptionPlanResponse, any, {}>>;
|
|
16797
16992
|
/**
|
|
16798
16993
|
* Crée un nouveau plan d\'abonnement (produit + price) pour le club (manager)
|
|
16799
16994
|
* @param {SubscriptionsManagerApiCreatePlanRequest} requestParameters Request parameters.
|
|
@@ -16803,7 +16998,7 @@ export declare class SubscriptionsManagerApi extends BaseAPI {
|
|
|
16803
16998
|
*/
|
|
16804
16999
|
createPlan(requestParameters: SubscriptionsManagerApiCreatePlanRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePlan201Response, any, {}>>;
|
|
16805
17000
|
/**
|
|
16806
|
-
* Supprime
|
|
17001
|
+
* Supprime un plan par productId (manager)
|
|
16807
17002
|
* @param {SubscriptionsManagerApiDeletePlanRequest} requestParameters Request parameters.
|
|
16808
17003
|
* @param {*} [options] Override http request option.
|
|
16809
17004
|
* @throws {RequiredError}
|
package/dist/esm/api.js
CHANGED
|
@@ -9058,6 +9058,37 @@ export class SportsPublicApi extends BaseAPI {
|
|
|
9058
9058
|
*/
|
|
9059
9059
|
export const SubscriptionsManagerApiAxiosParamCreator = function (configuration) {
|
|
9060
9060
|
return {
|
|
9061
|
+
/**
|
|
9062
|
+
* Supprime (archive) un plan par productId (manager)
|
|
9063
|
+
* @param {string} productId
|
|
9064
|
+
* @param {*} [options] Override http request option.
|
|
9065
|
+
* @throws {RequiredError}
|
|
9066
|
+
*/
|
|
9067
|
+
archivePlan: (productId_1, ...args_1) => __awaiter(this, [productId_1, ...args_1], void 0, function* (productId, options = {}) {
|
|
9068
|
+
// verify required parameter 'productId' is not null or undefined
|
|
9069
|
+
assertParamExists('archivePlan', 'productId', productId);
|
|
9070
|
+
const localVarPath = `/api/subscriptions/plans/{productId}/archive`
|
|
9071
|
+
.replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
|
|
9072
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9073
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9074
|
+
let baseOptions;
|
|
9075
|
+
if (configuration) {
|
|
9076
|
+
baseOptions = configuration.baseOptions;
|
|
9077
|
+
}
|
|
9078
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
9079
|
+
const localVarHeaderParameter = {};
|
|
9080
|
+
const localVarQueryParameter = {};
|
|
9081
|
+
// authentication bearerAuth required
|
|
9082
|
+
// http bearer authentication required
|
|
9083
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
9084
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9085
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9086
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
9087
|
+
return {
|
|
9088
|
+
url: toPathString(localVarUrlObj),
|
|
9089
|
+
options: localVarRequestOptions,
|
|
9090
|
+
};
|
|
9091
|
+
}),
|
|
9061
9092
|
/**
|
|
9062
9093
|
* Crée un nouveau plan d\'abonnement (produit + price) pour le club (manager)
|
|
9063
9094
|
* @param {CreateSubscriptionPlanRequest} createSubscriptionPlanRequest
|
|
@@ -9091,7 +9122,7 @@ export const SubscriptionsManagerApiAxiosParamCreator = function (configuration)
|
|
|
9091
9122
|
};
|
|
9092
9123
|
}),
|
|
9093
9124
|
/**
|
|
9094
|
-
* Supprime
|
|
9125
|
+
* Supprime un plan par productId (manager)
|
|
9095
9126
|
* @param {string} productId
|
|
9096
9127
|
* @param {*} [options] Override http request option.
|
|
9097
9128
|
* @throws {RequiredError}
|
|
@@ -9162,6 +9193,21 @@ export const SubscriptionsManagerApiAxiosParamCreator = function (configuration)
|
|
|
9162
9193
|
export const SubscriptionsManagerApiFp = function (configuration) {
|
|
9163
9194
|
const localVarAxiosParamCreator = SubscriptionsManagerApiAxiosParamCreator(configuration);
|
|
9164
9195
|
return {
|
|
9196
|
+
/**
|
|
9197
|
+
* Supprime (archive) un plan par productId (manager)
|
|
9198
|
+
* @param {string} productId
|
|
9199
|
+
* @param {*} [options] Override http request option.
|
|
9200
|
+
* @throws {RequiredError}
|
|
9201
|
+
*/
|
|
9202
|
+
archivePlan(productId, options) {
|
|
9203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9204
|
+
var _a, _b, _c;
|
|
9205
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.archivePlan(productId, options);
|
|
9206
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
9207
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['SubscriptionsManagerApi.archivePlan']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
9208
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9209
|
+
});
|
|
9210
|
+
},
|
|
9165
9211
|
/**
|
|
9166
9212
|
* Crée un nouveau plan d\'abonnement (produit + price) pour le club (manager)
|
|
9167
9213
|
* @param {CreateSubscriptionPlanRequest} createSubscriptionPlanRequest
|
|
@@ -9178,7 +9224,7 @@ export const SubscriptionsManagerApiFp = function (configuration) {
|
|
|
9178
9224
|
});
|
|
9179
9225
|
},
|
|
9180
9226
|
/**
|
|
9181
|
-
* Supprime
|
|
9227
|
+
* Supprime un plan par productId (manager)
|
|
9182
9228
|
* @param {string} productId
|
|
9183
9229
|
* @param {*} [options] Override http request option.
|
|
9184
9230
|
* @throws {RequiredError}
|
|
@@ -9216,6 +9262,15 @@ export const SubscriptionsManagerApiFp = function (configuration) {
|
|
|
9216
9262
|
export const SubscriptionsManagerApiFactory = function (configuration, basePath, axios) {
|
|
9217
9263
|
const localVarFp = SubscriptionsManagerApiFp(configuration);
|
|
9218
9264
|
return {
|
|
9265
|
+
/**
|
|
9266
|
+
* Supprime (archive) un plan par productId (manager)
|
|
9267
|
+
* @param {SubscriptionsManagerApiArchivePlanRequest} requestParameters Request parameters.
|
|
9268
|
+
* @param {*} [options] Override http request option.
|
|
9269
|
+
* @throws {RequiredError}
|
|
9270
|
+
*/
|
|
9271
|
+
archivePlan(requestParameters, options) {
|
|
9272
|
+
return localVarFp.archivePlan(requestParameters.productId, options).then((request) => request(axios, basePath));
|
|
9273
|
+
},
|
|
9219
9274
|
/**
|
|
9220
9275
|
* Crée un nouveau plan d\'abonnement (produit + price) pour le club (manager)
|
|
9221
9276
|
* @param {SubscriptionsManagerApiCreatePlanRequest} requestParameters Request parameters.
|
|
@@ -9226,7 +9281,7 @@ export const SubscriptionsManagerApiFactory = function (configuration, basePath,
|
|
|
9226
9281
|
return localVarFp.createPlan(requestParameters.createSubscriptionPlanRequest, options).then((request) => request(axios, basePath));
|
|
9227
9282
|
},
|
|
9228
9283
|
/**
|
|
9229
|
-
* Supprime
|
|
9284
|
+
* Supprime un plan par productId (manager)
|
|
9230
9285
|
* @param {SubscriptionsManagerApiDeletePlanRequest} requestParameters Request parameters.
|
|
9231
9286
|
* @param {*} [options] Override http request option.
|
|
9232
9287
|
* @throws {RequiredError}
|
|
@@ -9252,6 +9307,16 @@ export const SubscriptionsManagerApiFactory = function (configuration, basePath,
|
|
|
9252
9307
|
* @extends {BaseAPI}
|
|
9253
9308
|
*/
|
|
9254
9309
|
export class SubscriptionsManagerApi extends BaseAPI {
|
|
9310
|
+
/**
|
|
9311
|
+
* Supprime (archive) un plan par productId (manager)
|
|
9312
|
+
* @param {SubscriptionsManagerApiArchivePlanRequest} requestParameters Request parameters.
|
|
9313
|
+
* @param {*} [options] Override http request option.
|
|
9314
|
+
* @throws {RequiredError}
|
|
9315
|
+
* @memberof SubscriptionsManagerApi
|
|
9316
|
+
*/
|
|
9317
|
+
archivePlan(requestParameters, options) {
|
|
9318
|
+
return SubscriptionsManagerApiFp(this.configuration).archivePlan(requestParameters.productId, options).then((request) => request(this.axios, this.basePath));
|
|
9319
|
+
}
|
|
9255
9320
|
/**
|
|
9256
9321
|
* Crée un nouveau plan d\'abonnement (produit + price) pour le club (manager)
|
|
9257
9322
|
* @param {SubscriptionsManagerApiCreatePlanRequest} requestParameters Request parameters.
|
|
@@ -9263,7 +9328,7 @@ export class SubscriptionsManagerApi extends BaseAPI {
|
|
|
9263
9328
|
return SubscriptionsManagerApiFp(this.configuration).createPlan(requestParameters.createSubscriptionPlanRequest, options).then((request) => request(this.axios, this.basePath));
|
|
9264
9329
|
}
|
|
9265
9330
|
/**
|
|
9266
|
-
* Supprime
|
|
9331
|
+
* Supprime un plan par productId (manager)
|
|
9267
9332
|
* @param {SubscriptionsManagerApiDeletePlanRequest} requestParameters Request parameters.
|
|
9268
9333
|
* @param {*} [options] Override http request option.
|
|
9269
9334
|
* @throws {RequiredError}
|
|
@@ -7,9 +7,9 @@ Name | Type | Description | Notes
|
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
8
|
**id** | **string** | ID du plan d\'abonnement | [default to undefined]
|
|
9
9
|
**name** | **string** | Nom du plan | [default to undefined]
|
|
10
|
-
**
|
|
10
|
+
**prices** | [**Array<PlanPrice>**](PlanPrice.md) | Tarifications disponibles | [default to undefined]
|
|
11
11
|
**currency** | **string** | Devise | [default to undefined]
|
|
12
|
-
**interval** | **string** | Intervalle
|
|
12
|
+
**interval** | **string** | Intervalle par défaut | [default to undefined]
|
|
13
13
|
|
|
14
14
|
## Example
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ import { ClubPlayerSubscriptionSummary } from '@tennac-booking/sdk';
|
|
|
19
19
|
const instance: ClubPlayerSubscriptionSummary = {
|
|
20
20
|
id,
|
|
21
21
|
name,
|
|
22
|
-
|
|
22
|
+
prices,
|
|
23
23
|
currency,
|
|
24
24
|
interval,
|
|
25
25
|
};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**priceIds** | **Array<string>** | | [default to undefined]
|
|
8
9
|
**priceId** | **string** | | [default to undefined]
|
|
9
10
|
**productId** | **string** | | [default to undefined]
|
|
10
11
|
|
|
@@ -14,6 +15,7 @@ Name | Type | Description | Notes
|
|
|
14
15
|
import { CreatePlan201Response } from '@tennac-booking/sdk';
|
|
15
16
|
|
|
16
17
|
const instance: CreatePlan201Response = {
|
|
18
|
+
priceIds,
|
|
17
19
|
priceId,
|
|
18
20
|
productId,
|
|
19
21
|
};
|
|
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**clubId** | **string** | | [optional] [default to undefined]
|
|
9
9
|
**name** | **string** | | [default to undefined]
|
|
10
10
|
**description** | **string** | | [optional] [default to undefined]
|
|
11
|
-
**
|
|
11
|
+
**prices** | [**Array<PlanPriceInput>**](PlanPriceInput.md) | | [default to undefined]
|
|
12
12
|
**currency** | **string** | | [default to undefined]
|
|
13
13
|
**interval** | [**PlanInterval**](PlanInterval.md) | | [default to undefined]
|
|
14
14
|
**discount** | [**CreateSubscriptionPlanRequestDiscount**](CreateSubscriptionPlanRequestDiscount.md) | | [optional] [default to undefined]
|
|
@@ -22,7 +22,7 @@ const instance: CreateSubscriptionPlanRequest = {
|
|
|
22
22
|
clubId,
|
|
23
23
|
name,
|
|
24
24
|
description,
|
|
25
|
-
|
|
25
|
+
prices,
|
|
26
26
|
currency,
|
|
27
27
|
interval,
|
|
28
28
|
discount,
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
8
|
**message** | **string** | | [default to undefined]
|
|
9
|
+
**archivedInstead** | **boolean** | | [optional] [default to undefined]
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
|
@@ -14,6 +15,7 @@ import { DeleteSubscriptionPlanResponse } from '@tennac-booking/sdk';
|
|
|
14
15
|
|
|
15
16
|
const instance: DeleteSubscriptionPlanResponse = {
|
|
16
17
|
message,
|
|
18
|
+
archivedInstead,
|
|
17
19
|
};
|
|
18
20
|
```
|
|
19
21
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# PlanPrice
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**amountInCents** | **number** | | [default to undefined]
|
|
9
|
+
**interval** | [**PlanInterval**](PlanInterval.md) | | [default to undefined]
|
|
10
|
+
**active** | **boolean** | | [optional] [default to undefined]
|
|
11
|
+
**stripePriceId** | **string** | | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { PlanPrice } from '@tennac-booking/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: PlanPrice = {
|
|
19
|
+
amountInCents,
|
|
20
|
+
interval,
|
|
21
|
+
active,
|
|
22
|
+
stripePriceId,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# PlanPriceInput
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**amountInCents** | **number** | | [default to undefined]
|
|
9
|
+
**interval** | [**PlanInterval**](PlanInterval.md) | | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { PlanPriceInput } from '@tennac-booking/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: PlanPriceInput = {
|
|
17
|
+
amountInCents,
|
|
18
|
+
interval,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -7,10 +7,12 @@ Name | Type | Description | Notes
|
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
8
|
**priceId** | **string** | | [default to undefined]
|
|
9
9
|
**name** | **string** | | [default to undefined]
|
|
10
|
-
**amountInCents** | **number** | | [default to undefined]
|
|
10
|
+
**amountInCents** | **number** | | [optional] [default to undefined]
|
|
11
11
|
**currency** | **string** | | [default to undefined]
|
|
12
|
+
**prices** | [**Array<PlanPrice>**](PlanPrice.md) | | [default to undefined]
|
|
12
13
|
**interval** | [**PlanInterval**](PlanInterval.md) | | [optional] [default to undefined]
|
|
13
14
|
**description** | **string** | | [optional] [default to undefined]
|
|
15
|
+
**discount** | [**SubscriptionPlanDiscountResponse**](SubscriptionPlanDiscountResponse.md) | | [optional] [default to undefined]
|
|
14
16
|
|
|
15
17
|
## Example
|
|
16
18
|
|
|
@@ -22,8 +24,10 @@ const instance: PublicSubscriptionPlanResponse = {
|
|
|
22
24
|
name,
|
|
23
25
|
amountInCents,
|
|
24
26
|
currency,
|
|
27
|
+
prices,
|
|
25
28
|
interval,
|
|
26
29
|
description,
|
|
30
|
+
discount,
|
|
27
31
|
};
|
|
28
32
|
```
|
|
29
33
|
|
|
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
8
|
**userId** | **string** | | [default to undefined]
|
|
9
9
|
**productId** | **string** | Identifiant Stripe (productId) du plan sélectionné par le staff. | [default to undefined]
|
|
10
|
+
**priceId** | **string** | Price spécifique proposé dans l\'invitation (facultatif). | [optional] [default to undefined]
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,6 +17,7 @@ import { SendSubscriptionInvitationRequest } from '@tennac-booking/sdk';
|
|
|
16
17
|
const instance: SendSubscriptionInvitationRequest = {
|
|
17
18
|
userId,
|
|
18
19
|
productId,
|
|
20
|
+
priceId,
|
|
19
21
|
};
|
|
20
22
|
```
|
|
21
23
|
|