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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a863c6fb799dcc090fef67943634033515c54b6
4
- data.tar.gz: 22875fa0281196e5642dfd7be2194155010868b1
3
+ metadata.gz: 178175ddee9b9fe1feafdccaad4d9f425551cb52
4
+ data.tar.gz: 415c743deb0377422be2a40283a428b42f1bc20c
5
5
  SHA512:
6
- metadata.gz: 5314211e423575528620acacea83c4db39f8af1f5db519a7332901328aaa5b3f3e14ad47505b36cec708f79eaef21d55173eaa38ec7848a92691be62d9addd8b
7
- data.tar.gz: 2770b3eceb26aa5369715209b5ea1540e7d91a0fb766e7cde303a7c2a0dedfcf6a24d4bcbc2961c0c359e778475bfd931b76cff532cc7f733f32b68ec8b90654
6
+ metadata.gz: e3b70a21db72943eca73434071ba1002dca100257fcbafde554331da74df91a5f6979f435c14e7e2818a6d524b2f1761f5b4252c4338359332fd5caaf2c7343a
7
+ data.tar.gz: a0deaee64cc9ee3f6ec4f9bef8ab488155a6112b483dd883976aa963347076316ad262e57e602888ea5312623e87cd94da11a7346a9dc23e82de21b5c5c5bd22
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.3.2
2
+ - Add session expired error.
3
+
1
4
  v0.3.1
2
5
  - Class-level options were being deleted rather than fetched, so subsequent calls were not working.
3
6
 
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 an integer representation of the current time.
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
 
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module ShippingEasy
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
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.1
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-06-10 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday