Class: Pago::V2026_04::Models::FileDownload
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ 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", download: "download", version: "version", is_uploaded: "is_uploaded", service: "service", size_readable: "size_readable" }.freeze
- REQUIRED_KEYS =
["id", "organization_id", "name", "path", "mime_type", "size", "storage_version", "checksum_etag", "checksum_sha256_base64", "checksum_sha256_hex", "last_modified_at", "download", "version", "is_uploaded", "service", "size_readable"].freeze
Instance Attribute Summary collapse
- #checksum_etag ⇒ String? readonly
- #checksum_sha256_base64 ⇒ String? readonly
- #checksum_sha256_hex ⇒ String? readonly
- #download ⇒ Models::S3DownloadURL readonly
-
#id ⇒ String
readonly
The ID of the object.
- #is_uploaded ⇒ Boolean readonly
- #last_modified_at ⇒ String? readonly
- #mime_type ⇒ String readonly
- #name ⇒ String readonly
- #organization_id ⇒ String readonly
- #path ⇒ String readonly
- #service ⇒ String readonly
- #size ⇒ Integer readonly
- #size_readable ⇒ String readonly
- #storage_version ⇒ String? readonly
- #version ⇒ String? readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, organization_id:, name:, path:, mime_type:, size:, storage_version:, checksum_etag:, checksum_sha256_base64:, checksum_sha256_hex:, last_modified_at:, download:, version:, is_uploaded:, service:, size_readable:) ⇒ FileDownload
constructor
A new instance of FileDownload.
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:, download:, version:, is_uploaded:, service:, size_readable:) ⇒ FileDownload
Returns a new instance of FileDownload.
25522 25523 25524 25525 25526 25527 25528 25529 25530 25531 25532 25533 25534 25535 25536 25537 25538 25539 25540 25541 25542 25543 25544 25545 25546 25547 25548 25549 25550 25551 25552 25553 25554 25555 25556 25557 |
# File 'lib/pago/v2026_04/models.rb', line 25522 def initialize( id:, organization_id:, name:, path:, mime_type:, size:, storage_version:, checksum_etag:, checksum_sha256_base64:, checksum_sha256_hex:, last_modified_at:, download:, version:, is_uploaded:, service:, 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(:download, download) assign(:version, version) assign(:is_uploaded, is_uploaded) assign(:service, service) assign(:size_readable, size_readable) end |
Instance Attribute Details
#checksum_etag ⇒ String? (readonly)
25496 25497 25498 |
# File 'lib/pago/v2026_04/models.rb', line 25496 def checksum_etag @checksum_etag end |
#checksum_sha256_base64 ⇒ String? (readonly)
25499 25500 25501 |
# File 'lib/pago/v2026_04/models.rb', line 25499 def checksum_sha256_base64 @checksum_sha256_base64 end |
#checksum_sha256_hex ⇒ String? (readonly)
25502 25503 25504 |
# File 'lib/pago/v2026_04/models.rb', line 25502 def checksum_sha256_hex @checksum_sha256_hex end |
#download ⇒ Models::S3DownloadURL (readonly)
25508 25509 25510 |
# File 'lib/pago/v2026_04/models.rb', line 25508 def download @download end |
#id ⇒ String (readonly)
The ID of the object.
25475 25476 25477 |
# File 'lib/pago/v2026_04/models.rb', line 25475 def id @id end |
#is_uploaded ⇒ Boolean (readonly)
25514 25515 25516 |
# File 'lib/pago/v2026_04/models.rb', line 25514 def is_uploaded @is_uploaded end |
#last_modified_at ⇒ String? (readonly)
25505 25506 25507 |
# File 'lib/pago/v2026_04/models.rb', line 25505 def last_modified_at @last_modified_at end |
#mime_type ⇒ String (readonly)
25487 25488 25489 |
# File 'lib/pago/v2026_04/models.rb', line 25487 def mime_type @mime_type end |
#name ⇒ String (readonly)
25481 25482 25483 |
# File 'lib/pago/v2026_04/models.rb', line 25481 def name @name end |
#organization_id ⇒ String (readonly)
25478 25479 25480 |
# File 'lib/pago/v2026_04/models.rb', line 25478 def organization_id @organization_id end |
#path ⇒ String (readonly)
25484 25485 25486 |
# File 'lib/pago/v2026_04/models.rb', line 25484 def path @path end |
#service ⇒ String (readonly)
25517 25518 25519 |
# File 'lib/pago/v2026_04/models.rb', line 25517 def service @service end |
#size ⇒ Integer (readonly)
25490 25491 25492 |
# File 'lib/pago/v2026_04/models.rb', line 25490 def size @size end |
#size_readable ⇒ String (readonly)
25520 25521 25522 |
# File 'lib/pago/v2026_04/models.rb', line 25520 def size_readable @size_readable end |
#storage_version ⇒ String? (readonly)
25493 25494 25495 |
# File 'lib/pago/v2026_04/models.rb', line 25493 def storage_version @storage_version end |
#version ⇒ String? (readonly)
25511 25512 25513 |
# File 'lib/pago/v2026_04/models.rb', line 25511 def version @version end |
Class Method Details
.from_json(data) ⇒ FileDownload?
25561 25562 25563 25564 25565 25566 25567 25568 25569 25570 25571 25572 25573 25574 25575 25576 25577 25578 25579 25580 25581 25582 25583 25584 25585 25586 25587 |
# File 'lib/pago/v2026_04/models.rb', line 25561 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), download: (data.key?("download") ? Models::S3DownloadURL.from_json(data["download"]) : ::Pago::UNSET), version: (data.key?("version") ? data["version"] : ::Pago::UNSET), is_uploaded: (data.key?("is_uploaded") ? data["is_uploaded"] : ::Pago::UNSET), service: (data.key?("service") ? data["service"] : ::Pago::UNSET), size_readable: (data.key?("size_readable") ? data["size_readable"] : ::Pago::UNSET) ), data ) end |