wavix-ruby-sdk 1.1.1 → 1.4.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/.fern/metadata.json +5 -4
- data/.fern/replay.lock +7 -1
- data/.fernignore +1 -0
- data/lib/wavix/call_control/streams/client.rb +3 -3
- data/lib/wavix/call_webhooks/client.rb +13 -0
- data/lib/wavix/call_webhooks/types/call_webhooks_create_request.rb +2 -0
- data/lib/wavix/call_webhooks/types/delete_call_webhooks_request.rb +2 -0
- data/lib/wavix/cdrs/client.rb +2 -1
- data/lib/wavix/client.rb +1 -1
- data/lib/wavix/numbers/client.rb +7 -0
- data/lib/wavix/numbers/types/number_update_request.rb +2 -0
- data/lib/wavix/sip_trunks/client.rb +9 -7
- data/lib/wavix/sip_trunks/types/sip_trunk_create_request.rb +53 -0
- data/lib/wavix/sip_trunks/types/sip_trunk_create_request_allowed_ips_item.rb +11 -0
- data/lib/wavix/sip_trunks/types/sip_trunk_create_request_host_request.rb +13 -0
- data/lib/wavix/sip_trunks/types/sip_trunk_update_request.rb +55 -0
- data/lib/wavix/sip_trunks/types/sip_trunk_update_request_allowed_ips_item.rb +11 -0
- data/lib/wavix/sip_trunks/types/sip_trunk_update_request_host_request.rb +14 -0
- data/lib/wavix/sub_accounts/client.rb +1 -1
- data/lib/wavix/types/webhook_in_use_error_response.rb +14 -0
- data/lib/wavix/types/whats_app_business_account.rb +16 -0
- data/lib/wavix/types/whats_app_business_account_messaging_limit.rb +15 -0
- data/lib/wavix/types/whats_app_message.rb +2 -1
- data/lib/wavix/types/whats_app_message_get_response.rb +1 -0
- data/lib/wavix/types/whats_app_message_list_item.rb +3 -1
- data/lib/wavix/types/whats_app_message_list_item_status.rb +0 -1
- data/lib/wavix/types/whats_app_message_list_response.rb +1 -0
- data/lib/wavix/types/whats_app_message_send_request.rb +4 -1
- data/lib/wavix/types/whats_app_message_send_response.rb +1 -0
- data/lib/wavix/types/whats_app_message_status.rb +0 -1
- data/lib/wavix/types/whats_app_message_template.rb +3 -3
- data/lib/wavix/types/whats_app_problem.rb +2 -1
- data/lib/wavix/types/{whats_app_message_send_request_template.rb → whats_app_send_template.rb} +4 -3
- data/lib/wavix/types/whats_app_send_template_button.rb +27 -0
- data/lib/wavix/types/whats_app_send_template_button_type.rb +18 -0
- data/lib/wavix/types/{whats_app_message_send_request_template_header.rb → whats_app_send_template_header.rb} +7 -5
- data/lib/wavix/types/whats_app_send_template_header_type.rb +16 -0
- data/lib/wavix/types/whats_app_sender.rb +5 -3
- data/lib/wavix/types/whats_app_sender_list_response.rb +12 -0
- data/lib/wavix/types/whats_app_template.rb +6 -2
- data/lib/wavix/types/whats_app_template_body_component_request.rb +12 -0
- data/lib/wavix/types/whats_app_template_body_component_request_example.rb +10 -0
- data/lib/wavix/types/whats_app_template_button_request.rb +21 -0
- data/lib/wavix/types/whats_app_template_buttons_component_request.rb +10 -0
- data/lib/wavix/types/whats_app_template_component_request.rb +21 -0
- data/lib/wavix/types/whats_app_template_copy_code_button_request.rb +10 -0
- data/lib/wavix/types/whats_app_template_create_request.rb +6 -1
- data/lib/wavix/types/whats_app_template_footer_component_request.rb +10 -0
- data/lib/wavix/types/whats_app_template_header_component_request.rb +23 -0
- data/lib/wavix/types/whats_app_template_location_header_component_request.rb +11 -0
- data/lib/wavix/types/whats_app_template_location_header_component_request_type.rb +11 -0
- data/lib/wavix/types/whats_app_template_media_header_component_request.rb +12 -0
- data/lib/wavix/types/whats_app_template_media_header_component_request_example.rb +10 -0
- data/lib/wavix/types/whats_app_template_media_header_component_request_type.rb +11 -0
- data/lib/wavix/types/whats_app_template_page_response.rb +12 -0
- data/lib/wavix/types/whats_app_template_phone_number_button_request.rb +12 -0
- data/lib/wavix/types/whats_app_template_quick_reply_button_request.rb +10 -0
- data/lib/wavix/types/whats_app_template_response.rb +1 -0
- data/lib/wavix/types/whats_app_template_response_component.rb +20 -0
- data/lib/wavix/types/whats_app_template_response_component_format.rb +15 -0
- data/lib/wavix/types/whats_app_template_text_header_component_request.rb +14 -0
- data/lib/wavix/types/whats_app_template_text_header_component_request_example.rb +10 -0
- data/lib/wavix/types/whats_app_template_text_header_component_request_type.rb +11 -0
- data/lib/wavix/types/whats_app_template_url_button_request.rb +14 -0
- data/lib/wavix/types/whats_app_waba.rb +12 -0
- data/lib/wavix/types/whats_app_waba_list_response.rb +12 -0
- data/lib/wavix/version.rb +1 -1
- data/lib/wavix.rb +42 -17
- data/reference.md +401 -29
- metadata +41 -16
- data/lib/wavix/sip_trunks/types/update_sip_trunks_request.rb +0 -13
- data/lib/wavix/types/sip_trunk_create_request.rb +0 -51
- data/lib/wavix/types/sip_trunk_create_request_allowed_ips_item.rb +0 -9
- data/lib/wavix/types/sip_trunk_create_request_host_request.rb +0 -11
- data/lib/wavix/types/whats_app_message_send_request_template_buttons_item.rb +0 -9
- data/lib/wavix/types/whats_app_message_send_request_template_buttons_item_type.rb +0 -18
- data/lib/wavix/types/whats_app_message_send_request_template_header_type.rb +0 -16
- data/lib/wavix/types/whats_app_sender_message_tier.rb +0 -16
- data/lib/wavix/types/whats_app_template_component.rb +0 -18
- data/lib/wavix/types/whats_app_template_component_format.rb +0 -15
- data/lib/wavix/types/whats_app_template_component_type.rb +0 -14
- data/lib/wavix/types/whats_app_template_list_response.rb +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d1b4158e5df5671f98f8ed2d24155a900022d7205b27a7df6c21b867d8c9077c
|
|
4
|
+
data.tar.gz: 8b19d60c85b8faa5d9b9a3ced7d5dc304b7a1231e2c6f5336bb86b7e31fa547b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b57b7410186895113d64dca272c4d9049ea57123324572fa6ff5da635f96d0603560d3321c6167717b672a751d9bcb8d494e150a4916f2271dce254fc02be2e8
|
|
7
|
+
data.tar.gz: 9ef8448161ea8b073793bbd11628873a38066be0036bd1e7351191445f7152fffff582391afada48c4641daf8960692fb328f14be3dc753d37ac3c447e6db4b6
|
data/.fern/metadata.json
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
"cliVersion": "5.45.3",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
4
|
"generatorVersion": "1.13.1",
|
|
5
|
-
"originGitCommit": "
|
|
5
|
+
"originGitCommit": "e0d4d73c3ae45a88f9edafbfa9bf22d469aaf8c3",
|
|
6
6
|
"originGitCommitIsDirty": false,
|
|
7
|
-
"invokedBy": "
|
|
8
|
-
"requestedVersion": "1.
|
|
9
|
-
"
|
|
7
|
+
"invokedBy": "ci",
|
|
8
|
+
"requestedVersion": "1.4.0",
|
|
9
|
+
"ciProvider": "github",
|
|
10
|
+
"sdkVersion": "1.4.0"
|
|
10
11
|
}
|
data/.fern/replay.lock
CHANGED
|
@@ -12,5 +12,11 @@ generations:
|
|
|
12
12
|
cli_version: unknown
|
|
13
13
|
generator_versions:
|
|
14
14
|
fernapi/fern-ruby-sdk: 1.13.1
|
|
15
|
-
|
|
15
|
+
- commit_sha: 48c5e27eb6bcdc01947c56e1ccaada7d6a9d8edd
|
|
16
|
+
tree_hash: 07bed05f8ca839b0c209f3ffa79e7304c063c452
|
|
17
|
+
timestamp: 2026-11-04T04:39:51.814Z
|
|
18
|
+
cli_version: unknown
|
|
19
|
+
generator_versions:
|
|
20
|
+
fernapi/fern-ruby-sdk: 1.13.1
|
|
21
|
+
current_generation: 48c5e27eb6bcdc01947c56e1ccaada7d6a9d8edd
|
|
16
22
|
patches: []
|
data/.fernignore
CHANGED
|
@@ -11,9 +11,9 @@ module Wavix
|
|
|
11
11
|
@client = client
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Starts streaming the audio of the call identified by `call_id` to
|
|
15
|
-
# direction (`stream_type`) and channel (`stream_channel`) you configure. The
|
|
16
|
-
#
|
|
14
|
+
# Starts streaming the audio of the call identified by `call_id` to the WebSocket destination in `stream_url`,
|
|
15
|
+
# in the direction (`stream_type`) and channel (`stream_channel`) you configure. The streamed audio can include
|
|
16
|
+
# the remote party's voice.
|
|
17
17
|
#
|
|
18
18
|
# @param request_options [Hash]
|
|
19
19
|
# @param params [Wavix::CallControl::Streams::Types::CallStreamCreateRequest]
|
|
@@ -47,6 +47,11 @@ module Wavix
|
|
|
47
47
|
# event occurs. Creates persistent configuration that forwards call metadata to the URL on every matching call
|
|
48
48
|
# until the webhook is deleted.
|
|
49
49
|
#
|
|
50
|
+
# **Behavior:** Without `expected_url`, the webhook is set to `url` whatever it was before. With `expected_url`,
|
|
51
|
+
# the webhook is set only while it currently has that URL; an empty string matches an unset webhook. Otherwise the
|
|
52
|
+
# call returns `409` and the webhook is unchanged. Setting the URL the webhook already has succeeds. If the call
|
|
53
|
+
# returns a `Something went wrong` error, the webhook is unchanged and you can retry the request.
|
|
54
|
+
#
|
|
50
55
|
# @param request_options [Hash]
|
|
51
56
|
# @param params [Wavix::CallWebhooks::Types::CallWebhooksCreateRequest]
|
|
52
57
|
# @option request_options [String] :base_url
|
|
@@ -81,6 +86,12 @@ module Wavix
|
|
|
81
86
|
|
|
82
87
|
# Removes the call webhook for the given event type. Wavix stops sending callbacks for that event.
|
|
83
88
|
#
|
|
89
|
+
# **Behavior:** Without `expected_url`, the webhook is cleared whatever URL it has. With `expected_url`, the
|
|
90
|
+
# webhook is cleared only while it currently has that URL; an empty value matches an unset webhook. Otherwise the
|
|
91
|
+
# call returns `409` and the webhook is unchanged. Clearing an unset webhook succeeds. Percent-encode the
|
|
92
|
+
# `expected_url` value in the query string. If the call returns a `Something went wrong` error, the webhook is
|
|
93
|
+
# unchanged and you can retry the request.
|
|
94
|
+
#
|
|
84
95
|
# @param request_options [Hash]
|
|
85
96
|
# @param params [Hash]
|
|
86
97
|
# @option request_options [String] :base_url
|
|
@@ -89,12 +100,14 @@ module Wavix
|
|
|
89
100
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
90
101
|
# @option request_options [Integer] :timeout_in_seconds
|
|
91
102
|
# @option params [Wavix::CallWebhooks::Types::DeleteCallWebhooksRequestEventType] :event_type
|
|
103
|
+
# @option params [String, nil] :expected_url
|
|
92
104
|
#
|
|
93
105
|
# @return [Wavix::Types::SuccessResponse]
|
|
94
106
|
def delete(request_options: {}, **params)
|
|
95
107
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
96
108
|
query_params = {}
|
|
97
109
|
query_params["event_type"] = params[:event_type] if params.key?(:event_type)
|
|
110
|
+
query_params["expected_url"] = params[:expected_url] if params.key?(:expected_url)
|
|
98
111
|
|
|
99
112
|
request = Wavix::Internal::JSON::Request.new(
|
|
100
113
|
base_url: request_options[:base_url],
|
|
@@ -7,6 +7,8 @@ module Wavix
|
|
|
7
7
|
field :url, -> { String }, optional: false, nullable: false
|
|
8
8
|
|
|
9
9
|
field :event_type, -> { Wavix::CallWebhooks::Types::CallWebhooksCreateRequestEventType }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :expected_url, -> { String }, optional: true, nullable: false
|
|
10
12
|
end
|
|
11
13
|
end
|
|
12
14
|
end
|
|
@@ -5,6 +5,8 @@ module Wavix
|
|
|
5
5
|
module Types
|
|
6
6
|
class DeleteCallWebhooksRequest < Internal::Types::Model
|
|
7
7
|
field :event_type, -> { Wavix::CallWebhooks::Types::DeleteCallWebhooksRequestEventType }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :expected_url, -> { String }, optional: true, nullable: false
|
|
8
10
|
end
|
|
9
11
|
end
|
|
10
12
|
end
|
data/lib/wavix/cdrs/client.rb
CHANGED
|
@@ -102,7 +102,8 @@ module Wavix
|
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
# Transcribes the recording of the call identified by `call_id`. Transcription is asynchronous; poll the
|
|
105
|
-
# transcription endpoint for the result.
|
|
105
|
+
# transcription endpoint for the result. When it completes, the new transcription replaces any earlier one that
|
|
106
|
+
# the transcription endpoints return. Billed per minute at the account's call-transcription rate; fails with an
|
|
106
107
|
# insufficient-funds error when the balance cannot cover it.
|
|
107
108
|
#
|
|
108
109
|
# @param request_options [Hash]
|
data/lib/wavix/client.rb
CHANGED
|
@@ -11,7 +11,7 @@ module Wavix
|
|
|
11
11
|
@raw_client = Wavix::Internal::Http::RawClient.new(
|
|
12
12
|
base_url: base_url || Wavix::Environment::DEFAULT,
|
|
13
13
|
headers: {
|
|
14
|
-
"User-Agent" => "wavix-ruby-sdk/1.
|
|
14
|
+
"User-Agent" => "wavix-ruby-sdk/1.4.0",
|
|
15
15
|
"X-Fern-Language" => "Ruby",
|
|
16
16
|
Authorization: "Bearer #{token}"
|
|
17
17
|
},
|
data/lib/wavix/numbers/client.rb
CHANGED
|
@@ -170,6 +170,13 @@ module Wavix
|
|
|
170
170
|
|
|
171
171
|
# Updates the phone number identified by `id`. Only the provided fields are changed.
|
|
172
172
|
#
|
|
173
|
+
# **Behavior:** With `expected_sms_relay_url`, the `sms_relay_url` change is applied only while the number
|
|
174
|
+
# currently has that URL; an empty string matches a number with no `sms_relay_url`. Otherwise the call returns
|
|
175
|
+
# `409` and no field in the request is changed. Setting the URL the number already has succeeds. To clear
|
|
176
|
+
# `sms_relay_url`, send `null`, not an empty string. If the call returns a `Something went wrong` error, you can
|
|
177
|
+
# retry the request; repeating the `sms_relay_url` change is a no-op, so it is safe even if the first attempt
|
|
178
|
+
# already applied it.
|
|
179
|
+
#
|
|
173
180
|
# @param request_options [Hash]
|
|
174
181
|
# @param params [Wavix::Numbers::Types::NumberUpdateRequest]
|
|
175
182
|
# @option request_options [String] :base_url
|
|
@@ -12,6 +12,8 @@ module Wavix
|
|
|
12
12
|
|
|
13
13
|
field :sms_relay_url, -> { String }, optional: true, nullable: false
|
|
14
14
|
|
|
15
|
+
field :expected_sms_relay_url, -> { String }, optional: true, nullable: false
|
|
16
|
+
|
|
15
17
|
field :call_recording_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
16
18
|
|
|
17
19
|
field :transcription_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
@@ -53,7 +53,7 @@ module Wavix
|
|
|
53
53
|
# Creates a SIP trunk for routing inbound and outbound calls. Returns the trunk with its generated `access_token`.
|
|
54
54
|
#
|
|
55
55
|
# @param request_options [Hash]
|
|
56
|
-
# @param params [Wavix::Types::SipTrunkCreateRequest]
|
|
56
|
+
# @param params [Wavix::SipTrunks::Types::SipTrunkCreateRequest]
|
|
57
57
|
# @option request_options [String] :base_url
|
|
58
58
|
# @option request_options [Hash{String => Object}] :additional_headers
|
|
59
59
|
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
@@ -67,7 +67,7 @@ module Wavix
|
|
|
67
67
|
base_url: request_options[:base_url],
|
|
68
68
|
method: "POST",
|
|
69
69
|
path: "v1/trunks",
|
|
70
|
-
body: Wavix::Types::SipTrunkCreateRequest.new(params).to_h,
|
|
70
|
+
body: Wavix::SipTrunks::Types::SipTrunkCreateRequest.new(params).to_h,
|
|
71
71
|
request_options: request_options
|
|
72
72
|
)
|
|
73
73
|
begin
|
|
@@ -118,10 +118,11 @@ module Wavix
|
|
|
118
118
|
end
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
-
#
|
|
121
|
+
# Updates the SIP trunk identified by `id`. Only the provided fields are changed. On trial accounts, every update
|
|
122
|
+
# also applies the trial limits: a `call_limit` of at most 300 seconds (300 when omitted) and one concurrent call.
|
|
122
123
|
#
|
|
123
124
|
# @param request_options [Hash]
|
|
124
|
-
# @param params [Wavix::Types::
|
|
125
|
+
# @param params [Wavix::SipTrunks::Types::SipTrunkUpdateRequest]
|
|
125
126
|
# @option request_options [String] :base_url
|
|
126
127
|
# @option request_options [Hash{String => Object}] :additional_headers
|
|
127
128
|
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
@@ -132,14 +133,15 @@ module Wavix
|
|
|
132
133
|
# @return [Wavix::Types::SipTrunkResponse]
|
|
133
134
|
def update(request_options: {}, **params)
|
|
134
135
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
request_data = Wavix::SipTrunks::Types::SipTrunkUpdateRequest.new(params).to_h
|
|
137
|
+
non_body_param_names = %w[id]
|
|
138
|
+
body = request_data.except(*non_body_param_names)
|
|
137
139
|
|
|
138
140
|
request = Wavix::Internal::JSON::Request.new(
|
|
139
141
|
base_url: request_options[:base_url],
|
|
140
142
|
method: "PUT",
|
|
141
143
|
path: "v1/trunks/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
142
|
-
body:
|
|
144
|
+
body: body,
|
|
143
145
|
request_options: request_options
|
|
144
146
|
)
|
|
145
147
|
begin
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module SipTrunks
|
|
5
|
+
module Types
|
|
6
|
+
class SipTrunkCreateRequest < Internal::Types::Model
|
|
7
|
+
field :label, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :password, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :host_request, -> { Wavix::SipTrunks::Types::SipTrunkCreateRequestHostRequest }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :callerid, -> { String }, optional: false, nullable: false
|
|
14
|
+
|
|
15
|
+
field :multiple_numbers, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :ip_restrict, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
18
|
+
|
|
19
|
+
field :allowed_ips, -> { Internal::Types::Array[Wavix::SipTrunks::Types::SipTrunkCreateRequestAllowedIpsItem] }, optional: true, nullable: false
|
|
20
|
+
|
|
21
|
+
field :didinfo_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
22
|
+
|
|
23
|
+
field :call_restrict, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
24
|
+
|
|
25
|
+
field :call_limit, -> { Integer }, optional: true, nullable: false
|
|
26
|
+
|
|
27
|
+
field :cost_limit, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
28
|
+
|
|
29
|
+
field :max_call_cost, -> { Integer }, optional: true, nullable: false
|
|
30
|
+
|
|
31
|
+
field :channels_restrict, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
32
|
+
|
|
33
|
+
field :max_channels, -> { Integer }, optional: true, nullable: false
|
|
34
|
+
|
|
35
|
+
field :rewrite_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
36
|
+
|
|
37
|
+
field :rewrite_prefix, -> { String }, optional: true, nullable: false
|
|
38
|
+
|
|
39
|
+
field :rewrite_cond, -> { String }, optional: true, nullable: false
|
|
40
|
+
|
|
41
|
+
field :call_recording_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
42
|
+
|
|
43
|
+
field :transcription_enabled, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
44
|
+
|
|
45
|
+
field :transcription_threshold, -> { Integer }, optional: false, nullable: false
|
|
46
|
+
|
|
47
|
+
field :machine_detection_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
48
|
+
|
|
49
|
+
field :encrypted_media, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module SipTrunks
|
|
5
|
+
module Types
|
|
6
|
+
# For SIP trunks with IP authentication, includes the SIP endpoint public static IP address and the status of the
|
|
7
|
+
# authentication request. Wavix authenticates all SIP traffic originating from this IP address.
|
|
8
|
+
class SipTrunkCreateRequestHostRequest < Internal::Types::Model
|
|
9
|
+
field :host, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module SipTrunks
|
|
5
|
+
module Types
|
|
6
|
+
class SipTrunkUpdateRequest < Internal::Types::Model
|
|
7
|
+
field :id, -> { Integer }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :label, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :password, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :host_request, -> { Wavix::SipTrunks::Types::SipTrunkUpdateRequestHostRequest }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :callerid, -> { String }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :multiple_numbers, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
18
|
+
|
|
19
|
+
field :ip_restrict, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
20
|
+
|
|
21
|
+
field :allowed_ips, -> { Internal::Types::Array[Wavix::SipTrunks::Types::SipTrunkUpdateRequestAllowedIpsItem] }, optional: true, nullable: false
|
|
22
|
+
|
|
23
|
+
field :didinfo_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
24
|
+
|
|
25
|
+
field :call_restrict, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
26
|
+
|
|
27
|
+
field :call_limit, -> { Integer }, optional: true, nullable: false
|
|
28
|
+
|
|
29
|
+
field :cost_limit, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
30
|
+
|
|
31
|
+
field :max_call_cost, -> { Integer }, optional: true, nullable: false
|
|
32
|
+
|
|
33
|
+
field :channels_restrict, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
34
|
+
|
|
35
|
+
field :max_channels, -> { Integer }, optional: true, nullable: false
|
|
36
|
+
|
|
37
|
+
field :rewrite_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
38
|
+
|
|
39
|
+
field :rewrite_prefix, -> { String }, optional: true, nullable: false
|
|
40
|
+
|
|
41
|
+
field :rewrite_cond, -> { String }, optional: true, nullable: false
|
|
42
|
+
|
|
43
|
+
field :call_recording_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
44
|
+
|
|
45
|
+
field :transcription_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
46
|
+
|
|
47
|
+
field :transcription_threshold, -> { Integer }, optional: true, nullable: false
|
|
48
|
+
|
|
49
|
+
field :machine_detection_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
50
|
+
|
|
51
|
+
field :encrypted_media, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module SipTrunks
|
|
5
|
+
module Types
|
|
6
|
+
# For SIP trunks with IP authentication, the SIP endpoint public static IP address. Wavix authenticates all SIP
|
|
7
|
+
# traffic originating from this IP address. Ignored when the trunk already has a host request that is pending or
|
|
8
|
+
# approved. Not supported on trial accounts.
|
|
9
|
+
class SipTrunkUpdateRequestHostRequest < Internal::Types::Model
|
|
10
|
+
field :host, -> { String }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -121,7 +121,7 @@ module Wavix
|
|
|
121
121
|
end
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
-
#
|
|
124
|
+
# Updates the sub-account identified by `id`. Only the provided fields are changed.
|
|
125
125
|
#
|
|
126
126
|
# @param request_options [Hash]
|
|
127
127
|
# @param params [Wavix::SubAccounts::Types::SubAccountsUpdateRequest]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Error returned when a webhook change is rejected because the webhook no longer has the expected URL.
|
|
6
|
+
class WebhookInUseErrorResponse < Internal::Types::Model
|
|
7
|
+
field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :error, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :message, -> { String }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A WhatsApp Business Account linked to your account. Returned by `whatsapp_wabas_list` and `whatsapp_wabas_get`.
|
|
6
|
+
class WhatsAppBusinessAccount < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :name, -> { String }, optional: false, nullable: true
|
|
10
|
+
|
|
11
|
+
field :messaging_limit, -> { Wavix::Types::WhatsAppBusinessAccountMessagingLimit }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :sender_count, -> { Integer }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppBusinessAccountMessagingLimit
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
UP_TO250 = "up_to_250"
|
|
9
|
+
UP_TO2K = "up_to_2k"
|
|
10
|
+
UP_TO10K = "up_to_10k"
|
|
11
|
+
UP_TO100K = "up_to_100k"
|
|
12
|
+
UNLIMITED = "unlimited"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Wavix
|
|
4
4
|
module Types
|
|
5
|
+
# A WhatsApp message you sent. Returned by `whatsapp_messages_send`.
|
|
5
6
|
class WhatsAppMessage < Internal::Types::Model
|
|
6
7
|
field :uuid, -> { String }, optional: false, nullable: false
|
|
7
8
|
|
|
@@ -11,7 +12,7 @@ module Wavix
|
|
|
11
12
|
|
|
12
13
|
field :status, -> { Wavix::Types::WhatsAppMessageStatus }, optional: false, nullable: false
|
|
13
14
|
|
|
14
|
-
field :template, -> { Wavix::Types::WhatsAppMessageTemplate }, optional:
|
|
15
|
+
field :template, -> { Wavix::Types::WhatsAppMessageTemplate }, optional: false, nullable: true
|
|
15
16
|
|
|
16
17
|
field :created_at, -> { String }, optional: false, nullable: false
|
|
17
18
|
end
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Wavix
|
|
4
4
|
module Types
|
|
5
|
+
# A WhatsApp message your account sent or received. Returned by `whatsapp_messages_list` and
|
|
6
|
+
# `whatsapp_messages_get`.
|
|
5
7
|
class WhatsAppMessageListItem < Internal::Types::Model
|
|
6
8
|
field :uuid, -> { String }, optional: false, nullable: false
|
|
7
9
|
|
|
@@ -13,7 +15,7 @@ module Wavix
|
|
|
13
15
|
|
|
14
16
|
field :to, -> { String }, optional: false, nullable: false
|
|
15
17
|
|
|
16
|
-
field :country, -> { String }, optional:
|
|
18
|
+
field :country, -> { String }, optional: false, nullable: true
|
|
17
19
|
|
|
18
20
|
field :created_at, -> { String }, optional: false, nullable: false
|
|
19
21
|
end
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module Wavix
|
|
4
4
|
module Types
|
|
5
|
+
# Attributes of a WhatsApp template message to send. Consumed by `whatsapp_messages_send`.
|
|
5
6
|
class WhatsAppMessageSendRequest < Internal::Types::Model
|
|
6
7
|
field :from, -> { String }, optional: false, nullable: false
|
|
7
8
|
|
|
8
9
|
field :to, -> { String }, optional: false, nullable: false
|
|
9
10
|
|
|
10
|
-
field :
|
|
11
|
+
field :idempotency_key, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :template, -> { Wavix::Types::WhatsAppSendTemplate }, optional: false, nullable: false
|
|
11
14
|
end
|
|
12
15
|
end
|
|
13
16
|
end
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
module Wavix
|
|
4
4
|
module Types
|
|
5
|
-
#
|
|
5
|
+
# The template that a WhatsApp message was sent with. Returned in `template` by `whatsapp_messages_send`.
|
|
6
6
|
class WhatsAppMessageTemplate < Internal::Types::Model
|
|
7
|
-
field :name, -> { String }, optional:
|
|
7
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
8
8
|
|
|
9
|
-
field :language, -> { String }, optional:
|
|
9
|
+
field :language, -> { String }, optional: false, nullable: false
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
end
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Wavix
|
|
4
4
|
module Types
|
|
5
|
-
# RFC 9457 problem document
|
|
5
|
+
# An RFC 9457 problem document that describes an error from the WhatsApp API. Returned with the
|
|
6
|
+
# `application/problem+json` content type.
|
|
6
7
|
class WhatsAppProblem < Internal::Types::Model
|
|
7
8
|
field :type, -> { String }, optional: false, nullable: false
|
|
8
9
|
|
data/lib/wavix/types/{whats_app_message_send_request_template.rb → whats_app_send_template.rb}
RENAMED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
module Wavix
|
|
4
4
|
module Types
|
|
5
|
-
|
|
5
|
+
# The template to send and the values for its dynamic parts. Consumed in `template` by `whatsapp_messages_send`.
|
|
6
|
+
class WhatsAppSendTemplate < Internal::Types::Model
|
|
6
7
|
field :name, -> { String }, optional: false, nullable: false
|
|
7
8
|
|
|
8
9
|
field :language, -> { String }, optional: false, nullable: false
|
|
9
10
|
|
|
10
11
|
field :placeholders, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
11
12
|
|
|
12
|
-
field :header, -> { Wavix::Types::
|
|
13
|
+
field :header, -> { Wavix::Types::WhatsAppSendTemplateHeader }, optional: true, nullable: false
|
|
13
14
|
|
|
14
|
-
field :buttons, -> { Internal::Types::Array[Wavix::Types::
|
|
15
|
+
field :buttons, -> { Internal::Types::Array[Wavix::Types::WhatsAppSendTemplateButton] }, optional: true, nullable: false
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Dynamic values for one button of the template. Each `type` requires specific fields and rejects the others, as
|
|
6
|
+
# listed in the `type` description. Consumed in `template.buttons` by `whatsapp_messages_send`.
|
|
7
|
+
class WhatsAppSendTemplateButton < Internal::Types::Model
|
|
8
|
+
field :type, -> { Wavix::Types::WhatsAppSendTemplateButtonType }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :parameter, -> { String }, optional: true, nullable: false
|
|
11
|
+
|
|
12
|
+
field :flow_token, -> { String }, optional: true, nullable: false
|
|
13
|
+
|
|
14
|
+
field :data, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
15
|
+
|
|
16
|
+
field :thumbnail_product_retailer_id, -> { String }, optional: true, nullable: false
|
|
17
|
+
|
|
18
|
+
field :sections, -> { Internal::Types::Array[Internal::Types::Hash[String, Object]] }, optional: true, nullable: false
|
|
19
|
+
|
|
20
|
+
field :action, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
21
|
+
|
|
22
|
+
field :call_validity_period, -> { Integer }, optional: true, nullable: false
|
|
23
|
+
|
|
24
|
+
field :call_context_payload, -> { String }, optional: true, nullable: false
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppSendTemplateButtonType
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
QUICK_REPLY = "quick_reply"
|
|
9
|
+
URL = "url"
|
|
10
|
+
COPY_CODE = "copy_code"
|
|
11
|
+
FLOW = "flow"
|
|
12
|
+
CATALOG = "catalog"
|
|
13
|
+
MULTI_PRODUCT = "multi_product"
|
|
14
|
+
ORDER_DETAILS = "order_details"
|
|
15
|
+
VOICE_CALL = "voice_call"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|