Class: Telnyx::Resources::WhatsappMessageTemplates
- Inherits:
-
Object
- Object
- Telnyx::Resources::WhatsappMessageTemplates
- Defined in:
- lib/telnyx/resources/whatsapp_message_templates.rb,
sig/telnyx/resources/whatsapp_message_templates.rbs
Overview
Manage Whatsapp message templates
Instance Method Summary collapse
-
#delete(id, request_options: {}) ⇒ nil
Deletes the specified WhatsApp message template.
-
#initialize(client:) ⇒ WhatsappMessageTemplates
constructor
private
A new instance of WhatsappMessageTemplates.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::WhatsappMessageTemplateRetrieveResponse
Returns the content, components, language, and current review state of the specified WhatsApp message template.
-
#update(id, category: nil, components: nil, request_options: {}) ⇒ Telnyx::Models::WhatsappMessageTemplateUpdateResponse
Updates the editable fields of the specified WhatsApp message template.
Constructor Details
#initialize(client:) ⇒ WhatsappMessageTemplates
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 WhatsappMessageTemplates.
77 78 79 |
# File 'lib/telnyx/resources/whatsapp_message_templates.rb', line 77 def initialize(client:) @client = client end |
Instance Method Details
#delete(id, request_options: {}) ⇒ nil
Deletes the specified WhatsApp message template.
65 66 67 68 69 70 71 72 |
# File 'lib/telnyx/resources/whatsapp_message_templates.rb', line 65 def delete(id, params = {}) @client.request( method: :delete, path: ["v2/whatsapp_message_templates/%1$s", id], model: NilClass, options: params[:request_options] ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::WhatsappMessageTemplateRetrieveResponse
Returns the content, components, language, and current review state of the specified WhatsApp message template.
19 20 21 22 23 24 25 26 |
# File 'lib/telnyx/resources/whatsapp_message_templates.rb', line 19 def retrieve(id, params = {}) @client.request( method: :get, path: ["v2/whatsapp_message_templates/%1$s", id], model: Telnyx::Models::WhatsappMessageTemplateRetrieveResponse, options: params[:request_options] ) end |
#update(id, category: nil, components: nil, request_options: {}) ⇒ Telnyx::Models::WhatsappMessageTemplateUpdateResponse
Updates the editable fields of the specified WhatsApp message template.
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/telnyx/resources/whatsapp_message_templates.rb', line 43 def update(id, params = {}) parsed, = Telnyx::WhatsappMessageTemplateUpdateParams.dump_request(params) @client.request( method: :patch, path: ["v2/whatsapp_message_templates/%1$s", id], body: parsed, model: Telnyx::Models::WhatsappMessageTemplateUpdateResponse, options: ) end |