messente_api 2.4.0 → 2.5.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/Gemfile.lock +74 -0
- data/README.md +2 -2
- data/docs/BulkMessagingApi.md +1 -1
- data/docs/OmnimessageApi.md +1 -1
- data/docs/OmnimessageMessagesInner.md +46 -45
- data/docs/Rcs.md +32 -0
- data/docs/RcsCardContent.md +24 -0
- data/docs/RcsCardOrientation.md +15 -0
- data/docs/RcsCardWidth.md +15 -0
- data/docs/RcsCarouselCard.md +20 -0
- data/docs/RcsContentInfo.md +22 -0
- data/docs/RcsCreateCalendarEventAction.md +24 -0
- data/docs/RcsDialAction.md +18 -0
- data/docs/RcsImageAlignment.md +15 -0
- data/docs/RcsLatLng.md +20 -0
- data/docs/RcsMedia.md +20 -0
- data/docs/RcsMediaHeight.md +15 -0
- data/docs/RcsOpenUrlAction.md +24 -0
- data/docs/RcsOpenUrlApplication.md +15 -0
- data/docs/RcsRichCard.md +20 -0
- data/docs/RcsStandaloneCard.md +22 -0
- data/docs/RcsSuggestedAction.md +32 -0
- data/docs/RcsSuggestedReply.md +20 -0
- data/docs/RcsSuggestion.md +20 -0
- data/docs/RcsViewLocationAction.md +22 -0
- data/docs/RcsWebviewViewMode.md +15 -0
- data/docs/StatisticsReportSettings.md +1 -1
- data/lib/messente_api/api/account_balance_api.rb +1 -1
- data/lib/messente_api/api/blacklist_api.rb +1 -1
- data/lib/messente_api/api/bulk_messaging_api.rb +1 -1
- data/lib/messente_api/api/contacts_api.rb +1 -1
- data/lib/messente_api/api/delivery_report_api.rb +1 -1
- data/lib/messente_api/api/groups_api.rb +1 -1
- data/lib/messente_api/api/number_lookup_api.rb +1 -1
- data/lib/messente_api/api/number_verification_api.rb +1 -1
- data/lib/messente_api/api/omnimessage_api.rb +1 -1
- data/lib/messente_api/api/pricing_api.rb +1 -1
- data/lib/messente_api/api/statistics_api.rb +1 -1
- data/lib/messente_api/api/whats_app_templates_api.rb +1 -1
- data/lib/messente_api/api_client.rb +1 -1
- data/lib/messente_api/api_error.rb +1 -1
- data/lib/messente_api/configuration.rb +1 -1
- data/lib/messente_api/models/bulk_omni_message_create_success_response.rb +1 -1
- data/lib/messente_api/models/bulk_omni_message_create_success_response_messages_inner.rb +1 -1
- data/lib/messente_api/models/bulk_omnimessage.rb +1 -1
- data/lib/messente_api/models/channel.rb +3 -3
- data/lib/messente_api/models/contact_envelope.rb +1 -1
- data/lib/messente_api/models/contact_fields.rb +1 -1
- data/lib/messente_api/models/contact_list_envelope.rb +1 -1
- data/lib/messente_api/models/contact_response_fields.rb +1 -1
- data/lib/messente_api/models/contact_update_fields.rb +1 -1
- data/lib/messente_api/models/delivery_report_response.rb +1 -1
- data/lib/messente_api/models/delivery_result.rb +1 -1
- data/lib/messente_api/models/error_code_omnichannel.rb +1 -1
- data/lib/messente_api/models/error_code_omnichannel_machine.rb +1 -1
- data/lib/messente_api/models/error_code_phonebook.rb +1 -1
- data/lib/messente_api/models/error_code_statistics.rb +1 -1
- data/lib/messente_api/models/error_item_number_lookup.rb +1 -1
- data/lib/messente_api/models/error_item_number_lookup_error.rb +1 -1
- data/lib/messente_api/models/error_item_omnichannel.rb +1 -1
- data/lib/messente_api/models/error_item_phonebook.rb +1 -1
- data/lib/messente_api/models/error_item_statistics.rb +1 -1
- data/lib/messente_api/models/error_number_lookup.rb +1 -1
- data/lib/messente_api/models/error_omnichannel.rb +1 -1
- data/lib/messente_api/models/error_phonebook.rb +1 -1
- data/lib/messente_api/models/error_statistics.rb +1 -1
- data/lib/messente_api/models/error_title_omnichannel.rb +1 -1
- data/lib/messente_api/models/error_title_phonebook.rb +1 -1
- data/lib/messente_api/models/fetch_blacklist_success.rb +1 -1
- data/lib/messente_api/models/group_envelope.rb +1 -1
- data/lib/messente_api/models/group_list_envelope.rb +1 -1
- data/lib/messente_api/models/group_name.rb +1 -1
- data/lib/messente_api/models/group_response_fields.rb +1 -1
- data/lib/messente_api/models/message_result.rb +1 -1
- data/lib/messente_api/models/mobile_network.rb +1 -1
- data/lib/messente_api/models/number_to_blacklist.rb +1 -1
- data/lib/messente_api/models/numbers_to_investigate.rb +1 -1
- data/lib/messente_api/models/omni_message_create_success_response.rb +1 -1
- data/lib/messente_api/models/omnimessage.rb +1 -1
- data/lib/messente_api/models/omnimessage_messages_inner.rb +9 -10
- data/lib/messente_api/models/price.rb +1 -1
- data/lib/messente_api/models/price_info.rb +1 -1
- data/lib/messente_api/models/price_networks_inner.rb +1 -1
- data/lib/messente_api/models/priority.rb +1 -1
- data/lib/messente_api/models/{telegram.rb → rcs.rb} +98 -43
- data/lib/messente_api/models/rcs_card_content.rb +298 -0
- data/lib/messente_api/models/rcs_card_orientation.rb +40 -0
- data/lib/messente_api/models/rcs_card_width.rb +40 -0
- data/lib/messente_api/models/rcs_carousel_card.rb +291 -0
- data/lib/messente_api/models/rcs_content_info.rb +251 -0
- data/lib/messente_api/models/rcs_create_calendar_event_action.rb +312 -0
- data/lib/messente_api/models/rcs_dial_action.rb +223 -0
- data/lib/messente_api/models/rcs_image_alignment.rb +40 -0
- data/lib/messente_api/models/rcs_lat_lng.rb +240 -0
- data/lib/messente_api/models/rcs_media.rb +260 -0
- data/lib/messente_api/models/rcs_media_height.rb +41 -0
- data/lib/messente_api/models/rcs_open_url_action.rb +299 -0
- data/lib/messente_api/models/rcs_open_url_application.rb +40 -0
- data/lib/messente_api/models/rcs_rich_card.rb +224 -0
- data/lib/messente_api/models/rcs_standalone_card.rb +276 -0
- data/lib/messente_api/models/rcs_suggested_action.rb +350 -0
- data/lib/messente_api/models/rcs_suggested_reply.rb +278 -0
- data/lib/messente_api/models/rcs_suggestion.rb +224 -0
- data/lib/messente_api/models/rcs_view_location_action.rb +237 -0
- data/lib/messente_api/models/rcs_webview_view_mode.rb +41 -0
- data/lib/messente_api/models/sms.rb +1 -1
- data/lib/messente_api/models/statistics_report.rb +1 -1
- data/lib/messente_api/models/statistics_report_settings.rb +2 -2
- data/lib/messente_api/models/statistics_report_success.rb +1 -1
- data/lib/messente_api/models/status.rb +1 -1
- data/lib/messente_api/models/sync_number_lookup_result.rb +1 -1
- data/lib/messente_api/models/sync_number_lookup_success.rb +1 -1
- data/lib/messente_api/models/text_store.rb +1 -1
- data/lib/messente_api/models/viber.rb +1 -1
- data/lib/messente_api/models/viber_video.rb +1 -1
- data/lib/messente_api/models/whats_app.rb +1 -1
- data/lib/messente_api/models/whats_app_audio.rb +1 -1
- data/lib/messente_api/models/whats_app_component.rb +1 -1
- data/lib/messente_api/models/whats_app_currency.rb +1 -1
- data/lib/messente_api/models/whats_app_datetime.rb +1 -1
- data/lib/messente_api/models/whats_app_document.rb +1 -1
- data/lib/messente_api/models/whats_app_image.rb +1 -1
- data/lib/messente_api/models/whats_app_language.rb +1 -1
- data/lib/messente_api/models/whats_app_media.rb +1 -1
- data/lib/messente_api/models/whats_app_parameter.rb +1 -1
- data/lib/messente_api/models/whats_app_sticker.rb +1 -1
- data/lib/messente_api/models/whats_app_template.rb +1 -1
- data/lib/messente_api/models/whats_app_text.rb +1 -1
- data/lib/messente_api/models/whats_app_video.rb +1 -1
- data/lib/messente_api/models/whatsapp_button_type.rb +1 -1
- data/lib/messente_api/models/whatsapp_component_type.rb +1 -1
- data/lib/messente_api/models/whatsapp_create_template_request.rb +1 -1
- data/lib/messente_api/models/whatsapp_create_template_response.rb +1 -1
- data/lib/messente_api/models/whatsapp_header_format.rb +1 -1
- data/lib/messente_api/models/whatsapp_list_templates_response.rb +1 -1
- data/lib/messente_api/models/whatsapp_otp_button_type.rb +1 -1
- data/lib/messente_api/models/whatsapp_pagination.rb +1 -1
- data/lib/messente_api/models/whatsapp_paging_cursors.rb +1 -1
- data/lib/messente_api/models/whatsapp_supported_app.rb +1 -1
- data/lib/messente_api/models/whatsapp_template_button.rb +1 -1
- data/lib/messente_api/models/whatsapp_template_category.rb +1 -1
- data/lib/messente_api/models/whatsapp_template_component.rb +1 -1
- data/lib/messente_api/models/whatsapp_template_example.rb +1 -1
- data/lib/messente_api/models/whatsapp_template_response.rb +1 -1
- data/lib/messente_api/models/whatsapp_template_status.rb +1 -1
- data/lib/messente_api/models/whatsapp_update_template_request.rb +1 -1
- data/lib/messente_api/version.rb +2 -2
- data/lib/messente_api.rb +22 -2
- data/messente_api.gemspec +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +51 -10
- data/docs/Telegram.md +0 -30
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Messente API
|
|
3
3
|
|
|
4
|
-
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber
|
|
4
|
+
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber and WhatsApp messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: messente@messente.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Messente API
|
|
3
3
|
|
|
4
|
-
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber
|
|
4
|
+
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber and WhatsApp messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: messente@messente.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Messente API
|
|
3
3
|
|
|
4
|
-
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber
|
|
4
|
+
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber and WhatsApp messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: messente@messente.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Messente API
|
|
3
3
|
|
|
4
|
-
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber
|
|
4
|
+
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber and WhatsApp messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: messente@messente.com
|
|
@@ -16,28 +16,27 @@ require 'time'
|
|
|
16
16
|
module MessenteApi
|
|
17
17
|
module OmnimessageMessagesInner
|
|
18
18
|
class << self
|
|
19
|
-
# List of class defined in
|
|
20
|
-
def
|
|
19
|
+
# List of class defined in anyOf (OpenAPI v3)
|
|
20
|
+
def openapi_any_of
|
|
21
21
|
[
|
|
22
|
+
:'Rcs',
|
|
22
23
|
:'SMS',
|
|
23
|
-
:'Telegram',
|
|
24
24
|
:'Viber',
|
|
25
25
|
:'WhatsApp'
|
|
26
26
|
]
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
# Builds the object
|
|
30
|
-
# @param [Mixed] Data to be matched against the list of
|
|
30
|
+
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
31
31
|
# @return [Object] Returns the model or the data itself
|
|
32
32
|
def build(data)
|
|
33
|
-
# Go through the list of
|
|
33
|
+
# Go through the list of anyOf items and attempt to identify the appropriate one.
|
|
34
34
|
# Note:
|
|
35
|
-
# - We do not attempt to check whether exactly one item matches.
|
|
36
35
|
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
37
36
|
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
38
37
|
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
39
38
|
# - TODO: logging when debugging is set.
|
|
40
|
-
|
|
39
|
+
openapi_any_of.each do |klass|
|
|
41
40
|
begin
|
|
42
41
|
next if klass == :AnyType # "nullable: true"
|
|
43
42
|
typed_data = find_and_cast_into_type(klass, data)
|
|
@@ -46,7 +45,7 @@ module MessenteApi
|
|
|
46
45
|
end
|
|
47
46
|
end
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
openapi_any_of.include?(:AnyType) ? data : nil
|
|
50
49
|
end
|
|
51
50
|
|
|
52
51
|
private
|
|
@@ -85,7 +84,7 @@ module MessenteApi
|
|
|
85
84
|
else # model
|
|
86
85
|
const = MessenteApi.const_get(klass)
|
|
87
86
|
if const
|
|
88
|
-
if const.respond_to?(:
|
|
87
|
+
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
89
88
|
model = const.build(data)
|
|
90
89
|
return model if model
|
|
91
90
|
else
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Messente API
|
|
3
3
|
|
|
4
|
-
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber
|
|
4
|
+
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber and WhatsApp messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: messente@messente.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Messente API
|
|
3
3
|
|
|
4
|
-
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber
|
|
4
|
+
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber and WhatsApp messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: messente@messente.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Messente API
|
|
3
3
|
|
|
4
|
-
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber
|
|
4
|
+
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber and WhatsApp messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: messente@messente.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Messente API
|
|
3
3
|
|
|
4
|
-
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber
|
|
4
|
+
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber and WhatsApp messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: messente@messente.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Messente API
|
|
3
3
|
|
|
4
|
-
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber
|
|
4
|
+
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber and WhatsApp messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: messente@messente.com
|
|
@@ -14,28 +14,29 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module MessenteApi
|
|
17
|
-
#
|
|
18
|
-
class
|
|
17
|
+
# RCS message object. Exactly one of 'text', 'content_info' or 'rich_card' must be provided.
|
|
18
|
+
class Rcs
|
|
19
|
+
# The channel used to deliver the message
|
|
20
|
+
attr_accessor :channel
|
|
21
|
+
|
|
19
22
|
# Phone number or alphanumeric sender name
|
|
20
23
|
attr_accessor :sender
|
|
21
24
|
|
|
22
|
-
# After how many minutes this channel is considered as failed and the next channel is attempted
|
|
25
|
+
# After how many minutes this channel is considered as failed and the next channel is attempted.Only one of \"ttl\" and \"validity\" can be used.
|
|
23
26
|
attr_accessor :validity
|
|
24
27
|
|
|
25
|
-
#
|
|
26
|
-
attr_accessor :
|
|
28
|
+
# After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \"ttl\" and \"validity\" can be used.
|
|
29
|
+
attr_accessor :ttl
|
|
27
30
|
|
|
28
|
-
#
|
|
29
|
-
attr_accessor :
|
|
31
|
+
# Text content of the RCS message
|
|
32
|
+
attr_accessor :text
|
|
30
33
|
|
|
31
|
-
#
|
|
32
|
-
attr_accessor :
|
|
34
|
+
# List of suggestions to include with the message
|
|
35
|
+
attr_accessor :suggestions
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
attr_accessor :audio_url
|
|
37
|
+
attr_accessor :rich_card
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
attr_accessor :channel
|
|
39
|
+
attr_accessor :content_info
|
|
39
40
|
|
|
40
41
|
class EnumAttributeValidator
|
|
41
42
|
attr_reader :datatype
|
|
@@ -62,13 +63,14 @@ module MessenteApi
|
|
|
62
63
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
63
64
|
def self.attribute_map
|
|
64
65
|
{
|
|
66
|
+
:'channel' => :'channel',
|
|
65
67
|
:'sender' => :'sender',
|
|
66
68
|
:'validity' => :'validity',
|
|
69
|
+
:'ttl' => :'ttl',
|
|
67
70
|
:'text' => :'text',
|
|
68
|
-
:'
|
|
69
|
-
:'
|
|
70
|
-
:'
|
|
71
|
-
:'channel' => :'channel'
|
|
71
|
+
:'suggestions' => :'suggestions',
|
|
72
|
+
:'rich_card' => :'rich_card',
|
|
73
|
+
:'content_info' => :'content_info'
|
|
72
74
|
}
|
|
73
75
|
end
|
|
74
76
|
|
|
@@ -80,13 +82,14 @@ module MessenteApi
|
|
|
80
82
|
# Attribute type mapping.
|
|
81
83
|
def self.openapi_types
|
|
82
84
|
{
|
|
85
|
+
:'channel' => :'String',
|
|
83
86
|
:'sender' => :'String',
|
|
84
87
|
:'validity' => :'Integer',
|
|
88
|
+
:'ttl' => :'Integer',
|
|
85
89
|
:'text' => :'String',
|
|
86
|
-
:'
|
|
87
|
-
:'
|
|
88
|
-
:'
|
|
89
|
-
:'channel' => :'String'
|
|
90
|
+
:'suggestions' => :'Array<RcsSuggestion>',
|
|
91
|
+
:'rich_card' => :'RcsRichCard',
|
|
92
|
+
:'content_info' => :'RcsContentInfo'
|
|
90
93
|
}
|
|
91
94
|
end
|
|
92
95
|
|
|
@@ -100,45 +103,53 @@ module MessenteApi
|
|
|
100
103
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
101
104
|
def initialize(attributes = {})
|
|
102
105
|
if (!attributes.is_a?(Hash))
|
|
103
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `MessenteApi::
|
|
106
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MessenteApi::Rcs` initialize method"
|
|
104
107
|
end
|
|
105
108
|
|
|
106
109
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
107
110
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
108
111
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
109
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `MessenteApi::
|
|
112
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MessenteApi::Rcs`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
110
113
|
end
|
|
111
114
|
h[k.to_sym] = v
|
|
112
115
|
}
|
|
113
116
|
|
|
117
|
+
if attributes.key?(:'channel')
|
|
118
|
+
self.channel = attributes[:'channel']
|
|
119
|
+
else
|
|
120
|
+
self.channel = 'rcs'
|
|
121
|
+
end
|
|
122
|
+
|
|
114
123
|
if attributes.key?(:'sender')
|
|
115
124
|
self.sender = attributes[:'sender']
|
|
125
|
+
else
|
|
126
|
+
self.sender = nil
|
|
116
127
|
end
|
|
117
128
|
|
|
118
129
|
if attributes.key?(:'validity')
|
|
119
130
|
self.validity = attributes[:'validity']
|
|
120
131
|
end
|
|
121
132
|
|
|
133
|
+
if attributes.key?(:'ttl')
|
|
134
|
+
self.ttl = attributes[:'ttl']
|
|
135
|
+
end
|
|
136
|
+
|
|
122
137
|
if attributes.key?(:'text')
|
|
123
138
|
self.text = attributes[:'text']
|
|
124
139
|
end
|
|
125
140
|
|
|
126
|
-
if attributes.key?(:'
|
|
127
|
-
|
|
141
|
+
if attributes.key?(:'suggestions')
|
|
142
|
+
if (value = attributes[:'suggestions']).is_a?(Array)
|
|
143
|
+
self.suggestions = value
|
|
144
|
+
end
|
|
128
145
|
end
|
|
129
146
|
|
|
130
|
-
if attributes.key?(:'
|
|
131
|
-
self.
|
|
147
|
+
if attributes.key?(:'rich_card')
|
|
148
|
+
self.rich_card = attributes[:'rich_card']
|
|
132
149
|
end
|
|
133
150
|
|
|
134
|
-
if attributes.key?(:'
|
|
135
|
-
self.
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
if attributes.key?(:'channel')
|
|
139
|
-
self.channel = attributes[:'channel']
|
|
140
|
-
else
|
|
141
|
-
self.channel = 'telegram'
|
|
151
|
+
if attributes.key?(:'content_info')
|
|
152
|
+
self.content_info = attributes[:'content_info']
|
|
142
153
|
end
|
|
143
154
|
end
|
|
144
155
|
|
|
@@ -147,6 +158,18 @@ module MessenteApi
|
|
|
147
158
|
def list_invalid_properties
|
|
148
159
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
149
160
|
invalid_properties = Array.new
|
|
161
|
+
if @sender.nil?
|
|
162
|
+
invalid_properties.push('invalid value for "sender", sender cannot be nil.')
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if !@text.nil? && @text.to_s.length > 3072
|
|
166
|
+
invalid_properties.push('invalid value for "text", the character length must be smaller than or equal to 3072.')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if !@suggestions.nil? && @suggestions.length > 11
|
|
170
|
+
invalid_properties.push('invalid value for "suggestions", number of items must be less than or equal to 11.')
|
|
171
|
+
end
|
|
172
|
+
|
|
150
173
|
invalid_properties
|
|
151
174
|
end
|
|
152
175
|
|
|
@@ -154,33 +177,65 @@ module MessenteApi
|
|
|
154
177
|
# @return true if the model is valid
|
|
155
178
|
def valid?
|
|
156
179
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
157
|
-
channel_validator = EnumAttributeValidator.new('String', ["
|
|
180
|
+
channel_validator = EnumAttributeValidator.new('String', ["rcs"])
|
|
158
181
|
return false unless channel_validator.valid?(@channel)
|
|
182
|
+
return false if @sender.nil?
|
|
183
|
+
return false if !@text.nil? && @text.to_s.length > 3072
|
|
184
|
+
return false if !@suggestions.nil? && @suggestions.length > 11
|
|
159
185
|
true
|
|
160
186
|
end
|
|
161
187
|
|
|
162
188
|
# Custom attribute writer method checking allowed values (enum).
|
|
163
189
|
# @param [Object] channel Object to be assigned
|
|
164
190
|
def channel=(channel)
|
|
165
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
191
|
+
validator = EnumAttributeValidator.new('String', ["rcs"])
|
|
166
192
|
unless validator.valid?(channel)
|
|
167
193
|
fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
|
|
168
194
|
end
|
|
169
195
|
@channel = channel
|
|
170
196
|
end
|
|
171
197
|
|
|
198
|
+
# Custom attribute writer method with validation
|
|
199
|
+
# @param [Object] text Value to be assigned
|
|
200
|
+
def text=(text)
|
|
201
|
+
if text.nil?
|
|
202
|
+
fail ArgumentError, 'text cannot be nil'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if text.to_s.length > 3072
|
|
206
|
+
fail ArgumentError, 'invalid value for "text", the character length must be smaller than or equal to 3072.'
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
@text = text
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Custom attribute writer method with validation
|
|
213
|
+
# @param [Object] suggestions Value to be assigned
|
|
214
|
+
def suggestions=(suggestions)
|
|
215
|
+
if suggestions.nil?
|
|
216
|
+
fail ArgumentError, 'suggestions cannot be nil'
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if suggestions.length > 11
|
|
220
|
+
fail ArgumentError, 'invalid value for "suggestions", number of items must be less than or equal to 11.'
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
@suggestions = suggestions
|
|
224
|
+
end
|
|
225
|
+
|
|
172
226
|
# Checks equality by comparing each attribute.
|
|
173
227
|
# @param [Object] Object to be compared
|
|
174
228
|
def ==(o)
|
|
175
229
|
return true if self.equal?(o)
|
|
176
230
|
self.class == o.class &&
|
|
231
|
+
channel == o.channel &&
|
|
177
232
|
sender == o.sender &&
|
|
178
233
|
validity == o.validity &&
|
|
234
|
+
ttl == o.ttl &&
|
|
179
235
|
text == o.text &&
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
channel == o.channel
|
|
236
|
+
suggestions == o.suggestions &&
|
|
237
|
+
rich_card == o.rich_card &&
|
|
238
|
+
content_info == o.content_info
|
|
184
239
|
end
|
|
185
240
|
|
|
186
241
|
# @see the `==` method
|
|
@@ -192,7 +247,7 @@ module MessenteApi
|
|
|
192
247
|
# Calculates hash code according to all attributes.
|
|
193
248
|
# @return [Integer] Hash code
|
|
194
249
|
def hash
|
|
195
|
-
[sender, validity,
|
|
250
|
+
[channel, sender, validity, ttl, text, suggestions, rich_card, content_info].hash
|
|
196
251
|
end
|
|
197
252
|
|
|
198
253
|
# Builds the object from hash
|