dodopayments 1.52.4 → 1.53.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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/dodopayments/models/customers/customer_wallet.rb +43 -0
  5. data/lib/dodopayments/models/customers/wallet_list_params.rb +16 -0
  6. data/lib/dodopayments/models/customers/wallet_list_response.rb +26 -0
  7. data/lib/dodopayments/models/customers/wallets/customer_wallet_transaction.rb +102 -0
  8. data/lib/dodopayments/models/customers/wallets/ledger_entry_create_params.rb +67 -0
  9. data/lib/dodopayments/models/customers/wallets/ledger_entry_list_params.rb +40 -0
  10. data/lib/dodopayments/models/license_activate_response.rb +87 -0
  11. data/lib/dodopayments/models/meter_aggregation.rb +0 -1
  12. data/lib/dodopayments/models/payment.rb +88 -4
  13. data/lib/dodopayments/models/refund.rb +9 -1
  14. data/lib/dodopayments/models/refund_list_response.rb +81 -0
  15. data/lib/dodopayments/models/subscription.rb +57 -1
  16. data/lib/dodopayments/models/subscription_charge_params.rb +32 -1
  17. data/lib/dodopayments/resources/customers/wallets/ledger_entries.rb +75 -0
  18. data/lib/dodopayments/resources/customers/wallets.rb +38 -0
  19. data/lib/dodopayments/resources/customers.rb +4 -0
  20. data/lib/dodopayments/resources/licenses.rb +2 -2
  21. data/lib/dodopayments/resources/refunds.rb +2 -2
  22. data/lib/dodopayments/resources/subscriptions.rb +3 -1
  23. data/lib/dodopayments/version.rb +1 -1
  24. data/lib/dodopayments.rb +10 -0
  25. data/rbi/dodopayments/models/customers/customer_wallet.rbi +66 -0
  26. data/rbi/dodopayments/models/customers/wallet_list_params.rbi +34 -0
  27. data/rbi/dodopayments/models/customers/wallet_list_response.rbi +48 -0
  28. data/rbi/dodopayments/models/customers/wallets/customer_wallet_transaction.rbi +173 -0
  29. data/rbi/dodopayments/models/customers/wallets/ledger_entry_create_params.rbi +119 -0
  30. data/rbi/dodopayments/models/customers/wallets/ledger_entry_list_params.rbi +71 -0
  31. data/rbi/dodopayments/models/license_activate_response.rbi +140 -0
  32. data/rbi/dodopayments/models/meter_aggregation.rbi +0 -5
  33. data/rbi/dodopayments/models/payment.rbi +112 -3
  34. data/rbi/dodopayments/models/refund.rbi +13 -0
  35. data/rbi/dodopayments/models/refund_list_response.rbi +104 -0
  36. data/rbi/dodopayments/models/subscription.rbi +78 -0
  37. data/rbi/dodopayments/models/subscription_charge_params.rbi +74 -0
  38. data/rbi/dodopayments/resources/customers/wallets/ledger_entries.rbi +67 -0
  39. data/rbi/dodopayments/resources/customers/wallets.rbi +32 -0
  40. data/rbi/dodopayments/resources/customers.rbi +3 -0
  41. data/rbi/dodopayments/resources/licenses.rbi +1 -1
  42. data/rbi/dodopayments/resources/refunds.rbi +1 -1
  43. data/rbi/dodopayments/resources/subscriptions.rbi +6 -0
  44. data/sig/dodopayments/models/customers/customer_wallet.rbs +44 -0
  45. data/sig/dodopayments/models/customers/wallet_list_params.rbs +17 -0
  46. data/sig/dodopayments/models/customers/wallet_list_response.rbs +27 -0
  47. data/sig/dodopayments/models/customers/wallets/customer_wallet_transaction.rbs +102 -0
  48. data/sig/dodopayments/models/customers/wallets/ledger_entry_create_params.rbs +61 -0
  49. data/sig/dodopayments/models/customers/wallets/ledger_entry_list_params.rbs +48 -0
  50. data/sig/dodopayments/models/license_activate_response.rbs +62 -0
  51. data/sig/dodopayments/models/meter_aggregation.rbs +1 -2
  52. data/sig/dodopayments/models/payment.rbs +66 -4
  53. data/sig/dodopayments/models/refund.rbs +5 -0
  54. data/sig/dodopayments/models/refund_list_response.rbs +60 -0
  55. data/sig/dodopayments/models/subscription.rbs +52 -0
  56. data/sig/dodopayments/models/subscription_charge_params.rbs +27 -0
  57. data/sig/dodopayments/resources/customers/wallets/ledger_entries.rbs +29 -0
  58. data/sig/dodopayments/resources/customers/wallets.rbs +16 -0
  59. data/sig/dodopayments/resources/customers.rbs +2 -0
  60. data/sig/dodopayments/resources/licenses.rbs +1 -1
  61. data/sig/dodopayments/resources/refunds.rbs +1 -1
  62. data/sig/dodopayments/resources/subscriptions.rbs +1 -0
  63. metadata +32 -2
@@ -16,6 +16,15 @@ module Dodopayments
16
16
  sig { returns(Time) }
17
17
  attr_accessor :created_at
18
18
 
19
+ # Details about the customer for this refund (from the associated payment)
20
+ sig { returns(Dodopayments::CustomerLimitedDetails) }
21
+ attr_reader :customer
22
+
23
+ sig do
24
+ params(customer: Dodopayments::CustomerLimitedDetails::OrHash).void
25
+ end
26
+ attr_writer :customer
27
+
19
28
  # If true the refund is a partial refund
20
29
  sig { returns(T::Boolean) }
21
30
  attr_accessor :is_partial
@@ -48,6 +57,7 @@ module Dodopayments
48
57
  params(
49
58
  business_id: String,
50
59
  created_at: Time,
60
+ customer: Dodopayments::CustomerLimitedDetails::OrHash,
51
61
  is_partial: T::Boolean,
52
62
  payment_id: String,
53
63
  refund_id: String,
@@ -62,6 +72,8 @@ module Dodopayments
62
72
  business_id:,
63
73
  # The timestamp of when the refund was created in UTC.
64
74
  created_at:,
75
+ # Details about the customer for this refund (from the associated payment)
76
+ customer:,
65
77
  # If true the refund is a partial refund
66
78
  is_partial:,
67
79
  # The unique identifier of the payment associated with the refund.
@@ -84,6 +96,7 @@ module Dodopayments
84
96
  {
85
97
  business_id: String,
86
98
  created_at: Time,
99
+ customer: Dodopayments::CustomerLimitedDetails,
87
100
  is_partial: T::Boolean,
88
101
  payment_id: String,
89
102
  refund_id: String,
@@ -0,0 +1,104 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ class RefundListResponse < Dodopayments::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Dodopayments::Models::RefundListResponse,
10
+ Dodopayments::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The unique identifier of the business issuing the refund.
15
+ sig { returns(String) }
16
+ attr_accessor :business_id
17
+
18
+ # The timestamp of when the refund was created in UTC.
19
+ sig { returns(Time) }
20
+ attr_accessor :created_at
21
+
22
+ # If true the refund is a partial refund
23
+ sig { returns(T::Boolean) }
24
+ attr_accessor :is_partial
25
+
26
+ # The unique identifier of the payment associated with the refund.
27
+ sig { returns(String) }
28
+ attr_accessor :payment_id
29
+
30
+ # The unique identifier of the refund.
31
+ sig { returns(String) }
32
+ attr_accessor :refund_id
33
+
34
+ # The current status of the refund.
35
+ sig { returns(Dodopayments::RefundStatus::TaggedSymbol) }
36
+ attr_accessor :status
37
+
38
+ # The refunded amount.
39
+ sig { returns(T.nilable(Integer)) }
40
+ attr_accessor :amount
41
+
42
+ # The currency of the refund, represented as an ISO 4217 currency code.
43
+ sig { returns(T.nilable(Dodopayments::Currency::TaggedSymbol)) }
44
+ attr_accessor :currency
45
+
46
+ # The reason provided for the refund, if any. Optional.
47
+ sig { returns(T.nilable(String)) }
48
+ attr_accessor :reason
49
+
50
+ sig do
51
+ params(
52
+ business_id: String,
53
+ created_at: Time,
54
+ is_partial: T::Boolean,
55
+ payment_id: String,
56
+ refund_id: String,
57
+ status: Dodopayments::RefundStatus::OrSymbol,
58
+ amount: T.nilable(Integer),
59
+ currency: T.nilable(Dodopayments::Currency::OrSymbol),
60
+ reason: T.nilable(String)
61
+ ).returns(T.attached_class)
62
+ end
63
+ def self.new(
64
+ # The unique identifier of the business issuing the refund.
65
+ business_id:,
66
+ # The timestamp of when the refund was created in UTC.
67
+ created_at:,
68
+ # If true the refund is a partial refund
69
+ is_partial:,
70
+ # The unique identifier of the payment associated with the refund.
71
+ payment_id:,
72
+ # The unique identifier of the refund.
73
+ refund_id:,
74
+ # The current status of the refund.
75
+ status:,
76
+ # The refunded amount.
77
+ amount: nil,
78
+ # The currency of the refund, represented as an ISO 4217 currency code.
79
+ currency: nil,
80
+ # The reason provided for the refund, if any. Optional.
81
+ reason: nil
82
+ )
83
+ end
84
+
85
+ sig do
86
+ override.returns(
87
+ {
88
+ business_id: String,
89
+ created_at: Time,
90
+ is_partial: T::Boolean,
91
+ payment_id: String,
92
+ refund_id: String,
93
+ status: Dodopayments::RefundStatus::TaggedSymbol,
94
+ amount: T.nilable(Integer),
95
+ currency: T.nilable(Dodopayments::Currency::TaggedSymbol),
96
+ reason: T.nilable(String)
97
+ }
98
+ )
99
+ end
100
+ def to_hash
101
+ end
102
+ end
103
+ end
104
+ end
@@ -44,6 +44,10 @@ module Dodopayments
44
44
  sig { returns(T::Hash[Symbol, String]) }
45
45
  attr_accessor :metadata
46
46
 
47
+ # Meters associated with this subscription (for usage-based billing)
48
+ sig { returns(T::Array[Dodopayments::Subscription::Meter]) }
49
+ attr_accessor :meters
50
+
47
51
  # Timestamp of the next scheduled billing. Indicates the end of current billing
48
52
  # period
49
53
  sig { returns(Time) }
@@ -128,6 +132,7 @@ module Dodopayments
128
132
  currency: Dodopayments::Currency::OrSymbol,
129
133
  customer: Dodopayments::CustomerLimitedDetails::OrHash,
130
134
  metadata: T::Hash[Symbol, String],
135
+ meters: T::Array[Dodopayments::Subscription::Meter::OrHash],
131
136
  next_billing_date: Time,
132
137
  on_demand: T::Boolean,
133
138
  payment_frequency_count: Integer,
@@ -163,6 +168,8 @@ module Dodopayments
163
168
  customer:,
164
169
  # Additional custom data associated with the subscription
165
170
  metadata:,
171
+ # Meters associated with this subscription (for usage-based billing)
172
+ meters:,
166
173
  # Timestamp of the next scheduled billing. Indicates the end of current billing
167
174
  # period
168
175
  next_billing_date:,
@@ -214,6 +221,7 @@ module Dodopayments
214
221
  currency: Dodopayments::Currency::TaggedSymbol,
215
222
  customer: Dodopayments::CustomerLimitedDetails,
216
223
  metadata: T::Hash[Symbol, String],
224
+ meters: T::Array[Dodopayments::Subscription::Meter],
217
225
  next_billing_date: Time,
218
226
  on_demand: T::Boolean,
219
227
  payment_frequency_count: Integer,
@@ -239,6 +247,76 @@ module Dodopayments
239
247
  end
240
248
  def to_hash
241
249
  end
250
+
251
+ class Meter < Dodopayments::Internal::Type::BaseModel
252
+ OrHash =
253
+ T.type_alias do
254
+ T.any(
255
+ Dodopayments::Subscription::Meter,
256
+ Dodopayments::Internal::AnyHash
257
+ )
258
+ end
259
+
260
+ sig { returns(Dodopayments::Currency::TaggedSymbol) }
261
+ attr_accessor :currency
262
+
263
+ sig { returns(Integer) }
264
+ attr_accessor :free_threshold
265
+
266
+ sig { returns(String) }
267
+ attr_accessor :measurement_unit
268
+
269
+ sig { returns(String) }
270
+ attr_accessor :meter_id
271
+
272
+ sig { returns(String) }
273
+ attr_accessor :name
274
+
275
+ sig { returns(String) }
276
+ attr_accessor :price_per_unit
277
+
278
+ sig { returns(T.nilable(String)) }
279
+ attr_accessor :description
280
+
281
+ # Response struct representing usage-based meter cart details for a subscription
282
+ sig do
283
+ params(
284
+ currency: Dodopayments::Currency::OrSymbol,
285
+ free_threshold: Integer,
286
+ measurement_unit: String,
287
+ meter_id: String,
288
+ name: String,
289
+ price_per_unit: String,
290
+ description: T.nilable(String)
291
+ ).returns(T.attached_class)
292
+ end
293
+ def self.new(
294
+ currency:,
295
+ free_threshold:,
296
+ measurement_unit:,
297
+ meter_id:,
298
+ name:,
299
+ price_per_unit:,
300
+ description: nil
301
+ )
302
+ end
303
+
304
+ sig do
305
+ override.returns(
306
+ {
307
+ currency: Dodopayments::Currency::TaggedSymbol,
308
+ free_threshold: Integer,
309
+ measurement_unit: String,
310
+ meter_id: String,
311
+ name: String,
312
+ price_per_unit: String,
313
+ description: T.nilable(String)
314
+ }
315
+ )
316
+ end
317
+ def to_hash
318
+ end
319
+ end
242
320
  end
243
321
  end
244
322
  end
@@ -25,6 +25,26 @@ module Dodopayments
25
25
  sig { returns(T.nilable(T::Boolean)) }
26
26
  attr_accessor :adaptive_currency_fees_inclusive
27
27
 
28
+ # Specify how customer balance is used for the payment
29
+ sig do
30
+ returns(
31
+ T.nilable(
32
+ Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig
33
+ )
34
+ )
35
+ end
36
+ attr_reader :customer_balance_config
37
+
38
+ sig do
39
+ params(
40
+ customer_balance_config:
41
+ T.nilable(
42
+ Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig::OrHash
43
+ )
44
+ ).void
45
+ end
46
+ attr_writer :customer_balance_config
47
+
28
48
  # Metadata for the payment. If not passed, the metadata of the subscription will
29
49
  # be taken
30
50
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
@@ -44,6 +64,10 @@ module Dodopayments
44
64
  params(
45
65
  product_price: Integer,
46
66
  adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
67
+ customer_balance_config:
68
+ T.nilable(
69
+ Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig::OrHash
70
+ ),
47
71
  metadata: T.nilable(T::Hash[Symbol, String]),
48
72
  product_currency: T.nilable(Dodopayments::Currency::OrSymbol),
49
73
  product_description: T.nilable(String),
@@ -58,6 +82,8 @@ module Dodopayments
58
82
  # added on top (false). This field is ignored if adaptive pricing is not enabled
59
83
  # for the business.
60
84
  adaptive_currency_fees_inclusive: nil,
85
+ # Specify how customer balance is used for the payment
86
+ customer_balance_config: nil,
61
87
  # Metadata for the payment. If not passed, the metadata of the subscription will
62
88
  # be taken
63
89
  metadata: nil,
@@ -76,6 +102,10 @@ module Dodopayments
76
102
  {
77
103
  product_price: Integer,
78
104
  adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
105
+ customer_balance_config:
106
+ T.nilable(
107
+ Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig
108
+ ),
79
109
  metadata: T.nilable(T::Hash[Symbol, String]),
80
110
  product_currency: T.nilable(Dodopayments::Currency::OrSymbol),
81
111
  product_description: T.nilable(String),
@@ -85,6 +115,50 @@ module Dodopayments
85
115
  end
86
116
  def to_hash
87
117
  end
118
+
119
+ class CustomerBalanceConfig < Dodopayments::Internal::Type::BaseModel
120
+ OrHash =
121
+ T.type_alias do
122
+ T.any(
123
+ Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig,
124
+ Dodopayments::Internal::AnyHash
125
+ )
126
+ end
127
+
128
+ # Allows Customer Credit to be purchased to settle payments
129
+ sig { returns(T.nilable(T::Boolean)) }
130
+ attr_accessor :allow_customer_credits_purchase
131
+
132
+ # Allows Customer Credit Balance to be used to settle payments
133
+ sig { returns(T.nilable(T::Boolean)) }
134
+ attr_accessor :allow_customer_credits_usage
135
+
136
+ # Specify how customer balance is used for the payment
137
+ sig do
138
+ params(
139
+ allow_customer_credits_purchase: T.nilable(T::Boolean),
140
+ allow_customer_credits_usage: T.nilable(T::Boolean)
141
+ ).returns(T.attached_class)
142
+ end
143
+ def self.new(
144
+ # Allows Customer Credit to be purchased to settle payments
145
+ allow_customer_credits_purchase: nil,
146
+ # Allows Customer Credit Balance to be used to settle payments
147
+ allow_customer_credits_usage: nil
148
+ )
149
+ end
150
+
151
+ sig do
152
+ override.returns(
153
+ {
154
+ allow_customer_credits_purchase: T.nilable(T::Boolean),
155
+ allow_customer_credits_usage: T.nilable(T::Boolean)
156
+ }
157
+ )
158
+ end
159
+ def to_hash
160
+ end
161
+ end
88
162
  end
89
163
  end
90
164
  end
@@ -0,0 +1,67 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Resources
5
+ class Customers
6
+ class Wallets
7
+ class LedgerEntries
8
+ sig do
9
+ params(
10
+ customer_id: String,
11
+ amount: Integer,
12
+ currency: Dodopayments::Currency::OrSymbol,
13
+ entry_type:
14
+ Dodopayments::Customers::Wallets::LedgerEntryCreateParams::EntryType::OrSymbol,
15
+ idempotency_key: T.nilable(String),
16
+ reason: T.nilable(String),
17
+ request_options: Dodopayments::RequestOptions::OrHash
18
+ ).returns(Dodopayments::Customers::CustomerWallet)
19
+ end
20
+ def create(
21
+ # Customer ID
22
+ customer_id,
23
+ amount:,
24
+ # Currency of the wallet to adjust
25
+ currency:,
26
+ # Type of ledger entry - credit or debit
27
+ entry_type:,
28
+ # Optional idempotency key to prevent duplicate entries
29
+ idempotency_key: nil,
30
+ reason: nil,
31
+ request_options: {}
32
+ )
33
+ end
34
+
35
+ sig do
36
+ params(
37
+ customer_id: String,
38
+ currency: Dodopayments::Currency::OrSymbol,
39
+ page_number: Integer,
40
+ page_size: Integer,
41
+ request_options: Dodopayments::RequestOptions::OrHash
42
+ ).returns(
43
+ Dodopayments::Internal::DefaultPageNumberPagination[
44
+ Dodopayments::Customers::Wallets::CustomerWalletTransaction
45
+ ]
46
+ )
47
+ end
48
+ def list(
49
+ # Customer ID
50
+ customer_id,
51
+ # Optional currency filter
52
+ currency: nil,
53
+ page_number: nil,
54
+ page_size: nil,
55
+ request_options: {}
56
+ )
57
+ end
58
+
59
+ # @api private
60
+ sig { params(client: Dodopayments::Client).returns(T.attached_class) }
61
+ def self.new(client:)
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,32 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Resources
5
+ class Customers
6
+ class Wallets
7
+ sig do
8
+ returns(Dodopayments::Resources::Customers::Wallets::LedgerEntries)
9
+ end
10
+ attr_reader :ledger_entries
11
+
12
+ sig do
13
+ params(
14
+ customer_id: String,
15
+ request_options: Dodopayments::RequestOptions::OrHash
16
+ ).returns(Dodopayments::Models::Customers::WalletListResponse)
17
+ end
18
+ def list(
19
+ # Customer ID
20
+ customer_id,
21
+ request_options: {}
22
+ )
23
+ end
24
+
25
+ # @api private
26
+ sig { params(client: Dodopayments::Client).returns(T.attached_class) }
27
+ def self.new(client:)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -6,6 +6,9 @@ module Dodopayments
6
6
  sig { returns(Dodopayments::Resources::Customers::CustomerPortal) }
7
7
  attr_reader :customer_portal
8
8
 
9
+ sig { returns(Dodopayments::Resources::Customers::Wallets) }
10
+ attr_reader :wallets
11
+
9
12
  sig do
10
13
  params(
11
14
  email: String,
@@ -8,7 +8,7 @@ module Dodopayments
8
8
  license_key: String,
9
9
  name: String,
10
10
  request_options: Dodopayments::RequestOptions::OrHash
11
- ).returns(Dodopayments::LicenseKeyInstance)
11
+ ).returns(Dodopayments::Models::LicenseActivateResponse)
12
12
  end
13
13
  def activate(license_key:, name:, request_options: {})
14
14
  end
@@ -47,7 +47,7 @@ module Dodopayments
47
47
  request_options: Dodopayments::RequestOptions::OrHash
48
48
  ).returns(
49
49
  Dodopayments::Internal::DefaultPageNumberPagination[
50
- Dodopayments::Refund
50
+ Dodopayments::Models::RefundListResponse
51
51
  ]
52
52
  )
53
53
  end
@@ -181,6 +181,10 @@ module Dodopayments
181
181
  subscription_id: String,
182
182
  product_price: Integer,
183
183
  adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
184
+ customer_balance_config:
185
+ T.nilable(
186
+ Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig::OrHash
187
+ ),
184
188
  metadata: T.nilable(T::Hash[Symbol, String]),
185
189
  product_currency: T.nilable(Dodopayments::Currency::OrSymbol),
186
190
  product_description: T.nilable(String),
@@ -197,6 +201,8 @@ module Dodopayments
197
201
  # added on top (false). This field is ignored if adaptive pricing is not enabled
198
202
  # for the business.
199
203
  adaptive_currency_fees_inclusive: nil,
204
+ # Specify how customer balance is used for the payment
205
+ customer_balance_config: nil,
200
206
  # Metadata for the payment. If not passed, the metadata of the subscription will
201
207
  # be taken
202
208
  metadata: nil,
@@ -0,0 +1,44 @@
1
+ module Dodopayments
2
+ module Models
3
+ class CustomerWallet = Customers::CustomerWallet
4
+
5
+ module Customers
6
+ type customer_wallet =
7
+ {
8
+ balance: Integer,
9
+ created_at: Time,
10
+ currency: Dodopayments::Models::currency,
11
+ customer_id: String,
12
+ updated_at: Time
13
+ }
14
+
15
+ class CustomerWallet < Dodopayments::Internal::Type::BaseModel
16
+ attr_accessor balance: Integer
17
+
18
+ attr_accessor created_at: Time
19
+
20
+ attr_accessor currency: Dodopayments::Models::currency
21
+
22
+ attr_accessor customer_id: String
23
+
24
+ attr_accessor updated_at: Time
25
+
26
+ def initialize: (
27
+ balance: Integer,
28
+ created_at: Time,
29
+ currency: Dodopayments::Models::currency,
30
+ customer_id: String,
31
+ updated_at: Time
32
+ ) -> void
33
+
34
+ def to_hash: -> {
35
+ balance: Integer,
36
+ created_at: Time,
37
+ currency: Dodopayments::Models::currency,
38
+ customer_id: String,
39
+ updated_at: Time
40
+ }
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,17 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Customers
4
+ type wallet_list_params =
5
+ { } & Dodopayments::Internal::Type::request_parameters
6
+
7
+ class WalletListParams < Dodopayments::Internal::Type::BaseModel
8
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
+ include Dodopayments::Internal::Type::RequestParameters
10
+
11
+ def initialize: (?request_options: Dodopayments::request_opts) -> void
12
+
13
+ def to_hash: -> { request_options: Dodopayments::RequestOptions }
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,27 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Customers
4
+ type wallet_list_response =
5
+ {
6
+ items: ::Array[Dodopayments::Customers::CustomerWallet],
7
+ total_balance_usd: Integer
8
+ }
9
+
10
+ class WalletListResponse < Dodopayments::Internal::Type::BaseModel
11
+ attr_accessor items: ::Array[Dodopayments::Customers::CustomerWallet]
12
+
13
+ attr_accessor total_balance_usd: Integer
14
+
15
+ def initialize: (
16
+ items: ::Array[Dodopayments::Customers::CustomerWallet],
17
+ total_balance_usd: Integer
18
+ ) -> void
19
+
20
+ def to_hash: -> {
21
+ items: ::Array[Dodopayments::Customers::CustomerWallet],
22
+ total_balance_usd: Integer
23
+ }
24
+ end
25
+ end
26
+ end
27
+ end