Returns the list of classes defined in oneOf.
require 'bandwidth-sdk'
Bandwidth::Callback.openapi_one_of
# =>
# [
# :'InboundCallback',
# :'StatusCallback'
# ]Returns the discriminator's property name.
require 'bandwidth-sdk'
Bandwidth::Callback.openapi_discriminator_name
# => :'type'Returns the discriminator's mapping.
require 'bandwidth-sdk'
Bandwidth::Callback.openapi_discriminator_mapping
# =>
# {
# :'message-delivered' => :'StatusCallback',
# :'message-failed' => :'StatusCallback',
# :'message-read' => :'StatusCallback',
# :'message-received' => :'InboundCallback',
# :'message-sent' => :'StatusCallback',
# :'request-location-response' => :'InboundCallback',
# :'suggestion-response' => :'InboundCallback'
# }Find the appropriate object from the openapi_one_of list and casts the data into it.
require 'bandwidth-sdk'
Bandwidth::Callback.build(data)
# => #<InboundCallback:0x00007fdd4aab02a0>
Bandwidth::Callback.build(data_that_doesnt_match)
# => nil| Name | Type | Description |
|---|---|---|
| data | Mixed | data to be matched against the list of oneOf items |
InboundCallbackStatusCallbacknil(if no type matches)