velocify 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +4 -0
- data/CHANGELOG.md +36 -0
- data/Gemfile +2 -0
- data/README.md +4 -6
- data/lib/velocify.rb +1 -0
- data/lib/velocify/lead.rb +1 -1
- data/lib/velocify/report.rb +42 -0
- data/lib/velocify/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f32846f7d19ac4c67e7cabe1a12d29d567f3383f
|
4
|
+
data.tar.gz: 70def166f0ab97b89513fdca651313a83be4caaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47f4465c15aa8703d8d16059324fff481df9b263893732aaaa5d6b20f918d3c8fc431d2bc2fe3b25e61dc6c33d6b60bd0c1634ae5b28d86e44165be507f5ece7
|
7
|
+
data.tar.gz: 59abbd3f3f08a382c6e0a25a416eedc84b3f318b687e50d66942107cd1a8e619244c6033b4e679f9de7682c7240bd3e6d1f8b6b0b068b1d382d22a0be5825766
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,39 @@
|
|
1
|
+
# Changes in 0.1.5
|
2
|
+
|
3
|
+
* Fixes bug in ```return_array: ``` option for ```Velocify::Lead.add```
|
4
|
+
* Adds new feature for retrieving all reports
|
5
|
+
|
6
|
+
``` ruby
|
7
|
+
Velocify::Report.find_all
|
8
|
+
```
|
9
|
+
|
10
|
+
* Adds new feature for retrieving the results of a report
|
11
|
+
|
12
|
+
``` ruby
|
13
|
+
Velocify::Report.find_results id: 89
|
14
|
+
```
|
15
|
+
|
16
|
+
# Changes in 0.1.4
|
17
|
+
|
18
|
+
* ```Velocify::Lead.add``` now works:
|
19
|
+
|
20
|
+
``` ruby
|
21
|
+
lead = Velocify::Lead.new
|
22
|
+
lead.status_id = 13
|
23
|
+
lead.campaign_id = 35
|
24
|
+
lead.agent_id = 89
|
25
|
+
lead.add_field id: 2, value: "First"
|
26
|
+
lead.add_field id: 3, value: "Lead"
|
27
|
+
|
28
|
+
Velocify::Lead.add leads: [lead]
|
29
|
+
```
|
30
|
+
|
31
|
+
* Support for retrieving agents
|
32
|
+
|
33
|
+
``` ruby
|
34
|
+
agents = Velocify::Agent.find_all return_array: true
|
35
|
+
```
|
36
|
+
|
1
37
|
# Changes in 0.1.3
|
2
38
|
|
3
39
|
* All model classes now support the optional keyword argument ```return_array:``` if you want to receive
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Velocify
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/velocify.svg)](http://badge.fury.io/rb/velocify)
|
3
3
|
[![Code Climate](https://codeclimate.com/github/pennymac/velocify/badges/gpa.svg)](https://codeclimate.com/github/pennymac/velocify)
|
4
|
+
[![Build Status](https://travis-ci.org/pennymac/velocify.svg)](https://travis-ci.org/pennymac/velocify)
|
5
|
+
[![Test Coverage](https://codeclimate.com/github/pennymac/velocify/badges/coverage.svg)](https://codeclimate.com/github/pennymac/velocify/coverage)
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -58,17 +60,13 @@ status_id = Velocify::ResponseReader.read(kind: :status, response: Velocify::Sta
|
|
58
60
|
last_name_id = Velocify::ResponseReader.read(kind: :field, response: Velocify::Field.find_all).find_id_by_title 'Last Name'
|
59
61
|
first_name_id = Velocify::ResponseReader.read(kind: :field, response: Velocify::Field.find_all).find_id_by_title 'First Name'
|
60
62
|
|
61
|
-
lead = Lead.new
|
63
|
+
lead = Velocify::Lead.new
|
62
64
|
lead.campaign_id = campaign_id
|
63
65
|
lead.status_id = status_id
|
64
66
|
lead.add_field id: first_name_id, value: "Joe"
|
65
67
|
lead.add_field id: last_name_id, value: "Bo"
|
66
68
|
|
67
|
-
|
68
|
-
list.add_lead lead
|
69
|
-
xml_payload = list.render # Renders xml output
|
70
|
-
|
71
|
-
Velocify::Lead.add leads: xml_payload
|
69
|
+
Velocify::Lead.add leads: [ lead ]
|
72
70
|
```
|
73
71
|
|
74
72
|
## Changes
|
data/lib/velocify.rb
CHANGED
data/lib/velocify/lead.rb
CHANGED
@@ -0,0 +1,42 @@
|
|
1
|
+
module Velocify
|
2
|
+
class Report
|
3
|
+
include Model
|
4
|
+
|
5
|
+
class << self
|
6
|
+
def find_all destruct: false, return_array: false
|
7
|
+
verify_credentials!
|
8
|
+
|
9
|
+
request do
|
10
|
+
destruct_response? destruct
|
11
|
+
operation :get_reports
|
12
|
+
authenticate? true
|
13
|
+
transform do |resp|
|
14
|
+
if return_array
|
15
|
+
arrayify resp[:reports][:report]
|
16
|
+
else
|
17
|
+
resp
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def find_results report_id:, template_values: nil, destruct: false, return_array: false
|
24
|
+
verify_credentials!
|
25
|
+
|
26
|
+
request do
|
27
|
+
destruct_response? destruct
|
28
|
+
operation :get_report_results
|
29
|
+
authenticate? true
|
30
|
+
message report_id: report_id
|
31
|
+
transform do |resp|
|
32
|
+
if return_array
|
33
|
+
arrayify resp[:report_results][:result]
|
34
|
+
else
|
35
|
+
resp
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/lib/velocify/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: velocify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Dyba
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|
@@ -134,6 +134,7 @@ files:
|
|
134
134
|
- lib/velocify/lead.rb
|
135
135
|
- lib/velocify/message_payload.rb
|
136
136
|
- lib/velocify/model.rb
|
137
|
+
- lib/velocify/report.rb
|
137
138
|
- lib/velocify/response_reader.rb
|
138
139
|
- lib/velocify/status.rb
|
139
140
|
- lib/velocify/version.rb
|