Class: Telnyx::Resources::Whatsapp::PhoneNumbers::Profile
- Inherits:
-
Object
- Object
- Telnyx::Resources::Whatsapp::PhoneNumbers::Profile
- Defined in:
- lib/telnyx/resources/whatsapp/phone_numbers/profile.rb,
lib/telnyx/resources/whatsapp/phone_numbers/profile/photo.rb
Overview
Manage Whatsapp phone numbers
Defined Under Namespace
Classes: Photo
Instance Attribute Summary collapse
-
#photo ⇒ Telnyx::Resources::Whatsapp::PhoneNumbers::Profile::Photo
readonly
Manage Whatsapp phone numbers.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Profile
constructor
private
A new instance of Profile.
-
#retrieve(phone_number, request_options: {}) ⇒ Telnyx::Models::Whatsapp::PhoneNumbers::ProfileRetrieveResponse
Get phone number business profile.
-
#update(phone_number, about: nil, address: nil, category: nil, description: nil, display_name: nil, email: nil, website: nil, request_options: {}) ⇒ Telnyx::Models::Whatsapp::PhoneNumbers::ProfileUpdateResponse
Update phone number business profile.
Constructor Details
#initialize(client:) ⇒ Profile
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 Profile.
72 73 74 75 |
# File 'lib/telnyx/resources/whatsapp/phone_numbers/profile.rb', line 72 def initialize(client:) @client = client @photo = Telnyx::Resources::Whatsapp::PhoneNumbers::Profile::Photo.new(client: client) end |
Instance Attribute Details
#photo ⇒ Telnyx::Resources::Whatsapp::PhoneNumbers::Profile::Photo (readonly)
Manage Whatsapp phone numbers
11 12 13 |
# File 'lib/telnyx/resources/whatsapp/phone_numbers/profile.rb', line 11 def photo @photo end |
Instance Method Details
#retrieve(phone_number, request_options: {}) ⇒ Telnyx::Models::Whatsapp::PhoneNumbers::ProfileRetrieveResponse
Get phone number business profile
24 25 26 27 28 29 30 31 |
# File 'lib/telnyx/resources/whatsapp/phone_numbers/profile.rb', line 24 def retrieve(phone_number, params = {}) @client.request( method: :get, path: ["v2/whatsapp/phone_numbers/%1$s/profile", phone_number], model: Telnyx::Models::Whatsapp::PhoneNumbers::ProfileRetrieveResponse, options: params[:request_options] ) end |
#update(phone_number, about: nil, address: nil, category: nil, description: nil, display_name: nil, email: nil, website: nil, request_options: {}) ⇒ Telnyx::Models::Whatsapp::PhoneNumbers::ProfileUpdateResponse
Update phone number business profile
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/telnyx/resources/whatsapp/phone_numbers/profile.rb', line 58 def update(phone_number, params = {}) parsed, = Telnyx::Whatsapp::PhoneNumbers::ProfileUpdateParams.dump_request(params) @client.request( method: :patch, path: ["v2/whatsapp/phone_numbers/%1$s/profile", phone_number], body: parsed, model: Telnyx::Models::Whatsapp::PhoneNumbers::ProfileUpdateResponse, options: ) end |