Method: OpenapiClient::Viber#initialize
- Defined in:
- lib/openapi_client/models/viber.rb
#initialize(attributes = {}) ⇒ Viber
Initializes the object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/openapi_client/models/viber.rb', line 58 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } # call parent's initialize super(attributes) if attributes.has_key?(:'text') self.text = attributes[:'text'] end if attributes.has_key?(:'image_url') self.image_url = attributes[:'image_url'] end if attributes.has_key?(:'button_url') self. = attributes[:'button_url'] end if attributes.has_key?(:'button_text') self. = attributes[:'button_text'] end end |