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,466 @@
|
|
|
1
|
+
module Stigg
|
|
2
|
+
module Models
|
|
3
|
+
module V1
|
|
4
|
+
type subscription_preview_response =
|
|
5
|
+
{ data: Stigg::Models::V1::SubscriptionPreviewResponse::Data }
|
|
6
|
+
|
|
7
|
+
class SubscriptionPreviewResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
+
attr_accessor data: Stigg::Models::V1::SubscriptionPreviewResponse::Data
|
|
9
|
+
|
|
10
|
+
def initialize: (
|
|
11
|
+
data: Stigg::Models::V1::SubscriptionPreviewResponse::Data
|
|
12
|
+
) -> void
|
|
13
|
+
|
|
14
|
+
def to_hash: -> {
|
|
15
|
+
data: Stigg::Models::V1::SubscriptionPreviewResponse::Data
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type data =
|
|
19
|
+
{
|
|
20
|
+
immediate_invoice: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice,
|
|
21
|
+
billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::BillingPeriodRange,
|
|
22
|
+
free_items: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::FreeItem],
|
|
23
|
+
has_scheduled_updates: bool,
|
|
24
|
+
is_plan_downgrade: bool,
|
|
25
|
+
recurring_invoice: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
29
|
+
attr_accessor immediate_invoice: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice
|
|
30
|
+
|
|
31
|
+
attr_reader billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::BillingPeriodRange?
|
|
32
|
+
|
|
33
|
+
def billing_period_range=: (
|
|
34
|
+
Stigg::Models::V1::SubscriptionPreviewResponse::Data::BillingPeriodRange
|
|
35
|
+
) -> Stigg::Models::V1::SubscriptionPreviewResponse::Data::BillingPeriodRange
|
|
36
|
+
|
|
37
|
+
attr_reader free_items: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::FreeItem]?
|
|
38
|
+
|
|
39
|
+
def free_items=: (
|
|
40
|
+
::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::FreeItem]
|
|
41
|
+
) -> ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::FreeItem]
|
|
42
|
+
|
|
43
|
+
attr_reader has_scheduled_updates: bool?
|
|
44
|
+
|
|
45
|
+
def has_scheduled_updates=: (bool) -> bool
|
|
46
|
+
|
|
47
|
+
attr_reader is_plan_downgrade: bool?
|
|
48
|
+
|
|
49
|
+
def is_plan_downgrade=: (bool) -> bool
|
|
50
|
+
|
|
51
|
+
attr_reader recurring_invoice: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice?
|
|
52
|
+
|
|
53
|
+
def recurring_invoice=: (
|
|
54
|
+
Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice
|
|
55
|
+
) -> Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice
|
|
56
|
+
|
|
57
|
+
def initialize: (
|
|
58
|
+
immediate_invoice: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice,
|
|
59
|
+
?billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::BillingPeriodRange,
|
|
60
|
+
?free_items: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::FreeItem],
|
|
61
|
+
?has_scheduled_updates: bool,
|
|
62
|
+
?is_plan_downgrade: bool,
|
|
63
|
+
?recurring_invoice: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice
|
|
64
|
+
) -> void
|
|
65
|
+
|
|
66
|
+
def to_hash: -> {
|
|
67
|
+
immediate_invoice: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice,
|
|
68
|
+
billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::BillingPeriodRange,
|
|
69
|
+
free_items: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::FreeItem],
|
|
70
|
+
has_scheduled_updates: bool,
|
|
71
|
+
is_plan_downgrade: bool,
|
|
72
|
+
recurring_invoice: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type immediate_invoice =
|
|
76
|
+
{
|
|
77
|
+
sub_total: Float,
|
|
78
|
+
total: Float,
|
|
79
|
+
billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::BillingPeriodRange,
|
|
80
|
+
currency: String?,
|
|
81
|
+
discount: Float,
|
|
82
|
+
discount_details: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::DiscountDetails,
|
|
83
|
+
discounts: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Discount],
|
|
84
|
+
lines: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Line],
|
|
85
|
+
tax: Float
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
class ImmediateInvoice < Stigg::Internal::Type::BaseModel
|
|
89
|
+
attr_accessor sub_total: Float
|
|
90
|
+
|
|
91
|
+
attr_accessor total: Float
|
|
92
|
+
|
|
93
|
+
attr_reader billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::BillingPeriodRange?
|
|
94
|
+
|
|
95
|
+
def billing_period_range=: (
|
|
96
|
+
Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::BillingPeriodRange
|
|
97
|
+
) -> Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::BillingPeriodRange
|
|
98
|
+
|
|
99
|
+
attr_accessor currency: String?
|
|
100
|
+
|
|
101
|
+
attr_reader discount: Float?
|
|
102
|
+
|
|
103
|
+
def discount=: (Float) -> Float
|
|
104
|
+
|
|
105
|
+
attr_reader discount_details: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::DiscountDetails?
|
|
106
|
+
|
|
107
|
+
def discount_details=: (
|
|
108
|
+
Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::DiscountDetails
|
|
109
|
+
) -> Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::DiscountDetails
|
|
110
|
+
|
|
111
|
+
attr_reader discounts: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Discount]?
|
|
112
|
+
|
|
113
|
+
def discounts=: (
|
|
114
|
+
::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Discount]
|
|
115
|
+
) -> ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Discount]
|
|
116
|
+
|
|
117
|
+
attr_reader lines: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Line]?
|
|
118
|
+
|
|
119
|
+
def lines=: (
|
|
120
|
+
::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Line]
|
|
121
|
+
) -> ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Line]
|
|
122
|
+
|
|
123
|
+
attr_reader tax: Float?
|
|
124
|
+
|
|
125
|
+
def tax=: (Float) -> Float
|
|
126
|
+
|
|
127
|
+
def initialize: (
|
|
128
|
+
sub_total: Float,
|
|
129
|
+
total: Float,
|
|
130
|
+
?billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::BillingPeriodRange,
|
|
131
|
+
?currency: String?,
|
|
132
|
+
?discount: Float,
|
|
133
|
+
?discount_details: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::DiscountDetails,
|
|
134
|
+
?discounts: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Discount],
|
|
135
|
+
?lines: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Line],
|
|
136
|
+
?tax: Float
|
|
137
|
+
) -> void
|
|
138
|
+
|
|
139
|
+
def to_hash: -> {
|
|
140
|
+
sub_total: Float,
|
|
141
|
+
total: Float,
|
|
142
|
+
billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::BillingPeriodRange,
|
|
143
|
+
currency: String?,
|
|
144
|
+
discount: Float,
|
|
145
|
+
discount_details: Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::DiscountDetails,
|
|
146
|
+
discounts: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Discount],
|
|
147
|
+
lines: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Line],
|
|
148
|
+
tax: Float
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
type billing_period_range = { end_: Time, start: Time }
|
|
152
|
+
|
|
153
|
+
class BillingPeriodRange < Stigg::Internal::Type::BaseModel
|
|
154
|
+
attr_accessor end_: Time
|
|
155
|
+
|
|
156
|
+
attr_accessor start: Time
|
|
157
|
+
|
|
158
|
+
def initialize: (end_: Time, start: Time) -> void
|
|
159
|
+
|
|
160
|
+
def to_hash: -> { end_: Time, start: Time }
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
type discount_details =
|
|
164
|
+
{ code: String, fixed_amount: Float, percentage: Float }
|
|
165
|
+
|
|
166
|
+
class DiscountDetails < Stigg::Internal::Type::BaseModel
|
|
167
|
+
attr_reader code: String?
|
|
168
|
+
|
|
169
|
+
def code=: (String) -> String
|
|
170
|
+
|
|
171
|
+
attr_reader fixed_amount: Float?
|
|
172
|
+
|
|
173
|
+
def fixed_amount=: (Float) -> Float
|
|
174
|
+
|
|
175
|
+
attr_reader percentage: Float?
|
|
176
|
+
|
|
177
|
+
def percentage=: (Float) -> Float
|
|
178
|
+
|
|
179
|
+
def initialize: (
|
|
180
|
+
?code: String,
|
|
181
|
+
?fixed_amount: Float,
|
|
182
|
+
?percentage: Float
|
|
183
|
+
) -> void
|
|
184
|
+
|
|
185
|
+
def to_hash: -> {
|
|
186
|
+
code: String,
|
|
187
|
+
fixed_amount: Float,
|
|
188
|
+
percentage: Float
|
|
189
|
+
}
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
type discount =
|
|
193
|
+
{ amount: Float, currency: String, description: String }
|
|
194
|
+
|
|
195
|
+
class Discount < Stigg::Internal::Type::BaseModel
|
|
196
|
+
attr_accessor amount: Float
|
|
197
|
+
|
|
198
|
+
attr_accessor currency: String
|
|
199
|
+
|
|
200
|
+
attr_accessor description: String
|
|
201
|
+
|
|
202
|
+
def initialize: (
|
|
203
|
+
amount: Float,
|
|
204
|
+
currency: String,
|
|
205
|
+
description: String
|
|
206
|
+
) -> void
|
|
207
|
+
|
|
208
|
+
def to_hash: -> {
|
|
209
|
+
amount: Float,
|
|
210
|
+
currency: String,
|
|
211
|
+
description: String
|
|
212
|
+
}
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
type line =
|
|
216
|
+
{
|
|
217
|
+
currency: String,
|
|
218
|
+
description: String,
|
|
219
|
+
sub_total: Float,
|
|
220
|
+
unit_price: Float,
|
|
221
|
+
quantity: Float
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
class Line < Stigg::Internal::Type::BaseModel
|
|
225
|
+
attr_accessor currency: String
|
|
226
|
+
|
|
227
|
+
attr_accessor description: String
|
|
228
|
+
|
|
229
|
+
attr_accessor sub_total: Float
|
|
230
|
+
|
|
231
|
+
attr_accessor unit_price: Float
|
|
232
|
+
|
|
233
|
+
attr_reader quantity: Float?
|
|
234
|
+
|
|
235
|
+
def quantity=: (Float) -> Float
|
|
236
|
+
|
|
237
|
+
def initialize: (
|
|
238
|
+
currency: String,
|
|
239
|
+
description: String,
|
|
240
|
+
sub_total: Float,
|
|
241
|
+
unit_price: Float,
|
|
242
|
+
?quantity: Float
|
|
243
|
+
) -> void
|
|
244
|
+
|
|
245
|
+
def to_hash: -> {
|
|
246
|
+
currency: String,
|
|
247
|
+
description: String,
|
|
248
|
+
sub_total: Float,
|
|
249
|
+
unit_price: Float,
|
|
250
|
+
quantity: Float
|
|
251
|
+
}
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
type billing_period_range = { end_: Time, start: Time }
|
|
256
|
+
|
|
257
|
+
class BillingPeriodRange < Stigg::Internal::Type::BaseModel
|
|
258
|
+
attr_reader end_: Time?
|
|
259
|
+
|
|
260
|
+
def end_=: (Time) -> Time
|
|
261
|
+
|
|
262
|
+
attr_reader start: Time?
|
|
263
|
+
|
|
264
|
+
def start=: (Time) -> Time
|
|
265
|
+
|
|
266
|
+
def initialize: (?end_: Time, ?start: Time) -> void
|
|
267
|
+
|
|
268
|
+
def to_hash: -> { end_: Time, start: Time }
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
type free_item = { addon_id: String, quantity: Float }
|
|
272
|
+
|
|
273
|
+
class FreeItem < Stigg::Internal::Type::BaseModel
|
|
274
|
+
attr_accessor addon_id: String
|
|
275
|
+
|
|
276
|
+
attr_accessor quantity: Float
|
|
277
|
+
|
|
278
|
+
def initialize: (addon_id: String, quantity: Float) -> void
|
|
279
|
+
|
|
280
|
+
def to_hash: -> { addon_id: String, quantity: Float }
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
type recurring_invoice =
|
|
284
|
+
{
|
|
285
|
+
sub_total: Float,
|
|
286
|
+
total: Float,
|
|
287
|
+
billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::BillingPeriodRange,
|
|
288
|
+
currency: String?,
|
|
289
|
+
discount: Float,
|
|
290
|
+
discount_details: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::DiscountDetails,
|
|
291
|
+
discounts: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Discount],
|
|
292
|
+
lines: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Line],
|
|
293
|
+
tax: Float
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
class RecurringInvoice < Stigg::Internal::Type::BaseModel
|
|
297
|
+
attr_accessor sub_total: Float
|
|
298
|
+
|
|
299
|
+
attr_accessor total: Float
|
|
300
|
+
|
|
301
|
+
attr_reader billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::BillingPeriodRange?
|
|
302
|
+
|
|
303
|
+
def billing_period_range=: (
|
|
304
|
+
Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::BillingPeriodRange
|
|
305
|
+
) -> Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::BillingPeriodRange
|
|
306
|
+
|
|
307
|
+
attr_accessor currency: String?
|
|
308
|
+
|
|
309
|
+
attr_reader discount: Float?
|
|
310
|
+
|
|
311
|
+
def discount=: (Float) -> Float
|
|
312
|
+
|
|
313
|
+
attr_reader discount_details: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::DiscountDetails?
|
|
314
|
+
|
|
315
|
+
def discount_details=: (
|
|
316
|
+
Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::DiscountDetails
|
|
317
|
+
) -> Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::DiscountDetails
|
|
318
|
+
|
|
319
|
+
attr_reader discounts: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Discount]?
|
|
320
|
+
|
|
321
|
+
def discounts=: (
|
|
322
|
+
::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Discount]
|
|
323
|
+
) -> ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Discount]
|
|
324
|
+
|
|
325
|
+
attr_reader lines: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Line]?
|
|
326
|
+
|
|
327
|
+
def lines=: (
|
|
328
|
+
::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Line]
|
|
329
|
+
) -> ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Line]
|
|
330
|
+
|
|
331
|
+
attr_reader tax: Float?
|
|
332
|
+
|
|
333
|
+
def tax=: (Float) -> Float
|
|
334
|
+
|
|
335
|
+
def initialize: (
|
|
336
|
+
sub_total: Float,
|
|
337
|
+
total: Float,
|
|
338
|
+
?billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::BillingPeriodRange,
|
|
339
|
+
?currency: String?,
|
|
340
|
+
?discount: Float,
|
|
341
|
+
?discount_details: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::DiscountDetails,
|
|
342
|
+
?discounts: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Discount],
|
|
343
|
+
?lines: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Line],
|
|
344
|
+
?tax: Float
|
|
345
|
+
) -> void
|
|
346
|
+
|
|
347
|
+
def to_hash: -> {
|
|
348
|
+
sub_total: Float,
|
|
349
|
+
total: Float,
|
|
350
|
+
billing_period_range: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::BillingPeriodRange,
|
|
351
|
+
currency: String?,
|
|
352
|
+
discount: Float,
|
|
353
|
+
discount_details: Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::DiscountDetails,
|
|
354
|
+
discounts: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Discount],
|
|
355
|
+
lines: ::Array[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Line],
|
|
356
|
+
tax: Float
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
type billing_period_range = { end_: Time, start: Time }
|
|
360
|
+
|
|
361
|
+
class BillingPeriodRange < Stigg::Internal::Type::BaseModel
|
|
362
|
+
attr_accessor end_: Time
|
|
363
|
+
|
|
364
|
+
attr_accessor start: Time
|
|
365
|
+
|
|
366
|
+
def initialize: (end_: Time, start: Time) -> void
|
|
367
|
+
|
|
368
|
+
def to_hash: -> { end_: Time, start: Time }
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
type discount_details =
|
|
372
|
+
{ code: String, fixed_amount: Float, percentage: Float }
|
|
373
|
+
|
|
374
|
+
class DiscountDetails < Stigg::Internal::Type::BaseModel
|
|
375
|
+
attr_reader code: String?
|
|
376
|
+
|
|
377
|
+
def code=: (String) -> String
|
|
378
|
+
|
|
379
|
+
attr_reader fixed_amount: Float?
|
|
380
|
+
|
|
381
|
+
def fixed_amount=: (Float) -> Float
|
|
382
|
+
|
|
383
|
+
attr_reader percentage: Float?
|
|
384
|
+
|
|
385
|
+
def percentage=: (Float) -> Float
|
|
386
|
+
|
|
387
|
+
def initialize: (
|
|
388
|
+
?code: String,
|
|
389
|
+
?fixed_amount: Float,
|
|
390
|
+
?percentage: Float
|
|
391
|
+
) -> void
|
|
392
|
+
|
|
393
|
+
def to_hash: -> {
|
|
394
|
+
code: String,
|
|
395
|
+
fixed_amount: Float,
|
|
396
|
+
percentage: Float
|
|
397
|
+
}
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
type discount =
|
|
401
|
+
{ amount: Float, currency: String, description: String }
|
|
402
|
+
|
|
403
|
+
class Discount < Stigg::Internal::Type::BaseModel
|
|
404
|
+
attr_accessor amount: Float
|
|
405
|
+
|
|
406
|
+
attr_accessor currency: String
|
|
407
|
+
|
|
408
|
+
attr_accessor description: String
|
|
409
|
+
|
|
410
|
+
def initialize: (
|
|
411
|
+
amount: Float,
|
|
412
|
+
currency: String,
|
|
413
|
+
description: String
|
|
414
|
+
) -> void
|
|
415
|
+
|
|
416
|
+
def to_hash: -> {
|
|
417
|
+
amount: Float,
|
|
418
|
+
currency: String,
|
|
419
|
+
description: String
|
|
420
|
+
}
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
type line =
|
|
424
|
+
{
|
|
425
|
+
currency: String,
|
|
426
|
+
description: String,
|
|
427
|
+
sub_total: Float,
|
|
428
|
+
unit_price: Float,
|
|
429
|
+
quantity: Float
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
class Line < Stigg::Internal::Type::BaseModel
|
|
433
|
+
attr_accessor currency: String
|
|
434
|
+
|
|
435
|
+
attr_accessor description: String
|
|
436
|
+
|
|
437
|
+
attr_accessor sub_total: Float
|
|
438
|
+
|
|
439
|
+
attr_accessor unit_price: Float
|
|
440
|
+
|
|
441
|
+
attr_reader quantity: Float?
|
|
442
|
+
|
|
443
|
+
def quantity=: (Float) -> Float
|
|
444
|
+
|
|
445
|
+
def initialize: (
|
|
446
|
+
currency: String,
|
|
447
|
+
description: String,
|
|
448
|
+
sub_total: Float,
|
|
449
|
+
unit_price: Float,
|
|
450
|
+
?quantity: Float
|
|
451
|
+
) -> void
|
|
452
|
+
|
|
453
|
+
def to_hash: -> {
|
|
454
|
+
currency: String,
|
|
455
|
+
description: String,
|
|
456
|
+
sub_total: Float,
|
|
457
|
+
unit_price: Float,
|
|
458
|
+
quantity: Float
|
|
459
|
+
}
|
|
460
|
+
end
|
|
461
|
+
end
|
|
462
|
+
end
|
|
463
|
+
end
|
|
464
|
+
end
|
|
465
|
+
end
|
|
466
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Stigg
|
|
2
|
+
module Models
|
|
3
|
+
module V1
|
|
4
|
+
type subscription_retrieve_params =
|
|
5
|
+
{ } & Stigg::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class SubscriptionRetrieveParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
def initialize: (?request_options: Stigg::request_opts) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> { request_options: Stigg::RequestOptions }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
module Stigg
|
|
2
|
+
module Models
|
|
3
|
+
module V1
|
|
4
|
+
type subscription_retrieve_response =
|
|
5
|
+
{ data: Stigg::Models::V1::SubscriptionRetrieveResponse::Data }
|
|
6
|
+
|
|
7
|
+
class SubscriptionRetrieveResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
+
attr_accessor data: Stigg::Models::V1::SubscriptionRetrieveResponse::Data
|
|
9
|
+
|
|
10
|
+
def initialize: (
|
|
11
|
+
data: Stigg::Models::V1::SubscriptionRetrieveResponse::Data
|
|
12
|
+
) -> void
|
|
13
|
+
|
|
14
|
+
def to_hash: -> {
|
|
15
|
+
data: Stigg::Models::V1::SubscriptionRetrieveResponse::Data
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type data =
|
|
19
|
+
{
|
|
20
|
+
id: String,
|
|
21
|
+
billing_id: String?,
|
|
22
|
+
created_at: Time,
|
|
23
|
+
customer_id: String,
|
|
24
|
+
payment_collection: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::payment_collection,
|
|
25
|
+
plan_id: String,
|
|
26
|
+
pricing_type: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::pricing_type,
|
|
27
|
+
start_date: Time,
|
|
28
|
+
status: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::status,
|
|
29
|
+
cancellation_date: Time?,
|
|
30
|
+
cancel_reason: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::cancel_reason?,
|
|
31
|
+
current_billing_period_end: Time?,
|
|
32
|
+
current_billing_period_start: Time?,
|
|
33
|
+
effective_end_date: Time?,
|
|
34
|
+
end_date: Time?,
|
|
35
|
+
metadata: ::Hash[Symbol, String],
|
|
36
|
+
paying_customer_id: String?,
|
|
37
|
+
payment_collection_method: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::payment_collection_method?,
|
|
38
|
+
resource_id: String?,
|
|
39
|
+
trial_end_date: Time?
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
43
|
+
attr_accessor id: String
|
|
44
|
+
|
|
45
|
+
attr_accessor billing_id: String?
|
|
46
|
+
|
|
47
|
+
attr_accessor created_at: Time
|
|
48
|
+
|
|
49
|
+
attr_accessor customer_id: String
|
|
50
|
+
|
|
51
|
+
attr_accessor payment_collection: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::payment_collection
|
|
52
|
+
|
|
53
|
+
attr_accessor plan_id: String
|
|
54
|
+
|
|
55
|
+
attr_accessor pricing_type: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::pricing_type
|
|
56
|
+
|
|
57
|
+
attr_accessor start_date: Time
|
|
58
|
+
|
|
59
|
+
attr_accessor status: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::status
|
|
60
|
+
|
|
61
|
+
attr_accessor cancellation_date: Time?
|
|
62
|
+
|
|
63
|
+
attr_accessor cancel_reason: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::cancel_reason?
|
|
64
|
+
|
|
65
|
+
attr_accessor current_billing_period_end: Time?
|
|
66
|
+
|
|
67
|
+
attr_accessor current_billing_period_start: Time?
|
|
68
|
+
|
|
69
|
+
attr_accessor effective_end_date: Time?
|
|
70
|
+
|
|
71
|
+
attr_accessor end_date: Time?
|
|
72
|
+
|
|
73
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
74
|
+
|
|
75
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
76
|
+
|
|
77
|
+
attr_accessor paying_customer_id: String?
|
|
78
|
+
|
|
79
|
+
attr_accessor payment_collection_method: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::payment_collection_method?
|
|
80
|
+
|
|
81
|
+
attr_accessor resource_id: String?
|
|
82
|
+
|
|
83
|
+
attr_accessor trial_end_date: Time?
|
|
84
|
+
|
|
85
|
+
def initialize: (
|
|
86
|
+
id: String,
|
|
87
|
+
billing_id: String?,
|
|
88
|
+
created_at: Time,
|
|
89
|
+
customer_id: String,
|
|
90
|
+
payment_collection: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::payment_collection,
|
|
91
|
+
plan_id: String,
|
|
92
|
+
pricing_type: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::pricing_type,
|
|
93
|
+
start_date: Time,
|
|
94
|
+
status: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::status,
|
|
95
|
+
?cancellation_date: Time?,
|
|
96
|
+
?cancel_reason: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::cancel_reason?,
|
|
97
|
+
?current_billing_period_end: Time?,
|
|
98
|
+
?current_billing_period_start: Time?,
|
|
99
|
+
?effective_end_date: Time?,
|
|
100
|
+
?end_date: Time?,
|
|
101
|
+
?metadata: ::Hash[Symbol, String],
|
|
102
|
+
?paying_customer_id: String?,
|
|
103
|
+
?payment_collection_method: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::payment_collection_method?,
|
|
104
|
+
?resource_id: String?,
|
|
105
|
+
?trial_end_date: Time?
|
|
106
|
+
) -> void
|
|
107
|
+
|
|
108
|
+
def to_hash: -> {
|
|
109
|
+
id: String,
|
|
110
|
+
billing_id: String?,
|
|
111
|
+
created_at: Time,
|
|
112
|
+
customer_id: String,
|
|
113
|
+
payment_collection: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::payment_collection,
|
|
114
|
+
plan_id: String,
|
|
115
|
+
pricing_type: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::pricing_type,
|
|
116
|
+
start_date: Time,
|
|
117
|
+
status: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::status,
|
|
118
|
+
cancellation_date: Time?,
|
|
119
|
+
cancel_reason: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::cancel_reason?,
|
|
120
|
+
current_billing_period_end: Time?,
|
|
121
|
+
current_billing_period_start: Time?,
|
|
122
|
+
effective_end_date: Time?,
|
|
123
|
+
end_date: Time?,
|
|
124
|
+
metadata: ::Hash[Symbol, String],
|
|
125
|
+
paying_customer_id: String?,
|
|
126
|
+
payment_collection_method: Stigg::Models::V1::SubscriptionRetrieveResponse::Data::payment_collection_method?,
|
|
127
|
+
resource_id: String?,
|
|
128
|
+
trial_end_date: Time?
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
type payment_collection =
|
|
132
|
+
:NOT_REQUIRED | :PROCESSING | :FAILED | :ACTION_REQUIRED
|
|
133
|
+
|
|
134
|
+
module PaymentCollection
|
|
135
|
+
extend Stigg::Internal::Type::Enum
|
|
136
|
+
|
|
137
|
+
NOT_REQUIRED: :NOT_REQUIRED
|
|
138
|
+
PROCESSING: :PROCESSING
|
|
139
|
+
FAILED: :FAILED
|
|
140
|
+
ACTION_REQUIRED: :ACTION_REQUIRED
|
|
141
|
+
|
|
142
|
+
def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionRetrieveResponse::Data::payment_collection]
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
type pricing_type = :FREE | :PAID | :CUSTOM
|
|
146
|
+
|
|
147
|
+
module PricingType
|
|
148
|
+
extend Stigg::Internal::Type::Enum
|
|
149
|
+
|
|
150
|
+
FREE: :FREE
|
|
151
|
+
PAID: :PAID
|
|
152
|
+
CUSTOM: :CUSTOM
|
|
153
|
+
|
|
154
|
+
def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionRetrieveResponse::Data::pricing_type]
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
type status =
|
|
158
|
+
:PAYMENT_PENDING
|
|
159
|
+
| :ACTIVE
|
|
160
|
+
| :EXPIRED
|
|
161
|
+
| :IN_TRIAL
|
|
162
|
+
| :CANCELED
|
|
163
|
+
| :NOT_STARTED
|
|
164
|
+
|
|
165
|
+
module Status
|
|
166
|
+
extend Stigg::Internal::Type::Enum
|
|
167
|
+
|
|
168
|
+
PAYMENT_PENDING: :PAYMENT_PENDING
|
|
169
|
+
ACTIVE: :ACTIVE
|
|
170
|
+
EXPIRED: :EXPIRED
|
|
171
|
+
IN_TRIAL: :IN_TRIAL
|
|
172
|
+
CANCELED: :CANCELED
|
|
173
|
+
NOT_STARTED: :NOT_STARTED
|
|
174
|
+
|
|
175
|
+
def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionRetrieveResponse::Data::status]
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
type cancel_reason =
|
|
179
|
+
:UPGRADE_OR_DOWNGRADE
|
|
180
|
+
| :CANCELLED_BY_BILLING
|
|
181
|
+
| :EXPIRED
|
|
182
|
+
| :DETACH_BILLING
|
|
183
|
+
| :TRIAL_ENDED
|
|
184
|
+
| :Immediate
|
|
185
|
+
| :TRIAL_CONVERTED
|
|
186
|
+
| :PENDING_PAYMENT_EXPIRED
|
|
187
|
+
| :ScheduledCancellation
|
|
188
|
+
| :CustomerArchived
|
|
189
|
+
| :AutoCancellationRule
|
|
190
|
+
|
|
191
|
+
module CancelReason
|
|
192
|
+
extend Stigg::Internal::Type::Enum
|
|
193
|
+
|
|
194
|
+
UPGRADE_OR_DOWNGRADE: :UPGRADE_OR_DOWNGRADE
|
|
195
|
+
CANCELLED_BY_BILLING: :CANCELLED_BY_BILLING
|
|
196
|
+
EXPIRED: :EXPIRED
|
|
197
|
+
DETACH_BILLING: :DETACH_BILLING
|
|
198
|
+
TRIAL_ENDED: :TRIAL_ENDED
|
|
199
|
+
IMMEDIATE: :Immediate
|
|
200
|
+
TRIAL_CONVERTED: :TRIAL_CONVERTED
|
|
201
|
+
PENDING_PAYMENT_EXPIRED: :PENDING_PAYMENT_EXPIRED
|
|
202
|
+
SCHEDULED_CANCELLATION: :ScheduledCancellation
|
|
203
|
+
CUSTOMER_ARCHIVED: :CustomerArchived
|
|
204
|
+
AUTO_CANCELLATION_RULE: :AutoCancellationRule
|
|
205
|
+
|
|
206
|
+
def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionRetrieveResponse::Data::cancel_reason]
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
type payment_collection_method = :CHARGE | :INVOICE | :NONE
|
|
210
|
+
|
|
211
|
+
module PaymentCollectionMethod
|
|
212
|
+
extend Stigg::Internal::Type::Enum
|
|
213
|
+
|
|
214
|
+
CHARGE: :CHARGE
|
|
215
|
+
INVOICE: :INVOICE
|
|
216
|
+
NONE: :NONE
|
|
217
|
+
|
|
218
|
+
def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionRetrieveResponse::Data::payment_collection_method]
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
end
|