stigg 0.1.0.pre.alpha.1 → 0.1.0.pre.alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +29 -1
  4. data/lib/stigg/internal/my_cursor_id_page.rb +32 -4
  5. data/lib/stigg/internal/type/base_model.rb +2 -2
  6. data/lib/stigg/models/v1/{coupon_create_response.rb → coupon.rb} +31 -26
  7. data/lib/stigg/models/v1/coupon_create_params.rb +2 -0
  8. data/lib/stigg/models/v1/coupon_list_params.rb +14 -14
  9. data/lib/stigg/models/v1/coupon_list_response.rb +262 -278
  10. data/lib/stigg/models/v1/customer_import_params.rb +75 -0
  11. data/lib/stigg/models/v1/customer_import_response.rb +35 -0
  12. data/lib/stigg/models/v1/customer_list_params.rb +14 -14
  13. data/lib/stigg/models/v1/customer_list_response.rb +160 -174
  14. data/lib/stigg/models/v1/{customer_create_params.rb → customer_provision_params.rb} +18 -16
  15. data/lib/stigg/models/v1/customer_response.rb +9 -2
  16. data/lib/stigg/models/v1/customer_update_params.rb +2 -0
  17. data/lib/stigg/models/v1/customers/payment_method_attach_params.rb +3 -1
  18. data/lib/stigg/models/v1/customers/{promotional_create_params.rb → promotional_entitlement_grant_params.rb} +46 -44
  19. data/lib/stigg/models/v1/customers/{promotional_create_response.rb → promotional_entitlement_grant_response.rb} +105 -32
  20. data/lib/stigg/models/v1/customers/{promotional_revoke_params.rb → promotional_entitlement_revoke_params.rb} +2 -2
  21. data/lib/stigg/models/v1/customers/{promotional_revoke_response.rb → promotional_entitlement_revoke_response.rb} +107 -33
  22. data/lib/stigg/models/v1/event_report_params.rb +91 -0
  23. data/lib/stigg/models/v1/event_report_response.rb +25 -0
  24. data/lib/stigg/models/v1/{subscription_retrieve_response.rb → subscription.rb} +67 -26
  25. data/lib/stigg/models/v1/subscription_cancel_params.rb +75 -0
  26. data/lib/stigg/models/v1/subscription_delegate_params.rb +7 -2
  27. data/lib/stigg/models/v1/subscription_import_params.rb +92 -0
  28. data/lib/stigg/models/v1/subscription_import_response.rb +32 -0
  29. data/lib/stigg/models/v1/subscription_list_params.rb +20 -24
  30. data/lib/stigg/models/v1/subscription_list_response.rb +255 -236
  31. data/lib/stigg/models/v1/subscription_migrate_params.rb +3 -3
  32. data/lib/stigg/models/v1/subscription_preview_params.rb +139 -46
  33. data/lib/stigg/models/v1/subscription_preview_response.rb +164 -49
  34. data/lib/stigg/models/v1/subscription_provision_params.rb +1693 -0
  35. data/lib/stigg/models/v1/subscription_provision_response.rb +1038 -0
  36. data/lib/stigg/models/v1/subscription_transfer_params.rb +2 -6
  37. data/lib/stigg/models/v1/subscription_update_params.rb +1114 -0
  38. data/lib/stigg/models/v1/subscriptions/{future_update_cancel_pending_payment_response.rb → cancel_subscription.rb} +9 -5
  39. data/lib/stigg/models/v1/usage_history_params.rb +54 -0
  40. data/lib/stigg/models/v1/usage_history_response.rb +155 -0
  41. data/lib/stigg/models/v1/usage_report_params.rb +114 -0
  42. data/lib/stigg/models/v1/usage_report_response.rb +120 -0
  43. data/lib/stigg/models.rb +0 -4
  44. data/lib/stigg/resources/v1/coupons.rb +16 -14
  45. data/lib/stigg/resources/v1/customers/payment_method.rb +6 -5
  46. data/lib/stigg/resources/v1/customers/{promotional.rb → promotional_entitlements.rb} +17 -17
  47. data/lib/stigg/resources/v1/customers.rb +78 -56
  48. data/lib/stigg/resources/v1/events.rb +38 -0
  49. data/lib/stigg/resources/v1/subscriptions/future_update.rb +10 -8
  50. data/lib/stigg/resources/v1/subscriptions.rb +206 -79
  51. data/lib/stigg/resources/v1/usage.rb +79 -0
  52. data/lib/stigg/resources/v1.rb +6 -42
  53. data/lib/stigg/version.rb +1 -1
  54. data/lib/stigg.rb +25 -23
  55. data/rbi/stigg/internal/my_cursor_id_page.rbi +27 -0
  56. data/rbi/stigg/models/v1/coupon.rbi +891 -0
  57. data/rbi/stigg/models/v1/coupon_create_params.rbi +1 -0
  58. data/rbi/stigg/models/v1/coupon_list_params.rbi +21 -21
  59. data/rbi/stigg/models/v1/coupon_list_response.rbi +812 -869
  60. data/rbi/stigg/models/v1/customer_import_params.rbi +130 -0
  61. data/rbi/stigg/models/v1/customer_import_response.rbi +76 -0
  62. data/rbi/stigg/models/v1/customer_list_params.rbi +21 -21
  63. data/rbi/stigg/models/v1/customer_list_response.rbi +307 -347
  64. data/rbi/stigg/models/v1/{customer_create_params.rbi → customer_provision_params.rbi} +36 -35
  65. data/rbi/stigg/models/v1/customer_response.rbi +8 -1
  66. data/rbi/stigg/models/v1/customer_update_params.rbi +1 -0
  67. data/rbi/stigg/models/v1/customers/payment_method_attach_params.rbi +3 -0
  68. data/rbi/stigg/models/v1/customers/{promotional_create_params.rbi → promotional_entitlement_grant_params.rbi} +78 -77
  69. data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_response.rbi +690 -0
  70. data/rbi/stigg/models/v1/customers/{promotional_revoke_params.rbi → promotional_entitlement_revoke_params.rbi} +2 -2
  71. data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbi +696 -0
  72. data/rbi/stigg/models/v1/event_report_params.rbi +168 -0
  73. data/rbi/stigg/models/v1/event_report_response.rbi +35 -0
  74. data/rbi/stigg/models/v1/{subscription_migrate_response.rbi → subscription.rbi} +130 -98
  75. data/rbi/stigg/models/v1/subscription_cancel_params.rbi +182 -0
  76. data/rbi/stigg/models/v1/subscription_delegate_params.rbi +6 -2
  77. data/rbi/stigg/models/v1/subscription_import_params.rbi +148 -0
  78. data/rbi/stigg/models/v1/subscription_import_response.rbi +69 -0
  79. data/rbi/stigg/models/v1/subscription_list_params.rbi +26 -28
  80. data/rbi/stigg/models/v1/subscription_list_response.rbi +460 -435
  81. data/rbi/stigg/models/v1/subscription_migrate_params.rbi +3 -3
  82. data/rbi/stigg/models/v1/subscription_preview_params.rbi +112 -14
  83. data/rbi/stigg/models/v1/subscription_preview_response.rbi +139 -6
  84. data/rbi/stigg/models/v1/subscription_provision_params.rbi +5306 -0
  85. data/rbi/stigg/models/v1/subscription_provision_response.rbi +3175 -0
  86. data/rbi/stigg/models/v1/subscription_transfer_params.rbi +2 -4
  87. data/rbi/stigg/models/v1/subscription_update_params.rbi +3578 -0
  88. data/rbi/stigg/models/v1/subscriptions/{future_update_cancel_schedule_response.rbi → cancel_subscription.rbi} +10 -16
  89. data/rbi/stigg/models/v1/usage_history_params.rbi +79 -0
  90. data/rbi/stigg/models/v1/usage_history_response.rbi +347 -0
  91. data/rbi/stigg/models/v1/usage_report_params.rbi +227 -0
  92. data/rbi/stigg/models/v1/usage_report_response.rbi +162 -0
  93. data/rbi/stigg/models.rbi +0 -4
  94. data/rbi/stigg/resources/v1/coupons.rbi +22 -14
  95. data/rbi/stigg/resources/v1/customers/payment_method.rbi +9 -3
  96. data/rbi/stigg/resources/v1/customers/{promotional.rbi → promotional_entitlements.rbi} +13 -9
  97. data/rbi/stigg/resources/v1/customers.rbi +84 -53
  98. data/rbi/stigg/resources/v1/events.rbi +28 -0
  99. data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +14 -10
  100. data/rbi/stigg/resources/v1/subscriptions.rbi +242 -58
  101. data/rbi/stigg/resources/v1/usage.rbi +57 -0
  102. data/rbi/stigg/resources/v1.rbi +4 -26
  103. data/sig/stigg/internal/my_cursor_id_page.rbs +17 -0
  104. data/sig/stigg/models/v1/{coupon_create_response.rbs → coupon.rbs} +29 -32
  105. data/sig/stigg/models/v1/coupon_list_params.rbs +11 -11
  106. data/sig/stigg/models/v1/coupon_list_response.rbs +331 -351
  107. data/sig/stigg/models/v1/customer_import_params.rbs +74 -0
  108. data/sig/stigg/models/v1/customer_import_response.rbs +30 -0
  109. data/sig/stigg/models/v1/customer_list_params.rbs +11 -11
  110. data/sig/stigg/models/v1/customer_list_response.rbs +133 -153
  111. data/sig/stigg/models/v1/{customer_create_params.rbs → customer_provision_params.rbs} +22 -22
  112. data/sig/stigg/models/v1/customers/{promotional_create_params.rbs → promotional_entitlement_grant_params.rbs} +43 -43
  113. data/sig/stigg/models/v1/customers/promotional_entitlement_grant_response.rbs +281 -0
  114. data/sig/stigg/models/v1/customers/{promotional_revoke_params.rbs → promotional_entitlement_revoke_params.rbs} +2 -2
  115. data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbs +281 -0
  116. data/sig/stigg/models/v1/event_report_params.rbs +82 -0
  117. data/sig/stigg/models/v1/event_report_response.rbs +15 -0
  118. data/sig/stigg/models/v1/{subscription_retrieve_response.rbs → subscription.rbs} +61 -35
  119. data/sig/stigg/models/v1/subscription_cancel_params.rbs +79 -0
  120. data/sig/stigg/models/v1/subscription_import_params.rbs +84 -0
  121. data/sig/stigg/models/v1/subscription_import_response.rbs +30 -0
  122. data/sig/stigg/models/v1/subscription_list_params.rbs +14 -14
  123. data/sig/stigg/models/v1/subscription_list_response.rbs +196 -189
  124. data/sig/stigg/models/v1/subscription_preview_params.rbs +2 -6
  125. data/sig/stigg/models/v1/subscription_provision_params.rbs +2223 -0
  126. data/sig/stigg/models/v1/subscription_provision_response.rbs +1305 -0
  127. data/sig/stigg/models/v1/subscription_update_params.rbs +1544 -0
  128. data/sig/stigg/models/v1/subscriptions/cancel_subscription.rbs +34 -0
  129. data/sig/stigg/models/v1/usage_history_params.rbs +52 -0
  130. data/sig/stigg/models/v1/usage_history_response.rbs +129 -0
  131. data/sig/stigg/models/v1/usage_report_params.rbs +102 -0
  132. data/sig/stigg/models/v1/usage_report_response.rbs +87 -0
  133. data/sig/stigg/models.rbs +0 -4
  134. data/sig/stigg/resources/v1/coupons.rbs +5 -5
  135. data/sig/stigg/resources/v1/customers/{promotional.rbs → promotional_entitlements.rbs} +5 -5
  136. data/sig/stigg/resources/v1/customers.rbs +20 -17
  137. data/sig/stigg/resources/v1/events.rbs +14 -0
  138. data/sig/stigg/resources/v1/subscriptions/future_update.rbs +2 -2
  139. data/sig/stigg/resources/v1/subscriptions.rbs +68 -20
  140. data/sig/stigg/resources/v1/usage.rbs +24 -0
  141. data/sig/stigg/resources/v1.rbs +2 -8
  142. metadata +77 -71
  143. data/lib/stigg/models/v1/coupon_retrieve_response.rb +0 -317
  144. data/lib/stigg/models/v1/customers/usage_retrieve_params.rb +0 -56
  145. data/lib/stigg/models/v1/customers/usage_retrieve_response.rb +0 -145
  146. data/lib/stigg/models/v1/subscription_create_params.rb +0 -214
  147. data/lib/stigg/models/v1/subscription_create_response.rb +0 -338
  148. data/lib/stigg/models/v1/subscription_delegate_response.rb +0 -274
  149. data/lib/stigg/models/v1/subscription_migrate_response.rb +0 -274
  150. data/lib/stigg/models/v1/subscription_transfer_response.rb +0 -274
  151. data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +0 -32
  152. data/lib/stigg/models/v1_create_event_params.rb +0 -87
  153. data/lib/stigg/models/v1_create_event_response.rb +0 -16
  154. data/lib/stigg/models/v1_create_usage_params.rb +0 -96
  155. data/lib/stigg/models/v1_create_usage_response.rb +0 -112
  156. data/lib/stigg/resources/v1/customers/usage.rb +0 -59
  157. data/rbi/stigg/models/v1/coupon_create_response.rbi +0 -986
  158. data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +0 -986
  159. data/rbi/stigg/models/v1/customers/promotional_create_response.rbi +0 -495
  160. data/rbi/stigg/models/v1/customers/promotional_revoke_response.rbi +0 -497
  161. data/rbi/stigg/models/v1/customers/usage_retrieve_params.rbi +0 -84
  162. data/rbi/stigg/models/v1/customers/usage_retrieve_response.rbi +0 -353
  163. data/rbi/stigg/models/v1/subscription_create_params.rbi +0 -394
  164. data/rbi/stigg/models/v1/subscription_create_response.rbi +0 -668
  165. data/rbi/stigg/models/v1/subscription_delegate_response.rbi +0 -535
  166. data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +0 -535
  167. data/rbi/stigg/models/v1/subscription_transfer_response.rbi +0 -535
  168. data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +0 -79
  169. data/rbi/stigg/models/v1_create_event_params.rbi +0 -160
  170. data/rbi/stigg/models/v1_create_event_response.rbi +0 -23
  171. data/rbi/stigg/models/v1_create_usage_params.rbi +0 -177
  172. data/rbi/stigg/models/v1_create_usage_response.rbi +0 -150
  173. data/rbi/stigg/resources/v1/customers/usage.rbi +0 -45
  174. data/sig/stigg/models/v1/coupon_retrieve_response.rbs +0 -394
  175. data/sig/stigg/models/v1/customers/promotional_create_response.rbs +0 -209
  176. data/sig/stigg/models/v1/customers/promotional_revoke_response.rbs +0 -209
  177. data/sig/stigg/models/v1/customers/usage_retrieve_params.rbs +0 -54
  178. data/sig/stigg/models/v1/customers/usage_retrieve_response.rbs +0 -134
  179. data/sig/stigg/models/v1/subscription_create_params.rbs +0 -199
  180. data/sig/stigg/models/v1/subscription_create_response.rbs +0 -283
  181. data/sig/stigg/models/v1/subscription_delegate_response.rbs +0 -224
  182. data/sig/stigg/models/v1/subscription_migrate_response.rbs +0 -224
  183. data/sig/stigg/models/v1/subscription_transfer_response.rbs +0 -224
  184. data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbs +0 -34
  185. data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbs +0 -34
  186. data/sig/stigg/models/v1_create_event_params.rbs +0 -80
  187. data/sig/stigg/models/v1_create_event_response.rbs +0 -13
  188. data/sig/stigg/models/v1_create_usage_params.rbs +0 -90
  189. data/sig/stigg/models/v1_create_usage_response.rbs +0 -85
  190. data/sig/stigg/resources/v1/customers/usage.rbs +0 -21
@@ -0,0 +1,1693 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Subscriptions#provision
7
+ class SubscriptionProvisionParams < 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
28
+
29
+ # @!attribute addons
30
+ #
31
+ # @return [Array<Stigg::Models::V1::SubscriptionProvisionParams::Addon>, nil]
32
+ optional :addons, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::SubscriptionProvisionParams::Addon] }
33
+
34
+ # @!attribute applied_coupon
35
+ # Coupon configuration
36
+ #
37
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon, nil]
38
+ optional :applied_coupon,
39
+ -> { Stigg::V1::SubscriptionProvisionParams::AppliedCoupon },
40
+ api_name: :appliedCoupon
41
+
42
+ # @!attribute await_payment_confirmation
43
+ # Whether to wait for payment confirmation before returning the subscription
44
+ #
45
+ # @return [Boolean, nil]
46
+ optional :await_payment_confirmation,
47
+ Stigg::Internal::Type::Boolean,
48
+ api_name: :awaitPaymentConfirmation
49
+
50
+ # @!attribute billing_country_code
51
+ # The ISO 3166-1 alpha-2 country code for billing
52
+ #
53
+ # @return [String, nil]
54
+ optional :billing_country_code, String, api_name: :billingCountryCode, nil?: true
55
+
56
+ # @!attribute billing_id
57
+ # External billing system identifier
58
+ #
59
+ # @return [String, nil]
60
+ optional :billing_id, String, api_name: :billingId, nil?: true
61
+
62
+ # @!attribute billing_information
63
+ #
64
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation, nil]
65
+ optional :billing_information,
66
+ -> { Stigg::V1::SubscriptionProvisionParams::BillingInformation },
67
+ api_name: :billingInformation
68
+
69
+ # @!attribute billing_period
70
+ # Billing period (MONTHLY or ANNUALLY)
71
+ #
72
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::BillingPeriod, nil]
73
+ optional :billing_period,
74
+ enum: -> { Stigg::V1::SubscriptionProvisionParams::BillingPeriod },
75
+ api_name: :billingPeriod
76
+
77
+ # @!attribute budget
78
+ #
79
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::Budget, nil]
80
+ optional :budget, -> { Stigg::V1::SubscriptionProvisionParams::Budget }, nil?: true
81
+
82
+ # @!attribute charges
83
+ #
84
+ # @return [Array<Stigg::Models::V1::SubscriptionProvisionParams::Charge>, nil]
85
+ optional :charges, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::SubscriptionProvisionParams::Charge] }
86
+
87
+ # @!attribute checkout_options
88
+ # Checkout page configuration for payment collection
89
+ #
90
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::CheckoutOptions, nil]
91
+ optional :checkout_options,
92
+ -> { Stigg::V1::SubscriptionProvisionParams::CheckoutOptions },
93
+ api_name: :checkoutOptions
94
+
95
+ # @!attribute metadata
96
+ # Additional metadata for the subscription
97
+ #
98
+ # @return [Hash{Symbol=>String}, nil]
99
+ optional :metadata, Stigg::Internal::Type::HashOf[String]
100
+
101
+ # @!attribute minimum_spend
102
+ #
103
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::MinimumSpend, nil]
104
+ optional :minimum_spend,
105
+ -> { Stigg::V1::SubscriptionProvisionParams::MinimumSpend },
106
+ api_name: :minimumSpend,
107
+ nil?: true
108
+
109
+ # @!attribute paying_customer_id
110
+ # Optional paying customer ID for split billing scenarios
111
+ #
112
+ # @return [String, nil]
113
+ optional :paying_customer_id, String, api_name: :payingCustomerId, nil?: true
114
+
115
+ # @!attribute payment_collection_method
116
+ # How payments should be collected for this subscription
117
+ #
118
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::PaymentCollectionMethod, nil]
119
+ optional :payment_collection_method,
120
+ enum: -> { Stigg::V1::SubscriptionProvisionParams::PaymentCollectionMethod },
121
+ api_name: :paymentCollectionMethod
122
+
123
+ # @!attribute price_overrides
124
+ #
125
+ # @return [Array<Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride>, nil]
126
+ optional :price_overrides,
127
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::SubscriptionProvisionParams::PriceOverride] },
128
+ api_name: :priceOverrides
129
+
130
+ # @!attribute resource_id
131
+ # Optional resource ID for multi-instance subscriptions
132
+ #
133
+ # @return [String, nil]
134
+ optional :resource_id, String, api_name: :resourceId, nil?: true
135
+
136
+ # @!attribute salesforce_id
137
+ # Salesforce ID
138
+ #
139
+ # @return [String, nil]
140
+ optional :salesforce_id, String, api_name: :salesforceId, nil?: true
141
+
142
+ # @!attribute schedule_strategy
143
+ # Strategy for scheduling subscription changes
144
+ #
145
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::ScheduleStrategy, nil]
146
+ optional :schedule_strategy,
147
+ enum: -> { Stigg::V1::SubscriptionProvisionParams::ScheduleStrategy },
148
+ api_name: :scheduleStrategy
149
+
150
+ # @!attribute start_date
151
+ # Subscription start date
152
+ #
153
+ # @return [Time, nil]
154
+ optional :start_date, Time, api_name: :startDate
155
+
156
+ # @!attribute subscription_entitlements
157
+ #
158
+ # @return [Array<Stigg::Models::V1::SubscriptionProvisionParams::SubscriptionEntitlement>, nil]
159
+ optional :subscription_entitlements,
160
+ -> {
161
+ Stigg::Internal::Type::ArrayOf[Stigg::V1::SubscriptionProvisionParams::SubscriptionEntitlement]
162
+ },
163
+ api_name: :subscriptionEntitlements
164
+
165
+ # @!attribute trial_override_configuration
166
+ # Trial period override settings
167
+ #
168
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::TrialOverrideConfiguration, nil]
169
+ optional :trial_override_configuration,
170
+ -> { Stigg::V1::SubscriptionProvisionParams::TrialOverrideConfiguration },
171
+ api_name: :trialOverrideConfiguration
172
+
173
+ # @!attribute unit_quantity
174
+ #
175
+ # @return [Float, nil]
176
+ optional :unit_quantity, Float, api_name: :unitQuantity
177
+
178
+ # @!method initialize(customer_id:, plan_id:, id: nil, addons: nil, applied_coupon: nil, await_payment_confirmation: nil, billing_country_code: nil, billing_id: nil, billing_information: nil, billing_period: nil, budget: nil, charges: nil, checkout_options: nil, metadata: nil, minimum_spend: nil, paying_customer_id: nil, payment_collection_method: nil, price_overrides: nil, resource_id: nil, salesforce_id: nil, schedule_strategy: nil, start_date: nil, subscription_entitlements: nil, trial_override_configuration: nil, unit_quantity: nil, request_options: {})
179
+ # @param customer_id [String] Customer ID to provision the subscription for
180
+ #
181
+ # @param plan_id [String] Plan ID to provision
182
+ #
183
+ # @param id [String] Unique identifier for the subscription
184
+ #
185
+ # @param addons [Array<Stigg::Models::V1::SubscriptionProvisionParams::Addon>]
186
+ #
187
+ # @param applied_coupon [Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon] Coupon configuration
188
+ #
189
+ # @param await_payment_confirmation [Boolean] Whether to wait for payment confirmation before returning the subscription
190
+ #
191
+ # @param billing_country_code [String, nil] The ISO 3166-1 alpha-2 country code for billing
192
+ #
193
+ # @param billing_id [String, nil] External billing system identifier
194
+ #
195
+ # @param billing_information [Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation]
196
+ #
197
+ # @param billing_period [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::BillingPeriod] Billing period (MONTHLY or ANNUALLY)
198
+ #
199
+ # @param budget [Stigg::Models::V1::SubscriptionProvisionParams::Budget, nil]
200
+ #
201
+ # @param charges [Array<Stigg::Models::V1::SubscriptionProvisionParams::Charge>]
202
+ #
203
+ # @param checkout_options [Stigg::Models::V1::SubscriptionProvisionParams::CheckoutOptions] Checkout page configuration for payment collection
204
+ #
205
+ # @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
206
+ #
207
+ # @param minimum_spend [Stigg::Models::V1::SubscriptionProvisionParams::MinimumSpend, nil]
208
+ #
209
+ # @param paying_customer_id [String, nil] Optional paying customer ID for split billing scenarios
210
+ #
211
+ # @param payment_collection_method [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::PaymentCollectionMethod] How payments should be collected for this subscription
212
+ #
213
+ # @param price_overrides [Array<Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride>]
214
+ #
215
+ # @param resource_id [String, nil] Optional resource ID for multi-instance subscriptions
216
+ #
217
+ # @param salesforce_id [String, nil] Salesforce ID
218
+ #
219
+ # @param schedule_strategy [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::ScheduleStrategy] Strategy for scheduling subscription changes
220
+ #
221
+ # @param start_date [Time] Subscription start date
222
+ #
223
+ # @param subscription_entitlements [Array<Stigg::Models::V1::SubscriptionProvisionParams::SubscriptionEntitlement>]
224
+ #
225
+ # @param trial_override_configuration [Stigg::Models::V1::SubscriptionProvisionParams::TrialOverrideConfiguration] Trial period override settings
226
+ #
227
+ # @param unit_quantity [Float]
228
+ #
229
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
230
+
231
+ class Addon < Stigg::Internal::Type::BaseModel
232
+ # @!attribute addon_id
233
+ # Addon identifier
234
+ #
235
+ # @return [String]
236
+ required :addon_id, String, api_name: :addonId
237
+
238
+ # @!attribute quantity
239
+ # Number of addon units
240
+ #
241
+ # @return [Integer, nil]
242
+ optional :quantity, Integer
243
+
244
+ # @!method initialize(addon_id:, quantity: nil)
245
+ # @param addon_id [String] Addon identifier
246
+ #
247
+ # @param quantity [Integer] Number of addon units
248
+ end
249
+
250
+ class AppliedCoupon < Stigg::Internal::Type::BaseModel
251
+ # @!attribute billing_coupon_id
252
+ # Billing provider coupon ID
253
+ #
254
+ # @return [String, nil]
255
+ optional :billing_coupon_id, String, api_name: :billingCouponId
256
+
257
+ # @!attribute configuration
258
+ # Coupon timing configuration
259
+ #
260
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Configuration, nil]
261
+ optional :configuration, -> { Stigg::V1::SubscriptionProvisionParams::AppliedCoupon::Configuration }
262
+
263
+ # @!attribute coupon_id
264
+ # Stigg coupon ID
265
+ #
266
+ # @return [String, nil]
267
+ optional :coupon_id, String, api_name: :couponId
268
+
269
+ # @!attribute discount
270
+ # Ad-hoc discount configuration
271
+ #
272
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount, nil]
273
+ optional :discount, -> { Stigg::V1::SubscriptionProvisionParams::AppliedCoupon::Discount }
274
+
275
+ # @!attribute promotion_code
276
+ # Promotion code to apply
277
+ #
278
+ # @return [String, nil]
279
+ optional :promotion_code, String, api_name: :promotionCode
280
+
281
+ # @!method initialize(billing_coupon_id: nil, configuration: nil, coupon_id: nil, discount: nil, promotion_code: nil)
282
+ # Coupon configuration
283
+ #
284
+ # @param billing_coupon_id [String] Billing provider coupon ID
285
+ #
286
+ # @param configuration [Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Configuration] Coupon timing configuration
287
+ #
288
+ # @param coupon_id [String] Stigg coupon ID
289
+ #
290
+ # @param discount [Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount] Ad-hoc discount configuration
291
+ #
292
+ # @param promotion_code [String] Promotion code to apply
293
+
294
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon#configuration
295
+ class Configuration < Stigg::Internal::Type::BaseModel
296
+ # @!attribute start_date
297
+ # Coupon start date
298
+ #
299
+ # @return [Time, nil]
300
+ optional :start_date, Time, api_name: :startDate
301
+
302
+ # @!method initialize(start_date: nil)
303
+ # Coupon timing configuration
304
+ #
305
+ # @param start_date [Time] Coupon start date
306
+ end
307
+
308
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon#discount
309
+ class Discount < Stigg::Internal::Type::BaseModel
310
+ # @!attribute amounts_off
311
+ # Fixed amounts off by currency
312
+ #
313
+ # @return [Array<Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff>, nil]
314
+ optional :amounts_off,
315
+ -> {
316
+ Stigg::Internal::Type::ArrayOf[Stigg::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff]
317
+ },
318
+ api_name: :amountsOff,
319
+ nil?: true
320
+
321
+ # @!attribute description
322
+ # Ad-hoc discount
323
+ #
324
+ # @return [String, nil]
325
+ optional :description, String
326
+
327
+ # @!attribute duration_in_months
328
+ # Duration in months
329
+ #
330
+ # @return [Float, nil]
331
+ optional :duration_in_months, Float, api_name: :durationInMonths
332
+
333
+ # @!attribute name
334
+ # Discount name
335
+ #
336
+ # @return [String, nil]
337
+ optional :name, String
338
+
339
+ # @!attribute percent_off
340
+ # Percentage discount
341
+ #
342
+ # @return [Float, nil]
343
+ optional :percent_off, Float, api_name: :percentOff
344
+
345
+ # @!method initialize(amounts_off: nil, description: nil, duration_in_months: nil, name: nil, percent_off: nil)
346
+ # Ad-hoc discount configuration
347
+ #
348
+ # @param amounts_off [Array<Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff>, nil] Fixed amounts off by currency
349
+ #
350
+ # @param description [String] Ad-hoc discount
351
+ #
352
+ # @param duration_in_months [Float] Duration in months
353
+ #
354
+ # @param name [String] Discount name
355
+ #
356
+ # @param percent_off [Float] Percentage discount
357
+
358
+ class AmountsOff < Stigg::Internal::Type::BaseModel
359
+ # @!attribute amount
360
+ # The price amount
361
+ #
362
+ # @return [Float]
363
+ required :amount, Float
364
+
365
+ # @!attribute currency
366
+ # The price currency
367
+ #
368
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff::Currency]
369
+ required :currency,
370
+ enum: -> { Stigg::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff::Currency }
371
+
372
+ # @!method initialize(amount:, currency:)
373
+ # @param amount [Float] The price amount
374
+ #
375
+ # @param currency [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff::Currency] The price currency
376
+
377
+ # The price currency
378
+ #
379
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff#currency
380
+ module Currency
381
+ extend Stigg::Internal::Type::Enum
382
+
383
+ USD = :usd
384
+ AED = :aed
385
+ ALL = :all
386
+ AMD = :amd
387
+ ANG = :ang
388
+ AUD = :aud
389
+ AWG = :awg
390
+ AZN = :azn
391
+ BAM = :bam
392
+ BBD = :bbd
393
+ BDT = :bdt
394
+ BGN = :bgn
395
+ BIF = :bif
396
+ BMD = :bmd
397
+ BND = :bnd
398
+ BSD = :bsd
399
+ BWP = :bwp
400
+ BYN = :byn
401
+ BZD = :bzd
402
+ BRL = :brl
403
+ CAD = :cad
404
+ CDF = :cdf
405
+ CHF = :chf
406
+ CNY = :cny
407
+ CZK = :czk
408
+ DKK = :dkk
409
+ DOP = :dop
410
+ DZD = :dzd
411
+ EGP = :egp
412
+ ETB = :etb
413
+ EUR = :eur
414
+ FJD = :fjd
415
+ GBP = :gbp
416
+ GEL = :gel
417
+ GIP = :gip
418
+ GMD = :gmd
419
+ GYD = :gyd
420
+ HKD = :hkd
421
+ HRK = :hrk
422
+ HTG = :htg
423
+ IDR = :idr
424
+ ILS = :ils
425
+ INR = :inr
426
+ ISK = :isk
427
+ JMD = :jmd
428
+ JPY = :jpy
429
+ KES = :kes
430
+ KGS = :kgs
431
+ KHR = :khr
432
+ KMF = :kmf
433
+ KRW = :krw
434
+ KYD = :kyd
435
+ KZT = :kzt
436
+ LBP = :lbp
437
+ LKR = :lkr
438
+ LRD = :lrd
439
+ LSL = :lsl
440
+ MAD = :mad
441
+ MDL = :mdl
442
+ MGA = :mga
443
+ MKD = :mkd
444
+ MMK = :mmk
445
+ MNT = :mnt
446
+ MOP = :mop
447
+ MRO = :mro
448
+ MVR = :mvr
449
+ MWK = :mwk
450
+ MXN = :mxn
451
+ MYR = :myr
452
+ MZN = :mzn
453
+ NAD = :nad
454
+ NGN = :ngn
455
+ NOK = :nok
456
+ NPR = :npr
457
+ NZD = :nzd
458
+ PGK = :pgk
459
+ PHP = :php
460
+ PKR = :pkr
461
+ PLN = :pln
462
+ QAR = :qar
463
+ RON = :ron
464
+ RSD = :rsd
465
+ RUB = :rub
466
+ RWF = :rwf
467
+ SAR = :sar
468
+ SBD = :sbd
469
+ SCR = :scr
470
+ SEK = :sek
471
+ SGD = :sgd
472
+ SLE = :sle
473
+ SLL = :sll
474
+ SOS = :sos
475
+ SZL = :szl
476
+ THB = :thb
477
+ TJS = :tjs
478
+ TOP = :top
479
+ TRY = :try
480
+ TTD = :ttd
481
+ TZS = :tzs
482
+ UAH = :uah
483
+ UZS = :uzs
484
+ VND = :vnd
485
+ VUV = :vuv
486
+ WST = :wst
487
+ XAF = :xaf
488
+ XCD = :xcd
489
+ YER = :yer
490
+ ZAR = :zar
491
+ ZMW = :zmw
492
+ CLP = :clp
493
+ DJF = :djf
494
+ GNF = :gnf
495
+ UGX = :ugx
496
+ PYG = :pyg
497
+ XOF = :xof
498
+ XPF = :xpf
499
+
500
+ # @!method self.values
501
+ # @return [Array<Symbol>]
502
+ end
503
+ end
504
+ end
505
+ end
506
+
507
+ class BillingInformation < Stigg::Internal::Type::BaseModel
508
+ # @!attribute billing_address
509
+ # Billing address for the subscription
510
+ #
511
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation::BillingAddress, nil]
512
+ optional :billing_address,
513
+ -> { Stigg::V1::SubscriptionProvisionParams::BillingInformation::BillingAddress },
514
+ api_name: :billingAddress
515
+
516
+ # @!attribute charge_on_behalf_of_account
517
+ # Stripe Connect account to charge on behalf of
518
+ #
519
+ # @return [String, nil]
520
+ optional :charge_on_behalf_of_account, String, api_name: :chargeOnBehalfOfAccount, nil?: true
521
+
522
+ # @!attribute integration_id
523
+ # Billing integration identifier
524
+ #
525
+ # @return [String, nil]
526
+ optional :integration_id, String, api_name: :integrationId, nil?: true
527
+
528
+ # @!attribute invoice_days_until_due
529
+ # Number of days until invoice is due
530
+ #
531
+ # @return [Float, nil]
532
+ optional :invoice_days_until_due, Float, api_name: :invoiceDaysUntilDue
533
+
534
+ # @!attribute is_backdated
535
+ # Whether the subscription is backdated
536
+ #
537
+ # @return [Boolean, nil]
538
+ optional :is_backdated, Stigg::Internal::Type::Boolean, api_name: :isBackdated
539
+
540
+ # @!attribute is_invoice_paid
541
+ # Whether the invoice is marked as paid
542
+ #
543
+ # @return [Boolean, nil]
544
+ optional :is_invoice_paid, Stigg::Internal::Type::Boolean, api_name: :isInvoicePaid
545
+
546
+ # @!attribute metadata
547
+ # Additional metadata for the subscription
548
+ #
549
+ # @return [Hash{Symbol=>String}, nil]
550
+ optional :metadata, Stigg::Internal::Type::HashOf[String]
551
+
552
+ # @!attribute proration_behavior
553
+ # How to handle proration for billing changes
554
+ #
555
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation::ProrationBehavior, nil]
556
+ optional :proration_behavior,
557
+ enum: -> { Stigg::V1::SubscriptionProvisionParams::BillingInformation::ProrationBehavior },
558
+ api_name: :prorationBehavior
559
+
560
+ # @!attribute tax_ids
561
+ # Customer tax identification numbers
562
+ #
563
+ # @return [Array<Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation::TaxID>, nil]
564
+ optional :tax_ids,
565
+ -> {
566
+ Stigg::Internal::Type::ArrayOf[Stigg::V1::SubscriptionProvisionParams::BillingInformation::TaxID]
567
+ },
568
+ api_name: :taxIds
569
+
570
+ # @!attribute tax_percentage
571
+ # Tax percentage (0-100)
572
+ #
573
+ # @return [Float, nil]
574
+ optional :tax_percentage, Float, api_name: :taxPercentage
575
+
576
+ # @!attribute tax_rate_ids
577
+ # Tax rate identifiers to apply
578
+ #
579
+ # @return [Array<String>, nil]
580
+ optional :tax_rate_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :taxRateIds
581
+
582
+ # @!method initialize(billing_address: nil, charge_on_behalf_of_account: nil, integration_id: nil, invoice_days_until_due: nil, is_backdated: nil, is_invoice_paid: nil, metadata: nil, proration_behavior: nil, tax_ids: nil, tax_percentage: nil, tax_rate_ids: nil)
583
+ # @param billing_address [Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation::BillingAddress] Billing address for the subscription
584
+ #
585
+ # @param charge_on_behalf_of_account [String, nil] Stripe Connect account to charge on behalf of
586
+ #
587
+ # @param integration_id [String, nil] Billing integration identifier
588
+ #
589
+ # @param invoice_days_until_due [Float] Number of days until invoice is due
590
+ #
591
+ # @param is_backdated [Boolean] Whether the subscription is backdated
592
+ #
593
+ # @param is_invoice_paid [Boolean] Whether the invoice is marked as paid
594
+ #
595
+ # @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
596
+ #
597
+ # @param proration_behavior [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation::ProrationBehavior] How to handle proration for billing changes
598
+ #
599
+ # @param tax_ids [Array<Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation::TaxID>] Customer tax identification numbers
600
+ #
601
+ # @param tax_percentage [Float] Tax percentage (0-100)
602
+ #
603
+ # @param tax_rate_ids [Array<String>] Tax rate identifiers to apply
604
+
605
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation#billing_address
606
+ class BillingAddress < Stigg::Internal::Type::BaseModel
607
+ # @!attribute city
608
+ #
609
+ # @return [String, nil]
610
+ optional :city, String
611
+
612
+ # @!attribute country
613
+ #
614
+ # @return [String, nil]
615
+ optional :country, String
616
+
617
+ # @!attribute line1
618
+ #
619
+ # @return [String, nil]
620
+ optional :line1, String
621
+
622
+ # @!attribute line2
623
+ #
624
+ # @return [String, nil]
625
+ optional :line2, String
626
+
627
+ # @!attribute postal_code
628
+ #
629
+ # @return [String, nil]
630
+ optional :postal_code, String, api_name: :postalCode
631
+
632
+ # @!attribute state
633
+ #
634
+ # @return [String, nil]
635
+ optional :state, String
636
+
637
+ # @!method initialize(city: nil, country: nil, line1: nil, line2: nil, postal_code: nil, state: nil)
638
+ # Billing address for the subscription
639
+ #
640
+ # @param city [String]
641
+ # @param country [String]
642
+ # @param line1 [String]
643
+ # @param line2 [String]
644
+ # @param postal_code [String]
645
+ # @param state [String]
646
+ end
647
+
648
+ # How to handle proration for billing changes
649
+ #
650
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::BillingInformation#proration_behavior
651
+ module ProrationBehavior
652
+ extend Stigg::Internal::Type::Enum
653
+
654
+ INVOICE_IMMEDIATELY = :INVOICE_IMMEDIATELY
655
+ CREATE_PRORATIONS = :CREATE_PRORATIONS
656
+ NONE = :NONE
657
+
658
+ # @!method self.values
659
+ # @return [Array<Symbol>]
660
+ end
661
+
662
+ class TaxID < Stigg::Internal::Type::BaseModel
663
+ # @!attribute type
664
+ # The type of tax exemption identifier, such as VAT.
665
+ #
666
+ # @return [String]
667
+ required :type, String
668
+
669
+ # @!attribute value
670
+ # The actual tax identifier value
671
+ #
672
+ # @return [String]
673
+ required :value, String
674
+
675
+ # @!method initialize(type:, value:)
676
+ # @param type [String] The type of tax exemption identifier, such as VAT.
677
+ #
678
+ # @param value [String] The actual tax identifier value
679
+ end
680
+ end
681
+
682
+ # Billing period (MONTHLY or ANNUALLY)
683
+ module BillingPeriod
684
+ extend Stigg::Internal::Type::Enum
685
+
686
+ MONTHLY = :MONTHLY
687
+ ANNUALLY = :ANNUALLY
688
+
689
+ # @!method self.values
690
+ # @return [Array<Symbol>]
691
+ end
692
+
693
+ class Budget < Stigg::Internal::Type::BaseModel
694
+ # @!attribute has_soft_limit
695
+ # Whether the budget is a soft limit
696
+ #
697
+ # @return [Boolean]
698
+ required :has_soft_limit, Stigg::Internal::Type::Boolean, api_name: :hasSoftLimit
699
+
700
+ # @!attribute limit
701
+ # Maximum spending limit
702
+ #
703
+ # @return [Float]
704
+ required :limit, Float
705
+
706
+ # @!method initialize(has_soft_limit:, limit:)
707
+ # @param has_soft_limit [Boolean] Whether the budget is a soft limit
708
+ #
709
+ # @param limit [Float] Maximum spending limit
710
+ end
711
+
712
+ class Charge < Stigg::Internal::Type::BaseModel
713
+ # @!attribute id
714
+ # Charge ID
715
+ #
716
+ # @return [String]
717
+ required :id, String
718
+
719
+ # @!attribute quantity
720
+ # Charge quantity
721
+ #
722
+ # @return [Float]
723
+ required :quantity, Float
724
+
725
+ # @!attribute type
726
+ # Charge type
727
+ #
728
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::Charge::Type]
729
+ required :type, enum: -> { Stigg::V1::SubscriptionProvisionParams::Charge::Type }
730
+
731
+ # @!method initialize(id:, quantity:, type:)
732
+ # Charge item
733
+ #
734
+ # @param id [String] Charge ID
735
+ #
736
+ # @param quantity [Float] Charge quantity
737
+ #
738
+ # @param type [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::Charge::Type] Charge type
739
+
740
+ # Charge type
741
+ #
742
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::Charge#type
743
+ module Type
744
+ extend Stigg::Internal::Type::Enum
745
+
746
+ FEATURE = :FEATURE
747
+ CREDIT = :CREDIT
748
+
749
+ # @!method self.values
750
+ # @return [Array<Symbol>]
751
+ end
752
+ end
753
+
754
+ class CheckoutOptions < Stigg::Internal::Type::BaseModel
755
+ # @!attribute cancel_url
756
+ # URL to redirect to if checkout is canceled
757
+ #
758
+ # @return [String]
759
+ required :cancel_url, String, api_name: :cancelUrl
760
+
761
+ # @!attribute success_url
762
+ # URL to redirect to after successful checkout
763
+ #
764
+ # @return [String]
765
+ required :success_url, String, api_name: :successUrl
766
+
767
+ # @!attribute allow_promo_codes
768
+ # Allow promotional codes during checkout
769
+ #
770
+ # @return [Boolean, nil]
771
+ optional :allow_promo_codes, Stigg::Internal::Type::Boolean, api_name: :allowPromoCodes
772
+
773
+ # @!attribute allow_tax_id_collection
774
+ # Allow tax ID collection during checkout
775
+ #
776
+ # @return [Boolean, nil]
777
+ optional :allow_tax_id_collection, Stigg::Internal::Type::Boolean, api_name: :allowTaxIdCollection
778
+
779
+ # @!attribute collect_billing_address
780
+ # Collect billing address during checkout
781
+ #
782
+ # @return [Boolean, nil]
783
+ optional :collect_billing_address, Stigg::Internal::Type::Boolean, api_name: :collectBillingAddress
784
+
785
+ # @!attribute collect_phone_number
786
+ # Collect phone number during checkout
787
+ #
788
+ # @return [Boolean, nil]
789
+ optional :collect_phone_number, Stigg::Internal::Type::Boolean, api_name: :collectPhoneNumber
790
+
791
+ # @!attribute reference_id
792
+ # Optional reference ID for the checkout session
793
+ #
794
+ # @return [String, nil]
795
+ optional :reference_id, String, api_name: :referenceId, nil?: true
796
+
797
+ # @!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)
798
+ # Checkout page configuration for payment collection
799
+ #
800
+ # @param cancel_url [String] URL to redirect to if checkout is canceled
801
+ #
802
+ # @param success_url [String] URL to redirect to after successful checkout
803
+ #
804
+ # @param allow_promo_codes [Boolean] Allow promotional codes during checkout
805
+ #
806
+ # @param allow_tax_id_collection [Boolean] Allow tax ID collection during checkout
807
+ #
808
+ # @param collect_billing_address [Boolean] Collect billing address during checkout
809
+ #
810
+ # @param collect_phone_number [Boolean] Collect phone number during checkout
811
+ #
812
+ # @param reference_id [String, nil] Optional reference ID for the checkout session
813
+ end
814
+
815
+ class MinimumSpend < Stigg::Internal::Type::BaseModel
816
+ # @!attribute minimum
817
+ # Minimum spend amount
818
+ #
819
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::MinimumSpend::Minimum, nil]
820
+ optional :minimum, -> { Stigg::V1::SubscriptionProvisionParams::MinimumSpend::Minimum }, nil?: true
821
+
822
+ # @!method initialize(minimum: nil)
823
+ # @param minimum [Stigg::Models::V1::SubscriptionProvisionParams::MinimumSpend::Minimum, nil] Minimum spend amount
824
+
825
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::MinimumSpend#minimum
826
+ class Minimum < Stigg::Internal::Type::BaseModel
827
+ # @!attribute amount
828
+ # The price amount
829
+ #
830
+ # @return [Float, nil]
831
+ optional :amount, Float
832
+
833
+ # @!attribute billing_country_code
834
+ # The billing country code of the price
835
+ #
836
+ # @return [String, nil]
837
+ optional :billing_country_code, String, api_name: :billingCountryCode, nil?: true
838
+
839
+ # @!attribute currency
840
+ # The price currency
841
+ #
842
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::MinimumSpend::Minimum::Currency, nil]
843
+ optional :currency, enum: -> { Stigg::V1::SubscriptionProvisionParams::MinimumSpend::Minimum::Currency }
844
+
845
+ # @!method initialize(amount: nil, billing_country_code: nil, currency: nil)
846
+ # Minimum spend amount
847
+ #
848
+ # @param amount [Float] The price amount
849
+ #
850
+ # @param billing_country_code [String, nil] The billing country code of the price
851
+ #
852
+ # @param currency [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::MinimumSpend::Minimum::Currency] The price currency
853
+
854
+ # The price currency
855
+ #
856
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::MinimumSpend::Minimum#currency
857
+ module Currency
858
+ extend Stigg::Internal::Type::Enum
859
+
860
+ USD = :usd
861
+ AED = :aed
862
+ ALL = :all
863
+ AMD = :amd
864
+ ANG = :ang
865
+ AUD = :aud
866
+ AWG = :awg
867
+ AZN = :azn
868
+ BAM = :bam
869
+ BBD = :bbd
870
+ BDT = :bdt
871
+ BGN = :bgn
872
+ BIF = :bif
873
+ BMD = :bmd
874
+ BND = :bnd
875
+ BSD = :bsd
876
+ BWP = :bwp
877
+ BYN = :byn
878
+ BZD = :bzd
879
+ BRL = :brl
880
+ CAD = :cad
881
+ CDF = :cdf
882
+ CHF = :chf
883
+ CNY = :cny
884
+ CZK = :czk
885
+ DKK = :dkk
886
+ DOP = :dop
887
+ DZD = :dzd
888
+ EGP = :egp
889
+ ETB = :etb
890
+ EUR = :eur
891
+ FJD = :fjd
892
+ GBP = :gbp
893
+ GEL = :gel
894
+ GIP = :gip
895
+ GMD = :gmd
896
+ GYD = :gyd
897
+ HKD = :hkd
898
+ HRK = :hrk
899
+ HTG = :htg
900
+ IDR = :idr
901
+ ILS = :ils
902
+ INR = :inr
903
+ ISK = :isk
904
+ JMD = :jmd
905
+ JPY = :jpy
906
+ KES = :kes
907
+ KGS = :kgs
908
+ KHR = :khr
909
+ KMF = :kmf
910
+ KRW = :krw
911
+ KYD = :kyd
912
+ KZT = :kzt
913
+ LBP = :lbp
914
+ LKR = :lkr
915
+ LRD = :lrd
916
+ LSL = :lsl
917
+ MAD = :mad
918
+ MDL = :mdl
919
+ MGA = :mga
920
+ MKD = :mkd
921
+ MMK = :mmk
922
+ MNT = :mnt
923
+ MOP = :mop
924
+ MRO = :mro
925
+ MVR = :mvr
926
+ MWK = :mwk
927
+ MXN = :mxn
928
+ MYR = :myr
929
+ MZN = :mzn
930
+ NAD = :nad
931
+ NGN = :ngn
932
+ NOK = :nok
933
+ NPR = :npr
934
+ NZD = :nzd
935
+ PGK = :pgk
936
+ PHP = :php
937
+ PKR = :pkr
938
+ PLN = :pln
939
+ QAR = :qar
940
+ RON = :ron
941
+ RSD = :rsd
942
+ RUB = :rub
943
+ RWF = :rwf
944
+ SAR = :sar
945
+ SBD = :sbd
946
+ SCR = :scr
947
+ SEK = :sek
948
+ SGD = :sgd
949
+ SLE = :sle
950
+ SLL = :sll
951
+ SOS = :sos
952
+ SZL = :szl
953
+ THB = :thb
954
+ TJS = :tjs
955
+ TOP = :top
956
+ TRY = :try
957
+ TTD = :ttd
958
+ TZS = :tzs
959
+ UAH = :uah
960
+ UZS = :uzs
961
+ VND = :vnd
962
+ VUV = :vuv
963
+ WST = :wst
964
+ XAF = :xaf
965
+ XCD = :xcd
966
+ YER = :yer
967
+ ZAR = :zar
968
+ ZMW = :zmw
969
+ CLP = :clp
970
+ DJF = :djf
971
+ GNF = :gnf
972
+ UGX = :ugx
973
+ PYG = :pyg
974
+ XOF = :xof
975
+ XPF = :xpf
976
+
977
+ # @!method self.values
978
+ # @return [Array<Symbol>]
979
+ end
980
+ end
981
+ end
982
+
983
+ # How payments should be collected for this subscription
984
+ module PaymentCollectionMethod
985
+ extend Stigg::Internal::Type::Enum
986
+
987
+ CHARGE = :CHARGE
988
+ INVOICE = :INVOICE
989
+ NONE = :NONE
990
+
991
+ # @!method self.values
992
+ # @return [Array<Symbol>]
993
+ end
994
+
995
+ class PriceOverride < Stigg::Internal::Type::BaseModel
996
+ # @!attribute addon_id
997
+ # Addon identifier for the price override
998
+ #
999
+ # @return [String, nil]
1000
+ optional :addon_id, String, api_name: :addonId, nil?: true
1001
+
1002
+ # @!attribute base_charge
1003
+ # Whether this is a base charge override
1004
+ #
1005
+ # @return [Boolean, nil]
1006
+ optional :base_charge, Stigg::Internal::Type::Boolean, api_name: :baseCharge
1007
+
1008
+ # @!attribute block_size
1009
+ # Block size for pricing
1010
+ #
1011
+ # @return [Float, nil]
1012
+ optional :block_size, Float, api_name: :blockSize
1013
+
1014
+ # @!attribute credit_grant_cadence
1015
+ #
1016
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::CreditGrantCadence, nil]
1017
+ optional :credit_grant_cadence,
1018
+ enum: -> { Stigg::V1::SubscriptionProvisionParams::PriceOverride::CreditGrantCadence },
1019
+ api_name: :creditGrantCadence
1020
+
1021
+ # @!attribute credit_rate
1022
+ #
1023
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::CreditRate, nil]
1024
+ optional :credit_rate,
1025
+ -> { Stigg::V1::SubscriptionProvisionParams::PriceOverride::CreditRate },
1026
+ api_name: :creditRate
1027
+
1028
+ # @!attribute feature_id
1029
+ # Feature identifier for the price override
1030
+ #
1031
+ # @return [String, nil]
1032
+ optional :feature_id, String, api_name: :featureId, nil?: true
1033
+
1034
+ # @!attribute price
1035
+ # Override price amount
1036
+ #
1037
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Price, nil]
1038
+ optional :price, -> { Stigg::V1::SubscriptionProvisionParams::PriceOverride::Price }
1039
+
1040
+ # @!attribute tiers
1041
+ # Pricing tiers configuration
1042
+ #
1043
+ # @return [Array<Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier>, nil]
1044
+ optional :tiers,
1045
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::SubscriptionProvisionParams::PriceOverride::Tier] }
1046
+
1047
+ # @!method initialize(addon_id: nil, base_charge: nil, block_size: nil, credit_grant_cadence: nil, credit_rate: nil, feature_id: nil, price: nil, tiers: nil)
1048
+ # @param addon_id [String, nil] Addon identifier for the price override
1049
+ #
1050
+ # @param base_charge [Boolean] Whether this is a base charge override
1051
+ #
1052
+ # @param block_size [Float] Block size for pricing
1053
+ #
1054
+ # @param credit_grant_cadence [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::CreditGrantCadence]
1055
+ #
1056
+ # @param credit_rate [Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::CreditRate]
1057
+ #
1058
+ # @param feature_id [String, nil] Feature identifier for the price override
1059
+ #
1060
+ # @param price [Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Price] Override price amount
1061
+ #
1062
+ # @param tiers [Array<Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier>] Pricing tiers configuration
1063
+
1064
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride#credit_grant_cadence
1065
+ module CreditGrantCadence
1066
+ extend Stigg::Internal::Type::Enum
1067
+
1068
+ BEGINNING_OF_BILLING_PERIOD = :BEGINNING_OF_BILLING_PERIOD
1069
+ MONTHLY = :MONTHLY
1070
+
1071
+ # @!method self.values
1072
+ # @return [Array<Symbol>]
1073
+ end
1074
+
1075
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride#credit_rate
1076
+ class CreditRate < Stigg::Internal::Type::BaseModel
1077
+ # @!attribute amount
1078
+ # The credit rate amount
1079
+ #
1080
+ # @return [Float]
1081
+ required :amount, Float
1082
+
1083
+ # @!attribute currency_id
1084
+ # The custom currency refId for the credit rate
1085
+ #
1086
+ # @return [String]
1087
+ required :currency_id, String, api_name: :currencyId
1088
+
1089
+ # @!attribute cost_formula
1090
+ # A custom formula for calculating cost based on single event dimensions
1091
+ #
1092
+ # @return [String, nil]
1093
+ optional :cost_formula, String, api_name: :costFormula, nil?: true
1094
+
1095
+ # @!method initialize(amount:, currency_id:, cost_formula: nil)
1096
+ # @param amount [Float] The credit rate amount
1097
+ #
1098
+ # @param currency_id [String] The custom currency refId for the credit rate
1099
+ #
1100
+ # @param cost_formula [String, nil] A custom formula for calculating cost based on single event dimensions
1101
+ end
1102
+
1103
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride#price
1104
+ class Price < Stigg::Internal::Type::BaseModel
1105
+ # @!attribute amount
1106
+ # The price amount
1107
+ #
1108
+ # @return [Float, nil]
1109
+ optional :amount, Float
1110
+
1111
+ # @!attribute billing_country_code
1112
+ # The billing country code of the price
1113
+ #
1114
+ # @return [String, nil]
1115
+ optional :billing_country_code, String, api_name: :billingCountryCode, nil?: true
1116
+
1117
+ # @!attribute currency
1118
+ # The price currency
1119
+ #
1120
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Price::Currency, nil]
1121
+ optional :currency, enum: -> { Stigg::V1::SubscriptionProvisionParams::PriceOverride::Price::Currency }
1122
+
1123
+ # @!method initialize(amount: nil, billing_country_code: nil, currency: nil)
1124
+ # Override price amount
1125
+ #
1126
+ # @param amount [Float] The price amount
1127
+ #
1128
+ # @param billing_country_code [String, nil] The billing country code of the price
1129
+ #
1130
+ # @param currency [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Price::Currency] The price currency
1131
+
1132
+ # The price currency
1133
+ #
1134
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Price#currency
1135
+ module Currency
1136
+ extend Stigg::Internal::Type::Enum
1137
+
1138
+ USD = :usd
1139
+ AED = :aed
1140
+ ALL = :all
1141
+ AMD = :amd
1142
+ ANG = :ang
1143
+ AUD = :aud
1144
+ AWG = :awg
1145
+ AZN = :azn
1146
+ BAM = :bam
1147
+ BBD = :bbd
1148
+ BDT = :bdt
1149
+ BGN = :bgn
1150
+ BIF = :bif
1151
+ BMD = :bmd
1152
+ BND = :bnd
1153
+ BSD = :bsd
1154
+ BWP = :bwp
1155
+ BYN = :byn
1156
+ BZD = :bzd
1157
+ BRL = :brl
1158
+ CAD = :cad
1159
+ CDF = :cdf
1160
+ CHF = :chf
1161
+ CNY = :cny
1162
+ CZK = :czk
1163
+ DKK = :dkk
1164
+ DOP = :dop
1165
+ DZD = :dzd
1166
+ EGP = :egp
1167
+ ETB = :etb
1168
+ EUR = :eur
1169
+ FJD = :fjd
1170
+ GBP = :gbp
1171
+ GEL = :gel
1172
+ GIP = :gip
1173
+ GMD = :gmd
1174
+ GYD = :gyd
1175
+ HKD = :hkd
1176
+ HRK = :hrk
1177
+ HTG = :htg
1178
+ IDR = :idr
1179
+ ILS = :ils
1180
+ INR = :inr
1181
+ ISK = :isk
1182
+ JMD = :jmd
1183
+ JPY = :jpy
1184
+ KES = :kes
1185
+ KGS = :kgs
1186
+ KHR = :khr
1187
+ KMF = :kmf
1188
+ KRW = :krw
1189
+ KYD = :kyd
1190
+ KZT = :kzt
1191
+ LBP = :lbp
1192
+ LKR = :lkr
1193
+ LRD = :lrd
1194
+ LSL = :lsl
1195
+ MAD = :mad
1196
+ MDL = :mdl
1197
+ MGA = :mga
1198
+ MKD = :mkd
1199
+ MMK = :mmk
1200
+ MNT = :mnt
1201
+ MOP = :mop
1202
+ MRO = :mro
1203
+ MVR = :mvr
1204
+ MWK = :mwk
1205
+ MXN = :mxn
1206
+ MYR = :myr
1207
+ MZN = :mzn
1208
+ NAD = :nad
1209
+ NGN = :ngn
1210
+ NOK = :nok
1211
+ NPR = :npr
1212
+ NZD = :nzd
1213
+ PGK = :pgk
1214
+ PHP = :php
1215
+ PKR = :pkr
1216
+ PLN = :pln
1217
+ QAR = :qar
1218
+ RON = :ron
1219
+ RSD = :rsd
1220
+ RUB = :rub
1221
+ RWF = :rwf
1222
+ SAR = :sar
1223
+ SBD = :sbd
1224
+ SCR = :scr
1225
+ SEK = :sek
1226
+ SGD = :sgd
1227
+ SLE = :sle
1228
+ SLL = :sll
1229
+ SOS = :sos
1230
+ SZL = :szl
1231
+ THB = :thb
1232
+ TJS = :tjs
1233
+ TOP = :top
1234
+ TRY = :try
1235
+ TTD = :ttd
1236
+ TZS = :tzs
1237
+ UAH = :uah
1238
+ UZS = :uzs
1239
+ VND = :vnd
1240
+ VUV = :vuv
1241
+ WST = :wst
1242
+ XAF = :xaf
1243
+ XCD = :xcd
1244
+ YER = :yer
1245
+ ZAR = :zar
1246
+ ZMW = :zmw
1247
+ CLP = :clp
1248
+ DJF = :djf
1249
+ GNF = :gnf
1250
+ UGX = :ugx
1251
+ PYG = :pyg
1252
+ XOF = :xof
1253
+ XPF = :xpf
1254
+
1255
+ # @!method self.values
1256
+ # @return [Array<Symbol>]
1257
+ end
1258
+ end
1259
+
1260
+ class Tier < Stigg::Internal::Type::BaseModel
1261
+ # @!attribute flat_price
1262
+ # The flat fee price of the price tier
1263
+ #
1264
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier::FlatPrice, nil]
1265
+ optional :flat_price,
1266
+ -> { Stigg::V1::SubscriptionProvisionParams::PriceOverride::Tier::FlatPrice },
1267
+ api_name: :flatPrice
1268
+
1269
+ # @!attribute unit_price
1270
+ # The unit price of the price tier
1271
+ #
1272
+ # @return [Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier::UnitPrice, nil]
1273
+ optional :unit_price,
1274
+ -> { Stigg::V1::SubscriptionProvisionParams::PriceOverride::Tier::UnitPrice },
1275
+ api_name: :unitPrice
1276
+
1277
+ # @!attribute up_to
1278
+ # The up to quantity of the price tier
1279
+ #
1280
+ # @return [Float, nil]
1281
+ optional :up_to, Float, api_name: :upTo
1282
+
1283
+ # @!method initialize(flat_price: nil, unit_price: nil, up_to: nil)
1284
+ # @param flat_price [Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier::FlatPrice] The flat fee price of the price tier
1285
+ #
1286
+ # @param unit_price [Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier::UnitPrice] The unit price of the price tier
1287
+ #
1288
+ # @param up_to [Float] The up to quantity of the price tier
1289
+
1290
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier#flat_price
1291
+ class FlatPrice < Stigg::Internal::Type::BaseModel
1292
+ # @!attribute amount
1293
+ # The price amount
1294
+ #
1295
+ # @return [Float, nil]
1296
+ optional :amount, Float
1297
+
1298
+ # @!attribute billing_country_code
1299
+ # The billing country code of the price
1300
+ #
1301
+ # @return [String, nil]
1302
+ optional :billing_country_code, String, api_name: :billingCountryCode, nil?: true
1303
+
1304
+ # @!attribute currency
1305
+ # The price currency
1306
+ #
1307
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier::FlatPrice::Currency, nil]
1308
+ optional :currency,
1309
+ enum: -> { Stigg::V1::SubscriptionProvisionParams::PriceOverride::Tier::FlatPrice::Currency }
1310
+
1311
+ # @!method initialize(amount: nil, billing_country_code: nil, currency: nil)
1312
+ # The flat fee price of the price tier
1313
+ #
1314
+ # @param amount [Float] The price amount
1315
+ #
1316
+ # @param billing_country_code [String, nil] The billing country code of the price
1317
+ #
1318
+ # @param currency [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier::FlatPrice::Currency] The price currency
1319
+
1320
+ # The price currency
1321
+ #
1322
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier::FlatPrice#currency
1323
+ module Currency
1324
+ extend Stigg::Internal::Type::Enum
1325
+
1326
+ USD = :usd
1327
+ AED = :aed
1328
+ ALL = :all
1329
+ AMD = :amd
1330
+ ANG = :ang
1331
+ AUD = :aud
1332
+ AWG = :awg
1333
+ AZN = :azn
1334
+ BAM = :bam
1335
+ BBD = :bbd
1336
+ BDT = :bdt
1337
+ BGN = :bgn
1338
+ BIF = :bif
1339
+ BMD = :bmd
1340
+ BND = :bnd
1341
+ BSD = :bsd
1342
+ BWP = :bwp
1343
+ BYN = :byn
1344
+ BZD = :bzd
1345
+ BRL = :brl
1346
+ CAD = :cad
1347
+ CDF = :cdf
1348
+ CHF = :chf
1349
+ CNY = :cny
1350
+ CZK = :czk
1351
+ DKK = :dkk
1352
+ DOP = :dop
1353
+ DZD = :dzd
1354
+ EGP = :egp
1355
+ ETB = :etb
1356
+ EUR = :eur
1357
+ FJD = :fjd
1358
+ GBP = :gbp
1359
+ GEL = :gel
1360
+ GIP = :gip
1361
+ GMD = :gmd
1362
+ GYD = :gyd
1363
+ HKD = :hkd
1364
+ HRK = :hrk
1365
+ HTG = :htg
1366
+ IDR = :idr
1367
+ ILS = :ils
1368
+ INR = :inr
1369
+ ISK = :isk
1370
+ JMD = :jmd
1371
+ JPY = :jpy
1372
+ KES = :kes
1373
+ KGS = :kgs
1374
+ KHR = :khr
1375
+ KMF = :kmf
1376
+ KRW = :krw
1377
+ KYD = :kyd
1378
+ KZT = :kzt
1379
+ LBP = :lbp
1380
+ LKR = :lkr
1381
+ LRD = :lrd
1382
+ LSL = :lsl
1383
+ MAD = :mad
1384
+ MDL = :mdl
1385
+ MGA = :mga
1386
+ MKD = :mkd
1387
+ MMK = :mmk
1388
+ MNT = :mnt
1389
+ MOP = :mop
1390
+ MRO = :mro
1391
+ MVR = :mvr
1392
+ MWK = :mwk
1393
+ MXN = :mxn
1394
+ MYR = :myr
1395
+ MZN = :mzn
1396
+ NAD = :nad
1397
+ NGN = :ngn
1398
+ NOK = :nok
1399
+ NPR = :npr
1400
+ NZD = :nzd
1401
+ PGK = :pgk
1402
+ PHP = :php
1403
+ PKR = :pkr
1404
+ PLN = :pln
1405
+ QAR = :qar
1406
+ RON = :ron
1407
+ RSD = :rsd
1408
+ RUB = :rub
1409
+ RWF = :rwf
1410
+ SAR = :sar
1411
+ SBD = :sbd
1412
+ SCR = :scr
1413
+ SEK = :sek
1414
+ SGD = :sgd
1415
+ SLE = :sle
1416
+ SLL = :sll
1417
+ SOS = :sos
1418
+ SZL = :szl
1419
+ THB = :thb
1420
+ TJS = :tjs
1421
+ TOP = :top
1422
+ TRY = :try
1423
+ TTD = :ttd
1424
+ TZS = :tzs
1425
+ UAH = :uah
1426
+ UZS = :uzs
1427
+ VND = :vnd
1428
+ VUV = :vuv
1429
+ WST = :wst
1430
+ XAF = :xaf
1431
+ XCD = :xcd
1432
+ YER = :yer
1433
+ ZAR = :zar
1434
+ ZMW = :zmw
1435
+ CLP = :clp
1436
+ DJF = :djf
1437
+ GNF = :gnf
1438
+ UGX = :ugx
1439
+ PYG = :pyg
1440
+ XOF = :xof
1441
+ XPF = :xpf
1442
+
1443
+ # @!method self.values
1444
+ # @return [Array<Symbol>]
1445
+ end
1446
+ end
1447
+
1448
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier#unit_price
1449
+ class UnitPrice < Stigg::Internal::Type::BaseModel
1450
+ # @!attribute amount
1451
+ # The price amount
1452
+ #
1453
+ # @return [Float, nil]
1454
+ optional :amount, Float
1455
+
1456
+ # @!attribute billing_country_code
1457
+ # The billing country code of the price
1458
+ #
1459
+ # @return [String, nil]
1460
+ optional :billing_country_code, String, api_name: :billingCountryCode, nil?: true
1461
+
1462
+ # @!attribute currency
1463
+ # The price currency
1464
+ #
1465
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier::UnitPrice::Currency, nil]
1466
+ optional :currency,
1467
+ enum: -> { Stigg::V1::SubscriptionProvisionParams::PriceOverride::Tier::UnitPrice::Currency }
1468
+
1469
+ # @!method initialize(amount: nil, billing_country_code: nil, currency: nil)
1470
+ # The unit price of the price tier
1471
+ #
1472
+ # @param amount [Float] The price amount
1473
+ #
1474
+ # @param billing_country_code [String, nil] The billing country code of the price
1475
+ #
1476
+ # @param currency [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier::UnitPrice::Currency] The price currency
1477
+
1478
+ # The price currency
1479
+ #
1480
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::PriceOverride::Tier::UnitPrice#currency
1481
+ module Currency
1482
+ extend Stigg::Internal::Type::Enum
1483
+
1484
+ USD = :usd
1485
+ AED = :aed
1486
+ ALL = :all
1487
+ AMD = :amd
1488
+ ANG = :ang
1489
+ AUD = :aud
1490
+ AWG = :awg
1491
+ AZN = :azn
1492
+ BAM = :bam
1493
+ BBD = :bbd
1494
+ BDT = :bdt
1495
+ BGN = :bgn
1496
+ BIF = :bif
1497
+ BMD = :bmd
1498
+ BND = :bnd
1499
+ BSD = :bsd
1500
+ BWP = :bwp
1501
+ BYN = :byn
1502
+ BZD = :bzd
1503
+ BRL = :brl
1504
+ CAD = :cad
1505
+ CDF = :cdf
1506
+ CHF = :chf
1507
+ CNY = :cny
1508
+ CZK = :czk
1509
+ DKK = :dkk
1510
+ DOP = :dop
1511
+ DZD = :dzd
1512
+ EGP = :egp
1513
+ ETB = :etb
1514
+ EUR = :eur
1515
+ FJD = :fjd
1516
+ GBP = :gbp
1517
+ GEL = :gel
1518
+ GIP = :gip
1519
+ GMD = :gmd
1520
+ GYD = :gyd
1521
+ HKD = :hkd
1522
+ HRK = :hrk
1523
+ HTG = :htg
1524
+ IDR = :idr
1525
+ ILS = :ils
1526
+ INR = :inr
1527
+ ISK = :isk
1528
+ JMD = :jmd
1529
+ JPY = :jpy
1530
+ KES = :kes
1531
+ KGS = :kgs
1532
+ KHR = :khr
1533
+ KMF = :kmf
1534
+ KRW = :krw
1535
+ KYD = :kyd
1536
+ KZT = :kzt
1537
+ LBP = :lbp
1538
+ LKR = :lkr
1539
+ LRD = :lrd
1540
+ LSL = :lsl
1541
+ MAD = :mad
1542
+ MDL = :mdl
1543
+ MGA = :mga
1544
+ MKD = :mkd
1545
+ MMK = :mmk
1546
+ MNT = :mnt
1547
+ MOP = :mop
1548
+ MRO = :mro
1549
+ MVR = :mvr
1550
+ MWK = :mwk
1551
+ MXN = :mxn
1552
+ MYR = :myr
1553
+ MZN = :mzn
1554
+ NAD = :nad
1555
+ NGN = :ngn
1556
+ NOK = :nok
1557
+ NPR = :npr
1558
+ NZD = :nzd
1559
+ PGK = :pgk
1560
+ PHP = :php
1561
+ PKR = :pkr
1562
+ PLN = :pln
1563
+ QAR = :qar
1564
+ RON = :ron
1565
+ RSD = :rsd
1566
+ RUB = :rub
1567
+ RWF = :rwf
1568
+ SAR = :sar
1569
+ SBD = :sbd
1570
+ SCR = :scr
1571
+ SEK = :sek
1572
+ SGD = :sgd
1573
+ SLE = :sle
1574
+ SLL = :sll
1575
+ SOS = :sos
1576
+ SZL = :szl
1577
+ THB = :thb
1578
+ TJS = :tjs
1579
+ TOP = :top
1580
+ TRY = :try
1581
+ TTD = :ttd
1582
+ TZS = :tzs
1583
+ UAH = :uah
1584
+ UZS = :uzs
1585
+ VND = :vnd
1586
+ VUV = :vuv
1587
+ WST = :wst
1588
+ XAF = :xaf
1589
+ XCD = :xcd
1590
+ YER = :yer
1591
+ ZAR = :zar
1592
+ ZMW = :zmw
1593
+ CLP = :clp
1594
+ DJF = :djf
1595
+ GNF = :gnf
1596
+ UGX = :ugx
1597
+ PYG = :pyg
1598
+ XOF = :xof
1599
+ XPF = :xpf
1600
+
1601
+ # @!method self.values
1602
+ # @return [Array<Symbol>]
1603
+ end
1604
+ end
1605
+ end
1606
+ end
1607
+
1608
+ # Strategy for scheduling subscription changes
1609
+ module ScheduleStrategy
1610
+ extend Stigg::Internal::Type::Enum
1611
+
1612
+ END_OF_BILLING_PERIOD = :END_OF_BILLING_PERIOD
1613
+ END_OF_BILLING_MONTH = :END_OF_BILLING_MONTH
1614
+ IMMEDIATE = :IMMEDIATE
1615
+
1616
+ # @!method self.values
1617
+ # @return [Array<Symbol>]
1618
+ end
1619
+
1620
+ class SubscriptionEntitlement < Stigg::Internal::Type::BaseModel
1621
+ # @!attribute feature_id
1622
+ # Feature ID
1623
+ #
1624
+ # @return [String]
1625
+ required :feature_id, String, api_name: :featureId
1626
+
1627
+ # @!attribute usage_limit
1628
+ #
1629
+ # @return [Float]
1630
+ required :usage_limit, Float, api_name: :usageLimit
1631
+
1632
+ # @!attribute is_granted
1633
+ #
1634
+ # @return [Boolean, nil]
1635
+ optional :is_granted, Stigg::Internal::Type::Boolean, api_name: :isGranted
1636
+
1637
+ # @!method initialize(feature_id:, usage_limit:, is_granted: nil)
1638
+ # @param feature_id [String] Feature ID
1639
+ #
1640
+ # @param usage_limit [Float]
1641
+ #
1642
+ # @param is_granted [Boolean]
1643
+ end
1644
+
1645
+ class TrialOverrideConfiguration < Stigg::Internal::Type::BaseModel
1646
+ # @!attribute is_trial
1647
+ # Whether the subscription should start with a trial period
1648
+ #
1649
+ # @return [Boolean]
1650
+ required :is_trial, Stigg::Internal::Type::Boolean, api_name: :isTrial
1651
+
1652
+ # @!attribute trial_end_behavior
1653
+ # Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION
1654
+ #
1655
+ # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::TrialOverrideConfiguration::TrialEndBehavior, nil]
1656
+ optional :trial_end_behavior,
1657
+ enum: -> {
1658
+ Stigg::V1::SubscriptionProvisionParams::TrialOverrideConfiguration::TrialEndBehavior
1659
+ },
1660
+ api_name: :trialEndBehavior
1661
+
1662
+ # @!attribute trial_end_date
1663
+ # Custom trial end date
1664
+ #
1665
+ # @return [Time, nil]
1666
+ optional :trial_end_date, Time, api_name: :trialEndDate
1667
+
1668
+ # @!method initialize(is_trial:, trial_end_behavior: nil, trial_end_date: nil)
1669
+ # Trial period override settings
1670
+ #
1671
+ # @param is_trial [Boolean] Whether the subscription should start with a trial period
1672
+ #
1673
+ # @param trial_end_behavior [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::TrialOverrideConfiguration::TrialEndBehavior] Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION
1674
+ #
1675
+ # @param trial_end_date [Time] Custom trial end date
1676
+
1677
+ # Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION
1678
+ #
1679
+ # @see Stigg::Models::V1::SubscriptionProvisionParams::TrialOverrideConfiguration#trial_end_behavior
1680
+ module TrialEndBehavior
1681
+ extend Stigg::Internal::Type::Enum
1682
+
1683
+ CONVERT_TO_PAID = :CONVERT_TO_PAID
1684
+ CANCEL_SUBSCRIPTION = :CANCEL_SUBSCRIPTION
1685
+
1686
+ # @!method self.values
1687
+ # @return [Array<Symbol>]
1688
+ end
1689
+ end
1690
+ end
1691
+ end
1692
+ end
1693
+ end