Class: Pago::V2026_04::Models::LicenseKeyActivate
- 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", label: "label", conditions: "conditions", meta: "meta" }.freeze
- REQUIRED_KEYS =
["key", "organization_id", "label"].freeze
Instance Attribute Summary collapse
-
#conditions ⇒ Hash{String => String, Integer, Float, Boolean}
readonly
Key-value object allowing you to set conditions that must match when validating the license key.
- #key ⇒ String readonly
- #label ⇒ String readonly
-
#meta ⇒ Hash{String => String, Integer, Float, Boolean}
readonly
Key-value object allowing you to store additional information about the activation.
- #organization_id ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key:, organization_id:, label:, conditions: ::Pago::UNSET, meta: ::Pago::UNSET) ⇒ LicenseKeyActivate
constructor
A new instance of LicenseKeyActivate.
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:, label:, conditions: ::Pago::UNSET, meta: ::Pago::UNSET) ⇒ LicenseKeyActivate
Returns a new instance of LicenseKeyActivate.
26584 26585 26586 26587 26588 26589 26590 26591 26592 26593 26594 26595 26596 26597 |
# File 'lib/pago/v2026_04/models.rb', line 26584 def initialize( key:, organization_id:, label:, conditions: ::Pago::UNSET, meta: ::Pago::UNSET ) super() assign(:key, key) assign(:organization_id, organization_id) assign(:label, label) assign(:conditions, conditions) assign(:meta, ) end |
Instance Attribute Details
#conditions ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
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.
26568 26569 26570 |
# File 'lib/pago/v2026_04/models.rb', line 26568 def conditions @conditions end |
#key ⇒ String (readonly)
26548 26549 26550 |
# File 'lib/pago/v2026_04/models.rb', line 26548 def key @key end |
#label ⇒ String (readonly)
26554 26555 26556 |
# File 'lib/pago/v2026_04/models.rb', line 26554 def label @label end |
#meta ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
Key-value object allowing you to store additional information about the activation
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.
26582 26583 26584 |
# File 'lib/pago/v2026_04/models.rb', line 26582 def @meta end |
#organization_id ⇒ String (readonly)
26551 26552 26553 |
# File 'lib/pago/v2026_04/models.rb', line 26551 def organization_id @organization_id end |
Class Method Details
.from_json(data) ⇒ LicenseKeyActivate?
26601 26602 26603 26604 26605 26606 26607 26608 26609 26610 26611 26612 26613 26614 26615 26616 |
# File 'lib/pago/v2026_04/models.rb', line 26601 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), label: (data.key?("label") ? data["label"] : ::Pago::UNSET), conditions: (data.key?("conditions") ? data["conditions"] : ::Pago::UNSET), meta: (data.key?("meta") ? data["meta"] : ::Pago::UNSET) ), data ) end |