Class: Twilio::REST::Lookups::V2::LookupOverrideInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Lookups::V2::LookupOverrideInstance
- Defined in:
- lib/twilio-ruby/rest/lookups/v2/lookup_override.rb
Instance Method Summary collapse
-
#bucket ⇒ String
Name of the bucket.
-
#code ⇒ String
Twilio-specific error code.
-
#context ⇒ LookupOverrideContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create(overrides_request: :unset) ⇒ LookupOverrideInstance
Create the LookupOverrideInstance.
-
#delete ⇒ Boolean
Delete the LookupOverrideInstance.
-
#fetch ⇒ LookupOverrideInstance
Fetch the LookupOverrideInstance.
-
#field ⇒ String
Limit of requests for the bucket.
-
#initialize(version, payload, field: nil, phone_number: nil) ⇒ LookupOverrideInstance
constructor
Initialize the LookupOverrideInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#limit ⇒ String
Limit of requests for the bucket.
-
#message ⇒ String
Error message.
-
#more_info ⇒ String
Link to Error Code References.
-
#original_line_type ⇒ String
The original line type.
-
#overridden_by_account_sid ⇒ String
The Account SID for the user who made the override.
-
#overridden_line_type ⇒ String
The new line type after the override.
-
#override_reason ⇒ String
The reason for the override.
- #override_timestamp ⇒ Time
-
#owner ⇒ String
Owner of the rule.
-
#phone_number ⇒ String
The phone number for which the override was created.
-
#status ⇒ String
HTTP response status code.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#ttl ⇒ String
Time to live of the rule.
-
#update(overrides_request: :unset) ⇒ LookupOverrideInstance
Update the LookupOverrideInstance.
Constructor Details
#initialize(version, payload, field: nil, phone_number: nil) ⇒ LookupOverrideInstance
Initialize the LookupOverrideInstance
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 206 def initialize(version, payload , field: nil, phone_number: nil) super(version) # Marshaled Properties @properties = { 'phone_number' => payload['phone_number'], 'original_line_type' => payload['original_line_type'], 'overridden_line_type' => payload['overridden_line_type'], 'override_reason' => payload['override_reason'], 'override_timestamp' => Twilio.deserialize_iso8601_datetime(payload['override_timestamp']), 'overridden_by_account_sid' => payload['overridden_by_account_sid'], 'code' => payload['code'], 'message' => payload['message'], 'more_info' => payload['more_info'], 'status' => payload['status'], 'field' => payload['field'], 'limit' => payload['limit'], 'bucket' => payload['bucket'], 'owner' => payload['owner'], 'ttl' => payload['ttl'], } # Context @instance_context = nil @params = { 'field' => field || @properties['field'] ,'phone_number' => phone_number || @properties['phone_number'] , } end |
Instance Method Details
#bucket ⇒ String
Returns Name of the bucket.
318 319 320 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 318 def bucket @properties['bucket'] end |
#code ⇒ String
Returns Twilio-specific error code.
282 283 284 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 282 def code @properties['code'] end |
#context ⇒ LookupOverrideContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
237 238 239 240 241 242 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 237 def context unless @instance_context @instance_context = LookupOverrideContext.new(@version , @params['field'], @params['phone_number']) end @instance_context end |
#create(overrides_request: :unset) ⇒ LookupOverrideInstance
Create the LookupOverrideInstance
338 339 340 341 342 343 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 338 def create(overrides_request: :unset ) context.create( ) end |
#delete ⇒ Boolean
Delete the LookupOverrideInstance
348 349 350 351 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 348 def delete context.delete end |
#fetch ⇒ LookupOverrideInstance
Fetch the LookupOverrideInstance
356 357 358 359 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 356 def fetch context.fetch end |
#field ⇒ String
Returns Limit of requests for the bucket.
306 307 308 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 306 def field @properties['field'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
381 382 383 384 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 381 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Lookups.V2.LookupOverrideInstance #{values}>" end |
#limit ⇒ String
Returns Limit of requests for the bucket.
312 313 314 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 312 def limit @properties['limit'] end |
#message ⇒ String
Returns Error message.
288 289 290 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 288 def @properties['message'] end |
#more_info ⇒ String
Returns Link to Error Code References.
294 295 296 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 294 def more_info @properties['more_info'] end |
#original_line_type ⇒ String
Returns The original line type.
252 253 254 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 252 def original_line_type @properties['original_line_type'] end |
#overridden_by_account_sid ⇒ String
Returns The Account SID for the user who made the override.
276 277 278 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 276 def overridden_by_account_sid @properties['overridden_by_account_sid'] end |
#overridden_line_type ⇒ String
Returns The new line type after the override.
258 259 260 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 258 def overridden_line_type @properties['overridden_line_type'] end |
#override_reason ⇒ String
Returns The reason for the override.
264 265 266 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 264 def override_reason @properties['override_reason'] end |
#override_timestamp ⇒ Time
270 271 272 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 270 def @properties['override_timestamp'] end |
#owner ⇒ String
Returns Owner of the rule.
324 325 326 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 324 def owner @properties['owner'] end |
#phone_number ⇒ String
Returns The phone number for which the override was created.
246 247 248 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 246 def phone_number @properties['phone_number'] end |
#status ⇒ String
Returns HTTP response status code.
300 301 302 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 300 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
374 375 376 377 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 374 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Lookups.V2.LookupOverrideInstance #{values}>" end |
#ttl ⇒ String
Returns Time to live of the rule.
330 331 332 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 330 def ttl @properties['ttl'] end |
#update(overrides_request: :unset) ⇒ LookupOverrideInstance
Update the LookupOverrideInstance
365 366 367 368 369 370 |
# File 'lib/twilio-ruby/rest/lookups/v2/lookup_override.rb', line 365 def update(overrides_request: :unset ) context.update( ) end |