messente_api 2.2.0 → 2.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.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -1
  3. data/docs/AccountBalanceApi.md +161 -0
  4. data/docs/NumberVerificationApi.md +195 -0
  5. data/docs/Price.md +24 -0
  6. data/docs/PriceNetworksInner.md +22 -0
  7. data/docs/PricingApi.md +167 -0
  8. data/docs/WhatsApp.md +13 -1
  9. data/docs/WhatsAppAudio.md +22 -0
  10. data/docs/WhatsAppDocument.md +26 -0
  11. data/docs/WhatsAppImage.md +24 -0
  12. data/docs/WhatsAppParameter.md +5 -1
  13. data/docs/WhatsAppSticker.md +24 -0
  14. data/docs/WhatsAppTemplate.md +1 -1
  15. data/docs/WhatsAppTemplatesApi.md +384 -0
  16. data/docs/WhatsAppText.md +20 -0
  17. data/docs/WhatsAppVideo.md +24 -0
  18. data/docs/WhatsappButtonType.md +15 -0
  19. data/docs/WhatsappComponentType.md +15 -0
  20. data/docs/WhatsappCreateTemplateRequest.md +24 -0
  21. data/docs/WhatsappCreateTemplateResponse.md +22 -0
  22. data/docs/WhatsappHeaderFormat.md +15 -0
  23. data/docs/WhatsappListTemplatesResponse.md +20 -0
  24. data/docs/WhatsappOtpButtonType.md +15 -0
  25. data/docs/WhatsappPagination.md +22 -0
  26. data/docs/WhatsappPagingCursors.md +20 -0
  27. data/docs/WhatsappSupportedApp.md +20 -0
  28. data/docs/WhatsappTemplateButton.md +30 -0
  29. data/docs/WhatsappTemplateCategory.md +15 -0
  30. data/docs/WhatsappTemplateComponent.md +26 -0
  31. data/docs/WhatsappTemplateExample.md +20 -0
  32. data/docs/WhatsappTemplateResponse.md +28 -0
  33. data/docs/WhatsappTemplateStatus.md +15 -0
  34. data/docs/WhatsappUpdateTemplateRequest.md +20 -0
  35. data/lib/messente_api/api/account_balance_api.rb +160 -0
  36. data/lib/messente_api/api/blacklist_api.rb +5 -5
  37. data/lib/messente_api/api/bulk_messaging_api.rb +2 -2
  38. data/lib/messente_api/api/contacts_api.rb +9 -9
  39. data/lib/messente_api/api/delivery_report_api.rb +2 -2
  40. data/lib/messente_api/api/groups_api.rb +6 -6
  41. data/lib/messente_api/api/number_lookup_api.rb +2 -2
  42. data/lib/messente_api/api/number_verification_api.rb +217 -0
  43. data/lib/messente_api/api/omnimessage_api.rb +3 -3
  44. data/lib/messente_api/api/pricing_api.rb +170 -0
  45. data/lib/messente_api/api/statistics_api.rb +2 -2
  46. data/lib/messente_api/api/whats_app_templates_api.rb +399 -0
  47. data/lib/messente_api/api_client.rb +1 -1
  48. data/lib/messente_api/api_error.rb +1 -1
  49. data/lib/messente_api/configuration.rb +61 -1
  50. data/lib/messente_api/models/bulk_omni_message_create_success_response.rb +1 -1
  51. data/lib/messente_api/models/bulk_omni_message_create_success_response_messages_inner.rb +1 -1
  52. data/lib/messente_api/models/bulk_omnimessage.rb +1 -1
  53. data/lib/messente_api/models/channel.rb +1 -1
  54. data/lib/messente_api/models/contact_envelope.rb +1 -1
  55. data/lib/messente_api/models/contact_fields.rb +1 -1
  56. data/lib/messente_api/models/contact_list_envelope.rb +1 -1
  57. data/lib/messente_api/models/contact_response_fields.rb +1 -1
  58. data/lib/messente_api/models/contact_update_fields.rb +1 -1
  59. data/lib/messente_api/models/delivery_report_response.rb +1 -1
  60. data/lib/messente_api/models/delivery_result.rb +1 -1
  61. data/lib/messente_api/models/error_code_omnichannel.rb +1 -1
  62. data/lib/messente_api/models/error_code_omnichannel_machine.rb +1 -1
  63. data/lib/messente_api/models/error_code_phonebook.rb +1 -1
  64. data/lib/messente_api/models/error_code_statistics.rb +1 -1
  65. data/lib/messente_api/models/error_item_number_lookup.rb +1 -1
  66. data/lib/messente_api/models/error_item_number_lookup_error.rb +1 -1
  67. data/lib/messente_api/models/error_item_omnichannel.rb +1 -1
  68. data/lib/messente_api/models/error_item_phonebook.rb +1 -1
  69. data/lib/messente_api/models/error_item_statistics.rb +1 -1
  70. data/lib/messente_api/models/error_number_lookup.rb +1 -1
  71. data/lib/messente_api/models/error_omnichannel.rb +1 -1
  72. data/lib/messente_api/models/error_phonebook.rb +1 -1
  73. data/lib/messente_api/models/error_statistics.rb +1 -1
  74. data/lib/messente_api/models/error_title_omnichannel.rb +1 -1
  75. data/lib/messente_api/models/error_title_phonebook.rb +1 -1
  76. data/lib/messente_api/models/fetch_blacklist_success.rb +1 -1
  77. data/lib/messente_api/models/group_envelope.rb +1 -1
  78. data/lib/messente_api/models/group_list_envelope.rb +1 -1
  79. data/lib/messente_api/models/group_name.rb +1 -1
  80. data/lib/messente_api/models/group_response_fields.rb +1 -1
  81. data/lib/messente_api/models/message_result.rb +1 -1
  82. data/lib/messente_api/models/mobile_network.rb +1 -1
  83. data/lib/messente_api/models/number_to_blacklist.rb +1 -1
  84. data/lib/messente_api/models/numbers_to_investigate.rb +1 -1
  85. data/lib/messente_api/models/omni_message_create_success_response.rb +1 -1
  86. data/lib/messente_api/models/omnimessage.rb +1 -1
  87. data/lib/messente_api/models/omnimessage_messages_inner.rb +1 -1
  88. data/lib/messente_api/models/price.rb +276 -0
  89. data/lib/messente_api/models/price_info.rb +1 -1
  90. data/lib/messente_api/models/price_networks_inner.rb +257 -0
  91. data/lib/messente_api/models/priority.rb +1 -1
  92. data/lib/messente_api/models/sms.rb +1 -1
  93. data/lib/messente_api/models/statistics_report.rb +1 -1
  94. data/lib/messente_api/models/statistics_report_settings.rb +1 -1
  95. data/lib/messente_api/models/statistics_report_success.rb +1 -1
  96. data/lib/messente_api/models/status.rb +1 -1
  97. data/lib/messente_api/models/sync_number_lookup_result.rb +1 -1
  98. data/lib/messente_api/models/sync_number_lookup_success.rb +1 -1
  99. data/lib/messente_api/models/telegram.rb +1 -1
  100. data/lib/messente_api/models/text_store.rb +1 -1
  101. data/lib/messente_api/models/viber.rb +1 -1
  102. data/lib/messente_api/models/viber_video.rb +1 -1
  103. data/lib/messente_api/models/whats_app.rb +59 -5
  104. data/lib/messente_api/models/whats_app_audio.rb +239 -0
  105. data/lib/messente_api/models/whats_app_component.rb +2 -1
  106. data/lib/messente_api/models/whats_app_currency.rb +1 -1
  107. data/lib/messente_api/models/whats_app_datetime.rb +1 -1
  108. data/lib/messente_api/models/whats_app_document.rb +261 -0
  109. data/lib/messente_api/models/whats_app_image.rb +250 -0
  110. data/lib/messente_api/models/whats_app_language.rb +1 -1
  111. data/lib/messente_api/models/whats_app_media.rb +1 -1
  112. data/lib/messente_api/models/whats_app_parameter.rb +25 -5
  113. data/lib/messente_api/models/whats_app_sticker.rb +250 -0
  114. data/lib/messente_api/models/whats_app_template.rb +8 -1
  115. data/lib/messente_api/models/whats_app_text.rb +235 -0
  116. data/lib/messente_api/models/whats_app_video.rb +250 -0
  117. data/lib/messente_api/models/whatsapp_button_type.rb +45 -0
  118. data/lib/messente_api/models/whatsapp_component_type.rb +42 -0
  119. data/lib/messente_api/models/whatsapp_create_template_request.rb +297 -0
  120. data/lib/messente_api/models/whatsapp_create_template_response.rb +277 -0
  121. data/lib/messente_api/models/whatsapp_header_format.rb +39 -0
  122. data/lib/messente_api/models/whatsapp_list_templates_response.rb +241 -0
  123. data/lib/messente_api/models/whatsapp_otp_button_type.rb +41 -0
  124. data/lib/messente_api/models/whatsapp_pagination.rb +242 -0
  125. data/lib/messente_api/models/whatsapp_paging_cursors.rb +226 -0
  126. data/lib/messente_api/models/whatsapp_supported_app.rb +240 -0
  127. data/lib/messente_api/models/whatsapp_template_button.rb +355 -0
  128. data/lib/messente_api/models/whatsapp_template_category.rb +41 -0
  129. data/lib/messente_api/models/whatsapp_template_component.rb +277 -0
  130. data/lib/messente_api/models/whatsapp_template_example.rb +230 -0
  131. data/lib/messente_api/models/whatsapp_template_response.rb +330 -0
  132. data/lib/messente_api/models/whatsapp_template_status.rb +47 -0
  133. data/lib/messente_api/models/whatsapp_update_template_request.rb +227 -0
  134. data/lib/messente_api/version.rb +2 -2
  135. data/lib/messente_api.rb +30 -1
  136. data/messente_api.gemspec +1 -1
  137. data/spec/spec_helper.rb +1 -1
  138. metadata +60 -2
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12
 
@@ -0,0 +1,276 @@
1
+ =begin
2
+ #Messente API
3
+
4
+ #[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram 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
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: messente@messente.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MessenteApi
17
+ # An object containing the pricing information for a given country
18
+ class Price
19
+ # The alpha-2 code for the country
20
+ attr_accessor :country
21
+
22
+ # The name of the country
23
+ attr_accessor :name
24
+
25
+ # The country code prefix
26
+ attr_accessor :prefix
27
+
28
+ # A list of networks available in the country
29
+ attr_accessor :networks
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'country' => :'country',
35
+ :'name' => :'name',
36
+ :'prefix' => :'prefix',
37
+ :'networks' => :'networks'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'country' => :'String',
50
+ :'name' => :'String',
51
+ :'prefix' => :'String',
52
+ :'networks' => :'Array<PriceNetworksInner>'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MessenteApi::Price` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MessenteApi::Price`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'country')
78
+ self.country = attributes[:'country']
79
+ else
80
+ self.country = nil
81
+ end
82
+
83
+ if attributes.key?(:'name')
84
+ self.name = attributes[:'name']
85
+ else
86
+ self.name = nil
87
+ end
88
+
89
+ if attributes.key?(:'prefix')
90
+ self.prefix = attributes[:'prefix']
91
+ else
92
+ self.prefix = nil
93
+ end
94
+
95
+ if attributes.key?(:'networks')
96
+ if (value = attributes[:'networks']).is_a?(Array)
97
+ self.networks = value
98
+ end
99
+ else
100
+ self.networks = nil
101
+ end
102
+ end
103
+
104
+ # Show invalid properties with the reasons. Usually used together with valid?
105
+ # @return Array for valid properties with the reasons
106
+ def list_invalid_properties
107
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
108
+ invalid_properties = Array.new
109
+ if @country.nil?
110
+ invalid_properties.push('invalid value for "country", country cannot be nil.')
111
+ end
112
+
113
+ if @name.nil?
114
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
115
+ end
116
+
117
+ if @prefix.nil?
118
+ invalid_properties.push('invalid value for "prefix", prefix cannot be nil.')
119
+ end
120
+
121
+ if @networks.nil?
122
+ invalid_properties.push('invalid value for "networks", networks cannot be nil.')
123
+ end
124
+
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ warn '[DEPRECATED] the `valid?` method is obsolete'
132
+ return false if @country.nil?
133
+ return false if @name.nil?
134
+ return false if @prefix.nil?
135
+ return false if @networks.nil?
136
+ true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ country == o.country &&
145
+ name == o.name &&
146
+ prefix == o.prefix &&
147
+ networks == o.networks
148
+ end
149
+
150
+ # @see the `==` method
151
+ # @param [Object] Object to be compared
152
+ def eql?(o)
153
+ self == o
154
+ end
155
+
156
+ # Calculates hash code according to all attributes.
157
+ # @return [Integer] Hash code
158
+ def hash
159
+ [country, name, prefix, networks].hash
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def self.build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ attributes = attributes.transform_keys(&:to_sym)
168
+ transformed_hash = {}
169
+ openapi_types.each_pair do |key, type|
170
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = nil
172
+ elsif type =~ /\AArray<(.*)>/i
173
+ # check to ensure the input is an array given that the attribute
174
+ # is documented as an array but the input is not
175
+ if attributes[attribute_map[key]].is_a?(Array)
176
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
177
+ end
178
+ elsif !attributes[attribute_map[key]].nil?
179
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
180
+ end
181
+ end
182
+ new(transformed_hash)
183
+ end
184
+
185
+ # Deserializes the data based on type
186
+ # @param string type Data type
187
+ # @param string value Value to be deserialized
188
+ # @return [Object] Deserialized data
189
+ def self._deserialize(type, value)
190
+ case type.to_sym
191
+ when :Time
192
+ Time.parse(value)
193
+ when :Date
194
+ Date.parse(value)
195
+ when :String
196
+ value.to_s
197
+ when :Integer
198
+ value.to_i
199
+ when :Float
200
+ value.to_f
201
+ when :Boolean
202
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
203
+ true
204
+ else
205
+ false
206
+ end
207
+ when :Object
208
+ # generic object (usually a Hash), return directly
209
+ value
210
+ when /\AArray<(?<inner_type>.+)>\z/
211
+ inner_type = Regexp.last_match[:inner_type]
212
+ value.map { |v| _deserialize(inner_type, v) }
213
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
214
+ k_type = Regexp.last_match[:k_type]
215
+ v_type = Regexp.last_match[:v_type]
216
+ {}.tap do |hash|
217
+ value.each do |k, v|
218
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
219
+ end
220
+ end
221
+ else # model
222
+ # models (e.g. Pet) or oneOf
223
+ klass = MessenteApi.const_get(type)
224
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
225
+ end
226
+ end
227
+
228
+ # Returns the string representation of the object
229
+ # @return [String] String presentation of the object
230
+ def to_s
231
+ to_hash.to_s
232
+ end
233
+
234
+ # to_body is an alias to to_hash (backward compatibility)
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_body
237
+ to_hash
238
+ end
239
+
240
+ # Returns the object in the form of hash
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_hash
243
+ hash = {}
244
+ self.class.attribute_map.each_pair do |attr, param|
245
+ value = self.send(attr)
246
+ if value.nil?
247
+ is_nullable = self.class.openapi_nullable.include?(attr)
248
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
249
+ end
250
+
251
+ hash[param] = _to_hash(value)
252
+ end
253
+ hash
254
+ end
255
+
256
+ # Outputs non-array value in the form of hash
257
+ # For object, use to_hash. Otherwise, just return the value
258
+ # @param [Object] value Any valid value
259
+ # @return [Hash] Returns the value in the form of hash
260
+ def _to_hash(value)
261
+ if value.is_a?(Array)
262
+ value.compact.map { |v| _to_hash(v) }
263
+ elsif value.is_a?(Hash)
264
+ {}.tap do |hash|
265
+ value.each { |k, v| hash[k] = _to_hash(v) }
266
+ end
267
+ elsif value.respond_to? :to_hash
268
+ value.to_hash
269
+ else
270
+ value
271
+ end
272
+ end
273
+
274
+ end
275
+
276
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 2.0.0
7
7
  Contact: messente@messente.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.6.0
9
+ Generator version: 7.11.0
10
10
 
11
11
  =end
12
12