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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Blocklist
|
|
6
|
+
class CustomerDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Dodopayments::Blocklist::CustomerDeleteParams,
|
|
14
|
+
Dodopayments::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :entry_id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
entry_id: String,
|
|
24
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(entry_id:, request_options: {})
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
{ entry_id: String, request_options: Dodopayments::RequestOptions }
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Blocklist
|
|
6
|
+
class CustomerListParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Dodopayments::Blocklist::CustomerListParams,
|
|
14
|
+
Dodopayments::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Filter by the dashboard user who blocked the customer.
|
|
19
|
+
sig { returns(T.nilable(String)) }
|
|
20
|
+
attr_accessor :blocked_by_email
|
|
21
|
+
|
|
22
|
+
# Blocked on or after this time.
|
|
23
|
+
sig { returns(T.nilable(Time)) }
|
|
24
|
+
attr_accessor :created_at_gte
|
|
25
|
+
|
|
26
|
+
# Blocked on or before this time.
|
|
27
|
+
sig { returns(T.nilable(Time)) }
|
|
28
|
+
attr_accessor :created_at_lte
|
|
29
|
+
|
|
30
|
+
# Partial, case-insensitive match on the email and on the customer id.
|
|
31
|
+
sig { returns(T.nilable(String)) }
|
|
32
|
+
attr_accessor :identifier
|
|
33
|
+
|
|
34
|
+
# Page number. Default 0.
|
|
35
|
+
sig { returns(T.nilable(Integer)) }
|
|
36
|
+
attr_accessor :page_number
|
|
37
|
+
|
|
38
|
+
# Page size. Default 10, maximum 100.
|
|
39
|
+
sig { returns(T.nilable(Integer)) }
|
|
40
|
+
attr_accessor :page_size
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
params(
|
|
44
|
+
blocked_by_email: T.nilable(String),
|
|
45
|
+
created_at_gte: T.nilable(Time),
|
|
46
|
+
created_at_lte: T.nilable(Time),
|
|
47
|
+
identifier: T.nilable(String),
|
|
48
|
+
page_number: T.nilable(Integer),
|
|
49
|
+
page_size: T.nilable(Integer),
|
|
50
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
51
|
+
).returns(T.attached_class)
|
|
52
|
+
end
|
|
53
|
+
def self.new(
|
|
54
|
+
# Filter by the dashboard user who blocked the customer.
|
|
55
|
+
blocked_by_email: nil,
|
|
56
|
+
# Blocked on or after this time.
|
|
57
|
+
created_at_gte: nil,
|
|
58
|
+
# Blocked on or before this time.
|
|
59
|
+
created_at_lte: nil,
|
|
60
|
+
# Partial, case-insensitive match on the email and on the customer id.
|
|
61
|
+
identifier: nil,
|
|
62
|
+
# Page number. Default 0.
|
|
63
|
+
page_number: nil,
|
|
64
|
+
# Page size. Default 10, maximum 100.
|
|
65
|
+
page_size: nil,
|
|
66
|
+
request_options: {}
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
sig do
|
|
71
|
+
override.returns(
|
|
72
|
+
{
|
|
73
|
+
blocked_by_email: T.nilable(String),
|
|
74
|
+
created_at_gte: T.nilable(Time),
|
|
75
|
+
created_at_lte: T.nilable(Time),
|
|
76
|
+
identifier: T.nilable(String),
|
|
77
|
+
page_number: T.nilable(Integer),
|
|
78
|
+
page_size: T.nilable(Integer),
|
|
79
|
+
request_options: Dodopayments::RequestOptions
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
def to_hash
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Blocklist
|
|
6
|
+
class CustomerRetrieveParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Dodopayments::Blocklist::CustomerRetrieveParams,
|
|
14
|
+
Dodopayments::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :entry_id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
entry_id: String,
|
|
24
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(entry_id:, request_options: {})
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
{ entry_id: String, request_options: Dodopayments::RequestOptions }
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Blocklist
|
|
6
|
+
module Customers
|
|
7
|
+
class BlockedCustomerNote < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
OrHash =
|
|
9
|
+
T.type_alias do
|
|
10
|
+
T.any(
|
|
11
|
+
Dodopayments::Blocklist::Customers::BlockedCustomerNote,
|
|
12
|
+
Dodopayments::Internal::AnyHash
|
|
13
|
+
)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :id
|
|
18
|
+
|
|
19
|
+
sig { returns(Time) }
|
|
20
|
+
attr_accessor :created_at
|
|
21
|
+
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
attr_accessor :note
|
|
24
|
+
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_accessor :author_email
|
|
27
|
+
|
|
28
|
+
sig { returns(T.nilable(Time)) }
|
|
29
|
+
attr_accessor :updated_at
|
|
30
|
+
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
id: String,
|
|
34
|
+
created_at: Time,
|
|
35
|
+
note: String,
|
|
36
|
+
author_email: T.nilable(String),
|
|
37
|
+
updated_at: T.nilable(Time)
|
|
38
|
+
).returns(T.attached_class)
|
|
39
|
+
end
|
|
40
|
+
def self.new(
|
|
41
|
+
id:,
|
|
42
|
+
created_at:,
|
|
43
|
+
note:,
|
|
44
|
+
author_email: nil,
|
|
45
|
+
updated_at: nil
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
override.returns(
|
|
51
|
+
{
|
|
52
|
+
id: String,
|
|
53
|
+
created_at: Time,
|
|
54
|
+
note: String,
|
|
55
|
+
author_email: T.nilable(String),
|
|
56
|
+
updated_at: T.nilable(Time)
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
def to_hash
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Blocklist
|
|
6
|
+
module Customers
|
|
7
|
+
class NoteCreateParams < Dodopayments::Models::Blocklist::Customers::NoteRequest
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
OrHash =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
Dodopayments::Blocklist::Customers::NoteCreateParams,
|
|
15
|
+
Dodopayments::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :entry_id
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
entry_id: String,
|
|
25
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
26
|
+
).returns(T.attached_class)
|
|
27
|
+
end
|
|
28
|
+
def self.new(entry_id:, request_options: {})
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
sig do
|
|
32
|
+
override.returns(
|
|
33
|
+
{
|
|
34
|
+
entry_id: String,
|
|
35
|
+
request_options: Dodopayments::RequestOptions
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
def to_hash
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Blocklist
|
|
6
|
+
module Customers
|
|
7
|
+
class NoteRequest < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
OrHash =
|
|
9
|
+
T.type_alias do
|
|
10
|
+
T.any(
|
|
11
|
+
Dodopayments::Blocklist::Customers::NoteRequest,
|
|
12
|
+
Dodopayments::Internal::AnyHash
|
|
13
|
+
)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :note
|
|
18
|
+
|
|
19
|
+
sig { params(note: String).returns(T.attached_class) }
|
|
20
|
+
def self.new(note:)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { override.returns({ note: String }) }
|
|
24
|
+
def to_hash
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Blocklist
|
|
6
|
+
module Customers
|
|
7
|
+
class NoteUpdateParams < Dodopayments::Models::Blocklist::Customers::NoteRequest
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
OrHash =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
Dodopayments::Blocklist::Customers::NoteUpdateParams,
|
|
15
|
+
Dodopayments::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :entry_id
|
|
21
|
+
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
attr_accessor :note_id
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
entry_id: String,
|
|
28
|
+
note_id: String,
|
|
29
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
30
|
+
).returns(T.attached_class)
|
|
31
|
+
end
|
|
32
|
+
def self.new(entry_id:, note_id:, request_options: {})
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
override.returns(
|
|
37
|
+
{
|
|
38
|
+
entry_id: String,
|
|
39
|
+
note_id: String,
|
|
40
|
+
request_options: Dodopayments::RequestOptions
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
def to_hash
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -23,6 +23,16 @@ module Dodopayments
|
|
|
23
23
|
sig { returns(String) }
|
|
24
24
|
attr_accessor :name
|
|
25
25
|
|
|
26
|
+
# When the merchant blocked this customer. The dashboard shows the "Blocked" badge
|
|
27
|
+
# and the unblock action from it. The list route leaves it empty; only the
|
|
28
|
+
# single-customer route resolves it.
|
|
29
|
+
sig { returns(T.nilable(Time)) }
|
|
30
|
+
attr_accessor :blocked_at
|
|
31
|
+
|
|
32
|
+
# Blocklist entry behind `blocked_at`, so the dashboard can link to it.
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_accessor :blocklist_entry_id
|
|
35
|
+
|
|
26
36
|
# Additional metadata for the customer
|
|
27
37
|
sig do
|
|
28
38
|
returns(
|
|
@@ -48,6 +58,8 @@ module Dodopayments
|
|
|
48
58
|
customer_id: String,
|
|
49
59
|
email: String,
|
|
50
60
|
name: String,
|
|
61
|
+
blocked_at: T.nilable(Time),
|
|
62
|
+
blocklist_entry_id: T.nilable(String),
|
|
51
63
|
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
52
64
|
phone_number: T.nilable(String)
|
|
53
65
|
).returns(T.attached_class)
|
|
@@ -58,6 +70,12 @@ module Dodopayments
|
|
|
58
70
|
customer_id:,
|
|
59
71
|
email:,
|
|
60
72
|
name:,
|
|
73
|
+
# When the merchant blocked this customer. The dashboard shows the "Blocked" badge
|
|
74
|
+
# and the unblock action from it. The list route leaves it empty; only the
|
|
75
|
+
# single-customer route resolves it.
|
|
76
|
+
blocked_at: nil,
|
|
77
|
+
# Blocklist entry behind `blocked_at`, so the dashboard can link to it.
|
|
78
|
+
blocklist_entry_id: nil,
|
|
61
79
|
# Additional metadata for the customer
|
|
62
80
|
metadata: nil,
|
|
63
81
|
phone_number: nil
|
|
@@ -72,6 +90,8 @@ module Dodopayments
|
|
|
72
90
|
customer_id: String,
|
|
73
91
|
email: String,
|
|
74
92
|
name: String,
|
|
93
|
+
blocked_at: T.nilable(Time),
|
|
94
|
+
blocklist_entry_id: T.nilable(String),
|
|
75
95
|
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
76
96
|
phone_number: T.nilable(String)
|
|
77
97
|
}
|
|
@@ -211,6 +211,11 @@ module Dodopayments
|
|
|
211
211
|
:cancelled,
|
|
212
212
|
Dodopayments::DunningRecoveredWebhookEvent::Data::TriggerState::TaggedSymbol
|
|
213
213
|
)
|
|
214
|
+
PAST_DUE =
|
|
215
|
+
T.let(
|
|
216
|
+
:past_due,
|
|
217
|
+
Dodopayments::DunningRecoveredWebhookEvent::Data::TriggerState::TaggedSymbol
|
|
218
|
+
)
|
|
214
219
|
|
|
215
220
|
sig do
|
|
216
221
|
override.returns(
|
|
@@ -211,6 +211,11 @@ module Dodopayments
|
|
|
211
211
|
:cancelled,
|
|
212
212
|
Dodopayments::DunningStartedWebhookEvent::Data::TriggerState::TaggedSymbol
|
|
213
213
|
)
|
|
214
|
+
PAST_DUE =
|
|
215
|
+
T.let(
|
|
216
|
+
:past_due,
|
|
217
|
+
Dodopayments::DunningStartedWebhookEvent::Data::TriggerState::TaggedSymbol
|
|
218
|
+
)
|
|
214
219
|
|
|
215
220
|
sig do
|
|
216
221
|
override.returns(
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class ManualRetry < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Dodopayments::ManualRetry, Dodopayments::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# The invoice the send charged.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :invoice_id
|
|
14
|
+
|
|
15
|
+
# Always true on this route. Tells the row apart from an automatic attempt.
|
|
16
|
+
sig { returns(T::Boolean) }
|
|
17
|
+
attr_accessor :is_manual_retry
|
|
18
|
+
|
|
19
|
+
# The payment row this send created.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :payment_id
|
|
22
|
+
|
|
23
|
+
# Which attempt this send is, counting manual sends on the invoice.
|
|
24
|
+
sig { returns(Integer) }
|
|
25
|
+
attr_accessor :retry_attempt
|
|
26
|
+
|
|
27
|
+
sig { returns(Integer) }
|
|
28
|
+
attr_accessor :sends_allowed
|
|
29
|
+
|
|
30
|
+
# Manual sends spent on this invoice, including this one.
|
|
31
|
+
sig { returns(Integer) }
|
|
32
|
+
attr_accessor :sends_used
|
|
33
|
+
|
|
34
|
+
# When the next send becomes available. Null when no send is left.
|
|
35
|
+
sig { returns(T.nilable(Time)) }
|
|
36
|
+
attr_accessor :retry_available_at
|
|
37
|
+
|
|
38
|
+
# Outcome of the charge. `processing` means the processor has not settled it yet,
|
|
39
|
+
# and the payment webhooks report the result.
|
|
40
|
+
sig { returns(T.nilable(Dodopayments::IntentStatus::TaggedSymbol)) }
|
|
41
|
+
attr_accessor :status
|
|
42
|
+
|
|
43
|
+
sig do
|
|
44
|
+
params(
|
|
45
|
+
invoice_id: String,
|
|
46
|
+
is_manual_retry: T::Boolean,
|
|
47
|
+
payment_id: String,
|
|
48
|
+
retry_attempt: Integer,
|
|
49
|
+
sends_allowed: Integer,
|
|
50
|
+
sends_used: Integer,
|
|
51
|
+
retry_available_at: T.nilable(Time),
|
|
52
|
+
status: T.nilable(Dodopayments::IntentStatus::OrSymbol)
|
|
53
|
+
).returns(T.attached_class)
|
|
54
|
+
end
|
|
55
|
+
def self.new(
|
|
56
|
+
# The invoice the send charged.
|
|
57
|
+
invoice_id:,
|
|
58
|
+
# Always true on this route. Tells the row apart from an automatic attempt.
|
|
59
|
+
is_manual_retry:,
|
|
60
|
+
# The payment row this send created.
|
|
61
|
+
payment_id:,
|
|
62
|
+
# Which attempt this send is, counting manual sends on the invoice.
|
|
63
|
+
retry_attempt:,
|
|
64
|
+
sends_allowed:,
|
|
65
|
+
# Manual sends spent on this invoice, including this one.
|
|
66
|
+
sends_used:,
|
|
67
|
+
# When the next send becomes available. Null when no send is left.
|
|
68
|
+
retry_available_at: nil,
|
|
69
|
+
# Outcome of the charge. `processing` means the processor has not settled it yet,
|
|
70
|
+
# and the payment webhooks report the result.
|
|
71
|
+
status: nil
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
sig do
|
|
76
|
+
override.returns(
|
|
77
|
+
{
|
|
78
|
+
invoice_id: String,
|
|
79
|
+
is_manual_retry: T::Boolean,
|
|
80
|
+
payment_id: String,
|
|
81
|
+
retry_attempt: Integer,
|
|
82
|
+
sends_allowed: Integer,
|
|
83
|
+
sends_used: Integer,
|
|
84
|
+
retry_available_at: T.nilable(Time),
|
|
85
|
+
status: T.nilable(Dodopayments::IntentStatus::TaggedSymbol)
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
def to_hash
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class ManualRetryState < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Dodopayments::ManualRetryState, Dodopayments::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(T::Boolean) }
|
|
12
|
+
attr_accessor :can_retry
|
|
13
|
+
|
|
14
|
+
sig { returns(Integer) }
|
|
15
|
+
attr_accessor :sends_allowed
|
|
16
|
+
|
|
17
|
+
sig { returns(Integer) }
|
|
18
|
+
attr_accessor :sends_used
|
|
19
|
+
|
|
20
|
+
# The code `POST` would fail with. Null when `can_retry` is true.
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_accessor :reason
|
|
23
|
+
|
|
24
|
+
# When the next send becomes available. Null when no send is left, or when the
|
|
25
|
+
# block has nothing to do with the cooldown.
|
|
26
|
+
sig { returns(T.nilable(Time)) }
|
|
27
|
+
attr_accessor :retry_available_at
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
can_retry: T::Boolean,
|
|
32
|
+
sends_allowed: Integer,
|
|
33
|
+
sends_used: Integer,
|
|
34
|
+
reason: T.nilable(String),
|
|
35
|
+
retry_available_at: T.nilable(Time)
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
can_retry:,
|
|
40
|
+
sends_allowed:,
|
|
41
|
+
sends_used:,
|
|
42
|
+
# The code `POST` would fail with. Null when `can_retry` is true.
|
|
43
|
+
reason: nil,
|
|
44
|
+
# When the next send becomes available. Null when no send is left, or when the
|
|
45
|
+
# block has nothing to do with the cooldown.
|
|
46
|
+
retry_available_at: nil
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
can_retry: T::Boolean,
|
|
54
|
+
sends_allowed: Integer,
|
|
55
|
+
sends_used: Integer,
|
|
56
|
+
reason: T.nilable(String),
|
|
57
|
+
retry_available_at: T.nilable(Time)
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
def to_hash
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class PaymentRetrieveRetryStateParams < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Dodopayments::PaymentRetrieveRetryStateParams,
|
|
13
|
+
Dodopayments::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :payment_id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
payment_id: String,
|
|
23
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(payment_id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ payment_id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class PaymentRetryParams < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Dodopayments::PaymentRetryParams,
|
|
13
|
+
Dodopayments::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :payment_id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
payment_id: String,
|
|
23
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(payment_id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ payment_id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|