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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppMessageStatus
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
SENT = "sent"
|
|
9
|
+
DELIVERED = "delivered"
|
|
10
|
+
UNDELIVERED = "undelivered"
|
|
11
|
+
EXPIRED = "expired"
|
|
12
|
+
REJECTED = "rejected"
|
|
13
|
+
UNKNOWN = "unknown"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# The template that a WhatsApp message was sent with. Returned in `template` by `whatsapp_messages_send`.
|
|
6
|
+
class WhatsAppMessageTemplate < Internal::Types::Model
|
|
7
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :language, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# An RFC 9457 problem document that describes an error from the WhatsApp API. Returned with the
|
|
6
|
+
# `application/problem+json` content type.
|
|
7
|
+
class WhatsAppProblem < Internal::Types::Model
|
|
8
|
+
field :type, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :status, -> { Integer }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :detail, -> { String }, optional: false, nullable: false
|
|
15
|
+
|
|
16
|
+
field :instance, -> { String }, optional: false, nullable: false
|
|
17
|
+
|
|
18
|
+
field :error_class, -> { Wavix::Types::WhatsAppProblemErrorClass }, optional: true, nullable: false
|
|
19
|
+
|
|
20
|
+
field :error_code, -> { String }, optional: true, nullable: false
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppProblemErrorClass
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
PERMANENT = "permanent"
|
|
9
|
+
RETRIABLE = "retriable"
|
|
10
|
+
RATE_LIMITED = "rate_limited"
|
|
11
|
+
INVALID_TEMPLATE = "invalid_template"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
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
|
|
7
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :language, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :placeholders, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :header, -> { Wavix::Types::WhatsAppSendTemplateHeader }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :buttons, -> { Internal::Types::Array[Wavix::Types::WhatsAppSendTemplateButton] }, optional: true, nullable: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
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
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Header content, required only when the template's `header` component needs one. Each `type` requires specific
|
|
6
|
+
# fields and rejects the others, as listed in the `type` description. Consumed in `template.header` by
|
|
7
|
+
# `whatsapp_messages_send`.
|
|
8
|
+
class WhatsAppSendTemplateHeader < Internal::Types::Model
|
|
9
|
+
field :type, -> { Wavix::Types::WhatsAppSendTemplateHeaderType }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :placeholder, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :media_url, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :filename, -> { String }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :latitude, -> { Integer }, optional: true, nullable: false
|
|
18
|
+
|
|
19
|
+
field :longitude, -> { Integer }, optional: true, nullable: false
|
|
20
|
+
|
|
21
|
+
field :parameter_name, -> { String }, optional: true, nullable: false
|
|
22
|
+
|
|
23
|
+
field :text, -> { String }, optional: true, nullable: false
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppSendTemplateHeaderType
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
TEXT = "text"
|
|
9
|
+
TEXT_NAMED_PARAMETERS = "text_named_parameters"
|
|
10
|
+
IMAGE = "image"
|
|
11
|
+
VIDEO = "video"
|
|
12
|
+
DOCUMENT = "document"
|
|
13
|
+
LOCATION = "location"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A WhatsApp sender, which is a phone number registered with WhatsApp in one of your account's WhatsApp Business
|
|
6
|
+
# Accounts. Returned by `whatsapp_senders_list` and `whatsapp_senders_get`.
|
|
7
|
+
class WhatsAppSender < Internal::Types::Model
|
|
8
|
+
field :phone_number, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :display_name, -> { String }, optional: false, nullable: true
|
|
11
|
+
|
|
12
|
+
field :status, -> { Wavix::Types::WhatsAppSenderStatus }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :quality_rating, -> { Wavix::Types::WhatsAppSenderQualityRating }, optional: false, nullable: true
|
|
15
|
+
|
|
16
|
+
field :waba, -> { Wavix::Types::WhatsAppWaba }, optional: false, nullable: false
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Returned by `whatsapp_senders_list`.
|
|
6
|
+
class WhatsAppSenderListResponse < Internal::Types::Model
|
|
7
|
+
field :senders, -> { Internal::Types::Array[Wavix::Types::WhatsAppSender] }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :pagination, -> { Wavix::Types::Pagination }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppSenderStatus
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
BANNED = "banned"
|
|
9
|
+
CONNECTED = "connected"
|
|
10
|
+
DELETED = "deleted"
|
|
11
|
+
DISCONNECTED = "disconnected"
|
|
12
|
+
FLAGGED = "flagged"
|
|
13
|
+
MIGRATED = "migrated"
|
|
14
|
+
PENDING = "pending"
|
|
15
|
+
RATE_LIMITED = "rate_limited"
|
|
16
|
+
RESTRICTED = "restricted"
|
|
17
|
+
UNKNOWN = "unknown"
|
|
18
|
+
UNVERIFIED = "unverified"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A WhatsApp message template with its review status and components. Returned by `whatsapp_templates_list`,
|
|
6
|
+
# `whatsapp_templates_get`, and `whatsapp_templates_create`.
|
|
7
|
+
class WhatsAppTemplate < Internal::Types::Model
|
|
8
|
+
field :uuid, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :language, -> { String }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :category, -> { Wavix::Types::WhatsAppTemplateCategory }, optional: false, nullable: false
|
|
15
|
+
|
|
16
|
+
field :status, -> { Wavix::Types::WhatsAppTemplateStatus }, optional: false, nullable: false
|
|
17
|
+
|
|
18
|
+
field :quality_rating, -> { Wavix::Types::WhatsAppTemplateQualityRating }, optional: false, nullable: true
|
|
19
|
+
|
|
20
|
+
field :submitted_at, -> { String }, optional: true, nullable: false
|
|
21
|
+
|
|
22
|
+
field :components, -> { Internal::Types::Array[Wavix::Types::WhatsAppTemplateResponseComponent] }, optional: false, nullable: false
|
|
23
|
+
|
|
24
|
+
field :waba, -> { Wavix::Types::WhatsAppWaba }, optional: false, nullable: false
|
|
25
|
+
|
|
26
|
+
field :created_at, -> { String }, optional: false, nullable: false
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Body of a new WhatsApp template. Required, exactly once. Consumed by `whatsapp_templates_create`.
|
|
6
|
+
class WhatsAppTemplateBodyComponentRequest < Internal::Types::Model
|
|
7
|
+
field :text, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :example, -> { Wavix::Types::WhatsAppTemplateBodyComponentRequestExample }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Sample values for the placeholders in the body text.
|
|
6
|
+
class WhatsAppTemplateBodyComponentRequestExample < Internal::Types::Model
|
|
7
|
+
field :body_text, -> { Internal::Types::Array[Internal::Types::Array[String]] }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A button in the `buttons` component of a new WhatsApp template. Consumed by `whatsapp_templates_create`. The
|
|
6
|
+
# `type` field selects the variant.
|
|
7
|
+
class WhatsAppTemplateButtonRequest < Internal::Types::Model
|
|
8
|
+
extend Wavix::Internal::Types::Union
|
|
9
|
+
|
|
10
|
+
discriminant :type
|
|
11
|
+
|
|
12
|
+
member -> { Wavix::Types::WhatsAppTemplateQuickReplyButtonRequest }, key: "QUICK_REPLY"
|
|
13
|
+
|
|
14
|
+
member -> { Wavix::Types::WhatsAppTemplateURLButtonRequest }, key: "URL"
|
|
15
|
+
|
|
16
|
+
member -> { Wavix::Types::WhatsAppTemplatePhoneNumberButtonRequest }, key: "PHONE_NUMBER"
|
|
17
|
+
|
|
18
|
+
member -> { Wavix::Types::WhatsAppTemplateCopyCodeButtonRequest }, key: "COPY_CODE"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Buttons component of a new WhatsApp template. Consumed by `whatsapp_templates_create`.
|
|
6
|
+
class WhatsAppTemplateButtonsComponentRequest < Internal::Types::Model
|
|
7
|
+
field :buttons, -> { Internal::Types::Array[Wavix::Types::WhatsAppTemplateButtonRequest] }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A header, body, footer, or buttons component of a new WhatsApp template. Consumed by `whatsapp_templates_create`.
|
|
6
|
+
# The `type` field selects the variant, and a `header` component is further selected by `format`.
|
|
7
|
+
class WhatsAppTemplateComponentRequest < Internal::Types::Model
|
|
8
|
+
extend Wavix::Internal::Types::Union
|
|
9
|
+
|
|
10
|
+
discriminant :type
|
|
11
|
+
|
|
12
|
+
member -> { Wavix::Types::WhatsAppTemplateHeaderComponentRequest }, key: "HEADER"
|
|
13
|
+
|
|
14
|
+
member -> { Wavix::Types::WhatsAppTemplateBodyComponentRequest }, key: "BODY"
|
|
15
|
+
|
|
16
|
+
member -> { Wavix::Types::WhatsAppTemplateFooterComponentRequest }, key: "FOOTER"
|
|
17
|
+
|
|
18
|
+
member -> { Wavix::Types::WhatsAppTemplateButtonsComponentRequest }, key: "BUTTONS"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Button that copies a code to the clipboard. Consumed by `whatsapp_templates_create`.
|
|
6
|
+
class WhatsAppTemplateCopyCodeButtonRequest < Internal::Types::Model
|
|
7
|
+
field :example, -> { String }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Attributes of a new WhatsApp template. Consumed by `whatsapp_templates_create`.
|
|
6
|
+
class WhatsAppTemplateCreateRequest < Internal::Types::Model
|
|
7
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :language, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :category, -> { Wavix::Types::WhatsAppTemplateCreateRequestCategory }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :components, -> { Internal::Types::Array[Wavix::Types::WhatsAppTemplateComponentRequest] }, optional: false, nullable: false
|
|
14
|
+
|
|
15
|
+
field :waba_id, -> { String }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :sender, -> { String }, optional: true, nullable: false
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Footer of a new WhatsApp template. Consumed by `whatsapp_templates_create`.
|
|
6
|
+
class WhatsAppTemplateFooterComponentRequest < Internal::Types::Model
|
|
7
|
+
field :text, -> { String }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Header of a new WhatsApp template. Consumed by `whatsapp_templates_create`. The `format` field selects the
|
|
6
|
+
# variant.
|
|
7
|
+
class WhatsAppTemplateHeaderComponentRequest < Internal::Types::Model
|
|
8
|
+
extend Wavix::Internal::Types::Union
|
|
9
|
+
|
|
10
|
+
discriminant :format
|
|
11
|
+
|
|
12
|
+
member -> { Wavix::Types::WhatsAppTemplateTextHeaderComponentRequest }, key: "TEXT"
|
|
13
|
+
|
|
14
|
+
member -> { Wavix::Types::WhatsAppTemplateMediaHeaderComponentRequest }, key: "IMAGE"
|
|
15
|
+
|
|
16
|
+
member -> { Wavix::Types::WhatsAppTemplateMediaHeaderComponentRequest }, key: "VIDEO"
|
|
17
|
+
|
|
18
|
+
member -> { Wavix::Types::WhatsAppTemplateMediaHeaderComponentRequest }, key: "DOCUMENT"
|
|
19
|
+
|
|
20
|
+
member -> { Wavix::Types::WhatsAppTemplateLocationHeaderComponentRequest }, key: "LOCATION"
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Location header of a new WhatsApp template. Takes neither `text` nor `example`. Consumed by
|
|
6
|
+
# `whatsapp_templates_create`.
|
|
7
|
+
class WhatsAppTemplateLocationHeaderComponentRequest < Internal::Types::Model
|
|
8
|
+
field :type, -> { Wavix::Types::WhatsAppTemplateLocationHeaderComponentRequestType }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module Wavix
|
|
4
4
|
module Types
|
|
5
|
-
module
|
|
5
|
+
module WhatsAppTemplateLocationHeaderComponentRequestType
|
|
6
6
|
extend Wavix::Internal::Types::Enum
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
FAILED = "failed"
|
|
8
|
+
HEADER = "header"
|
|
10
9
|
end
|
|
11
10
|
end
|
|
12
11
|
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Media header of a new WhatsApp template. Takes no `text`. Consumed by `whatsapp_templates_create`.
|
|
6
|
+
class WhatsAppTemplateMediaHeaderComponentRequest < Internal::Types::Model
|
|
7
|
+
field :type, -> { Wavix::Types::WhatsAppTemplateMediaHeaderComponentRequestType }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :example, -> { Wavix::Types::WhatsAppTemplateMediaHeaderComponentRequestExample }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Sample media file.
|
|
6
|
+
class WhatsAppTemplateMediaHeaderComponentRequestExample < Internal::Types::Model
|
|
7
|
+
field :header_handle, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Returned by `whatsapp_templates_list`.
|
|
6
|
+
class WhatsAppTemplatePageResponse < Internal::Types::Model
|
|
7
|
+
field :templates, -> { Internal::Types::Array[Wavix::Types::WhatsAppTemplate] }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :pagination, -> { Wavix::Types::Pagination }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Button that calls a phone number. Consumed by `whatsapp_templates_create`.
|
|
6
|
+
class WhatsAppTemplatePhoneNumberButtonRequest < Internal::Types::Model
|
|
7
|
+
field :text, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :phone_number, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Button that sends its label back as a reply. Consumed by `whatsapp_templates_create`.
|
|
6
|
+
class WhatsAppTemplateQuickReplyButtonRequest < Internal::Types::Model
|
|
7
|
+
field :text, -> { String }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Returned by `whatsapp_templates_get` and `whatsapp_templates_create`.
|
|
6
|
+
class WhatsAppTemplateResponse < Internal::Types::Model
|
|
7
|
+
field :template, -> { Wavix::Types::WhatsAppTemplate }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A component of a stored WhatsApp template. Returned inside templates by `whatsapp_templates_list`,
|
|
6
|
+
# `whatsapp_templates_get`, and `whatsapp_templates_create`. Section types other than header, body, footer, and
|
|
7
|
+
# buttons can carry fields of their own.
|
|
8
|
+
class WhatsAppTemplateResponseComponent < Internal::Types::Model
|
|
9
|
+
field :type, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :format, -> { Wavix::Types::WhatsAppTemplateResponseComponentFormat }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :text, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :example, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :buttons, -> { Internal::Types::Array[Internal::Types::Hash[String, Object]] }, optional: true, nullable: false
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppTemplateResponseComponentFormat
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
TEXT = "text"
|
|
9
|
+
IMAGE = "image"
|
|
10
|
+
VIDEO = "video"
|
|
11
|
+
DOCUMENT = "document"
|
|
12
|
+
LOCATION = "location"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppTemplateStatus
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
DRAFT = "draft"
|
|
9
|
+
PENDING = "pending"
|
|
10
|
+
APPROVED = "approved"
|
|
11
|
+
REJECTED = "rejected"
|
|
12
|
+
PAUSED = "paused"
|
|
13
|
+
FLAGGED = "flagged"
|
|
14
|
+
DISABLED = "disabled"
|
|
15
|
+
IN_APPEAL = "in_appeal"
|
|
16
|
+
PENDING_DELETION = "pending_deletion"
|
|
17
|
+
DELETED = "deleted"
|
|
18
|
+
UNKNOWN = "unknown"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|