Class: Pago::V2026_04::Models::LicenseKeyDeactivate

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])
{
  key: "key",
  organization_id: "organization_id",
  activation_id: "activation_id"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["key", "organization_id", "activation_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:) ⇒ LicenseKeyDeactivate

Returns a new instance of LicenseKeyDeactivate.

Parameters:

  • key: (String)
  • organization_id: (String)
  • activation_id: (String)


26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
# File 'lib/pago/v2026_04/models.rb', line 26932

def initialize(
  key:,
  organization_id:,
  activation_id:
)
  super()
  assign(:key, key)
  assign(:organization_id, organization_id)
  assign(:activation_id, activation_id)
end

Instance Attribute Details

#activation_idString (readonly)

Returns:

  • (String)


26930
26931
26932
# File 'lib/pago/v2026_04/models.rb', line 26930

def activation_id
  @activation_id
end

#keyString (readonly)

Returns:

  • (String)


26924
26925
26926
# File 'lib/pago/v2026_04/models.rb', line 26924

def key
  @key
end

#organization_idString (readonly)

Returns:

  • (String)


26927
26928
26929
# File 'lib/pago/v2026_04/models.rb', line 26927

def organization_id
  @organization_id
end

Class Method Details

.from_json(data) ⇒ LicenseKeyDeactivate?

Parameters:

  • data (Hash, String, nil)

Returns:



26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
# File 'lib/pago/v2026_04/models.rb', line 26945

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)
    ),
    data
  )
end