stigg 0.1.0.pre.alpha.1 → 0.1.0.pre.alpha.2

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 (124) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +29 -1
  4. data/lib/stigg/internal/my_cursor_id_page.rb +32 -4
  5. data/lib/stigg/models/v1/coupon_create_params.rb +2 -0
  6. data/lib/stigg/models/v1/coupon_create_response.rb +11 -6
  7. data/lib/stigg/models/v1/coupon_list_params.rb +14 -14
  8. data/lib/stigg/models/v1/coupon_list_response.rb +262 -278
  9. data/lib/stigg/models/v1/coupon_retrieve_response.rb +11 -6
  10. data/lib/stigg/models/v1/customer_create_params.rb +2 -0
  11. data/lib/stigg/models/v1/customer_list_params.rb +14 -14
  12. data/lib/stigg/models/v1/customer_list_response.rb +160 -174
  13. data/lib/stigg/models/v1/customer_response.rb +8 -1
  14. data/lib/stigg/models/v1/customer_update_params.rb +2 -0
  15. data/lib/stigg/models/v1/customers/payment_method_attach_params.rb +3 -1
  16. data/lib/stigg/models/v1/subscription_create_params.rb +1485 -6
  17. data/lib/stigg/models/v1/subscription_create_response.rb +703 -4
  18. data/lib/stigg/models/v1/subscription_delegate_params.rb +7 -2
  19. data/lib/stigg/models/v1/subscription_delegate_response.rb +42 -2
  20. data/lib/stigg/models/v1/subscription_list_params.rb +20 -24
  21. data/lib/stigg/models/v1/subscription_list_response.rb +255 -236
  22. data/lib/stigg/models/v1/subscription_migrate_params.rb +3 -3
  23. data/lib/stigg/models/v1/subscription_migrate_response.rb +42 -2
  24. data/lib/stigg/models/v1/subscription_preview_params.rb +139 -46
  25. data/lib/stigg/models/v1/subscription_preview_response.rb +164 -49
  26. data/lib/stigg/models/v1/subscription_retrieve_response.rb +42 -2
  27. data/lib/stigg/models/v1/subscription_transfer_params.rb +2 -6
  28. data/lib/stigg/models/v1/subscription_transfer_response.rb +42 -2
  29. data/lib/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rb +2 -0
  30. data/lib/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rb +2 -0
  31. data/lib/stigg/models/v1_create_event_params.rb +2 -0
  32. data/lib/stigg/models/v1_create_event_response.rb +8 -1
  33. data/lib/stigg/models/v1_create_usage_params.rb +19 -3
  34. data/lib/stigg/models/v1_create_usage_response.rb +7 -1
  35. data/lib/stigg/resources/v1/coupons.rb +12 -10
  36. data/lib/stigg/resources/v1/customers/payment_method.rb +6 -5
  37. data/lib/stigg/resources/v1/customers/usage.rb +0 -41
  38. data/lib/stigg/resources/v1/customers.rb +20 -20
  39. data/lib/stigg/resources/v1/subscriptions/future_update.rb +6 -4
  40. data/lib/stigg/resources/v1/subscriptions.rb +74 -49
  41. data/lib/stigg/resources/v1.rb +2 -2
  42. data/lib/stigg/version.rb +1 -1
  43. data/lib/stigg.rb +0 -7
  44. data/rbi/stigg/internal/my_cursor_id_page.rbi +27 -0
  45. data/rbi/stigg/models/v1/coupon_create_params.rbi +1 -0
  46. data/rbi/stigg/models/v1/coupon_create_response.rbi +11 -10
  47. data/rbi/stigg/models/v1/coupon_list_params.rbi +21 -21
  48. data/rbi/stigg/models/v1/coupon_list_response.rbi +812 -869
  49. data/rbi/stigg/models/v1/coupon_retrieve_response.rbi +11 -10
  50. data/rbi/stigg/models/v1/customer_create_params.rbi +1 -0
  51. data/rbi/stigg/models/v1/customer_list_params.rbi +21 -21
  52. data/rbi/stigg/models/v1/customer_list_response.rbi +307 -347
  53. data/rbi/stigg/models/v1/customer_response.rbi +8 -1
  54. data/rbi/stigg/models/v1/customer_update_params.rbi +1 -0
  55. data/rbi/stigg/models/v1/customers/payment_method_attach_params.rbi +3 -0
  56. data/rbi/stigg/models/v1/subscription_create_params.rbi +4975 -84
  57. data/rbi/stigg/models/v1/subscription_create_response.rbi +2508 -1
  58. data/rbi/stigg/models/v1/subscription_delegate_params.rbi +6 -2
  59. data/rbi/stigg/models/v1/subscription_delegate_response.rbi +84 -1
  60. data/rbi/stigg/models/v1/subscription_list_params.rbi +26 -28
  61. data/rbi/stigg/models/v1/subscription_list_response.rbi +460 -435
  62. data/rbi/stigg/models/v1/subscription_migrate_params.rbi +3 -3
  63. data/rbi/stigg/models/v1/subscription_migrate_response.rbi +84 -1
  64. data/rbi/stigg/models/v1/subscription_preview_params.rbi +112 -14
  65. data/rbi/stigg/models/v1/subscription_preview_response.rbi +139 -6
  66. data/rbi/stigg/models/v1/subscription_retrieve_response.rbi +84 -1
  67. data/rbi/stigg/models/v1/subscription_transfer_params.rbi +2 -4
  68. data/rbi/stigg/models/v1/subscription_transfer_response.rbi +84 -1
  69. data/rbi/stigg/models/v1/subscriptions/future_update_cancel_pending_payment_response.rbi +1 -0
  70. data/rbi/stigg/models/v1/subscriptions/future_update_cancel_schedule_response.rbi +1 -0
  71. data/rbi/stigg/models/v1_create_event_params.rbi +1 -0
  72. data/rbi/stigg/models/v1_create_event_response.rbi +8 -1
  73. data/rbi/stigg/models/v1_create_usage_params.rbi +44 -4
  74. data/rbi/stigg/models/v1_create_usage_response.rbi +8 -1
  75. data/rbi/stigg/resources/v1/coupons.rbi +20 -12
  76. data/rbi/stigg/resources/v1/customers/payment_method.rbi +9 -3
  77. data/rbi/stigg/resources/v1/customers/usage.rbi +0 -29
  78. data/rbi/stigg/resources/v1/customers.rbi +34 -20
  79. data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +12 -4
  80. data/rbi/stigg/resources/v1/subscriptions.rbi +102 -23
  81. data/rbi/stigg/resources/v1.rbi +2 -2
  82. data/sig/stigg/internal/my_cursor_id_page.rbs +17 -0
  83. data/sig/stigg/models/v1/coupon_create_response.rbs +4 -4
  84. data/sig/stigg/models/v1/coupon_list_params.rbs +11 -11
  85. data/sig/stigg/models/v1/coupon_list_response.rbs +331 -351
  86. data/sig/stigg/models/v1/coupon_retrieve_response.rbs +4 -4
  87. data/sig/stigg/models/v1/customer_list_params.rbs +11 -11
  88. data/sig/stigg/models/v1/customer_list_response.rbs +133 -153
  89. data/sig/stigg/models/v1/subscription_create_params.rbs +2029 -5
  90. data/sig/stigg/models/v1/subscription_create_response.rbs +1022 -0
  91. data/sig/stigg/models/v1/subscription_delegate_response.rbs +31 -0
  92. data/sig/stigg/models/v1/subscription_list_params.rbs +14 -14
  93. data/sig/stigg/models/v1/subscription_list_response.rbs +196 -189
  94. data/sig/stigg/models/v1/subscription_migrate_response.rbs +31 -0
  95. data/sig/stigg/models/v1/subscription_preview_params.rbs +2 -6
  96. data/sig/stigg/models/v1/subscription_retrieve_response.rbs +31 -0
  97. data/sig/stigg/models/v1/subscription_transfer_response.rbs +31 -0
  98. data/sig/stigg/models/v1_create_usage_params.rbs +15 -5
  99. data/sig/stigg/resources/v1/coupons.rbs +3 -3
  100. data/sig/stigg/resources/v1/customers/usage.rbs +0 -10
  101. data/sig/stigg/resources/v1/customers.rbs +3 -5
  102. data/sig/stigg/resources/v1/subscriptions.rbs +19 -4
  103. metadata +2 -23
  104. data/lib/stigg/models/v1/customers/promotional_create_params.rb +0 -294
  105. data/lib/stigg/models/v1/customers/promotional_create_response.rb +0 -268
  106. data/lib/stigg/models/v1/customers/promotional_revoke_params.rb +0 -24
  107. data/lib/stigg/models/v1/customers/promotional_revoke_response.rb +0 -268
  108. data/lib/stigg/models/v1/customers/usage_retrieve_params.rb +0 -56
  109. data/lib/stigg/models/v1/customers/usage_retrieve_response.rb +0 -145
  110. data/lib/stigg/resources/v1/customers/promotional.rb +0 -69
  111. data/rbi/stigg/models/v1/customers/promotional_create_params.rbi +0 -639
  112. data/rbi/stigg/models/v1/customers/promotional_create_response.rbi +0 -495
  113. data/rbi/stigg/models/v1/customers/promotional_revoke_params.rbi +0 -42
  114. data/rbi/stigg/models/v1/customers/promotional_revoke_response.rbi +0 -497
  115. data/rbi/stigg/models/v1/customers/usage_retrieve_params.rbi +0 -84
  116. data/rbi/stigg/models/v1/customers/usage_retrieve_response.rbi +0 -353
  117. data/rbi/stigg/resources/v1/customers/promotional.rbi +0 -53
  118. data/sig/stigg/models/v1/customers/promotional_create_params.rbs +0 -234
  119. data/sig/stigg/models/v1/customers/promotional_create_response.rbs +0 -209
  120. data/sig/stigg/models/v1/customers/promotional_revoke_params.rbs +0 -27
  121. data/sig/stigg/models/v1/customers/promotional_revoke_response.rbs +0 -209
  122. data/sig/stigg/models/v1/customers/usage_retrieve_params.rbs +0 -54
  123. data/sig/stigg/models/v1/customers/usage_retrieve_response.rbs +0 -134
  124. data/sig/stigg/resources/v1/customers/promotional.rbs +0 -23
@@ -5,318 +5,302 @@ module Stigg
5
5
  module V1
6
6
  # @see Stigg::Resources::V1::Coupons#list
7
7
  class CouponListResponse < Stigg::Internal::Type::BaseModel
8
- # @!attribute data
8
+ # @!attribute id
9
+ # The unique identifier for the entity
9
10
  #
10
- # @return [Array<Stigg::Models::V1::CouponListResponse::Data>]
11
- required :data, -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CouponListResponse::Data] }
11
+ # @return [String]
12
+ required :id, String
12
13
 
13
- # @!method initialize(data:)
14
- # @param data [Array<Stigg::Models::V1::CouponListResponse::Data>]
15
-
16
- class Data < Stigg::Internal::Type::BaseModel
17
- # @!attribute id
18
- # The unique identifier for the entity
19
- #
20
- # @return [String]
21
- required :id, String
14
+ # @!attribute amounts_off
15
+ # Fixed amount discounts in different currencies
16
+ #
17
+ # @return [Array<Stigg::Models::V1::CouponListResponse::AmountsOff>, nil]
18
+ required :amounts_off,
19
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CouponListResponse::AmountsOff] },
20
+ api_name: :amountsOff,
21
+ nil?: true
22
+
23
+ # @!attribute billing_id
24
+ # The unique identifier for the entity in the billing provider
25
+ #
26
+ # @return [String, nil]
27
+ required :billing_id, String, api_name: :billingId, nil?: true
22
28
 
23
- # @!attribute amounts_off
24
- # Fixed amount discounts in different currencies
25
- #
26
- # @return [Array<Stigg::Models::V1::CouponListResponse::Data::AmountsOff>, nil]
27
- required :amounts_off,
28
- -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CouponListResponse::Data::AmountsOff] },
29
- api_name: :amountsOff,
30
- nil?: true
29
+ # @!attribute billing_link_url
30
+ # The URL to the entity in the billing provider
31
+ #
32
+ # @return [String, nil]
33
+ required :billing_link_url, String, api_name: :billingLinkUrl, nil?: true
31
34
 
32
- # @!attribute billing_id
33
- # The unique identifier for the entity in the billing provider
34
- #
35
- # @return [String, nil]
36
- required :billing_id, String, api_name: :billingId, nil?: true
35
+ # @!attribute created_at
36
+ # Timestamp of when the record was created
37
+ #
38
+ # @return [Time]
39
+ required :created_at, Time, api_name: :createdAt
37
40
 
38
- # @!attribute billing_link_url
39
- # The URL to the entity in the billing provider
40
- #
41
- # @return [String, nil]
42
- required :billing_link_url, String, api_name: :billingLinkUrl, nil?: true
41
+ # @!attribute description
42
+ # Description of the coupon
43
+ #
44
+ # @return [String, nil]
45
+ required :description, String, nil?: true
43
46
 
44
- # @!attribute created_at
45
- # Timestamp of when the record was created
46
- #
47
- # @return [Time]
48
- required :created_at, Time, api_name: :createdAt
47
+ # @!attribute duration_in_months
48
+ # Duration of the coupon validity in months
49
+ #
50
+ # @return [Float, nil]
51
+ required :duration_in_months, Float, api_name: :durationInMonths, nil?: true
49
52
 
50
- # @!attribute cursor_id
51
- # Cursor ID for query pagination
52
- #
53
- # @return [String]
54
- required :cursor_id, String, api_name: :cursorId
53
+ # @!attribute name
54
+ # Name of the coupon
55
+ #
56
+ # @return [String]
57
+ required :name, String
55
58
 
56
- # @!attribute description
57
- # Description of the coupon
58
- #
59
- # @return [String, nil]
60
- required :description, String, nil?: true
59
+ # @!attribute percent_off
60
+ # Percentage discount off the original price
61
+ #
62
+ # @return [Float, nil]
63
+ required :percent_off, Float, api_name: :percentOff, nil?: true
61
64
 
62
- # @!attribute duration_in_months
63
- # Duration of the coupon validity in months
64
- #
65
- # @return [Float, nil]
66
- required :duration_in_months, Float, api_name: :durationInMonths, nil?: true
65
+ # @!attribute source
66
+ # The source of the coupon
67
+ #
68
+ # @return [Symbol, Stigg::Models::V1::CouponListResponse::Source, nil]
69
+ required :source, enum: -> { Stigg::Models::V1::CouponListResponse::Source }, nil?: true
67
70
 
68
- # @!attribute name
69
- # Name of the coupon
70
- #
71
- # @return [String]
72
- required :name, String
71
+ # @!attribute status
72
+ # Current status of the coupon
73
+ #
74
+ # @return [Symbol, Stigg::Models::V1::CouponListResponse::Status]
75
+ required :status, enum: -> { Stigg::Models::V1::CouponListResponse::Status }
73
76
 
74
- # @!attribute percent_off
75
- # Percentage discount off the original price
76
- #
77
- # @return [Float, nil]
78
- required :percent_off, Float, api_name: :percentOff, nil?: true
77
+ # @!attribute type
78
+ # Type of the coupon (percentage or fixed amount)
79
+ #
80
+ # @return [Symbol, Stigg::Models::V1::CouponListResponse::Type]
81
+ required :type, enum: -> { Stigg::Models::V1::CouponListResponse::Type }
79
82
 
80
- # @!attribute source
81
- # The source of the coupon
82
- #
83
- # @return [Symbol, Stigg::Models::V1::CouponListResponse::Data::Source, nil]
84
- required :source, enum: -> { Stigg::Models::V1::CouponListResponse::Data::Source }, nil?: true
83
+ # @!attribute updated_at
84
+ # Timestamp of when the record was last updated
85
+ #
86
+ # @return [Time]
87
+ required :updated_at, Time, api_name: :updatedAt
85
88
 
86
- # @!attribute status
87
- # Current status of the coupon
88
- #
89
- # @return [Symbol, Stigg::Models::V1::CouponListResponse::Data::Status]
90
- required :status, enum: -> { Stigg::Models::V1::CouponListResponse::Data::Status }
89
+ # @!method initialize(id:, amounts_off:, billing_id:, billing_link_url:, created_at:, description:, duration_in_months:, name:, percent_off:, source:, status:, type:, updated_at:)
90
+ # Discount instrument with percentage or fixed amount
91
+ #
92
+ # @param id [String] The unique identifier for the entity
93
+ #
94
+ # @param amounts_off [Array<Stigg::Models::V1::CouponListResponse::AmountsOff>, nil] Fixed amount discounts in different currencies
95
+ #
96
+ # @param billing_id [String, nil] The unique identifier for the entity in the billing provider
97
+ #
98
+ # @param billing_link_url [String, nil] The URL to the entity in the billing provider
99
+ #
100
+ # @param created_at [Time] Timestamp of when the record was created
101
+ #
102
+ # @param description [String, nil] Description of the coupon
103
+ #
104
+ # @param duration_in_months [Float, nil] Duration of the coupon validity in months
105
+ #
106
+ # @param name [String] Name of the coupon
107
+ #
108
+ # @param percent_off [Float, nil] Percentage discount off the original price
109
+ #
110
+ # @param source [Symbol, Stigg::Models::V1::CouponListResponse::Source, nil] The source of the coupon
111
+ #
112
+ # @param status [Symbol, Stigg::Models::V1::CouponListResponse::Status] Current status of the coupon
113
+ #
114
+ # @param type [Symbol, Stigg::Models::V1::CouponListResponse::Type] Type of the coupon (percentage or fixed amount)
115
+ #
116
+ # @param updated_at [Time] Timestamp of when the record was last updated
91
117
 
92
- # @!attribute type
93
- # Type of the coupon (percentage or fixed amount)
118
+ class AmountsOff < Stigg::Internal::Type::BaseModel
119
+ # @!attribute amount
120
+ # The price amount
94
121
  #
95
- # @return [Symbol, Stigg::Models::V1::CouponListResponse::Data::Type]
96
- required :type, enum: -> { Stigg::Models::V1::CouponListResponse::Data::Type }
122
+ # @return [Float]
123
+ required :amount, Float
97
124
 
98
- # @!attribute updated_at
99
- # Timestamp of when the record was last updated
125
+ # @!attribute currency
126
+ # The price currency
100
127
  #
101
- # @return [Time]
102
- required :updated_at, Time, api_name: :updatedAt
128
+ # @return [Symbol, Stigg::Models::V1::CouponListResponse::AmountsOff::Currency]
129
+ required :currency, enum: -> { Stigg::Models::V1::CouponListResponse::AmountsOff::Currency }
103
130
 
104
- # @!method initialize(id:, amounts_off:, billing_id:, billing_link_url:, created_at:, cursor_id:, description:, duration_in_months:, name:, percent_off:, source:, status:, type:, updated_at:)
105
- # @param id [String] The unique identifier for the entity
131
+ # @!method initialize(amount:, currency:)
132
+ # Monetary amount with currency
106
133
  #
107
- # @param amounts_off [Array<Stigg::Models::V1::CouponListResponse::Data::AmountsOff>, nil] Fixed amount discounts in different currencies
134
+ # @param amount [Float] The price amount
108
135
  #
109
- # @param billing_id [String, nil] The unique identifier for the entity in the billing provider
110
- #
111
- # @param billing_link_url [String, nil] The URL to the entity in the billing provider
112
- #
113
- # @param created_at [Time] Timestamp of when the record was created
114
- #
115
- # @param cursor_id [String] Cursor ID for query pagination
116
- #
117
- # @param description [String, nil] Description of the coupon
118
- #
119
- # @param duration_in_months [Float, nil] Duration of the coupon validity in months
120
- #
121
- # @param name [String] Name of the coupon
122
- #
123
- # @param percent_off [Float, nil] Percentage discount off the original price
124
- #
125
- # @param source [Symbol, Stigg::Models::V1::CouponListResponse::Data::Source, nil] The source of the coupon
126
- #
127
- # @param status [Symbol, Stigg::Models::V1::CouponListResponse::Data::Status] Current status of the coupon
128
- #
129
- # @param type [Symbol, Stigg::Models::V1::CouponListResponse::Data::Type] Type of the coupon (percentage or fixed amount)
130
- #
131
- # @param updated_at [Time] Timestamp of when the record was last updated
132
-
133
- class AmountsOff < Stigg::Internal::Type::BaseModel
134
- # @!attribute amount
135
- # The price amount
136
- #
137
- # @return [Float]
138
- required :amount, Float
139
-
140
- # @!attribute currency
141
- # The price currency
142
- #
143
- # @return [Symbol, Stigg::Models::V1::CouponListResponse::Data::AmountsOff::Currency, nil]
144
- required :currency,
145
- enum: -> { Stigg::Models::V1::CouponListResponse::Data::AmountsOff::Currency },
146
- nil?: true
147
-
148
- # @!method initialize(amount:, currency:)
149
- # @param amount [Float] The price amount
150
- #
151
- # @param currency [Symbol, Stigg::Models::V1::CouponListResponse::Data::AmountsOff::Currency, nil] The price currency
152
-
153
- # The price currency
154
- #
155
- # @see Stigg::Models::V1::CouponListResponse::Data::AmountsOff#currency
156
- module Currency
157
- extend Stigg::Internal::Type::Enum
136
+ # @param currency [Symbol, Stigg::Models::V1::CouponListResponse::AmountsOff::Currency] The price currency
158
137
 
159
- USD = :usd
160
- AED = :aed
161
- ALL = :all
162
- AMD = :amd
163
- ANG = :ang
164
- AUD = :aud
165
- AWG = :awg
166
- AZN = :azn
167
- BAM = :bam
168
- BBD = :bbd
169
- BDT = :bdt
170
- BGN = :bgn
171
- BIF = :bif
172
- BMD = :bmd
173
- BND = :bnd
174
- BSD = :bsd
175
- BWP = :bwp
176
- BYN = :byn
177
- BZD = :bzd
178
- BRL = :brl
179
- CAD = :cad
180
- CDF = :cdf
181
- CHF = :chf
182
- CNY = :cny
183
- CZK = :czk
184
- DKK = :dkk
185
- DOP = :dop
186
- DZD = :dzd
187
- EGP = :egp
188
- ETB = :etb
189
- EUR = :eur
190
- FJD = :fjd
191
- GBP = :gbp
192
- GEL = :gel
193
- GIP = :gip
194
- GMD = :gmd
195
- GYD = :gyd
196
- HKD = :hkd
197
- HRK = :hrk
198
- HTG = :htg
199
- IDR = :idr
200
- ILS = :ils
201
- INR = :inr
202
- ISK = :isk
203
- JMD = :jmd
204
- JPY = :jpy
205
- KES = :kes
206
- KGS = :kgs
207
- KHR = :khr
208
- KMF = :kmf
209
- KRW = :krw
210
- KYD = :kyd
211
- KZT = :kzt
212
- LBP = :lbp
213
- LKR = :lkr
214
- LRD = :lrd
215
- LSL = :lsl
216
- MAD = :mad
217
- MDL = :mdl
218
- MGA = :mga
219
- MKD = :mkd
220
- MMK = :mmk
221
- MNT = :mnt
222
- MOP = :mop
223
- MRO = :mro
224
- MVR = :mvr
225
- MWK = :mwk
226
- MXN = :mxn
227
- MYR = :myr
228
- MZN = :mzn
229
- NAD = :nad
230
- NGN = :ngn
231
- NOK = :nok
232
- NPR = :npr
233
- NZD = :nzd
234
- PGK = :pgk
235
- PHP = :php
236
- PKR = :pkr
237
- PLN = :pln
238
- QAR = :qar
239
- RON = :ron
240
- RSD = :rsd
241
- RUB = :rub
242
- RWF = :rwf
243
- SAR = :sar
244
- SBD = :sbd
245
- SCR = :scr
246
- SEK = :sek
247
- SGD = :sgd
248
- SLE = :sle
249
- SLL = :sll
250
- SOS = :sos
251
- SZL = :szl
252
- THB = :thb
253
- TJS = :tjs
254
- TOP = :top
255
- TRY = :try
256
- TTD = :ttd
257
- TZS = :tzs
258
- UAH = :uah
259
- UZS = :uzs
260
- VND = :vnd
261
- VUV = :vuv
262
- WST = :wst
263
- XAF = :xaf
264
- XCD = :xcd
265
- YER = :yer
266
- ZAR = :zar
267
- ZMW = :zmw
268
- CLP = :clp
269
- DJF = :djf
270
- GNF = :gnf
271
- UGX = :ugx
272
- PYG = :pyg
273
- XOF = :xof
274
- XPF = :xpf
275
-
276
- # @!method self.values
277
- # @return [Array<Symbol>]
278
- end
279
- end
280
-
281
- # The source of the coupon
138
+ # The price currency
282
139
  #
283
- # @see Stigg::Models::V1::CouponListResponse::Data#source
284
- module Source
140
+ # @see Stigg::Models::V1::CouponListResponse::AmountsOff#currency
141
+ module Currency
285
142
  extend Stigg::Internal::Type::Enum
286
143
 
287
- STIGG = :STIGG
288
- STIGG_ADHOC = :STIGG_ADHOC
289
- STRIPE = :STRIPE
144
+ USD = :usd
145
+ AED = :aed
146
+ ALL = :all
147
+ AMD = :amd
148
+ ANG = :ang
149
+ AUD = :aud
150
+ AWG = :awg
151
+ AZN = :azn
152
+ BAM = :bam
153
+ BBD = :bbd
154
+ BDT = :bdt
155
+ BGN = :bgn
156
+ BIF = :bif
157
+ BMD = :bmd
158
+ BND = :bnd
159
+ BSD = :bsd
160
+ BWP = :bwp
161
+ BYN = :byn
162
+ BZD = :bzd
163
+ BRL = :brl
164
+ CAD = :cad
165
+ CDF = :cdf
166
+ CHF = :chf
167
+ CNY = :cny
168
+ CZK = :czk
169
+ DKK = :dkk
170
+ DOP = :dop
171
+ DZD = :dzd
172
+ EGP = :egp
173
+ ETB = :etb
174
+ EUR = :eur
175
+ FJD = :fjd
176
+ GBP = :gbp
177
+ GEL = :gel
178
+ GIP = :gip
179
+ GMD = :gmd
180
+ GYD = :gyd
181
+ HKD = :hkd
182
+ HRK = :hrk
183
+ HTG = :htg
184
+ IDR = :idr
185
+ ILS = :ils
186
+ INR = :inr
187
+ ISK = :isk
188
+ JMD = :jmd
189
+ JPY = :jpy
190
+ KES = :kes
191
+ KGS = :kgs
192
+ KHR = :khr
193
+ KMF = :kmf
194
+ KRW = :krw
195
+ KYD = :kyd
196
+ KZT = :kzt
197
+ LBP = :lbp
198
+ LKR = :lkr
199
+ LRD = :lrd
200
+ LSL = :lsl
201
+ MAD = :mad
202
+ MDL = :mdl
203
+ MGA = :mga
204
+ MKD = :mkd
205
+ MMK = :mmk
206
+ MNT = :mnt
207
+ MOP = :mop
208
+ MRO = :mro
209
+ MVR = :mvr
210
+ MWK = :mwk
211
+ MXN = :mxn
212
+ MYR = :myr
213
+ MZN = :mzn
214
+ NAD = :nad
215
+ NGN = :ngn
216
+ NOK = :nok
217
+ NPR = :npr
218
+ NZD = :nzd
219
+ PGK = :pgk
220
+ PHP = :php
221
+ PKR = :pkr
222
+ PLN = :pln
223
+ QAR = :qar
224
+ RON = :ron
225
+ RSD = :rsd
226
+ RUB = :rub
227
+ RWF = :rwf
228
+ SAR = :sar
229
+ SBD = :sbd
230
+ SCR = :scr
231
+ SEK = :sek
232
+ SGD = :sgd
233
+ SLE = :sle
234
+ SLL = :sll
235
+ SOS = :sos
236
+ SZL = :szl
237
+ THB = :thb
238
+ TJS = :tjs
239
+ TOP = :top
240
+ TRY = :try
241
+ TTD = :ttd
242
+ TZS = :tzs
243
+ UAH = :uah
244
+ UZS = :uzs
245
+ VND = :vnd
246
+ VUV = :vuv
247
+ WST = :wst
248
+ XAF = :xaf
249
+ XCD = :xcd
250
+ YER = :yer
251
+ ZAR = :zar
252
+ ZMW = :zmw
253
+ CLP = :clp
254
+ DJF = :djf
255
+ GNF = :gnf
256
+ UGX = :ugx
257
+ PYG = :pyg
258
+ XOF = :xof
259
+ XPF = :xpf
290
260
 
291
261
  # @!method self.values
292
262
  # @return [Array<Symbol>]
293
263
  end
264
+ end
294
265
 
295
- # Current status of the coupon
296
- #
297
- # @see Stigg::Models::V1::CouponListResponse::Data#status
298
- module Status
299
- extend Stigg::Internal::Type::Enum
266
+ # The source of the coupon
267
+ #
268
+ # @see Stigg::Models::V1::CouponListResponse#source
269
+ module Source
270
+ extend Stigg::Internal::Type::Enum
300
271
 
301
- ACTIVE = :ACTIVE
302
- ARCHIVED = :ARCHIVED
272
+ STIGG = :STIGG
273
+ STIGG_ADHOC = :STIGG_ADHOC
274
+ STRIPE = :STRIPE
303
275
 
304
- # @!method self.values
305
- # @return [Array<Symbol>]
306
- end
276
+ # @!method self.values
277
+ # @return [Array<Symbol>]
278
+ end
307
279
 
308
- # Type of the coupon (percentage or fixed amount)
309
- #
310
- # @see Stigg::Models::V1::CouponListResponse::Data#type
311
- module Type
312
- extend Stigg::Internal::Type::Enum
280
+ # Current status of the coupon
281
+ #
282
+ # @see Stigg::Models::V1::CouponListResponse#status
283
+ module Status
284
+ extend Stigg::Internal::Type::Enum
313
285
 
314
- FIXED = :FIXED
315
- PERCENTAGE = :PERCENTAGE
286
+ ACTIVE = :ACTIVE
287
+ ARCHIVED = :ARCHIVED
316
288
 
317
- # @!method self.values
318
- # @return [Array<Symbol>]
319
- end
289
+ # @!method self.values
290
+ # @return [Array<Symbol>]
291
+ end
292
+
293
+ # Type of the coupon (percentage or fixed amount)
294
+ #
295
+ # @see Stigg::Models::V1::CouponListResponse#type
296
+ module Type
297
+ extend Stigg::Internal::Type::Enum
298
+
299
+ FIXED = :FIXED
300
+ PERCENTAGE = :PERCENTAGE
301
+
302
+ # @!method self.values
303
+ # @return [Array<Symbol>]
320
304
  end
321
305
  end
322
306
  end
@@ -6,12 +6,15 @@ module Stigg
6
6
  # @see Stigg::Resources::V1::Coupons#retrieve
7
7
  class CouponRetrieveResponse < Stigg::Internal::Type::BaseModel
8
8
  # @!attribute data
9
+ # Discount instrument with percentage or fixed amount
9
10
  #
10
11
  # @return [Stigg::Models::V1::CouponRetrieveResponse::Data]
11
12
  required :data, -> { Stigg::Models::V1::CouponRetrieveResponse::Data }
12
13
 
13
14
  # @!method initialize(data:)
14
- # @param data [Stigg::Models::V1::CouponRetrieveResponse::Data]
15
+ # Response object
16
+ #
17
+ # @param data [Stigg::Models::V1::CouponRetrieveResponse::Data] Discount instrument with percentage or fixed amount
15
18
 
16
19
  # @see Stigg::Models::V1::CouponRetrieveResponse#data
17
20
  class Data < Stigg::Internal::Type::BaseModel
@@ -97,6 +100,8 @@ module Stigg
97
100
  required :updated_at, Time, api_name: :updatedAt
98
101
 
99
102
  # @!method initialize(id:, amounts_off:, billing_id:, billing_link_url:, created_at:, description:, duration_in_months:, name:, percent_off:, source:, status:, type:, updated_at:)
103
+ # Discount instrument with percentage or fixed amount
104
+ #
100
105
  # @param id [String] The unique identifier for the entity
101
106
  #
102
107
  # @param amounts_off [Array<Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff>, nil] Fixed amount discounts in different currencies
@@ -133,15 +138,15 @@ module Stigg
133
138
  # @!attribute currency
134
139
  # The price currency
135
140
  #
136
- # @return [Symbol, Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency, nil]
137
- required :currency,
138
- enum: -> { Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency },
139
- nil?: true
141
+ # @return [Symbol, Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency]
142
+ required :currency, enum: -> { Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency }
140
143
 
141
144
  # @!method initialize(amount:, currency:)
145
+ # Monetary amount with currency
146
+ #
142
147
  # @param amount [Float] The price amount
143
148
  #
144
- # @param currency [Symbol, Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency, nil] The price currency
149
+ # @param currency [Symbol, Stigg::Models::V1::CouponRetrieveResponse::Data::AmountsOff::Currency] The price currency
145
150
 
146
151
  # The price currency
147
152
  #
@@ -152,6 +152,8 @@ module Stigg
152
152
  api_name: :vendorIdentifier
153
153
 
154
154
  # @!method initialize(id:, synced_entity_id:, vendor_identifier:)
155
+ # External billing or CRM integration link
156
+ #
155
157
  # @param id [String] Integration details
156
158
  #
157
159
  # @param synced_entity_id [String, nil] Synced entity id