zoho_hub 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/lib/zoho_hub/records/quote.rb +11 -3
- data/lib/zoho_hub/version.rb +1 -1
- 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: 9b84e9021f341ee250d6c2b052cd7fe7fc486389f93df87f5b5b1eb0304653b5
|
4
|
+
data.tar.gz: 6bd9c2dd8a6668eee36f9aedc026c5d4ec712665e25384988085fb4e10d45507
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f121964d6da6548e91ea44dd1be7e7c8f0a024766ecac3034021664863ce02d51ad64c33c5a6099f8ac4a49ba070db6b04d9b0fa9a91556f91c546818c662ac2
|
7
|
+
data.tar.gz: c5e10c5a76a2d5834ffa6ce642585c4a8bde0cdfd09d2d124cbc0fac5587351268c31f14720fbdb9d79d28c78a20ee21438111c7909c234895513013269e311a
|
data/.travis.yml
CHANGED
@@ -4,8 +4,7 @@ require 'zoho_hub/records/base_record'
|
|
4
4
|
|
5
5
|
module ZohoHub
|
6
6
|
class Quote < BaseRecord
|
7
|
-
attributes :id, :stage, :subject
|
8
|
-
attributes :potential_id
|
7
|
+
attributes :id, :stage, :subject, :potential_id, :owner_id, :product_id
|
9
8
|
|
10
9
|
attribute_translation(
|
11
10
|
id: :id,
|
@@ -16,12 +15,19 @@ module ZohoHub
|
|
16
15
|
puts Rainbow(params).bright.red
|
17
16
|
attributes.each do |attr|
|
18
17
|
zoho_key = attr_to_zoho_key(attr)
|
19
|
-
|
18
|
+
puts "Sending #{attr}=, zoho_key: #{zoho_key}"
|
20
19
|
send("#{attr}=", params[zoho_key] || params[attr])
|
21
20
|
end
|
22
21
|
|
23
22
|
@potential_id ||= params.dig(:Deal_Name, :id)
|
24
23
|
@lender_organisation_id ||= params.dig(:Account_Name, :id)
|
24
|
+
@owner_id ||= params.dig(:Owner, :id)
|
25
|
+
|
26
|
+
# The Quote has an array of products but we only care about one
|
27
|
+
if params.dig(:Product_Details)
|
28
|
+
product = params.dig(:Product_Details).first
|
29
|
+
@product_id = product.dig(:id)
|
30
|
+
end
|
25
31
|
end
|
26
32
|
|
27
33
|
def to_params
|
@@ -29,6 +35,8 @@ module ZohoHub
|
|
29
35
|
|
30
36
|
params[:Deal_Name] = { id: @potential_id } if @potential_id
|
31
37
|
params[:Account_Name] = { id: @lender_organisation_id } if @lender_organisation_id
|
38
|
+
params[:Owner] = { id: @owner_id } if @owner_id
|
39
|
+
params[:Product_Details] = [{ id: @product_id }] if @product_id
|
32
40
|
end
|
33
41
|
end
|
34
42
|
end
|
data/lib/zoho_hub/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zoho_hub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Otero
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|