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
Defined Under Namespace
Classes: Actions
Instance Attribute Summary collapse
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.
175 176 177 178 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 175 def initialize(client:) @client = client @actions = Telnyx::Resources::ManagedAccounts::Actions.new(client: client) end |
Instance Attribute Details
#actions ⇒ Telnyx::Resources::ManagedAccounts::Actions (readonly)
7 8 9 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 7 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.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 32 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.
135 136 137 138 139 140 141 142 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 135 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.
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 113 def list(params = {}) parsed, = Telnyx::ManagedAccountListParams.dump_request(params) @client.request( method: :get, path: "managed_accounts", query: parsed.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.
54 55 56 57 58 59 60 61 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 54 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.
79 80 81 82 83 84 85 86 87 88 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 79 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.
161 162 163 164 165 166 167 168 169 170 |
# File 'lib/telnyx/resources/managed_accounts.rb', line 161 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 |