shipping_easy 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/README.md +2 -2
- data/lib/shipping_easy.rb +6 -0
- data/lib/shipping_easy/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: 178175ddee9b9fe1feafdccaad4d9f425551cb52
|
4
|
+
data.tar.gz: 415c743deb0377422be2a40283a428b42f1bc20c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3b70a21db72943eca73434071ba1002dca100257fcbafde554331da74df91a5f6979f435c14e7e2818a6d524b2f1761f5b4252c4338359332fd5caaf2c7343a
|
7
|
+
data.tar.gz: a0deaee64cc9ee3f6ec4f9bef8ab488155a6112b483dd883976aa963347076316ad262e57e602888ea5312623e87cd94da11a7346a9dc23e82de21b5c5c5bd22
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -422,10 +422,10 @@ All parts are then concatenated together with an ampersand. The result resembles
|
|
422
422
|
|
423
423
|
Finally, using your API secret encrypt the string using HMAC sha256. In ruby, it looks like this:
|
424
424
|
|
425
|
-
OpenSSL::HMAC::hexdigest("sha256", api_secret, "POST&/api/orders&api_key=f9a7c8ebdfd34beaf260d9b0296c7059&api_timestamp=1401803554&{\"orders\":{\"name\":\"Flip flops\",\"cost\":\"10.00\",\"shipping_cost\":\"2.00\"}}")
|
425
|
+
OpenSSL::HMAC::hexdigest("sha256", api_secret, "POST&/api/stores/27aa472e16faa83dd13b7758d31974ed/orders&api_key=f9a7c8ebdfd34beaf260d9b0296c7059&api_timestamp=1401803554&{\"orders\":{\"name\":\"Flip flops\",\"cost\":\"10.00\",\"shipping_cost\":\"2.00\"}}")
|
426
426
|
|
427
427
|
### API timestamp
|
428
|
-
You must include an API timestamp in your requests. The timestamp should be
|
428
|
+
You must include an API timestamp in your requests. The timestamp should be a Unix epoch timestamp (integer) of the current time.
|
429
429
|
|
430
430
|
### Example curl request
|
431
431
|
|
data/lib/shipping_easy.rb
CHANGED
@@ -52,6 +52,12 @@ module ShippingEasy
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
class SessionExpiredError < Error
|
56
|
+
def initialize(msg = "The client session has expired.")
|
57
|
+
super(msg)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
55
61
|
class AccessDeniedError < Error
|
56
62
|
def initialize(msg = "Access denied.")
|
57
63
|
super(msg)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipping_easy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ShippingEasy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|