Class: BaseCRM::Deal
- Defined in:
- lib/basecrm/models/deal.rb
Instance Attribute Summary collapse
-
#added_on ⇒ DateTime
Date and time when the deal was added in UTC (ISO8601 format).
-
#contact_id ⇒ Integer
Unique identifier of a primary contact.
-
#created_at ⇒ DateTime
readonly
Date and time that the deal was created in UTC (ISO8601 format).
-
#creator_id ⇒ Integer
readonly
Unique identifier of the user who created the deal.
-
#currency ⇒ String
Currency of the deal, specified in 3-character currency code (ISO4217) format.
-
#custom_fields ⇒ Hash
Custom fields are key-value data attached to a deal.
-
#customized_win_likelihood ⇒ Integer
User-provided win likelihood with value range 0-100.
-
#dropbox_email ⇒ String
readonly
Dropbox email connected with the deal.
-
#estimated_close_date ⇒ String
Estimated close date of the deal.
-
#hot ⇒ Boolean
Indicator of whether or not the deal is hot.
-
#id ⇒ Integer
readonly
Unique identifier of the deal.
-
#last_stage_change_at ⇒ DateTime
Date and time when the deal was moved into the current stage in UTC (ISO8601 format).
-
#last_stage_change_by_id ⇒ Integer
readonly
Unique identifier of the user who moved the deal into the current stage.
-
#loss_reason_id ⇒ Integer
Reason why the deal was lost.
-
#name ⇒ String
Name of the deal.
-
#organization_id ⇒ Integer
readonly
Unique identifier of an organization.
-
#owner_id ⇒ Integer
Unique identifier of the user that the deal is assigned to.
-
#source_id ⇒ Integer
Unique identifier of the Source.
-
#stage_id ⇒ Integer
Unique identifier of the deal’s current stage in the pipeline.
-
#tags ⇒ Array<String>
An array of tags for a deal.
-
#updated_at ⇒ DateTime
readonly
Date and time of the last update on the deal in UTC (ISO8601 format).
-
#value ⇒ BigDecimal
Value of the deal in a currency specified in the ‘currency` field.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Deal
constructor
attr_accessor :contact_id attr_accessor :currency attr_accessor :custom_fields attr_accessor :customized_win_likelihood attr_accessor :estimated_close_date attr_accessor :hot attr_accessor :last_stage_change_at attr_accessor :loss_reason_id attr_accessor :name attr_accessor :owner_id attr_accessor :source_id attr_accessor :stage_id attr_accessor :tags attr_accessor :added_on attr_accessor :value.
Constructor Details
#initialize(*args) ⇒ Deal
attr_accessor :contact_id attr_accessor :currency attr_accessor :custom_fields attr_accessor :customized_win_likelihood attr_accessor :estimated_close_date attr_accessor :hot attr_accessor :last_stage_change_at attr_accessor :loss_reason_id attr_accessor :name attr_accessor :owner_id attr_accessor :source_id attr_accessor :stage_id attr_accessor :tags attr_accessor :added_on attr_accessor :value
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
Instance Attribute Details
#added_on ⇒ DateTime
Returns Date and time when the deal was added in UTC (ISO8601 format).
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#contact_id ⇒ Integer
Returns Unique identifier of a primary contact.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#created_at ⇒ DateTime (readonly)
Returns Date and time that the deal was created in UTC (ISO8601 format).
|
# File 'lib/basecrm/models/deal.rb', line 5
|
#creator_id ⇒ Integer (readonly)
Returns Unique identifier of the user who created the deal.
|
# File 'lib/basecrm/models/deal.rb', line 5
|
#currency ⇒ String
Returns Currency of the deal, specified in 3-character currency code (ISO4217) format.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#custom_fields ⇒ Hash
Returns Custom fields are key-value data attached to a deal. See more at [Custom Fields](/docs/rest/articles/requests#custom_fields).
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#customized_win_likelihood ⇒ Integer
Returns User-provided win likelihood with value range 0-100.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#dropbox_email ⇒ String (readonly)
Returns Dropbox email connected with the deal.
|
# File 'lib/basecrm/models/deal.rb', line 5
|
#estimated_close_date ⇒ String
Returns Estimated close date of the deal.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#hot ⇒ Boolean
Returns Indicator of whether or not the deal is hot.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#id ⇒ Integer (readonly)
Returns Unique identifier of the deal.
|
# File 'lib/basecrm/models/deal.rb', line 5
|
#last_stage_change_at ⇒ DateTime
Returns Date and time when the deal was moved into the current stage in UTC (ISO8601 format).
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#last_stage_change_by_id ⇒ Integer (readonly)
Returns Unique identifier of the user who moved the deal into the current stage.
|
# File 'lib/basecrm/models/deal.rb', line 5
|
#loss_reason_id ⇒ Integer
Returns Reason why the deal was lost.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#name ⇒ String
Returns Name of the deal.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#organization_id ⇒ Integer (readonly)
Returns Unique identifier of an organization.
|
# File 'lib/basecrm/models/deal.rb', line 5
|
#owner_id ⇒ Integer
Returns Unique identifier of the user that the deal is assigned to.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#source_id ⇒ Integer
Returns Unique identifier of the Source.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#stage_id ⇒ Integer
Returns Unique identifier of the deal’s current stage in the pipeline.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#tags ⇒ Array<String>
Returns An array of tags for a deal. See more at [Tags](/docs/rest/articles/requests#tags).
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |
#updated_at ⇒ DateTime (readonly)
Returns Date and time of the last update on the deal in UTC (ISO8601 format).
|
# File 'lib/basecrm/models/deal.rb', line 5
|
#value ⇒ BigDecimal
Returns Value of the deal in a currency specified in the ‘currency` field.
73 74 75 76 |
# File 'lib/basecrm/models/deal.rb', line 73 def initialize(*args) super @table[:value] = BaseCRM::Coercion.to_decimal_value(@table[:value] || 0) end |