stigg 0.1.0.pre.alpha.1 → 0.1.0.pre.alpha.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/README.md +29 -1
- data/lib/stigg/internal/my_cursor_id_page.rb +32 -4
- data/lib/stigg/internal/type/base_model.rb +2 -2
- data/lib/stigg/models/v1/{coupon_create_response.rb → coupon.rb} +31 -26
- data/lib/stigg/models/v1/coupon_create_params.rb +2 -0
- data/lib/stigg/models/v1/coupon_list_params.rb +14 -14
- data/lib/stigg/models/v1/coupon_list_response.rb +262 -278
- data/lib/stigg/models/v1/customer_import_params.rb +75 -0
- data/lib/stigg/models/v1/customer_import_response.rb +35 -0
- data/lib/stigg/models/v1/customer_list_params.rb +14 -14
- data/lib/stigg/models/v1/customer_list_response.rb +160 -174
- data/lib/stigg/models/v1/{customer_create_params.rb → customer_provision_params.rb} +18 -16
- data/lib/stigg/models/v1/customer_response.rb +9 -2
- data/lib/stigg/models/v1/customer_update_params.rb +2 -0
- data/lib/stigg/models/v1/customers/payment_method_attach_params.rb +3 -1
- data/lib/stigg/models/v1/customers/{promotional_create_params.rb → promotional_entitlement_grant_params.rb} +46 -44
- data/lib/stigg/models/v1/customers/{promotional_create_response.rb → promotional_entitlement_grant_response.rb} +105 -32
- data/lib/stigg/models/v1/customers/{promotional_revoke_params.rb → promotional_entitlement_revoke_params.rb} +2 -2
- data/lib/stigg/models/v1/customers/{promotional_revoke_response.rb → promotional_entitlement_revoke_response.rb} +107 -33
- data/lib/stigg/models/v1/event_report_params.rb +91 -0
- data/lib/stigg/models/v1/event_report_response.rb +25 -0
- data/lib/stigg/models/v1/{subscription_retrieve_response.rb → subscription.rb} +67 -26
- data/lib/stigg/models/v1/subscription_cancel_params.rb +75 -0
- data/lib/stigg/models/v1/subscription_delegate_params.rb +7 -2
- data/lib/stigg/models/v1/subscription_import_params.rb +92 -0
- data/lib/stigg/models/v1/subscription_import_response.rb +32 -0
- data/lib/stigg/models/v1/subscription_list_params.rb +20 -24
- data/lib/stigg/models/v1/subscription_list_response.rb +255 -236
- data/lib/stigg/models/v1/subscription_migrate_params.rb +3 -3
- data/lib/stigg/models/v1/subscription_preview_params.rb +139 -46
- data/lib/stigg/models/v1/subscription_preview_response.rb +164 -49
- data/lib/stigg/models/v1/subscription_provision_params.rb +1693 -0
- data/lib/stigg/models/v1/subscription_provision_response.rb +1038 -0
- data/lib/stigg/models/v1/subscription_transfer_params.rb +2 -6
- data/lib/stigg/models/v1/subscription_update_params.rb +1114 -0
- data/lib/stigg/models/v1/subscriptions/{future_update_cancel_pending_payment_response.rb → cancel_subscription.rb} +9 -5
- data/lib/stigg/models/v1/usage_history_params.rb +54 -0
- data/lib/stigg/models/v1/usage_history_response.rb +155 -0
- data/lib/stigg/models/v1/usage_report_params.rb +114 -0
- data/lib/stigg/models/v1/usage_report_response.rb +120 -0
- data/lib/stigg/models.rb +0 -4
- data/lib/stigg/resources/v1/coupons.rb +16 -14
- data/lib/stigg/resources/v1/customers/payment_method.rb +6 -5
- data/lib/stigg/resources/v1/customers/{promotional.rb → promotional_entitlements.rb} +17 -17
- data/lib/stigg/resources/v1/customers.rb +78 -56
- data/lib/stigg/resources/v1/events.rb +38 -0
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +10 -8
- data/lib/stigg/resources/v1/subscriptions.rb +206 -79
- data/lib/stigg/resources/v1/usage.rb +79 -0
- data/lib/stigg/resources/v1.rb +6 -42
- data/lib/stigg/version.rb +1 -1
- data/lib/stigg.rb +25 -23
- data/rbi/stigg/internal/my_cursor_id_page.rbi +27 -0
- data/rbi/stigg/models/v1/coupon.rbi +891 -0
- data/rbi/stigg/models/v1/coupon_create_params.rbi +1 -0
- data/rbi/stigg/models/v1/coupon_list_params.rbi +21 -21
- data/rbi/stigg/models/v1/coupon_list_response.rbi +812 -869
- data/rbi/stigg/models/v1/customer_import_params.rbi +130 -0
- data/rbi/stigg/models/v1/customer_import_response.rbi +76 -0
- data/rbi/stigg/models/v1/customer_list_params.rbi +21 -21
- data/rbi/stigg/models/v1/customer_list_response.rbi +307 -347
- data/rbi/stigg/models/v1/{customer_create_params.rbi → customer_provision_params.rbi} +36 -35
- data/rbi/stigg/models/v1/customer_response.rbi +8 -1
- data/rbi/stigg/models/v1/customer_update_params.rbi +1 -0
- data/rbi/stigg/models/v1/customers/payment_method_attach_params.rbi +3 -0
- data/rbi/stigg/models/v1/customers/{promotional_create_params.rbi → promotional_entitlement_grant_params.rbi} +78 -77
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_response.rbi +690 -0
- data/rbi/stigg/models/v1/customers/{promotional_revoke_params.rbi → promotional_entitlement_revoke_params.rbi} +2 -2
- data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbi +696 -0
- data/rbi/stigg/models/v1/event_report_params.rbi +168 -0
- data/rbi/stigg/models/v1/event_report_response.rbi +35 -0
- data/rbi/stigg/models/v1/{subscription_migrate_response.rbi → subscription.rbi} +130 -98
- data/rbi/stigg/models/v1/subscription_cancel_params.rbi +182 -0
- data/rbi/stigg/models/v1/subscription_delegate_params.rbi +6 -2
- data/rbi/stigg/models/v1/subscription_import_params.rbi +148 -0
- data/rbi/stigg/models/v1/subscription_import_response.rbi +69 -0
- data/rbi/stigg/models/v1/subscription_list_params.rbi +26 -28
- data/rbi/stigg/models/v1/subscription_list_response.rbi +460 -435
- data/rbi/stigg/models/v1/subscription_migrate_params.rbi +3 -3
- data/rbi/stigg/models/v1/subscription_preview_params.rbi +112 -14
- data/rbi/stigg/models/v1/subscription_preview_response.rbi +139 -6
- data/rbi/stigg/models/v1/subscription_provision_params.rbi +5306 -0
- data/rbi/stigg/models/v1/subscription_provision_response.rbi +3175 -0
- data/rbi/stigg/models/v1/subscription_transfer_params.rbi +2 -4
- data/rbi/stigg/models/v1/subscription_update_params.rbi +3578 -0
- data/rbi/stigg/models/v1/subscriptions/{future_update_cancel_schedule_response.rbi → cancel_subscription.rbi} +10 -16
- data/rbi/stigg/models/v1/usage_history_params.rbi +79 -0
- data/rbi/stigg/models/v1/usage_history_response.rbi +347 -0
- data/rbi/stigg/models/v1/usage_report_params.rbi +227 -0
- data/rbi/stigg/models/v1/usage_report_response.rbi +162 -0
- data/rbi/stigg/models.rbi +0 -4
- data/rbi/stigg/resources/v1/coupons.rbi +22 -14
- data/rbi/stigg/resources/v1/customers/payment_method.rbi +9 -3
- data/rbi/stigg/resources/v1/customers/{promotional.rbi → promotional_entitlements.rbi} +13 -9
- data/rbi/stigg/resources/v1/customers.rbi +84 -53
- data/rbi/stigg/resources/v1/events.rbi +28 -0
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +14 -10
- data/rbi/stigg/resources/v1/subscriptions.rbi +242 -58
- data/rbi/stigg/resources/v1/usage.rbi +57 -0
- data/rbi/stigg/resources/v1.rbi +4 -26
- data/sig/stigg/internal/my_cursor_id_page.rbs +17 -0
- data/sig/stigg/models/v1/{coupon_create_response.rbs → coupon.rbs} +29 -32
- data/sig/stigg/models/v1/coupon_list_params.rbs +11 -11
- data/sig/stigg/models/v1/coupon_list_response.rbs +331 -351
- data/sig/stigg/models/v1/customer_import_params.rbs +74 -0
- data/sig/stigg/models/v1/customer_import_response.rbs +30 -0
- data/sig/stigg/models/v1/customer_list_params.rbs +11 -11
- data/sig/stigg/models/v1/customer_list_response.rbs +133 -153
- data/sig/stigg/models/v1/{customer_create_params.rbs → customer_provision_params.rbs} +22 -22
- data/sig/stigg/models/v1/customers/{promotional_create_params.rbs → promotional_entitlement_grant_params.rbs} +43 -43
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_response.rbs +281 -0
- data/sig/stigg/models/v1/customers/{promotional_revoke_params.rbs → promotional_entitlement_revoke_params.rbs} +2 -2
- data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbs +281 -0
- data/sig/stigg/models/v1/event_report_params.rbs +82 -0
- data/sig/stigg/models/v1/event_report_response.rbs +15 -0
- data/sig/stigg/models/v1/{subscription_retrieve_response.rbs → subscription.rbs} +61 -35
- data/sig/stigg/models/v1/subscription_cancel_params.rbs +79 -0
- data/sig/stigg/models/v1/subscription_import_params.rbs +84 -0
- data/sig/stigg/models/v1/subscription_import_response.rbs +30 -0
- data/sig/stigg/models/v1/subscription_list_params.rbs +14 -14
- data/sig/stigg/models/v1/subscription_list_response.rbs +196 -189
- data/sig/stigg/models/v1/subscription_preview_params.rbs +2 -6
- data/sig/stigg/models/v1/subscription_provision_params.rbs +2223 -0
- data/sig/stigg/models/v1/subscription_provision_response.rbs +1305 -0
- data/sig/stigg/models/v1/subscription_update_params.rbs +1544 -0
- data/sig/stigg/models/v1/subscriptions/cancel_subscription.rbs +34 -0
- data/sig/stigg/models/v1/usage_history_params.rbs +52 -0
- data/sig/stigg/models/v1/usage_history_response.rbs +129 -0
- data/sig/stigg/models/v1/usage_report_params.rbs +102 -0
- data/sig/stigg/models/v1/usage_report_response.rbs +87 -0
- data/sig/stigg/models.rbs +0 -4
- data/sig/stigg/resources/v1/coupons.rbs +5 -5
- data/sig/stigg/resources/v1/customers/{promotional.rbs → promotional_entitlements.rbs} +5 -5
- data/sig/stigg/resources/v1/customers.rbs +20 -17
- data/sig/stigg/resources/v1/events.rbs +14 -0
- data/sig/stigg/resources/v1/subscriptions/future_update.rbs +2 -2
- data/sig/stigg/resources/v1/subscriptions.rbs +68 -20
- data/sig/stigg/resources/v1/usage.rbs +24 -0
- data/sig/stigg/resources/v1.rbs +2 -8
- metadata +77 -71
- data/lib/stigg/models/v1/coupon_retrieve_response.rb +0 -317
- data/lib/stigg/models/v1/customers/usage_retrieve_params.rb +0 -56
- data/lib/stigg/models/v1/customers/usage_retrieve_response.rb +0 -145
- data/lib/stigg/models/v1/subscription_create_params.rb +0 -214
- data/lib/stigg/models/v1/subscription_create_response.rb +0 -338
- data/lib/stigg/models/v1/subscription_delegate_response.rb +0 -274
- data/lib/stigg/models/v1/subscription_migrate_response.rb +0 -274
- data/lib/stigg/models/v1/subscription_transfer_response.rb +0 -274
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +0 -32
- data/lib/stigg/models/v1_create_event_params.rb +0 -87
- data/lib/stigg/models/v1_create_event_response.rb +0 -16
- data/lib/stigg/models/v1_create_usage_params.rb +0 -96
- data/lib/stigg/models/v1_create_usage_response.rb +0 -112
- data/lib/stigg/resources/v1/customers/usage.rb +0 -59
- data/rbi/stigg/models/v1/coupon_create_response.rbi +0 -986
- data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +0 -986
- data/rbi/stigg/models/v1/customers/promotional_create_response.rbi +0 -495
- data/rbi/stigg/models/v1/customers/promotional_revoke_response.rbi +0 -497
- data/rbi/stigg/models/v1/customers/usage_retrieve_params.rbi +0 -84
- data/rbi/stigg/models/v1/customers/usage_retrieve_response.rbi +0 -353
- data/rbi/stigg/models/v1/subscription_create_params.rbi +0 -394
- data/rbi/stigg/models/v1/subscription_create_response.rbi +0 -668
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +0 -535
- data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +0 -535
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +0 -535
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +0 -79
- data/rbi/stigg/models/v1_create_event_params.rbi +0 -160
- data/rbi/stigg/models/v1_create_event_response.rbi +0 -23
- data/rbi/stigg/models/v1_create_usage_params.rbi +0 -177
- data/rbi/stigg/models/v1_create_usage_response.rbi +0 -150
- data/rbi/stigg/resources/v1/customers/usage.rbi +0 -45
- data/sig/stigg/models/v1/coupon_retrieve_response.rbs +0 -394
- data/sig/stigg/models/v1/customers/promotional_create_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/promotional_revoke_response.rbs +0 -209
- data/sig/stigg/models/v1/customers/usage_retrieve_params.rbs +0 -54
- data/sig/stigg/models/v1/customers/usage_retrieve_response.rbs +0 -134
- data/sig/stigg/models/v1/subscription_create_params.rbs +0 -199
- data/sig/stigg/models/v1/subscription_create_response.rbs +0 -283
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +0 -224
- data/sig/stigg/models/v1/subscription_migrate_response.rbs +0 -224
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +0 -224
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbs +0 -34
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbs +0 -34
- data/sig/stigg/models/v1_create_event_params.rbs +0 -80
- data/sig/stigg/models/v1_create_event_response.rbs +0 -13
- data/sig/stigg/models/v1_create_usage_params.rbs +0 -90
- data/sig/stigg/models/v1_create_usage_response.rbs +0 -85
- data/sig/stigg/resources/v1/customers/usage.rbs +0 -21
|
@@ -5,275 +5,294 @@ module Stigg
|
|
|
5
5
|
module V1
|
|
6
6
|
# @see Stigg::Resources::V1::Subscriptions#list
|
|
7
7
|
class SubscriptionListResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
-
# @!attribute
|
|
8
|
+
# @!attribute id
|
|
9
|
+
# Subscription ID
|
|
9
10
|
#
|
|
10
|
-
# @return [
|
|
11
|
-
required :
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :id, String
|
|
12
13
|
|
|
13
|
-
# @!
|
|
14
|
-
#
|
|
14
|
+
# @!attribute billing_id
|
|
15
|
+
# Billing ID
|
|
16
|
+
#
|
|
17
|
+
# @return [String, nil]
|
|
18
|
+
required :billing_id, String, api_name: :billingId, nil?: true
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
required :id, String
|
|
20
|
+
# @!attribute created_at
|
|
21
|
+
# Created at
|
|
22
|
+
#
|
|
23
|
+
# @return [Time]
|
|
24
|
+
required :created_at, Time, api_name: :createdAt
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
# @!attribute customer_id
|
|
27
|
+
# Customer ID
|
|
28
|
+
#
|
|
29
|
+
# @return [String]
|
|
30
|
+
required :customer_id, String, api_name: :customerId
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
# @!attribute payment_collection
|
|
33
|
+
# Payment collection
|
|
34
|
+
#
|
|
35
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionListResponse::PaymentCollection]
|
|
36
|
+
required :payment_collection,
|
|
37
|
+
enum: -> { Stigg::Models::V1::SubscriptionListResponse::PaymentCollection },
|
|
38
|
+
api_name: :paymentCollection
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
# @!attribute plan_id
|
|
41
|
+
# Plan ID
|
|
42
|
+
#
|
|
43
|
+
# @return [String]
|
|
44
|
+
required :plan_id, String, api_name: :planId
|
|
40
45
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
# @!attribute pricing_type
|
|
47
|
+
# Pricing type
|
|
48
|
+
#
|
|
49
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionListResponse::PricingType]
|
|
50
|
+
required :pricing_type,
|
|
51
|
+
enum: -> { Stigg::Models::V1::SubscriptionListResponse::PricingType },
|
|
52
|
+
api_name: :pricingType
|
|
46
53
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
enum: -> { Stigg::Models::V1::SubscriptionListResponse::Data::PaymentCollection },
|
|
53
|
-
api_name: :paymentCollection
|
|
54
|
+
# @!attribute start_date
|
|
55
|
+
# Subscription start date
|
|
56
|
+
#
|
|
57
|
+
# @return [Time]
|
|
58
|
+
required :start_date, Time, api_name: :startDate
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
# @!attribute status
|
|
61
|
+
# Subscription status
|
|
62
|
+
#
|
|
63
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionListResponse::Status]
|
|
64
|
+
required :status, enum: -> { Stigg::Models::V1::SubscriptionListResponse::Status }
|
|
60
65
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
enum: -> { Stigg::Models::V1::SubscriptionListResponse::Data::PricingType },
|
|
67
|
-
api_name: :pricingType
|
|
66
|
+
# @!attribute cancellation_date
|
|
67
|
+
# Subscription cancellation date
|
|
68
|
+
#
|
|
69
|
+
# @return [Time, nil]
|
|
70
|
+
optional :cancellation_date, Time, api_name: :cancellationDate, nil?: true
|
|
68
71
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
# @!attribute cancel_reason
|
|
73
|
+
# Subscription cancel reason
|
|
74
|
+
#
|
|
75
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionListResponse::CancelReason, nil]
|
|
76
|
+
optional :cancel_reason,
|
|
77
|
+
enum: -> { Stigg::Models::V1::SubscriptionListResponse::CancelReason },
|
|
78
|
+
api_name: :cancelReason,
|
|
79
|
+
nil?: true
|
|
80
|
+
|
|
81
|
+
# @!attribute current_billing_period_end
|
|
82
|
+
# End of the current billing period
|
|
83
|
+
#
|
|
84
|
+
# @return [Time, nil]
|
|
85
|
+
optional :current_billing_period_end, Time, api_name: :currentBillingPeriodEnd, nil?: true
|
|
74
86
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
# @!attribute current_billing_period_start
|
|
88
|
+
# Start of the current billing period
|
|
89
|
+
#
|
|
90
|
+
# @return [Time, nil]
|
|
91
|
+
optional :current_billing_period_start, Time, api_name: :currentBillingPeriodStart, nil?: true
|
|
80
92
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
93
|
+
# @!attribute effective_end_date
|
|
94
|
+
# Subscription effective end date
|
|
95
|
+
#
|
|
96
|
+
# @return [Time, nil]
|
|
97
|
+
optional :effective_end_date, Time, api_name: :effectiveEndDate, nil?: true
|
|
86
98
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
enum: -> { Stigg::Models::V1::SubscriptionListResponse::Data::CancelReason },
|
|
93
|
-
api_name: :cancelReason,
|
|
94
|
-
nil?: true
|
|
95
|
-
|
|
96
|
-
# @!attribute current_billing_period_end
|
|
97
|
-
# End of the current billing period
|
|
98
|
-
#
|
|
99
|
-
# @return [Time, nil]
|
|
100
|
-
optional :current_billing_period_end, Time, api_name: :currentBillingPeriodEnd, nil?: true
|
|
99
|
+
# @!attribute end_date
|
|
100
|
+
# Subscription end date
|
|
101
|
+
#
|
|
102
|
+
# @return [Time, nil]
|
|
103
|
+
optional :end_date, Time, api_name: :endDate, nil?: true
|
|
101
104
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
# @!attribute metadata
|
|
106
|
+
# Additional metadata for the subscription
|
|
107
|
+
#
|
|
108
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
109
|
+
optional :metadata, Stigg::Internal::Type::HashOf[String]
|
|
107
110
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
# @!attribute paying_customer_id
|
|
112
|
+
# Paying customer ID for delegated billing
|
|
113
|
+
#
|
|
114
|
+
# @return [String, nil]
|
|
115
|
+
optional :paying_customer_id, String, api_name: :payingCustomerId, nil?: true
|
|
113
116
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
# @!attribute payment_collection_method
|
|
118
|
+
# The method used to collect payments for a subscription
|
|
119
|
+
#
|
|
120
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionListResponse::PaymentCollectionMethod, nil]
|
|
121
|
+
optional :payment_collection_method,
|
|
122
|
+
enum: -> { Stigg::Models::V1::SubscriptionListResponse::PaymentCollectionMethod },
|
|
123
|
+
api_name: :paymentCollectionMethod,
|
|
124
|
+
nil?: true
|
|
119
125
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
# @!attribute prices
|
|
127
|
+
#
|
|
128
|
+
# @return [Array<Stigg::Models::V1::SubscriptionListResponse::Price>, nil]
|
|
129
|
+
optional :prices,
|
|
130
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::SubscriptionListResponse::Price] }
|
|
125
131
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
# @!attribute resource_id
|
|
133
|
+
# Resource ID
|
|
134
|
+
#
|
|
135
|
+
# @return [String, nil]
|
|
136
|
+
optional :resource_id, String, api_name: :resourceId, nil?: true
|
|
131
137
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
enum: -> { Stigg::Models::V1::SubscriptionListResponse::Data::PaymentCollectionMethod },
|
|
138
|
-
api_name: :paymentCollectionMethod,
|
|
139
|
-
nil?: true
|
|
140
|
-
|
|
141
|
-
# @!attribute resource_id
|
|
142
|
-
# Resource ID
|
|
143
|
-
#
|
|
144
|
-
# @return [String, nil]
|
|
145
|
-
optional :resource_id, String, api_name: :resourceId, nil?: true
|
|
138
|
+
# @!attribute trial_end_date
|
|
139
|
+
# Subscription trial end date
|
|
140
|
+
#
|
|
141
|
+
# @return [Time, nil]
|
|
142
|
+
optional :trial_end_date, Time, api_name: :trialEndDate, nil?: true
|
|
146
143
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
144
|
+
# @!method initialize(id:, billing_id:, created_at:, customer_id:, payment_collection:, plan_id:, pricing_type:, start_date:, status:, cancellation_date: nil, cancel_reason: nil, current_billing_period_end: nil, current_billing_period_start: nil, effective_end_date: nil, end_date: nil, metadata: nil, paying_customer_id: nil, payment_collection_method: nil, prices: nil, resource_id: nil, trial_end_date: nil)
|
|
145
|
+
# Customer subscription to a plan
|
|
146
|
+
#
|
|
147
|
+
# @param id [String] Subscription ID
|
|
148
|
+
#
|
|
149
|
+
# @param billing_id [String, nil] Billing ID
|
|
150
|
+
#
|
|
151
|
+
# @param created_at [Time] Created at
|
|
152
|
+
#
|
|
153
|
+
# @param customer_id [String] Customer ID
|
|
154
|
+
#
|
|
155
|
+
# @param payment_collection [Symbol, Stigg::Models::V1::SubscriptionListResponse::PaymentCollection] Payment collection
|
|
156
|
+
#
|
|
157
|
+
# @param plan_id [String] Plan ID
|
|
158
|
+
#
|
|
159
|
+
# @param pricing_type [Symbol, Stigg::Models::V1::SubscriptionListResponse::PricingType] Pricing type
|
|
160
|
+
#
|
|
161
|
+
# @param start_date [Time] Subscription start date
|
|
162
|
+
#
|
|
163
|
+
# @param status [Symbol, Stigg::Models::V1::SubscriptionListResponse::Status] Subscription status
|
|
164
|
+
#
|
|
165
|
+
# @param cancellation_date [Time, nil] Subscription cancellation date
|
|
166
|
+
#
|
|
167
|
+
# @param cancel_reason [Symbol, Stigg::Models::V1::SubscriptionListResponse::CancelReason, nil] Subscription cancel reason
|
|
168
|
+
#
|
|
169
|
+
# @param current_billing_period_end [Time, nil] End of the current billing period
|
|
170
|
+
#
|
|
171
|
+
# @param current_billing_period_start [Time, nil] Start of the current billing period
|
|
172
|
+
#
|
|
173
|
+
# @param effective_end_date [Time, nil] Subscription effective end date
|
|
174
|
+
#
|
|
175
|
+
# @param end_date [Time, nil] Subscription end date
|
|
176
|
+
#
|
|
177
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
|
|
178
|
+
#
|
|
179
|
+
# @param paying_customer_id [String, nil] Paying customer ID for delegated billing
|
|
180
|
+
#
|
|
181
|
+
# @param payment_collection_method [Symbol, Stigg::Models::V1::SubscriptionListResponse::PaymentCollectionMethod, nil] The method used to collect payments for a subscription
|
|
182
|
+
#
|
|
183
|
+
# @param prices [Array<Stigg::Models::V1::SubscriptionListResponse::Price>]
|
|
184
|
+
#
|
|
185
|
+
# @param resource_id [String, nil] Resource ID
|
|
186
|
+
#
|
|
187
|
+
# @param trial_end_date [Time, nil] Subscription trial end date
|
|
152
188
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
# @param created_at [Time] Created at
|
|
159
|
-
#
|
|
160
|
-
# @param cursor_id [String] Cursor ID for query pagination
|
|
161
|
-
#
|
|
162
|
-
# @param customer_id [String] Customer ID
|
|
163
|
-
#
|
|
164
|
-
# @param payment_collection [Symbol, Stigg::Models::V1::SubscriptionListResponse::Data::PaymentCollection] Payment collection
|
|
165
|
-
#
|
|
166
|
-
# @param plan_id [String] Plan ID
|
|
167
|
-
#
|
|
168
|
-
# @param pricing_type [Symbol, Stigg::Models::V1::SubscriptionListResponse::Data::PricingType] Pricing type
|
|
169
|
-
#
|
|
170
|
-
# @param start_date [Time] Subscription start date
|
|
171
|
-
#
|
|
172
|
-
# @param status [Symbol, Stigg::Models::V1::SubscriptionListResponse::Data::Status] Subscription status
|
|
173
|
-
#
|
|
174
|
-
# @param cancellation_date [Time, nil] Subscription cancellation date
|
|
175
|
-
#
|
|
176
|
-
# @param cancel_reason [Symbol, Stigg::Models::V1::SubscriptionListResponse::Data::CancelReason, nil] Subscription cancel reason
|
|
177
|
-
#
|
|
178
|
-
# @param current_billing_period_end [Time, nil] End of the current billing period
|
|
179
|
-
#
|
|
180
|
-
# @param current_billing_period_start [Time, nil] Start of the current billing period
|
|
181
|
-
#
|
|
182
|
-
# @param effective_end_date [Time, nil] Subscription effective end date
|
|
183
|
-
#
|
|
184
|
-
# @param end_date [Time, nil] Subscription end date
|
|
185
|
-
#
|
|
186
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
|
|
187
|
-
#
|
|
188
|
-
# @param paying_customer_id [String, nil] Paying customer ID for delegated billing
|
|
189
|
-
#
|
|
190
|
-
# @param payment_collection_method [Symbol, Stigg::Models::V1::SubscriptionListResponse::Data::PaymentCollectionMethod, nil] The method used to collect payments for a subscription
|
|
191
|
-
#
|
|
192
|
-
# @param resource_id [String, nil] Resource ID
|
|
193
|
-
#
|
|
194
|
-
# @param trial_end_date [Time, nil] Subscription trial end date
|
|
189
|
+
# Payment collection
|
|
190
|
+
#
|
|
191
|
+
# @see Stigg::Models::V1::SubscriptionListResponse#payment_collection
|
|
192
|
+
module PaymentCollection
|
|
193
|
+
extend Stigg::Internal::Type::Enum
|
|
195
194
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
extend Stigg::Internal::Type::Enum
|
|
195
|
+
NOT_REQUIRED = :NOT_REQUIRED
|
|
196
|
+
PROCESSING = :PROCESSING
|
|
197
|
+
FAILED = :FAILED
|
|
198
|
+
ACTION_REQUIRED = :ACTION_REQUIRED
|
|
201
199
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
ACTION_REQUIRED = :ACTION_REQUIRED
|
|
200
|
+
# @!method self.values
|
|
201
|
+
# @return [Array<Symbol>]
|
|
202
|
+
end
|
|
206
203
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
204
|
+
# Pricing type
|
|
205
|
+
#
|
|
206
|
+
# @see Stigg::Models::V1::SubscriptionListResponse#pricing_type
|
|
207
|
+
module PricingType
|
|
208
|
+
extend Stigg::Internal::Type::Enum
|
|
210
209
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
module PricingType
|
|
215
|
-
extend Stigg::Internal::Type::Enum
|
|
210
|
+
FREE = :FREE
|
|
211
|
+
PAID = :PAID
|
|
212
|
+
CUSTOM = :CUSTOM
|
|
216
213
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
214
|
+
# @!method self.values
|
|
215
|
+
# @return [Array<Symbol>]
|
|
216
|
+
end
|
|
220
217
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
218
|
+
# Subscription status
|
|
219
|
+
#
|
|
220
|
+
# @see Stigg::Models::V1::SubscriptionListResponse#status
|
|
221
|
+
module Status
|
|
222
|
+
extend Stigg::Internal::Type::Enum
|
|
223
|
+
|
|
224
|
+
PAYMENT_PENDING = :PAYMENT_PENDING
|
|
225
|
+
ACTIVE = :ACTIVE
|
|
226
|
+
EXPIRED = :EXPIRED
|
|
227
|
+
IN_TRIAL = :IN_TRIAL
|
|
228
|
+
CANCELED = :CANCELED
|
|
229
|
+
NOT_STARTED = :NOT_STARTED
|
|
230
|
+
|
|
231
|
+
# @!method self.values
|
|
232
|
+
# @return [Array<Symbol>]
|
|
233
|
+
end
|
|
224
234
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
235
|
+
# Subscription cancel reason
|
|
236
|
+
#
|
|
237
|
+
# @see Stigg::Models::V1::SubscriptionListResponse#cancel_reason
|
|
238
|
+
module CancelReason
|
|
239
|
+
extend Stigg::Internal::Type::Enum
|
|
240
|
+
|
|
241
|
+
UPGRADE_OR_DOWNGRADE = :UPGRADE_OR_DOWNGRADE
|
|
242
|
+
CANCELLED_BY_BILLING = :CANCELLED_BY_BILLING
|
|
243
|
+
EXPIRED = :EXPIRED
|
|
244
|
+
DETACH_BILLING = :DETACH_BILLING
|
|
245
|
+
TRIAL_ENDED = :TRIAL_ENDED
|
|
246
|
+
IMMEDIATE = :Immediate
|
|
247
|
+
TRIAL_CONVERTED = :TRIAL_CONVERTED
|
|
248
|
+
PENDING_PAYMENT_EXPIRED = :PENDING_PAYMENT_EXPIRED
|
|
249
|
+
SCHEDULED_CANCELLATION = :ScheduledCancellation
|
|
250
|
+
CUSTOMER_ARCHIVED = :CustomerArchived
|
|
251
|
+
AUTO_CANCELLATION_RULE = :AutoCancellationRule
|
|
252
|
+
|
|
253
|
+
# @!method self.values
|
|
254
|
+
# @return [Array<Symbol>]
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# The method used to collect payments for a subscription
|
|
258
|
+
#
|
|
259
|
+
# @see Stigg::Models::V1::SubscriptionListResponse#payment_collection_method
|
|
260
|
+
module PaymentCollectionMethod
|
|
261
|
+
extend Stigg::Internal::Type::Enum
|
|
262
|
+
|
|
263
|
+
CHARGE = :CHARGE
|
|
264
|
+
INVOICE = :INVOICE
|
|
265
|
+
NONE = :NONE
|
|
266
|
+
|
|
267
|
+
# @!method self.values
|
|
268
|
+
# @return [Array<Symbol>]
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
class Price < Stigg::Internal::Type::BaseModel
|
|
272
|
+
# @!attribute id
|
|
273
|
+
# Price ID
|
|
243
274
|
#
|
|
244
|
-
#
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
CANCELLED_BY_BILLING = :CANCELLED_BY_BILLING
|
|
250
|
-
EXPIRED = :EXPIRED
|
|
251
|
-
DETACH_BILLING = :DETACH_BILLING
|
|
252
|
-
TRIAL_ENDED = :TRIAL_ENDED
|
|
253
|
-
IMMEDIATE = :Immediate
|
|
254
|
-
TRIAL_CONVERTED = :TRIAL_CONVERTED
|
|
255
|
-
PENDING_PAYMENT_EXPIRED = :PENDING_PAYMENT_EXPIRED
|
|
256
|
-
SCHEDULED_CANCELLATION = :ScheduledCancellation
|
|
257
|
-
CUSTOMER_ARCHIVED = :CustomerArchived
|
|
258
|
-
AUTO_CANCELLATION_RULE = :AutoCancellationRule
|
|
259
|
-
|
|
260
|
-
# @!method self.values
|
|
261
|
-
# @return [Array<Symbol>]
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
# The method used to collect payments for a subscription
|
|
275
|
+
# @return [String]
|
|
276
|
+
required :id, String
|
|
277
|
+
|
|
278
|
+
# @!attribute created_at
|
|
279
|
+
# Creation timestamp
|
|
265
280
|
#
|
|
266
|
-
#
|
|
267
|
-
|
|
268
|
-
extend Stigg::Internal::Type::Enum
|
|
281
|
+
# @return [String]
|
|
282
|
+
required :created_at, String, api_name: :createdAt
|
|
269
283
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
284
|
+
# @!attribute updated_at
|
|
285
|
+
# Last update timestamp
|
|
286
|
+
#
|
|
287
|
+
# @return [String]
|
|
288
|
+
required :updated_at, String, api_name: :updatedAt
|
|
273
289
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
290
|
+
# @!method initialize(id:, created_at:, updated_at:)
|
|
291
|
+
# @param id [String] Price ID
|
|
292
|
+
#
|
|
293
|
+
# @param created_at [String] Creation timestamp
|
|
294
|
+
#
|
|
295
|
+
# @param updated_at [String] Last update timestamp
|
|
277
296
|
end
|
|
278
297
|
end
|
|
279
298
|
end
|
|
@@ -9,7 +9,7 @@ module Stigg
|
|
|
9
9
|
include Stigg::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
11
|
# @!attribute subscription_migration_time
|
|
12
|
-
# When to migrate
|
|
12
|
+
# When to migrate (immediate or period end)
|
|
13
13
|
#
|
|
14
14
|
# @return [Symbol, Stigg::Models::V1::SubscriptionMigrateParams::SubscriptionMigrationTime, nil]
|
|
15
15
|
optional :subscription_migration_time,
|
|
@@ -17,11 +17,11 @@ module Stigg
|
|
|
17
17
|
api_name: :subscriptionMigrationTime
|
|
18
18
|
|
|
19
19
|
# @!method initialize(subscription_migration_time: nil, request_options: {})
|
|
20
|
-
# @param subscription_migration_time [Symbol, Stigg::Models::V1::SubscriptionMigrateParams::SubscriptionMigrationTime] When to migrate
|
|
20
|
+
# @param subscription_migration_time [Symbol, Stigg::Models::V1::SubscriptionMigrateParams::SubscriptionMigrationTime] When to migrate (immediate or period end)
|
|
21
21
|
#
|
|
22
22
|
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
23
23
|
|
|
24
|
-
# When to migrate
|
|
24
|
+
# When to migrate (immediate or period end)
|
|
25
25
|
module SubscriptionMigrationTime
|
|
26
26
|
extend Stigg::Internal::Type::Enum
|
|
27
27
|
|