Class: Pago::V2026_04::Models::LicenseKeyUpdate

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  status: "status",
  usage: "usage",
  limit_activations: "limit_activations",
  limit_usage: "limit_usage",
  expires_at: "expires_at"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
[].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(status: ::Pago::UNSET, usage: ::Pago::UNSET, limit_activations: ::Pago::UNSET, limit_usage: ::Pago::UNSET, expires_at: ::Pago::UNSET) ⇒ LicenseKeyUpdate

Returns a new instance of LicenseKeyUpdate.

Parameters:

  • status: (String, nil) (defaults to: ::Pago::UNSET)
  • usage: (Integer, nil) (defaults to: ::Pago::UNSET)
  • limit_activations: (Integer, nil) (defaults to: ::Pago::UNSET)
  • limit_usage: (Integer, nil) (defaults to: ::Pago::UNSET)
  • expires_at: (String, nil) (defaults to: ::Pago::UNSET)


27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
# File 'lib/pago/v2026_04/models.rb', line 27127

def initialize(
  status: ::Pago::UNSET,
  usage: ::Pago::UNSET,
  limit_activations: ::Pago::UNSET,
  limit_usage: ::Pago::UNSET,
  expires_at: ::Pago::UNSET
)
  super()
  assign(:status, status)
  assign(:usage, usage)
  assign(:limit_activations, limit_activations)
  assign(:limit_usage, limit_usage)
  assign(:expires_at, expires_at)
end

Instance Attribute Details

#expires_atString? (readonly)

Returns:

  • (String, nil)


27125
27126
27127
# File 'lib/pago/v2026_04/models.rb', line 27125

def expires_at
  @expires_at
end

#limit_activationsInteger? (readonly)

Returns:

  • (Integer, nil)


27119
27120
27121
# File 'lib/pago/v2026_04/models.rb', line 27119

def limit_activations
  @limit_activations
end

#limit_usageInteger? (readonly)

Returns:

  • (Integer, nil)


27122
27123
27124
# File 'lib/pago/v2026_04/models.rb', line 27122

def limit_usage
  @limit_usage
end

#statusString? (readonly)

Returns:

  • (String, nil)


27113
27114
27115
# File 'lib/pago/v2026_04/models.rb', line 27113

def status
  @status
end

#usageInteger (readonly)

Returns:

  • (Integer)


27116
27117
27118
# File 'lib/pago/v2026_04/models.rb', line 27116

def usage
  @usage
end

Class Method Details

.from_json(data) ⇒ LicenseKeyUpdate?

Parameters:

  • data (Hash, String, nil)

Returns:



27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
# File 'lib/pago/v2026_04/models.rb', line 27144

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(
      status: (data.key?("status") ? data["status"] : ::Pago::UNSET),
      usage: (data.key?("usage") ? data["usage"] : ::Pago::UNSET),
      limit_activations: (data.key?("limit_activations") ? data["limit_activations"] : ::Pago::UNSET),
      limit_usage: (data.key?("limit_usage") ? data["limit_usage"] : ::Pago::UNSET),
      expires_at: (data.key?("expires_at") ? data["expires_at"] : ::Pago::UNSET)
    ),
    data
  )
end