示例#1
0
    def get_shipping_methods(self, response_data):
        self.shipping_address = self.retrieve_data("shipping_address")
        print "\nProcessing request...\n"
        shipping_response = ZincRequestProcessor.process_async("shipping_methods", {
                    "client_token": self.client_token,
                    "retailer": self.retailer,
                    "products": response_data["products"],
                    "shipping_address": self.shipping_address,
                    "retailer_credentials": response_data["retailer_credentials"]
                })

        self.async_responses["shipping_response"] = shipping_response
示例#2
0
 def get_product_variants(self, response_data):
     print "\nProcessing request...\n"
     async_response = ZincRequestProcessor.process_async("variant_options", {
                 "client_token": self.client_token,
                 "retailer": self.retailer,
                 "product_url": self.product_url
                 })
     asin = self.get_asin(self.product_url)
     product_info = None
     if asin != None:
         InterfaceHelpers.print_ihmage_image(asin)
         print "\nLoading product information...\n"
         product_info = AmazonDataFinder.get_amazon_data(asin)
     variants_response = async_response.get_response()
     response_data["variant_options_response"] = variants_response
     response_data["products"] = self.select_product_variants(variants_response, product_info)