zoho_hub 0.1.41 → 0.1.44

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: ef86906dcbd61f1220e51e8ff15cd0aa36d21eaf47c5c5885725eeab2b8991f3
4
- data.tar.gz: 83e2deac604be09d6be6c666eb2a0cc122d2f793115507418d8c907b26835542
3
+ metadata.gz: 22921e919733ac0f41ce27e7c98468fc15aeb5a76193279fe30f2fa484c60a01
4
+ data.tar.gz: 1bd424d369234463b6be895aea6aabd6fd0d074e0b034477915640d35de41831
5
5
  SHA512:
6
- metadata.gz: f04f95d818bebd4c1ce69a32955e7dc32c0ad9a9fbacb576f42a78ede8aee2f3fbe16a201983263b8fce35470387a7a0c5327962f2abce5db130dc36ed9720db
7
- data.tar.gz: '0296f4d51126c4c742faa0d82117981ceede703e27271a0ebfda78bcd910a4b3c9346024fd4a3930ad20f853af1e535f939497577264a0854a4851b48340be67'
6
+ metadata.gz: c225fc47681c09c3d5d2445ea611fd1efb7c98e519dd282998f222baee6e93bae84309d0b37a0044eef4f101bdc13db686b72cba63e73b29a0f09b2c3120fb01
7
+ data.tar.gz: bca0f2bcc9b7a147750556764aedee38261f3f3d055daaff31427a2f126bfdd88a167c08c8835c8439c043977b0919cc3328b02944ac2cddbfb06c66ec8de319
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',
@@ -38,7 +38,8 @@ module ZohoHub
38
38
  submitted_to_lender_panel: :Submitted_to_Lender_Panel1,
39
39
  number_of_connections: :Number_of_Connections,
40
40
  turnover_figure: :Turnover_figure,
41
- last_attachment_uploaded: :Last_Attachment_Uploaded
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, :sent_by
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.41'
4
+ VERSION = '0.1.44'
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.41
4
+ version: 0.1.44
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: []