Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
dcd9537
Moving MarkerplaceId lists to specific requests
pierrel Feb 4, 2014
16e305a
Adding product endpoint section
pierrel Feb 4, 2014
d568a3e
Merge pull request #1 from plarochelle/add-product-endpoint-section
Feb 11, 2014
3de9044
Adding Feed#submit_feed basics, still a lot of work
pierrel Feb 11, 2014
73af828
trying to add md5 header, not quite right yet
pierrel Feb 12, 2014
662dba2
adding example body and trying file-based md5 calc
pierrel Feb 12, 2014
a40c203
Use iso-8859-1 for feed
chrisoei Feb 12, 2014
8b3e2db
Use base64 for Content-MD5 and specify Content-Type
chrisoei Feb 12, 2014
ac302d5
Merge pull request #1 from coei/add-feeds
Feb 12, 2014
b86ba57
adding order ack to submit_feed
pierrel Feb 12, 2014
bc8481c
Merge pull request #2 from plarochelle/add-feeds
Feb 12, 2014
21e9bbe
Adding shipping ack to feeds api
pierrel Feb 13, 2014
386da34
renaming camelize monkey-patch to remove conflict with normal cameliz…
pierrel Feb 14, 2014
6baa19b
Merge pull request #4 from plarochelle/rename-camelize
Feb 14, 2014
ec62dbb
bumping version
pierrel Feb 14, 2014
aa09e9d
Merge pull request #5 from plarochelle/bump-version-for-camelize
Feb 14, 2014
2813b26
Merge pull request #3 from plarochelle/add-feed-ship-ack
Feb 14, 2014
efbf8da
Adding feeds spec
pierrel Feb 18, 2014
fba5977
Adding some directions to the readme about testing
pierrel Feb 18, 2014
f334c1d
Generating xml with Nokogiri
pierrel Feb 18, 2014
b811599
Adding yardoc comments
pierrel Feb 18, 2014
152c089
updating feed and order spec to use let instead of instance vars
pierrel Feb 19, 2014
1aada74
Calling optional response callback on each request
pierrel Feb 19, 2014
0a84f0b
Merge pull request #6 from plarochelle/test-feeds-endpoint
Feb 19, 2014
4d65c85
Merge branch 'master' into proper-xml-builder
pierrel Feb 19, 2014
11da4c6
Bumping the version number
pierrel Feb 19, 2014
2b95516
Merge branch 'master' into add-response-hook-for-reporting
pierrel Feb 19, 2014
3a8b170
Merge pull request #7 from plarochelle/proper-xml-builder
Feb 19, 2014
b735577
Merge branch 'master' into add-response-hook-for-reporting
pierrel Feb 19, 2014
fbdbc60
Use UTF-8 instead of ISO-8859-1
chrisoei Feb 20, 2014
053c132
Remove iconv requirement
chrisoei Feb 20, 2014
df3b915
Merge pull request #9 from coei/utf-8
chrisoei Feb 20, 2014
f678573
making submit feed take an array of orders instead of a single one
Feb 26, 2014
6a86bb0
removing pry requirement
Feb 26, 2014
65725a7
Merge pull request #8 from plarochelle/add-response-hook-for-reporting
Feb 26, 2014
eaf6a4b
fixing merge conflicts
Feb 26, 2014
3b90f8b
Adding merchant ids to feeds xml
pierrel Mar 7, 2014
92310cc
Merge pull request #12 from plarochelle/add-merchant-ids-to-feeds-xml
Mar 7, 2014
45771ee
Adding a method to Query to strip out unsafe params
pierrel Mar 21, 2014
95afef8
Fixing namespace schema location
pierrel Mar 21, 2014
e1f088d
Adding request callback
pierrel Mar 21, 2014
427fbd4
Merge pull request #13 from plarochelle/correct-schema-name-for-feed
Mar 21, 2014
0347ceb
Fixing shipment ack xml
Mar 25, 2014
e38566d
Removing MerchantOrderID and MerchantFulfillmentID from ship ack
Mar 25, 2014
85e786e
Updating Feed#content_for_ship_with doc
Mar 25, 2014
0888f03
Testing for correct xml on ship ack
Mar 25, 2014
ace2047
Adding checks for correct order ids
Mar 25, 2014
0669e76
Merge pull request #14 from plarochelle/fix-ship-ack-yay
Mar 25, 2014
a405902
Merge branch 'master' into request-callback
Mar 26, 2014
6d686ae
Fixing the callback doc
Mar 26, 2014
4b957bd
Removing unnecessary root element form order ack
Mar 26, 2014
81ee1eb
Refactoring feed spec to make room for order ack body tests
Mar 27, 2014
8c694a9
Fixing tab in order ack xml
Mar 27, 2014
8dc4837
Adding tests for order ack xml structure
Mar 27, 2014
7301e83
Adding tests for shipment ack xml structure
Mar 27, 2014
66177be
Merge pull request #16 from plarochelle/fix-order-ack-body
Mar 27, 2014
f2c85a4
Making sure string params don't pass through the safe_params check
Mar 27, 2014
88b8b88
Merge pull request #15 from plarochelle/request-callback
Mar 27, 2014
3442e62
Moving MessageType outside of Message body
Apr 23, 2014
f0d042e
Fixing spec for testing mutliple MessageTypes don't show up
Apr 23, 2014
34baf2a
Merge pull request #17 from plarochelle/fix-order-ack-for-multiple-or…
Apr 23, 2014
639bd58
Add status code option for Order ACK
cyu Mar 17, 2015
b10c3ef
ignore .idea file
sachinmaharjan Jun 2, 2015
afa2b5d
Added test for product ack
sachinmaharjan Jun 2, 2015
b452931
Passing test and nokogiri corrections
sachinmaharjan Jun 2, 2015
f8f5a94
Change name
sachinmaharjan Jun 2, 2015
9895fdd
Added rake console and added more test and clean up
sachinmaharjan Jun 8, 2015
7b14c7f
Feed to update product price
sachinmaharjan Jun 8, 2015
a6dfe1d
Submit Feed for product image
sachinmaharjan Jun 9, 2015
7c4d863
Remove blank elements
sachinmaharjan Jun 9, 2015
89d8847
Made feed able to send multiple feed of product
sachinmaharjan Jun 10, 2015
294a02d
Merge pull request #2 from Scoutmob/ack-with-non-success-status-code
pierrel Jun 10, 2015
4589bc7
Support ack multiple order items
cyu Mar 17, 2015
c4c609e
Merge pull request #3 from Scoutmob/ack-multiple-order-items
pierrel Jun 10, 2015
16599f8
Made tagging/search terms work with each tag rather than reply on space
sachinmaharjan Jun 10, 2015
f87629b
Readme instructions for rake console
sachinmaharjan Jun 10, 2015
abf8e31
Reverting gitignore
sachinmaharjan Jun 10, 2015
ac1a0e6
ignore idea
sachinmaharjan Jun 10, 2015
e429bfb
Merge master
sachinmaharjan Jun 10, 2015
b0866d4
Merge pull request #4 from sachinmaharjan/WT-7093
sachinmaharjan Jun 11, 2015
606e109
Merge branch 'master' into WT-7687
sachinmaharjan Jun 11, 2015
85d6512
Header extration and tests
sachinmaharjan Jun 11, 2015
df411ea
Able to send multiple message for price
sachinmaharjan Jun 12, 2015
9752496
Change to use amamzon_envelope
sachinmaharjan Jun 12, 2015
f48f779
Multiple image message and test
sachinmaharjan Jun 12, 2015
53b8126
Merge master
sachinmaharjan Jun 12, 2015
1896294
Remove pp
sachinmaharjan Jun 15, 2015
e9b31bd
Merge pull request #5 from sachinmaharjan/WT-7687
sachinmaharjan Jun 23, 2015
6a5b040
Merge branch 'master' of github.com:blurb/ruby-mws into WT-7650
sachinmaharjan Jun 23, 2015
77edf1c
Merge master
sachinmaharjan Jun 23, 2015
d0e1047
Merge pull request #6 from sachinmaharjan/WT-7688
sachinmaharjan Jun 23, 2015
b7176d6
Merge branch 'master' into WT-7650
sachinmaharjan Jun 23, 2015
4a2d815
Added respons parse for amamzon envelope response from getsubmissionf…
sachinmaharjan Jun 24, 2015
e7d9d82
Added pry for debugging
sachinmaharjan Jun 24, 2015
feab41e
Retrieve all feed submission status
sachinmaharjan Jun 24, 2015
3edb2fc
Remove comment code for submit_feed
sachinmaharjan Jun 24, 2015
527e3e6
Remove unsed gems
sachinmaharjan Jun 24, 2015
1dfd3e0
Merge pull request #7 from sachinmaharjan/WT-7650
sachinmaharjan Jun 30, 2015
46716c7
Add Inventory feed
sachinmaharjan Jul 13, 2015
bbb1c63
Added quantity check
sachinmaharjan Jul 14, 2015
6ea387b
Test fix
sachinmaharjan Jul 14, 2015
38d5e52
Merge pull request #8 from sachinmaharjan/WT-7847-ruby-mws
sachinmaharjan Jul 14, 2015
0fca401
add search terms only if present
sachinmaharjan Jul 24, 2015
2cd3303
Digest::Digest is deprecated; use Digest
clarkewd Jul 25, 2015
2f0e814
Merge pull request #9 from sachinmaharjan/WT-7932
sachinmaharjan Jul 28, 2015
bbb9ec4
Merge pull request #11 from clarkewd/digest_digest
pierrel Jul 28, 2015
f3488e0
WIP for Delist
sachinmaharjan Aug 13, 2015
9357952
Added Flat File Uploader for will ship international
sachinmaharjan Aug 17, 2015
112c31d
Merge pull request #12 from sachinmaharjan/WT-8019-ruby-mws
pierrel Aug 17, 2015
10161d8
Make Delete its own method and send only isbn to delete
sachinmaharjan Aug 18, 2015
cf0397d
Just for delete Operation Type
sachinmaharjan Aug 18, 2015
18ef906
Remove test
sachinmaharjan Aug 20, 2015
fd005ac
Merge pull request #13 from sachinmaharjan/WT-8015
sachinmaharjan Aug 20, 2015
83ef472
Extract to method
sachinmaharjan Aug 24, 2015
326e12c
Added test
sachinmaharjan Aug 24, 2015
320000a
Remove repetative checks and simplfy
sachinmaharjan Aug 24, 2015
2610059
Remove pp
sachinmaharjan Aug 24, 2015
2ea9a66
Merge pull request #14 from sachinmaharjan/WT-8043-mws
sachinmaharjan Aug 24, 2015
772a424
update version number
sachinmaharjan Aug 24, 2015
e1eca14
Merge pull request #15 from sachinmaharjan/update-version-number
sachinmaharjan Aug 24, 2015
dad2f9c
PS-4668 update fulfillment date to send to Amazon in this order of pr…
Aug 24, 2016
70c6c69
update version number
Aug 24, 2016
fdc225a
Merge pull request #16 from blurb/PS-4668-update-fulfillment-date-of-…
TheAxnJaxn Aug 24, 2016
1ee915c
Revert "PS-4668 update fulfillment date of shipped orders"
TheAxnJaxn Sep 9, 2016
ec75cda
Merge pull request #17 from blurb/revert-16-PS-4668-update-fulfillmen…
TheAxnJaxn Sep 9, 2016
0d068a1
Revert "Revert "PS-4668 update fulfillment date of shipped orders""
TheAxnJaxn Sep 15, 2016
5831237
Merge pull request #18 from blurb/revert-17-revert-16-PS-4668-update-…
TheAxnJaxn Sep 16, 2016
10f1e85
ps-5875 migrate to 2013-09-01 Orders api
patrickfatrick Apr 21, 2017
64c7aef
Merge pull request #19 from patrickfatrick/ps-5875
patrickfatrick Apr 24, 2017
b0c1579
Add more info in error
sachinmaharjan May 4, 2018
f1c9243
local var
sachinmaharjan May 4, 2018
9127f3d
Merge pull request #20 from sachinmaharjan/WAT-410-more-info-on-error
sachinmaharjan May 4, 2018
3b58a50
PLAT-2107: Provide handling time (= fulfillment latency) for new titl…
boris-v Jun 6, 2022
7761046
PLAT-2107: updated inventory feed spec
boris-v Jun 6, 2022
7f42821
PLAT-2107: bumped version, 0.1.6 -> 0.1.7
boris-v Jun 6, 2022
28435e8
PLAT-2107: added "default" of 5 days for latency (if it isn't passed …
boris-v Jun 6, 2022
5125533
Merge pull request #21 from blurb/plat-2107
boris-v Jun 7, 2022
596d979
Change from BookMisc to AbisBook
ebrenner-blurb Sep 21, 2022
787a429
Update gem version
ebrenner-blurb Sep 21, 2022
6496e94
Merge pull request #22 from blurb/feed-abis-book
ebrenner-blurb Sep 22, 2022
55babb8
Revert "WAT-2812: attempt to use AbisBook instead of BookMisc"
ebrenner-blurb Sep 23, 2022
86d23a6
Update version.rb so we still move forward
ebrenner-blurb Sep 23, 2022
632923a
Merge pull request #23 from blurb/revert-22-feed-abis-book
tcampbell-blurb Sep 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ pkg/*
.DS_Store
spec/credentials.yml
spec/fixtures/ephemeral_response/*
.rvmrc
.rvmrc
.idea
.idea/*
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ gem 'rash'
gem 'rspec'
gem 'ephemeral_response'
gem 'awesome_print'
gem 'pry'
gem 'pry'
24 changes: 23 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Quick Start

To quickly test your connection to the service without credentials, you can ping the server, which returns server time in UTC:

Start console(You have to be on the ruby-mws path)

rake console

MWS::Base.server_time

### Initialization
Expand Down Expand Up @@ -114,4 +118,22 @@ This object can be used to access all API services. Below are examples on how to

* GetReport - Used to request a report by report ID. All reports are currently returned as a flat file string.

`@mws.reports.get_report :report_id => '11223344'`
`@mws.reports.get_report :report_id => '11223344'`

Testing
-------

Add the file `spec/credentials.yml` that looks like

```
aws_access_key_id: '[access key]'
secret_access_key: '[secret access key]'
seller_id: '[seller id]'
marketplace_id: '[marketplace id]'
```

Then run `bundle exec rspec spec/`

To use binding.pry in a spec, be sure to require it with `require 'pry'`.

There's still work and research to be done on how to integrate our changes in with the author's. Because we're using different credentials than the author and there are hardcoded order ids in the specs we'll never have all the specs passing for all of us.
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
require "bundler/gem_tasks"

desc "Open an irb session preloaded with this library"
task :console do
sh "irb -rubygems -I lib -r ruby-mws.rb"
end
Empty file modified bin/ruby-mws
100644 → 100755
Empty file.
8 changes: 5 additions & 3 deletions lib/ruby-mws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ def symbolize_keys

class String

def camelize(first_letter_in_uppercase = true)
def ruby_mws_camelize(first_letter_in_uppercase = true)
if first_letter_in_uppercase
self.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
else
self.to_s[0].chr.downcase + camelize(lower_case_and_underscored_word)[1..-1]
self.to_s[0].chr.downcase + ruby_mws_camelize(lower_case_and_underscored_word)[1..-1]
end
end
end
Expand All @@ -56,7 +56,9 @@ def camelize(first_letter_in_uppercase = true)
require 'ruby-mws/api/base'
require 'ruby-mws/api/inventory'
require 'ruby-mws/api/order'
require 'ruby-mws/api/product'
require 'ruby-mws/api/feed'
require 'ruby-mws/api/report'
require 'ruby-mws/api/query'
require 'ruby-mws/api/response'
require 'ruby-mws/api/binary_response'
require 'ruby-mws/api/binary_response'
8 changes: 5 additions & 3 deletions lib/ruby-mws/api/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ def send_request(name, params, options={})
params = [default_params(name), params, options, @connection.to_hash].inject :merge

params[:lists] ||= {}
params[:lists][:marketplace_id] = "MarketplaceId.Id"

query = Query.new params
resp = self.class.send(params[:verb], query.request_uri)

@connection.call_communication_callbacks(:params => query.safe_params,
:response => resp)

@response = Response.parse resp, name, params

if @response.respond_to?(:next_token) and @next[:token] = @response.next_token # modifying, not comparing
Expand All @@ -52,7 +54,7 @@ def send_request(name, params, options={})

def default_params(name)
{
:action => name.to_s.camelize,
:action => name.to_s.ruby_mws_camelize,
:signature_method => 'HmacSHA256',
:signature_version => '2',
:timestamp => Time.now.iso8601,
Expand All @@ -76,4 +78,4 @@ def inspect
end

end
end
end
Loading