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,431 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Subscriptions#preview
|
|
7
|
+
class SubscriptionPreviewResponse < Stigg::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
#
|
|
10
|
+
# @return [Stigg::Models::V1::SubscriptionPreviewResponse::Data]
|
|
11
|
+
required :data, -> { Stigg::Models::V1::SubscriptionPreviewResponse::Data }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(data:)
|
|
14
|
+
# @param data [Stigg::Models::V1::SubscriptionPreviewResponse::Data]
|
|
15
|
+
|
|
16
|
+
# @see Stigg::Models::V1::SubscriptionPreviewResponse#data
|
|
17
|
+
class Data < Stigg::Internal::Type::BaseModel
|
|
18
|
+
# @!attribute immediate_invoice
|
|
19
|
+
#
|
|
20
|
+
# @return [Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice]
|
|
21
|
+
required :immediate_invoice,
|
|
22
|
+
-> { Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice },
|
|
23
|
+
api_name: :immediateInvoice
|
|
24
|
+
|
|
25
|
+
# @!attribute billing_period_range
|
|
26
|
+
#
|
|
27
|
+
# @return [Stigg::Models::V1::SubscriptionPreviewResponse::Data::BillingPeriodRange, nil]
|
|
28
|
+
optional :billing_period_range,
|
|
29
|
+
-> { Stigg::Models::V1::SubscriptionPreviewResponse::Data::BillingPeriodRange },
|
|
30
|
+
api_name: :billingPeriodRange
|
|
31
|
+
|
|
32
|
+
# @!attribute free_items
|
|
33
|
+
#
|
|
34
|
+
# @return [Array<Stigg::Models::V1::SubscriptionPreviewResponse::Data::FreeItem>, nil]
|
|
35
|
+
optional :free_items,
|
|
36
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::SubscriptionPreviewResponse::Data::FreeItem] },
|
|
37
|
+
api_name: :freeItems
|
|
38
|
+
|
|
39
|
+
# @!attribute has_scheduled_updates
|
|
40
|
+
#
|
|
41
|
+
# @return [Boolean, nil]
|
|
42
|
+
optional :has_scheduled_updates, Stigg::Internal::Type::Boolean, api_name: :hasScheduledUpdates
|
|
43
|
+
|
|
44
|
+
# @!attribute is_plan_downgrade
|
|
45
|
+
#
|
|
46
|
+
# @return [Boolean, nil]
|
|
47
|
+
optional :is_plan_downgrade, Stigg::Internal::Type::Boolean, api_name: :isPlanDowngrade
|
|
48
|
+
|
|
49
|
+
# @!attribute recurring_invoice
|
|
50
|
+
#
|
|
51
|
+
# @return [Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice, nil]
|
|
52
|
+
optional :recurring_invoice,
|
|
53
|
+
-> { Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice },
|
|
54
|
+
api_name: :recurringInvoice
|
|
55
|
+
|
|
56
|
+
# @!method initialize(immediate_invoice:, billing_period_range: nil, free_items: nil, has_scheduled_updates: nil, is_plan_downgrade: nil, recurring_invoice: nil)
|
|
57
|
+
# @param immediate_invoice [Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice]
|
|
58
|
+
# @param billing_period_range [Stigg::Models::V1::SubscriptionPreviewResponse::Data::BillingPeriodRange]
|
|
59
|
+
# @param free_items [Array<Stigg::Models::V1::SubscriptionPreviewResponse::Data::FreeItem>]
|
|
60
|
+
# @param has_scheduled_updates [Boolean]
|
|
61
|
+
# @param is_plan_downgrade [Boolean]
|
|
62
|
+
# @param recurring_invoice [Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice]
|
|
63
|
+
|
|
64
|
+
# @see Stigg::Models::V1::SubscriptionPreviewResponse::Data#immediate_invoice
|
|
65
|
+
class ImmediateInvoice < Stigg::Internal::Type::BaseModel
|
|
66
|
+
# @!attribute sub_total
|
|
67
|
+
#
|
|
68
|
+
# @return [Float]
|
|
69
|
+
required :sub_total, Float, api_name: :subTotal
|
|
70
|
+
|
|
71
|
+
# @!attribute total
|
|
72
|
+
#
|
|
73
|
+
# @return [Float]
|
|
74
|
+
required :total, Float
|
|
75
|
+
|
|
76
|
+
# @!attribute billing_period_range
|
|
77
|
+
#
|
|
78
|
+
# @return [Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::BillingPeriodRange, nil]
|
|
79
|
+
optional :billing_period_range,
|
|
80
|
+
-> { Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::BillingPeriodRange },
|
|
81
|
+
api_name: :billingPeriodRange
|
|
82
|
+
|
|
83
|
+
# @!attribute currency
|
|
84
|
+
#
|
|
85
|
+
# @return [String, nil]
|
|
86
|
+
optional :currency, String, nil?: true
|
|
87
|
+
|
|
88
|
+
# @!attribute discount
|
|
89
|
+
#
|
|
90
|
+
# @return [Float, nil]
|
|
91
|
+
optional :discount, Float
|
|
92
|
+
|
|
93
|
+
# @!attribute discount_details
|
|
94
|
+
#
|
|
95
|
+
# @return [Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::DiscountDetails, nil]
|
|
96
|
+
optional :discount_details,
|
|
97
|
+
-> { Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::DiscountDetails },
|
|
98
|
+
api_name: :discountDetails
|
|
99
|
+
|
|
100
|
+
# @!attribute discounts
|
|
101
|
+
#
|
|
102
|
+
# @return [Array<Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Discount>, nil]
|
|
103
|
+
optional :discounts,
|
|
104
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Discount] }
|
|
105
|
+
|
|
106
|
+
# @!attribute lines
|
|
107
|
+
#
|
|
108
|
+
# @return [Array<Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Line>, nil]
|
|
109
|
+
optional :lines,
|
|
110
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Line] }
|
|
111
|
+
|
|
112
|
+
# @!attribute tax
|
|
113
|
+
#
|
|
114
|
+
# @return [Float, nil]
|
|
115
|
+
optional :tax, Float
|
|
116
|
+
|
|
117
|
+
# @!method initialize(sub_total:, total:, billing_period_range: nil, currency: nil, discount: nil, discount_details: nil, discounts: nil, lines: nil, tax: nil)
|
|
118
|
+
# @param sub_total [Float]
|
|
119
|
+
# @param total [Float]
|
|
120
|
+
# @param billing_period_range [Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::BillingPeriodRange]
|
|
121
|
+
# @param currency [String, nil]
|
|
122
|
+
# @param discount [Float]
|
|
123
|
+
# @param discount_details [Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::DiscountDetails]
|
|
124
|
+
# @param discounts [Array<Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Discount>]
|
|
125
|
+
# @param lines [Array<Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice::Line>]
|
|
126
|
+
# @param tax [Float]
|
|
127
|
+
|
|
128
|
+
# @see Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice#billing_period_range
|
|
129
|
+
class BillingPeriodRange < Stigg::Internal::Type::BaseModel
|
|
130
|
+
# @!attribute end_
|
|
131
|
+
# Billing period end date
|
|
132
|
+
#
|
|
133
|
+
# @return [Time]
|
|
134
|
+
required :end_, Time, api_name: :end
|
|
135
|
+
|
|
136
|
+
# @!attribute start
|
|
137
|
+
# Billing period start date
|
|
138
|
+
#
|
|
139
|
+
# @return [Time]
|
|
140
|
+
required :start, Time
|
|
141
|
+
|
|
142
|
+
# @!method initialize(end_:, start:)
|
|
143
|
+
# @param end_ [Time] Billing period end date
|
|
144
|
+
#
|
|
145
|
+
# @param start [Time] Billing period start date
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# @see Stigg::Models::V1::SubscriptionPreviewResponse::Data::ImmediateInvoice#discount_details
|
|
149
|
+
class DiscountDetails < Stigg::Internal::Type::BaseModel
|
|
150
|
+
# @!attribute code
|
|
151
|
+
#
|
|
152
|
+
# @return [String, nil]
|
|
153
|
+
optional :code, String
|
|
154
|
+
|
|
155
|
+
# @!attribute fixed_amount
|
|
156
|
+
#
|
|
157
|
+
# @return [Float, nil]
|
|
158
|
+
optional :fixed_amount, Float, api_name: :fixedAmount
|
|
159
|
+
|
|
160
|
+
# @!attribute percentage
|
|
161
|
+
#
|
|
162
|
+
# @return [Float, nil]
|
|
163
|
+
optional :percentage, Float
|
|
164
|
+
|
|
165
|
+
# @!method initialize(code: nil, fixed_amount: nil, percentage: nil)
|
|
166
|
+
# @param code [String]
|
|
167
|
+
# @param fixed_amount [Float]
|
|
168
|
+
# @param percentage [Float]
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
class Discount < Stigg::Internal::Type::BaseModel
|
|
172
|
+
# @!attribute amount
|
|
173
|
+
#
|
|
174
|
+
# @return [Float]
|
|
175
|
+
required :amount, Float
|
|
176
|
+
|
|
177
|
+
# @!attribute currency
|
|
178
|
+
#
|
|
179
|
+
# @return [String]
|
|
180
|
+
required :currency, String
|
|
181
|
+
|
|
182
|
+
# @!attribute description
|
|
183
|
+
#
|
|
184
|
+
# @return [String]
|
|
185
|
+
required :description, String
|
|
186
|
+
|
|
187
|
+
# @!method initialize(amount:, currency:, description:)
|
|
188
|
+
# @param amount [Float]
|
|
189
|
+
# @param currency [String]
|
|
190
|
+
# @param description [String]
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
class Line < Stigg::Internal::Type::BaseModel
|
|
194
|
+
# @!attribute currency
|
|
195
|
+
#
|
|
196
|
+
# @return [String]
|
|
197
|
+
required :currency, String
|
|
198
|
+
|
|
199
|
+
# @!attribute description
|
|
200
|
+
#
|
|
201
|
+
# @return [String]
|
|
202
|
+
required :description, String
|
|
203
|
+
|
|
204
|
+
# @!attribute sub_total
|
|
205
|
+
#
|
|
206
|
+
# @return [Float]
|
|
207
|
+
required :sub_total, Float, api_name: :subTotal
|
|
208
|
+
|
|
209
|
+
# @!attribute unit_price
|
|
210
|
+
#
|
|
211
|
+
# @return [Float]
|
|
212
|
+
required :unit_price, Float, api_name: :unitPrice
|
|
213
|
+
|
|
214
|
+
# @!attribute quantity
|
|
215
|
+
#
|
|
216
|
+
# @return [Float, nil]
|
|
217
|
+
optional :quantity, Float
|
|
218
|
+
|
|
219
|
+
# @!method initialize(currency:, description:, sub_total:, unit_price:, quantity: nil)
|
|
220
|
+
# @param currency [String]
|
|
221
|
+
# @param description [String]
|
|
222
|
+
# @param sub_total [Float]
|
|
223
|
+
# @param unit_price [Float]
|
|
224
|
+
# @param quantity [Float]
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# @see Stigg::Models::V1::SubscriptionPreviewResponse::Data#billing_period_range
|
|
229
|
+
class BillingPeriodRange < Stigg::Internal::Type::BaseModel
|
|
230
|
+
# @!attribute end_
|
|
231
|
+
# Billing period end date
|
|
232
|
+
#
|
|
233
|
+
# @return [Time, nil]
|
|
234
|
+
optional :end_, Time, api_name: :end
|
|
235
|
+
|
|
236
|
+
# @!attribute start
|
|
237
|
+
# Billing period start date
|
|
238
|
+
#
|
|
239
|
+
# @return [Time, nil]
|
|
240
|
+
optional :start, Time
|
|
241
|
+
|
|
242
|
+
# @!method initialize(end_: nil, start: nil)
|
|
243
|
+
# @param end_ [Time] Billing period end date
|
|
244
|
+
#
|
|
245
|
+
# @param start [Time] Billing period start date
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
class FreeItem < Stigg::Internal::Type::BaseModel
|
|
249
|
+
# @!attribute addon_id
|
|
250
|
+
#
|
|
251
|
+
# @return [String]
|
|
252
|
+
required :addon_id, String, api_name: :addonId
|
|
253
|
+
|
|
254
|
+
# @!attribute quantity
|
|
255
|
+
#
|
|
256
|
+
# @return [Float]
|
|
257
|
+
required :quantity, Float
|
|
258
|
+
|
|
259
|
+
# @!method initialize(addon_id:, quantity:)
|
|
260
|
+
# @param addon_id [String]
|
|
261
|
+
# @param quantity [Float]
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# @see Stigg::Models::V1::SubscriptionPreviewResponse::Data#recurring_invoice
|
|
265
|
+
class RecurringInvoice < Stigg::Internal::Type::BaseModel
|
|
266
|
+
# @!attribute sub_total
|
|
267
|
+
#
|
|
268
|
+
# @return [Float]
|
|
269
|
+
required :sub_total, Float, api_name: :subTotal
|
|
270
|
+
|
|
271
|
+
# @!attribute total
|
|
272
|
+
#
|
|
273
|
+
# @return [Float]
|
|
274
|
+
required :total, Float
|
|
275
|
+
|
|
276
|
+
# @!attribute billing_period_range
|
|
277
|
+
#
|
|
278
|
+
# @return [Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::BillingPeriodRange, nil]
|
|
279
|
+
optional :billing_period_range,
|
|
280
|
+
-> { Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::BillingPeriodRange },
|
|
281
|
+
api_name: :billingPeriodRange
|
|
282
|
+
|
|
283
|
+
# @!attribute currency
|
|
284
|
+
#
|
|
285
|
+
# @return [String, nil]
|
|
286
|
+
optional :currency, String, nil?: true
|
|
287
|
+
|
|
288
|
+
# @!attribute discount
|
|
289
|
+
#
|
|
290
|
+
# @return [Float, nil]
|
|
291
|
+
optional :discount, Float
|
|
292
|
+
|
|
293
|
+
# @!attribute discount_details
|
|
294
|
+
#
|
|
295
|
+
# @return [Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::DiscountDetails, nil]
|
|
296
|
+
optional :discount_details,
|
|
297
|
+
-> { Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::DiscountDetails },
|
|
298
|
+
api_name: :discountDetails
|
|
299
|
+
|
|
300
|
+
# @!attribute discounts
|
|
301
|
+
#
|
|
302
|
+
# @return [Array<Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Discount>, nil]
|
|
303
|
+
optional :discounts,
|
|
304
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Discount] }
|
|
305
|
+
|
|
306
|
+
# @!attribute lines
|
|
307
|
+
#
|
|
308
|
+
# @return [Array<Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Line>, nil]
|
|
309
|
+
optional :lines,
|
|
310
|
+
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Line] }
|
|
311
|
+
|
|
312
|
+
# @!attribute tax
|
|
313
|
+
#
|
|
314
|
+
# @return [Float, nil]
|
|
315
|
+
optional :tax, Float
|
|
316
|
+
|
|
317
|
+
# @!method initialize(sub_total:, total:, billing_period_range: nil, currency: nil, discount: nil, discount_details: nil, discounts: nil, lines: nil, tax: nil)
|
|
318
|
+
# @param sub_total [Float]
|
|
319
|
+
# @param total [Float]
|
|
320
|
+
# @param billing_period_range [Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::BillingPeriodRange]
|
|
321
|
+
# @param currency [String, nil]
|
|
322
|
+
# @param discount [Float]
|
|
323
|
+
# @param discount_details [Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::DiscountDetails]
|
|
324
|
+
# @param discounts [Array<Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Discount>]
|
|
325
|
+
# @param lines [Array<Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice::Line>]
|
|
326
|
+
# @param tax [Float]
|
|
327
|
+
|
|
328
|
+
# @see Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice#billing_period_range
|
|
329
|
+
class BillingPeriodRange < Stigg::Internal::Type::BaseModel
|
|
330
|
+
# @!attribute end_
|
|
331
|
+
# Billing period end date
|
|
332
|
+
#
|
|
333
|
+
# @return [Time]
|
|
334
|
+
required :end_, Time, api_name: :end
|
|
335
|
+
|
|
336
|
+
# @!attribute start
|
|
337
|
+
# Billing period start date
|
|
338
|
+
#
|
|
339
|
+
# @return [Time]
|
|
340
|
+
required :start, Time
|
|
341
|
+
|
|
342
|
+
# @!method initialize(end_:, start:)
|
|
343
|
+
# @param end_ [Time] Billing period end date
|
|
344
|
+
#
|
|
345
|
+
# @param start [Time] Billing period start date
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# @see Stigg::Models::V1::SubscriptionPreviewResponse::Data::RecurringInvoice#discount_details
|
|
349
|
+
class DiscountDetails < Stigg::Internal::Type::BaseModel
|
|
350
|
+
# @!attribute code
|
|
351
|
+
#
|
|
352
|
+
# @return [String, nil]
|
|
353
|
+
optional :code, String
|
|
354
|
+
|
|
355
|
+
# @!attribute fixed_amount
|
|
356
|
+
#
|
|
357
|
+
# @return [Float, nil]
|
|
358
|
+
optional :fixed_amount, Float, api_name: :fixedAmount
|
|
359
|
+
|
|
360
|
+
# @!attribute percentage
|
|
361
|
+
#
|
|
362
|
+
# @return [Float, nil]
|
|
363
|
+
optional :percentage, Float
|
|
364
|
+
|
|
365
|
+
# @!method initialize(code: nil, fixed_amount: nil, percentage: nil)
|
|
366
|
+
# @param code [String]
|
|
367
|
+
# @param fixed_amount [Float]
|
|
368
|
+
# @param percentage [Float]
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
class Discount < Stigg::Internal::Type::BaseModel
|
|
372
|
+
# @!attribute amount
|
|
373
|
+
#
|
|
374
|
+
# @return [Float]
|
|
375
|
+
required :amount, Float
|
|
376
|
+
|
|
377
|
+
# @!attribute currency
|
|
378
|
+
#
|
|
379
|
+
# @return [String]
|
|
380
|
+
required :currency, String
|
|
381
|
+
|
|
382
|
+
# @!attribute description
|
|
383
|
+
#
|
|
384
|
+
# @return [String]
|
|
385
|
+
required :description, String
|
|
386
|
+
|
|
387
|
+
# @!method initialize(amount:, currency:, description:)
|
|
388
|
+
# @param amount [Float]
|
|
389
|
+
# @param currency [String]
|
|
390
|
+
# @param description [String]
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
class Line < Stigg::Internal::Type::BaseModel
|
|
394
|
+
# @!attribute currency
|
|
395
|
+
#
|
|
396
|
+
# @return [String]
|
|
397
|
+
required :currency, String
|
|
398
|
+
|
|
399
|
+
# @!attribute description
|
|
400
|
+
#
|
|
401
|
+
# @return [String]
|
|
402
|
+
required :description, String
|
|
403
|
+
|
|
404
|
+
# @!attribute sub_total
|
|
405
|
+
#
|
|
406
|
+
# @return [Float]
|
|
407
|
+
required :sub_total, Float, api_name: :subTotal
|
|
408
|
+
|
|
409
|
+
# @!attribute unit_price
|
|
410
|
+
#
|
|
411
|
+
# @return [Float]
|
|
412
|
+
required :unit_price, Float, api_name: :unitPrice
|
|
413
|
+
|
|
414
|
+
# @!attribute quantity
|
|
415
|
+
#
|
|
416
|
+
# @return [Float, nil]
|
|
417
|
+
optional :quantity, Float
|
|
418
|
+
|
|
419
|
+
# @!method initialize(currency:, description:, sub_total:, unit_price:, quantity: nil)
|
|
420
|
+
# @param currency [String]
|
|
421
|
+
# @param description [String]
|
|
422
|
+
# @param sub_total [Float]
|
|
423
|
+
# @param unit_price [Float]
|
|
424
|
+
# @param quantity [Float]
|
|
425
|
+
end
|
|
426
|
+
end
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
end
|
|
431
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Stigg
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see Stigg::Resources::V1::Subscriptions#retrieve
|
|
7
|
+
class SubscriptionRetrieveParams < Stigg::Internal::Type::BaseModel
|
|
8
|
+
extend Stigg::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Stigg::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!method initialize(request_options: {})
|
|
12
|
+
# @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|