Class: Pago::V2026_04::Models::BenefitLicenseKeysSubscriberProperties
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::BenefitLicenseKeysSubscriberProperties
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ prefix: "prefix", expires: "expires", activations: "activations", limit_usage: "limit_usage" }.freeze
- REQUIRED_KEYS =
["prefix", "expires", "activations", "limit_usage"].freeze
Instance Attribute Summary collapse
- #activations ⇒ Models::BenefitLicenseKeyActivationProperties? readonly
- #expires ⇒ Models::BenefitLicenseKeyExpirationProperties? readonly
- #limit_usage ⇒ Integer? readonly
- #prefix ⇒ String? readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(prefix:, expires:, activations:, limit_usage:) ⇒ BenefitLicenseKeysSubscriberProperties
constructor
A new instance of BenefitLicenseKeysSubscriberProperties.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(prefix:, expires:, activations:, limit_usage:) ⇒ BenefitLicenseKeysSubscriberProperties
Returns a new instance of BenefitLicenseKeysSubscriberProperties.
7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 |
# File 'lib/pago/v2026_04/models.rb', line 7204 def initialize( prefix:, expires:, activations:, limit_usage: ) super() assign(:prefix, prefix) assign(:expires, expires) assign(:activations, activations) assign(:limit_usage, limit_usage) end |
Instance Attribute Details
#activations ⇒ Models::BenefitLicenseKeyActivationProperties? (readonly)
7199 7200 7201 |
# File 'lib/pago/v2026_04/models.rb', line 7199 def activations @activations end |
#expires ⇒ Models::BenefitLicenseKeyExpirationProperties? (readonly)
7196 7197 7198 |
# File 'lib/pago/v2026_04/models.rb', line 7196 def expires @expires end |
#limit_usage ⇒ Integer? (readonly)
7202 7203 7204 |
# File 'lib/pago/v2026_04/models.rb', line 7202 def limit_usage @limit_usage end |
#prefix ⇒ String? (readonly)
7193 7194 7195 |
# File 'lib/pago/v2026_04/models.rb', line 7193 def prefix @prefix end |
Class Method Details
.from_json(data) ⇒ BenefitLicenseKeysSubscriberProperties?
7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 |
# File 'lib/pago/v2026_04/models.rb', line 7219 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( prefix: (data.key?("prefix") ? data["prefix"] : ::Pago::UNSET), expires: (data.key?("expires") ? Models::BenefitLicenseKeyExpirationProperties.from_json(data["expires"]) : ::Pago::UNSET), activations: (data.key?("activations") ? Models::BenefitLicenseKeyActivationProperties.from_json(data["activations"]) : ::Pago::UNSET), limit_usage: (data.key?("limit_usage") ? data["limit_usage"] : ::Pago::UNSET) ), data ) end |