wavix-ruby-sdk 1.0.0 → 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 +22 -0
- data/.fernignore +4 -0
- data/lib/wavix/api_keys/client.rb +1 -1
- data/lib/wavix/billing/invoices/client.rb +2 -2
- data/lib/wavix/billing/transactions/client.rb +2 -2
- data/lib/wavix/buy/cities/client.rb +2 -2
- data/lib/wavix/buy/countries/client.rb +2 -2
- data/lib/wavix/buy/numbers/client.rb +2 -2
- data/lib/wavix/buy/region_cities/client.rb +2 -2
- data/lib/wavix/buy/regions/client.rb +2 -2
- data/lib/wavix/call_control/audio/client.rb +2 -1
- data/lib/wavix/call_control/client.rb +4 -3
- data/lib/wavix/call_control/streams/client.rb +3 -2
- data/lib/wavix/call_control/types/call_dtmf_collect_request_prompt_say.rb +3 -1
- data/lib/wavix/call_recording/client.rb +1 -1
- data/lib/wavix/call_webhooks/client.rb +15 -1
- 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/cart/client.rb +9 -9
- data/lib/wavix/cdrs/client.rb +3 -1
- data/lib/wavix/cdrs/types/cdr_search_request.rb +3 -3
- data/lib/wavix/client.rb +1 -1
- data/lib/wavix/number_validator/client.rb +6 -3
- data/lib/wavix/number_validator/types/phone_validation_request.rb +2 -2
- data/lib/wavix/numbers/client.rb +9 -2
- data/lib/wavix/numbers/types/number_update_request.rb +2 -0
- data/lib/wavix/profile/config/client.rb +2 -2
- 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/sms_and_mms/messages/client.rb +6 -6
- data/lib/wavix/sms_and_mms/opt_outs/client.rb +2 -2
- data/lib/wavix/sms_and_mms/sender_ids/client.rb +4 -3
- data/lib/wavix/speech_analytics/client.rb +4 -4
- data/lib/wavix/sub_accounts/client.rb +5 -1
- data/lib/wavix/sub_accounts/types/list_sub_accounts_request.rb +4 -0
- data/lib/wavix/sub_accounts/types/sub_accounts_update_request.rb +1 -1
- data/lib/wavix/ten_dlc/brand_appeals/client.rb +2 -2
- data/lib/wavix/ten_dlc/brand_appeals/types/create_brand_appeals_request.rb +1 -1
- data/lib/wavix/ten_dlc/brand_appeals/types/create_brand_appeals_request_appeal_categories_item.rb +17 -0
- data/lib/wavix/ten_dlc/brand_evidence/client.rb +4 -4
- data/lib/wavix/ten_dlc/brand_vetting_appeals/client.rb +2 -2
- data/lib/wavix/ten_dlc/brand_vetting_appeals/types/ten_dlc_brand_vetting_appeal_create_request.rb +1 -1
- data/lib/wavix/ten_dlc/brand_vetting_appeals/types/ten_dlc_brand_vetting_appeal_create_request_appeal_categories_item.rb +18 -0
- data/lib/wavix/ten_dlc/brand_vettings/client.rb +2 -1
- data/lib/wavix/ten_dlc/brands/client.rb +16 -14
- data/lib/wavix/ten_dlc/campaign_numbers/client.rb +6 -6
- data/lib/wavix/ten_dlc/campaigns/client.rb +12 -12
- data/lib/wavix/ten_dlc/campaigns/types/ten_dlc_campaign_create_request.rb +6 -6
- data/lib/wavix/ten_dlc/subscriptions/client.rb +4 -4
- data/lib/wavix/two_fa/verification/client.rb +11 -9
- data/lib/wavix/types/{document_type_id.rb → api_key_with_secret.rb} +2 -2
- data/lib/wavix/types/available_number.rb +1 -1
- data/lib/wavix/types/cart_response.rb +1 -1
- data/lib/wavix/types/cdr_transcription_response.rb +1 -1
- data/lib/wavix/types/document_type.rb +5 -5
- data/lib/wavix/types/document_type_info.rb +14 -0
- data/lib/wavix/types/file_transcription_response.rb +2 -2
- data/lib/wavix/types/message_body.rb +1 -1
- data/lib/wavix/types/number.rb +1 -1
- data/lib/wavix/types/number_document.rb +1 -1
- data/lib/wavix/types/number_list_response.rb +1 -1
- data/lib/wavix/types/ten_dlc_brand.rb +1 -1
- data/lib/wavix/types/ten_dlc_brand_appeal_create_request.rb +1 -1
- data/lib/wavix/types/ten_dlc_brand_appeal_create_request_appeal_categories_item.rb +13 -0
- data/lib/wavix/types/ten_dlc_brand_appeal_outcome.rb +1 -1
- data/lib/wavix/types/{not_found_error_body.rb → too_many_requests_error_response.rb} +1 -1
- data/lib/wavix/types/transcription_filter.rb +3 -3
- data/lib/wavix/types/unprocessable_entity_error_body.rb +2 -2
- 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 +20 -0
- data/lib/wavix/types/whats_app_message_get_response.rb +10 -0
- data/lib/wavix/types/whats_app_message_list_item.rb +23 -0
- data/lib/wavix/types/whats_app_message_list_item_direction.rb +12 -0
- data/lib/wavix/types/whats_app_message_list_item_status.rb +16 -0
- data/lib/wavix/types/whats_app_message_list_response.rb +12 -0
- data/lib/wavix/types/whats_app_message_send_request.rb +16 -0
- data/lib/wavix/types/whats_app_message_send_response.rb +10 -0
- data/lib/wavix/types/whats_app_message_status.rb +16 -0
- data/lib/wavix/types/whats_app_message_template.rb +12 -0
- data/lib/wavix/types/whats_app_problem.rb +23 -0
- data/lib/wavix/types/whats_app_problem_error_class.rb +14 -0
- data/lib/wavix/types/whats_app_send_template.rb +18 -0
- 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_send_template_header.rb +26 -0
- data/lib/wavix/types/whats_app_send_template_header_type.rb +16 -0
- data/lib/wavix/types/whats_app_sender.rb +19 -0
- data/lib/wavix/types/whats_app_sender_list_response.rb +12 -0
- data/lib/wavix/types/whats_app_sender_quality_rating.rb +14 -0
- data/lib/wavix/types/whats_app_sender_status.rb +21 -0
- data/lib/wavix/types/whats_app_template.rb +29 -0
- 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_category.rb +13 -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 +20 -0
- data/lib/wavix/types/whats_app_template_create_request_category.rb +13 -0
- 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/{file_transcription_response_status.rb → whats_app_template_location_header_component_request_type.rb} +2 -3
- 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_quality_rating.rb +14 -0
- data/lib/wavix/types/whats_app_template_quick_reply_button_request.rb +10 -0
- data/lib/wavix/types/whats_app_template_response.rb +10 -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_status.rb +21 -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/voice_campaigns/client.rb +2 -2
- data/lib/wavix/webrtc/tokens/client.rb +11 -3
- data/lib/wavix/webrtc/tokens/types/list_tokens_request.rb +15 -0
- data/lib/wavix/webrtc/tokens/types/web_rtc_token_create_request.rb +1 -1
- data/lib/wavix.rb +89 -87
- data/reference.md +512 -116
- metadata +71 -68
- data/lib/wavix/billing/invoices/types/list_invoices_response.rb +0 -17
- data/lib/wavix/billing/transactions/types/list_transactions_response.rb +0 -17
- data/lib/wavix/buy/cities/types/list_cities_response.rb +0 -13
- data/lib/wavix/buy/countries/types/list_countries_response.rb +0 -13
- data/lib/wavix/buy/numbers/types/list_numbers_response.rb +0 -15
- data/lib/wavix/buy/region_cities/types/list_region_cities_response.rb +0 -13
- data/lib/wavix/buy/regions/types/list_regions_response.rb +0 -13
- data/lib/wavix/cart/types/checkout_cart_response.rb +0 -11
- data/lib/wavix/cart/types/get_cart_response.rb +0 -13
- data/lib/wavix/cart/types/remove_cart_response.rb +0 -11
- data/lib/wavix/cdrs/types/cdr_search_request_disposition.rb +0 -17
- data/lib/wavix/number_validator/types/get_number_validator_response.rb +0 -43
- data/lib/wavix/numbers/types/delete_numbers_response.rb +0 -11
- data/lib/wavix/profile/config/types/get_config_response.rb +0 -15
- data/lib/wavix/sip_trunks/types/update_sip_trunks_request.rb +0 -13
- data/lib/wavix/sms_and_mms/messages/types/get_messages_response.rb +0 -45
- data/lib/wavix/sms_and_mms/messages/types/list_messages_response.rb +0 -15
- data/lib/wavix/sms_and_mms/opt_outs/types/create_opt_outs_response.rb +0 -13
- data/lib/wavix/sms_and_mms/sender_ids/types/delete_sender_ids_response.rb +0 -13
- data/lib/wavix/speech_analytics/types/create_speech_analytics_response.rb +0 -15
- data/lib/wavix/speech_analytics/types/get_speech_analytics_response.rb +0 -31
- data/lib/wavix/speech_analytics/types/get_speech_analytics_response_language.rb +0 -17
- data/lib/wavix/speech_analytics/types/get_speech_analytics_response_status.rb +0 -14
- data/lib/wavix/ten_dlc/brand_appeals/types/create_brand_appeals_response.rb +0 -13
- data/lib/wavix/ten_dlc/brand_evidence/types/delete_brand_evidence_response.rb +0 -13
- data/lib/wavix/ten_dlc/brand_evidence/types/upload_brand_evidence_response.rb +0 -19
- data/lib/wavix/ten_dlc/brand_vetting_appeals/types/create_brand_vetting_appeals_response.rb +0 -13
- data/lib/wavix/ten_dlc/brands/types/create_brands_response.rb +0 -61
- data/lib/wavix/ten_dlc/brands/types/create_brands_response_entity_type.rb +0 -18
- data/lib/wavix/ten_dlc/brands/types/create_brands_response_status.rb +0 -19
- data/lib/wavix/ten_dlc/brands/types/delete_brands_response.rb +0 -13
- data/lib/wavix/ten_dlc/brands/types/get_brands_response.rb +0 -61
- data/lib/wavix/ten_dlc/brands/types/get_brands_response_entity_type.rb +0 -18
- data/lib/wavix/ten_dlc/brands/types/get_brands_response_status.rb +0 -19
- data/lib/wavix/ten_dlc/brands/types/list_brands_response.rb +0 -16
- data/lib/wavix/ten_dlc/brands/types/list_brands_response_pagination.rb +0 -20
- data/lib/wavix/ten_dlc/brands/types/qualify_usecase_brands_response.rb +0 -17
- data/lib/wavix/ten_dlc/brands/types/update_brands_response.rb +0 -61
- data/lib/wavix/ten_dlc/brands/types/update_brands_response_entity_type.rb +0 -18
- data/lib/wavix/ten_dlc/brands/types/update_brands_response_status.rb +0 -19
- data/lib/wavix/ten_dlc/campaign_numbers/types/link_campaign_numbers_response.rb +0 -13
- data/lib/wavix/ten_dlc/campaign_numbers/types/list_campaign_numbers_response.rb +0 -17
- data/lib/wavix/ten_dlc/campaign_numbers/types/unlink_campaign_numbers_response.rb +0 -13
- data/lib/wavix/ten_dlc/campaigns/types/create_campaigns_response.rb +0 -89
- data/lib/wavix/ten_dlc/campaigns/types/delete_campaigns_response.rb +0 -13
- data/lib/wavix/ten_dlc/campaigns/types/get_campaigns_response.rb +0 -89
- data/lib/wavix/ten_dlc/campaigns/types/list_by_brand_campaigns_response.rb +0 -16
- data/lib/wavix/ten_dlc/campaigns/types/list_by_brand_campaigns_response_pagination.rb +0 -20
- data/lib/wavix/ten_dlc/campaigns/types/list_campaigns_response.rb +0 -16
- data/lib/wavix/ten_dlc/campaigns/types/list_campaigns_response_pagination.rb +0 -20
- data/lib/wavix/ten_dlc/campaigns/types/update_campaigns_response.rb +0 -89
- data/lib/wavix/ten_dlc/subscriptions/types/create_subscriptions_response.rb +0 -16
- data/lib/wavix/ten_dlc/subscriptions/types/delete_subscriptions_response.rb +0 -13
- data/lib/wavix/two_fa/verification/types/check_verification_response.rb +0 -13
- data/lib/wavix/two_fa/verification/types/create_verification_response.rb +0 -25
- data/lib/wavix/two_fa/verification/types/resend_verification_response.rb +0 -19
- data/lib/wavix/types/bad_request_error_body.rb +0 -11
- data/lib/wavix/types/file_transcription_response_language.rb +0 -15
- 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/ten_dlc_brand_appeal_outcome_vetting_status.rb +0 -15
- data/lib/wavix/types/ten_dlc_brand_status.rb +0 -15
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
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# DO NOT EDIT MANUALLY - Managed by Fern Replay
|
|
2
|
+
version: "1.0"
|
|
3
|
+
generations:
|
|
4
|
+
- commit_sha: 4731210176db5f3ff8ae412de752a6bab784933b
|
|
5
|
+
tree_hash: 174a9417701e355131f74c18ffa524acf0e5bf75
|
|
6
|
+
timestamp: 2026-09-23T07:50:24.143Z
|
|
7
|
+
cli_version: unknown
|
|
8
|
+
generator_versions: {}
|
|
9
|
+
- commit_sha: 6a2e8dd340486da43c8e2d337f7fcce044bd3618
|
|
10
|
+
tree_hash: 2a1716a51569430491fb4a8b0108aae2e33a0fe0
|
|
11
|
+
timestamp: 2026-09-23T07:50:24.468Z
|
|
12
|
+
cli_version: unknown
|
|
13
|
+
generator_versions:
|
|
14
|
+
fernapi/fern-ruby-sdk: 1.13.1
|
|
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
|
|
22
|
+
patches: []
|
data/.fernignore
CHANGED
|
@@ -74,7 +74,7 @@ module Wavix
|
|
|
74
74
|
end
|
|
75
75
|
code = response.code.to_i
|
|
76
76
|
if code.between?(200, 299)
|
|
77
|
-
Wavix::Types::
|
|
77
|
+
Wavix::Types::APIKeyWithSecret.load(response.body)
|
|
78
78
|
else
|
|
79
79
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
80
80
|
raise error_class.new(response.body, code: code)
|
|
@@ -24,7 +24,7 @@ module Wavix
|
|
|
24
24
|
# @option params [Integer, nil] :page
|
|
25
25
|
# @option params [Integer, nil] :per_page
|
|
26
26
|
#
|
|
27
|
-
# @return [Wavix::
|
|
27
|
+
# @return [Wavix::Types::InvoiceListResponse]
|
|
28
28
|
def list(request_options: {}, **params)
|
|
29
29
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
30
30
|
query_params = {}
|
|
@@ -45,7 +45,7 @@ module Wavix
|
|
|
45
45
|
end
|
|
46
46
|
code = response.code.to_i
|
|
47
47
|
if code.between?(200, 299)
|
|
48
|
-
Wavix::
|
|
48
|
+
Wavix::Types::InvoiceListResponse.load(response.body)
|
|
49
49
|
else
|
|
50
50
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
51
51
|
raise error_class.new(response.body, code: code)
|
|
@@ -29,7 +29,7 @@ module Wavix
|
|
|
29
29
|
# @option params [Integer, nil] :page
|
|
30
30
|
# @option params [Integer, nil] :per_page
|
|
31
31
|
#
|
|
32
|
-
# @return [Wavix::
|
|
32
|
+
# @return [Wavix::Types::BillingTransactionListResponse]
|
|
33
33
|
def list(request_options: {}, **params)
|
|
34
34
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
35
35
|
query_params = {}
|
|
@@ -55,7 +55,7 @@ module Wavix
|
|
|
55
55
|
end
|
|
56
56
|
code = response.code.to_i
|
|
57
57
|
if code.between?(200, 299)
|
|
58
|
-
Wavix::
|
|
58
|
+
Wavix::Types::BillingTransactionListResponse.load(response.body)
|
|
59
59
|
else
|
|
60
60
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
61
61
|
raise error_class.new(response.body, code: code)
|
|
@@ -24,7 +24,7 @@ module Wavix
|
|
|
24
24
|
# @option params [Integer] :country_id
|
|
25
25
|
# @option params [Boolean, nil] :text_enabled_only
|
|
26
26
|
#
|
|
27
|
-
# @return [Wavix::
|
|
27
|
+
# @return [Wavix::Types::CityListResponse]
|
|
28
28
|
def list(request_options: {}, **params)
|
|
29
29
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
30
30
|
query_params = {}
|
|
@@ -44,7 +44,7 @@ module Wavix
|
|
|
44
44
|
end
|
|
45
45
|
code = response.code.to_i
|
|
46
46
|
if code.between?(200, 299)
|
|
47
|
-
Wavix::
|
|
47
|
+
Wavix::Types::CityListResponse.load(response.body)
|
|
48
48
|
else
|
|
49
49
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
50
50
|
raise error_class.new(response.body, code: code)
|
|
@@ -22,7 +22,7 @@ module Wavix
|
|
|
22
22
|
# @option request_options [Integer] :timeout_in_seconds
|
|
23
23
|
# @option params [Boolean, nil] :text_enabled_only
|
|
24
24
|
#
|
|
25
|
-
# @return [Wavix::
|
|
25
|
+
# @return [Wavix::Types::CountryListResponse]
|
|
26
26
|
def list(request_options: {}, **params)
|
|
27
27
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
28
28
|
query_params = {}
|
|
@@ -42,7 +42,7 @@ module Wavix
|
|
|
42
42
|
end
|
|
43
43
|
code = response.code.to_i
|
|
44
44
|
if code.between?(200, 299)
|
|
45
|
-
Wavix::
|
|
45
|
+
Wavix::Types::CountryListResponse.load(response.body)
|
|
46
46
|
else
|
|
47
47
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
48
48
|
raise error_class.new(response.body, code: code)
|
|
@@ -26,7 +26,7 @@ module Wavix
|
|
|
26
26
|
# @option params [Integer, nil] :page
|
|
27
27
|
# @option params [Integer, nil] :per_page
|
|
28
28
|
#
|
|
29
|
-
# @return [Wavix::
|
|
29
|
+
# @return [Wavix::Types::AvailableNumberListResponse]
|
|
30
30
|
def list(request_options: {}, **params)
|
|
31
31
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
32
32
|
query_params = {}
|
|
@@ -48,7 +48,7 @@ module Wavix
|
|
|
48
48
|
end
|
|
49
49
|
code = response.code.to_i
|
|
50
50
|
if code.between?(200, 299)
|
|
51
|
-
Wavix::
|
|
51
|
+
Wavix::Types::AvailableNumberListResponse.load(response.body)
|
|
52
52
|
else
|
|
53
53
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
54
54
|
raise error_class.new(response.body, code: code)
|
|
@@ -24,7 +24,7 @@ module Wavix
|
|
|
24
24
|
# @option params [Integer] :region_id
|
|
25
25
|
# @option params [Boolean, nil] :text_enabled_only
|
|
26
26
|
#
|
|
27
|
-
# @return [Wavix::
|
|
27
|
+
# @return [Wavix::Types::CityListResponse]
|
|
28
28
|
def list(request_options: {}, **params)
|
|
29
29
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
30
30
|
query_params = {}
|
|
@@ -44,7 +44,7 @@ module Wavix
|
|
|
44
44
|
end
|
|
45
45
|
code = response.code.to_i
|
|
46
46
|
if code.between?(200, 299)
|
|
47
|
-
Wavix::
|
|
47
|
+
Wavix::Types::CityListResponse.load(response.body)
|
|
48
48
|
else
|
|
49
49
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
50
50
|
raise error_class.new(response.body, code: code)
|
|
@@ -23,7 +23,7 @@ module Wavix
|
|
|
23
23
|
# @option params [Integer] :country_id
|
|
24
24
|
# @option params [Boolean, nil] :text_enabled_only
|
|
25
25
|
#
|
|
26
|
-
# @return [Wavix::
|
|
26
|
+
# @return [Wavix::Types::RegionListResponse]
|
|
27
27
|
def list(request_options: {}, **params)
|
|
28
28
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
29
29
|
query_params = {}
|
|
@@ -43,7 +43,7 @@ module Wavix
|
|
|
43
43
|
end
|
|
44
44
|
code = response.code.to_i
|
|
45
45
|
if code.between?(200, 299)
|
|
46
|
-
Wavix::
|
|
46
|
+
Wavix::Types::RegionListResponse.load(response.body)
|
|
47
47
|
else
|
|
48
48
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
49
49
|
raise error_class.new(response.body, code: code)
|
|
@@ -11,7 +11,8 @@ module Wavix
|
|
|
11
11
|
@client = client
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Plays an audio prompt into the active call identified by `id`.
|
|
14
|
+
# Plays an audio prompt into the active call identified by `id`. The audio is audible to the remote party in
|
|
15
|
+
# real time.
|
|
15
16
|
#
|
|
16
17
|
# @param request_options [Hash]
|
|
17
18
|
# @param params [Wavix::CallControl::Audio::Types::CallAudioPlayRequest]
|
|
@@ -42,7 +42,7 @@ module Wavix
|
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
# Places
|
|
45
|
+
# Places a real, billable outbound PSTN call. Returns the call with its `uuid` for tracking and control.
|
|
46
46
|
#
|
|
47
47
|
# @param request_options [Hash]
|
|
48
48
|
# @param params [Wavix::CallControl::Types::CallRequest]
|
|
@@ -110,7 +110,7 @@ module Wavix
|
|
|
110
110
|
end
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
-
# Ends the active call identified by `id` by hanging up.
|
|
113
|
+
# Ends the active call identified by `id` by hanging up. Irreversible — the call cannot be resumed once ended.
|
|
114
114
|
#
|
|
115
115
|
# @param request_options [Hash]
|
|
116
116
|
# @param params [Hash]
|
|
@@ -183,7 +183,8 @@ module Wavix
|
|
|
183
183
|
end
|
|
184
184
|
end
|
|
185
185
|
|
|
186
|
-
# Answers the inbound call identified by `id`. Optionally starts
|
|
186
|
+
# Answers the inbound call identified by `id`. Optionally starts recording, post-call transcription, or live media
|
|
187
|
+
# streaming on answer.
|
|
187
188
|
#
|
|
188
189
|
# @param request_options [Hash]
|
|
189
190
|
# @param params [Wavix::CallControl::Types::CallAnswerRequest]
|
|
@@ -11,8 +11,9 @@ module Wavix
|
|
|
11
11
|
@client = client
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Starts streaming the
|
|
15
|
-
# `
|
|
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.
|
|
16
17
|
#
|
|
17
18
|
# @param request_options [Hash]
|
|
18
19
|
# @param params [Wavix::CallControl::Streams::Types::CallStreamCreateRequest]
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
module Wavix
|
|
4
4
|
module CallControl
|
|
5
5
|
module Types
|
|
6
|
-
# Text to speak and voice to use.
|
|
6
|
+
# Text to speak and voice to use. Pick `voice` from the language family matching `language` (for example, a German
|
|
7
|
+
# voice such as `Hans` for `ge`, a Spanish voice such as `Conchita` for `sp`) — Wavix does not validate the
|
|
8
|
+
# pairing itself.
|
|
7
9
|
class CallDtmfCollectRequestPromptSay < Internal::Types::Model
|
|
8
10
|
field :text, -> { String }, optional: false, nullable: false
|
|
9
11
|
|
|
@@ -130,7 +130,7 @@ module Wavix
|
|
|
130
130
|
end
|
|
131
131
|
end
|
|
132
132
|
|
|
133
|
-
# Deletes the call recording identified by `id`. Deletion is permanent
|
|
133
|
+
# Deletes the call recording identified by `id`. Deletion is permanent — the audio file is unrecoverable.
|
|
134
134
|
#
|
|
135
135
|
# @param request_options [Hash]
|
|
136
136
|
# @param params [Hash]
|
|
@@ -44,7 +44,13 @@ module Wavix
|
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
# Registers a callback URL for the `on-call` or `post-call` event. Wavix sends a POST callback to the URL when the
|
|
47
|
-
# event occurs.
|
|
47
|
+
# event occurs. Creates persistent configuration that forwards call metadata to the URL on every matching call
|
|
48
|
+
# until the webhook is deleted.
|
|
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.
|
|
48
54
|
#
|
|
49
55
|
# @param request_options [Hash]
|
|
50
56
|
# @param params [Wavix::CallWebhooks::Types::CallWebhooksCreateRequest]
|
|
@@ -80,6 +86,12 @@ module Wavix
|
|
|
80
86
|
|
|
81
87
|
# Removes the call webhook for the given event type. Wavix stops sending callbacks for that event.
|
|
82
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
|
+
#
|
|
83
95
|
# @param request_options [Hash]
|
|
84
96
|
# @param params [Hash]
|
|
85
97
|
# @option request_options [String] :base_url
|
|
@@ -88,12 +100,14 @@ module Wavix
|
|
|
88
100
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
89
101
|
# @option request_options [Integer] :timeout_in_seconds
|
|
90
102
|
# @option params [Wavix::CallWebhooks::Types::DeleteCallWebhooksRequestEventType] :event_type
|
|
103
|
+
# @option params [String, nil] :expected_url
|
|
91
104
|
#
|
|
92
105
|
# @return [Wavix::Types::SuccessResponse]
|
|
93
106
|
def delete(request_options: {}, **params)
|
|
94
107
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
95
108
|
query_params = {}
|
|
96
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)
|
|
97
111
|
|
|
98
112
|
request = Wavix::Internal::JSON::Request.new(
|
|
99
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/cart/client.rb
CHANGED
|
@@ -20,7 +20,7 @@ module Wavix
|
|
|
20
20
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
21
21
|
# @option request_options [Integer] :timeout_in_seconds
|
|
22
22
|
#
|
|
23
|
-
# @return [Wavix::
|
|
23
|
+
# @return [Wavix::Types::CartResponse]
|
|
24
24
|
def get(request_options: {}, **_params)
|
|
25
25
|
request = Wavix::Internal::JSON::Request.new(
|
|
26
26
|
base_url: request_options[:base_url],
|
|
@@ -35,7 +35,7 @@ module Wavix
|
|
|
35
35
|
end
|
|
36
36
|
code = response.code.to_i
|
|
37
37
|
if code.between?(200, 299)
|
|
38
|
-
Wavix::
|
|
38
|
+
Wavix::Types::CartResponse.load(response.body)
|
|
39
39
|
else
|
|
40
40
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
41
41
|
raise error_class.new(response.body, code: code)
|
|
@@ -52,7 +52,7 @@ module Wavix
|
|
|
52
52
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
53
53
|
# @option request_options [Integer] :timeout_in_seconds
|
|
54
54
|
#
|
|
55
|
-
# @return [Array[
|
|
55
|
+
# @return [Array[Wavix::Types::AvailableNumber]]
|
|
56
56
|
def add(request_options: {}, **params)
|
|
57
57
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
58
58
|
request = Wavix::Internal::JSON::Request.new(
|
|
@@ -84,7 +84,7 @@ module Wavix
|
|
|
84
84
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
85
85
|
# @option request_options [Integer] :timeout_in_seconds
|
|
86
86
|
#
|
|
87
|
-
# @return [Wavix::
|
|
87
|
+
# @return [Wavix::Types::SuccessResponse]
|
|
88
88
|
def remove(request_options: {}, **params)
|
|
89
89
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
90
90
|
request = Wavix::Internal::JSON::Request.new(
|
|
@@ -101,15 +101,15 @@ module Wavix
|
|
|
101
101
|
end
|
|
102
102
|
code = response.code.to_i
|
|
103
103
|
if code.between?(200, 299)
|
|
104
|
-
Wavix::
|
|
104
|
+
Wavix::Types::SuccessResponse.load(response.body)
|
|
105
105
|
else
|
|
106
106
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
107
107
|
raise error_class.new(response.body, code: code)
|
|
108
108
|
end
|
|
109
109
|
end
|
|
110
110
|
|
|
111
|
-
# Purchases the listed phone numbers from the cart. Activation and monthly fees are
|
|
112
|
-
# balance.
|
|
111
|
+
# Purchases the listed phone numbers from the cart. Activation and monthly fees are debited from the account
|
|
112
|
+
# balance immediately, and the purchase cannot be reversed through this API.
|
|
113
113
|
#
|
|
114
114
|
# @param request_options [Hash]
|
|
115
115
|
# @param params [Wavix::Cart::Types::CheckoutCartRequest]
|
|
@@ -119,7 +119,7 @@ module Wavix
|
|
|
119
119
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
120
120
|
# @option request_options [Integer] :timeout_in_seconds
|
|
121
121
|
#
|
|
122
|
-
# @return [Wavix::
|
|
122
|
+
# @return [Wavix::Types::SuccessResponse]
|
|
123
123
|
def checkout(request_options: {}, **params)
|
|
124
124
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
125
125
|
request = Wavix::Internal::JSON::Request.new(
|
|
@@ -136,7 +136,7 @@ module Wavix
|
|
|
136
136
|
end
|
|
137
137
|
code = response.code.to_i
|
|
138
138
|
if code.between?(200, 299)
|
|
139
|
-
Wavix::
|
|
139
|
+
Wavix::Types::SuccessResponse.load(response.body)
|
|
140
140
|
else
|
|
141
141
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
142
142
|
raise error_class.new(response.body, code: code)
|
data/lib/wavix/cdrs/client.rb
CHANGED
|
@@ -102,7 +102,9 @@ 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
|
|
107
|
+
# insufficient-funds error when the balance cannot cover it.
|
|
106
108
|
#
|
|
107
109
|
# @param request_options [Hash]
|
|
108
110
|
# @param params [Wavix::Cdrs::Types::CdrRetranscriptionRequest]
|
|
@@ -22,11 +22,11 @@ module Wavix
|
|
|
22
22
|
|
|
23
23
|
field :uuid, -> { String }, optional: true, nullable: false
|
|
24
24
|
|
|
25
|
-
field :disposition, -> { Wavix::
|
|
25
|
+
field :disposition, -> { Wavix::Types::CallDisposition }, optional: true, nullable: false
|
|
26
26
|
|
|
27
|
-
field :page, -> { Integer }, optional:
|
|
27
|
+
field :page, -> { Integer }, optional: true, nullable: false
|
|
28
28
|
|
|
29
|
-
field :per_page, -> { Integer }, optional:
|
|
29
|
+
field :per_page, -> { Integer }, optional: true, nullable: false
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
end
|
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
|
},
|
|
@@ -10,7 +10,10 @@ module Wavix
|
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
# Validates a single phone number and returns line type, carrier, portability, and reachability details.
|
|
13
|
+
# Validates a single phone number and returns line type, carrier, portability, and reachability details. The
|
|
14
|
+
# response's `error_code` is a per-number result code (`000` success; `013` internal error; `021` invalid format;
|
|
15
|
+
# `041` remote timeout; `042` remote query failed; `091` insufficient funds) — distinct from the HTTP status codes
|
|
16
|
+
# below.
|
|
14
17
|
#
|
|
15
18
|
# @param request_options [Hash]
|
|
16
19
|
# @param params [Hash]
|
|
@@ -22,7 +25,7 @@ module Wavix
|
|
|
22
25
|
# @option params [String] :phone_number
|
|
23
26
|
# @option params [Wavix::Types::PhoneNumberValidationType] :type
|
|
24
27
|
#
|
|
25
|
-
# @return [Wavix::
|
|
28
|
+
# @return [Wavix::Types::PhoneValidationResponse]
|
|
26
29
|
def get(request_options: {}, **params)
|
|
27
30
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
28
31
|
query_params = {}
|
|
@@ -43,7 +46,7 @@ module Wavix
|
|
|
43
46
|
end
|
|
44
47
|
code = response.code.to_i
|
|
45
48
|
if code.between?(200, 299)
|
|
46
|
-
Wavix::
|
|
49
|
+
Wavix::Types::PhoneValidationResponse.load(response.body)
|
|
47
50
|
else
|
|
48
51
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
49
52
|
raise error_class.new(response.body, code: code)
|
|
@@ -8,9 +8,9 @@ module Wavix
|
|
|
8
8
|
|
|
9
9
|
field :type, -> { Wavix::Types::PhoneNumberValidationType }, optional: false, nullable: false
|
|
10
10
|
|
|
11
|
-
field :async, -> { Internal::Types::Boolean }, optional:
|
|
11
|
+
field :async, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
12
12
|
|
|
13
|
-
field :force, -> { Internal::Types::Boolean }, optional:
|
|
13
|
+
field :force, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
end
|
data/lib/wavix/numbers/client.rb
CHANGED
|
@@ -71,7 +71,7 @@ module Wavix
|
|
|
71
71
|
# @option params [Integer, nil] :ids
|
|
72
72
|
# @option params [String, nil] :dids
|
|
73
73
|
#
|
|
74
|
-
# @return [Wavix::
|
|
74
|
+
# @return [Wavix::Types::SuccessResponse]
|
|
75
75
|
def delete(request_options: {}, **params)
|
|
76
76
|
params = Wavix::Internal::Types::Utils.normalize_keys(params)
|
|
77
77
|
query_params = {}
|
|
@@ -92,7 +92,7 @@ module Wavix
|
|
|
92
92
|
end
|
|
93
93
|
code = response.code.to_i
|
|
94
94
|
if code.between?(200, 299)
|
|
95
|
-
Wavix::
|
|
95
|
+
Wavix::Types::SuccessResponse.load(response.body)
|
|
96
96
|
else
|
|
97
97
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
98
98
|
raise error_class.new(response.body, code: code)
|
|
@@ -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
|
|
@@ -21,7 +21,7 @@ module Wavix
|
|
|
21
21
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
22
22
|
# @option request_options [Integer] :timeout_in_seconds
|
|
23
23
|
#
|
|
24
|
-
# @return [Wavix::
|
|
24
|
+
# @return [Wavix::Types::ProfileConfigResponse]
|
|
25
25
|
def get(request_options: {}, **_params)
|
|
26
26
|
request = Wavix::Internal::JSON::Request.new(
|
|
27
27
|
base_url: request_options[:base_url],
|
|
@@ -36,7 +36,7 @@ module Wavix
|
|
|
36
36
|
end
|
|
37
37
|
code = response.code.to_i
|
|
38
38
|
if code.between?(200, 299)
|
|
39
|
-
Wavix::
|
|
39
|
+
Wavix::Types::ProfileConfigResponse.load(response.body)
|
|
40
40
|
else
|
|
41
41
|
error_class = Wavix::Errors::ResponseError.subclass_for_code(code)
|
|
42
42
|
raise error_class.new(response.body, code: code)
|
|
@@ -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
|