Class: Fintoc::V2::Entity
- Inherits:
-
Object
- Object
- Fintoc::V2::Entity
- Defined in:
- lib/fintoc/v2/resources/entity.rb
Instance Attribute Summary collapse
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#holder_id ⇒ Object
readonly
Returns the value of attribute holder_id.
-
#holder_name ⇒ Object
readonly
Returns the value of attribute holder_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#is_root ⇒ Object
readonly
Returns the value of attribute is_root.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(object:, mode:, id:, holder_name:, holder_id:, is_root:, status: nil, country_code: nil, client: nil) ⇒ Entity
constructor
A new instance of Entity.
- #onboardings ⇒ Object
- #refresh ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(object:, mode:, id:, holder_name:, holder_id:, is_root:, status: nil, country_code: nil, client: nil) ⇒ Entity
Returns a new instance of Entity.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fintoc/v2/resources/entity.rb', line 8 def initialize( object:, mode:, id:, holder_name:, holder_id:, is_root:, status: nil, country_code: nil, client: nil, ** ) @object = object @mode = mode @id = id @holder_name = holder_name @holder_id = holder_id @is_root = is_root @status = status @country_code = country_code @client = client end |
Instance Attribute Details
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
6 7 8 |
# File 'lib/fintoc/v2/resources/entity.rb', line 6 def country_code @country_code end |
#holder_id ⇒ Object (readonly)
Returns the value of attribute holder_id.
6 7 8 |
# File 'lib/fintoc/v2/resources/entity.rb', line 6 def holder_id @holder_id end |
#holder_name ⇒ Object (readonly)
Returns the value of attribute holder_name.
6 7 8 |
# File 'lib/fintoc/v2/resources/entity.rb', line 6 def holder_name @holder_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/fintoc/v2/resources/entity.rb', line 6 def id @id end |
#is_root ⇒ Object (readonly)
Returns the value of attribute is_root.
6 7 8 |
# File 'lib/fintoc/v2/resources/entity.rb', line 6 def is_root @is_root end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
6 7 8 |
# File 'lib/fintoc/v2/resources/entity.rb', line 6 def mode @mode end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
6 7 8 |
# File 'lib/fintoc/v2/resources/entity.rb', line 6 def object @object end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/fintoc/v2/resources/entity.rb', line 6 def status @status end |
Instance Method Details
#onboardings ⇒ Object
40 41 42 |
# File 'lib/fintoc/v2/resources/entity.rb', line 40 def onboardings @onboardings ||= Managers::OnboardingsManager.new(@client, @id) end |
#refresh ⇒ Object
35 36 37 38 |
# File 'lib/fintoc/v2/resources/entity.rb', line 35 def refresh fresh_entity = @client.entities.get(@id) refresh_from_entity(fresh_entity) end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/fintoc/v2/resources/entity.rb', line 31 def to_s "🏢 #{@holder_name} (#{@id})" end |