Created
March 24, 2017 15:09
-
-
Save anonymous/90fbe357c857efa2713755fe29b9c418 to your computer and use it in GitHub Desktop.
rubytest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "peddler" | |
client = MWS::Reports::Client.new( | |
primary_marketplace_id: "X", | |
merchant_id: "X", | |
aws_access_key_id: "X", | |
aws_secret_access_key: "X" | |
) | |
reports = client.get_report_request_list() | |
parser = client.get_report_request_list | |
parser.parse |
Although, as I've just discovered in pry, this makes reports and parsers point to the same object rather than 2 identical ones. so if you modify parser, reports would also change
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
line 8/9 should be
reports = parser = client.get_report_request_list
#get_report_request_list isn't a pure function, so if you call it twice to define two vars, they might not end up the same
Also, you don't need () at the end of a function to call it.