Class: Telnyx::Resources::ManagedAccounts::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::ManagedAccounts::Actions
- Defined in:
- lib/telnyx/resources/managed_accounts/actions.rb
Overview
Managed Accounts operations
Instance Method Summary collapse
-
#disable(id, request_options: {}) ⇒ Telnyx::Models::ManagedAccounts::ActionDisableResponse
Disables a managed account, forbidding it to use Telnyx services, including sending or receiving phone calls and SMS messages.
-
#enable(id, reenable_all_connections: nil, request_options: {}) ⇒ Telnyx::Models::ManagedAccounts::ActionEnableResponse
Some parameter documentations has been truncated, see Models::ManagedAccounts::ActionEnableParams for more details.
-
#initialize(client:) ⇒ Actions
constructor
private
A new instance of Actions.
Constructor Details
#initialize(client:) ⇒ Actions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Actions.
61 62 63 |
# File 'lib/telnyx/resources/managed_accounts/actions.rb', line 61 def initialize(client:) @client = client end |
Instance Method Details
#disable(id, request_options: {}) ⇒ Telnyx::Models::ManagedAccounts::ActionDisableResponse
Disables a managed account, forbidding it to use Telnyx services, including sending or receiving phone calls and SMS messages. Ongoing phone calls will not be affected. The managed account and its sub-users will no longer be able to log in via the mission control portal.
22 23 24 25 26 27 28 29 |
# File 'lib/telnyx/resources/managed_accounts/actions.rb', line 22 def disable(id, params = {}) @client.request( method: :post, path: ["managed_accounts/%1$s/actions/disable", id], model: Telnyx::Models::ManagedAccounts::ActionDisableResponse, options: params[:request_options] ) end |
#enable(id, reenable_all_connections: nil, request_options: {}) ⇒ Telnyx::Models::ManagedAccounts::ActionEnableResponse
Some parameter documentations has been truncated, see Models::ManagedAccounts::ActionEnableParams for more details.
Enables a managed account and its sub-users to use Telnyx services.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/telnyx/resources/managed_accounts/actions.rb', line 47 def enable(id, params = {}) parsed, = Telnyx::ManagedAccounts::ActionEnableParams.dump_request(params) @client.request( method: :post, path: ["managed_accounts/%1$s/actions/enable", id], body: parsed, model: Telnyx::Models::ManagedAccounts::ActionEnableResponse, options: ) end |