dodopayments 2.32.2 → 2.34.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/internal/type/enum.rb +11 -11
- data/lib/dodopayments/models/balance_ledger_entry.rb +3 -0
- data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +3 -0
- data/lib/dodopayments/models/charge_type.rb +33 -0
- data/lib/dodopayments/models/checkout_session_flags.rb +3 -0
- data/lib/dodopayments/models/checkout_session_preview_response.rb +12 -1
- data/lib/dodopayments/models/invoices/payment_retrieve_params.rb +14 -1
- data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +14 -1
- data/lib/dodopayments/models/invoices/payment_retrieve_refund_params.rb +14 -1
- data/lib/dodopayments/models/manual_retry_state.rb +27 -1
- data/lib/dodopayments/models/payment.rb +69 -7
- data/lib/dodopayments/models/payment_list_response.rb +94 -5
- data/lib/dodopayments/models/price.rb +56 -20
- data/lib/dodopayments/models/product_collection.rb +2 -0
- data/lib/dodopayments/models/product_collection_create_params.rb +2 -0
- data/lib/dodopayments/models/product_collection_update_params.rb +2 -0
- data/lib/dodopayments/models/product_collections/group_update_params.rb +2 -1
- data/lib/dodopayments/models/refund.rb +11 -1
- data/lib/dodopayments/models/refund_list_item.rb +11 -1
- data/lib/dodopayments/models/subscription_active_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_cancelled_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_expired_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_failed_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_on_hold_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_past_due_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_paused_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_plan_changed_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_renewed_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_service_period.rb +50 -0
- data/lib/dodopayments/models/subscription_unpaused_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_update_payment_method_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +10 -1
- data/lib/dodopayments/models/update_subscription_plan_req.rb +1 -0
- data/lib/dodopayments/models/webhook_payload.rb +10 -1
- data/lib/dodopayments/models.rb +4 -0
- data/lib/dodopayments/resources/invoices/payments.rb +30 -6
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +2 -0
- data/rbi/dodopayments/models/balance_ledger_entry.rbi +15 -0
- data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +15 -0
- data/rbi/dodopayments/models/charge_type.rbi +37 -0
- data/rbi/dodopayments/models/checkout_session_flags.rbi +6 -0
- data/rbi/dodopayments/models/checkout_session_preview_response.rbi +14 -0
- data/rbi/dodopayments/models/invoices/payment_retrieve_params.rbi +17 -1
- data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +21 -2
- data/rbi/dodopayments/models/invoices/payment_retrieve_refund_params.rbi +21 -2
- data/rbi/dodopayments/models/manual_retry_state.rbi +28 -0
- data/rbi/dodopayments/models/payment.rbi +85 -6
- data/rbi/dodopayments/models/payment_list_response.rbi +113 -4
- data/rbi/dodopayments/models/price.rbi +96 -24
- data/rbi/dodopayments/models/product_collection.rbi +10 -0
- data/rbi/dodopayments/models/product_collection_create_params.rbi +10 -0
- data/rbi/dodopayments/models/product_collection_update_params.rbi +10 -0
- data/rbi/dodopayments/models/product_collections/group_update_params.rbi +4 -2
- data/rbi/dodopayments/models/refund.rbi +12 -0
- data/rbi/dodopayments/models/refund_list_item.rbi +12 -0
- data/rbi/dodopayments/models/subscription_active_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_cancelled_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_expired_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_failed_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_past_due_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_paused_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_renewed_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_service_period.rbi +75 -0
- data/rbi/dodopayments/models/subscription_unpaused_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_update_payment_method_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +5 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +14 -1
- data/rbi/dodopayments/models.rbi +4 -0
- data/rbi/dodopayments/resources/invoices/payments.rbi +12 -0
- data/rbi/dodopayments/resources/product_collections/groups.rbi +2 -1
- data/sig/dodopayments/models/balance_ledger_entry.rbs +6 -0
- data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +6 -0
- data/sig/dodopayments/models/charge_type.rbs +16 -0
- data/sig/dodopayments/models/checkout_session_preview_response.rbs +5 -0
- data/sig/dodopayments/models/invoices/payment_retrieve_params.rbs +7 -1
- data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +8 -1
- data/sig/dodopayments/models/invoices/payment_retrieve_refund_params.rbs +8 -1
- data/sig/dodopayments/models/manual_retry_state.rbs +15 -0
- data/sig/dodopayments/models/payment.rbs +25 -0
- data/sig/dodopayments/models/payment_list_response.rbs +40 -0
- data/sig/dodopayments/models/product_collection.rbs +4 -0
- data/sig/dodopayments/models/product_collection_create_params.rbs +4 -0
- data/sig/dodopayments/models/product_collection_update_params.rbs +4 -0
- data/sig/dodopayments/models/refund.rbs +5 -0
- data/sig/dodopayments/models/refund_list_item.rbs +5 -0
- data/sig/dodopayments/models/subscription_active_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_cancelled_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_expired_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_failed_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_on_hold_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_past_due_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_paused_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_renewed_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_service_period.rbs +35 -0
- data/sig/dodopayments/models/subscription_unpaused_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_update_payment_method_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +2 -0
- data/sig/dodopayments/models/webhook_payload.rbs +12 -2
- data/sig/dodopayments/models.rbs +4 -0
- data/sig/dodopayments/resources/invoices/payments.rbs +3 -0
- metadata +8 -2
|
@@ -101,7 +101,14 @@ module Dodopayments
|
|
|
101
101
|
# @return [Time, nil]
|
|
102
102
|
optional :past_due_ends_at, Time, nil?: true
|
|
103
103
|
|
|
104
|
-
# @!
|
|
104
|
+
# @!attribute payment_id
|
|
105
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
106
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
107
|
+
#
|
|
108
|
+
# @return [String, nil]
|
|
109
|
+
optional :payment_id, String, nil?: true
|
|
110
|
+
|
|
111
|
+
# @!method initialize(past_due_ends_at: nil, payment_id: nil, payload_type: :Subscription)
|
|
105
112
|
# Some parameter documentations has been truncated, see
|
|
106
113
|
# {Dodopayments::Models::WebhookPayload::Data::Subscription} for more details.
|
|
107
114
|
#
|
|
@@ -109,6 +116,8 @@ module Dodopayments
|
|
|
109
116
|
#
|
|
110
117
|
# @param past_due_ends_at [Time, nil] Time when the grace period ends. The subscription moves to `on_hold` or
|
|
111
118
|
#
|
|
119
|
+
# @param payment_id [String, nil] Identifier of the payment that caused this event.
|
|
120
|
+
#
|
|
112
121
|
# @param payload_type [Symbol, :Subscription]
|
|
113
122
|
end
|
|
114
123
|
|
data/lib/dodopayments/models.rb
CHANGED
|
@@ -95,6 +95,8 @@ module Dodopayments
|
|
|
95
95
|
|
|
96
96
|
CbbProrationBehavior = Dodopayments::Models::CbbProrationBehavior
|
|
97
97
|
|
|
98
|
+
ChargeType = Dodopayments::Models::ChargeType
|
|
99
|
+
|
|
98
100
|
CheckoutSessionBillingAddress = Dodopayments::Models::CheckoutSessionBillingAddress
|
|
99
101
|
|
|
100
102
|
CheckoutSessionCreateParams = Dodopayments::Models::CheckoutSessionCreateParams
|
|
@@ -514,6 +516,8 @@ module Dodopayments
|
|
|
514
516
|
|
|
515
517
|
SubscriptionRetrieveUsageHistoryParams = Dodopayments::Models::SubscriptionRetrieveUsageHistoryParams
|
|
516
518
|
|
|
519
|
+
SubscriptionServicePeriod = Dodopayments::Models::SubscriptionServicePeriod
|
|
520
|
+
|
|
517
521
|
SubscriptionStatus = Dodopayments::Models::SubscriptionStatus
|
|
518
522
|
|
|
519
523
|
SubscriptionUnpausedWebhookEvent = Dodopayments::Models::SubscriptionUnpausedWebhookEvent
|
|
@@ -4,60 +4,84 @@ module Dodopayments
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Invoices
|
|
6
6
|
class Payments
|
|
7
|
-
#
|
|
7
|
+
# Some parameter documentations has been truncated, see
|
|
8
|
+
# {Dodopayments::Models::Invoices::PaymentRetrieveParams} for more details.
|
|
9
|
+
#
|
|
10
|
+
# @overload retrieve(payment_id, token: nil, request_options: {})
|
|
8
11
|
#
|
|
9
12
|
# @param payment_id [String] Payment ID
|
|
10
13
|
#
|
|
14
|
+
# @param token [String] The signed link token. If the business asks for a credential on its invoice link
|
|
15
|
+
#
|
|
11
16
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
12
17
|
#
|
|
13
18
|
# @return [StringIO]
|
|
14
19
|
#
|
|
15
20
|
# @see Dodopayments::Models::Invoices::PaymentRetrieveParams
|
|
16
21
|
def retrieve(payment_id, params = {})
|
|
22
|
+
parsed, options = Dodopayments::Invoices::PaymentRetrieveParams.dump_request(params)
|
|
23
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
17
24
|
@client.request(
|
|
18
25
|
method: :get,
|
|
19
26
|
path: ["invoices/payments/%1$s", payment_id],
|
|
27
|
+
query: query,
|
|
20
28
|
headers: {"accept" => "application/pdf"},
|
|
21
29
|
model: StringIO,
|
|
22
|
-
options:
|
|
30
|
+
options: options
|
|
23
31
|
)
|
|
24
32
|
end
|
|
25
33
|
|
|
26
|
-
#
|
|
34
|
+
# Some parameter documentations has been truncated, see
|
|
35
|
+
# {Dodopayments::Models::Invoices::PaymentRetrievePayoutParams} for more details.
|
|
36
|
+
#
|
|
37
|
+
# @overload retrieve_payout(payout_id, token: nil, request_options: {})
|
|
27
38
|
#
|
|
28
39
|
# @param payout_id [String] Payout ID
|
|
29
40
|
#
|
|
41
|
+
# @param token [String] The signed link token. If the business asks for a credential on its invoice link
|
|
42
|
+
#
|
|
30
43
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
31
44
|
#
|
|
32
45
|
# @return [StringIO]
|
|
33
46
|
#
|
|
34
47
|
# @see Dodopayments::Models::Invoices::PaymentRetrievePayoutParams
|
|
35
48
|
def retrieve_payout(payout_id, params = {})
|
|
49
|
+
parsed, options = Dodopayments::Invoices::PaymentRetrievePayoutParams.dump_request(params)
|
|
50
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
36
51
|
@client.request(
|
|
37
52
|
method: :get,
|
|
38
53
|
path: ["invoices/payouts/%1$s", payout_id],
|
|
54
|
+
query: query,
|
|
39
55
|
headers: {"accept" => "application/pdf"},
|
|
40
56
|
model: StringIO,
|
|
41
|
-
options:
|
|
57
|
+
options: options
|
|
42
58
|
)
|
|
43
59
|
end
|
|
44
60
|
|
|
45
|
-
#
|
|
61
|
+
# Some parameter documentations has been truncated, see
|
|
62
|
+
# {Dodopayments::Models::Invoices::PaymentRetrieveRefundParams} for more details.
|
|
63
|
+
#
|
|
64
|
+
# @overload retrieve_refund(refund_id, token: nil, request_options: {})
|
|
46
65
|
#
|
|
47
66
|
# @param refund_id [String] Refund ID
|
|
48
67
|
#
|
|
68
|
+
# @param token [String] The signed link token. If the business asks for a credential on its invoice link
|
|
69
|
+
#
|
|
49
70
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
50
71
|
#
|
|
51
72
|
# @return [StringIO]
|
|
52
73
|
#
|
|
53
74
|
# @see Dodopayments::Models::Invoices::PaymentRetrieveRefundParams
|
|
54
75
|
def retrieve_refund(refund_id, params = {})
|
|
76
|
+
parsed, options = Dodopayments::Invoices::PaymentRetrieveRefundParams.dump_request(params)
|
|
77
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
55
78
|
@client.request(
|
|
56
79
|
method: :get,
|
|
57
80
|
path: ["invoices/refunds/%1$s", refund_id],
|
|
81
|
+
query: query,
|
|
58
82
|
headers: {"accept" => "application/pdf"},
|
|
59
83
|
model: StringIO,
|
|
60
|
-
options:
|
|
84
|
+
options: options
|
|
61
85
|
)
|
|
62
86
|
end
|
|
63
87
|
|
data/lib/dodopayments/version.rb
CHANGED
data/lib/dodopayments.rb
CHANGED
|
@@ -110,6 +110,7 @@ require_relative "dodopayments/models/brand_update_params"
|
|
|
110
110
|
require_relative "dodopayments/models/cancellation_feedback"
|
|
111
111
|
require_relative "dodopayments/models/cbb_overage_behavior"
|
|
112
112
|
require_relative "dodopayments/models/cbb_proration_behavior"
|
|
113
|
+
require_relative "dodopayments/models/charge_type"
|
|
113
114
|
require_relative "dodopayments/models/checkout_session_billing_address"
|
|
114
115
|
require_relative "dodopayments/models/checkout_session_create_params"
|
|
115
116
|
require_relative "dodopayments/models/checkout_session_customization"
|
|
@@ -393,6 +394,7 @@ require_relative "dodopayments/models/subscription_retrieve_credit_usage_respons
|
|
|
393
394
|
require_relative "dodopayments/models/subscription_retrieve_params"
|
|
394
395
|
require_relative "dodopayments/models/subscription_retrieve_usage_history_params"
|
|
395
396
|
require_relative "dodopayments/models/subscription_retrieve_usage_history_response"
|
|
397
|
+
require_relative "dodopayments/models/subscription_service_period"
|
|
396
398
|
require_relative "dodopayments/models/subscription_status"
|
|
397
399
|
require_relative "dodopayments/models/subscription_unpaused_webhook_event"
|
|
398
400
|
require_relative "dodopayments/models/subscription_updated_webhook_event"
|
|
@@ -268,6 +268,21 @@ module Dodopayments
|
|
|
268
268
|
:moderation_fees,
|
|
269
269
|
Dodopayments::BalanceLedgerEntry::EventType::TaggedSymbol
|
|
270
270
|
)
|
|
271
|
+
DODO_FIXED_FEE =
|
|
272
|
+
T.let(
|
|
273
|
+
:dodo_fixed_fee,
|
|
274
|
+
Dodopayments::BalanceLedgerEntry::EventType::TaggedSymbol
|
|
275
|
+
)
|
|
276
|
+
INTERCHANGE_FEE =
|
|
277
|
+
T.let(
|
|
278
|
+
:interchange_fee,
|
|
279
|
+
Dodopayments::BalanceLedgerEntry::EventType::TaggedSymbol
|
|
280
|
+
)
|
|
281
|
+
SCHEME_FEE =
|
|
282
|
+
T.let(
|
|
283
|
+
:scheme_fee,
|
|
284
|
+
Dodopayments::BalanceLedgerEntry::EventType::TaggedSymbol
|
|
285
|
+
)
|
|
271
286
|
|
|
272
287
|
sig do
|
|
273
288
|
override.returns(
|
|
@@ -1060,6 +1060,21 @@ module Dodopayments
|
|
|
1060
1060
|
:moderation_fees,
|
|
1061
1061
|
Dodopayments::BalanceRetrieveLedgerParams::EventType::TaggedSymbol
|
|
1062
1062
|
)
|
|
1063
|
+
DODO_FIXED_FEE =
|
|
1064
|
+
T.let(
|
|
1065
|
+
:dodo_fixed_fee,
|
|
1066
|
+
Dodopayments::BalanceRetrieveLedgerParams::EventType::TaggedSymbol
|
|
1067
|
+
)
|
|
1068
|
+
INTERCHANGE_FEE =
|
|
1069
|
+
T.let(
|
|
1070
|
+
:interchange_fee,
|
|
1071
|
+
Dodopayments::BalanceRetrieveLedgerParams::EventType::TaggedSymbol
|
|
1072
|
+
)
|
|
1073
|
+
SCHEME_FEE =
|
|
1074
|
+
T.let(
|
|
1075
|
+
:scheme_fee,
|
|
1076
|
+
Dodopayments::BalanceRetrieveLedgerParams::EventType::TaggedSymbol
|
|
1077
|
+
)
|
|
1063
1078
|
|
|
1064
1079
|
sig do
|
|
1065
1080
|
override.returns(
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# The type of subscription charge that a payment is for.
|
|
6
|
+
#
|
|
7
|
+
# A payment has one invoice, and the invoice has one type. Thus each payment has
|
|
8
|
+
# one charge type. A payment that charges no subscription has no charge type.
|
|
9
|
+
#
|
|
10
|
+
# - `new`: the first payment of one or more subscriptions. A retry of that payment
|
|
11
|
+
# is also `new`. A cart with new subscriptions and one-time products is `new`.
|
|
12
|
+
# Read the one-time products from `product_cart`.
|
|
13
|
+
# - `renewal`: a charge at the billing date. A dunning retry and a manual retry of
|
|
14
|
+
# that charge are also `renewal`. A `renewal` does not always extend the service
|
|
15
|
+
# period. For example, the usage settlement of a paused subscription is a
|
|
16
|
+
# `renewal` with `includes_usage` true and no entry in `service_periods`.
|
|
17
|
+
# Examine `service_periods` before you extend access.
|
|
18
|
+
# - `plan_change`: a charge for a plan change. The change applies now or at the
|
|
19
|
+
# next billing date.
|
|
20
|
+
# - `on_demand`: an on-demand charge of an on-demand subscription.
|
|
21
|
+
module ChargeType
|
|
22
|
+
extend Dodopayments::Internal::Type::Enum
|
|
23
|
+
|
|
24
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Dodopayments::ChargeType) }
|
|
25
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
26
|
+
|
|
27
|
+
NEW = T.let(:new, Dodopayments::ChargeType::TaggedSymbol)
|
|
28
|
+
RENEWAL = T.let(:renewal, Dodopayments::ChargeType::TaggedSymbol)
|
|
29
|
+
PLAN_CHANGE = T.let(:plan_change, Dodopayments::ChargeType::TaggedSymbol)
|
|
30
|
+
ON_DEMAND = T.let(:on_demand, Dodopayments::ChargeType::TaggedSymbol)
|
|
31
|
+
|
|
32
|
+
sig { override.returns(T::Array[Dodopayments::ChargeType::TaggedSymbol]) }
|
|
33
|
+
def self.values
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -83,6 +83,9 @@ module Dodopayments
|
|
|
83
83
|
|
|
84
84
|
# If the customer is allowed to apply discount code, set it to true.
|
|
85
85
|
#
|
|
86
|
+
# If this flag is false, the customer cannot change the discount codes. The
|
|
87
|
+
# discount codes that you give when you create the session still apply.
|
|
88
|
+
#
|
|
86
89
|
# Default is true
|
|
87
90
|
sig { returns(T.nilable(T::Boolean)) }
|
|
88
91
|
attr_reader :allow_discount_code
|
|
@@ -234,6 +237,9 @@ module Dodopayments
|
|
|
234
237
|
allow_customer_editing_zipcode: nil,
|
|
235
238
|
# If the customer is allowed to apply discount code, set it to true.
|
|
236
239
|
#
|
|
240
|
+
# If this flag is false, the customer cannot change the discount codes. The
|
|
241
|
+
# discount codes that you give when you create the session still apply.
|
|
242
|
+
#
|
|
237
243
|
# Default is true
|
|
238
244
|
allow_discount_code: nil,
|
|
239
245
|
# If true, the customer can add or remove addons on a subscription product during
|
|
@@ -409,6 +409,13 @@ module Dodopayments
|
|
|
409
409
|
sig { returns(T.nilable(Integer)) }
|
|
410
410
|
attr_accessor :discount_cycle
|
|
411
411
|
|
|
412
|
+
# The monthly equivalent of the yearly unit price after discounts, in minor units
|
|
413
|
+
# of `currency`. Only the hosted checkout sets it, when the business shows yearly
|
|
414
|
+
# plans as monthly. The value is only for display. The order summary shows the
|
|
415
|
+
# amounts that we charge.
|
|
416
|
+
sig { returns(T.nilable(Integer)) }
|
|
417
|
+
attr_accessor :monthly_equivalent
|
|
418
|
+
|
|
412
419
|
# name of the product
|
|
413
420
|
sig { returns(T.nilable(String)) }
|
|
414
421
|
attr_accessor :name
|
|
@@ -447,6 +454,7 @@ module Dodopayments
|
|
|
447
454
|
description: T.nilable(String),
|
|
448
455
|
discount_amount: T.nilable(Integer),
|
|
449
456
|
discount_cycle: T.nilable(Integer),
|
|
457
|
+
monthly_equivalent: T.nilable(Integer),
|
|
450
458
|
name: T.nilable(String),
|
|
451
459
|
tax: T.nilable(Integer)
|
|
452
460
|
).returns(T.attached_class)
|
|
@@ -483,6 +491,11 @@ module Dodopayments
|
|
|
483
491
|
discount_amount: nil,
|
|
484
492
|
# number of cycles the discount will apply
|
|
485
493
|
discount_cycle: nil,
|
|
494
|
+
# The monthly equivalent of the yearly unit price after discounts, in minor units
|
|
495
|
+
# of `currency`. Only the hosted checkout sets it, when the business shows yearly
|
|
496
|
+
# plans as monthly. The value is only for display. The order summary shows the
|
|
497
|
+
# amounts that we charge.
|
|
498
|
+
monthly_equivalent: nil,
|
|
486
499
|
# name of the product
|
|
487
500
|
name: nil,
|
|
488
501
|
# total tax
|
|
@@ -521,6 +534,7 @@ module Dodopayments
|
|
|
521
534
|
description: T.nilable(String),
|
|
522
535
|
discount_amount: T.nilable(Integer),
|
|
523
536
|
discount_cycle: T.nilable(Integer),
|
|
537
|
+
monthly_equivalent: T.nilable(Integer),
|
|
524
538
|
name: T.nilable(String),
|
|
525
539
|
tax: T.nilable(Integer)
|
|
526
540
|
}
|
|
@@ -18,19 +18,35 @@ module Dodopayments
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :payment_id
|
|
20
20
|
|
|
21
|
+
# The signed link token. If the business asks for a credential on its invoice
|
|
22
|
+
# links, a valid token for this record replaces the credential.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_reader :token
|
|
25
|
+
|
|
26
|
+
sig { params(token: String).void }
|
|
27
|
+
attr_writer :token
|
|
28
|
+
|
|
21
29
|
sig do
|
|
22
30
|
params(
|
|
23
31
|
payment_id: String,
|
|
32
|
+
token: String,
|
|
24
33
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
25
34
|
).returns(T.attached_class)
|
|
26
35
|
end
|
|
27
|
-
def self.new(
|
|
36
|
+
def self.new(
|
|
37
|
+
payment_id:,
|
|
38
|
+
# The signed link token. If the business asks for a credential on its invoice
|
|
39
|
+
# links, a valid token for this record replaces the credential.
|
|
40
|
+
token: nil,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
28
43
|
end
|
|
29
44
|
|
|
30
45
|
sig do
|
|
31
46
|
override.returns(
|
|
32
47
|
{
|
|
33
48
|
payment_id: String,
|
|
49
|
+
token: String,
|
|
34
50
|
request_options: Dodopayments::RequestOptions
|
|
35
51
|
}
|
|
36
52
|
)
|
|
@@ -18,18 +18,37 @@ module Dodopayments
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :payout_id
|
|
20
20
|
|
|
21
|
+
# The signed link token. If the business asks for a credential on its invoice
|
|
22
|
+
# links, a valid token for this record replaces the credential.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_reader :token
|
|
25
|
+
|
|
26
|
+
sig { params(token: String).void }
|
|
27
|
+
attr_writer :token
|
|
28
|
+
|
|
21
29
|
sig do
|
|
22
30
|
params(
|
|
23
31
|
payout_id: String,
|
|
32
|
+
token: String,
|
|
24
33
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
25
34
|
).returns(T.attached_class)
|
|
26
35
|
end
|
|
27
|
-
def self.new(
|
|
36
|
+
def self.new(
|
|
37
|
+
payout_id:,
|
|
38
|
+
# The signed link token. If the business asks for a credential on its invoice
|
|
39
|
+
# links, a valid token for this record replaces the credential.
|
|
40
|
+
token: nil,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
28
43
|
end
|
|
29
44
|
|
|
30
45
|
sig do
|
|
31
46
|
override.returns(
|
|
32
|
-
{
|
|
47
|
+
{
|
|
48
|
+
payout_id: String,
|
|
49
|
+
token: String,
|
|
50
|
+
request_options: Dodopayments::RequestOptions
|
|
51
|
+
}
|
|
33
52
|
)
|
|
34
53
|
end
|
|
35
54
|
def to_hash
|
|
@@ -18,18 +18,37 @@ module Dodopayments
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :refund_id
|
|
20
20
|
|
|
21
|
+
# The signed link token. If the business asks for a credential on its invoice
|
|
22
|
+
# links, a valid token for this record replaces the credential.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_reader :token
|
|
25
|
+
|
|
26
|
+
sig { params(token: String).void }
|
|
27
|
+
attr_writer :token
|
|
28
|
+
|
|
21
29
|
sig do
|
|
22
30
|
params(
|
|
23
31
|
refund_id: String,
|
|
32
|
+
token: String,
|
|
24
33
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
25
34
|
).returns(T.attached_class)
|
|
26
35
|
end
|
|
27
|
-
def self.new(
|
|
36
|
+
def self.new(
|
|
37
|
+
refund_id:,
|
|
38
|
+
# The signed link token. If the business asks for a credential on its invoice
|
|
39
|
+
# links, a valid token for this record replaces the credential.
|
|
40
|
+
token: nil,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
28
43
|
end
|
|
29
44
|
|
|
30
45
|
sig do
|
|
31
46
|
override.returns(
|
|
32
|
-
{
|
|
47
|
+
{
|
|
48
|
+
refund_id: String,
|
|
49
|
+
token: String,
|
|
50
|
+
request_options: Dodopayments::RequestOptions
|
|
51
|
+
}
|
|
33
52
|
)
|
|
34
53
|
end
|
|
35
54
|
def to_hash
|
|
@@ -17,6 +17,20 @@ module Dodopayments
|
|
|
17
17
|
sig { returns(Integer) }
|
|
18
18
|
attr_accessor :sends_used
|
|
19
19
|
|
|
20
|
+
# The number of the queued automatic retry, starting at 1.
|
|
21
|
+
sig { returns(T.nilable(Integer)) }
|
|
22
|
+
attr_accessor :automatic_retry_number
|
|
23
|
+
|
|
24
|
+
# The number of automatic retries that the current configuration plans for this
|
|
25
|
+
# invoice. It is never less than `automatic_retry_number`.
|
|
26
|
+
sig { returns(T.nilable(Integer)) }
|
|
27
|
+
attr_accessor :automatic_retry_total
|
|
28
|
+
|
|
29
|
+
# When the next automatic retry on this invoice is scheduled. Null when no
|
|
30
|
+
# automatic retry is queued or automatic retries are disabled.
|
|
31
|
+
sig { returns(T.nilable(Time)) }
|
|
32
|
+
attr_accessor :next_automatic_retry_at
|
|
33
|
+
|
|
20
34
|
# The code `POST` would fail with. Null when `can_retry` is true.
|
|
21
35
|
sig { returns(T.nilable(String)) }
|
|
22
36
|
attr_accessor :reason
|
|
@@ -31,6 +45,9 @@ module Dodopayments
|
|
|
31
45
|
can_retry: T::Boolean,
|
|
32
46
|
sends_allowed: Integer,
|
|
33
47
|
sends_used: Integer,
|
|
48
|
+
automatic_retry_number: T.nilable(Integer),
|
|
49
|
+
automatic_retry_total: T.nilable(Integer),
|
|
50
|
+
next_automatic_retry_at: T.nilable(Time),
|
|
34
51
|
reason: T.nilable(String),
|
|
35
52
|
retry_available_at: T.nilable(Time)
|
|
36
53
|
).returns(T.attached_class)
|
|
@@ -39,6 +56,14 @@ module Dodopayments
|
|
|
39
56
|
can_retry:,
|
|
40
57
|
sends_allowed:,
|
|
41
58
|
sends_used:,
|
|
59
|
+
# The number of the queued automatic retry, starting at 1.
|
|
60
|
+
automatic_retry_number: nil,
|
|
61
|
+
# The number of automatic retries that the current configuration plans for this
|
|
62
|
+
# invoice. It is never less than `automatic_retry_number`.
|
|
63
|
+
automatic_retry_total: nil,
|
|
64
|
+
# When the next automatic retry on this invoice is scheduled. Null when no
|
|
65
|
+
# automatic retry is queued or automatic retries are disabled.
|
|
66
|
+
next_automatic_retry_at: nil,
|
|
42
67
|
# The code `POST` would fail with. Null when `can_retry` is true.
|
|
43
68
|
reason: nil,
|
|
44
69
|
# When the next send becomes available. Null when no send is left, or when the
|
|
@@ -53,6 +78,9 @@ module Dodopayments
|
|
|
53
78
|
can_retry: T::Boolean,
|
|
54
79
|
sends_allowed: Integer,
|
|
55
80
|
sends_used: Integer,
|
|
81
|
+
automatic_retry_number: T.nilable(Integer),
|
|
82
|
+
automatic_retry_total: T.nilable(Integer),
|
|
83
|
+
next_automatic_retry_at: T.nilable(Time),
|
|
56
84
|
reason: T.nilable(String),
|
|
57
85
|
retry_available_at: T.nilable(Time)
|
|
58
86
|
}
|