Class: Twilio::REST::Preview::Sync::ServiceContext::SyncMapInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Sync::ServiceContext::SyncMapInstance
- Defined in:
- lib/twilio-ruby/rest/preview/sync/service/sync_map.rb
Instance Method Summary collapse
- #account_sid ⇒ String
-
#context ⇒ SyncMapContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #created_by ⇒ String
- #date_created ⇒ Time
- #date_updated ⇒ Time
-
#delete ⇒ Boolean
Delete the SyncMapInstance.
-
#fetch ⇒ SyncMapInstance
Fetch the SyncMapInstance.
-
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ SyncMapInstance
constructor
Initialize the SyncMapInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #links ⇒ Hash
- #revision ⇒ String
- #service_sid ⇒ String
- #sid ⇒ String
-
#sync_map_items ⇒ sync_map_items
Access the sync_map_items.
-
#sync_map_permissions ⇒ sync_map_permissions
Access the sync_map_permissions.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #unique_name ⇒ String
- #url ⇒ String
Constructor Details
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ SyncMapInstance
Initialize the SyncMapInstance
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 283 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 |
Instance Method Details
#account_sid ⇒ String
330 331 332 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 330 def account_sid @properties['account_sid'] end |
#context ⇒ SyncMapContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
309 310 311 312 313 314 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 309 def context unless @instance_context @instance_context = SyncMapContext.new(@version , @params['service_sid'], @params['sid']) end @instance_context end |
#created_by ⇒ String
372 373 374 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 372 def created_by @properties['created_by'] end |
#date_created ⇒ Time
360 361 362 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 360 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
366 367 368 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 366 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the SyncMapInstance
379 380 381 382 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 379 def delete context.delete end |
#fetch ⇒ SyncMapInstance
Fetch the SyncMapInstance
387 388 389 390 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 387 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
415 416 417 418 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 415 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Sync.SyncMapInstance #{values}>" end |
#links ⇒ Hash
348 349 350 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 348 def links @properties['links'] end |
#revision ⇒ String
354 355 356 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 354 def revision @properties['revision'] end |
#service_sid ⇒ String
336 337 338 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 336 def service_sid @properties['service_sid'] end |
#sid ⇒ String
318 319 320 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 318 def sid @properties['sid'] end |
#sync_map_items ⇒ sync_map_items
Access the sync_map_items
395 396 397 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 395 def sync_map_items context.sync_map_items end |
#sync_map_permissions ⇒ sync_map_permissions
Access the sync_map_permissions
402 403 404 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 402 def context. end |
#to_s ⇒ Object
Provide a user friendly representation
408 409 410 411 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 408 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Sync.SyncMapInstance #{values}>" end |
#unique_name ⇒ String
324 325 326 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 324 def unique_name @properties['unique_name'] end |
#url ⇒ String
342 343 344 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 342 def url @properties['url'] end |