zoho_hub 0.1.42 → 0.1.43
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zoho_hub/records/product.rb +0 -2
- data/lib/zoho_hub/records/sms_message.rb +32 -0
- data/lib/zoho_hub/version.rb +1 -1
- data/lib/zoho_hub.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c285a9ec2a9801b3bec2c31939dc4beae0b8609a5f7c580b83ca10370602aaaa
|
4
|
+
data.tar.gz: e4a038822683ee471bca12920bb1f25212ef9ada0de6622b9e2eb7173f674166
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92c8d04ab630de0fd839c448145c15c07edca559ea204a05c9e69bf81b58fd1f7f438e8f66c71a50eadd575355d8b08db085da7adf118cd2cbe0f9405f288908
|
7
|
+
data.tar.gz: 164bdad2a96114ce70e3b9a1a0efb7fe1653919bd84230a7c3be3ade9fd960d33b72b3fdf824a8f60688febc5b63f6f72733a51b5bffdbb3c17bace6e79470a1
|
@@ -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
|
data/lib/zoho_hub/version.rb
CHANGED
data/lib/zoho_hub.rb
CHANGED
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.
|
4
|
+
version: 0.1.43
|
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-
|
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
|