Class: Twilio::REST::Memory::V1::IdentityResolutionSettingList

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

Defined Under Namespace

Classes: IdentityResolutionSettingsCore

Instance Method Summary collapse

Constructor Details

#initialize(version, store_id: nil) ⇒ IdentityResolutionSettingList

Initialize the IdentityResolutionSettingList

Parameters:

  • version (Version)

    Version that contains the resource



43
44
45
46
47
48
49
50
51
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 43

def initialize(version, store_id: nil)
    
    apiV1Version = ApiV1Version.new version.domain, version
    super(apiV1Version)
    # Path Solution
    @solution = { store_id: store_id }
    @uri = "/ControlPlane/Stores/#{@solution[:store_id]}/IdentityResolutionSettings"
    
end

Instance Method Details

#fetchIdentityResolutionSettingInstance

Fetch the IdentityResolutionSettingInstance

Returns:



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 55

def fetch

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, headers: headers)
    IdentityResolutionSettingInstance.new(
        @version,
        payload,
        store_id: @solution[:store_id],
    )
end

#fetch_with_metadataIdentityResolutionSettingInstance

Fetch the IdentityResolutionSettingInstanceMetadata

Returns:



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 74

def 

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    response = @version.('GET', @uri, headers: headers)
    identity_resolution_setting_instance = IdentityResolutionSettingInstance.new(
        @version,
        response.body,
        store_id: @solution[:store_id],
    )
    IdentityResolutionSettingInstanceMetadata.new(
        @version,
        identity_resolution_setting_instance,
        response.headers,
        response.status_code
    )
end

#to_sObject

Provide a user friendly representation



154
155
156
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 154

def to_s
    '#<Twilio.Memory.V1.IdentityResolutionSettingList>'
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:



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 101

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

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
    headers['Content-Type'] = 'application/json'
    
    
    
    
    payload = @version.update('PUT', @uri, headers: headers, data: identity_resolution_settings_core.to_json)
    IdentityResolutionSettingInstance.new(
        @version,
        payload,
        store_id: @solution[:store_id],
    )
end

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

Update the IdentityResolutionSettingInstanceMetadata

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:



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 125

def (
  if_match: :unset,
identity_resolution_settings_core: nil
)

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'If-Match' => if_match, })
    headers['Content-Type'] = 'application/json'
    
    
    
    
    response = @version.('PUT', @uri, headers: headers, data: identity_resolution_settings_core.to_json)
    identity_resolution_setting_instance = IdentityResolutionSettingInstance.new(
        @version,
        response.body,
        store_id: @solution[:store_id],
    )
    IdentityResolutionSettingInstanceMetadata.new(
        @version,
        identity_resolution_setting_instance,
        response.headers,
        response.status_code
    )
end