Sha256: 0b5d158982952472e0b6bd433b91ff95698cdf092d467d4b53ee66d0973918ed
Contents?: true
Size: 941 Bytes
Versions: 1
Compression:
Stored size: 941 Bytes
Contents
# VoucherifySdk::Discount ## Class instance methods ### `openapi_one_of` Returns the list of classes defined in oneOf. #### Example ```ruby require 'VoucherifySdk' VoucherifySdk::Discount.openapi_one_of # => # [ # :'DiscountAmount', # :'DiscountFixed', # :'DiscountPercent', # :'DiscountUnit', # :'DiscountUnitMultiple' # ] ``` ### build Find the appropriate object from the `openapi_one_of` list and casts the data into it. #### Example ```ruby require 'VoucherifySdk' VoucherifySdk::Discount.build(data) # => #<DiscountAmount:0x00007fdd4aab02a0> VoucherifySdk::Discount.build(data_that_doesnt_match) # => nil ``` #### Parameters | Name | Type | Description | | ---- | ---- | ----------- | | **data** | **Mixed** | data to be matched against the list of oneOf items | #### Return type - `DiscountAmount` - `DiscountFixed` - `DiscountPercent` - `DiscountUnit` - `DiscountUnitMultiple` - `nil` (if no type matches)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
voucherify-5.0.0 | docs/Discount.md |