Class: Twilio::REST::Memory::V1::IdentityResolutionSettingList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Memory::V1::IdentityResolutionSettingList
- Defined in:
- lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb
Defined Under Namespace
Classes: IdentityResolutionSettingsCore
Instance Method Summary collapse
-
#fetch ⇒ IdentityResolutionSettingInstance
Fetch the IdentityResolutionSettingInstance.
-
#fetch_with_metadata ⇒ IdentityResolutionSettingInstance
Fetch the IdentityResolutionSettingInstanceMetadata.
-
#initialize(version, store_id: nil) ⇒ IdentityResolutionSettingList
constructor
Initialize the IdentityResolutionSettingList.
-
#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: nil) ⇒ IdentityResolutionSettingList
Initialize the IdentityResolutionSettingList
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
#fetch ⇒ IdentityResolutionSettingInstance
Fetch the IdentityResolutionSettingInstance
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_metadata ⇒ IdentityResolutionSettingInstance
Fetch the IdentityResolutionSettingInstanceMetadata
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_s ⇒ Object
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
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
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 |