Class: Pago::V2026_04::Models::BenefitDownloadablesProperties

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])
{
  archived: "archived",
  files: "files"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["archived", "files"].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(archived:, files:) ⇒ BenefitDownloadablesProperties

Returns a new instance of BenefitDownloadablesProperties.

Parameters:

  • archived: (Hash[String, bool])
  • files: (Array[String])


3382
3383
3384
3385
3386
3387
3388
3389
# File 'lib/pago/v2026_04/models.rb', line 3382

def initialize(
  archived:,
  files:
)
  super()
  assign(:archived, archived)
  assign(:files, files)
end

Instance Attribute Details

#archivedHash{String => Boolean} (readonly)

Returns:

  • (Hash{String => Boolean})


3377
3378
3379
# File 'lib/pago/v2026_04/models.rb', line 3377

def archived
  @archived
end

#filesArray<String> (readonly)

Returns:

  • (Array<String>)


3380
3381
3382
# File 'lib/pago/v2026_04/models.rb', line 3380

def files
  @files
end

Class Method Details

.from_json(data) ⇒ BenefitDownloadablesProperties?

Parameters:

  • data (Hash, String, nil)

Returns:



3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
# File 'lib/pago/v2026_04/models.rb', line 3393

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(
      archived: (data.key?("archived") ? data["archived"] : ::Pago::UNSET),
      files: (data.key?("files") ? data["files"] : ::Pago::UNSET)
    ),
    data
  )
end