dodopayments 2.17.1 → 2.18.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 +8 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +14 -1
- data/lib/dodopayments/models/entitlements/grant_fulfill_license_key_params.rb +53 -0
- data/lib/dodopayments/models/metadata.rb +8 -0
- data/lib/dodopayments/models/payment_method_types.rb +1 -0
- data/lib/dodopayments/models/product.rb +3 -17
- data/lib/dodopayments/models/product_create_params.rb +3 -16
- data/lib/dodopayments/models/product_list_response.rb +3 -17
- data/lib/dodopayments/models/product_update_params.rb +3 -16
- data/lib/dodopayments/models/products/list_localized_prices_response.rb +18 -0
- data/lib/dodopayments/models/products/localized_price.rb +75 -0
- data/lib/dodopayments/models/products/localized_price_archive_params.rb +28 -0
- data/lib/dodopayments/models/products/localized_price_create_params.rb +51 -0
- data/lib/dodopayments/models/products/localized_price_list_params.rb +22 -0
- data/lib/dodopayments/models/products/localized_price_retrieve_params.rb +28 -0
- data/lib/dodopayments/models/products/localized_price_update_params.rb +42 -0
- data/lib/dodopayments/models/products/pricing_mode.rb +17 -0
- data/lib/dodopayments/models.rb +3 -0
- data/lib/dodopayments/resources/entitlements/grants.rb +35 -0
- data/lib/dodopayments/resources/products/localized_prices.rb +144 -0
- data/lib/dodopayments/resources/products.rb +6 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +11 -0
- data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +12 -0
- data/rbi/dodopayments/models/entitlements/grant_fulfill_license_key_params.rbi +74 -0
- data/rbi/dodopayments/models/metadata.rbi +11 -0
- data/rbi/dodopayments/models/payment_method_types.rbi +2 -0
- data/rbi/dodopayments/models/product.rbi +4 -26
- data/rbi/dodopayments/models/product_create_params.rbi +3 -43
- data/rbi/dodopayments/models/product_list_response.rbi +3 -47
- data/rbi/dodopayments/models/product_update_params.rbi +3 -43
- data/rbi/dodopayments/models/products/list_localized_prices_response.rbi +36 -0
- data/rbi/dodopayments/models/products/localized_price.rbi +98 -0
- data/rbi/dodopayments/models/products/localized_price_archive_params.rbi +48 -0
- data/rbi/dodopayments/models/products/localized_price_create_params.rbi +72 -0
- data/rbi/dodopayments/models/products/localized_price_list_params.rbi +43 -0
- data/rbi/dodopayments/models/products/localized_price_retrieve_params.rbi +48 -0
- data/rbi/dodopayments/models/products/localized_price_update_params.rbi +62 -0
- data/rbi/dodopayments/models/products/pricing_mode.rbi +28 -0
- data/rbi/dodopayments/models.rbi +6 -0
- data/rbi/dodopayments/resources/entitlements/grants.rbi +28 -0
- data/rbi/dodopayments/resources/products/localized_prices.rbi +103 -0
- data/rbi/dodopayments/resources/products.rbi +5 -2
- data/sig/dodopayments/models/checkout_session_request.rbs +4 -4
- data/sig/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rbs +4 -4
- data/sig/dodopayments/models/credit_entitlements/balance_list_grants_response.rbs +4 -4
- data/sig/dodopayments/models/credit_entitlements/credit_ledger_entry.rbs +5 -0
- data/sig/dodopayments/models/customer.rbs +7 -5
- data/sig/dodopayments/models/customer_create_params.rbs +7 -5
- data/sig/dodopayments/models/customer_limited_details.rbs +7 -5
- data/sig/dodopayments/models/customer_update_params.rbs +4 -4
- data/sig/dodopayments/models/discount.rbs +4 -4
- data/sig/dodopayments/models/discount_create_params.rbs +7 -5
- data/sig/dodopayments/models/discount_detail.rbs +4 -4
- data/sig/dodopayments/models/discount_update_params.rbs +4 -4
- data/sig/dodopayments/models/entitlement.rbs +4 -4
- data/sig/dodopayments/models/entitlement_create_params.rbs +7 -5
- data/sig/dodopayments/models/entitlement_update_params.rbs +4 -4
- data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +4 -4
- data/sig/dodopayments/models/entitlements/grant_fulfill_license_key_params.rbs +43 -0
- data/sig/dodopayments/models/metadata.rbs +7 -0
- data/sig/dodopayments/models/payment.rbs +4 -4
- data/sig/dodopayments/models/payment_create_params.rbs +7 -5
- data/sig/dodopayments/models/payment_create_response.rbs +4 -4
- data/sig/dodopayments/models/payment_list_response.rbs +4 -4
- data/sig/dodopayments/models/payment_method_types.rbs +2 -0
- data/sig/dodopayments/models/product.rbs +8 -19
- data/sig/dodopayments/models/product_create_params.rbs +11 -20
- data/sig/dodopayments/models/product_list_response.rbs +8 -19
- data/sig/dodopayments/models/product_update_params.rbs +8 -19
- data/sig/dodopayments/models/products/list_localized_prices_response.rbs +20 -0
- data/sig/dodopayments/models/products/localized_price.rbs +57 -0
- data/sig/dodopayments/models/products/localized_price_archive_params.rbs +30 -0
- data/sig/dodopayments/models/products/localized_price_create_params.rbs +43 -0
- data/sig/dodopayments/models/products/localized_price_list_params.rbs +26 -0
- data/sig/dodopayments/models/products/localized_price_retrieve_params.rbs +30 -0
- data/sig/dodopayments/models/products/localized_price_update_params.rbs +34 -0
- data/sig/dodopayments/models/products/pricing_mode.rbs +16 -0
- data/sig/dodopayments/models/refund.rbs +4 -4
- data/sig/dodopayments/models/refund_create_params.rbs +7 -5
- data/sig/dodopayments/models/subscription.rbs +4 -4
- data/sig/dodopayments/models/subscription_charge_params.rbs +4 -4
- data/sig/dodopayments/models/subscription_create_params.rbs +7 -5
- data/sig/dodopayments/models/subscription_create_response.rbs +4 -4
- data/sig/dodopayments/models/subscription_list_response.rbs +4 -4
- data/sig/dodopayments/models/subscription_update_params.rbs +4 -4
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +4 -4
- data/sig/dodopayments/models.rbs +2 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -2
- data/sig/dodopayments/resources/credit_entitlements/balances.rbs +1 -1
- data/sig/dodopayments/resources/customers.rbs +2 -2
- data/sig/dodopayments/resources/discounts.rbs +2 -2
- data/sig/dodopayments/resources/entitlements/grants.rbs +8 -0
- data/sig/dodopayments/resources/entitlements.rbs +2 -2
- data/sig/dodopayments/resources/payments.rbs +1 -1
- data/sig/dodopayments/resources/products/localized_prices.rbs +41 -0
- data/sig/dodopayments/resources/products.rbs +6 -4
- data/sig/dodopayments/resources/refunds.rbs +1 -1
- data/sig/dodopayments/resources/subscriptions.rbs +5 -5
- metadata +35 -2
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class Products
|
|
6
|
+
class LocalizedPrices
|
|
7
|
+
# Some parameter documentations has been truncated, see
|
|
8
|
+
# {Dodopayments::Models::Products::LocalizedPriceCreateParams} for more details.
|
|
9
|
+
#
|
|
10
|
+
# @overload create(product_id, amount:, currency:, country_code: nil, request_options: {})
|
|
11
|
+
#
|
|
12
|
+
# @param product_id [String] Product Id
|
|
13
|
+
#
|
|
14
|
+
# @param amount [Integer] Amount in the smallest currency unit (e.g., cents). Must be greater than zero.
|
|
15
|
+
#
|
|
16
|
+
# @param currency [Symbol, Dodopayments::Models::Currency] Currency to charge in. Must be a supported currency.
|
|
17
|
+
#
|
|
18
|
+
# @param country_code [Symbol, Dodopayments::Models::CountryCode, nil] Required when the product's pricing_mode is by_country; forbidden when by_curren
|
|
19
|
+
#
|
|
20
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
21
|
+
#
|
|
22
|
+
# @return [Dodopayments::Models::Products::LocalizedPrice]
|
|
23
|
+
#
|
|
24
|
+
# @see Dodopayments::Models::Products::LocalizedPriceCreateParams
|
|
25
|
+
def create(product_id, params)
|
|
26
|
+
parsed, options = Dodopayments::Products::LocalizedPriceCreateParams.dump_request(params)
|
|
27
|
+
@client.request(
|
|
28
|
+
method: :post,
|
|
29
|
+
path: ["products/%1$s/localized-prices", product_id],
|
|
30
|
+
body: parsed,
|
|
31
|
+
model: Dodopayments::Products::LocalizedPrice,
|
|
32
|
+
options: options
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @overload retrieve(id, product_id:, request_options: {})
|
|
37
|
+
#
|
|
38
|
+
# @param id [String] Localized Price Id
|
|
39
|
+
#
|
|
40
|
+
# @param product_id [String] Product Id
|
|
41
|
+
#
|
|
42
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
43
|
+
#
|
|
44
|
+
# @return [Dodopayments::Models::Products::LocalizedPrice]
|
|
45
|
+
#
|
|
46
|
+
# @see Dodopayments::Models::Products::LocalizedPriceRetrieveParams
|
|
47
|
+
def retrieve(id, params)
|
|
48
|
+
parsed, options = Dodopayments::Products::LocalizedPriceRetrieveParams.dump_request(params)
|
|
49
|
+
product_id =
|
|
50
|
+
parsed.delete(:product_id) do
|
|
51
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
52
|
+
end
|
|
53
|
+
@client.request(
|
|
54
|
+
method: :get,
|
|
55
|
+
path: ["products/%1$s/localized-prices/%2$s", product_id, id],
|
|
56
|
+
model: Dodopayments::Products::LocalizedPrice,
|
|
57
|
+
options: options
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Some parameter documentations has been truncated, see
|
|
62
|
+
# {Dodopayments::Models::Products::LocalizedPriceUpdateParams} for more details.
|
|
63
|
+
#
|
|
64
|
+
# @overload update(id, product_id:, amount: nil, request_options: {})
|
|
65
|
+
#
|
|
66
|
+
# @param id [String] Path param: Localized Price Id
|
|
67
|
+
#
|
|
68
|
+
# @param product_id [String] Path param: Product Id
|
|
69
|
+
#
|
|
70
|
+
# @param amount [Integer, nil] Body param: New amount in the smallest currency unit (e.g., cents). Must be grea
|
|
71
|
+
#
|
|
72
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
73
|
+
#
|
|
74
|
+
# @return [Dodopayments::Models::Products::LocalizedPrice]
|
|
75
|
+
#
|
|
76
|
+
# @see Dodopayments::Models::Products::LocalizedPriceUpdateParams
|
|
77
|
+
def update(id, params)
|
|
78
|
+
parsed, options = Dodopayments::Products::LocalizedPriceUpdateParams.dump_request(params)
|
|
79
|
+
product_id =
|
|
80
|
+
parsed.delete(:product_id) do
|
|
81
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
82
|
+
end
|
|
83
|
+
@client.request(
|
|
84
|
+
method: :patch,
|
|
85
|
+
path: ["products/%1$s/localized-prices/%2$s", product_id, id],
|
|
86
|
+
body: parsed,
|
|
87
|
+
model: Dodopayments::Products::LocalizedPrice,
|
|
88
|
+
options: options
|
|
89
|
+
)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# @overload list(product_id, request_options: {})
|
|
93
|
+
#
|
|
94
|
+
# @param product_id [String] Product Id
|
|
95
|
+
#
|
|
96
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
97
|
+
#
|
|
98
|
+
# @return [Dodopayments::Models::Products::ListLocalizedPricesResponse]
|
|
99
|
+
#
|
|
100
|
+
# @see Dodopayments::Models::Products::LocalizedPriceListParams
|
|
101
|
+
def list(product_id, params = {})
|
|
102
|
+
@client.request(
|
|
103
|
+
method: :get,
|
|
104
|
+
path: ["products/%1$s/localized-prices", product_id],
|
|
105
|
+
model: Dodopayments::Products::ListLocalizedPricesResponse,
|
|
106
|
+
options: params[:request_options]
|
|
107
|
+
)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# @overload archive(id, product_id:, request_options: {})
|
|
111
|
+
#
|
|
112
|
+
# @param id [String] Localized Price Id
|
|
113
|
+
#
|
|
114
|
+
# @param product_id [String] Product Id
|
|
115
|
+
#
|
|
116
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
117
|
+
#
|
|
118
|
+
# @return [nil]
|
|
119
|
+
#
|
|
120
|
+
# @see Dodopayments::Models::Products::LocalizedPriceArchiveParams
|
|
121
|
+
def archive(id, params)
|
|
122
|
+
parsed, options = Dodopayments::Products::LocalizedPriceArchiveParams.dump_request(params)
|
|
123
|
+
product_id =
|
|
124
|
+
parsed.delete(:product_id) do
|
|
125
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
126
|
+
end
|
|
127
|
+
@client.request(
|
|
128
|
+
method: :delete,
|
|
129
|
+
path: ["products/%1$s/localized-prices/%2$s", product_id, id],
|
|
130
|
+
model: NilClass,
|
|
131
|
+
options: options
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# @api private
|
|
136
|
+
#
|
|
137
|
+
# @param client [Dodopayments::Client]
|
|
138
|
+
def initialize(client:)
|
|
139
|
+
@client = client
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|
|
@@ -9,6 +9,9 @@ module Dodopayments
|
|
|
9
9
|
# @return [Dodopayments::Resources::Products::ShortLinks]
|
|
10
10
|
attr_reader :short_links
|
|
11
11
|
|
|
12
|
+
# @return [Dodopayments::Resources::Products::LocalizedPrices]
|
|
13
|
+
attr_reader :localized_prices
|
|
14
|
+
|
|
12
15
|
# Some parameter documentations has been truncated, see
|
|
13
16
|
# {Dodopayments::Models::ProductCreateParams} for more details.
|
|
14
17
|
#
|
|
@@ -42,7 +45,7 @@ module Dodopayments
|
|
|
42
45
|
#
|
|
43
46
|
# @param metadata [Hash{Symbol=>String}] Additional metadata for the product
|
|
44
47
|
#
|
|
45
|
-
# @param pricing_mode [Symbol, Dodopayments::Models::
|
|
48
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::Products::PricingMode, nil] Pricing mode for localized pricing. When set, rules from
|
|
46
49
|
#
|
|
47
50
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
48
51
|
#
|
|
@@ -113,7 +116,7 @@ module Dodopayments
|
|
|
113
116
|
#
|
|
114
117
|
# @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil] Price details of the product.
|
|
115
118
|
#
|
|
116
|
-
# @param pricing_mode [Symbol, Dodopayments::Models::
|
|
119
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::Products::PricingMode, nil] Update the pricing mode. Omit to leave unchanged; set to null to clear
|
|
117
120
|
#
|
|
118
121
|
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Tax category of the product.
|
|
119
122
|
#
|
|
@@ -231,6 +234,7 @@ module Dodopayments
|
|
|
231
234
|
@client = client
|
|
232
235
|
@images = Dodopayments::Resources::Products::Images.new(client: client)
|
|
233
236
|
@short_links = Dodopayments::Resources::Products::ShortLinks.new(client: client)
|
|
237
|
+
@localized_prices = Dodopayments::Resources::Products::LocalizedPrices.new(client: client)
|
|
234
238
|
end
|
|
235
239
|
end
|
|
236
240
|
end
|
data/lib/dodopayments/version.rb
CHANGED
data/lib/dodopayments.rb
CHANGED
|
@@ -197,6 +197,7 @@ require_relative "dodopayments/models/entitlement_retrieve_params"
|
|
|
197
197
|
require_relative "dodopayments/models/entitlements/file_delete_params"
|
|
198
198
|
require_relative "dodopayments/models/entitlements/file_upload_params"
|
|
199
199
|
require_relative "dodopayments/models/entitlements/file_upload_response"
|
|
200
|
+
require_relative "dodopayments/models/entitlements/grant_fulfill_license_key_params"
|
|
200
201
|
require_relative "dodopayments/models/entitlements/grant_list_params"
|
|
201
202
|
require_relative "dodopayments/models/entitlements/grant_revoke_params"
|
|
202
203
|
require_relative "dodopayments/models/entitlements/license_key_grant"
|
|
@@ -228,6 +229,7 @@ require_relative "dodopayments/models/license_key_status"
|
|
|
228
229
|
require_relative "dodopayments/models/license_key_update_params"
|
|
229
230
|
require_relative "dodopayments/models/license_validate_params"
|
|
230
231
|
require_relative "dodopayments/models/license_validate_response"
|
|
232
|
+
require_relative "dodopayments/models/metadata"
|
|
231
233
|
require_relative "dodopayments/models/meter"
|
|
232
234
|
require_relative "dodopayments/models/meter_aggregation"
|
|
233
235
|
require_relative "dodopayments/models/meter_archive_params"
|
|
@@ -295,6 +297,14 @@ require_relative "dodopayments/models/product_list_response"
|
|
|
295
297
|
require_relative "dodopayments/models/product_retrieve_params"
|
|
296
298
|
require_relative "dodopayments/models/products/image_update_params"
|
|
297
299
|
require_relative "dodopayments/models/products/image_update_response"
|
|
300
|
+
require_relative "dodopayments/models/products/list_localized_prices_response"
|
|
301
|
+
require_relative "dodopayments/models/products/localized_price"
|
|
302
|
+
require_relative "dodopayments/models/products/localized_price_archive_params"
|
|
303
|
+
require_relative "dodopayments/models/products/localized_price_create_params"
|
|
304
|
+
require_relative "dodopayments/models/products/localized_price_list_params"
|
|
305
|
+
require_relative "dodopayments/models/products/localized_price_retrieve_params"
|
|
306
|
+
require_relative "dodopayments/models/products/localized_price_update_params"
|
|
307
|
+
require_relative "dodopayments/models/products/pricing_mode"
|
|
298
308
|
require_relative "dodopayments/models/products/short_link_create_params"
|
|
299
309
|
require_relative "dodopayments/models/products/short_link_create_response"
|
|
300
310
|
require_relative "dodopayments/models/products/short_link_list_params"
|
|
@@ -396,6 +406,7 @@ require_relative "dodopayments/resources/product_collections/groups"
|
|
|
396
406
|
require_relative "dodopayments/resources/product_collections/groups/items"
|
|
397
407
|
require_relative "dodopayments/resources/products"
|
|
398
408
|
require_relative "dodopayments/resources/products/images"
|
|
409
|
+
require_relative "dodopayments/resources/products/localized_prices"
|
|
399
410
|
require_relative "dodopayments/resources/products/short_links"
|
|
400
411
|
require_relative "dodopayments/resources/refunds"
|
|
401
412
|
require_relative "dodopayments/resources/subscriptions"
|
|
@@ -43,6 +43,12 @@ module Dodopayments
|
|
|
43
43
|
sig { returns(T::Boolean) }
|
|
44
44
|
attr_accessor :is_credit
|
|
45
45
|
|
|
46
|
+
# Metadata associated with the credit grant's source (the subscription or payment
|
|
47
|
+
# created at checkout). Empty when the grant has no resolvable source (e.g.
|
|
48
|
+
# credits granted directly via the API).
|
|
49
|
+
sig { returns(T::Hash[Symbol, String]) }
|
|
50
|
+
attr_accessor :metadata
|
|
51
|
+
|
|
46
52
|
sig { returns(String) }
|
|
47
53
|
attr_accessor :overage_after
|
|
48
54
|
|
|
@@ -81,6 +87,7 @@ module Dodopayments
|
|
|
81
87
|
credit_entitlement_id: String,
|
|
82
88
|
customer_id: String,
|
|
83
89
|
is_credit: T::Boolean,
|
|
90
|
+
metadata: T::Hash[Symbol, String],
|
|
84
91
|
overage_after: String,
|
|
85
92
|
overage_before: String,
|
|
86
93
|
transaction_type:
|
|
@@ -103,6 +110,10 @@ module Dodopayments
|
|
|
103
110
|
credit_entitlement_id:,
|
|
104
111
|
customer_id:,
|
|
105
112
|
is_credit:,
|
|
113
|
+
# Metadata associated with the credit grant's source (the subscription or payment
|
|
114
|
+
# created at checkout). Empty when the grant has no resolvable source (e.g.
|
|
115
|
+
# credits granted directly via the API).
|
|
116
|
+
metadata:,
|
|
106
117
|
overage_after:,
|
|
107
118
|
overage_before:,
|
|
108
119
|
transaction_type:,
|
|
@@ -126,6 +137,7 @@ module Dodopayments
|
|
|
126
137
|
credit_entitlement_id: String,
|
|
127
138
|
customer_id: String,
|
|
128
139
|
is_credit: T::Boolean,
|
|
140
|
+
metadata: T::Hash[Symbol, String],
|
|
129
141
|
overage_after: String,
|
|
130
142
|
overage_before: String,
|
|
131
143
|
transaction_type:
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Entitlements
|
|
6
|
+
class GrantFulfillLicenseKeyParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Dodopayments::Entitlements::GrantFulfillLicenseKeyParams,
|
|
14
|
+
Dodopayments::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :grant_id
|
|
20
|
+
|
|
21
|
+
# The license key value to deliver to the customer.
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
attr_accessor :key
|
|
24
|
+
|
|
25
|
+
# Per-key activation limit. Defaults to the entitlement's license-key
|
|
26
|
+
# configuration.
|
|
27
|
+
sig { returns(T.nilable(Integer)) }
|
|
28
|
+
attr_accessor :activations_limit
|
|
29
|
+
|
|
30
|
+
# When the key expires. Defaults to the duration in the entitlement's license-key
|
|
31
|
+
# configuration.
|
|
32
|
+
sig { returns(T.nilable(Time)) }
|
|
33
|
+
attr_accessor :expires_at
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
grant_id: String,
|
|
38
|
+
key: String,
|
|
39
|
+
activations_limit: T.nilable(Integer),
|
|
40
|
+
expires_at: T.nilable(Time),
|
|
41
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
grant_id:,
|
|
46
|
+
# The license key value to deliver to the customer.
|
|
47
|
+
key:,
|
|
48
|
+
# Per-key activation limit. Defaults to the entitlement's license-key
|
|
49
|
+
# configuration.
|
|
50
|
+
activations_limit: nil,
|
|
51
|
+
# When the key expires. Defaults to the duration in the entitlement's license-key
|
|
52
|
+
# configuration.
|
|
53
|
+
expires_at: nil,
|
|
54
|
+
request_options: {}
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
sig do
|
|
59
|
+
override.returns(
|
|
60
|
+
{
|
|
61
|
+
grant_id: String,
|
|
62
|
+
key: String,
|
|
63
|
+
activations_limit: T.nilable(Integer),
|
|
64
|
+
expires_at: T.nilable(Time),
|
|
65
|
+
request_options: Dodopayments::RequestOptions
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
def to_hash
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -212,6 +212,8 @@ module Dodopayments
|
|
|
212
212
|
NAVER_PAY =
|
|
213
213
|
T.let(:naver_pay, Dodopayments::PaymentMethodTypes::TaggedSymbol)
|
|
214
214
|
PAYCO = T.let(:payco, Dodopayments::PaymentMethodTypes::TaggedSymbol)
|
|
215
|
+
SATISPAY =
|
|
216
|
+
T.let(:satispay, Dodopayments::PaymentMethodTypes::TaggedSymbol)
|
|
215
217
|
|
|
216
218
|
sig do
|
|
217
219
|
override.returns(
|
|
@@ -107,7 +107,7 @@ module Dodopayments
|
|
|
107
107
|
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
108
108
|
# apply).
|
|
109
109
|
sig do
|
|
110
|
-
returns(T.nilable(Dodopayments::
|
|
110
|
+
returns(T.nilable(Dodopayments::Products::PricingMode::TaggedSymbol))
|
|
111
111
|
end
|
|
112
112
|
attr_accessor :pricing_mode
|
|
113
113
|
|
|
@@ -146,7 +146,8 @@ module Dodopayments
|
|
|
146
146
|
license_key_duration:
|
|
147
147
|
T.nilable(Dodopayments::LicenseKeyDuration::OrHash),
|
|
148
148
|
name: T.nilable(String),
|
|
149
|
-
pricing_mode:
|
|
149
|
+
pricing_mode:
|
|
150
|
+
T.nilable(Dodopayments::Products::PricingMode::OrSymbol),
|
|
150
151
|
product_collection_id: T.nilable(String)
|
|
151
152
|
).returns(T.attached_class)
|
|
152
153
|
end
|
|
@@ -225,36 +226,13 @@ module Dodopayments
|
|
|
225
226
|
license_key_duration: T.nilable(Dodopayments::LicenseKeyDuration),
|
|
226
227
|
name: T.nilable(String),
|
|
227
228
|
pricing_mode:
|
|
228
|
-
T.nilable(Dodopayments::
|
|
229
|
+
T.nilable(Dodopayments::Products::PricingMode::TaggedSymbol),
|
|
229
230
|
product_collection_id: T.nilable(String)
|
|
230
231
|
}
|
|
231
232
|
)
|
|
232
233
|
end
|
|
233
234
|
def to_hash
|
|
234
235
|
end
|
|
235
|
-
|
|
236
|
-
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
237
|
-
# apply).
|
|
238
|
-
module PricingMode
|
|
239
|
-
extend Dodopayments::Internal::Type::Enum
|
|
240
|
-
|
|
241
|
-
TaggedSymbol =
|
|
242
|
-
T.type_alias { T.all(Symbol, Dodopayments::Product::PricingMode) }
|
|
243
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
244
|
-
|
|
245
|
-
BY_CURRENCY =
|
|
246
|
-
T.let(:by_currency, Dodopayments::Product::PricingMode::TaggedSymbol)
|
|
247
|
-
BY_COUNTRY =
|
|
248
|
-
T.let(:by_country, Dodopayments::Product::PricingMode::TaggedSymbol)
|
|
249
|
-
|
|
250
|
-
sig do
|
|
251
|
-
override.returns(
|
|
252
|
-
T::Array[Dodopayments::Product::PricingMode::TaggedSymbol]
|
|
253
|
-
)
|
|
254
|
-
end
|
|
255
|
-
def self.values
|
|
256
|
-
end
|
|
257
|
-
end
|
|
258
236
|
end
|
|
259
237
|
end
|
|
260
238
|
end
|
|
@@ -127,11 +127,7 @@ module Dodopayments
|
|
|
127
127
|
# Pricing mode for localized pricing. When set, rules from
|
|
128
128
|
# /products/{id}/localized-prices apply at checkout. NULL means base-only
|
|
129
129
|
# (existing behavior).
|
|
130
|
-
sig
|
|
131
|
-
returns(
|
|
132
|
-
T.nilable(Dodopayments::ProductCreateParams::PricingMode::OrSymbol)
|
|
133
|
-
)
|
|
134
|
-
end
|
|
130
|
+
sig { returns(T.nilable(Dodopayments::Products::PricingMode::OrSymbol)) }
|
|
135
131
|
attr_accessor :pricing_mode
|
|
136
132
|
|
|
137
133
|
sig do
|
|
@@ -162,7 +158,7 @@ module Dodopayments
|
|
|
162
158
|
license_key_enabled: T.nilable(T::Boolean),
|
|
163
159
|
metadata: T::Hash[Symbol, String],
|
|
164
160
|
pricing_mode:
|
|
165
|
-
T.nilable(Dodopayments::
|
|
161
|
+
T.nilable(Dodopayments::Products::PricingMode::OrSymbol),
|
|
166
162
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
167
163
|
).returns(T.attached_class)
|
|
168
164
|
end
|
|
@@ -248,9 +244,7 @@ module Dodopayments
|
|
|
248
244
|
license_key_enabled: T.nilable(T::Boolean),
|
|
249
245
|
metadata: T::Hash[Symbol, String],
|
|
250
246
|
pricing_mode:
|
|
251
|
-
T.nilable(
|
|
252
|
-
Dodopayments::ProductCreateParams::PricingMode::OrSymbol
|
|
253
|
-
),
|
|
247
|
+
T.nilable(Dodopayments::Products::PricingMode::OrSymbol),
|
|
254
248
|
request_options: Dodopayments::RequestOptions
|
|
255
249
|
}
|
|
256
250
|
)
|
|
@@ -300,40 +294,6 @@ module Dodopayments
|
|
|
300
294
|
def to_hash
|
|
301
295
|
end
|
|
302
296
|
end
|
|
303
|
-
|
|
304
|
-
# Pricing mode for localized pricing. When set, rules from
|
|
305
|
-
# /products/{id}/localized-prices apply at checkout. NULL means base-only
|
|
306
|
-
# (existing behavior).
|
|
307
|
-
module PricingMode
|
|
308
|
-
extend Dodopayments::Internal::Type::Enum
|
|
309
|
-
|
|
310
|
-
TaggedSymbol =
|
|
311
|
-
T.type_alias do
|
|
312
|
-
T.all(Symbol, Dodopayments::ProductCreateParams::PricingMode)
|
|
313
|
-
end
|
|
314
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
315
|
-
|
|
316
|
-
BY_CURRENCY =
|
|
317
|
-
T.let(
|
|
318
|
-
:by_currency,
|
|
319
|
-
Dodopayments::ProductCreateParams::PricingMode::TaggedSymbol
|
|
320
|
-
)
|
|
321
|
-
BY_COUNTRY =
|
|
322
|
-
T.let(
|
|
323
|
-
:by_country,
|
|
324
|
-
Dodopayments::ProductCreateParams::PricingMode::TaggedSymbol
|
|
325
|
-
)
|
|
326
|
-
|
|
327
|
-
sig do
|
|
328
|
-
override.returns(
|
|
329
|
-
T::Array[
|
|
330
|
-
Dodopayments::ProductCreateParams::PricingMode::TaggedSymbol
|
|
331
|
-
]
|
|
332
|
-
)
|
|
333
|
-
end
|
|
334
|
-
def self.values
|
|
335
|
-
end
|
|
336
|
-
end
|
|
337
297
|
end
|
|
338
298
|
end
|
|
339
299
|
end
|
|
@@ -79,11 +79,7 @@ module Dodopayments
|
|
|
79
79
|
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
80
80
|
# apply).
|
|
81
81
|
sig do
|
|
82
|
-
returns(
|
|
83
|
-
T.nilable(
|
|
84
|
-
Dodopayments::Models::ProductListResponse::PricingMode::TaggedSymbol
|
|
85
|
-
)
|
|
86
|
-
)
|
|
82
|
+
returns(T.nilable(Dodopayments::Products::PricingMode::TaggedSymbol))
|
|
87
83
|
end
|
|
88
84
|
attr_accessor :pricing_mode
|
|
89
85
|
|
|
@@ -116,9 +112,7 @@ module Dodopayments
|
|
|
116
112
|
)
|
|
117
113
|
),
|
|
118
114
|
pricing_mode:
|
|
119
|
-
T.nilable(
|
|
120
|
-
Dodopayments::Models::ProductListResponse::PricingMode::OrSymbol
|
|
121
|
-
),
|
|
115
|
+
T.nilable(Dodopayments::Products::PricingMode::OrSymbol),
|
|
122
116
|
tax_inclusive: T.nilable(T::Boolean)
|
|
123
117
|
).returns(T.attached_class)
|
|
124
118
|
end
|
|
@@ -186,51 +180,13 @@ module Dodopayments
|
|
|
186
180
|
price: T.nilable(Integer),
|
|
187
181
|
price_detail: T.nilable(Dodopayments::Price::Variants),
|
|
188
182
|
pricing_mode:
|
|
189
|
-
T.nilable(
|
|
190
|
-
Dodopayments::Models::ProductListResponse::PricingMode::TaggedSymbol
|
|
191
|
-
),
|
|
183
|
+
T.nilable(Dodopayments::Products::PricingMode::TaggedSymbol),
|
|
192
184
|
tax_inclusive: T.nilable(T::Boolean)
|
|
193
185
|
}
|
|
194
186
|
)
|
|
195
187
|
end
|
|
196
188
|
def to_hash
|
|
197
189
|
end
|
|
198
|
-
|
|
199
|
-
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
200
|
-
# apply).
|
|
201
|
-
module PricingMode
|
|
202
|
-
extend Dodopayments::Internal::Type::Enum
|
|
203
|
-
|
|
204
|
-
TaggedSymbol =
|
|
205
|
-
T.type_alias do
|
|
206
|
-
T.all(
|
|
207
|
-
Symbol,
|
|
208
|
-
Dodopayments::Models::ProductListResponse::PricingMode
|
|
209
|
-
)
|
|
210
|
-
end
|
|
211
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
212
|
-
|
|
213
|
-
BY_CURRENCY =
|
|
214
|
-
T.let(
|
|
215
|
-
:by_currency,
|
|
216
|
-
Dodopayments::Models::ProductListResponse::PricingMode::TaggedSymbol
|
|
217
|
-
)
|
|
218
|
-
BY_COUNTRY =
|
|
219
|
-
T.let(
|
|
220
|
-
:by_country,
|
|
221
|
-
Dodopayments::Models::ProductListResponse::PricingMode::TaggedSymbol
|
|
222
|
-
)
|
|
223
|
-
|
|
224
|
-
sig do
|
|
225
|
-
override.returns(
|
|
226
|
-
T::Array[
|
|
227
|
-
Dodopayments::Models::ProductListResponse::PricingMode::TaggedSymbol
|
|
228
|
-
]
|
|
229
|
-
)
|
|
230
|
-
end
|
|
231
|
-
def self.values
|
|
232
|
-
end
|
|
233
|
-
end
|
|
234
190
|
end
|
|
235
191
|
end
|
|
236
192
|
end
|
|
@@ -135,11 +135,7 @@ module Dodopayments
|
|
|
135
135
|
# Update the pricing mode. Omit to leave unchanged; set to null to clear (which
|
|
136
136
|
# archives all active localized rules for this product). Changing to a different
|
|
137
137
|
# non-null mode also archives any rules whose mode doesn't match the new mode.
|
|
138
|
-
sig
|
|
139
|
-
returns(
|
|
140
|
-
T.nilable(Dodopayments::ProductUpdateParams::PricingMode::OrSymbol)
|
|
141
|
-
)
|
|
142
|
-
end
|
|
138
|
+
sig { returns(T.nilable(Dodopayments::Products::PricingMode::OrSymbol)) }
|
|
143
139
|
attr_accessor :pricing_mode
|
|
144
140
|
|
|
145
141
|
# Tax category of the product.
|
|
@@ -177,7 +173,7 @@ module Dodopayments
|
|
|
177
173
|
)
|
|
178
174
|
),
|
|
179
175
|
pricing_mode:
|
|
180
|
-
T.nilable(Dodopayments::
|
|
176
|
+
T.nilable(Dodopayments::Products::PricingMode::OrSymbol),
|
|
181
177
|
tax_category: T.nilable(Dodopayments::TaxCategory::OrSymbol),
|
|
182
178
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
183
179
|
).returns(T.attached_class)
|
|
@@ -276,9 +272,7 @@ module Dodopayments
|
|
|
276
272
|
)
|
|
277
273
|
),
|
|
278
274
|
pricing_mode:
|
|
279
|
-
T.nilable(
|
|
280
|
-
Dodopayments::ProductUpdateParams::PricingMode::OrSymbol
|
|
281
|
-
),
|
|
275
|
+
T.nilable(Dodopayments::Products::PricingMode::OrSymbol),
|
|
282
276
|
tax_category: T.nilable(Dodopayments::TaxCategory::OrSymbol),
|
|
283
277
|
request_options: Dodopayments::RequestOptions
|
|
284
278
|
}
|
|
@@ -340,40 +334,6 @@ module Dodopayments
|
|
|
340
334
|
def to_hash
|
|
341
335
|
end
|
|
342
336
|
end
|
|
343
|
-
|
|
344
|
-
# Update the pricing mode. Omit to leave unchanged; set to null to clear (which
|
|
345
|
-
# archives all active localized rules for this product). Changing to a different
|
|
346
|
-
# non-null mode also archives any rules whose mode doesn't match the new mode.
|
|
347
|
-
module PricingMode
|
|
348
|
-
extend Dodopayments::Internal::Type::Enum
|
|
349
|
-
|
|
350
|
-
TaggedSymbol =
|
|
351
|
-
T.type_alias do
|
|
352
|
-
T.all(Symbol, Dodopayments::ProductUpdateParams::PricingMode)
|
|
353
|
-
end
|
|
354
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
355
|
-
|
|
356
|
-
BY_CURRENCY =
|
|
357
|
-
T.let(
|
|
358
|
-
:by_currency,
|
|
359
|
-
Dodopayments::ProductUpdateParams::PricingMode::TaggedSymbol
|
|
360
|
-
)
|
|
361
|
-
BY_COUNTRY =
|
|
362
|
-
T.let(
|
|
363
|
-
:by_country,
|
|
364
|
-
Dodopayments::ProductUpdateParams::PricingMode::TaggedSymbol
|
|
365
|
-
)
|
|
366
|
-
|
|
367
|
-
sig do
|
|
368
|
-
override.returns(
|
|
369
|
-
T::Array[
|
|
370
|
-
Dodopayments::ProductUpdateParams::PricingMode::TaggedSymbol
|
|
371
|
-
]
|
|
372
|
-
)
|
|
373
|
-
end
|
|
374
|
-
def self.values
|
|
375
|
-
end
|
|
376
|
-
end
|
|
377
337
|
end
|
|
378
338
|
end
|
|
379
339
|
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
class ListLocalizedPricesResponse < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Dodopayments::Products::ListLocalizedPricesResponse,
|
|
11
|
+
Dodopayments::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sig { returns(T::Array[Dodopayments::Products::LocalizedPrice]) }
|
|
16
|
+
attr_accessor :items
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
items: T::Array[Dodopayments::Products::LocalizedPrice::OrHash]
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(items:)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ items: T::Array[Dodopayments::Products::LocalizedPrice] }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|