peddler 0.19.0 → 1.0.0

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: 8aba3ba6779ddc13b153cdf037d554c9182e2774
4
- data.tar.gz: e1ef25617931f33f9d513d1037d08d52a9d133cc
3
+ metadata.gz: 6e1dcd21978e40ce58bd7dc0fc772853dc5c82bf
4
+ data.tar.gz: 27dd25a0582e514e6a92f64831688135691fed28
5
5
  SHA512:
6
- metadata.gz: bb5ca70216b377fc6d7e9718dae7aa10481b7c6d8a6409faa6850e4689e8b4ccd80de68a9d99457a5583ed4536af1a71b273d9618b4d3580804452f2682dd0fd
7
- data.tar.gz: c8dd299bbc171cdd9a56dd78f4ea3e91e70d98367fb4646c901dc917f45466aae55a1b9d6e7dcd40696f29b2bb39a9522befc58c3115024205989a1082fcb7bd
6
+ metadata.gz: 6465ab3ff624fee677d2f9c634825a501798cc0762cf3455612be02bbb8ce9be562fd5c0d52a49ae1c7b8b53cd6a01f6c7b80a54cf3dbb088e941cbd2a7515eb
7
+ data.tar.gz: 3a7c8e70b284026be4d2cf5770fa058f2fba7d5d6b0f11b756eee84abad9a6e6a96e6f7ed3cf0fd500c5da78d1b578d42caf36b21d62d68617736d630dba5fef
data/README.md CHANGED
@@ -17,7 +17,7 @@ Some MWS API sections may require additional authorisation from Amazon.
17
17
  Require the library.
18
18
 
19
19
  ```ruby
20
- require 'peddler'
20
+ require "peddler"
21
21
  ```
22
22
 
23
23
  Create a client. Peddler provides one for each MWS API under an eponymous namespace.
@@ -29,18 +29,7 @@ client = MWS::Orders::Client.new
29
29
  client = MWS.orders
30
30
  ```
31
31
 
32
- Each client requires valid MWS credentials. You can set some or all when or after creating the client.
33
-
34
- ```ruby
35
- client = MWS::Orders::Client.new(
36
- primary_marketplace_id: "foo",
37
- merchant_id: "bar",
38
- aws_access_key_id: "baz",
39
- aws_secret_access_key: "qux"
40
- )
41
- ```
42
-
43
- Alternatively, set these globally in the shell.
32
+ Each client requires valid MWS credentials. You can set these globally in the shell.
44
33
 
45
34
  ```bash
46
35
  export MWS_MARKETPLACE_ID=foo
@@ -49,12 +38,23 @@ export AWS_ACCESS_KEY_ID=baz
49
38
  export AWS_SECRET_ACCESS_KEY=qux
50
39
  ```
51
40
 
52
- You can now instantiate a client without passing credentials.
41
+ You can now instantiate a client.
53
42
 
54
43
  ```ruby
55
44
  client = MWS::Orders::Client.new
56
45
  ```
57
46
 
47
+ Alternatively, you can set some or all credentials when or after creating the client.
48
+
49
+ ```ruby
50
+ client = MWS::Orders::Client.new(
51
+ primary_marketplace_id: "foo",
52
+ merchant_id: "bar",
53
+ aws_access_key_id: "baz",
54
+ aws_secret_access_key: "qux"
55
+ )
56
+ ```
57
+
58
58
  If you are creating a client for another seller, pass the latter's `MWSAuthToken` to the client.
59
59
 
60
60
  ```ruby
@@ -6,7 +6,7 @@ module MWS
6
6
  # Amazon Webstore customers have created. The Cart Information API enables
7
7
  # you to programmatically integrate Amazon Webstore cart information with
8
8
  # your CRM systems, marketing applications, and other systems that require
9
- # cart data
9
+ # cart data.
10
10
  #
11
11
  # @note The Cart Information API only returns cart information for Webstores
12
12
  # with Seller-Branded Checkout. No cart information is returned for Amazon
@@ -9,7 +9,7 @@ module MWS
9
9
 
10
10
  # Uploads a feed
11
11
  #
12
- # @note Feed size is limited to 2,147,483,647 bytes (2^31 -1) per feed
12
+ # @note Feed size is limited to 2,147,483,647 bytes (2^31 -1) per feed.
13
13
  # @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_SubmitFeed.html
14
14
  # @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_FeedType.html
15
15
  # @param feed_content [String] an XML or flat file feed
@@ -2,7 +2,8 @@ require 'peddler/client'
2
2
 
3
3
  module MWS
4
4
  module Finances
5
- # With the MWS Finances API you can retrieve financial transactions for your seller account.
5
+ # With the MWS Finances API you can retrieve financial transactions for your
6
+ # seller account.
6
7
  class Client < ::Peddler::Client
7
8
  version "2015-05-01"
8
9
  path "/Finances/#{version}"
@@ -55,7 +55,6 @@ module MWS
55
55
  # @option opts [Array<String>] :notification_email_list
56
56
  # @option opts [Struct, Hash] :cod_settings
57
57
  # @return [Peddler::XMLParser]
58
- # rubocop:disable MethodLength, ParameterLists
59
58
  def create_fulfillment_order(seller_fulfillment_order_id, displayable_order_id, displayable_order_date_time, displayable_order_comment, shipping_speed_category, destination_address, items, opts = {})
60
59
  if opts.key?(:cod_settings)
61
60
  opts['CODSettings'] = opts.delete(:cod_settings)
@@ -13,8 +13,6 @@ module MWS
13
13
  # made through the Login and Pay with Amazon service offered by Amazon
14
14
  # Payments. You cannot use this API section to process payments for Amazon
15
15
  # Marketplace, Amazon Webstore, or Checkout by Amazon.
16
- #
17
- # rubocop:disable ClassLength
18
16
  class Client < ::Peddler::Client
19
17
  version "2013-01-01"
20
18
  path "/OffAmazonPayments/#{version}/"
@@ -10,6 +10,8 @@ module MWS
10
10
 
11
11
  # Lists orders
12
12
  #
13
+ # @note When calling this operation, you must specify a time frame using
14
+ # either created_after or last_updated_after.
13
15
  # @see http://docs.developer.amazonservices.com/en_US/orders/2013-09-01/Orders_ListOrders.html
14
16
  # @param opts [Hash]
15
17
  # @option opts [String, #iso8601] :created_after
@@ -25,7 +27,6 @@ module MWS
25
27
  # @option opts [String] :max_results_per_page
26
28
  # @option opts [String] :tfm_shipment_status
27
29
  # @return [Peddler::XMLParser]
28
- # rubocop:disable MethodLength
29
30
  def list_orders(opts = {})
30
31
  opts[:marketplace_id] ||= primary_marketplace_id
31
32
  if opts.key?(:tfm_shipment_status)
@@ -8,8 +8,6 @@ module Peddler
8
8
  # An abstract client
9
9
  #
10
10
  # Subclass to implement an MWS API section.
11
- #
12
- # rubocop:disable ClassLength
13
11
  class Client
14
12
  extend Forwardable
15
13
  include Jeff
@@ -21,7 +21,6 @@ module Peddler
21
21
  self
22
22
  end
23
23
 
24
- # rubocop:disable AbcSize, MethodLength, PerceivedComplexity
25
24
  def store(key, val)
26
25
  key = camelize(key) if key.is_a?(Symbol)
27
26
 
@@ -1,3 +1,3 @@
1
1
  module Peddler
2
- VERSION = '0.19.0'
2
+ VERSION = '1.0.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peddler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-10 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jeff
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  requirements: []
166
166
  rubyforge_project:
167
- rubygems_version: 2.4.5
167
+ rubygems_version: 2.4.5.1
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: Wraps the Amazon MWS APIs