peddler 0.7.10 → 0.7.11

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: ea0fdd1ff90c94773f752bd53dbf254e10bd6f1f
4
- data.tar.gz: 9246c675af95a2f4def757766ac4ef58704c6988
3
+ metadata.gz: 6cc0d6db282c2a08d0b2de0485bc4d7207fad203
4
+ data.tar.gz: 6016b913109f04bc2d2a1b563bb08230e70a8aa3
5
5
  SHA512:
6
- metadata.gz: 280944799765cc755270f75c55b25637b2ca33ac88feb42aa87d18382349b3cb08423ff60bb835c133588158becc8030a3a0fdcffb62a2d1ae3c396b3023f1b7
7
- data.tar.gz: eae4ebbcf5207c81ad78d343cf66741f088869a5d2153177885dd930042c1f536b72d9620c67afc721152d06f9070359f04aecccf5a17d0c89b77b88f3e9eea0
6
+ metadata.gz: 35c849ffde09d49d88255239ac160eefda577e4eebf3bfa585c0f474c94d4c00c89497280a841e68775cc19899a9355e8135c3dd0182017831bf72bc4b1bb0e3
7
+ data.tar.gz: dca8f9708d21965ba3e5a92aa6d3537869e8e76094bd66fc73908b4a53d7b422e6e9efc2ab61ce53c75da07188501d871ed0a657c21614dbd3ffb249b60b355a
data/README.md CHANGED
@@ -61,8 +61,6 @@ The MWS Feeds API lets you upload inventory and order data to Amazon. You can al
61
61
 
62
62
  ### Fulfillment Inbound Shipment
63
63
 
64
- **Not implemented**
65
-
66
64
  With the MWS Fulfillment Inbound Shipment API, you can create and update inbound shipments of inventory in the Amazon Fulfillment Network. You can also also request lists of inbound shipments or inbound shipment items based on criteria that you specify.
67
65
 
68
66
  [Read more](http://rubydoc.info/github/hakanensari/peddler/MWS/FulfillmentInboundShipment)
@@ -5,84 +5,218 @@ module MWS
5
5
  # shipments of inventory in the Amazon Fulfillment Network. You can also
6
6
  # also request lists of inbound shipments or inbound shipment items based on
7
7
  # criteria that you specify.
8
- #
9
- # @todo Not implemented
10
8
  class FulfillmentInboundShipment < ::Peddler::Client
11
9
  path '/FulfillmentInboundShipment/2010-10-01'
12
10
 
13
11
  # Returns the information required to create an inbound shipment
14
- def create_inbound_shipment_plan
15
- raise NotImplementedError
12
+ #
13
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_CreateInboundShipmentPlan.html
14
+ # @param ship_from_address [Struct, Hash]
15
+ # @param inbound_shipment_plan_request_items [Array<Struct, Hash>]
16
+ # @param opts [Hash]
17
+ # @option opts [String] :label_prep_preference
18
+ # @return [Peddler::XMLParser]
19
+ def create_inbound_shipment_plan(ship_from_address, inbound_shipment_plan_request_items, opts = {})
20
+ operation('CreateInboundShipmentPlan')
21
+ .add(
22
+ opts.merge(
23
+ 'ShipFromAddress' => ship_from_address,
24
+ 'InboundShipmentPlanRequestItems' => inbound_shipment_plan_request_items
25
+ )
26
+ )
27
+ .structure!('InboundShipmentPlanRequestItems', 'member')
28
+
29
+ run
16
30
  end
17
31
 
18
32
  # Creates an inbound shipment
19
- def create_inbound_shipment
20
- raise NotImplementedError
33
+ #
34
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_CreateInboundShipment.html
35
+ # @param shipment_id [String]
36
+ # @param inbound_shipment_header [Struct, Hash]
37
+ # @param opts [Hash]
38
+ # @option opts [Array<Struct, Hash>] :inbound_shipment_items
39
+ # @return [Peddler::XMLParser]
40
+ def create_inbound_shipment(shipment_id, inbound_shipment_header, opts = {})
41
+ operation('CreateInboundShipment')
42
+ .add(
43
+ opts.merge(
44
+ 'ShipmentId' => shipment_id,
45
+ 'InboundShipmentHeader' => inbound_shipment_header
46
+ )
47
+ )
48
+ .structure!('InboundShipmentItems', 'member')
49
+
50
+ run
21
51
  end
22
52
 
23
53
  # Updates an existing inbound shipment
24
- def update_inbound_shipment
25
- raise NotImplementedError
54
+ #
55
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_UpdateInboundShipment.html
56
+ # @param shipment_id [String]
57
+ # @param inbound_shipment_header [Struct, Hash]
58
+ # @param opts [Hash]
59
+ # @option opts [Array<Struct, Hash>] :inbound_shipment_items
60
+ # @return [Peddler::XMLParser]
61
+ def update_inbound_shipment(shipment_id, inbound_shipment_header, opts = {})
62
+ operation('UpdateInboundShipment')
63
+ .add(
64
+ opts.merge(
65
+ 'ShipmentId' => shipment_id,
66
+ 'InboundShipmentHeader' => inbound_shipment_header
67
+ )
68
+ )
69
+ .structure!('InboundShipmentItems', 'member')
70
+
71
+ run
26
72
  end
27
73
 
28
74
  # Sends transportation information to Amazon about an inbound shipment
29
- def put_transport_content
30
- raise NotImplementedError
75
+ #
76
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_PutTransportContent.html
77
+ # @param shipment_id [String]
78
+ # @param is_partnered [Boolean]
79
+ # @param shipment_type [String]
80
+ # @param transport_details [Struct, Hash]
81
+ # @return [Peddler::XMLParser]
82
+ def put_transport_content(shipment_id, is_partnered, shipment_type, transport_details)
83
+ operation('PutTransportContent')
84
+ .add(
85
+ 'ShipmentId' => shipment_id,
86
+ 'IsPartnered' => is_partnered,
87
+ 'ShipmentType' => shipment_type,
88
+ 'TransportDetails' => transport_details
89
+ )
90
+
91
+ run
31
92
  end
32
93
 
33
94
  # Requests an estimate of the shipping cost for an inbound shipment
34
- def estimate_transport_request
35
- raise NotImplementedError
95
+ #
96
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_EstimateTransportRequest.html
97
+ # @param shipment_id [String]
98
+ # @return [Peddler::XMLParser]
99
+ def estimate_transport_request(shipment_id)
100
+ operation('EstimateTransportRequest').add('ShipmentId' => shipment_id)
101
+ run
36
102
  end
37
103
 
38
- # Confirms that you accept the Amazon-partnered shipping estimate and you
39
- # request that the Amazon-partnered carrier ship your inbound shipment
40
- def confirm_transport_request
41
- raise NotImplementedError
104
+ # Returns current transportation information about an inbound shipment
105
+ #
106
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetTransportContent.html
107
+ # @param shipment_id [String]
108
+ # @return [Peddler::XMLParser]
109
+ def get_transport_content(shipment_id)
110
+ operation('GetTransportContent').add('ShipmentId' => shipment_id)
111
+ run
42
112
  end
43
113
 
44
- # Returns current transportation information about an inbound shipment
45
- def get_transport_content
46
- raise NotImplementedError
114
+ # Confirms that you accept the Amazon-partnered shipping estimate and you
115
+ # request that the Amazon-partnered carrier ship your inbound shipment
116
+ #
117
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ConfirmTransportRequest.html
118
+ # @param shipment_id [String]
119
+ # @return [Peddler::XMLParser]
120
+ def confirm_transport_request(shipment_id)
121
+ operation('ConfirmTransportRequest').add('ShipmentId' => shipment_id)
122
+ run
47
123
  end
48
124
 
49
125
  # Voids a previously-confirmed request to ship your inbound shipment using
50
126
  # an Amazon-partnered carrier
51
- def void_transport_request
52
- raise NotImplementedError
127
+ #
128
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_VoidTransportRequest.html
129
+ # @param shipment_id [String]
130
+ # @return [Peddler::XMLParser]
131
+ def void_transport_request(shipment_id)
132
+ operation('VoidTransportRequest').add('ShipmentId' => shipment_id)
133
+ run
53
134
  end
54
135
 
55
136
  # Returns PDF document data for printing package labels for an inbound
56
137
  # shipment
57
- def get_package_labels
58
- raise NotImplementedError
138
+ #
139
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetPackageLabels.html
140
+ # @param shipment_id [String]
141
+ # @param page_type [String]
142
+ # @param opts [Hash]
143
+ # @option opts [Integer] :number_of_packages
144
+ # @return [Peddler::XMLParser]
145
+ def get_package_labels(shipment_id, page_type, opts = {})
146
+ operation('GetPackageLabels')
147
+ .add(opts.merge(
148
+ 'ShipmentId' => shipment_id,
149
+ 'PageType' => page_type
150
+ ))
151
+
152
+ run
59
153
  end
60
154
 
61
155
  # Returns PDF document data for printing a bill of lading for an inbound
62
156
  # shipment
63
- def get_bill_of_lading
64
- raise NotImplementedError
157
+ #
158
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetBillOfLading.html
159
+ # @param shipment_id [String]
160
+ # @return [Peddler::XMLParser]
161
+ def get_bill_of_lading(shipment_id)
162
+ operation('GetBillOfLading').add('ShipmentId' => shipment_id)
163
+ run
65
164
  end
66
165
 
67
166
  # Returns a list of inbound shipments based on criteria that you specify
68
- def list_inbound_shipments
69
- raise NotImplementedError
167
+ #
168
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipments.html
169
+ # @param opts [Hash]
170
+ # @option opts [Array<String>] :shipment_status_list
171
+ # @option opts [Array<String>] :shipment_id_list
172
+ # @option opts [String, #iso8601] :last_updated_after
173
+ # @option opts [String, #iso8601] :last_updated_before
174
+ # @return [Peddler::XMLParser]
175
+ def list_inbound_shipments(opts = {})
176
+ operation('ListInboundShipments')
177
+ .add(opts)
178
+ .structure!('ShipmentStatusList', 'member')
179
+ .structure!('ShipmentIdList', 'member')
180
+
181
+ run
70
182
  end
71
183
 
72
184
  # Returns the next page of inbound shipments
73
- def list_inbound_shipments_by_next_token
74
- raise NotImplementedError
185
+ #
186
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentsByNextToken.html
187
+ # @param next_token [String]
188
+ # @return [Peddler::XMLParser]
189
+ def list_inbound_shipments_by_next_token(next_token)
190
+ operation('ListInboundShipmentsByNextToken')
191
+ .add('NextToken' => next_token)
192
+
193
+ run
75
194
  end
76
195
 
77
196
  # Returns a list of items in a specified inbound shipment, or a list of
78
197
  # items that were updated within a specified time frame
79
- def list_inbound_shipment_items
80
- raise NotImplementedError
198
+ #
199
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentItems.html
200
+ # @param opts [Hash]
201
+ # @option opts [String] :shipment_id
202
+ # @option opts [String, #iso8601] :last_updated_after
203
+ # @option opts [String, #iso8601] :last_updated_before
204
+ # @return [Peddler::XMLParser]
205
+ def list_inbound_shipment_items(opts = {})
206
+ operation('ListInboundShipmentItems').add(opts)
207
+ run
81
208
  end
82
209
 
83
210
  # Returns the next page of inbound shipment items
84
- def list_inbound_shipment_items_by_next_token
85
- raise NotImplementedError
211
+ #
212
+ # @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentItemsByNextToken.html
213
+ # @param next_token [String]
214
+ # @return [Peddler::XMLParser]
215
+ def list_inbound_shipment_items_by_next_token(next_token)
216
+ operation('ListInboundShipmentItemsByNextToken')
217
+ .add('NextToken' => next_token)
218
+
219
+ run
86
220
  end
87
221
 
88
222
  # Gets the operational status of the API
@@ -20,7 +20,7 @@ module MWS
20
20
  # @param items [Array<Struct, Hash>]
21
21
  # @param opts [Hash]
22
22
  # @option opts Array[String] :shipping_speed_categories
23
- # @option opts Boolean :include_cod_fulfillment_preview
23
+ # @option opts [Boolean] :include_cod_fulfillment_preview
24
24
  # @return [Peddler::XMLParser]
25
25
  def get_fulfillment_preview(address, items, opts = {})
26
26
  if opts.has_key?(:include_cod_fulfillment_preview)
@@ -43,7 +43,7 @@ module Peddler
43
43
  end
44
44
 
45
45
  def aws_endpoint
46
- "https://#{host}#{self.path || self.class.path}"
46
+ "https://#{host}#{path || self.class.path}"
47
47
  end
48
48
 
49
49
  def marketplace_id
@@ -1,3 +1,3 @@
1
1
  module Peddler
2
- VERSION = '0.7.10'
2
+ VERSION = '0.7.11'
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.7.10
4
+ version: 0.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-17 00:00:00.000000000 Z
11
+ date: 2014-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jeff