Class: Telnyx::Resources::ManagedAccounts
- Inherits:
-
Object
- Object
- Telnyx::Resources::ManagedAccounts
- Defined in:
- lib/telnyx/resources/managed_accounts.rb,
lib/telnyx/resources/managed_accounts/actions.rb
Overview
Managed Accounts operations
Defined Under Namespace
Classes: Actions
Instance Attribute Summary collapse
-
#actions ⇒ Telnyx::Resources::ManagedAccounts::Actions
readonly
Managed Accounts operations.
Instance Method Summary collapse
-
#create(business_name:, email: nil, managed_account_allow_custom_pricing: nil, password: nil, rollup_billing: nil, request_options: {}) ⇒ Telnyx::Models::ManagedAccountCreateResponse
Some parameter documentations has been truncated, see Models::ManagedAccountCreateParams for more details.
-
#get_allocatable_global_outbound_channels(request_options: {}) ⇒ Telnyx::Models::ManagedAccountGetAllocatableGlobalOutboundChannelsResponse
Display information about allocatable global outbound channels for the current user.
-
#initialize(client:) ⇒ ManagedAccounts
constructor
private
A new instance of ManagedAccounts.
-
#list(filter: nil, include_cancelled_accounts: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::ManagedAccountListResponse>
Some parameter documentations has been truncated, see Models::ManagedAccountListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::ManagedAccountRetrieveResponse
Retrieves the details of a single managed account.
-
#update(id, managed_account_allow_custom_pricing: nil, request_options: {}) ⇒ Telnyx::Models::ManagedAccountUpdateResponse
Some parameter documentations has been truncated, see Models::ManagedAccountUpdateParams for more details.
-
#update_global_channel_limit(id, channel_limit: nil, request_options: {}) ⇒ Telnyx::Models::ManagedAccountUpdateGlobalChannelLimitResponse
Some parameter documentations has been truncated, see Models::ManagedAccountUpdateGlobalChannelLimitParams for more details.
Constructor Details
#initialize(client:) ⇒ ManagedAccounts
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 ManagedAccounts.
178 179 180 181 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 178 def initialize(client:) @client = client @actions = Telnyx::Resources::ManagedAccounts::Actions.new(client: client) end |
Instance Attribute Details
#actions ⇒ Telnyx::Resources::ManagedAccounts::Actions (readonly)
Managed Accounts operations
9 10 11 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 9 def actions @actions end |
Instance Method Details
#create(business_name:, email: nil, managed_account_allow_custom_pricing: nil, password: nil, rollup_billing: nil, request_options: {}) ⇒ Telnyx::Models::ManagedAccountCreateResponse
Some parameter documentations has been truncated, see Models::ManagedAccountCreateParams for more details.
Create a new managed account owned by the authenticated user. You need to be explictly approved by Telnyx in order to become a manager account.
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 34 def create(params) parsed, = Telnyx::ManagedAccountCreateParams.dump_request(params) @client.request( method: :post, path: "managed_accounts", body: parsed, model: Telnyx::Models::ManagedAccountCreateResponse, options: ) end |
#get_allocatable_global_outbound_channels(request_options: {}) ⇒ Telnyx::Models::ManagedAccountGetAllocatableGlobalOutboundChannelsResponse
Display information about allocatable global outbound channels for the current user. Only usable by account managers.
138 139 140 141 142 143 144 145 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 138 def get_allocatable_global_outbound_channels(params = {}) @client.request( method: :get, path: "managed_accounts/allocatable_global_outbound_channels", model: Telnyx::Models::ManagedAccountGetAllocatableGlobalOutboundChannelsResponse, options: params[:request_options] ) end |
#list(filter: nil, include_cancelled_accounts: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::ManagedAccountListResponse>
Some parameter documentations has been truncated, see Models::ManagedAccountListParams for more details.
Lists the accounts managed by the current user. Users need to be explictly approved by Telnyx in order to become manager accounts.
115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 115 def list(params = {}) parsed, = Telnyx::ManagedAccountListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "managed_accounts", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Models::ManagedAccountListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::ManagedAccountRetrieveResponse
Retrieves the details of a single managed account.
56 57 58 59 60 61 62 63 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 56 def retrieve(id, params = {}) @client.request( method: :get, path: ["managed_accounts/%1$s", id], model: Telnyx::Models::ManagedAccountRetrieveResponse, options: params[:request_options] ) end |
#update(id, managed_account_allow_custom_pricing: nil, request_options: {}) ⇒ Telnyx::Models::ManagedAccountUpdateResponse
Some parameter documentations has been truncated, see Models::ManagedAccountUpdateParams for more details.
Update a single managed account.
81 82 83 84 85 86 87 88 89 90 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 81 def update(id, params = {}) parsed, = Telnyx::ManagedAccountUpdateParams.dump_request(params) @client.request( method: :patch, path: ["managed_accounts/%1$s", id], body: parsed, model: Telnyx::Models::ManagedAccountUpdateResponse, options: ) end |
#update_global_channel_limit(id, channel_limit: nil, request_options: {}) ⇒ Telnyx::Models::ManagedAccountUpdateGlobalChannelLimitResponse
Some parameter documentations has been truncated, see Models::ManagedAccountUpdateGlobalChannelLimitParams for more details.
Update the amount of allocatable global outbound channels allocated to a specific managed account.
164 165 166 167 168 169 170 171 172 173 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 164 def update_global_channel_limit(id, params = {}) parsed, = Telnyx::ManagedAccountUpdateGlobalChannelLimitParams.dump_request(params) @client.request( method: :patch, path: ["managed_accounts/%1$s/update_global_channel_limit", id], body: parsed, model: Telnyx::Models::ManagedAccountUpdateGlobalChannelLimitResponse, options: ) end |