dodopayments 2.13.0 → 2.14.0

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -3
  3. data/README.md +1 -1
  4. data/lib/dodopayments/models/balance_ledger_entry.rb +1 -0
  5. data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +1 -0
  6. data/lib/dodopayments/models/dispute_list_response.rb +27 -1
  7. data/lib/dodopayments/models/entitlements/entitlement_grant.rb +9 -1
  8. data/lib/dodopayments/models/entitlements/grant_list_params.rb +26 -1
  9. data/lib/dodopayments/models/integration_config.rb +28 -1
  10. data/lib/dodopayments/models/integration_config_response.rb +32 -1
  11. data/lib/dodopayments/models/license_key.rb +1 -0
  12. data/lib/dodopayments/models/license_key_list_params.rb +1 -0
  13. data/lib/dodopayments/models/payment.rb +27 -1
  14. data/lib/dodopayments/models/payment_list_response.rb +43 -1
  15. data/lib/dodopayments/models/subscription_update_payment_method_params.rb +21 -1
  16. data/lib/dodopayments/models/theme_config.rb +1 -1
  17. data/lib/dodopayments/resources/entitlements/grants.rb +3 -1
  18. data/lib/dodopayments/version.rb +1 -1
  19. data/rbi/dodopayments/models/balance_ledger_entry.rbi +5 -0
  20. data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +5 -0
  21. data/rbi/dodopayments/models/dispute_list_response.rbi +60 -0
  22. data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +10 -0
  23. data/rbi/dodopayments/models/entitlements/grant_list_params.rbi +89 -0
  24. data/rbi/dodopayments/models/integration_config.rbi +65 -3
  25. data/rbi/dodopayments/models/integration_config_response.rbi +70 -3
  26. data/rbi/dodopayments/models/license_key.rbi +1 -0
  27. data/rbi/dodopayments/models/license_key_list_params.rbi +5 -0
  28. data/rbi/dodopayments/models/payment.rbi +39 -0
  29. data/rbi/dodopayments/models/payment_list_response.rbi +76 -0
  30. data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +40 -5
  31. data/rbi/dodopayments/models/theme_config.rbi +1 -1
  32. data/rbi/dodopayments/resources/entitlements/grants.rbi +4 -0
  33. data/sig/dodopayments/models/balance_ledger_entry.rbs +2 -0
  34. data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +2 -0
  35. data/sig/dodopayments/models/dispute_list_response.rbs +17 -0
  36. data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +5 -0
  37. data/sig/dodopayments/models/entitlements/grant_list_params.rbs +34 -0
  38. data/sig/dodopayments/models/integration_config.rbs +19 -3
  39. data/sig/dodopayments/models/integration_config_response.rbs +19 -3
  40. data/sig/dodopayments/models/license_key.rbs +2 -1
  41. data/sig/dodopayments/models/license_key_list_params.rbs +2 -1
  42. data/sig/dodopayments/models/payment.rbs +17 -0
  43. data/sig/dodopayments/models/payment_list_response.rbs +27 -0
  44. data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +19 -4
  45. data/sig/dodopayments/models/theme_config.rbs +1 -1
  46. data/sig/dodopayments/resources/entitlements/grants.rbs +1 -0
  47. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 787cd9b11833321501c8a2c76820a240ff6c627581b3f04d97a4f023151fbbc9
4
- data.tar.gz: eb4d19c4fabf6294cb2b884ae1d1250168875baeeeda17af1ef33b294158f69c
3
+ metadata.gz: 27d827b849b1a395655429f6e3c97f051d4253873b2fe5b45586e5a6204958e3
4
+ data.tar.gz: 773760ea02d2559c34c1f2770f5142f49cd052a6e48fc3e4f9642dd38e271482
5
5
  SHA512:
6
- metadata.gz: 434899bee76179c1780249a4b4f0d477f2ca8b0ca22c652b22b8379cc350f3c9aa3c4400f009e374fad0711945936071082fd056d16ca114b056260049562cfe
7
- data.tar.gz: 870bbeaf588c220a92ba3be036b77c6622cdf2e39569cca9af73e7375136043ba108d3718b4964ea55d6ab4eb3bf087567d8e278446de9bd723ef0988cf66c57
6
+ metadata.gz: 287dceb05d57649371eda3659dedbb55dc67e149803056b13d384942f0a67770291603b468d983fb2c8bb28c6aa819894bf2dc1b7d88ec7b3db02e481a1324f3
7
+ data.tar.gz: 6676c1ba1d2b3c639f05a7408c2f4b2c8280d95a903b346a67eb523f9ec5ff3f55d9c592e91ee0d4f1792cb87cec93364142f888010a67f61131840f1b86f255
data/CHANGELOG.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## [2.13.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.12.0...v2.13.0) (2026-06-01)
3
+ ## [2.14.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.13.0...v2.14.0) (2026-06-06)
4
4
 
5
5
 
6
6
  ### Features
7
7
 
8
- * **readme:** drop 'generated with Stainless' attribution from SDK READMEs ([2c1ea56](https://github.com/dodopayments/dodopayments-ruby/commit/2c1ea563cce9ebf05d276be00dd461cba40394f6))
9
- * **readme:** drop 'generated with Stainless' attribution from SDK READMEs ([68a062a](https://github.com/dodopayments/dodopayments-ruby/commit/68a062a557e448f609926f096b8300dc034fdff4))
8
+ * **api:** regenerate SDK from latest OpenAPI spec ([c979dc8](https://github.com/dodopayments/dodopayments-ruby/commit/c979dc8402b6e80b1c679f77e5e003762522c5bb))
9
+ * **api:** regenerate SDK from latest OpenAPI spec ([a04f680](https://github.com/dodopayments/dodopayments-ruby/commit/a04f680bb1e8f267bd5fe288d0e2c85eaeae549f))
10
10
 
11
11
  ## [2.11.1](https://github.com/dodopayments/dodopayments-ruby/compare/v2.11.0...v2.11.1) (2026-06-01)
12
12
 
data/README.md CHANGED
@@ -23,7 +23,7 @@ To use this gem, install via Bundler by adding the following to your application
23
23
  <!-- x-release-please-start-version -->
24
24
 
25
25
  ```ruby
26
- gem "dodopayments", "~> 2.13.0"
26
+ gem "dodopayments", "~> 2.14.0"
27
27
  ```
28
28
 
29
29
  <!-- x-release-please-end -->
@@ -103,6 +103,7 @@ module Dodopayments
103
103
  ABANDONED_CART_RECOVERY_FEE = :abandoned_cart_recovery_fee
104
104
  DUNNING_FEES = :dunning_fees
105
105
  PAYMENT_RETRY_FEE = :payment_retry_fee
106
+ BYOP_FEE = :byop_fee
106
107
 
107
108
  # @!method self.values
108
109
  # @return [Array<Symbol>]
@@ -256,6 +256,7 @@ module Dodopayments
256
256
  ABANDONED_CART_RECOVERY_FEE = :abandoned_cart_recovery_fee
257
257
  DUNNING_FEES = :dunning_fees
258
258
  PAYMENT_RETRY_FEE = :payment_retry_fee
259
+ BYOP_FEE = :byop_fee
259
260
 
260
261
  # @!method self.values
261
262
  # @return [Array<Symbol>]
@@ -53,13 +53,21 @@ module Dodopayments
53
53
  # @return [String]
54
54
  required :payment_id, String
55
55
 
56
+ # @!attribute payment_provider
57
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
58
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
59
+ # processed itself.
60
+ #
61
+ # @return [Symbol, Dodopayments::Models::DisputeListResponse::PaymentProvider]
62
+ required :payment_provider, enum: -> { Dodopayments::Models::DisputeListResponse::PaymentProvider }
63
+
56
64
  # @!attribute is_resolved_by_rdr
57
65
  # Whether the dispute was resolved by Rapid Dispute Resolution
58
66
  #
59
67
  # @return [Boolean, nil]
60
68
  optional :is_resolved_by_rdr, Dodopayments::Internal::Type::Boolean, nil?: true
61
69
 
62
- # @!method initialize(amount:, business_id:, created_at:, currency:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, is_resolved_by_rdr: nil)
70
+ # @!method initialize(amount:, business_id:, created_at:, currency:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, payment_provider:, is_resolved_by_rdr: nil)
63
71
  # Some parameter documentations has been truncated, see
64
72
  # {Dodopayments::Models::DisputeListResponse} for more details.
65
73
  #
@@ -79,7 +87,25 @@ module Dodopayments
79
87
  #
80
88
  # @param payment_id [String] The unique identifier of the payment associated with the dispute.
81
89
  #
90
+ # @param payment_provider [Symbol, Dodopayments::Models::DisputeListResponse::PaymentProvider] Which processor handled the underlying payment. `stripe` / `adyen` for
91
+ #
82
92
  # @param is_resolved_by_rdr [Boolean, nil] Whether the dispute was resolved by Rapid Dispute Resolution
93
+
94
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
95
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
96
+ # processed itself.
97
+ #
98
+ # @see Dodopayments::Models::DisputeListResponse#payment_provider
99
+ module PaymentProvider
100
+ extend Dodopayments::Internal::Type::Enum
101
+
102
+ STRIPE = :stripe
103
+ ADYEN = :adyen
104
+ DODO = :dodo
105
+
106
+ # @!method self.values
107
+ # @return [Array<Symbol>]
108
+ end
83
109
  end
84
110
  end
85
111
  end
@@ -35,6 +35,12 @@ module Dodopayments
35
35
  # @return [String]
36
36
  required :entitlement_id, String
37
37
 
38
+ # @!attribute integration_type
39
+ # The integration type of the grant's entitlement (e.g. `license_key`).
40
+ #
41
+ # @return [Symbol, Dodopayments::Models::EntitlementIntegrationType]
42
+ required :integration_type, enum: -> { Dodopayments::EntitlementIntegrationType }
43
+
38
44
  # @!attribute metadata
39
45
  # Arbitrary key-value metadata recorded on the grant.
40
46
  #
@@ -123,7 +129,7 @@ module Dodopayments
123
129
  # @return [String, nil]
124
130
  optional :subscription_id, String, nil?: true
125
131
 
126
- # @!method initialize(id:, business_id:, created_at:, customer_id:, entitlement_id:, metadata:, status:, updated_at:, delivered_at: nil, digital_product_delivery: nil, error_code: nil, error_message: nil, license_key: nil, oauth_expires_at: nil, oauth_url: nil, payment_id: nil, revocation_reason: nil, revoked_at: nil, subscription_id: nil)
132
+ # @!method initialize(id:, business_id:, created_at:, customer_id:, entitlement_id:, integration_type:, metadata:, status:, updated_at:, delivered_at: nil, digital_product_delivery: nil, error_code: nil, error_message: nil, license_key: nil, oauth_expires_at: nil, oauth_url: nil, payment_id: nil, revocation_reason: nil, revoked_at: nil, subscription_id: nil)
127
133
  # Some parameter documentations has been truncated, see
128
134
  # {Dodopayments::Models::Entitlements::EntitlementGrant} for more details.
129
135
  #
@@ -140,6 +146,8 @@ module Dodopayments
140
146
  #
141
147
  # @param entitlement_id [String] Identifier of the entitlement this grant was issued from.
142
148
  #
149
+ # @param integration_type [Symbol, Dodopayments::Models::EntitlementIntegrationType] The integration type of the grant's entitlement (e.g. `license_key`).
150
+ #
143
151
  # @param metadata [Hash{Symbol=>String}] Arbitrary key-value metadata recorded on the grant.
144
152
  #
145
153
  # @param status [Symbol, Dodopayments::Models::Entitlements::EntitlementGrant::Status] Lifecycle status of the grant.
@@ -19,6 +19,12 @@ module Dodopayments
19
19
  # @return [String, nil]
20
20
  optional :customer_id, String
21
21
 
22
+ # @!attribute integration_type
23
+ # Filter by integration type
24
+ #
25
+ # @return [Symbol, Dodopayments::Models::Entitlements::GrantListParams::IntegrationType, nil]
26
+ optional :integration_type, enum: -> { Dodopayments::Entitlements::GrantListParams::IntegrationType }
27
+
22
28
  # @!attribute page_number
23
29
  # Page number (default 0)
24
30
  #
@@ -37,11 +43,13 @@ module Dodopayments
37
43
  # @return [Symbol, Dodopayments::Models::Entitlements::GrantListParams::Status, nil]
38
44
  optional :status, enum: -> { Dodopayments::Entitlements::GrantListParams::Status }
39
45
 
40
- # @!method initialize(id:, customer_id: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
46
+ # @!method initialize(id:, customer_id: nil, integration_type: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
41
47
  # @param id [String]
42
48
  #
43
49
  # @param customer_id [String] Filter by customer ID
44
50
  #
51
+ # @param integration_type [Symbol, Dodopayments::Models::Entitlements::GrantListParams::IntegrationType] Filter by integration type
52
+ #
45
53
  # @param page_number [Integer] Page number (default 0)
46
54
  #
47
55
  # @param page_size [Integer] Page size (default 10, max 100)
@@ -50,6 +58,23 @@ module Dodopayments
50
58
  #
51
59
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
52
60
 
61
+ # Filter by integration type
62
+ module IntegrationType
63
+ extend Dodopayments::Internal::Type::Enum
64
+
65
+ DISCORD = :discord
66
+ TELEGRAM = :telegram
67
+ GITHUB = :github
68
+ FIGMA = :figma
69
+ FRAMER = :framer
70
+ NOTION = :notion
71
+ DIGITAL_FILES = :digital_files
72
+ LICENSE_KEY = :license_key
73
+
74
+ # @!method self.values
75
+ # @return [Array<Symbol>]
76
+ end
77
+
53
78
  # Filter by grant status
54
79
  module Status
55
80
  extend Dodopayments::Internal::Type::Enum
@@ -181,7 +181,17 @@ module Dodopayments
181
181
  # @return [Symbol, Dodopayments::Models::TimeInterval, nil]
182
182
  optional :duration_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
183
183
 
184
- # @!method initialize(activation_message: nil, activations_limit: nil, duration_count: nil, duration_interval: nil)
184
+ # @!attribute fulfillment_mode
185
+ # Fulfillment mode: `auto` (default) generates keys automatically; `manual`
186
+ # creates pending grants the merchant fulfills via the
187
+ # `POST /grants/{id}/license-key` endpoint.
188
+ #
189
+ # @return [Symbol, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig::FulfillmentMode, nil]
190
+ optional :fulfillment_mode,
191
+ enum: -> { Dodopayments::IntegrationConfig::LicenseKeyConfig::FulfillmentMode },
192
+ nil?: true
193
+
194
+ # @!method initialize(activation_message: nil, activations_limit: nil, duration_count: nil, duration_interval: nil, fulfillment_mode: nil)
185
195
  # Some parameter documentations has been truncated, see
186
196
  # {Dodopayments::Models::IntegrationConfig::LicenseKeyConfig} for more details.
187
197
  #
@@ -192,6 +202,23 @@ module Dodopayments
192
202
  # @param duration_count [Integer, nil] Validity duration of issued license keys. Provide both
193
203
  #
194
204
  # @param duration_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of `duration_count`.
205
+ #
206
+ # @param fulfillment_mode [Symbol, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig::FulfillmentMode, nil] Fulfillment mode: `auto` (default) generates keys automatically; `manual`
207
+
208
+ # Fulfillment mode: `auto` (default) generates keys automatically; `manual`
209
+ # creates pending grants the merchant fulfills via the
210
+ # `POST /grants/{id}/license-key` endpoint.
211
+ #
212
+ # @see Dodopayments::Models::IntegrationConfig::LicenseKeyConfig#fulfillment_mode
213
+ module FulfillmentMode
214
+ extend Dodopayments::Internal::Type::Enum
215
+
216
+ AUTO = :auto
217
+ MANUAL = :manual
218
+
219
+ # @!method self.values
220
+ # @return [Array<Symbol>]
221
+ end
195
222
  end
196
223
 
197
224
  # @!method self.variants
@@ -241,7 +241,19 @@ module Dodopayments
241
241
  # @return [Symbol, Dodopayments::Models::TimeInterval, nil]
242
242
  optional :duration_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
243
243
 
244
- # @!method initialize(activation_message: nil, activations_limit: nil, duration_count: nil, duration_interval: nil)
244
+ # @!attribute fulfillment_mode
245
+ # Fulfillment mode:
246
+ #
247
+ # `auto` (default) generate and delivery license keys to customers automatically.
248
+ # `manual` creates pending grants, actual key is provided via the fulfillment API
249
+ # and delivered to the customer when fulfilled.
250
+ #
251
+ # @return [Symbol, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode, nil]
252
+ optional :fulfillment_mode,
253
+ enum: -> { Dodopayments::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode },
254
+ nil?: true
255
+
256
+ # @!method initialize(activation_message: nil, activations_limit: nil, duration_count: nil, duration_interval: nil, fulfillment_mode: nil)
245
257
  # Some parameter documentations has been truncated, see
246
258
  # {Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig} for more
247
259
  # details.
@@ -253,6 +265,25 @@ module Dodopayments
253
265
  # @param duration_count [Integer, nil] Validity duration of issued license keys. Provide both
254
266
  #
255
267
  # @param duration_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of `duration_count`.
268
+ #
269
+ # @param fulfillment_mode [Symbol, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode, nil] Fulfillment mode:
270
+
271
+ # Fulfillment mode:
272
+ #
273
+ # `auto` (default) generate and delivery license keys to customers automatically.
274
+ # `manual` creates pending grants, actual key is provided via the fulfillment API
275
+ # and delivered to the customer when fulfilled.
276
+ #
277
+ # @see Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig#fulfillment_mode
278
+ module FulfillmentMode
279
+ extend Dodopayments::Internal::Type::Enum
280
+
281
+ AUTO = :auto
282
+ MANUAL = :manual
283
+
284
+ # @!method self.values
285
+ # @return [Array<Symbol>]
286
+ end
256
287
  end
257
288
 
258
289
  # @!method self.variants
@@ -123,6 +123,7 @@ module Dodopayments
123
123
 
124
124
  AUTO = :auto
125
125
  IMPORT = :import
126
+ MANUAL = :manual
126
127
 
127
128
  # @!method self.values
128
129
  # @return [Array<Symbol>]
@@ -80,6 +80,7 @@ module Dodopayments
80
80
 
81
81
  AUTO = :auto
82
82
  IMPORT = :import
83
+ MANUAL = :manual
83
84
 
84
85
  # @!method self.values
85
86
  # @return [Array<Symbol>]
@@ -64,6 +64,14 @@ module Dodopayments
64
64
  # @return [String]
65
65
  required :payment_id, String
66
66
 
67
+ # @!attribute payment_provider
68
+ # Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
69
+ # merchant's own Hyperswitch connector); `dodo` for everything Dodo processed
70
+ # itself.
71
+ #
72
+ # @return [Symbol, Dodopayments::Models::Payment::PaymentProvider]
73
+ required :payment_provider, enum: -> { Dodopayments::Payment::PaymentProvider }
74
+
67
75
  # @!attribute refunds
68
76
  # List of refunds issued for this payment
69
77
  #
@@ -251,7 +259,7 @@ module Dodopayments
251
259
  # @return [Time, nil]
252
260
  optional :updated_at, Time, nil?: true
253
261
 
254
- # @!method initialize(billing:, brand_id:, business_id:, created_at:, currency:, customer:, digital_products_delivered:, disputes:, metadata:, payment_id:, refunds:, retry_attempt:, settlement_amount:, settlement_currency:, total_amount:, card_holder_name: nil, card_issuing_country: nil, card_last_four: nil, card_network: nil, card_type: nil, checkout_session_id: nil, custom_field_responses: nil, discount_id: nil, discounts: nil, error_code: nil, error_message: nil, invoice_id: nil, invoice_url: nil, payment_link: nil, payment_method: nil, payment_method_type: nil, product_cart: nil, refund_status: nil, settlement_tax: nil, status: nil, subscription_id: nil, tax: nil, updated_at: nil)
262
+ # @!method initialize(billing:, brand_id:, business_id:, created_at:, currency:, customer:, digital_products_delivered:, disputes:, metadata:, payment_id:, payment_provider:, refunds:, retry_attempt:, settlement_amount:, settlement_currency:, total_amount:, card_holder_name: nil, card_issuing_country: nil, card_last_four: nil, card_network: nil, card_type: nil, checkout_session_id: nil, custom_field_responses: nil, discount_id: nil, discounts: nil, error_code: nil, error_message: nil, invoice_id: nil, invoice_url: nil, payment_link: nil, payment_method: nil, payment_method_type: nil, product_cart: nil, refund_status: nil, settlement_tax: nil, status: nil, subscription_id: nil, tax: nil, updated_at: nil)
255
263
  # Some parameter documentations has been truncated, see
256
264
  # {Dodopayments::Models::Payment} for more details.
257
265
  #
@@ -275,6 +283,8 @@ module Dodopayments
275
283
  #
276
284
  # @param payment_id [String] Unique identifier for the payment
277
285
  #
286
+ # @param payment_provider [Symbol, Dodopayments::Models::Payment::PaymentProvider] Which processor handled this payment. `stripe` / `adyen` for BYOP routes
287
+ #
278
288
  # @param refunds [Array<Dodopayments::Models::RefundListItem>] List of refunds issued for this payment
279
289
  #
280
290
  # @param retry_attempt [Integer] Retry attempt number for subscription renewal payments.
@@ -331,6 +341,22 @@ module Dodopayments
331
341
  #
332
342
  # @param updated_at [Time, nil] Timestamp when the payment was last updated
333
343
 
344
+ # Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
345
+ # merchant's own Hyperswitch connector); `dodo` for everything Dodo processed
346
+ # itself.
347
+ #
348
+ # @see Dodopayments::Models::Payment#payment_provider
349
+ module PaymentProvider
350
+ extend Dodopayments::Internal::Type::Enum
351
+
352
+ STRIPE = :stripe
353
+ ADYEN = :adyen
354
+ DODO = :dodo
355
+
356
+ # @!method self.values
357
+ # @return [Array<Symbol>]
358
+ end
359
+
334
360
  class ProductCart < Dodopayments::Internal::Type::BaseModel
335
361
  # @!attribute product_id
336
362
  #
@@ -44,11 +44,31 @@ module Dodopayments
44
44
  # @return [String]
45
45
  required :payment_id, String
46
46
 
47
+ # @!attribute payment_provider
48
+ # Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
49
+ # merchant's own Hyperswitch connector); `dodo` for everything Dodo processed
50
+ # itself.
51
+ #
52
+ # @return [Symbol, Dodopayments::Models::PaymentListResponse::PaymentProvider]
53
+ required :payment_provider, enum: -> { Dodopayments::Models::PaymentListResponse::PaymentProvider }
54
+
47
55
  # @!attribute total_amount
48
56
  #
49
57
  # @return [Integer]
50
58
  required :total_amount, Integer
51
59
 
60
+ # @!attribute card_last_four
61
+ # The last four digits of the card
62
+ #
63
+ # @return [String, nil]
64
+ optional :card_last_four, String, nil?: true
65
+
66
+ # @!attribute card_network
67
+ # Card network like VISA, MASTERCARD etc.
68
+ #
69
+ # @return [String, nil]
70
+ optional :card_network, String, nil?: true
71
+
52
72
  # @!attribute dispute_status
53
73
  # The most recent dispute status for this payment. None if no disputes exist.
54
74
  #
@@ -94,7 +114,7 @@ module Dodopayments
94
114
  # @return [String, nil]
95
115
  optional :subscription_id, String, nil?: true
96
116
 
97
- # @!method initialize(brand_id:, created_at:, currency:, customer:, digital_products_delivered:, has_license_key:, metadata:, payment_id:, total_amount:, dispute_status: nil, invoice_id: nil, invoice_url: nil, payment_method: nil, payment_method_type: nil, refund_status: nil, status: nil, subscription_id: nil)
117
+ # @!method initialize(brand_id:, created_at:, currency:, customer:, digital_products_delivered:, has_license_key:, metadata:, payment_id:, payment_provider:, total_amount:, card_last_four: nil, card_network: nil, dispute_status: nil, invoice_id: nil, invoice_url: nil, payment_method: nil, payment_method_type: nil, refund_status: nil, status: nil, subscription_id: nil)
98
118
  # Some parameter documentations has been truncated, see
99
119
  # {Dodopayments::Models::PaymentListResponse} for more details.
100
120
  #
@@ -114,8 +134,14 @@ module Dodopayments
114
134
  #
115
135
  # @param payment_id [String]
116
136
  #
137
+ # @param payment_provider [Symbol, Dodopayments::Models::PaymentListResponse::PaymentProvider] Which processor handled this payment. `stripe` / `adyen` for BYOP routes
138
+ #
117
139
  # @param total_amount [Integer]
118
140
  #
141
+ # @param card_last_four [String, nil] The last four digits of the card
142
+ #
143
+ # @param card_network [String, nil] Card network like VISA, MASTERCARD etc.
144
+ #
119
145
  # @param dispute_status [Symbol, Dodopayments::Models::DisputeStatus, nil] The most recent dispute status for this payment. None if no disputes exist.
120
146
  #
121
147
  # @param invoice_id [String, nil] Invoice ID for this payment. Uses India-specific invoice ID if available.
@@ -131,6 +157,22 @@ module Dodopayments
131
157
  # @param status [Symbol, Dodopayments::Models::IntentStatus, nil]
132
158
  #
133
159
  # @param subscription_id [String, nil]
160
+
161
+ # Which processor handled this payment. `stripe` / `adyen` for BYOP routes (the
162
+ # merchant's own Hyperswitch connector); `dodo` for everything Dodo processed
163
+ # itself.
164
+ #
165
+ # @see Dodopayments::Models::PaymentListResponse#payment_provider
166
+ module PaymentProvider
167
+ extend Dodopayments::Internal::Type::Enum
168
+
169
+ STRIPE = :stripe
170
+ ADYEN = :adyen
171
+ DODO = :dodo
172
+
173
+ # @!method self.values
174
+ # @return [Array<Symbol>]
175
+ end
134
176
  end
135
177
  end
136
178
  end
@@ -37,13 +37,33 @@ module Dodopayments
37
37
  # @return [Symbol, :new]
38
38
  required :type, const: :new
39
39
 
40
+ # @!attribute allowed_payment_method_types
41
+ # List of payment methods allowed during checkout.
42
+ #
43
+ # Customers will **never** see payment methods that are **not** in this list.
44
+ # However, adding a method here **does not guarantee** customers will see it.
45
+ # Availability still depends on other factors (e.g., customer location, merchant
46
+ # settings).
47
+ #
48
+ # @return [Array<Symbol, Dodopayments::Models::PaymentMethodTypes>, nil]
49
+ optional :allowed_payment_method_types,
50
+ -> { Dodopayments::Internal::Type::ArrayOf[enum: Dodopayments::PaymentMethodTypes] },
51
+ nil?: true
52
+
40
53
  # @!attribute return_url
41
54
  #
42
55
  # @return [String, nil]
43
56
  optional :return_url, String, nil?: true
44
57
 
45
- # @!method initialize(return_url: nil, type: :new)
58
+ # @!method initialize(allowed_payment_method_types: nil, return_url: nil, type: :new)
59
+ # Some parameter documentations has been truncated, see
60
+ # {Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::PaymentMethod::New}
61
+ # for more details.
62
+ #
63
+ # @param allowed_payment_method_types [Array<Symbol, Dodopayments::Models::PaymentMethodTypes>, nil] List of payment methods allowed during checkout.
64
+ #
46
65
  # @param return_url [String, nil]
66
+ #
47
67
  # @param type [Symbol, :new]
48
68
  end
49
69
 
@@ -86,7 +86,7 @@ module Dodopayments
86
86
  MD = :md
87
87
  LG = :lg
88
88
  XL = :xl
89
- FONT_SIZE_2XL = :"2xl"
89
+ SIZE2_XL = :"2xl"
90
90
 
91
91
  # @!method self.values
92
92
  # @return [Array<Symbol>]
@@ -6,12 +6,14 @@ module Dodopayments
6
6
  class Grants
7
7
  # GET /entitlements/{id}/grants (public API)
8
8
  #
9
- # @overload list(id, customer_id: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
9
+ # @overload list(id, customer_id: nil, integration_type: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
10
10
  #
11
11
  # @param id [String] Entitlement ID
12
12
  #
13
13
  # @param customer_id [String] Filter by customer ID
14
14
  #
15
+ # @param integration_type [Symbol, Dodopayments::Models::Entitlements::GrantListParams::IntegrationType] Filter by integration type
16
+ #
15
17
  # @param page_number [Integer] Page number (default 0)
16
18
  #
17
19
  # @param page_size [Integer] Page size (default 10, max 100)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dodopayments
4
- VERSION = "2.13.0"
4
+ VERSION = "2.14.0"
5
5
  end
@@ -212,6 +212,11 @@ module Dodopayments
212
212
  :payment_retry_fee,
213
213
  Dodopayments::BalanceLedgerEntry::EventType::TaggedSymbol
214
214
  )
215
+ BYOP_FEE =
216
+ T.let(
217
+ :byop_fee,
218
+ Dodopayments::BalanceLedgerEntry::EventType::TaggedSymbol
219
+ )
215
220
 
216
221
  sig do
217
222
  override.returns(
@@ -1010,6 +1010,11 @@ module Dodopayments
1010
1010
  :payment_retry_fee,
1011
1011
  Dodopayments::BalanceRetrieveLedgerParams::EventType::TaggedSymbol
1012
1012
  )
1013
+ BYOP_FEE =
1014
+ T.let(
1015
+ :byop_fee,
1016
+ Dodopayments::BalanceRetrieveLedgerParams::EventType::TaggedSymbol
1017
+ )
1013
1018
 
1014
1019
  sig do
1015
1020
  override.returns(
@@ -44,6 +44,16 @@ module Dodopayments
44
44
  sig { returns(String) }
45
45
  attr_accessor :payment_id
46
46
 
47
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
48
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
49
+ # processed itself.
50
+ sig do
51
+ returns(
52
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol
53
+ )
54
+ end
55
+ attr_accessor :payment_provider
56
+
47
57
  # Whether the dispute was resolved by Rapid Dispute Resolution
48
58
  sig { returns(T.nilable(T::Boolean)) }
49
59
  attr_accessor :is_resolved_by_rdr
@@ -58,6 +68,8 @@ module Dodopayments
58
68
  dispute_stage: Dodopayments::DisputeStage::OrSymbol,
59
69
  dispute_status: Dodopayments::DisputeStatus::OrSymbol,
60
70
  payment_id: String,
71
+ payment_provider:
72
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::OrSymbol,
61
73
  is_resolved_by_rdr: T.nilable(T::Boolean)
62
74
  ).returns(T.attached_class)
63
75
  end
@@ -79,6 +91,10 @@ module Dodopayments
79
91
  dispute_status:,
80
92
  # The unique identifier of the payment associated with the dispute.
81
93
  payment_id:,
94
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
95
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
96
+ # processed itself.
97
+ payment_provider:,
82
98
  # Whether the dispute was resolved by Rapid Dispute Resolution
83
99
  is_resolved_by_rdr: nil
84
100
  )
@@ -95,12 +111,56 @@ module Dodopayments
95
111
  dispute_stage: Dodopayments::DisputeStage::TaggedSymbol,
96
112
  dispute_status: Dodopayments::DisputeStatus::TaggedSymbol,
97
113
  payment_id: String,
114
+ payment_provider:
115
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol,
98
116
  is_resolved_by_rdr: T.nilable(T::Boolean)
99
117
  }
100
118
  )
101
119
  end
102
120
  def to_hash
103
121
  end
122
+
123
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
124
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
125
+ # processed itself.
126
+ module PaymentProvider
127
+ extend Dodopayments::Internal::Type::Enum
128
+
129
+ TaggedSymbol =
130
+ T.type_alias do
131
+ T.all(
132
+ Symbol,
133
+ Dodopayments::Models::DisputeListResponse::PaymentProvider
134
+ )
135
+ end
136
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
137
+
138
+ STRIPE =
139
+ T.let(
140
+ :stripe,
141
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol
142
+ )
143
+ ADYEN =
144
+ T.let(
145
+ :adyen,
146
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol
147
+ )
148
+ DODO =
149
+ T.let(
150
+ :dodo,
151
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol
152
+ )
153
+
154
+ sig do
155
+ override.returns(
156
+ T::Array[
157
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol
158
+ ]
159
+ )
160
+ end
161
+ def self.values
162
+ end
163
+ end
104
164
  end
105
165
  end
106
166
  end
@@ -34,6 +34,10 @@ module Dodopayments
34
34
  sig { returns(String) }
35
35
  attr_accessor :entitlement_id
36
36
 
37
+ # The integration type of the grant's entitlement (e.g. `license_key`).
38
+ sig { returns(Dodopayments::EntitlementIntegrationType::TaggedSymbol) }
39
+ attr_accessor :integration_type
40
+
37
41
  # Arbitrary key-value metadata recorded on the grant.
38
42
  sig { returns(T::Hash[Symbol, String]) }
39
43
  attr_accessor :metadata
@@ -123,6 +127,8 @@ module Dodopayments
123
127
  created_at: Time,
124
128
  customer_id: String,
125
129
  entitlement_id: String,
130
+ integration_type:
131
+ Dodopayments::EntitlementIntegrationType::OrSymbol,
126
132
  metadata: T::Hash[Symbol, String],
127
133
  status:
128
134
  Dodopayments::Entitlements::EntitlementGrant::Status::OrSymbol,
@@ -153,6 +159,8 @@ module Dodopayments
153
159
  customer_id:,
154
160
  # Identifier of the entitlement this grant was issued from.
155
161
  entitlement_id:,
162
+ # The integration type of the grant's entitlement (e.g. `license_key`).
163
+ integration_type:,
156
164
  # Arbitrary key-value metadata recorded on the grant.
157
165
  metadata:,
158
166
  # Lifecycle status of the grant.
@@ -196,6 +204,8 @@ module Dodopayments
196
204
  created_at: Time,
197
205
  customer_id: String,
198
206
  entitlement_id: String,
207
+ integration_type:
208
+ Dodopayments::EntitlementIntegrationType::TaggedSymbol,
199
209
  metadata: T::Hash[Symbol, String],
200
210
  status:
201
211
  Dodopayments::Entitlements::EntitlementGrant::Status::TaggedSymbol,