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
|
@@ -14,16 +14,25 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :subscription_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
subscription_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(subscription_id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{
|
|
32
|
+
subscription_id: String,
|
|
33
|
+
request_options: Dodopayments::RequestOptions
|
|
34
|
+
}
|
|
35
|
+
)
|
|
27
36
|
end
|
|
28
37
|
def to_hash
|
|
29
38
|
end
|
|
@@ -14,16 +14,25 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :subscription_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
subscription_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(subscription_id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{
|
|
32
|
+
subscription_id: String,
|
|
33
|
+
request_options: Dodopayments::RequestOptions
|
|
34
|
+
}
|
|
35
|
+
)
|
|
27
36
|
end
|
|
28
37
|
def to_hash
|
|
29
38
|
end
|
|
@@ -14,16 +14,25 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :subscription_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
subscription_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(subscription_id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{
|
|
32
|
+
subscription_id: String,
|
|
33
|
+
request_options: Dodopayments::RequestOptions
|
|
34
|
+
}
|
|
35
|
+
)
|
|
27
36
|
end
|
|
28
37
|
def to_hash
|
|
29
38
|
end
|
|
@@ -14,6 +14,9 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :subscription_id
|
|
19
|
+
|
|
17
20
|
# Filter by end date (inclusive)
|
|
18
21
|
sig { returns(T.nilable(Time)) }
|
|
19
22
|
attr_accessor :end_date
|
|
@@ -36,6 +39,7 @@ module Dodopayments
|
|
|
36
39
|
|
|
37
40
|
sig do
|
|
38
41
|
params(
|
|
42
|
+
subscription_id: String,
|
|
39
43
|
end_date: T.nilable(Time),
|
|
40
44
|
meter_id: T.nilable(String),
|
|
41
45
|
page_number: T.nilable(Integer),
|
|
@@ -45,6 +49,7 @@ module Dodopayments
|
|
|
45
49
|
).returns(T.attached_class)
|
|
46
50
|
end
|
|
47
51
|
def self.new(
|
|
52
|
+
subscription_id:,
|
|
48
53
|
# Filter by end date (inclusive)
|
|
49
54
|
end_date: nil,
|
|
50
55
|
# Filter by specific meter ID
|
|
@@ -62,6 +67,7 @@ module Dodopayments
|
|
|
62
67
|
sig do
|
|
63
68
|
override.returns(
|
|
64
69
|
{
|
|
70
|
+
subscription_id: String,
|
|
65
71
|
end_date: T.nilable(Time),
|
|
66
72
|
meter_id: T.nilable(String),
|
|
67
73
|
page_number: T.nilable(Integer),
|
|
@@ -14,6 +14,9 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :subscription_id
|
|
19
|
+
|
|
17
20
|
sig { returns(T.nilable(Dodopayments::BillingAddress)) }
|
|
18
21
|
attr_reader :billing
|
|
19
22
|
|
|
@@ -72,6 +75,7 @@ module Dodopayments
|
|
|
72
75
|
|
|
73
76
|
sig do
|
|
74
77
|
params(
|
|
78
|
+
subscription_id: String,
|
|
75
79
|
billing: T.nilable(Dodopayments::BillingAddress::OrHash),
|
|
76
80
|
cancel_at_next_billing_date: T.nilable(T::Boolean),
|
|
77
81
|
credit_entitlement_cart:
|
|
@@ -93,6 +97,7 @@ module Dodopayments
|
|
|
93
97
|
).returns(T.attached_class)
|
|
94
98
|
end
|
|
95
99
|
def self.new(
|
|
100
|
+
subscription_id:,
|
|
96
101
|
billing: nil,
|
|
97
102
|
# When set, the subscription will remain active until the end of billing period
|
|
98
103
|
cancel_at_next_billing_date: nil,
|
|
@@ -111,6 +116,7 @@ module Dodopayments
|
|
|
111
116
|
sig do
|
|
112
117
|
override.returns(
|
|
113
118
|
{
|
|
119
|
+
subscription_id: String,
|
|
114
120
|
billing: T.nilable(Dodopayments::BillingAddress),
|
|
115
121
|
cancel_at_next_billing_date: T.nilable(T::Boolean),
|
|
116
122
|
credit_entitlement_cart:
|
|
@@ -14,43 +14,42 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :subscription_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
21
|
returns(
|
|
19
|
-
|
|
22
|
+
T.any(
|
|
23
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New,
|
|
24
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing
|
|
25
|
+
)
|
|
20
26
|
)
|
|
21
27
|
end
|
|
22
|
-
attr_accessor :
|
|
23
|
-
|
|
24
|
-
sig { returns(T.nilable(String)) }
|
|
25
|
-
attr_accessor :return_url
|
|
26
|
-
|
|
27
|
-
sig { returns(String) }
|
|
28
|
-
attr_accessor :payment_method_id
|
|
28
|
+
attr_accessor :body
|
|
29
29
|
|
|
30
30
|
sig do
|
|
31
31
|
params(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
subscription_id: String,
|
|
33
|
+
body:
|
|
34
|
+
T.any(
|
|
35
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New::OrHash,
|
|
36
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing::OrHash
|
|
37
|
+
),
|
|
36
38
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
37
39
|
).returns(T.attached_class)
|
|
38
40
|
end
|
|
39
|
-
def self.new(
|
|
40
|
-
type:,
|
|
41
|
-
payment_method_id:,
|
|
42
|
-
return_url: nil,
|
|
43
|
-
request_options: {}
|
|
44
|
-
)
|
|
41
|
+
def self.new(subscription_id:, body:, request_options: {})
|
|
45
42
|
end
|
|
46
43
|
|
|
47
44
|
sig do
|
|
48
45
|
override.returns(
|
|
49
46
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
subscription_id: String,
|
|
48
|
+
body:
|
|
49
|
+
T.any(
|
|
50
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New,
|
|
51
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing
|
|
52
|
+
),
|
|
54
53
|
request_options: Dodopayments::RequestOptions
|
|
55
54
|
}
|
|
56
55
|
)
|
|
@@ -58,32 +57,167 @@ module Dodopayments
|
|
|
58
57
|
def to_hash
|
|
59
58
|
end
|
|
60
59
|
|
|
61
|
-
module
|
|
62
|
-
extend Dodopayments::Internal::Type::
|
|
60
|
+
module Body
|
|
61
|
+
extend Dodopayments::Internal::Type::Union
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
Variants =
|
|
65
64
|
T.type_alias do
|
|
66
|
-
T.
|
|
67
|
-
|
|
68
|
-
Dodopayments::SubscriptionUpdatePaymentMethodParams::
|
|
65
|
+
T.any(
|
|
66
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New,
|
|
67
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing
|
|
69
68
|
)
|
|
70
69
|
end
|
|
71
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
72
70
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
class New < Dodopayments::Internal::Type::BaseModel
|
|
72
|
+
OrHash =
|
|
73
|
+
T.type_alias do
|
|
74
|
+
T.any(
|
|
75
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New,
|
|
76
|
+
Dodopayments::Internal::AnyHash
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
sig do
|
|
81
|
+
returns(
|
|
82
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New::Type::OrSymbol
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
attr_accessor :type
|
|
86
|
+
|
|
87
|
+
sig { returns(T.nilable(String)) }
|
|
88
|
+
attr_accessor :return_url
|
|
89
|
+
|
|
90
|
+
sig do
|
|
91
|
+
params(
|
|
92
|
+
type:
|
|
93
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New::Type::OrSymbol,
|
|
94
|
+
return_url: T.nilable(String)
|
|
95
|
+
).returns(T.attached_class)
|
|
96
|
+
end
|
|
97
|
+
def self.new(type:, return_url: nil)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
sig do
|
|
101
|
+
override.returns(
|
|
102
|
+
{
|
|
103
|
+
type:
|
|
104
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New::Type::OrSymbol,
|
|
105
|
+
return_url: T.nilable(String)
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
end
|
|
109
|
+
def to_hash
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
module Type
|
|
113
|
+
extend Dodopayments::Internal::Type::Enum
|
|
114
|
+
|
|
115
|
+
TaggedSymbol =
|
|
116
|
+
T.type_alias do
|
|
117
|
+
T.all(
|
|
118
|
+
Symbol,
|
|
119
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New::Type
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
123
|
+
|
|
124
|
+
NEW =
|
|
125
|
+
T.let(
|
|
126
|
+
:new,
|
|
127
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New::Type::TaggedSymbol
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
sig do
|
|
131
|
+
override.returns(
|
|
132
|
+
T::Array[
|
|
133
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::New::Type::TaggedSymbol
|
|
134
|
+
]
|
|
135
|
+
)
|
|
136
|
+
end
|
|
137
|
+
def self.values
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
class Existing < Dodopayments::Internal::Type::BaseModel
|
|
143
|
+
OrHash =
|
|
144
|
+
T.type_alias do
|
|
145
|
+
T.any(
|
|
146
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing,
|
|
147
|
+
Dodopayments::Internal::AnyHash
|
|
148
|
+
)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
sig { returns(String) }
|
|
152
|
+
attr_accessor :payment_method_id
|
|
153
|
+
|
|
154
|
+
sig do
|
|
155
|
+
returns(
|
|
156
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing::Type::OrSymbol
|
|
157
|
+
)
|
|
158
|
+
end
|
|
159
|
+
attr_accessor :type
|
|
160
|
+
|
|
161
|
+
sig do
|
|
162
|
+
params(
|
|
163
|
+
payment_method_id: String,
|
|
164
|
+
type:
|
|
165
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing::Type::OrSymbol
|
|
166
|
+
).returns(T.attached_class)
|
|
167
|
+
end
|
|
168
|
+
def self.new(payment_method_id:, type:)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
sig do
|
|
172
|
+
override.returns(
|
|
173
|
+
{
|
|
174
|
+
payment_method_id: String,
|
|
175
|
+
type:
|
|
176
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing::Type::OrSymbol
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
end
|
|
180
|
+
def to_hash
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
module Type
|
|
184
|
+
extend Dodopayments::Internal::Type::Enum
|
|
185
|
+
|
|
186
|
+
TaggedSymbol =
|
|
187
|
+
T.type_alias do
|
|
188
|
+
T.all(
|
|
189
|
+
Symbol,
|
|
190
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing::Type
|
|
191
|
+
)
|
|
192
|
+
end
|
|
193
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
194
|
+
|
|
195
|
+
EXISTING =
|
|
196
|
+
T.let(
|
|
197
|
+
:existing,
|
|
198
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing::Type::TaggedSymbol
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
sig do
|
|
202
|
+
override.returns(
|
|
203
|
+
T::Array[
|
|
204
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Existing::Type::TaggedSymbol
|
|
205
|
+
]
|
|
206
|
+
)
|
|
207
|
+
end
|
|
208
|
+
def self.values
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
end
|
|
78
212
|
|
|
79
213
|
sig do
|
|
80
214
|
override.returns(
|
|
81
215
|
T::Array[
|
|
82
|
-
Dodopayments::SubscriptionUpdatePaymentMethodParams::
|
|
216
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Body::Variants
|
|
83
217
|
]
|
|
84
218
|
)
|
|
85
219
|
end
|
|
86
|
-
def self.
|
|
220
|
+
def self.variants
|
|
87
221
|
end
|
|
88
222
|
end
|
|
89
223
|
end
|
|
@@ -32,6 +32,13 @@ module Dodopayments
|
|
|
32
32
|
sig { returns(T.nilable(T::Array[Dodopayments::AttachAddon])) }
|
|
33
33
|
attr_accessor :addons
|
|
34
34
|
|
|
35
|
+
# Optional discount code to apply to the new plan. If provided, validates and
|
|
36
|
+
# applies the discount to the plan change. If not provided and the subscription
|
|
37
|
+
# has an existing discount with `preserve_on_plan_change=true`, the existing
|
|
38
|
+
# discount will be preserved (if applicable to the new product).
|
|
39
|
+
sig { returns(T.nilable(String)) }
|
|
40
|
+
attr_accessor :discount_code
|
|
41
|
+
|
|
35
42
|
# Metadata for the payment. If not passed, the metadata of the subscription will
|
|
36
43
|
# be taken
|
|
37
44
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
@@ -60,6 +67,7 @@ module Dodopayments
|
|
|
60
67
|
Dodopayments::UpdateSubscriptionPlanReq::ProrationBillingMode::OrSymbol,
|
|
61
68
|
quantity: Integer,
|
|
62
69
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon::OrHash]),
|
|
70
|
+
discount_code: T.nilable(String),
|
|
63
71
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
64
72
|
on_payment_failure:
|
|
65
73
|
T.nilable(
|
|
@@ -77,6 +85,11 @@ module Dodopayments
|
|
|
77
85
|
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
|
78
86
|
# addons
|
|
79
87
|
addons: nil,
|
|
88
|
+
# Optional discount code to apply to the new plan. If provided, validates and
|
|
89
|
+
# applies the discount to the plan change. If not provided and the subscription
|
|
90
|
+
# has an existing discount with `preserve_on_plan_change=true`, the existing
|
|
91
|
+
# discount will be preserved (if applicable to the new product).
|
|
92
|
+
discount_code: nil,
|
|
80
93
|
# Metadata for the payment. If not passed, the metadata of the subscription will
|
|
81
94
|
# be taken
|
|
82
95
|
metadata: nil,
|
|
@@ -99,6 +112,7 @@ module Dodopayments
|
|
|
99
112
|
Dodopayments::UpdateSubscriptionPlanReq::ProrationBillingMode::OrSymbol,
|
|
100
113
|
quantity: Integer,
|
|
101
114
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon]),
|
|
115
|
+
discount_code: T.nilable(String),
|
|
102
116
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
103
117
|
on_payment_failure:
|
|
104
118
|
T.nilable(
|
|
@@ -14,16 +14,22 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :event_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
event_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(event_id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ event_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 :webhook_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
webhook_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(webhook_id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ webhook_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 :webhook_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
webhook_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(webhook_id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ webhook_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 :webhook_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
webhook_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(webhook_id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
sig do
|
|
26
|
-
override.returns(
|
|
30
|
+
override.returns(
|
|
31
|
+
{ webhook_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 :webhook_id
|
|
19
|
+
|
|
17
20
|
# Description of the webhook
|
|
18
21
|
sig { returns(T.nilable(String)) }
|
|
19
22
|
attr_accessor :description
|
|
@@ -44,6 +47,7 @@ module Dodopayments
|
|
|
44
47
|
|
|
45
48
|
sig do
|
|
46
49
|
params(
|
|
50
|
+
webhook_id: String,
|
|
47
51
|
description: T.nilable(String),
|
|
48
52
|
disabled: T.nilable(T::Boolean),
|
|
49
53
|
filter_types:
|
|
@@ -55,6 +59,7 @@ module Dodopayments
|
|
|
55
59
|
).returns(T.attached_class)
|
|
56
60
|
end
|
|
57
61
|
def self.new(
|
|
62
|
+
webhook_id:,
|
|
58
63
|
# Description of the webhook
|
|
59
64
|
description: nil,
|
|
60
65
|
# To Disable the endpoint, set it to true.
|
|
@@ -76,6 +81,7 @@ module Dodopayments
|
|
|
76
81
|
sig do
|
|
77
82
|
override.returns(
|
|
78
83
|
{
|
|
84
|
+
webhook_id: String,
|
|
79
85
|
description: T.nilable(String),
|
|
80
86
|
disabled: T.nilable(T::Boolean),
|
|
81
87
|
filter_types:
|
|
@@ -15,16 +15,25 @@ module Dodopayments
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :webhook_id
|
|
20
|
+
|
|
18
21
|
sig do
|
|
19
|
-
params(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
params(
|
|
23
|
+
webhook_id: String,
|
|
24
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
22
26
|
end
|
|
23
|
-
def self.new(request_options: {})
|
|
27
|
+
def self.new(webhook_id:, request_options: {})
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
sig do
|
|
27
|
-
override.returns(
|
|
31
|
+
override.returns(
|
|
32
|
+
{
|
|
33
|
+
webhook_id: String,
|
|
34
|
+
request_options: Dodopayments::RequestOptions
|
|
35
|
+
}
|
|
36
|
+
)
|
|
28
37
|
end
|
|
29
38
|
def to_hash
|
|
30
39
|
end
|
|
@@ -15,17 +15,22 @@ module Dodopayments
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :webhook_id
|
|
20
|
+
|
|
18
21
|
# Object of header-value pair to update or add
|
|
19
22
|
sig { returns(T::Hash[Symbol, String]) }
|
|
20
23
|
attr_accessor :headers
|
|
21
24
|
|
|
22
25
|
sig do
|
|
23
26
|
params(
|
|
27
|
+
webhook_id: String,
|
|
24
28
|
headers: T::Hash[Symbol, String],
|
|
25
29
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
26
30
|
).returns(T.attached_class)
|
|
27
31
|
end
|
|
28
32
|
def self.new(
|
|
33
|
+
webhook_id:,
|
|
29
34
|
# Object of header-value pair to update or add
|
|
30
35
|
headers:,
|
|
31
36
|
request_options: {}
|
|
@@ -35,6 +40,7 @@ module Dodopayments
|
|
|
35
40
|
sig do
|
|
36
41
|
override.returns(
|
|
37
42
|
{
|
|
43
|
+
webhook_id: String,
|
|
38
44
|
headers: T::Hash[Symbol, String],
|
|
39
45
|
request_options: Dodopayments::RequestOptions
|
|
40
46
|
}
|