Contract
Facade for introspected contract data.
Provides access to actions, types, and enums defined on this contract.
Example
ruby
contract = InvoiceContract.introspect(expand: true)
contract.actions[:show].response # => Action::Response
contract.types[:address].shape # => { street: ..., city: ... }
contract.enums[:status].values # => ["draft", "published"]
contract.actions.each_value do |action|
action.request # => Action::Request
action.response # => Action::Response
endInstance Methods
#actions
#actions
The actions for this contract.
Returns
Hash{Symbol => Introspection::Action}
#enums
#enums
The enums for this contract.
Returns
Hash{Symbol => Enum}
#to_h
#to_h
Converts this contract to a hash.
Returns
Hash
#types
#types
The types for this contract.
Returns
Hash{Symbol => Type}