bandwidth-sdk 14.1.2 → 15.0.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 +18 -16
- data/README.md +34 -1
- data/bandwidth.yml +675 -101
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +210 -6
- data/coverage/index.html +14901 -12699
- data/docs/Address.md +1 -1
- data/docs/CallsApi.md +1 -1
- data/docs/CardWidthEnum.md +15 -0
- data/docs/ConferencesApi.md +1 -1
- data/docs/CreateMultiChannelMessageResponse.md +22 -0
- data/docs/ErrorObject.md +20 -0
- data/docs/Link.md +20 -0
- data/docs/Message.md +1 -1
- data/docs/MessageCallback.md +3 -1
- data/docs/MessageRequest.md +1 -1
- data/docs/MmsMessageContent.md +20 -0
- data/docs/MultiChannelAction.md +89 -0
- data/docs/MultiChannelActionCalendarEvent.md +30 -0
- data/docs/MultiChannelApi.md +80 -0
- data/docs/MultiChannelCallbackData.md +26 -0
- data/docs/MultiChannelChannelListObject.md +24 -0
- data/docs/MultiChannelChannelListObjectContent.md +55 -0
- data/docs/MultiChannelMessageCallbackData.md +32 -0
- data/docs/MultiChannelMessageChannelEnum.md +15 -0
- data/docs/MultiChannelMessageData.md +34 -0
- data/docs/MultiChannelMessageDirectionEnum.md +15 -0
- data/docs/MultiChannelMessageRequest.md +26 -0
- data/docs/MultiChannelStatusEnum.md +15 -0
- data/docs/RbmActionBase.md +22 -0
- data/docs/RbmActionDial.md +24 -0
- data/docs/RbmActionOpenUrl.md +24 -0
- data/docs/RbmActionTypeEnum.md +15 -0
- data/docs/RbmActionViewLocation.md +28 -0
- data/docs/RbmCardContent.md +24 -0
- data/docs/RbmCardContentMedia.md +22 -0
- data/docs/RbmMediaHeightEnum.md +15 -0
- data/docs/RbmMessageCarouselCard.md +22 -0
- data/docs/RbmMessageContentFile.md +20 -0
- data/docs/RbmMessageContentRichCard.md +49 -0
- data/docs/RbmMessageContentText.md +20 -0
- data/docs/RbmMessageMedia.md +20 -0
- data/docs/RbmStandaloneCard.md +24 -0
- data/docs/SmsMessageContent.md +18 -0
- data/docs/StandaloneCardOrientationEnum.md +15 -0
- data/docs/TfvBasicAuthentication.md +2 -2
- data/docs/TfvStatus.md +5 -1
- data/docs/TfvSubmissionInfo.md +7 -1
- data/docs/ThumbnailAlignmentEnum.md +15 -0
- data/docs/TollFreeVerificationApi.md +1 -1
- data/docs/VerificationDenialWebhook.md +5 -1
- data/docs/VerificationRequest.md +10 -4
- data/docs/VerificationUpdateRequest.md +10 -4
- data/lib/bandwidth-sdk/api/multi_channel_api.rb +96 -0
- data/lib/bandwidth-sdk/configuration.rb +6 -0
- data/lib/bandwidth-sdk/models/bxml/verbs/phone_number.rb +1 -0
- data/lib/bandwidth-sdk/models/card_width_enum.rb +40 -0
- data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +234 -0
- data/lib/bandwidth-sdk/models/error_object.rb +221 -0
- data/lib/bandwidth-sdk/models/link.rb +221 -0
- data/lib/bandwidth-sdk/models/message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_callback.rb +16 -5
- data/lib/bandwidth-sdk/models/message_request.rb +1 -1
- data/lib/bandwidth-sdk/models/mms_message_content.rb +244 -0
- data/lib/bandwidth-sdk/models/multi_channel_action.rb +61 -0
- data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +419 -0
- data/lib/bandwidth-sdk/models/multi_channel_callback_data.rb +272 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_object.rb +291 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_object_content.rb +108 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_callback_data.rb +302 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_channel_enum.rb +41 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_data.rb +312 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_direction_enum.rb +40 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_request.rb +310 -0
- data/lib/bandwidth-sdk/models/multi_channel_status_enum.rb +42 -0
- data/lib/bandwidth-sdk/models/rbm_action_base.rb +313 -0
- data/lib/bandwidth-sdk/models/rbm_action_dial.rb +337 -0
- data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +356 -0
- data/lib/bandwidth-sdk/models/rbm_action_type_enum.rb +44 -0
- data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +383 -0
- data/lib/bandwidth-sdk/models/rbm_card_content.rb +301 -0
- data/lib/bandwidth-sdk/models/rbm_card_content_media.rb +313 -0
- data/lib/bandwidth-sdk/models/rbm_media_height_enum.rb +41 -0
- data/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb +309 -0
- data/lib/bandwidth-sdk/models/rbm_message_content_file.rb +268 -0
- data/lib/bandwidth-sdk/models/rbm_message_content_rich_card.rb +104 -0
- data/lib/bandwidth-sdk/models/rbm_message_content_text.rb +270 -0
- data/lib/bandwidth-sdk/models/rbm_message_media.rb +250 -0
- data/lib/bandwidth-sdk/models/rbm_standalone_card.rb +304 -0
- data/lib/bandwidth-sdk/models/sms_message_content.rb +239 -0
- data/lib/bandwidth-sdk/models/standalone_card_orientation_enum.rb +40 -0
- data/lib/bandwidth-sdk/models/tfv_status.rb +24 -4
- data/lib/bandwidth-sdk/models/tfv_status_enum.rb +1 -3
- data/lib/bandwidth-sdk/models/tfv_submission_info.rb +35 -5
- data/lib/bandwidth-sdk/models/thumbnail_alignment_enum.rb +40 -0
- data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +24 -4
- data/lib/bandwidth-sdk/models/verification_request.rb +45 -15
- data/lib/bandwidth-sdk/models/verification_update_request.rb +35 -5
- data/lib/bandwidth-sdk/version.rb +1 -1
- data/lib/bandwidth-sdk.rb +34 -1
- data/spec/smoke/conferences_api_spec.rb +4 -4
- data/spec/smoke/multi_channel_api_spec.rb +40 -0
- data/spec/smoke/transcriptions_api_spec.rb +1 -1
- data/spec/unit/api/multi_channel_api_spec.rb +59 -0
- data/spec/unit/models/bxml/verbs/phone_number_spec.rb +6 -4
- metadata +117 -45
@@ -30,6 +30,9 @@ module Bandwidth
|
|
30
30
|
# Optional error code, applicable only when type is `message-failed`.
|
31
31
|
attr_accessor :error_code
|
32
32
|
|
33
|
+
# The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to.
|
34
|
+
attr_accessor :carrier_name
|
35
|
+
|
33
36
|
class EnumAttributeValidator
|
34
37
|
attr_reader :datatype
|
35
38
|
attr_reader :allowable_values
|
@@ -60,7 +63,8 @@ module Bandwidth
|
|
60
63
|
:'to' => :'to',
|
61
64
|
:'description' => :'description',
|
62
65
|
:'message' => :'message',
|
63
|
-
:'error_code' => :'errorCode'
|
66
|
+
:'error_code' => :'errorCode',
|
67
|
+
:'carrier_name' => :'carrierName'
|
64
68
|
}
|
65
69
|
end
|
66
70
|
|
@@ -77,14 +81,16 @@ module Bandwidth
|
|
77
81
|
:'to' => :'String',
|
78
82
|
:'description' => :'String',
|
79
83
|
:'message' => :'MessageCallbackMessage',
|
80
|
-
:'error_code' => :'Integer'
|
84
|
+
:'error_code' => :'Integer',
|
85
|
+
:'carrier_name' => :'String'
|
81
86
|
}
|
82
87
|
end
|
83
88
|
|
84
89
|
# List of attributes with nullable: true
|
85
90
|
def self.openapi_nullable
|
86
91
|
Set.new([
|
87
|
-
:'error_code'
|
92
|
+
:'error_code',
|
93
|
+
:'carrier_name'
|
88
94
|
])
|
89
95
|
end
|
90
96
|
|
@@ -136,6 +142,10 @@ module Bandwidth
|
|
136
142
|
if attributes.key?(:'error_code')
|
137
143
|
self.error_code = attributes[:'error_code']
|
138
144
|
end
|
145
|
+
|
146
|
+
if attributes.key?(:'carrier_name')
|
147
|
+
self.carrier_name = attributes[:'carrier_name']
|
148
|
+
end
|
139
149
|
end
|
140
150
|
|
141
151
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -188,7 +198,8 @@ module Bandwidth
|
|
188
198
|
to == o.to &&
|
189
199
|
description == o.description &&
|
190
200
|
message == o.message &&
|
191
|
-
error_code == o.error_code
|
201
|
+
error_code == o.error_code &&
|
202
|
+
carrier_name == o.carrier_name
|
192
203
|
end
|
193
204
|
|
194
205
|
# @see the `==` method
|
@@ -200,7 +211,7 @@ module Bandwidth
|
|
200
211
|
# Calculates hash code according to all attributes.
|
201
212
|
# @return [Integer] Hash code
|
202
213
|
def hash
|
203
|
-
[time, type, to, description, message, error_code].hash
|
214
|
+
[time, type, to, description, message, error_code, carrier_name].hash
|
204
215
|
end
|
205
216
|
|
206
217
|
# Builds the object from hash
|
@@ -35,7 +35,7 @@ module Bandwidth
|
|
35
35
|
|
36
36
|
attr_accessor :priority
|
37
37
|
|
38
|
-
# A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future.
|
38
|
+
# A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future.
|
39
39
|
attr_accessor :expiration
|
40
40
|
|
41
41
|
class EnumAttributeValidator
|
@@ -0,0 +1,244 @@
|
|
1
|
+
=begin
|
2
|
+
#Bandwidth
|
3
|
+
|
4
|
+
#Bandwidth's Communication APIs
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: letstalk@bandwidth.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Bandwidth
|
17
|
+
class MmsMessageContent
|
18
|
+
# The contents of the text message. Must be 2048 characters or less.
|
19
|
+
attr_accessor :text
|
20
|
+
|
21
|
+
# A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters.
|
22
|
+
attr_accessor :media
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'text' => :'text',
|
28
|
+
:'media' => :'media'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'text' => :'String',
|
41
|
+
:'media' => :'Array<String>'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::MmsMessageContent` initialize method'
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MmsMessageContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'text')
|
67
|
+
self.text = attributes[:'text']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'media')
|
71
|
+
if (value = attributes[:'media']).is_a?(Array)
|
72
|
+
self.media = value
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
81
|
+
invalid_properties = Array.new
|
82
|
+
if !@text.nil? && @text.to_s.length > 2048
|
83
|
+
invalid_properties.push('invalid value for "text", the character length must be smaller than or equal to 2048.')
|
84
|
+
end
|
85
|
+
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
93
|
+
return false if !@text.nil? && @text.to_s.length > 2048
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
97
|
+
# Custom attribute writer method with validation
|
98
|
+
# @param [Object] text Value to be assigned
|
99
|
+
def text=(text)
|
100
|
+
if text.nil?
|
101
|
+
fail ArgumentError, 'text cannot be nil'
|
102
|
+
end
|
103
|
+
|
104
|
+
if text.to_s.length > 2048
|
105
|
+
fail ArgumentError, 'invalid value for "text", the character length must be smaller than or equal to 2048.'
|
106
|
+
end
|
107
|
+
|
108
|
+
@text = text
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
text == o.text &&
|
117
|
+
media == o.media
|
118
|
+
end
|
119
|
+
|
120
|
+
# @see the `==` method
|
121
|
+
# @param [Object] Object to be compared
|
122
|
+
def eql?(o)
|
123
|
+
self == o
|
124
|
+
end
|
125
|
+
|
126
|
+
# Calculates hash code according to all attributes.
|
127
|
+
# @return [Integer] Hash code
|
128
|
+
def hash
|
129
|
+
[text, media].hash
|
130
|
+
end
|
131
|
+
|
132
|
+
# Builds the object from hash
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
+
# @return [Object] Returns the model itself
|
135
|
+
def self.build_from_hash(attributes)
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
138
|
+
transformed_hash = {}
|
139
|
+
openapi_types.each_pair do |key, type|
|
140
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = nil
|
142
|
+
elsif type =~ /\AArray<(.*)>/i
|
143
|
+
# check to ensure the input is an array given that the attribute
|
144
|
+
# is documented as an array but the input is not
|
145
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
146
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
147
|
+
end
|
148
|
+
elsif !attributes[attribute_map[key]].nil?
|
149
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
150
|
+
end
|
151
|
+
end
|
152
|
+
new(transformed_hash)
|
153
|
+
end
|
154
|
+
|
155
|
+
# Deserializes the data based on type
|
156
|
+
# @param string type Data type
|
157
|
+
# @param string value Value to be deserialized
|
158
|
+
# @return [Object] Deserialized data
|
159
|
+
def self._deserialize(type, value)
|
160
|
+
case type.to_sym
|
161
|
+
when :Time
|
162
|
+
Time.parse(value)
|
163
|
+
when :Date
|
164
|
+
Date.parse(value)
|
165
|
+
when :String
|
166
|
+
value.to_s
|
167
|
+
when :Integer
|
168
|
+
value.to_i
|
169
|
+
when :Float
|
170
|
+
value.to_f
|
171
|
+
when :Boolean
|
172
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
173
|
+
true
|
174
|
+
else
|
175
|
+
false
|
176
|
+
end
|
177
|
+
when :Object
|
178
|
+
# generic object (usually a Hash), return directly
|
179
|
+
value
|
180
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
181
|
+
inner_type = Regexp.last_match[:inner_type]
|
182
|
+
value.map { |v| _deserialize(inner_type, v) }
|
183
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
184
|
+
k_type = Regexp.last_match[:k_type]
|
185
|
+
v_type = Regexp.last_match[:v_type]
|
186
|
+
{}.tap do |hash|
|
187
|
+
value.each do |k, v|
|
188
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
else # model
|
192
|
+
# models (e.g. Pet) or oneOf
|
193
|
+
klass = Bandwidth.const_get(type)
|
194
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the string representation of the object
|
199
|
+
# @return [String] String presentation of the object
|
200
|
+
def to_s
|
201
|
+
to_hash.to_s
|
202
|
+
end
|
203
|
+
|
204
|
+
# to_body is an alias to to_hash (backward compatibility)
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_body
|
207
|
+
to_hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns the object in the form of hash
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
212
|
+
def to_hash
|
213
|
+
hash = {}
|
214
|
+
self.class.attribute_map.each_pair do |attr, param|
|
215
|
+
value = self.send(attr)
|
216
|
+
if value.nil?
|
217
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
218
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
219
|
+
end
|
220
|
+
|
221
|
+
hash[param] = _to_hash(value)
|
222
|
+
end
|
223
|
+
hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Outputs non-array value in the form of hash
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
228
|
+
# @param [Object] value Any valid value
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
230
|
+
def _to_hash(value)
|
231
|
+
if value.is_a?(Array)
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
233
|
+
elsif value.is_a?(Hash)
|
234
|
+
{}.tap do |hash|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
236
|
+
end
|
237
|
+
elsif value.respond_to? :to_hash
|
238
|
+
value.to_hash
|
239
|
+
else
|
240
|
+
value
|
241
|
+
end
|
242
|
+
end
|
243
|
+
end
|
244
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
=begin
|
2
|
+
#Bandwidth
|
3
|
+
|
4
|
+
#Bandwidth's Communication APIs
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: letstalk@bandwidth.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Bandwidth
|
17
|
+
module MultiChannelAction
|
18
|
+
class << self
|
19
|
+
# List of class defined in oneOf (OpenAPI v3)
|
20
|
+
def openapi_one_of
|
21
|
+
[
|
22
|
+
:'MultiChannelActionCalendarEvent',
|
23
|
+
:'RbmActionBase',
|
24
|
+
:'RbmActionDial',
|
25
|
+
:'RbmActionOpenUrl',
|
26
|
+
:'RbmActionViewLocation'
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
# Discriminator's property name (OpenAPI v3)
|
31
|
+
def openapi_discriminator_name
|
32
|
+
:'type'
|
33
|
+
end
|
34
|
+
|
35
|
+
# Discriminator's mapping (OpenAPI v3)
|
36
|
+
def openapi_discriminator_mapping
|
37
|
+
{
|
38
|
+
:'CREATE_CALENDAR_EVENT' => :'MultiChannelActionCalendarEvent',
|
39
|
+
:'DIAL_PHONE' => :'RbmActionDial',
|
40
|
+
:'OPEN_URL' => :'RbmActionOpenUrl',
|
41
|
+
:'REPLY' => :'RbmActionBase',
|
42
|
+
:'REQUEST_LOCATION' => :'RbmActionBase',
|
43
|
+
:'SHOW_LOCATION' => :'RbmActionViewLocation'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Builds the object
|
48
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
49
|
+
# @return [Object] Returns the model or the data itself
|
50
|
+
def build(data)
|
51
|
+
discriminator_value = data[openapi_discriminator_name]
|
52
|
+
return nil if discriminator_value.nil?
|
53
|
+
|
54
|
+
klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
|
55
|
+
return nil unless klass
|
56
|
+
|
57
|
+
Bandwidth.const_get(klass).build_from_hash(data)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|