dodopayments 2.17.1 → 2.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/attach_addon.rb +3 -1
- data/lib/dodopayments/models/checkout_session_flags.rb +12 -1
- data/lib/dodopayments/models/credit_entitlement.rb +2 -1
- data/lib/dodopayments/models/credit_entitlement_cart_response.rb +2 -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/license_key_duration.rb +3 -1
- data/lib/dodopayments/models/metadata.rb +8 -0
- data/lib/dodopayments/models/payment.rb +2 -2
- 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/subscription_update_params.rb +12 -1
- data/lib/dodopayments/models/time_interval.rb +1 -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/attach_addon.rbi +6 -1
- data/rbi/dodopayments/models/checkout_session_flags.rbi +17 -0
- data/rbi/dodopayments/models/credit_entitlement.rbi +2 -0
- data/rbi/dodopayments/models/credit_entitlement_cart_response.rbi +2 -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/license_key_duration.rbi +6 -1
- data/rbi/dodopayments/models/metadata.rbi +11 -0
- data/rbi/dodopayments/models/payment.rbi +2 -2
- 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/subscription_update_params.rbi +2 -0
- data/rbi/dodopayments/models/time_interval.rbi +1 -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_flags.rbs +7 -0
- 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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 53e205dc9f7e8ee7ebdaeb422170dbc186e5a6f7e06d1c3cfb535351c9aded9b
|
|
4
|
+
data.tar.gz: 889f3b95deae7e7e27703e2792a42c7eacca334b62f077aaea57882b5d26efc8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9921852a50435bbccfead823afd4b085c8872a4c1b52fec15f7956a9dfe216faea6d93ad7f054dcf24339d062f2fad55f91cb4464f13470782c47288fa011187
|
|
7
|
+
data.tar.gz: 7376387a8df94f986e4e8a0fdcef6df3ce6f0b4b5048e30cddb4758e3414aaecdb538765bcae277086a143fdff466a37740cc42925792816add2c23f6f201f8f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.18.1](https://github.com/dodopayments/dodopayments-ruby/compare/v2.18.0...v2.18.1) (2026-06-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **api:** add allow_editing_addons checkout flag and refine schema descriptions ([bb29016](https://github.com/dodopayments/dodopayments-ruby/commit/bb29016fe5ae1b7d8cfca80131645f699f99f928))
|
|
9
|
+
* **api:** add allow_editing_addons checkout flag and refine schema descriptions ([c8bca49](https://github.com/dodopayments/dodopayments-ruby/commit/c8bca49c58066c378d071a2a353e24986d6c6134))
|
|
10
|
+
|
|
11
|
+
## [2.18.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.17.1...v2.18.0) (2026-06-23)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **api:** regenerate SDK from latest OpenAPI spec ([c67cd5d](https://github.com/dodopayments/dodopayments-ruby/commit/c67cd5d823eb140d150788457cdc813616629904))
|
|
17
|
+
* **api:** regenerate SDK from latest OpenAPI spec ([f73e1f9](https://github.com/dodopayments/dodopayments-ruby/commit/f73e1f90193bae17de02a00cf8f239e02e1fc403))
|
|
18
|
+
|
|
3
19
|
## [2.17.1](https://github.com/dodopayments/dodopayments-ruby/compare/v2.17.0...v2.17.1) (2026-06-18)
|
|
4
20
|
|
|
5
21
|
|
data/README.md
CHANGED
|
@@ -9,13 +9,15 @@ module Dodopayments
|
|
|
9
9
|
required :addon_id, String
|
|
10
10
|
|
|
11
11
|
# @!attribute quantity
|
|
12
|
+
# Number of units of this addon.
|
|
12
13
|
#
|
|
13
14
|
# @return [Integer]
|
|
14
15
|
required :quantity, Integer
|
|
15
16
|
|
|
16
17
|
# @!method initialize(addon_id:, quantity:)
|
|
17
18
|
# @param addon_id [String]
|
|
18
|
-
#
|
|
19
|
+
#
|
|
20
|
+
# @param quantity [Integer] Number of units of this addon.
|
|
19
21
|
end
|
|
20
22
|
end
|
|
21
23
|
end
|
|
@@ -71,6 +71,15 @@ module Dodopayments
|
|
|
71
71
|
# @return [Boolean, nil]
|
|
72
72
|
optional :allow_discount_code, Dodopayments::Internal::Type::Boolean
|
|
73
73
|
|
|
74
|
+
# @!attribute allow_editing_addons
|
|
75
|
+
# If true, the customer can add or remove addons on a subscription product during
|
|
76
|
+
# checkout.
|
|
77
|
+
#
|
|
78
|
+
# Default is false
|
|
79
|
+
#
|
|
80
|
+
# @return [Boolean, nil]
|
|
81
|
+
optional :allow_editing_addons, Dodopayments::Internal::Type::Boolean
|
|
82
|
+
|
|
74
83
|
# @!attribute allow_phone_number_collection
|
|
75
84
|
# If phone number is collected from customer, set it to rue
|
|
76
85
|
#
|
|
@@ -113,7 +122,7 @@ module Dodopayments
|
|
|
113
122
|
# @return [Boolean, nil]
|
|
114
123
|
optional :require_phone_number, Dodopayments::Internal::Type::Boolean
|
|
115
124
|
|
|
116
|
-
# @!method initialize(allow_currency_selection: nil, allow_customer_editing_business_name: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil, require_phone_number: nil)
|
|
125
|
+
# @!method initialize(allow_currency_selection: nil, allow_customer_editing_business_name: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_editing_addons: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil, require_phone_number: nil)
|
|
117
126
|
# Some parameter documentations has been truncated, see
|
|
118
127
|
# {Dodopayments::Models::CheckoutSessionFlags} for more details.
|
|
119
128
|
#
|
|
@@ -139,6 +148,8 @@ module Dodopayments
|
|
|
139
148
|
#
|
|
140
149
|
# @param allow_discount_code [Boolean] If the customer is allowed to apply discount code, set it to true.
|
|
141
150
|
#
|
|
151
|
+
# @param allow_editing_addons [Boolean] If true, the customer can add or remove addons on a subscription product
|
|
152
|
+
#
|
|
142
153
|
# @param allow_phone_number_collection [Boolean] If phone number is collected from customer, set it to rue
|
|
143
154
|
#
|
|
144
155
|
# @param allow_tax_id [Boolean] If the customer is allowed to add tax id, set it to true
|
|
@@ -97,6 +97,7 @@ module Dodopayments
|
|
|
97
97
|
optional :rollover_timeframe_count, Integer, nil?: true
|
|
98
98
|
|
|
99
99
|
# @!attribute rollover_timeframe_interval
|
|
100
|
+
# Unit of a duration count (e.g. license-key validity period).
|
|
100
101
|
#
|
|
101
102
|
# @return [Symbol, Dodopayments::Models::TimeInterval, nil]
|
|
102
103
|
optional :rollover_timeframe_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
|
|
@@ -138,7 +139,7 @@ module Dodopayments
|
|
|
138
139
|
#
|
|
139
140
|
# @param rollover_timeframe_count [Integer, nil]
|
|
140
141
|
#
|
|
141
|
-
# @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil]
|
|
142
|
+
# @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of a duration count (e.g. license-key validity period).
|
|
142
143
|
end
|
|
143
144
|
end
|
|
144
145
|
end
|
|
@@ -95,6 +95,7 @@ module Dodopayments
|
|
|
95
95
|
optional :rollover_timeframe_count, Integer, nil?: true
|
|
96
96
|
|
|
97
97
|
# @!attribute rollover_timeframe_interval
|
|
98
|
+
# Unit of a duration count (e.g. license-key validity period).
|
|
98
99
|
#
|
|
99
100
|
# @return [Symbol, Dodopayments::Models::TimeInterval, nil]
|
|
100
101
|
optional :rollover_timeframe_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
|
|
@@ -137,7 +138,7 @@ module Dodopayments
|
|
|
137
138
|
#
|
|
138
139
|
# @param rollover_timeframe_count [Integer, nil]
|
|
139
140
|
#
|
|
140
|
-
# @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil]
|
|
141
|
+
# @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of a duration count (e.g. license-key validity period).
|
|
141
142
|
end
|
|
142
143
|
end
|
|
143
144
|
end
|
|
@@ -56,6 +56,14 @@ module Dodopayments
|
|
|
56
56
|
# @return [Boolean]
|
|
57
57
|
required :is_credit, Dodopayments::Internal::Type::Boolean
|
|
58
58
|
|
|
59
|
+
# @!attribute metadata
|
|
60
|
+
# Metadata associated with the credit grant's source (the subscription or payment
|
|
61
|
+
# created at checkout). Empty when the grant has no resolvable source (e.g.
|
|
62
|
+
# credits granted directly via the API).
|
|
63
|
+
#
|
|
64
|
+
# @return [Hash{Symbol=>String}]
|
|
65
|
+
required :metadata, Dodopayments::Internal::Type::HashOf[String]
|
|
66
|
+
|
|
59
67
|
# @!attribute overage_after
|
|
60
68
|
#
|
|
61
69
|
# @return [String]
|
|
@@ -92,7 +100,10 @@ module Dodopayments
|
|
|
92
100
|
# @return [String, nil]
|
|
93
101
|
optional :reference_type, String, nil?: true
|
|
94
102
|
|
|
95
|
-
# @!method initialize(id:, amount:, balance_after:, balance_before:, brand_id:, business_id:, created_at:, credit_entitlement_id:, customer_id:, is_credit:, overage_after:, overage_before:, transaction_type:, description: nil, grant_id: nil, reference_id: nil, reference_type: nil)
|
|
103
|
+
# @!method initialize(id:, amount:, balance_after:, balance_before:, brand_id:, business_id:, created_at:, credit_entitlement_id:, customer_id:, is_credit:, metadata:, overage_after:, overage_before:, transaction_type:, description: nil, grant_id: nil, reference_id: nil, reference_type: nil)
|
|
104
|
+
# Some parameter documentations has been truncated, see
|
|
105
|
+
# {Dodopayments::Models::CreditEntitlements::CreditLedgerEntry} for more details.
|
|
106
|
+
#
|
|
96
107
|
# Response for a ledger entry
|
|
97
108
|
#
|
|
98
109
|
# @param id [String]
|
|
@@ -115,6 +126,8 @@ module Dodopayments
|
|
|
115
126
|
#
|
|
116
127
|
# @param is_credit [Boolean]
|
|
117
128
|
#
|
|
129
|
+
# @param metadata [Hash{Symbol=>String}] Metadata associated with the credit grant's source (the subscription or
|
|
130
|
+
#
|
|
118
131
|
# @param overage_after [String]
|
|
119
132
|
#
|
|
120
133
|
# @param overage_before [String]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Entitlements
|
|
6
|
+
# @see Dodopayments::Resources::Entitlements::Grants#fulfill_license_key
|
|
7
|
+
class GrantFulfillLicenseKeyParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute grant_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :grant_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute key
|
|
17
|
+
# The license key value to deliver to the customer.
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :key, String
|
|
21
|
+
|
|
22
|
+
# @!attribute activations_limit
|
|
23
|
+
# Per-key activation limit. Defaults to the entitlement's license-key
|
|
24
|
+
# configuration.
|
|
25
|
+
#
|
|
26
|
+
# @return [Integer, nil]
|
|
27
|
+
optional :activations_limit, Integer, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute expires_at
|
|
30
|
+
# When the key expires. Defaults to the duration in the entitlement's license-key
|
|
31
|
+
# configuration.
|
|
32
|
+
#
|
|
33
|
+
# @return [Time, nil]
|
|
34
|
+
optional :expires_at, Time, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!method initialize(grant_id:, key:, activations_limit: nil, expires_at: nil, request_options: {})
|
|
37
|
+
# Some parameter documentations has been truncated, see
|
|
38
|
+
# {Dodopayments::Models::Entitlements::GrantFulfillLicenseKeyParams} for more
|
|
39
|
+
# details.
|
|
40
|
+
#
|
|
41
|
+
# @param grant_id [String]
|
|
42
|
+
#
|
|
43
|
+
# @param key [String] The license key value to deliver to the customer.
|
|
44
|
+
#
|
|
45
|
+
# @param activations_limit [Integer, nil] Per-key activation limit. Defaults to the entitlement's license-key configuratio
|
|
46
|
+
#
|
|
47
|
+
# @param expires_at [Time, nil] When the key expires. Defaults to the duration in the entitlement's license-key
|
|
48
|
+
#
|
|
49
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -9,13 +9,15 @@ module Dodopayments
|
|
|
9
9
|
required :count, Integer
|
|
10
10
|
|
|
11
11
|
# @!attribute interval
|
|
12
|
+
# Unit of a duration count (e.g. license-key validity period).
|
|
12
13
|
#
|
|
13
14
|
# @return [Symbol, Dodopayments::Models::TimeInterval]
|
|
14
15
|
required :interval, enum: -> { Dodopayments::TimeInterval }
|
|
15
16
|
|
|
16
17
|
# @!method initialize(count:, interval:)
|
|
17
18
|
# @param count [Integer]
|
|
18
|
-
#
|
|
19
|
+
#
|
|
20
|
+
# @param interval [Symbol, Dodopayments::Models::TimeInterval] Unit of a duration count (e.g. license-key validity period).
|
|
19
21
|
end
|
|
20
22
|
end
|
|
21
23
|
end
|
|
@@ -41,7 +41,7 @@ module Dodopayments
|
|
|
41
41
|
required :customer, -> { Dodopayments::CustomerLimitedDetails }
|
|
42
42
|
|
|
43
43
|
# @!attribute digital_products_delivered
|
|
44
|
-
#
|
|
44
|
+
# Whether the digital products purchased in this payment have been delivered.
|
|
45
45
|
#
|
|
46
46
|
# @return [Boolean]
|
|
47
47
|
required :digital_products_delivered, Dodopayments::Internal::Type::Boolean
|
|
@@ -276,7 +276,7 @@ module Dodopayments
|
|
|
276
276
|
#
|
|
277
277
|
# @param customer [Dodopayments::Models::CustomerLimitedDetails] Details about the customer who made the payment
|
|
278
278
|
#
|
|
279
|
-
# @param digital_products_delivered [Boolean]
|
|
279
|
+
# @param digital_products_delivered [Boolean] Whether the digital products purchased in this payment have been delivered.
|
|
280
280
|
#
|
|
281
281
|
# @param disputes [Array<Dodopayments::Models::Dispute>] List of disputes associated with this payment
|
|
282
282
|
#
|
|
@@ -136,8 +136,8 @@ module Dodopayments
|
|
|
136
136
|
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
137
137
|
# apply).
|
|
138
138
|
#
|
|
139
|
-
# @return [Symbol, Dodopayments::Models::
|
|
140
|
-
optional :pricing_mode, enum: -> { Dodopayments::
|
|
139
|
+
# @return [Symbol, Dodopayments::Models::Products::PricingMode, nil]
|
|
140
|
+
optional :pricing_mode, enum: -> { Dodopayments::Products::PricingMode }, nil?: true
|
|
141
141
|
|
|
142
142
|
# @!attribute product_collection_id
|
|
143
143
|
# The product collection ID this product belongs to, if any
|
|
@@ -189,23 +189,9 @@ module Dodopayments
|
|
|
189
189
|
#
|
|
190
190
|
# @param name [String, nil] Name of the product, optional.
|
|
191
191
|
#
|
|
192
|
-
# @param pricing_mode [Symbol, Dodopayments::Models::
|
|
192
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::Products::PricingMode, nil] Pricing mode for localized pricing. NULL means base-only (no localized rules app
|
|
193
193
|
#
|
|
194
194
|
# @param product_collection_id [String, nil] The product collection ID this product belongs to, if any
|
|
195
|
-
|
|
196
|
-
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
197
|
-
# apply).
|
|
198
|
-
#
|
|
199
|
-
# @see Dodopayments::Models::Product#pricing_mode
|
|
200
|
-
module PricingMode
|
|
201
|
-
extend Dodopayments::Internal::Type::Enum
|
|
202
|
-
|
|
203
|
-
BY_CURRENCY = :by_currency
|
|
204
|
-
BY_COUNTRY = :by_country
|
|
205
|
-
|
|
206
|
-
# @!method self.values
|
|
207
|
-
# @return [Array<Symbol>]
|
|
208
|
-
end
|
|
209
195
|
end
|
|
210
196
|
end
|
|
211
197
|
end
|
|
@@ -125,8 +125,8 @@ module Dodopayments
|
|
|
125
125
|
# /products/{id}/localized-prices apply at checkout. NULL means base-only
|
|
126
126
|
# (existing behavior).
|
|
127
127
|
#
|
|
128
|
-
# @return [Symbol, Dodopayments::Models::
|
|
129
|
-
optional :pricing_mode, enum: -> { Dodopayments::
|
|
128
|
+
# @return [Symbol, Dodopayments::Models::Products::PricingMode, nil]
|
|
129
|
+
optional :pricing_mode, enum: -> { Dodopayments::Products::PricingMode }, nil?: true
|
|
130
130
|
|
|
131
131
|
# @!method initialize(name:, price:, tax_category:, addons: nil, brand_id: nil, credit_entitlements: nil, description: nil, digital_product_delivery: nil, entitlements: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, pricing_mode: nil, request_options: {})
|
|
132
132
|
# Some parameter documentations has been truncated, see
|
|
@@ -160,7 +160,7 @@ module Dodopayments
|
|
|
160
160
|
#
|
|
161
161
|
# @param metadata [Hash{Symbol=>String}] Additional metadata for the product
|
|
162
162
|
#
|
|
163
|
-
# @param pricing_mode [Symbol, Dodopayments::Models::
|
|
163
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::Products::PricingMode, nil] Pricing mode for localized pricing. When set, rules from
|
|
164
164
|
#
|
|
165
165
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
166
166
|
|
|
@@ -186,19 +186,6 @@ module Dodopayments
|
|
|
186
186
|
#
|
|
187
187
|
# @param instructions [String, nil] Instructions to download and use the digital product
|
|
188
188
|
end
|
|
189
|
-
|
|
190
|
-
# Pricing mode for localized pricing. When set, rules from
|
|
191
|
-
# /products/{id}/localized-prices apply at checkout. NULL means base-only
|
|
192
|
-
# (existing behavior).
|
|
193
|
-
module PricingMode
|
|
194
|
-
extend Dodopayments::Internal::Type::Enum
|
|
195
|
-
|
|
196
|
-
BY_CURRENCY = :by_currency
|
|
197
|
-
BY_COUNTRY = :by_country
|
|
198
|
-
|
|
199
|
-
# @!method self.values
|
|
200
|
-
# @return [Array<Symbol>]
|
|
201
|
-
end
|
|
202
189
|
end
|
|
203
190
|
end
|
|
204
191
|
end
|
|
@@ -102,8 +102,8 @@ module Dodopayments
|
|
|
102
102
|
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
103
103
|
# apply).
|
|
104
104
|
#
|
|
105
|
-
# @return [Symbol, Dodopayments::Models::
|
|
106
|
-
optional :pricing_mode, enum: -> { Dodopayments::
|
|
105
|
+
# @return [Symbol, Dodopayments::Models::Products::PricingMode, nil]
|
|
106
|
+
optional :pricing_mode, enum: -> { Dodopayments::Products::PricingMode }, nil?: true
|
|
107
107
|
|
|
108
108
|
# @!attribute tax_inclusive
|
|
109
109
|
# Indicates if the price is tax inclusive
|
|
@@ -143,23 +143,9 @@ module Dodopayments
|
|
|
143
143
|
#
|
|
144
144
|
# @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil] Details of the price
|
|
145
145
|
#
|
|
146
|
-
# @param pricing_mode [Symbol, Dodopayments::Models::
|
|
146
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::Products::PricingMode, nil] Pricing mode for localized pricing. NULL means base-only (no localized rules app
|
|
147
147
|
#
|
|
148
148
|
# @param tax_inclusive [Boolean, nil] Indicates if the price is tax inclusive
|
|
149
|
-
|
|
150
|
-
# Pricing mode for localized pricing. NULL means base-only (no localized rules
|
|
151
|
-
# apply).
|
|
152
|
-
#
|
|
153
|
-
# @see Dodopayments::Models::ProductListResponse#pricing_mode
|
|
154
|
-
module PricingMode
|
|
155
|
-
extend Dodopayments::Internal::Type::Enum
|
|
156
|
-
|
|
157
|
-
BY_CURRENCY = :by_currency
|
|
158
|
-
BY_COUNTRY = :by_country
|
|
159
|
-
|
|
160
|
-
# @!method self.values
|
|
161
|
-
# @return [Array<Symbol>]
|
|
162
|
-
end
|
|
163
149
|
end
|
|
164
150
|
end
|
|
165
151
|
end
|
|
@@ -136,8 +136,8 @@ module Dodopayments
|
|
|
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
138
|
#
|
|
139
|
-
# @return [Symbol, Dodopayments::Models::
|
|
140
|
-
optional :pricing_mode, enum: -> { Dodopayments::
|
|
139
|
+
# @return [Symbol, Dodopayments::Models::Products::PricingMode, nil]
|
|
140
|
+
optional :pricing_mode, enum: -> { Dodopayments::Products::PricingMode }, nil?: true
|
|
141
141
|
|
|
142
142
|
# @!attribute tax_category
|
|
143
143
|
# Tax category of the product.
|
|
@@ -179,7 +179,7 @@ module Dodopayments
|
|
|
179
179
|
#
|
|
180
180
|
# @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil] Price details of the product.
|
|
181
181
|
#
|
|
182
|
-
# @param pricing_mode [Symbol, Dodopayments::Models::
|
|
182
|
+
# @param pricing_mode [Symbol, Dodopayments::Models::Products::PricingMode, nil] Update the pricing mode. Omit to leave unchanged; set to null to clear
|
|
183
183
|
#
|
|
184
184
|
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Tax category of the product.
|
|
185
185
|
#
|
|
@@ -215,19 +215,6 @@ module Dodopayments
|
|
|
215
215
|
#
|
|
216
216
|
# @param instructions [String, nil] Instructions to download and use the digital product
|
|
217
217
|
end
|
|
218
|
-
|
|
219
|
-
# Update the pricing mode. Omit to leave unchanged; set to null to clear (which
|
|
220
|
-
# archives all active localized rules for this product). Changing to a different
|
|
221
|
-
# non-null mode also archives any rules whose mode doesn't match the new mode.
|
|
222
|
-
module PricingMode
|
|
223
|
-
extend Dodopayments::Internal::Type::Enum
|
|
224
|
-
|
|
225
|
-
BY_CURRENCY = :by_currency
|
|
226
|
-
BY_COUNTRY = :by_country
|
|
227
|
-
|
|
228
|
-
# @!method self.values
|
|
229
|
-
# @return [Array<Symbol>]
|
|
230
|
-
end
|
|
231
218
|
end
|
|
232
219
|
end
|
|
233
220
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::LocalizedPrices#list
|
|
7
|
+
class ListLocalizedPricesResponse < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute items
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<Dodopayments::Models::Products::LocalizedPrice>]
|
|
11
|
+
required :items, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Products::LocalizedPrice] }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(items:)
|
|
14
|
+
# @param items [Array<Dodopayments::Models::Products::LocalizedPrice>]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::LocalizedPrices#create
|
|
7
|
+
class LocalizedPrice < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute id
|
|
9
|
+
# Unique identifier for the localized price.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :id, String
|
|
13
|
+
|
|
14
|
+
# @!attribute amount
|
|
15
|
+
# Amount in the smallest currency unit (e.g., cents).
|
|
16
|
+
#
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
required :amount, Integer
|
|
19
|
+
|
|
20
|
+
# @!attribute created_at
|
|
21
|
+
# Timestamp when the localized price was created.
|
|
22
|
+
#
|
|
23
|
+
# @return [Time]
|
|
24
|
+
required :created_at, Time
|
|
25
|
+
|
|
26
|
+
# @!attribute currency
|
|
27
|
+
# Currency to charge in.
|
|
28
|
+
#
|
|
29
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
30
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
31
|
+
|
|
32
|
+
# @!attribute mode
|
|
33
|
+
# Pricing mode of the rule: by_currency or by_country.
|
|
34
|
+
#
|
|
35
|
+
# @return [Symbol, Dodopayments::Models::Products::PricingMode]
|
|
36
|
+
required :mode, enum: -> { Dodopayments::Products::PricingMode }
|
|
37
|
+
|
|
38
|
+
# @!attribute product_id
|
|
39
|
+
# Product this localized price belongs to.
|
|
40
|
+
#
|
|
41
|
+
# @return [String]
|
|
42
|
+
required :product_id, String
|
|
43
|
+
|
|
44
|
+
# @!attribute updated_at
|
|
45
|
+
# Timestamp when the localized price was last updated.
|
|
46
|
+
#
|
|
47
|
+
# @return [Time]
|
|
48
|
+
required :updated_at, Time
|
|
49
|
+
|
|
50
|
+
# @!attribute country_code
|
|
51
|
+
# Country the rule applies to. Only set when mode is by_country.
|
|
52
|
+
#
|
|
53
|
+
# @return [Symbol, Dodopayments::Models::CountryCode, nil]
|
|
54
|
+
optional :country_code, enum: -> { Dodopayments::CountryCode }, nil?: true
|
|
55
|
+
|
|
56
|
+
# @!method initialize(id:, amount:, created_at:, currency:, mode:, product_id:, updated_at:, country_code: nil)
|
|
57
|
+
# @param id [String] Unique identifier for the localized price.
|
|
58
|
+
#
|
|
59
|
+
# @param amount [Integer] Amount in the smallest currency unit (e.g., cents).
|
|
60
|
+
#
|
|
61
|
+
# @param created_at [Time] Timestamp when the localized price was created.
|
|
62
|
+
#
|
|
63
|
+
# @param currency [Symbol, Dodopayments::Models::Currency] Currency to charge in.
|
|
64
|
+
#
|
|
65
|
+
# @param mode [Symbol, Dodopayments::Models::Products::PricingMode] Pricing mode of the rule: by_currency or by_country.
|
|
66
|
+
#
|
|
67
|
+
# @param product_id [String] Product this localized price belongs to.
|
|
68
|
+
#
|
|
69
|
+
# @param updated_at [Time] Timestamp when the localized price was last updated.
|
|
70
|
+
#
|
|
71
|
+
# @param country_code [Symbol, Dodopayments::Models::CountryCode, nil] Country the rule applies to. Only set when mode is by_country.
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::LocalizedPrices#archive
|
|
7
|
+
class LocalizedPriceArchiveParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute product_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :product_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(product_id:, id:, request_options: {})
|
|
22
|
+
# @param product_id [String]
|
|
23
|
+
# @param id [String]
|
|
24
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::LocalizedPrices#create
|
|
7
|
+
class LocalizedPriceCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute product_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :product_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute amount
|
|
17
|
+
# Amount in the smallest currency unit (e.g., cents). Must be greater than zero.
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer]
|
|
20
|
+
required :amount, Integer
|
|
21
|
+
|
|
22
|
+
# @!attribute currency
|
|
23
|
+
# Currency to charge in. Must be a supported currency.
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
26
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
27
|
+
|
|
28
|
+
# @!attribute country_code
|
|
29
|
+
# Required when the product's pricing_mode is by_country; forbidden when
|
|
30
|
+
# by_currency.
|
|
31
|
+
#
|
|
32
|
+
# @return [Symbol, Dodopayments::Models::CountryCode, nil]
|
|
33
|
+
optional :country_code, enum: -> { Dodopayments::CountryCode }, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!method initialize(product_id:, amount:, currency:, country_code: nil, request_options: {})
|
|
36
|
+
# Some parameter documentations has been truncated, see
|
|
37
|
+
# {Dodopayments::Models::Products::LocalizedPriceCreateParams} for more details.
|
|
38
|
+
#
|
|
39
|
+
# @param product_id [String]
|
|
40
|
+
#
|
|
41
|
+
# @param amount [Integer] Amount in the smallest currency unit (e.g., cents). Must be greater than zero.
|
|
42
|
+
#
|
|
43
|
+
# @param currency [Symbol, Dodopayments::Models::Currency] Currency to charge in. Must be a supported currency.
|
|
44
|
+
#
|
|
45
|
+
# @param country_code [Symbol, Dodopayments::Models::CountryCode, nil] Required when the product's pricing_mode is by_country; forbidden when by_curren
|
|
46
|
+
#
|
|
47
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::LocalizedPrices#list
|
|
7
|
+
class LocalizedPriceListParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute product_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :product_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(product_id:, request_options: {})
|
|
17
|
+
# @param product_id [String]
|
|
18
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Products
|
|
6
|
+
# @see Dodopayments::Resources::Products::LocalizedPrices#retrieve
|
|
7
|
+
class LocalizedPriceRetrieveParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute product_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :product_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(product_id:, id:, request_options: {})
|
|
22
|
+
# @param product_id [String]
|
|
23
|
+
# @param id [String]
|
|
24
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|