velocify 0.1.0 → 0.1.1
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/README.md +2 -3
- data/lib/velocify/lead.rb +15 -0
- data/lib/velocify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6581d14d749b2c078a7a2989f87057de13f9be9d
|
4
|
+
data.tar.gz: e396d9ad2c7b08f45218d18f70fec99a61d894e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33ff9678e5cf648f1f894bcec1409c9497a119a83990064a0d38999c9f902c94ae680e258154d275cf1a83c77e478bc0eaea1c75eded72a709cdbfc9c0207bd3
|
7
|
+
data.tar.gz: 79944b40ba9dd23404a79804e34410b2f809df55f8fb5fa65de2ed3596f8925aa7e98b8bb74a0bddb0120804965238cf0423d7e58c3edf4126af80ea35af6175
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Velocify
|
2
|
-
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/velocify`. To experiment with that code, run `bin/console` for an interactive prompt.
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/velocify.svg)](http://badge.fury.io/rb/velocify)
|
4
3
|
|
5
4
|
## Installation
|
6
5
|
|
@@ -37,7 +36,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
37
36
|
|
38
37
|
## Contributing
|
39
38
|
|
40
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/pennymac/velocify. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
39
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/pennymac/velocify. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
41
40
|
|
42
41
|
## License
|
43
42
|
|
data/lib/velocify/lead.rb
CHANGED
@@ -7,6 +7,7 @@ module Velocify
|
|
7
7
|
:get_last_created_lead,
|
8
8
|
:get_leads_by_email,
|
9
9
|
:get_last_modified_lead,
|
10
|
+
:get_leads_by_phone,
|
10
11
|
:modify_lead_field,
|
11
12
|
:modify_lead_status,
|
12
13
|
:add_leads
|
@@ -75,6 +76,20 @@ module Velocify
|
|
75
76
|
end
|
76
77
|
end
|
77
78
|
|
79
|
+
# Retrieves a lead using a phone numebr
|
80
|
+
#
|
81
|
+
# @param phone [String] The phone number used to search for a lead
|
82
|
+
# @return [Hash] The leads having the matching phone number
|
83
|
+
#
|
84
|
+
def find_by_phone phone
|
85
|
+
verify_credentials!
|
86
|
+
|
87
|
+
request do
|
88
|
+
response = get_leads_by_phone(message: authenticated_message({ phone: phone.gsub(/[()\- ]/, '') }))
|
89
|
+
response.body[:get_leads_by_phone_response][:get_leads_by_phone_result]
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
78
93
|
# Retrieves a lead by an id
|
79
94
|
#
|
80
95
|
# @param id [String] the id of the lead
|
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.1
|
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-09-
|
11
|
+
date: 2015-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|