Class: StickyIoRestfulApiV2025731::CommunicationsController
- Inherits:
-
BaseController
- Object
- BaseController
- StickyIoRestfulApiV2025731::CommunicationsController
- Defined in:
- lib/sticky_io_restful_api_v2025731/controllers/communications_controller.rb
Overview
CommunicationsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#disable_sms_communication(domain, v2_ext, contact_id) ⇒ ApiResponse
Disable SMS communications by the contact ID here.
-
#enable_sms_communication(domain, v2_ext, contact_id) ⇒ ApiResponse
Enable SMS communications by the contact ID here.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from StickyIoRestfulApiV2025731::BaseController
Instance Method Details
#disable_sms_communication(domain, v2_ext, contact_id) ⇒ ApiResponse
Disable SMS communications by the contact ID here
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/sticky_io_restful_api_v2025731/controllers/communications_controller.rb', line 45 def disable_sms_communication(domain, v2_ext, contact_id) @api_call .request(new_request_builder(HttpMethodEnum::PATCH, '/.{domain}{v2_ext}contacts/{contact_id}/communications/sms/disable', Server::SERVER_1) .header_param(new_parameter('application/json', key: 'Content-Type')) .template_param(new_parameter(domain, key: 'domain') .is_required(true) .should_encode(true)) .template_param(new_parameter(v2_ext, key: 'v2_ext') .is_required(true) .should_encode(true)) .template_param(new_parameter(contact_id, key: 'contact_id') .is_required(true) .should_encode(true)) .auth(Single.new('basic'))) .response(new_response_handler .is_response_void(true) .is_api_response(true)) .execute end |
#enable_sms_communication(domain, v2_ext, contact_id) ⇒ ApiResponse
Enable SMS communications by the contact ID here
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/sticky_io_restful_api_v2025731/controllers/communications_controller.rb', line 15 def enable_sms_communication(domain, v2_ext, contact_id) @api_call .request(new_request_builder(HttpMethodEnum::PATCH, '/.{domain}{v2_ext}contacts/{contact_id}/communications/sms/enable', Server::SERVER_1) .header_param(new_parameter('application/json', key: 'Content-Type')) .template_param(new_parameter(domain, key: 'domain') .is_required(true) .should_encode(true)) .template_param(new_parameter(v2_ext, key: 'v2_ext') .is_required(true) .should_encode(true)) .template_param(new_parameter(contact_id, key: 'contact_id') .is_required(true) .should_encode(true)) .auth(Single.new('basic'))) .response(new_response_handler .is_response_void(true) .is_api_response(true)) .execute end |