fedex_location_service 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
  SHA256:
3
- metadata.gz: af84ccb95688e10d48bd4db5a079c25f70406a8192080756d6d51e28c6407fa6
4
- data.tar.gz: 5dc0413853f9442227615134fd259579224378d7a34edc639a54501e7de150a2
3
+ metadata.gz: 41a329f3f3c6d1253f5ad1b4480eabb37d725b17b63f5adf8a8ba16bab53b462
4
+ data.tar.gz: a008f11e16c594d7811e214637459d34039aa84dd76d8c8046d98c852ec7c2f9
5
5
  SHA512:
6
- metadata.gz: e3ffae7a1ec1dc4d8f9fe40d906a28a82547a753f908be5b182dc90967fd59e817fd2cf68854202e808d51b5efc6eb522db92db003f6cd500923794f587f488f
7
- data.tar.gz: c5f5bcf3e2ab5d63b159db37bf86782fa243376e0439964e6800402a599493311e51b33ff0ddaa28c210d80ae4816ccc5c5a1e16fd196db4cb90ae62f247e14c
6
+ metadata.gz: 4a38326d2f006fe1cbb355d7fd391b131d4ed2f39c5852e5162de68f1c065a0d1f381a5dc71e4e1aca5b1d562b74278f0ee4a17e32e5820cd17a8cda9112933c
7
+ data.tar.gz: ce65aa8fb7c3071d93b6d43d0fba71cfacaa9a58c01e65d6638dd0029df19026a040a3cddcb4863abb0e9b9b53addeb338d05836089b05a54d7b6e05e251f0d2
data/README.md CHANGED
@@ -36,11 +36,11 @@ end
36
36
 
37
37
  In order to build a message to pass to the FedEx API you will need to create an address object that resonds to the following:
38
38
 
39
- address_one
40
- address_two
41
- city
42
- state
43
- postal_code
39
+ * address_one
40
+ * address_two
41
+ * city
42
+ * state
43
+ * postal_code
44
44
 
45
45
  This can be done with a Struct or with active_record address model. This can then be passed to FedexLocationService::Message.build() to generate the proper SOAP message.
46
46
 
@@ -56,7 +56,29 @@ message = FedexLocationService::Message.build(addr)
56
56
 
57
57
  The resulting message can then be passed to FedexLocationService::Request.call().
58
58
 
59
- This will return a Savon object that you can parse.
59
+ ```ruby
60
+ response = FedexLocationService::Request.call(message)
61
+ ```
62
+
63
+ This will return a Savon::Response object that you can parse.
64
+
65
+ Included is a FedexLocationService::Locations.call() method that will extract the first 5 closest locations and return the addresses, distance and a map image.
66
+
67
+ ```ruby
68
+ locations = FedexLocationService::Locations.call(response)
69
+
70
+ locations.first =
71
+
72
+ {
73
+ :company_name => "Walgreens 3685",
74
+ :street => "5802 W Broad St",
75
+ :city => "Richmond",
76
+ :state => "VA",
77
+ :postal_code => "23230",
78
+ :distance => "0.275",
79
+ :map_url => "https://maps.googleapis.com/maps/api/staticmap?size=350x350&zoom=15&markers=color:blue%7Clabel:A%7C37.59091,-77.50386&maptype=roadmap&sensor=false"
80
+ }
81
+ ```
60
82
 
61
83
  ## Development
62
84
 
@@ -10,6 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["casey.ellett@gmail.com"]
11
11
 
12
12
  spec.summary = %q{Interface for FedEx Location Services API.}
13
+ spec.homepage = 'https://github.com/odin/fedex_location_service'
13
14
  spec.license = "MIT"
14
15
 
15
16
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
@@ -1,3 +1,3 @@
1
1
  module FedexLocationService
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fedex_location_service
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
  - odin - (Casey Ellett)
@@ -189,7 +189,7 @@ files:
189
189
  - lib/fedex_location_service/message.rb
190
190
  - lib/fedex_location_service/request.rb
191
191
  - lib/fedex_location_service/version.rb
192
- homepage:
192
+ homepage: https://github.com/odin/fedex_location_service
193
193
  licenses:
194
194
  - MIT
195
195
  metadata: