dodopayments 2.0.0 → 2.1.1
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 +17 -0
- data/README.md +3 -3
- data/lib/dodopayments/models/addon_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/addon_update_images_params.rb +7 -1
- data/lib/dodopayments/models/addon_update_params.rb +8 -1
- data/lib/dodopayments/models/brand_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/brand_update_images_params.rb +7 -1
- data/lib/dodopayments/models/brand_update_params.rb +8 -1
- data/lib/dodopayments/models/checkout_session_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/credit_entitlement_delete_params.rb +7 -1
- data/lib/dodopayments/models/credit_entitlement_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/credit_entitlement_undelete_params.rb +7 -1
- data/lib/dodopayments/models/credit_entitlement_update_params.rb +8 -1
- data/lib/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rb +8 -1
- data/lib/dodopayments/models/credit_entitlements/balance_list_grants_params.rb +8 -1
- data/lib/dodopayments/models/credit_entitlements/balance_list_ledger_params.rb +8 -1
- data/lib/dodopayments/models/credit_entitlements/balance_list_params.rb +8 -1
- data/lib/dodopayments/models/credit_entitlements/balance_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/customer_list_credit_entitlements_params.rb +7 -1
- data/lib/dodopayments/models/customer_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/customer_retrieve_payment_methods_params.rb +7 -1
- data/lib/dodopayments/models/customer_update_params.rb +8 -1
- data/lib/dodopayments/models/customers/customer_portal_create_params.rb +8 -1
- data/lib/dodopayments/models/customers/wallet_list_params.rb +7 -1
- data/lib/dodopayments/models/customers/wallets/ledger_entry_create_params.rb +8 -1
- data/lib/dodopayments/models/customers/wallets/ledger_entry_list_params.rb +8 -1
- data/lib/dodopayments/models/discount.rb +10 -1
- data/lib/dodopayments/models/discount_create_params.rb +10 -1
- data/lib/dodopayments/models/discount_delete_params.rb +7 -1
- data/lib/dodopayments/models/discount_retrieve_by_code_params.rb +7 -1
- data/lib/dodopayments/models/discount_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/discount_update_params.rb +17 -1
- data/lib/dodopayments/models/dispute_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/invoices/payment_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/invoices/payment_retrieve_refund_params.rb +7 -1
- data/lib/dodopayments/models/license_key_instance_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/license_key_instance_update_params.rb +7 -1
- data/lib/dodopayments/models/license_key_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/license_key_update_params.rb +8 -1
- data/lib/dodopayments/models/meter_archive_params.rb +7 -1
- data/lib/dodopayments/models/meter_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/meter_unarchive_params.rb +7 -1
- data/lib/dodopayments/models/payment_retrieve_line_items_params.rb +7 -1
- data/lib/dodopayments/models/payment_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/product_archive_params.rb +7 -1
- data/lib/dodopayments/models/product_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/product_unarchive_params.rb +7 -1
- data/lib/dodopayments/models/product_update_files_params.rb +7 -1
- data/lib/dodopayments/models/product_update_params.rb +8 -1
- data/lib/dodopayments/models/products/image_update_params.rb +7 -1
- data/lib/dodopayments/models/products/short_link_create_params.rb +8 -1
- data/lib/dodopayments/models/refund_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/subscription_change_plan_params.rb +7 -1
- data/lib/dodopayments/models/subscription_charge_params.rb +8 -1
- data/lib/dodopayments/models/subscription_preview_change_plan_params.rb +7 -1
- data/lib/dodopayments/models/subscription_retrieve_credit_usage_params.rb +7 -1
- data/lib/dodopayments/models/subscription_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/subscription_retrieve_usage_history_params.rb +8 -1
- data/lib/dodopayments/models/subscription_update_params.rb +8 -1
- data/lib/dodopayments/models/subscription_update_payment_method_params.rb +68 -20
- data/lib/dodopayments/models/update_subscription_plan_req.rb +12 -1
- data/lib/dodopayments/models/usage_event_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/webhook_delete_params.rb +7 -1
- data/lib/dodopayments/models/webhook_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/webhook_retrieve_secret_params.rb +7 -1
- data/lib/dodopayments/models/webhook_update_params.rb +8 -1
- data/lib/dodopayments/models/webhooks/header_retrieve_params.rb +7 -1
- data/lib/dodopayments/models/webhooks/header_update_params.rb +8 -1
- data/lib/dodopayments/resources/discounts.rb +6 -2
- data/lib/dodopayments/resources/subscriptions.rb +9 -9
- data/lib/dodopayments/version.rb +1 -1
- data/rbi/dodopayments/models/addon_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/addon_update_images_params.rbi +11 -5
- data/rbi/dodopayments/models/addon_update_params.rbi +6 -0
- data/rbi/dodopayments/models/brand_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/brand_update_images_params.rbi +11 -5
- data/rbi/dodopayments/models/brand_update_params.rbi +6 -0
- data/rbi/dodopayments/models/checkout_session_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/credit_entitlement_delete_params.rbi +11 -5
- data/rbi/dodopayments/models/credit_entitlement_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/credit_entitlement_undelete_params.rbi +11 -5
- data/rbi/dodopayments/models/credit_entitlement_update_params.rbi +6 -0
- data/rbi/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rbi +6 -0
- data/rbi/dodopayments/models/credit_entitlements/balance_list_grants_params.rbi +6 -0
- data/rbi/dodopayments/models/credit_entitlements/balance_list_ledger_params.rbi +6 -0
- data/rbi/dodopayments/models/credit_entitlements/balance_list_params.rbi +6 -0
- data/rbi/dodopayments/models/credit_entitlements/balance_retrieve_params.rbi +6 -1
- data/rbi/dodopayments/models/customer_list_credit_entitlements_params.rbi +11 -5
- data/rbi/dodopayments/models/customer_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/customer_retrieve_payment_methods_params.rbi +11 -5
- data/rbi/dodopayments/models/customer_update_params.rbi +6 -0
- data/rbi/dodopayments/models/customers/customer_portal_create_params.rbi +6 -0
- data/rbi/dodopayments/models/customers/wallet_list_params.rbi +14 -5
- data/rbi/dodopayments/models/customers/wallets/ledger_entry_create_params.rbi +6 -0
- data/rbi/dodopayments/models/customers/wallets/ledger_entry_list_params.rbi +6 -0
- data/rbi/dodopayments/models/discount.rbi +10 -0
- data/rbi/dodopayments/models/discount_create_params.rbi +13 -0
- data/rbi/dodopayments/models/discount_delete_params.rbi +11 -5
- data/rbi/dodopayments/models/discount_retrieve_by_code_params.rbi +11 -5
- data/rbi/dodopayments/models/discount_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/discount_update_params.rbi +16 -0
- data/rbi/dodopayments/models/dispute_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/invoices/payment_retrieve_params.rbi +14 -5
- data/rbi/dodopayments/models/invoices/payment_retrieve_refund_params.rbi +11 -5
- data/rbi/dodopayments/models/license_key_instance_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/license_key_instance_update_params.rbi +10 -2
- data/rbi/dodopayments/models/license_key_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/license_key_update_params.rbi +6 -0
- data/rbi/dodopayments/models/meter_archive_params.rbi +11 -5
- data/rbi/dodopayments/models/meter_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/meter_unarchive_params.rbi +11 -5
- data/rbi/dodopayments/models/payment_retrieve_line_items_params.rbi +11 -5
- data/rbi/dodopayments/models/payment_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/product_archive_params.rbi +11 -5
- data/rbi/dodopayments/models/product_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/product_unarchive_params.rbi +11 -5
- data/rbi/dodopayments/models/product_update_files_params.rbi +10 -2
- data/rbi/dodopayments/models/product_update_params.rbi +6 -0
- data/rbi/dodopayments/models/products/image_update_params.rbi +6 -1
- data/rbi/dodopayments/models/products/short_link_create_params.rbi +6 -0
- data/rbi/dodopayments/models/refund_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/subscription_change_plan_params.rbi +14 -5
- data/rbi/dodopayments/models/subscription_charge_params.rbi +6 -0
- data/rbi/dodopayments/models/subscription_preview_change_plan_params.rbi +14 -5
- data/rbi/dodopayments/models/subscription_retrieve_credit_usage_params.rbi +14 -5
- data/rbi/dodopayments/models/subscription_retrieve_params.rbi +14 -5
- data/rbi/dodopayments/models/subscription_retrieve_usage_history_params.rbi +6 -0
- data/rbi/dodopayments/models/subscription_update_params.rbi +6 -0
- data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +170 -36
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +14 -0
- data/rbi/dodopayments/models/usage_event_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/webhook_delete_params.rbi +11 -5
- data/rbi/dodopayments/models/webhook_retrieve_params.rbi +11 -5
- data/rbi/dodopayments/models/webhook_retrieve_secret_params.rbi +11 -5
- data/rbi/dodopayments/models/webhook_update_params.rbi +6 -0
- data/rbi/dodopayments/models/webhooks/header_retrieve_params.rbi +14 -5
- data/rbi/dodopayments/models/webhooks/header_update_params.rbi +6 -0
- data/rbi/dodopayments/resources/discounts.rbi +8 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +18 -7
- data/sig/dodopayments/models/addon_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/addon_update_images_params.rbs +11 -3
- data/sig/dodopayments/models/addon_update_params.rbs +5 -0
- data/sig/dodopayments/models/brand_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/brand_update_images_params.rbs +11 -3
- data/sig/dodopayments/models/brand_update_params.rbs +5 -0
- data/sig/dodopayments/models/checkout_session_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/credit_entitlement_delete_params.rbs +11 -3
- data/sig/dodopayments/models/credit_entitlement_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/credit_entitlement_undelete_params.rbs +11 -3
- data/sig/dodopayments/models/credit_entitlement_update_params.rbs +5 -0
- data/sig/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rbs +5 -0
- data/sig/dodopayments/models/credit_entitlements/balance_list_grants_params.rbs +5 -0
- data/sig/dodopayments/models/credit_entitlements/balance_list_ledger_params.rbs +5 -0
- data/sig/dodopayments/models/credit_entitlements/balance_list_params.rbs +10 -1
- data/sig/dodopayments/models/credit_entitlements/balance_retrieve_params.rbs +5 -1
- data/sig/dodopayments/models/customer_list_credit_entitlements_params.rbs +11 -3
- data/sig/dodopayments/models/customer_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/customer_retrieve_payment_methods_params.rbs +11 -3
- data/sig/dodopayments/models/customer_update_params.rbs +5 -0
- data/sig/dodopayments/models/customers/customer_portal_create_params.rbs +6 -1
- data/sig/dodopayments/models/customers/wallet_list_params.rbs +12 -3
- data/sig/dodopayments/models/customers/wallets/ledger_entry_create_params.rbs +5 -0
- data/sig/dodopayments/models/customers/wallets/ledger_entry_list_params.rbs +5 -0
- data/sig/dodopayments/models/discount.rbs +5 -0
- data/sig/dodopayments/models/discount_create_params.rbs +7 -0
- data/sig/dodopayments/models/discount_delete_params.rbs +11 -3
- data/sig/dodopayments/models/discount_retrieve_by_code_params.rbs +11 -3
- data/sig/dodopayments/models/discount_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/discount_update_params.rbs +10 -0
- data/sig/dodopayments/models/dispute_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/invoices/payment_retrieve_params.rbs +12 -3
- data/sig/dodopayments/models/invoices/payment_retrieve_refund_params.rbs +11 -3
- data/sig/dodopayments/models/license_key_instance_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/license_key_instance_update_params.rbs +6 -1
- data/sig/dodopayments/models/license_key_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/license_key_update_params.rbs +10 -1
- data/sig/dodopayments/models/meter_archive_params.rbs +11 -3
- data/sig/dodopayments/models/meter_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/meter_unarchive_params.rbs +11 -3
- data/sig/dodopayments/models/payment_retrieve_line_items_params.rbs +11 -3
- data/sig/dodopayments/models/payment_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/product_archive_params.rbs +11 -3
- data/sig/dodopayments/models/product_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/product_unarchive_params.rbs +11 -3
- data/sig/dodopayments/models/product_update_files_params.rbs +6 -1
- data/sig/dodopayments/models/product_update_params.rbs +5 -0
- data/sig/dodopayments/models/products/image_update_params.rbs +5 -1
- data/sig/dodopayments/models/products/short_link_create_params.rbs +9 -1
- data/sig/dodopayments/models/refund_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/subscription_change_plan_params.rbs +14 -3
- data/sig/dodopayments/models/subscription_charge_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_preview_change_plan_params.rbs +14 -3
- data/sig/dodopayments/models/subscription_retrieve_credit_usage_params.rbs +12 -3
- data/sig/dodopayments/models/subscription_retrieve_params.rbs +12 -3
- data/sig/dodopayments/models/subscription_retrieve_usage_history_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_update_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +77 -18
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +5 -0
- data/sig/dodopayments/models/usage_event_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/webhook_delete_params.rbs +11 -3
- data/sig/dodopayments/models/webhook_retrieve_params.rbs +11 -3
- data/sig/dodopayments/models/webhook_retrieve_secret_params.rbs +11 -3
- data/sig/dodopayments/models/webhook_update_params.rbs +5 -0
- data/sig/dodopayments/models/webhooks/header_retrieve_params.rbs +12 -3
- data/sig/dodopayments/models/webhooks/header_update_params.rbs +5 -1
- data/sig/dodopayments/resources/discounts.rbs +2 -0
- data/sig/dodopayments/resources/subscriptions.rbs +3 -3
- metadata +2 -2
|
@@ -7,34 +7,82 @@ module Dodopayments
|
|
|
7
7
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!attribute
|
|
10
|
+
# @!attribute subscription_id
|
|
11
11
|
#
|
|
12
|
-
# @return [
|
|
13
|
-
required :
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :subscription_id, String
|
|
14
14
|
|
|
15
|
-
# @!attribute
|
|
15
|
+
# @!attribute body
|
|
16
16
|
#
|
|
17
|
-
# @return [
|
|
18
|
-
|
|
17
|
+
# @return [Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::Existing]
|
|
18
|
+
required :body, union: -> { Dodopayments::SubscriptionUpdatePaymentMethodParams::Body }
|
|
19
19
|
|
|
20
|
-
# @!
|
|
21
|
-
#
|
|
22
|
-
# @
|
|
23
|
-
required :payment_method_id, String
|
|
24
|
-
|
|
25
|
-
# @!method initialize(type:, payment_method_id:, return_url: nil, request_options: {})
|
|
26
|
-
# @param type [Symbol, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Type]
|
|
27
|
-
# @param payment_method_id [String]
|
|
28
|
-
# @param return_url [String, nil]
|
|
20
|
+
# @!method initialize(subscription_id:, body:, request_options: {})
|
|
21
|
+
# @param subscription_id [String]
|
|
22
|
+
# @param body [Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::Existing]
|
|
29
23
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
30
24
|
|
|
31
|
-
module
|
|
32
|
-
extend Dodopayments::Internal::Type::
|
|
25
|
+
module Body
|
|
26
|
+
extend Dodopayments::Internal::Type::Union
|
|
27
|
+
|
|
28
|
+
variant -> { Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New }
|
|
29
|
+
|
|
30
|
+
variant -> { Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing }
|
|
31
|
+
|
|
32
|
+
class New < Dodopayments::Internal::Type::BaseModel
|
|
33
|
+
# @!attribute type
|
|
34
|
+
#
|
|
35
|
+
# @return [Symbol, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New::Type]
|
|
36
|
+
required :type, enum: -> { Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New::Type }
|
|
37
|
+
|
|
38
|
+
# @!attribute return_url
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :return_url, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!method initialize(type:, return_url: nil)
|
|
44
|
+
# @param type [Symbol, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New::Type]
|
|
45
|
+
# @param return_url [String, nil]
|
|
46
|
+
|
|
47
|
+
# @see Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New#type
|
|
48
|
+
module Type
|
|
49
|
+
extend Dodopayments::Internal::Type::Enum
|
|
50
|
+
|
|
51
|
+
NEW = :new
|
|
52
|
+
|
|
53
|
+
# @!method self.values
|
|
54
|
+
# @return [Array<Symbol>]
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
class Existing < Dodopayments::Internal::Type::BaseModel
|
|
59
|
+
# @!attribute payment_method_id
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
required :payment_method_id, String
|
|
63
|
+
|
|
64
|
+
# @!attribute type
|
|
65
|
+
#
|
|
66
|
+
# @return [Symbol, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::Existing::Type]
|
|
67
|
+
required :type, enum: -> { Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing::Type }
|
|
68
|
+
|
|
69
|
+
# @!method initialize(payment_method_id:, type:)
|
|
70
|
+
# @param payment_method_id [String]
|
|
71
|
+
# @param type [Symbol, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::Existing::Type]
|
|
72
|
+
|
|
73
|
+
# @see Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::Existing#type
|
|
74
|
+
module Type
|
|
75
|
+
extend Dodopayments::Internal::Type::Enum
|
|
76
|
+
|
|
77
|
+
EXISTING = :existing
|
|
33
78
|
|
|
34
|
-
|
|
79
|
+
# @!method self.values
|
|
80
|
+
# @return [Array<Symbol>]
|
|
81
|
+
end
|
|
82
|
+
end
|
|
35
83
|
|
|
36
|
-
# @!method self.
|
|
37
|
-
# @return [Array
|
|
84
|
+
# @!method self.variants
|
|
85
|
+
# @return [Array(Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::Existing)]
|
|
38
86
|
end
|
|
39
87
|
end
|
|
40
88
|
end
|
|
@@ -29,6 +29,15 @@ module Dodopayments
|
|
|
29
29
|
# @return [Array<Dodopayments::Models::AttachAddon>, nil]
|
|
30
30
|
optional :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AttachAddon] }, nil?: true
|
|
31
31
|
|
|
32
|
+
# @!attribute discount_code
|
|
33
|
+
# Optional discount code to apply to the new plan. If provided, validates and
|
|
34
|
+
# applies the discount to the plan change. If not provided and the subscription
|
|
35
|
+
# has an existing discount with `preserve_on_plan_change=true`, the existing
|
|
36
|
+
# discount will be preserved (if applicable to the new product).
|
|
37
|
+
#
|
|
38
|
+
# @return [String, nil]
|
|
39
|
+
optional :discount_code, String, nil?: true
|
|
40
|
+
|
|
32
41
|
# @!attribute metadata
|
|
33
42
|
# Metadata for the payment. If not passed, the metadata of the subscription will
|
|
34
43
|
# be taken
|
|
@@ -50,7 +59,7 @@ module Dodopayments
|
|
|
50
59
|
enum: -> { Dodopayments::UpdateSubscriptionPlanReq::OnPaymentFailure },
|
|
51
60
|
nil?: true
|
|
52
61
|
|
|
53
|
-
# @!method initialize(product_id:, proration_billing_mode:, quantity:, addons: nil, metadata: nil, on_payment_failure: nil)
|
|
62
|
+
# @!method initialize(product_id:, proration_billing_mode:, quantity:, addons: nil, discount_code: nil, metadata: nil, on_payment_failure: nil)
|
|
54
63
|
# Some parameter documentations has been truncated, see
|
|
55
64
|
# {Dodopayments::Models::UpdateSubscriptionPlanReq} for more details.
|
|
56
65
|
#
|
|
@@ -62,6 +71,8 @@ module Dodopayments
|
|
|
62
71
|
#
|
|
63
72
|
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
|
|
64
73
|
#
|
|
74
|
+
# @param discount_code [String, nil] Optional discount code to apply to the new plan.
|
|
75
|
+
#
|
|
65
76
|
# @param metadata [Hash{Symbol=>String}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
66
77
|
#
|
|
67
78
|
# @param on_payment_failure [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::OnPaymentFailure, nil] Controls behavior when the plan change payment fails.
|
|
@@ -7,7 +7,13 @@ module Dodopayments
|
|
|
7
7
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute event_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :event_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(event_id:, request_options: {})
|
|
16
|
+
# @param event_id [String]
|
|
11
17
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,7 +7,13 @@ module Dodopayments
|
|
|
7
7
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute webhook_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(webhook_id:, request_options: {})
|
|
16
|
+
# @param webhook_id [String]
|
|
11
17
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,7 +7,13 @@ module Dodopayments
|
|
|
7
7
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute webhook_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(webhook_id:, request_options: {})
|
|
16
|
+
# @param webhook_id [String]
|
|
11
17
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,7 +7,13 @@ module Dodopayments
|
|
|
7
7
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute webhook_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(webhook_id:, request_options: {})
|
|
16
|
+
# @param webhook_id [String]
|
|
11
17
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,6 +7,11 @@ module Dodopayments
|
|
|
7
7
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Dodopayments::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute webhook_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_id, String
|
|
14
|
+
|
|
10
15
|
# @!attribute description
|
|
11
16
|
# Description of the webhook
|
|
12
17
|
#
|
|
@@ -47,10 +52,12 @@ module Dodopayments
|
|
|
47
52
|
# @return [String, nil]
|
|
48
53
|
optional :url, String, nil?: true
|
|
49
54
|
|
|
50
|
-
# @!method initialize(description: nil, disabled: nil, filter_types: nil, metadata: nil, rate_limit: nil, url: nil, request_options: {})
|
|
55
|
+
# @!method initialize(webhook_id:, description: nil, disabled: nil, filter_types: nil, metadata: nil, rate_limit: nil, url: nil, request_options: {})
|
|
51
56
|
# Some parameter documentations has been truncated, see
|
|
52
57
|
# {Dodopayments::Models::WebhookUpdateParams} for more details.
|
|
53
58
|
#
|
|
59
|
+
# @param webhook_id [String]
|
|
60
|
+
#
|
|
54
61
|
# @param description [String, nil] Description of the webhook
|
|
55
62
|
#
|
|
56
63
|
# @param disabled [Boolean, nil] To Disable the endpoint, set it to true.
|
|
@@ -8,7 +8,13 @@ module Dodopayments
|
|
|
8
8
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Dodopayments::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!
|
|
11
|
+
# @!attribute webhook_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :webhook_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(webhook_id:, request_options: {})
|
|
17
|
+
# @param webhook_id [String]
|
|
12
18
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
13
19
|
end
|
|
14
20
|
end
|
|
@@ -8,13 +8,20 @@ module Dodopayments
|
|
|
8
8
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Dodopayments::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
+
# @!attribute webhook_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :webhook_id, String
|
|
15
|
+
|
|
11
16
|
# @!attribute headers
|
|
12
17
|
# Object of header-value pair to update or add
|
|
13
18
|
#
|
|
14
19
|
# @return [Hash{Symbol=>String}]
|
|
15
20
|
required :headers, Dodopayments::Internal::Type::HashOf[String]
|
|
16
21
|
|
|
17
|
-
# @!method initialize(headers:, request_options: {})
|
|
22
|
+
# @!method initialize(webhook_id:, headers:, request_options: {})
|
|
23
|
+
# @param webhook_id [String]
|
|
24
|
+
#
|
|
18
25
|
# @param headers [Hash{Symbol=>String}] Object of header-value pair to update or add
|
|
19
26
|
#
|
|
20
27
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -9,7 +9,7 @@ module Dodopayments
|
|
|
9
9
|
# POST /discounts If `code` is omitted or empty, a random 16-char uppercase code
|
|
10
10
|
# is generated.
|
|
11
11
|
#
|
|
12
|
-
# @overload create(amount:, type:, code: nil, expires_at: nil, name: nil, restricted_to: nil, subscription_cycles: nil, usage_limit: nil, request_options: {})
|
|
12
|
+
# @overload create(amount:, type:, code: nil, expires_at: nil, name: nil, preserve_on_plan_change: nil, restricted_to: nil, subscription_cycles: nil, usage_limit: nil, request_options: {})
|
|
13
13
|
#
|
|
14
14
|
# @param amount [Integer] The discount amount.
|
|
15
15
|
#
|
|
@@ -21,6 +21,8 @@ module Dodopayments
|
|
|
21
21
|
#
|
|
22
22
|
# @param name [String, nil]
|
|
23
23
|
#
|
|
24
|
+
# @param preserve_on_plan_change [Boolean] Whether this discount should be preserved when a subscription changes plans.
|
|
25
|
+
#
|
|
24
26
|
# @param restricted_to [Array<String>, nil] List of product IDs to restrict usage (if any).
|
|
25
27
|
#
|
|
26
28
|
# @param subscription_cycles [Integer, nil] Number of subscription billing cycles this discount is valid for.
|
|
@@ -68,7 +70,7 @@ module Dodopayments
|
|
|
68
70
|
#
|
|
69
71
|
# PATCH /discounts/{discount_id}
|
|
70
72
|
#
|
|
71
|
-
# @overload update(discount_id, amount: nil, code: nil, expires_at: nil, name: nil, restricted_to: nil, subscription_cycles: nil, type: nil, usage_limit: nil, request_options: {})
|
|
73
|
+
# @overload update(discount_id, amount: nil, code: nil, expires_at: nil, name: nil, preserve_on_plan_change: nil, restricted_to: nil, subscription_cycles: nil, type: nil, usage_limit: nil, request_options: {})
|
|
72
74
|
#
|
|
73
75
|
# @param discount_id [String] Discount Id
|
|
74
76
|
#
|
|
@@ -80,6 +82,8 @@ module Dodopayments
|
|
|
80
82
|
#
|
|
81
83
|
# @param name [String, nil]
|
|
82
84
|
#
|
|
85
|
+
# @param preserve_on_plan_change [Boolean, nil] Whether this discount should be preserved when a subscription changes plans.
|
|
86
|
+
#
|
|
83
87
|
# @param restricted_to [Array<String>, nil] If present, replaces all restricted product IDs with this new set.
|
|
84
88
|
#
|
|
85
89
|
# @param subscription_cycles [Integer, nil] Number of subscription billing cycles this discount is valid for.
|
|
@@ -161,7 +161,7 @@ module Dodopayments
|
|
|
161
161
|
# Some parameter documentations has been truncated, see
|
|
162
162
|
# {Dodopayments::Models::SubscriptionChangePlanParams} for more details.
|
|
163
163
|
#
|
|
164
|
-
# @overload change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, addons: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
164
|
+
# @overload change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, addons: nil, discount_code: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
165
165
|
#
|
|
166
166
|
# @param subscription_id [String] Subscription Id
|
|
167
167
|
#
|
|
@@ -173,6 +173,8 @@ module Dodopayments
|
|
|
173
173
|
#
|
|
174
174
|
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
|
|
175
175
|
#
|
|
176
|
+
# @param discount_code [String, nil] Optional discount code to apply to the new plan.
|
|
177
|
+
#
|
|
176
178
|
# @param metadata [Hash{Symbol=>String}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
177
179
|
#
|
|
178
180
|
# @param on_payment_failure [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::OnPaymentFailure, nil] Controls behavior when the plan change payment fails.
|
|
@@ -231,7 +233,7 @@ module Dodopayments
|
|
|
231
233
|
# Some parameter documentations has been truncated, see
|
|
232
234
|
# {Dodopayments::Models::SubscriptionPreviewChangePlanParams} for more details.
|
|
233
235
|
#
|
|
234
|
-
# @overload preview_change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, addons: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
236
|
+
# @overload preview_change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, addons: nil, discount_code: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
235
237
|
#
|
|
236
238
|
# @param subscription_id [String] Subscription Id
|
|
237
239
|
#
|
|
@@ -243,6 +245,8 @@ module Dodopayments
|
|
|
243
245
|
#
|
|
244
246
|
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
|
|
245
247
|
#
|
|
248
|
+
# @param discount_code [String, nil] Optional discount code to apply to the new plan.
|
|
249
|
+
#
|
|
246
250
|
# @param metadata [Hash{Symbol=>String}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
247
251
|
#
|
|
248
252
|
# @param on_payment_failure [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::OnPaymentFailure, nil] Controls behavior when the plan change payment fails.
|
|
@@ -356,15 +360,11 @@ module Dodopayments
|
|
|
356
360
|
)
|
|
357
361
|
end
|
|
358
362
|
|
|
359
|
-
# @overload update_payment_method(subscription_id,
|
|
363
|
+
# @overload update_payment_method(subscription_id, body:, request_options: {})
|
|
360
364
|
#
|
|
361
365
|
# @param subscription_id [String] Subscription Id
|
|
362
366
|
#
|
|
363
|
-
# @param
|
|
364
|
-
#
|
|
365
|
-
# @param payment_method_id [String]
|
|
366
|
-
#
|
|
367
|
-
# @param return_url [String, nil]
|
|
367
|
+
# @param body [Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::Existing]
|
|
368
368
|
#
|
|
369
369
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
370
370
|
#
|
|
@@ -376,7 +376,7 @@ module Dodopayments
|
|
|
376
376
|
@client.request(
|
|
377
377
|
method: :post,
|
|
378
378
|
path: ["subscriptions/%1$s/update-payment-method", subscription_id],
|
|
379
|
-
body: parsed,
|
|
379
|
+
body: parsed[:body],
|
|
380
380
|
model: Dodopayments::Models::SubscriptionUpdatePaymentMethodResponse,
|
|
381
381
|
options: options
|
|
382
382
|
)
|
data/lib/dodopayments/version.rb
CHANGED
|
@@ -14,16 +14,22 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
+
)
|
|
27
33
|
end
|
|
28
34
|
def to_hash
|
|
29
35
|
end
|
|
@@ -14,16 +14,22 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
+
)
|
|
27
33
|
end
|
|
28
34
|
def to_hash
|
|
29
35
|
end
|
|
@@ -14,6 +14,9 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
# The currency of the Addon
|
|
18
21
|
sig { returns(T.nilable(Dodopayments::Currency::OrSymbol)) }
|
|
19
22
|
attr_accessor :currency
|
|
@@ -40,6 +43,7 @@ module Dodopayments
|
|
|
40
43
|
|
|
41
44
|
sig do
|
|
42
45
|
params(
|
|
46
|
+
id: String,
|
|
43
47
|
currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
44
48
|
description: T.nilable(String),
|
|
45
49
|
image_id: T.nilable(String),
|
|
@@ -50,6 +54,7 @@ module Dodopayments
|
|
|
50
54
|
).returns(T.attached_class)
|
|
51
55
|
end
|
|
52
56
|
def self.new(
|
|
57
|
+
id:,
|
|
53
58
|
# The currency of the Addon
|
|
54
59
|
currency: nil,
|
|
55
60
|
# Description of the Addon, optional and must be at most 1000 characters.
|
|
@@ -69,6 +74,7 @@ module Dodopayments
|
|
|
69
74
|
sig do
|
|
70
75
|
override.returns(
|
|
71
76
|
{
|
|
77
|
+
id: String,
|
|
72
78
|
currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
73
79
|
description: T.nilable(String),
|
|
74
80
|
image_id: T.nilable(String),
|
|
@@ -14,16 +14,22 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
+
)
|
|
27
33
|
end
|
|
28
34
|
def to_hash
|
|
29
35
|
end
|
|
@@ -14,16 +14,22 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
+
)
|
|
27
33
|
end
|
|
28
34
|
def to_hash
|
|
29
35
|
end
|
|
@@ -14,6 +14,9 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig { returns(T.nilable(String)) }
|
|
18
21
|
attr_accessor :description
|
|
19
22
|
|
|
@@ -35,6 +38,7 @@ module Dodopayments
|
|
|
35
38
|
|
|
36
39
|
sig do
|
|
37
40
|
params(
|
|
41
|
+
id: String,
|
|
38
42
|
description: T.nilable(String),
|
|
39
43
|
image_id: T.nilable(String),
|
|
40
44
|
name: T.nilable(String),
|
|
@@ -45,6 +49,7 @@ module Dodopayments
|
|
|
45
49
|
).returns(T.attached_class)
|
|
46
50
|
end
|
|
47
51
|
def self.new(
|
|
52
|
+
id:,
|
|
48
53
|
description: nil,
|
|
49
54
|
# The UUID you got back from the presigned‐upload call
|
|
50
55
|
image_id: nil,
|
|
@@ -59,6 +64,7 @@ module Dodopayments
|
|
|
59
64
|
sig do
|
|
60
65
|
override.returns(
|
|
61
66
|
{
|
|
67
|
+
id: String,
|
|
62
68
|
description: T.nilable(String),
|
|
63
69
|
image_id: T.nilable(String),
|
|
64
70
|
name: T.nilable(String),
|
|
@@ -14,16 +14,22 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
+
)
|
|
27
33
|
end
|
|
28
34
|
def to_hash
|
|
29
35
|
end
|
|
@@ -14,16 +14,22 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
+
)
|
|
27
33
|
end
|
|
28
34
|
def to_hash
|
|
29
35
|
end
|
|
@@ -14,16 +14,22 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
+
)
|
|
27
33
|
end
|
|
28
34
|
def to_hash
|
|
29
35
|
end
|
|
@@ -14,16 +14,22 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
id: String,
|
|
23
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
+
)
|
|
27
33
|
end
|
|
28
34
|
def to_hash
|
|
29
35
|
end
|