Class: Conexa::Account
- Inherits:
-
Model
- Object
- ConexaObject
- Model
- Conexa::Account
- Defined in:
- lib/conexa/resources/account.rb
Overview
Account resource (Conta Bancária)
Constant Summary
Constants inherited from ConexaObject
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
readonly
Account ID (also accessible as #id).
-
#is_active ⇒ Boolean
readonly
Whether the account is active.
-
#name ⇒ String
readonly
Account name.
Attributes inherited from ConexaObject
Class Method Summary collapse
Methods inherited from Model
all, #class_name, class_name, #create, create, #destroy, destroy, extract_page_size_or_params, #fetch, find_by, find_by_id, #id, #primary_key, primary_key_attribute, #primary_key_name, #save, #set_primary_key, underscored_class_name
Methods inherited from ConexaObject
#==, #[]=, convert, #empty?, #initialize, #respond_to_missing?, #to_hash, #unsaved_attributes
Constructor Details
This class inherits a constructor from Conexa::ConexaObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Conexa::ConexaObject
Instance Attribute Details
#account_id ⇒ Integer (readonly)
Returns Account ID (also accessible as #id).
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/conexa/resources/account.rb', line 20 class Account < Model primary_key_attribute :account_id class << self def url(*params) ["/accounts", *params].join '/' end def show_url(*params) ["/account", *params].join '/' end end end |
#is_active ⇒ Boolean (readonly)
Returns Whether the account is active.
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/conexa/resources/account.rb', line 20 class Account < Model primary_key_attribute :account_id class << self def url(*params) ["/accounts", *params].join '/' end def show_url(*params) ["/account", *params].join '/' end end end |
#name ⇒ String (readonly)
Returns Account name.
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/conexa/resources/account.rb', line 20 class Account < Model primary_key_attribute :account_id class << self def url(*params) ["/accounts", *params].join '/' end def show_url(*params) ["/account", *params].join '/' end end end |