// // AmazonWebServiceManager.swift // Vendoo // // Created by cole alban on 8/26/16. // Copyright © 2016 Okechi Onyeje. All rights reserved. // import Foundation /* This class will manage the posting of items to Amazon using the MWS (MarketPlaceWebServicesAPI). */ class AmazonWebServiceManager{ /* These values all correspond to authentication information */ private var sellerId: String private var marketPlaceId: String private var awsAccessKeyId: String private var secretKey: String private var developerAccountNumber: String private var mwsApiEndpoint: String /* These values are currently hardcoded in and map to the Kroleo seller account. Once authnetication for amazon is solved, these will be able to dynamically update to the respective user information Usually, this will take in parameters with the right info for init. */ init(){ self.sellerId = "A2RZVRHXWN051E" self.marketPlaceId = "A2RZVRHXWN051E" self.awsAccessKeyId = "AKIAJL6QFNV3AHMJMBRA" self.secretKey = "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" self.developerAccountNumber = "6187-7922-4188" self.mwsApiEndpoint = "https://mws.amazonservices.com" } /* This function will take an item and post it to amazon. params: Hash of information used to post an item to amazon */ func listItem(params: [String: AnyObject]){ let mwsApiEndpointUrl = NSURL(fileURLWithPath: mwsApiEndpointUrl) let amazonMWSRequest = NSMutableURLRequest(URL: mwsApiEndpointUrl) setRequestHeaders(amazonMWSRequest, feedType: FeedType.POST_PRODUCT_DATA) } }