dodopayments 2.18.0 → 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 +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/checkout_session_request.rb +5 -3
- 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/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/license_key_duration.rb +3 -1
- data/lib/dodopayments/models/metadata.rb +15 -1
- data/lib/dodopayments/models/payment.rb +5 -5
- 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 +18 -4
- data/lib/dodopayments/models/time_interval.rb +1 -0
- 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/attach_addon.rbi +6 -1
- data/rbi/dodopayments/models/checkout_session_flags.rbi +17 -0
- data/rbi/dodopayments/models/checkout_session_request.rbi +9 -3
- 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/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/license_key_duration.rbi +6 -1
- data/rbi/dodopayments/models/metadata.rbi +12 -1
- data/rbi/dodopayments/models/payment.rbi +5 -5
- 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 +13 -3
- data/rbi/dodopayments/models/time_interval.rbi +1 -0
- 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/checkout_session_flags.rbs +7 -0
- 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
|
@@ -50,8 +50,8 @@ module Dodopayments
|
|
|
50
50
|
# @!attribute metadata
|
|
51
51
|
# Arbitrary key-value metadata recorded on the grant.
|
|
52
52
|
#
|
|
53
|
-
# @return [Hash{Symbol=>String}]
|
|
54
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[
|
|
53
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
54
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
55
55
|
|
|
56
56
|
# @!attribute status
|
|
57
57
|
# Lifecycle status of the grant.
|
|
@@ -90,6 +90,13 @@ module Dodopayments
|
|
|
90
90
|
# @return [String, nil]
|
|
91
91
|
optional :error_message, String, nil?: true
|
|
92
92
|
|
|
93
|
+
# @!attribute feature
|
|
94
|
+
# Typed feature payload, present only when the entitlement integration is
|
|
95
|
+
# `feature_flag`; `null` for every other integration type.
|
|
96
|
+
#
|
|
97
|
+
# @return [Dodopayments::Models::Feature, nil]
|
|
98
|
+
optional :feature, -> { Dodopayments::Feature }, nil?: true
|
|
99
|
+
|
|
93
100
|
# @!attribute license_key
|
|
94
101
|
# License-key delivery payload, present when the entitlement integration is
|
|
95
102
|
# `license_key`.
|
|
@@ -135,7 +142,7 @@ module Dodopayments
|
|
|
135
142
|
# @return [String, nil]
|
|
136
143
|
optional :subscription_id, String, nil?: true
|
|
137
144
|
|
|
138
|
-
# @!method initialize(id:, brand_id:, business_id:, created_at:, customer_id:, entitlement_id:, integration_type:, metadata:, status:, updated_at:, delivered_at: nil, digital_product_delivery: nil, error_code: nil, error_message: nil, license_key: nil, oauth_expires_at: nil, oauth_url: nil, payment_id: nil, revocation_reason: nil, revoked_at: nil, subscription_id: nil)
|
|
145
|
+
# @!method initialize(id:, brand_id:, business_id:, created_at:, customer_id:, entitlement_id:, integration_type:, metadata:, status:, updated_at:, delivered_at: nil, digital_product_delivery: nil, error_code: nil, error_message: nil, feature: nil, license_key: nil, oauth_expires_at: nil, oauth_url: nil, payment_id: nil, revocation_reason: nil, revoked_at: nil, subscription_id: nil)
|
|
139
146
|
# Some parameter documentations has been truncated, see
|
|
140
147
|
# {Dodopayments::Models::Entitlements::EntitlementGrant} for more details.
|
|
141
148
|
#
|
|
@@ -156,7 +163,7 @@ module Dodopayments
|
|
|
156
163
|
#
|
|
157
164
|
# @param integration_type [Symbol, Dodopayments::Models::EntitlementIntegrationType] The integration type of the grant's entitlement (e.g. `license_key`).
|
|
158
165
|
#
|
|
159
|
-
# @param metadata [Hash{Symbol=>String}] Arbitrary key-value metadata recorded on the grant.
|
|
166
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Arbitrary key-value metadata recorded on the grant.
|
|
160
167
|
#
|
|
161
168
|
# @param status [Symbol, Dodopayments::Models::Entitlements::EntitlementGrant::Status] Lifecycle status of the grant.
|
|
162
169
|
#
|
|
@@ -170,6 +177,8 @@ module Dodopayments
|
|
|
170
177
|
#
|
|
171
178
|
# @param error_message [String, nil] Human-readable message reported when delivery failed, when applicable.
|
|
172
179
|
#
|
|
180
|
+
# @param feature [Dodopayments::Models::Feature, nil] Typed feature payload, present only when the entitlement integration is
|
|
181
|
+
#
|
|
173
182
|
# @param license_key [Dodopayments::Models::Entitlements::LicenseKeyGrant, nil] License-key delivery payload, present when the entitlement integration
|
|
174
183
|
#
|
|
175
184
|
# @param oauth_expires_at [Time, nil] Timestamp when `oauth_url` stops being valid, when applicable.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class Feature < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute feature_id
|
|
7
|
+
# Identifier of the capability this grant confers.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :feature_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute feature_type
|
|
13
|
+
# Type of capability conferred.
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, Dodopayments::Models::FeatureType]
|
|
16
|
+
required :feature_type, enum: -> { Dodopayments::FeatureType }
|
|
17
|
+
|
|
18
|
+
# @!method initialize(feature_id:, feature_type:)
|
|
19
|
+
# Capability conferred by a `feature_flag` grant.
|
|
20
|
+
#
|
|
21
|
+
# @param feature_id [String] Identifier of the capability this grant confers.
|
|
22
|
+
#
|
|
23
|
+
# @param feature_type [Symbol, Dodopayments::Models::FeatureType] Type of capability conferred.
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# Type of capability a `feature_flag` entitlement confers.
|
|
6
|
+
module FeatureType
|
|
7
|
+
extend Dodopayments::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
BOOLEAN = :boolean
|
|
10
|
+
|
|
11
|
+
# @!method self.values
|
|
12
|
+
# @return [Array<Symbol>]
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -4,9 +4,15 @@ module Dodopayments
|
|
|
4
4
|
module Models
|
|
5
5
|
# Integration-specific configuration supplied when creating or updating an
|
|
6
6
|
# entitlement. The shape required matches the entitlement's `integration_type`.
|
|
7
|
+
#
|
|
8
|
+
# Untagged enum: variants are matched in order. `FeatureFlag` must precede
|
|
9
|
+
# `LicenseKey`, whose fields are all optional and would otherwise match a
|
|
10
|
+
# `feature_flag` config.
|
|
7
11
|
module IntegrationConfig
|
|
8
12
|
extend Dodopayments::Internal::Type::Union
|
|
9
13
|
|
|
14
|
+
variant -> { Dodopayments::IntegrationConfig::FeatureFlagConfig }
|
|
15
|
+
|
|
10
16
|
variant -> { Dodopayments::IntegrationConfig::GitHubConfig }
|
|
11
17
|
|
|
12
18
|
variant -> { Dodopayments::IntegrationConfig::DiscordConfig }
|
|
@@ -23,6 +29,29 @@ module Dodopayments
|
|
|
23
29
|
|
|
24
30
|
variant -> { Dodopayments::IntegrationConfig::LicenseKeyConfig }
|
|
25
31
|
|
|
32
|
+
class FeatureFlagConfig < Dodopayments::Internal::Type::BaseModel
|
|
33
|
+
# @!attribute feature_id
|
|
34
|
+
# Merchant-chosen identifier for the capability this entitlement unlocks. Not
|
|
35
|
+
# unique across entitlements.
|
|
36
|
+
#
|
|
37
|
+
# @return [String]
|
|
38
|
+
required :feature_id, String
|
|
39
|
+
|
|
40
|
+
# @!attribute feature_type
|
|
41
|
+
# Type of capability conferred.
|
|
42
|
+
#
|
|
43
|
+
# @return [Symbol, Dodopayments::Models::FeatureType]
|
|
44
|
+
required :feature_type, enum: -> { Dodopayments::FeatureType }
|
|
45
|
+
|
|
46
|
+
# @!method initialize(feature_id:, feature_type:)
|
|
47
|
+
# Some parameter documentations has been truncated, see
|
|
48
|
+
# {Dodopayments::Models::IntegrationConfig::FeatureFlagConfig} for more details.
|
|
49
|
+
#
|
|
50
|
+
# @param feature_id [String] Merchant-chosen identifier for the capability this entitlement
|
|
51
|
+
#
|
|
52
|
+
# @param feature_type [Symbol, Dodopayments::Models::FeatureType] Type of capability conferred.
|
|
53
|
+
end
|
|
54
|
+
|
|
26
55
|
class GitHubConfig < Dodopayments::Internal::Type::BaseModel
|
|
27
56
|
# @!attribute permission
|
|
28
57
|
# Permission to grant on the repository.
|
|
@@ -222,7 +251,7 @@ module Dodopayments
|
|
|
222
251
|
end
|
|
223
252
|
|
|
224
253
|
# @!method self.variants
|
|
225
|
-
# @return [Array(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)]
|
|
254
|
+
# @return [Array(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)]
|
|
226
255
|
end
|
|
227
256
|
end
|
|
228
257
|
end
|
|
@@ -9,6 +9,8 @@ module Dodopayments
|
|
|
9
9
|
module IntegrationConfigResponse
|
|
10
10
|
extend Dodopayments::Internal::Type::Union
|
|
11
11
|
|
|
12
|
+
variant -> { Dodopayments::IntegrationConfigResponse::FeatureFlagConfig }
|
|
13
|
+
|
|
12
14
|
variant -> { Dodopayments::IntegrationConfigResponse::GitHubConfig }
|
|
13
15
|
|
|
14
16
|
variant -> { Dodopayments::IntegrationConfigResponse::DiscordConfig }
|
|
@@ -25,6 +27,25 @@ module Dodopayments
|
|
|
25
27
|
|
|
26
28
|
variant -> { Dodopayments::IntegrationConfigResponse::LicenseKeyConfig }
|
|
27
29
|
|
|
30
|
+
class FeatureFlagConfig < Dodopayments::Internal::Type::BaseModel
|
|
31
|
+
# @!attribute feature_id
|
|
32
|
+
# Merchant-chosen identifier for the capability this entitlement unlocks.
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :feature_id, String
|
|
36
|
+
|
|
37
|
+
# @!attribute feature_type
|
|
38
|
+
# Type of capability conferred. Only `boolean` is supported today.
|
|
39
|
+
#
|
|
40
|
+
# @return [Symbol, Dodopayments::Models::FeatureType]
|
|
41
|
+
required :feature_type, enum: -> { Dodopayments::FeatureType }
|
|
42
|
+
|
|
43
|
+
# @!method initialize(feature_id:, feature_type:)
|
|
44
|
+
# @param feature_id [String] Merchant-chosen identifier for the capability this entitlement unlocks.
|
|
45
|
+
#
|
|
46
|
+
# @param feature_type [Symbol, Dodopayments::Models::FeatureType] Type of capability conferred. Only `boolean` is supported today.
|
|
47
|
+
end
|
|
48
|
+
|
|
28
49
|
class GitHubConfig < Dodopayments::Internal::Type::BaseModel
|
|
29
50
|
# @!attribute permission
|
|
30
51
|
# Permission to grant on the repository.
|
|
@@ -283,7 +304,7 @@ module Dodopayments
|
|
|
283
304
|
end
|
|
284
305
|
|
|
285
306
|
# @!method self.variants
|
|
286
|
-
# @return [Array(Dodopayments::Models::IntegrationConfigResponse::GitHubConfig, Dodopayments::Models::IntegrationConfigResponse::DiscordConfig, Dodopayments::Models::IntegrationConfigResponse::TelegramConfig, Dodopayments::Models::IntegrationConfigResponse::FigmaConfig, Dodopayments::Models::IntegrationConfigResponse::FramerConfig, Dodopayments::Models::IntegrationConfigResponse::NotionConfig, Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig)]
|
|
307
|
+
# @return [Array(Dodopayments::Models::IntegrationConfigResponse::FeatureFlagConfig, Dodopayments::Models::IntegrationConfigResponse::GitHubConfig, Dodopayments::Models::IntegrationConfigResponse::DiscordConfig, Dodopayments::Models::IntegrationConfigResponse::TelegramConfig, Dodopayments::Models::IntegrationConfigResponse::FigmaConfig, Dodopayments::Models::IntegrationConfigResponse::FramerConfig, Dodopayments::Models::IntegrationConfigResponse::NotionConfig, Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig)]
|
|
287
308
|
end
|
|
288
309
|
end
|
|
289
310
|
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
|
|
@@ -2,7 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
module Dodopayments
|
|
4
4
|
module Models
|
|
5
|
+
# Metadata value can be a string, integer, number, or boolean
|
|
6
|
+
module MetadataItem
|
|
7
|
+
extend Dodopayments::Internal::Type::Union
|
|
8
|
+
|
|
9
|
+
variant String
|
|
10
|
+
|
|
11
|
+
variant Float
|
|
12
|
+
|
|
13
|
+
variant Dodopayments::Internal::Type::Boolean
|
|
14
|
+
|
|
15
|
+
# @!method self.variants
|
|
16
|
+
# @return [Array(String, Float, Boolean)]
|
|
17
|
+
end
|
|
18
|
+
|
|
5
19
|
# @type [Dodopayments::Internal::Type::Converter]
|
|
6
|
-
Metadata = Dodopayments::Internal::Type::HashOf[
|
|
20
|
+
Metadata = Dodopayments::Internal::Type::HashOf[union: -> { Dodopayments::MetadataItem }]
|
|
7
21
|
end
|
|
8
22
|
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
|
|
@@ -55,8 +55,8 @@ module Dodopayments
|
|
|
55
55
|
# @!attribute metadata
|
|
56
56
|
# Additional custom data associated with the payment
|
|
57
57
|
#
|
|
58
|
-
# @return [Hash{Symbol=>String}]
|
|
59
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[
|
|
58
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
59
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
60
60
|
|
|
61
61
|
# @!attribute payment_id
|
|
62
62
|
# Unique identifier for the payment
|
|
@@ -276,11 +276,11 @@ 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
|
#
|
|
283
|
-
# @param metadata [Hash{Symbol=>String}] Additional custom data associated with the payment
|
|
283
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional custom data associated with the payment
|
|
284
284
|
#
|
|
285
285
|
# @param payment_id [String] Unique identifier for the payment
|
|
286
286
|
#
|
|
@@ -86,8 +86,8 @@ module Dodopayments
|
|
|
86
86
|
# Additional metadata associated with the payment. Defaults to empty if not
|
|
87
87
|
# provided.
|
|
88
88
|
#
|
|
89
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
90
|
-
optional :metadata, Dodopayments::Internal::Type::HashOf[
|
|
89
|
+
# @return [Hash{Symbol=>String, Float, Boolean}, nil]
|
|
90
|
+
optional :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
91
91
|
|
|
92
92
|
# @!attribute payment_link
|
|
93
93
|
# Whether to generate a payment link. Defaults to false if not specified.
|
|
@@ -168,7 +168,7 @@ module Dodopayments
|
|
|
168
168
|
#
|
|
169
169
|
# @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this payment
|
|
170
170
|
#
|
|
171
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata associated with the payment.
|
|
171
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata associated with the payment.
|
|
172
172
|
#
|
|
173
173
|
# @param payment_link [Boolean, nil] Whether to generate a payment link. Defaults to false if not specified.
|
|
174
174
|
#
|
|
@@ -20,8 +20,8 @@ module Dodopayments
|
|
|
20
20
|
# @!attribute metadata
|
|
21
21
|
# Additional metadata associated with the payment
|
|
22
22
|
#
|
|
23
|
-
# @return [Hash{Symbol=>String}]
|
|
24
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[
|
|
23
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
24
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
25
25
|
|
|
26
26
|
# @!attribute payment_id
|
|
27
27
|
# Unique identifier for the payment
|
|
@@ -79,7 +79,7 @@ module Dodopayments
|
|
|
79
79
|
#
|
|
80
80
|
# @param customer [Dodopayments::Models::CustomerLimitedDetails] Limited details about the customer making the payment
|
|
81
81
|
#
|
|
82
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata associated with the payment
|
|
82
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata associated with the payment
|
|
83
83
|
#
|
|
84
84
|
# @param payment_id [String] Unique identifier for the payment
|
|
85
85
|
#
|
|
@@ -35,9 +35,10 @@ module Dodopayments
|
|
|
35
35
|
required :has_license_key, Dodopayments::Internal::Type::Boolean
|
|
36
36
|
|
|
37
37
|
# @!attribute metadata
|
|
38
|
+
# Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
|
|
38
39
|
#
|
|
39
|
-
# @return [Hash{Symbol=>String}]
|
|
40
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[
|
|
40
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
41
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
41
42
|
|
|
42
43
|
# @!attribute payment_id
|
|
43
44
|
#
|
|
@@ -129,7 +130,7 @@ module Dodopayments
|
|
|
129
130
|
#
|
|
130
131
|
# @param has_license_key [Boolean]
|
|
131
132
|
#
|
|
132
|
-
# @param metadata [Hash{Symbol=>String}]
|
|
133
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
|
|
133
134
|
#
|
|
134
135
|
# @param payment_id [String]
|
|
135
136
|
#
|
|
@@ -52,8 +52,8 @@ module Dodopayments
|
|
|
52
52
|
# @!attribute metadata
|
|
53
53
|
# Additional custom data associated with the product
|
|
54
54
|
#
|
|
55
|
-
# @return [Hash{Symbol=>String}]
|
|
56
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[
|
|
55
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
56
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
57
57
|
|
|
58
58
|
# @!attribute price
|
|
59
59
|
# Pricing information for the product.
|
|
@@ -163,7 +163,7 @@ module Dodopayments
|
|
|
163
163
|
#
|
|
164
164
|
# @param license_key_enabled [Boolean] Indicates whether the product requires a license key.
|
|
165
165
|
#
|
|
166
|
-
# @param metadata [Hash{Symbol=>String}] Additional custom data associated with the product
|
|
166
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional custom data associated with the product
|
|
167
167
|
#
|
|
168
168
|
# @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice] Pricing information for the product.
|
|
169
169
|
#
|
|
@@ -117,8 +117,8 @@ module Dodopayments
|
|
|
117
117
|
# @!attribute metadata
|
|
118
118
|
# Additional metadata for the product
|
|
119
119
|
#
|
|
120
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
121
|
-
optional :metadata, Dodopayments::Internal::Type::HashOf[
|
|
120
|
+
# @return [Hash{Symbol=>String, Float, Boolean}, nil]
|
|
121
|
+
optional :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
122
122
|
|
|
123
123
|
# @!attribute pricing_mode
|
|
124
124
|
# Pricing mode for localized pricing. When set, rules from
|
|
@@ -158,7 +158,7 @@ module Dodopayments
|
|
|
158
158
|
#
|
|
159
159
|
# @param license_key_enabled [Boolean, nil] When true, generates and sends a license key to your customer.
|
|
160
160
|
#
|
|
161
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata for the product
|
|
161
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata for the product
|
|
162
162
|
#
|
|
163
163
|
# @param pricing_mode [Symbol, Dodopayments::Models::Products::PricingMode, nil] Pricing mode for localized pricing. When set, rules from
|
|
164
164
|
#
|
|
@@ -14,7 +14,7 @@ module Dodopayments
|
|
|
14
14
|
# For `digital_files` entitlements the response includes presigned download URLs
|
|
15
15
|
# for each attached file; other integrations match the shape supplied at creation.
|
|
16
16
|
#
|
|
17
|
-
# @return [Dodopayments::Models::IntegrationConfigResponse::GitHubConfig, Dodopayments::Models::IntegrationConfigResponse::DiscordConfig, Dodopayments::Models::IntegrationConfigResponse::TelegramConfig, Dodopayments::Models::IntegrationConfigResponse::FigmaConfig, Dodopayments::Models::IntegrationConfigResponse::FramerConfig, Dodopayments::Models::IntegrationConfigResponse::NotionConfig, Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig]
|
|
17
|
+
# @return [Dodopayments::Models::IntegrationConfigResponse::FeatureFlagConfig, Dodopayments::Models::IntegrationConfigResponse::GitHubConfig, Dodopayments::Models::IntegrationConfigResponse::DiscordConfig, Dodopayments::Models::IntegrationConfigResponse::TelegramConfig, Dodopayments::Models::IntegrationConfigResponse::FigmaConfig, Dodopayments::Models::IntegrationConfigResponse::FramerConfig, Dodopayments::Models::IntegrationConfigResponse::NotionConfig, Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig]
|
|
18
18
|
required :integration_config, union: -> { Dodopayments::IntegrationConfigResponse }
|
|
19
19
|
|
|
20
20
|
# @!attribute integration_type
|
|
@@ -45,7 +45,7 @@ module Dodopayments
|
|
|
45
45
|
#
|
|
46
46
|
# @param id [String]
|
|
47
47
|
#
|
|
48
|
-
# @param integration_config [Dodopayments::Models::IntegrationConfigResponse::GitHubConfig, Dodopayments::Models::IntegrationConfigResponse::DiscordConfig, Dodopayments::Models::IntegrationConfigResponse::TelegramConfig, Dodopayments::Models::IntegrationConfigResponse::FigmaConfig, Dodopayments::Models::IntegrationConfigResponse::FramerConfig, Dodopayments::Models::IntegrationConfigResponse::NotionConfig, Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig] Integration-specific configuration on an entitlement read response.
|
|
48
|
+
# @param integration_config [Dodopayments::Models::IntegrationConfigResponse::FeatureFlagConfig, Dodopayments::Models::IntegrationConfigResponse::GitHubConfig, Dodopayments::Models::IntegrationConfigResponse::DiscordConfig, Dodopayments::Models::IntegrationConfigResponse::TelegramConfig, Dodopayments::Models::IntegrationConfigResponse::FigmaConfig, Dodopayments::Models::IntegrationConfigResponse::FramerConfig, Dodopayments::Models::IntegrationConfigResponse::NotionConfig, Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig] Integration-specific configuration on an entitlement read response.
|
|
49
49
|
#
|
|
50
50
|
# @param integration_type [Symbol, Dodopayments::Models::EntitlementIntegrationType]
|
|
51
51
|
#
|
|
@@ -32,8 +32,8 @@ module Dodopayments
|
|
|
32
32
|
# @!attribute metadata
|
|
33
33
|
# Additional custom data associated with the product
|
|
34
34
|
#
|
|
35
|
-
# @return [Hash{Symbol=>String}]
|
|
36
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[
|
|
35
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
36
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
37
37
|
|
|
38
38
|
# @!attribute product_id
|
|
39
39
|
# Unique identifier for the product.
|
|
@@ -123,7 +123,7 @@ module Dodopayments
|
|
|
123
123
|
#
|
|
124
124
|
# @param is_recurring [Boolean] Indicates if the product is recurring (e.g., subscriptions).
|
|
125
125
|
#
|
|
126
|
-
# @param metadata [Hash{Symbol=>String}] Additional custom data associated with the product
|
|
126
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional custom data associated with the product
|
|
127
127
|
#
|
|
128
128
|
# @param product_id [String] Unique identifier for the product.
|
|
129
129
|
#
|
|
@@ -116,8 +116,10 @@ module Dodopayments
|
|
|
116
116
|
# @!attribute metadata
|
|
117
117
|
# Additional metadata for the product
|
|
118
118
|
#
|
|
119
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
120
|
-
optional :metadata,
|
|
119
|
+
# @return [Hash{Symbol=>String, Float, Boolean}, nil]
|
|
120
|
+
optional :metadata,
|
|
121
|
+
-> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] },
|
|
122
|
+
nil?: true
|
|
121
123
|
|
|
122
124
|
# @!attribute name
|
|
123
125
|
# Name of the product, optional and must be at most 100 characters.
|
|
@@ -173,7 +175,7 @@ module Dodopayments
|
|
|
173
175
|
#
|
|
174
176
|
# @param license_key_enabled [Boolean, nil] Whether the product requires a license key.
|
|
175
177
|
#
|
|
176
|
-
# @param metadata [Hash{Symbol=>String}, nil] Additional metadata for the product
|
|
178
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}, nil] Additional metadata for the product
|
|
177
179
|
#
|
|
178
180
|
# @param name [String, nil] Name of the product, optional and must be at most 100 characters.
|
|
179
181
|
#
|
|
@@ -37,8 +37,8 @@ module Dodopayments
|
|
|
37
37
|
# @!attribute metadata
|
|
38
38
|
# Additional metadata stored with the refund.
|
|
39
39
|
#
|
|
40
|
-
# @return [Hash{Symbol=>String}]
|
|
41
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[
|
|
40
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
41
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
42
42
|
|
|
43
43
|
# @!attribute payment_id
|
|
44
44
|
# The unique identifier of the payment associated with the refund.
|
|
@@ -87,7 +87,7 @@ module Dodopayments
|
|
|
87
87
|
#
|
|
88
88
|
# @param is_partial [Boolean] If true the refund is a partial refund
|
|
89
89
|
#
|
|
90
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata stored with the refund.
|
|
90
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata stored with the refund.
|
|
91
91
|
#
|
|
92
92
|
# @param payment_id [String] The unique identifier of the payment associated with the refund.
|
|
93
93
|
#
|
|
@@ -24,8 +24,8 @@ module Dodopayments
|
|
|
24
24
|
# @!attribute metadata
|
|
25
25
|
# Additional metadata associated with the refund.
|
|
26
26
|
#
|
|
27
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
28
|
-
optional :metadata, Dodopayments::Internal::Type::HashOf[
|
|
27
|
+
# @return [Hash{Symbol=>String, Float, Boolean}, nil]
|
|
28
|
+
optional :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
29
29
|
|
|
30
30
|
# @!attribute reason
|
|
31
31
|
# The reason for the refund, if any. Maximum length is 3000 characters. Optional.
|
|
@@ -38,7 +38,7 @@ module Dodopayments
|
|
|
38
38
|
#
|
|
39
39
|
# @param items [Array<Dodopayments::Models::RefundCreateParams::Item>, nil] Partially Refund an Individual Item
|
|
40
40
|
#
|
|
41
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata associated with the refund.
|
|
41
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata associated with the refund.
|
|
42
42
|
#
|
|
43
43
|
# @param reason [String, nil] The reason for the refund, if any. Maximum length is 3000 characters. Optional.
|
|
44
44
|
#
|
|
@@ -56,8 +56,8 @@ module Dodopayments
|
|
|
56
56
|
# @!attribute metadata
|
|
57
57
|
# Additional custom data associated with the subscription
|
|
58
58
|
#
|
|
59
|
-
# @return [Hash{Symbol=>String}]
|
|
60
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[
|
|
59
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
60
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
61
61
|
|
|
62
62
|
# @!attribute meter_credit_entitlement_cart
|
|
63
63
|
# Meter credit entitlement cart settings for this subscription
|
|
@@ -257,7 +257,7 @@ module Dodopayments
|
|
|
257
257
|
#
|
|
258
258
|
# @param customer [Dodopayments::Models::CustomerLimitedDetails] Customer details associated with the subscription
|
|
259
259
|
#
|
|
260
|
-
# @param metadata [Hash{Symbol=>String}] Additional custom data associated with the subscription
|
|
260
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional custom data associated with the subscription
|
|
261
261
|
#
|
|
262
262
|
# @param meter_credit_entitlement_cart [Array<Dodopayments::Models::MeterCreditEntitlementCartResponse>] Meter credit entitlement cart settings for this subscription
|
|
263
263
|
#
|
|
@@ -39,8 +39,10 @@ module Dodopayments
|
|
|
39
39
|
# Metadata for the payment. If not passed, the metadata of the subscription will
|
|
40
40
|
# be taken
|
|
41
41
|
#
|
|
42
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
43
|
-
optional :metadata,
|
|
42
|
+
# @return [Hash{Symbol=>String, Float, Boolean}, nil]
|
|
43
|
+
optional :metadata,
|
|
44
|
+
-> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] },
|
|
45
|
+
nil?: true
|
|
44
46
|
|
|
45
47
|
# @!attribute product_currency
|
|
46
48
|
# Optional currency of the product price. If not specified, defaults to the
|
|
@@ -68,7 +70,7 @@ module Dodopayments
|
|
|
68
70
|
#
|
|
69
71
|
# @param customer_balance_config [Dodopayments::Models::SubscriptionChargeParams::CustomerBalanceConfig, nil] Specify how customer balance is used for the payment
|
|
70
72
|
#
|
|
71
|
-
# @param metadata [Hash{Symbol=>String}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
73
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}, nil] Metadata for the payment. If not passed, the metadata of the subscription will b
|
|
72
74
|
#
|
|
73
75
|
# @param product_currency [Symbol, Dodopayments::Models::Currency, nil] Optional currency of the product price. If not specified, defaults to the curren
|
|
74
76
|
#
|
|
@@ -101,8 +101,8 @@ module Dodopayments
|
|
|
101
101
|
# @!attribute metadata
|
|
102
102
|
# Additional metadata for the subscription Defaults to empty if not specified
|
|
103
103
|
#
|
|
104
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
105
|
-
optional :metadata, Dodopayments::Internal::Type::HashOf[
|
|
104
|
+
# @return [Hash{Symbol=>String, Float, Boolean}, nil]
|
|
105
|
+
optional :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
106
106
|
|
|
107
107
|
# @!attribute on_demand
|
|
108
108
|
#
|
|
@@ -207,7 +207,7 @@ module Dodopayments
|
|
|
207
207
|
#
|
|
208
208
|
# @param mandate_min_amount_inr_paise [Integer, nil] Override the merchant-level mandate floor (in INR paise) for INR
|
|
209
209
|
#
|
|
210
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
|
|
210
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata for the subscription
|
|
211
211
|
#
|
|
212
212
|
# @param on_demand [Dodopayments::Models::OnDemandSubscription, nil]
|
|
213
213
|
#
|
|
@@ -19,8 +19,8 @@ module Dodopayments
|
|
|
19
19
|
# @!attribute metadata
|
|
20
20
|
# Additional metadata associated with the subscription
|
|
21
21
|
#
|
|
22
|
-
# @return [Hash{Symbol=>String}]
|
|
23
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[
|
|
22
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
23
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
24
24
|
|
|
25
25
|
# @!attribute payment_id
|
|
26
26
|
# First payment id for the subscription
|
|
@@ -91,7 +91,7 @@ module Dodopayments
|
|
|
91
91
|
#
|
|
92
92
|
# @param customer [Dodopayments::Models::CustomerLimitedDetails] Customer details associated with this subscription
|
|
93
93
|
#
|
|
94
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata associated with the subscription
|
|
94
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata associated with the subscription
|
|
95
95
|
#
|
|
96
96
|
# @param payment_id [String] First payment id for the subscription
|
|
97
97
|
#
|
|
@@ -44,8 +44,8 @@ module Dodopayments
|
|
|
44
44
|
# @!attribute metadata
|
|
45
45
|
# Additional custom data associated with the subscription
|
|
46
46
|
#
|
|
47
|
-
# @return [Hash{Symbol=>String}]
|
|
48
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[
|
|
47
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
48
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
49
49
|
|
|
50
50
|
# @!attribute next_billing_date
|
|
51
51
|
# Timestamp of the next scheduled billing. Indicates the end of current billing
|
|
@@ -200,7 +200,7 @@ module Dodopayments
|
|
|
200
200
|
#
|
|
201
201
|
# @param discounts [Array<Dodopayments::Models::SubscriptionListResponse::Discount>] All stacked discounts applied, in order of application
|
|
202
202
|
#
|
|
203
|
-
# @param metadata [Hash{Symbol=>String}] Additional custom data associated with the subscription
|
|
203
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional custom data associated with the subscription
|
|
204
204
|
#
|
|
205
205
|
# @param next_billing_date [Time] Timestamp of the next scheduled billing. Indicates the end of current billing pe
|
|
206
206
|
#
|
|
@@ -72,9 +72,12 @@ module Dodopayments
|
|
|
72
72
|
optional :disable_on_demand, -> { Dodopayments::SubscriptionUpdateParams::DisableOnDemand }, nil?: true
|
|
73
73
|
|
|
74
74
|
# @!attribute metadata
|
|
75
|
+
# Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
|
|
75
76
|
#
|
|
76
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
77
|
-
optional :metadata,
|
|
77
|
+
# @return [Hash{Symbol=>String, Float, Boolean}, nil]
|
|
78
|
+
optional :metadata,
|
|
79
|
+
-> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] },
|
|
80
|
+
nil?: true
|
|
78
81
|
|
|
79
82
|
# @!attribute next_billing_date
|
|
80
83
|
#
|
|
@@ -115,7 +118,7 @@ module Dodopayments
|
|
|
115
118
|
#
|
|
116
119
|
# @param disable_on_demand [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
|
|
117
120
|
#
|
|
118
|
-
# @param metadata [Hash{Symbol=>String}, nil]
|
|
121
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}, nil] Arbitrary key-value metadata. Values can be string, integer, number, or boolean.
|
|
119
122
|
#
|
|
120
123
|
# @param next_billing_date [Time, nil]
|
|
121
124
|
#
|
|
@@ -189,22 +192,33 @@ module Dodopayments
|
|
|
189
192
|
optional :rollover_timeframe_count, Integer, nil?: true
|
|
190
193
|
|
|
191
194
|
# @!attribute rollover_timeframe_interval
|
|
195
|
+
# Unit of a duration count (e.g. license-key validity period).
|
|
192
196
|
#
|
|
193
197
|
# @return [Symbol, Dodopayments::Models::TimeInterval, nil]
|
|
194
198
|
optional :rollover_timeframe_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
|
|
195
199
|
|
|
196
200
|
# @!method initialize(credit_entitlement_id:, credits_amount: nil, expires_after_days: nil, low_balance_threshold_percent: nil, max_rollover_count: nil, overage_enabled: nil, overage_limit: nil, rollover_enabled: nil, rollover_percentage: nil, rollover_timeframe_count: nil, rollover_timeframe_interval: nil)
|
|
197
201
|
# @param credit_entitlement_id [String]
|
|
202
|
+
#
|
|
198
203
|
# @param credits_amount [String, nil]
|
|
204
|
+
#
|
|
199
205
|
# @param expires_after_days [Integer, nil]
|
|
206
|
+
#
|
|
200
207
|
# @param low_balance_threshold_percent [Integer, nil]
|
|
208
|
+
#
|
|
201
209
|
# @param max_rollover_count [Integer, nil]
|
|
210
|
+
#
|
|
202
211
|
# @param overage_enabled [Boolean, nil]
|
|
212
|
+
#
|
|
203
213
|
# @param overage_limit [String, nil]
|
|
214
|
+
#
|
|
204
215
|
# @param rollover_enabled [Boolean, nil]
|
|
216
|
+
#
|
|
205
217
|
# @param rollover_percentage [Integer, nil]
|
|
218
|
+
#
|
|
206
219
|
# @param rollover_timeframe_count [Integer, nil]
|
|
207
|
-
#
|
|
220
|
+
#
|
|
221
|
+
# @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of a duration count (e.g. license-key validity period).
|
|
208
222
|
end
|
|
209
223
|
|
|
210
224
|
class DisableOnDemand < Dodopayments::Internal::Type::BaseModel
|