Class: Telnyx::Resources::Whatsapp::BusinessAccounts::Settings
- Inherits:
-
Object
- Object
- Telnyx::Resources::Whatsapp::BusinessAccounts::Settings
- Defined in:
- lib/telnyx/resources/whatsapp/business_accounts/settings.rb
Overview
Manage Whatsapp business accounts
Instance Method Summary collapse
-
#initialize(client:) ⇒ Settings
constructor
private
A new instance of Settings.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Whatsapp::BusinessAccounts::SettingRetrieveResponse
Get WABA settings.
-
#update(id, name: nil, timezone: nil, webhook_enabled: nil, webhook_events: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::Whatsapp::BusinessAccounts::SettingUpdateResponse
Update WABA settings.
Constructor Details
#initialize(client:) ⇒ Settings
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 Settings.
66 67 68 |
# File 'lib/telnyx/resources/whatsapp/business_accounts/settings.rb', line 66 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Whatsapp::BusinessAccounts::SettingRetrieveResponse
Get WABA settings
20 21 22 23 24 25 26 27 |
# File 'lib/telnyx/resources/whatsapp/business_accounts/settings.rb', line 20 def retrieve(id, params = {}) @client.request( method: :get, path: ["v2/whatsapp/business_accounts/%1$s/settings", id], model: Telnyx::Models::Whatsapp::BusinessAccounts::SettingRetrieveResponse, options: params[:request_options] ) end |
#update(id, name: nil, timezone: nil, webhook_enabled: nil, webhook_events: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::Whatsapp::BusinessAccounts::SettingUpdateResponse
Update WABA settings
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/telnyx/resources/whatsapp/business_accounts/settings.rb', line 52 def update(id, params = {}) parsed, = Telnyx::Whatsapp::BusinessAccounts::SettingUpdateParams.dump_request(params) @client.request( method: :patch, path: ["v2/whatsapp/business_accounts/%1$s/settings", id], body: parsed, model: Telnyx::Models::Whatsapp::BusinessAccounts::SettingUpdateResponse, options: ) end |