Class: Pago::V2026_04::Models::S3FileCreatePart

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])
{
  number: "number",
  chunk_start: "chunk_start",
  chunk_end: "chunk_end",
  checksum_sha256_base64: "checksum_sha256_base64"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["number", "chunk_start", "chunk_end"].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(number:, chunk_start:, chunk_end:, checksum_sha256_base64: ::Pago::UNSET) ⇒ S3FileCreatePart

Returns a new instance of S3FileCreatePart.

Parameters:

  • number: (Integer)
  • chunk_start: (Integer)
  • chunk_end: (Integer)
  • checksum_sha256_base64: (String, nil) (defaults to: ::Pago::UNSET)


38752
38753
38754
38755
38756
38757
38758
38759
38760
38761
38762
38763
# File 'lib/pago/v2026_04/models.rb', line 38752

def initialize(
  number:,
  chunk_start:,
  chunk_end:,
  checksum_sha256_base64: ::Pago::UNSET
)
  super()
  assign(:number, number)
  assign(:chunk_start, chunk_start)
  assign(:chunk_end, chunk_end)
  assign(:checksum_sha256_base64, checksum_sha256_base64)
end

Instance Attribute Details

#checksum_sha256_base64String? (readonly)

Returns:

  • (String, nil)


38750
38751
38752
# File 'lib/pago/v2026_04/models.rb', line 38750

def checksum_sha256_base64
  @checksum_sha256_base64
end

#chunk_endInteger (readonly)

Returns:

  • (Integer)


38747
38748
38749
# File 'lib/pago/v2026_04/models.rb', line 38747

def chunk_end
  @chunk_end
end

#chunk_startInteger (readonly)

Returns:

  • (Integer)


38744
38745
38746
# File 'lib/pago/v2026_04/models.rb', line 38744

def chunk_start
  @chunk_start
end

#numberInteger (readonly)

Returns:

  • (Integer)


38741
38742
38743
# File 'lib/pago/v2026_04/models.rb', line 38741

def number
  @number
end

Class Method Details

.from_json(data) ⇒ S3FileCreatePart?

Parameters:

  • data (Hash, String, nil)

Returns:



38767
38768
38769
38770
38771
38772
38773
38774
38775
38776
38777
38778
38779
38780
38781
# File 'lib/pago/v2026_04/models.rb', line 38767

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(
      number: (data.key?("number") ? data["number"] : ::Pago::UNSET),
      chunk_start: (data.key?("chunk_start") ? data["chunk_start"] : ::Pago::UNSET),
      chunk_end: (data.key?("chunk_end") ? data["chunk_end"] : ::Pago::UNSET),
      checksum_sha256_base64: (data.key?("checksum_sha256_base64") ? data["checksum_sha256_base64"] : ::Pago::UNSET)
    ),
    data
  )
end