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,84 @@
1
+ module Stigg
2
+ module Models
3
+ module V1
4
+ type subscription_import_params =
5
+ {
6
+ subscriptions: ::Array[Stigg::V1::SubscriptionImportParams::Subscription]
7
+ }
8
+ & Stigg::Internal::Type::request_parameters
9
+
10
+ class SubscriptionImportParams < Stigg::Internal::Type::BaseModel
11
+ extend Stigg::Internal::Type::RequestParameters::Converter
12
+ include Stigg::Internal::Type::RequestParameters
13
+
14
+ attr_accessor subscriptions: ::Array[Stigg::V1::SubscriptionImportParams::Subscription]
15
+
16
+ def initialize: (
17
+ subscriptions: ::Array[Stigg::V1::SubscriptionImportParams::Subscription],
18
+ ?request_options: Stigg::request_opts
19
+ ) -> void
20
+
21
+ def to_hash: -> {
22
+ subscriptions: ::Array[Stigg::V1::SubscriptionImportParams::Subscription],
23
+ request_options: Stigg::RequestOptions
24
+ }
25
+
26
+ type subscription =
27
+ {
28
+ id: String,
29
+ customer_id: String,
30
+ plan_id: String,
31
+ billing_id: String?,
32
+ end_date: Time?,
33
+ metadata: ::Hash[Symbol, String],
34
+ resource_id: String?,
35
+ start_date: Time
36
+ }
37
+
38
+ class Subscription < Stigg::Internal::Type::BaseModel
39
+ attr_accessor id: String
40
+
41
+ attr_accessor customer_id: String
42
+
43
+ attr_accessor plan_id: String
44
+
45
+ attr_accessor billing_id: String?
46
+
47
+ attr_accessor end_date: Time?
48
+
49
+ attr_reader metadata: ::Hash[Symbol, String]?
50
+
51
+ def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
52
+
53
+ attr_accessor resource_id: String?
54
+
55
+ attr_reader start_date: Time?
56
+
57
+ def start_date=: (Time) -> Time
58
+
59
+ def initialize: (
60
+ id: String,
61
+ customer_id: String,
62
+ plan_id: String,
63
+ ?billing_id: String?,
64
+ ?end_date: Time?,
65
+ ?metadata: ::Hash[Symbol, String],
66
+ ?resource_id: String?,
67
+ ?start_date: Time
68
+ ) -> void
69
+
70
+ def to_hash: -> {
71
+ id: String,
72
+ customer_id: String,
73
+ plan_id: String,
74
+ billing_id: String?,
75
+ end_date: Time?,
76
+ metadata: ::Hash[Symbol, String],
77
+ resource_id: String?,
78
+ start_date: Time
79
+ }
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,30 @@
1
+ module Stigg
2
+ module Models
3
+ module V1
4
+ type subscription_import_response =
5
+ { data: Stigg::Models::V1::SubscriptionImportResponse::Data }
6
+
7
+ class SubscriptionImportResponse < Stigg::Internal::Type::BaseModel
8
+ attr_accessor data: Stigg::Models::V1::SubscriptionImportResponse::Data
9
+
10
+ def initialize: (
11
+ data: Stigg::Models::V1::SubscriptionImportResponse::Data
12
+ ) -> void
13
+
14
+ def to_hash: -> {
15
+ data: Stigg::Models::V1::SubscriptionImportResponse::Data
16
+ }
17
+
18
+ type data = { task_id: String }
19
+
20
+ class Data < Stigg::Internal::Type::BaseModel
21
+ attr_accessor task_id: String
22
+
23
+ def initialize: (task_id: String) -> void
24
+
25
+ def to_hash: -> { task_id: String }
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -3,10 +3,10 @@ module Stigg
3
3
  module V1
4
4
  type subscription_list_params =
5
5
  {
6
+ after: String,
7
+ before: String,
6
8
  customer_id: String,
7
- ending_before: String,
8
9
  limit: Integer,
9
- starting_after: String,
10
10
  status: String
11
11
  }
12
12
  & Stigg::Internal::Type::request_parameters
@@ -15,40 +15,40 @@ module Stigg
15
15
  extend Stigg::Internal::Type::RequestParameters::Converter
16
16
  include Stigg::Internal::Type::RequestParameters
17
17
 
18
- attr_reader customer_id: String?
18
+ attr_reader after: String?
19
19
 
20
- def customer_id=: (String) -> String
20
+ def after=: (String) -> String
21
21
 
22
- attr_reader ending_before: String?
22
+ attr_reader before: String?
23
23
 
24
- def ending_before=: (String) -> String
24
+ def before=: (String) -> String
25
25
 
26
- attr_reader limit: Integer?
26
+ attr_reader customer_id: String?
27
27
 
28
- def limit=: (Integer) -> Integer
28
+ def customer_id=: (String) -> String
29
29
 
30
- attr_reader starting_after: String?
30
+ attr_reader limit: Integer?
31
31
 
32
- def starting_after=: (String) -> String
32
+ def limit=: (Integer) -> Integer
33
33
 
34
34
  attr_reader status: String?
35
35
 
36
36
  def status=: (String) -> String
37
37
 
38
38
  def initialize: (
39
+ ?after: String,
40
+ ?before: String,
39
41
  ?customer_id: String,
40
- ?ending_before: String,
41
42
  ?limit: Integer,
42
- ?starting_after: String,
43
43
  ?status: String,
44
44
  ?request_options: Stigg::request_opts
45
45
  ) -> void
46
46
 
47
47
  def to_hash: -> {
48
+ after: String,
49
+ before: String,
48
50
  customer_id: String,
49
- ending_before: String,
50
51
  limit: Integer,
51
- starting_after: String,
52
52
  status: String,
53
53
  request_options: Stigg::RequestOptions
54
54
  }
@@ -2,226 +2,233 @@ module Stigg
2
2
  module Models
3
3
  module V1
4
4
  type subscription_list_response =
5
- { data: ::Array[Stigg::Models::V1::SubscriptionListResponse::Data] }
5
+ {
6
+ id: String,
7
+ billing_id: String?,
8
+ created_at: Time,
9
+ customer_id: String,
10
+ payment_collection: Stigg::Models::V1::SubscriptionListResponse::payment_collection,
11
+ plan_id: String,
12
+ pricing_type: Stigg::Models::V1::SubscriptionListResponse::pricing_type,
13
+ start_date: Time,
14
+ status: Stigg::Models::V1::SubscriptionListResponse::status,
15
+ cancellation_date: Time?,
16
+ cancel_reason: Stigg::Models::V1::SubscriptionListResponse::cancel_reason?,
17
+ current_billing_period_end: Time?,
18
+ current_billing_period_start: Time?,
19
+ effective_end_date: Time?,
20
+ end_date: Time?,
21
+ metadata: ::Hash[Symbol, String],
22
+ paying_customer_id: String?,
23
+ payment_collection_method: Stigg::Models::V1::SubscriptionListResponse::payment_collection_method?,
24
+ prices: ::Array[Stigg::Models::V1::SubscriptionListResponse::Price],
25
+ resource_id: String?,
26
+ trial_end_date: Time?
27
+ }
6
28
 
7
29
  class SubscriptionListResponse < Stigg::Internal::Type::BaseModel
8
- attr_accessor data: ::Array[Stigg::Models::V1::SubscriptionListResponse::Data]
30
+ attr_accessor id: String
9
31
 
10
- def initialize: (
11
- data: ::Array[Stigg::Models::V1::SubscriptionListResponse::Data]
12
- ) -> void
32
+ attr_accessor billing_id: String?
13
33
 
14
- def to_hash: -> {
15
- data: ::Array[Stigg::Models::V1::SubscriptionListResponse::Data]
16
- }
34
+ attr_accessor created_at: Time
17
35
 
18
- type data =
19
- {
20
- id: String,
21
- billing_id: String?,
22
- created_at: Time,
23
- cursor_id: String,
24
- customer_id: String,
25
- payment_collection: Stigg::Models::V1::SubscriptionListResponse::Data::payment_collection,
26
- plan_id: String,
27
- pricing_type: Stigg::Models::V1::SubscriptionListResponse::Data::pricing_type,
28
- start_date: Time,
29
- status: Stigg::Models::V1::SubscriptionListResponse::Data::status,
30
- cancellation_date: Time?,
31
- cancel_reason: Stigg::Models::V1::SubscriptionListResponse::Data::cancel_reason?,
32
- current_billing_period_end: Time?,
33
- current_billing_period_start: Time?,
34
- effective_end_date: Time?,
35
- end_date: Time?,
36
- metadata: ::Hash[Symbol, String],
37
- paying_customer_id: String?,
38
- payment_collection_method: Stigg::Models::V1::SubscriptionListResponse::Data::payment_collection_method?,
39
- resource_id: String?,
40
- trial_end_date: Time?
41
- }
42
-
43
- class Data < Stigg::Internal::Type::BaseModel
44
- attr_accessor id: String
36
+ attr_accessor customer_id: String
37
+
38
+ attr_accessor payment_collection: Stigg::Models::V1::SubscriptionListResponse::payment_collection
39
+
40
+ attr_accessor plan_id: String
41
+
42
+ attr_accessor pricing_type: Stigg::Models::V1::SubscriptionListResponse::pricing_type
43
+
44
+ attr_accessor start_date: Time
45
+
46
+ attr_accessor status: Stigg::Models::V1::SubscriptionListResponse::status
47
+
48
+ attr_accessor cancellation_date: Time?
49
+
50
+ attr_accessor cancel_reason: Stigg::Models::V1::SubscriptionListResponse::cancel_reason?
51
+
52
+ attr_accessor current_billing_period_end: Time?
53
+
54
+ attr_accessor current_billing_period_start: Time?
55
+
56
+ attr_accessor effective_end_date: Time?
57
+
58
+ attr_accessor end_date: Time?
45
59
 
46
- attr_accessor billing_id: String?
60
+ attr_reader metadata: ::Hash[Symbol, String]?
47
61
 
48
- attr_accessor created_at: Time
62
+ def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
49
63
 
50
- attr_accessor cursor_id: String
64
+ attr_accessor paying_customer_id: String?
51
65
 
52
- attr_accessor customer_id: String
66
+ attr_accessor payment_collection_method: Stigg::Models::V1::SubscriptionListResponse::payment_collection_method?
53
67
 
54
- attr_accessor payment_collection: Stigg::Models::V1::SubscriptionListResponse::Data::payment_collection
68
+ attr_reader prices: ::Array[Stigg::Models::V1::SubscriptionListResponse::Price]?
55
69
 
56
- attr_accessor plan_id: String
70
+ def prices=: (
71
+ ::Array[Stigg::Models::V1::SubscriptionListResponse::Price]
72
+ ) -> ::Array[Stigg::Models::V1::SubscriptionListResponse::Price]
57
73
 
58
- attr_accessor pricing_type: Stigg::Models::V1::SubscriptionListResponse::Data::pricing_type
74
+ attr_accessor resource_id: String?
59
75
 
60
- attr_accessor start_date: Time
76
+ attr_accessor trial_end_date: Time?
61
77
 
62
- attr_accessor status: Stigg::Models::V1::SubscriptionListResponse::Data::status
78
+ def initialize: (
79
+ id: String,
80
+ billing_id: String?,
81
+ created_at: Time,
82
+ customer_id: String,
83
+ payment_collection: Stigg::Models::V1::SubscriptionListResponse::payment_collection,
84
+ plan_id: String,
85
+ pricing_type: Stigg::Models::V1::SubscriptionListResponse::pricing_type,
86
+ start_date: Time,
87
+ status: Stigg::Models::V1::SubscriptionListResponse::status,
88
+ ?cancellation_date: Time?,
89
+ ?cancel_reason: Stigg::Models::V1::SubscriptionListResponse::cancel_reason?,
90
+ ?current_billing_period_end: Time?,
91
+ ?current_billing_period_start: Time?,
92
+ ?effective_end_date: Time?,
93
+ ?end_date: Time?,
94
+ ?metadata: ::Hash[Symbol, String],
95
+ ?paying_customer_id: String?,
96
+ ?payment_collection_method: Stigg::Models::V1::SubscriptionListResponse::payment_collection_method?,
97
+ ?prices: ::Array[Stigg::Models::V1::SubscriptionListResponse::Price],
98
+ ?resource_id: String?,
99
+ ?trial_end_date: Time?
100
+ ) -> void
101
+
102
+ def to_hash: -> {
103
+ id: String,
104
+ billing_id: String?,
105
+ created_at: Time,
106
+ customer_id: String,
107
+ payment_collection: Stigg::Models::V1::SubscriptionListResponse::payment_collection,
108
+ plan_id: String,
109
+ pricing_type: Stigg::Models::V1::SubscriptionListResponse::pricing_type,
110
+ start_date: Time,
111
+ status: Stigg::Models::V1::SubscriptionListResponse::status,
112
+ cancellation_date: Time?,
113
+ cancel_reason: Stigg::Models::V1::SubscriptionListResponse::cancel_reason?,
114
+ current_billing_period_end: Time?,
115
+ current_billing_period_start: Time?,
116
+ effective_end_date: Time?,
117
+ end_date: Time?,
118
+ metadata: ::Hash[Symbol, String],
119
+ paying_customer_id: String?,
120
+ payment_collection_method: Stigg::Models::V1::SubscriptionListResponse::payment_collection_method?,
121
+ prices: ::Array[Stigg::Models::V1::SubscriptionListResponse::Price],
122
+ resource_id: String?,
123
+ trial_end_date: Time?
124
+ }
125
+
126
+ type payment_collection =
127
+ :NOT_REQUIRED | :PROCESSING | :FAILED | :ACTION_REQUIRED
128
+
129
+ module PaymentCollection
130
+ extend Stigg::Internal::Type::Enum
131
+
132
+ NOT_REQUIRED: :NOT_REQUIRED
133
+ PROCESSING: :PROCESSING
134
+ FAILED: :FAILED
135
+ ACTION_REQUIRED: :ACTION_REQUIRED
136
+
137
+ def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionListResponse::payment_collection]
138
+ end
63
139
 
64
- attr_accessor cancellation_date: Time?
140
+ type pricing_type = :FREE | :PAID | :CUSTOM
65
141
 
66
- attr_accessor cancel_reason: Stigg::Models::V1::SubscriptionListResponse::Data::cancel_reason?
142
+ module PricingType
143
+ extend Stigg::Internal::Type::Enum
67
144
 
68
- attr_accessor current_billing_period_end: Time?
145
+ FREE: :FREE
146
+ PAID: :PAID
147
+ CUSTOM: :CUSTOM
69
148
 
70
- attr_accessor current_billing_period_start: Time?
149
+ def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionListResponse::pricing_type]
150
+ end
71
151
 
72
- attr_accessor effective_end_date: Time?
152
+ type status =
153
+ :PAYMENT_PENDING
154
+ | :ACTIVE
155
+ | :EXPIRED
156
+ | :IN_TRIAL
157
+ | :CANCELED
158
+ | :NOT_STARTED
159
+
160
+ module Status
161
+ extend Stigg::Internal::Type::Enum
162
+
163
+ PAYMENT_PENDING: :PAYMENT_PENDING
164
+ ACTIVE: :ACTIVE
165
+ EXPIRED: :EXPIRED
166
+ IN_TRIAL: :IN_TRIAL
167
+ CANCELED: :CANCELED
168
+ NOT_STARTED: :NOT_STARTED
169
+
170
+ def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionListResponse::status]
171
+ end
73
172
 
74
- attr_accessor end_date: Time?
173
+ type cancel_reason =
174
+ :UPGRADE_OR_DOWNGRADE
175
+ | :CANCELLED_BY_BILLING
176
+ | :EXPIRED
177
+ | :DETACH_BILLING
178
+ | :TRIAL_ENDED
179
+ | :Immediate
180
+ | :TRIAL_CONVERTED
181
+ | :PENDING_PAYMENT_EXPIRED
182
+ | :ScheduledCancellation
183
+ | :CustomerArchived
184
+ | :AutoCancellationRule
185
+
186
+ module CancelReason
187
+ extend Stigg::Internal::Type::Enum
188
+
189
+ UPGRADE_OR_DOWNGRADE: :UPGRADE_OR_DOWNGRADE
190
+ CANCELLED_BY_BILLING: :CANCELLED_BY_BILLING
191
+ EXPIRED: :EXPIRED
192
+ DETACH_BILLING: :DETACH_BILLING
193
+ TRIAL_ENDED: :TRIAL_ENDED
194
+ IMMEDIATE: :Immediate
195
+ TRIAL_CONVERTED: :TRIAL_CONVERTED
196
+ PENDING_PAYMENT_EXPIRED: :PENDING_PAYMENT_EXPIRED
197
+ SCHEDULED_CANCELLATION: :ScheduledCancellation
198
+ CUSTOMER_ARCHIVED: :CustomerArchived
199
+ AUTO_CANCELLATION_RULE: :AutoCancellationRule
200
+
201
+ def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionListResponse::cancel_reason]
202
+ end
75
203
 
76
- attr_reader metadata: ::Hash[Symbol, String]?
204
+ type payment_collection_method = :CHARGE | :INVOICE | :NONE
77
205
 
78
- def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
206
+ module PaymentCollectionMethod
207
+ extend Stigg::Internal::Type::Enum
79
208
 
80
- attr_accessor paying_customer_id: String?
209
+ CHARGE: :CHARGE
210
+ INVOICE: :INVOICE
211
+ NONE: :NONE
81
212
 
82
- attr_accessor payment_collection_method: Stigg::Models::V1::SubscriptionListResponse::Data::payment_collection_method?
213
+ def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionListResponse::payment_collection_method]
214
+ end
83
215
 
84
- attr_accessor resource_id: String?
216
+ type price = { id: String, created_at: String, updated_at: String }
85
217
 
86
- attr_accessor trial_end_date: Time?
218
+ class Price < Stigg::Internal::Type::BaseModel
219
+ attr_accessor id: String
220
+
221
+ attr_accessor created_at: String
222
+
223
+ attr_accessor updated_at: String
87
224
 
88
225
  def initialize: (
89
226
  id: String,
90
- billing_id: String?,
91
- created_at: Time,
92
- cursor_id: String,
93
- customer_id: String,
94
- payment_collection: Stigg::Models::V1::SubscriptionListResponse::Data::payment_collection,
95
- plan_id: String,
96
- pricing_type: Stigg::Models::V1::SubscriptionListResponse::Data::pricing_type,
97
- start_date: Time,
98
- status: Stigg::Models::V1::SubscriptionListResponse::Data::status,
99
- ?cancellation_date: Time?,
100
- ?cancel_reason: Stigg::Models::V1::SubscriptionListResponse::Data::cancel_reason?,
101
- ?current_billing_period_end: Time?,
102
- ?current_billing_period_start: Time?,
103
- ?effective_end_date: Time?,
104
- ?end_date: Time?,
105
- ?metadata: ::Hash[Symbol, String],
106
- ?paying_customer_id: String?,
107
- ?payment_collection_method: Stigg::Models::V1::SubscriptionListResponse::Data::payment_collection_method?,
108
- ?resource_id: String?,
109
- ?trial_end_date: Time?
227
+ created_at: String,
228
+ updated_at: String
110
229
  ) -> void
111
230
 
112
- def to_hash: -> {
113
- id: String,
114
- billing_id: String?,
115
- created_at: Time,
116
- cursor_id: String,
117
- customer_id: String,
118
- payment_collection: Stigg::Models::V1::SubscriptionListResponse::Data::payment_collection,
119
- plan_id: String,
120
- pricing_type: Stigg::Models::V1::SubscriptionListResponse::Data::pricing_type,
121
- start_date: Time,
122
- status: Stigg::Models::V1::SubscriptionListResponse::Data::status,
123
- cancellation_date: Time?,
124
- cancel_reason: Stigg::Models::V1::SubscriptionListResponse::Data::cancel_reason?,
125
- current_billing_period_end: Time?,
126
- current_billing_period_start: Time?,
127
- effective_end_date: Time?,
128
- end_date: Time?,
129
- metadata: ::Hash[Symbol, String],
130
- paying_customer_id: String?,
131
- payment_collection_method: Stigg::Models::V1::SubscriptionListResponse::Data::payment_collection_method?,
132
- resource_id: String?,
133
- trial_end_date: Time?
134
- }
135
-
136
- type payment_collection =
137
- :NOT_REQUIRED | :PROCESSING | :FAILED | :ACTION_REQUIRED
138
-
139
- module PaymentCollection
140
- extend Stigg::Internal::Type::Enum
141
-
142
- NOT_REQUIRED: :NOT_REQUIRED
143
- PROCESSING: :PROCESSING
144
- FAILED: :FAILED
145
- ACTION_REQUIRED: :ACTION_REQUIRED
146
-
147
- def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionListResponse::Data::payment_collection]
148
- end
149
-
150
- type pricing_type = :FREE | :PAID | :CUSTOM
151
-
152
- module PricingType
153
- extend Stigg::Internal::Type::Enum
154
-
155
- FREE: :FREE
156
- PAID: :PAID
157
- CUSTOM: :CUSTOM
158
-
159
- def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionListResponse::Data::pricing_type]
160
- end
161
-
162
- type status =
163
- :PAYMENT_PENDING
164
- | :ACTIVE
165
- | :EXPIRED
166
- | :IN_TRIAL
167
- | :CANCELED
168
- | :NOT_STARTED
169
-
170
- module Status
171
- extend Stigg::Internal::Type::Enum
172
-
173
- PAYMENT_PENDING: :PAYMENT_PENDING
174
- ACTIVE: :ACTIVE
175
- EXPIRED: :EXPIRED
176
- IN_TRIAL: :IN_TRIAL
177
- CANCELED: :CANCELED
178
- NOT_STARTED: :NOT_STARTED
179
-
180
- def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionListResponse::Data::status]
181
- end
182
-
183
- type cancel_reason =
184
- :UPGRADE_OR_DOWNGRADE
185
- | :CANCELLED_BY_BILLING
186
- | :EXPIRED
187
- | :DETACH_BILLING
188
- | :TRIAL_ENDED
189
- | :Immediate
190
- | :TRIAL_CONVERTED
191
- | :PENDING_PAYMENT_EXPIRED
192
- | :ScheduledCancellation
193
- | :CustomerArchived
194
- | :AutoCancellationRule
195
-
196
- module CancelReason
197
- extend Stigg::Internal::Type::Enum
198
-
199
- UPGRADE_OR_DOWNGRADE: :UPGRADE_OR_DOWNGRADE
200
- CANCELLED_BY_BILLING: :CANCELLED_BY_BILLING
201
- EXPIRED: :EXPIRED
202
- DETACH_BILLING: :DETACH_BILLING
203
- TRIAL_ENDED: :TRIAL_ENDED
204
- IMMEDIATE: :Immediate
205
- TRIAL_CONVERTED: :TRIAL_CONVERTED
206
- PENDING_PAYMENT_EXPIRED: :PENDING_PAYMENT_EXPIRED
207
- SCHEDULED_CANCELLATION: :ScheduledCancellation
208
- CUSTOMER_ARCHIVED: :CustomerArchived
209
- AUTO_CANCELLATION_RULE: :AutoCancellationRule
210
-
211
- def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionListResponse::Data::cancel_reason]
212
- end
213
-
214
- type payment_collection_method = :CHARGE | :INVOICE | :NONE
215
-
216
- module PaymentCollectionMethod
217
- extend Stigg::Internal::Type::Enum
218
-
219
- CHARGE: :CHARGE
220
- INVOICE: :INVOICE
221
- NONE: :NONE
222
-
223
- def self?.values: -> ::Array[Stigg::Models::V1::SubscriptionListResponse::Data::payment_collection_method]
224
- end
231
+ def to_hash: -> { id: String, created_at: String, updated_at: String }
225
232
  end
226
233
  end
227
234
  end
@@ -264,15 +264,11 @@ module Stigg
264
264
  class AmountsOff < Stigg::Internal::Type::BaseModel
265
265
  attr_accessor amount: Float
266
266
 
267
- attr_reader currency: Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::currency?
268
-
269
- def currency=: (
270
- Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::currency
271
- ) -> Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::currency
267
+ attr_accessor currency: Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::currency
272
268
 
273
269
  def initialize: (
274
270
  amount: Float,
275
- ?currency: Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::currency
271
+ currency: Stigg::Models::V1::SubscriptionPreviewParams::AppliedCoupon::Discount::AmountsOff::currency
276
272
  ) -> void
277
273
 
278
274
  def to_hash: -> {