pipe_drive_ruby_wrapper 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3f1272be9378449508f94f4163c42fffd5607f5aba7de4ea509d8dd276798c8
4
- data.tar.gz: c5aa10c325bfce383987ebada3921f97e1822ea2b351c47501eaa82507e97f9d
3
+ metadata.gz: 7cac0aa82c3cd0e8ea855ef7d5bc8e7f00075edd85975dcca1228cbfacab6a54
4
+ data.tar.gz: c8cf821f5809d90b4f3ef799d1c22813a48c8f54692e4193c0d68b0099e177de
5
5
  SHA512:
6
- metadata.gz: abaabdd5a1e1a2442411640e86a4f7e4eaa69a54177f425244071c558f13f69512a097603f1f621edbd33e71d804c7fd42d75f666c11d530707a0a2e41c1690f
7
- data.tar.gz: 5c50e3d45d7b8fa452666bd01b825c53a229ff4a19f9566ecea9ff51c1b0f9c2fc96e5bc1eff49d713b90fc0a7a9b031722b2a6f92bba400bcbcca0a33e5722c
6
+ metadata.gz: 56f5177be521f95b9279ffeb496825ffe1efdce522d9e03f2cc55be7d5280bda42e729ee5e6851f0752ba6a1202144edf8a72d0de10b36eda77136d67fd2de17
7
+ data.tar.gz: e5f46b2e738ffcbd8f3a62a86ff378aabb8d395ce8ab4f11995d1864d50a20b3a0922814f5e76bc7e4458a41d1e02a755abd4d97041a4041a8ad1d59fe796095
@@ -3,5 +3,17 @@ module PipeDrive
3
3
  ALLOW_FOR_SEARCH_TERMS = %i[name]
4
4
  ALLOW_FOR_ADDITION_SEARCH_OPTS = %i[]
5
5
 
6
+ class << self
7
+
8
+ def pipeline_ids_map
9
+ id_map = {}
10
+ list.each do |pipeline|
11
+ pipeline_name = parameterize(pipeline.name, '_').to_sym
12
+ id_map[pipeline_name] = pipeline.id
13
+ end
14
+ id_map
15
+ end
16
+
17
+ end
6
18
  end
7
19
  end
@@ -11,7 +11,7 @@ module PipeDrive
11
11
  FIELD_CLASSES = %w[OrganizationField PersonField DealField]
12
12
 
13
13
  class << self; attr_accessor :api_token; end
14
- class << self; attr_writer :field_keys, :field_names, :stage_ids; end
14
+ class << self; attr_writer :field_keys, :field_names, :stage_ids, :pipeline_ids; end
15
15
 
16
16
  class << self
17
17
  def setup
@@ -37,14 +37,21 @@ module PipeDrive
37
37
  end
38
38
 
39
39
  def stage_ids
40
- return @stage_ids unless @stage_ids.nil? || @stage_ids.empty?
41
- @stage_ids = Stage.stage_ids_map
40
+ @stage_ids ||= Stage.stage_ids_map
42
41
  end
43
42
 
44
43
  def reset_stage_ids!
45
44
  @stage_ids = Stage.stage_ids_map
46
45
  end
47
46
 
47
+ def pipeline_ids
48
+ @pipeline_ids ||= Pipeline.pipeline_ids_map
49
+ end
50
+
51
+ def reset_pipeline_ids!
52
+ @pipeline_ids = Pipeline.pipeline_ids_map
53
+ end
54
+
48
55
  def host
49
56
  "https://api.pipedrive.com"
50
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipe_drive_ruby_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - JiaRou Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-26 00:00:00.000000000 Z
11
+ date: 2018-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec