Class: Sentdm::Resources::Me
- Inherits:
-
Object
- Object
- Sentdm::Resources::Me
- Defined in:
- lib/sentdm/resources/me.rb,
sig/sentdm/resources/me.rbs
Overview
Retrieve account details
Instance Method Summary collapse
-
#initialize(client:) ⇒ Me
constructor
private
A new instance of Me.
-
#retrieve(x_profile_id: nil, request_options: {}) ⇒ Sentdm::Models::MeRetrieveResponse
Some parameter documentations has been truncated, see Models::MeRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ Me
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 Me.
49 50 51 |
# File 'lib/sentdm/resources/me.rb', line 49 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(x_profile_id: nil, request_options: {}) ⇒ Sentdm::Models::MeRetrieveResponse
Some parameter documentations has been truncated, see Models::MeRetrieveParams for more details.
Returns the account associated with the provided API key. The response includes account identity, contact information, messaging channel configuration, and — depending on the account type — either a list of child profiles or the profile's own settings.
Account types:
organization— Has child profiles. Theprofilesarray is populated.user— Standalone account with no profiles.profile— Child of an organization. Includesorganization_id,short_name,status, andsettings.
Channels: The channels object always includes sms, whatsapp, and
rcs. Each channel has a configured boolean. Configured channels expose
additional details such as phone_number.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/sentdm/resources/me.rb', line 35 def retrieve(params = {}) parsed, = Sentdm::MeRetrieveParams.dump_request(params) @client.request( method: :get, path: "v3/me", headers: parsed.transform_keys(x_profile_id: "x-profile-id"), model: Sentdm::Models::MeRetrieveResponse, options: ) end |