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,145 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
module Customers
|
|
7
|
+
# @see Stigg::Resources::V1::Customers::Usage#retrieve
|
|
8
|
+
class UsageRetrieveResponse < Stigg::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute data
|
|
10
|
+
#
|
|
11
|
+
# @return [Stigg::Models::V1::Customers::UsageRetrieveResponse::Data]
|
|
12
|
+
required :data, -> { Stigg::Models::V1::Customers::UsageRetrieveResponse::Data }
|
|
13
|
+
|
|
14
|
+
# @!method initialize(data:)
|
|
15
|
+
# @param data [Stigg::Models::V1::Customers::UsageRetrieveResponse::Data]
|
|
16
|
+
|
|
17
|
+
# @see Stigg::Models::V1::Customers::UsageRetrieveResponse#data
|
|
18
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
19
|
+
# @!attribute markers
|
|
20
|
+
# Markers for events that affecting feature usage
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Marker>]
|
|
23
|
+
required :markers,
|
|
24
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Marker] }
|
|
25
|
+
|
|
26
|
+
# @!attribute series
|
|
27
|
+
# Series of usage history
|
|
28
|
+
#
|
|
29
|
+
# @return [Array<Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Series>]
|
|
30
|
+
required :series,
|
|
31
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Series] }
|
|
32
|
+
|
|
33
|
+
# @!method initialize(markers:, series:)
|
|
34
|
+
# @param markers [Array<Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Marker>] Markers for events that affecting feature usage
|
|
35
|
+
#
|
|
36
|
+
# @param series [Array<Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Series>] Series of usage history
|
|
37
|
+
|
|
38
|
+
class Marker < Stigg::Internal::Type::BaseModel
|
|
39
|
+
# @!attribute timestamp
|
|
40
|
+
# Timestamp of the marker
|
|
41
|
+
#
|
|
42
|
+
# @return [Time]
|
|
43
|
+
required :timestamp, Time
|
|
44
|
+
|
|
45
|
+
# @!attribute type
|
|
46
|
+
# Type of marker for a usage history point
|
|
47
|
+
#
|
|
48
|
+
# @return [Symbol, Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Marker::Type]
|
|
49
|
+
required :type, enum: -> { Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Marker::Type }
|
|
50
|
+
|
|
51
|
+
# @!method initialize(timestamp:, type:)
|
|
52
|
+
# @param timestamp [Time] Timestamp of the marker
|
|
53
|
+
#
|
|
54
|
+
# @param type [Symbol, Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Marker::Type] Type of marker for a usage history point
|
|
55
|
+
|
|
56
|
+
# Type of marker for a usage history point
|
|
57
|
+
#
|
|
58
|
+
# @see Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Marker#type
|
|
59
|
+
module Type
|
|
60
|
+
extend Stigg::Internal::Type::Enum
|
|
61
|
+
|
|
62
|
+
PERIODIC_RESET = :PERIODIC_RESET
|
|
63
|
+
SUBSCRIPTION_CHANGE_RESET = :SUBSCRIPTION_CHANGE_RESET
|
|
64
|
+
|
|
65
|
+
# @!method self.values
|
|
66
|
+
# @return [Array<Symbol>]
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
class Series < Stigg::Internal::Type::BaseModel
|
|
71
|
+
# @!attribute points
|
|
72
|
+
# Points in the usage history series
|
|
73
|
+
#
|
|
74
|
+
# @return [Array<Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Series::Point>]
|
|
75
|
+
required :points,
|
|
76
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Series::Point] }
|
|
77
|
+
|
|
78
|
+
# @!attribute tags
|
|
79
|
+
# Tags for the usage history series
|
|
80
|
+
#
|
|
81
|
+
# @return [Array<Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Series::Tag>]
|
|
82
|
+
required :tags,
|
|
83
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Series::Tag] }
|
|
84
|
+
|
|
85
|
+
# @!method initialize(points:, tags:)
|
|
86
|
+
# @param points [Array<Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Series::Point>] Points in the usage history series
|
|
87
|
+
#
|
|
88
|
+
# @param tags [Array<Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Series::Tag>] Tags for the usage history series
|
|
89
|
+
|
|
90
|
+
class Point < Stigg::Internal::Type::BaseModel
|
|
91
|
+
# @!attribute is_reset_point
|
|
92
|
+
# Indicates whether there was usage reset in this point, see `markers` for details
|
|
93
|
+
#
|
|
94
|
+
# @return [Boolean]
|
|
95
|
+
required :is_reset_point, Stigg::Internal::Type::Boolean, api_name: :isResetPoint
|
|
96
|
+
|
|
97
|
+
# @!attribute timestamp
|
|
98
|
+
# Timestamp of the usage history point
|
|
99
|
+
#
|
|
100
|
+
# @return [Time]
|
|
101
|
+
required :timestamp, Time
|
|
102
|
+
|
|
103
|
+
# @!attribute value
|
|
104
|
+
# Value of the usage history point
|
|
105
|
+
#
|
|
106
|
+
# @return [Float]
|
|
107
|
+
required :value, Float
|
|
108
|
+
|
|
109
|
+
# @!method initialize(is_reset_point:, timestamp:, value:)
|
|
110
|
+
# Some parameter documentations has been truncated, see
|
|
111
|
+
# {Stigg::Models::V1::Customers::UsageRetrieveResponse::Data::Series::Point} for
|
|
112
|
+
# more details.
|
|
113
|
+
#
|
|
114
|
+
# @param is_reset_point [Boolean] Indicates whether there was usage reset in this point, see `markers` for details
|
|
115
|
+
#
|
|
116
|
+
# @param timestamp [Time] Timestamp of the usage history point
|
|
117
|
+
#
|
|
118
|
+
# @param value [Float] Value of the usage history point
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
class Tag < Stigg::Internal::Type::BaseModel
|
|
122
|
+
# @!attribute key
|
|
123
|
+
# Key of the tag
|
|
124
|
+
#
|
|
125
|
+
# @return [String]
|
|
126
|
+
required :key, String
|
|
127
|
+
|
|
128
|
+
# @!attribute value
|
|
129
|
+
# Value of the tag
|
|
130
|
+
#
|
|
131
|
+
# @return [String]
|
|
132
|
+
required :value, String
|
|
133
|
+
|
|
134
|
+
# @!method initialize(key:, value:)
|
|
135
|
+
# @param key [String] Key of the tag
|
|
136
|
+
#
|
|
137
|
+
# @param value [String] Value of the tag
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
end
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Subscriptions#create
|
|
7
|
+
class SubscriptionCreateParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute customer_id
|
|
12
|
+
# Customer ID to provision the subscription for
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :customer_id, String, api_name: :customerId
|
|
16
|
+
|
|
17
|
+
# @!attribute plan_id
|
|
18
|
+
# Plan ID to provision
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
required :plan_id, String, api_name: :planId
|
|
22
|
+
|
|
23
|
+
# @!attribute id
|
|
24
|
+
# Unique identifier for the subscription
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :id, String, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute await_payment_confirmation
|
|
30
|
+
# Whether to wait for payment confirmation before returning the subscription
|
|
31
|
+
#
|
|
32
|
+
# @return [Boolean, nil]
|
|
33
|
+
optional :await_payment_confirmation,
|
|
34
|
+
Stigg::Internal::Type::Boolean,
|
|
35
|
+
api_name: :awaitPaymentConfirmation
|
|
36
|
+
|
|
37
|
+
# @!attribute billing_period
|
|
38
|
+
#
|
|
39
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionCreateParams::BillingPeriod, nil]
|
|
40
|
+
optional :billing_period,
|
|
41
|
+
enum: -> { Stigg::V1::SubscriptionCreateParams::BillingPeriod },
|
|
42
|
+
api_name: :billingPeriod
|
|
43
|
+
|
|
44
|
+
# @!attribute checkout_options
|
|
45
|
+
#
|
|
46
|
+
# @return [Stigg::Models::V1::SubscriptionCreateParams::CheckoutOptions, nil]
|
|
47
|
+
optional :checkout_options,
|
|
48
|
+
-> { Stigg::V1::SubscriptionCreateParams::CheckoutOptions },
|
|
49
|
+
api_name: :checkoutOptions
|
|
50
|
+
|
|
51
|
+
# @!attribute metadata
|
|
52
|
+
# Additional metadata for the subscription
|
|
53
|
+
#
|
|
54
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
55
|
+
optional :metadata, Stigg::Internal::Type::HashOf[String]
|
|
56
|
+
|
|
57
|
+
# @!attribute paying_customer_id
|
|
58
|
+
# Optional paying customer ID for split billing scenarios
|
|
59
|
+
#
|
|
60
|
+
# @return [String, nil]
|
|
61
|
+
optional :paying_customer_id, String, api_name: :payingCustomerId, nil?: true
|
|
62
|
+
|
|
63
|
+
# @!attribute resource_id
|
|
64
|
+
# Optional resource ID for multi-instance subscriptions
|
|
65
|
+
#
|
|
66
|
+
# @return [String, nil]
|
|
67
|
+
optional :resource_id, String, api_name: :resourceId, nil?: true
|
|
68
|
+
|
|
69
|
+
# @!attribute trial_override_configuration
|
|
70
|
+
#
|
|
71
|
+
# @return [Stigg::Models::V1::SubscriptionCreateParams::TrialOverrideConfiguration, nil]
|
|
72
|
+
optional :trial_override_configuration,
|
|
73
|
+
-> { Stigg::V1::SubscriptionCreateParams::TrialOverrideConfiguration },
|
|
74
|
+
api_name: :trialOverrideConfiguration
|
|
75
|
+
|
|
76
|
+
# @!method initialize(customer_id:, plan_id:, id: nil, await_payment_confirmation: nil, billing_period: nil, checkout_options: nil, metadata: nil, paying_customer_id: nil, resource_id: nil, trial_override_configuration: nil, request_options: {})
|
|
77
|
+
# @param customer_id [String] Customer ID to provision the subscription for
|
|
78
|
+
#
|
|
79
|
+
# @param plan_id [String] Plan ID to provision
|
|
80
|
+
#
|
|
81
|
+
# @param id [String, nil] Unique identifier for the subscription
|
|
82
|
+
#
|
|
83
|
+
# @param await_payment_confirmation [Boolean] Whether to wait for payment confirmation before returning the subscription
|
|
84
|
+
#
|
|
85
|
+
# @param billing_period [Symbol, Stigg::Models::V1::SubscriptionCreateParams::BillingPeriod]
|
|
86
|
+
#
|
|
87
|
+
# @param checkout_options [Stigg::Models::V1::SubscriptionCreateParams::CheckoutOptions]
|
|
88
|
+
#
|
|
89
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
|
|
90
|
+
#
|
|
91
|
+
# @param paying_customer_id [String, nil] Optional paying customer ID for split billing scenarios
|
|
92
|
+
#
|
|
93
|
+
# @param resource_id [String, nil] Optional resource ID for multi-instance subscriptions
|
|
94
|
+
#
|
|
95
|
+
# @param trial_override_configuration [Stigg::Models::V1::SubscriptionCreateParams::TrialOverrideConfiguration]
|
|
96
|
+
#
|
|
97
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
98
|
+
|
|
99
|
+
module BillingPeriod
|
|
100
|
+
extend Stigg::Internal::Type::Enum
|
|
101
|
+
|
|
102
|
+
MONTHLY = :MONTHLY
|
|
103
|
+
ANNUALLY = :ANNUALLY
|
|
104
|
+
|
|
105
|
+
# @!method self.values
|
|
106
|
+
# @return [Array<Symbol>]
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
class CheckoutOptions < Stigg::Internal::Type::BaseModel
|
|
110
|
+
# @!attribute cancel_url
|
|
111
|
+
# URL to redirect to if checkout is canceled
|
|
112
|
+
#
|
|
113
|
+
# @return [String]
|
|
114
|
+
required :cancel_url, String, api_name: :cancelUrl
|
|
115
|
+
|
|
116
|
+
# @!attribute success_url
|
|
117
|
+
# URL to redirect to after successful checkout
|
|
118
|
+
#
|
|
119
|
+
# @return [String]
|
|
120
|
+
required :success_url, String, api_name: :successUrl
|
|
121
|
+
|
|
122
|
+
# @!attribute allow_promo_codes
|
|
123
|
+
# Allow promotional codes during checkout
|
|
124
|
+
#
|
|
125
|
+
# @return [Boolean, nil]
|
|
126
|
+
optional :allow_promo_codes, Stigg::Internal::Type::Boolean, api_name: :allowPromoCodes
|
|
127
|
+
|
|
128
|
+
# @!attribute allow_tax_id_collection
|
|
129
|
+
# Allow tax ID collection during checkout
|
|
130
|
+
#
|
|
131
|
+
# @return [Boolean, nil]
|
|
132
|
+
optional :allow_tax_id_collection, Stigg::Internal::Type::Boolean, api_name: :allowTaxIdCollection
|
|
133
|
+
|
|
134
|
+
# @!attribute collect_billing_address
|
|
135
|
+
# Collect billing address during checkout
|
|
136
|
+
#
|
|
137
|
+
# @return [Boolean, nil]
|
|
138
|
+
optional :collect_billing_address, Stigg::Internal::Type::Boolean, api_name: :collectBillingAddress
|
|
139
|
+
|
|
140
|
+
# @!attribute collect_phone_number
|
|
141
|
+
# Collect phone number during checkout
|
|
142
|
+
#
|
|
143
|
+
# @return [Boolean, nil]
|
|
144
|
+
optional :collect_phone_number, Stigg::Internal::Type::Boolean, api_name: :collectPhoneNumber
|
|
145
|
+
|
|
146
|
+
# @!attribute reference_id
|
|
147
|
+
# Optional reference ID for the checkout session
|
|
148
|
+
#
|
|
149
|
+
# @return [String, nil]
|
|
150
|
+
optional :reference_id, String, api_name: :referenceId, nil?: true
|
|
151
|
+
|
|
152
|
+
# @!method initialize(cancel_url:, success_url:, allow_promo_codes: nil, allow_tax_id_collection: nil, collect_billing_address: nil, collect_phone_number: nil, reference_id: nil)
|
|
153
|
+
# @param cancel_url [String] URL to redirect to if checkout is canceled
|
|
154
|
+
#
|
|
155
|
+
# @param success_url [String] URL to redirect to after successful checkout
|
|
156
|
+
#
|
|
157
|
+
# @param allow_promo_codes [Boolean] Allow promotional codes during checkout
|
|
158
|
+
#
|
|
159
|
+
# @param allow_tax_id_collection [Boolean] Allow tax ID collection during checkout
|
|
160
|
+
#
|
|
161
|
+
# @param collect_billing_address [Boolean] Collect billing address during checkout
|
|
162
|
+
#
|
|
163
|
+
# @param collect_phone_number [Boolean] Collect phone number during checkout
|
|
164
|
+
#
|
|
165
|
+
# @param reference_id [String, nil] Optional reference ID for the checkout session
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
class TrialOverrideConfiguration < Stigg::Internal::Type::BaseModel
|
|
169
|
+
# @!attribute is_trial
|
|
170
|
+
# Whether the subscription should start with a trial period
|
|
171
|
+
#
|
|
172
|
+
# @return [Boolean]
|
|
173
|
+
required :is_trial, Stigg::Internal::Type::Boolean, api_name: :isTrial
|
|
174
|
+
|
|
175
|
+
# @!attribute trial_end_behavior
|
|
176
|
+
# Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION
|
|
177
|
+
#
|
|
178
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionCreateParams::TrialOverrideConfiguration::TrialEndBehavior, nil]
|
|
179
|
+
optional :trial_end_behavior,
|
|
180
|
+
enum: -> {
|
|
181
|
+
Stigg::V1::SubscriptionCreateParams::TrialOverrideConfiguration::TrialEndBehavior
|
|
182
|
+
},
|
|
183
|
+
api_name: :trialEndBehavior
|
|
184
|
+
|
|
185
|
+
# @!attribute trial_end_date
|
|
186
|
+
# Custom trial end date
|
|
187
|
+
#
|
|
188
|
+
# @return [Time, nil]
|
|
189
|
+
optional :trial_end_date, Time, api_name: :trialEndDate
|
|
190
|
+
|
|
191
|
+
# @!method initialize(is_trial:, trial_end_behavior: nil, trial_end_date: nil)
|
|
192
|
+
# @param is_trial [Boolean] Whether the subscription should start with a trial period
|
|
193
|
+
#
|
|
194
|
+
# @param trial_end_behavior [Symbol, Stigg::Models::V1::SubscriptionCreateParams::TrialOverrideConfiguration::TrialEndBehavior] Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION
|
|
195
|
+
#
|
|
196
|
+
# @param trial_end_date [Time] Custom trial end date
|
|
197
|
+
|
|
198
|
+
# Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION
|
|
199
|
+
#
|
|
200
|
+
# @see Stigg::Models::V1::SubscriptionCreateParams::TrialOverrideConfiguration#trial_end_behavior
|
|
201
|
+
module TrialEndBehavior
|
|
202
|
+
extend Stigg::Internal::Type::Enum
|
|
203
|
+
|
|
204
|
+
CONVERT_TO_PAID = :CONVERT_TO_PAID
|
|
205
|
+
CANCEL_SUBSCRIPTION = :CANCEL_SUBSCRIPTION
|
|
206
|
+
|
|
207
|
+
# @!method self.values
|
|
208
|
+
# @return [Array<Symbol>]
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
end
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Subscriptions#create
|
|
7
|
+
class SubscriptionCreateResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
#
|
|
10
|
+
# @return [Stigg::Models::V1::SubscriptionCreateResponse::Data]
|
|
11
|
+
required :data, -> { Stigg::Models::V1::SubscriptionCreateResponse::Data }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(data:)
|
|
14
|
+
# @param data [Stigg::Models::V1::SubscriptionCreateResponse::Data]
|
|
15
|
+
|
|
16
|
+
# @see Stigg::Models::V1::SubscriptionCreateResponse#data
|
|
17
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
18
|
+
# @!attribute id
|
|
19
|
+
# Unique identifier for the provisioned subscription
|
|
20
|
+
#
|
|
21
|
+
# @return [String]
|
|
22
|
+
required :id, String
|
|
23
|
+
|
|
24
|
+
# @!attribute status
|
|
25
|
+
# Provision status: SUCCESS or PAYMENT_REQUIRED
|
|
26
|
+
#
|
|
27
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Status]
|
|
28
|
+
required :status, enum: -> { Stigg::Models::V1::SubscriptionCreateResponse::Data::Status }
|
|
29
|
+
|
|
30
|
+
# @!attribute checkout_billing_id
|
|
31
|
+
# Checkout billing ID when payment is required
|
|
32
|
+
#
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :checkout_billing_id, String, api_name: :checkoutBillingId, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!attribute checkout_url
|
|
37
|
+
# URL to complete payment when PAYMENT_REQUIRED
|
|
38
|
+
#
|
|
39
|
+
# @return [String, nil]
|
|
40
|
+
optional :checkout_url, String, api_name: :checkoutUrl, nil?: true
|
|
41
|
+
|
|
42
|
+
# @!attribute is_scheduled
|
|
43
|
+
# Whether the subscription is scheduled for future activation
|
|
44
|
+
#
|
|
45
|
+
# @return [Boolean, nil]
|
|
46
|
+
optional :is_scheduled, Stigg::Internal::Type::Boolean, api_name: :isScheduled
|
|
47
|
+
|
|
48
|
+
# @!attribute subscription
|
|
49
|
+
#
|
|
50
|
+
# @return [Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription, nil]
|
|
51
|
+
optional :subscription, -> { Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription }
|
|
52
|
+
|
|
53
|
+
# @!method initialize(id:, status:, checkout_billing_id: nil, checkout_url: nil, is_scheduled: nil, subscription: nil)
|
|
54
|
+
# @param id [String] Unique identifier for the provisioned subscription
|
|
55
|
+
#
|
|
56
|
+
# @param status [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Status] Provision status: SUCCESS or PAYMENT_REQUIRED
|
|
57
|
+
#
|
|
58
|
+
# @param checkout_billing_id [String, nil] Checkout billing ID when payment is required
|
|
59
|
+
#
|
|
60
|
+
# @param checkout_url [String, nil] URL to complete payment when PAYMENT_REQUIRED
|
|
61
|
+
#
|
|
62
|
+
# @param is_scheduled [Boolean] Whether the subscription is scheduled for future activation
|
|
63
|
+
#
|
|
64
|
+
# @param subscription [Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription]
|
|
65
|
+
|
|
66
|
+
# Provision status: SUCCESS or PAYMENT_REQUIRED
|
|
67
|
+
#
|
|
68
|
+
# @see Stigg::Models::V1::SubscriptionCreateResponse::Data#status
|
|
69
|
+
module Status
|
|
70
|
+
extend Stigg::Internal::Type::Enum
|
|
71
|
+
|
|
72
|
+
SUCCESS = :SUCCESS
|
|
73
|
+
PAYMENT_REQUIRED = :PAYMENT_REQUIRED
|
|
74
|
+
|
|
75
|
+
# @!method self.values
|
|
76
|
+
# @return [Array<Symbol>]
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# @see Stigg::Models::V1::SubscriptionCreateResponse::Data#subscription
|
|
80
|
+
class Subscription < Stigg::Internal::Type::BaseModel
|
|
81
|
+
# @!attribute id
|
|
82
|
+
# Subscription ID
|
|
83
|
+
#
|
|
84
|
+
# @return [String]
|
|
85
|
+
required :id, String
|
|
86
|
+
|
|
87
|
+
# @!attribute billing_id
|
|
88
|
+
# Billing ID
|
|
89
|
+
#
|
|
90
|
+
# @return [String, nil]
|
|
91
|
+
required :billing_id, String, api_name: :billingId, nil?: true
|
|
92
|
+
|
|
93
|
+
# @!attribute created_at
|
|
94
|
+
# Created at
|
|
95
|
+
#
|
|
96
|
+
# @return [Time]
|
|
97
|
+
required :created_at, Time, api_name: :createdAt
|
|
98
|
+
|
|
99
|
+
# @!attribute customer_id
|
|
100
|
+
# Customer ID
|
|
101
|
+
#
|
|
102
|
+
# @return [String]
|
|
103
|
+
required :customer_id, String, api_name: :customerId
|
|
104
|
+
|
|
105
|
+
# @!attribute payment_collection
|
|
106
|
+
# Payment collection
|
|
107
|
+
#
|
|
108
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::PaymentCollection]
|
|
109
|
+
required :payment_collection,
|
|
110
|
+
enum: -> { Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::PaymentCollection },
|
|
111
|
+
api_name: :paymentCollection
|
|
112
|
+
|
|
113
|
+
# @!attribute plan_id
|
|
114
|
+
# Plan ID
|
|
115
|
+
#
|
|
116
|
+
# @return [String]
|
|
117
|
+
required :plan_id, String, api_name: :planId
|
|
118
|
+
|
|
119
|
+
# @!attribute pricing_type
|
|
120
|
+
# Pricing type
|
|
121
|
+
#
|
|
122
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::PricingType]
|
|
123
|
+
required :pricing_type,
|
|
124
|
+
enum: -> { Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::PricingType },
|
|
125
|
+
api_name: :pricingType
|
|
126
|
+
|
|
127
|
+
# @!attribute start_date
|
|
128
|
+
# Subscription start date
|
|
129
|
+
#
|
|
130
|
+
# @return [Time]
|
|
131
|
+
required :start_date, Time, api_name: :startDate
|
|
132
|
+
|
|
133
|
+
# @!attribute status
|
|
134
|
+
# Subscription status
|
|
135
|
+
#
|
|
136
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::Status]
|
|
137
|
+
required :status, enum: -> { Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::Status }
|
|
138
|
+
|
|
139
|
+
# @!attribute cancellation_date
|
|
140
|
+
# Subscription cancellation date
|
|
141
|
+
#
|
|
142
|
+
# @return [Time, nil]
|
|
143
|
+
optional :cancellation_date, Time, api_name: :cancellationDate, nil?: true
|
|
144
|
+
|
|
145
|
+
# @!attribute cancel_reason
|
|
146
|
+
# Subscription cancel reason
|
|
147
|
+
#
|
|
148
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::CancelReason, nil]
|
|
149
|
+
optional :cancel_reason,
|
|
150
|
+
enum: -> { Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::CancelReason },
|
|
151
|
+
api_name: :cancelReason,
|
|
152
|
+
nil?: true
|
|
153
|
+
|
|
154
|
+
# @!attribute current_billing_period_end
|
|
155
|
+
# End of the current billing period
|
|
156
|
+
#
|
|
157
|
+
# @return [Time, nil]
|
|
158
|
+
optional :current_billing_period_end, Time, api_name: :currentBillingPeriodEnd, nil?: true
|
|
159
|
+
|
|
160
|
+
# @!attribute current_billing_period_start
|
|
161
|
+
# Start of the current billing period
|
|
162
|
+
#
|
|
163
|
+
# @return [Time, nil]
|
|
164
|
+
optional :current_billing_period_start, Time, api_name: :currentBillingPeriodStart, nil?: true
|
|
165
|
+
|
|
166
|
+
# @!attribute effective_end_date
|
|
167
|
+
# Subscription effective end date
|
|
168
|
+
#
|
|
169
|
+
# @return [Time, nil]
|
|
170
|
+
optional :effective_end_date, Time, api_name: :effectiveEndDate, nil?: true
|
|
171
|
+
|
|
172
|
+
# @!attribute end_date
|
|
173
|
+
# Subscription end date
|
|
174
|
+
#
|
|
175
|
+
# @return [Time, nil]
|
|
176
|
+
optional :end_date, Time, api_name: :endDate, nil?: true
|
|
177
|
+
|
|
178
|
+
# @!attribute metadata
|
|
179
|
+
# Additional metadata for the subscription
|
|
180
|
+
#
|
|
181
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
182
|
+
optional :metadata, Stigg::Internal::Type::HashOf[String]
|
|
183
|
+
|
|
184
|
+
# @!attribute paying_customer_id
|
|
185
|
+
# Paying customer ID for delegated billing
|
|
186
|
+
#
|
|
187
|
+
# @return [String, nil]
|
|
188
|
+
optional :paying_customer_id, String, api_name: :payingCustomerId, nil?: true
|
|
189
|
+
|
|
190
|
+
# @!attribute payment_collection_method
|
|
191
|
+
# The method used to collect payments for a subscription
|
|
192
|
+
#
|
|
193
|
+
# @return [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::PaymentCollectionMethod, nil]
|
|
194
|
+
optional :payment_collection_method,
|
|
195
|
+
enum: -> { Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::PaymentCollectionMethod },
|
|
196
|
+
api_name: :paymentCollectionMethod,
|
|
197
|
+
nil?: true
|
|
198
|
+
|
|
199
|
+
# @!attribute resource_id
|
|
200
|
+
# Resource ID
|
|
201
|
+
#
|
|
202
|
+
# @return [String, nil]
|
|
203
|
+
optional :resource_id, String, api_name: :resourceId, nil?: true
|
|
204
|
+
|
|
205
|
+
# @!attribute trial_end_date
|
|
206
|
+
# Subscription trial end date
|
|
207
|
+
#
|
|
208
|
+
# @return [Time, nil]
|
|
209
|
+
optional :trial_end_date, Time, api_name: :trialEndDate, nil?: true
|
|
210
|
+
|
|
211
|
+
# @!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)
|
|
212
|
+
# @param id [String] Subscription ID
|
|
213
|
+
#
|
|
214
|
+
# @param billing_id [String, nil] Billing ID
|
|
215
|
+
#
|
|
216
|
+
# @param created_at [Time] Created at
|
|
217
|
+
#
|
|
218
|
+
# @param customer_id [String] Customer ID
|
|
219
|
+
#
|
|
220
|
+
# @param payment_collection [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::PaymentCollection] Payment collection
|
|
221
|
+
#
|
|
222
|
+
# @param plan_id [String] Plan ID
|
|
223
|
+
#
|
|
224
|
+
# @param pricing_type [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::PricingType] Pricing type
|
|
225
|
+
#
|
|
226
|
+
# @param start_date [Time] Subscription start date
|
|
227
|
+
#
|
|
228
|
+
# @param status [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::Status] Subscription status
|
|
229
|
+
#
|
|
230
|
+
# @param cancellation_date [Time, nil] Subscription cancellation date
|
|
231
|
+
#
|
|
232
|
+
# @param cancel_reason [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::CancelReason, nil] Subscription cancel reason
|
|
233
|
+
#
|
|
234
|
+
# @param current_billing_period_end [Time, nil] End of the current billing period
|
|
235
|
+
#
|
|
236
|
+
# @param current_billing_period_start [Time, nil] Start of the current billing period
|
|
237
|
+
#
|
|
238
|
+
# @param effective_end_date [Time, nil] Subscription effective end date
|
|
239
|
+
#
|
|
240
|
+
# @param end_date [Time, nil] Subscription end date
|
|
241
|
+
#
|
|
242
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
|
|
243
|
+
#
|
|
244
|
+
# @param paying_customer_id [String, nil] Paying customer ID for delegated billing
|
|
245
|
+
#
|
|
246
|
+
# @param payment_collection_method [Symbol, Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription::PaymentCollectionMethod, nil] The method used to collect payments for a subscription
|
|
247
|
+
#
|
|
248
|
+
# @param resource_id [String, nil] Resource ID
|
|
249
|
+
#
|
|
250
|
+
# @param trial_end_date [Time, nil] Subscription trial end date
|
|
251
|
+
|
|
252
|
+
# Payment collection
|
|
253
|
+
#
|
|
254
|
+
# @see Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription#payment_collection
|
|
255
|
+
module PaymentCollection
|
|
256
|
+
extend Stigg::Internal::Type::Enum
|
|
257
|
+
|
|
258
|
+
NOT_REQUIRED = :NOT_REQUIRED
|
|
259
|
+
PROCESSING = :PROCESSING
|
|
260
|
+
FAILED = :FAILED
|
|
261
|
+
ACTION_REQUIRED = :ACTION_REQUIRED
|
|
262
|
+
|
|
263
|
+
# @!method self.values
|
|
264
|
+
# @return [Array<Symbol>]
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Pricing type
|
|
268
|
+
#
|
|
269
|
+
# @see Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription#pricing_type
|
|
270
|
+
module PricingType
|
|
271
|
+
extend Stigg::Internal::Type::Enum
|
|
272
|
+
|
|
273
|
+
FREE = :FREE
|
|
274
|
+
PAID = :PAID
|
|
275
|
+
CUSTOM = :CUSTOM
|
|
276
|
+
|
|
277
|
+
# @!method self.values
|
|
278
|
+
# @return [Array<Symbol>]
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Subscription status
|
|
282
|
+
#
|
|
283
|
+
# @see Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription#status
|
|
284
|
+
module Status
|
|
285
|
+
extend Stigg::Internal::Type::Enum
|
|
286
|
+
|
|
287
|
+
PAYMENT_PENDING = :PAYMENT_PENDING
|
|
288
|
+
ACTIVE = :ACTIVE
|
|
289
|
+
EXPIRED = :EXPIRED
|
|
290
|
+
IN_TRIAL = :IN_TRIAL
|
|
291
|
+
CANCELED = :CANCELED
|
|
292
|
+
NOT_STARTED = :NOT_STARTED
|
|
293
|
+
|
|
294
|
+
# @!method self.values
|
|
295
|
+
# @return [Array<Symbol>]
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Subscription cancel reason
|
|
299
|
+
#
|
|
300
|
+
# @see Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription#cancel_reason
|
|
301
|
+
module CancelReason
|
|
302
|
+
extend Stigg::Internal::Type::Enum
|
|
303
|
+
|
|
304
|
+
UPGRADE_OR_DOWNGRADE = :UPGRADE_OR_DOWNGRADE
|
|
305
|
+
CANCELLED_BY_BILLING = :CANCELLED_BY_BILLING
|
|
306
|
+
EXPIRED = :EXPIRED
|
|
307
|
+
DETACH_BILLING = :DETACH_BILLING
|
|
308
|
+
TRIAL_ENDED = :TRIAL_ENDED
|
|
309
|
+
IMMEDIATE = :Immediate
|
|
310
|
+
TRIAL_CONVERTED = :TRIAL_CONVERTED
|
|
311
|
+
PENDING_PAYMENT_EXPIRED = :PENDING_PAYMENT_EXPIRED
|
|
312
|
+
SCHEDULED_CANCELLATION = :ScheduledCancellation
|
|
313
|
+
CUSTOMER_ARCHIVED = :CustomerArchived
|
|
314
|
+
AUTO_CANCELLATION_RULE = :AutoCancellationRule
|
|
315
|
+
|
|
316
|
+
# @!method self.values
|
|
317
|
+
# @return [Array<Symbol>]
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# The method used to collect payments for a subscription
|
|
321
|
+
#
|
|
322
|
+
# @see Stigg::Models::V1::SubscriptionCreateResponse::Data::Subscription#payment_collection_method
|
|
323
|
+
module PaymentCollectionMethod
|
|
324
|
+
extend Stigg::Internal::Type::Enum
|
|
325
|
+
|
|
326
|
+
CHARGE = :CHARGE
|
|
327
|
+
INVOICE = :INVOICE
|
|
328
|
+
NONE = :NONE
|
|
329
|
+
|
|
330
|
+
# @!method self.values
|
|
331
|
+
# @return [Array<Symbol>]
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
end
|
|
338
|
+
end
|