Class: Twilio::REST::Memory::V1::IdentityResolutionSettingInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, store_id: nil) ⇒ IdentityResolutionSettingInstance

Initialize the IdentityResolutionSettingInstance

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 IdentityResolutionSetting resource.

  • sid (String)

    The SID of the Call resource to fetch.



340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 340

def initialize(version, payload , store_id: nil)
    
    apiV1Version = ApiV1Version.new version.domain, version
    super(apiV1Version)
    
    # Marshaled Properties
    @properties = { 
        'identifier_configs' => payload['identifier_configs'],
        'matching_rules' => payload['matching_rules'],
        'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i,
        'message' => payload['message'],
        'status_url' => payload['status_url'],
    }

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

Instance Method Details

#contextIdentityResolutionSettingContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



363
364
365
366
367
368
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 363

def context
    unless @instance_context
        @instance_context = IdentityResolutionSettingContext.new(@version , @params['store_id'])
    end
    @instance_context
end

#fetchIdentityResolutionSettingInstance

Fetch the IdentityResolutionSettingInstance

Returns:



403
404
405
406
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 403

def fetch

    context.fetch
end

#identifier_configsArray<IdentifierConfig>

Returns List of identifier types and their resolution settings.

Returns:

  • (Array<IdentifierConfig>)

    List of identifier types and their resolution settings.



372
373
374
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 372

def identifier_configs
    @properties['identifier_configs']
end

#inspectObject

Provide a detailed, user friendly representation



433
434
435
436
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 433

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Memory.V1.IdentityResolutionSettingInstance #{values}>"
end

#matching_rulesArray<String>

Returns Priority list of identifiers to locate profiles to apply new data to, or for determining if two existing profiles should merge. Rules are evaluated in order. - If no rule matches against existing profiles, a new profile will be created. - If a rule matches to a single existing profile, the profile will be updated. - If a rule matches to multiple existing profiles, those existing profiles will be merged.

Returns:

  • (Array<String>)

    Priority list of identifiers to locate profiles to apply new data to, or for determining if two existing profiles should merge. Rules are evaluated in order. - If no rule matches against existing profiles, a new profile will be created. - If a rule matches to a single existing profile, the profile will be updated. - If a rule matches to multiple existing profiles, those existing profiles will be merged.



378
379
380
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 378

def matching_rules
    @properties['matching_rules']
end

#messageString

Returns:

  • (String)


390
391
392
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 390

def message
    @properties['message']
end

#status_urlString

Returns URI to check operation status.

Returns:

  • (String)

    URI to check operation status.



396
397
398
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 396

def status_url
    @properties['status_url']
end

#to_sObject

Provide a user friendly representation



426
427
428
429
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 426

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Memory.V1.IdentityResolutionSettingInstance #{values}>"
end

#update(if_match: :unset, identity_resolution_settings_core: nil) ⇒ IdentityResolutionSettingInstance

Update the IdentityResolutionSettingInstance

Parameters:

  • if_match (String) (defaults to: :unset)

    Allows for optimistic concurrency control by making the request conditional. Server will only act if the resource’s current Entity Tag (ETag) matches the one provided, preventing accidental overwrites.

  • identity_resolution_settings_core (IdentityResolutionSettingsCore) (defaults to: nil)

Returns:



413
414
415
416
417
418
419
420
421
422
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 413

def update(
  if_match: :unset,
  identity_resolution_settings_core: nil
)

    context.update(
        if_match: if_match, 
        identity_resolution_settings_core: identity_resolution_settings_core, 
    )
end

#versionString

Returns The current version number of the Identity Resolution Settings. Incremented on each successful update.

Returns:

  • (String)

    The current version number of the Identity Resolution Settings. Incremented on each successful update.



384
385
386
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 384

def version
    @properties['version']
end