Sha256: fe28c913768b3a17c239797ca1750466aa37839c766c818f86f1197fbe4c6659

Contents?: true

Size: 830 Bytes

Versions: 1

Compression:

Stored size: 830 Bytes

Contents

# VoucherifySdk::Any

## Class instance methods

### `openapi_one_of`

Returns the list of classes defined in oneOf.

#### Example

```ruby
require 'VoucherifySdk'

VoucherifySdk::Any.openapi_one_of
# =>
# [
#   :'Array<ArrayInner>',
#   :'Float',
#   :'Object',
#   :'String'
# ]
```

### build

Find the appropriate object from the `openapi_one_of` list and casts the data into it.

#### Example

```ruby
require 'VoucherifySdk'

VoucherifySdk::Any.build(data)
# => #<Array<ArrayInner>:0x00007fdd4aab02a0>

VoucherifySdk::Any.build(data_that_doesnt_match)
# => nil
```

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| **data** | **Mixed** | data to be matched against the list of oneOf items |

#### Return type

- `Array<ArrayInner>`
- `Float`
- `Object`
- `String`
- `nil` (if no type matches)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voucherify-5.0.0 docs/Any.md