Class: Pago::V2026_04::Models::ProductMediaFileRead
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
File to be used as a product media file.
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", public_url: "public_url" }.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", "public_url"].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
- #public_url ⇒ 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:, public_url:) ⇒ ProductMediaFileRead
constructor
A new instance of ProductMediaFileRead.
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:, public_url:) ⇒ ProductMediaFileRead
Returns a new instance of ProductMediaFileRead.
36629 36630 36631 36632 36633 36634 36635 36636 36637 36638 36639 36640 36641 36642 36643 36644 36645 36646 36647 36648 36649 36650 36651 36652 36653 36654 36655 36656 36657 36658 36659 36660 36661 36662 36663 36664 36665 36666 |
# File 'lib/pago/v2026_04/models.rb', line 36629 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:, public_url: ) 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) assign(:public_url, public_url) end |
Instance Attribute Details
#checksum_etag ⇒ String? (readonly)
36600 36601 36602 |
# File 'lib/pago/v2026_04/models.rb', line 36600 def checksum_etag @checksum_etag end |
#checksum_sha256_base64 ⇒ String? (readonly)
36603 36604 36605 |
# File 'lib/pago/v2026_04/models.rb', line 36603 def checksum_sha256_base64 @checksum_sha256_base64 end |
#checksum_sha256_hex ⇒ String? (readonly)
36606 36607 36608 |
# File 'lib/pago/v2026_04/models.rb', line 36606 def checksum_sha256_hex @checksum_sha256_hex end |
#created_at ⇒ String (readonly)
36621 36622 36623 |
# File 'lib/pago/v2026_04/models.rb', line 36621 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the object.
36579 36580 36581 |
# File 'lib/pago/v2026_04/models.rb', line 36579 def id @id end |
#is_uploaded ⇒ Boolean (readonly)
36618 36619 36620 |
# File 'lib/pago/v2026_04/models.rb', line 36618 def is_uploaded @is_uploaded end |
#last_modified_at ⇒ String? (readonly)
36609 36610 36611 |
# File 'lib/pago/v2026_04/models.rb', line 36609 def last_modified_at @last_modified_at end |
#mime_type ⇒ String (readonly)
36591 36592 36593 |
# File 'lib/pago/v2026_04/models.rb', line 36591 def mime_type @mime_type end |
#name ⇒ String (readonly)
36585 36586 36587 |
# File 'lib/pago/v2026_04/models.rb', line 36585 def name @name end |
#organization_id ⇒ String (readonly)
36582 36583 36584 |
# File 'lib/pago/v2026_04/models.rb', line 36582 def organization_id @organization_id end |
#path ⇒ String (readonly)
36588 36589 36590 |
# File 'lib/pago/v2026_04/models.rb', line 36588 def path @path end |
#public_url ⇒ String (readonly)
36627 36628 36629 |
# File 'lib/pago/v2026_04/models.rb', line 36627 def public_url @public_url end |
#service ⇒ String (readonly)
36615 36616 36617 |
# File 'lib/pago/v2026_04/models.rb', line 36615 def service @service end |
#size ⇒ Integer (readonly)
36594 36595 36596 |
# File 'lib/pago/v2026_04/models.rb', line 36594 def size @size end |
#size_readable ⇒ String (readonly)
36624 36625 36626 |
# File 'lib/pago/v2026_04/models.rb', line 36624 def size_readable @size_readable end |
#storage_version ⇒ String? (readonly)
36597 36598 36599 |
# File 'lib/pago/v2026_04/models.rb', line 36597 def storage_version @storage_version end |
#version ⇒ String? (readonly)
36612 36613 36614 |
# File 'lib/pago/v2026_04/models.rb', line 36612 def version @version end |
Class Method Details
.from_json(data) ⇒ ProductMediaFileRead?
36670 36671 36672 36673 36674 36675 36676 36677 36678 36679 36680 36681 36682 36683 36684 36685 36686 36687 36688 36689 36690 36691 36692 36693 36694 36695 36696 36697 |
# File 'lib/pago/v2026_04/models.rb', line 36670 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), public_url: (data.key?("public_url") ? data["public_url"] : ::Pago::UNSET) ), data ) end |