Class: Twilio::REST::Messaging::V1::TollfreeVerificationContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Messaging::V1::TollfreeVerificationContext
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the TollfreeVerificationInstance.
-
#fetch ⇒ TollfreeVerificationInstance
Fetch the TollfreeVerificationInstance.
-
#initialize(version, sid) ⇒ TollfreeVerificationContext
constructor
Initialize the TollfreeVerificationContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(business_name: :unset, business_website: :unset, notification_email: :unset, use_case_categories: :unset, use_case_summary: :unset, production_message_sample: :unset, opt_in_image_urls: :unset, opt_in_type: :unset, message_volume: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset, edit_reason: :unset) ⇒ TollfreeVerificationInstance
Update the TollfreeVerificationInstance.
Constructor Details
#initialize(version, sid) ⇒ TollfreeVerificationContext
Initialize the TollfreeVerificationContext
251 252 253 254 255 256 257 258 259 |
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 251 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Tollfree/Verifications/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the TollfreeVerificationInstance
263 264 265 266 267 268 269 270 |
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 263 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ TollfreeVerificationInstance
Fetch the TollfreeVerificationInstance
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 275 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) TollfreeVerificationInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
387 388 389 390 |
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 387 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.TollfreeVerificationContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
380 381 382 383 |
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 380 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.TollfreeVerificationContext #{context}>" end |
#update(business_name: :unset, business_website: :unset, notification_email: :unset, use_case_categories: :unset, use_case_summary: :unset, production_message_sample: :unset, opt_in_image_urls: :unset, opt_in_type: :unset, message_volume: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset, edit_reason: :unset) ⇒ TollfreeVerificationInstance
Update the TollfreeVerificationInstance
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 315 def update( business_name: :unset, business_website: :unset, notification_email: :unset, use_case_categories: :unset, use_case_summary: :unset, production_message_sample: :unset, opt_in_image_urls: :unset, opt_in_type: :unset, message_volume: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset, edit_reason: :unset ) data = Twilio::Values.of({ 'BusinessName' => business_name, 'BusinessWebsite' => business_website, 'NotificationEmail' => notification_email, 'UseCaseCategories' => Twilio.serialize_list(use_case_categories) { |e| e }, 'UseCaseSummary' => use_case_summary, 'ProductionMessageSample' => , 'OptInImageUrls' => Twilio.serialize_list(opt_in_image_urls) { |e| e }, 'OptInType' => opt_in_type, 'MessageVolume' => , 'BusinessStreetAddress' => business_street_address, 'BusinessStreetAddress2' => business_street_address2, 'BusinessCity' => business_city, 'BusinessStateProvinceRegion' => business_state_province_region, 'BusinessPostalCode' => business_postal_code, 'BusinessCountry' => business_country, 'AdditionalInformation' => additional_information, 'BusinessContactFirstName' => business_contact_first_name, 'BusinessContactLastName' => business_contact_last_name, 'BusinessContactEmail' => business_contact_email, 'BusinessContactPhone' => business_contact_phone, 'EditReason' => edit_reason, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) TollfreeVerificationInstance.new( @version, payload, sid: @solution[:sid], ) end |