zoho_hub 0.1.25 → 0.1.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/lib/zoho_hub/records/adverse_criteria.rb +43 -0
- data/lib/zoho_hub/records/credit_score.rb +36 -0
- data/lib/zoho_hub/records/potential.rb +9 -2
- data/lib/zoho_hub/version.rb +1 -1
- data/lib/zoho_hub.rb +2 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c0b66c76f28dcdef377d2aa2b8747ba5dc5b78864278bf7e2c33067233abb49
|
4
|
+
data.tar.gz: 6521445a8b48fea2334bbb0e58e722cbed45576ffbd2515a26d2ac3e7bfc7c84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9840d0c83c4f18591eababff051b1e42f1dbdfffb5641ac2e075bade45736d7af6d3f43f6153ca3fbf4033ee4a2fdfb180d81a6675e112520250355da881fa0
|
7
|
+
data.tar.gz: 57ca1b772ed065f8d3f7377ba3be41905616ad4c812b9e6cc5dc6b57ae3a90aad6bfec417e6b24d373ec1b0e6e099258ad9187cb8ce731cb4e065a2cb8d44dc3
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.2
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'zoho_hub/records/base_record'
|
4
|
+
|
5
|
+
module ZohoHub
|
6
|
+
class AdverseCriteria < BaseRecord
|
7
|
+
request_path 'Adverse_Criteria'
|
8
|
+
|
9
|
+
attributes :id, :account_id, :date_decided, :date_paid
|
10
|
+
attributes :status, :amount, :currency, :court
|
11
|
+
attributes :case_reference, :entity_details, :data_source
|
12
|
+
|
13
|
+
attribute_translation(
|
14
|
+
id: :id,
|
15
|
+
case_reference: :Name,
|
16
|
+
status: :CCJ_Status,
|
17
|
+
amount: :CCJ_Amount,
|
18
|
+
data_source: :CCJ_Data_Source,
|
19
|
+
date_paid: :Date_paid,
|
20
|
+
date_decided: :Date_decided,
|
21
|
+
entity_details: :Entity_details
|
22
|
+
)
|
23
|
+
|
24
|
+
def initialize(params)
|
25
|
+
attributes.each do |attr|
|
26
|
+
zoho_key = attr_to_zoho_key(attr)
|
27
|
+
|
28
|
+
send("#{attr}=", params[zoho_key] || params[attr])
|
29
|
+
end
|
30
|
+
|
31
|
+
# Setup values as they come from the Zoho API if needed
|
32
|
+
@account_id ||= params.dig(:Account, :id)
|
33
|
+
end
|
34
|
+
|
35
|
+
def to_params
|
36
|
+
params = super
|
37
|
+
|
38
|
+
params[:Account] = { id: @account_id } if @account_id
|
39
|
+
|
40
|
+
params
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'zoho_hub/records/base_record'
|
4
|
+
|
5
|
+
module ZohoHub
|
6
|
+
class CreditScore < BaseRecord
|
7
|
+
request_path 'Credit_Scores'
|
8
|
+
|
9
|
+
attributes :id, :account_id, :credit_data_source, :credit_score_band
|
10
|
+
attributes :score_description, :credit_score_number, :credit_limit, :currency
|
11
|
+
|
12
|
+
attribute_translation(
|
13
|
+
id: :id,
|
14
|
+
credit_score_number: :Name
|
15
|
+
)
|
16
|
+
|
17
|
+
def initialize(params)
|
18
|
+
attributes.each do |attr|
|
19
|
+
zoho_key = attr_to_zoho_key(attr)
|
20
|
+
|
21
|
+
send("#{attr}=", params[zoho_key] || params[attr])
|
22
|
+
end
|
23
|
+
|
24
|
+
# Setup values as they come from the Zoho API if needed
|
25
|
+
@account_id ||= params.dig(:Account_Name, :id)
|
26
|
+
end
|
27
|
+
|
28
|
+
def to_params
|
29
|
+
params = super
|
30
|
+
|
31
|
+
params[:Account_Name] = { id: @account_id } if @account_id
|
32
|
+
|
33
|
+
params
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -11,7 +11,9 @@ module ZohoHub
|
|
11
11
|
attributes :campaign_id, :account_id, :contact_id, :campaign_detail, :reviewers_comment
|
12
12
|
attributes :accounting_software, :banking_provider
|
13
13
|
attributes :guarantee_types, :home_ownership_status
|
14
|
-
attributes :accountant_id, :vat_registration
|
14
|
+
attributes :accountant_id, :vat_registration, :published_all_of_market
|
15
|
+
attributes :credit_risk_band, :live_ccjs, :satisfied_ccjs
|
16
|
+
attributes :state, :number_of_connections
|
15
17
|
|
16
18
|
DEFAULTS = {
|
17
19
|
currency: 'GBP',
|
@@ -27,7 +29,12 @@ module ZohoHub
|
|
27
29
|
description: :Project_description,
|
28
30
|
employee_count: :Number_of_Employees,
|
29
31
|
use_proceeds: :use_proceeds,
|
30
|
-
vat_registration: :Pick_List_15
|
32
|
+
vat_registration: :Pick_List_15,
|
33
|
+
live_ccjs: :Live_CCJs,
|
34
|
+
satisfied_ccjs: :Satisfied_CCJs,
|
35
|
+
published_all_of_market: :Published_to_All_of_Market,
|
36
|
+
state: :State1,
|
37
|
+
number_of_connections: :Number_of_Connections
|
31
38
|
)
|
32
39
|
|
33
40
|
def initialize(params)
|
data/lib/zoho_hub/version.rb
CHANGED
data/lib/zoho_hub.rb
CHANGED
@@ -16,6 +16,8 @@ require 'zoho_hub/records/quote'
|
|
16
16
|
require 'zoho_hub/records/vendor'
|
17
17
|
require 'zoho_hub/records/product'
|
18
18
|
require 'zoho_hub/records/attachment'
|
19
|
+
require 'zoho_hub/records/credit_score'
|
20
|
+
require 'zoho_hub/records/adverse_criteria'
|
19
21
|
|
20
22
|
module ZohoHub
|
21
23
|
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.
|
4
|
+
version: 0.1.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Otero
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -230,10 +230,12 @@ files:
|
|
230
230
|
- lib/zoho_hub/connection.rb
|
231
231
|
- lib/zoho_hub/errors.rb
|
232
232
|
- lib/zoho_hub/records/account.rb
|
233
|
+
- lib/zoho_hub/records/adverse_criteria.rb
|
233
234
|
- lib/zoho_hub/records/attachment.rb
|
234
235
|
- lib/zoho_hub/records/base_record.rb
|
235
236
|
- lib/zoho_hub/records/campaign.rb
|
236
237
|
- lib/zoho_hub/records/contact.rb
|
238
|
+
- lib/zoho_hub/records/credit_score.rb
|
237
239
|
- lib/zoho_hub/records/potential.rb
|
238
240
|
- lib/zoho_hub/records/product.rb
|
239
241
|
- lib/zoho_hub/records/quote.rb
|
@@ -260,8 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
262
|
- !ruby/object:Gem::Version
|
261
263
|
version: '0'
|
262
264
|
requirements: []
|
263
|
-
|
264
|
-
rubygems_version: 2.7.6
|
265
|
+
rubygems_version: 3.1.4
|
265
266
|
signing_key:
|
266
267
|
specification_version: 4
|
267
268
|
summary: Simple gem to connect to Zoho CRM API V2
|