Resource
Wraps resource definitions.
Example
ruby
resource = api.resources[:invoices]
resource.identifier # => "invoices"
resource.path # => "invoices"
resource.parent_identifiers # => []
resource.resources # => {} or nested resources
resource.actions.each_value do |action|
action.request # => Action::Request
action.response # => Action::Response
endInstance Methods
#actions
#actions
The actions for this resource.
Returns
Hash{Symbol => Introspection::Action}
See also
#identifier
#identifier
The identifier for this resource.
Returns
String
#parent_identifiers
#parent_identifiers
The parent identifiers for this resource.
Returns
Array<String>
#path
#path
The path for this resource.
Returns
String
#resources
#resources
The nested resources for this resource.
Returns
Hash{Symbol => Resource}
#to_h
#to_h
Converts this resource to a hash.
Returns
Hash