Method: ArtikCloud::DeviceToken#initialize
- Defined in:
- lib/artikcloud/models/device_token.rb
#initialize(attributes = {}) ⇒ DeviceToken
Initializes the object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/artikcloud/models/device_token.rb', line 48 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} if attributes.has_key?(:'accessToken') self.access_token = attributes[:'accessToken'] end if attributes.has_key?(:'uid') self.uid = attributes[:'uid'] end if attributes.has_key?(:'did') self.did = attributes[:'did'] end if attributes.has_key?(:'cid') self.cid = attributes[:'cid'] end end |