stigg 0.1.0.pre.alpha.1
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 +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +45 -0
- data/README.md +233 -0
- data/SECURITY.md +23 -0
- data/lib/stigg/client.rb +72 -0
- data/lib/stigg/errors.rb +228 -0
- data/lib/stigg/file_part.rb +58 -0
- data/lib/stigg/internal/my_cursor_id_page.rb +82 -0
- data/lib/stigg/internal/transport/base_client.rb +570 -0
- data/lib/stigg/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/stigg/internal/type/array_of.rb +168 -0
- data/lib/stigg/internal/type/base_model.rb +529 -0
- data/lib/stigg/internal/type/base_page.rb +55 -0
- data/lib/stigg/internal/type/boolean.rb +77 -0
- data/lib/stigg/internal/type/converter.rb +327 -0
- data/lib/stigg/internal/type/enum.rb +131 -0
- data/lib/stigg/internal/type/file_input.rb +110 -0
- data/lib/stigg/internal/type/hash_of.rb +188 -0
- data/lib/stigg/internal/type/request_parameters.rb +42 -0
- data/lib/stigg/internal/type/union.rb +237 -0
- data/lib/stigg/internal/type/unknown.rb +81 -0
- data/lib/stigg/internal/util.rb +920 -0
- data/lib/stigg/internal.rb +20 -0
- data/lib/stigg/models/v1/coupon_create_params.rb +221 -0
- data/lib/stigg/models/v1/coupon_create_response.rb +317 -0
- data/lib/stigg/models/v1/coupon_list_params.rb +40 -0
- data/lib/stigg/models/v1/coupon_list_response.rb +324 -0
- data/lib/stigg/models/v1/coupon_retrieve_params.rb +16 -0
- data/lib/stigg/models/v1/coupon_retrieve_response.rb +317 -0
- data/lib/stigg/models/v1/customer_archive_params.rb +16 -0
- data/lib/stigg/models/v1/customer_create_params.rb +185 -0
- data/lib/stigg/models/v1/customer_list_params.rb +40 -0
- data/lib/stigg/models/v1/customer_list_response.rb +223 -0
- data/lib/stigg/models/v1/customer_response.rb +216 -0
- data/lib/stigg/models/v1/customer_retrieve_params.rb +16 -0
- data/lib/stigg/models/v1/customer_unarchive_params.rb +16 -0
- data/lib/stigg/models/v1/customer_update_params.rb +107 -0
- data/lib/stigg/models/v1/customers/payment_method_attach_params.rb +197 -0
- data/lib/stigg/models/v1/customers/payment_method_detach_params.rb +18 -0
- data/lib/stigg/models/v1/customers/promotional_create_params.rb +294 -0
- data/lib/stigg/models/v1/customers/promotional_create_response.rb +268 -0
- data/lib/stigg/models/v1/customers/promotional_revoke_params.rb +24 -0
- data/lib/stigg/models/v1/customers/promotional_revoke_response.rb +268 -0
- data/lib/stigg/models/v1/customers/usage_retrieve_params.rb +56 -0
- data/lib/stigg/models/v1/customers/usage_retrieve_response.rb +145 -0
- data/lib/stigg/models/v1/subscription_create_params.rb +214 -0
- data/lib/stigg/models/v1/subscription_create_response.rb +338 -0
- data/lib/stigg/models/v1/subscription_delegate_params.rb +24 -0
- data/lib/stigg/models/v1/subscription_delegate_response.rb +274 -0
- data/lib/stigg/models/v1/subscription_list_params.rb +60 -0
- data/lib/stigg/models/v1/subscription_list_response.rb +281 -0
- data/lib/stigg/models/v1/subscription_migrate_params.rb +37 -0
- data/lib/stigg/models/v1/subscription_migrate_response.rb +274 -0
- data/lib/stigg/models/v1/subscription_preview_params.rb +644 -0
- data/lib/stigg/models/v1/subscription_preview_response.rb +431 -0
- data/lib/stigg/models/v1/subscription_retrieve_params.rb +16 -0
- data/lib/stigg/models/v1/subscription_retrieve_response.rb +274 -0
- data/lib/stigg/models/v1/subscription_transfer_params.rb +28 -0
- data/lib/stigg/models/v1/subscription_transfer_response.rb +274 -0
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_params.rb +18 -0
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rb +32 -0
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_params.rb +18 -0
- data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +32 -0
- data/lib/stigg/models/v1_create_event_params.rb +87 -0
- data/lib/stigg/models/v1_create_event_response.rb +16 -0
- data/lib/stigg/models/v1_create_usage_params.rb +96 -0
- data/lib/stigg/models/v1_create_usage_response.rb +112 -0
- data/lib/stigg/models.rb +47 -0
- data/lib/stigg/request_options.rb +77 -0
- data/lib/stigg/resources/v1/coupons.rb +95 -0
- data/lib/stigg/resources/v1/customers/payment_method.rb +67 -0
- data/lib/stigg/resources/v1/customers/promotional.rb +69 -0
- data/lib/stigg/resources/v1/customers/usage.rb +59 -0
- data/lib/stigg/resources/v1/customers.rb +177 -0
- data/lib/stigg/resources/v1/subscriptions/future_update.rb +56 -0
- data/lib/stigg/resources/v1/subscriptions.rb +241 -0
- data/lib/stigg/resources/v1.rb +70 -0
- data/lib/stigg/version.rb +5 -0
- data/lib/stigg.rb +108 -0
- data/manifest.yaml +17 -0
- data/rbi/stigg/client.rbi +49 -0
- data/rbi/stigg/errors.rbi +205 -0
- data/rbi/stigg/file_part.rbi +37 -0
- data/rbi/stigg/internal/my_cursor_id_page.rbi +19 -0
- data/rbi/stigg/internal/transport/base_client.rbi +297 -0
- data/rbi/stigg/internal/transport/pooled_net_requester.rbi +82 -0
- data/rbi/stigg/internal/type/array_of.rbi +104 -0
- data/rbi/stigg/internal/type/base_model.rbi +299 -0
- data/rbi/stigg/internal/type/base_page.rbi +42 -0
- data/rbi/stigg/internal/type/boolean.rbi +58 -0
- data/rbi/stigg/internal/type/converter.rbi +204 -0
- data/rbi/stigg/internal/type/enum.rbi +82 -0
- data/rbi/stigg/internal/type/file_input.rbi +58 -0
- data/rbi/stigg/internal/type/hash_of.rbi +104 -0
- data/rbi/stigg/internal/type/request_parameters.rbi +29 -0
- data/rbi/stigg/internal/type/union.rbi +126 -0
- data/rbi/stigg/internal/type/unknown.rbi +58 -0
- data/rbi/stigg/internal/util.rbi +478 -0
- data/rbi/stigg/internal.rbi +16 -0
- data/rbi/stigg/models/v1/coupon_create_params.rbi +758 -0
- data/rbi/stigg/models/v1/coupon_create_response.rbi +986 -0
- data/rbi/stigg/models/v1/coupon_list_params.rbi +70 -0
- data/rbi/stigg/models/v1/coupon_list_response.rbi +983 -0
- data/rbi/stigg/models/v1/coupon_retrieve_params.rbi +29 -0
- data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +986 -0
- data/rbi/stigg/models/v1/customer_archive_params.rbi +29 -0
- data/rbi/stigg/models/v1/customer_create_params.rbi +376 -0
- data/rbi/stigg/models/v1/customer_list_params.rbi +70 -0
- data/rbi/stigg/models/v1/customer_list_response.rbi +447 -0
- data/rbi/stigg/models/v1/customer_response.rbi +423 -0
- data/rbi/stigg/models/v1/customer_retrieve_params.rbi +29 -0
- data/rbi/stigg/models/v1/customer_unarchive_params.rbi +29 -0
- data/rbi/stigg/models/v1/customer_update_params.rbi +226 -0
- data/rbi/stigg/models/v1/customers/payment_method_attach_params.rbi +769 -0
- data/rbi/stigg/models/v1/customers/payment_method_detach_params.rbi +34 -0
- data/rbi/stigg/models/v1/customers/promotional_create_params.rbi +639 -0
- data/rbi/stigg/models/v1/customers/promotional_create_response.rbi +495 -0
- data/rbi/stigg/models/v1/customers/promotional_revoke_params.rbi +42 -0
- data/rbi/stigg/models/v1/customers/promotional_revoke_response.rbi +497 -0
- data/rbi/stigg/models/v1/customers/usage_retrieve_params.rbi +84 -0
- data/rbi/stigg/models/v1/customers/usage_retrieve_response.rbi +353 -0
- data/rbi/stigg/models/v1/subscription_create_params.rbi +394 -0
- data/rbi/stigg/models/v1/subscription_create_response.rbi +668 -0
- data/rbi/stigg/models/v1/subscription_delegate_params.rbi +48 -0
- data/rbi/stigg/models/v1/subscription_delegate_response.rbi +535 -0
- data/rbi/stigg/models/v1/subscription_list_params.rbi +94 -0
- data/rbi/stigg/models/v1/subscription_list_response.rbi +543 -0
- data/rbi/stigg/models/v1/subscription_migrate_params.rbi +99 -0
- data/rbi/stigg/models/v1/subscription_migrate_response.rbi +535 -0
- data/rbi/stigg/models/v1/subscription_preview_params.rbi +1786 -0
- data/rbi/stigg/models/v1/subscription_preview_response.rbi +929 -0
- data/rbi/stigg/models/v1/subscription_retrieve_params.rbi +32 -0
- data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +535 -0
- data/rbi/stigg/models/v1/subscription_transfer_params.rbi +50 -0
- data/rbi/stigg/models/v1/subscription_transfer_response.rbi +535 -0
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_params.rbi +34 -0
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +79 -0
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_schedule_params.rbi +34 -0
- data/rbi/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbi +79 -0
- data/rbi/stigg/models/v1_create_event_params.rbi +160 -0
- data/rbi/stigg/models/v1_create_event_response.rbi +23 -0
- data/rbi/stigg/models/v1_create_usage_params.rbi +177 -0
- data/rbi/stigg/models/v1_create_usage_response.rbi +150 -0
- data/rbi/stigg/models.rbi +9 -0
- data/rbi/stigg/request_options.rbi +55 -0
- data/rbi/stigg/resources/v1/coupons.rbi +79 -0
- data/rbi/stigg/resources/v1/customers/payment_method.rbi +54 -0
- data/rbi/stigg/resources/v1/customers/promotional.rbi +53 -0
- data/rbi/stigg/resources/v1/customers/usage.rbi +45 -0
- data/rbi/stigg/resources/v1/customers.rbi +138 -0
- data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +40 -0
- data/rbi/stigg/resources/v1/subscriptions.rbi +199 -0
- data/rbi/stigg/resources/v1.rbi +49 -0
- data/rbi/stigg/version.rbi +5 -0
- data/sig/stigg/client.rbs +26 -0
- data/sig/stigg/errors.rbs +117 -0
- data/sig/stigg/file_part.rbs +21 -0
- data/sig/stigg/internal/my_cursor_id_page.rbs +11 -0
- data/sig/stigg/internal/transport/base_client.rbs +133 -0
- data/sig/stigg/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/stigg/internal/type/array_of.rbs +48 -0
- data/sig/stigg/internal/type/base_model.rbs +102 -0
- data/sig/stigg/internal/type/base_page.rbs +24 -0
- data/sig/stigg/internal/type/boolean.rbs +26 -0
- data/sig/stigg/internal/type/converter.rbs +79 -0
- data/sig/stigg/internal/type/enum.rbs +32 -0
- data/sig/stigg/internal/type/file_input.rbs +25 -0
- data/sig/stigg/internal/type/hash_of.rbs +48 -0
- data/sig/stigg/internal/type/request_parameters.rbs +17 -0
- data/sig/stigg/internal/type/union.rbs +52 -0
- data/sig/stigg/internal/type/unknown.rbs +26 -0
- data/sig/stigg/internal/util.rbs +185 -0
- data/sig/stigg/internal.rbs +9 -0
- data/sig/stigg/models/v1/coupon_create_params.rbs +323 -0
- data/sig/stigg/models/v1/coupon_create_response.rbs +392 -0
- data/sig/stigg/models/v1/coupon_list_params.rbs +40 -0
- data/sig/stigg/models/v1/coupon_list_response.rbs +399 -0
- data/sig/stigg/models/v1/coupon_retrieve_params.rbs +17 -0
- data/sig/stigg/models/v1/coupon_retrieve_response.rbs +394 -0
- data/sig/stigg/models/v1/customer_archive_params.rbs +17 -0
- data/sig/stigg/models/v1/customer_create_params.rbs +169 -0
- data/sig/stigg/models/v1/customer_list_params.rbs +40 -0
- data/sig/stigg/models/v1/customer_list_response.rbs +198 -0
- data/sig/stigg/models/v1/customer_response.rbs +188 -0
- data/sig/stigg/models/v1/customer_retrieve_params.rbs +17 -0
- data/sig/stigg/models/v1/customer_unarchive_params.rbs +17 -0
- data/sig/stigg/models/v1/customer_update_params.rbs +110 -0
- data/sig/stigg/models/v1/customers/payment_method_attach_params.rbs +315 -0
- data/sig/stigg/models/v1/customers/payment_method_detach_params.rbs +19 -0
- data/sig/stigg/models/v1/customers/promotional_create_params.rbs +234 -0
- data/sig/stigg/models/v1/customers/promotional_create_response.rbs +209 -0
- data/sig/stigg/models/v1/customers/promotional_revoke_params.rbs +27 -0
- data/sig/stigg/models/v1/customers/promotional_revoke_response.rbs +209 -0
- data/sig/stigg/models/v1/customers/usage_retrieve_params.rbs +54 -0
- data/sig/stigg/models/v1/customers/usage_retrieve_response.rbs +134 -0
- data/sig/stigg/models/v1/subscription_create_params.rbs +199 -0
- data/sig/stigg/models/v1/subscription_create_response.rbs +283 -0
- data/sig/stigg/models/v1/subscription_delegate_params.rbs +26 -0
- data/sig/stigg/models/v1/subscription_delegate_response.rbs +224 -0
- data/sig/stigg/models/v1/subscription_list_params.rbs +58 -0
- data/sig/stigg/models/v1/subscription_list_response.rbs +229 -0
- data/sig/stigg/models/v1/subscription_migrate_params.rbs +43 -0
- data/sig/stigg/models/v1/subscription_migrate_response.rbs +224 -0
- data/sig/stigg/models/v1/subscription_preview_params.rbs +821 -0
- data/sig/stigg/models/v1/subscription_preview_response.rbs +466 -0
- data/sig/stigg/models/v1/subscription_retrieve_params.rbs +17 -0
- data/sig/stigg/models/v1/subscription_retrieve_response.rbs +224 -0
- data/sig/stigg/models/v1/subscription_transfer_params.rbs +26 -0
- data/sig/stigg/models/v1/subscription_transfer_response.rbs +224 -0
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_params.rbs +19 -0
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbs +34 -0
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_params.rbs +19 -0
- data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbs +34 -0
- data/sig/stigg/models/v1_create_event_params.rbs +80 -0
- data/sig/stigg/models/v1_create_event_response.rbs +13 -0
- data/sig/stigg/models/v1_create_usage_params.rbs +90 -0
- data/sig/stigg/models/v1_create_usage_response.rbs +85 -0
- data/sig/stigg/models.rbs +7 -0
- data/sig/stigg/request_options.rbs +34 -0
- data/sig/stigg/resources/v1/coupons.rbs +32 -0
- data/sig/stigg/resources/v1/customers/payment_method.rbs +25 -0
- data/sig/stigg/resources/v1/customers/promotional.rbs +23 -0
- data/sig/stigg/resources/v1/customers/usage.rbs +21 -0
- data/sig/stigg/resources/v1/customers.rbs +58 -0
- data/sig/stigg/resources/v1/subscriptions/future_update.rbs +21 -0
- data/sig/stigg/resources/v1/subscriptions.rbs +76 -0
- data/sig/stigg/resources/v1.rbs +23 -0
- data/sig/stigg/version.rbs +3 -0
- metadata +301 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Subscriptions#delegate
|
|
7
|
+
class SubscriptionDelegateParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute target_customer_id
|
|
12
|
+
# The customer ID to delegate the subscription to
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :target_customer_id, String, api_name: :targetCustomerId
|
|
16
|
+
|
|
17
|
+
# @!method initialize(target_customer_id:, request_options: {})
|
|
18
|
+
# @param target_customer_id [String] The customer ID to delegate the subscription to
|
|
19
|
+
#
|
|
20
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Subscriptions#delegate
|
|
7
|
+
class SubscriptionDelegateResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
#
|
|
10
|
+
# @return [Stigg::Models::V1::SubscriptionDelegateResponse::Data]
|
|
11
|
+
required :data, -> { Stigg::Models::V1::SubscriptionDelegateResponse::Data }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(data:)
|
|
14
|
+
# @param data [Stigg::Models::V1::SubscriptionDelegateResponse::Data]
|
|
15
|
+
|
|
16
|
+
# @see Stigg::Models::V1::SubscriptionDelegateResponse#data
|
|
17
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
18
|
+
# @!attribute id
|
|
19
|
+
# Subscription ID
|
|
20
|
+
#
|
|
21
|
+
# @return [String]
|
|
22
|
+
required :id, String
|
|
23
|
+
|
|
24
|
+
# @!attribute billing_id
|
|
25
|
+
# Billing ID
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
required :billing_id, String, api_name: :billingId, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute created_at
|
|
31
|
+
# Created at
|
|
32
|
+
#
|
|
33
|
+
# @return [Time]
|
|
34
|
+
required :created_at, Time, api_name: :createdAt
|
|
35
|
+
|
|
36
|
+
# @!attribute customer_id
|
|
37
|
+
# Customer ID
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
required :customer_id, String, api_name: :customerId
|
|
41
|
+
|
|
42
|
+
# @!attribute payment_collection
|
|
43
|
+
# Payment collection
|
|
44
|
+
#
|
|
45
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::PaymentCollection]
|
|
46
|
+
required :payment_collection,
|
|
47
|
+
enum: -> { Stigg::Models::V1::SubscriptionDelegateResponse::Data::PaymentCollection },
|
|
48
|
+
api_name: :paymentCollection
|
|
49
|
+
|
|
50
|
+
# @!attribute plan_id
|
|
51
|
+
# Plan ID
|
|
52
|
+
#
|
|
53
|
+
# @return [String]
|
|
54
|
+
required :plan_id, String, api_name: :planId
|
|
55
|
+
|
|
56
|
+
# @!attribute pricing_type
|
|
57
|
+
# Pricing type
|
|
58
|
+
#
|
|
59
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::PricingType]
|
|
60
|
+
required :pricing_type,
|
|
61
|
+
enum: -> { Stigg::Models::V1::SubscriptionDelegateResponse::Data::PricingType },
|
|
62
|
+
api_name: :pricingType
|
|
63
|
+
|
|
64
|
+
# @!attribute start_date
|
|
65
|
+
# Subscription start date
|
|
66
|
+
#
|
|
67
|
+
# @return [Time]
|
|
68
|
+
required :start_date, Time, api_name: :startDate
|
|
69
|
+
|
|
70
|
+
# @!attribute status
|
|
71
|
+
# Subscription status
|
|
72
|
+
#
|
|
73
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::Status]
|
|
74
|
+
required :status, enum: -> { Stigg::Models::V1::SubscriptionDelegateResponse::Data::Status }
|
|
75
|
+
|
|
76
|
+
# @!attribute cancellation_date
|
|
77
|
+
# Subscription cancellation date
|
|
78
|
+
#
|
|
79
|
+
# @return [Time, nil]
|
|
80
|
+
optional :cancellation_date, Time, api_name: :cancellationDate, nil?: true
|
|
81
|
+
|
|
82
|
+
# @!attribute cancel_reason
|
|
83
|
+
# Subscription cancel reason
|
|
84
|
+
#
|
|
85
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::CancelReason, nil]
|
|
86
|
+
optional :cancel_reason,
|
|
87
|
+
enum: -> { Stigg::Models::V1::SubscriptionDelegateResponse::Data::CancelReason },
|
|
88
|
+
api_name: :cancelReason,
|
|
89
|
+
nil?: true
|
|
90
|
+
|
|
91
|
+
# @!attribute current_billing_period_end
|
|
92
|
+
# End of the current billing period
|
|
93
|
+
#
|
|
94
|
+
# @return [Time, nil]
|
|
95
|
+
optional :current_billing_period_end, Time, api_name: :currentBillingPeriodEnd, nil?: true
|
|
96
|
+
|
|
97
|
+
# @!attribute current_billing_period_start
|
|
98
|
+
# Start of the current billing period
|
|
99
|
+
#
|
|
100
|
+
# @return [Time, nil]
|
|
101
|
+
optional :current_billing_period_start, Time, api_name: :currentBillingPeriodStart, nil?: true
|
|
102
|
+
|
|
103
|
+
# @!attribute effective_end_date
|
|
104
|
+
# Subscription effective end date
|
|
105
|
+
#
|
|
106
|
+
# @return [Time, nil]
|
|
107
|
+
optional :effective_end_date, Time, api_name: :effectiveEndDate, nil?: true
|
|
108
|
+
|
|
109
|
+
# @!attribute end_date
|
|
110
|
+
# Subscription end date
|
|
111
|
+
#
|
|
112
|
+
# @return [Time, nil]
|
|
113
|
+
optional :end_date, Time, api_name: :endDate, nil?: true
|
|
114
|
+
|
|
115
|
+
# @!attribute metadata
|
|
116
|
+
# Additional metadata for the subscription
|
|
117
|
+
#
|
|
118
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
119
|
+
optional :metadata, Stigg::Internal::Type::HashOf[String]
|
|
120
|
+
|
|
121
|
+
# @!attribute paying_customer_id
|
|
122
|
+
# Paying customer ID for delegated billing
|
|
123
|
+
#
|
|
124
|
+
# @return [String, nil]
|
|
125
|
+
optional :paying_customer_id, String, api_name: :payingCustomerId, nil?: true
|
|
126
|
+
|
|
127
|
+
# @!attribute payment_collection_method
|
|
128
|
+
# The method used to collect payments for a subscription
|
|
129
|
+
#
|
|
130
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::PaymentCollectionMethod, nil]
|
|
131
|
+
optional :payment_collection_method,
|
|
132
|
+
enum: -> { Stigg::Models::V1::SubscriptionDelegateResponse::Data::PaymentCollectionMethod },
|
|
133
|
+
api_name: :paymentCollectionMethod,
|
|
134
|
+
nil?: true
|
|
135
|
+
|
|
136
|
+
# @!attribute resource_id
|
|
137
|
+
# Resource ID
|
|
138
|
+
#
|
|
139
|
+
# @return [String, nil]
|
|
140
|
+
optional :resource_id, String, api_name: :resourceId, nil?: true
|
|
141
|
+
|
|
142
|
+
# @!attribute trial_end_date
|
|
143
|
+
# Subscription trial end date
|
|
144
|
+
#
|
|
145
|
+
# @return [Time, nil]
|
|
146
|
+
optional :trial_end_date, Time, api_name: :trialEndDate, nil?: true
|
|
147
|
+
|
|
148
|
+
# @!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, resource_id: nil, trial_end_date: nil)
|
|
149
|
+
# @param id [String] Subscription ID
|
|
150
|
+
#
|
|
151
|
+
# @param billing_id [String, nil] Billing ID
|
|
152
|
+
#
|
|
153
|
+
# @param created_at [Time] Created at
|
|
154
|
+
#
|
|
155
|
+
# @param customer_id [String] Customer ID
|
|
156
|
+
#
|
|
157
|
+
# @param payment_collection [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::PaymentCollection] Payment collection
|
|
158
|
+
#
|
|
159
|
+
# @param plan_id [String] Plan ID
|
|
160
|
+
#
|
|
161
|
+
# @param pricing_type [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::PricingType] Pricing type
|
|
162
|
+
#
|
|
163
|
+
# @param start_date [Time] Subscription start date
|
|
164
|
+
#
|
|
165
|
+
# @param status [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::Status] Subscription status
|
|
166
|
+
#
|
|
167
|
+
# @param cancellation_date [Time, nil] Subscription cancellation date
|
|
168
|
+
#
|
|
169
|
+
# @param cancel_reason [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::CancelReason, nil] Subscription cancel reason
|
|
170
|
+
#
|
|
171
|
+
# @param current_billing_period_end [Time, nil] End of the current billing period
|
|
172
|
+
#
|
|
173
|
+
# @param current_billing_period_start [Time, nil] Start of the current billing period
|
|
174
|
+
#
|
|
175
|
+
# @param effective_end_date [Time, nil] Subscription effective end date
|
|
176
|
+
#
|
|
177
|
+
# @param end_date [Time, nil] Subscription end date
|
|
178
|
+
#
|
|
179
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
|
|
180
|
+
#
|
|
181
|
+
# @param paying_customer_id [String, nil] Paying customer ID for delegated billing
|
|
182
|
+
#
|
|
183
|
+
# @param payment_collection_method [Symbol, Stigg::Models::V1::SubscriptionDelegateResponse::Data::PaymentCollectionMethod, nil] The method used to collect payments for a subscription
|
|
184
|
+
#
|
|
185
|
+
# @param resource_id [String, nil] Resource ID
|
|
186
|
+
#
|
|
187
|
+
# @param trial_end_date [Time, nil] Subscription trial end date
|
|
188
|
+
|
|
189
|
+
# Payment collection
|
|
190
|
+
#
|
|
191
|
+
# @see Stigg::Models::V1::SubscriptionDelegateResponse::Data#payment_collection
|
|
192
|
+
module PaymentCollection
|
|
193
|
+
extend Stigg::Internal::Type::Enum
|
|
194
|
+
|
|
195
|
+
NOT_REQUIRED = :NOT_REQUIRED
|
|
196
|
+
PROCESSING = :PROCESSING
|
|
197
|
+
FAILED = :FAILED
|
|
198
|
+
ACTION_REQUIRED = :ACTION_REQUIRED
|
|
199
|
+
|
|
200
|
+
# @!method self.values
|
|
201
|
+
# @return [Array<Symbol>]
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Pricing type
|
|
205
|
+
#
|
|
206
|
+
# @see Stigg::Models::V1::SubscriptionDelegateResponse::Data#pricing_type
|
|
207
|
+
module PricingType
|
|
208
|
+
extend Stigg::Internal::Type::Enum
|
|
209
|
+
|
|
210
|
+
FREE = :FREE
|
|
211
|
+
PAID = :PAID
|
|
212
|
+
CUSTOM = :CUSTOM
|
|
213
|
+
|
|
214
|
+
# @!method self.values
|
|
215
|
+
# @return [Array<Symbol>]
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Subscription status
|
|
219
|
+
#
|
|
220
|
+
# @see Stigg::Models::V1::SubscriptionDelegateResponse::Data#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
|
|
234
|
+
|
|
235
|
+
# Subscription cancel reason
|
|
236
|
+
#
|
|
237
|
+
# @see Stigg::Models::V1::SubscriptionDelegateResponse::Data#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::SubscriptionDelegateResponse::Data#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
|
+
end
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Subscriptions#list
|
|
7
|
+
class SubscriptionListParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute customer_id
|
|
12
|
+
# Filter by customer ID
|
|
13
|
+
#
|
|
14
|
+
# @return [String, nil]
|
|
15
|
+
optional :customer_id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute ending_before
|
|
18
|
+
# Ending before this UUID for pagination
|
|
19
|
+
#
|
|
20
|
+
# @return [String, nil]
|
|
21
|
+
optional :ending_before, String
|
|
22
|
+
|
|
23
|
+
# @!attribute limit
|
|
24
|
+
# Items per page
|
|
25
|
+
#
|
|
26
|
+
# @return [Integer, nil]
|
|
27
|
+
optional :limit, Integer
|
|
28
|
+
|
|
29
|
+
# @!attribute starting_after
|
|
30
|
+
# Starting after this UUID for pagination
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :starting_after, String
|
|
34
|
+
|
|
35
|
+
# @!attribute status
|
|
36
|
+
# Filter by subscription status (comma-separated for multiple statuses, e.g.,
|
|
37
|
+
# ACTIVE,IN_TRIAL)
|
|
38
|
+
#
|
|
39
|
+
# @return [String, nil]
|
|
40
|
+
optional :status, String
|
|
41
|
+
|
|
42
|
+
# @!method initialize(customer_id: nil, ending_before: nil, limit: nil, starting_after: nil, status: nil, request_options: {})
|
|
43
|
+
# Some parameter documentations has been truncated, see
|
|
44
|
+
# {Stigg::Models::V1::SubscriptionListParams} for more details.
|
|
45
|
+
#
|
|
46
|
+
# @param customer_id [String] Filter by customer ID
|
|
47
|
+
#
|
|
48
|
+
# @param ending_before [String] Ending before this UUID for pagination
|
|
49
|
+
#
|
|
50
|
+
# @param limit [Integer] Items per page
|
|
51
|
+
#
|
|
52
|
+
# @param starting_after [String] Starting after this UUID for pagination
|
|
53
|
+
#
|
|
54
|
+
# @param status [String] Filter by subscription status (comma-separated for multiple statuses, e.g., ACTI
|
|
55
|
+
#
|
|
56
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Subscriptions#list
|
|
7
|
+
class SubscriptionListResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<Stigg::Models::V1::SubscriptionListResponse::Data>]
|
|
11
|
+
required :data, -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::SubscriptionListResponse::Data] }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(data:)
|
|
14
|
+
# @param data [Array<Stigg::Models::V1::SubscriptionListResponse::Data>]
|
|
15
|
+
|
|
16
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
17
|
+
# @!attribute id
|
|
18
|
+
# Subscription ID
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
required :id, String
|
|
22
|
+
|
|
23
|
+
# @!attribute billing_id
|
|
24
|
+
# Billing ID
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
required :billing_id, String, api_name: :billingId, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute created_at
|
|
30
|
+
# Created at
|
|
31
|
+
#
|
|
32
|
+
# @return [Time]
|
|
33
|
+
required :created_at, Time, api_name: :createdAt
|
|
34
|
+
|
|
35
|
+
# @!attribute cursor_id
|
|
36
|
+
# Cursor ID for query pagination
|
|
37
|
+
#
|
|
38
|
+
# @return [String]
|
|
39
|
+
required :cursor_id, String, api_name: :cursorId
|
|
40
|
+
|
|
41
|
+
# @!attribute customer_id
|
|
42
|
+
# Customer ID
|
|
43
|
+
#
|
|
44
|
+
# @return [String]
|
|
45
|
+
required :customer_id, String, api_name: :customerId
|
|
46
|
+
|
|
47
|
+
# @!attribute payment_collection
|
|
48
|
+
# Payment collection
|
|
49
|
+
#
|
|
50
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionListResponse::Data::PaymentCollection]
|
|
51
|
+
required :payment_collection,
|
|
52
|
+
enum: -> { Stigg::Models::V1::SubscriptionListResponse::Data::PaymentCollection },
|
|
53
|
+
api_name: :paymentCollection
|
|
54
|
+
|
|
55
|
+
# @!attribute plan_id
|
|
56
|
+
# Plan ID
|
|
57
|
+
#
|
|
58
|
+
# @return [String]
|
|
59
|
+
required :plan_id, String, api_name: :planId
|
|
60
|
+
|
|
61
|
+
# @!attribute pricing_type
|
|
62
|
+
# Pricing type
|
|
63
|
+
#
|
|
64
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionListResponse::Data::PricingType]
|
|
65
|
+
required :pricing_type,
|
|
66
|
+
enum: -> { Stigg::Models::V1::SubscriptionListResponse::Data::PricingType },
|
|
67
|
+
api_name: :pricingType
|
|
68
|
+
|
|
69
|
+
# @!attribute start_date
|
|
70
|
+
# Subscription start date
|
|
71
|
+
#
|
|
72
|
+
# @return [Time]
|
|
73
|
+
required :start_date, Time, api_name: :startDate
|
|
74
|
+
|
|
75
|
+
# @!attribute status
|
|
76
|
+
# Subscription status
|
|
77
|
+
#
|
|
78
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionListResponse::Data::Status]
|
|
79
|
+
required :status, enum: -> { Stigg::Models::V1::SubscriptionListResponse::Data::Status }
|
|
80
|
+
|
|
81
|
+
# @!attribute cancellation_date
|
|
82
|
+
# Subscription cancellation date
|
|
83
|
+
#
|
|
84
|
+
# @return [Time, nil]
|
|
85
|
+
optional :cancellation_date, Time, api_name: :cancellationDate, nil?: true
|
|
86
|
+
|
|
87
|
+
# @!attribute cancel_reason
|
|
88
|
+
# Subscription cancel reason
|
|
89
|
+
#
|
|
90
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionListResponse::Data::CancelReason, nil]
|
|
91
|
+
optional :cancel_reason,
|
|
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
|
|
101
|
+
|
|
102
|
+
# @!attribute current_billing_period_start
|
|
103
|
+
# Start of the current billing period
|
|
104
|
+
#
|
|
105
|
+
# @return [Time, nil]
|
|
106
|
+
optional :current_billing_period_start, Time, api_name: :currentBillingPeriodStart, nil?: true
|
|
107
|
+
|
|
108
|
+
# @!attribute effective_end_date
|
|
109
|
+
# Subscription effective end date
|
|
110
|
+
#
|
|
111
|
+
# @return [Time, nil]
|
|
112
|
+
optional :effective_end_date, Time, api_name: :effectiveEndDate, nil?: true
|
|
113
|
+
|
|
114
|
+
# @!attribute end_date
|
|
115
|
+
# Subscription end date
|
|
116
|
+
#
|
|
117
|
+
# @return [Time, nil]
|
|
118
|
+
optional :end_date, Time, api_name: :endDate, nil?: true
|
|
119
|
+
|
|
120
|
+
# @!attribute metadata
|
|
121
|
+
# Additional metadata for the subscription
|
|
122
|
+
#
|
|
123
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
124
|
+
optional :metadata, Stigg::Internal::Type::HashOf[String]
|
|
125
|
+
|
|
126
|
+
# @!attribute paying_customer_id
|
|
127
|
+
# Paying customer ID for delegated billing
|
|
128
|
+
#
|
|
129
|
+
# @return [String, nil]
|
|
130
|
+
optional :paying_customer_id, String, api_name: :payingCustomerId, nil?: true
|
|
131
|
+
|
|
132
|
+
# @!attribute payment_collection_method
|
|
133
|
+
# The method used to collect payments for a subscription
|
|
134
|
+
#
|
|
135
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionListResponse::Data::PaymentCollectionMethod, nil]
|
|
136
|
+
optional :payment_collection_method,
|
|
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
|
|
146
|
+
|
|
147
|
+
# @!attribute trial_end_date
|
|
148
|
+
# Subscription trial end date
|
|
149
|
+
#
|
|
150
|
+
# @return [Time, nil]
|
|
151
|
+
optional :trial_end_date, Time, api_name: :trialEndDate, nil?: true
|
|
152
|
+
|
|
153
|
+
# @!method initialize(id:, billing_id:, created_at:, cursor_id:, 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, resource_id: nil, trial_end_date: nil)
|
|
154
|
+
# @param id [String] Subscription ID
|
|
155
|
+
#
|
|
156
|
+
# @param billing_id [String, nil] Billing ID
|
|
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
|
|
195
|
+
|
|
196
|
+
# Payment collection
|
|
197
|
+
#
|
|
198
|
+
# @see Stigg::Models::V1::SubscriptionListResponse::Data#payment_collection
|
|
199
|
+
module PaymentCollection
|
|
200
|
+
extend Stigg::Internal::Type::Enum
|
|
201
|
+
|
|
202
|
+
NOT_REQUIRED = :NOT_REQUIRED
|
|
203
|
+
PROCESSING = :PROCESSING
|
|
204
|
+
FAILED = :FAILED
|
|
205
|
+
ACTION_REQUIRED = :ACTION_REQUIRED
|
|
206
|
+
|
|
207
|
+
# @!method self.values
|
|
208
|
+
# @return [Array<Symbol>]
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Pricing type
|
|
212
|
+
#
|
|
213
|
+
# @see Stigg::Models::V1::SubscriptionListResponse::Data#pricing_type
|
|
214
|
+
module PricingType
|
|
215
|
+
extend Stigg::Internal::Type::Enum
|
|
216
|
+
|
|
217
|
+
FREE = :FREE
|
|
218
|
+
PAID = :PAID
|
|
219
|
+
CUSTOM = :CUSTOM
|
|
220
|
+
|
|
221
|
+
# @!method self.values
|
|
222
|
+
# @return [Array<Symbol>]
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Subscription status
|
|
226
|
+
#
|
|
227
|
+
# @see Stigg::Models::V1::SubscriptionListResponse::Data#status
|
|
228
|
+
module Status
|
|
229
|
+
extend Stigg::Internal::Type::Enum
|
|
230
|
+
|
|
231
|
+
PAYMENT_PENDING = :PAYMENT_PENDING
|
|
232
|
+
ACTIVE = :ACTIVE
|
|
233
|
+
EXPIRED = :EXPIRED
|
|
234
|
+
IN_TRIAL = :IN_TRIAL
|
|
235
|
+
CANCELED = :CANCELED
|
|
236
|
+
NOT_STARTED = :NOT_STARTED
|
|
237
|
+
|
|
238
|
+
# @!method self.values
|
|
239
|
+
# @return [Array<Symbol>]
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Subscription cancel reason
|
|
243
|
+
#
|
|
244
|
+
# @see Stigg::Models::V1::SubscriptionListResponse::Data#cancel_reason
|
|
245
|
+
module CancelReason
|
|
246
|
+
extend Stigg::Internal::Type::Enum
|
|
247
|
+
|
|
248
|
+
UPGRADE_OR_DOWNGRADE = :UPGRADE_OR_DOWNGRADE
|
|
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
|
|
265
|
+
#
|
|
266
|
+
# @see Stigg::Models::V1::SubscriptionListResponse::Data#payment_collection_method
|
|
267
|
+
module PaymentCollectionMethod
|
|
268
|
+
extend Stigg::Internal::Type::Enum
|
|
269
|
+
|
|
270
|
+
CHARGE = :CHARGE
|
|
271
|
+
INVOICE = :INVOICE
|
|
272
|
+
NONE = :NONE
|
|
273
|
+
|
|
274
|
+
# @!method self.values
|
|
275
|
+
# @return [Array<Symbol>]
|
|
276
|
+
end
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Subscriptions#migrate
|
|
7
|
+
class SubscriptionMigrateParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute subscription_migration_time
|
|
12
|
+
# When to migrate the subscription: IMMEDIATE or END_OF_BILLING_PERIOD
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionMigrateParams::SubscriptionMigrationTime, nil]
|
|
15
|
+
optional :subscription_migration_time,
|
|
16
|
+
enum: -> { Stigg::V1::SubscriptionMigrateParams::SubscriptionMigrationTime },
|
|
17
|
+
api_name: :subscriptionMigrationTime
|
|
18
|
+
|
|
19
|
+
# @!method initialize(subscription_migration_time: nil, request_options: {})
|
|
20
|
+
# @param subscription_migration_time [Symbol, Stigg::Models::V1::SubscriptionMigrateParams::SubscriptionMigrationTime] When to migrate the subscription: IMMEDIATE or END_OF_BILLING_PERIOD
|
|
21
|
+
#
|
|
22
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
23
|
+
|
|
24
|
+
# When to migrate the subscription: IMMEDIATE or END_OF_BILLING_PERIOD
|
|
25
|
+
module SubscriptionMigrationTime
|
|
26
|
+
extend Stigg::Internal::Type::Enum
|
|
27
|
+
|
|
28
|
+
END_OF_BILLING_PERIOD = :END_OF_BILLING_PERIOD
|
|
29
|
+
IMMEDIATE = :IMMEDIATE
|
|
30
|
+
|
|
31
|
+
# @!method self.values
|
|
32
|
+
# @return [Array<Symbol>]
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|