zoho_hub 0.1.15 → 0.1.16

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: 14d6734b3ceb5b8b9113b9939eca5773ffd6276a747d411b62cbed544c3de8e4
4
- data.tar.gz: 94ff88c3846688f31198048d56bf015194079eb28865572e00c266e2514b1b8a
3
+ metadata.gz: 9b84e9021f341ee250d6c2b052cd7fe7fc486389f93df87f5b5b1eb0304653b5
4
+ data.tar.gz: 6bd9c2dd8a6668eee36f9aedc026c5d4ec712665e25384988085fb4e10d45507
5
5
  SHA512:
6
- metadata.gz: 71718be88223d20d901fca49bc71b33bcf9afee557d3d21fea050ff51483f49bfe56f312341aab408b460b21b48c0fc8061ccd320082424db0572c29c2e6f2bb
7
- data.tar.gz: 1f03d82c81fab6e08a424ac80eb37dce90517623eb9fdeb7bd7f0b96a322199befd661c40d17be511fd99e7b2e56836a8ebc3650591e95c67436f61d4dafcf0b
6
+ metadata.gz: f121964d6da6548e91ea44dd1be7e7c8f0a024766ecac3034021664863ce02d51ad64c33c5a6099f8ac4a49ba070db6b04d9b0fa9a91556f91c546818c662ac2
7
+ data.tar.gz: c5e10c5a76a2d5834ffa6ce642585c4a8bde0cdfd09d2d124cbc0fac5587351268c31f14720fbdb9d79d28c78a20ee21438111c7909c234895513013269e311a
data/.travis.yml CHANGED
@@ -2,4 +2,4 @@ sudo: false
2
2
  language: ruby
3
3
  rvm:
4
4
  - 2.5.0
5
- before_install: gem install bundler -v 1.16.1
5
+ before_install: gem install bundler -v 2.0.1
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZohoHub
4
- VERSION = '0.1.15'
4
+ VERSION = '0.1.16'
5
5
  end
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.15
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-20 00:00:00.000000000 Z
11
+ date: 2019-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport