Class: PipeRocket::Organization
- Defined in:
- lib/pipe_rocket/organization.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Class Method Summary collapse
-
.key_field_hash ⇒ Object
Returns hash PipeRocket::Field object.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Organization
constructor
A new instance of Organization.
Methods inherited from Entity
#assign_custom_fields, #transform_field_name
Constructor Details
#initialize(hash) ⇒ Organization
Returns a new instance of Organization.
10 11 12 13 14 |
# File 'lib/pipe_rocket/organization.rb', line 10 def initialize(hash) super(hash.except(*Organization.key_field_hash.keys)) @id = hash['value'] if hash['value'].present? assign_custom_fields(Organization.key_field_hash, hash) end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/pipe_rocket/organization.rb', line 3 def id @id end |
Class Method Details
.key_field_hash ⇒ Object
Returns hash PipeRocket::Field object
6 7 8 |
# File 'lib/pipe_rocket/organization.rb', line 6 def self.key_field_hash @@key_field_hash ||= Pipedrive.organization_fields.key_field_hash end |