Class: Pago::V2026_04::Models::S3FileUploadMultipart

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])
{
  id: "id",
  path: "path",
  parts: "parts"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["id", "path", "parts"].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(id:, path:, parts:) ⇒ S3FileUploadMultipart

Returns a new instance of S3FileUploadMultipart.

Parameters:



38847
38848
38849
38850
38851
38852
38853
38854
38855
38856
# File 'lib/pago/v2026_04/models.rb', line 38847

def initialize(
  id:,
  path:,
  parts:
)
  super()
  assign(:id, id)
  assign(:path, path)
  assign(:parts, parts)
end

Instance Attribute Details

#idString (readonly)

Returns:

  • (String)


38839
38840
38841
# File 'lib/pago/v2026_04/models.rb', line 38839

def id
  @id
end

#partsArray<Models::S3FileUploadPart> (readonly)

Returns:



38845
38846
38847
# File 'lib/pago/v2026_04/models.rb', line 38845

def parts
  @parts
end

#pathString (readonly)

Returns:

  • (String)


38842
38843
38844
# File 'lib/pago/v2026_04/models.rb', line 38842

def path
  @path
end

Class Method Details

.from_json(data) ⇒ S3FileUploadMultipart?

Parameters:

  • data (Hash, String, nil)

Returns:



38860
38861
38862
38863
38864
38865
38866
38867
38868
38869
38870
38871
38872
38873
# File 'lib/pago/v2026_04/models.rb', line 38860

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(
      id: (data.key?("id") ? data["id"] : ::Pago::UNSET),
      path: (data.key?("path") ? data["path"] : ::Pago::UNSET),
      parts: (data.key?("parts") ? ::Pago::Serde.array(data["parts"]) { |item0| Models::S3FileUploadPart.from_json(item0) } : ::Pago::UNSET)
    ),
    data
  )
end