stigg 0.1.0.pre.alpha.2 → 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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/stigg/internal/type/base_model.rb +2 -2
  5. data/lib/stigg/models/v1/{coupon_create_response.rb → coupon.rb} +24 -24
  6. data/lib/stigg/models/v1/customer_import_params.rb +75 -0
  7. data/lib/stigg/models/v1/customer_import_response.rb +35 -0
  8. data/lib/stigg/models/v1/{customer_create_params.rb → customer_provision_params.rb} +16 -16
  9. data/lib/stigg/models/v1/customer_response.rb +1 -1
  10. data/lib/stigg/models/v1/customers/promotional_entitlement_grant_params.rb +296 -0
  11. data/lib/stigg/models/v1/customers/promotional_entitlement_grant_response.rb +341 -0
  12. data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_params.rb +24 -0
  13. data/lib/stigg/models/v1/customers/promotional_entitlement_revoke_response.rb +342 -0
  14. data/lib/stigg/models/v1/event_report_params.rb +91 -0
  15. data/lib/stigg/models/v1/event_report_response.rb +25 -0
  16. data/lib/stigg/models/v1/{subscription_retrieve_response.rb → subscription.rb} +30 -29
  17. data/lib/stigg/models/v1/subscription_cancel_params.rb +75 -0
  18. data/lib/stigg/models/v1/subscription_import_params.rb +92 -0
  19. data/lib/stigg/models/v1/subscription_import_response.rb +32 -0
  20. data/lib/stigg/models/v1/{subscription_create_params.rb → subscription_provision_params.rb} +118 -118
  21. data/lib/stigg/models/v1/{subscription_create_response.rb → subscription_provision_response.rb} +76 -75
  22. data/lib/stigg/models/v1/subscription_update_params.rb +1114 -0
  23. data/lib/stigg/models/v1/subscriptions/{future_update_cancel_pending_payment_response.rb → cancel_subscription.rb} +7 -5
  24. data/lib/stigg/models/v1/usage_history_params.rb +54 -0
  25. data/lib/stigg/models/v1/usage_history_response.rb +155 -0
  26. data/lib/stigg/models/v1/usage_report_params.rb +114 -0
  27. data/lib/stigg/models/v1/usage_report_response.rb +120 -0
  28. data/lib/stigg/models.rb +0 -4
  29. data/lib/stigg/resources/v1/coupons.rb +4 -4
  30. data/lib/stigg/resources/v1/customers/promotional_entitlements.rb +69 -0
  31. data/lib/stigg/resources/v1/customers.rb +59 -37
  32. data/lib/stigg/resources/v1/events.rb +38 -0
  33. data/lib/stigg/resources/v1/subscriptions/future_update.rb +4 -4
  34. data/lib/stigg/resources/v1/subscriptions.rb +166 -64
  35. data/lib/stigg/resources/v1/usage.rb +79 -0
  36. data/lib/stigg/resources/v1.rb +6 -42
  37. data/lib/stigg/version.rb +1 -1
  38. data/lib/stigg.rb +25 -16
  39. data/rbi/stigg/models/v1/{coupon_create_response.rbi → coupon.rbi} +156 -252
  40. data/rbi/stigg/models/v1/customer_import_params.rbi +130 -0
  41. data/rbi/stigg/models/v1/customer_import_response.rbi +76 -0
  42. data/rbi/stigg/models/v1/{customer_create_params.rbi → customer_provision_params.rbi} +35 -35
  43. data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_params.rbi +640 -0
  44. data/rbi/stigg/models/v1/customers/promotional_entitlement_grant_response.rbi +690 -0
  45. data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbi +42 -0
  46. data/rbi/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbi +696 -0
  47. data/rbi/stigg/models/v1/event_report_params.rbi +168 -0
  48. data/rbi/stigg/models/v1/event_report_response.rbi +35 -0
  49. data/rbi/stigg/models/v1/{subscription_migrate_response.rbi → subscription.rbi} +66 -117
  50. data/rbi/stigg/models/v1/subscription_cancel_params.rbi +182 -0
  51. data/rbi/stigg/models/v1/subscription_import_params.rbi +148 -0
  52. data/rbi/stigg/models/v1/subscription_import_response.rbi +69 -0
  53. data/rbi/stigg/models/v1/{subscription_create_params.rbi → subscription_provision_params.rbi} +794 -773
  54. data/rbi/stigg/models/v1/{subscription_create_response.rbi → subscription_provision_response.rbi} +481 -481
  55. data/rbi/stigg/models/v1/subscription_update_params.rbi +3578 -0
  56. data/rbi/stigg/models/v1/subscriptions/{future_update_cancel_schedule_response.rbi → cancel_subscription.rbi} +9 -16
  57. data/rbi/stigg/models/v1/usage_history_params.rbi +79 -0
  58. data/rbi/stigg/models/v1/usage_history_response.rbi +347 -0
  59. data/rbi/stigg/models/v1/usage_report_params.rbi +227 -0
  60. data/rbi/stigg/models/v1/usage_report_response.rbi +162 -0
  61. data/rbi/stigg/models.rbi +0 -4
  62. data/rbi/stigg/resources/v1/coupons.rbi +2 -2
  63. data/rbi/stigg/resources/v1/customers/promotional_entitlements.rbi +57 -0
  64. data/rbi/stigg/resources/v1/customers.rbi +53 -36
  65. data/rbi/stigg/resources/v1/events.rbi +28 -0
  66. data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +2 -6
  67. data/rbi/stigg/resources/v1/subscriptions.rbi +179 -74
  68. data/rbi/stigg/resources/v1/usage.rbi +57 -0
  69. data/rbi/stigg/resources/v1.rbi +4 -26
  70. data/sig/stigg/models/v1/{coupon_create_response.rbs → coupon.rbs} +29 -32
  71. data/sig/stigg/models/v1/customer_import_params.rbs +74 -0
  72. data/sig/stigg/models/v1/customer_import_response.rbs +30 -0
  73. data/sig/stigg/models/v1/{customer_create_params.rbs → customer_provision_params.rbs} +22 -22
  74. data/sig/stigg/models/v1/customers/promotional_entitlement_grant_params.rbs +234 -0
  75. data/sig/stigg/models/v1/customers/promotional_entitlement_grant_response.rbs +281 -0
  76. data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_params.rbs +27 -0
  77. data/sig/stigg/models/v1/customers/promotional_entitlement_revoke_response.rbs +281 -0
  78. data/sig/stigg/models/v1/event_report_params.rbs +82 -0
  79. data/sig/stigg/models/v1/event_report_response.rbs +15 -0
  80. data/sig/stigg/models/v1/{subscription_retrieve_response.rbs → subscription.rbs} +36 -41
  81. data/sig/stigg/models/v1/subscription_cancel_params.rbs +79 -0
  82. data/sig/stigg/models/v1/subscription_import_params.rbs +84 -0
  83. data/sig/stigg/models/v1/subscription_import_response.rbs +30 -0
  84. data/sig/stigg/models/v1/{subscription_create_params.rbs → subscription_provision_params.rbs} +200 -200
  85. data/sig/stigg/models/v1/{subscription_create_response.rbs → subscription_provision_response.rbs} +106 -106
  86. data/sig/stigg/models/v1/subscription_update_params.rbs +1544 -0
  87. data/sig/stigg/models/v1/subscriptions/cancel_subscription.rbs +34 -0
  88. data/sig/stigg/models/v1/usage_history_params.rbs +52 -0
  89. data/sig/stigg/models/v1/usage_history_response.rbs +129 -0
  90. data/sig/stigg/models/v1/usage_report_params.rbs +102 -0
  91. data/sig/stigg/models/v1/usage_report_response.rbs +87 -0
  92. data/sig/stigg/models.rbs +0 -4
  93. data/sig/stigg/resources/v1/coupons.rbs +2 -2
  94. data/sig/stigg/resources/v1/customers/promotional_entitlements.rbs +23 -0
  95. data/sig/stigg/resources/v1/customers.rbs +17 -12
  96. data/sig/stigg/resources/v1/events.rbs +14 -0
  97. data/sig/stigg/resources/v1/subscriptions/future_update.rbs +2 -2
  98. data/sig/stigg/resources/v1/subscriptions.rbs +65 -32
  99. data/sig/stigg/resources/v1/usage.rbs +24 -0
  100. data/sig/stigg/resources/v1.rbs +2 -8
  101. metadata +77 -50
  102. data/lib/stigg/models/v1/coupon_retrieve_response.rb +0 -322
  103. data/lib/stigg/models/v1/subscription_delegate_response.rb +0 -314
  104. data/lib/stigg/models/v1/subscription_migrate_response.rb +0 -314
  105. data/lib/stigg/models/v1/subscription_transfer_response.rb +0 -314
  106. data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +0 -34
  107. data/lib/stigg/models/v1_create_event_params.rb +0 -89
  108. data/lib/stigg/models/v1_create_event_response.rb +0 -23
  109. data/lib/stigg/models/v1_create_usage_params.rb +0 -112
  110. data/lib/stigg/models/v1_create_usage_response.rb +0 -118
  111. data/lib/stigg/resources/v1/customers/usage.rb +0 -18
  112. data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +0 -987
  113. data/rbi/stigg/models/v1/subscription_delegate_response.rbi +0 -618
  114. data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +0 -618
  115. data/rbi/stigg/models/v1/subscription_transfer_response.rbi +0 -618
  116. data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +0 -80
  117. data/rbi/stigg/models/v1_create_event_params.rbi +0 -161
  118. data/rbi/stigg/models/v1_create_event_response.rbi +0 -30
  119. data/rbi/stigg/models/v1_create_usage_params.rbi +0 -217
  120. data/rbi/stigg/models/v1_create_usage_response.rbi +0 -157
  121. data/rbi/stigg/resources/v1/customers/usage.rbi +0 -16
  122. data/sig/stigg/models/v1/coupon_retrieve_response.rbs +0 -394
  123. data/sig/stigg/models/v1/subscription_delegate_response.rbs +0 -255
  124. data/sig/stigg/models/v1/subscription_migrate_response.rbs +0 -255
  125. data/sig/stigg/models/v1/subscription_transfer_response.rbs +0 -255
  126. data/sig/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbs +0 -34
  127. data/sig/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbs +0 -34
  128. data/sig/stigg/models/v1_create_event_params.rbs +0 -80
  129. data/sig/stigg/models/v1_create_event_response.rbs +0 -13
  130. data/sig/stigg/models/v1_create_usage_params.rbs +0 -100
  131. data/sig/stigg/models/v1_create_usage_response.rbs +0 -85
  132. data/sig/stigg/resources/v1/customers/usage.rbs +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09fe96600df45ed243157d6113eba1fc3d9f67bd83ef3f1dcb14c26aa300c416'
4
- data.tar.gz: 930196b64fdd388d266e858a894c274118514670520f6a384a898d2c1ebf9e13
3
+ metadata.gz: d8e60f4fdad10d2d4b37e4f5d646accf564f8b280a86e1c9ba46b488138b1f43
4
+ data.tar.gz: eb0423ccd6a83e037421ab3e2d78187e6aff8024175a974af11d06d7f9f8a587
5
5
  SHA512:
6
- metadata.gz: 70a186ffd28a9dc88c13394fc9436c1b4b2e72b6679255467c40251cccfc36a4cea98ee2a903bf4444070085fc637c07f8e66cc98f49881f9f6be08911d725bd
7
- data.tar.gz: 712f901dbcfc87504a817aa47ec18f51ff62693e25031bfd0ba3509b90b2c19747783da7b15307a0f62d58093a9f90451abeb102b15f0aa55635f6ef4f2d5301
6
+ metadata.gz: f2a1589cf8dc649e0d0cbadd3d2b3d4722b062d9da08c4b435052c2e457fcbfbaeb92b0a9ae110a02a2692fdfae37fc2ca80ba2b9e6d80cadedd19a487d66d10
7
+ data.tar.gz: 6abfbdeca00d4e2a8269c0afd32ef00ddc785d710e38ff7d49787539dceee459e9ac0c094d06c0df6cbace4b59e8725f420c6c9ee43ce24683fb9e845ba18ff4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.3 (2026-01-29)
4
+
5
+ Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
6
+
7
+ ### Features
8
+
9
+ * **api:** update stainless config ([9d48da5](https://github.com/stiggio/stigg-ruby/commit/9d48da56de7780968ac51cdf3f80073bd8f3e7da))
10
+
3
11
  ## 0.1.0-alpha.2 (2026-01-28)
4
12
 
5
13
  Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "stigg", "~> 0.1.0.pre.alpha.2"
18
+ gem "stigg", "~> 0.1.0.pre.alpha.3"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -438,8 +438,8 @@ module Stigg
438
438
  # @return [Hash{Symbol=>Object}]
439
439
  #
440
440
  # @example
441
- # # `v1_create_event_response` is a `Stigg::Models::V1CreateEventResponse`
442
- # v1_create_event_response => {
441
+ # # `customer_response` is a `Stigg::V1::CustomerResponse`
442
+ # customer_response => {
443
443
  # data: data
444
444
  # }
445
445
  def deconstruct_keys(keys)
@@ -4,19 +4,19 @@ module Stigg
4
4
  module Models
5
5
  module V1
6
6
  # @see Stigg::Resources::V1::Coupons#create
7
- class CouponCreateResponse < Stigg::Internal::Type::BaseModel
7
+ class Coupon < Stigg::Internal::Type::BaseModel
8
8
  # @!attribute data
9
9
  # Discount instrument with percentage or fixed amount
10
10
  #
11
- # @return [Stigg::Models::V1::CouponCreateResponse::Data]
12
- required :data, -> { Stigg::Models::V1::CouponCreateResponse::Data }
11
+ # @return [Stigg::Models::V1::Coupon::Data]
12
+ required :data, -> { Stigg::V1::Coupon::Data }
13
13
 
14
14
  # @!method initialize(data:)
15
15
  # Response object
16
16
  #
17
- # @param data [Stigg::Models::V1::CouponCreateResponse::Data] Discount instrument with percentage or fixed amount
17
+ # @param data [Stigg::Models::V1::Coupon::Data] Discount instrument with percentage or fixed amount
18
18
 
19
- # @see Stigg::Models::V1::CouponCreateResponse#data
19
+ # @see Stigg::Models::V1::Coupon#data
20
20
  class Data < Stigg::Internal::Type::BaseModel
21
21
  # @!attribute id
22
22
  # The unique identifier for the entity
@@ -27,9 +27,9 @@ module Stigg
27
27
  # @!attribute amounts_off
28
28
  # Fixed amount discounts in different currencies
29
29
  #
30
- # @return [Array<Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff>, nil]
30
+ # @return [Array<Stigg::Models::V1::Coupon::Data::AmountsOff>, nil]
31
31
  required :amounts_off,
32
- -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff] },
32
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::Coupon::Data::AmountsOff] },
33
33
  api_name: :amountsOff,
34
34
  nil?: true
35
35
 
@@ -78,20 +78,20 @@ module Stigg
78
78
  # @!attribute source
79
79
  # The source of the coupon
80
80
  #
81
- # @return [Symbol, Stigg::Models::V1::CouponCreateResponse::Data::Source, nil]
82
- required :source, enum: -> { Stigg::Models::V1::CouponCreateResponse::Data::Source }, nil?: true
81
+ # @return [Symbol, Stigg::Models::V1::Coupon::Data::Source, nil]
82
+ required :source, enum: -> { Stigg::V1::Coupon::Data::Source }, nil?: true
83
83
 
84
84
  # @!attribute status
85
85
  # Current status of the coupon
86
86
  #
87
- # @return [Symbol, Stigg::Models::V1::CouponCreateResponse::Data::Status]
88
- required :status, enum: -> { Stigg::Models::V1::CouponCreateResponse::Data::Status }
87
+ # @return [Symbol, Stigg::Models::V1::Coupon::Data::Status]
88
+ required :status, enum: -> { Stigg::V1::Coupon::Data::Status }
89
89
 
90
90
  # @!attribute type
91
91
  # Type of the coupon (percentage or fixed amount)
92
92
  #
93
- # @return [Symbol, Stigg::Models::V1::CouponCreateResponse::Data::Type]
94
- required :type, enum: -> { Stigg::Models::V1::CouponCreateResponse::Data::Type }
93
+ # @return [Symbol, Stigg::Models::V1::Coupon::Data::Type]
94
+ required :type, enum: -> { Stigg::V1::Coupon::Data::Type }
95
95
 
96
96
  # @!attribute updated_at
97
97
  # Timestamp of when the record was last updated
@@ -104,7 +104,7 @@ module Stigg
104
104
  #
105
105
  # @param id [String] The unique identifier for the entity
106
106
  #
107
- # @param amounts_off [Array<Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff>, nil] Fixed amount discounts in different currencies
107
+ # @param amounts_off [Array<Stigg::Models::V1::Coupon::Data::AmountsOff>, nil] Fixed amount discounts in different currencies
108
108
  #
109
109
  # @param billing_id [String, nil] The unique identifier for the entity in the billing provider
110
110
  #
@@ -120,11 +120,11 @@ module Stigg
120
120
  #
121
121
  # @param percent_off [Float, nil] Percentage discount off the original price
122
122
  #
123
- # @param source [Symbol, Stigg::Models::V1::CouponCreateResponse::Data::Source, nil] The source of the coupon
123
+ # @param source [Symbol, Stigg::Models::V1::Coupon::Data::Source, nil] The source of the coupon
124
124
  #
125
- # @param status [Symbol, Stigg::Models::V1::CouponCreateResponse::Data::Status] Current status of the coupon
125
+ # @param status [Symbol, Stigg::Models::V1::Coupon::Data::Status] Current status of the coupon
126
126
  #
127
- # @param type [Symbol, Stigg::Models::V1::CouponCreateResponse::Data::Type] Type of the coupon (percentage or fixed amount)
127
+ # @param type [Symbol, Stigg::Models::V1::Coupon::Data::Type] Type of the coupon (percentage or fixed amount)
128
128
  #
129
129
  # @param updated_at [Time] Timestamp of when the record was last updated
130
130
 
@@ -138,19 +138,19 @@ module Stigg
138
138
  # @!attribute currency
139
139
  # The price currency
140
140
  #
141
- # @return [Symbol, Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff::Currency]
142
- required :currency, enum: -> { Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff::Currency }
141
+ # @return [Symbol, Stigg::Models::V1::Coupon::Data::AmountsOff::Currency]
142
+ required :currency, enum: -> { Stigg::V1::Coupon::Data::AmountsOff::Currency }
143
143
 
144
144
  # @!method initialize(amount:, currency:)
145
145
  # Monetary amount with currency
146
146
  #
147
147
  # @param amount [Float] The price amount
148
148
  #
149
- # @param currency [Symbol, Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff::Currency] The price currency
149
+ # @param currency [Symbol, Stigg::Models::V1::Coupon::Data::AmountsOff::Currency] The price currency
150
150
 
151
151
  # The price currency
152
152
  #
153
- # @see Stigg::Models::V1::CouponCreateResponse::Data::AmountsOff#currency
153
+ # @see Stigg::Models::V1::Coupon::Data::AmountsOff#currency
154
154
  module Currency
155
155
  extend Stigg::Internal::Type::Enum
156
156
 
@@ -278,7 +278,7 @@ module Stigg
278
278
 
279
279
  # The source of the coupon
280
280
  #
281
- # @see Stigg::Models::V1::CouponCreateResponse::Data#source
281
+ # @see Stigg::Models::V1::Coupon::Data#source
282
282
  module Source
283
283
  extend Stigg::Internal::Type::Enum
284
284
 
@@ -292,7 +292,7 @@ module Stigg
292
292
 
293
293
  # Current status of the coupon
294
294
  #
295
- # @see Stigg::Models::V1::CouponCreateResponse::Data#status
295
+ # @see Stigg::Models::V1::Coupon::Data#status
296
296
  module Status
297
297
  extend Stigg::Internal::Type::Enum
298
298
 
@@ -305,7 +305,7 @@ module Stigg
305
305
 
306
306
  # Type of the coupon (percentage or fixed amount)
307
307
  #
308
- # @see Stigg::Models::V1::CouponCreateResponse::Data#type
308
+ # @see Stigg::Models::V1::Coupon::Data#type
309
309
  module Type
310
310
  extend Stigg::Internal::Type::Enum
311
311
 
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Customers#import
7
+ class CustomerImportParams < Stigg::Internal::Type::BaseModel
8
+ extend Stigg::Internal::Type::RequestParameters::Converter
9
+ include Stigg::Internal::Type::RequestParameters
10
+
11
+ # @!attribute customers
12
+ # List of customer objects to import
13
+ #
14
+ # @return [Array<Stigg::Models::V1::CustomerImportParams::Customer>]
15
+ required :customers, -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::CustomerImportParams::Customer] }
16
+
17
+ # @!method initialize(customers:, request_options: {})
18
+ # @param customers [Array<Stigg::Models::V1::CustomerImportParams::Customer>] List of customer objects to import
19
+ #
20
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
21
+
22
+ class Customer < Stigg::Internal::Type::BaseModel
23
+ # @!attribute id
24
+ # Customer slug
25
+ #
26
+ # @return [String]
27
+ required :id, String
28
+
29
+ # @!attribute email
30
+ # The email of the customer
31
+ #
32
+ # @return [String, nil]
33
+ required :email, String, nil?: true
34
+
35
+ # @!attribute name
36
+ # The name of the customer
37
+ #
38
+ # @return [String, nil]
39
+ required :name, String, nil?: true
40
+
41
+ # @!attribute metadata
42
+ # Additional metadata
43
+ #
44
+ # @return [Hash{Symbol=>String}, nil]
45
+ optional :metadata, Stigg::Internal::Type::HashOf[String]
46
+
47
+ # @!attribute payment_method_id
48
+ # Billing provider payment method id
49
+ #
50
+ # @return [String, nil]
51
+ optional :payment_method_id, String, api_name: :paymentMethodId
52
+
53
+ # @!attribute updated_at
54
+ # Timestamp of when the record was last updated
55
+ #
56
+ # @return [Time, nil]
57
+ optional :updated_at, Time, api_name: :updatedAt
58
+
59
+ # @!method initialize(id:, email:, name:, metadata: nil, payment_method_id: nil, updated_at: nil)
60
+ # @param id [String] Customer slug
61
+ #
62
+ # @param email [String, nil] The email of the customer
63
+ #
64
+ # @param name [String, nil] The name of the customer
65
+ #
66
+ # @param metadata [Hash{Symbol=>String}] Additional metadata
67
+ #
68
+ # @param payment_method_id [String] Billing provider payment method id
69
+ #
70
+ # @param updated_at [Time] Timestamp of when the record was last updated
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Customers#import
7
+ class CustomerImportResponse < Stigg::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ # List of newly created customer IDs from the import operation.
10
+ #
11
+ # @return [Stigg::Models::V1::CustomerImportResponse::Data]
12
+ required :data, -> { Stigg::Models::V1::CustomerImportResponse::Data }
13
+
14
+ # @!method initialize(data:)
15
+ # Response object
16
+ #
17
+ # @param data [Stigg::Models::V1::CustomerImportResponse::Data] List of newly created customer IDs from the import operation.
18
+
19
+ # @see Stigg::Models::V1::CustomerImportResponse#data
20
+ class Data < Stigg::Internal::Type::BaseModel
21
+ # @!attribute new_customers
22
+ # Customer IDs created during import
23
+ #
24
+ # @return [Array<String>]
25
+ required :new_customers, Stigg::Internal::Type::ArrayOf[String], api_name: :newCustomers
26
+
27
+ # @!method initialize(new_customers:)
28
+ # List of newly created customer IDs from the import operation.
29
+ #
30
+ # @param new_customers [Array<String>] Customer IDs created during import
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -3,8 +3,8 @@
3
3
  module Stigg
4
4
  module Models
5
5
  module V1
6
- # @see Stigg::Resources::V1::Customers#create
7
- class CustomerCreateParams < Stigg::Internal::Type::BaseModel
6
+ # @see Stigg::Resources::V1::Customers#provision
7
+ class CustomerProvisionParams < Stigg::Internal::Type::BaseModel
8
8
  extend Stigg::Internal::Type::RequestParameters::Converter
9
9
  include Stigg::Internal::Type::RequestParameters
10
10
 
@@ -23,9 +23,9 @@ module Stigg
23
23
  # @!attribute default_payment_method
24
24
  # The default payment method details
25
25
  #
26
- # @return [Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod, nil]
26
+ # @return [Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod, nil]
27
27
  optional :default_payment_method,
28
- -> { Stigg::V1::CustomerCreateParams::DefaultPaymentMethod },
28
+ -> { Stigg::V1::CustomerProvisionParams::DefaultPaymentMethod },
29
29
  api_name: :defaultPaymentMethod,
30
30
  nil?: true
31
31
 
@@ -38,9 +38,9 @@ module Stigg
38
38
  # @!attribute integrations
39
39
  # List of integrations
40
40
  #
41
- # @return [Array<Stigg::Models::V1::CustomerCreateParams::Integration>, nil]
41
+ # @return [Array<Stigg::Models::V1::CustomerProvisionParams::Integration>, nil]
42
42
  optional :integrations,
43
- -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::CustomerCreateParams::Integration] }
43
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::CustomerProvisionParams::Integration] }
44
44
 
45
45
  # @!attribute metadata
46
46
  # Additional metadata
@@ -59,11 +59,11 @@ module Stigg
59
59
  #
60
60
  # @param coupon_id [String, nil] Customer level coupon
61
61
  #
62
- # @param default_payment_method [Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod, nil] The default payment method details
62
+ # @param default_payment_method [Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod, nil] The default payment method details
63
63
  #
64
64
  # @param email [String, nil] The email of the customer
65
65
  #
66
- # @param integrations [Array<Stigg::Models::V1::CustomerCreateParams::Integration>] List of integrations
66
+ # @param integrations [Array<Stigg::Models::V1::CustomerProvisionParams::Integration>] List of integrations
67
67
  #
68
68
  # @param metadata [Hash{Symbol=>String}] Additional metadata
69
69
  #
@@ -99,8 +99,8 @@ module Stigg
99
99
  # @!attribute type
100
100
  # The default payment method type
101
101
  #
102
- # @return [Symbol, Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod::Type]
103
- required :type, enum: -> { Stigg::V1::CustomerCreateParams::DefaultPaymentMethod::Type }
102
+ # @return [Symbol, Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod::Type]
103
+ required :type, enum: -> { Stigg::V1::CustomerProvisionParams::DefaultPaymentMethod::Type }
104
104
 
105
105
  # @!method initialize(billing_id:, card_expiry_month:, card_expiry_year:, card_last4_digits:, type:)
106
106
  # The default payment method details
@@ -113,11 +113,11 @@ module Stigg
113
113
  #
114
114
  # @param card_last4_digits [String, nil] The last 4 digits of the default payment method
115
115
  #
116
- # @param type [Symbol, Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod::Type] The default payment method type
116
+ # @param type [Symbol, Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod::Type] The default payment method type
117
117
 
118
118
  # The default payment method type
119
119
  #
120
- # @see Stigg::Models::V1::CustomerCreateParams::DefaultPaymentMethod#type
120
+ # @see Stigg::Models::V1::CustomerProvisionParams::DefaultPaymentMethod#type
121
121
  module Type
122
122
  extend Stigg::Internal::Type::Enum
123
123
 
@@ -146,9 +146,9 @@ module Stigg
146
146
  # @!attribute vendor_identifier
147
147
  # The vendor identifier of integration
148
148
  #
149
- # @return [Symbol, Stigg::Models::V1::CustomerCreateParams::Integration::VendorIdentifier]
149
+ # @return [Symbol, Stigg::Models::V1::CustomerProvisionParams::Integration::VendorIdentifier]
150
150
  required :vendor_identifier,
151
- enum: -> { Stigg::V1::CustomerCreateParams::Integration::VendorIdentifier },
151
+ enum: -> { Stigg::V1::CustomerProvisionParams::Integration::VendorIdentifier },
152
152
  api_name: :vendorIdentifier
153
153
 
154
154
  # @!method initialize(id:, synced_entity_id:, vendor_identifier:)
@@ -158,11 +158,11 @@ module Stigg
158
158
  #
159
159
  # @param synced_entity_id [String, nil] Synced entity id
160
160
  #
161
- # @param vendor_identifier [Symbol, Stigg::Models::V1::CustomerCreateParams::Integration::VendorIdentifier] The vendor identifier of integration
161
+ # @param vendor_identifier [Symbol, Stigg::Models::V1::CustomerProvisionParams::Integration::VendorIdentifier] The vendor identifier of integration
162
162
 
163
163
  # The vendor identifier of integration
164
164
  #
165
- # @see Stigg::Models::V1::CustomerCreateParams::Integration#vendor_identifier
165
+ # @see Stigg::Models::V1::CustomerProvisionParams::Integration#vendor_identifier
166
166
  module VendorIdentifier
167
167
  extend Stigg::Internal::Type::Enum
168
168
 
@@ -3,7 +3,7 @@
3
3
  module Stigg
4
4
  module Models
5
5
  module V1
6
- # @see Stigg::Resources::V1::Customers#create
6
+ # @see Stigg::Resources::V1::Customers#retrieve
7
7
  class CustomerResponse < Stigg::Internal::Type::BaseModel
8
8
  # @!attribute data
9
9
  # A customer can be either an organization or an individual