Method: Twilio::REST::Preview::Sync::ServiceContext::SyncMapInstance#initialize

Defined in:
lib/twilio-ruby/rest/preview/sync/service/sync_map.rb

#initialize(version, payload, service_sid: nil, sid: nil) ⇒ SyncMapInstance

Initialize the SyncMapInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this SyncMap resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 300

def initialize(version, payload , service_sid: nil, sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'unique_name' => payload['unique_name'],
        'account_sid' => payload['account_sid'],
        'service_sid' => payload['service_sid'],
        'url' => payload['url'],
        'links' => payload['links'],
        'revision' => payload['revision'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        'created_by' => payload['created_by'],
    }

    # Context
    @instance_context = nil
    @params = { 'service_sid' => service_sid  || @properties['service_sid']  ,'sid' => sid  || @properties['sid']  , }
end