Skip to content

Commit

Permalink
Merge pull request #79 from zendesk/strus/added-on
Browse files Browse the repository at this point in the history
Add possibility to set deal's 'added_on' attribute
  • Loading branch information
struniu authored Jun 29, 2021
2 parents 7fab87c + c317650 commit a811f6d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
## CHANGELOG

v1.3.10 (2021-06-28)
**Features and Improvements**
* Added possibility to set deal's 'added_on' attribute

v1.3.9 (2021-03-30)
**Features and Improvements**

* Fixed issue where `unqualified_reason_id` param for deals could not be updated

v1.3.8 (2019-05-11)
Expand Down
5 changes: 4 additions & 1 deletion lib/basecrm/models/deal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Deal < Model
# @return [Hash] Custom fields are key-value data attached to a deal. See more at [Custom Fields](/docs/rest/articles/requests#custom_fields).
# attr_accessor :custom_fields
# @!attribute [rw] customized_win_likelihood
# @return [Integer] User-provided win likelihood with value range 0100.
# @return [Integer] User-provided win likelihood with value range 0-100.
# attr_accessor :customized_win_likelihood
# @!attribute [rw] estimated_close_date
# @return [String] Estimated close date of the deal
Expand Down Expand Up @@ -63,6 +63,9 @@ class Deal < Model
# @!attribute [rw] tags
# @return [Array<String>] An array of tags for a deal. See more at [Tags](/docs/rest/articles/requests#tags).
# attr_accessor :tags
# @!attribute [rw] added_on
# @return [DateTime] Date and time when the deal was added in UTC (ISO8601 format).
# attr_accessor :added_on
# @!attribute [rw] value
# @return [BigDecimal] Value of the deal in a currency specified in the `currency` field.
# attr_accessor :value
Expand Down
4 changes: 3 additions & 1 deletion lib/basecrm/services/deals_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

module BaseCRM
class DealsService
OPTS_KEYS_TO_PERSIST = Set[:contact_id, :currency, :custom_fields, :hot, :loss_reason_id, :unqualified_reason_id, :name, :owner_id, :source_id, :stage_id, :tags, :value, :last_stage_change_at, :estimated_close_date, :customized_win_likelihood]
OPTS_KEYS_TO_PERSIST = Set[:contact_id, :currency, :custom_fields, :hot, :loss_reason_id,
:unqualified_reason_id, :name, :owner_id, :source_id, :stage_id, :tags, :value, :last_stage_change_at,
:estimated_close_date, :customized_win_likelihood, :added_on]

def initialize(client)
@client = client
Expand Down
2 changes: 1 addition & 1 deletion lib/basecrm/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module BaseCRM
VERSION = "1.3.9"
VERSION = "1.3.10"
end

0 comments on commit a811f6d

Please sign in to comment.