Class: Pago::V2026_04::Models::SupportCaseAttachmentFileRead

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Overview

File attached to a support case (private; fetched via presigned URL).

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  id: "id",
  organization_id: "organization_id",
  name: "name",
  path: "path",
  mime_type: "mime_type",
  size: "size",
  storage_version: "storage_version",
  checksum_etag: "checksum_etag",
  checksum_sha256_base64: "checksum_sha256_base64",
  checksum_sha256_hex: "checksum_sha256_hex",
  last_modified_at: "last_modified_at",
  version: "version",
  service: "service",
  is_uploaded: "is_uploaded",
  created_at: "created_at",
  size_readable: "size_readable"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["id", "organization_id", "name", "path", "mime_type", "size", "storage_version", "checksum_etag", "checksum_sha256_base64", "checksum_sha256_hex", "last_modified_at", "version", "service", "is_uploaded", "created_at", "size_readable"].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:, organization_id:, name:, path:, mime_type:, size:, storage_version:, checksum_etag:, checksum_sha256_base64:, checksum_sha256_hex:, last_modified_at:, version:, service:, is_uploaded:, created_at:, size_readable:) ⇒ SupportCaseAttachmentFileRead

Returns a new instance of SupportCaseAttachmentFileRead.

Parameters:

  • id: (String)
  • organization_id: (String)
  • name: (String)
  • path: (String)
  • mime_type: (String)
  • size: (Integer)
  • storage_version: (String, nil)
  • checksum_etag: (String, nil)
  • checksum_sha256_base64: (String, nil)
  • checksum_sha256_hex: (String, nil)
  • last_modified_at: (String, nil)
  • version: (String, nil)
  • service: (String)
  • is_uploaded: (Boolean)
  • created_at: (String)
  • size_readable: (String)


43350
43351
43352
43353
43354
43355
43356
43357
43358
43359
43360
43361
43362
43363
43364
43365
43366
43367
43368
43369
43370
43371
43372
43373
43374
43375
43376
43377
43378
43379
43380
43381
43382
43383
43384
43385
# File 'lib/pago/v2026_04/models.rb', line 43350

def initialize(
  id:,
  organization_id:,
  name:,
  path:,
  mime_type:,
  size:,
  storage_version:,
  checksum_etag:,
  checksum_sha256_base64:,
  checksum_sha256_hex:,
  last_modified_at:,
  version:,
  service:,
  is_uploaded:,
  created_at:,
  size_readable:
)
  super()
  assign(:id, id)
  assign(:organization_id, organization_id)
  assign(:name, name)
  assign(:path, path)
  assign(:mime_type, mime_type)
  assign(:size, size)
  assign(:storage_version, storage_version)
  assign(:checksum_etag, checksum_etag)
  assign(:checksum_sha256_base64, checksum_sha256_base64)
  assign(:checksum_sha256_hex, checksum_sha256_hex)
  assign(:last_modified_at, last_modified_at)
  assign(:version, version)
  assign(:service, service)
  assign(:is_uploaded, is_uploaded)
  assign(:created_at, created_at)
  assign(:size_readable, size_readable)
end

Instance Attribute Details

#checksum_etagString? (readonly)

Returns:

  • (String, nil)


43324
43325
43326
# File 'lib/pago/v2026_04/models.rb', line 43324

def checksum_etag
  @checksum_etag
end

#checksum_sha256_base64String? (readonly)

Returns:

  • (String, nil)


43327
43328
43329
# File 'lib/pago/v2026_04/models.rb', line 43327

def checksum_sha256_base64
  @checksum_sha256_base64
end

#checksum_sha256_hexString? (readonly)

Returns:

  • (String, nil)


43330
43331
43332
# File 'lib/pago/v2026_04/models.rb', line 43330

def checksum_sha256_hex
  @checksum_sha256_hex
end

#created_atString (readonly)

Returns:

  • (String)


43345
43346
43347
# File 'lib/pago/v2026_04/models.rb', line 43345

def created_at
  @created_at
end

#idString (readonly)

The ID of the object.

Returns:

  • (String)


43303
43304
43305
# File 'lib/pago/v2026_04/models.rb', line 43303

def id
  @id
end

#is_uploadedBoolean (readonly)

Returns:

  • (Boolean)


43342
43343
43344
# File 'lib/pago/v2026_04/models.rb', line 43342

def is_uploaded
  @is_uploaded
end

#last_modified_atString? (readonly)

Returns:

  • (String, nil)


43333
43334
43335
# File 'lib/pago/v2026_04/models.rb', line 43333

def last_modified_at
  @last_modified_at
end

#mime_typeString (readonly)

Returns:

  • (String)


43315
43316
43317
# File 'lib/pago/v2026_04/models.rb', line 43315

def mime_type
  @mime_type
end

#nameString (readonly)

Returns:

  • (String)


43309
43310
43311
# File 'lib/pago/v2026_04/models.rb', line 43309

def name
  @name
end

#organization_idString (readonly)

Returns:

  • (String)


43306
43307
43308
# File 'lib/pago/v2026_04/models.rb', line 43306

def organization_id
  @organization_id
end

#pathString (readonly)

Returns:

  • (String)


43312
43313
43314
# File 'lib/pago/v2026_04/models.rb', line 43312

def path
  @path
end

#serviceString (readonly)

Returns:

  • (String)


43339
43340
43341
# File 'lib/pago/v2026_04/models.rb', line 43339

def service
  @service
end

#sizeInteger (readonly)

Returns:

  • (Integer)


43318
43319
43320
# File 'lib/pago/v2026_04/models.rb', line 43318

def size
  @size
end

#size_readableString (readonly)

Returns:

  • (String)


43348
43349
43350
# File 'lib/pago/v2026_04/models.rb', line 43348

def size_readable
  @size_readable
end

#storage_versionString? (readonly)

Returns:

  • (String, nil)


43321
43322
43323
# File 'lib/pago/v2026_04/models.rb', line 43321

def storage_version
  @storage_version
end

#versionString? (readonly)

Returns:

  • (String, nil)


43336
43337
43338
# File 'lib/pago/v2026_04/models.rb', line 43336

def version
  @version
end

Class Method Details

.from_json(data) ⇒ SupportCaseAttachmentFileRead?

Parameters:

  • data (Hash, String, nil)

Returns:



43389
43390
43391
43392
43393
43394
43395
43396
43397
43398
43399
43400
43401
43402
43403
43404
43405
43406
43407
43408
43409
43410
43411
43412
43413
43414
43415
# File 'lib/pago/v2026_04/models.rb', line 43389

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),
      organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET),
      name: (data.key?("name") ? data["name"] : ::Pago::UNSET),
      path: (data.key?("path") ? data["path"] : ::Pago::UNSET),
      mime_type: (data.key?("mime_type") ? data["mime_type"] : ::Pago::UNSET),
      size: (data.key?("size") ? data["size"] : ::Pago::UNSET),
      storage_version: (data.key?("storage_version") ? data["storage_version"] : ::Pago::UNSET),
      checksum_etag: (data.key?("checksum_etag") ? data["checksum_etag"] : ::Pago::UNSET),
      checksum_sha256_base64: (data.key?("checksum_sha256_base64") ? data["checksum_sha256_base64"] : ::Pago::UNSET),
      checksum_sha256_hex: (data.key?("checksum_sha256_hex") ? data["checksum_sha256_hex"] : ::Pago::UNSET),
      last_modified_at: (data.key?("last_modified_at") ? data["last_modified_at"] : ::Pago::UNSET),
      version: (data.key?("version") ? data["version"] : ::Pago::UNSET),
      service: (data.key?("service") ? data["service"] : ::Pago::UNSET),
      is_uploaded: (data.key?("is_uploaded") ? data["is_uploaded"] : ::Pago::UNSET),
      created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET),
      size_readable: (data.key?("size_readable") ? data["size_readable"] : ::Pago::UNSET)
    ),
    data
  )
end