dodopayments 1.19.0 → 1.22.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 +57 -0
- data/README.md +5 -5
- data/lib/dodopayments/client.rb +4 -0
- data/lib/dodopayments/internal/default_page_number_pagination.rb +2 -2
- data/lib/dodopayments/internal/transport/base_client.rb +3 -3
- data/lib/dodopayments/internal/type/base_model.rb +1 -9
- data/lib/dodopayments/internal/type/request_parameters.rb +2 -8
- data/lib/dodopayments/internal/util.rb +20 -4
- data/lib/dodopayments/models/addon_cart_response_item.rb +23 -0
- data/lib/dodopayments/models/addon_create_params.rb +58 -0
- data/lib/dodopayments/models/addon_list_params.rb +30 -0
- data/lib/dodopayments/models/addon_response.rb +93 -0
- data/lib/dodopayments/models/addon_retrieve_params.rb +14 -0
- data/lib/dodopayments/models/addon_update_images_params.rb +14 -0
- data/lib/dodopayments/models/addon_update_images_response.rb +22 -0
- data/lib/dodopayments/models/addon_update_params.rb +66 -0
- data/lib/dodopayments/models/currency.rb +158 -0
- data/lib/dodopayments/models/dispute.rb +9 -2
- data/lib/dodopayments/models/dispute_list_response.rb +76 -0
- data/lib/dodopayments/models/dispute_retrieve_response.rb +99 -0
- data/lib/dodopayments/models/payment.rb +46 -315
- data/lib/dodopayments/models/payment_create_params.rb +3 -158
- data/lib/dodopayments/models/payment_list_response.rb +3 -157
- data/lib/dodopayments/models/payout_list_response.rb +3 -157
- data/lib/dodopayments/models/price.rb +6 -314
- data/lib/dodopayments/models/product.rb +3 -19
- data/lib/dodopayments/models/product_create_params.rb +3 -17
- data/lib/dodopayments/models/product_list_response.rb +6 -176
- data/lib/dodopayments/models/product_update_params.rb +3 -17
- data/lib/dodopayments/models/refund.rb +3 -157
- data/lib/dodopayments/models/subscription.rb +21 -158
- data/lib/dodopayments/models/subscription_change_plan_params.rb +31 -1
- data/lib/dodopayments/models/subscription_create_params.rb +30 -159
- data/lib/dodopayments/models/subscription_create_response.rb +10 -1
- data/lib/dodopayments/models/subscription_list_response.rb +179 -0
- data/lib/dodopayments/models/subscription_update_params.rb +19 -1
- data/lib/dodopayments/models/tax_category.rb +19 -0
- data/lib/dodopayments/models.rb +167 -0
- data/lib/dodopayments/resources/addons.rb +141 -0
- data/lib/dodopayments/resources/disputes.rb +4 -4
- data/lib/dodopayments/resources/invoices/payments.rb +3 -2
- data/lib/dodopayments/resources/payments.rb +1 -1
- data/lib/dodopayments/resources/products.rb +2 -2
- data/lib/dodopayments/resources/subscriptions.rb +15 -6
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +14 -0
- data/rbi/dodopayments/client.rbi +3 -0
- data/rbi/dodopayments/errors.rbi +1 -1
- data/rbi/dodopayments/internal/util.rbi +5 -1
- data/rbi/dodopayments/models/addon_cart_response_item.rbi +20 -0
- data/rbi/dodopayments/models/addon_create_params.rbi +69 -0
- data/rbi/dodopayments/models/addon_list_params.rbi +45 -0
- data/rbi/dodopayments/models/addon_response.rbi +103 -0
- data/rbi/dodopayments/models/addon_retrieve_params.rbi +19 -0
- data/rbi/dodopayments/models/addon_update_images_params.rbi +19 -0
- data/rbi/dodopayments/models/addon_update_images_response.rbi +19 -0
- data/rbi/dodopayments/models/addon_update_params.rbi +77 -0
- data/rbi/dodopayments/models/currency.rbi +161 -0
- data/rbi/dodopayments/models/dispute.rbi +11 -3
- data/rbi/dodopayments/models/dispute_list_response.rbi +85 -0
- data/rbi/dodopayments/models/dispute_retrieve_response.rbi +112 -0
- data/rbi/dodopayments/models/payment.rbi +47 -318
- data/rbi/dodopayments/models/payment_create_params.rbi +3 -159
- data/rbi/dodopayments/models/payment_list_response.rbi +3 -159
- data/rbi/dodopayments/models/payout_list_response.rbi +3 -159
- data/rbi/dodopayments/models/price.rbi +6 -318
- data/rbi/dodopayments/models/product.rbi +3 -20
- data/rbi/dodopayments/models/product_create_params.rbi +3 -21
- data/rbi/dodopayments/models/product_list_response.rbi +6 -180
- data/rbi/dodopayments/models/product_update_params.rbi +3 -21
- data/rbi/dodopayments/models/refund.rbi +3 -159
- data/rbi/dodopayments/models/subscription.rbi +19 -159
- data/rbi/dodopayments/models/subscription_change_plan_params.rbi +26 -0
- data/rbi/dodopayments/models/subscription_create_params.rbi +27 -160
- data/rbi/dodopayments/models/subscription_create_response.rbi +8 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +190 -0
- data/rbi/dodopayments/models/subscription_update_params.rbi +37 -1
- data/rbi/dodopayments/models/tax_category.rbi +22 -0
- data/rbi/dodopayments/models.rbi +167 -0
- data/rbi/dodopayments/resources/addons.rbi +97 -0
- data/rbi/dodopayments/resources/disputes.rbi +2 -2
- data/rbi/dodopayments/resources/invoices/payments.rbi +1 -1
- data/rbi/dodopayments/resources/payments.rbi +1 -1
- data/rbi/dodopayments/resources/products.rbi +2 -2
- data/rbi/dodopayments/resources/subscriptions.rbi +19 -2
- data/sig/dodopayments/client.rbs +2 -0
- data/sig/dodopayments/internal/util.rbs +2 -0
- data/sig/dodopayments/models/addon_cart_response_item.rbs +15 -0
- data/sig/dodopayments/models/addon_create_params.rbs +39 -0
- data/sig/dodopayments/models/addon_list_params.rbs +24 -0
- data/sig/dodopayments/models/addon_response.rbs +54 -0
- data/sig/dodopayments/models/addon_retrieve_params.rbs +15 -0
- data/sig/dodopayments/models/addon_update_images_params.rbs +15 -0
- data/sig/dodopayments/models/addon_update_images_response.rbs +15 -0
- data/sig/dodopayments/models/addon_update_params.rbs +43 -0
- data/sig/dodopayments/models/currency.rbs +302 -0
- data/sig/dodopayments/models/dispute.rbs +6 -2
- data/sig/dodopayments/models/dispute_list_response.rbs +46 -0
- data/sig/dodopayments/models/dispute_retrieve_response.rbs +58 -0
- data/sig/dodopayments/models/payment.rbs +26 -604
- data/sig/dodopayments/models/payment_create_params.rbs +3 -302
- data/sig/dodopayments/models/payment_list_response.rbs +3 -302
- data/sig/dodopayments/models/payout_list_response.rbs +3 -302
- data/sig/dodopayments/models/price.rbs +6 -604
- data/sig/dodopayments/models/product.rbs +3 -16
- data/sig/dodopayments/models/product_create_params.rbs +3 -16
- data/sig/dodopayments/models/product_list_response.rbs +6 -318
- data/sig/dodopayments/models/product_update_params.rbs +3 -16
- data/sig/dodopayments/models/refund.rbs +3 -302
- data/sig/dodopayments/models/subscription.rbs +11 -302
- data/sig/dodopayments/models/subscription_change_plan_params.rbs +17 -1
- data/sig/dodopayments/models/subscription_create_params.rbs +19 -302
- data/sig/dodopayments/models/subscription_create_response.rbs +4 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +98 -0
- data/sig/dodopayments/models/subscription_update_params.rbs +14 -0
- data/sig/dodopayments/models/tax_category.rbs +16 -0
- data/sig/dodopayments/models.rbs +165 -0
- data/sig/dodopayments/resources/addons.rbs +43 -0
- data/sig/dodopayments/resources/disputes.rbs +2 -2
- data/sig/dodopayments/resources/invoices/payments.rbs +1 -1
- data/sig/dodopayments/resources/payments.rbs +1 -1
- data/sig/dodopayments/resources/products.rbs +2 -2
- data/sig/dodopayments/resources/subscriptions.rbs +5 -2
- metadata +49 -4
@@ -6,7 +6,7 @@ module Dodopayments
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
7
7
|
# {Dodopayments::Models::SubscriptionCreateParams} for more details.
|
8
8
|
#
|
9
|
-
# @overload create(billing:, customer:, product_id:, quantity:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, metadata: nil, on_demand: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
9
|
+
# @overload create(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, metadata: nil, on_demand: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
10
10
|
#
|
11
11
|
# @param billing [Dodopayments::Models::BillingAddress]
|
12
12
|
#
|
@@ -16,9 +16,11 @@ module Dodopayments
|
|
16
16
|
#
|
17
17
|
# @param quantity [Integer] Number of units to subscribe for. Must be at least 1.
|
18
18
|
#
|
19
|
+
# @param addons [Array<Dodopayments::Models::SubscriptionCreateParams::Addon>, nil] Attach addons to this subscription
|
20
|
+
#
|
19
21
|
# @param allowed_payment_method_types [Array<Symbol, Dodopayments::Models::SubscriptionCreateParams::AllowedPaymentMethodType>, nil] List of payment methods allowed during checkout. ...
|
20
22
|
#
|
21
|
-
# @param billing_currency [Symbol, Dodopayments::Models::
|
23
|
+
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil]
|
22
24
|
#
|
23
25
|
# @param discount_code [String, nil] Discount Code to apply to the subscription
|
24
26
|
#
|
@@ -71,12 +73,14 @@ module Dodopayments
|
|
71
73
|
)
|
72
74
|
end
|
73
75
|
|
74
|
-
# @overload update(subscription_id, billing: nil, metadata: nil, status: nil, tax_id: nil, request_options: {})
|
76
|
+
# @overload update(subscription_id, billing: nil, disable_on_demand: nil, metadata: nil, status: nil, tax_id: nil, request_options: {})
|
75
77
|
#
|
76
78
|
# @param subscription_id [String] Subscription Id
|
77
79
|
#
|
78
80
|
# @param billing [Dodopayments::Models::BillingAddress, nil]
|
79
81
|
#
|
82
|
+
# @param disable_on_demand [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
|
83
|
+
#
|
80
84
|
# @param metadata [Hash{Symbol=>String}, nil]
|
81
85
|
#
|
82
86
|
# @param status [Symbol, Dodopayments::Models::SubscriptionStatus, nil]
|
@@ -115,7 +119,7 @@ module Dodopayments
|
|
115
119
|
#
|
116
120
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
117
121
|
#
|
118
|
-
# @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::
|
122
|
+
# @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::SubscriptionListResponse>]
|
119
123
|
#
|
120
124
|
# @see Dodopayments::Models::SubscriptionListParams
|
121
125
|
def list(params = {})
|
@@ -125,12 +129,15 @@ module Dodopayments
|
|
125
129
|
path: "subscriptions",
|
126
130
|
query: parsed,
|
127
131
|
page: Dodopayments::Internal::DefaultPageNumberPagination,
|
128
|
-
model: Dodopayments::Models::
|
132
|
+
model: Dodopayments::Models::SubscriptionListResponse,
|
129
133
|
options: options
|
130
134
|
)
|
131
135
|
end
|
132
136
|
|
133
|
-
#
|
137
|
+
# Some parameter documentations has been truncated, see
|
138
|
+
# {Dodopayments::Models::SubscriptionChangePlanParams} for more details.
|
139
|
+
#
|
140
|
+
# @overload change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, addons: nil, request_options: {})
|
134
141
|
#
|
135
142
|
# @param subscription_id [String] Subscription Id
|
136
143
|
#
|
@@ -140,6 +147,8 @@ module Dodopayments
|
|
140
147
|
#
|
141
148
|
# @param quantity [Integer] Number of units to subscribe for. Must be at least 1.
|
142
149
|
#
|
150
|
+
# @param addons [Array<Dodopayments::Models::SubscriptionChangePlanParams::Addon>, nil] Addons for the new plan. ...
|
151
|
+
#
|
143
152
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
144
153
|
#
|
145
154
|
# @return [nil]
|
data/lib/dodopayments/version.rb
CHANGED
data/lib/dodopayments.rb
CHANGED
@@ -47,10 +47,19 @@ require_relative "dodopayments/internal/transport/base_client"
|
|
47
47
|
require_relative "dodopayments/internal/transport/pooled_net_requester"
|
48
48
|
require_relative "dodopayments/client"
|
49
49
|
require_relative "dodopayments/internal/default_page_number_pagination"
|
50
|
+
require_relative "dodopayments/models/addon_cart_response_item"
|
51
|
+
require_relative "dodopayments/models/addon_create_params"
|
52
|
+
require_relative "dodopayments/models/addon_list_params"
|
53
|
+
require_relative "dodopayments/models/addon_response"
|
54
|
+
require_relative "dodopayments/models/addon_retrieve_params"
|
55
|
+
require_relative "dodopayments/models/addon_update_images_params"
|
56
|
+
require_relative "dodopayments/models/addon_update_images_response"
|
57
|
+
require_relative "dodopayments/models/addon_update_params"
|
50
58
|
require_relative "dodopayments/models/attach_existing_customer"
|
51
59
|
require_relative "dodopayments/models/billing_address"
|
52
60
|
require_relative "dodopayments/models/country_code"
|
53
61
|
require_relative "dodopayments/models/create_new_customer"
|
62
|
+
require_relative "dodopayments/models/currency"
|
54
63
|
require_relative "dodopayments/models/customer"
|
55
64
|
require_relative "dodopayments/models/customer_create_params"
|
56
65
|
require_relative "dodopayments/models/customer_limited_details"
|
@@ -69,7 +78,9 @@ require_relative "dodopayments/models/discount_type"
|
|
69
78
|
require_relative "dodopayments/models/discount_update_params"
|
70
79
|
require_relative "dodopayments/models/dispute"
|
71
80
|
require_relative "dodopayments/models/dispute_list_params"
|
81
|
+
require_relative "dodopayments/models/dispute_list_response"
|
72
82
|
require_relative "dodopayments/models/dispute_retrieve_params"
|
83
|
+
require_relative "dodopayments/models/dispute_retrieve_response"
|
73
84
|
require_relative "dodopayments/models/dispute_stage"
|
74
85
|
require_relative "dodopayments/models/dispute_status"
|
75
86
|
require_relative "dodopayments/models/intent_status"
|
@@ -122,13 +133,16 @@ require_relative "dodopayments/models/subscription_charge_response"
|
|
122
133
|
require_relative "dodopayments/models/subscription_create_params"
|
123
134
|
require_relative "dodopayments/models/subscription_create_response"
|
124
135
|
require_relative "dodopayments/models/subscription_list_params"
|
136
|
+
require_relative "dodopayments/models/subscription_list_response"
|
125
137
|
require_relative "dodopayments/models/subscription_retrieve_params"
|
126
138
|
require_relative "dodopayments/models/subscription_status"
|
127
139
|
require_relative "dodopayments/models/subscription_update_params"
|
140
|
+
require_relative "dodopayments/models/tax_category"
|
128
141
|
require_relative "dodopayments/models/time_interval"
|
129
142
|
require_relative "dodopayments/models/webhook_event"
|
130
143
|
require_relative "dodopayments/models/webhook_event_list_params"
|
131
144
|
require_relative "dodopayments/models/webhook_event_retrieve_params"
|
145
|
+
require_relative "dodopayments/resources/addons"
|
132
146
|
require_relative "dodopayments/resources/customers"
|
133
147
|
require_relative "dodopayments/resources/customers/customer_portal"
|
134
148
|
require_relative "dodopayments/resources/discounts"
|
data/rbi/dodopayments/client.rbi
CHANGED
@@ -62,6 +62,9 @@ module Dodopayments
|
|
62
62
|
sig { returns(Dodopayments::Resources::Discounts) }
|
63
63
|
attr_reader :discounts
|
64
64
|
|
65
|
+
sig { returns(Dodopayments::Resources::Addons) }
|
66
|
+
attr_reader :addons
|
67
|
+
|
65
68
|
# @api private
|
66
69
|
sig { override.returns(T::Hash[String, String]) }
|
67
70
|
private def auth_headers; end
|
data/rbi/dodopayments/errors.rbi
CHANGED
@@ -42,6 +42,10 @@ module Dodopayments
|
|
42
42
|
# @api private
|
43
43
|
sig { params(input: T.anything).returns(T.any(T::Hash[T.anything, T.anything], T.anything)) }
|
44
44
|
def coerce_hash(input); end
|
45
|
+
|
46
|
+
# @api private
|
47
|
+
sig { params(input: T.anything).returns(T.nilable(T::Hash[T.anything, T.anything])) }
|
48
|
+
def coerce_hash!(input); end
|
45
49
|
end
|
46
50
|
|
47
51
|
class << self
|
@@ -186,7 +190,7 @@ module Dodopayments
|
|
186
190
|
end
|
187
191
|
|
188
192
|
JSON_CONTENT = T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp)
|
189
|
-
JSONL_CONTENT = T.let(%r{^application/(?:x-)?jsonl}, Regexp)
|
193
|
+
JSONL_CONTENT = T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
|
190
194
|
|
191
195
|
class << self
|
192
196
|
# @api private
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class AddonCartResponseItem < Dodopayments::Internal::Type::BaseModel
|
6
|
+
sig { returns(String) }
|
7
|
+
attr_accessor :addon_id
|
8
|
+
|
9
|
+
sig { returns(Integer) }
|
10
|
+
attr_accessor :quantity
|
11
|
+
|
12
|
+
# Response struct representing subscription details
|
13
|
+
sig { params(addon_id: String, quantity: Integer).returns(T.attached_class) }
|
14
|
+
def self.new(addon_id:, quantity:); end
|
15
|
+
|
16
|
+
sig { override.returns({addon_id: String, quantity: Integer}) }
|
17
|
+
def to_hash; end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class AddonCreateParams < Dodopayments::Internal::Type::BaseModel
|
6
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
7
|
+
include Dodopayments::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
sig { returns(Dodopayments::Models::Currency::OrSymbol) }
|
10
|
+
attr_accessor :currency
|
11
|
+
|
12
|
+
# Name of the Addon
|
13
|
+
sig { returns(String) }
|
14
|
+
attr_accessor :name
|
15
|
+
|
16
|
+
# Amount of the addon
|
17
|
+
sig { returns(Integer) }
|
18
|
+
attr_accessor :price
|
19
|
+
|
20
|
+
# Represents the different categories of taxation applicable to various products
|
21
|
+
# and services.
|
22
|
+
sig { returns(Dodopayments::Models::TaxCategory::OrSymbol) }
|
23
|
+
attr_accessor :tax_category
|
24
|
+
|
25
|
+
# Optional description of the Addon
|
26
|
+
sig { returns(T.nilable(String)) }
|
27
|
+
attr_accessor :description
|
28
|
+
|
29
|
+
sig do
|
30
|
+
params(
|
31
|
+
currency: Dodopayments::Models::Currency::OrSymbol,
|
32
|
+
name: String,
|
33
|
+
price: Integer,
|
34
|
+
tax_category: Dodopayments::Models::TaxCategory::OrSymbol,
|
35
|
+
description: T.nilable(String),
|
36
|
+
request_options: T.any(Dodopayments::RequestOptions, Dodopayments::Internal::AnyHash)
|
37
|
+
)
|
38
|
+
.returns(T.attached_class)
|
39
|
+
end
|
40
|
+
def self.new(
|
41
|
+
currency:,
|
42
|
+
# Name of the Addon
|
43
|
+
name:,
|
44
|
+
# Amount of the addon
|
45
|
+
price:,
|
46
|
+
# Represents the different categories of taxation applicable to various products
|
47
|
+
# and services.
|
48
|
+
tax_category:,
|
49
|
+
# Optional description of the Addon
|
50
|
+
description: nil,
|
51
|
+
request_options: {}
|
52
|
+
); end
|
53
|
+
sig do
|
54
|
+
override
|
55
|
+
.returns(
|
56
|
+
{
|
57
|
+
currency: Dodopayments::Models::Currency::OrSymbol,
|
58
|
+
name: String,
|
59
|
+
price: Integer,
|
60
|
+
tax_category: Dodopayments::Models::TaxCategory::OrSymbol,
|
61
|
+
description: T.nilable(String),
|
62
|
+
request_options: Dodopayments::RequestOptions
|
63
|
+
}
|
64
|
+
)
|
65
|
+
end
|
66
|
+
def to_hash; end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class AddonListParams < Dodopayments::Internal::Type::BaseModel
|
6
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
7
|
+
include Dodopayments::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
# Page number default is 0
|
10
|
+
sig { returns(T.nilable(Integer)) }
|
11
|
+
attr_accessor :page_number
|
12
|
+
|
13
|
+
# Page size default is 10 max is 100
|
14
|
+
sig { returns(T.nilable(Integer)) }
|
15
|
+
attr_accessor :page_size
|
16
|
+
|
17
|
+
sig do
|
18
|
+
params(
|
19
|
+
page_number: T.nilable(Integer),
|
20
|
+
page_size: T.nilable(Integer),
|
21
|
+
request_options: T.any(Dodopayments::RequestOptions, Dodopayments::Internal::AnyHash)
|
22
|
+
)
|
23
|
+
.returns(T.attached_class)
|
24
|
+
end
|
25
|
+
def self.new(
|
26
|
+
# Page number default is 0
|
27
|
+
page_number: nil,
|
28
|
+
# Page size default is 10 max is 100
|
29
|
+
page_size: nil,
|
30
|
+
request_options: {}
|
31
|
+
); end
|
32
|
+
sig do
|
33
|
+
override
|
34
|
+
.returns(
|
35
|
+
{
|
36
|
+
page_number: T.nilable(Integer),
|
37
|
+
page_size: T.nilable(Integer),
|
38
|
+
request_options: Dodopayments::RequestOptions
|
39
|
+
}
|
40
|
+
)
|
41
|
+
end
|
42
|
+
def to_hash; end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class AddonResponse < Dodopayments::Internal::Type::BaseModel
|
6
|
+
# id of the Addon
|
7
|
+
sig { returns(String) }
|
8
|
+
attr_accessor :id
|
9
|
+
|
10
|
+
# Unique identifier for the business to which the addon belongs.
|
11
|
+
sig { returns(String) }
|
12
|
+
attr_accessor :business_id
|
13
|
+
|
14
|
+
# Created time
|
15
|
+
sig { returns(Time) }
|
16
|
+
attr_accessor :created_at
|
17
|
+
|
18
|
+
sig { returns(Dodopayments::Models::Currency::TaggedSymbol) }
|
19
|
+
attr_accessor :currency
|
20
|
+
|
21
|
+
# Name of the Addon
|
22
|
+
sig { returns(String) }
|
23
|
+
attr_accessor :name
|
24
|
+
|
25
|
+
# Amount of the addon
|
26
|
+
sig { returns(Integer) }
|
27
|
+
attr_accessor :price
|
28
|
+
|
29
|
+
# Represents the different categories of taxation applicable to various products
|
30
|
+
# and services.
|
31
|
+
sig { returns(Dodopayments::Models::TaxCategory::TaggedSymbol) }
|
32
|
+
attr_accessor :tax_category
|
33
|
+
|
34
|
+
# Updated time
|
35
|
+
sig { returns(Time) }
|
36
|
+
attr_accessor :updated_at
|
37
|
+
|
38
|
+
# Optional description of the Addon
|
39
|
+
sig { returns(T.nilable(String)) }
|
40
|
+
attr_accessor :description
|
41
|
+
|
42
|
+
# Image of the Addon
|
43
|
+
sig { returns(T.nilable(String)) }
|
44
|
+
attr_accessor :image
|
45
|
+
|
46
|
+
sig do
|
47
|
+
params(
|
48
|
+
id: String,
|
49
|
+
business_id: String,
|
50
|
+
created_at: Time,
|
51
|
+
currency: Dodopayments::Models::Currency::OrSymbol,
|
52
|
+
name: String,
|
53
|
+
price: Integer,
|
54
|
+
tax_category: Dodopayments::Models::TaxCategory::OrSymbol,
|
55
|
+
updated_at: Time,
|
56
|
+
description: T.nilable(String),
|
57
|
+
image: T.nilable(String)
|
58
|
+
)
|
59
|
+
.returns(T.attached_class)
|
60
|
+
end
|
61
|
+
def self.new(
|
62
|
+
# id of the Addon
|
63
|
+
id:,
|
64
|
+
# Unique identifier for the business to which the addon belongs.
|
65
|
+
business_id:,
|
66
|
+
# Created time
|
67
|
+
created_at:,
|
68
|
+
currency:,
|
69
|
+
# Name of the Addon
|
70
|
+
name:,
|
71
|
+
# Amount of the addon
|
72
|
+
price:,
|
73
|
+
# Represents the different categories of taxation applicable to various products
|
74
|
+
# and services.
|
75
|
+
tax_category:,
|
76
|
+
# Updated time
|
77
|
+
updated_at:,
|
78
|
+
# Optional description of the Addon
|
79
|
+
description: nil,
|
80
|
+
# Image of the Addon
|
81
|
+
image: nil
|
82
|
+
); end
|
83
|
+
sig do
|
84
|
+
override
|
85
|
+
.returns(
|
86
|
+
{
|
87
|
+
id: String,
|
88
|
+
business_id: String,
|
89
|
+
created_at: Time,
|
90
|
+
currency: Dodopayments::Models::Currency::TaggedSymbol,
|
91
|
+
name: String,
|
92
|
+
price: Integer,
|
93
|
+
tax_category: Dodopayments::Models::TaxCategory::TaggedSymbol,
|
94
|
+
updated_at: Time,
|
95
|
+
description: T.nilable(String),
|
96
|
+
image: T.nilable(String)
|
97
|
+
}
|
98
|
+
)
|
99
|
+
end
|
100
|
+
def to_hash; end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class AddonRetrieveParams < Dodopayments::Internal::Type::BaseModel
|
6
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
7
|
+
include Dodopayments::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
sig do
|
10
|
+
params(request_options: T.any(Dodopayments::RequestOptions, Dodopayments::Internal::AnyHash))
|
11
|
+
.returns(T.attached_class)
|
12
|
+
end
|
13
|
+
def self.new(request_options: {}); end
|
14
|
+
|
15
|
+
sig { override.returns({request_options: Dodopayments::RequestOptions}) }
|
16
|
+
def to_hash; end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class AddonUpdateImagesParams < Dodopayments::Internal::Type::BaseModel
|
6
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
7
|
+
include Dodopayments::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
sig do
|
10
|
+
params(request_options: T.any(Dodopayments::RequestOptions, Dodopayments::Internal::AnyHash))
|
11
|
+
.returns(T.attached_class)
|
12
|
+
end
|
13
|
+
def self.new(request_options: {}); end
|
14
|
+
|
15
|
+
sig { override.returns({request_options: Dodopayments::RequestOptions}) }
|
16
|
+
def to_hash; end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class AddonUpdateImagesResponse < Dodopayments::Internal::Type::BaseModel
|
6
|
+
sig { returns(String) }
|
7
|
+
attr_accessor :image_id
|
8
|
+
|
9
|
+
sig { returns(String) }
|
10
|
+
attr_accessor :url
|
11
|
+
|
12
|
+
sig { params(image_id: String, url: String).returns(T.attached_class) }
|
13
|
+
def self.new(image_id:, url:); end
|
14
|
+
|
15
|
+
sig { override.returns({image_id: String, url: String}) }
|
16
|
+
def to_hash; end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class AddonUpdateParams < Dodopayments::Internal::Type::BaseModel
|
6
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
7
|
+
include Dodopayments::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
sig { returns(T.nilable(Dodopayments::Models::Currency::OrSymbol)) }
|
10
|
+
attr_accessor :currency
|
11
|
+
|
12
|
+
# Description of the Addon, optional and must be at most 1000 characters.
|
13
|
+
sig { returns(T.nilable(String)) }
|
14
|
+
attr_accessor :description
|
15
|
+
|
16
|
+
# Addon image id after its uploaded to S3
|
17
|
+
sig { returns(T.nilable(String)) }
|
18
|
+
attr_accessor :image_id
|
19
|
+
|
20
|
+
# Name of the Addon, optional and must be at most 100 characters.
|
21
|
+
sig { returns(T.nilable(String)) }
|
22
|
+
attr_accessor :name
|
23
|
+
|
24
|
+
# Amount of the addon
|
25
|
+
sig { returns(T.nilable(Integer)) }
|
26
|
+
attr_accessor :price
|
27
|
+
|
28
|
+
# Represents the different categories of taxation applicable to various products
|
29
|
+
# and services.
|
30
|
+
sig { returns(T.nilable(Dodopayments::Models::TaxCategory::OrSymbol)) }
|
31
|
+
attr_accessor :tax_category
|
32
|
+
|
33
|
+
sig do
|
34
|
+
params(
|
35
|
+
currency: T.nilable(Dodopayments::Models::Currency::OrSymbol),
|
36
|
+
description: T.nilable(String),
|
37
|
+
image_id: T.nilable(String),
|
38
|
+
name: T.nilable(String),
|
39
|
+
price: T.nilable(Integer),
|
40
|
+
tax_category: T.nilable(Dodopayments::Models::TaxCategory::OrSymbol),
|
41
|
+
request_options: T.any(Dodopayments::RequestOptions, Dodopayments::Internal::AnyHash)
|
42
|
+
)
|
43
|
+
.returns(T.attached_class)
|
44
|
+
end
|
45
|
+
def self.new(
|
46
|
+
currency: nil,
|
47
|
+
# Description of the Addon, optional and must be at most 1000 characters.
|
48
|
+
description: nil,
|
49
|
+
# Addon image id after its uploaded to S3
|
50
|
+
image_id: nil,
|
51
|
+
# Name of the Addon, optional and must be at most 100 characters.
|
52
|
+
name: nil,
|
53
|
+
# Amount of the addon
|
54
|
+
price: nil,
|
55
|
+
# Represents the different categories of taxation applicable to various products
|
56
|
+
# and services.
|
57
|
+
tax_category: nil,
|
58
|
+
request_options: {}
|
59
|
+
); end
|
60
|
+
sig do
|
61
|
+
override
|
62
|
+
.returns(
|
63
|
+
{
|
64
|
+
currency: T.nilable(Dodopayments::Models::Currency::OrSymbol),
|
65
|
+
description: T.nilable(String),
|
66
|
+
image_id: T.nilable(String),
|
67
|
+
name: T.nilable(String),
|
68
|
+
price: T.nilable(Integer),
|
69
|
+
tax_category: T.nilable(Dodopayments::Models::TaxCategory::OrSymbol),
|
70
|
+
request_options: Dodopayments::RequestOptions
|
71
|
+
}
|
72
|
+
)
|
73
|
+
end
|
74
|
+
def to_hash; end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|