dodopayments 2.25.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 +16 -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/entitlements/license_key_grant.rb +24 -3
- 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/price.rb +34 -30
- 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_change_plan_response.rb +47 -0
- 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 +17 -4
- 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/update_subscription_plan_req.rb +35 -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/subscriptions.rb +14 -6
- data/lib/dodopayments/resources/webhooks.rb +2 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +24 -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/entitlements/license_key_grant.rbi +22 -2
- 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/price.rbi +47 -30
- 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_change_plan_response.rbi +69 -0
- 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 +33 -4
- 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/update_subscription_plan_req.rbi +58 -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/subscriptions.rbi +63 -3
- 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/entitlements/license_key_grant.rbs +10 -0
- 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/price.rbs +21 -15
- 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_change_plan_response.rbs +35 -0
- 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/update_subscription_plan_req.rbs +14 -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/subscriptions.rbs +5 -1
- data/sig/dodopayments/resources/webhooks.rbs +2 -0
- metadata +71 -2
|
@@ -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(
|
|
@@ -12,7 +12,12 @@ module Dodopayments
|
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
#
|
|
15
|
+
# Identifier of the issued license key.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :id
|
|
18
|
+
|
|
19
|
+
# Number of instances currently active. Activation increments it and deactivation
|
|
20
|
+
# decrements it, so it is a live count and not a total.
|
|
16
21
|
sig { returns(Integer) }
|
|
17
22
|
attr_accessor :activations_used
|
|
18
23
|
|
|
@@ -20,6 +25,11 @@ module Dodopayments
|
|
|
20
25
|
sig { returns(String) }
|
|
21
26
|
attr_accessor :key
|
|
22
27
|
|
|
28
|
+
# Current status of the license key. Activation fails unless it is `active`, so a
|
|
29
|
+
# client can warn before the customer tries.
|
|
30
|
+
sig { returns(Dodopayments::LicenseKeyStatus::TaggedSymbol) }
|
|
31
|
+
attr_accessor :status
|
|
32
|
+
|
|
23
33
|
# Maximum activations allowed by the entitlement, when set.
|
|
24
34
|
sig { returns(T.nilable(Integer)) }
|
|
25
35
|
attr_accessor :activations_limit
|
|
@@ -32,17 +42,25 @@ module Dodopayments
|
|
|
32
42
|
# The grant's top-level `status` is the source of truth for the grant's lifecycle.
|
|
33
43
|
sig do
|
|
34
44
|
params(
|
|
45
|
+
id: String,
|
|
35
46
|
activations_used: Integer,
|
|
36
47
|
key: String,
|
|
48
|
+
status: Dodopayments::LicenseKeyStatus::OrSymbol,
|
|
37
49
|
activations_limit: T.nilable(Integer),
|
|
38
50
|
expires_at: T.nilable(Time)
|
|
39
51
|
).returns(T.attached_class)
|
|
40
52
|
end
|
|
41
53
|
def self.new(
|
|
42
|
-
#
|
|
54
|
+
# Identifier of the issued license key.
|
|
55
|
+
id:,
|
|
56
|
+
# Number of instances currently active. Activation increments it and deactivation
|
|
57
|
+
# decrements it, so it is a live count and not a total.
|
|
43
58
|
activations_used:,
|
|
44
59
|
# Issued license key.
|
|
45
60
|
key:,
|
|
61
|
+
# Current status of the license key. Activation fails unless it is `active`, so a
|
|
62
|
+
# client can warn before the customer tries.
|
|
63
|
+
status:,
|
|
46
64
|
# Maximum activations allowed by the entitlement, when set.
|
|
47
65
|
activations_limit: nil,
|
|
48
66
|
# When the license key expires, when applicable.
|
|
@@ -53,8 +71,10 @@ module Dodopayments
|
|
|
53
71
|
sig do
|
|
54
72
|
override.returns(
|
|
55
73
|
{
|
|
74
|
+
id: String,
|
|
56
75
|
activations_used: Integer,
|
|
57
76
|
key: String,
|
|
77
|
+
status: Dodopayments::LicenseKeyStatus::TaggedSymbol,
|
|
58
78
|
activations_limit: T.nilable(Integer),
|
|
59
79
|
expires_at: T.nilable(Time)
|
|
60
80
|
}
|
|
@@ -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
|
|
@@ -40,11 +40,6 @@ module Dodopayments
|
|
|
40
40
|
sig { returns(Integer) }
|
|
41
41
|
attr_accessor :price
|
|
42
42
|
|
|
43
|
-
# Indicates if purchasing power parity adjustments are applied to the price.
|
|
44
|
-
# Purchasing power parity feature is not available as of now.
|
|
45
|
-
sig { returns(T::Boolean) }
|
|
46
|
-
attr_accessor :purchasing_power_parity
|
|
47
|
-
|
|
48
43
|
sig { returns(Symbol) }
|
|
49
44
|
attr_accessor :type
|
|
50
45
|
|
|
@@ -56,6 +51,15 @@ module Dodopayments
|
|
|
56
51
|
sig { params(pay_what_you_want: T::Boolean).void }
|
|
57
52
|
attr_writer :pay_what_you_want
|
|
58
53
|
|
|
54
|
+
# Opts this price in to purchasing power parity. The business must also enable
|
|
55
|
+
# purchasing power parity. The discount percentage per country is always
|
|
56
|
+
# business-wide. Defaults to `false`.
|
|
57
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
58
|
+
attr_reader :purchasing_power_parity
|
|
59
|
+
|
|
60
|
+
sig { params(purchasing_power_parity: T::Boolean).void }
|
|
61
|
+
attr_writer :purchasing_power_parity
|
|
62
|
+
|
|
59
63
|
# A suggested price for the user to pay. This value is only considered if
|
|
60
64
|
# [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
|
|
61
65
|
# ignored.
|
|
@@ -72,8 +76,8 @@ module Dodopayments
|
|
|
72
76
|
currency: Dodopayments::Currency::OrSymbol,
|
|
73
77
|
discount: Integer,
|
|
74
78
|
price: Integer,
|
|
75
|
-
purchasing_power_parity: T::Boolean,
|
|
76
79
|
pay_what_you_want: T::Boolean,
|
|
80
|
+
purchasing_power_parity: T::Boolean,
|
|
77
81
|
suggested_price: T.nilable(Integer),
|
|
78
82
|
tax_inclusive: T.nilable(T::Boolean),
|
|
79
83
|
type: Symbol
|
|
@@ -90,12 +94,13 @@ module Dodopayments
|
|
|
90
94
|
# If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
|
|
91
95
|
# represents the **minimum** amount the customer must pay.
|
|
92
96
|
price:,
|
|
93
|
-
# Indicates if purchasing power parity adjustments are applied to the price.
|
|
94
|
-
# Purchasing power parity feature is not available as of now.
|
|
95
|
-
purchasing_power_parity:,
|
|
96
97
|
# Indicates whether the customer can pay any amount they choose. If set to `true`,
|
|
97
98
|
# the [`price`](Self::price) field is the minimum amount.
|
|
98
99
|
pay_what_you_want: nil,
|
|
100
|
+
# Opts this price in to purchasing power parity. The business must also enable
|
|
101
|
+
# purchasing power parity. The discount percentage per country is always
|
|
102
|
+
# business-wide. Defaults to `false`.
|
|
103
|
+
purchasing_power_parity: nil,
|
|
99
104
|
# A suggested price for the user to pay. This value is only considered if
|
|
100
105
|
# [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
|
|
101
106
|
# ignored.
|
|
@@ -112,9 +117,9 @@ module Dodopayments
|
|
|
112
117
|
currency: Dodopayments::Currency::OrSymbol,
|
|
113
118
|
discount: Integer,
|
|
114
119
|
price: Integer,
|
|
115
|
-
purchasing_power_parity: T::Boolean,
|
|
116
120
|
type: Symbol,
|
|
117
121
|
pay_what_you_want: T::Boolean,
|
|
122
|
+
purchasing_power_parity: T::Boolean,
|
|
118
123
|
suggested_price: T.nilable(Integer),
|
|
119
124
|
tax_inclusive: T.nilable(T::Boolean)
|
|
120
125
|
}
|
|
@@ -155,11 +160,6 @@ module Dodopayments
|
|
|
155
160
|
sig { returns(Integer) }
|
|
156
161
|
attr_accessor :price
|
|
157
162
|
|
|
158
|
-
# Indicates if purchasing power parity adjustments are applied to the price.
|
|
159
|
-
# Purchasing power parity feature is not available as of now
|
|
160
|
-
sig { returns(T::Boolean) }
|
|
161
|
-
attr_accessor :purchasing_power_parity
|
|
162
|
-
|
|
163
163
|
# Number of units for the subscription period. For example, a value of `12` with a
|
|
164
164
|
# `subscription_period_interval` of `month` represents a one-year subscription.
|
|
165
165
|
sig { returns(Integer) }
|
|
@@ -172,6 +172,15 @@ module Dodopayments
|
|
|
172
172
|
sig { returns(Symbol) }
|
|
173
173
|
attr_accessor :type
|
|
174
174
|
|
|
175
|
+
# Opts this price in to purchasing power parity. The business must also enable
|
|
176
|
+
# purchasing power parity. The discount percentage per country is always
|
|
177
|
+
# business-wide. Defaults to `false`.
|
|
178
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
179
|
+
attr_reader :purchasing_power_parity
|
|
180
|
+
|
|
181
|
+
sig { params(purchasing_power_parity: T::Boolean).void }
|
|
182
|
+
attr_writer :purchasing_power_parity
|
|
183
|
+
|
|
175
184
|
# Indicates if the price is tax inclusive
|
|
176
185
|
sig { returns(T.nilable(T::Boolean)) }
|
|
177
186
|
attr_accessor :tax_inclusive
|
|
@@ -201,9 +210,9 @@ module Dodopayments
|
|
|
201
210
|
payment_frequency_count: Integer,
|
|
202
211
|
payment_frequency_interval: Dodopayments::TimeInterval::OrSymbol,
|
|
203
212
|
price: Integer,
|
|
204
|
-
purchasing_power_parity: T::Boolean,
|
|
205
213
|
subscription_period_count: Integer,
|
|
206
214
|
subscription_period_interval: Dodopayments::TimeInterval::OrSymbol,
|
|
215
|
+
purchasing_power_parity: T::Boolean,
|
|
207
216
|
tax_inclusive: T.nilable(T::Boolean),
|
|
208
217
|
trial_amount: T.nilable(Integer),
|
|
209
218
|
trial_apply_discounts: T.nilable(T::Boolean),
|
|
@@ -224,14 +233,15 @@ module Dodopayments
|
|
|
224
233
|
# The payment amount. Represented in the lowest denomination of the currency
|
|
225
234
|
# (e.g., cents for USD). For example, to charge $1.00, pass `100`.
|
|
226
235
|
price:,
|
|
227
|
-
# Indicates if purchasing power parity adjustments are applied to the price.
|
|
228
|
-
# Purchasing power parity feature is not available as of now
|
|
229
|
-
purchasing_power_parity:,
|
|
230
236
|
# Number of units for the subscription period. For example, a value of `12` with a
|
|
231
237
|
# `subscription_period_interval` of `month` represents a one-year subscription.
|
|
232
238
|
subscription_period_count:,
|
|
233
239
|
# The time interval for the subscription period (e.g., day, month, year).
|
|
234
240
|
subscription_period_interval:,
|
|
241
|
+
# Opts this price in to purchasing power parity. The business must also enable
|
|
242
|
+
# purchasing power parity. The discount percentage per country is always
|
|
243
|
+
# business-wide. Defaults to `false`.
|
|
244
|
+
purchasing_power_parity: nil,
|
|
235
245
|
# Indicates if the price is tax inclusive
|
|
236
246
|
tax_inclusive: nil,
|
|
237
247
|
# Amount charged today for a paid trial, in the price currency's minor units.
|
|
@@ -254,11 +264,11 @@ module Dodopayments
|
|
|
254
264
|
payment_frequency_count: Integer,
|
|
255
265
|
payment_frequency_interval: Dodopayments::TimeInterval::OrSymbol,
|
|
256
266
|
price: Integer,
|
|
257
|
-
purchasing_power_parity: T::Boolean,
|
|
258
267
|
subscription_period_count: Integer,
|
|
259
268
|
subscription_period_interval:
|
|
260
269
|
Dodopayments::TimeInterval::OrSymbol,
|
|
261
270
|
type: Symbol,
|
|
271
|
+
purchasing_power_parity: T::Boolean,
|
|
262
272
|
tax_inclusive: T.nilable(T::Boolean),
|
|
263
273
|
trial_amount: T.nilable(Integer),
|
|
264
274
|
trial_apply_discounts: T.nilable(T::Boolean),
|
|
@@ -301,11 +311,6 @@ module Dodopayments
|
|
|
301
311
|
sig { returns(Dodopayments::TimeInterval::OrSymbol) }
|
|
302
312
|
attr_accessor :payment_frequency_interval
|
|
303
313
|
|
|
304
|
-
# Indicates if purchasing power parity adjustments are applied to the price.
|
|
305
|
-
# Purchasing power parity feature is not available as of now
|
|
306
|
-
sig { returns(T::Boolean) }
|
|
307
|
-
attr_accessor :purchasing_power_parity
|
|
308
|
-
|
|
309
314
|
# Number of units for the subscription period. For example, a value of `12` with a
|
|
310
315
|
# `subscription_period_interval` of `month` represents a one-year subscription.
|
|
311
316
|
sig { returns(Integer) }
|
|
@@ -321,6 +326,16 @@ module Dodopayments
|
|
|
321
326
|
sig { returns(T.nilable(T::Array[Dodopayments::AddMeterToPrice])) }
|
|
322
327
|
attr_accessor :meters
|
|
323
328
|
|
|
329
|
+
# Opts this price in to purchasing power parity. The business must also enable
|
|
330
|
+
# purchasing power parity. The discount percentage per country is always
|
|
331
|
+
# business-wide. Applies to the fixed fee only, never to metered usage. Defaults
|
|
332
|
+
# to `false`.
|
|
333
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
334
|
+
attr_reader :purchasing_power_parity
|
|
335
|
+
|
|
336
|
+
sig { params(purchasing_power_parity: T::Boolean).void }
|
|
337
|
+
attr_writer :purchasing_power_parity
|
|
338
|
+
|
|
324
339
|
# Indicates if the price is tax inclusive
|
|
325
340
|
sig { returns(T.nilable(T::Boolean)) }
|
|
326
341
|
attr_accessor :tax_inclusive
|
|
@@ -333,10 +348,10 @@ module Dodopayments
|
|
|
333
348
|
fixed_price: Integer,
|
|
334
349
|
payment_frequency_count: Integer,
|
|
335
350
|
payment_frequency_interval: Dodopayments::TimeInterval::OrSymbol,
|
|
336
|
-
purchasing_power_parity: T::Boolean,
|
|
337
351
|
subscription_period_count: Integer,
|
|
338
352
|
subscription_period_interval: Dodopayments::TimeInterval::OrSymbol,
|
|
339
353
|
meters: T.nilable(T::Array[Dodopayments::AddMeterToPrice::OrHash]),
|
|
354
|
+
purchasing_power_parity: T::Boolean,
|
|
340
355
|
tax_inclusive: T.nilable(T::Boolean),
|
|
341
356
|
type: Symbol
|
|
342
357
|
).returns(T.attached_class)
|
|
@@ -354,15 +369,17 @@ module Dodopayments
|
|
|
354
369
|
payment_frequency_count:,
|
|
355
370
|
# The time interval for the payment frequency (e.g., day, month, year).
|
|
356
371
|
payment_frequency_interval:,
|
|
357
|
-
# Indicates if purchasing power parity adjustments are applied to the price.
|
|
358
|
-
# Purchasing power parity feature is not available as of now
|
|
359
|
-
purchasing_power_parity:,
|
|
360
372
|
# Number of units for the subscription period. For example, a value of `12` with a
|
|
361
373
|
# `subscription_period_interval` of `month` represents a one-year subscription.
|
|
362
374
|
subscription_period_count:,
|
|
363
375
|
# The time interval for the subscription period (e.g., day, month, year).
|
|
364
376
|
subscription_period_interval:,
|
|
365
377
|
meters: nil,
|
|
378
|
+
# Opts this price in to purchasing power parity. The business must also enable
|
|
379
|
+
# purchasing power parity. The discount percentage per country is always
|
|
380
|
+
# business-wide. Applies to the fixed fee only, never to metered usage. Defaults
|
|
381
|
+
# to `false`.
|
|
382
|
+
purchasing_power_parity: nil,
|
|
366
383
|
# Indicates if the price is tax inclusive
|
|
367
384
|
tax_inclusive: nil,
|
|
368
385
|
type: :usage_based_price
|
|
@@ -377,12 +394,12 @@ module Dodopayments
|
|
|
377
394
|
fixed_price: Integer,
|
|
378
395
|
payment_frequency_count: Integer,
|
|
379
396
|
payment_frequency_interval: Dodopayments::TimeInterval::OrSymbol,
|
|
380
|
-
purchasing_power_parity: T::Boolean,
|
|
381
397
|
subscription_period_count: Integer,
|
|
382
398
|
subscription_period_interval:
|
|
383
399
|
Dodopayments::TimeInterval::OrSymbol,
|
|
384
400
|
type: Symbol,
|
|
385
401
|
meters: T.nilable(T::Array[Dodopayments::AddMeterToPrice]),
|
|
402
|
+
purchasing_power_parity: T::Boolean,
|
|
386
403
|
tax_inclusive: T.nilable(T::Boolean)
|
|
387
404
|
}
|
|
388
405
|
)
|