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
@@ -92,6 +92,10 @@ module Dodopayments
92
92
  end
93
93
  attr_accessor :abandonment_reason
94
94
 
95
+ # Brand id this abandoned checkout belongs to
96
+ sig { returns(String) }
97
+ attr_accessor :brand_id
98
+
95
99
  sig { returns(String) }
96
100
  attr_accessor :customer_id
97
101
 
@@ -115,6 +119,7 @@ module Dodopayments
115
119
  abandoned_at: Time,
116
120
  abandonment_reason:
117
121
  Dodopayments::AbandonedCheckoutRecoveredWebhookEvent::Data::AbandonmentReason::OrSymbol,
122
+ brand_id: String,
118
123
  customer_id: String,
119
124
  payment_id: String,
120
125
  status:
@@ -125,6 +130,8 @@ module Dodopayments
125
130
  def self.new(
126
131
  abandoned_at:,
127
132
  abandonment_reason:,
133
+ # Brand id this abandoned checkout belongs to
134
+ brand_id:,
128
135
  customer_id:,
129
136
  payment_id:,
130
137
  status:,
@@ -138,6 +145,7 @@ module Dodopayments
138
145
  abandoned_at: Time,
139
146
  abandonment_reason:
140
147
  Dodopayments::AbandonedCheckoutRecoveredWebhookEvent::Data::AbandonmentReason::TaggedSymbol,
148
+ brand_id: String,
141
149
  customer_id: String,
142
150
  payment_id: String,
143
151
  status:
@@ -35,6 +35,13 @@ module Dodopayments
35
35
  end
36
36
  attr_writer :current_breakup
37
37
 
38
+ # Whether the payment will be routed through the merchant's own processor (BYOP).
39
+ # True when the session's business has a BYOP route configured for the billing
40
+ # country; in that case the quoted amounts exclude Dodo-computed tax because the
41
+ # merchant is MoR and owns tax.
42
+ sig { returns(T::Boolean) }
43
+ attr_accessor :is_byop
44
+
38
45
  # The total product cart
39
46
  sig do
40
47
  returns(
@@ -84,6 +91,7 @@ module Dodopayments
84
91
  currency: Dodopayments::Currency::OrSymbol,
85
92
  current_breakup:
86
93
  Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup::OrHash,
94
+ is_byop: T::Boolean,
87
95
  product_cart:
88
96
  T::Array[
89
97
  Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::OrHash
@@ -104,6 +112,11 @@ module Dodopayments
104
112
  currency:,
105
113
  # Breakup of the current payment
106
114
  current_breakup:,
115
+ # Whether the payment will be routed through the merchant's own processor (BYOP).
116
+ # True when the session's business has a BYOP route configured for the billing
117
+ # country; in that case the quoted amounts exclude Dodo-computed tax because the
118
+ # merchant is MoR and owns tax.
119
+ is_byop:,
107
120
  # The total product cart
108
121
  product_cart:,
109
122
  # Total calculate price of the product cart
@@ -124,6 +137,7 @@ module Dodopayments
124
137
  currency: Dodopayments::Currency::TaggedSymbol,
125
138
  current_breakup:
126
139
  Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup,
140
+ is_byop: T::Boolean,
127
141
  product_cart:
128
142
  T::Array[
129
143
  Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart
@@ -79,6 +79,10 @@ module Dodopayments
79
79
  sig { returns(String) }
80
80
  attr_accessor :available_balance
81
81
 
82
+ # Brand id this credit entitlement belongs to
83
+ sig { returns(String) }
84
+ attr_accessor :brand_id
85
+
82
86
  sig { returns(String) }
83
87
  attr_accessor :credit_entitlement_id
84
88
 
@@ -104,6 +108,7 @@ module Dodopayments
104
108
  sig do
105
109
  params(
106
110
  available_balance: String,
111
+ brand_id: String,
107
112
  credit_entitlement_id: String,
108
113
  credit_entitlement_name: String,
109
114
  customer_id: String,
@@ -115,6 +120,8 @@ module Dodopayments
115
120
  end
116
121
  def self.new(
117
122
  available_balance:,
123
+ # Brand id this credit entitlement belongs to
124
+ brand_id:,
118
125
  credit_entitlement_id:,
119
126
  credit_entitlement_name:,
120
127
  customer_id:,
@@ -129,6 +136,7 @@ module Dodopayments
129
136
  override.returns(
130
137
  {
131
138
  available_balance: String,
139
+ brand_id: String,
132
140
  credit_entitlement_id: String,
133
141
  credit_entitlement_name: String,
134
142
  customer_id: String,
@@ -24,6 +24,10 @@ module Dodopayments
24
24
  sig { returns(String) }
25
25
  attr_accessor :balance_before
26
26
 
27
+ # Brand id this credit ledger entry belongs to
28
+ sig { returns(String) }
29
+ attr_accessor :brand_id
30
+
27
31
  sig { returns(String) }
28
32
  attr_accessor :business_id
29
33
 
@@ -71,6 +75,7 @@ module Dodopayments
71
75
  amount: String,
72
76
  balance_after: String,
73
77
  balance_before: String,
78
+ brand_id: String,
74
79
  business_id: String,
75
80
  created_at: Time,
76
81
  credit_entitlement_id: String,
@@ -91,6 +96,8 @@ module Dodopayments
91
96
  amount:,
92
97
  balance_after:,
93
98
  balance_before:,
99
+ # Brand id this credit ledger entry belongs to
100
+ brand_id:,
94
101
  business_id:,
95
102
  created_at:,
96
103
  credit_entitlement_id:,
@@ -113,6 +120,7 @@ module Dodopayments
113
120
  amount: String,
114
121
  balance_after: String,
115
122
  balance_before: String,
123
+ brand_id: String,
116
124
  business_id: String,
117
125
  created_at: Time,
118
126
  credit_entitlement_id: String,
@@ -76,6 +76,10 @@ module Dodopayments
76
76
  )
77
77
  end
78
78
 
79
+ # Brand id this dunning attempt belongs to
80
+ sig { returns(String) }
81
+ attr_accessor :brand_id
82
+
79
83
  sig { returns(Time) }
80
84
  attr_accessor :created_at
81
85
 
@@ -105,6 +109,7 @@ module Dodopayments
105
109
  # Webhook payload for dunning.started and dunning.recovered events
106
110
  sig do
107
111
  params(
112
+ brand_id: String,
108
113
  created_at: Time,
109
114
  customer_id: String,
110
115
  status:
@@ -116,6 +121,8 @@ module Dodopayments
116
121
  ).returns(T.attached_class)
117
122
  end
118
123
  def self.new(
124
+ # Brand id this dunning attempt belongs to
125
+ brand_id:,
119
126
  created_at:,
120
127
  customer_id:,
121
128
  status:,
@@ -128,6 +135,7 @@ module Dodopayments
128
135
  sig do
129
136
  override.returns(
130
137
  {
138
+ brand_id: String,
131
139
  created_at: Time,
132
140
  customer_id: String,
133
141
  status:
@@ -76,6 +76,10 @@ module Dodopayments
76
76
  )
77
77
  end
78
78
 
79
+ # Brand id this dunning attempt belongs to
80
+ sig { returns(String) }
81
+ attr_accessor :brand_id
82
+
79
83
  sig { returns(Time) }
80
84
  attr_accessor :created_at
81
85
 
@@ -105,6 +109,7 @@ module Dodopayments
105
109
  # Webhook payload for dunning.started and dunning.recovered events
106
110
  sig do
107
111
  params(
112
+ brand_id: String,
108
113
  created_at: Time,
109
114
  customer_id: String,
110
115
  status:
@@ -116,6 +121,8 @@ module Dodopayments
116
121
  ).returns(T.attached_class)
117
122
  end
118
123
  def self.new(
124
+ # Brand id this dunning attempt belongs to
125
+ brand_id:,
119
126
  created_at:,
120
127
  customer_id:,
121
128
  status:,
@@ -128,6 +135,7 @@ module Dodopayments
128
135
  sig do
129
136
  override.returns(
130
137
  {
138
+ brand_id: String,
131
139
  created_at: Time,
132
140
  customer_id: String,
133
141
  status:
@@ -18,6 +18,10 @@ module Dodopayments
18
18
  sig { returns(String) }
19
19
  attr_accessor :id
20
20
 
21
+ # Brand id this grant belongs to.
22
+ sig { returns(String) }
23
+ attr_accessor :brand_id
24
+
21
25
  # Identifier of the business that owns the grant.
22
26
  sig { returns(String) }
23
27
  attr_accessor :business_id
@@ -123,6 +127,7 @@ module Dodopayments
123
127
  sig do
124
128
  params(
125
129
  id: String,
130
+ brand_id: String,
126
131
  business_id: String,
127
132
  created_at: Time,
128
133
  customer_id: String,
@@ -151,6 +156,8 @@ module Dodopayments
151
156
  def self.new(
152
157
  # Unique identifier of the grant.
153
158
  id:,
159
+ # Brand id this grant belongs to.
160
+ brand_id:,
154
161
  # Identifier of the business that owns the grant.
155
162
  business_id:,
156
163
  # Timestamp when the grant was created.
@@ -200,6 +207,7 @@ module Dodopayments
200
207
  override.returns(
201
208
  {
202
209
  id: String,
210
+ brand_id: String,
203
211
  business_id: String,
204
212
  created_at: Time,
205
213
  customer_id: String,
@@ -25,24 +25,6 @@ module Dodopayments
25
25
  sig { params(customer_id: String).void }
26
26
  attr_writer :customer_id
27
27
 
28
- # Filter by integration type
29
- sig do
30
- returns(
31
- T.nilable(
32
- Dodopayments::Entitlements::GrantListParams::IntegrationType::OrSymbol
33
- )
34
- )
35
- end
36
- attr_reader :integration_type
37
-
38
- sig do
39
- params(
40
- integration_type:
41
- Dodopayments::Entitlements::GrantListParams::IntegrationType::OrSymbol
42
- ).void
43
- end
44
- attr_writer :integration_type
45
-
46
28
  # Page number (default 0)
47
29
  sig { returns(T.nilable(Integer)) }
48
30
  attr_reader :page_number
@@ -79,8 +61,6 @@ module Dodopayments
79
61
  params(
80
62
  id: String,
81
63
  customer_id: String,
82
- integration_type:
83
- Dodopayments::Entitlements::GrantListParams::IntegrationType::OrSymbol,
84
64
  page_number: Integer,
85
65
  page_size: Integer,
86
66
  status:
@@ -92,8 +72,6 @@ module Dodopayments
92
72
  id:,
93
73
  # Filter by customer ID
94
74
  customer_id: nil,
95
- # Filter by integration type
96
- integration_type: nil,
97
75
  # Page number (default 0)
98
76
  page_number: nil,
99
77
  # Page size (default 10, max 100)
@@ -109,8 +87,6 @@ module Dodopayments
109
87
  {
110
88
  id: String,
111
89
  customer_id: String,
112
- integration_type:
113
- Dodopayments::Entitlements::GrantListParams::IntegrationType::OrSymbol,
114
90
  page_number: Integer,
115
91
  page_size: Integer,
116
92
  status:
@@ -122,71 +98,6 @@ module Dodopayments
122
98
  def to_hash
123
99
  end
124
100
 
125
- # Filter by integration type
126
- module IntegrationType
127
- extend Dodopayments::Internal::Type::Enum
128
-
129
- TaggedSymbol =
130
- T.type_alias do
131
- T.all(
132
- Symbol,
133
- Dodopayments::Entitlements::GrantListParams::IntegrationType
134
- )
135
- end
136
- OrSymbol = T.type_alias { T.any(Symbol, String) }
137
-
138
- DISCORD =
139
- T.let(
140
- :discord,
141
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
142
- )
143
- TELEGRAM =
144
- T.let(
145
- :telegram,
146
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
147
- )
148
- GITHUB =
149
- T.let(
150
- :github,
151
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
152
- )
153
- FIGMA =
154
- T.let(
155
- :figma,
156
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
157
- )
158
- FRAMER =
159
- T.let(
160
- :framer,
161
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
162
- )
163
- NOTION =
164
- T.let(
165
- :notion,
166
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
167
- )
168
- DIGITAL_FILES =
169
- T.let(
170
- :digital_files,
171
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
172
- )
173
- LICENSE_KEY =
174
- T.let(
175
- :license_key,
176
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
177
- )
178
-
179
- sig do
180
- override.returns(
181
- T::Array[
182
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
183
- ]
184
- )
185
- end
186
- def self.values
187
- end
188
- end
189
-
190
101
  # Filter by grant status
191
102
  module Status
192
103
  extend Dodopayments::Internal::Type::Enum
@@ -13,6 +13,10 @@ module Dodopayments
13
13
  sig { returns(String) }
14
14
  attr_accessor :amount
15
15
 
16
+ # Brand id this dispute belongs to
17
+ sig { returns(String) }
18
+ attr_accessor :brand_id
19
+
16
20
  # The unique identifier of the business involved in the dispute.
17
21
  sig { returns(String) }
18
22
  attr_accessor :business_id
@@ -50,6 +54,12 @@ module Dodopayments
50
54
  sig { returns(String) }
51
55
  attr_accessor :payment_id
52
56
 
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
+ sig { returns(Dodopayments::GetDispute::PaymentProvider::TaggedSymbol) }
61
+ attr_accessor :payment_provider
62
+
53
63
  # Whether the dispute was resolved by Rapid Dispute Resolution
54
64
  sig { returns(T.nilable(T::Boolean)) }
55
65
  attr_accessor :is_resolved_by_rdr
@@ -65,6 +75,7 @@ module Dodopayments
65
75
  sig do
66
76
  params(
67
77
  amount: String,
78
+ brand_id: String,
68
79
  business_id: String,
69
80
  created_at: Time,
70
81
  currency: String,
@@ -73,6 +84,7 @@ module Dodopayments
73
84
  dispute_stage: Dodopayments::DisputeStage::OrSymbol,
74
85
  dispute_status: Dodopayments::DisputeStatus::OrSymbol,
75
86
  payment_id: String,
87
+ payment_provider: Dodopayments::GetDispute::PaymentProvider::OrSymbol,
76
88
  is_resolved_by_rdr: T.nilable(T::Boolean),
77
89
  reason: T.nilable(String),
78
90
  remarks: T.nilable(String)
@@ -82,6 +94,8 @@ module Dodopayments
82
94
  # The amount involved in the dispute, represented as a string to accommodate
83
95
  # precision.
84
96
  amount:,
97
+ # Brand id this dispute belongs to
98
+ brand_id:,
85
99
  # The unique identifier of the business involved in the dispute.
86
100
  business_id:,
87
101
  # The timestamp of when the dispute was created, in UTC.
@@ -98,6 +112,10 @@ module Dodopayments
98
112
  dispute_status:,
99
113
  # The unique identifier of the payment associated with the dispute.
100
114
  payment_id:,
115
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
116
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
117
+ # processed itself.
118
+ payment_provider:,
101
119
  # Whether the dispute was resolved by Rapid Dispute Resolution
102
120
  is_resolved_by_rdr: nil,
103
121
  # Reason for the dispute
@@ -111,6 +129,7 @@ module Dodopayments
111
129
  override.returns(
112
130
  {
113
131
  amount: String,
132
+ brand_id: String,
114
133
  business_id: String,
115
134
  created_at: Time,
116
135
  currency: String,
@@ -119,6 +138,8 @@ module Dodopayments
119
138
  dispute_stage: Dodopayments::DisputeStage::TaggedSymbol,
120
139
  dispute_status: Dodopayments::DisputeStatus::TaggedSymbol,
121
140
  payment_id: String,
141
+ payment_provider:
142
+ Dodopayments::GetDispute::PaymentProvider::TaggedSymbol,
122
143
  is_resolved_by_rdr: T.nilable(T::Boolean),
123
144
  reason: T.nilable(String),
124
145
  remarks: T.nilable(String)
@@ -127,6 +148,37 @@ module Dodopayments
127
148
  end
128
149
  def to_hash
129
150
  end
151
+
152
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
153
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
154
+ # processed itself.
155
+ module PaymentProvider
156
+ extend Dodopayments::Internal::Type::Enum
157
+
158
+ TaggedSymbol =
159
+ T.type_alias do
160
+ T.all(Symbol, Dodopayments::GetDispute::PaymentProvider)
161
+ end
162
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
163
+
164
+ STRIPE =
165
+ T.let(
166
+ :stripe,
167
+ Dodopayments::GetDispute::PaymentProvider::TaggedSymbol
168
+ )
169
+ ADYEN =
170
+ T.let(:adyen, Dodopayments::GetDispute::PaymentProvider::TaggedSymbol)
171
+ DODO =
172
+ T.let(:dodo, Dodopayments::GetDispute::PaymentProvider::TaggedSymbol)
173
+
174
+ sig do
175
+ override.returns(
176
+ T::Array[Dodopayments::GetDispute::PaymentProvider::TaggedSymbol]
177
+ )
178
+ end
179
+ def self.values
180
+ end
181
+ end
130
182
  end
131
183
  end
132
184
  end
@@ -308,9 +308,9 @@ module Dodopayments
308
308
  sig { returns(T.nilable(Dodopayments::TimeInterval::OrSymbol)) }
309
309
  attr_accessor :duration_interval
310
310
 
311
- # Fulfillment mode: `auto` (default) generates keys automatically; `manual`
312
- # creates pending grants the merchant fulfills via the
313
- # `POST /grants/{id}/license-key` endpoint.
311
+ # How license keys are fulfilled. `auto` (default) generates and delivers keys to
312
+ # customers automatically; `manual` creates pending grants that you fulfill with
313
+ # the supplied key via `POST /grants/{grant_id}/license-key`.
314
314
  sig do
315
315
  returns(
316
316
  T.nilable(
@@ -344,9 +344,9 @@ module Dodopayments
344
344
  duration_count: nil,
345
345
  # Unit of `duration_count`.
346
346
  duration_interval: nil,
347
- # Fulfillment mode: `auto` (default) generates keys automatically; `manual`
348
- # creates pending grants the merchant fulfills via the
349
- # `POST /grants/{id}/license-key` endpoint.
347
+ # How license keys are fulfilled. `auto` (default) generates and delivers keys to
348
+ # customers automatically; `manual` creates pending grants that you fulfill with
349
+ # the supplied key via `POST /grants/{grant_id}/license-key`.
350
350
  fulfillment_mode: nil
351
351
  )
352
352
  end
@@ -369,9 +369,9 @@ module Dodopayments
369
369
  def to_hash
370
370
  end
371
371
 
372
- # Fulfillment mode: `auto` (default) generates keys automatically; `manual`
373
- # creates pending grants the merchant fulfills via the
374
- # `POST /grants/{id}/license-key` endpoint.
372
+ # How license keys are fulfilled. `auto` (default) generates and delivers keys to
373
+ # customers automatically; `manual` creates pending grants that you fulfill with
374
+ # the supplied key via `POST /grants/{grant_id}/license-key`.
375
375
  module FulfillmentMode
376
376
  extend Dodopayments::Internal::Type::Enum
377
377
 
@@ -425,11 +425,9 @@ module Dodopayments
425
425
  sig { returns(T.nilable(Dodopayments::TimeInterval::TaggedSymbol)) }
426
426
  attr_accessor :duration_interval
427
427
 
428
- # Fulfillment mode:
429
- #
430
- # `auto` (default) generate and delivery license keys to customers automatically.
431
- # `manual` creates pending grants, actual key is provided via the fulfillment API
432
- # and delivered to the customer when fulfilled.
428
+ # How license keys are fulfilled. `auto` (default) generates and delivers keys to
429
+ # customers automatically; `manual` creates pending grants that you fulfill with
430
+ # the supplied key via `POST /grants/{grant_id}/license-key`.
433
431
  sig do
434
432
  returns(
435
433
  T.nilable(
@@ -463,11 +461,9 @@ module Dodopayments
463
461
  duration_count: nil,
464
462
  # Unit of `duration_count`.
465
463
  duration_interval: nil,
466
- # Fulfillment mode:
467
- #
468
- # `auto` (default) generate and delivery license keys to customers automatically.
469
- # `manual` creates pending grants, actual key is provided via the fulfillment API
470
- # and delivered to the customer when fulfilled.
464
+ # How license keys are fulfilled. `auto` (default) generates and delivers keys to
465
+ # customers automatically; `manual` creates pending grants that you fulfill with
466
+ # the supplied key via `POST /grants/{grant_id}/license-key`.
471
467
  fulfillment_mode: nil
472
468
  )
473
469
  end
@@ -490,11 +486,9 @@ module Dodopayments
490
486
  def to_hash
491
487
  end
492
488
 
493
- # Fulfillment mode:
494
- #
495
- # `auto` (default) generate and delivery license keys to customers automatically.
496
- # `manual` creates pending grants, actual key is provided via the fulfillment API
497
- # and delivered to the customer when fulfilled.
489
+ # How license keys are fulfilled. `auto` (default) generates and delivers keys to
490
+ # customers automatically; `manual` creates pending grants that you fulfill with
491
+ # the supplied key via `POST /grants/{grant_id}/license-key`.
498
492
  module FulfillmentMode
499
493
  extend Dodopayments::Internal::Type::Enum
500
494
 
@@ -12,6 +12,10 @@ module Dodopayments
12
12
  sig { returns(String) }
13
13
  attr_accessor :id
14
14
 
15
+ # Brand id this license key belongs to
16
+ sig { returns(String) }
17
+ attr_accessor :brand_id
18
+
15
19
  # The unique identifier of the business associated with the license key.
16
20
  sig { returns(String) }
17
21
  attr_accessor :business_id
@@ -65,6 +69,7 @@ module Dodopayments
65
69
  sig do
66
70
  params(
67
71
  id: String,
72
+ brand_id: String,
68
73
  business_id: String,
69
74
  created_at: Time,
70
75
  customer_id: String,
@@ -82,6 +87,8 @@ module Dodopayments
82
87
  def self.new(
83
88
  # The unique identifier of the license key.
84
89
  id:,
90
+ # Brand id this license key belongs to
91
+ brand_id:,
85
92
  # The unique identifier of the business associated with the license key.
86
93
  business_id:,
87
94
  # The timestamp indicating when the license key was created, in UTC.
@@ -115,6 +122,7 @@ module Dodopayments
115
122
  override.returns(
116
123
  {
117
124
  id: String,
125
+ brand_id: String,
118
126
  business_id: String,
119
127
  created_at: Time,
120
128
  customer_id: String,
@@ -84,8 +84,9 @@ module Dodopayments
84
84
  sig { returns(Dodopayments::Currency::TaggedSymbol) }
85
85
  attr_accessor :settlement_currency
86
86
 
87
- # Total amount charged to the customer including tax, in smallest currency unit
88
- # (e.g. cents)
87
+ # Total amount charged to the customer including tax, in the currency's smallest
88
+ # unit (e.g. cents for USD, yen for JPY, fils for KWD — see the currency's decimal
89
+ # places)
89
90
  sig { returns(Integer) }
90
91
  attr_accessor :total_amount
91
92
 
@@ -179,7 +180,8 @@ module Dodopayments
179
180
  sig { returns(T.nilable(String)) }
180
181
  attr_accessor :subscription_id
181
182
 
182
- # Amount of tax collected in smallest currency unit (e.g. cents)
183
+ # Amount of tax collected in the currency's smallest unit (e.g. cents for USD, yen
184
+ # for JPY, fils for KWD)
183
185
  sig { returns(T.nilable(Integer)) }
184
186
  attr_accessor :tax
185
187
 
@@ -271,8 +273,9 @@ module Dodopayments
271
273
  # balance. This may differ from the customer's payment currency in adaptive
272
274
  # pricing scenarios.
273
275
  settlement_currency:,
274
- # Total amount charged to the customer including tax, in smallest currency unit
275
- # (e.g. cents)
276
+ # Total amount charged to the customer including tax, in the currency's smallest
277
+ # unit (e.g. cents for USD, yen for JPY, fils for KWD — see the currency's decimal
278
+ # places)
276
279
  total_amount:,
277
280
  # Cardholder name
278
281
  card_holder_name: nil,
@@ -320,7 +323,8 @@ module Dodopayments
320
323
  status: nil,
321
324
  # Identifier of the subscription if payment is part of a subscription
322
325
  subscription_id: nil,
323
- # Amount of tax collected in smallest currency unit (e.g. cents)
326
+ # Amount of tax collected in the currency's smallest unit (e.g. cents for USD, yen
327
+ # for JPY, fils for KWD)
324
328
  tax: nil,
325
329
  # Timestamp when the payment was last updated
326
330
  updated_at: nil
@@ -33,7 +33,8 @@ module Dodopayments
33
33
  sig { returns(String) }
34
34
  attr_accessor :payment_id
35
35
 
36
- # Total amount of the payment in smallest currency unit (e.g. cents)
36
+ # Total amount of the payment in the currency's smallest unit (cents for USD, yen
37
+ # for JPY, fils for KWD)
37
38
  sig { returns(Integer) }
38
39
  attr_accessor :total_amount
39
40
 
@@ -83,7 +84,8 @@ module Dodopayments
83
84
  metadata:,
84
85
  # Unique identifier for the payment
85
86
  payment_id:,
86
- # Total amount of the payment in smallest currency unit (e.g. cents)
87
+ # Total amount of the payment in the currency's smallest unit (cents for USD, yen
88
+ # for JPY, fils for KWD)
87
89
  total_amount:,
88
90
  # DEPRECATED: Use discount_ids instead. Returns the first discount's ID if
89
91
  # present.