Module: TalonOne::CheckAttributeBlock

Defined in:
lib/talon_one_sdk/models/check_attribute_block.rb

Class Method Summary collapse

Class Method Details

.build(data) ⇒ Object

Builds the object

Parameters:

  • Data (Mixed)

    to be matched against the list of oneOf items

Returns:

  • (Object)

    Returns the model or the data itself



71
72
73
74
75
76
77
78
79
# File 'lib/talon_one_sdk/models/check_attribute_block.rb', line 71

def build(data)
  discriminator_value = data[openapi_discriminator_name]
  return nil if discriminator_value.nil?

  klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
  return nil unless klass

  TalonOne.const_get(klass).build_from_hash(data)
end

.openapi_discriminator_mappingObject

Discriminator's mapping (OpenAPI v3)



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/talon_one_sdk/models/check_attribute_block.rb', line 32

def openapi_discriminator_mapping
  {
    :'after' => :'ScalarCheckAttributeBlock',
    :'before' => :'ScalarCheckAttributeBlock',
    :'between' => :'BetweenCheckAttributeBlock',
    :'contains' => :'ScalarCheckAttributeBlock',
    :'containsAllOf' => :'ListCheckAttributeBlock',
    :'containsAtLeast' => :'ListWithCountCheckAttributeBlock',
    :'containsExactly' => :'ListWithCountCheckAttributeBlock',
    :'containsNoneOf' => :'ListCheckAttributeBlock',
    :'containsOneOf' => :'ListCheckAttributeBlock',
    :'empty' => :'UnaryCheckAttributeBlock',
    :'endsWith' => :'ScalarCheckAttributeBlock',
    :'equals' => :'ScalarCheckAttributeBlock',
    :'exists' => :'UnaryCheckAttributeBlock',
    :'greaterThan' => :'ScalarCheckAttributeBlock',
    :'greaterThanOrEqual' => :'ScalarCheckAttributeBlock',
    :'inCollection' => :'ScalarCheckAttributeBlock',
    :'isFalse' => :'UnaryCheckAttributeBlock',
    :'isTrue' => :'UnaryCheckAttributeBlock',
    :'lessThan' => :'ScalarCheckAttributeBlock',
    :'lessThanOrEqual' => :'ScalarCheckAttributeBlock',
    :'matchesRegexp' => :'ScalarCheckAttributeBlock',
    :'not(contains)' => :'ScalarCheckAttributeBlock',
    :'not(empty)' => :'UnaryCheckAttributeBlock',
    :'not(equals)' => :'ScalarCheckAttributeBlock',
    :'not(exists)' => :'UnaryCheckAttributeBlock',
    :'not(inCollection)' => :'ScalarCheckAttributeBlock',
    :'not(oneOf)' => :'ScalarCheckAttributeBlock',
    :'not(within)' => :'WithinCheckAttributeBlock',
    :'oneOf' => :'ScalarCheckAttributeBlock',
    :'startsWith' => :'ScalarCheckAttributeBlock',
    :'within' => :'WithinCheckAttributeBlock'
  }
end

.openapi_discriminator_nameObject

Discriminator's property name (OpenAPI v3)



27
28
29
# File 'lib/talon_one_sdk/models/check_attribute_block.rb', line 27

def openapi_discriminator_name
  :'operator'
end

.openapi_one_ofObject

List of class defined in oneOf (OpenAPI v3)



20
21
22
23
24
# File 'lib/talon_one_sdk/models/check_attribute_block.rb', line 20

def openapi_one_of
  [
    :'CheckAttributeBlockBase'
  ]
end