velocify 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97f15fb45f36d32865f86c664f2fd251ce441619
4
- data.tar.gz: d564c72f7a58df8870a73be0adf13e079905cf60
3
+ metadata.gz: 6581d14d749b2c078a7a2989f87057de13f9be9d
4
+ data.tar.gz: e396d9ad2c7b08f45218d18f70fec99a61d894e9
5
5
  SHA512:
6
- metadata.gz: db057c074748a81574b5323dda98b6cef55ac129affde7a2ba0a1cf5224db72134b788799484a597deb8270100b22781b11fa0d7b43c540b778675c6a36dac70
7
- data.tar.gz: 9223d5c1869477f446a1b8c23ee4fa4aa331736d57141e896eef0942637973855271cbb64123e3d3f16dbaf564b50a111b7b3f24e51eca99747108acd32844f6
6
+ metadata.gz: 33ff9678e5cf648f1f894bcec1409c9497a119a83990064a0d38999c9f902c94ae680e258154d275cf1a83c77e478bc0eaea1c75eded72a709cdbfc9c0207bd3
7
+ data.tar.gz: 79944b40ba9dd23404a79804e34410b2f809df55f8fb5fa65de2ed3596f8925aa7e98b8bb74a0bddb0120804965238cf0423d7e58c3edf4126af80ea35af6175
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /tmp/
10
10
  *~
11
11
  .env
12
+ *.gem
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
@@ -1,3 +1,3 @@
1
1
  module Velocify
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-15 00:00:00.000000000 Z
11
+ date: 2015-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon