dodopayments 2.14.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 (83) 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/checkout_session_preview_response.rb +15 -1
  7. data/lib/dodopayments/models/credit_balance_low_webhook_event.rb +16 -1
  8. data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +24 -1
  9. data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +14 -1
  10. data/lib/dodopayments/models/dunning_started_webhook_event.rb +14 -1
  11. data/lib/dodopayments/models/entitlements/entitlement_grant.rb +9 -1
  12. data/lib/dodopayments/models/entitlements/grant_list_params.rb +1 -26
  13. data/lib/dodopayments/models/get_dispute.rb +35 -1
  14. data/lib/dodopayments/models/integration_config.rb +7 -7
  15. data/lib/dodopayments/models/integration_config_response.rb +7 -11
  16. data/lib/dodopayments/models/license_key.rb +9 -1
  17. data/lib/dodopayments/models/payment.rb +7 -5
  18. data/lib/dodopayments/models/payment_create_response.rb +3 -2
  19. data/lib/dodopayments/models/payouts/breakup/detail_list_response.rb +7 -6
  20. data/lib/dodopayments/models/payouts/breakup_retrieve_response.rb +3 -3
  21. data/lib/dodopayments/models/product.rb +24 -1
  22. data/lib/dodopayments/models/product_create_params.rb +28 -5
  23. data/lib/dodopayments/models/product_update_params.rb +24 -1
  24. data/lib/dodopayments/models/refund.rb +9 -1
  25. data/lib/dodopayments/models/subscription.rb +12 -4
  26. data/lib/dodopayments/models/subscription_list_response.rb +3 -3
  27. data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +16 -1
  28. data/lib/dodopayments/models/subscription_retrieve_usage_history_response.rb +7 -2
  29. data/lib/dodopayments/models/theme_config.rb +1 -1
  30. data/lib/dodopayments/models/webhook_payload.rb +47 -3
  31. data/lib/dodopayments/resources/entitlements/grants.rb +1 -3
  32. data/lib/dodopayments/resources/products.rb +8 -4
  33. data/lib/dodopayments/version.rb +1 -1
  34. data/rbi/dodopayments/models/abandoned_checkout_detected_webhook_event.rbi +8 -0
  35. data/rbi/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbi +8 -0
  36. data/rbi/dodopayments/models/checkout_session_preview_response.rbi +14 -0
  37. data/rbi/dodopayments/models/credit_balance_low_webhook_event.rbi +8 -0
  38. data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +8 -0
  39. data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +8 -0
  40. data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +8 -0
  41. data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +8 -0
  42. data/rbi/dodopayments/models/entitlements/grant_list_params.rbi +0 -89
  43. data/rbi/dodopayments/models/get_dispute.rbi +52 -0
  44. data/rbi/dodopayments/models/integration_config.rbi +9 -9
  45. data/rbi/dodopayments/models/integration_config_response.rbi +9 -15
  46. data/rbi/dodopayments/models/license_key.rbi +8 -0
  47. data/rbi/dodopayments/models/payment.rbi +10 -6
  48. data/rbi/dodopayments/models/payment_create_response.rbi +4 -2
  49. data/rbi/dodopayments/models/payouts/breakup/detail_list_response.rbi +10 -8
  50. data/rbi/dodopayments/models/payouts/breakup_retrieve_response.rbi +4 -4
  51. data/rbi/dodopayments/models/product.rbi +36 -0
  52. data/rbi/dodopayments/models/product_create_params.rbi +58 -4
  53. data/rbi/dodopayments/models/product_update_params.rbi +54 -0
  54. data/rbi/dodopayments/models/refund.rbi +8 -0
  55. data/rbi/dodopayments/models/subscription.rbi +12 -4
  56. data/rbi/dodopayments/models/subscription_list_response.rbi +4 -4
  57. data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +10 -0
  58. data/rbi/dodopayments/models/subscription_retrieve_usage_history_response.rbi +4 -2
  59. data/rbi/dodopayments/models/theme_config.rbi +1 -1
  60. data/rbi/dodopayments/models/webhook_payload.rbi +24 -0
  61. data/rbi/dodopayments/resources/entitlements/grants.rbi +0 -4
  62. data/rbi/dodopayments/resources/products.rbi +14 -2
  63. data/sig/dodopayments/models/abandoned_checkout_detected_webhook_event.rbs +5 -0
  64. data/sig/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbs +5 -0
  65. data/sig/dodopayments/models/checkout_session_preview_response.rbs +5 -0
  66. data/sig/dodopayments/models/credit_balance_low_webhook_event.rbs +5 -0
  67. data/sig/dodopayments/models/credit_entitlements/credit_ledger_entry.rbs +5 -0
  68. data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +5 -0
  69. data/sig/dodopayments/models/dunning_started_webhook_event.rbs +5 -0
  70. data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +5 -0
  71. data/sig/dodopayments/models/entitlements/grant_list_params.rbs +0 -34
  72. data/sig/dodopayments/models/get_dispute.rbs +22 -0
  73. data/sig/dodopayments/models/license_key.rbs +5 -0
  74. data/sig/dodopayments/models/product.rbs +16 -0
  75. data/sig/dodopayments/models/product_create_params.rbs +17 -1
  76. data/sig/dodopayments/models/product_update_params.rbs +16 -0
  77. data/sig/dodopayments/models/refund.rbs +5 -0
  78. data/sig/dodopayments/models/subscription.rbs +5 -0
  79. data/sig/dodopayments/models/theme_config.rbs +1 -1
  80. data/sig/dodopayments/models/webhook_payload.rbs +15 -0
  81. data/sig/dodopayments/resources/entitlements/grants.rbs +0 -1
  82. data/sig/dodopayments/resources/products.rbs +2 -0
  83. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27d827b849b1a395655429f6e3c97f051d4253873b2fe5b45586e5a6204958e3
4
- data.tar.gz: 773760ea02d2559c34c1f2770f5142f49cd052a6e48fc3e4f9642dd38e271482
3
+ metadata.gz: 0a4ea7d48c452e8777b5f086f1698aec16d62a5604d517e6f4e2db6c43a3779f
4
+ data.tar.gz: 1925401ebbb432689767cdf2289e4bb0421476d4162f33a4f1b1217bd42c4d14
5
5
  SHA512:
6
- metadata.gz: 287dceb05d57649371eda3659dedbb55dc67e149803056b13d384942f0a67770291603b468d983fb2c8bb28c6aa819894bf2dc1b7d88ec7b3db02e481a1324f3
7
- data.tar.gz: 6676c1ba1d2b3c639f05a7408c2f4b2c8280d95a903b346a67eb523f9ec5ff3f55d9c592e91ee0d4f1792cb87cec93364142f888010a67f61131840f1b86f255
6
+ metadata.gz: '019eba2dfab72df94cd21cbd26ddbe173c393a0908ede430ff1b5bb2c46e0af6125f32c4891aea57baf9d1db90c0345cc584def4fc67dd10967a84e62860b8ee'
7
+ data.tar.gz: 65edc24a2753b64e5892da8c6ad3c240062f69188f4acf848c03f3cacc07719f1ac60605744c15cc184354935d971e5a44ef294d15688a4ac67a85f6fbcb3f64
data/CHANGELOG.md CHANGED
@@ -1,12 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ## [2.14.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.13.0...v2.14.0) (2026-06-06)
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
- * **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))
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.14.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
@@ -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
@@ -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
  #
@@ -129,7 +135,7 @@ module Dodopayments
129
135
  # @return [String, nil]
130
136
  optional :subscription_id, String, nil?: true
131
137
 
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)
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)
133
139
  # Some parameter documentations has been truncated, see
134
140
  # {Dodopayments::Models::Entitlements::EntitlementGrant} for more details.
135
141
  #
@@ -138,6 +144,8 @@ module Dodopayments
138
144
  #
139
145
  # @param id [String] Unique identifier of the grant.
140
146
  #
147
+ # @param brand_id [String] Brand id this grant belongs to.
148
+ #
141
149
  # @param business_id [String] Identifier of the business that owns the grant.
142
150
  #
143
151
  # @param created_at [Time] Timestamp when the grant was created.
@@ -19,12 +19,6 @@ 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
-
28
22
  # @!attribute page_number
29
23
  # Page number (default 0)
30
24
  #
@@ -43,13 +37,11 @@ module Dodopayments
43
37
  # @return [Symbol, Dodopayments::Models::Entitlements::GrantListParams::Status, nil]
44
38
  optional :status, enum: -> { Dodopayments::Entitlements::GrantListParams::Status }
45
39
 
46
- # @!method initialize(id:, customer_id: nil, integration_type: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
40
+ # @!method initialize(id:, customer_id: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
47
41
  # @param id [String]
48
42
  #
49
43
  # @param customer_id [String] Filter by customer ID
50
44
  #
51
- # @param integration_type [Symbol, Dodopayments::Models::Entitlements::GrantListParams::IntegrationType] Filter by integration type
52
- #
53
45
  # @param page_number [Integer] Page number (default 0)
54
46
  #
55
47
  # @param page_size [Integer] Page size (default 10, max 100)
@@ -58,23 +50,6 @@ module Dodopayments
58
50
  #
59
51
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
60
52
 
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
-
78
53
  # Filter by grant status
79
54
  module Status
80
55
  extend Dodopayments::Internal::Type::Enum
@@ -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
@@ -182,9 +182,9 @@ module Dodopayments
182
182
  optional :duration_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
183
183
 
184
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.
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
188
  #
189
189
  # @return [Symbol, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig::FulfillmentMode, nil]
190
190
  optional :fulfillment_mode,
@@ -203,11 +203,11 @@ module Dodopayments
203
203
  #
204
204
  # @param duration_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of `duration_count`.
205
205
  #
206
- # @param fulfillment_mode [Symbol, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig::FulfillmentMode, nil] Fulfillment mode: `auto` (default) generates keys automatically; `manual`
206
+ # @param fulfillment_mode [Symbol, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig::FulfillmentMode, nil] How license keys are fulfilled. `auto` (default) generates and delivers
207
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.
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
211
  #
212
212
  # @see Dodopayments::Models::IntegrationConfig::LicenseKeyConfig#fulfillment_mode
213
213
  module FulfillmentMode
@@ -242,11 +242,9 @@ module Dodopayments
242
242
  optional :duration_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
243
243
 
244
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.
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`.
250
248
  #
251
249
  # @return [Symbol, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode, nil]
252
250
  optional :fulfillment_mode,
@@ -266,13 +264,11 @@ module Dodopayments
266
264
  #
267
265
  # @param duration_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of `duration_count`.
268
266
  #
269
- # @param fulfillment_mode [Symbol, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode, nil] Fulfillment mode:
267
+ # @param fulfillment_mode [Symbol, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig::FulfillmentMode, nil] How license keys are fulfilled. `auto` (default) generates and delivers
270
268
 
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.
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`.
276
272
  #
277
273
  # @see Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig#fulfillment_mode
278
274
  module FulfillmentMode
@@ -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.
@@ -103,8 +103,9 @@ module Dodopayments
103
103
  required :settlement_currency, enum: -> { Dodopayments::Currency }
104
104
 
105
105
  # @!attribute total_amount
106
- # Total amount charged to the customer including tax, in smallest currency unit
107
- # (e.g. cents)
106
+ # Total amount charged to the customer including tax, in the currency's smallest
107
+ # unit (e.g. cents for USD, yen for JPY, fils for KWD — see the currency's decimal
108
+ # places)
108
109
  #
109
110
  # @return [Integer]
110
111
  required :total_amount, Integer
@@ -248,7 +249,8 @@ module Dodopayments
248
249
  optional :subscription_id, String, nil?: true
249
250
 
250
251
  # @!attribute tax
251
- # Amount of tax collected in smallest currency unit (e.g. cents)
252
+ # Amount of tax collected in the currency's smallest unit (e.g. cents for USD, yen
253
+ # for JPY, fils for KWD)
252
254
  #
253
255
  # @return [Integer, nil]
254
256
  optional :tax, Integer, nil?: true
@@ -293,7 +295,7 @@ module Dodopayments
293
295
  #
294
296
  # @param settlement_currency [Symbol, Dodopayments::Models::Currency] The currency in which the settlement_amount will be credited to your Dodo balanc
295
297
  #
296
- # @param total_amount [Integer] Total amount charged to the customer including tax, in smallest currency unit (e
298
+ # @param total_amount [Integer] Total amount charged to the customer including tax, in the currency's smallest u
297
299
  #
298
300
  # @param card_holder_name [String, nil] Cardholder name
299
301
  #
@@ -337,7 +339,7 @@ module Dodopayments
337
339
  #
338
340
  # @param subscription_id [String, nil] Identifier of the subscription if payment is part of a subscription
339
341
  #
340
- # @param tax [Integer, nil] Amount of tax collected in smallest currency unit (e.g. cents)
342
+ # @param tax [Integer, nil] Amount of tax collected in the currency's smallest unit
341
343
  #
342
344
  # @param updated_at [Time, nil] Timestamp when the payment was last updated
343
345
 
@@ -30,7 +30,8 @@ module Dodopayments
30
30
  required :payment_id, String
31
31
 
32
32
  # @!attribute total_amount
33
- # Total amount of the payment in smallest currency unit (e.g. cents)
33
+ # Total amount of the payment in the currency's smallest unit (cents for USD, yen
34
+ # for JPY, fils for KWD)
34
35
  #
35
36
  # @return [Integer]
36
37
  required :total_amount, Integer
@@ -82,7 +83,7 @@ module Dodopayments
82
83
  #
83
84
  # @param payment_id [String] Unique identifier for the payment
84
85
  #
85
- # @param total_amount [Integer] Total amount of the payment in smallest currency unit (e.g. cents)
86
+ # @param total_amount [Integer] Total amount of the payment in the currency's smallest unit
86
87
  #
87
88
  # @param discount_id [String, nil] DEPRECATED: Use discount_ids instead. Returns the first discount's ID if present
88
89
  #