dodopayments 2.13.0 → 2.15.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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -3
  3. data/README.md +1 -1
  4. data/lib/dodopayments/models/abandoned_checkout_detected_webhook_event.rb +14 -1
  5. data/lib/dodopayments/models/abandoned_checkout_recovered_webhook_event.rb +14 -1
  6. data/lib/dodopayments/models/balance_ledger_entry.rb +1 -0
  7. data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +1 -0
  8. data/lib/dodopayments/models/checkout_session_preview_response.rb +15 -1
  9. data/lib/dodopayments/models/credit_balance_low_webhook_event.rb +16 -1
  10. data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +24 -1
  11. data/lib/dodopayments/models/dispute_list_response.rb +27 -1
  12. data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +14 -1
  13. data/lib/dodopayments/models/dunning_started_webhook_event.rb +14 -1
  14. data/lib/dodopayments/models/entitlements/entitlement_grant.rb +17 -1
  15. data/lib/dodopayments/models/get_dispute.rb +35 -1
  16. data/lib/dodopayments/models/integration_config.rb +28 -1
  17. data/lib/dodopayments/models/integration_config_response.rb +28 -1
  18. data/lib/dodopayments/models/license_key.rb +10 -1
  19. data/lib/dodopayments/models/license_key_list_params.rb +1 -0
  20. data/lib/dodopayments/models/payment.rb +34 -6
  21. data/lib/dodopayments/models/payment_create_response.rb +3 -2
  22. data/lib/dodopayments/models/payment_list_response.rb +43 -1
  23. data/lib/dodopayments/models/payouts/breakup/detail_list_response.rb +7 -6
  24. data/lib/dodopayments/models/payouts/breakup_retrieve_response.rb +3 -3
  25. data/lib/dodopayments/models/product.rb +24 -1
  26. data/lib/dodopayments/models/product_create_params.rb +28 -5
  27. data/lib/dodopayments/models/product_update_params.rb +24 -1
  28. data/lib/dodopayments/models/refund.rb +9 -1
  29. data/lib/dodopayments/models/subscription.rb +12 -4
  30. data/lib/dodopayments/models/subscription_list_response.rb +3 -3
  31. data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +16 -1
  32. data/lib/dodopayments/models/subscription_retrieve_usage_history_response.rb +7 -2
  33. data/lib/dodopayments/models/subscription_update_payment_method_params.rb +21 -1
  34. data/lib/dodopayments/models/webhook_payload.rb +47 -3
  35. data/lib/dodopayments/resources/products.rb +8 -4
  36. data/lib/dodopayments/version.rb +1 -1
  37. data/rbi/dodopayments/models/abandoned_checkout_detected_webhook_event.rbi +8 -0
  38. data/rbi/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbi +8 -0
  39. data/rbi/dodopayments/models/balance_ledger_entry.rbi +5 -0
  40. data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +5 -0
  41. data/rbi/dodopayments/models/checkout_session_preview_response.rbi +14 -0
  42. data/rbi/dodopayments/models/credit_balance_low_webhook_event.rbi +8 -0
  43. data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +8 -0
  44. data/rbi/dodopayments/models/dispute_list_response.rbi +60 -0
  45. data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +8 -0
  46. data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +8 -0
  47. data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +18 -0
  48. data/rbi/dodopayments/models/get_dispute.rbi +52 -0
  49. data/rbi/dodopayments/models/integration_config.rbi +65 -3
  50. data/rbi/dodopayments/models/integration_config_response.rbi +64 -3
  51. data/rbi/dodopayments/models/license_key.rbi +9 -0
  52. data/rbi/dodopayments/models/license_key_list_params.rbi +5 -0
  53. data/rbi/dodopayments/models/payment.rbi +49 -6
  54. data/rbi/dodopayments/models/payment_create_response.rbi +4 -2
  55. data/rbi/dodopayments/models/payment_list_response.rbi +76 -0
  56. data/rbi/dodopayments/models/payouts/breakup/detail_list_response.rbi +10 -8
  57. data/rbi/dodopayments/models/payouts/breakup_retrieve_response.rbi +4 -4
  58. data/rbi/dodopayments/models/product.rbi +36 -0
  59. data/rbi/dodopayments/models/product_create_params.rbi +58 -4
  60. data/rbi/dodopayments/models/product_update_params.rbi +54 -0
  61. data/rbi/dodopayments/models/refund.rbi +8 -0
  62. data/rbi/dodopayments/models/subscription.rbi +12 -4
  63. data/rbi/dodopayments/models/subscription_list_response.rbi +4 -4
  64. data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +10 -0
  65. data/rbi/dodopayments/models/subscription_retrieve_usage_history_response.rbi +4 -2
  66. data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +40 -5
  67. data/rbi/dodopayments/models/webhook_payload.rbi +24 -0
  68. data/rbi/dodopayments/resources/products.rbi +14 -2
  69. data/sig/dodopayments/models/abandoned_checkout_detected_webhook_event.rbs +5 -0
  70. data/sig/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbs +5 -0
  71. data/sig/dodopayments/models/balance_ledger_entry.rbs +2 -0
  72. data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +2 -0
  73. data/sig/dodopayments/models/checkout_session_preview_response.rbs +5 -0
  74. data/sig/dodopayments/models/credit_balance_low_webhook_event.rbs +5 -0
  75. data/sig/dodopayments/models/credit_entitlements/credit_ledger_entry.rbs +5 -0
  76. data/sig/dodopayments/models/dispute_list_response.rbs +17 -0
  77. data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +5 -0
  78. data/sig/dodopayments/models/dunning_started_webhook_event.rbs +5 -0
  79. data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +10 -0
  80. data/sig/dodopayments/models/get_dispute.rbs +22 -0
  81. data/sig/dodopayments/models/integration_config.rbs +19 -3
  82. data/sig/dodopayments/models/integration_config_response.rbs +19 -3
  83. data/sig/dodopayments/models/license_key.rbs +7 -1
  84. data/sig/dodopayments/models/license_key_list_params.rbs +2 -1
  85. data/sig/dodopayments/models/payment.rbs +17 -0
  86. data/sig/dodopayments/models/payment_list_response.rbs +27 -0
  87. data/sig/dodopayments/models/product.rbs +16 -0
  88. data/sig/dodopayments/models/product_create_params.rbs +17 -1
  89. data/sig/dodopayments/models/product_update_params.rbs +16 -0
  90. data/sig/dodopayments/models/refund.rbs +5 -0
  91. data/sig/dodopayments/models/subscription.rbs +5 -0
  92. data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +19 -4
  93. data/sig/dodopayments/models/webhook_payload.rbs +15 -0
  94. data/sig/dodopayments/resources/products.rbs +2 -0
  95. 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: 0a4ea7d48c452e8777b5f086f1698aec16d62a5604d517e6f4e2db6c43a3779f
4
+ data.tar.gz: 1925401ebbb432689767cdf2289e4bb0421476d4162f33a4f1b1217bd42c4d14
5
5
  SHA512:
6
- metadata.gz: 434899bee76179c1780249a4b4f0d477f2ca8b0ca22c652b22b8379cc350f3c9aa3c4400f009e374fad0711945936071082fd056d16ca114b056260049562cfe
7
- data.tar.gz: 870bbeaf588c220a92ba3be036b77c6622cdf2e39569cca9af73e7375136043ba108d3718b4964ea55d6ab4eb3bf087567d8e278446de9bd723ef0988cf66c57
6
+ metadata.gz: '019eba2dfab72df94cd21cbd26ddbe173c393a0908ede430ff1b5bb2c46e0af6125f32c4891aea57baf9d1db90c0345cc584def4fc67dd10967a84e62860b8ee'
7
+ data.tar.gz: 65edc24a2753b64e5892da8c6ad3c240062f69188f4acf848c03f3cacc07719f1ac60605744c15cc184354935d971e5a44ef294d15688a4ac67a85f6fbcb3f64
data/CHANGELOG.md CHANGED
@@ -1,12 +1,13 @@
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.15.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.14.0...v2.15.0) (2026-06-13)
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
+ * **spec:** update OpenAPI to 1.104.0 product localized prices ([6d425ef](https://github.com/dodopayments/dodopayments-ruby/commit/6d425ef7c218ccb7a3b4fbece57640a0682ad3d3))
9
+ * **spec:** update OpenAPI to 1.104.0 product localized prices ([dbf0ea5](https://github.com/dodopayments/dodopayments-ruby/commit/dbf0ea5f0c42a1caa3c8e5c0eb76a471abcd9acb))
10
+ * **spec:** update OpenAPI to 1.104.0 — product localized prices ([#93](https://github.com/dodopayments/dodopayments-ruby/issues/93)) ([6d425ef](https://github.com/dodopayments/dodopayments-ruby/commit/6d425ef7c218ccb7a3b4fbece57640a0682ad3d3))
10
11
 
11
12
  ## [2.11.1](https://github.com/dodopayments/dodopayments-ruby/compare/v2.11.0...v2.11.1) (2026-06-01)
12
13
 
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.15.0"
27
27
  ```
28
28
 
29
29
  <!-- x-release-please-end -->
@@ -53,6 +53,12 @@ module Dodopayments
53
53
  required :abandonment_reason,
54
54
  enum: -> { Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Data::AbandonmentReason }
55
55
 
56
+ # @!attribute brand_id
57
+ # Brand id this abandoned checkout belongs to
58
+ #
59
+ # @return [String]
60
+ required :brand_id, String
61
+
56
62
  # @!attribute customer_id
57
63
  #
58
64
  # @return [String]
@@ -73,15 +79,22 @@ module Dodopayments
73
79
  # @return [String, nil]
74
80
  optional :recovered_payment_id, String, nil?: true
75
81
 
76
- # @!method initialize(abandoned_at:, abandonment_reason:, customer_id:, payment_id:, status:, recovered_payment_id: nil)
82
+ # @!method initialize(abandoned_at:, abandonment_reason:, brand_id:, customer_id:, payment_id:, status:, recovered_payment_id: nil)
77
83
  # Webhook payload for abandoned_checkout.detected and abandoned_checkout.recovered
78
84
  # events
79
85
  #
80
86
  # @param abandoned_at [Time]
87
+ #
81
88
  # @param abandonment_reason [Symbol, Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data::AbandonmentReason]
89
+ #
90
+ # @param brand_id [String] Brand id this abandoned checkout belongs to
91
+ #
82
92
  # @param customer_id [String]
93
+ #
83
94
  # @param payment_id [String]
95
+ #
84
96
  # @param status [Symbol, Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data::Status]
97
+ #
85
98
  # @param recovered_payment_id [String, nil]
86
99
 
87
100
  # @see Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data#abandonment_reason
@@ -53,6 +53,12 @@ module Dodopayments
53
53
  required :abandonment_reason,
54
54
  enum: -> { Dodopayments::AbandonedCheckoutRecoveredWebhookEvent::Data::AbandonmentReason }
55
55
 
56
+ # @!attribute brand_id
57
+ # Brand id this abandoned checkout belongs to
58
+ #
59
+ # @return [String]
60
+ required :brand_id, String
61
+
56
62
  # @!attribute customer_id
57
63
  #
58
64
  # @return [String]
@@ -73,15 +79,22 @@ module Dodopayments
73
79
  # @return [String, nil]
74
80
  optional :recovered_payment_id, String, nil?: true
75
81
 
76
- # @!method initialize(abandoned_at:, abandonment_reason:, customer_id:, payment_id:, status:, recovered_payment_id: nil)
82
+ # @!method initialize(abandoned_at:, abandonment_reason:, brand_id:, customer_id:, payment_id:, status:, recovered_payment_id: nil)
77
83
  # Webhook payload for abandoned_checkout.detected and abandoned_checkout.recovered
78
84
  # events
79
85
  #
80
86
  # @param abandoned_at [Time]
87
+ #
81
88
  # @param abandonment_reason [Symbol, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data::AbandonmentReason]
89
+ #
90
+ # @param brand_id [String] Brand id this abandoned checkout belongs to
91
+ #
82
92
  # @param customer_id [String]
93
+ #
83
94
  # @param payment_id [String]
95
+ #
84
96
  # @param status [Symbol, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data::Status]
97
+ #
85
98
  # @param recovered_payment_id [String, nil]
86
99
 
87
100
  # @see Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data#abandonment_reason
@@ -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>]
@@ -22,6 +22,15 @@ module Dodopayments
22
22
  # @return [Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup]
23
23
  required :current_breakup, -> { Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup }
24
24
 
25
+ # @!attribute is_byop
26
+ # Whether the payment will be routed through the merchant's own processor (BYOP).
27
+ # True when the session's business has a BYOP route configured for the billing
28
+ # country; in that case the quoted amounts exclude Dodo-computed tax because the
29
+ # merchant is MoR and owns tax.
30
+ #
31
+ # @return [Boolean]
32
+ required :is_byop, Dodopayments::Internal::Type::Boolean
33
+
25
34
  # @!attribute product_cart
26
35
  # The total product cart
27
36
  #
@@ -55,7 +64,10 @@ module Dodopayments
55
64
  # @return [Integer, nil]
56
65
  optional :total_tax, Integer, nil?: true
57
66
 
58
- # @!method initialize(billing_country:, currency:, current_breakup:, product_cart:, total_price:, recurring_breakup: nil, tax_id_err_msg: nil, total_tax: nil)
67
+ # @!method initialize(billing_country:, currency:, current_breakup:, is_byop:, product_cart:, total_price:, recurring_breakup: nil, tax_id_err_msg: nil, total_tax: nil)
68
+ # Some parameter documentations has been truncated, see
69
+ # {Dodopayments::Models::CheckoutSessionPreviewResponse} for more details.
70
+ #
59
71
  # Data returned by the calculate checkout session API
60
72
  #
61
73
  # @param billing_country [Symbol, Dodopayments::Models::CountryCode] Billing country
@@ -64,6 +76,8 @@ module Dodopayments
64
76
  #
65
77
  # @param current_breakup [Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup] Breakup of the current payment
66
78
  #
79
+ # @param is_byop [Boolean] Whether the payment will be routed through the merchant's own
80
+ #
67
81
  # @param product_cart [Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart>] The total product cart
68
82
  #
69
83
  # @param total_price [Integer] Total calculate price of the product cart
@@ -43,6 +43,12 @@ module Dodopayments
43
43
  # @return [String]
44
44
  required :available_balance, String
45
45
 
46
+ # @!attribute brand_id
47
+ # Brand id this credit entitlement belongs to
48
+ #
49
+ # @return [String]
50
+ required :brand_id, String
51
+
46
52
  # @!attribute credit_entitlement_id
47
53
  #
48
54
  # @return [String]
@@ -78,16 +84,25 @@ module Dodopayments
78
84
  # @return [Integer]
79
85
  required :threshold_percent, Integer
80
86
 
81
- # @!method initialize(available_balance:, credit_entitlement_id:, credit_entitlement_name:, customer_id:, subscription_credits_amount:, subscription_id:, threshold_amount:, threshold_percent:)
87
+ # @!method initialize(available_balance:, brand_id:, credit_entitlement_id:, credit_entitlement_name:, customer_id:, subscription_credits_amount:, subscription_id:, threshold_amount:, threshold_percent:)
82
88
  # Webhook payload for credit.balance_low event
83
89
  #
84
90
  # @param available_balance [String]
91
+ #
92
+ # @param brand_id [String] Brand id this credit entitlement belongs to
93
+ #
85
94
  # @param credit_entitlement_id [String]
95
+ #
86
96
  # @param credit_entitlement_name [String]
97
+ #
87
98
  # @param customer_id [String]
99
+ #
88
100
  # @param subscription_credits_amount [String]
101
+ #
89
102
  # @param subscription_id [String]
103
+ #
90
104
  # @param threshold_amount [String]
105
+ #
91
106
  # @param threshold_percent [Integer]
92
107
  end
93
108
  end
@@ -25,6 +25,12 @@ module Dodopayments
25
25
  # @return [String]
26
26
  required :balance_before, String
27
27
 
28
+ # @!attribute brand_id
29
+ # Brand id this credit ledger entry belongs to
30
+ #
31
+ # @return [String]
32
+ required :brand_id, String
33
+
28
34
  # @!attribute business_id
29
35
  #
30
36
  # @return [String]
@@ -86,24 +92,41 @@ module Dodopayments
86
92
  # @return [String, nil]
87
93
  optional :reference_type, String, nil?: true
88
94
 
89
- # @!method initialize(id:, amount:, balance_after:, balance_before:, business_id:, created_at:, credit_entitlement_id:, customer_id:, is_credit:, overage_after:, overage_before:, transaction_type:, description: nil, grant_id: nil, reference_id: nil, reference_type: nil)
95
+ # @!method initialize(id:, amount:, balance_after:, balance_before:, brand_id:, business_id:, created_at:, credit_entitlement_id:, customer_id:, is_credit:, overage_after:, overage_before:, transaction_type:, description: nil, grant_id: nil, reference_id: nil, reference_type: nil)
90
96
  # Response for a ledger entry
91
97
  #
92
98
  # @param id [String]
99
+ #
93
100
  # @param amount [String]
101
+ #
94
102
  # @param balance_after [String]
103
+ #
95
104
  # @param balance_before [String]
105
+ #
106
+ # @param brand_id [String] Brand id this credit ledger entry belongs to
107
+ #
96
108
  # @param business_id [String]
109
+ #
97
110
  # @param created_at [Time]
111
+ #
98
112
  # @param credit_entitlement_id [String]
113
+ #
99
114
  # @param customer_id [String]
115
+ #
100
116
  # @param is_credit [Boolean]
117
+ #
101
118
  # @param overage_after [String]
119
+ #
102
120
  # @param overage_before [String]
121
+ #
103
122
  # @param transaction_type [Symbol, Dodopayments::Models::CreditEntitlements::CreditLedgerEntry::TransactionType]
123
+ #
104
124
  # @param description [String, nil]
125
+ #
105
126
  # @param grant_id [String, nil]
127
+ #
106
128
  # @param reference_id [String, nil]
129
+ #
107
130
  # @param reference_type [String, nil]
108
131
 
109
132
  # @see Dodopayments::Models::CreditEntitlements::CreditLedgerEntry#transaction_type
@@ -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
@@ -38,6 +38,12 @@ module Dodopayments
38
38
 
39
39
  # @see Dodopayments::Models::DunningRecoveredWebhookEvent#data
40
40
  class Data < Dodopayments::Internal::Type::BaseModel
41
+ # @!attribute brand_id
42
+ # Brand id this dunning attempt belongs to
43
+ #
44
+ # @return [String]
45
+ required :brand_id, String
46
+
41
47
  # @!attribute created_at
42
48
  #
43
49
  # @return [Time]
@@ -68,14 +74,21 @@ module Dodopayments
68
74
  # @return [String, nil]
69
75
  optional :payment_id, String, nil?: true
70
76
 
71
- # @!method initialize(created_at:, customer_id:, status:, subscription_id:, trigger_state:, payment_id: nil)
77
+ # @!method initialize(brand_id:, created_at:, customer_id:, status:, subscription_id:, trigger_state:, payment_id: nil)
72
78
  # Webhook payload for dunning.started and dunning.recovered events
73
79
  #
80
+ # @param brand_id [String] Brand id this dunning attempt belongs to
81
+ #
74
82
  # @param created_at [Time]
83
+ #
75
84
  # @param customer_id [String]
85
+ #
76
86
  # @param status [Symbol, Dodopayments::Models::DunningRecoveredWebhookEvent::Data::Status]
87
+ #
77
88
  # @param subscription_id [String]
89
+ #
78
90
  # @param trigger_state [Symbol, Dodopayments::Models::DunningRecoveredWebhookEvent::Data::TriggerState]
91
+ #
79
92
  # @param payment_id [String, nil]
80
93
 
81
94
  # @see Dodopayments::Models::DunningRecoveredWebhookEvent::Data#status
@@ -38,6 +38,12 @@ module Dodopayments
38
38
 
39
39
  # @see Dodopayments::Models::DunningStartedWebhookEvent#data
40
40
  class Data < Dodopayments::Internal::Type::BaseModel
41
+ # @!attribute brand_id
42
+ # Brand id this dunning attempt belongs to
43
+ #
44
+ # @return [String]
45
+ required :brand_id, String
46
+
41
47
  # @!attribute created_at
42
48
  #
43
49
  # @return [Time]
@@ -68,14 +74,21 @@ module Dodopayments
68
74
  # @return [String, nil]
69
75
  optional :payment_id, String, nil?: true
70
76
 
71
- # @!method initialize(created_at:, customer_id:, status:, subscription_id:, trigger_state:, payment_id: nil)
77
+ # @!method initialize(brand_id:, created_at:, customer_id:, status:, subscription_id:, trigger_state:, payment_id: nil)
72
78
  # Webhook payload for dunning.started and dunning.recovered events
73
79
  #
80
+ # @param brand_id [String] Brand id this dunning attempt belongs to
81
+ #
74
82
  # @param created_at [Time]
83
+ #
75
84
  # @param customer_id [String]
85
+ #
76
86
  # @param status [Symbol, Dodopayments::Models::DunningStartedWebhookEvent::Data::Status]
87
+ #
77
88
  # @param subscription_id [String]
89
+ #
78
90
  # @param trigger_state [Symbol, Dodopayments::Models::DunningStartedWebhookEvent::Data::TriggerState]
91
+ #
79
92
  # @param payment_id [String, nil]
80
93
 
81
94
  # @see Dodopayments::Models::DunningStartedWebhookEvent::Data#status
@@ -11,6 +11,12 @@ module Dodopayments
11
11
  # @return [String]
12
12
  required :id, String
13
13
 
14
+ # @!attribute brand_id
15
+ # Brand id this grant belongs to.
16
+ #
17
+ # @return [String]
18
+ required :brand_id, String
19
+
14
20
  # @!attribute business_id
15
21
  # Identifier of the business that owns the grant.
16
22
  #
@@ -35,6 +41,12 @@ module Dodopayments
35
41
  # @return [String]
36
42
  required :entitlement_id, String
37
43
 
44
+ # @!attribute integration_type
45
+ # The integration type of the grant's entitlement (e.g. `license_key`).
46
+ #
47
+ # @return [Symbol, Dodopayments::Models::EntitlementIntegrationType]
48
+ required :integration_type, enum: -> { Dodopayments::EntitlementIntegrationType }
49
+
38
50
  # @!attribute metadata
39
51
  # Arbitrary key-value metadata recorded on the grant.
40
52
  #
@@ -123,7 +135,7 @@ module Dodopayments
123
135
  # @return [String, nil]
124
136
  optional :subscription_id, String, nil?: true
125
137
 
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)
138
+ # @!method initialize(id:, brand_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
139
  # Some parameter documentations has been truncated, see
128
140
  # {Dodopayments::Models::Entitlements::EntitlementGrant} for more details.
129
141
  #
@@ -132,6 +144,8 @@ module Dodopayments
132
144
  #
133
145
  # @param id [String] Unique identifier of the grant.
134
146
  #
147
+ # @param brand_id [String] Brand id this grant belongs to.
148
+ #
135
149
  # @param business_id [String] Identifier of the business that owns the grant.
136
150
  #
137
151
  # @param created_at [Time] Timestamp when the grant was created.
@@ -140,6 +154,8 @@ module Dodopayments
140
154
  #
141
155
  # @param entitlement_id [String] Identifier of the entitlement this grant was issued from.
142
156
  #
157
+ # @param integration_type [Symbol, Dodopayments::Models::EntitlementIntegrationType] The integration type of the grant's entitlement (e.g. `license_key`).
158
+ #
143
159
  # @param metadata [Hash{Symbol=>String}] Arbitrary key-value metadata recorded on the grant.
144
160
  #
145
161
  # @param status [Symbol, Dodopayments::Models::Entitlements::EntitlementGrant::Status] Lifecycle status of the grant.
@@ -11,6 +11,12 @@ module Dodopayments
11
11
  # @return [String]
12
12
  required :amount, String
13
13
 
14
+ # @!attribute brand_id
15
+ # Brand id this dispute belongs to
16
+ #
17
+ # @return [String]
18
+ required :brand_id, String
19
+
14
20
  # @!attribute business_id
15
21
  # The unique identifier of the business involved in the dispute.
16
22
  #
@@ -59,6 +65,14 @@ module Dodopayments
59
65
  # @return [String]
60
66
  required :payment_id, String
61
67
 
68
+ # @!attribute payment_provider
69
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
70
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
71
+ # processed itself.
72
+ #
73
+ # @return [Symbol, Dodopayments::Models::GetDispute::PaymentProvider]
74
+ required :payment_provider, enum: -> { Dodopayments::GetDispute::PaymentProvider }
75
+
62
76
  # @!attribute is_resolved_by_rdr
63
77
  # Whether the dispute was resolved by Rapid Dispute Resolution
64
78
  #
@@ -77,12 +91,14 @@ module Dodopayments
77
91
  # @return [String, nil]
78
92
  optional :remarks, String, nil?: true
79
93
 
80
- # @!method initialize(amount:, business_id:, created_at:, currency:, customer:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, is_resolved_by_rdr: nil, reason: nil, remarks: nil)
94
+ # @!method initialize(amount:, brand_id:, business_id:, created_at:, currency:, customer:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, payment_provider:, is_resolved_by_rdr: nil, reason: nil, remarks: nil)
81
95
  # Some parameter documentations has been truncated, see
82
96
  # {Dodopayments::Models::GetDispute} for more details.
83
97
  #
84
98
  # @param amount [String] The amount involved in the dispute, represented as a string to accommodate preci
85
99
  #
100
+ # @param brand_id [String] Brand id this dispute belongs to
101
+ #
86
102
  # @param business_id [String] The unique identifier of the business involved in the dispute.
87
103
  #
88
104
  # @param created_at [Time] The timestamp of when the dispute was created, in UTC.
@@ -99,11 +115,29 @@ module Dodopayments
99
115
  #
100
116
  # @param payment_id [String] The unique identifier of the payment associated with the dispute.
101
117
  #
118
+ # @param payment_provider [Symbol, Dodopayments::Models::GetDispute::PaymentProvider] Which processor handled the underlying payment. `stripe` / `adyen` for
119
+ #
102
120
  # @param is_resolved_by_rdr [Boolean, nil] Whether the dispute was resolved by Rapid Dispute Resolution
103
121
  #
104
122
  # @param reason [String, nil] Reason for the dispute
105
123
  #
106
124
  # @param remarks [String, nil] Remarks
125
+
126
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
127
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
128
+ # processed itself.
129
+ #
130
+ # @see Dodopayments::Models::GetDispute#payment_provider
131
+ module PaymentProvider
132
+ extend Dodopayments::Internal::Type::Enum
133
+
134
+ STRIPE = :stripe
135
+ ADYEN = :adyen
136
+ DODO = :dodo
137
+
138
+ # @!method self.values
139
+ # @return [Array<Symbol>]
140
+ end
107
141
  end
108
142
  end
109
143
  end
@@ -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
+ # How license keys are fulfilled. `auto` (default) generates and delivers keys to
186
+ # customers automatically; `manual` creates pending grants that you fulfill with
187
+ # the supplied key via `POST /grants/{grant_id}/license-key`.
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] How license keys are fulfilled. `auto` (default) generates and delivers
207
+
208
+ # How license keys are fulfilled. `auto` (default) generates and delivers keys to
209
+ # customers automatically; `manual` creates pending grants that you fulfill with
210
+ # the supplied key via `POST /grants/{grant_id}/license-key`.
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,17 @@ 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
+ # How license keys are fulfilled. `auto` (default) generates and delivers keys to
246
+ # customers automatically; `manual` creates pending grants that you fulfill with
247
+ # the supplied key via `POST /grants/{grant_id}/license-key`.
248
+ #
249
+ # @return [Symbol, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode, nil]
250
+ optional :fulfillment_mode,
251
+ enum: -> { Dodopayments::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode },
252
+ nil?: true
253
+
254
+ # @!method initialize(activation_message: nil, activations_limit: nil, duration_count: nil, duration_interval: nil, fulfillment_mode: nil)
245
255
  # Some parameter documentations has been truncated, see
246
256
  # {Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig} for more
247
257
  # details.
@@ -253,6 +263,23 @@ module Dodopayments
253
263
  # @param duration_count [Integer, nil] Validity duration of issued license keys. Provide both
254
264
  #
255
265
  # @param duration_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of `duration_count`.
266
+ #
267
+ # @param fulfillment_mode [Symbol, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode, nil] How license keys are fulfilled. `auto` (default) generates and delivers
268
+
269
+ # How license keys are fulfilled. `auto` (default) generates and delivers keys to
270
+ # customers automatically; `manual` creates pending grants that you fulfill with
271
+ # the supplied key via `POST /grants/{grant_id}/license-key`.
272
+ #
273
+ # @see Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig#fulfillment_mode
274
+ module FulfillmentMode
275
+ extend Dodopayments::Internal::Type::Enum
276
+
277
+ AUTO = :auto
278
+ MANUAL = :manual
279
+
280
+ # @!method self.values
281
+ # @return [Array<Symbol>]
282
+ end
256
283
  end
257
284
 
258
285
  # @!method self.variants
@@ -10,6 +10,12 @@ module Dodopayments
10
10
  # @return [String]
11
11
  required :id, String
12
12
 
13
+ # @!attribute brand_id
14
+ # Brand id this license key belongs to
15
+ #
16
+ # @return [String]
17
+ required :brand_id, String
18
+
13
19
  # @!attribute business_id
14
20
  # The unique identifier of the business associated with the license key.
15
21
  #
@@ -84,12 +90,14 @@ module Dodopayments
84
90
  # @return [String, nil]
85
91
  optional :subscription_id, String, nil?: true
86
92
 
87
- # @!method initialize(id:, business_id:, created_at:, customer_id:, instances_count:, key:, product_id:, source:, status:, activations_limit: nil, expires_at: nil, payment_id: nil, subscription_id: nil)
93
+ # @!method initialize(id:, brand_id:, business_id:, created_at:, customer_id:, instances_count:, key:, product_id:, source:, status:, activations_limit: nil, expires_at: nil, payment_id: nil, subscription_id: nil)
88
94
  # Some parameter documentations has been truncated, see
89
95
  # {Dodopayments::Models::LicenseKey} for more details.
90
96
  #
91
97
  # @param id [String] The unique identifier of the license key.
92
98
  #
99
+ # @param brand_id [String] Brand id this license key belongs to
100
+ #
93
101
  # @param business_id [String] The unique identifier of the business associated with the license key.
94
102
  #
95
103
  # @param created_at [Time] The timestamp indicating when the license key was created, in UTC.
@@ -123,6 +131,7 @@ module Dodopayments
123
131
 
124
132
  AUTO = :auto
125
133
  IMPORT = :import
134
+ MANUAL = :manual
126
135
 
127
136
  # @!method self.values
128
137
  # @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>]