Class: Pago::V2026_04::Models::DownloadableFileRead
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
File to be associated with the downloadables benefit.
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", version: "version", service: "service", is_uploaded: "is_uploaded", created_at: "created_at", 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", "version", "service", "is_uploaded", "created_at", "size_readable"].freeze
Instance Attribute Summary collapse
- #checksum_etag ⇒ String? readonly
- #checksum_sha256_base64 ⇒ String? readonly
- #checksum_sha256_hex ⇒ String? readonly
- #created_at ⇒ String 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:, version:, service:, is_uploaded:, created_at:, size_readable:) ⇒ DownloadableFileRead
constructor
A new instance of DownloadableFileRead.
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:) ⇒ DownloadableFileRead
Returns a new instance of DownloadableFileRead.
24630 24631 24632 24633 24634 24635 24636 24637 24638 24639 24640 24641 24642 24643 24644 24645 24646 24647 24648 24649 24650 24651 24652 24653 24654 24655 24656 24657 24658 24659 24660 24661 24662 24663 24664 24665 |
# File 'lib/pago/v2026_04/models.rb', line 24630 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_etag ⇒ String? (readonly)
24604 24605 24606 |
# File 'lib/pago/v2026_04/models.rb', line 24604 def checksum_etag @checksum_etag end |
#checksum_sha256_base64 ⇒ String? (readonly)
24607 24608 24609 |
# File 'lib/pago/v2026_04/models.rb', line 24607 def checksum_sha256_base64 @checksum_sha256_base64 end |
#checksum_sha256_hex ⇒ String? (readonly)
24610 24611 24612 |
# File 'lib/pago/v2026_04/models.rb', line 24610 def checksum_sha256_hex @checksum_sha256_hex end |
#created_at ⇒ String (readonly)
24625 24626 24627 |
# File 'lib/pago/v2026_04/models.rb', line 24625 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the object.
24583 24584 24585 |
# File 'lib/pago/v2026_04/models.rb', line 24583 def id @id end |
#is_uploaded ⇒ Boolean (readonly)
24622 24623 24624 |
# File 'lib/pago/v2026_04/models.rb', line 24622 def is_uploaded @is_uploaded end |
#last_modified_at ⇒ String? (readonly)
24613 24614 24615 |
# File 'lib/pago/v2026_04/models.rb', line 24613 def last_modified_at @last_modified_at end |
#mime_type ⇒ String (readonly)
24595 24596 24597 |
# File 'lib/pago/v2026_04/models.rb', line 24595 def mime_type @mime_type end |
#name ⇒ String (readonly)
24589 24590 24591 |
# File 'lib/pago/v2026_04/models.rb', line 24589 def name @name end |
#organization_id ⇒ String (readonly)
24586 24587 24588 |
# File 'lib/pago/v2026_04/models.rb', line 24586 def organization_id @organization_id end |
#path ⇒ String (readonly)
24592 24593 24594 |
# File 'lib/pago/v2026_04/models.rb', line 24592 def path @path end |
#service ⇒ String (readonly)
24619 24620 24621 |
# File 'lib/pago/v2026_04/models.rb', line 24619 def service @service end |
#size ⇒ Integer (readonly)
24598 24599 24600 |
# File 'lib/pago/v2026_04/models.rb', line 24598 def size @size end |
#size_readable ⇒ String (readonly)
24628 24629 24630 |
# File 'lib/pago/v2026_04/models.rb', line 24628 def size_readable @size_readable end |
#storage_version ⇒ String? (readonly)
24601 24602 24603 |
# File 'lib/pago/v2026_04/models.rb', line 24601 def storage_version @storage_version end |
#version ⇒ String? (readonly)
24616 24617 24618 |
# File 'lib/pago/v2026_04/models.rb', line 24616 def version @version end |
Class Method Details
.from_json(data) ⇒ DownloadableFileRead?
24669 24670 24671 24672 24673 24674 24675 24676 24677 24678 24679 24680 24681 24682 24683 24684 24685 24686 24687 24688 24689 24690 24691 24692 24693 24694 24695 |
# File 'lib/pago/v2026_04/models.rb', line 24669 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 |