Class: ModernTreasury::UnionTypeLookUp
- Inherits:
-
Object
- Object
- ModernTreasury::UnionTypeLookUp
- Includes:
- CoreLibrary
- Defined in:
- lib/modern_treasury/utilities/union_type_lookup.rb
Overview
The ‘UnionTypeLookUp` class serves as a utility class for storing and managing type combinator templates. It acts as a container for the templates used in handling various oneof/anyof instances within the sdk.
Class Method Summary collapse
-
.get(name) ⇒ Object
rubocop:enable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation.
-
.union_types ⇒ Object
rubocop:disable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation.
Class Method Details
.get(name) ⇒ Object
rubocop:enable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
28 29 30 |
# File 'lib/modern_treasury/utilities/union_type_lookup.rb', line 28 def self.get(name) UnionTypeLookUp.union_types[name] end |
.union_types ⇒ Object
rubocop:disable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/modern_treasury/utilities/union_type_lookup.rb', line 13 def self.union_types { :PaymentOrderReceivingAccount => OneOf.new( [ LeafType.new(ReceivingAccount), LeafType.new(InternalAccount) ], UnionTypeContext.new( is_nullable: true ) ) } end |