zoho_hub 0.1.40 → 0.1.43

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: 40e602b2dcf479221ea6083cbebc44c8801e1a5819f763c4dd1870f9b4c04cec
4
- data.tar.gz: 30c455fe4ff0083ce67d55de00d63ae7a261bde7d3a72be2e7dcc2c010e10130
3
+ metadata.gz: c285a9ec2a9801b3bec2c31939dc4beae0b8609a5f7c580b83ca10370602aaaa
4
+ data.tar.gz: e4a038822683ee471bca12920bb1f25212ef9ada0de6622b9e2eb7173f674166
5
5
  SHA512:
6
- metadata.gz: d7985223774bcf057d1a3c31b511c63fbf349ab1e0efbd3bb6d3f91a4708540f9695cdc3c1c471301e02d3bf1359100b363c0365c0738b4b7da99c4f6666c563
7
- data.tar.gz: 740d9835b674f0dab8b923c4cc5a55869d602803655282db99bfd2ec908f03a6875ab4e1a348c74ef63672c630316277feed3ab52f59e8de9e8a54ef6dcfe1ab
6
+ metadata.gz: 92c8d04ab630de0fd839c448145c15c07edca559ea204a05c9e69bf81b58fd1f7f438e8f66c71a50eadd575355d8b08db085da7adf118cd2cbe0f9405f288908
7
+ data.tar.gz: 164bdad2a96114ce70e3b9a1a0efb7fe1653919bd84230a7c3be3ade9fd960d33b72b3fdf824a8f60688febc5b63f6f72733a51b5bffdbb3c17bace6e79470a1
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 2.7.6
@@ -14,7 +14,7 @@ module ZohoHub
14
14
  attributes :accountant_id, :vat_registration, :published_all_of_market
15
15
  attributes :credit_risk_band, :live_ccjs, :satisfied_ccjs
16
16
  attributes :state, :number_of_connections
17
- attributes :submitted_to_lender_panel, :last_attachment_uploaded
17
+ attributes :submitted_to_lender_panel, :last_attachment_uploaded, :funds_timeline
18
18
 
19
19
  DEFAULTS = {
20
20
  currency: 'GBP',
@@ -37,8 +37,9 @@ module ZohoHub
37
37
  state: :State1,
38
38
  submitted_to_lender_panel: :Submitted_to_Lender_Panel1,
39
39
  number_of_connections: :Number_of_Connections,
40
- turnover_figure: :Turnover_figure
41
- last_attachment_uploaded: :Last_Attachment_Uploaded
40
+ turnover_figure: :Turnover_figure,
41
+ last_attachment_uploaded: :Last_Attachment_Uploaded,
42
+ funds_timeline: :When_will_you_needs_the_funds
42
43
  )
43
44
 
44
45
  def initialize(params)
@@ -11,8 +11,6 @@ module ZohoHub
11
11
  )
12
12
 
13
13
  def initialize(params)
14
- puts Rainbow(params).magenta
15
-
16
14
  attributes.each do |attr|
17
15
  zoho_key = attr_to_zoho_key(attr)
18
16
 
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'zoho_hub/records/base_record'
4
+
5
+ module ZohoHub
6
+ class SMSMessage < BaseRecord
7
+ attributes :id, :template, :state, :text, :contact_id, :potential_id, :name
8
+
9
+ attribute_translation id: :id
10
+
11
+ def initialize(params)
12
+ attributes.each do |attr|
13
+ zoho_key = attr_to_zoho_key(attr)
14
+
15
+ send("#{attr}=", params[zoho_key] || params[attr])
16
+ end
17
+
18
+ # Setup values as they come from the Zoho API if needed
19
+ @contact_id ||= params.dig(:Contact, :id)
20
+ @potential_id ||= params.dig(:Potential, :id)
21
+ end
22
+
23
+ def to_params
24
+ params = super
25
+
26
+ params[:Contact] = { id: @contact_id } if @contact_id
27
+ params[:Potential] = { id: @potential_id } if @potential_id
28
+
29
+ params
30
+ end
31
+ end
32
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZohoHub
4
- VERSION = '0.1.40'
4
+ VERSION = '0.1.43'
5
5
  end
data/lib/zoho_hub.rb CHANGED
@@ -18,6 +18,7 @@ require 'zoho_hub/records/product'
18
18
  require 'zoho_hub/records/attachment'
19
19
  require 'zoho_hub/records/credit_score'
20
20
  require 'zoho_hub/records/adverse_criteria'
21
+ require 'zoho_hub/records/sms_message'
21
22
 
22
23
  module ZohoHub
23
24
  module_function
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.40
4
+ version: 0.1.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Otero
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-24 00:00:00.000000000 Z
11
+ date: 2022-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -239,6 +239,7 @@ files:
239
239
  - lib/zoho_hub/records/potential.rb
240
240
  - lib/zoho_hub/records/product.rb
241
241
  - lib/zoho_hub/records/quote.rb
242
+ - lib/zoho_hub/records/sms_message.rb
242
243
  - lib/zoho_hub/records/vendor.rb
243
244
  - lib/zoho_hub/response.rb
244
245
  - lib/zoho_hub/version.rb
@@ -247,7 +248,7 @@ homepage: https://github.com/rikas/zoho_hub
247
248
  licenses:
248
249
  - MIT
249
250
  metadata: {}
250
- post_install_message:
251
+ post_install_message:
251
252
  rdoc_options: []
252
253
  require_paths:
253
254
  - lib
@@ -262,8 +263,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
263
  - !ruby/object:Gem::Version
263
264
  version: '0'
264
265
  requirements: []
265
- rubygems_version: 3.1.4
266
- signing_key:
266
+ rubygems_version: 3.1.6
267
+ signing_key:
267
268
  specification_version: 4
268
269
  summary: Simple gem to connect to Zoho CRM API V2
269
270
  test_files: []