zoho_hub 0.1.17 → 0.1.18

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: cf4a7d2f509467db7f812178010051778b79d1039a55a8f96898ae9e073489b1
4
- data.tar.gz: 1fcc4e9ee9ae2d1c7fad3c2bebc80a541928d42062f3e701a495b59f56d09ae7
3
+ metadata.gz: 84262876f36fb21c0f0cb89d56d8dd531fef6828d72f54f38463861964cb5366
4
+ data.tar.gz: 494f4ced565252a8ee0cd04cfc982cf53c1bcaf2468227f9919ab24ee24856a2
5
5
  SHA512:
6
- metadata.gz: 915784445d0975cbe42975e2879edac513e0a84cc9ed8da053afd21a85566aa56b77e010b9f336933feea5f5bce4b474e88df8ad49d003b38c12b6e2e6385d8b
7
- data.tar.gz: f45f8e724fb663cf9b4b8c7a15b9738b824a8fd771558b151e761bd00366e0bef8ec654bd3677d78f5b23c3dc50c92ceb482ce084dfe8a49f47bd823dad33335
6
+ metadata.gz: 2196186030ca801f3ef0a9c3df47418cefab10b90a01ea3a477c4e411161e4adeea38a11428cd1d418af9039780604e5a8f53f8e286bb545a1dc23a6e99b7912
7
+ data.tar.gz: 582a600fb2751d0ee756b97f88cfe653643a6d37be0208564ba5b6b6d3c2e49ea76bbd3afdd074ca29181b485058b3b46675dbdd181ed73f0a134daa359270d4
@@ -121,12 +121,17 @@ module ZohoHub
121
121
  self.class.put(path, params)
122
122
  end
123
123
 
124
- def save
124
+ # Save the record to Zoho
125
+ # trigger: ['workflow', 'approval', 'blueprint']
126
+ def save(trigger:)
127
+ json = { data: [to_params] }
128
+ json[:trigger] = Array(trigger) if trigger
129
+
125
130
  body = if new_record? # create new record
126
- post(self.class.request_path, data: [to_params])
131
+ post(self.class.request_path, json)
127
132
  else # update existing record
128
133
  path = File.join(self.class.request_path, id)
129
- put(path, data: [to_params])
134
+ put(path, json)
130
135
  end
131
136
 
132
137
  response = build_response(body)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZohoHub
4
- VERSION = '0.1.17'
4
+ VERSION = '0.1.18'
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.17
4
+ version: 0.1.18
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-25 00:00:00.000000000 Z
11
+ date: 2019-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport