peddler 0.5.2 → 0.5.3

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: 8eab9ea2ffe4819ccf447638b19f94457c17da9b
4
- data.tar.gz: 2202040469d890aabbee8939c7e052e9648e4454
3
+ metadata.gz: b89bab8ffb0fcd4902068dbcdb8b47917eaed6d4
4
+ data.tar.gz: 8bfa9a382b50cb908099f69d50fd36d3f530e4dc
5
5
  SHA512:
6
- metadata.gz: 275e117651cd8307acf39c6aeeaa6a93556db6ce2d672c5d83ab0604c47fb7a9573e44f403d7a11a41dcbf72b2b58959c08c872f8e7740e96c04244a3169a771
7
- data.tar.gz: ca56fa83ebab5e757d5ef1f0eba71e790b527f7076ea624e543530f372bb388f52922e54a605e7bc720b26b38615d5952ad7a74cc5239aa9d1b3e8c68e429aed
6
+ metadata.gz: 2062379662693c265f8d0884d92c341156db7303487e87e5ecd805bbefdf0fed425e033345a4965e72e53b75bfc51e5f3791a7ebfaca99b0438c35f04319bfcb
7
+ data.tar.gz: ae0055bc9d6d0977f73ca479537f38324dead20611dbfb17a259485b7ec7faf279a8dd55839f95539474a1300ee978a6e303a8f06e0521f3f50f769fd83171b2
@@ -3,19 +3,27 @@ require 'jeff'
3
3
  module Peddler
4
4
  # Service is an abstract wrapper around a Marketplace Web Services (MWS)
5
5
  # endpoint.
6
- #
7
- # The initializer takes four arguments:
8
- #
9
- # country - The String ISO 3166-1 two-letter country code of
10
- # the base marketplace of the seller.
11
- # aws_access_key_id - The String AWS access key id.
12
- # aws_secret_access_key - The String AWS secret access key.
13
- # seller_id - The String MWS merchant id.
14
- #
15
- # These arguments are optional and can be set individually later.
16
- class Service < Struct.new(:country, :aws_access_key_id, :aws_secret_access_key, :seller_id)
6
+ class Service
17
7
  include Jeff
18
8
 
9
+ attr_accessor :country, :seller_id
10
+
11
+ # The initializer takes four arguments:
12
+ #
13
+ # country - The String ISO 3166-1 two-letter country code of
14
+ # the base marketplace of the seller.
15
+ # aws_access_key_id - The String AWS access key id.
16
+ # aws_secret_access_key - The String AWS secret access key.
17
+ # seller_id - The String MWS merchant id.
18
+ #
19
+ # These arguments are optional and can be set individually later.
20
+ def initialize(country = nil, aws_access_key_id = nil, aws_secret_access_key = nil, seller_id = nil)
21
+ @country = country
22
+ @aws_access_key_id = aws_access_key_id
23
+ @aws_secret_access_key = aws_secret_access_key
24
+ @seller_id = seller_id
25
+ end
26
+
19
27
  # A list of MWS hosts.
20
28
  HOSTS = {
21
29
  'CA' => 'mws.amazonservices.ca',
@@ -1,3 +1,3 @@
1
1
  module Peddler
2
- VERSION = '0.5.2'
2
+ VERSION = '0.5.3'
3
3
  end
data/test/service_test.rb CHANGED
@@ -31,4 +31,12 @@ class ServiceTest < MiniTest::Test
31
31
  def test_defines_constants_on_service
32
32
  refute_nil @klass.const_get(:HOSTS)
33
33
  end
34
+
35
+ def test_has_a_key
36
+ refute_nil @service.aws_access_key_id
37
+ end
38
+
39
+ def test_has_a_secret
40
+ refute_nil @service.aws_secret_access_key
41
+ end
34
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peddler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari