dodopayments 1.18.3 → 1.20.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 +44 -0
- data/README.md +5 -5
- data/lib/dodopayments/client.rb +12 -9
- data/lib/dodopayments/errors.rb +9 -9
- data/lib/dodopayments/file_part.rb +5 -5
- data/lib/dodopayments/internal/transport/base_client.rb +1 -1
- data/lib/dodopayments/internal/type/boolean.rb +10 -11
- data/lib/dodopayments/internal/type/converter.rb +3 -0
- data/lib/dodopayments/internal/type/enum.rb +10 -11
- data/lib/dodopayments/internal/type/file_input.rb +22 -11
- data/lib/dodopayments/internal/type/unknown.rb +10 -11
- data/lib/dodopayments/internal/util.rb +3 -3
- data/lib/dodopayments/models/addon_cart_response_item.rb +23 -0
- data/lib/dodopayments/models/addon_create_params.rb +58 -0
- data/lib/dodopayments/models/addon_list_params.rb +30 -0
- data/lib/dodopayments/models/addon_response.rb +93 -0
- data/lib/dodopayments/models/addon_retrieve_params.rb +14 -0
- data/lib/dodopayments/models/addon_update_images_params.rb +14 -0
- data/lib/dodopayments/models/addon_update_images_response.rb +22 -0
- data/lib/dodopayments/models/addon_update_params.rb +66 -0
- data/lib/dodopayments/models/currency.rb +158 -0
- data/lib/dodopayments/models/misc_list_supported_countries_response.rb +1 -0
- data/lib/dodopayments/models/payment.rb +14 -315
- data/lib/dodopayments/models/payment_create_params.rb +3 -158
- data/lib/dodopayments/models/payment_list_response.rb +3 -157
- data/lib/dodopayments/models/payout_list_response.rb +3 -157
- data/lib/dodopayments/models/price.rb +6 -314
- data/lib/dodopayments/models/product.rb +3 -19
- data/lib/dodopayments/models/product_create_params.rb +3 -17
- data/lib/dodopayments/models/product_list_response.rb +6 -176
- data/lib/dodopayments/models/product_update_params.rb +3 -17
- data/lib/dodopayments/models/refund.rb +3 -157
- data/lib/dodopayments/models/subscription.rb +21 -158
- data/lib/dodopayments/models/subscription_create_params.rb +30 -159
- data/lib/dodopayments/models/subscription_create_response.rb +10 -1
- data/lib/dodopayments/models/subscription_list_response.rb +179 -0
- data/lib/dodopayments/models/subscription_update_params.rb +19 -1
- data/lib/dodopayments/models/tax_category.rb +19 -0
- data/lib/dodopayments/request_options.rb +4 -5
- data/lib/dodopayments/resources/addons.rb +141 -0
- data/lib/dodopayments/resources/payments.rb +1 -1
- data/lib/dodopayments/resources/products.rb +2 -2
- data/lib/dodopayments/resources/subscriptions.rb +9 -5
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +12 -0
- data/rbi/{lib/dodopayments → dodopayments}/client.rbi +7 -5
- data/rbi/{lib/dodopayments → dodopayments}/errors.rbi +1 -1
- data/rbi/{lib/dodopayments → dodopayments}/internal/transport/base_client.rbi +2 -2
- data/rbi/{lib/dodopayments → dodopayments}/internal/type/request_parameters.rbi +1 -1
- data/rbi/dodopayments/models/addon_cart_response_item.rbi +20 -0
- data/rbi/dodopayments/models/addon_create_params.rbi +69 -0
- data/rbi/dodopayments/models/addon_list_params.rbi +45 -0
- data/rbi/dodopayments/models/addon_response.rbi +103 -0
- data/rbi/dodopayments/models/addon_retrieve_params.rbi +19 -0
- data/rbi/dodopayments/models/addon_update_images_params.rbi +19 -0
- data/rbi/dodopayments/models/addon_update_images_response.rbi +19 -0
- data/rbi/dodopayments/models/addon_update_params.rbi +77 -0
- data/rbi/dodopayments/models/currency.rbi +161 -0
- data/rbi/dodopayments/models/payment.rbi +227 -0
- data/rbi/dodopayments/models/payment_create_params.rbi +189 -0
- data/rbi/dodopayments/models/payment_list_response.rbi +88 -0
- data/rbi/dodopayments/models/payout_list_response.rbi +155 -0
- data/rbi/dodopayments/models/price.rbi +218 -0
- data/rbi/{lib/dodopayments → dodopayments}/models/product.rbi +3 -20
- data/rbi/{lib/dodopayments → dodopayments}/models/product_create_params.rbi +3 -21
- data/rbi/dodopayments/models/product_list_response.rbi +153 -0
- data/rbi/{lib/dodopayments → dodopayments}/models/product_update_params.rbi +3 -21
- data/rbi/dodopayments/models/refund.rbi +83 -0
- data/rbi/dodopayments/models/subscription.rbi +198 -0
- data/rbi/dodopayments/models/subscription_create_params.rbi +282 -0
- data/rbi/{lib/dodopayments → dodopayments}/models/subscription_create_response.rbi +8 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +190 -0
- data/rbi/{lib/dodopayments → dodopayments}/models/subscription_update_params.rbi +37 -1
- data/rbi/dodopayments/models/tax_category.rbi +22 -0
- data/rbi/{lib/dodopayments → dodopayments}/request_options.rbi +2 -0
- data/rbi/dodopayments/resources/addons.rbi +97 -0
- data/rbi/{lib/dodopayments → dodopayments}/resources/customers/customer_portal.rbi +1 -1
- data/rbi/{lib/dodopayments → dodopayments}/resources/customers.rbi +4 -7
- data/rbi/{lib/dodopayments → dodopayments}/resources/discounts.rbi +5 -14
- data/rbi/{lib/dodopayments → dodopayments}/resources/disputes.rbi +2 -5
- data/rbi/{lib/dodopayments → dodopayments}/resources/invoices/payments.rbi +1 -7
- data/rbi/{lib/dodopayments → dodopayments}/resources/license_key_instances.rbi +3 -10
- data/rbi/{lib/dodopayments → dodopayments}/resources/license_keys.rbi +3 -9
- data/rbi/{lib/dodopayments → dodopayments}/resources/licenses.rbi +3 -7
- data/rbi/{lib/dodopayments → dodopayments}/resources/misc.rbi +1 -8
- data/rbi/{lib/dodopayments → dodopayments}/resources/payments.rbi +4 -7
- data/rbi/{lib/dodopayments → dodopayments}/resources/payouts.rbi +1 -1
- data/rbi/{lib/dodopayments → dodopayments}/resources/products/images.rbi +1 -5
- data/rbi/{lib/dodopayments → dodopayments}/resources/products.rbi +8 -26
- data/rbi/{lib/dodopayments → dodopayments}/resources/refunds.rbi +3 -11
- data/rbi/{lib/dodopayments → dodopayments}/resources/subscriptions.rbi +19 -15
- data/rbi/{lib/dodopayments → dodopayments}/resources/webhook_events.rbi +2 -5
- data/sig/dodopayments/client.rbs +4 -2
- data/sig/dodopayments/models/addon_cart_response_item.rbs +15 -0
- data/sig/dodopayments/models/addon_create_params.rbs +39 -0
- data/sig/dodopayments/models/addon_list_params.rbs +24 -0
- data/sig/dodopayments/models/addon_response.rbs +54 -0
- data/sig/dodopayments/models/addon_retrieve_params.rbs +15 -0
- data/sig/dodopayments/models/addon_update_images_params.rbs +15 -0
- data/sig/dodopayments/models/addon_update_images_response.rbs +15 -0
- data/sig/dodopayments/models/addon_update_params.rbs +43 -0
- data/sig/dodopayments/models/currency.rbs +302 -0
- data/sig/dodopayments/models/misc_list_supported_countries_response.rbs +1 -1
- data/sig/dodopayments/models/payment.rbs +10 -604
- data/sig/dodopayments/models/payment_create_params.rbs +3 -302
- data/sig/dodopayments/models/payment_list_response.rbs +3 -302
- data/sig/dodopayments/models/payout_list_response.rbs +3 -302
- data/sig/dodopayments/models/price.rbs +6 -604
- data/sig/dodopayments/models/product.rbs +3 -16
- data/sig/dodopayments/models/product_create_params.rbs +3 -16
- data/sig/dodopayments/models/product_list_response.rbs +6 -318
- data/sig/dodopayments/models/product_update_params.rbs +3 -16
- data/sig/dodopayments/models/refund.rbs +3 -302
- data/sig/dodopayments/models/subscription.rbs +11 -302
- data/sig/dodopayments/models/subscription_create_params.rbs +19 -302
- data/sig/dodopayments/models/subscription_create_response.rbs +4 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +98 -0
- data/sig/dodopayments/models/subscription_update_params.rbs +14 -0
- data/sig/dodopayments/models/tax_category.rbs +16 -0
- data/sig/dodopayments/resources/addons.rbs +43 -0
- data/sig/dodopayments/resources/payments.rbs +1 -1
- data/sig/dodopayments/resources/products.rbs +2 -2
- data/sig/dodopayments/resources/subscriptions.rbs +4 -2
- metadata +160 -124
- data/rbi/lib/dodopayments/models/payment.rbi +0 -530
- data/rbi/lib/dodopayments/models/payment_create_params.rbi +0 -345
- data/rbi/lib/dodopayments/models/payment_list_response.rbi +0 -244
- data/rbi/lib/dodopayments/models/payout_list_response.rbi +0 -311
- data/rbi/lib/dodopayments/models/price.rbi +0 -530
- data/rbi/lib/dodopayments/models/product_list_response.rbi +0 -327
- data/rbi/lib/dodopayments/models/refund.rbi +0 -239
- data/rbi/lib/dodopayments/models/subscription.rbi +0 -338
- data/rbi/lib/dodopayments/models/subscription_create_params.rbi +0 -415
- /data/rbi/{lib/dodopayments → dodopayments}/file_part.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/default_page_number_pagination.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/transport/pooled_net_requester.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/array_of.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/base_model.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/base_page.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/boolean.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/converter.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/enum.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/file_input.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/hash_of.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/union.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/unknown.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/util.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/attach_existing_customer.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/billing_address.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/country_code.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/create_new_customer.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_create_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_limited_details.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_portal_session.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_request.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_update_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customers/customer_portal_create_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_create_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_delete_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_type.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_update_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/dispute.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/dispute_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/dispute_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/dispute_stage.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/dispute_status.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/intent_status.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/invoices/payment_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_activate_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_deactivate_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_duration.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_instance.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_instance_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_instance_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_instance_update_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_status.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_update_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_validate_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_validate_response.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/misc_list_supported_countries_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/misc_list_supported_countries_response.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/one_time_product_cart_item.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/payment_create_response.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/payment_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/payment_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/payout_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/product_delete_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/product_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/product_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/product_unarchive_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/products/image_update_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/products/image_update_response.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/refund_create_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/refund_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/refund_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/refund_status.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_change_plan_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_charge_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_charge_response.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_status.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/time_interval.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/webhook_event.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/webhook_event_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/webhook_event_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/resources/invoices.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/version.rbi +0 -0
@@ -0,0 +1,218 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
module Price
|
6
|
+
extend Dodopayments::Internal::Type::Union
|
7
|
+
|
8
|
+
class OneTimePrice < Dodopayments::Internal::Type::BaseModel
|
9
|
+
sig { returns(Dodopayments::Models::Currency::OrSymbol) }
|
10
|
+
attr_accessor :currency
|
11
|
+
|
12
|
+
# Discount applied to the price, represented as a percentage (0 to 100).
|
13
|
+
sig { returns(Float) }
|
14
|
+
attr_accessor :discount
|
15
|
+
|
16
|
+
# The payment amount, in the smallest denomination of the currency (e.g., cents
|
17
|
+
# for USD). For example, to charge $1.00, pass `100`.
|
18
|
+
#
|
19
|
+
# If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
|
20
|
+
# represents the **minimum** amount the customer must pay.
|
21
|
+
sig { returns(Integer) }
|
22
|
+
attr_accessor :price
|
23
|
+
|
24
|
+
# Indicates if purchasing power parity adjustments are applied to the price.
|
25
|
+
# Purchasing power parity feature is not available as of now.
|
26
|
+
sig { returns(T::Boolean) }
|
27
|
+
attr_accessor :purchasing_power_parity
|
28
|
+
|
29
|
+
sig { returns(Symbol) }
|
30
|
+
attr_accessor :type
|
31
|
+
|
32
|
+
# Indicates whether the customer can pay any amount they choose. If set to `true`,
|
33
|
+
# the [`price`](Self::price) field is the minimum amount.
|
34
|
+
sig { returns(T.nilable(T::Boolean)) }
|
35
|
+
attr_reader :pay_what_you_want
|
36
|
+
|
37
|
+
sig { params(pay_what_you_want: T::Boolean).void }
|
38
|
+
attr_writer :pay_what_you_want
|
39
|
+
|
40
|
+
# A suggested price for the user to pay. This value is only considered if
|
41
|
+
# [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
|
42
|
+
# ignored.
|
43
|
+
sig { returns(T.nilable(Integer)) }
|
44
|
+
attr_accessor :suggested_price
|
45
|
+
|
46
|
+
# Indicates if the price is tax inclusive.
|
47
|
+
sig { returns(T.nilable(T::Boolean)) }
|
48
|
+
attr_accessor :tax_inclusive
|
49
|
+
|
50
|
+
sig do
|
51
|
+
params(
|
52
|
+
currency: Dodopayments::Models::Currency::OrSymbol,
|
53
|
+
discount: Float,
|
54
|
+
price: Integer,
|
55
|
+
purchasing_power_parity: T::Boolean,
|
56
|
+
pay_what_you_want: T::Boolean,
|
57
|
+
suggested_price: T.nilable(Integer),
|
58
|
+
tax_inclusive: T.nilable(T::Boolean),
|
59
|
+
type: Symbol
|
60
|
+
)
|
61
|
+
.returns(T.attached_class)
|
62
|
+
end
|
63
|
+
def self.new(
|
64
|
+
currency:,
|
65
|
+
# Discount applied to the price, represented as a percentage (0 to 100).
|
66
|
+
discount:,
|
67
|
+
# The payment amount, in the smallest denomination of the currency (e.g., cents
|
68
|
+
# for USD). For example, to charge $1.00, pass `100`.
|
69
|
+
#
|
70
|
+
# If [`pay_what_you_want`](Self::pay_what_you_want) is set to `true`, this field
|
71
|
+
# represents the **minimum** amount the customer must pay.
|
72
|
+
price:,
|
73
|
+
# Indicates if purchasing power parity adjustments are applied to the price.
|
74
|
+
# Purchasing power parity feature is not available as of now.
|
75
|
+
purchasing_power_parity:,
|
76
|
+
# Indicates whether the customer can pay any amount they choose. If set to `true`,
|
77
|
+
# the [`price`](Self::price) field is the minimum amount.
|
78
|
+
pay_what_you_want: nil,
|
79
|
+
# A suggested price for the user to pay. This value is only considered if
|
80
|
+
# [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
|
81
|
+
# ignored.
|
82
|
+
suggested_price: nil,
|
83
|
+
# Indicates if the price is tax inclusive.
|
84
|
+
tax_inclusive: nil,
|
85
|
+
type: :one_time_price
|
86
|
+
); end
|
87
|
+
sig do
|
88
|
+
override
|
89
|
+
.returns(
|
90
|
+
{
|
91
|
+
currency: Dodopayments::Models::Currency::OrSymbol,
|
92
|
+
discount: Float,
|
93
|
+
price: Integer,
|
94
|
+
purchasing_power_parity: T::Boolean,
|
95
|
+
type: Symbol,
|
96
|
+
pay_what_you_want: T::Boolean,
|
97
|
+
suggested_price: T.nilable(Integer),
|
98
|
+
tax_inclusive: T.nilable(T::Boolean)
|
99
|
+
}
|
100
|
+
)
|
101
|
+
end
|
102
|
+
def to_hash; end
|
103
|
+
end
|
104
|
+
|
105
|
+
class RecurringPrice < Dodopayments::Internal::Type::BaseModel
|
106
|
+
sig { returns(Dodopayments::Models::Currency::OrSymbol) }
|
107
|
+
attr_accessor :currency
|
108
|
+
|
109
|
+
# Discount applied to the price, represented as a percentage (0 to 100).
|
110
|
+
sig { returns(Float) }
|
111
|
+
attr_accessor :discount
|
112
|
+
|
113
|
+
# Number of units for the payment frequency. For example, a value of `1` with a
|
114
|
+
# `payment_frequency_interval` of `month` represents monthly payments.
|
115
|
+
sig { returns(Integer) }
|
116
|
+
attr_accessor :payment_frequency_count
|
117
|
+
|
118
|
+
sig { returns(Dodopayments::Models::TimeInterval::OrSymbol) }
|
119
|
+
attr_accessor :payment_frequency_interval
|
120
|
+
|
121
|
+
# The payment amount. Represented in the lowest denomination of the currency
|
122
|
+
# (e.g., cents for USD). For example, to charge $1.00, pass `100`.
|
123
|
+
sig { returns(Integer) }
|
124
|
+
attr_accessor :price
|
125
|
+
|
126
|
+
# Indicates if purchasing power parity adjustments are applied to the price.
|
127
|
+
# Purchasing power parity feature is not available as of now
|
128
|
+
sig { returns(T::Boolean) }
|
129
|
+
attr_accessor :purchasing_power_parity
|
130
|
+
|
131
|
+
# Number of units for the subscription period. For example, a value of `12` with a
|
132
|
+
# `subscription_period_interval` of `month` represents a one-year subscription.
|
133
|
+
sig { returns(Integer) }
|
134
|
+
attr_accessor :subscription_period_count
|
135
|
+
|
136
|
+
sig { returns(Dodopayments::Models::TimeInterval::OrSymbol) }
|
137
|
+
attr_accessor :subscription_period_interval
|
138
|
+
|
139
|
+
sig { returns(Symbol) }
|
140
|
+
attr_accessor :type
|
141
|
+
|
142
|
+
# Indicates if the price is tax inclusive
|
143
|
+
sig { returns(T.nilable(T::Boolean)) }
|
144
|
+
attr_accessor :tax_inclusive
|
145
|
+
|
146
|
+
# Number of days for the trial period. A value of `0` indicates no trial period.
|
147
|
+
sig { returns(T.nilable(Integer)) }
|
148
|
+
attr_reader :trial_period_days
|
149
|
+
|
150
|
+
sig { params(trial_period_days: Integer).void }
|
151
|
+
attr_writer :trial_period_days
|
152
|
+
|
153
|
+
sig do
|
154
|
+
params(
|
155
|
+
currency: Dodopayments::Models::Currency::OrSymbol,
|
156
|
+
discount: Float,
|
157
|
+
payment_frequency_count: Integer,
|
158
|
+
payment_frequency_interval: Dodopayments::Models::TimeInterval::OrSymbol,
|
159
|
+
price: Integer,
|
160
|
+
purchasing_power_parity: T::Boolean,
|
161
|
+
subscription_period_count: Integer,
|
162
|
+
subscription_period_interval: Dodopayments::Models::TimeInterval::OrSymbol,
|
163
|
+
tax_inclusive: T.nilable(T::Boolean),
|
164
|
+
trial_period_days: Integer,
|
165
|
+
type: Symbol
|
166
|
+
)
|
167
|
+
.returns(T.attached_class)
|
168
|
+
end
|
169
|
+
def self.new(
|
170
|
+
currency:,
|
171
|
+
# Discount applied to the price, represented as a percentage (0 to 100).
|
172
|
+
discount:,
|
173
|
+
# Number of units for the payment frequency. For example, a value of `1` with a
|
174
|
+
# `payment_frequency_interval` of `month` represents monthly payments.
|
175
|
+
payment_frequency_count:,
|
176
|
+
payment_frequency_interval:,
|
177
|
+
# The payment amount. Represented in the lowest denomination of the currency
|
178
|
+
# (e.g., cents for USD). For example, to charge $1.00, pass `100`.
|
179
|
+
price:,
|
180
|
+
# Indicates if purchasing power parity adjustments are applied to the price.
|
181
|
+
# Purchasing power parity feature is not available as of now
|
182
|
+
purchasing_power_parity:,
|
183
|
+
# Number of units for the subscription period. For example, a value of `12` with a
|
184
|
+
# `subscription_period_interval` of `month` represents a one-year subscription.
|
185
|
+
subscription_period_count:,
|
186
|
+
subscription_period_interval:,
|
187
|
+
# Indicates if the price is tax inclusive
|
188
|
+
tax_inclusive: nil,
|
189
|
+
# Number of days for the trial period. A value of `0` indicates no trial period.
|
190
|
+
trial_period_days: nil,
|
191
|
+
type: :recurring_price
|
192
|
+
); end
|
193
|
+
sig do
|
194
|
+
override
|
195
|
+
.returns(
|
196
|
+
{
|
197
|
+
currency: Dodopayments::Models::Currency::OrSymbol,
|
198
|
+
discount: Float,
|
199
|
+
payment_frequency_count: Integer,
|
200
|
+
payment_frequency_interval: Dodopayments::Models::TimeInterval::OrSymbol,
|
201
|
+
price: Integer,
|
202
|
+
purchasing_power_parity: T::Boolean,
|
203
|
+
subscription_period_count: Integer,
|
204
|
+
subscription_period_interval: Dodopayments::Models::TimeInterval::OrSymbol,
|
205
|
+
type: Symbol,
|
206
|
+
tax_inclusive: T.nilable(T::Boolean),
|
207
|
+
trial_period_days: Integer
|
208
|
+
}
|
209
|
+
)
|
210
|
+
end
|
211
|
+
def to_hash; end
|
212
|
+
end
|
213
|
+
|
214
|
+
sig { override.returns([Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice]) }
|
215
|
+
def self.variants; end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
@@ -28,7 +28,7 @@ module Dodopayments
|
|
28
28
|
|
29
29
|
# Represents the different categories of taxation applicable to various products
|
30
30
|
# and services.
|
31
|
-
sig { returns(Dodopayments::Models::
|
31
|
+
sig { returns(Dodopayments::Models::TaxCategory::TaggedSymbol) }
|
32
32
|
attr_accessor :tax_category
|
33
33
|
|
34
34
|
# Timestamp when the product was last updated.
|
@@ -82,7 +82,7 @@ module Dodopayments
|
|
82
82
|
Dodopayments::Models::Price::RecurringPrice
|
83
83
|
),
|
84
84
|
product_id: String,
|
85
|
-
tax_category: Dodopayments::Models::
|
85
|
+
tax_category: Dodopayments::Models::TaxCategory::OrSymbol,
|
86
86
|
updated_at: Time,
|
87
87
|
addons: T.nilable(T::Array[String]),
|
88
88
|
description: T.nilable(String),
|
@@ -135,7 +135,7 @@ module Dodopayments
|
|
135
135
|
license_key_enabled: T::Boolean,
|
136
136
|
price: T.any(Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice),
|
137
137
|
product_id: String,
|
138
|
-
tax_category: Dodopayments::Models::
|
138
|
+
tax_category: Dodopayments::Models::TaxCategory::TaggedSymbol,
|
139
139
|
updated_at: Time,
|
140
140
|
addons: T.nilable(T::Array[String]),
|
141
141
|
description: T.nilable(String),
|
@@ -148,23 +148,6 @@ module Dodopayments
|
|
148
148
|
)
|
149
149
|
end
|
150
150
|
def to_hash; end
|
151
|
-
|
152
|
-
# Represents the different categories of taxation applicable to various products
|
153
|
-
# and services.
|
154
|
-
module TaxCategory
|
155
|
-
extend Dodopayments::Internal::Type::Enum
|
156
|
-
|
157
|
-
TaggedSymbol = T.type_alias { T.all(Symbol, Dodopayments::Models::Product::TaxCategory) }
|
158
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
159
|
-
|
160
|
-
DIGITAL_PRODUCTS = T.let(:digital_products, Dodopayments::Models::Product::TaxCategory::TaggedSymbol)
|
161
|
-
SAAS = T.let(:saas, Dodopayments::Models::Product::TaxCategory::TaggedSymbol)
|
162
|
-
E_BOOK = T.let(:e_book, Dodopayments::Models::Product::TaxCategory::TaggedSymbol)
|
163
|
-
EDTECH = T.let(:edtech, Dodopayments::Models::Product::TaxCategory::TaggedSymbol)
|
164
|
-
|
165
|
-
sig { override.returns(T::Array[Dodopayments::Models::Product::TaxCategory::TaggedSymbol]) }
|
166
|
-
def self.values; end
|
167
|
-
end
|
168
151
|
end
|
169
152
|
end
|
170
153
|
end
|
@@ -11,7 +11,7 @@ module Dodopayments
|
|
11
11
|
|
12
12
|
# Represents the different categories of taxation applicable to various products
|
13
13
|
# and services.
|
14
|
-
sig { returns(Dodopayments::Models::
|
14
|
+
sig { returns(Dodopayments::Models::TaxCategory::OrSymbol) }
|
15
15
|
attr_accessor :tax_category
|
16
16
|
|
17
17
|
# Addons available for subscription product
|
@@ -56,7 +56,7 @@ module Dodopayments
|
|
56
56
|
Dodopayments::Internal::AnyHash,
|
57
57
|
Dodopayments::Models::Price::RecurringPrice
|
58
58
|
),
|
59
|
-
tax_category: Dodopayments::Models::
|
59
|
+
tax_category: Dodopayments::Models::TaxCategory::OrSymbol,
|
60
60
|
addons: T.nilable(T::Array[String]),
|
61
61
|
description: T.nilable(String),
|
62
62
|
license_key_activation_message: T.nilable(String),
|
@@ -93,7 +93,7 @@ module Dodopayments
|
|
93
93
|
.returns(
|
94
94
|
{
|
95
95
|
price: T.any(Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice),
|
96
|
-
tax_category: Dodopayments::Models::
|
96
|
+
tax_category: Dodopayments::Models::TaxCategory::OrSymbol,
|
97
97
|
addons: T.nilable(T::Array[String]),
|
98
98
|
description: T.nilable(String),
|
99
99
|
license_key_activation_message: T.nilable(String),
|
@@ -106,24 +106,6 @@ module Dodopayments
|
|
106
106
|
)
|
107
107
|
end
|
108
108
|
def to_hash; end
|
109
|
-
|
110
|
-
# Represents the different categories of taxation applicable to various products
|
111
|
-
# and services.
|
112
|
-
module TaxCategory
|
113
|
-
extend Dodopayments::Internal::Type::Enum
|
114
|
-
|
115
|
-
TaggedSymbol = T.type_alias { T.all(Symbol, Dodopayments::Models::ProductCreateParams::TaxCategory) }
|
116
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
117
|
-
|
118
|
-
DIGITAL_PRODUCTS =
|
119
|
-
T.let(:digital_products, Dodopayments::Models::ProductCreateParams::TaxCategory::TaggedSymbol)
|
120
|
-
SAAS = T.let(:saas, Dodopayments::Models::ProductCreateParams::TaxCategory::TaggedSymbol)
|
121
|
-
E_BOOK = T.let(:e_book, Dodopayments::Models::ProductCreateParams::TaxCategory::TaggedSymbol)
|
122
|
-
EDTECH = T.let(:edtech, Dodopayments::Models::ProductCreateParams::TaxCategory::TaggedSymbol)
|
123
|
-
|
124
|
-
sig { override.returns(T::Array[Dodopayments::Models::ProductCreateParams::TaxCategory::TaggedSymbol]) }
|
125
|
-
def self.values; end
|
126
|
-
end
|
127
109
|
end
|
128
110
|
end
|
129
111
|
end
|
@@ -0,0 +1,153 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class ProductListResponse < Dodopayments::Internal::Type::BaseModel
|
6
|
+
# Unique identifier for the business to which the product belongs.
|
7
|
+
sig { returns(String) }
|
8
|
+
attr_accessor :business_id
|
9
|
+
|
10
|
+
# Timestamp when the product was created.
|
11
|
+
sig { returns(Time) }
|
12
|
+
attr_accessor :created_at
|
13
|
+
|
14
|
+
# Indicates if the product is recurring (e.g., subscriptions).
|
15
|
+
sig { returns(T::Boolean) }
|
16
|
+
attr_accessor :is_recurring
|
17
|
+
|
18
|
+
# Unique identifier for the product.
|
19
|
+
sig { returns(String) }
|
20
|
+
attr_accessor :product_id
|
21
|
+
|
22
|
+
# Represents the different categories of taxation applicable to various products
|
23
|
+
# and services.
|
24
|
+
sig { returns(Dodopayments::Models::TaxCategory::TaggedSymbol) }
|
25
|
+
attr_accessor :tax_category
|
26
|
+
|
27
|
+
# Timestamp when the product was last updated.
|
28
|
+
sig { returns(Time) }
|
29
|
+
attr_accessor :updated_at
|
30
|
+
|
31
|
+
sig { returns(T.nilable(Dodopayments::Models::Currency::TaggedSymbol)) }
|
32
|
+
attr_accessor :currency
|
33
|
+
|
34
|
+
# Description of the product, optional.
|
35
|
+
sig { returns(T.nilable(String)) }
|
36
|
+
attr_accessor :description
|
37
|
+
|
38
|
+
# URL of the product image, optional.
|
39
|
+
sig { returns(T.nilable(String)) }
|
40
|
+
attr_accessor :image
|
41
|
+
|
42
|
+
# Name of the product, optional.
|
43
|
+
sig { returns(T.nilable(String)) }
|
44
|
+
attr_accessor :name
|
45
|
+
|
46
|
+
# Price of the product, optional.
|
47
|
+
#
|
48
|
+
# The price is represented in the lowest denomination of the currency. For
|
49
|
+
# example:
|
50
|
+
#
|
51
|
+
# - In USD, a price of `$12.34` would be represented as `1234` (cents).
|
52
|
+
# - In JPY, a price of `¥1500` would be represented as `1500` (yen).
|
53
|
+
# - In INR, a price of `₹1234.56` would be represented as `123456` (paise).
|
54
|
+
#
|
55
|
+
# This ensures precision and avoids floating-point rounding errors.
|
56
|
+
sig { returns(T.nilable(Integer)) }
|
57
|
+
attr_accessor :price
|
58
|
+
|
59
|
+
sig do
|
60
|
+
returns(
|
61
|
+
T.nilable(T.any(Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice))
|
62
|
+
)
|
63
|
+
end
|
64
|
+
attr_accessor :price_detail
|
65
|
+
|
66
|
+
# Indicates if the price is tax inclusive
|
67
|
+
sig { returns(T.nilable(T::Boolean)) }
|
68
|
+
attr_accessor :tax_inclusive
|
69
|
+
|
70
|
+
sig do
|
71
|
+
params(
|
72
|
+
business_id: String,
|
73
|
+
created_at: Time,
|
74
|
+
is_recurring: T::Boolean,
|
75
|
+
product_id: String,
|
76
|
+
tax_category: Dodopayments::Models::TaxCategory::OrSymbol,
|
77
|
+
updated_at: Time,
|
78
|
+
currency: T.nilable(Dodopayments::Models::Currency::OrSymbol),
|
79
|
+
description: T.nilable(String),
|
80
|
+
image: T.nilable(String),
|
81
|
+
name: T.nilable(String),
|
82
|
+
price: T.nilable(Integer),
|
83
|
+
price_detail: T.nilable(
|
84
|
+
T.any(
|
85
|
+
Dodopayments::Models::Price::OneTimePrice,
|
86
|
+
Dodopayments::Internal::AnyHash,
|
87
|
+
Dodopayments::Models::Price::RecurringPrice
|
88
|
+
)
|
89
|
+
),
|
90
|
+
tax_inclusive: T.nilable(T::Boolean)
|
91
|
+
)
|
92
|
+
.returns(T.attached_class)
|
93
|
+
end
|
94
|
+
def self.new(
|
95
|
+
# Unique identifier for the business to which the product belongs.
|
96
|
+
business_id:,
|
97
|
+
# Timestamp when the product was created.
|
98
|
+
created_at:,
|
99
|
+
# Indicates if the product is recurring (e.g., subscriptions).
|
100
|
+
is_recurring:,
|
101
|
+
# Unique identifier for the product.
|
102
|
+
product_id:,
|
103
|
+
# Represents the different categories of taxation applicable to various products
|
104
|
+
# and services.
|
105
|
+
tax_category:,
|
106
|
+
# Timestamp when the product was last updated.
|
107
|
+
updated_at:,
|
108
|
+
currency: nil,
|
109
|
+
# Description of the product, optional.
|
110
|
+
description: nil,
|
111
|
+
# URL of the product image, optional.
|
112
|
+
image: nil,
|
113
|
+
# Name of the product, optional.
|
114
|
+
name: nil,
|
115
|
+
# Price of the product, optional.
|
116
|
+
#
|
117
|
+
# The price is represented in the lowest denomination of the currency. For
|
118
|
+
# example:
|
119
|
+
#
|
120
|
+
# - In USD, a price of `$12.34` would be represented as `1234` (cents).
|
121
|
+
# - In JPY, a price of `¥1500` would be represented as `1500` (yen).
|
122
|
+
# - In INR, a price of `₹1234.56` would be represented as `123456` (paise).
|
123
|
+
#
|
124
|
+
# This ensures precision and avoids floating-point rounding errors.
|
125
|
+
price: nil,
|
126
|
+
price_detail: nil,
|
127
|
+
# Indicates if the price is tax inclusive
|
128
|
+
tax_inclusive: nil
|
129
|
+
); end
|
130
|
+
sig do
|
131
|
+
override
|
132
|
+
.returns(
|
133
|
+
{
|
134
|
+
business_id: String,
|
135
|
+
created_at: Time,
|
136
|
+
is_recurring: T::Boolean,
|
137
|
+
product_id: String,
|
138
|
+
tax_category: Dodopayments::Models::TaxCategory::TaggedSymbol,
|
139
|
+
updated_at: Time,
|
140
|
+
currency: T.nilable(Dodopayments::Models::Currency::TaggedSymbol),
|
141
|
+
description: T.nilable(String),
|
142
|
+
image: T.nilable(String),
|
143
|
+
name: T.nilable(String),
|
144
|
+
price: T.nilable(Integer),
|
145
|
+
price_detail: T.nilable(T.any(Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice)),
|
146
|
+
tax_inclusive: T.nilable(T::Boolean)
|
147
|
+
}
|
148
|
+
)
|
149
|
+
end
|
150
|
+
def to_hash; end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
@@ -63,7 +63,7 @@ module Dodopayments
|
|
63
63
|
|
64
64
|
# Represents the different categories of taxation applicable to various products
|
65
65
|
# and services.
|
66
|
-
sig { returns(T.nilable(Dodopayments::Models::
|
66
|
+
sig { returns(T.nilable(Dodopayments::Models::TaxCategory::OrSymbol)) }
|
67
67
|
attr_accessor :tax_category
|
68
68
|
|
69
69
|
sig do
|
@@ -83,7 +83,7 @@ module Dodopayments
|
|
83
83
|
Dodopayments::Models::Price::RecurringPrice
|
84
84
|
)
|
85
85
|
),
|
86
|
-
tax_category: T.nilable(Dodopayments::Models::
|
86
|
+
tax_category: T.nilable(Dodopayments::Models::TaxCategory::OrSymbol),
|
87
87
|
request_options: T.any(Dodopayments::RequestOptions, Dodopayments::Internal::AnyHash)
|
88
88
|
)
|
89
89
|
.returns(T.attached_class)
|
@@ -132,30 +132,12 @@ module Dodopayments
|
|
132
132
|
license_key_enabled: T.nilable(T::Boolean),
|
133
133
|
name: T.nilable(String),
|
134
134
|
price: T.nilable(T.any(Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice)),
|
135
|
-
tax_category: T.nilable(Dodopayments::Models::
|
135
|
+
tax_category: T.nilable(Dodopayments::Models::TaxCategory::OrSymbol),
|
136
136
|
request_options: Dodopayments::RequestOptions
|
137
137
|
}
|
138
138
|
)
|
139
139
|
end
|
140
140
|
def to_hash; end
|
141
|
-
|
142
|
-
# Represents the different categories of taxation applicable to various products
|
143
|
-
# and services.
|
144
|
-
module TaxCategory
|
145
|
-
extend Dodopayments::Internal::Type::Enum
|
146
|
-
|
147
|
-
TaggedSymbol = T.type_alias { T.all(Symbol, Dodopayments::Models::ProductUpdateParams::TaxCategory) }
|
148
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
149
|
-
|
150
|
-
DIGITAL_PRODUCTS =
|
151
|
-
T.let(:digital_products, Dodopayments::Models::ProductUpdateParams::TaxCategory::TaggedSymbol)
|
152
|
-
SAAS = T.let(:saas, Dodopayments::Models::ProductUpdateParams::TaxCategory::TaggedSymbol)
|
153
|
-
E_BOOK = T.let(:e_book, Dodopayments::Models::ProductUpdateParams::TaxCategory::TaggedSymbol)
|
154
|
-
EDTECH = T.let(:edtech, Dodopayments::Models::ProductUpdateParams::TaxCategory::TaggedSymbol)
|
155
|
-
|
156
|
-
sig { override.returns(T::Array[Dodopayments::Models::ProductUpdateParams::TaxCategory::TaggedSymbol]) }
|
157
|
-
def self.values; end
|
158
|
-
end
|
159
141
|
end
|
160
142
|
end
|
161
143
|
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class Refund < Dodopayments::Internal::Type::BaseModel
|
6
|
+
# The unique identifier of the business issuing the refund.
|
7
|
+
sig { returns(String) }
|
8
|
+
attr_accessor :business_id
|
9
|
+
|
10
|
+
# The timestamp of when the refund was created in UTC.
|
11
|
+
sig { returns(Time) }
|
12
|
+
attr_accessor :created_at
|
13
|
+
|
14
|
+
# The unique identifier of the payment associated with the refund.
|
15
|
+
sig { returns(String) }
|
16
|
+
attr_accessor :payment_id
|
17
|
+
|
18
|
+
# The unique identifier of the refund.
|
19
|
+
sig { returns(String) }
|
20
|
+
attr_accessor :refund_id
|
21
|
+
|
22
|
+
sig { returns(Dodopayments::Models::RefundStatus::TaggedSymbol) }
|
23
|
+
attr_accessor :status
|
24
|
+
|
25
|
+
# The refunded amount.
|
26
|
+
sig { returns(T.nilable(Integer)) }
|
27
|
+
attr_accessor :amount
|
28
|
+
|
29
|
+
sig { returns(T.nilable(Dodopayments::Models::Currency::TaggedSymbol)) }
|
30
|
+
attr_accessor :currency
|
31
|
+
|
32
|
+
# The reason provided for the refund, if any. Optional.
|
33
|
+
sig { returns(T.nilable(String)) }
|
34
|
+
attr_accessor :reason
|
35
|
+
|
36
|
+
sig do
|
37
|
+
params(
|
38
|
+
business_id: String,
|
39
|
+
created_at: Time,
|
40
|
+
payment_id: String,
|
41
|
+
refund_id: String,
|
42
|
+
status: Dodopayments::Models::RefundStatus::OrSymbol,
|
43
|
+
amount: T.nilable(Integer),
|
44
|
+
currency: T.nilable(Dodopayments::Models::Currency::OrSymbol),
|
45
|
+
reason: T.nilable(String)
|
46
|
+
)
|
47
|
+
.returns(T.attached_class)
|
48
|
+
end
|
49
|
+
def self.new(
|
50
|
+
# The unique identifier of the business issuing the refund.
|
51
|
+
business_id:,
|
52
|
+
# The timestamp of when the refund was created in UTC.
|
53
|
+
created_at:,
|
54
|
+
# The unique identifier of the payment associated with the refund.
|
55
|
+
payment_id:,
|
56
|
+
# The unique identifier of the refund.
|
57
|
+
refund_id:,
|
58
|
+
status:,
|
59
|
+
# The refunded amount.
|
60
|
+
amount: nil,
|
61
|
+
currency: nil,
|
62
|
+
# The reason provided for the refund, if any. Optional.
|
63
|
+
reason: nil
|
64
|
+
); end
|
65
|
+
sig do
|
66
|
+
override
|
67
|
+
.returns(
|
68
|
+
{
|
69
|
+
business_id: String,
|
70
|
+
created_at: Time,
|
71
|
+
payment_id: String,
|
72
|
+
refund_id: String,
|
73
|
+
status: Dodopayments::Models::RefundStatus::TaggedSymbol,
|
74
|
+
amount: T.nilable(Integer),
|
75
|
+
currency: T.nilable(Dodopayments::Models::Currency::TaggedSymbol),
|
76
|
+
reason: T.nilable(String)
|
77
|
+
}
|
78
|
+
)
|
79
|
+
end
|
80
|
+
def to_hash; end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|