Class: Telnyx::Resources::Organizations::Users
- Inherits:
-
Object
- Object
- Telnyx::Resources::Organizations::Users
- Defined in:
- lib/telnyx/resources/organizations/users.rb,
lib/telnyx/resources/organizations/users/actions.rb
Overview
Operations related to users in your organization
Defined Under Namespace
Classes: Actions
Instance Attribute Summary collapse
-
#actions ⇒ Telnyx::Resources::Organizations::Users::Actions
readonly
Operations related to users in your organization.
Instance Method Summary collapse
-
#get_groups_report(accept: nil, request_options: {}) ⇒ Telnyx::Models::Organizations::UserGetGroupsReportResponse
Some parameter documentations has been truncated, see Models::Organizations::UserGetGroupsReportParams for more details.
-
#initialize(client:) ⇒ Users
constructor
private
A new instance of Users.
-
#list(filter_email: nil, filter_user_status: nil, include_groups: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Organizations::OrganizationUser>
Some parameter documentations has been truncated, see Models::Organizations::UserListParams for more details.
-
#retrieve(id, include_groups: nil, request_options: {}) ⇒ Telnyx::Models::Organizations::UserRetrieveResponse
Some parameter documentations has been truncated, see Models::Organizations::UserRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ Users
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 Users.
111 112 113 114 |
# File 'lib/telnyx/resources/organizations/users.rb', line 111 def initialize(client:) @client = client @actions = Telnyx::Resources::Organizations::Users::Actions.new(client: client) end |
Instance Attribute Details
#actions ⇒ Telnyx::Resources::Organizations::Users::Actions (readonly)
Operations related to users in your organization
10 11 12 |
# File 'lib/telnyx/resources/organizations/users.rb', line 10 def actions @actions end |
Instance Method Details
#get_groups_report(accept: nil, request_options: {}) ⇒ Telnyx::Models::Organizations::UserGetGroupsReportResponse
Some parameter documentations has been truncated, see Models::Organizations::UserGetGroupsReportParams for more details.
Returns a report of all users in your organization with their group memberships. This endpoint returns all users without pagination and always includes group information. The report can be retrieved in JSON or CSV format by sending specific content-type headers.
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/telnyx/resources/organizations/users.rb', line 97 def get_groups_report(params = {}) parsed, = Telnyx::Organizations::UserGetGroupsReportParams.dump_request(params) @client.request( method: :get, path: "organizations/users/users_groups_report", headers: parsed.transform_keys(accept: "accept"), model: Telnyx::Models::Organizations::UserGetGroupsReportResponse, options: ) end |
#list(filter_email: nil, filter_user_status: nil, include_groups: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Organizations::OrganizationUser>
Some parameter documentations has been truncated, see Models::Organizations::UserListParams for more details.
Returns a list of the users in your organization.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/telnyx/resources/organizations/users.rb', line 62 def list(params = {}) parsed, = Telnyx::Organizations::UserListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "organizations/users", query: query.transform_keys( filter_email: "filter[email]", filter_user_status: "filter[user_status]", page_number: "page[number]", page_size: "page[size]" ), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Organizations::OrganizationUser, options: ) end |
#retrieve(id, include_groups: nil, request_options: {}) ⇒ Telnyx::Models::Organizations::UserRetrieveResponse
Some parameter documentations has been truncated, see Models::Organizations::UserRetrieveParams for more details.
Returns a user in your organization.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/telnyx/resources/organizations/users.rb', line 28 def retrieve(id, params = {}) parsed, = Telnyx::Organizations::UserRetrieveParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["organizations/users/%1$s", id], query: query, model: Telnyx::Models::Organizations::UserRetrieveResponse, options: ) end |