Class: Pago::V2026_04::Models::LicenseKeyValidate
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::LicenseKeyValidate
show all
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary
collapse
- JSON_KEYS =
{
key: "key",
organization_id: "organization_id",
activation_id: "activation_id",
benefit_id: "benefit_id",
customer_id: "customer_id",
increment_usage: "increment_usage",
conditions: "conditions"
}.freeze
- REQUIRED_KEYS =
["key", "organization_id"].freeze
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(key:, organization_id:, activation_id: ::Pago::UNSET, benefit_id: ::Pago::UNSET, customer_id: ::Pago::UNSET, increment_usage: ::Pago::UNSET, conditions: ::Pago::UNSET) ⇒ LicenseKeyValidate
Returns a new instance of LicenseKeyValidate.
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
|
# File 'lib/pago/v2026_04/models.rb', line 27206
def initialize(
key:,
organization_id:,
activation_id: ::Pago::UNSET,
benefit_id: ::Pago::UNSET,
customer_id: ::Pago::UNSET,
increment_usage: ::Pago::UNSET,
conditions: ::Pago::UNSET
)
super()
assign(:key, key)
assign(:organization_id, organization_id)
assign(:activation_id, activation_id)
assign(:benefit_id, benefit_id)
assign(:customer_id, customer_id)
assign(:increment_usage, increment_usage)
assign(:conditions, conditions)
end
|
Instance Attribute Details
#activation_id ⇒ String?
27181
27182
27183
|
# File 'lib/pago/v2026_04/models.rb', line 27181
def activation_id
@activation_id
end
|
#benefit_id ⇒ String?
27184
27185
27186
|
# File 'lib/pago/v2026_04/models.rb', line 27184
def benefit_id
@benefit_id
end
|
#conditions ⇒ Hash{String => String, Integer, Float, Boolean}
Key-value object allowing you to set conditions that must match when validating the license key.
The key must be a string with a maximum length of 40 characters.
The value must be either:
- A string with a maximum length of 500 characters
- An integer
- A floating-point number
- A boolean
You can store up to 50 key-value pairs.
27204
27205
27206
|
# File 'lib/pago/v2026_04/models.rb', line 27204
def conditions
@conditions
end
|
#customer_id ⇒ String?
27187
27188
27189
|
# File 'lib/pago/v2026_04/models.rb', line 27187
def customer_id
@customer_id
end
|
#increment_usage ⇒ Integer?
27190
27191
27192
|
# File 'lib/pago/v2026_04/models.rb', line 27190
def increment_usage
@increment_usage
end
|
#key ⇒ String
27175
27176
27177
|
# File 'lib/pago/v2026_04/models.rb', line 27175
def key
@key
end
|
#organization_id ⇒ String
27178
27179
27180
|
# File 'lib/pago/v2026_04/models.rb', line 27178
def organization_id
@organization_id
end
|
Class Method Details
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
|
# File 'lib/pago/v2026_04/models.rb', line 27227
def self.from_json(data)
data = ::JSON.parse(data) if data.is_a?(String)
data = ::Pago::Serde.object(data)
return nil if data.nil?
wrap_raw(
new(
key: (data.key?("key") ? data["key"] : ::Pago::UNSET),
organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET),
activation_id: (data.key?("activation_id") ? data["activation_id"] : ::Pago::UNSET),
benefit_id: (data.key?("benefit_id") ? data["benefit_id"] : ::Pago::UNSET),
customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET),
increment_usage: (data.key?("increment_usage") ? data["increment_usage"] : ::Pago::UNSET),
conditions: (data.key?("conditions") ? data["conditions"] : ::Pago::UNSET)
),
data
)
end
|