diff --git a/lib/aws_paa/request.rb b/lib/aws_paa/request.rb index dff3716..dbe42eb 100644 --- a/lib/aws_paa/request.rb +++ b/lib/aws_paa/request.rb @@ -3,16 +3,16 @@ require 'byebug' module AwsPaa class Request include AwsRequest - attr_accessor :client, :marketplace, :timestamp, :datestamp, :amzstamp, :resources, :service - attr_accessor :headers, :payload + attr_accessor :client, :marketplace, :resources, :payload, :service, :partner_type + attr_reader :partner_tag - def initialize(client:) + def initialize(client:, resources: nil) @client = client @marketplace = client.marketplace @partner_tag = client.partner_tag @partner_type = 'Associates' - @resources = [ + @resources = resources || [ "Images.Primary.Large", "ItemInfo.ContentInfo", "ItemInfo.ProductInfo", diff --git a/lib/aws_paa/response.rb b/lib/aws_paa/response.rb index 12b38cc..764af45 100644 --- a/lib/aws_paa/response.rb +++ b/lib/aws_paa/response.rb @@ -2,7 +2,10 @@ require 'json' module AwsPaa class Response - def initialize() + attr_reader :status, :data + def initialize(response) + @status = response.status.to_s + @data = JSON.parse( response.body.to_s ) end end end \ No newline at end of file diff --git a/lib/aws_paa/version.rb b/lib/aws_paa/version.rb index 8ccf655..4a43dee 100644 --- a/lib/aws_paa/version.rb +++ b/lib/aws_paa/version.rb @@ -1,3 +1,3 @@ module AwsPaa - VERSION = "0.1.0" + VERSION = "0.0.1" end