Class: MessageMediaWebhooks::CreateWebhookRequest
- Defined in:
- lib/message_media_webhooks/models/create_webhook_request.rb
Overview
CreateWebhookRequest Model.
Instance Attribute Summary collapse
-
#encoding ⇒ String
TODO: Write general description for this method.
-
#events ⇒ List of String
TODO: Write general description for this method.
-
#headers ⇒ Object
TODO: Write general description for this method.
-
#method ⇒ String
TODO: Write general description for this method.
-
#template ⇒ 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(url = nil, method = nil, encoding = nil, headers = nil, events = nil, template = nil) ⇒ CreateWebhookRequest
constructor
A new instance of CreateWebhookRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(url = nil, method = nil, encoding = nil, headers = nil, events = nil, template = nil) ⇒ CreateWebhookRequest
Returns a new instance of CreateWebhookRequest.
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/message_media_webhooks/models/create_webhook_request.rb', line 41 def initialize(url = nil, method = nil, encoding = nil, headers = nil, events = nil, template = nil) @url = url @method = method @encoding = encoding @headers = headers @events = events @template = template end |
Instance Attribute Details
#encoding ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/message_media_webhooks/models/create_webhook_request.rb', line 15 def encoding @encoding end |
#events ⇒ List of String
TODO: Write general description for this method
23 24 25 |
# File 'lib/message_media_webhooks/models/create_webhook_request.rb', line 23 def events @events end |
#headers ⇒ Object
TODO: Write general description for this method
19 20 21 |
# File 'lib/message_media_webhooks/models/create_webhook_request.rb', line 19 def headers @headers end |
#method ⇒ String
TODO: Write general description for this method
11 12 13 |
# File 'lib/message_media_webhooks/models/create_webhook_request.rb', line 11 def method @method end |
#template ⇒ String
TODO: Write general description for this method
27 28 29 |
# File 'lib/message_media_webhooks/models/create_webhook_request.rb', line 27 def template @template end |
#url ⇒ String
TODO: Write general description for this method
7 8 9 |
# File 'lib/message_media_webhooks/models/create_webhook_request.rb', line 7 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/message_media_webhooks/models/create_webhook_request.rb', line 56 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. url = hash['url'] method = hash['method'] encoding = hash['encoding'] headers = hash['headers'] events = hash['events'] template = hash['template'] # Create object from extracted values. CreateWebhookRequest.new(url, method, encoding, headers, events, template) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/message_media_webhooks/models/create_webhook_request.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['url'] = 'url' @_hash['method'] = 'method' @_hash['encoding'] = 'encoding' @_hash['headers'] = 'headers' @_hash['events'] = 'events' @_hash['template'] = 'template' @_hash end |