dodopayments 2.26.0 → 2.27.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/dodopayments/client.rb +4 -0
- data/lib/dodopayments/models/balance_ledger_entry.rb +7 -1
- data/lib/dodopayments/models/blocklist/block_by_customer_id.rb +18 -0
- data/lib/dodopayments/models/blocklist/block_by_email.rb +18 -0
- data/lib/dodopayments/models/blocklist/block_identifier.rb +21 -0
- data/lib/dodopayments/models/blocklist/blocked_customer.rb +128 -0
- data/lib/dodopayments/models/blocklist/blocked_customer_source.rb +22 -0
- data/lib/dodopayments/models/blocklist/create_blocked_customer_request.rb +66 -0
- data/lib/dodopayments/models/blocklist/customer_create_params.rb +16 -0
- data/lib/dodopayments/models/blocklist/customer_delete_params.rb +22 -0
- data/lib/dodopayments/models/blocklist/customer_list_params.rb +64 -0
- data/lib/dodopayments/models/blocklist/customer_retrieve_params.rb +22 -0
- data/lib/dodopayments/models/blocklist/customers/blocked_customer_note.rb +44 -0
- data/lib/dodopayments/models/blocklist/customers/note_create_params.rb +24 -0
- data/lib/dodopayments/models/blocklist/customers/note_request.rb +19 -0
- data/lib/dodopayments/models/blocklist/customers/note_update_params.rb +30 -0
- data/lib/dodopayments/models/customer.rb +22 -1
- data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +1 -0
- data/lib/dodopayments/models/dunning_started_webhook_event.rb +1 -0
- data/lib/dodopayments/models/manual_retry.rb +76 -0
- data/lib/dodopayments/models/manual_retry_state.rb +50 -0
- data/lib/dodopayments/models/payment_retrieve_retry_state_params.rb +20 -0
- data/lib/dodopayments/models/payment_retry_params.rb +20 -0
- data/lib/dodopayments/models/subscription_active_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_cancelled_webhook_event.rb +33 -4
- data/lib/dodopayments/models/subscription_expired_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_failed_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_list_params.rb +1 -0
- data/lib/dodopayments/models/subscription_on_hold_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_past_due_webhook_event.rb +68 -0
- data/lib/dodopayments/models/subscription_paused_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_plan_changed_webhook_event.rb +33 -4
- data/lib/dodopayments/models/subscription_renewed_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_status.rb +1 -0
- data/lib/dodopayments/models/subscription_unpaused_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_update_params.rb +1 -0
- data/lib/dodopayments/models/subscription_update_payment_method_webhook_event.rb +34 -4
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +32 -4
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +3 -1
- data/lib/dodopayments/models/unwrap_webhook_event.rb +3 -1
- data/lib/dodopayments/models/webhook_event_type.rb +1 -0
- data/lib/dodopayments/models/webhook_payload.rb +19 -1
- data/lib/dodopayments/models.rb +12 -0
- data/lib/dodopayments/resources/blocklist/customers/notes.rb +68 -0
- data/lib/dodopayments/resources/blocklist/customers.rb +107 -0
- data/lib/dodopayments/resources/blocklist.rb +18 -0
- data/lib/dodopayments/resources/payments.rb +36 -0
- data/lib/dodopayments/resources/webhooks.rb +2 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +23 -1
- data/rbi/dodopayments/client.rbi +3 -0
- data/rbi/dodopayments/models/balance_ledger_entry.rbi +6 -0
- data/rbi/dodopayments/models/blocklist/block_by_customer_id.rbi +32 -0
- data/rbi/dodopayments/models/blocklist/block_by_email.rbi +32 -0
- data/rbi/dodopayments/models/blocklist/block_identifier.rbi +30 -0
- data/rbi/dodopayments/models/blocklist/blocked_customer.rbi +161 -0
- data/rbi/dodopayments/models/blocklist/blocked_customer_source.rbi +55 -0
- data/rbi/dodopayments/models/blocklist/create_blocked_customer_request.rbi +143 -0
- data/rbi/dodopayments/models/blocklist/customer_create_params.rbi +34 -0
- data/rbi/dodopayments/models/blocklist/customer_delete_params.rbi +40 -0
- data/rbi/dodopayments/models/blocklist/customer_list_params.rbi +88 -0
- data/rbi/dodopayments/models/blocklist/customer_retrieve_params.rbi +40 -0
- data/rbi/dodopayments/models/blocklist/customers/blocked_customer_note.rbi +66 -0
- data/rbi/dodopayments/models/blocklist/customers/note_create_params.rbi +45 -0
- data/rbi/dodopayments/models/blocklist/customers/note_request.rbi +30 -0
- data/rbi/dodopayments/models/blocklist/customers/note_update_params.rbi +50 -0
- data/rbi/dodopayments/models/customer.rbi +20 -0
- data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/manual_retry.rbi +93 -0
- data/rbi/dodopayments/models/manual_retry_state.rbi +65 -0
- data/rbi/dodopayments/models/payment_retrieve_retry_state_params.rbi +38 -0
- data/rbi/dodopayments/models/payment_retry_params.rbi +38 -0
- data/rbi/dodopayments/models/subscription_active_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_cancelled_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_expired_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_failed_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_list_params.rbi +5 -0
- data/rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_past_due_webhook_event.rbi +114 -0
- data/rbi/dodopayments/models/subscription_paused_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_renewed_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_status.rbi +2 -0
- data/rbi/dodopayments/models/subscription_unpaused_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_update_params.rbi +5 -0
- data/rbi/dodopayments/models/subscription_update_payment_method_webhook_event.rbi +58 -6
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi +1 -0
- data/rbi/dodopayments/models/unwrap_webhook_event.rbi +1 -0
- data/rbi/dodopayments/models/webhook_event_type.rbi +5 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +37 -3
- data/rbi/dodopayments/models.rbi +14 -0
- data/rbi/dodopayments/resources/blocklist/customers/notes.rbi +50 -0
- data/rbi/dodopayments/resources/blocklist/customers.rbi +88 -0
- data/rbi/dodopayments/resources/blocklist.rbi +15 -0
- data/rbi/dodopayments/resources/payments.rbi +26 -0
- data/rbi/dodopayments/resources/webhooks.rbi +2 -0
- data/sig/dodopayments/client.rbs +2 -0
- data/sig/dodopayments/models/balance_ledger_entry.rbs +5 -0
- data/sig/dodopayments/models/blocklist/block_by_customer_id.rbs +15 -0
- data/sig/dodopayments/models/blocklist/block_by_email.rbs +15 -0
- data/sig/dodopayments/models/blocklist/block_identifier.rbs +15 -0
- data/sig/dodopayments/models/blocklist/blocked_customer.rbs +87 -0
- data/sig/dodopayments/models/blocklist/blocked_customer_source.rbs +20 -0
- data/sig/dodopayments/models/blocklist/create_blocked_customer_request.rbs +71 -0
- data/sig/dodopayments/models/blocklist/customer_create_params.rbs +17 -0
- data/sig/dodopayments/models/blocklist/customer_delete_params.rbs +25 -0
- data/sig/dodopayments/models/blocklist/customer_list_params.rbs +53 -0
- data/sig/dodopayments/models/blocklist/customer_retrieve_params.rbs +25 -0
- data/sig/dodopayments/models/blocklist/customers/blocked_customer_note.rbs +44 -0
- data/sig/dodopayments/models/blocklist/customers/note_create_params.rbs +30 -0
- data/sig/dodopayments/models/blocklist/customers/note_request.rbs +17 -0
- data/sig/dodopayments/models/blocklist/customers/note_update_params.rbs +36 -0
- data/sig/dodopayments/models/customer.rbs +10 -0
- data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +2 -1
- data/sig/dodopayments/models/dunning_started_webhook_event.rbs +2 -1
- data/sig/dodopayments/models/manual_retry.rbs +55 -0
- data/sig/dodopayments/models/manual_retry_state.rbs +40 -0
- data/sig/dodopayments/models/payment_retrieve_retry_state_params.rbs +23 -0
- data/sig/dodopayments/models/payment_retry_params.rbs +23 -0
- data/sig/dodopayments/models/subscription_active_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_cancelled_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_expired_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_failed_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_list_params.rbs +2 -0
- data/sig/dodopayments/models/subscription_on_hold_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_past_due_webhook_event.rbs +47 -0
- data/sig/dodopayments/models/subscription_paused_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_renewed_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_status.rbs +9 -1
- data/sig/dodopayments/models/subscription_unpaused_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_update_params.rbs +2 -0
- data/sig/dodopayments/models/subscription_update_payment_method_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs +1 -0
- data/sig/dodopayments/models/unwrap_webhook_event.rbs +1 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -0
- data/sig/dodopayments/models/webhook_payload.rbs +16 -4
- data/sig/dodopayments/models.rbs +12 -0
- data/sig/dodopayments/resources/blocklist/customers/notes.rbs +24 -0
- data/sig/dodopayments/resources/blocklist/customers.rbs +36 -0
- data/sig/dodopayments/resources/blocklist.rbs +9 -0
- data/sig/dodopayments/resources/payments.rbs +10 -0
- data/sig/dodopayments/resources/webhooks.rbs +2 -0
- metadata +68 -2
data/rbi/dodopayments/models.rbi
CHANGED
|
@@ -38,6 +38,8 @@ module Dodopayments
|
|
|
38
38
|
|
|
39
39
|
BillingAddress = Dodopayments::Models::BillingAddress
|
|
40
40
|
|
|
41
|
+
Blocklist = Dodopayments::Models::Blocklist
|
|
42
|
+
|
|
41
43
|
Brand = Dodopayments::Models::Brand
|
|
42
44
|
|
|
43
45
|
BrandArchiveParams = Dodopayments::Models::BrandArchiveParams
|
|
@@ -319,6 +321,10 @@ module Dodopayments
|
|
|
319
321
|
|
|
320
322
|
LicenseValidateParams = Dodopayments::Models::LicenseValidateParams
|
|
321
323
|
|
|
324
|
+
ManualRetry = Dodopayments::Models::ManualRetry
|
|
325
|
+
|
|
326
|
+
ManualRetryState = Dodopayments::Models::ManualRetryState
|
|
327
|
+
|
|
322
328
|
Metadata =
|
|
323
329
|
T.let(
|
|
324
330
|
Dodopayments::Models::Metadata,
|
|
@@ -380,6 +386,11 @@ module Dodopayments
|
|
|
380
386
|
|
|
381
387
|
PaymentRetrieveParams = Dodopayments::Models::PaymentRetrieveParams
|
|
382
388
|
|
|
389
|
+
PaymentRetrieveRetryStateParams =
|
|
390
|
+
Dodopayments::Models::PaymentRetrieveRetryStateParams
|
|
391
|
+
|
|
392
|
+
PaymentRetryParams = Dodopayments::Models::PaymentRetryParams
|
|
393
|
+
|
|
383
394
|
PaymentSucceededWebhookEvent =
|
|
384
395
|
Dodopayments::Models::PaymentSucceededWebhookEvent
|
|
385
396
|
|
|
@@ -497,6 +508,9 @@ module Dodopayments
|
|
|
497
508
|
SubscriptionOnHoldWebhookEvent =
|
|
498
509
|
Dodopayments::Models::SubscriptionOnHoldWebhookEvent
|
|
499
510
|
|
|
511
|
+
SubscriptionPastDueWebhookEvent =
|
|
512
|
+
Dodopayments::Models::SubscriptionPastDueWebhookEvent
|
|
513
|
+
|
|
500
514
|
SubscriptionPausedWebhookEvent =
|
|
501
515
|
Dodopayments::Models::SubscriptionPausedWebhookEvent
|
|
502
516
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class Blocklist
|
|
6
|
+
class Customers
|
|
7
|
+
class Notes
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
entry_id: String,
|
|
11
|
+
note: String,
|
|
12
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
13
|
+
).returns(Dodopayments::Blocklist::Customers::BlockedCustomerNote)
|
|
14
|
+
end
|
|
15
|
+
def create(
|
|
16
|
+
# Blocklist entry id
|
|
17
|
+
entry_id,
|
|
18
|
+
note:,
|
|
19
|
+
request_options: {}
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
note_id: String,
|
|
26
|
+
entry_id: String,
|
|
27
|
+
note: String,
|
|
28
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
29
|
+
).returns(Dodopayments::Blocklist::Customers::BlockedCustomerNote)
|
|
30
|
+
end
|
|
31
|
+
def update(
|
|
32
|
+
# Path param: Note id
|
|
33
|
+
note_id,
|
|
34
|
+
# Path param: Blocklist entry id
|
|
35
|
+
entry_id:,
|
|
36
|
+
# Body param
|
|
37
|
+
note:,
|
|
38
|
+
request_options: {}
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# @api private
|
|
43
|
+
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
|
44
|
+
def self.new(client:)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class Blocklist
|
|
6
|
+
class Customers
|
|
7
|
+
sig { returns(Dodopayments::Resources::Blocklist::Customers::Notes) }
|
|
8
|
+
attr_reader :notes
|
|
9
|
+
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
create_blocked_customer_request:
|
|
13
|
+
T.any(
|
|
14
|
+
Dodopayments::Blocklist::CreateBlockedCustomerRequest::BlocklistCustomersBlockByCustomerID::OrHash,
|
|
15
|
+
Dodopayments::Blocklist::CreateBlockedCustomerRequest::BlocklistCustomersBlockByEmail::OrHash
|
|
16
|
+
),
|
|
17
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
18
|
+
).returns(Dodopayments::Blocklist::BlockedCustomer)
|
|
19
|
+
end
|
|
20
|
+
def create(create_blocked_customer_request:, request_options: {})
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
entry_id: String,
|
|
26
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
27
|
+
).returns(Dodopayments::Blocklist::BlockedCustomer)
|
|
28
|
+
end
|
|
29
|
+
def retrieve(
|
|
30
|
+
# Blocklist entry id
|
|
31
|
+
entry_id,
|
|
32
|
+
request_options: {}
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
blocked_by_email: T.nilable(String),
|
|
39
|
+
created_at_gte: T.nilable(Time),
|
|
40
|
+
created_at_lte: T.nilable(Time),
|
|
41
|
+
identifier: T.nilable(String),
|
|
42
|
+
page_number: T.nilable(Integer),
|
|
43
|
+
page_size: T.nilable(Integer),
|
|
44
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
45
|
+
).returns(
|
|
46
|
+
Dodopayments::Internal::DefaultPageNumberPagination[
|
|
47
|
+
Dodopayments::Blocklist::BlockedCustomer
|
|
48
|
+
]
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
def list(
|
|
52
|
+
# Filter by the dashboard user who blocked the customer.
|
|
53
|
+
blocked_by_email: nil,
|
|
54
|
+
# Blocked on or after this time.
|
|
55
|
+
created_at_gte: nil,
|
|
56
|
+
# Blocked on or before this time.
|
|
57
|
+
created_at_lte: nil,
|
|
58
|
+
# Partial, case-insensitive match on the email and on the customer id.
|
|
59
|
+
identifier: nil,
|
|
60
|
+
# Page number. Default 0.
|
|
61
|
+
page_number: nil,
|
|
62
|
+
# Page size. Default 10, maximum 100.
|
|
63
|
+
page_size: nil,
|
|
64
|
+
request_options: {}
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
sig do
|
|
69
|
+
params(
|
|
70
|
+
entry_id: String,
|
|
71
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
72
|
+
).void
|
|
73
|
+
end
|
|
74
|
+
def delete(
|
|
75
|
+
# Blocklist entry id
|
|
76
|
+
entry_id,
|
|
77
|
+
request_options: {}
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# @api private
|
|
82
|
+
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
|
83
|
+
def self.new(client:)
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class Blocklist
|
|
6
|
+
sig { returns(Dodopayments::Resources::Blocklist::Customers) }
|
|
7
|
+
attr_reader :customers
|
|
8
|
+
|
|
9
|
+
# @api private
|
|
10
|
+
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
|
11
|
+
def self.new(client:)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -165,6 +165,32 @@ module Dodopayments
|
|
|
165
165
|
)
|
|
166
166
|
end
|
|
167
167
|
|
|
168
|
+
sig do
|
|
169
|
+
params(
|
|
170
|
+
payment_id: String,
|
|
171
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
172
|
+
).returns(Dodopayments::ManualRetryState)
|
|
173
|
+
end
|
|
174
|
+
def retrieve_retry_state(
|
|
175
|
+
# Id of the failed payment
|
|
176
|
+
payment_id,
|
|
177
|
+
request_options: {}
|
|
178
|
+
)
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
sig do
|
|
182
|
+
params(
|
|
183
|
+
payment_id: String,
|
|
184
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
185
|
+
).returns(Dodopayments::ManualRetry)
|
|
186
|
+
end
|
|
187
|
+
def retry_(
|
|
188
|
+
# Id of the failed payment
|
|
189
|
+
payment_id,
|
|
190
|
+
request_options: {}
|
|
191
|
+
)
|
|
192
|
+
end
|
|
193
|
+
|
|
168
194
|
# @api private
|
|
169
195
|
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
|
170
196
|
def self.new(client:)
|
|
@@ -185,6 +185,7 @@ module Dodopayments
|
|
|
185
185
|
Dodopayments::SubscriptionExpiredWebhookEvent,
|
|
186
186
|
Dodopayments::SubscriptionFailedWebhookEvent,
|
|
187
187
|
Dodopayments::SubscriptionOnHoldWebhookEvent,
|
|
188
|
+
Dodopayments::SubscriptionPastDueWebhookEvent,
|
|
188
189
|
Dodopayments::SubscriptionPausedWebhookEvent,
|
|
189
190
|
Dodopayments::SubscriptionPlanChangedWebhookEvent,
|
|
190
191
|
Dodopayments::SubscriptionRenewedWebhookEvent,
|
|
@@ -248,6 +249,7 @@ module Dodopayments
|
|
|
248
249
|
Dodopayments::SubscriptionExpiredWebhookEvent,
|
|
249
250
|
Dodopayments::SubscriptionFailedWebhookEvent,
|
|
250
251
|
Dodopayments::SubscriptionOnHoldWebhookEvent,
|
|
252
|
+
Dodopayments::SubscriptionPastDueWebhookEvent,
|
|
251
253
|
Dodopayments::SubscriptionPausedWebhookEvent,
|
|
252
254
|
Dodopayments::SubscriptionPlanChangedWebhookEvent,
|
|
253
255
|
Dodopayments::SubscriptionRenewedWebhookEvent,
|
data/sig/dodopayments/client.rbs
CHANGED
|
@@ -33,6 +33,8 @@ module Dodopayments
|
|
|
33
33
|
|
|
34
34
|
attr_reader customers: Dodopayments::Resources::Customers
|
|
35
35
|
|
|
36
|
+
attr_reader blocklist: Dodopayments::Resources::Blocklist
|
|
37
|
+
|
|
36
38
|
attr_reader refunds: Dodopayments::Resources::Refunds
|
|
37
39
|
|
|
38
40
|
attr_reader disputes: Dodopayments::Resources::Disputes
|
|
@@ -13,6 +13,7 @@ module Dodopayments
|
|
|
13
13
|
after_balance: Integer?,
|
|
14
14
|
before_balance: Integer?,
|
|
15
15
|
description: String?,
|
|
16
|
+
payout_id: String?,
|
|
16
17
|
reference_object_id: String?
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -39,6 +40,8 @@ module Dodopayments
|
|
|
39
40
|
|
|
40
41
|
attr_accessor description: String?
|
|
41
42
|
|
|
43
|
+
attr_accessor payout_id: String?
|
|
44
|
+
|
|
42
45
|
attr_accessor reference_object_id: String?
|
|
43
46
|
|
|
44
47
|
def initialize: (
|
|
@@ -53,6 +56,7 @@ module Dodopayments
|
|
|
53
56
|
?after_balance: Integer?,
|
|
54
57
|
?before_balance: Integer?,
|
|
55
58
|
?description: String?,
|
|
59
|
+
?payout_id: String?,
|
|
56
60
|
?reference_object_id: String?
|
|
57
61
|
) -> void
|
|
58
62
|
|
|
@@ -68,6 +72,7 @@ module Dodopayments
|
|
|
68
72
|
after_balance: Integer?,
|
|
69
73
|
before_balance: Integer?,
|
|
70
74
|
description: String?,
|
|
75
|
+
payout_id: String?,
|
|
71
76
|
reference_object_id: String?
|
|
72
77
|
}
|
|
73
78
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
type block_by_customer_id = { customer_id: String }
|
|
5
|
+
|
|
6
|
+
class BlockByCustomerID < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor customer_id: String
|
|
8
|
+
|
|
9
|
+
def initialize: (customer_id: String) -> void
|
|
10
|
+
|
|
11
|
+
def to_hash: -> { customer_id: String }
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
type block_by_email = { email: String }
|
|
5
|
+
|
|
6
|
+
class BlockByEmail < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
attr_accessor email: String
|
|
8
|
+
|
|
9
|
+
def initialize: (email: String) -> void
|
|
10
|
+
|
|
11
|
+
def to_hash: -> { email: String }
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
type block_identifier =
|
|
5
|
+
Dodopayments::Blocklist::BlockByCustomerID
|
|
6
|
+
| Dodopayments::Blocklist::BlockByEmail
|
|
7
|
+
|
|
8
|
+
module BlockIdentifier
|
|
9
|
+
extend Dodopayments::Internal::Type::Union
|
|
10
|
+
|
|
11
|
+
def self?.variants: -> ::Array[Dodopayments::Models::Blocklist::block_identifier]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
type blocked_customer =
|
|
5
|
+
{
|
|
6
|
+
id: String,
|
|
7
|
+
created_at: Time,
|
|
8
|
+
customer_email: String,
|
|
9
|
+
customer_id: String,
|
|
10
|
+
customer_name: String,
|
|
11
|
+
identifier: String,
|
|
12
|
+
source: Dodopayments::Models::Blocklist::blocked_customer_source,
|
|
13
|
+
blocked_by_email: String?,
|
|
14
|
+
cancelled_subscription_ids: ::Array[String]?,
|
|
15
|
+
notes: ::Array[Dodopayments::Blocklist::Customers::BlockedCustomerNote]?,
|
|
16
|
+
reason: String?,
|
|
17
|
+
remaining_subscription_ids: ::Array[String]?,
|
|
18
|
+
subscriptions_swept: bool?,
|
|
19
|
+
unblocked_at: Time?
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
class BlockedCustomer < Dodopayments::Internal::Type::BaseModel
|
|
23
|
+
attr_accessor id: String
|
|
24
|
+
|
|
25
|
+
attr_accessor created_at: Time
|
|
26
|
+
|
|
27
|
+
attr_accessor customer_email: String
|
|
28
|
+
|
|
29
|
+
attr_accessor customer_id: String
|
|
30
|
+
|
|
31
|
+
attr_accessor customer_name: String
|
|
32
|
+
|
|
33
|
+
attr_accessor identifier: String
|
|
34
|
+
|
|
35
|
+
attr_accessor source: Dodopayments::Models::Blocklist::blocked_customer_source
|
|
36
|
+
|
|
37
|
+
attr_accessor blocked_by_email: String?
|
|
38
|
+
|
|
39
|
+
attr_accessor cancelled_subscription_ids: ::Array[String]?
|
|
40
|
+
|
|
41
|
+
attr_accessor notes: ::Array[Dodopayments::Blocklist::Customers::BlockedCustomerNote]?
|
|
42
|
+
|
|
43
|
+
attr_accessor reason: String?
|
|
44
|
+
|
|
45
|
+
attr_accessor remaining_subscription_ids: ::Array[String]?
|
|
46
|
+
|
|
47
|
+
attr_accessor subscriptions_swept: bool?
|
|
48
|
+
|
|
49
|
+
attr_accessor unblocked_at: Time?
|
|
50
|
+
|
|
51
|
+
def initialize: (
|
|
52
|
+
id: String,
|
|
53
|
+
created_at: Time,
|
|
54
|
+
customer_email: String,
|
|
55
|
+
customer_id: String,
|
|
56
|
+
customer_name: String,
|
|
57
|
+
identifier: String,
|
|
58
|
+
source: Dodopayments::Models::Blocklist::blocked_customer_source,
|
|
59
|
+
?blocked_by_email: String?,
|
|
60
|
+
?cancelled_subscription_ids: ::Array[String]?,
|
|
61
|
+
?notes: ::Array[Dodopayments::Blocklist::Customers::BlockedCustomerNote]?,
|
|
62
|
+
?reason: String?,
|
|
63
|
+
?remaining_subscription_ids: ::Array[String]?,
|
|
64
|
+
?subscriptions_swept: bool?,
|
|
65
|
+
?unblocked_at: Time?
|
|
66
|
+
) -> void
|
|
67
|
+
|
|
68
|
+
def to_hash: -> {
|
|
69
|
+
id: String,
|
|
70
|
+
created_at: Time,
|
|
71
|
+
customer_email: String,
|
|
72
|
+
customer_id: String,
|
|
73
|
+
customer_name: String,
|
|
74
|
+
identifier: String,
|
|
75
|
+
source: Dodopayments::Models::Blocklist::blocked_customer_source,
|
|
76
|
+
blocked_by_email: String?,
|
|
77
|
+
cancelled_subscription_ids: ::Array[String]?,
|
|
78
|
+
notes: ::Array[Dodopayments::Blocklist::Customers::BlockedCustomerNote]?,
|
|
79
|
+
reason: String?,
|
|
80
|
+
remaining_subscription_ids: ::Array[String]?,
|
|
81
|
+
subscriptions_swept: bool?,
|
|
82
|
+
unblocked_at: Time?
|
|
83
|
+
}
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
type blocked_customer_source =
|
|
5
|
+
:blocklist_page | :customer_page | :payment_page | :dispute_page | :api
|
|
6
|
+
|
|
7
|
+
module BlockedCustomerSource
|
|
8
|
+
extend Dodopayments::Internal::Type::Enum
|
|
9
|
+
|
|
10
|
+
BLOCKLIST_PAGE: :blocklist_page
|
|
11
|
+
CUSTOMER_PAGE: :customer_page
|
|
12
|
+
PAYMENT_PAGE: :payment_page
|
|
13
|
+
DISPUTE_PAGE: :dispute_page
|
|
14
|
+
API: :api
|
|
15
|
+
|
|
16
|
+
def self?.values: -> ::Array[Dodopayments::Models::Blocklist::blocked_customer_source]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
type create_blocked_customer_request =
|
|
5
|
+
Dodopayments::Blocklist::CreateBlockedCustomerRequest::BlocklistCustomersBlockByCustomerID
|
|
6
|
+
| Dodopayments::Blocklist::CreateBlockedCustomerRequest::BlocklistCustomersBlockByEmail
|
|
7
|
+
|
|
8
|
+
module CreateBlockedCustomerRequest
|
|
9
|
+
extend Dodopayments::Internal::Type::Union
|
|
10
|
+
|
|
11
|
+
type blocklist_customers_block_by_customer_id =
|
|
12
|
+
{
|
|
13
|
+
reason: String?,
|
|
14
|
+
source: Dodopayments::Models::Blocklist::blocked_customer_source?
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class BlocklistCustomersBlockByCustomerID < Dodopayments::Models::Blocklist::BlockByCustomerID
|
|
18
|
+
def reason: -> String?
|
|
19
|
+
|
|
20
|
+
def reason=: (String? _) -> String?
|
|
21
|
+
|
|
22
|
+
def source: -> Dodopayments::Models::Blocklist::blocked_customer_source?
|
|
23
|
+
|
|
24
|
+
def source=: (
|
|
25
|
+
Dodopayments::Models::Blocklist::blocked_customer_source? _
|
|
26
|
+
) -> Dodopayments::Models::Blocklist::blocked_customer_source?
|
|
27
|
+
|
|
28
|
+
def initialize: (
|
|
29
|
+
?reason: String?,
|
|
30
|
+
?source: Dodopayments::Models::Blocklist::blocked_customer_source?
|
|
31
|
+
) -> void
|
|
32
|
+
|
|
33
|
+
def to_hash: -> {
|
|
34
|
+
reason: String?,
|
|
35
|
+
source: Dodopayments::Models::Blocklist::blocked_customer_source?
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
type blocklist_customers_block_by_email =
|
|
40
|
+
{
|
|
41
|
+
reason: String?,
|
|
42
|
+
source: Dodopayments::Models::Blocklist::blocked_customer_source?
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
class BlocklistCustomersBlockByEmail < Dodopayments::Models::Blocklist::BlockByEmail
|
|
46
|
+
def reason: -> String?
|
|
47
|
+
|
|
48
|
+
def reason=: (String? _) -> String?
|
|
49
|
+
|
|
50
|
+
def source: -> Dodopayments::Models::Blocklist::blocked_customer_source?
|
|
51
|
+
|
|
52
|
+
def source=: (
|
|
53
|
+
Dodopayments::Models::Blocklist::blocked_customer_source? _
|
|
54
|
+
) -> Dodopayments::Models::Blocklist::blocked_customer_source?
|
|
55
|
+
|
|
56
|
+
def initialize: (
|
|
57
|
+
?reason: String?,
|
|
58
|
+
?source: Dodopayments::Models::Blocklist::blocked_customer_source?
|
|
59
|
+
) -> void
|
|
60
|
+
|
|
61
|
+
def to_hash: -> {
|
|
62
|
+
reason: String?,
|
|
63
|
+
source: Dodopayments::Models::Blocklist::blocked_customer_source?
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def self?.variants: -> ::Array[Dodopayments::Models::Blocklist::create_blocked_customer_request]
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
type customer_create_params =
|
|
5
|
+
{ } & Dodopayments::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class CustomerCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
def initialize: (?request_options: Dodopayments::request_opts) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> { request_options: Dodopayments::RequestOptions }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
type customer_delete_params =
|
|
5
|
+
{ entry_id: String } & Dodopayments::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class CustomerDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor entry_id: String
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
entry_id: String,
|
|
15
|
+
?request_options: Dodopayments::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
entry_id: String,
|
|
20
|
+
request_options: Dodopayments::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
type customer_list_params =
|
|
5
|
+
{
|
|
6
|
+
blocked_by_email: String?,
|
|
7
|
+
created_at_gte: Time?,
|
|
8
|
+
created_at_lte: Time?,
|
|
9
|
+
identifier: String?,
|
|
10
|
+
page_number: Integer?,
|
|
11
|
+
page_size: Integer?
|
|
12
|
+
}
|
|
13
|
+
& Dodopayments::Internal::Type::request_parameters
|
|
14
|
+
|
|
15
|
+
class CustomerListParams < Dodopayments::Internal::Type::BaseModel
|
|
16
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
17
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
18
|
+
|
|
19
|
+
attr_accessor blocked_by_email: String?
|
|
20
|
+
|
|
21
|
+
attr_accessor created_at_gte: Time?
|
|
22
|
+
|
|
23
|
+
attr_accessor created_at_lte: Time?
|
|
24
|
+
|
|
25
|
+
attr_accessor identifier: String?
|
|
26
|
+
|
|
27
|
+
attr_accessor page_number: Integer?
|
|
28
|
+
|
|
29
|
+
attr_accessor page_size: Integer?
|
|
30
|
+
|
|
31
|
+
def initialize: (
|
|
32
|
+
?blocked_by_email: String?,
|
|
33
|
+
?created_at_gte: Time?,
|
|
34
|
+
?created_at_lte: Time?,
|
|
35
|
+
?identifier: String?,
|
|
36
|
+
?page_number: Integer?,
|
|
37
|
+
?page_size: Integer?,
|
|
38
|
+
?request_options: Dodopayments::request_opts
|
|
39
|
+
) -> void
|
|
40
|
+
|
|
41
|
+
def to_hash: -> {
|
|
42
|
+
blocked_by_email: String?,
|
|
43
|
+
created_at_gte: Time?,
|
|
44
|
+
created_at_lte: Time?,
|
|
45
|
+
identifier: String?,
|
|
46
|
+
page_number: Integer?,
|
|
47
|
+
page_size: Integer?,
|
|
48
|
+
request_options: Dodopayments::RequestOptions
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
type customer_retrieve_params =
|
|
5
|
+
{ entry_id: String } & Dodopayments::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class CustomerRetrieveParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor entry_id: String
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
entry_id: String,
|
|
15
|
+
?request_options: Dodopayments::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
entry_id: String,
|
|
20
|
+
request_options: Dodopayments::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Blocklist
|
|
4
|
+
module Customers
|
|
5
|
+
type blocked_customer_note =
|
|
6
|
+
{
|
|
7
|
+
id: String,
|
|
8
|
+
created_at: Time,
|
|
9
|
+
note: String,
|
|
10
|
+
author_email: String?,
|
|
11
|
+
updated_at: Time?
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class BlockedCustomerNote < Dodopayments::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
attr_accessor created_at: Time
|
|
18
|
+
|
|
19
|
+
attr_accessor note: String
|
|
20
|
+
|
|
21
|
+
attr_accessor author_email: String?
|
|
22
|
+
|
|
23
|
+
attr_accessor updated_at: Time?
|
|
24
|
+
|
|
25
|
+
def initialize: (
|
|
26
|
+
id: String,
|
|
27
|
+
created_at: Time,
|
|
28
|
+
note: String,
|
|
29
|
+
?author_email: String?,
|
|
30
|
+
?updated_at: Time?
|
|
31
|
+
) -> void
|
|
32
|
+
|
|
33
|
+
def to_hash: -> {
|
|
34
|
+
id: String,
|
|
35
|
+
created_at: Time,
|
|
36
|
+
note: String,
|
|
37
|
+
author_email: String?,
|
|
38
|
+
updated_at: Time?
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|