Class: Twilio::REST::Sync::V1::ServiceContext::SyncMapInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Sync::V1::ServiceContext::SyncMapInstance
- Defined in:
- lib/twilio-ruby/rest/sync/v1/service/sync_map.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The account_sid.
-
#context ⇒ SyncMapContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#created_by ⇒ String
The created_by.
-
#date_created ⇒ Time
The date_created.
-
#date_updated ⇒ Time
The date_updated.
-
#delete ⇒ Boolean
Deletes the SyncMapInstance.
-
#fetch ⇒ SyncMapInstance
Fetch a SyncMapInstance.
-
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ SyncMapInstance
constructor
Initialize the SyncMapInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The links.
-
#revision ⇒ String
The revision.
-
#service_sid ⇒ String
The service_sid.
-
#sid ⇒ String
The sid.
-
#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
The unique_name.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ SyncMapInstance
Initialize the SyncMapInstance
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 307 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, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The account_sid.
361 362 363 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 361 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
336 337 338 339 340 341 342 343 344 345 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 336 def context unless @instance_context @instance_context = SyncMapContext.new( @version, @params['service_sid'], @params['sid'], ) end @instance_context end |
#created_by ⇒ String
Returns The created_by.
403 404 405 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 403 def created_by @properties['created_by'] end |
#date_created ⇒ Time
Returns The date_created.
391 392 393 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 391 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date_updated.
397 398 399 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 397 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the SyncMapInstance
417 418 419 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 417 def delete context.delete end |
#fetch ⇒ SyncMapInstance
Fetch a SyncMapInstance
410 411 412 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 410 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
444 445 446 447 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 444 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Sync.V1.SyncMapInstance #{values}>" end |
#links ⇒ String
Returns The links.
379 380 381 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 379 def links @properties['links'] end |
#revision ⇒ String
Returns The revision.
385 386 387 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 385 def revision @properties['revision'] end |
#service_sid ⇒ String
Returns The service_sid.
367 368 369 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 367 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The sid.
349 350 351 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 349 def sid @properties['sid'] end |
#sync_map_items ⇒ sync_map_items
Access the sync_map_items
424 425 426 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 424 def sync_map_items context.sync_map_items end |
#sync_map_permissions ⇒ sync_map_permissions
Access the sync_map_permissions
431 432 433 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 431 def context. end |
#to_s ⇒ Object
Provide a user friendly representation
437 438 439 440 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 437 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Sync.V1.SyncMapInstance #{values}>" end |
#unique_name ⇒ String
Returns The unique_name.
355 356 357 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 355 def unique_name @properties['unique_name'] end |
#url ⇒ String
Returns The url.
373 374 375 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_map.rb', line 373 def url @properties['url'] end |