Sha256: 89ee453d3d408146a28c9f027b1f8ab0e73b26e525216c289b0d781fd0730875

Contents?: true

Size: 1.42 KB

Versions: 2

Compression:

Stored size: 1.42 KB

Contents

# BillingApi::ProductsGet200ResponseInner

## Class instance methods

### `openapi_one_of`

Returns the list of classes defined in oneOf.

#### Example

```ruby
require 'pnap_billing_api'

BillingApi::ProductsGet200ResponseInner.openapi_one_of
# =>
# [
#   :'Product',
#   :'ServerProduct'
# ]
```

### `openapi_discriminator_name`

Returns the discriminator's property name.

#### Example

```ruby
require 'pnap_billing_api'

BillingApi::ProductsGet200ResponseInner.openapi_discriminator_name
# => :'product_category'
```

### `openapi_discriminator_name`

Returns the discriminator's mapping.

#### Example

```ruby
require 'pnap_billing_api'

BillingApi::ProductsGet200ResponseInner.openapi_discriminator_mapping
# =>
# {
#   :'BANDWIDTH' => :'Product',
#   :'OPERATING_SYSTEM' => :'Product',
#   :'PUBLIC_IP' => :'Product',
#   :'SERVER' => :'ServerProduct',
#   :'STORAGE' => :'Product'
# }
```

### build

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

#### Example

```ruby
require 'pnap_billing_api'

BillingApi::ProductsGet200ResponseInner.build(data)
# => #<Product:0x00007fdd4aab02a0>

BillingApi::ProductsGet200ResponseInner.build(data_that_doesnt_match)
# => nil
```

#### Parameters

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

#### Return type

- `Product`
- `ServerProduct`
- `nil` (if no type matches)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pnap_billing_api-2.0.0 docs/ProductsGet200ResponseInner.md
pnap_billing_api-1.0.0 docs/ProductsGet200ResponseInner.md