Sha256: 2e2233bd0719708e318daca9320f51dfdb4b3c53f37e01990d0f7a8a26d8cad2

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

# VoucherifySdk::EarningRuleProportional

## Class instance methods

### `openapi_one_of`

Returns the list of classes defined in oneOf.

#### Example

```ruby
require 'VoucherifySdk'

VoucherifySdk::EarningRuleProportional.openapi_one_of
# =>
# [
#   :'EarningRuleProportionalCustomEvent',
#   :'EarningRuleProportionalCustomerMetadata',
#   :'EarningRuleProportionalOrder',
#   :'EarningRuleProportionalOrderItems'
# ]
```

### build

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

#### Example

```ruby
require 'VoucherifySdk'

VoucherifySdk::EarningRuleProportional.build(data)
# => #<EarningRuleProportionalCustomEvent:0x00007fdd4aab02a0>

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

#### Parameters

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

#### Return type

- `EarningRuleProportionalCustomEvent`
- `EarningRuleProportionalCustomerMetadata`
- `EarningRuleProportionalOrder`
- `EarningRuleProportionalOrderItems`
- `nil` (if no type matches)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voucherify-5.0.0 docs/EarningRuleProportional.md