pipe_drive_ruby_wrapper 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pipe_drive/base.rb +3 -3
- data/lib/pipe_drive/field_base.rb +8 -0
- data/lib/pipe_drive/resource_base.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 975c71b436b22384e3afea10a07730a4c62c455a70d2eb071ad72705ef2eeda2
|
4
|
+
data.tar.gz: 29b8c7a98cc9a65744a8b367d150e1f72a3c0684a601034a26a2bb81e00cdaf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1aab8a3d2d54b7154ec3a6c2fa691bafcb6f43170eeaa991821427a1a8c189c0a5db8d267496dc60c68d46fc7a44f4ede08c9c388b957649b2e4c62ff598c03
|
7
|
+
data.tar.gz: f64451c47731ae413824f4e5041136eb2a203d0c6193887b2073e36f758c3331dbc617c2991f0e934099075d25a7683a059eadce3c427ca3cf472303c803fe4d
|
data/lib/pipe_drive/base.rb
CHANGED
@@ -105,12 +105,12 @@ module PipeDrive
|
|
105
105
|
def transform_opts(opts)
|
106
106
|
new_opts = {}
|
107
107
|
opts.each_pair do |key, value|
|
108
|
-
if field_keys[key].nil?
|
108
|
+
if resource_class.field_keys[key].nil?
|
109
109
|
new_opts[key] = value
|
110
110
|
else
|
111
|
-
new_key = field_keys[key][:key]
|
111
|
+
new_key = resource_class.field_keys[key][:key]
|
112
112
|
if value.is_a?(Array)
|
113
|
-
field_info = field_class.find_by_id(field_keys[key][:id])
|
113
|
+
field_info = field_class.find_by_id(resource_class.field_keys[key][:id])
|
114
114
|
new_value = value.map do |val|
|
115
115
|
target = field_info.options.find{|f| f[:label] == val}
|
116
116
|
target[:id] unless target.nil?
|
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.
|
4
|
+
version: 0.2.1
|
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-
|
11
|
+
date: 2018-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|