dodopayments 2.10.0 → 2.11.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 +10 -0
- data/README.md +9 -9
- data/lib/dodopayments/client.rb +4 -0
- data/lib/dodopayments/models/checkout_session_flags.rb +15 -1
- data/lib/dodopayments/models/checkout_session_request.rb +11 -1
- data/lib/dodopayments/models/checkout_session_response.rb +33 -1
- data/lib/dodopayments/models/discount_detail.rb +143 -0
- data/lib/dodopayments/models/filter_type.rb +71 -0
- data/lib/dodopayments/models/github_permission.rb +19 -0
- data/lib/dodopayments/models/integration_config.rb +3 -19
- data/lib/dodopayments/models/integration_config_response.rb +3 -19
- data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +22 -0
- data/lib/dodopayments/models/meter_filter.rb +3 -331
- data/lib/dodopayments/models/payment.rb +3 -141
- data/lib/dodopayments/models/payment_create_params.rb +11 -1
- data/lib/dodopayments/models/payment_method_types.rb +1 -0
- data/lib/dodopayments/models/product_collection.rb +74 -0
- data/lib/dodopayments/models/product_collection_create_params.rb +47 -0
- data/lib/dodopayments/models/product_collection_delete_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_list_params.rb +46 -0
- data/lib/dodopayments/models/product_collection_list_response.rb +65 -0
- data/lib/dodopayments/models/product_collection_retrieve_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_unarchive_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_unarchive_response.rb +33 -0
- data/lib/dodopayments/models/product_collection_update_images_params.rb +29 -0
- data/lib/dodopayments/models/product_collection_update_images_response.rb +25 -0
- data/lib/dodopayments/models/product_collection_update_params.rb +61 -0
- data/lib/dodopayments/models/product_collections/group_create_params.rb +22 -0
- data/lib/dodopayments/models/product_collections/group_delete_params.rb +28 -0
- data/lib/dodopayments/models/product_collections/group_product.rb +26 -0
- data/lib/dodopayments/models/product_collections/group_update_params.rb +59 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_params.rb +41 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_response.rb +15 -0
- data/lib/dodopayments/models/product_collections/groups/item_delete_params.rb +36 -0
- data/lib/dodopayments/models/product_collections/groups/item_update_params.rb +47 -0
- data/lib/dodopayments/models/product_collections/groups/product_collection_product.rb +132 -0
- data/lib/dodopayments/models/product_collections/product_collection_group_details.rb +42 -0
- data/lib/dodopayments/models/product_collections/product_collection_group_response.rb +39 -0
- data/lib/dodopayments/models/subscription.rb +13 -142
- data/lib/dodopayments/models/subscription_create_params.rb +11 -1
- data/lib/dodopayments/models/subscription_list_response.rb +10 -1
- data/lib/dodopayments/models/subscription_update_params.rb +12 -1
- data/lib/dodopayments/models/subscription_update_payment_method_params.rb +9 -9
- data/lib/dodopayments/models/webhook_event_type.rb +1 -5
- data/lib/dodopayments/models.rb +24 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +6 -2
- data/lib/dodopayments/resources/invoices/payments.rb +18 -0
- data/lib/dodopayments/resources/payments.rb +3 -1
- data/lib/dodopayments/resources/product_collections/groups/items.rb +111 -0
- data/lib/dodopayments/resources/product_collections/groups.rb +109 -0
- data/lib/dodopayments/resources/product_collections.rb +179 -0
- data/lib/dodopayments/resources/subscriptions.rb +9 -5
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +29 -0
- data/rbi/dodopayments/client.rbi +3 -0
- data/rbi/dodopayments/models/checkout_session_flags.rbi +23 -0
- data/rbi/dodopayments/models/checkout_session_request.rbi +12 -0
- data/rbi/dodopayments/models/checkout_session_response.rbi +43 -5
- data/rbi/dodopayments/models/discount_detail.rbi +161 -0
- data/rbi/dodopayments/models/filter_type.rbi +112 -0
- data/rbi/dodopayments/models/github_permission.rbi +26 -0
- data/rbi/dodopayments/models/integration_config.rbi +3 -59
- data/rbi/dodopayments/models/integration_config_response.rbi +3 -59
- data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +40 -0
- data/rbi/dodopayments/models/meter_filter.rbi +3 -572
- data/rbi/dodopayments/models/payment.rbi +3 -163
- data/rbi/dodopayments/models/payment_create_params.rbi +12 -0
- data/rbi/dodopayments/models/payment_method_types.rbi +1 -0
- data/rbi/dodopayments/models/product_collection.rbi +108 -0
- data/rbi/dodopayments/models/product_collection_create_params.rbi +82 -0
- data/rbi/dodopayments/models/product_collection_delete_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_list_params.rbi +82 -0
- data/rbi/dodopayments/models/product_collection_list_response.rbi +88 -0
- data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_unarchive_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_unarchive_response.rbi +56 -0
- data/rbi/dodopayments/models/product_collection_update_images_params.rbi +52 -0
- data/rbi/dodopayments/models/product_collection_update_images_response.rbi +40 -0
- data/rbi/dodopayments/models/product_collection_update_params.rbi +84 -0
- data/rbi/dodopayments/models/product_collections/group_create_params.rbi +40 -0
- data/rbi/dodopayments/models/product_collections/group_delete_params.rbi +48 -0
- data/rbi/dodopayments/models/product_collections/group_product.rbi +46 -0
- data/rbi/dodopayments/models/product_collections/group_update_params.rbi +80 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_params.rbi +68 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_response.rbi +17 -0
- data/rbi/dodopayments/models/product_collections/groups/item_delete_params.rbi +55 -0
- data/rbi/dodopayments/models/product_collections/groups/item_update_params.rbi +68 -0
- data/rbi/dodopayments/models/product_collections/groups/product_collection_product.rbi +148 -0
- data/rbi/dodopayments/models/product_collections/product_collection_group_details.rbi +67 -0
- data/rbi/dodopayments/models/product_collections/product_collection_group_response.rbi +68 -0
- data/rbi/dodopayments/models/subscription.rbi +13 -164
- data/rbi/dodopayments/models/subscription_create_params.rbi +12 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +10 -0
- data/rbi/dodopayments/models/subscription_update_params.rbi +14 -0
- data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +16 -16
- data/rbi/dodopayments/models/webhook_event_type.rbi +4 -18
- data/rbi/dodopayments/models.rbi +31 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +10 -0
- data/rbi/dodopayments/resources/invoices/payments.rbi +9 -0
- data/rbi/dodopayments/resources/payments.rbi +5 -0
- data/rbi/dodopayments/resources/product_collections/groups/items.rbi +83 -0
- data/rbi/dodopayments/resources/product_collections/groups.rbi +88 -0
- data/rbi/dodopayments/resources/product_collections.rbi +149 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +15 -4
- data/sig/dodopayments/client.rbs +2 -0
- data/sig/dodopayments/models/checkout_session_flags.rbs +7 -0
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/checkout_session_response.rbs +27 -3
- data/sig/dodopayments/models/discount_detail.rbs +95 -0
- data/sig/dodopayments/models/filter_type.rbs +52 -0
- data/sig/dodopayments/models/github_permission.rbs +17 -0
- data/sig/dodopayments/models/integration_config.rbs +4 -18
- data/sig/dodopayments/models/integration_config_response.rbs +4 -18
- data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +25 -0
- data/sig/dodopayments/models/meter_filter.rbs +4 -252
- data/sig/dodopayments/models/payment.rbs +4 -96
- data/sig/dodopayments/models/payment_create_params.rbs +5 -0
- data/sig/dodopayments/models/payment_method_types.rbs +2 -0
- data/sig/dodopayments/models/product_collection.rbs +55 -0
- data/sig/dodopayments/models/product_collection_create_params.rbs +41 -0
- data/sig/dodopayments/models/product_collection_delete_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_list_params.rbs +49 -0
- data/sig/dodopayments/models/product_collection_list_response.rbs +50 -0
- data/sig/dodopayments/models/product_collection_retrieve_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_unarchive_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_unarchive_response.rbs +30 -0
- data/sig/dodopayments/models/product_collection_update_images_params.rbs +28 -0
- data/sig/dodopayments/models/product_collection_update_images_response.rbs +16 -0
- data/sig/dodopayments/models/product_collection_update_params.rbs +51 -0
- data/sig/dodopayments/models/product_collections/group_create_params.rbs +27 -0
- data/sig/dodopayments/models/product_collections/group_delete_params.rbs +30 -0
- data/sig/dodopayments/models/product_collections/group_product.rbs +17 -0
- data/sig/dodopayments/models/product_collections/group_update_params.rbs +48 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_params.rbs +40 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_response.rbs +12 -0
- data/sig/dodopayments/models/product_collections/groups/item_delete_params.rbs +36 -0
- data/sig/dodopayments/models/product_collections/groups/item_update_params.rbs +40 -0
- data/sig/dodopayments/models/product_collections/groups/product_collection_product.rbs +99 -0
- data/sig/dodopayments/models/product_collections/product_collection_group_details.rbs +34 -0
- data/sig/dodopayments/models/product_collections/product_collection_group_response.rbs +39 -0
- data/sig/dodopayments/models/subscription.rbs +9 -96
- data/sig/dodopayments/models/subscription_create_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +5 -0
- data/sig/dodopayments/models/subscription_update_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +9 -9
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -10
- data/sig/dodopayments/models.rbs +24 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/invoices/payments.rbs +5 -0
- data/sig/dodopayments/resources/payments.rbs +1 -0
- data/sig/dodopayments/resources/product_collections/groups/items.rbs +33 -0
- data/sig/dodopayments/resources/product_collections/groups.rbs +34 -0
- data/sig/dodopayments/resources/product_collections.rbs +56 -0
- data/sig/dodopayments/resources/subscriptions.rbs +3 -1
- metadata +89 -2
|
@@ -22,6 +22,24 @@ module Dodopayments
|
|
|
22
22
|
)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
# @overload retrieve_payout(payout_id, request_options: {})
|
|
26
|
+
#
|
|
27
|
+
# @param payout_id [String]
|
|
28
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
29
|
+
#
|
|
30
|
+
# @return [StringIO]
|
|
31
|
+
#
|
|
32
|
+
# @see Dodopayments::Models::Invoices::PaymentRetrievePayoutParams
|
|
33
|
+
def retrieve_payout(payout_id, params = {})
|
|
34
|
+
@client.request(
|
|
35
|
+
method: :get,
|
|
36
|
+
path: ["invoices/payouts/%1$s", payout_id],
|
|
37
|
+
headers: {"accept" => "application/pdf"},
|
|
38
|
+
model: StringIO,
|
|
39
|
+
options: params[:request_options]
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
25
43
|
# @overload retrieve_refund(refund_id, request_options: {})
|
|
26
44
|
#
|
|
27
45
|
# @param refund_id [String]
|
|
@@ -8,7 +8,7 @@ module Dodopayments
|
|
|
8
8
|
# Some parameter documentations has been truncated, see
|
|
9
9
|
# {Dodopayments::Models::PaymentCreateParams} for more details.
|
|
10
10
|
#
|
|
11
|
-
# @overload create(billing:, customer:, product_cart:, adaptive_currency_fees_inclusive: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, discount_codes: nil, force_3ds: nil, metadata: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
11
|
+
# @overload create(billing:, customer:, product_cart:, adaptive_currency_fees_inclusive: nil, allowed_payment_method_types: nil, billing_currency: nil, customer_business_name: nil, discount_code: nil, discount_codes: nil, force_3ds: nil, metadata: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
12
12
|
#
|
|
13
13
|
# @param billing [Dodopayments::Models::BillingAddress] Billing address details for the payment
|
|
14
14
|
#
|
|
@@ -22,6 +22,8 @@ module Dodopayments
|
|
|
22
22
|
#
|
|
23
23
|
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] Fix the currency in which the end customer is billed.
|
|
24
24
|
#
|
|
25
|
+
# @param customer_business_name [String, nil] Optional business / legal name associated with the tax id. When provided
|
|
26
|
+
#
|
|
25
27
|
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
26
28
|
#
|
|
27
29
|
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order of application. Max 20.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class ProductCollections
|
|
6
|
+
class Groups
|
|
7
|
+
class Items
|
|
8
|
+
# @overload create(group_id, id:, products:, request_options: {})
|
|
9
|
+
#
|
|
10
|
+
# @param group_id [String] Path param: Product Collection Group Id
|
|
11
|
+
#
|
|
12
|
+
# @param id [String] Path param: Product Collection Id
|
|
13
|
+
#
|
|
14
|
+
# @param products [Array<Dodopayments::Models::ProductCollections::GroupProduct>] Body param: Products to add to the group
|
|
15
|
+
#
|
|
16
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
17
|
+
#
|
|
18
|
+
# @return [Array<Dodopayments::Models::ProductCollections::Groups::ProductCollectionProduct>]
|
|
19
|
+
#
|
|
20
|
+
# @see Dodopayments::Models::ProductCollections::Groups::ItemCreateParams
|
|
21
|
+
def create(group_id, params)
|
|
22
|
+
parsed, options = Dodopayments::ProductCollections::Groups::ItemCreateParams.dump_request(params)
|
|
23
|
+
id =
|
|
24
|
+
parsed.delete(:id) do
|
|
25
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
26
|
+
end
|
|
27
|
+
@client.request(
|
|
28
|
+
method: :post,
|
|
29
|
+
path: ["product-collections/%1$s/groups/%2$s/items", id, group_id],
|
|
30
|
+
body: parsed,
|
|
31
|
+
model: Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductCollections::Groups::ProductCollectionProduct],
|
|
32
|
+
options: options
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @overload update(item_id, id:, group_id:, status:, request_options: {})
|
|
37
|
+
#
|
|
38
|
+
# @param item_id [String] Path param: Collection item Id (product membership in group)
|
|
39
|
+
#
|
|
40
|
+
# @param id [String] Path param: Product Collection Id
|
|
41
|
+
#
|
|
42
|
+
# @param group_id [String] Path param: Product Collection Group Id
|
|
43
|
+
#
|
|
44
|
+
# @param status [Boolean] Body param: Status of the product in the group
|
|
45
|
+
#
|
|
46
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
47
|
+
#
|
|
48
|
+
# @return [nil]
|
|
49
|
+
#
|
|
50
|
+
# @see Dodopayments::Models::ProductCollections::Groups::ItemUpdateParams
|
|
51
|
+
def update(item_id, params)
|
|
52
|
+
parsed, options = Dodopayments::ProductCollections::Groups::ItemUpdateParams.dump_request(params)
|
|
53
|
+
id =
|
|
54
|
+
parsed.delete(:id) do
|
|
55
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
56
|
+
end
|
|
57
|
+
group_id =
|
|
58
|
+
parsed.delete(:group_id) do
|
|
59
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
60
|
+
end
|
|
61
|
+
@client.request(
|
|
62
|
+
method: :patch,
|
|
63
|
+
path: ["product-collections/%1$s/groups/%2$s/items/%3$s", id, group_id, item_id],
|
|
64
|
+
body: parsed,
|
|
65
|
+
model: NilClass,
|
|
66
|
+
options: options
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# @overload delete(item_id, id:, group_id:, request_options: {})
|
|
71
|
+
#
|
|
72
|
+
# @param item_id [String] Collection item Id (product membership in group)
|
|
73
|
+
#
|
|
74
|
+
# @param id [String] Product Collection Id
|
|
75
|
+
#
|
|
76
|
+
# @param group_id [String] Product Collection Group Id
|
|
77
|
+
#
|
|
78
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
79
|
+
#
|
|
80
|
+
# @return [nil]
|
|
81
|
+
#
|
|
82
|
+
# @see Dodopayments::Models::ProductCollections::Groups::ItemDeleteParams
|
|
83
|
+
def delete(item_id, params)
|
|
84
|
+
parsed, options = Dodopayments::ProductCollections::Groups::ItemDeleteParams.dump_request(params)
|
|
85
|
+
id =
|
|
86
|
+
parsed.delete(:id) do
|
|
87
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
88
|
+
end
|
|
89
|
+
group_id =
|
|
90
|
+
parsed.delete(:group_id) do
|
|
91
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
92
|
+
end
|
|
93
|
+
@client.request(
|
|
94
|
+
method: :delete,
|
|
95
|
+
path: ["product-collections/%1$s/groups/%2$s/items/%3$s", id, group_id, item_id],
|
|
96
|
+
model: NilClass,
|
|
97
|
+
options: options
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# @api private
|
|
102
|
+
#
|
|
103
|
+
# @param client [Dodopayments::Client]
|
|
104
|
+
def initialize(client:)
|
|
105
|
+
@client = client
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class ProductCollections
|
|
6
|
+
class Groups
|
|
7
|
+
# @return [Dodopayments::Resources::ProductCollections::Groups::Items]
|
|
8
|
+
attr_reader :items
|
|
9
|
+
|
|
10
|
+
# Some parameter documentations has been truncated, see
|
|
11
|
+
# {Dodopayments::Models::ProductCollections::GroupCreateParams} for more details.
|
|
12
|
+
#
|
|
13
|
+
# @overload create(id, products:, group_name: nil, status: nil, request_options: {})
|
|
14
|
+
#
|
|
15
|
+
# @param id [String] Product Collection Id
|
|
16
|
+
#
|
|
17
|
+
# @param products [Array<Dodopayments::Models::ProductCollections::GroupProduct>] Products in this group
|
|
18
|
+
#
|
|
19
|
+
# @param group_name [String, nil] Optional group name. Multiple groups can have null names, but named groups must
|
|
20
|
+
#
|
|
21
|
+
# @param status [Boolean, nil] Status of the group (defaults to true if not provided)
|
|
22
|
+
#
|
|
23
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
24
|
+
#
|
|
25
|
+
# @return [Dodopayments::Models::ProductCollections::ProductCollectionGroupResponse]
|
|
26
|
+
#
|
|
27
|
+
# @see Dodopayments::Models::ProductCollections::GroupCreateParams
|
|
28
|
+
def create(id, params)
|
|
29
|
+
parsed, options = Dodopayments::ProductCollections::GroupCreateParams.dump_request(params)
|
|
30
|
+
@client.request(
|
|
31
|
+
method: :post,
|
|
32
|
+
path: ["product-collections/%1$s/groups", id],
|
|
33
|
+
body: parsed,
|
|
34
|
+
model: Dodopayments::ProductCollections::ProductCollectionGroupResponse,
|
|
35
|
+
options: options
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Some parameter documentations has been truncated, see
|
|
40
|
+
# {Dodopayments::Models::ProductCollections::GroupUpdateParams} for more details.
|
|
41
|
+
#
|
|
42
|
+
# @overload update(group_id, id:, group_name: nil, product_order: nil, status: nil, request_options: {})
|
|
43
|
+
#
|
|
44
|
+
# @param group_id [String] Path param: Product Collection Group Id
|
|
45
|
+
#
|
|
46
|
+
# @param id [String] Path param: Product Collection Id
|
|
47
|
+
#
|
|
48
|
+
# @param group_name [String, nil] Body param: Optional group name update: Some(Some(name)) = set name, Some(None)
|
|
49
|
+
#
|
|
50
|
+
# @param product_order [Array<String>, nil] Body param: Optional new order for products in this group (array of product_coll
|
|
51
|
+
#
|
|
52
|
+
# @param status [Boolean, nil] Body param: Optional status update
|
|
53
|
+
#
|
|
54
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
55
|
+
#
|
|
56
|
+
# @return [nil]
|
|
57
|
+
#
|
|
58
|
+
# @see Dodopayments::Models::ProductCollections::GroupUpdateParams
|
|
59
|
+
def update(group_id, params)
|
|
60
|
+
parsed, options = Dodopayments::ProductCollections::GroupUpdateParams.dump_request(params)
|
|
61
|
+
id =
|
|
62
|
+
parsed.delete(:id) do
|
|
63
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
64
|
+
end
|
|
65
|
+
@client.request(
|
|
66
|
+
method: :patch,
|
|
67
|
+
path: ["product-collections/%1$s/groups/%2$s", id, group_id],
|
|
68
|
+
body: parsed,
|
|
69
|
+
model: NilClass,
|
|
70
|
+
options: options
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# @overload delete(group_id, id:, request_options: {})
|
|
75
|
+
#
|
|
76
|
+
# @param group_id [String] Product Collection Group Id
|
|
77
|
+
#
|
|
78
|
+
# @param id [String] Product Collection Id
|
|
79
|
+
#
|
|
80
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
81
|
+
#
|
|
82
|
+
# @return [nil]
|
|
83
|
+
#
|
|
84
|
+
# @see Dodopayments::Models::ProductCollections::GroupDeleteParams
|
|
85
|
+
def delete(group_id, params)
|
|
86
|
+
parsed, options = Dodopayments::ProductCollections::GroupDeleteParams.dump_request(params)
|
|
87
|
+
id =
|
|
88
|
+
parsed.delete(:id) do
|
|
89
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
90
|
+
end
|
|
91
|
+
@client.request(
|
|
92
|
+
method: :delete,
|
|
93
|
+
path: ["product-collections/%1$s/groups/%2$s", id, group_id],
|
|
94
|
+
model: NilClass,
|
|
95
|
+
options: options
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# @api private
|
|
100
|
+
#
|
|
101
|
+
# @param client [Dodopayments::Client]
|
|
102
|
+
def initialize(client:)
|
|
103
|
+
@client = client
|
|
104
|
+
@items = Dodopayments::Resources::ProductCollections::Groups::Items.new(client: client)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class ProductCollections
|
|
6
|
+
# @return [Dodopayments::Resources::ProductCollections::Groups]
|
|
7
|
+
attr_reader :groups
|
|
8
|
+
|
|
9
|
+
# @overload create(groups:, name:, brand_id: nil, description: nil, request_options: {})
|
|
10
|
+
#
|
|
11
|
+
# @param groups [Array<Dodopayments::Models::ProductCollections::ProductCollectionGroupDetails>] Groups of products in this collection
|
|
12
|
+
#
|
|
13
|
+
# @param name [String] Name of the product collection
|
|
14
|
+
#
|
|
15
|
+
# @param brand_id [String, nil] Brand id for the collection, if not provided will default to primary brand
|
|
16
|
+
#
|
|
17
|
+
# @param description [String, nil] Optional description of the product collection
|
|
18
|
+
#
|
|
19
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
20
|
+
#
|
|
21
|
+
# @return [Dodopayments::Models::ProductCollection]
|
|
22
|
+
#
|
|
23
|
+
# @see Dodopayments::Models::ProductCollectionCreateParams
|
|
24
|
+
def create(params)
|
|
25
|
+
parsed, options = Dodopayments::ProductCollectionCreateParams.dump_request(params)
|
|
26
|
+
@client.request(
|
|
27
|
+
method: :post,
|
|
28
|
+
path: "product-collections",
|
|
29
|
+
body: parsed,
|
|
30
|
+
model: Dodopayments::ProductCollection,
|
|
31
|
+
options: options
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# @overload retrieve(id, request_options: {})
|
|
36
|
+
#
|
|
37
|
+
# @param id [String] Product Collection Id
|
|
38
|
+
#
|
|
39
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
40
|
+
#
|
|
41
|
+
# @return [Dodopayments::Models::ProductCollection]
|
|
42
|
+
#
|
|
43
|
+
# @see Dodopayments::Models::ProductCollectionRetrieveParams
|
|
44
|
+
def retrieve(id, params = {})
|
|
45
|
+
@client.request(
|
|
46
|
+
method: :get,
|
|
47
|
+
path: ["product-collections/%1$s", id],
|
|
48
|
+
model: Dodopayments::ProductCollection,
|
|
49
|
+
options: params[:request_options]
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# @overload update(id, brand_id: nil, description: nil, group_order: nil, image_id: nil, name: nil, request_options: {})
|
|
54
|
+
#
|
|
55
|
+
# @param id [String] Product Collection Id
|
|
56
|
+
#
|
|
57
|
+
# @param brand_id [String, nil] Optional brand_id update
|
|
58
|
+
#
|
|
59
|
+
# @param description [String, nil] Optional description update - pass null to remove, omit to keep unchanged
|
|
60
|
+
#
|
|
61
|
+
# @param group_order [Array<String>, nil] Optional new order for groups (array of group UUIDs in desired order)
|
|
62
|
+
#
|
|
63
|
+
# @param image_id [String, nil] Optional image update - pass null to remove, omit to keep unchanged
|
|
64
|
+
#
|
|
65
|
+
# @param name [String, nil] Optional new name for the collection
|
|
66
|
+
#
|
|
67
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
68
|
+
#
|
|
69
|
+
# @return [nil]
|
|
70
|
+
#
|
|
71
|
+
# @see Dodopayments::Models::ProductCollectionUpdateParams
|
|
72
|
+
def update(id, params = {})
|
|
73
|
+
parsed, options = Dodopayments::ProductCollectionUpdateParams.dump_request(params)
|
|
74
|
+
@client.request(
|
|
75
|
+
method: :patch,
|
|
76
|
+
path: ["product-collections/%1$s", id],
|
|
77
|
+
body: parsed,
|
|
78
|
+
model: NilClass,
|
|
79
|
+
options: options
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# @overload list(archived: nil, brand_id: nil, page_number: nil, page_size: nil, request_options: {})
|
|
84
|
+
#
|
|
85
|
+
# @param archived [Boolean] List archived collections
|
|
86
|
+
#
|
|
87
|
+
# @param brand_id [String] Filter by Brand id
|
|
88
|
+
#
|
|
89
|
+
# @param page_number [Integer] Page number default is 0
|
|
90
|
+
#
|
|
91
|
+
# @param page_size [Integer] Page size default is 10 max is 100
|
|
92
|
+
#
|
|
93
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
94
|
+
#
|
|
95
|
+
# @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::ProductCollectionListResponse>]
|
|
96
|
+
#
|
|
97
|
+
# @see Dodopayments::Models::ProductCollectionListParams
|
|
98
|
+
def list(params = {})
|
|
99
|
+
parsed, options = Dodopayments::ProductCollectionListParams.dump_request(params)
|
|
100
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
101
|
+
@client.request(
|
|
102
|
+
method: :get,
|
|
103
|
+
path: "product-collections",
|
|
104
|
+
query: query,
|
|
105
|
+
page: Dodopayments::Internal::DefaultPageNumberPagination,
|
|
106
|
+
model: Dodopayments::Models::ProductCollectionListResponse,
|
|
107
|
+
options: options
|
|
108
|
+
)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @overload delete(id, request_options: {})
|
|
112
|
+
#
|
|
113
|
+
# @param id [String] Product Collection Id
|
|
114
|
+
#
|
|
115
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
116
|
+
#
|
|
117
|
+
# @return [nil]
|
|
118
|
+
#
|
|
119
|
+
# @see Dodopayments::Models::ProductCollectionDeleteParams
|
|
120
|
+
def delete(id, params = {})
|
|
121
|
+
@client.request(
|
|
122
|
+
method: :delete,
|
|
123
|
+
path: ["product-collections/%1$s", id],
|
|
124
|
+
model: NilClass,
|
|
125
|
+
options: params[:request_options]
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# @overload unarchive(id, request_options: {})
|
|
130
|
+
#
|
|
131
|
+
# @param id [String] Product Collection Id
|
|
132
|
+
#
|
|
133
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
134
|
+
#
|
|
135
|
+
# @return [Dodopayments::Models::ProductCollectionUnarchiveResponse]
|
|
136
|
+
#
|
|
137
|
+
# @see Dodopayments::Models::ProductCollectionUnarchiveParams
|
|
138
|
+
def unarchive(id, params = {})
|
|
139
|
+
@client.request(
|
|
140
|
+
method: :post,
|
|
141
|
+
path: ["product-collections/%1$s/unarchive", id],
|
|
142
|
+
model: Dodopayments::Models::ProductCollectionUnarchiveResponse,
|
|
143
|
+
options: params[:request_options]
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @overload update_images(id, force_update: nil, request_options: {})
|
|
148
|
+
#
|
|
149
|
+
# @param id [String] Product Collection Id
|
|
150
|
+
#
|
|
151
|
+
# @param force_update [Boolean, nil] If true, generates a new image ID to force cache invalidation
|
|
152
|
+
#
|
|
153
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
154
|
+
#
|
|
155
|
+
# @return [Dodopayments::Models::ProductCollectionUpdateImagesResponse]
|
|
156
|
+
#
|
|
157
|
+
# @see Dodopayments::Models::ProductCollectionUpdateImagesParams
|
|
158
|
+
def update_images(id, params = {})
|
|
159
|
+
parsed, options = Dodopayments::ProductCollectionUpdateImagesParams.dump_request(params)
|
|
160
|
+
query = Dodopayments::Internal::Util.encode_query_params(parsed)
|
|
161
|
+
@client.request(
|
|
162
|
+
method: :put,
|
|
163
|
+
path: ["product-collections/%1$s/images", id],
|
|
164
|
+
query: query,
|
|
165
|
+
model: Dodopayments::Models::ProductCollectionUpdateImagesResponse,
|
|
166
|
+
options: options
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# @api private
|
|
171
|
+
#
|
|
172
|
+
# @param client [Dodopayments::Client]
|
|
173
|
+
def initialize(client:)
|
|
174
|
+
@client = client
|
|
175
|
+
@groups = Dodopayments::Resources::ProductCollections::Groups.new(client: client)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
@@ -8,7 +8,7 @@ module Dodopayments
|
|
|
8
8
|
# Some parameter documentations has been truncated, see
|
|
9
9
|
# {Dodopayments::Models::SubscriptionCreateParams} for more details.
|
|
10
10
|
#
|
|
11
|
-
# @overload create(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, discount_codes: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
11
|
+
# @overload create(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, customer_business_name: nil, discount_code: nil, discount_codes: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
12
12
|
#
|
|
13
13
|
# @param billing [Dodopayments::Models::BillingAddress] Billing address information for the subscription
|
|
14
14
|
#
|
|
@@ -24,6 +24,8 @@ module Dodopayments
|
|
|
24
24
|
#
|
|
25
25
|
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] Fix the currency in which the end customer is billed.
|
|
26
26
|
#
|
|
27
|
+
# @param customer_business_name [String, nil] Optional business / legal name associated with the tax id. When provided
|
|
28
|
+
#
|
|
27
29
|
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
28
30
|
#
|
|
29
31
|
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order of application. Max 20.
|
|
@@ -93,7 +95,7 @@ module Dodopayments
|
|
|
93
95
|
# Some parameter documentations has been truncated, see
|
|
94
96
|
# {Dodopayments::Models::SubscriptionUpdateParams} for more details.
|
|
95
97
|
#
|
|
96
|
-
# @overload update(subscription_id, billing: nil, cancel_at_next_billing_date: nil, cancel_reason: nil, cancellation_comment: nil, cancellation_feedback: nil, credit_entitlement_cart: nil, customer_name: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, tax_id: nil, request_options: {})
|
|
98
|
+
# @overload update(subscription_id, billing: nil, cancel_at_next_billing_date: nil, cancel_reason: nil, cancellation_comment: nil, cancellation_feedback: nil, credit_entitlement_cart: nil, customer_business_name: nil, customer_name: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, tax_id: nil, request_options: {})
|
|
97
99
|
#
|
|
98
100
|
# @param subscription_id [String] Subscription Id
|
|
99
101
|
#
|
|
@@ -109,6 +111,8 @@ module Dodopayments
|
|
|
109
111
|
#
|
|
110
112
|
# @param credit_entitlement_cart [Array<Dodopayments::Models::SubscriptionUpdateParams::CreditEntitlementCart>, nil] Update credit entitlement cart settings
|
|
111
113
|
#
|
|
114
|
+
# @param customer_business_name [String, nil] Optional business / legal name associated with the tax id. When provided
|
|
115
|
+
#
|
|
112
116
|
# @param customer_name [String, nil]
|
|
113
117
|
#
|
|
114
118
|
# @param disable_on_demand [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
|
|
@@ -405,11 +409,11 @@ module Dodopayments
|
|
|
405
409
|
)
|
|
406
410
|
end
|
|
407
411
|
|
|
408
|
-
# @overload update_payment_method(subscription_id,
|
|
412
|
+
# @overload update_payment_method(subscription_id, payment_method:, request_options: {})
|
|
409
413
|
#
|
|
410
414
|
# @param subscription_id [String] Subscription Id
|
|
411
415
|
#
|
|
412
|
-
# @param
|
|
416
|
+
# @param payment_method [Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::PaymentMethod::New, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::PaymentMethod::Existing]
|
|
413
417
|
#
|
|
414
418
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
415
419
|
#
|
|
@@ -421,7 +425,7 @@ module Dodopayments
|
|
|
421
425
|
@client.request(
|
|
422
426
|
method: :post,
|
|
423
427
|
path: ["subscriptions/%1$s/update-payment-method", subscription_id],
|
|
424
|
-
body: parsed[:
|
|
428
|
+
body: parsed[:payment_method],
|
|
425
429
|
model: Dodopayments::Models::SubscriptionUpdatePaymentMethodResponse,
|
|
426
430
|
options: options
|
|
427
431
|
)
|
data/lib/dodopayments/version.rb
CHANGED
data/lib/dodopayments.rb
CHANGED
|
@@ -56,6 +56,7 @@ require_relative "dodopayments/client"
|
|
|
56
56
|
require_relative "dodopayments/internal/cursor_page_pagination"
|
|
57
57
|
require_relative "dodopayments/internal/default_page_number_pagination"
|
|
58
58
|
require_relative "dodopayments/models/checkout_session_request"
|
|
59
|
+
require_relative "dodopayments/models/product_collections/product_collection_group_details"
|
|
59
60
|
require_relative "dodopayments/models/update_subscription_plan_req"
|
|
60
61
|
require_relative "dodopayments/models/entitlements/entitlement_grant"
|
|
61
62
|
require_relative "dodopayments/models/credit_entitlements/credit_ledger_entry"
|
|
@@ -162,6 +163,7 @@ require_relative "dodopayments/models/digital_product_delivery_file"
|
|
|
162
163
|
require_relative "dodopayments/models/discount"
|
|
163
164
|
require_relative "dodopayments/models/discount_create_params"
|
|
164
165
|
require_relative "dodopayments/models/discount_delete_params"
|
|
166
|
+
require_relative "dodopayments/models/discount_detail"
|
|
165
167
|
require_relative "dodopayments/models/discount_list_params"
|
|
166
168
|
require_relative "dodopayments/models/discount_retrieve_by_code_params"
|
|
167
169
|
require_relative "dodopayments/models/discount_retrieve_params"
|
|
@@ -202,10 +204,13 @@ require_relative "dodopayments/models/entitlement_update_params"
|
|
|
202
204
|
require_relative "dodopayments/models/event"
|
|
203
205
|
require_relative "dodopayments/models/event_input"
|
|
204
206
|
require_relative "dodopayments/models/filter_operator"
|
|
207
|
+
require_relative "dodopayments/models/filter_type"
|
|
208
|
+
require_relative "dodopayments/models/github_permission"
|
|
205
209
|
require_relative "dodopayments/models/integration_config"
|
|
206
210
|
require_relative "dodopayments/models/integration_config_response"
|
|
207
211
|
require_relative "dodopayments/models/intent_status"
|
|
208
212
|
require_relative "dodopayments/models/invoices/payment_retrieve_params"
|
|
213
|
+
require_relative "dodopayments/models/invoices/payment_retrieve_payout_params"
|
|
209
214
|
require_relative "dodopayments/models/invoices/payment_retrieve_refund_params"
|
|
210
215
|
require_relative "dodopayments/models/license_activate_params"
|
|
211
216
|
require_relative "dodopayments/models/license_activate_response"
|
|
@@ -261,6 +266,27 @@ require_relative "dodopayments/models/payouts/breakup_retrieve_response"
|
|
|
261
266
|
require_relative "dodopayments/models/price"
|
|
262
267
|
require_relative "dodopayments/models/product"
|
|
263
268
|
require_relative "dodopayments/models/product_archive_params"
|
|
269
|
+
require_relative "dodopayments/models/product_collection"
|
|
270
|
+
require_relative "dodopayments/models/product_collection_create_params"
|
|
271
|
+
require_relative "dodopayments/models/product_collection_delete_params"
|
|
272
|
+
require_relative "dodopayments/models/product_collection_list_params"
|
|
273
|
+
require_relative "dodopayments/models/product_collection_list_response"
|
|
274
|
+
require_relative "dodopayments/models/product_collection_retrieve_params"
|
|
275
|
+
require_relative "dodopayments/models/product_collections/group_create_params"
|
|
276
|
+
require_relative "dodopayments/models/product_collections/group_delete_params"
|
|
277
|
+
require_relative "dodopayments/models/product_collections/group_product"
|
|
278
|
+
require_relative "dodopayments/models/product_collections/groups/item_create_params"
|
|
279
|
+
require_relative "dodopayments/models/product_collections/groups/item_create_response"
|
|
280
|
+
require_relative "dodopayments/models/product_collections/groups/item_delete_params"
|
|
281
|
+
require_relative "dodopayments/models/product_collections/groups/item_update_params"
|
|
282
|
+
require_relative "dodopayments/models/product_collections/groups/product_collection_product"
|
|
283
|
+
require_relative "dodopayments/models/product_collections/group_update_params"
|
|
284
|
+
require_relative "dodopayments/models/product_collections/product_collection_group_response"
|
|
285
|
+
require_relative "dodopayments/models/product_collection_unarchive_params"
|
|
286
|
+
require_relative "dodopayments/models/product_collection_unarchive_response"
|
|
287
|
+
require_relative "dodopayments/models/product_collection_update_images_params"
|
|
288
|
+
require_relative "dodopayments/models/product_collection_update_images_response"
|
|
289
|
+
require_relative "dodopayments/models/product_collection_update_params"
|
|
264
290
|
require_relative "dodopayments/models/product_create_params"
|
|
265
291
|
require_relative "dodopayments/models/product_entitlement_summary"
|
|
266
292
|
require_relative "dodopayments/models/product_item_req"
|
|
@@ -365,6 +391,9 @@ require_relative "dodopayments/resources/payments"
|
|
|
365
391
|
require_relative "dodopayments/resources/payouts"
|
|
366
392
|
require_relative "dodopayments/resources/payouts/breakup"
|
|
367
393
|
require_relative "dodopayments/resources/payouts/breakup/details"
|
|
394
|
+
require_relative "dodopayments/resources/product_collections"
|
|
395
|
+
require_relative "dodopayments/resources/product_collections/groups"
|
|
396
|
+
require_relative "dodopayments/resources/product_collections/groups/items"
|
|
368
397
|
require_relative "dodopayments/resources/products"
|
|
369
398
|
require_relative "dodopayments/resources/products/images"
|
|
370
399
|
require_relative "dodopayments/resources/products/short_links"
|
data/rbi/dodopayments/client.rbi
CHANGED
|
@@ -95,6 +95,9 @@ module Dodopayments
|
|
|
95
95
|
sig { returns(Dodopayments::Resources::Entitlements) }
|
|
96
96
|
attr_reader :entitlements
|
|
97
97
|
|
|
98
|
+
sig { returns(Dodopayments::Resources::ProductCollections) }
|
|
99
|
+
attr_reader :product_collections
|
|
100
|
+
|
|
98
101
|
# @api private
|
|
99
102
|
sig { override.returns(T::Hash[String, String]) }
|
|
100
103
|
private def auth_headers
|
|
@@ -20,6 +20,19 @@ module Dodopayments
|
|
|
20
20
|
sig { params(allow_currency_selection: T::Boolean).void }
|
|
21
21
|
attr_writer :allow_currency_selection
|
|
22
22
|
|
|
23
|
+
# If true, the customer can supply or edit the business name associated with the
|
|
24
|
+
# tax id during checkout. Works independently of `allow_customer_editing_tax_id` —
|
|
25
|
+
# either flag (or `allow_tax_id`) is sufficient to let the customer override the
|
|
26
|
+
# session's business name. Typically set together with
|
|
27
|
+
# `allow_customer_editing_tax_id`.
|
|
28
|
+
#
|
|
29
|
+
# Default is false
|
|
30
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
31
|
+
attr_reader :allow_customer_editing_business_name
|
|
32
|
+
|
|
33
|
+
sig { params(allow_customer_editing_business_name: T::Boolean).void }
|
|
34
|
+
attr_writer :allow_customer_editing_business_name
|
|
35
|
+
|
|
23
36
|
sig { returns(T.nilable(T::Boolean)) }
|
|
24
37
|
attr_reader :allow_customer_editing_city
|
|
25
38
|
|
|
@@ -127,6 +140,7 @@ module Dodopayments
|
|
|
127
140
|
sig do
|
|
128
141
|
params(
|
|
129
142
|
allow_currency_selection: T::Boolean,
|
|
143
|
+
allow_customer_editing_business_name: T::Boolean,
|
|
130
144
|
allow_customer_editing_city: T::Boolean,
|
|
131
145
|
allow_customer_editing_country: T::Boolean,
|
|
132
146
|
allow_customer_editing_email: T::Boolean,
|
|
@@ -148,6 +162,14 @@ module Dodopayments
|
|
|
148
162
|
#
|
|
149
163
|
# Default is true
|
|
150
164
|
allow_currency_selection: nil,
|
|
165
|
+
# If true, the customer can supply or edit the business name associated with the
|
|
166
|
+
# tax id during checkout. Works independently of `allow_customer_editing_tax_id` —
|
|
167
|
+
# either flag (or `allow_tax_id`) is sufficient to let the customer override the
|
|
168
|
+
# session's business name. Typically set together with
|
|
169
|
+
# `allow_customer_editing_tax_id`.
|
|
170
|
+
#
|
|
171
|
+
# Default is false
|
|
172
|
+
allow_customer_editing_business_name: nil,
|
|
151
173
|
allow_customer_editing_city: nil,
|
|
152
174
|
allow_customer_editing_country: nil,
|
|
153
175
|
allow_customer_editing_email: nil,
|
|
@@ -189,6 +211,7 @@ module Dodopayments
|
|
|
189
211
|
override.returns(
|
|
190
212
|
{
|
|
191
213
|
allow_currency_selection: T::Boolean,
|
|
214
|
+
allow_customer_editing_business_name: T::Boolean,
|
|
192
215
|
allow_customer_editing_city: T::Boolean,
|
|
193
216
|
allow_customer_editing_country: T::Boolean,
|
|
194
217
|
allow_customer_editing_email: T::Boolean,
|