dodopayments 2.18.1 → 2.19.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/checkout_session_request.rb +5 -3
- data/lib/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rb +5 -3
- data/lib/dodopayments/models/credit_entitlements/balance_list_grants_response.rb +24 -3
- data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +3 -3
- data/lib/dodopayments/models/customer.rb +3 -3
- data/lib/dodopayments/models/customer_create_params.rb +3 -3
- data/lib/dodopayments/models/customer_limited_details.rb +3 -3
- data/lib/dodopayments/models/customer_list_entitlement_grants_params.rb +85 -0
- data/lib/dodopayments/models/customer_update_params.rb +5 -3
- data/lib/dodopayments/models/discount.rb +4 -3
- data/lib/dodopayments/models/discount_create_params.rb +3 -3
- data/lib/dodopayments/models/discount_detail.rb +3 -3
- data/lib/dodopayments/models/discount_update_params.rb +5 -3
- data/lib/dodopayments/models/entitlement.rb +5 -5
- data/lib/dodopayments/models/entitlement_create_params.rb +5 -5
- data/lib/dodopayments/models/entitlement_integration_type.rb +1 -0
- data/lib/dodopayments/models/entitlement_list_params.rb +1 -0
- data/lib/dodopayments/models/entitlement_update_params.rb +12 -5
- data/lib/dodopayments/models/entitlements/entitlement_grant.rb +13 -4
- data/lib/dodopayments/models/feature.rb +26 -0
- data/lib/dodopayments/models/feature_type.rb +15 -0
- data/lib/dodopayments/models/integration_config.rb +30 -1
- data/lib/dodopayments/models/integration_config_response.rb +22 -1
- data/lib/dodopayments/models/metadata.rb +15 -1
- data/lib/dodopayments/models/payment.rb +3 -3
- data/lib/dodopayments/models/payment_create_params.rb +3 -3
- data/lib/dodopayments/models/payment_create_response.rb +3 -3
- data/lib/dodopayments/models/payment_list_response.rb +4 -3
- data/lib/dodopayments/models/product.rb +3 -3
- data/lib/dodopayments/models/product_create_params.rb +3 -3
- data/lib/dodopayments/models/product_entitlement_summary.rb +2 -2
- data/lib/dodopayments/models/product_list_response.rb +3 -3
- data/lib/dodopayments/models/product_update_params.rb +5 -3
- data/lib/dodopayments/models/refund.rb +3 -3
- data/lib/dodopayments/models/refund_create_params.rb +3 -3
- data/lib/dodopayments/models/subscription.rb +3 -3
- data/lib/dodopayments/models/subscription_charge_params.rb +5 -3
- data/lib/dodopayments/models/subscription_create_params.rb +3 -3
- data/lib/dodopayments/models/subscription_create_response.rb +3 -3
- data/lib/dodopayments/models/subscription_list_response.rb +3 -3
- data/lib/dodopayments/models/subscription_update_params.rb +6 -3
- data/lib/dodopayments/models/update_subscription_plan_req.rb +5 -3
- data/lib/dodopayments/models.rb +8 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +2 -2
- data/lib/dodopayments/resources/credit_entitlements/balances.rb +1 -1
- data/lib/dodopayments/resources/customers.rb +35 -2
- data/lib/dodopayments/resources/discounts.rb +2 -2
- data/lib/dodopayments/resources/entitlements.rb +4 -4
- data/lib/dodopayments/resources/payments.rb +1 -1
- data/lib/dodopayments/resources/products.rb +2 -2
- data/lib/dodopayments/resources/refunds.rb +1 -1
- data/lib/dodopayments/resources/subscriptions.rb +5 -5
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +3 -0
- data/rbi/dodopayments/models/checkout_session_request.rbi +9 -3
- data/rbi/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rbi +11 -3
- data/rbi/dodopayments/models/credit_entitlements/balance_list_grants_response.rbi +13 -3
- data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +3 -3
- data/rbi/dodopayments/models/customer.rbi +12 -4
- data/rbi/dodopayments/models/customer_create_params.rbi +12 -4
- data/rbi/dodopayments/models/customer_limited_details.rbi +12 -4
- data/rbi/dodopayments/models/customer_list_entitlement_grants_params.rbi +229 -0
- data/rbi/dodopayments/models/customer_update_params.rbi +9 -3
- data/rbi/dodopayments/models/discount.rbi +5 -3
- data/rbi/dodopayments/models/discount_create_params.rbi +12 -4
- data/rbi/dodopayments/models/discount_detail.rbi +3 -3
- data/rbi/dodopayments/models/discount_update_params.rbi +9 -3
- data/rbi/dodopayments/models/entitlement.rbi +4 -3
- data/rbi/dodopayments/models/entitlement_create_params.rbi +15 -4
- data/rbi/dodopayments/models/entitlement_integration_type.rbi +5 -0
- data/rbi/dodopayments/models/entitlement_list_params.rbi +5 -0
- data/rbi/dodopayments/models/entitlement_update_params.rbi +22 -3
- data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +16 -3
- data/rbi/dodopayments/models/feature.rbi +46 -0
- data/rbi/dodopayments/models/feature_type.rbi +21 -0
- data/rbi/dodopayments/models/integration_config.rbi +50 -0
- data/rbi/dodopayments/models/integration_config_response.rbi +44 -0
- data/rbi/dodopayments/models/metadata.rbi +12 -1
- data/rbi/dodopayments/models/payment.rbi +3 -3
- data/rbi/dodopayments/models/payment_create_params.rbi +12 -4
- data/rbi/dodopayments/models/payment_create_response.rbi +3 -3
- data/rbi/dodopayments/models/payment_list_response.rbi +5 -3
- data/rbi/dodopayments/models/product.rbi +3 -3
- data/rbi/dodopayments/models/product_create_params.rbi +12 -4
- data/rbi/dodopayments/models/product_entitlement_summary.rbi +1 -0
- data/rbi/dodopayments/models/product_list_response.rbi +3 -3
- data/rbi/dodopayments/models/product_update_params.rbi +9 -3
- data/rbi/dodopayments/models/refund.rbi +3 -3
- data/rbi/dodopayments/models/refund_create_params.rbi +12 -4
- data/rbi/dodopayments/models/subscription.rbi +3 -3
- data/rbi/dodopayments/models/subscription_charge_params.rbi +9 -3
- data/rbi/dodopayments/models/subscription_create_params.rbi +12 -4
- data/rbi/dodopayments/models/subscription_create_response.rbi +3 -3
- data/rbi/dodopayments/models/subscription_list_response.rbi +3 -3
- data/rbi/dodopayments/models/subscription_update_params.rbi +11 -3
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +9 -3
- data/rbi/dodopayments/models.rbi +9 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +4 -2
- data/rbi/dodopayments/resources/credit_entitlements/balances.rbi +2 -1
- data/rbi/dodopayments/resources/customers.rbi +36 -2
- data/rbi/dodopayments/resources/discounts.rbi +3 -2
- data/rbi/dodopayments/resources/entitlements.rbi +10 -2
- data/rbi/dodopayments/resources/payments.rbi +1 -1
- data/rbi/dodopayments/resources/products.rbi +3 -2
- data/rbi/dodopayments/resources/refunds.rbi +1 -1
- data/rbi/dodopayments/resources/subscriptions.rbi +10 -5
- data/sig/dodopayments/models/customer_list_entitlement_grants_params.rbs +98 -0
- data/sig/dodopayments/models/entitlement_integration_type.rbs +2 -0
- data/sig/dodopayments/models/entitlement_list_params.rbs +2 -0
- data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +5 -0
- data/sig/dodopayments/models/feature.rbs +22 -0
- data/sig/dodopayments/models/feature_type.rbs +13 -0
- data/sig/dodopayments/models/integration_config.rbs +21 -1
- data/sig/dodopayments/models/integration_config_response.rbs +21 -1
- data/sig/dodopayments/models/metadata.rbs +9 -1
- data/sig/dodopayments/models.rbs +8 -0
- data/sig/dodopayments/resources/customers.rbs +9 -0
- metadata +11 -2
|
@@ -13,7 +13,7 @@ module Dodopayments
|
|
|
13
13
|
#
|
|
14
14
|
# @overload create(integration_config:, integration_type:, name:, description: nil, metadata: nil, request_options: {})
|
|
15
15
|
#
|
|
16
|
-
# @param integration_config [Dodopayments::Models::IntegrationConfig::GitHubConfig, Dodopayments::Models::IntegrationConfig::DiscordConfig, Dodopayments::Models::IntegrationConfig::TelegramConfig, Dodopayments::Models::IntegrationConfig::FigmaConfig, Dodopayments::Models::IntegrationConfig::FramerConfig, Dodopayments::Models::IntegrationConfig::NotionConfig, Dodopayments::Models::IntegrationConfig::DigitalFilesConfig, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig] Platform-specific configuration (validated per integration_type)
|
|
16
|
+
# @param integration_config [Dodopayments::Models::IntegrationConfig::FeatureFlagConfig, Dodopayments::Models::IntegrationConfig::GitHubConfig, Dodopayments::Models::IntegrationConfig::DiscordConfig, Dodopayments::Models::IntegrationConfig::TelegramConfig, Dodopayments::Models::IntegrationConfig::FigmaConfig, Dodopayments::Models::IntegrationConfig::FramerConfig, Dodopayments::Models::IntegrationConfig::NotionConfig, Dodopayments::Models::IntegrationConfig::DigitalFilesConfig, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig] Platform-specific configuration (validated per integration_type)
|
|
17
17
|
#
|
|
18
18
|
# @param integration_type [Symbol, Dodopayments::Models::EntitlementIntegrationType] Which platform integration this entitlement uses
|
|
19
19
|
#
|
|
@@ -21,7 +21,7 @@ module Dodopayments
|
|
|
21
21
|
#
|
|
22
22
|
# @param description [String, nil] Optional description
|
|
23
23
|
#
|
|
24
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata for the entitlement
|
|
24
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata for the entitlement
|
|
25
25
|
#
|
|
26
26
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
27
27
|
#
|
|
@@ -70,9 +70,9 @@ module Dodopayments
|
|
|
70
70
|
#
|
|
71
71
|
# @param description [String, nil]
|
|
72
72
|
#
|
|
73
|
-
# @param integration_config [Dodopayments::Models::IntegrationConfig::GitHubConfig, Dodopayments::Models::IntegrationConfig::DiscordConfig, Dodopayments::Models::IntegrationConfig::TelegramConfig, Dodopayments::Models::IntegrationConfig::FigmaConfig, Dodopayments::Models::IntegrationConfig::FramerConfig, Dodopayments::Models::IntegrationConfig::NotionConfig, Dodopayments::Models::IntegrationConfig::DigitalFilesConfig, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig, nil] Integration-specific configuration supplied when creating or updating
|
|
73
|
+
# @param integration_config [Dodopayments::Models::IntegrationConfig::FeatureFlagConfig, Dodopayments::Models::IntegrationConfig::GitHubConfig, Dodopayments::Models::IntegrationConfig::DiscordConfig, Dodopayments::Models::IntegrationConfig::TelegramConfig, Dodopayments::Models::IntegrationConfig::FigmaConfig, Dodopayments::Models::IntegrationConfig::FramerConfig, Dodopayments::Models::IntegrationConfig::NotionConfig, Dodopayments::Models::IntegrationConfig::DigitalFilesConfig, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig, nil] Integration-specific configuration supplied when creating or updating
|
|
74
74
|
#
|
|
75
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
75
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}, nil] Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
|
|
76
76
|
#
|
|
77
77
|
# @param name [String, nil]
|
|
78
78
|
#
|
|
@@ -30,7 +30,7 @@ module Dodopayments
|
|
|
30
30
|
#
|
|
31
31
|
# @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this payment
|
|
32
32
|
#
|
|
33
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata associated with the payment.
|
|
33
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata associated with the payment.
|
|
34
34
|
#
|
|
35
35
|
# @param payment_link [Boolean, nil] Whether to generate a payment link. Defaults to false if not specified.
|
|
36
36
|
#
|
|
@@ -43,7 +43,7 @@ module Dodopayments
|
|
|
43
43
|
#
|
|
44
44
|
# @param license_key_enabled [Boolean, nil] When true, generates and sends a license key to your customer.
|
|
45
45
|
#
|
|
46
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata for the product
|
|
46
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata for the product
|
|
47
47
|
#
|
|
48
48
|
# @param pricing_mode [Symbol, Dodopayments::Models::Products::PricingMode, nil] Pricing mode for localized pricing. When set, rules from
|
|
49
49
|
#
|
|
@@ -110,7 +110,7 @@ module Dodopayments
|
|
|
110
110
|
#
|
|
111
111
|
# @param license_key_enabled [Boolean, nil] Whether the product requires a license key.
|
|
112
112
|
#
|
|
113
|
-
# @param metadata [Hash{Symbol=>String}, nil] Additional metadata for the product
|
|
113
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}, nil] Additional metadata for the product
|
|
114
114
|
#
|
|
115
115
|
# @param name [String, nil] Name of the product, optional and must be at most 100 characters.
|
|
116
116
|
#
|
|
@@ -9,7 +9,7 @@ module Dodopayments
|
|
|
9
9
|
#
|
|
10
10
|
# @param items [Array<Dodopayments::Models::RefundCreateParams::Item>, nil] Partially Refund an Individual Item
|
|
11
11
|
#
|
|
12
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata associated with the refund.
|
|
12
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata associated with the refund.
|
|
13
13
|
#
|
|
14
14
|
# @param reason [String, nil] The reason for the refund, if any. Maximum length is 3000 characters. Optional.
|
|
15
15
|
#
|
|
@@ -34,7 +34,7 @@ module Dodopayments
|
|
|
34
34
|
#
|
|
35
35
|
# @param mandate_min_amount_inr_paise [Integer, nil] Override the merchant-level mandate floor (in INR paise) for INR
|
|
36
36
|
#
|
|
37
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
|
|
37
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata for the subscription
|
|
38
38
|
#
|
|
39
39
|
# @param on_demand [Dodopayments::Models::OnDemandSubscription, nil]
|
|
40
40
|
#
|
|
@@ -117,7 +117,7 @@ module Dodopayments
|
|
|
117
117
|
#
|
|
118
118
|
# @param disable_on_demand [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
|
|
119
119
|
#
|
|
120
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
120
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}, nil] Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
|
|
121
121
|
#
|
|
122
122
|
# @param next_billing_date [Time, nil]
|
|
123
123
|
#
|
|
@@ -218,7 +218,7 @@ module Dodopayments
|
|
|
218
218
|
#
|
|
219
219
|
# @param effective_at [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::EffectiveAt] When to apply the plan change.
|
|
220
220
|
#
|
|
221
|
-
# @param metadata [Hash{Symbol=>String}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
221
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
222
222
|
#
|
|
223
223
|
# @param on_payment_failure [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::OnPaymentFailure, nil] Controls behavior when the plan change payment fails.
|
|
224
224
|
#
|
|
@@ -251,7 +251,7 @@ module Dodopayments
|
|
|
251
251
|
#
|
|
252
252
|
# @param customer_balance_config [Dodopayments::Models::SubscriptionChargeParams::CustomerBalanceConfig, nil] Specify how customer balance is used for the payment
|
|
253
253
|
#
|
|
254
|
-
# @param metadata [Hash{Symbol=>String}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
254
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
255
255
|
#
|
|
256
256
|
# @param product_currency [Symbol, Dodopayments::Models::Currency, nil] Optional currency of the product price. If not specified, defaults to the curren
|
|
257
257
|
#
|
|
@@ -296,7 +296,7 @@ module Dodopayments
|
|
|
296
296
|
#
|
|
297
297
|
# @param effective_at [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::EffectiveAt] When to apply the plan change.
|
|
298
298
|
#
|
|
299
|
-
# @param metadata [Hash{Symbol=>String}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
299
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
300
300
|
#
|
|
301
301
|
# @param on_payment_failure [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::OnPaymentFailure, nil] Controls behavior when the plan change payment fails.
|
|
302
302
|
#
|
data/lib/dodopayments/version.rb
CHANGED
data/lib/dodopayments.rb
CHANGED
|
@@ -140,6 +140,7 @@ require_relative "dodopayments/models/customer_delete_payment_method_params"
|
|
|
140
140
|
require_relative "dodopayments/models/customer_limited_details"
|
|
141
141
|
require_relative "dodopayments/models/customer_list_credit_entitlements_params"
|
|
142
142
|
require_relative "dodopayments/models/customer_list_credit_entitlements_response"
|
|
143
|
+
require_relative "dodopayments/models/customer_list_entitlement_grants_params"
|
|
143
144
|
require_relative "dodopayments/models/customer_list_entitlements_params"
|
|
144
145
|
require_relative "dodopayments/models/customer_list_entitlements_response"
|
|
145
146
|
require_relative "dodopayments/models/customer_list_params"
|
|
@@ -204,6 +205,8 @@ require_relative "dodopayments/models/entitlements/license_key_grant"
|
|
|
204
205
|
require_relative "dodopayments/models/entitlement_update_params"
|
|
205
206
|
require_relative "dodopayments/models/event"
|
|
206
207
|
require_relative "dodopayments/models/event_input"
|
|
208
|
+
require_relative "dodopayments/models/feature"
|
|
209
|
+
require_relative "dodopayments/models/feature_type"
|
|
207
210
|
require_relative "dodopayments/models/filter_operator"
|
|
208
211
|
require_relative "dodopayments/models/filter_type"
|
|
209
212
|
require_relative "dodopayments/models/github_permission"
|
|
@@ -121,7 +121,11 @@ module Dodopayments
|
|
|
121
121
|
|
|
122
122
|
# Additional metadata associated with the payment. Defaults to empty if not
|
|
123
123
|
# provided.
|
|
124
|
-
sig
|
|
124
|
+
sig do
|
|
125
|
+
returns(
|
|
126
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants])
|
|
127
|
+
)
|
|
128
|
+
end
|
|
125
129
|
attr_accessor :metadata
|
|
126
130
|
|
|
127
131
|
# If true, only zipcode is required when confirm is true; other address fields
|
|
@@ -199,7 +203,8 @@ module Dodopayments
|
|
|
199
203
|
feature_flags: Dodopayments::CheckoutSessionFlags::OrHash,
|
|
200
204
|
force_3ds: T.nilable(T::Boolean),
|
|
201
205
|
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
202
|
-
metadata:
|
|
206
|
+
metadata:
|
|
207
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
|
|
203
208
|
minimal_address: T::Boolean,
|
|
204
209
|
payment_method_id: T.nilable(String),
|
|
205
210
|
product_collection_id: T.nilable(String),
|
|
@@ -305,7 +310,8 @@ module Dodopayments
|
|
|
305
310
|
feature_flags: Dodopayments::CheckoutSessionFlags,
|
|
306
311
|
force_3ds: T.nilable(T::Boolean),
|
|
307
312
|
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
308
|
-
metadata:
|
|
313
|
+
metadata:
|
|
314
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
|
|
309
315
|
minimal_address: T::Boolean,
|
|
310
316
|
payment_method_id: T.nilable(String),
|
|
311
317
|
product_collection_id: T.nilable(String),
|
|
@@ -41,7 +41,11 @@ module Dodopayments
|
|
|
41
41
|
|
|
42
42
|
# Optional metadata (max 50 key-value pairs, key max 40 chars, value max 500
|
|
43
43
|
# chars)
|
|
44
|
-
sig
|
|
44
|
+
sig do
|
|
45
|
+
returns(
|
|
46
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants])
|
|
47
|
+
)
|
|
48
|
+
end
|
|
45
49
|
attr_accessor :metadata
|
|
46
50
|
|
|
47
51
|
# Human-readable reason for the entry
|
|
@@ -57,7 +61,8 @@ module Dodopayments
|
|
|
57
61
|
Dodopayments::CreditEntitlements::LedgerEntryType::OrSymbol,
|
|
58
62
|
expires_at: T.nilable(Time),
|
|
59
63
|
idempotency_key: T.nilable(String),
|
|
60
|
-
metadata:
|
|
64
|
+
metadata:
|
|
65
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
|
|
61
66
|
reason: T.nilable(String),
|
|
62
67
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
63
68
|
).returns(T.attached_class)
|
|
@@ -92,7 +97,10 @@ module Dodopayments
|
|
|
92
97
|
Dodopayments::CreditEntitlements::LedgerEntryType::OrSymbol,
|
|
93
98
|
expires_at: T.nilable(Time),
|
|
94
99
|
idempotency_key: T.nilable(String),
|
|
95
|
-
metadata:
|
|
100
|
+
metadata:
|
|
101
|
+
T.nilable(
|
|
102
|
+
T::Hash[Symbol, Dodopayments::MetadataItem::Variants]
|
|
103
|
+
),
|
|
96
104
|
reason: T.nilable(String),
|
|
97
105
|
request_options: Dodopayments::RequestOptions
|
|
98
106
|
}
|
|
@@ -52,7 +52,12 @@ module Dodopayments
|
|
|
52
52
|
sig { returns(T.nilable(Time)) }
|
|
53
53
|
attr_accessor :expires_at
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
# Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
|
|
56
|
+
sig do
|
|
57
|
+
returns(
|
|
58
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants])
|
|
59
|
+
)
|
|
60
|
+
end
|
|
56
61
|
attr_accessor :metadata
|
|
57
62
|
|
|
58
63
|
sig { returns(T.nilable(String)) }
|
|
@@ -77,7 +82,8 @@ module Dodopayments
|
|
|
77
82
|
Dodopayments::Models::CreditEntitlements::BalanceListGrantsResponse::SourceType::OrSymbol,
|
|
78
83
|
updated_at: Time,
|
|
79
84
|
expires_at: T.nilable(Time),
|
|
80
|
-
metadata:
|
|
85
|
+
metadata:
|
|
86
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
|
|
81
87
|
parent_grant_id: T.nilable(String),
|
|
82
88
|
source_id: T.nilable(String)
|
|
83
89
|
).returns(T.attached_class)
|
|
@@ -95,6 +101,7 @@ module Dodopayments
|
|
|
95
101
|
source_type:,
|
|
96
102
|
updated_at:,
|
|
97
103
|
expires_at: nil,
|
|
104
|
+
# Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
|
|
98
105
|
metadata: nil,
|
|
99
106
|
parent_grant_id: nil,
|
|
100
107
|
source_id: nil
|
|
@@ -117,7 +124,10 @@ module Dodopayments
|
|
|
117
124
|
Dodopayments::Models::CreditEntitlements::BalanceListGrantsResponse::SourceType::TaggedSymbol,
|
|
118
125
|
updated_at: Time,
|
|
119
126
|
expires_at: T.nilable(Time),
|
|
120
|
-
metadata:
|
|
127
|
+
metadata:
|
|
128
|
+
T.nilable(
|
|
129
|
+
T::Hash[Symbol, Dodopayments::MetadataItem::Variants]
|
|
130
|
+
),
|
|
121
131
|
parent_grant_id: T.nilable(String),
|
|
122
132
|
source_id: T.nilable(String)
|
|
123
133
|
}
|
|
@@ -46,7 +46,7 @@ module Dodopayments
|
|
|
46
46
|
# Metadata associated with the credit grant's source (the subscription or payment
|
|
47
47
|
# created at checkout). Empty when the grant has no resolvable source (e.g.
|
|
48
48
|
# credits granted directly via the API).
|
|
49
|
-
sig { returns(T::Hash[Symbol,
|
|
49
|
+
sig { returns(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]) }
|
|
50
50
|
attr_accessor :metadata
|
|
51
51
|
|
|
52
52
|
sig { returns(String) }
|
|
@@ -87,7 +87,7 @@ module Dodopayments
|
|
|
87
87
|
credit_entitlement_id: String,
|
|
88
88
|
customer_id: String,
|
|
89
89
|
is_credit: T::Boolean,
|
|
90
|
-
metadata: T::Hash[Symbol,
|
|
90
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
91
91
|
overage_after: String,
|
|
92
92
|
overage_before: String,
|
|
93
93
|
transaction_type:
|
|
@@ -137,7 +137,7 @@ module Dodopayments
|
|
|
137
137
|
credit_entitlement_id: String,
|
|
138
138
|
customer_id: String,
|
|
139
139
|
is_credit: T::Boolean,
|
|
140
|
-
metadata: T::Hash[Symbol,
|
|
140
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
141
141
|
overage_after: String,
|
|
142
142
|
overage_before: String,
|
|
143
143
|
transaction_type:
|
|
@@ -24,10 +24,18 @@ module Dodopayments
|
|
|
24
24
|
attr_accessor :name
|
|
25
25
|
|
|
26
26
|
# Additional metadata for the customer
|
|
27
|
-
sig
|
|
27
|
+
sig do
|
|
28
|
+
returns(
|
|
29
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants])
|
|
30
|
+
)
|
|
31
|
+
end
|
|
28
32
|
attr_reader :metadata
|
|
29
33
|
|
|
30
|
-
sig
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants]
|
|
37
|
+
).void
|
|
38
|
+
end
|
|
31
39
|
attr_writer :metadata
|
|
32
40
|
|
|
33
41
|
sig { returns(T.nilable(String)) }
|
|
@@ -40,7 +48,7 @@ module Dodopayments
|
|
|
40
48
|
customer_id: String,
|
|
41
49
|
email: String,
|
|
42
50
|
name: String,
|
|
43
|
-
metadata: T::Hash[Symbol,
|
|
51
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
44
52
|
phone_number: T.nilable(String)
|
|
45
53
|
).returns(T.attached_class)
|
|
46
54
|
end
|
|
@@ -64,7 +72,7 @@ module Dodopayments
|
|
|
64
72
|
customer_id: String,
|
|
65
73
|
email: String,
|
|
66
74
|
name: String,
|
|
67
|
-
metadata: T::Hash[Symbol,
|
|
75
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
68
76
|
phone_number: T.nilable(String)
|
|
69
77
|
}
|
|
70
78
|
)
|
|
@@ -21,10 +21,18 @@ module Dodopayments
|
|
|
21
21
|
attr_accessor :name
|
|
22
22
|
|
|
23
23
|
# Additional metadata for the customer
|
|
24
|
-
sig
|
|
24
|
+
sig do
|
|
25
|
+
returns(
|
|
26
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants])
|
|
27
|
+
)
|
|
28
|
+
end
|
|
25
29
|
attr_reader :metadata
|
|
26
30
|
|
|
27
|
-
sig
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants]
|
|
34
|
+
).void
|
|
35
|
+
end
|
|
28
36
|
attr_writer :metadata
|
|
29
37
|
|
|
30
38
|
sig { returns(T.nilable(String)) }
|
|
@@ -34,7 +42,7 @@ module Dodopayments
|
|
|
34
42
|
params(
|
|
35
43
|
email: String,
|
|
36
44
|
name: String,
|
|
37
|
-
metadata: T::Hash[Symbol,
|
|
45
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
38
46
|
phone_number: T.nilable(String),
|
|
39
47
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
40
48
|
).returns(T.attached_class)
|
|
@@ -54,7 +62,7 @@ module Dodopayments
|
|
|
54
62
|
{
|
|
55
63
|
email: String,
|
|
56
64
|
name: String,
|
|
57
|
-
metadata: T::Hash[Symbol,
|
|
65
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
58
66
|
phone_number: T.nilable(String),
|
|
59
67
|
request_options: Dodopayments::RequestOptions
|
|
60
68
|
}
|
|
@@ -24,10 +24,18 @@ module Dodopayments
|
|
|
24
24
|
attr_accessor :name
|
|
25
25
|
|
|
26
26
|
# Additional metadata associated with the customer
|
|
27
|
-
sig
|
|
27
|
+
sig do
|
|
28
|
+
returns(
|
|
29
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants])
|
|
30
|
+
)
|
|
31
|
+
end
|
|
28
32
|
attr_reader :metadata
|
|
29
33
|
|
|
30
|
-
sig
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants]
|
|
37
|
+
).void
|
|
38
|
+
end
|
|
31
39
|
attr_writer :metadata
|
|
32
40
|
|
|
33
41
|
# Phone number of the customer
|
|
@@ -39,7 +47,7 @@ module Dodopayments
|
|
|
39
47
|
customer_id: String,
|
|
40
48
|
email: String,
|
|
41
49
|
name: String,
|
|
42
|
-
metadata: T::Hash[Symbol,
|
|
50
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
43
51
|
phone_number: T.nilable(String)
|
|
44
52
|
).returns(T.attached_class)
|
|
45
53
|
end
|
|
@@ -63,7 +71,7 @@ module Dodopayments
|
|
|
63
71
|
customer_id: String,
|
|
64
72
|
email: String,
|
|
65
73
|
name: String,
|
|
66
|
-
metadata: T::Hash[Symbol,
|
|
74
|
+
metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
|
|
67
75
|
phone_number: T.nilable(String)
|
|
68
76
|
}
|
|
69
77
|
)
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class CustomerListEntitlementGrantsParams < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Dodopayments::CustomerListEntitlementGrantsParams,
|
|
13
|
+
Dodopayments::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :customer_id
|
|
19
|
+
|
|
20
|
+
# Filter by integration type (e.g. `feature_flag`)
|
|
21
|
+
sig do
|
|
22
|
+
returns(
|
|
23
|
+
T.nilable(
|
|
24
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::OrSymbol
|
|
25
|
+
)
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
attr_reader :integration_type
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
integration_type:
|
|
33
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::OrSymbol
|
|
34
|
+
).void
|
|
35
|
+
end
|
|
36
|
+
attr_writer :integration_type
|
|
37
|
+
|
|
38
|
+
# Page number (default 0)
|
|
39
|
+
sig { returns(T.nilable(Integer)) }
|
|
40
|
+
attr_reader :page_number
|
|
41
|
+
|
|
42
|
+
sig { params(page_number: Integer).void }
|
|
43
|
+
attr_writer :page_number
|
|
44
|
+
|
|
45
|
+
# Page size (default 10, max 100)
|
|
46
|
+
sig { returns(T.nilable(Integer)) }
|
|
47
|
+
attr_reader :page_size
|
|
48
|
+
|
|
49
|
+
sig { params(page_size: Integer).void }
|
|
50
|
+
attr_writer :page_size
|
|
51
|
+
|
|
52
|
+
# Filter by grant status
|
|
53
|
+
sig do
|
|
54
|
+
returns(
|
|
55
|
+
T.nilable(
|
|
56
|
+
Dodopayments::CustomerListEntitlementGrantsParams::Status::OrSymbol
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
attr_reader :status
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
params(
|
|
64
|
+
status:
|
|
65
|
+
Dodopayments::CustomerListEntitlementGrantsParams::Status::OrSymbol
|
|
66
|
+
).void
|
|
67
|
+
end
|
|
68
|
+
attr_writer :status
|
|
69
|
+
|
|
70
|
+
sig do
|
|
71
|
+
params(
|
|
72
|
+
customer_id: String,
|
|
73
|
+
integration_type:
|
|
74
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::OrSymbol,
|
|
75
|
+
page_number: Integer,
|
|
76
|
+
page_size: Integer,
|
|
77
|
+
status:
|
|
78
|
+
Dodopayments::CustomerListEntitlementGrantsParams::Status::OrSymbol,
|
|
79
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
80
|
+
).returns(T.attached_class)
|
|
81
|
+
end
|
|
82
|
+
def self.new(
|
|
83
|
+
customer_id:,
|
|
84
|
+
# Filter by integration type (e.g. `feature_flag`)
|
|
85
|
+
integration_type: nil,
|
|
86
|
+
# Page number (default 0)
|
|
87
|
+
page_number: nil,
|
|
88
|
+
# Page size (default 10, max 100)
|
|
89
|
+
page_size: nil,
|
|
90
|
+
# Filter by grant status
|
|
91
|
+
status: nil,
|
|
92
|
+
request_options: {}
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
sig do
|
|
97
|
+
override.returns(
|
|
98
|
+
{
|
|
99
|
+
customer_id: String,
|
|
100
|
+
integration_type:
|
|
101
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::OrSymbol,
|
|
102
|
+
page_number: Integer,
|
|
103
|
+
page_size: Integer,
|
|
104
|
+
status:
|
|
105
|
+
Dodopayments::CustomerListEntitlementGrantsParams::Status::OrSymbol,
|
|
106
|
+
request_options: Dodopayments::RequestOptions
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
end
|
|
110
|
+
def to_hash
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Filter by integration type (e.g. `feature_flag`)
|
|
114
|
+
module IntegrationType
|
|
115
|
+
extend Dodopayments::Internal::Type::Enum
|
|
116
|
+
|
|
117
|
+
TaggedSymbol =
|
|
118
|
+
T.type_alias do
|
|
119
|
+
T.all(
|
|
120
|
+
Symbol,
|
|
121
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
125
|
+
|
|
126
|
+
DISCORD =
|
|
127
|
+
T.let(
|
|
128
|
+
:discord,
|
|
129
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::TaggedSymbol
|
|
130
|
+
)
|
|
131
|
+
TELEGRAM =
|
|
132
|
+
T.let(
|
|
133
|
+
:telegram,
|
|
134
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::TaggedSymbol
|
|
135
|
+
)
|
|
136
|
+
GITHUB =
|
|
137
|
+
T.let(
|
|
138
|
+
:github,
|
|
139
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::TaggedSymbol
|
|
140
|
+
)
|
|
141
|
+
FIGMA =
|
|
142
|
+
T.let(
|
|
143
|
+
:figma,
|
|
144
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::TaggedSymbol
|
|
145
|
+
)
|
|
146
|
+
FRAMER =
|
|
147
|
+
T.let(
|
|
148
|
+
:framer,
|
|
149
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::TaggedSymbol
|
|
150
|
+
)
|
|
151
|
+
NOTION =
|
|
152
|
+
T.let(
|
|
153
|
+
:notion,
|
|
154
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::TaggedSymbol
|
|
155
|
+
)
|
|
156
|
+
DIGITAL_FILES =
|
|
157
|
+
T.let(
|
|
158
|
+
:digital_files,
|
|
159
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::TaggedSymbol
|
|
160
|
+
)
|
|
161
|
+
LICENSE_KEY =
|
|
162
|
+
T.let(
|
|
163
|
+
:license_key,
|
|
164
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::TaggedSymbol
|
|
165
|
+
)
|
|
166
|
+
FEATURE_FLAG =
|
|
167
|
+
T.let(
|
|
168
|
+
:feature_flag,
|
|
169
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::TaggedSymbol
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
sig do
|
|
173
|
+
override.returns(
|
|
174
|
+
T::Array[
|
|
175
|
+
Dodopayments::CustomerListEntitlementGrantsParams::IntegrationType::TaggedSymbol
|
|
176
|
+
]
|
|
177
|
+
)
|
|
178
|
+
end
|
|
179
|
+
def self.values
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Filter by grant status
|
|
184
|
+
module Status
|
|
185
|
+
extend Dodopayments::Internal::Type::Enum
|
|
186
|
+
|
|
187
|
+
TaggedSymbol =
|
|
188
|
+
T.type_alias do
|
|
189
|
+
T.all(
|
|
190
|
+
Symbol,
|
|
191
|
+
Dodopayments::CustomerListEntitlementGrantsParams::Status
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
195
|
+
|
|
196
|
+
PENDING =
|
|
197
|
+
T.let(
|
|
198
|
+
:Pending,
|
|
199
|
+
Dodopayments::CustomerListEntitlementGrantsParams::Status::TaggedSymbol
|
|
200
|
+
)
|
|
201
|
+
DELIVERED =
|
|
202
|
+
T.let(
|
|
203
|
+
:Delivered,
|
|
204
|
+
Dodopayments::CustomerListEntitlementGrantsParams::Status::TaggedSymbol
|
|
205
|
+
)
|
|
206
|
+
FAILED =
|
|
207
|
+
T.let(
|
|
208
|
+
:Failed,
|
|
209
|
+
Dodopayments::CustomerListEntitlementGrantsParams::Status::TaggedSymbol
|
|
210
|
+
)
|
|
211
|
+
REVOKED =
|
|
212
|
+
T.let(
|
|
213
|
+
:Revoked,
|
|
214
|
+
Dodopayments::CustomerListEntitlementGrantsParams::Status::TaggedSymbol
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
sig do
|
|
218
|
+
override.returns(
|
|
219
|
+
T::Array[
|
|
220
|
+
Dodopayments::CustomerListEntitlementGrantsParams::Status::TaggedSymbol
|
|
221
|
+
]
|
|
222
|
+
)
|
|
223
|
+
end
|
|
224
|
+
def self.values
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
end
|
|
@@ -21,7 +21,11 @@ module Dodopayments
|
|
|
21
21
|
attr_accessor :email
|
|
22
22
|
|
|
23
23
|
# Additional metadata for the customer
|
|
24
|
-
sig
|
|
24
|
+
sig do
|
|
25
|
+
returns(
|
|
26
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants])
|
|
27
|
+
)
|
|
28
|
+
end
|
|
25
29
|
attr_accessor :metadata
|
|
26
30
|
|
|
27
31
|
sig { returns(T.nilable(String)) }
|
|
@@ -34,7 +38,8 @@ module Dodopayments
|
|
|
34
38
|
params(
|
|
35
39
|
customer_id: String,
|
|
36
40
|
email: T.nilable(String),
|
|
37
|
-
metadata:
|
|
41
|
+
metadata:
|
|
42
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
|
|
38
43
|
name: T.nilable(String),
|
|
39
44
|
phone_number: T.nilable(String),
|
|
40
45
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
@@ -56,7 +61,8 @@ module Dodopayments
|
|
|
56
61
|
{
|
|
57
62
|
customer_id: String,
|
|
58
63
|
email: T.nilable(String),
|
|
59
|
-
metadata:
|
|
64
|
+
metadata:
|
|
65
|
+
T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
|
|
60
66
|
name: T.nilable(String),
|
|
61
67
|
phone_number: T.nilable(String),
|
|
62
68
|
request_options: Dodopayments::RequestOptions
|