Class: Twilio::REST::Memory::V1::IdentityResolutionSettingContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Memory::V1::IdentityResolutionSettingContext
- Defined in:
- lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb
Instance Method Summary collapse
-
#fetch ⇒ IdentityResolutionSettingInstance
Fetch the IdentityResolutionSettingInstance.
-
#fetch_with_metadata ⇒ IdentityResolutionSettingInstance
Fetch the IdentityResolutionSettingInstanceMetadata.
-
#initialize(version, store_id) ⇒ IdentityResolutionSettingContext
constructor
Initialize the IdentityResolutionSettingContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(if_match: :unset, identity_resolution_settings_core: nil) ⇒ IdentityResolutionSettingInstance
Update the IdentityResolutionSettingInstance.
-
#update_with_metadata(if_match: :unset, identity_resolution_settings_core: nil) ⇒ IdentityResolutionSettingInstance
Update the IdentityResolutionSettingInstanceMetadata.
Constructor Details
#initialize(version, store_id) ⇒ IdentityResolutionSettingContext
Initialize the IdentityResolutionSettingContext
68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 68 def initialize(version, store_id) 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
#fetch ⇒ IdentityResolutionSettingInstance
Fetch the IdentityResolutionSettingInstance
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 82 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_metadata ⇒ IdentityResolutionSettingInstance
Fetch the IdentityResolutionSettingInstanceMetadata
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 101 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 |
#inspect ⇒ Object
Provide a detailed, user friendly representation
187 188 189 190 |
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 187 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Memory.V1.IdentityResolutionSettingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
180 181 182 183 |
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 180 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Memory.V1.IdentityResolutionSettingContext #{context}>" end |
#update(if_match: :unset, identity_resolution_settings_core: nil) ⇒ IdentityResolutionSettingInstance
Update the IdentityResolutionSettingInstance
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 128 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
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb', line 152 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 |