Class: ProsperWorks::Base
- Inherits:
-
Object
- Object
- ProsperWorks::Base
- Includes:
- SerializeEntity
- Defined in:
- lib/prosperworks/base.rb
Direct Known Subclasses
BaseEntity, CustomerSource, Pipeline, PipelineStage, Webhook
Instance Attribute Summary collapse
-
#date_created ⇒ Object
Returns the value of attribute date_created.
-
#id ⇒ Object
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Base
constructor
A new instance of Base.
- #set_attributes(attributes) ⇒ Object
Methods included from SerializeEntity
Constructor Details
#initialize(attributes = {}) ⇒ Base
Returns a new instance of Base.
12 13 14 |
# File 'lib/prosperworks/base.rb', line 12 def initialize(attributes = {}) set_attributes(attributes) end |
Instance Attribute Details
#date_created ⇒ Object
Returns the value of attribute date_created.
5 6 7 |
# File 'lib/prosperworks/base.rb', line 5 def date_created @date_created end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/prosperworks/base.rb', line 5 def id @id end |
Class Method Details
.client ⇒ Object
8 9 10 |
# File 'lib/prosperworks/base.rb', line 8 def self.client ProsperWorks.client end |
Instance Method Details
#set_attributes(attributes) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/prosperworks/base.rb', line 16 def set_attributes(attributes) attributes.each do |key, value| if self.respond_to?(key.to_sym) self.send("#{key}=", value) end end end |