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
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected]
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
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 ⇒ 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
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 266 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.
313 314 315 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 313 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
292 293 294 295 296 297 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 292 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.
355 356 357 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 355 def created_by @properties['created_by'] end |
#date_created ⇒ Time
Returns The date_created.
343 344 345 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 343 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date_updated.
349 350 351 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 349 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the SyncMapInstance
369 370 371 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 369 def delete context.delete end |
#fetch ⇒ SyncMapInstance
Fetch the SyncMapInstance
362 363 364 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 362 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
396 397 398 399 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 396 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Sync.SyncMapInstance #{values}>" end |
#links ⇒ String
Returns The links.
331 332 333 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 331 def links @properties['links'] end |
#revision ⇒ String
Returns The revision.
337 338 339 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 337 def revision @properties['revision'] end |
#service_sid ⇒ String
Returns The service_sid.
319 320 321 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 319 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The sid.
301 302 303 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 301 def sid @properties['sid'] end |
#sync_map_items ⇒ sync_map_items
Access the sync_map_items
376 377 378 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 376 def sync_map_items context.sync_map_items end |
#sync_map_permissions ⇒ sync_map_permissions
Access the sync_map_permissions
383 384 385 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 383 def context. end |
#to_s ⇒ Object
Provide a user friendly representation
389 390 391 392 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 389 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Sync.SyncMapInstance #{values}>" end |
#unique_name ⇒ String
Returns The unique_name.
307 308 309 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 307 def unique_name @properties['unique_name'] end |
#url ⇒ String
Returns The url.
325 326 327 |
# File 'lib/twilio-ruby/rest/preview/sync/service/sync_map.rb', line 325 def url @properties['url'] end |