Class: Pago::V2026_04::Models::BenefitDownloadablesCreateProperties

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])
["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: ::Pago::UNSET, files:) ⇒ BenefitDownloadablesCreateProperties

Returns a new instance of BenefitDownloadablesCreateProperties.

Parameters:

  • archived: (Hash[String, bool], nil) (defaults to: ::Pago::UNSET)
  • files: (Array[String])


3343
3344
3345
3346
3347
3348
3349
3350
# File 'lib/pago/v2026_04/models.rb', line 3343

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

Instance Attribute Details

#archivedHash{String => Boolean} (readonly)

Returns:

  • (Hash{String => Boolean})


3338
3339
3340
# File 'lib/pago/v2026_04/models.rb', line 3338

def archived
  @archived
end

#filesArray<String> (readonly)

Returns:

  • (Array<String>)


3341
3342
3343
# File 'lib/pago/v2026_04/models.rb', line 3341

def files
  @files
end

Class Method Details

.from_json(data) ⇒ BenefitDownloadablesCreateProperties?

Parameters:

  • data (Hash, String, nil)

Returns:



3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
# File 'lib/pago/v2026_04/models.rb', line 3354

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