stigg 0.1.0.pre.alpha.2 → 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 +8 -0
- data/README.md +1 -1
- data/lib/stigg/internal/type/base_model.rb +2 -2
- data/lib/stigg/models/v1/{coupon_create_response.rb → coupon.rb} +24 -24
- 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_create_params.rb → customer_provision_params.rb} +16 -16
- data/lib/stigg/models/v1/customer_response.rb +1 -1
- data/lib/stigg/models/v1/customers/promotional_entitlement_grant_params.rb +296 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_grant_response.rb +341 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_params.rb +24 -0
- data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_response.rb +342 -0
- 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} +30 -29
- data/lib/stigg/models/v1/subscription_cancel_params.rb +75 -0
- 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_create_params.rb → subscription_provision_params.rb} +118 -118
- data/lib/stigg/models/v1/{subscription_create_response.rb → subscription_provision_response.rb} +76 -75
- 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} +7 -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 +4 -4
- data/lib/stigg/resources/v1/customers/promotional_entitlements.rb +69 -0
- data/lib/stigg/resources/v1/customers.rb +59 -37
- data/lib/stigg/resources/v1/events.rb +38 -0
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +4 -4
- data/lib/stigg/resources/v1/subscriptions.rb +166 -64
- 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 -16
- data/rbi/stigg/models/v1/{coupon_create_response.rbi → coupon.rbi} +156 -252
- 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_create_params.rbi → customer_provision_params.rbi} +35 -35
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_params.rbi +640 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_response.rbi +690 -0
- data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbi +42 -0
- 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} +66 -117
- data/rbi/stigg/models/v1/subscription_cancel_params.rbi +182 -0
- 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_create_params.rbi → subscription_provision_params.rbi} +794 -773
- data/rbi/stigg/models/v1/{subscription_create_response.rbi → subscription_provision_response.rbi} +481 -481
- 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} +9 -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 +2 -2
- data/rbi/stigg/resources/v1/customers/promotional_entitlements.rbi +57 -0
- data/rbi/stigg/resources/v1/customers.rbi +53 -36
- data/rbi/stigg/resources/v1/events.rbi +28 -0
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +2 -6
- data/rbi/stigg/resources/v1/subscriptions.rbi +179 -74
- data/rbi/stigg/resources/v1/usage.rbi +57 -0
- data/rbi/stigg/resources/v1.rbi +4 -26
- data/sig/stigg/models/v1/{coupon_create_response.rbs → coupon.rbs} +29 -32
- 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_create_params.rbs → customer_provision_params.rbs} +22 -22
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_params.rbs +234 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_grant_response.rbs +281 -0
- data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbs +27 -0
- 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} +36 -41
- 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_create_params.rbs → subscription_provision_params.rbs} +200 -200
- data/sig/stigg/models/v1/{subscription_create_response.rbs → subscription_provision_response.rbs} +106 -106
- 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 +2 -2
- data/sig/stigg/resources/v1/customers/promotional_entitlements.rbs +23 -0
- data/sig/stigg/resources/v1/customers.rbs +17 -12
- 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 +65 -32
- data/sig/stigg/resources/v1/usage.rbs +24 -0
- data/sig/stigg/resources/v1.rbs +2 -8
- metadata +77 -50
- data/lib/stigg/models/v1/coupon_retrieve_response.rb +0 -322
- data/lib/stigg/models/v1/subscription_delegate_response.rb +0 -314
- data/lib/stigg/models/v1/subscription_migrate_response.rb +0 -314
- data/lib/stigg/models/v1/subscription_transfer_response.rb +0 -314
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +0 -34
- data/lib/stigg/models/v1_create_event_params.rb +0 -89
- data/lib/stigg/models/v1_create_event_response.rb +0 -23
- data/lib/stigg/models/v1_create_usage_params.rb +0 -112
- data/lib/stigg/models/v1_create_usage_response.rb +0 -118
- data/lib/stigg/resources/v1/customers/usage.rb +0 -18
- data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +0 -987
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +0 -618
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +0 -80
- data/rbi/stigg/models/v1_create_event_params.rbi +0 -161
- data/rbi/stigg/models/v1_create_event_response.rbi +0 -30
- data/rbi/stigg/models/v1_create_usage_params.rbi +0 -217
- data/rbi/stigg/models/v1_create_usage_response.rbi +0 -157
- data/rbi/stigg/resources/v1/customers/usage.rbi +0 -16
- data/sig/stigg/models/v1/coupon_retrieve_response.rbs +0 -394
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +0 -255
- data/sig/stigg/models/v1/subscription_migrate_response.rbs +0 -255
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +0 -255
- 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 -100
- data/sig/stigg/models/v1_create_usage_response.rbs +0 -85
- data/sig/stigg/resources/v1/customers/usage.rbs +0 -11
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Stigg
|
|
4
|
-
module Models
|
|
5
|
-
module V1
|
|
6
|
-
# @see Stigg::Resources::V1::Subscriptions#transfer
|
|
7
|
-
class SubscriptionTransferResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
-
# @!attribute data
|
|
9
|
-
# Customer subscription to a plan
|
|
10
|
-
#
|
|
11
|
-
# @return [Stigg::Models::V1::SubscriptionTransferResponse::Data]
|
|
12
|
-
required :data, -> { Stigg::Models::V1::SubscriptionTransferResponse::Data }
|
|
13
|
-
|
|
14
|
-
# @!method initialize(data:)
|
|
15
|
-
# Response object
|
|
16
|
-
#
|
|
17
|
-
# @param data [Stigg::Models::V1::SubscriptionTransferResponse::Data] Customer subscription to a plan
|
|
18
|
-
|
|
19
|
-
# @see Stigg::Models::V1::SubscriptionTransferResponse#data
|
|
20
|
-
class Data < Stigg::Internal::Type::BaseModel
|
|
21
|
-
# @!attribute id
|
|
22
|
-
# Subscription ID
|
|
23
|
-
#
|
|
24
|
-
# @return [String]
|
|
25
|
-
required :id, String
|
|
26
|
-
|
|
27
|
-
# @!attribute billing_id
|
|
28
|
-
# Billing ID
|
|
29
|
-
#
|
|
30
|
-
# @return [String, nil]
|
|
31
|
-
required :billing_id, String, api_name: :billingId, nil?: true
|
|
32
|
-
|
|
33
|
-
# @!attribute created_at
|
|
34
|
-
# Created at
|
|
35
|
-
#
|
|
36
|
-
# @return [Time]
|
|
37
|
-
required :created_at, Time, api_name: :createdAt
|
|
38
|
-
|
|
39
|
-
# @!attribute customer_id
|
|
40
|
-
# Customer ID
|
|
41
|
-
#
|
|
42
|
-
# @return [String]
|
|
43
|
-
required :customer_id, String, api_name: :customerId
|
|
44
|
-
|
|
45
|
-
# @!attribute payment_collection
|
|
46
|
-
# Payment collection
|
|
47
|
-
#
|
|
48
|
-
# @return [Symbol, Stigg::Models::V1::SubscriptionTransferResponse::Data::PaymentCollection]
|
|
49
|
-
required :payment_collection,
|
|
50
|
-
enum: -> { Stigg::Models::V1::SubscriptionTransferResponse::Data::PaymentCollection },
|
|
51
|
-
api_name: :paymentCollection
|
|
52
|
-
|
|
53
|
-
# @!attribute plan_id
|
|
54
|
-
# Plan ID
|
|
55
|
-
#
|
|
56
|
-
# @return [String]
|
|
57
|
-
required :plan_id, String, api_name: :planId
|
|
58
|
-
|
|
59
|
-
# @!attribute pricing_type
|
|
60
|
-
# Pricing type
|
|
61
|
-
#
|
|
62
|
-
# @return [Symbol, Stigg::Models::V1::SubscriptionTransferResponse::Data::PricingType]
|
|
63
|
-
required :pricing_type,
|
|
64
|
-
enum: -> { Stigg::Models::V1::SubscriptionTransferResponse::Data::PricingType },
|
|
65
|
-
api_name: :pricingType
|
|
66
|
-
|
|
67
|
-
# @!attribute start_date
|
|
68
|
-
# Subscription start date
|
|
69
|
-
#
|
|
70
|
-
# @return [Time]
|
|
71
|
-
required :start_date, Time, api_name: :startDate
|
|
72
|
-
|
|
73
|
-
# @!attribute status
|
|
74
|
-
# Subscription status
|
|
75
|
-
#
|
|
76
|
-
# @return [Symbol, Stigg::Models::V1::SubscriptionTransferResponse::Data::Status]
|
|
77
|
-
required :status, enum: -> { Stigg::Models::V1::SubscriptionTransferResponse::Data::Status }
|
|
78
|
-
|
|
79
|
-
# @!attribute cancellation_date
|
|
80
|
-
# Subscription cancellation date
|
|
81
|
-
#
|
|
82
|
-
# @return [Time, nil]
|
|
83
|
-
optional :cancellation_date, Time, api_name: :cancellationDate, nil?: true
|
|
84
|
-
|
|
85
|
-
# @!attribute cancel_reason
|
|
86
|
-
# Subscription cancel reason
|
|
87
|
-
#
|
|
88
|
-
# @return [Symbol, Stigg::Models::V1::SubscriptionTransferResponse::Data::CancelReason, nil]
|
|
89
|
-
optional :cancel_reason,
|
|
90
|
-
enum: -> { Stigg::Models::V1::SubscriptionTransferResponse::Data::CancelReason },
|
|
91
|
-
api_name: :cancelReason,
|
|
92
|
-
nil?: true
|
|
93
|
-
|
|
94
|
-
# @!attribute current_billing_period_end
|
|
95
|
-
# End of the current billing period
|
|
96
|
-
#
|
|
97
|
-
# @return [Time, nil]
|
|
98
|
-
optional :current_billing_period_end, Time, api_name: :currentBillingPeriodEnd, nil?: true
|
|
99
|
-
|
|
100
|
-
# @!attribute current_billing_period_start
|
|
101
|
-
# Start of the current billing period
|
|
102
|
-
#
|
|
103
|
-
# @return [Time, nil]
|
|
104
|
-
optional :current_billing_period_start, Time, api_name: :currentBillingPeriodStart, nil?: true
|
|
105
|
-
|
|
106
|
-
# @!attribute effective_end_date
|
|
107
|
-
# Subscription effective end date
|
|
108
|
-
#
|
|
109
|
-
# @return [Time, nil]
|
|
110
|
-
optional :effective_end_date, Time, api_name: :effectiveEndDate, nil?: true
|
|
111
|
-
|
|
112
|
-
# @!attribute end_date
|
|
113
|
-
# Subscription end date
|
|
114
|
-
#
|
|
115
|
-
# @return [Time, nil]
|
|
116
|
-
optional :end_date, Time, api_name: :endDate, nil?: true
|
|
117
|
-
|
|
118
|
-
# @!attribute metadata
|
|
119
|
-
# Additional metadata for the subscription
|
|
120
|
-
#
|
|
121
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
122
|
-
optional :metadata, Stigg::Internal::Type::HashOf[String]
|
|
123
|
-
|
|
124
|
-
# @!attribute paying_customer_id
|
|
125
|
-
# Paying customer ID for delegated billing
|
|
126
|
-
#
|
|
127
|
-
# @return [String, nil]
|
|
128
|
-
optional :paying_customer_id, String, api_name: :payingCustomerId, nil?: true
|
|
129
|
-
|
|
130
|
-
# @!attribute payment_collection_method
|
|
131
|
-
# The method used to collect payments for a subscription
|
|
132
|
-
#
|
|
133
|
-
# @return [Symbol, Stigg::Models::V1::SubscriptionTransferResponse::Data::PaymentCollectionMethod, nil]
|
|
134
|
-
optional :payment_collection_method,
|
|
135
|
-
enum: -> { Stigg::Models::V1::SubscriptionTransferResponse::Data::PaymentCollectionMethod },
|
|
136
|
-
api_name: :paymentCollectionMethod,
|
|
137
|
-
nil?: true
|
|
138
|
-
|
|
139
|
-
# @!attribute prices
|
|
140
|
-
#
|
|
141
|
-
# @return [Array<Stigg::Models::V1::SubscriptionTransferResponse::Data::Price>, nil]
|
|
142
|
-
optional :prices,
|
|
143
|
-
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::SubscriptionTransferResponse::Data::Price] }
|
|
144
|
-
|
|
145
|
-
# @!attribute resource_id
|
|
146
|
-
# Resource ID
|
|
147
|
-
#
|
|
148
|
-
# @return [String, nil]
|
|
149
|
-
optional :resource_id, String, api_name: :resourceId, nil?: true
|
|
150
|
-
|
|
151
|
-
# @!attribute trial_end_date
|
|
152
|
-
# Subscription trial end date
|
|
153
|
-
#
|
|
154
|
-
# @return [Time, nil]
|
|
155
|
-
optional :trial_end_date, Time, api_name: :trialEndDate, nil?: true
|
|
156
|
-
|
|
157
|
-
# @!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)
|
|
158
|
-
# Customer subscription to a plan
|
|
159
|
-
#
|
|
160
|
-
# @param id [String] Subscription ID
|
|
161
|
-
#
|
|
162
|
-
# @param billing_id [String, nil] Billing ID
|
|
163
|
-
#
|
|
164
|
-
# @param created_at [Time] Created at
|
|
165
|
-
#
|
|
166
|
-
# @param customer_id [String] Customer ID
|
|
167
|
-
#
|
|
168
|
-
# @param payment_collection [Symbol, Stigg::Models::V1::SubscriptionTransferResponse::Data::PaymentCollection] Payment collection
|
|
169
|
-
#
|
|
170
|
-
# @param plan_id [String] Plan ID
|
|
171
|
-
#
|
|
172
|
-
# @param pricing_type [Symbol, Stigg::Models::V1::SubscriptionTransferResponse::Data::PricingType] Pricing type
|
|
173
|
-
#
|
|
174
|
-
# @param start_date [Time] Subscription start date
|
|
175
|
-
#
|
|
176
|
-
# @param status [Symbol, Stigg::Models::V1::SubscriptionTransferResponse::Data::Status] Subscription status
|
|
177
|
-
#
|
|
178
|
-
# @param cancellation_date [Time, nil] Subscription cancellation date
|
|
179
|
-
#
|
|
180
|
-
# @param cancel_reason [Symbol, Stigg::Models::V1::SubscriptionTransferResponse::Data::CancelReason, nil] Subscription cancel reason
|
|
181
|
-
#
|
|
182
|
-
# @param current_billing_period_end [Time, nil] End of the current billing period
|
|
183
|
-
#
|
|
184
|
-
# @param current_billing_period_start [Time, nil] Start of the current billing period
|
|
185
|
-
#
|
|
186
|
-
# @param effective_end_date [Time, nil] Subscription effective end date
|
|
187
|
-
#
|
|
188
|
-
# @param end_date [Time, nil] Subscription end date
|
|
189
|
-
#
|
|
190
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
|
|
191
|
-
#
|
|
192
|
-
# @param paying_customer_id [String, nil] Paying customer ID for delegated billing
|
|
193
|
-
#
|
|
194
|
-
# @param payment_collection_method [Symbol, Stigg::Models::V1::SubscriptionTransferResponse::Data::PaymentCollectionMethod, nil] The method used to collect payments for a subscription
|
|
195
|
-
#
|
|
196
|
-
# @param prices [Array<Stigg::Models::V1::SubscriptionTransferResponse::Data::Price>]
|
|
197
|
-
#
|
|
198
|
-
# @param resource_id [String, nil] Resource ID
|
|
199
|
-
#
|
|
200
|
-
# @param trial_end_date [Time, nil] Subscription trial end date
|
|
201
|
-
|
|
202
|
-
# Payment collection
|
|
203
|
-
#
|
|
204
|
-
# @see Stigg::Models::V1::SubscriptionTransferResponse::Data#payment_collection
|
|
205
|
-
module PaymentCollection
|
|
206
|
-
extend Stigg::Internal::Type::Enum
|
|
207
|
-
|
|
208
|
-
NOT_REQUIRED = :NOT_REQUIRED
|
|
209
|
-
PROCESSING = :PROCESSING
|
|
210
|
-
FAILED = :FAILED
|
|
211
|
-
ACTION_REQUIRED = :ACTION_REQUIRED
|
|
212
|
-
|
|
213
|
-
# @!method self.values
|
|
214
|
-
# @return [Array<Symbol>]
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
# Pricing type
|
|
218
|
-
#
|
|
219
|
-
# @see Stigg::Models::V1::SubscriptionTransferResponse::Data#pricing_type
|
|
220
|
-
module PricingType
|
|
221
|
-
extend Stigg::Internal::Type::Enum
|
|
222
|
-
|
|
223
|
-
FREE = :FREE
|
|
224
|
-
PAID = :PAID
|
|
225
|
-
CUSTOM = :CUSTOM
|
|
226
|
-
|
|
227
|
-
# @!method self.values
|
|
228
|
-
# @return [Array<Symbol>]
|
|
229
|
-
end
|
|
230
|
-
|
|
231
|
-
# Subscription status
|
|
232
|
-
#
|
|
233
|
-
# @see Stigg::Models::V1::SubscriptionTransferResponse::Data#status
|
|
234
|
-
module Status
|
|
235
|
-
extend Stigg::Internal::Type::Enum
|
|
236
|
-
|
|
237
|
-
PAYMENT_PENDING = :PAYMENT_PENDING
|
|
238
|
-
ACTIVE = :ACTIVE
|
|
239
|
-
EXPIRED = :EXPIRED
|
|
240
|
-
IN_TRIAL = :IN_TRIAL
|
|
241
|
-
CANCELED = :CANCELED
|
|
242
|
-
NOT_STARTED = :NOT_STARTED
|
|
243
|
-
|
|
244
|
-
# @!method self.values
|
|
245
|
-
# @return [Array<Symbol>]
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
# Subscription cancel reason
|
|
249
|
-
#
|
|
250
|
-
# @see Stigg::Models::V1::SubscriptionTransferResponse::Data#cancel_reason
|
|
251
|
-
module CancelReason
|
|
252
|
-
extend Stigg::Internal::Type::Enum
|
|
253
|
-
|
|
254
|
-
UPGRADE_OR_DOWNGRADE = :UPGRADE_OR_DOWNGRADE
|
|
255
|
-
CANCELLED_BY_BILLING = :CANCELLED_BY_BILLING
|
|
256
|
-
EXPIRED = :EXPIRED
|
|
257
|
-
DETACH_BILLING = :DETACH_BILLING
|
|
258
|
-
TRIAL_ENDED = :TRIAL_ENDED
|
|
259
|
-
IMMEDIATE = :Immediate
|
|
260
|
-
TRIAL_CONVERTED = :TRIAL_CONVERTED
|
|
261
|
-
PENDING_PAYMENT_EXPIRED = :PENDING_PAYMENT_EXPIRED
|
|
262
|
-
SCHEDULED_CANCELLATION = :ScheduledCancellation
|
|
263
|
-
CUSTOMER_ARCHIVED = :CustomerArchived
|
|
264
|
-
AUTO_CANCELLATION_RULE = :AutoCancellationRule
|
|
265
|
-
|
|
266
|
-
# @!method self.values
|
|
267
|
-
# @return [Array<Symbol>]
|
|
268
|
-
end
|
|
269
|
-
|
|
270
|
-
# The method used to collect payments for a subscription
|
|
271
|
-
#
|
|
272
|
-
# @see Stigg::Models::V1::SubscriptionTransferResponse::Data#payment_collection_method
|
|
273
|
-
module PaymentCollectionMethod
|
|
274
|
-
extend Stigg::Internal::Type::Enum
|
|
275
|
-
|
|
276
|
-
CHARGE = :CHARGE
|
|
277
|
-
INVOICE = :INVOICE
|
|
278
|
-
NONE = :NONE
|
|
279
|
-
|
|
280
|
-
# @!method self.values
|
|
281
|
-
# @return [Array<Symbol>]
|
|
282
|
-
end
|
|
283
|
-
|
|
284
|
-
class Price < Stigg::Internal::Type::BaseModel
|
|
285
|
-
# @!attribute id
|
|
286
|
-
# Price ID
|
|
287
|
-
#
|
|
288
|
-
# @return [String]
|
|
289
|
-
required :id, String
|
|
290
|
-
|
|
291
|
-
# @!attribute created_at
|
|
292
|
-
# Creation timestamp
|
|
293
|
-
#
|
|
294
|
-
# @return [String]
|
|
295
|
-
required :created_at, String, api_name: :createdAt
|
|
296
|
-
|
|
297
|
-
# @!attribute updated_at
|
|
298
|
-
# Last update timestamp
|
|
299
|
-
#
|
|
300
|
-
# @return [String]
|
|
301
|
-
required :updated_at, String, api_name: :updatedAt
|
|
302
|
-
|
|
303
|
-
# @!method initialize(id:, created_at:, updated_at:)
|
|
304
|
-
# @param id [String] Price ID
|
|
305
|
-
#
|
|
306
|
-
# @param created_at [String] Creation timestamp
|
|
307
|
-
#
|
|
308
|
-
# @param updated_at [String] Last update timestamp
|
|
309
|
-
end
|
|
310
|
-
end
|
|
311
|
-
end
|
|
312
|
-
end
|
|
313
|
-
end
|
|
314
|
-
end
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Stigg
|
|
4
|
-
module Models
|
|
5
|
-
module V1
|
|
6
|
-
module Subscriptions
|
|
7
|
-
# @see Stigg::Resources::V1::Subscriptions::FutureUpdate#cancel_schedule
|
|
8
|
-
class FutureUpdateCancelScheduleResponse < Stigg::Internal::Type::BaseModel
|
|
9
|
-
# @!attribute data
|
|
10
|
-
#
|
|
11
|
-
# @return [Stigg::Models::V1::Subscriptions::FutureUpdateCancelScheduleResponse::Data]
|
|
12
|
-
required :data, -> { Stigg::Models::V1::Subscriptions::FutureUpdateCancelScheduleResponse::Data }
|
|
13
|
-
|
|
14
|
-
# @!method initialize(data:)
|
|
15
|
-
# Response object
|
|
16
|
-
#
|
|
17
|
-
# @param data [Stigg::Models::V1::Subscriptions::FutureUpdateCancelScheduleResponse::Data]
|
|
18
|
-
|
|
19
|
-
# @see Stigg::Models::V1::Subscriptions::FutureUpdateCancelScheduleResponse#data
|
|
20
|
-
class Data < Stigg::Internal::Type::BaseModel
|
|
21
|
-
# @!attribute id
|
|
22
|
-
# Subscription ID
|
|
23
|
-
#
|
|
24
|
-
# @return [String]
|
|
25
|
-
required :id, String
|
|
26
|
-
|
|
27
|
-
# @!method initialize(id:)
|
|
28
|
-
# @param id [String] Subscription ID
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Stigg
|
|
4
|
-
module Models
|
|
5
|
-
# @see Stigg::Resources::V1#create_event
|
|
6
|
-
class V1CreateEventParams < Stigg::Internal::Type::BaseModel
|
|
7
|
-
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Stigg::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
# @!attribute events
|
|
11
|
-
# A list of usage events to report
|
|
12
|
-
#
|
|
13
|
-
# @return [Array<Stigg::Models::V1CreateEventParams::Event>]
|
|
14
|
-
required :events, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1CreateEventParams::Event] }
|
|
15
|
-
|
|
16
|
-
# @!method initialize(events:, request_options: {})
|
|
17
|
-
# @param events [Array<Stigg::Models::V1CreateEventParams::Event>] A list of usage events to report
|
|
18
|
-
#
|
|
19
|
-
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
20
|
-
|
|
21
|
-
class Event < Stigg::Internal::Type::BaseModel
|
|
22
|
-
# @!attribute customer_id
|
|
23
|
-
# Customer id
|
|
24
|
-
#
|
|
25
|
-
# @return [String]
|
|
26
|
-
required :customer_id, String, api_name: :customerId
|
|
27
|
-
|
|
28
|
-
# @!attribute event_name
|
|
29
|
-
# The name of the usage event
|
|
30
|
-
#
|
|
31
|
-
# @return [String]
|
|
32
|
-
required :event_name, String, api_name: :eventName
|
|
33
|
-
|
|
34
|
-
# @!attribute idempotency_key
|
|
35
|
-
# Idempotency key
|
|
36
|
-
#
|
|
37
|
-
# @return [String]
|
|
38
|
-
required :idempotency_key, String, api_name: :idempotencyKey
|
|
39
|
-
|
|
40
|
-
# @!attribute dimensions
|
|
41
|
-
# Dimensions associated with the usage event
|
|
42
|
-
#
|
|
43
|
-
# @return [Hash{Symbol=>String, Float, Boolean}, nil]
|
|
44
|
-
optional :dimensions,
|
|
45
|
-
-> { Stigg::Internal::Type::HashOf[union: Stigg::V1CreateEventParams::Event::Dimension] }
|
|
46
|
-
|
|
47
|
-
# @!attribute resource_id
|
|
48
|
-
# Resource id
|
|
49
|
-
#
|
|
50
|
-
# @return [String, nil]
|
|
51
|
-
optional :resource_id, String, api_name: :resourceId, nil?: true
|
|
52
|
-
|
|
53
|
-
# @!attribute timestamp
|
|
54
|
-
# Timestamp
|
|
55
|
-
#
|
|
56
|
-
# @return [Time, nil]
|
|
57
|
-
optional :timestamp, Time
|
|
58
|
-
|
|
59
|
-
# @!method initialize(customer_id:, event_name:, idempotency_key:, dimensions: nil, resource_id: nil, timestamp: nil)
|
|
60
|
-
# Raw usage event
|
|
61
|
-
#
|
|
62
|
-
# @param customer_id [String] Customer id
|
|
63
|
-
#
|
|
64
|
-
# @param event_name [String] The name of the usage event
|
|
65
|
-
#
|
|
66
|
-
# @param idempotency_key [String] Idempotency key
|
|
67
|
-
#
|
|
68
|
-
# @param dimensions [Hash{Symbol=>String, Float, Boolean}] Dimensions associated with the usage event
|
|
69
|
-
#
|
|
70
|
-
# @param resource_id [String, nil] Resource id
|
|
71
|
-
#
|
|
72
|
-
# @param timestamp [Time] Timestamp
|
|
73
|
-
|
|
74
|
-
module Dimension
|
|
75
|
-
extend Stigg::Internal::Type::Union
|
|
76
|
-
|
|
77
|
-
variant String
|
|
78
|
-
|
|
79
|
-
variant Float
|
|
80
|
-
|
|
81
|
-
variant Stigg::Internal::Type::Boolean
|
|
82
|
-
|
|
83
|
-
# @!method self.variants
|
|
84
|
-
# @return [Array(String, Float, Boolean)]
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Stigg
|
|
4
|
-
module Models
|
|
5
|
-
# @see Stigg::Resources::V1#create_event
|
|
6
|
-
class V1CreateEventResponse < Stigg::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute data
|
|
8
|
-
# Empty success response confirming that events were successfully ingested and
|
|
9
|
-
# queued for processing by Stigg's metering system.
|
|
10
|
-
#
|
|
11
|
-
# @return [Object]
|
|
12
|
-
required :data, Stigg::Internal::Type::Unknown
|
|
13
|
-
|
|
14
|
-
# @!method initialize(data:)
|
|
15
|
-
# Some parameter documentations has been truncated, see
|
|
16
|
-
# {Stigg::Models::V1CreateEventResponse} for more details.
|
|
17
|
-
#
|
|
18
|
-
# Response object
|
|
19
|
-
#
|
|
20
|
-
# @param data [Object] Empty success response confirming that events were successfully ingested and que
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Stigg
|
|
4
|
-
module Models
|
|
5
|
-
# @see Stigg::Resources::V1#create_usage
|
|
6
|
-
class V1CreateUsageParams < Stigg::Internal::Type::BaseModel
|
|
7
|
-
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Stigg::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
# @!attribute usages
|
|
11
|
-
# A list of usage reports to be submitted in bulk
|
|
12
|
-
#
|
|
13
|
-
# @return [Array<Stigg::Models::V1CreateUsageParams::Usage>]
|
|
14
|
-
required :usages, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1CreateUsageParams::Usage] }
|
|
15
|
-
|
|
16
|
-
# @!method initialize(usages:, request_options: {})
|
|
17
|
-
# @param usages [Array<Stigg::Models::V1CreateUsageParams::Usage>] A list of usage reports to be submitted in bulk
|
|
18
|
-
#
|
|
19
|
-
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
20
|
-
|
|
21
|
-
class Usage < Stigg::Internal::Type::BaseModel
|
|
22
|
-
# @!attribute customer_id
|
|
23
|
-
# Customer id
|
|
24
|
-
#
|
|
25
|
-
# @return [String]
|
|
26
|
-
required :customer_id, String, api_name: :customerId
|
|
27
|
-
|
|
28
|
-
# @!attribute feature_id
|
|
29
|
-
# Feature id
|
|
30
|
-
#
|
|
31
|
-
# @return [String]
|
|
32
|
-
required :feature_id, String, api_name: :featureId
|
|
33
|
-
|
|
34
|
-
# @!attribute value
|
|
35
|
-
# The value to report for usage
|
|
36
|
-
#
|
|
37
|
-
# @return [Integer]
|
|
38
|
-
required :value, Integer
|
|
39
|
-
|
|
40
|
-
# @!attribute created_at
|
|
41
|
-
# Timestamp of when the record was created
|
|
42
|
-
#
|
|
43
|
-
# @return [Time, nil]
|
|
44
|
-
optional :created_at, Time, api_name: :createdAt
|
|
45
|
-
|
|
46
|
-
# @!attribute dimensions
|
|
47
|
-
# Additional dimensions for the usage report
|
|
48
|
-
#
|
|
49
|
-
# @return [Hash{Symbol=>String, Float, Boolean}, nil]
|
|
50
|
-
optional :dimensions,
|
|
51
|
-
-> { Stigg::Internal::Type::HashOf[union: Stigg::V1CreateUsageParams::Usage::Dimension] }
|
|
52
|
-
|
|
53
|
-
# @!attribute resource_id
|
|
54
|
-
# Resource id
|
|
55
|
-
#
|
|
56
|
-
# @return [String, nil]
|
|
57
|
-
optional :resource_id, String, api_name: :resourceId, nil?: true
|
|
58
|
-
|
|
59
|
-
# @!attribute update_behavior
|
|
60
|
-
# The method by which the usage value should be updated
|
|
61
|
-
#
|
|
62
|
-
# @return [Symbol, Stigg::Models::V1CreateUsageParams::Usage::UpdateBehavior, nil]
|
|
63
|
-
optional :update_behavior,
|
|
64
|
-
enum: -> { Stigg::V1CreateUsageParams::Usage::UpdateBehavior },
|
|
65
|
-
api_name: :updateBehavior
|
|
66
|
-
|
|
67
|
-
# @!method initialize(customer_id:, feature_id:, value:, created_at: nil, dimensions: nil, resource_id: nil, update_behavior: nil)
|
|
68
|
-
# Single usage measurement
|
|
69
|
-
#
|
|
70
|
-
# @param customer_id [String] Customer id
|
|
71
|
-
#
|
|
72
|
-
# @param feature_id [String] Feature id
|
|
73
|
-
#
|
|
74
|
-
# @param value [Integer] The value to report for usage
|
|
75
|
-
#
|
|
76
|
-
# @param created_at [Time] Timestamp of when the record was created
|
|
77
|
-
#
|
|
78
|
-
# @param dimensions [Hash{Symbol=>String, Float, Boolean}] Additional dimensions for the usage report
|
|
79
|
-
#
|
|
80
|
-
# @param resource_id [String, nil] Resource id
|
|
81
|
-
#
|
|
82
|
-
# @param update_behavior [Symbol, Stigg::Models::V1CreateUsageParams::Usage::UpdateBehavior] The method by which the usage value should be updated
|
|
83
|
-
|
|
84
|
-
module Dimension
|
|
85
|
-
extend Stigg::Internal::Type::Union
|
|
86
|
-
|
|
87
|
-
variant String
|
|
88
|
-
|
|
89
|
-
variant Float
|
|
90
|
-
|
|
91
|
-
variant Stigg::Internal::Type::Boolean
|
|
92
|
-
|
|
93
|
-
# @!method self.variants
|
|
94
|
-
# @return [Array(String, Float, Boolean)]
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
# The method by which the usage value should be updated
|
|
98
|
-
#
|
|
99
|
-
# @see Stigg::Models::V1CreateUsageParams::Usage#update_behavior
|
|
100
|
-
module UpdateBehavior
|
|
101
|
-
extend Stigg::Internal::Type::Enum
|
|
102
|
-
|
|
103
|
-
DELTA = :DELTA
|
|
104
|
-
SET = :SET
|
|
105
|
-
|
|
106
|
-
# @!method self.values
|
|
107
|
-
# @return [Array<Symbol>]
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
end
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Stigg
|
|
4
|
-
module Models
|
|
5
|
-
# @see Stigg::Resources::V1#create_usage
|
|
6
|
-
class V1CreateUsageResponse < Stigg::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute data
|
|
8
|
-
# Array of usage measurements with current values and period info
|
|
9
|
-
#
|
|
10
|
-
# @return [Array<Stigg::Models::V1CreateUsageResponse::Data>]
|
|
11
|
-
required :data, -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1CreateUsageResponse::Data] }
|
|
12
|
-
|
|
13
|
-
# @!method initialize(data:)
|
|
14
|
-
# Response containing reported usage measurements with current usage values,
|
|
15
|
-
# period information, and reset dates for each measurement.
|
|
16
|
-
#
|
|
17
|
-
# @param data [Array<Stigg::Models::V1CreateUsageResponse::Data>] Array of usage measurements with current values and period info
|
|
18
|
-
|
|
19
|
-
class Data < Stigg::Internal::Type::BaseModel
|
|
20
|
-
# @!attribute id
|
|
21
|
-
# Unique identifier for the entity
|
|
22
|
-
#
|
|
23
|
-
# @return [String]
|
|
24
|
-
required :id, String
|
|
25
|
-
|
|
26
|
-
# @!attribute created_at
|
|
27
|
-
# Timestamp of when the record was created
|
|
28
|
-
#
|
|
29
|
-
# @return [Time]
|
|
30
|
-
required :created_at, Time, api_name: :createdAt
|
|
31
|
-
|
|
32
|
-
# @!attribute customer_id
|
|
33
|
-
# Customer id
|
|
34
|
-
#
|
|
35
|
-
# @return [String]
|
|
36
|
-
required :customer_id, String, api_name: :customerId
|
|
37
|
-
|
|
38
|
-
# @!attribute feature_id
|
|
39
|
-
# Feature id
|
|
40
|
-
#
|
|
41
|
-
# @return [String]
|
|
42
|
-
required :feature_id, String, api_name: :featureId
|
|
43
|
-
|
|
44
|
-
# @!attribute timestamp
|
|
45
|
-
# Timestamp
|
|
46
|
-
#
|
|
47
|
-
# @return [Time]
|
|
48
|
-
required :timestamp, Time
|
|
49
|
-
|
|
50
|
-
# @!attribute value
|
|
51
|
-
# The usage measurement record
|
|
52
|
-
#
|
|
53
|
-
# @return [Float]
|
|
54
|
-
required :value, Float
|
|
55
|
-
|
|
56
|
-
# @!attribute current_usage
|
|
57
|
-
# The current measured usage value
|
|
58
|
-
#
|
|
59
|
-
# @return [Float, nil]
|
|
60
|
-
optional :current_usage, Float, api_name: :currentUsage, nil?: true
|
|
61
|
-
|
|
62
|
-
# @!attribute next_reset_date
|
|
63
|
-
# The date when the next usage reset will occur
|
|
64
|
-
#
|
|
65
|
-
# @return [Time, nil]
|
|
66
|
-
optional :next_reset_date, Time, api_name: :nextResetDate, nil?: true
|
|
67
|
-
|
|
68
|
-
# @!attribute resource_id
|
|
69
|
-
# Resource id
|
|
70
|
-
#
|
|
71
|
-
# @return [String, nil]
|
|
72
|
-
optional :resource_id, String, api_name: :resourceId, nil?: true
|
|
73
|
-
|
|
74
|
-
# @!attribute usage_period_end
|
|
75
|
-
# The end date of the usage period in which this measurement resides (for
|
|
76
|
-
# entitlements with a reset period)
|
|
77
|
-
#
|
|
78
|
-
# @return [Time, nil]
|
|
79
|
-
optional :usage_period_end, Time, api_name: :usagePeriodEnd, nil?: true
|
|
80
|
-
|
|
81
|
-
# @!attribute usage_period_start
|
|
82
|
-
# The start date of the usage period in which this measurement resides (for
|
|
83
|
-
# entitlements with a reset period)
|
|
84
|
-
#
|
|
85
|
-
# @return [Time, nil]
|
|
86
|
-
optional :usage_period_start, Time, api_name: :usagePeriodStart, nil?: true
|
|
87
|
-
|
|
88
|
-
# @!method initialize(id:, created_at:, customer_id:, feature_id:, timestamp:, value:, current_usage: nil, next_reset_date: nil, resource_id: nil, usage_period_end: nil, usage_period_start: nil)
|
|
89
|
-
# Some parameter documentations has been truncated, see
|
|
90
|
-
# {Stigg::Models::V1CreateUsageResponse::Data} for more details.
|
|
91
|
-
#
|
|
92
|
-
# Recorded usage with period info
|
|
93
|
-
#
|
|
94
|
-
# @param id [String] Unique identifier for the entity
|
|
95
|
-
#
|
|
96
|
-
# @param created_at [Time] Timestamp of when the record was created
|
|
97
|
-
#
|
|
98
|
-
# @param customer_id [String] Customer id
|
|
99
|
-
#
|
|
100
|
-
# @param feature_id [String] Feature id
|
|
101
|
-
#
|
|
102
|
-
# @param timestamp [Time] Timestamp
|
|
103
|
-
#
|
|
104
|
-
# @param value [Float] The usage measurement record
|
|
105
|
-
#
|
|
106
|
-
# @param current_usage [Float, nil] The current measured usage value
|
|
107
|
-
#
|
|
108
|
-
# @param next_reset_date [Time, nil] The date when the next usage reset will occur
|
|
109
|
-
#
|
|
110
|
-
# @param resource_id [String, nil] Resource id
|
|
111
|
-
#
|
|
112
|
-
# @param usage_period_end [Time, nil] The end date of the usage period in which this measurement resides (for entitlem
|
|
113
|
-
#
|
|
114
|
-
# @param usage_period_start [Time, nil] The start date of the usage period in which this measurement resides (for entitl
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
end
|
|
118
|
-
end
|