Class: WhatsAppCloudApi::RetrieveMediaURLResponse
- Defined in:
- lib/whats_app_cloud_api/models/retrieve_media_url_response.rb
Overview
RetrieveMediaURLResponse Model.
Instance Attribute Summary collapse
-
#file_size ⇒ String
TODO: Write general description for this method.
-
#id ⇒ String
TODO: Write general description for this method.
-
#messaging_product ⇒ String
TODO: Write general description for this method.
-
#mime_type ⇒ String
TODO: Write general description for this method.
-
#sha256 ⇒ String
TODO: Write general description for this method.
-
#url ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(messaging_product = nil, url = nil, mime_type = nil, sha256 = nil, file_size = nil, id = nil) ⇒ RetrieveMediaURLResponse
constructor
A new instance of RetrieveMediaURLResponse.
-
#nullables ⇒ Object
An array for nullable fields.
-
#optionals ⇒ Object
An array for optional fields.
Methods inherited from BaseModel
Constructor Details
#initialize(messaging_product = nil, url = nil, mime_type = nil, sha256 = nil, file_size = nil, id = nil) ⇒ RetrieveMediaURLResponse
Returns a new instance of RetrieveMediaURLResponse.
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 58 def initialize(messaging_product = nil, url = nil, mime_type = nil, sha256 = nil, file_size = nil, id = nil) @messaging_product = messaging_product unless messaging_product == SKIP @url = url unless url == SKIP @mime_type = mime_type unless mime_type == SKIP @sha256 = sha256 unless sha256 == SKIP @file_size = file_size unless file_size == SKIP @id = id unless id == SKIP end |
Instance Attribute Details
#file_size ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 30 def file_size @file_size end |
#id ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 34 def id @id end |
#messaging_product ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 14 def messaging_product @messaging_product end |
#mime_type ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 22 def mime_type @mime_type end |
#sha256 ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 26 def sha256 @sha256 end |
#url ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 18 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. messaging_product = hash.key?('messaging_product') ? hash['messaging_product'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP mime_type = hash.key?('mime_type') ? hash['mime_type'] : SKIP sha256 = hash.key?('sha256') ? hash['sha256'] : SKIP file_size = hash.key?('file_size') ? hash['file_size'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP # Create object from extracted values. RetrieveMediaURLResponse.new(messaging_product, url, mime_type, sha256, file_size, id) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['messaging_product'] = 'messaging_product' @_hash['url'] = 'url' @_hash['mime_type'] = 'mime_type' @_hash['sha256'] = 'sha256' @_hash['file_size'] = 'file_size' @_hash['id'] = 'id' @_hash end |
Instance Method Details
#nullables ⇒ Object
An array for nullable fields
54 55 56 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 54 def nullables [] end |
#optionals ⇒ Object
An array for optional fields
49 50 51 |
# File 'lib/whats_app_cloud_api/models/retrieve_media_url_response.rb', line 49 def optionals [] end |