telnyx 5.60.0 → 5.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +10 -5
- data/lib/telnyx/errors.rb +0 -10
- data/lib/telnyx/lib/webhook_verification.rb +172 -0
- data/lib/telnyx/models/ai/assistants/{tag_delete_params.rb → tag_add_params.rb} +2 -2
- data/lib/telnyx/models/ai/assistants/{tag_delete_response.rb → tag_add_response.rb} +2 -2
- data/lib/telnyx/models/ai/assistants/{tag_create_params.rb → tag_remove_params.rb} +2 -2
- data/lib/telnyx/models/ai/assistants/{tag_create_response.rb → tag_remove_response.rb} +2 -2
- data/lib/telnyx/models/call_cost_webhook_event.rb +242 -0
- data/lib/telnyx/models/calls/action_start_noise_suppression_params.rb +135 -8
- data/lib/telnyx/models/text_to_speech_generate_params.rb +3 -3
- data/lib/telnyx/models/unsafe_unwrap_webhook_event.rb +3 -1
- data/lib/telnyx/models/unwrap_webhook_event.rb +3 -1
- data/lib/telnyx/models/voice_clone_create_from_design_params.rb +27 -6
- data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +23 -2
- data/lib/telnyx/models/voice_clone_create_params.rb +79 -0
- data/lib/telnyx/models/voice_clone_create_response.rb +19 -0
- data/lib/telnyx/models/voice_clone_data.rb +41 -1
- data/lib/telnyx/models/voice_clone_list_params.rb +22 -1
- data/lib/telnyx/models/voice_design_create_params.rb +24 -1
- data/lib/telnyx/models/voice_design_data.rb +45 -1
- data/lib/telnyx/models/voice_design_list_response.rb +32 -1
- data/lib/telnyx/models/{voice_design_update_params.rb → voice_design_rename_params.rb} +2 -2
- data/lib/telnyx/models/{voice_design_update_response.rb → voice_design_rename_response.rb} +42 -11
- data/lib/telnyx/models/whatsapp/business_accounts/{phone_number_create_verification_params.rb → phone_number_initialize_verification_params.rb} +5 -5
- data/lib/telnyx/models/whatsapp/template_create_params.rb +530 -0
- data/lib/telnyx/models/whatsapp/{message_template_create_response.rb → template_create_response.rb} +2 -2
- data/lib/telnyx/models/whatsapp/{message_template_list_params.rb → template_list_params.rb} +5 -5
- data/lib/telnyx/models/whatsapp_message_template_delete_params.rb +20 -0
- data/lib/telnyx/models/whatsapp_message_template_retrieve_params.rb +20 -0
- data/lib/telnyx/models/whatsapp_message_template_retrieve_response.rb +16 -0
- data/lib/telnyx/models/whatsapp_message_template_update_params.rb +504 -0
- data/lib/telnyx/models/whatsapp_message_template_update_response.rb +16 -0
- data/lib/telnyx/models/whatsapp_template_data.rb +10 -3
- data/lib/telnyx/models/x402/{credit_account_create_payment_quote_params.rb → credit_account_create_quote_params.rb} +2 -2
- data/lib/telnyx/models/x402/{credit_account_create_payment_quote_response.rb → credit_account_create_quote_response.rb} +31 -32
- data/lib/telnyx/models/x402/{credit_account_settle_payment_params.rb → credit_account_settle_params.rb} +3 -3
- data/lib/telnyx/models/x402/{credit_account_settle_payment_response.rb → credit_account_settle_response.rb} +14 -15
- data/lib/telnyx/models.rb +12 -4
- data/lib/telnyx/resources/ai/assistants/tags.rb +28 -28
- data/lib/telnyx/resources/calls/actions.rb +1 -1
- data/lib/telnyx/resources/voice_clones.rb +38 -31
- data/lib/telnyx/resources/voice_designs.rb +27 -25
- data/lib/telnyx/resources/webhooks.rb +10 -183
- data/lib/telnyx/resources/whatsapp/business_accounts/phone_numbers.rb +5 -5
- data/lib/telnyx/resources/whatsapp/phone_numbers/profile.rb +0 -4
- data/lib/telnyx/resources/whatsapp/templates.rb +91 -0
- data/lib/telnyx/resources/whatsapp.rb +3 -3
- data/lib/telnyx/resources/whatsapp_message_templates.rb +81 -0
- data/lib/telnyx/resources/x402/credit_account.rb +13 -13
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +25 -24
- data/rbi/telnyx/client.rbi +8 -4
- data/rbi/telnyx/models/ai/assistants/{tag_create_params.rbi → tag_add_params.rbi} +2 -2
- data/rbi/telnyx/models/ai/assistants/{tag_delete_response.rbi → tag_add_response.rbi} +2 -2
- data/rbi/telnyx/models/ai/assistants/{tag_delete_params.rbi → tag_remove_params.rbi} +2 -2
- data/rbi/telnyx/models/ai/assistants/{tag_create_response.rbi → tag_remove_response.rbi} +2 -2
- data/rbi/telnyx/models/call_cost_webhook_event.rbi +485 -0
- data/rbi/telnyx/models/calls/action_start_noise_suppression_params.rbi +338 -12
- data/rbi/telnyx/models/text_to_speech_generate_params.rbi +2 -1
- data/rbi/telnyx/models/unsafe_unwrap_webhook_event.rbi +1 -0
- data/rbi/telnyx/models/unwrap_webhook_event.rbi +1 -0
- data/rbi/telnyx/models/voice_clone_create_from_design_params.rbi +51 -0
- data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +67 -2
- data/rbi/telnyx/models/voice_clone_create_params.rbi +142 -0
- data/rbi/telnyx/models/voice_clone_create_response.rbi +36 -0
- data/rbi/telnyx/models/voice_clone_data.rbi +57 -0
- data/rbi/telnyx/models/voice_clone_list_params.rbi +62 -0
- data/rbi/telnyx/models/voice_design_create_params.rbi +60 -0
- data/rbi/telnyx/models/voice_design_data.rbi +59 -0
- data/rbi/telnyx/models/voice_design_list_response.rbi +73 -0
- data/rbi/telnyx/models/{voice_design_update_params.rbi → voice_design_rename_params.rbi} +2 -2
- data/rbi/telnyx/models/{voice_design_update_response.rbi → voice_design_rename_response.rbi} +90 -14
- data/rbi/telnyx/models/whatsapp/business_accounts/{phone_number_create_verification_params.rbi → phone_number_initialize_verification_params.rbi} +10 -10
- data/rbi/telnyx/models/whatsapp/template_create_params.rbi +1177 -0
- data/rbi/telnyx/models/whatsapp/{message_template_create_response.rbi → template_create_response.rbi} +2 -2
- data/rbi/telnyx/models/whatsapp/{message_template_list_params.rbi → template_list_params.rbi} +11 -11
- data/rbi/telnyx/models/whatsapp_message_template_delete_params.rbi +38 -0
- data/rbi/telnyx/models/whatsapp_message_template_retrieve_params.rbi +38 -0
- data/rbi/telnyx/models/whatsapp_message_template_retrieve_response.rbi +33 -0
- data/rbi/telnyx/models/whatsapp_message_template_update_params.rbi +1178 -0
- data/rbi/telnyx/models/whatsapp_message_template_update_response.rbi +33 -0
- data/rbi/telnyx/models/whatsapp_template_data.rbi +10 -2
- data/rbi/telnyx/models/x402/{credit_account_create_payment_quote_params.rbi → credit_account_create_quote_params.rbi} +2 -2
- data/rbi/telnyx/models/x402/{credit_account_create_payment_quote_response.rbi → credit_account_create_quote_response.rbi} +41 -42
- data/rbi/telnyx/models/x402/{credit_account_settle_payment_params.rbi → credit_account_settle_params.rbi} +2 -2
- data/rbi/telnyx/models/x402/{credit_account_settle_payment_response.rbi → credit_account_settle_response.rbi} +21 -26
- data/rbi/telnyx/models.rbi +29 -3
- data/rbi/telnyx/resources/ai/assistants/tags.rbi +13 -13
- data/rbi/telnyx/resources/calls/actions.rbi +4 -3
- data/rbi/telnyx/resources/voice_clones.rbi +36 -25
- data/rbi/telnyx/resources/voice_designs.rbi +21 -17
- data/rbi/telnyx/resources/webhooks.rbi +12 -2
- data/rbi/telnyx/resources/whatsapp/business_accounts/phone_numbers.rbi +2 -2
- data/rbi/telnyx/resources/whatsapp/phone_numbers/profile.rbi +0 -5
- data/rbi/telnyx/resources/whatsapp/templates.rbi +85 -0
- data/rbi/telnyx/resources/whatsapp.rbi +2 -2
- data/rbi/telnyx/resources/whatsapp_message_templates.rbi +67 -0
- data/rbi/telnyx/resources/x402/credit_account.rbi +4 -6
- data/sig/telnyx/client.rbs +4 -2
- data/sig/telnyx/models/ai/assistants/{tag_delete_params.rbs → tag_add_params.rbs} +2 -2
- data/sig/telnyx/models/ai/assistants/{tag_delete_response.rbs → tag_add_response.rbs} +2 -2
- data/sig/telnyx/models/ai/assistants/{tag_create_params.rbs → tag_remove_params.rbs} +2 -2
- data/sig/telnyx/models/ai/assistants/{tag_create_response.rbs → tag_remove_response.rbs} +2 -2
- data/sig/telnyx/models/call_cost_webhook_event.rbs +235 -0
- data/sig/telnyx/models/calls/action_start_noise_suppression_params.rbs +124 -4
- data/sig/telnyx/models/unsafe_unwrap_webhook_event.rbs +1 -0
- data/sig/telnyx/models/unwrap_webhook_event.rbs +1 -0
- data/sig/telnyx/models/voice_clone_create_from_design_params.rbs +23 -1
- data/sig/telnyx/models/voice_clone_create_from_upload_params.rbs +22 -0
- data/sig/telnyx/models/voice_clone_create_params.rbs +75 -0
- data/sig/telnyx/models/voice_clone_create_response.rbs +15 -0
- data/sig/telnyx/models/voice_clone_data.rbs +34 -0
- data/sig/telnyx/models/voice_clone_list_params.rbs +22 -0
- data/sig/telnyx/models/voice_design_create_params.rbs +22 -0
- data/sig/telnyx/models/voice_design_data.rbs +30 -0
- data/sig/telnyx/models/voice_design_list_response.rbs +25 -0
- data/sig/telnyx/models/{voice_design_update_params.rbs → voice_design_rename_params.rbs} +2 -2
- data/sig/telnyx/models/voice_design_rename_response.rbs +104 -0
- data/sig/telnyx/models/whatsapp/business_accounts/{phone_number_create_verification_params.rbs → phone_number_initialize_verification_params.rbs} +9 -9
- data/sig/telnyx/models/whatsapp/template_create_params.rbs +479 -0
- data/sig/telnyx/models/whatsapp/{message_template_update_response.rbs → template_create_response.rbs} +2 -3
- data/sig/telnyx/models/whatsapp/{message_template_list_params.rbs → template_list_params.rbs} +9 -9
- data/sig/telnyx/models/whatsapp_message_template_delete_params.rbs +20 -0
- data/sig/telnyx/models/whatsapp_message_template_retrieve_params.rbs +20 -0
- data/sig/telnyx/models/whatsapp_message_template_retrieve_response.rbs +16 -0
- data/sig/telnyx/models/whatsapp_message_template_update_params.rbs +473 -0
- data/sig/telnyx/models/whatsapp_message_template_update_response.rbs +16 -0
- data/sig/telnyx/models/x402/{credit_account_create_payment_quote_params.rbs → credit_account_create_quote_params.rbs} +2 -2
- data/sig/telnyx/models/x402/{credit_account_create_payment_quote_response.rbs → credit_account_create_quote_response.rbs} +46 -48
- data/sig/telnyx/models/x402/{credit_account_settle_payment_params.rbs → credit_account_settle_params.rbs} +2 -2
- data/sig/telnyx/models/x402/{credit_account_settle_payment_response.rbs → credit_account_settle_response.rbs} +22 -22
- data/sig/telnyx/models.rbs +12 -4
- data/sig/telnyx/resources/ai/assistants/tags.rbs +8 -8
- data/sig/telnyx/resources/voice_clones.rbs +11 -8
- data/sig/telnyx/resources/voice_designs.rbs +7 -6
- data/sig/telnyx/resources/webhooks.rbs +5 -1
- data/sig/telnyx/resources/whatsapp/business_accounts/phone_numbers.rbs +2 -2
- data/sig/telnyx/resources/whatsapp/phone_numbers/profile.rbs +0 -2
- data/sig/telnyx/resources/whatsapp/templates.rbs +28 -0
- data/sig/telnyx/resources/whatsapp.rbs +1 -1
- data/sig/telnyx/resources/whatsapp_message_templates.rbs +21 -0
- data/sig/telnyx/resources/x402/credit_account.rbs +4 -4
- metadata +75 -65
- data/lib/telnyx/models/whatsapp/message_template_create_params.rb +0 -58
- data/lib/telnyx/models/whatsapp/message_template_delete_params.rb +0 -22
- data/lib/telnyx/models/whatsapp/message_template_retrieve_params.rb +0 -22
- data/lib/telnyx/models/whatsapp/message_template_retrieve_response.rb +0 -18
- data/lib/telnyx/models/whatsapp/message_template_update_params.rb +0 -46
- data/lib/telnyx/models/whatsapp/message_template_update_response.rb +0 -18
- data/lib/telnyx/resources/whatsapp/message_templates.rb +0 -149
- data/lib/telnyx/resources/whatsapp/phone_numbers/profile/models.rb +0 -20
- data/rbi/telnyx/models/whatsapp/message_template_create_params.rbi +0 -115
- data/rbi/telnyx/models/whatsapp/message_template_delete_params.rbi +0 -40
- data/rbi/telnyx/models/whatsapp/message_template_retrieve_params.rbi +0 -40
- data/rbi/telnyx/models/whatsapp/message_template_retrieve_response.rbi +0 -35
- data/rbi/telnyx/models/whatsapp/message_template_update_params.rbi +0 -111
- data/rbi/telnyx/models/whatsapp/message_template_update_response.rbi +0 -35
- data/rbi/telnyx/resources/whatsapp/message_templates.rbi +0 -116
- data/rbi/telnyx/resources/whatsapp/phone_numbers/profile/models.rbi +0 -18
- data/sig/telnyx/models/voice_design_update_response.rbs +0 -79
- data/sig/telnyx/models/whatsapp/message_template_create_params.rbs +0 -60
- data/sig/telnyx/models/whatsapp/message_template_create_response.rbs +0 -20
- data/sig/telnyx/models/whatsapp/message_template_delete_params.rbs +0 -22
- data/sig/telnyx/models/whatsapp/message_template_retrieve_params.rbs +0 -22
- data/sig/telnyx/models/whatsapp/message_template_retrieve_response.rbs +0 -20
- data/sig/telnyx/models/whatsapp/message_template_update_params.rbs +0 -58
- data/sig/telnyx/resources/whatsapp/message_templates.rbs +0 -42
- data/sig/telnyx/resources/whatsapp/phone_numbers/profile/models.rbs +0 -13
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Resources
|
|
5
|
-
class Whatsapp
|
|
6
|
-
# Manage Whatsapp message templates
|
|
7
|
-
class MessageTemplates
|
|
8
|
-
# Create a Whatsapp message template
|
|
9
|
-
#
|
|
10
|
-
# @overload create(category:, components:, language:, name:, waba_id:, request_options: {})
|
|
11
|
-
#
|
|
12
|
-
# @param category [Symbol, Telnyx::Models::Whatsapp::MessageTemplateCreateParams::Category]
|
|
13
|
-
# @param components [Array<Hash{Symbol=>Object}>]
|
|
14
|
-
# @param language [String]
|
|
15
|
-
# @param name [String]
|
|
16
|
-
# @param waba_id [String]
|
|
17
|
-
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
18
|
-
#
|
|
19
|
-
# @return [Telnyx::Models::Whatsapp::MessageTemplateCreateResponse]
|
|
20
|
-
#
|
|
21
|
-
# @see Telnyx::Models::Whatsapp::MessageTemplateCreateParams
|
|
22
|
-
def create(params)
|
|
23
|
-
parsed, options = Telnyx::Whatsapp::MessageTemplateCreateParams.dump_request(params)
|
|
24
|
-
@client.request(
|
|
25
|
-
method: :post,
|
|
26
|
-
path: "v2/whatsapp/message_templates",
|
|
27
|
-
body: parsed,
|
|
28
|
-
model: Telnyx::Models::Whatsapp::MessageTemplateCreateResponse,
|
|
29
|
-
options: options
|
|
30
|
-
)
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Get a Whatsapp message template by ID
|
|
34
|
-
#
|
|
35
|
-
# @overload retrieve(id, request_options: {})
|
|
36
|
-
#
|
|
37
|
-
# @param id [String] Whatsapp message template ID
|
|
38
|
-
#
|
|
39
|
-
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
40
|
-
#
|
|
41
|
-
# @return [Telnyx::Models::Whatsapp::MessageTemplateRetrieveResponse]
|
|
42
|
-
#
|
|
43
|
-
# @see Telnyx::Models::Whatsapp::MessageTemplateRetrieveParams
|
|
44
|
-
def retrieve(id, params = {})
|
|
45
|
-
@client.request(
|
|
46
|
-
method: :get,
|
|
47
|
-
path: ["v2/whatsapp_message_templates/%1$s", id],
|
|
48
|
-
model: Telnyx::Models::Whatsapp::MessageTemplateRetrieveResponse,
|
|
49
|
-
options: params[:request_options]
|
|
50
|
-
)
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# Update a Whatsapp message template
|
|
54
|
-
#
|
|
55
|
-
# @overload update(id, category: nil, components: nil, request_options: {})
|
|
56
|
-
#
|
|
57
|
-
# @param id [String] Whatsapp message template ID
|
|
58
|
-
#
|
|
59
|
-
# @param category [Symbol, Telnyx::Models::Whatsapp::MessageTemplateUpdateParams::Category]
|
|
60
|
-
#
|
|
61
|
-
# @param components [Array<Hash{Symbol=>Object}>]
|
|
62
|
-
#
|
|
63
|
-
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
64
|
-
#
|
|
65
|
-
# @return [Telnyx::Models::Whatsapp::MessageTemplateUpdateResponse]
|
|
66
|
-
#
|
|
67
|
-
# @see Telnyx::Models::Whatsapp::MessageTemplateUpdateParams
|
|
68
|
-
def update(id, params = {})
|
|
69
|
-
parsed, options = Telnyx::Whatsapp::MessageTemplateUpdateParams.dump_request(params)
|
|
70
|
-
@client.request(
|
|
71
|
-
method: :patch,
|
|
72
|
-
path: ["v2/whatsapp_message_templates/%1$s", id],
|
|
73
|
-
body: parsed,
|
|
74
|
-
model: Telnyx::Models::Whatsapp::MessageTemplateUpdateResponse,
|
|
75
|
-
options: options
|
|
76
|
-
)
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
# List Whatsapp message templates
|
|
80
|
-
#
|
|
81
|
-
# @overload list(filter_category: nil, filter_search: nil, filter_status: nil, filter_waba_id: nil, page_number: nil, page_size: nil, request_options: {})
|
|
82
|
-
#
|
|
83
|
-
# @param filter_category [Symbol, Telnyx::Models::Whatsapp::MessageTemplateListParams::FilterCategory] Filter by category
|
|
84
|
-
#
|
|
85
|
-
# @param filter_search [String] Search templates by name
|
|
86
|
-
#
|
|
87
|
-
# @param filter_status [String] Filter by template status
|
|
88
|
-
#
|
|
89
|
-
# @param filter_waba_id [String] Filter by WABA ID
|
|
90
|
-
#
|
|
91
|
-
# @param page_number [Integer]
|
|
92
|
-
#
|
|
93
|
-
# @param page_size [Integer]
|
|
94
|
-
#
|
|
95
|
-
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
96
|
-
#
|
|
97
|
-
# @return [Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::WhatsappTemplateData>]
|
|
98
|
-
#
|
|
99
|
-
# @see Telnyx::Models::Whatsapp::MessageTemplateListParams
|
|
100
|
-
def list(params = {})
|
|
101
|
-
parsed, options = Telnyx::Whatsapp::MessageTemplateListParams.dump_request(params)
|
|
102
|
-
query = Telnyx::Internal::Util.encode_query_params(parsed)
|
|
103
|
-
@client.request(
|
|
104
|
-
method: :get,
|
|
105
|
-
path: "v2/whatsapp/message_templates",
|
|
106
|
-
query: query.transform_keys(
|
|
107
|
-
filter_category: "filter[category]",
|
|
108
|
-
filter_search: "filter[search]",
|
|
109
|
-
filter_status: "filter[status]",
|
|
110
|
-
filter_waba_id: "filter[waba_id]",
|
|
111
|
-
page_number: "page[number]",
|
|
112
|
-
page_size: "page[size]"
|
|
113
|
-
),
|
|
114
|
-
page: Telnyx::Internal::DefaultFlatPagination,
|
|
115
|
-
model: Telnyx::WhatsappTemplateData,
|
|
116
|
-
options: options
|
|
117
|
-
)
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
# Delete a Whatsapp message template
|
|
121
|
-
#
|
|
122
|
-
# @overload delete(id, request_options: {})
|
|
123
|
-
#
|
|
124
|
-
# @param id [String] Whatsapp message template ID
|
|
125
|
-
#
|
|
126
|
-
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
127
|
-
#
|
|
128
|
-
# @return [nil]
|
|
129
|
-
#
|
|
130
|
-
# @see Telnyx::Models::Whatsapp::MessageTemplateDeleteParams
|
|
131
|
-
def delete(id, params = {})
|
|
132
|
-
@client.request(
|
|
133
|
-
method: :delete,
|
|
134
|
-
path: ["v2/whatsapp_message_templates/%1$s", id],
|
|
135
|
-
model: NilClass,
|
|
136
|
-
options: params[:request_options]
|
|
137
|
-
)
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
# @api private
|
|
141
|
-
#
|
|
142
|
-
# @param client [Telnyx::Client]
|
|
143
|
-
def initialize(client:)
|
|
144
|
-
@client = client
|
|
145
|
-
end
|
|
146
|
-
end
|
|
147
|
-
end
|
|
148
|
-
end
|
|
149
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Resources
|
|
5
|
-
class Whatsapp
|
|
6
|
-
class PhoneNumbers
|
|
7
|
-
class Profile
|
|
8
|
-
class Models
|
|
9
|
-
# @api private
|
|
10
|
-
#
|
|
11
|
-
# @param client [Telnyx::Client]
|
|
12
|
-
def initialize(client:)
|
|
13
|
-
@client = client
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Models
|
|
5
|
-
module Whatsapp
|
|
6
|
-
class MessageTemplateCreateParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
-
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Telnyx::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
OrHash =
|
|
11
|
-
T.type_alias do
|
|
12
|
-
T.any(
|
|
13
|
-
Telnyx::Whatsapp::MessageTemplateCreateParams,
|
|
14
|
-
Telnyx::Internal::AnyHash
|
|
15
|
-
)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
sig do
|
|
19
|
-
returns(
|
|
20
|
-
Telnyx::Whatsapp::MessageTemplateCreateParams::Category::OrSymbol
|
|
21
|
-
)
|
|
22
|
-
end
|
|
23
|
-
attr_accessor :category
|
|
24
|
-
|
|
25
|
-
sig { returns(T::Array[T::Hash[Symbol, T.anything]]) }
|
|
26
|
-
attr_accessor :components
|
|
27
|
-
|
|
28
|
-
sig { returns(String) }
|
|
29
|
-
attr_accessor :language
|
|
30
|
-
|
|
31
|
-
sig { returns(String) }
|
|
32
|
-
attr_accessor :name
|
|
33
|
-
|
|
34
|
-
sig { returns(String) }
|
|
35
|
-
attr_accessor :waba_id
|
|
36
|
-
|
|
37
|
-
sig do
|
|
38
|
-
params(
|
|
39
|
-
category:
|
|
40
|
-
Telnyx::Whatsapp::MessageTemplateCreateParams::Category::OrSymbol,
|
|
41
|
-
components: T::Array[T::Hash[Symbol, T.anything]],
|
|
42
|
-
language: String,
|
|
43
|
-
name: String,
|
|
44
|
-
waba_id: String,
|
|
45
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
46
|
-
).returns(T.attached_class)
|
|
47
|
-
end
|
|
48
|
-
def self.new(
|
|
49
|
-
category:,
|
|
50
|
-
components:,
|
|
51
|
-
language:,
|
|
52
|
-
name:,
|
|
53
|
-
waba_id:,
|
|
54
|
-
request_options: {}
|
|
55
|
-
)
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
sig do
|
|
59
|
-
override.returns(
|
|
60
|
-
{
|
|
61
|
-
category:
|
|
62
|
-
Telnyx::Whatsapp::MessageTemplateCreateParams::Category::OrSymbol,
|
|
63
|
-
components: T::Array[T::Hash[Symbol, T.anything]],
|
|
64
|
-
language: String,
|
|
65
|
-
name: String,
|
|
66
|
-
waba_id: String,
|
|
67
|
-
request_options: Telnyx::RequestOptions
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
end
|
|
71
|
-
def to_hash
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
module Category
|
|
75
|
-
extend Telnyx::Internal::Type::Enum
|
|
76
|
-
|
|
77
|
-
TaggedSymbol =
|
|
78
|
-
T.type_alias do
|
|
79
|
-
T.all(
|
|
80
|
-
Symbol,
|
|
81
|
-
Telnyx::Whatsapp::MessageTemplateCreateParams::Category
|
|
82
|
-
)
|
|
83
|
-
end
|
|
84
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
85
|
-
|
|
86
|
-
MARKETING =
|
|
87
|
-
T.let(
|
|
88
|
-
:MARKETING,
|
|
89
|
-
Telnyx::Whatsapp::MessageTemplateCreateParams::Category::TaggedSymbol
|
|
90
|
-
)
|
|
91
|
-
UTILITY =
|
|
92
|
-
T.let(
|
|
93
|
-
:UTILITY,
|
|
94
|
-
Telnyx::Whatsapp::MessageTemplateCreateParams::Category::TaggedSymbol
|
|
95
|
-
)
|
|
96
|
-
AUTHENTICATION =
|
|
97
|
-
T.let(
|
|
98
|
-
:AUTHENTICATION,
|
|
99
|
-
Telnyx::Whatsapp::MessageTemplateCreateParams::Category::TaggedSymbol
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
sig do
|
|
103
|
-
override.returns(
|
|
104
|
-
T::Array[
|
|
105
|
-
Telnyx::Whatsapp::MessageTemplateCreateParams::Category::TaggedSymbol
|
|
106
|
-
]
|
|
107
|
-
)
|
|
108
|
-
end
|
|
109
|
-
def self.values
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
end
|
|
115
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Models
|
|
5
|
-
module Whatsapp
|
|
6
|
-
class MessageTemplateDeleteParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
-
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Telnyx::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
OrHash =
|
|
11
|
-
T.type_alias do
|
|
12
|
-
T.any(
|
|
13
|
-
Telnyx::Whatsapp::MessageTemplateDeleteParams,
|
|
14
|
-
Telnyx::Internal::AnyHash
|
|
15
|
-
)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
sig { returns(String) }
|
|
19
|
-
attr_accessor :id
|
|
20
|
-
|
|
21
|
-
sig do
|
|
22
|
-
params(
|
|
23
|
-
id: String,
|
|
24
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
25
|
-
).returns(T.attached_class)
|
|
26
|
-
end
|
|
27
|
-
def self.new(id:, request_options: {})
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
sig do
|
|
31
|
-
override.returns(
|
|
32
|
-
{ id: String, request_options: Telnyx::RequestOptions }
|
|
33
|
-
)
|
|
34
|
-
end
|
|
35
|
-
def to_hash
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Models
|
|
5
|
-
module Whatsapp
|
|
6
|
-
class MessageTemplateRetrieveParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
-
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Telnyx::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
OrHash =
|
|
11
|
-
T.type_alias do
|
|
12
|
-
T.any(
|
|
13
|
-
Telnyx::Whatsapp::MessageTemplateRetrieveParams,
|
|
14
|
-
Telnyx::Internal::AnyHash
|
|
15
|
-
)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
sig { returns(String) }
|
|
19
|
-
attr_accessor :id
|
|
20
|
-
|
|
21
|
-
sig do
|
|
22
|
-
params(
|
|
23
|
-
id: String,
|
|
24
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
25
|
-
).returns(T.attached_class)
|
|
26
|
-
end
|
|
27
|
-
def self.new(id:, request_options: {})
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
sig do
|
|
31
|
-
override.returns(
|
|
32
|
-
{ id: String, request_options: Telnyx::RequestOptions }
|
|
33
|
-
)
|
|
34
|
-
end
|
|
35
|
-
def to_hash
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Models
|
|
5
|
-
module Whatsapp
|
|
6
|
-
class MessageTemplateRetrieveResponse < Telnyx::Internal::Type::BaseModel
|
|
7
|
-
OrHash =
|
|
8
|
-
T.type_alias do
|
|
9
|
-
T.any(
|
|
10
|
-
Telnyx::Models::Whatsapp::MessageTemplateRetrieveResponse,
|
|
11
|
-
Telnyx::Internal::AnyHash
|
|
12
|
-
)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
sig { returns(T.nilable(Telnyx::WhatsappTemplateData)) }
|
|
16
|
-
attr_reader :data
|
|
17
|
-
|
|
18
|
-
sig { params(data: Telnyx::WhatsappTemplateData::OrHash).void }
|
|
19
|
-
attr_writer :data
|
|
20
|
-
|
|
21
|
-
sig do
|
|
22
|
-
params(data: Telnyx::WhatsappTemplateData::OrHash).returns(
|
|
23
|
-
T.attached_class
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
def self.new(data: nil)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
sig { override.returns({ data: Telnyx::WhatsappTemplateData }) }
|
|
30
|
-
def to_hash
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Models
|
|
5
|
-
module Whatsapp
|
|
6
|
-
class MessageTemplateUpdateParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
-
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Telnyx::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
OrHash =
|
|
11
|
-
T.type_alias do
|
|
12
|
-
T.any(
|
|
13
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams,
|
|
14
|
-
Telnyx::Internal::AnyHash
|
|
15
|
-
)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
sig { returns(String) }
|
|
19
|
-
attr_accessor :id
|
|
20
|
-
|
|
21
|
-
sig do
|
|
22
|
-
returns(
|
|
23
|
-
T.nilable(
|
|
24
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams::Category::OrSymbol
|
|
25
|
-
)
|
|
26
|
-
)
|
|
27
|
-
end
|
|
28
|
-
attr_reader :category
|
|
29
|
-
|
|
30
|
-
sig do
|
|
31
|
-
params(
|
|
32
|
-
category:
|
|
33
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams::Category::OrSymbol
|
|
34
|
-
).void
|
|
35
|
-
end
|
|
36
|
-
attr_writer :category
|
|
37
|
-
|
|
38
|
-
sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) }
|
|
39
|
-
attr_reader :components
|
|
40
|
-
|
|
41
|
-
sig { params(components: T::Array[T::Hash[Symbol, T.anything]]).void }
|
|
42
|
-
attr_writer :components
|
|
43
|
-
|
|
44
|
-
sig do
|
|
45
|
-
params(
|
|
46
|
-
id: String,
|
|
47
|
-
category:
|
|
48
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams::Category::OrSymbol,
|
|
49
|
-
components: T::Array[T::Hash[Symbol, T.anything]],
|
|
50
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
51
|
-
).returns(T.attached_class)
|
|
52
|
-
end
|
|
53
|
-
def self.new(id:, category: nil, components: nil, request_options: {})
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
sig do
|
|
57
|
-
override.returns(
|
|
58
|
-
{
|
|
59
|
-
id: String,
|
|
60
|
-
category:
|
|
61
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams::Category::OrSymbol,
|
|
62
|
-
components: T::Array[T::Hash[Symbol, T.anything]],
|
|
63
|
-
request_options: Telnyx::RequestOptions
|
|
64
|
-
}
|
|
65
|
-
)
|
|
66
|
-
end
|
|
67
|
-
def to_hash
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
module Category
|
|
71
|
-
extend Telnyx::Internal::Type::Enum
|
|
72
|
-
|
|
73
|
-
TaggedSymbol =
|
|
74
|
-
T.type_alias do
|
|
75
|
-
T.all(
|
|
76
|
-
Symbol,
|
|
77
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams::Category
|
|
78
|
-
)
|
|
79
|
-
end
|
|
80
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
81
|
-
|
|
82
|
-
MARKETING =
|
|
83
|
-
T.let(
|
|
84
|
-
:MARKETING,
|
|
85
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams::Category::TaggedSymbol
|
|
86
|
-
)
|
|
87
|
-
UTILITY =
|
|
88
|
-
T.let(
|
|
89
|
-
:UTILITY,
|
|
90
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams::Category::TaggedSymbol
|
|
91
|
-
)
|
|
92
|
-
AUTHENTICATION =
|
|
93
|
-
T.let(
|
|
94
|
-
:AUTHENTICATION,
|
|
95
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams::Category::TaggedSymbol
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
sig do
|
|
99
|
-
override.returns(
|
|
100
|
-
T::Array[
|
|
101
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams::Category::TaggedSymbol
|
|
102
|
-
]
|
|
103
|
-
)
|
|
104
|
-
end
|
|
105
|
-
def self.values
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
end
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Models
|
|
5
|
-
module Whatsapp
|
|
6
|
-
class MessageTemplateUpdateResponse < Telnyx::Internal::Type::BaseModel
|
|
7
|
-
OrHash =
|
|
8
|
-
T.type_alias do
|
|
9
|
-
T.any(
|
|
10
|
-
Telnyx::Models::Whatsapp::MessageTemplateUpdateResponse,
|
|
11
|
-
Telnyx::Internal::AnyHash
|
|
12
|
-
)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
sig { returns(T.nilable(Telnyx::WhatsappTemplateData)) }
|
|
16
|
-
attr_reader :data
|
|
17
|
-
|
|
18
|
-
sig { params(data: Telnyx::WhatsappTemplateData::OrHash).void }
|
|
19
|
-
attr_writer :data
|
|
20
|
-
|
|
21
|
-
sig do
|
|
22
|
-
params(data: Telnyx::WhatsappTemplateData::OrHash).returns(
|
|
23
|
-
T.attached_class
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
def self.new(data: nil)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
sig { override.returns({ data: Telnyx::WhatsappTemplateData }) }
|
|
30
|
-
def to_hash
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Resources
|
|
5
|
-
class Whatsapp
|
|
6
|
-
# Manage Whatsapp message templates
|
|
7
|
-
class MessageTemplates
|
|
8
|
-
# Create a Whatsapp message template
|
|
9
|
-
sig do
|
|
10
|
-
params(
|
|
11
|
-
category:
|
|
12
|
-
Telnyx::Whatsapp::MessageTemplateCreateParams::Category::OrSymbol,
|
|
13
|
-
components: T::Array[T::Hash[Symbol, T.anything]],
|
|
14
|
-
language: String,
|
|
15
|
-
name: String,
|
|
16
|
-
waba_id: String,
|
|
17
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
18
|
-
).returns(Telnyx::Models::Whatsapp::MessageTemplateCreateResponse)
|
|
19
|
-
end
|
|
20
|
-
def create(
|
|
21
|
-
category:,
|
|
22
|
-
components:,
|
|
23
|
-
language:,
|
|
24
|
-
name:,
|
|
25
|
-
waba_id:,
|
|
26
|
-
request_options: {}
|
|
27
|
-
)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Get a Whatsapp message template by ID
|
|
31
|
-
sig do
|
|
32
|
-
params(
|
|
33
|
-
id: String,
|
|
34
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
35
|
-
).returns(Telnyx::Models::Whatsapp::MessageTemplateRetrieveResponse)
|
|
36
|
-
end
|
|
37
|
-
def retrieve(
|
|
38
|
-
# Whatsapp message template ID
|
|
39
|
-
id,
|
|
40
|
-
request_options: {}
|
|
41
|
-
)
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# Update a Whatsapp message template
|
|
45
|
-
sig do
|
|
46
|
-
params(
|
|
47
|
-
id: String,
|
|
48
|
-
category:
|
|
49
|
-
Telnyx::Whatsapp::MessageTemplateUpdateParams::Category::OrSymbol,
|
|
50
|
-
components: T::Array[T::Hash[Symbol, T.anything]],
|
|
51
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
52
|
-
).returns(Telnyx::Models::Whatsapp::MessageTemplateUpdateResponse)
|
|
53
|
-
end
|
|
54
|
-
def update(
|
|
55
|
-
# Whatsapp message template ID
|
|
56
|
-
id,
|
|
57
|
-
category: nil,
|
|
58
|
-
components: nil,
|
|
59
|
-
request_options: {}
|
|
60
|
-
)
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
# List Whatsapp message templates
|
|
64
|
-
sig do
|
|
65
|
-
params(
|
|
66
|
-
filter_category:
|
|
67
|
-
Telnyx::Whatsapp::MessageTemplateListParams::FilterCategory::OrSymbol,
|
|
68
|
-
filter_search: String,
|
|
69
|
-
filter_status: String,
|
|
70
|
-
filter_waba_id: String,
|
|
71
|
-
page_number: Integer,
|
|
72
|
-
page_size: Integer,
|
|
73
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
74
|
-
).returns(
|
|
75
|
-
Telnyx::Internal::DefaultFlatPagination[
|
|
76
|
-
Telnyx::WhatsappTemplateData
|
|
77
|
-
]
|
|
78
|
-
)
|
|
79
|
-
end
|
|
80
|
-
def list(
|
|
81
|
-
# Filter by category
|
|
82
|
-
filter_category: nil,
|
|
83
|
-
# Search templates by name
|
|
84
|
-
filter_search: nil,
|
|
85
|
-
# Filter by template status
|
|
86
|
-
filter_status: nil,
|
|
87
|
-
# Filter by WABA ID
|
|
88
|
-
filter_waba_id: nil,
|
|
89
|
-
page_number: nil,
|
|
90
|
-
page_size: nil,
|
|
91
|
-
request_options: {}
|
|
92
|
-
)
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# Delete a Whatsapp message template
|
|
96
|
-
sig do
|
|
97
|
-
params(
|
|
98
|
-
id: String,
|
|
99
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
100
|
-
).void
|
|
101
|
-
end
|
|
102
|
-
def delete(
|
|
103
|
-
# Whatsapp message template ID
|
|
104
|
-
id,
|
|
105
|
-
request_options: {}
|
|
106
|
-
)
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
# @api private
|
|
110
|
-
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
111
|
-
def self.new(client:)
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Resources
|
|
5
|
-
class Whatsapp
|
|
6
|
-
class PhoneNumbers
|
|
7
|
-
class Profile
|
|
8
|
-
class Models
|
|
9
|
-
# @api private
|
|
10
|
-
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
11
|
-
def self.new(client:)
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|