zoho_hub 0.1.42 → 0.1.45

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: 6f1601f1a294e6f0b98e4fa8f4f67721555969c8fc68493631aadd3d8725d28b
4
- data.tar.gz: 62caa28fd2764e06dc64fd36122659bf820be136e052bd410baa511d6805b70b
3
+ metadata.gz: 9ba238b3ecbbc5a9fbddbd07901147f0b6b3a721c77a19bad3bfbfaa82f84d1a
4
+ data.tar.gz: f43219a772010212ddc8d648d6e5feebd76085faa3cda856ddc9db922a8885b0
5
5
  SHA512:
6
- metadata.gz: b29b6fd25fc0c1cf3ec8641af851883bb73d6d9f802cac01e22f26773f18640489eb56d127d4c8b629be17537c9bffe623980521b1d5f3eb19e8d2d379ef6324
7
- data.tar.gz: 91ef51fabb4895e4a2585f8077caa583c140d74815c692167620633d6ba3e54ee5ea51909ee47be3546ef682411dbc3897bd30db71e2ee9ddad81d0587069d10
6
+ metadata.gz: fbc6e31ac5216f63e201e9ec1fe37071d17eb20ff7becfc71cd5f870f37cacee5544e1bee08169281ebf63c9d45d1bc7e75e36d8e067206dcb546c321fa85f23
7
+ data.tar.gz: 6bf34d0c845d1e8a9574a72fb8e9720b1f31055dc70f806649f01a9a2d4ba20fb9b69320074e4868c492561d205b5d8adad299754a92154d56435ece8de2dec4
@@ -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
@@ -3,7 +3,7 @@
3
3
  module ZohoHub
4
4
  class Vendor < BaseRecord
5
5
  attributes :id, :email, :description, :vendor_name, :website, :owner_id, :phone, :currency
6
- attributes :company_reg_no
6
+ attributes :company_reg_no, :created_time, :modified_time, :lender_status
7
7
 
8
8
  attribute_translation(
9
9
  id: :id
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZohoHub
4
- VERSION = '0.1.42'
4
+ VERSION = '0.1.45'
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.42
4
+ version: 0.1.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Otero
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-17 00:00:00.000000000 Z
11
+ date: 2022-07-11 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