diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d82051..25b3a47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,4 +3,7 @@ ## 1.0.0 -* Initial Version of Product Advertising API 5.0 NodeJS SDK \ No newline at end of file +* Initial Version of Product Advertising API 5.0 NodeJS SDK + +## 1.2.2 +* OffersV2 launched (with documentation) \ No newline at end of file diff --git a/README.md b/README.md index 0dd6ae6..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,161 +0,0 @@ -# Product Advertising API 5.0 SDK for NodeJS (v1) - -[![NPM](https://nodei.co/npm/paapi5-nodejs-sdk.svg?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/paapi5-nodejs-sdk/) - -[![Version](https://badge.fury.io/js/paapi5-nodejs-sdk.svg)](http://badge.fury.io/js/paapi5-nodejs-sdk) [![npm](https://img.shields.io/npm/dt/paapi5-nodejs-sdk.svg)](https://www.npmjs.com/package/paapi5-nodejs-sdk) - -This repository contains the official Product Advertising API 5.0 NodeJS SDK called **paapi5-nodejs-sdk** that allows you to access the [Product Advertising API](https://webservices.amazon.com/paapi5/documentation/index.html) from your NodeJS app. - -## Installation - -### For [Node.js](https://nodejs.org/) - -The Product Advertising API NodeJS SDK can be installed via [npm](https://www.npmjs.com/package/paapi5-nodejs-sdk): - -```shell -npm install paapi5-nodejs-sdk --save -``` - -You should now be able to `require('paapi5-nodejs-sdk')` in javascript files. - -### For browser - -The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following -the above steps with Node.js and installing browserify with `npm install -g browserify`, -perform the following (assuming *main.js* is your entry file, that's to say your javascript file where you actually -use this library): - -```shell -browserify main.js > bundle.js -``` - -Then include *bundle.js* in the HTML pages. - -### Webpack Configuration - -Using Webpack you may encounter the following error: "Module not found: Error: -Cannot resolve module", most certainly you should disable AMD loader. Add/merge -the following section to your webpack config: - -```javascript -module: { - rules: [ - { - parser: { - amd: false - } - } - ] -} -``` -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following JS code: - -Simple example for [SearchItems](https://webservices.amazon.com/paapi5/documentation/search-items.html) to discover Amazon products with the keyword 'Harry Potter' in All categories: - -```javascript -var ProductAdvertisingAPIv1 = require('paapi5-nodejs-sdk'); - -var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance; - -// Specify your credentials here. These are used to create and sign the request. -defaultClient.accessKey = ''; -defaultClient.secretKey = ''; - -/** - * Specify Host and Region to which you want to send the request to. - * For more details refer: - * https://webservices.amazon.com/paapi5/documentation/common-request-parameters.html#host-and-region - */ -defaultClient.host = 'webservices.amazon.com'; -defaultClient.region = 'us-east-1'; - -var api = new ProductAdvertisingAPIv1.DefaultApi(); - -/** - * The following is a sample request for SearchItems operation. - * For more information on Product Advertising API 5.0 Operations, - * refer: https://webservices.amazon.com/paapi5/documentation/operations.html - */ -var searchItemsRequest = new ProductAdvertisingAPIv1.SearchItemsRequest(); - -/** Enter your partner tag (store/tracking id) and partner type */ -searchItemsRequest['PartnerTag'] = ''; -searchItemsRequest['PartnerType'] = 'Associates'; - -// Specify search keywords -searchItemsRequest['Keywords'] = 'Harry Potter'; - -/** - * Specify the category in which search request is to be made. - * For more details, refer: - * https://webservices.amazon.com/paapi5/documentation/use-cases/organization-of-items-on-amazon/search-index.html - */ -searchItemsRequest['SearchIndex'] = 'All'; - -// Specify the number of items to be returned in search result -searchItemsRequest['ItemCount'] = 1; - -/** - * Choose resources you want from SearchItemsResource enum - * For more details, refer: https://webservices.amazon.com/paapi5/documentation/search-items.html#resources-parameter - */ -searchItemsRequest['Resources'] = ['Images.Primary.Medium', 'ItemInfo.Title', 'Offers.Listings.Price']; - - -var callback = function (error, data, response) { - if (error) { - console.log('Error calling PA-API 5.0!'); - console.log('Printing Full Error Object:\n' + JSON.stringify(error, null, 1)); - console.log('Status Code: ' + error['status']); - if (error['response'] !== undefined && error['response']['text'] !== undefined) { - console.log('Error Object: ' + JSON.stringify(error['response']['text'], null, 1)); - } - } else { - console.log('API called successfully.'); - var searchItemsResponse = ProductAdvertisingAPIv1.SearchItemsResponse.constructFromObject(data); - console.log('Complete Response: \n' + JSON.stringify(searchItemsResponse, null, 1)); - if (searchItemsResponse['SearchResult'] !== undefined) { - console.log('Printing First Item Information in SearchResult:'); - var item_0 = searchItemsResponse['SearchResult']['Items'][0]; - if (item_0 !== undefined) { - if (item_0['ASIN'] !== undefined) { - console.log('ASIN: ' + item_0['ASIN']); - } - if (item_0['DetailPageURL'] !== undefined) { - console.log('DetailPageURL: ' + item_0['DetailPageURL']); - } - if (item_0['ItemInfo'] !== undefined && item_0['ItemInfo']['Title'] !== undefined && item_0['ItemInfo']['Title']['DisplayValue'] !== undefined) { - console.log('Title: ' + item_0['ItemInfo']['Title']['DisplayValue']); - } - if (item_0['Offers'] !== undefined && item_0['Offers']['Listings'] !== undefined && item_0['Offers']['Listings'][0]['Price'] !== undefined && item_0['Offers']['Listings'][0]['Price']['DisplayAmount'] !== undefined) { - console.log('Buying Price: ' + item_0['Offers']['Listings'][0]['Price']['DisplayAmount']); - } - } - } - if (searchItemsResponse['Errors'] !== undefined) { - console.log('Errors:'); - console.log('Complete Error Response: ' + JSON.stringify(searchItemsResponse['Errors'], null, 1)); - console.log('Printing 1st Error:'); - var error_0 = searchItemsResponse['Errors'][0]; - console.log('Error Code: ' + error_0['Code']); - console.log('Error Message: ' + error_0['Message']); - } - } -}; - -try { - api.searchItems(searchItemsRequest, callback); -} catch (ex) { - console.log('Exception: ' + ex); -} -``` - -Complete documentation, installation instructions, and examples are available [here](https://webservices.amazon.com/paapi5/documentation/index.html). - -## License - -This SDK is distributed under the -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), -see LICENSE.txt and NOTICE.txt for more information. diff --git a/package.json b/package.json index 041647c..8b08418 100644 --- a/package.json +++ b/package.json @@ -1,38 +1,47 @@ { "name": "paapi5-nodejs-sdk", - "version": "1.1.0", + "version": "1.2.2", "description": "ProductAdvertisingAPI 5.0 NodeJS SDK", + "license": "Apache-2.0", "main": "src/index.js", + "scripts": { + "test": "./node_modules/mocha/bin/mocha --recursive", + "lint": "eslint sampleGetBrowseNodesApi.js sampleGetItemsApi.js sampleSearchItemsApi.js sampleGetVariationsApi.js src/auth/*.js" + }, "author": { "name": "Product Advertising API", - "email": "", + "email": "inquire.silvestro@gmail.com", "url": "https://webservices.amazon.com/paapi5/documentation/index.html" }, - "homepage": "https://github.com/wusoma/paapi5-nodejs-sdk", - "license": "Apache-2.0", + "homepage": "https://github.com/silvestrodecaro/paapi5-nodejs-sdk", "repository": { "type": "git", - "url": "https://github.com/wusoma/paapi5-nodejs-sdk" + "url": "https://github.com/silvestrodecaro/paapi5-nodejs-sdk" }, "browser": { "fs": false }, "dependencies": { - "superagent": "^3.8.3", - "crypto-js": "^3.1.9-1" + "superagent": "10.2.0", + "crypto-js": "^4.2.0" }, "devDependencies": { - "mocha": "~2.3.4", - "sinon": "1.17.3", - "expect.js": "~0.3.1" + "eslint": "^9.0.0", + "expect.js": "~0.3.1", + "mocha": "^11.1.0", + "sinon": "20.0.0" }, "keywords": [ "amazon", "pa-api", "paapi", + "paapi5.0", + "paapi5", + "paapi5-nodejs-sdk", + "getitems", + "searchitems", + "getvariations", + "getbrowsenodes", "ProductAdvertisingAPI" - ], - "_resolved": "https://registry.npmjs.org/paapi5-nodejs-sdk/-/paapi5-nodejs-sdk-1.0.1.tgz", - "_integrity": "sha512-mUAkbJBUTorNCxLRDzzsEL1HO9+Oh5sEArmndex81JXIzlMQLbmPjCKw6rbWXYSUJCswRKBPHf3ZqnSfZOJACg==", - "_from": "paapi5-nodejs-sdk@1.0.1" + ] } diff --git a/sampleGetBrowseNodesApi.js b/sampleGetBrowseNodesApi.js index af1b9c3..cddd5c0 100644 --- a/sampleGetBrowseNodesApi.js +++ b/sampleGetBrowseNodesApi.js @@ -68,27 +68,22 @@ getBrowseNodesRequest['Resources'] = ['BrowseNodes.Ancestor', 'BrowseNodes.Child function parseResponse(browseNodesResponseList) { var mappedResponse = {}; for (var i in browseNodesResponseList) { - mappedResponse[browseNodesResponseList[i]['Id']] = browseNodesResponseList[i]; + if (browseNodesResponseList.hasOwnProperty(i)) { + mappedResponse[browseNodesResponseList[i]['Id']] = browseNodesResponseList[i]; + } } return mappedResponse; } -var callback = function (error, data, response) { - if (error) { - console.log('Error calling PA-API 5.0!'); - console.log('Printing Full Error Object:\n' + JSON.stringify(error, null, 1)); - console.log('Status Code: ' + error['status']); - if (error['response'] !== undefined && error['response']['text'] !== undefined) { - console.log('Error Object: ' + JSON.stringify(error['response']['text'], null, 1)); - } - } else { - console.log('API called successfully.'); - var getBrowseNodesResponse = ProductAdvertisingAPIv1.GetBrowseNodesResponse.constructFromObject(data); - console.log('Complete Response: \n' + JSON.stringify(getBrowseNodesResponse, null, 1)); - if (getBrowseNodesResponse['BrowseNodesResult'] !== undefined) { - console.log('Printing all browse node information in BrowseNodesResult:'); - var response_list = parseResponse(getBrowseNodesResponse['BrowseNodesResult']['BrowseNodes']); - for (var i in getBrowseNodesRequest['BrowseNodeIds']) { +function onSuccess(data) { + console.log('API called successfully.'); + var getBrowseNodesResponse = ProductAdvertisingAPIv1.GetBrowseNodesResponse.constructFromObject(data); + console.log('Complete Response: \n' + JSON.stringify(getBrowseNodesResponse, null, 1)); + if (getBrowseNodesResponse['BrowseNodesResult'] !== undefined) { + console.log('Printing all browse node information in BrowseNodesResult:'); + var response_list = parseResponse(getBrowseNodesResponse['BrowseNodesResult']['BrowseNodes']); + for (var i in getBrowseNodesRequest['BrowseNodeIds']) { + if (getBrowseNodesRequest['BrowseNodeIds'].hasOwnProperty(i)) { var browseNodeId = getBrowseNodesRequest['BrowseNodeIds'][i]; console.log('\nPrinting information about the browse node with Id: ' + browseNodeId); if (browseNodeId in response_list) { @@ -109,19 +104,31 @@ var callback = function (error, data, response) { } } } - if (getBrowseNodesResponse['Errors'] !== undefined) { - console.log('\nErrors:'); - console.log('Complete Error Response: ' + JSON.stringify(getBrowseNodesResponse['Errors'], null, 1)); - console.log('Printing 1st Error:'); - var error_0 = getBrowseNodesResponse['Errors'][0]; - console.log('Error Code: ' + error_0['Code']); - console.log('Error Message: ' + error_0['Message']); - } } -}; + if (getBrowseNodesResponse['Errors'] !== undefined) { + console.log('\nErrors:'); + console.log('Complete Error Response: ' + JSON.stringify(getBrowseNodesResponse['Errors'], null, 1)); + console.log('Printing 1st Error:'); + var error_0 = getBrowseNodesResponse['Errors'][0]; + console.log('Error Code: ' + error_0['Code']); + console.log('Error Message: ' + error_0['Message']); + } +} -try { - api.getBrowseNodes(getBrowseNodesRequest, callback); -} catch (ex) { - console.log("Exception: " + ex); +function onError(error) { + console.log('Error calling PA-API 5.0!'); + console.log('Printing Full Error Object:\n' + JSON.stringify(error, null, 1)); + console.log('Status Code: ' + error['status']); + if (error['response'] !== undefined && error['response']['text'] !== undefined) { + console.log('Error Object: ' + JSON.stringify(error['response']['text'], null, 1)); + } } + +api.getBrowseNodes(getBrowseNodesRequest).then( + function(data) { + onSuccess(data); + }, + function(error) { + onError(error); + } +); diff --git a/sampleGetItemsApi.js b/sampleGetItemsApi.js index 9fa7015..6f58721 100644 --- a/sampleGetItemsApi.js +++ b/sampleGetItemsApi.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -26,11 +26,9 @@ var ProductAdvertisingAPIv1 = require('./src/index'); var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance; // Specify your credentials here. These are used to create and sign the request. -defaultClient.accessKey = 'AKIAINXLTJNAZHBE753Q'; -defaultClient.secretKey = '2TVWkJOO1ost5oCglZsO9'; -// myConfig.accessKey = 'AKIAINXLTJNAZHBE753Q' -// myConfig.secretKey = '2TVWkJOO1ost5oCglZsO9' -// myConfig.partnerTag = 'getaheadphone-20' +defaultClient.accessKey = ''; +defaultClient.secretKey = ''; + /** * PAAPI Host and Region to which you want to send request. * For more details refer: https://webservices.amazon.com/paapi5/documentation/common-request-parameters.html#host-and-region @@ -45,11 +43,11 @@ var api = new ProductAdvertisingAPIv1.DefaultApi(); var getItemsRequest = new ProductAdvertisingAPIv1.GetItemsRequest(); /** Enter your partner tag (store/tracking id) and partner type */ -getItemsRequest['PartnerTag'] = 'getaheadphone-20'; +getItemsRequest['PartnerTag'] = ''; getItemsRequest['PartnerType'] = 'Associates'; /** Enter the Item IDs for which item information is desired */ -getItemsRequest['ItemIds'] = ['B00XBC3BF0']; +getItemsRequest['ItemIds'] = ['B09BWFX1L6', 'B0CFPJYX7P']; getItemsRequest['Condition'] = 'New'; @@ -57,7 +55,7 @@ getItemsRequest['Condition'] = 'New'; * Choose resources you want from GetItemsResource enum * For more details, refer: https://webservices.amazon.com/paapi5/documentation/get-items.html#resources-parameter */ -getItemsRequest['Resources'] = ['Images.Primary.Medium', 'ItemInfo.Title', 'Offers.Listings.Price']; +getItemsRequest['Resources'] = ['Images.Primary.Medium', 'ItemInfo.Title', 'OffersV2.Listings.Price']; /** * Function to parse GetItemsResponse into an object with key as ASIN @@ -65,27 +63,22 @@ getItemsRequest['Resources'] = ['Images.Primary.Medium', 'ItemInfo.Title', 'Offe function parseResponse(itemsResponseList) { var mappedResponse = {}; for (var i in itemsResponseList) { - mappedResponse[itemsResponseList[i]['ASIN']] = itemsResponseList[i]; + if (itemsResponseList.hasOwnProperty(i)) { + mappedResponse[itemsResponseList[i]['ASIN']] = itemsResponseList[i]; + } } return mappedResponse; } -var callback = function (error, data, response) { - if (error) { - console.log('Error calling PA-API 5.0!'); - console.log('Printing Full Error Object:\n' + JSON.stringify(error, null, 1)); - console.log('Status Code: ' + error['status']); - if (error['response'] !== undefined && error['response']['text'] !== undefined) { - console.log('Error Object: ' + JSON.stringify(error['response']['text'], null, 1)); - } - } else { - console.log('API called successfully.'); - var getItemsResponse = ProductAdvertisingAPIv1.GetItemsResponse.constructFromObject(data); - console.log('Complete Response: \n' + JSON.stringify(getItemsResponse, null, 1)); - if (getItemsResponse['ItemsResult'] !== undefined) { - console.log('Printing All Item Information in ItemsResult:'); - var response_list = parseResponse(getItemsResponse['ItemsResult']['Items']); - for (var i in getItemsRequest['ItemIds']) { +function onSuccess(data) { + console.log('API called successfully.'); + var getItemsResponse = ProductAdvertisingAPIv1.GetItemsResponse.constructFromObject(data); + console.log('Complete Response: \n' + JSON.stringify(getItemsResponse, null, 1)); + if (getItemsResponse['ItemsResult'] !== undefined) { + console.log('Printing All Item Information in ItemsResult:'); + var response_list = parseResponse(getItemsResponse['ItemsResult']['Items']); + for (var i in getItemsRequest['ItemIds']) { + if (getItemsRequest['ItemIds'].hasOwnProperty(i)) { var itemId = getItemsRequest['ItemIds'][i]; console.log('\nPrinting information about the Item with Id: ' + itemId); if (itemId in response_list) { @@ -97,30 +90,54 @@ var callback = function (error, data, response) { if (item['DetailPageURL'] !== undefined) { console.log('DetailPageURL: ' + item['DetailPageURL']); } - if (item['ItemInfo'] !== undefined && item['ItemInfo']['Title'] !== undefined && item['ItemInfo']['Title']['DisplayValue'] !== undefined) { + if ( + item['ItemInfo'] !== undefined && + item['ItemInfo']['Title'] !== undefined && + item['ItemInfo']['Title']['DisplayValue'] !== undefined + ) { console.log('Title: ' + item['ItemInfo']['Title']['DisplayValue']); } - if (item['Offers'] !== undefined && item['Offers']['Listings'] !== undefined && item['Offers']['Listings'][0]['Price'] !== undefined && item['Offers']['Listings'][0]['Price']['DisplayAmount'] !== undefined) { - console.log('Buying Price: ' + item['Offers']['Listings'][0]['Price']['DisplayAmount']); + if ( + item['OffersV2'] !== undefined && + item['OffersV2']['Listings'] !== undefined && + item['OffersV2']['Listings'][0] !== undefined && + item['OffersV2']['Listings'][0]['Price'] !== undefined && + item['OffersV2']['Listings'][0]['Price']['Money'] !== undefined && + item['OffersV2']['Listings'][0]['Price']['Money']['DisplayAmount'] !== undefined + ) { + console.log('Buying Price: ' + item['OffersV2']['Listings'][0]['Price']['Money']['DisplayAmount']); } } } else { - console.log('Item not found, check errors') + console.log('Item not found, check errors'); } } } - if (getItemsResponse['Errors'] !== undefined) { - console.log('\nErrors:'); - console.log('Complete Error Response: ' + JSON.stringify(getItemsResponse['Errors'], null, 1)); - console.log('Printing 1st Error:'); - var error_0 = getItemsResponse['Errors'][0]; - console.log('Error Code: ' + error_0['Code']); - console.log('Error Message: ' + error_0['Message']); - } } -}; -try { - api.getItems(getItemsRequest, callback); -} catch (ex) { - console.log("Exception: " + ex); + if (getItemsResponse['Errors'] !== undefined) { + console.log('\nErrors:'); + console.log('Complete Error Response: ' + JSON.stringify(getItemsResponse['Errors'], null, 1)); + console.log('Printing 1st Error:'); + var error_0 = getItemsResponse['Errors'][0]; + console.log('Error Code: ' + error_0['Code']); + console.log('Error Message: ' + error_0['Message']); + } } + +function onError(error) { + console.log('Error calling PA-API 5.0!'); + console.log('Printing Full Error Object:\n' + JSON.stringify(error, null, 1)); + console.log('Status Code: ' + error['status']); + if (error['response'] !== undefined && error['response']['text'] !== undefined) { + console.log('Error Object: ' + JSON.stringify(error['response']['text'], null, 1)); + } +} + +api.getItems(getItemsRequest).then( + function(data) { + onSuccess(data); + }, + function(error) { + onError(error); + } +); diff --git a/sampleGetVariationsApi.js b/sampleGetVariationsApi.js index 214bc29..729136a 100644 --- a/sampleGetVariationsApi.js +++ b/sampleGetVariationsApi.js @@ -53,56 +53,76 @@ getVariationsRequest['ASIN'] = 'B07H65KP63'; * Choose resources you want from GetVariationsResource enum * For more details, refer: https://webservices.amazon.com/paapi5/documentation/get-variations.html#resources-parameter */ -getVariationsRequest['Resources'] = ['Images.Primary.Medium', 'ItemInfo.Title', 'Offers.Listings.Price', 'VariationSummary.VariationDimension']; +getVariationsRequest['Resources'] = [ + 'Images.Primary.Medium', + 'ItemInfo.Title', + 'Offers.Listings.Price', + 'VariationSummary.VariationDimension' +]; -var callback = function (error, data, response) { - if (error) { - console.log('Error calling PA-API 5.0!'); - console.log('Printing Full Error Object:\n' + JSON.stringify(error, null, 1)); - console.log('Status Code: ' + error['status']); - if (error['response'] !== undefined && error['response']['text'] !== undefined) { - console.log('Error Object: ' + JSON.stringify(error['response']['text'], null, 1)); +function onSuccess(data) { + console.log('API called successfully.'); + var getVariationsResponse = ProductAdvertisingAPIv1.GetVariationsResponse.constructFromObject(data); + console.log('Complete Response: \n' + JSON.stringify(getVariationsResponse, null, 1)); + if (getVariationsResponse['VariationsResult'] !== undefined) { + //console.log('Complete VariationsResult: \n' + JSON.stringify(getVariationsResponse['VariationsResult'], null, 1)); + console.log('Printing Variation Summary:'); + if ( + getVariationsResponse['VariationsResult']['VariationSummary'] !== undefined && + getVariationsResponse['VariationsResult']['VariationSummary']['VariationCount'] !== undefined + ) { + console.log('VariationCount: ' + getVariationsResponse['VariationsResult']['VariationSummary']['VariationCount']); } - } else { - console.log('API called successfully.'); - var getVariationsResponse = ProductAdvertisingAPIv1.GetVariationsResponse.constructFromObject(data); - console.log('Complete Response: \n' + JSON.stringify(getVariationsResponse, null, 1)); - if (getVariationsResponse['VariationsResult'] !== undefined) { - //console.log('Complete VariationsResult: \n' + JSON.stringify(getVariationsResponse['VariationsResult'], null, 1)); - console.log('Printing Variation Summary:'); - if (getVariationsResponse['VariationsResult']['VariationSummary'] !== undefined && getVariationsResponse['VariationsResult']['VariationSummary']['VariationCount'] !== undefined) { - console.log('VariationCount: ' + getVariationsResponse['VariationsResult']['VariationSummary']['VariationCount']); + console.log('Printing First Item Information in VariationsResult:'); + var item_0 = getVariationsResponse['VariationsResult']['Items'][0]; + if (item_0 !== undefined) { + if (item_0['ASIN'] !== undefined) { + console.log('ASIN: ' + item_0['ASIN']); } - console.log('Printing First Item Information in VariationsResult:'); - var item_0 = getVariationsResponse['VariationsResult']['Items'][0]; - if (item_0 !== undefined) { - if (item_0['ASIN'] !== undefined) { - console.log('ASIN: ' + item_0['ASIN']); - } - if (item_0['DetailPageURL'] !== undefined) { - console.log('DetailPageURL: ' + item_0['DetailPageURL']); - } - if (item_0['ItemInfo'] !== undefined && item_0['ItemInfo']['Title'] !== undefined && item_0['ItemInfo']['Title']['DisplayValue'] !== undefined) { - console.log('Title: ' + item_0['ItemInfo']['Title']['DisplayValue']); - } - if (item_0['Offers'] !== undefined && item_0['Offers']['Listings'] !== undefined && item_0['Offers']['Listings'][0]['Price'] !== undefined && item_0['Offers']['Listings'][0]['Price']['DisplayAmount'] !== undefined) { - console.log('Buying Price: ' + item_0['Offers']['Listings'][0]['Price']['DisplayAmount']); - } + if (item_0['DetailPageURL'] !== undefined) { + console.log('DetailPageURL: ' + item_0['DetailPageURL']); + } + if ( + item_0['ItemInfo'] !== undefined && + item_0['ItemInfo']['Title'] !== undefined && + item_0['ItemInfo']['Title']['DisplayValue'] !== undefined + ) { + console.log('Title: ' + item_0['ItemInfo']['Title']['DisplayValue']); + } + if ( + item_0['Offers'] !== undefined && + item_0['Offers']['Listings'] !== undefined && + item_0['Offers']['Listings'][0]['Price'] !== undefined && + item_0['Offers']['Listings'][0]['Price']['DisplayAmount'] !== undefined + ) { + console.log('Buying Price: ' + item_0['Offers']['Listings'][0]['Price']['DisplayAmount']); } } - if (getVariationsResponse['Errors'] !== undefined) { - console.log('Errors:'); - console.log('Complete Error Response: ' + JSON.stringify(getVariationsResponse['Errors'], null, 1)); - console.log('Printing 1st Error:'); - var error_0 = getVariationsResponse['Errors'][0]; - console.log('Error Code: ' + error_0['Code']); - console.log('Error Message: ' + error_0['Message']); - } } -}; + if (getVariationsResponse['Errors'] !== undefined) { + console.log('Errors:'); + console.log('Complete Error Response: ' + JSON.stringify(getVariationsResponse['Errors'], null, 1)); + console.log('Printing 1st Error:'); + var error_0 = getVariationsResponse['Errors'][0]; + console.log('Error Code: ' + error_0['Code']); + console.log('Error Message: ' + error_0['Message']); + } +} -try { - api.getVariations(getVariationsRequest, callback); -} catch (ex) { - console.log('Exception: ' + ex); +function onError(error) { + console.log('Error calling PA-API 5.0!'); + console.log('Printing Full Error Object:\n' + JSON.stringify(error, null, 1)); + console.log('Status Code: ' + error['status']); + if (error['response'] !== undefined && error['response']['text'] !== undefined) { + console.log('Error Object: ' + JSON.stringify(error['response']['text'], null, 1)); + } } + +api.getVariations(getVariationsRequest).then( + function(data) { + onSuccess(data); + }, + function(error) { + onError(error); + } +); diff --git a/sampleSearchItemsApi.js b/sampleSearchItemsApi.js index 68d248a..c4d58aa 100644 --- a/sampleSearchItemsApi.js +++ b/sampleSearchItemsApi.js @@ -49,7 +49,7 @@ searchItemsRequest['PartnerType'] = 'Associates'; /** Specify Keywords */ searchItemsRequest['Keywords'] = 'Harry Potter'; -/** +/** * Specify the category in which search request is to be made * For more details, refer: https://webservices.amazon.com/paapi5/documentation/use-cases/organization-of-items-on-amazon/search-index.html */ @@ -64,49 +64,61 @@ searchItemsRequest['ItemCount'] = 2; */ searchItemsRequest['Resources'] = ['Images.Primary.Medium', 'ItemInfo.Title', 'Offers.Listings.Price']; -var callback = function (error, data, response) { - if (error) { - console.log('Error calling PA-API 5.0!'); - console.log('Printing Full Error Object:\n' + JSON.stringify(error, null, 1)); - console.log('Status Code: ' + error['status']); - if (error['response'] !== undefined && error['response']['text'] !== undefined) { - console.log('Error Object: ' + JSON.stringify(error['response']['text'], null, 1)); - } - } else { - console.log('API called successfully.'); - var searchItemsResponse = ProductAdvertisingAPIv1.SearchItemsResponse.constructFromObject(data); - console.log('Complete Response: \n' + JSON.stringify(searchItemsResponse, null, 1)); - if (searchItemsResponse['SearchResult'] !== undefined) { - console.log('Printing First Item Information in SearchResult:'); - var item_0 = searchItemsResponse['SearchResult']['Items'][0]; - if (item_0 !== undefined) { - if(item_0['ASIN'] !== undefined) { - console.log('ASIN: ' + item_0['ASIN']); - } - if (item_0['DetailPageURL'] !== undefined) { - console.log('DetailPageURL: ' + item_0['DetailPageURL']); - } - if (item_0['ItemInfo'] !== undefined && item_0['ItemInfo']['Title'] !== undefined && item_0['ItemInfo']['Title']['DisplayValue'] !== undefined) { - console.log('Title: ' + item_0['ItemInfo']['Title']['DisplayValue']); - } - if (item_0['Offers'] !== undefined && item_0['Offers']['Listings'] !== undefined && item_0['Offers']['Listings'][0]['Price'] !== undefined && item_0['Offers']['Listings'][0]['Price']['DisplayAmount'] !== undefined) { - console.log('Buying Price: ' + item_0['Offers']['Listings'][0]['Price']['DisplayAmount']); - } +function onSuccess(data) { + console.log('API called successfully.'); + var searchItemsResponse = ProductAdvertisingAPIv1.SearchItemsResponse.constructFromObject(data); + console.log('Complete Response: \n' + JSON.stringify(searchItemsResponse, null, 1)); + if (searchItemsResponse['SearchResult'] !== undefined) { + console.log('Printing First Item Information in SearchResult:'); + var item_0 = searchItemsResponse['SearchResult']['Items'][0]; + if (item_0 !== undefined) { + if (item_0['ASIN'] !== undefined) { + console.log('ASIN: ' + item_0['ASIN']); + } + if (item_0['DetailPageURL'] !== undefined) { + console.log('DetailPageURL: ' + item_0['DetailPageURL']); + } + if ( + item_0['ItemInfo'] !== undefined && + item_0['ItemInfo']['Title'] !== undefined && + item_0['ItemInfo']['Title']['DisplayValue'] !== undefined + ) { + console.log('Title: ' + item_0['ItemInfo']['Title']['DisplayValue']); + } + if ( + item_0['Offers'] !== undefined && + item_0['Offers']['Listings'] !== undefined && + item_0['Offers']['Listings'][0]['Price'] !== undefined && + item_0['Offers']['Listings'][0]['Price']['DisplayAmount'] !== undefined + ) { + console.log('Buying Price: ' + item_0['Offers']['Listings'][0]['Price']['DisplayAmount']); } - } - if (searchItemsResponse['Errors'] !== undefined) { - console.log('Errors:'); - console.log('Complete Error Response: ' + JSON.stringify(searchItemsResponse['Errors'], null, 1)); - console.log('Printing 1st Error:'); - var error_0 = searchItemsResponse['Errors'][0]; - console.log('Error Code: ' + error_0['Code']); - console.log('Error Message: ' + error_0['Message']); } } -}; + if (searchItemsResponse['Errors'] !== undefined) { + console.log('Errors:'); + console.log('Complete Error Response: ' + JSON.stringify(searchItemsResponse['Errors'], null, 1)); + console.log('Printing 1st Error:'); + var error_0 = searchItemsResponse['Errors'][0]; + console.log('Error Code: ' + error_0['Code']); + console.log('Error Message: ' + error_0['Message']); + } +} -try { - api.searchItems(searchItemsRequest, callback); -} catch (ex) { - console.log('Exception: ' + ex); +function onError(error) { + console.log('Error calling PA-API 5.0!'); + console.log('Printing Full Error Object:\n' + JSON.stringify(error, null, 1)); + console.log('Status Code: ' + error['status']); + if (error['response'] !== undefined && error['response']['text'] !== undefined) { + console.log('Error Object: ' + JSON.stringify(error['response']['text'], null, 1)); + } } + +api.searchItems(searchItemsRequest).then( + function(data) { + onSuccess(data); + }, + function(error) { + onError(error); + } +); diff --git a/src/ApiClient.js b/src/ApiClient.js index dc632bd..b807c39 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,13 +13,20 @@ * permissions and limitations under the License. */ -/** + /** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + */ + + + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * */ -var awsv4 = require('./auth/sigv4'); +var awsv4 = require('./auth/SignHelper'); (function(root, factory) { if (typeof define === 'function' && define.amd) { @@ -132,7 +139,7 @@ var awsv4 = require('./auth/sigv4'); * Allow user to override superagent agent */ this.requestAgent = { - 'User-Agent': 'paapi5-nodejs-sdk/1.0.0' + 'User-Agent': 'paapi5-nodejs-sdk/1.2.1' }; }; @@ -345,14 +352,6 @@ var awsv4 = require('./auth/sigv4'); return exports.convertToType(data, returnType); }; - /** - * Callback function to receive the result of the operation. - * @callback module:ApiClient~callApiCallback - * @param {String} error Error message, if any. - * @param data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - /** * Invokes the REST service using the supplied settings and parameters. * @param {String} path The base URL to invoke. @@ -368,12 +367,11 @@ var awsv4 = require('./auth/sigv4'); * @param {Array.} accepts An array of acceptable response MIME types. * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the * constructor for a complex type. - * @param {module:ApiClient~callApiCallback} callback The callback function. - * @returns {Object} The SuperAgent request object. + * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object. */ exports.prototype.callApi = function callApi(path, httpMethod, apiName, pathParams, queryParams, collectionQueryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, - returnType, callback) { + returnType) { // Throw error if credentials are not specified if (this.accessKey === undefined || this.secretKey === undefined || this.accessKey === null || this.secretKey === null) { @@ -487,25 +485,23 @@ var awsv4 = require('./auth/sigv4'); } } - - request.end(function(error, response) { - if (callback) { - var data = null; - if (!error) { + return new Promise(function(resolve, reject) { + request.end(function(error, response) { + if (error) { + reject(error); + } else { try { - data = _this.deserialize(response, returnType); + var data = _this.deserialize(response, returnType); if (_this.enableCookies && typeof window === 'undefined'){ _this.agent.saveCookies(response); } + resolve({data: data, response: response}); } catch (err) { - error = err; + reject(err); } } - callback(error, data, response); - } + }); }); - - return request; }; /** diff --git a/src/api/DefaultApi.js b/src/api/DefaultApi.js index a745131..660bd0b 100644 --- a/src/api/DefaultApi.js +++ b/src/api/DefaultApi.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,14 @@ * permissions and limitations under the License. */ -/** + /** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + */ + + + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -53,20 +60,12 @@ this.apiClient = apiClient || ApiClient.instance; - /** - * Callback function to receive the result of the getBrowseNodes operation. - * @callback module:api/DefaultApi~getBrowseNodesCallback - * @param {String} error Error message, if any. - * @param {module:model/GetBrowseNodesResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ /** * @param {module:model/GetBrowseNodesRequest} getBrowseNodesRequest GetBrowseNodesRequest - * @param {module:api/DefaultApi~getBrowseNodesCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/GetBrowseNodesResponse} + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetBrowseNodesResponse} and HTTP response */ - this.getBrowseNodes = function(getBrowseNodesRequest, callback) { + this.getBrowseNodesWithHttpInfo = function(getBrowseNodesRequest) { var postBody = getBrowseNodesRequest; // verify the required parameter 'getBrowseNodesRequest' is set @@ -94,24 +93,27 @@ return this.apiClient.callApi( '/paapi5/getbrowsenodes', 'POST', 'GetBrowseNodes', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback + authNames, contentTypes, accepts, returnType ); } /** - * Callback function to receive the result of the getItems operation. - * @callback module:api/DefaultApi~getItemsCallback - * @param {String} error Error message, if any. - * @param {module:model/GetItemsResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. + * @param {module:model/GetBrowseNodesRequest} getBrowseNodesRequest GetBrowseNodesRequest + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetBrowseNodesResponse} */ + this.getBrowseNodes = function(getBrowseNodesRequest) { + return this.getBrowseNodesWithHttpInfo(getBrowseNodesRequest) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + /** * @param {module:model/GetItemsRequest} getItemsRequest GetItemsRequest - * @param {module:api/DefaultApi~getItemsCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/GetItemsResponse} + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetItemsResponse} and HTTP response */ - this.getItems = function(getItemsRequest, callback) { + this.getItemsWithHttpInfo = function(getItemsRequest) { var postBody = getItemsRequest; // verify the required parameter 'getItemsRequest' is set @@ -139,24 +141,27 @@ return this.apiClient.callApi( '/paapi5/getitems', 'POST', 'GetItems', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback + authNames, contentTypes, accepts, returnType ); } /** - * Callback function to receive the result of the getVariations operation. - * @callback module:api/DefaultApi~getVariationsCallback - * @param {String} error Error message, if any. - * @param {module:model/GetVariationsResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. + * @param {module:model/GetItemsRequest} getItemsRequest GetItemsRequest + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetItemsResponse} */ + this.getItems = function(getItemsRequest) { + return this.getItemsWithHttpInfo(getItemsRequest) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + /** * @param {module:model/GetVariationsRequest} getVariationsRequest GetVariationsRequest - * @param {module:api/DefaultApi~getVariationsCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/GetVariationsResponse} + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetVariationsResponse} and HTTP response */ - this.getVariations = function(getVariationsRequest, callback) { + this.getVariationsWithHttpInfo = function(getVariationsRequest) { var postBody = getVariationsRequest; // verify the required parameter 'getVariationsRequest' is set @@ -184,24 +189,27 @@ return this.apiClient.callApi( '/paapi5/getvariations', 'POST', 'GetVariations', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback + authNames, contentTypes, accepts, returnType ); } /** - * Callback function to receive the result of the searchItems operation. - * @callback module:api/DefaultApi~searchItemsCallback - * @param {String} error Error message, if any. - * @param {module:model/SearchItemsResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. + * @param {module:model/GetVariationsRequest} getVariationsRequest GetVariationsRequest + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetVariationsResponse} */ + this.getVariations = function(getVariationsRequest) { + return this.getVariationsWithHttpInfo(getVariationsRequest) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + /** * @param {module:model/SearchItemsRequest} searchItemsRequest SearchItemsRequest - * @param {module:api/DefaultApi~searchItemsCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:model/SearchItemsResponse} + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchItemsResponse} and HTTP response */ - this.searchItems = function(searchItemsRequest, callback) { + this.searchItemsWithHttpInfo = function(searchItemsRequest) { var postBody = searchItemsRequest; // verify the required parameter 'searchItemsRequest' is set @@ -229,9 +237,20 @@ return this.apiClient.callApi( '/paapi5/searchitems', 'POST', 'SearchItems', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback + authNames, contentTypes, accepts, returnType ); } + + /** + * @param {module:model/SearchItemsRequest} searchItemsRequest SearchItemsRequest + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchItemsResponse} + */ + this.searchItems = function(searchItemsRequest) { + return this.searchItemsWithHttpInfo(searchItemsRequest) + .then(function(response_and_data) { + return response_and_data.data; + }); + } }; return exports; diff --git a/src/auth/sigv4.js b/src/auth/SignHelper.js similarity index 51% rename from src/auth/sigv4.js rename to src/auth/SignHelper.js index db1d77d..4c048d7 100644 --- a/src/auth/sigv4.js +++ b/src/auth/SignHelper.js @@ -1,5 +1,20 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -27,47 +42,62 @@ 'use strict'; // sources of inspiration: -// https://web-identity-federation-playground.s3.amazonaws.com/js/sigv4.js // http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html -//var crypto = require('crypto'); -var crypto = require('crypto-js'); -var querystring = require('querystring'); -exports.createAuthorizationHeader = function(accessKey, secretKey, requestHeaders, httpMethod, path, payload, region, service, timestamp) { - /* Step 1: Create Canonical Headers */ - var canonicalHeaders = exports.createCanonicalHeaders(requestHeaders); - - /* Step 2: Create Signed Headers */ - var signedHeaders = exports.createSignedHeaders(requestHeaders); - - /* Step 3: Create Canonical Request */ - var canonicalRequest = exports.createCanonicalRequest(httpMethod, path, {}, requestHeaders, payload); - - /* Step 4: Create String To Sign */ - var stringToSign = exports.createStringToSign(timestamp, region, service, canonicalRequest); - - /* Step 5: Create Signature Headers */ - var signature = exports.createSignature(secretKey, timestamp, region, service, stringToSign); - - /* Step 6: Create Authorization Header */ - var authorizationHeader = exports.createAuthorizationHeaders(timestamp, accessKey, region, service, signedHeaders, signature); +var crypto = require('crypto-js'); - return authorizationHeader; -} +exports.createAuthorizationHeader = function( + accessKey, + secretKey, + requestHeaders, + httpMethod, + path, + payload, + region, + service, + timestamp +) { + /* Step 1: Create Signed Headers */ + var signedHeaders = exports.createSignedHeaders(requestHeaders); + + /* Step 2: Create Canonical Request */ + var canonicalRequest = exports.createCanonicalRequest(httpMethod, path, {}, requestHeaders, payload); + + /* Step 3: Create String To Sign */ + var stringToSign = exports.createStringToSign(timestamp, region, service, canonicalRequest); + + /* Step 4: Create Signature Headers */ + var signature = exports.createSignature(secretKey, timestamp, region, service, stringToSign); + + /* Step 5: Create Authorization Header */ + var authorizationHeader = exports.createAuthorizationHeaders( + timestamp, + accessKey, + region, + service, + signedHeaders, + signature + ); + + return authorizationHeader; +}; exports.createAuthorizationHeaders = function(timestamp, accessKey, region, service, signedHeaders, signature) { - return 'AWS4-HMAC-SHA256' - + ' ' - + 'Credential=' + accessKey - + '/' - + exports.createCredentialScope(timestamp, region, service) - + ', ' - + 'SignedHeaders=' - + signedHeaders - + ', ' - + 'Signature=' - + signature; -} + return ( + 'AWS4-HMAC-SHA256' + + ' ' + + 'Credential=' + + accessKey + + '/' + + exports.createCredentialScope(timestamp, region, service) + + ', ' + + 'SignedHeaders=' + + signedHeaders + + ', ' + + 'Signature=' + + signature + ); +}; exports.createCanonicalRequest = function(method, pathname, query, headers, payload) { var payloadJson = JSON.stringify(payload); @@ -82,21 +112,30 @@ exports.createCanonicalRequest = function(method, pathname, query, headers, payl }; exports.createCanonicalQueryString = function(params) { - return Object.keys(params).sort().map(function(key) { - return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]); - }).join('&'); + return Object.keys(params) + .sort() + .map(function(key) { + return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]); + }) + .join('&'); }; exports.createCanonicalHeaders = function(headers) { - return Object.keys(headers).sort().map(function(name) { - return name.toLowerCase().trim() + ':' + headers[name].toString().trim() + '\n'; - }).join(''); + return Object.keys(headers) + .sort() + .map(function(name) { + return name.toLowerCase().trim() + ':' + headers[name].toString().trim() + '\n'; + }) + .join(''); }; exports.createSignedHeaders = function(headers) { - return Object.keys(headers).sort().map(function(name) { - return name.toLowerCase().trim(); - }).join(';'); + return Object.keys(headers) + .sort() + .map(function(name) { + return name.toLowerCase().trim(); + }) + .join(';'); }; exports.createCredentialScope = function(time, region, service) { @@ -121,8 +160,8 @@ exports.createSignature = function(secret, time, region, service, stringToSign) }; exports.toAmzDate = function(time) { - return new Date(time).toISOString().replace(/[:\-]|\.\d{3}/g, ''); -} + return new Date(time).toISOString().replace(/[:\-]|\.\d{3}/g, ''); +}; function toTime(time) { return new Date(time).toISOString().replace(/[:\-]|\.\d{3}/g, ''); @@ -133,9 +172,9 @@ function toDate(time) { } function hmac(key, data) { - return crypto.HmacSHA256(data, key); + return crypto.HmacSHA256(data, key); } function hexEncodedHash(data) { - return crypto.SHA256(data).toString(crypto.enc.Hex); + return crypto.SHA256(data).toString(crypto.enc.Hex); } diff --git a/src/index.js b/src/index.js index 4c22ddf..d135c88 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -22,12 +22,12 @@ (function(factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient', 'model/Availability', 'model/BrowseNode', 'model/BrowseNodeAncestor', 'model/BrowseNodeChild', 'model/BrowseNodeChildren', 'model/BrowseNodeInfo', 'model/BrowseNodesResult', 'model/ByLineInfo', 'model/Classifications', 'model/Condition', 'model/ContentInfo', 'model/ContentRating', 'model/Contributor', 'model/DeliveryFlag', 'model/DimensionBasedAttribute', 'model/DurationPrice', 'model/ErrorData', 'model/ExternalIds', 'model/GetBrowseNodesRequest', 'model/GetBrowseNodesResource', 'model/GetBrowseNodesResponse', 'model/GetItemsRequest', 'model/GetItemsResource', 'model/GetItemsResponse', 'model/GetVariationsRequest', 'model/GetVariationsResource', 'model/GetVariationsResponse', 'model/ImageSize', 'model/ImageType', 'model/Images', 'model/Item', 'model/ItemIdType', 'model/ItemInfo', 'model/ItemsResult', 'model/LanguageType', 'model/Languages', 'model/ManufactureInfo', 'model/MaxPrice', 'model/Merchant', 'model/MinPrice', 'model/MinReviewsRating', 'model/MinSavingPercent', 'model/MultiValuedAttribute', 'model/OfferAvailability', 'model/OfferCondition', 'model/OfferCount', 'model/OfferDeliveryInfo', 'model/OfferListing', 'model/OfferLoyaltyPoints', 'model/OfferMerchantInfo', 'model/OfferPrice', 'model/OfferProgramEligibility', 'model/OfferPromotion', 'model/OfferSavings', 'model/OfferShippingCharge', 'model/OfferSubCondition', 'model/OfferSummary', 'model/Offers', 'model/PartnerType', 'model/Price', 'model/ProductAdvertisingAPIClientException', 'model/ProductAdvertisingAPIServiceException', 'model/ProductInfo', 'model/Properties', 'model/Refinement', 'model/RefinementBin', 'model/RentalOfferListing', 'model/RentalOffers', 'model/SearchItemsRequest', 'model/SearchItemsResource', 'model/SearchItemsResponse', 'model/SearchRefinements', 'model/SearchResult', 'model/SingleBooleanValuedAttribute', 'model/SingleIntegerValuedAttribute', 'model/SingleStringValuedAttribute', 'model/SortBy', 'model/TechnicalInfo', 'model/TradeInInfo', 'model/TradeInPrice', 'model/UnitBasedAttribute', 'model/VariationAttribute', 'model/VariationDimension', 'model/VariationSummary', 'model/VariationsResult', 'model/WebsiteSalesRank', 'api/DefaultApi'], factory); + define(['ApiClient', 'model/Availability', 'model/BigDecimal', 'model/BrowseNode', 'model/BrowseNodeAncestor', 'model/BrowseNodeChild', 'model/BrowseNodeInfo', 'model/BrowseNodesResult', 'model/ByLineInfo', 'model/Classifications', 'model/Condition', 'model/ContentInfo', 'model/ContentRating', 'model/Contributor', 'model/CustomerReviews', 'model/DealDetails', 'model/DeliveryFlag', 'model/DimensionBasedAttribute', 'model/DurationPrice', 'model/ErrorData', 'model/ExternalIds', 'model/GetBrowseNodesRequest', 'model/GetBrowseNodesResource', 'model/GetBrowseNodesResponse', 'model/GetItemsRequest', 'model/GetItemsResource', 'model/GetItemsResponse', 'model/GetVariationsRequest', 'model/GetVariationsResource', 'model/GetVariationsResponse', 'model/ImageSize', 'model/ImageType', 'model/Images', 'model/Item', 'model/ItemIdType', 'model/ItemInfo', 'model/ItemsResult', 'model/LanguageType', 'model/Languages', 'model/ManufactureInfo', 'model/MaxPrice', 'model/Merchant', 'model/MinPrice', 'model/MinReviewsRating', 'model/MinSavingPercent', 'model/Money', 'model/MultiValuedAttribute', 'model/OfferAvailability', 'model/OfferAvailabilityV2', 'model/OfferCondition', 'model/OfferConditionNote', 'model/OfferConditionV2', 'model/OfferCount', 'model/OfferDeliveryInfo', 'model/OfferListing', 'model/OfferListingV2', 'model/OfferListings', 'model/OfferListingsV2', 'model/OfferLoyaltyPoints', 'model/OfferLoyaltyPointsV2', 'model/OfferMerchantInfo', 'model/OfferMerchantInfoV2', 'model/OfferPrice', 'model/OfferPriceV2', 'model/OfferProgramEligibility', 'model/OfferPromotion', 'model/OfferSavingBasis', 'model/OfferSavings', 'model/OfferSavingsV2', 'model/OfferShippingCharge', 'model/OfferSubCondition', 'model/OfferSummary', 'model/OfferType', 'model/Offers', 'model/OffersV2', 'model/PartnerType', 'model/Price', 'model/PriceType', 'model/ProductAdvertisingAPIClientException', 'model/ProductAdvertisingAPIServiceException', 'model/ProductInfo', 'model/Properties', 'model/Rating', 'model/Refinement', 'model/RefinementBin', 'model/RentalOfferListing', 'model/RentalOffers', 'model/SavingBasisType', 'model/SearchIndex', 'model/SearchItemsRequest', 'model/SearchItemsResource', 'model/SearchItemsResponse', 'model/SearchRefinements', 'model/SearchResult', 'model/SingleBooleanValuedAttribute', 'model/SingleIntegerValuedAttribute', 'model/SingleStringValuedAttribute', 'model/SortBy', 'model/TechnicalInfo', 'model/TradeInInfo', 'model/TradeInPrice', 'model/UnitBasedAttribute', 'model/VariationAttribute', 'model/VariationDimension', 'model/VariationSummary', 'model/VariationsResult', 'model/WebsiteSalesRank', 'api/DefaultApi'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('./ApiClient'), require('./model/Availability'), require('./model/BrowseNode'), require('./model/BrowseNodeAncestor'), require('./model/BrowseNodeChild'), require('./model/BrowseNodeChildren'), require('./model/BrowseNodeInfo'), require('./model/BrowseNodesResult'), require('./model/ByLineInfo'), require('./model/Classifications'), require('./model/Condition'), require('./model/ContentInfo'), require('./model/ContentRating'), require('./model/Contributor'), require('./model/DeliveryFlag'), require('./model/DimensionBasedAttribute'), require('./model/DurationPrice'), require('./model/ErrorData'), require('./model/ExternalIds'), require('./model/GetBrowseNodesRequest'), require('./model/GetBrowseNodesResource'), require('./model/GetBrowseNodesResponse'), require('./model/GetItemsRequest'), require('./model/GetItemsResource'), require('./model/GetItemsResponse'), require('./model/GetVariationsRequest'), require('./model/GetVariationsResource'), require('./model/GetVariationsResponse'), require('./model/ImageSize'), require('./model/ImageType'), require('./model/Images'), require('./model/Item'), require('./model/ItemIdType'), require('./model/ItemInfo'), require('./model/ItemsResult'), require('./model/LanguageType'), require('./model/Languages'), require('./model/ManufactureInfo'), require('./model/MaxPrice'), require('./model/Merchant'), require('./model/MinPrice'), require('./model/MinReviewsRating'), require('./model/MinSavingPercent'), require('./model/MultiValuedAttribute'), require('./model/OfferAvailability'), require('./model/OfferCondition'), require('./model/OfferCount'), require('./model/OfferDeliveryInfo'), require('./model/OfferListing'), require('./model/OfferLoyaltyPoints'), require('./model/OfferMerchantInfo'), require('./model/OfferPrice'), require('./model/OfferProgramEligibility'), require('./model/OfferPromotion'), require('./model/OfferSavings'), require('./model/OfferShippingCharge'), require('./model/OfferSubCondition'), require('./model/OfferSummary'), require('./model/Offers'), require('./model/PartnerType'), require('./model/Price'), require('./model/ProductAdvertisingAPIClientException'), require('./model/ProductAdvertisingAPIServiceException'), require('./model/ProductInfo'), require('./model/Properties'), require('./model/Refinement'), require('./model/RefinementBin'), require('./model/RentalOfferListing'), require('./model/RentalOffers'), require('./model/SearchItemsRequest'), require('./model/SearchItemsResource'), require('./model/SearchItemsResponse'), require('./model/SearchRefinements'), require('./model/SearchResult'), require('./model/SingleBooleanValuedAttribute'), require('./model/SingleIntegerValuedAttribute'), require('./model/SingleStringValuedAttribute'), require('./model/SortBy'), require('./model/TechnicalInfo'), require('./model/TradeInInfo'), require('./model/TradeInPrice'), require('./model/UnitBasedAttribute'), require('./model/VariationAttribute'), require('./model/VariationDimension'), require('./model/VariationSummary'), require('./model/VariationsResult'), require('./model/WebsiteSalesRank'), require('./api/DefaultApi')); + module.exports = factory(require('./ApiClient'), require('./model/Availability'), require('./model/BigDecimal'), require('./model/BrowseNode'), require('./model/BrowseNodeAncestor'), require('./model/BrowseNodeChild'), require('./model/BrowseNodeInfo'), require('./model/BrowseNodesResult'), require('./model/ByLineInfo'), require('./model/Classifications'), require('./model/Condition'), require('./model/ContentInfo'), require('./model/ContentRating'), require('./model/Contributor'), require('./model/CustomerReviews'), require('./model/DealDetails'), require('./model/DeliveryFlag'), require('./model/DimensionBasedAttribute'), require('./model/DurationPrice'), require('./model/ErrorData'), require('./model/ExternalIds'), require('./model/GetBrowseNodesRequest'), require('./model/GetBrowseNodesResource'), require('./model/GetBrowseNodesResponse'), require('./model/GetItemsRequest'), require('./model/GetItemsResource'), require('./model/GetItemsResponse'), require('./model/GetVariationsRequest'), require('./model/GetVariationsResource'), require('./model/GetVariationsResponse'), require('./model/ImageSize'), require('./model/ImageType'), require('./model/Images'), require('./model/Item'), require('./model/ItemIdType'), require('./model/ItemInfo'), require('./model/ItemsResult'), require('./model/LanguageType'), require('./model/Languages'), require('./model/ManufactureInfo'), require('./model/MaxPrice'), require('./model/Merchant'), require('./model/MinPrice'), require('./model/MinReviewsRating'), require('./model/MinSavingPercent'), require('./model/Money'), require('./model/MultiValuedAttribute'), require('./model/OfferAvailability'), require('./model/OfferAvailabilityV2'), require('./model/OfferCondition'), require('./model/OfferConditionNote'), require('./model/OfferConditionV2'), require('./model/OfferCount'), require('./model/OfferDeliveryInfo'), require('./model/OfferListing'), require('./model/OfferListingV2'), require('./model/OfferListings'), require('./model/OfferListingsV2'), require('./model/OfferLoyaltyPoints'), require('./model/OfferLoyaltyPointsV2'), require('./model/OfferMerchantInfo'), require('./model/OfferMerchantInfoV2'), require('./model/OfferPrice'), require('./model/OfferPriceV2'), require('./model/OfferProgramEligibility'), require('./model/OfferPromotion'), require('./model/OfferSavingBasis'), require('./model/OfferSavings'), require('./model/OfferSavingsV2'), require('./model/OfferShippingCharge'), require('./model/OfferSubCondition'), require('./model/OfferSummary'), require('./model/OfferType'), require('./model/Offers'), require('./model/OffersV2'), require('./model/PartnerType'), require('./model/Price'), require('./model/PriceType'), require('./model/ProductAdvertisingAPIClientException'), require('./model/ProductAdvertisingAPIServiceException'), require('./model/ProductInfo'), require('./model/Properties'), require('./model/Rating'), require('./model/Refinement'), require('./model/RefinementBin'), require('./model/RentalOfferListing'), require('./model/RentalOffers'), require('./model/SavingBasisType'), require('./model/SearchIndex'), require('./model/SearchItemsRequest'), require('./model/SearchItemsResource'), require('./model/SearchItemsResponse'), require('./model/SearchRefinements'), require('./model/SearchResult'), require('./model/SingleBooleanValuedAttribute'), require('./model/SingleIntegerValuedAttribute'), require('./model/SingleStringValuedAttribute'), require('./model/SortBy'), require('./model/TechnicalInfo'), require('./model/TradeInInfo'), require('./model/TradeInPrice'), require('./model/UnitBasedAttribute'), require('./model/VariationAttribute'), require('./model/VariationDimension'), require('./model/VariationSummary'), require('./model/VariationsResult'), require('./model/WebsiteSalesRank'), require('./api/DefaultApi')); } -}(function(ApiClient, Availability, BrowseNode, BrowseNodeAncestor, BrowseNodeChild, BrowseNodeChildren, BrowseNodeInfo, BrowseNodesResult, ByLineInfo, Classifications, Condition, ContentInfo, ContentRating, Contributor, DeliveryFlag, DimensionBasedAttribute, DurationPrice, ErrorData, ExternalIds, GetBrowseNodesRequest, GetBrowseNodesResource, GetBrowseNodesResponse, GetItemsRequest, GetItemsResource, GetItemsResponse, GetVariationsRequest, GetVariationsResource, GetVariationsResponse, ImageSize, ImageType, Images, Item, ItemIdType, ItemInfo, ItemsResult, LanguageType, Languages, ManufactureInfo, MaxPrice, Merchant, MinPrice, MinReviewsRating, MinSavingPercent, MultiValuedAttribute, OfferAvailability, OfferCondition, OfferCount, OfferDeliveryInfo, OfferListing, OfferLoyaltyPoints, OfferMerchantInfo, OfferPrice, OfferProgramEligibility, OfferPromotion, OfferSavings, OfferShippingCharge, OfferSubCondition, OfferSummary, Offers, PartnerType, Price, ProductAdvertisingAPIClientException, ProductAdvertisingAPIServiceException, ProductInfo, Properties, Refinement, RefinementBin, RentalOfferListing, RentalOffers, SearchItemsRequest, SearchItemsResource, SearchItemsResponse, SearchRefinements, SearchResult, SingleBooleanValuedAttribute, SingleIntegerValuedAttribute, SingleStringValuedAttribute, SortBy, TechnicalInfo, TradeInInfo, TradeInPrice, UnitBasedAttribute, VariationAttribute, VariationDimension, VariationSummary, VariationsResult, WebsiteSalesRank, DefaultApi) { +}(function(ApiClient, Availability, BigDecimal, BrowseNode, BrowseNodeAncestor, BrowseNodeChild, BrowseNodeInfo, BrowseNodesResult, ByLineInfo, Classifications, Condition, ContentInfo, ContentRating, Contributor, CustomerReviews, DealDetails, DeliveryFlag, DimensionBasedAttribute, DurationPrice, ErrorData, ExternalIds, GetBrowseNodesRequest, GetBrowseNodesResource, GetBrowseNodesResponse, GetItemsRequest, GetItemsResource, GetItemsResponse, GetVariationsRequest, GetVariationsResource, GetVariationsResponse, ImageSize, ImageType, Images, Item, ItemIdType, ItemInfo, ItemsResult, LanguageType, Languages, ManufactureInfo, MaxPrice, Merchant, MinPrice, MinReviewsRating, MinSavingPercent, Money, MultiValuedAttribute, OfferAvailability, OfferAvailabilityV2, OfferCondition, OfferConditionNote, OfferConditionV2, OfferCount, OfferDeliveryInfo, OfferListing, OfferListingV2, OfferListings, OfferListingsV2, OfferLoyaltyPoints, OfferLoyaltyPointsV2, OfferMerchantInfo, OfferMerchantInfoV2, OfferPrice, OfferPriceV2, OfferProgramEligibility, OfferPromotion, OfferSavingBasis, OfferSavings, OfferSavingsV2, OfferShippingCharge, OfferSubCondition, OfferSummary, OfferType, Offers, OffersV2, PartnerType, Price, PriceType, ProductAdvertisingAPIClientException, ProductAdvertisingAPIServiceException, ProductInfo, Properties, Rating, Refinement, RefinementBin, RentalOfferListing, RentalOffers, SavingBasisType, SearchIndex, SearchItemsRequest, SearchItemsResource, SearchItemsResponse, SearchRefinements, SearchResult, SingleBooleanValuedAttribute, SingleIntegerValuedAttribute, SingleStringValuedAttribute, SortBy, TechnicalInfo, TradeInInfo, TradeInPrice, UnitBasedAttribute, VariationAttribute, VariationDimension, VariationSummary, VariationsResult, WebsiteSalesRank, DefaultApi) { 'use strict'; /** @@ -72,6 +72,11 @@ * @property {module:model/Availability} */ Availability: Availability, + /** + * The BigDecimal model constructor. + * @property {module:model/BigDecimal} + */ + BigDecimal: BigDecimal, /** * The BrowseNode model constructor. * @property {module:model/BrowseNode} @@ -87,11 +92,6 @@ * @property {module:model/BrowseNodeChild} */ BrowseNodeChild: BrowseNodeChild, - /** - * The BrowseNodeChildren model constructor. - * @property {module:model/BrowseNodeChildren} - */ - BrowseNodeChildren: BrowseNodeChildren, /** * The BrowseNodeInfo model constructor. * @property {module:model/BrowseNodeInfo} @@ -132,6 +132,16 @@ * @property {module:model/Contributor} */ Contributor: Contributor, + /** + * The CustomerReviews model constructor. + * @property {module:model/CustomerReviews} + */ + CustomerReviews: CustomerReviews, + /** + * The DealDetails model constructor. + * @property {module:model/DealDetails} + */ + DealDetails: DealDetails, /** * The DeliveryFlag model constructor. * @property {module:model/DeliveryFlag} @@ -277,6 +287,11 @@ * @property {module:model/MinSavingPercent} */ MinSavingPercent: MinSavingPercent, + /** + * The Money model constructor. + * @property {module:model/Money} + */ + Money: Money, /** * The MultiValuedAttribute model constructor. * @property {module:model/MultiValuedAttribute} @@ -287,11 +302,26 @@ * @property {module:model/OfferAvailability} */ OfferAvailability: OfferAvailability, + /** + * The OfferAvailabilityV2 model constructor. + * @property {module:model/OfferAvailabilityV2} + */ + OfferAvailabilityV2: OfferAvailabilityV2, /** * The OfferCondition model constructor. * @property {module:model/OfferCondition} */ OfferCondition: OfferCondition, + /** + * The OfferConditionNote model constructor. + * @property {module:model/OfferConditionNote} + */ + OfferConditionNote: OfferConditionNote, + /** + * The OfferConditionV2 model constructor. + * @property {module:model/OfferConditionV2} + */ + OfferConditionV2: OfferConditionV2, /** * The OfferCount model constructor. * @property {module:model/OfferCount} @@ -307,21 +337,51 @@ * @property {module:model/OfferListing} */ OfferListing: OfferListing, + /** + * The OfferListingV2 model constructor. + * @property {module:model/OfferListingV2} + */ + OfferListingV2: OfferListingV2, + /** + * The OfferListings model constructor. + * @property {module:model/OfferListings} + */ + OfferListings: OfferListings, + /** + * The OfferListingsV2 model constructor. + * @property {module:model/OfferListingsV2} + */ + OfferListingsV2: OfferListingsV2, /** * The OfferLoyaltyPoints model constructor. * @property {module:model/OfferLoyaltyPoints} */ OfferLoyaltyPoints: OfferLoyaltyPoints, + /** + * The OfferLoyaltyPointsV2 model constructor. + * @property {module:model/OfferLoyaltyPointsV2} + */ + OfferLoyaltyPointsV2: OfferLoyaltyPointsV2, /** * The OfferMerchantInfo model constructor. * @property {module:model/OfferMerchantInfo} */ OfferMerchantInfo: OfferMerchantInfo, + /** + * The OfferMerchantInfoV2 model constructor. + * @property {module:model/OfferMerchantInfoV2} + */ + OfferMerchantInfoV2: OfferMerchantInfoV2, /** * The OfferPrice model constructor. * @property {module:model/OfferPrice} */ OfferPrice: OfferPrice, + /** + * The OfferPriceV2 model constructor. + * @property {module:model/OfferPriceV2} + */ + OfferPriceV2: OfferPriceV2, /** * The OfferProgramEligibility model constructor. * @property {module:model/OfferProgramEligibility} @@ -332,11 +392,21 @@ * @property {module:model/OfferPromotion} */ OfferPromotion: OfferPromotion, + /** + * The OfferSavingBasis model constructor. + * @property {module:model/OfferSavingBasis} + */ + OfferSavingBasis: OfferSavingBasis, /** * The OfferSavings model constructor. * @property {module:model/OfferSavings} */ OfferSavings: OfferSavings, + /** + * The OfferSavingsV2 model constructor. + * @property {module:model/OfferSavingsV2} + */ + OfferSavingsV2: OfferSavingsV2, /** * The OfferShippingCharge model constructor. * @property {module:model/OfferShippingCharge} @@ -352,11 +422,21 @@ * @property {module:model/OfferSummary} */ OfferSummary: OfferSummary, + /** + * The OfferType model constructor. + * @property {module:model/OfferType} + */ + OfferType: OfferType, /** * The Offers model constructor. * @property {module:model/Offers} */ Offers: Offers, + /** + * The OffersV2 model constructor. + * @property {module:model/OffersV2} + */ + OffersV2: OffersV2, /** * The PartnerType model constructor. * @property {module:model/PartnerType} @@ -367,6 +447,11 @@ * @property {module:model/Price} */ Price: Price, + /** + * The PriceType model constructor. + * @property {module:model/PriceType} + */ + PriceType: PriceType, /** * The ProductAdvertisingAPIClientException model constructor. * @property {module:model/ProductAdvertisingAPIClientException} @@ -387,6 +472,11 @@ * @property {module:model/Properties} */ Properties: Properties, + /** + * The Rating model constructor. + * @property {module:model/Rating} + */ + Rating: Rating, /** * The Refinement model constructor. * @property {module:model/Refinement} @@ -407,6 +497,16 @@ * @property {module:model/RentalOffers} */ RentalOffers: RentalOffers, + /** + * The SavingBasisType model constructor. + * @property {module:model/SavingBasisType} + */ + SavingBasisType: SavingBasisType, + /** + * The SearchIndex model constructor. + * @property {module:model/SearchIndex} + */ + SearchIndex: SearchIndex, /** * The SearchItemsRequest model constructor. * @property {module:model/SearchItemsRequest} diff --git a/src/model/Availability.js b/src/model/Availability.js index 38adbe9..7bd9ac2 100644 --- a/src/model/Availability.js +++ b/src/model/Availability.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/BigDecimal.js b/src/model/BigDecimal.js new file mode 100644 index 0000000..767ac49 --- /dev/null +++ b/src/model/BigDecimal.js @@ -0,0 +1,75 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.BigDecimal = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The BigDecimal model module. + * @module model/BigDecimal + * @version 1.0.0 + */ + + /** + * Constructs a new BigDecimal. + * @alias module:model/BigDecimal + * @class + */ + var exports = function() { + var _this = this; + + }; + + /** + * Constructs a BigDecimal from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/BigDecimal} obj Optional instance to populate. + * @return {module:model/BigDecimal} The populated BigDecimal instance. + */ + exports.constructFromObject = function(data, obj) { + return data; + } + + + + + return exports; +})); + + diff --git a/src/model/BrowseNode.js b/src/model/BrowseNode.js index 329c4ef..f13c21d 100644 --- a/src/model/BrowseNode.js +++ b/src/model/BrowseNode.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -22,18 +22,18 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient', 'model/BrowseNodeAncestor', 'model/BrowseNodeChildren'], factory); + define(['ApiClient', 'model/BrowseNodeAncestor', 'model/BrowseNodeChild'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('./BrowseNodeAncestor'), require('./BrowseNodeChildren')); + module.exports = factory(require('../ApiClient'), require('./BrowseNodeAncestor'), require('./BrowseNodeChild')); } else { // Browser globals (root is window) if (!root.ProductAdvertisingAPIv1) { root.ProductAdvertisingAPIv1 = {}; } - root.ProductAdvertisingAPIv1.BrowseNode = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.BrowseNodeAncestor, root.ProductAdvertisingAPIv1.BrowseNodeChildren); + root.ProductAdvertisingAPIv1.BrowseNode = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.BrowseNodeAncestor, root.ProductAdvertisingAPIv1.BrowseNodeChild); } -}(this, function(ApiClient, BrowseNodeAncestor, BrowseNodeChildren) { +}(this, function(ApiClient, BrowseNodeAncestor, BrowseNodeChild) { 'use strict'; @@ -77,7 +77,7 @@ obj['Ancestor'] = BrowseNodeAncestor.constructFromObject(data['Ancestor']); } if (data.hasOwnProperty('Children')) { - obj['Children'] = BrowseNodeChildren.constructFromObject(data['Children']); + obj['Children'] = ApiClient.convertToType(data['Children'], [BrowseNodeChild]); } if (data.hasOwnProperty('ContextFreeName')) { obj['ContextFreeName'] = ApiClient.convertToType(data['ContextFreeName'], 'String'); @@ -103,7 +103,7 @@ */ exports.prototype['Ancestor'] = undefined; /** - * @member {module:model/BrowseNodeChildren} Children + * @member {Array.} Children */ exports.prototype['Children'] = undefined; /** diff --git a/src/model/BrowseNodeAncestor.js b/src/model/BrowseNodeAncestor.js index 5b882b6..3cf9e94 100644 --- a/src/model/BrowseNodeAncestor.js +++ b/src/model/BrowseNodeAncestor.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,14 @@ * permissions and limitations under the License. */ -/** + /** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + */ + + + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/BrowseNodeChild.js b/src/model/BrowseNodeChild.js index 46ddfd2..e3e6c5b 100644 --- a/src/model/BrowseNodeChild.js +++ b/src/model/BrowseNodeChild.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/BrowseNodeInfo.js b/src/model/BrowseNodeInfo.js index dbeec4d..898aa3d 100644 --- a/src/model/BrowseNodeInfo.js +++ b/src/model/BrowseNodeInfo.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/BrowseNodesResult.js b/src/model/BrowseNodesResult.js index a96386f..19304be 100644 --- a/src/model/BrowseNodesResult.js +++ b/src/model/BrowseNodesResult.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ByLineInfo.js b/src/model/ByLineInfo.js index 419304c..40b95a8 100644 --- a/src/model/ByLineInfo.js +++ b/src/model/ByLineInfo.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Classifications.js b/src/model/Classifications.js index 5420d3f..86df69e 100644 --- a/src/model/Classifications.js +++ b/src/model/Classifications.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Condition.js b/src/model/Condition.js index d939e37..4d2de80 100644 --- a/src/model/Condition.js +++ b/src/model/Condition.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ContentInfo.js b/src/model/ContentInfo.js index 8cd2f3a..43e67a9 100644 --- a/src/model/ContentInfo.js +++ b/src/model/ContentInfo.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ContentRating.js b/src/model/ContentRating.js index 5e601d8..33eb1f5 100644 --- a/src/model/ContentRating.js +++ b/src/model/ContentRating.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Contributor.js b/src/model/Contributor.js index 9f70df7..7b8124f 100644 --- a/src/model/Contributor.js +++ b/src/model/Contributor.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -56,6 +56,7 @@ + }; /** @@ -78,6 +79,9 @@ if (data.hasOwnProperty('Role')) { obj['Role'] = ApiClient.convertToType(data['Role'], 'String'); } + if (data.hasOwnProperty('RoleType')) { + obj['RoleType'] = ApiClient.convertToType(data['RoleType'], 'String'); + } } return obj; } @@ -94,6 +98,10 @@ * @member {String} Role */ exports.prototype['Role'] = undefined; + /** + * @member {String} RoleType + */ + exports.prototype['RoleType'] = undefined; diff --git a/src/model/CustomerReviews.js b/src/model/CustomerReviews.js new file mode 100644 index 0000000..1447116 --- /dev/null +++ b/src/model/CustomerReviews.js @@ -0,0 +1,95 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Rating'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./Rating')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.CustomerReviews = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.Rating); + } +}(this, function(ApiClient, Rating) { + 'use strict'; + + + + + /** + * The CustomerReviews model module. + * @module model/CustomerReviews + * @version 1.0.0 + */ + + /** + * Constructs a new CustomerReviews. + * @alias module:model/CustomerReviews + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a CustomerReviews from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/CustomerReviews} obj Optional instance to populate. + * @return {module:model/CustomerReviews} The populated CustomerReviews instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Count')) { + obj['Count'] = ApiClient.convertToType(data['Count'], 'Number'); + } + if (data.hasOwnProperty('StarRating')) { + obj['StarRating'] = Rating.constructFromObject(data['StarRating']); + } + } + return obj; + } + + /** + * @member {Number} Count + */ + exports.prototype['Count'] = undefined; + /** + * @member {module:model/Rating} StarRating + */ + exports.prototype['StarRating'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/DealDetails.js b/src/model/DealDetails.js new file mode 100644 index 0000000..6a8876c --- /dev/null +++ b/src/model/DealDetails.js @@ -0,0 +1,127 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.DealDetails = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The DealDetails model module. + * @module model/DealDetails + * @version 1.0.0 + */ + + /** + * Constructs a new DealDetails. + * @alias module:model/DealDetails + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + }; + + /** + * Constructs a DealDetails from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/DealDetails} obj Optional instance to populate. + * @return {module:model/DealDetails} The populated DealDetails instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('AccessType')) { + obj['AccessType'] = ApiClient.convertToType(data['AccessType'], 'String'); + } + if (data.hasOwnProperty('Badge')) { + obj['Badge'] = ApiClient.convertToType(data['Badge'], 'String'); + } + if (data.hasOwnProperty('EarlyAccessDurationInMilliseconds')) { + obj['EarlyAccessDurationInMilliseconds'] = ApiClient.convertToType(data['EarlyAccessDurationInMilliseconds'], 'Number'); + } + if (data.hasOwnProperty('EndTime')) { + obj['EndTime'] = ApiClient.convertToType(data['EndTime'], 'String'); + } + if (data.hasOwnProperty('PercentClaimed')) { + obj['PercentClaimed'] = ApiClient.convertToType(data['PercentClaimed'], 'Number'); + } + if (data.hasOwnProperty('StartTime')) { + obj['StartTime'] = ApiClient.convertToType(data['StartTime'], 'String'); + } + } + return obj; + } + + /** + * @member {String} AccessType + */ + exports.prototype['AccessType'] = undefined; + /** + * @member {String} Badge + */ + exports.prototype['Badge'] = undefined; + /** + * @member {Number} EarlyAccessDurationInMilliseconds + */ + exports.prototype['EarlyAccessDurationInMilliseconds'] = undefined; + /** + * @member {String} EndTime + */ + exports.prototype['EndTime'] = undefined; + /** + * @member {Number} PercentClaimed + */ + exports.prototype['PercentClaimed'] = undefined; + /** + * @member {String} StartTime + */ + exports.prototype['StartTime'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/DeliveryFlag.js b/src/model/DeliveryFlag.js index 557a6f5..62f2dac 100644 --- a/src/model/DeliveryFlag.js +++ b/src/model/DeliveryFlag.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/DimensionBasedAttribute.js b/src/model/DimensionBasedAttribute.js index 522223a..251ebca 100644 --- a/src/model/DimensionBasedAttribute.js +++ b/src/model/DimensionBasedAttribute.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/DurationPrice.js b/src/model/DurationPrice.js index 56d424f..e72cc11 100644 --- a/src/model/DurationPrice.js +++ b/src/model/DurationPrice.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ErrorData.js b/src/model/ErrorData.js index 4ae99d3..10aff03 100644 --- a/src/model/ErrorData.js +++ b/src/model/ErrorData.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ExternalIds.js b/src/model/ExternalIds.js index cba5259..c6b2fa4 100644 --- a/src/model/ExternalIds.js +++ b/src/model/ExternalIds.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/GetBrowseNodesRequest.js b/src/model/GetBrowseNodesRequest.js index e24737b..c15344f 100644 --- a/src/model/GetBrowseNodesRequest.js +++ b/src/model/GetBrowseNodesRequest.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/GetBrowseNodesResource.js b/src/model/GetBrowseNodesResource.js index ff702f6..2a7b714 100644 --- a/src/model/GetBrowseNodesResource.js +++ b/src/model/GetBrowseNodesResource.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/GetBrowseNodesResponse.js b/src/model/GetBrowseNodesResponse.js index 22efac8..bf52263 100644 --- a/src/model/GetBrowseNodesResponse.js +++ b/src/model/GetBrowseNodesResponse.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/GetItemsRequest.js b/src/model/GetItemsRequest.js index d9b4778..6b33c79 100644 --- a/src/model/GetItemsRequest.js +++ b/src/model/GetItemsRequest.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/GetItemsResource.js b/src/model/GetItemsResource.js index cf7cf49..6c1e55e 100644 --- a/src/model/GetItemsResource.js +++ b/src/model/GetItemsResource.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -63,6 +63,16 @@ * @const */ "BrowseNodeInfo.WebsiteSalesRank": "BrowseNodeInfo.WebsiteSalesRank", + /** + * value: "CustomerReviews.Count" + * @const + */ + "CustomerReviews.Count": "CustomerReviews.Count", + /** + * value: "CustomerReviews.StarRating" + * @const + */ + "CustomerReviews.StarRating": "CustomerReviews.StarRating", /** * value: "Images.Primary.Small" * @const @@ -173,6 +183,11 @@ * @const */ "Offers.Listings.Condition": "Offers.Listings.Condition", + /** + * value: "Offers.Listings.Condition.ConditionNote" + * @const + */ + "Offers.Listings.Condition.ConditionNote": "Offers.Listings.Condition.ConditionNote", /** * value: "Offers.Listings.Condition.SubCondition" * @const @@ -288,6 +303,11 @@ * @const */ "RentalOffers.Listings.Condition": "RentalOffers.Listings.Condition", + /** + * value: "RentalOffers.Listings.Condition.ConditionNote" + * @const + */ + "RentalOffers.Listings.Condition.ConditionNote": "RentalOffers.Listings.Condition.ConditionNote", /** * value: "RentalOffers.Listings.Condition.SubCondition" * @const @@ -317,7 +337,47 @@ * value: "RentalOffers.Listings.MerchantInfo" * @const */ - "RentalOffers.Listings.MerchantInfo": "RentalOffers.Listings.MerchantInfo" }; + "RentalOffers.Listings.MerchantInfo": "RentalOffers.Listings.MerchantInfo", + /** + * value: "OffersV2.Listings.Availability" + * @const + */ + "OffersV2.Listings.Availability": "OffersV2.Listings.Availability", + /** + * value: "OffersV2.Listings.Condition" + * @const + */ + "OffersV2.Listings.Condition": "OffersV2.Listings.Condition", + /** + * value: "OffersV2.Listings.DealDetails" + * @const + */ + "OffersV2.Listings.DealDetails": "OffersV2.Listings.DealDetails", + /** + * value: "OffersV2.Listings.IsBuyBoxWinner" + * @const + */ + "OffersV2.Listings.IsBuyBoxWinner": "OffersV2.Listings.IsBuyBoxWinner", + /** + * value: "OffersV2.Listings.LoyaltyPoints" + * @const + */ + "OffersV2.Listings.LoyaltyPoints": "OffersV2.Listings.LoyaltyPoints", + /** + * value: "OffersV2.Listings.MerchantInfo" + * @const + */ + "OffersV2.Listings.MerchantInfo": "OffersV2.Listings.MerchantInfo", + /** + * value: "OffersV2.Listings.Price" + * @const + */ + "OffersV2.Listings.Price": "OffersV2.Listings.Price", + /** + * value: "OffersV2.Listings.Type" + * @const + */ + "OffersV2.Listings.Type": "OffersV2.Listings.Type" }; /** * Returns a GetItemsResource enum value from a Javascript object name. diff --git a/src/model/GetItemsResponse.js b/src/model/GetItemsResponse.js index 01e58af..ce63a18 100644 --- a/src/model/GetItemsResponse.js +++ b/src/model/GetItemsResponse.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/GetVariationsRequest.js b/src/model/GetVariationsRequest.js index bea14f0..bbad8e4 100644 --- a/src/model/GetVariationsRequest.js +++ b/src/model/GetVariationsRequest.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/GetVariationsResource.js b/src/model/GetVariationsResource.js index 20d29eb..3198295 100644 --- a/src/model/GetVariationsResource.js +++ b/src/model/GetVariationsResource.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -63,6 +63,16 @@ * @const */ "BrowseNodeInfo.WebsiteSalesRank": "BrowseNodeInfo.WebsiteSalesRank", + /** + * value: "CustomerReviews.Count" + * @const + */ + "CustomerReviews.Count": "CustomerReviews.Count", + /** + * value: "CustomerReviews.StarRating" + * @const + */ + "CustomerReviews.StarRating": "CustomerReviews.StarRating", /** * value: "Images.Primary.Small" * @const @@ -173,6 +183,11 @@ * @const */ "Offers.Listings.Condition": "Offers.Listings.Condition", + /** + * value: "Offers.Listings.Condition.ConditionNote" + * @const + */ + "Offers.Listings.Condition.ConditionNote": "Offers.Listings.Condition.ConditionNote", /** * value: "Offers.Listings.Condition.SubCondition" * @const @@ -288,6 +303,11 @@ * @const */ "RentalOffers.Listings.Condition": "RentalOffers.Listings.Condition", + /** + * value: "RentalOffers.Listings.Condition.ConditionNote" + * @const + */ + "RentalOffers.Listings.Condition.ConditionNote": "RentalOffers.Listings.Condition.ConditionNote", /** * value: "RentalOffers.Listings.Condition.SubCondition" * @const diff --git a/src/model/GetVariationsResponse.js b/src/model/GetVariationsResponse.js index e4fd947..052b789 100644 --- a/src/model/GetVariationsResponse.js +++ b/src/model/GetVariationsResponse.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ImageSize.js b/src/model/ImageSize.js index 6212796..0a42e89 100644 --- a/src/model/ImageSize.js +++ b/src/model/ImageSize.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ImageType.js b/src/model/ImageType.js index 763ca52..039994c 100644 --- a/src/model/ImageType.js +++ b/src/model/ImageType.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Images.js b/src/model/Images.js index d4d27d9..c213d47 100644 --- a/src/model/Images.js +++ b/src/model/Images.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Item.js b/src/model/Item.js index 7f3b4b6..8dff490 100644 --- a/src/model/Item.js +++ b/src/model/Item.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -22,18 +22,18 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient', 'model/BrowseNodeInfo', 'model/Images', 'model/ItemInfo', 'model/Offers', 'model/RentalOffers', 'model/VariationAttribute'], factory); + define(['ApiClient', 'model/BrowseNodeInfo', 'model/CustomerReviews', 'model/Images', 'model/ItemInfo', 'model/Offers', 'model/OffersV2', 'model/RentalOffers', 'model/VariationAttribute'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('./BrowseNodeInfo'), require('./Images'), require('./ItemInfo'), require('./Offers'), require('./RentalOffers'), require('./VariationAttribute')); + module.exports = factory(require('../ApiClient'), require('./BrowseNodeInfo'), require('./CustomerReviews'), require('./Images'), require('./ItemInfo'), require('./Offers'), require('./OffersV2'), require('./RentalOffers'), require('./VariationAttribute')); } else { // Browser globals (root is window) if (!root.ProductAdvertisingAPIv1) { root.ProductAdvertisingAPIv1 = {}; } - root.ProductAdvertisingAPIv1.Item = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.BrowseNodeInfo, root.ProductAdvertisingAPIv1.Images, root.ProductAdvertisingAPIv1.ItemInfo, root.ProductAdvertisingAPIv1.Offers, root.ProductAdvertisingAPIv1.RentalOffers, root.ProductAdvertisingAPIv1.VariationAttribute); + root.ProductAdvertisingAPIv1.Item = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.BrowseNodeInfo, root.ProductAdvertisingAPIv1.CustomerReviews, root.ProductAdvertisingAPIv1.Images, root.ProductAdvertisingAPIv1.ItemInfo, root.ProductAdvertisingAPIv1.Offers, root.ProductAdvertisingAPIv1.OffersV2, root.ProductAdvertisingAPIv1.RentalOffers, root.ProductAdvertisingAPIv1.VariationAttribute); } -}(this, function(ApiClient, BrowseNodeInfo, Images, ItemInfo, Offers, RentalOffers, VariationAttribute) { +}(this, function(ApiClient, BrowseNodeInfo, CustomerReviews, Images, ItemInfo, Offers, OffersV2, RentalOffers, VariationAttribute) { 'use strict'; @@ -63,6 +63,8 @@ + + }; /** @@ -82,6 +84,9 @@ if (data.hasOwnProperty('BrowseNodeInfo')) { obj['BrowseNodeInfo'] = BrowseNodeInfo.constructFromObject(data['BrowseNodeInfo']); } + if (data.hasOwnProperty('CustomerReviews')) { + obj['CustomerReviews'] = CustomerReviews.constructFromObject(data['CustomerReviews']); + } if (data.hasOwnProperty('DetailPageURL')) { obj['DetailPageURL'] = ApiClient.convertToType(data['DetailPageURL'], 'String'); } @@ -94,6 +99,9 @@ if (data.hasOwnProperty('Offers')) { obj['Offers'] = Offers.constructFromObject(data['Offers']); } + if (data.hasOwnProperty('OffersV2')) { + obj['OffersV2'] = OffersV2.constructFromObject(data['OffersV2']); + } if (data.hasOwnProperty('ParentASIN')) { obj['ParentASIN'] = ApiClient.convertToType(data['ParentASIN'], 'String'); } @@ -118,6 +126,10 @@ * @member {module:model/BrowseNodeInfo} BrowseNodeInfo */ exports.prototype['BrowseNodeInfo'] = undefined; + /** + * @member {module:model/CustomerReviews} CustomerReviews + */ + exports.prototype['CustomerReviews'] = undefined; /** * @member {String} DetailPageURL */ @@ -134,6 +146,10 @@ * @member {module:model/Offers} Offers */ exports.prototype['Offers'] = undefined; + /** + * @member {module:model/OffersV2} OffersV2 + */ + exports.prototype['OffersV2'] = undefined; /** * @member {String} ParentASIN */ diff --git a/src/model/ItemIdType.js b/src/model/ItemIdType.js index cdea023..0193aa3 100644 --- a/src/model/ItemIdType.js +++ b/src/model/ItemIdType.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ItemInfo.js b/src/model/ItemInfo.js index d01758a..8d1fce3 100644 --- a/src/model/ItemInfo.js +++ b/src/model/ItemInfo.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ItemsResult.js b/src/model/ItemsResult.js index 1039d54..e1c2776 100644 --- a/src/model/ItemsResult.js +++ b/src/model/ItemsResult.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/LanguageType.js b/src/model/LanguageType.js index 4d2a607..3aa805b 100644 --- a/src/model/LanguageType.js +++ b/src/model/LanguageType.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Languages.js b/src/model/Languages.js index 189822e..ebdc8ea 100644 --- a/src/model/Languages.js +++ b/src/model/Languages.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ManufactureInfo.js b/src/model/ManufactureInfo.js index 633d425..0db2b47 100644 --- a/src/model/ManufactureInfo.js +++ b/src/model/ManufactureInfo.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/MaxPrice.js b/src/model/MaxPrice.js index 699ed07..39b7926 100644 --- a/src/model/MaxPrice.js +++ b/src/model/MaxPrice.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Merchant.js b/src/model/Merchant.js index 69327c6..0148bee 100644 --- a/src/model/Merchant.js +++ b/src/model/Merchant.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/MinPrice.js b/src/model/MinPrice.js index 89b4343..d283915 100644 --- a/src/model/MinPrice.js +++ b/src/model/MinPrice.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/MinReviewsRating.js b/src/model/MinReviewsRating.js index e47085e..3ddb721 100644 --- a/src/model/MinReviewsRating.js +++ b/src/model/MinReviewsRating.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/MinSavingPercent.js b/src/model/MinSavingPercent.js index bee1648..7a00c82 100644 --- a/src/model/MinSavingPercent.js +++ b/src/model/MinSavingPercent.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Money.js b/src/model/Money.js new file mode 100644 index 0000000..ddb460a --- /dev/null +++ b/src/model/Money.js @@ -0,0 +1,103 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/BigDecimal'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./BigDecimal')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.Money = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.BigDecimal); + } +}(this, function(ApiClient, BigDecimal) { + 'use strict'; + + + + + /** + * The Money model module. + * @module model/Money + * @version 1.0.0 + */ + + /** + * Constructs a new Money. + * @alias module:model/Money + * @class + */ + var exports = function() { + var _this = this; + + + + + }; + + /** + * Constructs a Money from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Money} obj Optional instance to populate. + * @return {module:model/Money} The populated Money instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Amount')) { + obj['Amount'] = BigDecimal.constructFromObject(data['Amount']); + } + if (data.hasOwnProperty('Currency')) { + obj['Currency'] = ApiClient.convertToType(data['Currency'], 'String'); + } + if (data.hasOwnProperty('DisplayAmount')) { + obj['DisplayAmount'] = ApiClient.convertToType(data['DisplayAmount'], 'String'); + } + } + return obj; + } + + /** + * @member {module:model/BigDecimal} Amount + */ + exports.prototype['Amount'] = undefined; + /** + * @member {String} Currency + */ + exports.prototype['Currency'] = undefined; + /** + * @member {String} DisplayAmount + */ + exports.prototype['DisplayAmount'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/MultiValuedAttribute.js b/src/model/MultiValuedAttribute.js index bff12bc..b11746d 100644 --- a/src/model/MultiValuedAttribute.js +++ b/src/model/MultiValuedAttribute.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferAvailability.js b/src/model/OfferAvailability.js index 3d7bf41..f3c7fc7 100644 --- a/src/model/OfferAvailability.js +++ b/src/model/OfferAvailability.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferAvailabilityV2.js b/src/model/OfferAvailabilityV2.js new file mode 100644 index 0000000..f9f3848 --- /dev/null +++ b/src/model/OfferAvailabilityV2.js @@ -0,0 +1,111 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferAvailabilityV2 = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The OfferAvailabilityV2 model module. + * @module model/OfferAvailabilityV2 + * @version 1.0.0 + */ + + /** + * Constructs a new OfferAvailabilityV2. + * @alias module:model/OfferAvailabilityV2 + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a OfferAvailabilityV2 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OfferAvailabilityV2} obj Optional instance to populate. + * @return {module:model/OfferAvailabilityV2} The populated OfferAvailabilityV2 instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Message')) { + obj['Message'] = ApiClient.convertToType(data['Message'], 'String'); + } + if (data.hasOwnProperty('MaxOrderQuantity')) { + obj['MaxOrderQuantity'] = ApiClient.convertToType(data['MaxOrderQuantity'], 'Number'); + } + if (data.hasOwnProperty('MinOrderQuantity')) { + obj['MinOrderQuantity'] = ApiClient.convertToType(data['MinOrderQuantity'], 'Number'); + } + if (data.hasOwnProperty('Type')) { + obj['Type'] = ApiClient.convertToType(data['Type'], 'String'); + } + } + return obj; + } + + /** + * @member {String} Message + */ + exports.prototype['Message'] = undefined; + /** + * @member {Number} MaxOrderQuantity + */ + exports.prototype['MaxOrderQuantity'] = undefined; + /** + * @member {Number} MinOrderQuantity + */ + exports.prototype['MinOrderQuantity'] = undefined; + /** + * @member {String} Type + */ + exports.prototype['Type'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/OfferCondition.js b/src/model/OfferCondition.js index 5566862..8e568f5 100644 --- a/src/model/OfferCondition.js +++ b/src/model/OfferCondition.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -22,18 +22,18 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient', 'model/OfferSubCondition'], factory); + define(['ApiClient', 'model/OfferConditionNote', 'model/OfferSubCondition'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('./OfferSubCondition')); + module.exports = factory(require('../ApiClient'), require('./OfferConditionNote'), require('./OfferSubCondition')); } else { // Browser globals (root is window) if (!root.ProductAdvertisingAPIv1) { root.ProductAdvertisingAPIv1 = {}; } - root.ProductAdvertisingAPIv1.OfferCondition = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.OfferSubCondition); + root.ProductAdvertisingAPIv1.OfferCondition = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.OfferConditionNote, root.ProductAdvertisingAPIv1.OfferSubCondition); } -}(this, function(ApiClient, OfferSubCondition) { +}(this, function(ApiClient, OfferConditionNote, OfferSubCondition) { 'use strict'; @@ -58,6 +58,7 @@ + }; /** @@ -86,6 +87,9 @@ if (data.hasOwnProperty('SubCondition')) { obj['SubCondition'] = OfferSubCondition.constructFromObject(data['SubCondition']); } + if (data.hasOwnProperty('ConditionNote')) { + obj['ConditionNote'] = OfferConditionNote.constructFromObject(data['ConditionNote']); + } } return obj; } @@ -110,6 +114,10 @@ * @member {module:model/OfferSubCondition} SubCondition */ exports.prototype['SubCondition'] = undefined; + /** + * @member {module:model/OfferConditionNote} ConditionNote + */ + exports.prototype['ConditionNote'] = undefined; diff --git a/src/model/OfferConditionNote.js b/src/model/OfferConditionNote.js new file mode 100644 index 0000000..1063bc5 --- /dev/null +++ b/src/model/OfferConditionNote.js @@ -0,0 +1,95 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferConditionNote = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The OfferConditionNote model module. + * @module model/OfferConditionNote + * @version 1.0.0 + */ + + /** + * Constructs a new OfferConditionNote. + * @alias module:model/OfferConditionNote + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a OfferConditionNote from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OfferConditionNote} obj Optional instance to populate. + * @return {module:model/OfferConditionNote} The populated OfferConditionNote instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Locale')) { + obj['Locale'] = ApiClient.convertToType(data['Locale'], 'String'); + } + if (data.hasOwnProperty('Value')) { + obj['Value'] = ApiClient.convertToType(data['Value'], 'String'); + } + } + return obj; + } + + /** + * @member {String} Locale + */ + exports.prototype['Locale'] = undefined; + /** + * @member {String} Value + */ + exports.prototype['Value'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/OfferConditionV2.js b/src/model/OfferConditionV2.js new file mode 100644 index 0000000..2a23ff4 --- /dev/null +++ b/src/model/OfferConditionV2.js @@ -0,0 +1,103 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferConditionV2 = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The OfferConditionV2 model module. + * @module model/OfferConditionV2 + * @version 1.0.0 + */ + + /** + * Constructs a new OfferConditionV2. + * @alias module:model/OfferConditionV2 + * @class + */ + var exports = function() { + var _this = this; + + + + + }; + + /** + * Constructs a OfferConditionV2 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OfferConditionV2} obj Optional instance to populate. + * @return {module:model/OfferConditionV2} The populated OfferConditionV2 instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Value')) { + obj['Value'] = ApiClient.convertToType(data['Value'], 'String'); + } + if (data.hasOwnProperty('SubCondition')) { + obj['SubCondition'] = ApiClient.convertToType(data['SubCondition'], 'String'); + } + if (data.hasOwnProperty('ConditionNote')) { + obj['ConditionNote'] = ApiClient.convertToType(data['ConditionNote'], 'String'); + } + } + return obj; + } + + /** + * @member {String} Value + */ + exports.prototype['Value'] = undefined; + /** + * @member {String} SubCondition + */ + exports.prototype['SubCondition'] = undefined; + /** + * @member {String} ConditionNote + */ + exports.prototype['ConditionNote'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/OfferCount.js b/src/model/OfferCount.js index cac6db5..8cd8781 100644 --- a/src/model/OfferCount.js +++ b/src/model/OfferCount.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferDeliveryInfo.js b/src/model/OfferDeliveryInfo.js index 02bb353..1c2f741 100644 --- a/src/model/OfferDeliveryInfo.js +++ b/src/model/OfferDeliveryInfo.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferListing.js b/src/model/OfferListing.js index 3e51d8e..7444977 100644 --- a/src/model/OfferListing.js +++ b/src/model/OfferListing.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferListingV2.js b/src/model/OfferListingV2.js new file mode 100644 index 0000000..99695b7 --- /dev/null +++ b/src/model/OfferListingV2.js @@ -0,0 +1,151 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/DealDetails', 'model/OfferAvailabilityV2', 'model/OfferConditionV2', 'model/OfferLoyaltyPointsV2', 'model/OfferMerchantInfoV2', 'model/OfferPriceV2', 'model/OfferType'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./DealDetails'), require('./OfferAvailabilityV2'), require('./OfferConditionV2'), require('./OfferLoyaltyPointsV2'), require('./OfferMerchantInfoV2'), require('./OfferPriceV2'), require('./OfferType')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferListingV2 = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.DealDetails, root.ProductAdvertisingAPIv1.OfferAvailabilityV2, root.ProductAdvertisingAPIv1.OfferConditionV2, root.ProductAdvertisingAPIv1.OfferLoyaltyPointsV2, root.ProductAdvertisingAPIv1.OfferMerchantInfoV2, root.ProductAdvertisingAPIv1.OfferPriceV2, root.ProductAdvertisingAPIv1.OfferType); + } +}(this, function(ApiClient, DealDetails, OfferAvailabilityV2, OfferConditionV2, OfferLoyaltyPointsV2, OfferMerchantInfoV2, OfferPriceV2, OfferType) { + 'use strict'; + + + + + /** + * The OfferListingV2 model module. + * @module model/OfferListingV2 + * @version 1.0.0 + */ + + /** + * Constructs a new OfferListingV2. + * @alias module:model/OfferListingV2 + * @class + */ + var exports = function() { + var _this = this; + + + + + + + + + + + }; + + /** + * Constructs a OfferListingV2 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OfferListingV2} obj Optional instance to populate. + * @return {module:model/OfferListingV2} The populated OfferListingV2 instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Availability')) { + obj['Availability'] = OfferAvailabilityV2.constructFromObject(data['Availability']); + } + if (data.hasOwnProperty('Condition')) { + obj['Condition'] = OfferConditionV2.constructFromObject(data['Condition']); + } + if (data.hasOwnProperty('DealDetails')) { + obj['DealDetails'] = DealDetails.constructFromObject(data['DealDetails']); + } + if (data.hasOwnProperty('IsBuyBoxWinner')) { + obj['IsBuyBoxWinner'] = ApiClient.convertToType(data['IsBuyBoxWinner'], 'Boolean'); + } + if (data.hasOwnProperty('LoyaltyPoints')) { + obj['LoyaltyPoints'] = OfferLoyaltyPointsV2.constructFromObject(data['LoyaltyPoints']); + } + if (data.hasOwnProperty('MerchantInfo')) { + obj['MerchantInfo'] = OfferMerchantInfoV2.constructFromObject(data['MerchantInfo']); + } + if (data.hasOwnProperty('Price')) { + obj['Price'] = OfferPriceV2.constructFromObject(data['Price']); + } + if (data.hasOwnProperty('Type')) { + obj['Type'] = OfferType.constructFromObject(data['Type']); + } + if (data.hasOwnProperty('ViolatesMAP')) { + obj['ViolatesMAP'] = ApiClient.convertToType(data['ViolatesMAP'], 'Boolean'); + } + } + return obj; + } + + /** + * @member {module:model/OfferAvailabilityV2} Availability + */ + exports.prototype['Availability'] = undefined; + /** + * @member {module:model/OfferConditionV2} Condition + */ + exports.prototype['Condition'] = undefined; + /** + * @member {module:model/DealDetails} DealDetails + */ + exports.prototype['DealDetails'] = undefined; + /** + * @member {Boolean} IsBuyBoxWinner + */ + exports.prototype['IsBuyBoxWinner'] = undefined; + /** + * @member {module:model/OfferLoyaltyPointsV2} LoyaltyPoints + */ + exports.prototype['LoyaltyPoints'] = undefined; + /** + * @member {module:model/OfferMerchantInfoV2} MerchantInfo + */ + exports.prototype['MerchantInfo'] = undefined; + /** + * @member {module:model/OfferPriceV2} Price + */ + exports.prototype['Price'] = undefined; + /** + * @member {module:model/OfferType} Type + */ + exports.prototype['Type'] = undefined; + /** + * @member {Boolean} ViolatesMAP + */ + exports.prototype['ViolatesMAP'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/BrowseNodeChildren.js b/src/model/OfferListings.js similarity index 65% rename from src/model/BrowseNodeChildren.js rename to src/model/OfferListings.js index 7f824dc..e9876ec 100644 --- a/src/model/BrowseNodeChildren.js +++ b/src/model/OfferListings.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -22,32 +22,32 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient', 'model/BrowseNodeChild'], factory); + define(['ApiClient', 'model/OfferListing'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('./BrowseNodeChild')); + module.exports = factory(require('../ApiClient'), require('./OfferListing')); } else { // Browser globals (root is window) if (!root.ProductAdvertisingAPIv1) { root.ProductAdvertisingAPIv1 = {}; } - root.ProductAdvertisingAPIv1.BrowseNodeChildren = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.BrowseNodeChild); + root.ProductAdvertisingAPIv1.OfferListings = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.OfferListing); } -}(this, function(ApiClient, BrowseNodeChild) { +}(this, function(ApiClient, OfferListing) { 'use strict'; /** - * The BrowseNodeChildren model module. - * @module model/BrowseNodeChildren + * The OfferListings model module. + * @module model/OfferListings * @version 1.0.0 */ /** - * Constructs a new BrowseNodeChildren. - * @alias module:model/BrowseNodeChildren + * Constructs a new OfferListings. + * @alias module:model/OfferListings * @class * @extends Array */ @@ -60,16 +60,16 @@ }; /** - * Constructs a BrowseNodeChildren from a plain JavaScript object, optionally creating a new instance. + * Constructs a OfferListings from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from data to obj if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/BrowseNodeChildren} obj Optional instance to populate. - * @return {module:model/BrowseNodeChildren} The populated BrowseNodeChildren instance. + * @param {module:model/OfferListings} obj Optional instance to populate. + * @return {module:model/OfferListings} The populated OfferListings instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); - ApiClient.constructFromObject(data, obj, 'BrowseNodeChild'); + ApiClient.constructFromObject(data, obj, 'OfferListing'); } return obj; diff --git a/src/model/OfferListingsV2.js b/src/model/OfferListingsV2.js new file mode 100644 index 0000000..418a3dc --- /dev/null +++ b/src/model/OfferListingsV2.js @@ -0,0 +1,84 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/OfferListingV2'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./OfferListingV2')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferListingsV2 = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.OfferListingV2); + } +}(this, function(ApiClient, OfferListingV2) { + 'use strict'; + + + + + /** + * The OfferListingsV2 model module. + * @module model/OfferListingsV2 + * @version 1.0.0 + */ + + /** + * Constructs a new OfferListingsV2. + * @alias module:model/OfferListingsV2 + * @class + * @extends Array + */ + var exports = function() { + var _this = this; + _this = new Array(); + Object.setPrototypeOf(_this, exports); + + return _this; + }; + + /** + * Constructs a OfferListingsV2 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OfferListingsV2} obj Optional instance to populate. + * @return {module:model/OfferListingsV2} The populated OfferListingsV2 instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + ApiClient.constructFromObject(data, obj, 'OfferListingV2'); + + } + return obj; + } + + + + + return exports; +})); + + diff --git a/src/model/OfferLoyaltyPoints.js b/src/model/OfferLoyaltyPoints.js index 9d60ddc..318fbd6 100644 --- a/src/model/OfferLoyaltyPoints.js +++ b/src/model/OfferLoyaltyPoints.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferLoyaltyPointsV2.js b/src/model/OfferLoyaltyPointsV2.js new file mode 100644 index 0000000..24ce618 --- /dev/null +++ b/src/model/OfferLoyaltyPointsV2.js @@ -0,0 +1,87 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferLoyaltyPointsV2 = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The OfferLoyaltyPointsV2 model module. + * @module model/OfferLoyaltyPointsV2 + * @version 1.0.0 + */ + + /** + * Constructs a new OfferLoyaltyPointsV2. + * @alias module:model/OfferLoyaltyPointsV2 + * @class + */ + var exports = function() { + var _this = this; + + + }; + + /** + * Constructs a OfferLoyaltyPointsV2 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OfferLoyaltyPointsV2} obj Optional instance to populate. + * @return {module:model/OfferLoyaltyPointsV2} The populated OfferLoyaltyPointsV2 instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Points')) { + obj['Points'] = ApiClient.convertToType(data['Points'], 'Number'); + } + } + return obj; + } + + /** + * @member {Number} Points + */ + exports.prototype['Points'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/OfferMerchantInfo.js b/src/model/OfferMerchantInfo.js index 4320638..04ab6eb 100644 --- a/src/model/OfferMerchantInfo.js +++ b/src/model/OfferMerchantInfo.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -56,6 +56,8 @@ + + }; /** @@ -72,6 +74,12 @@ if (data.hasOwnProperty('DefaultShippingCountry')) { obj['DefaultShippingCountry'] = ApiClient.convertToType(data['DefaultShippingCountry'], 'String'); } + if (data.hasOwnProperty('FeedbackCount')) { + obj['FeedbackCount'] = ApiClient.convertToType(data['FeedbackCount'], 'Number'); + } + if (data.hasOwnProperty('FeedbackRating')) { + obj['FeedbackRating'] = ApiClient.convertToType(data['FeedbackRating'], 'Number'); + } if (data.hasOwnProperty('Id')) { obj['Id'] = ApiClient.convertToType(data['Id'], 'String'); } @@ -86,6 +94,14 @@ * @member {String} DefaultShippingCountry */ exports.prototype['DefaultShippingCountry'] = undefined; + /** + * @member {Number} FeedbackCount + */ + exports.prototype['FeedbackCount'] = undefined; + /** + * @member {Number} FeedbackRating + */ + exports.prototype['FeedbackRating'] = undefined; /** * @member {String} Id */ diff --git a/src/model/OfferMerchantInfoV2.js b/src/model/OfferMerchantInfoV2.js new file mode 100644 index 0000000..53f2b61 --- /dev/null +++ b/src/model/OfferMerchantInfoV2.js @@ -0,0 +1,95 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferMerchantInfoV2 = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The OfferMerchantInfoV2 model module. + * @module model/OfferMerchantInfoV2 + * @version 1.0.0 + */ + + /** + * Constructs a new OfferMerchantInfoV2. + * @alias module:model/OfferMerchantInfoV2 + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a OfferMerchantInfoV2 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OfferMerchantInfoV2} obj Optional instance to populate. + * @return {module:model/OfferMerchantInfoV2} The populated OfferMerchantInfoV2 instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Name')) { + obj['Name'] = ApiClient.convertToType(data['Name'], 'String'); + } + if (data.hasOwnProperty('Id')) { + obj['Id'] = ApiClient.convertToType(data['Id'], 'String'); + } + } + return obj; + } + + /** + * @member {String} Name + */ + exports.prototype['Name'] = undefined; + /** + * @member {String} Id + */ + exports.prototype['Id'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/OfferPrice.js b/src/model/OfferPrice.js index 91ced42..e29d6dd 100644 --- a/src/model/OfferPrice.js +++ b/src/model/OfferPrice.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -22,18 +22,18 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient', 'model/OfferSavings'], factory); + define(['ApiClient', 'model/OfferSavings', 'model/PriceType'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('./OfferSavings')); + module.exports = factory(require('../ApiClient'), require('./OfferSavings'), require('./PriceType')); } else { // Browser globals (root is window) if (!root.ProductAdvertisingAPIv1) { root.ProductAdvertisingAPIv1 = {}; } - root.ProductAdvertisingAPIv1.OfferPrice = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.OfferSavings); + root.ProductAdvertisingAPIv1.OfferPrice = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.OfferSavings, root.ProductAdvertisingAPIv1.PriceType); } -}(this, function(ApiClient, OfferSavings) { +}(this, function(ApiClient, OfferSavings, PriceType) { 'use strict'; @@ -58,6 +58,8 @@ + + }; /** @@ -83,6 +85,12 @@ if (data.hasOwnProperty('PricePerUnit')) { obj['PricePerUnit'] = ApiClient.convertToType(data['PricePerUnit'], 'Number'); } + if (data.hasOwnProperty('PriceType')) { + obj['PriceType'] = PriceType.constructFromObject(data['PriceType']); + } + if (data.hasOwnProperty('PriceTypeLabel')) { + obj['PriceTypeLabel'] = ApiClient.convertToType(data['PriceTypeLabel'], 'String'); + } if (data.hasOwnProperty('Savings')) { obj['Savings'] = OfferSavings.constructFromObject(data['Savings']); } @@ -106,6 +114,14 @@ * @member {Number} PricePerUnit */ exports.prototype['PricePerUnit'] = undefined; + /** + * @member {module:model/PriceType} PriceType + */ + exports.prototype['PriceType'] = undefined; + /** + * @member {String} PriceTypeLabel + */ + exports.prototype['PriceTypeLabel'] = undefined; /** * @member {module:model/OfferSavings} Savings */ diff --git a/src/model/OfferPriceV2.js b/src/model/OfferPriceV2.js new file mode 100644 index 0000000..497a370 --- /dev/null +++ b/src/model/OfferPriceV2.js @@ -0,0 +1,111 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Money', 'model/OfferSavingBasis', 'model/OfferSavingsV2'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./Money'), require('./OfferSavingBasis'), require('./OfferSavingsV2')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferPriceV2 = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.Money, root.ProductAdvertisingAPIv1.OfferSavingBasis, root.ProductAdvertisingAPIv1.OfferSavingsV2); + } +}(this, function(ApiClient, Money, OfferSavingBasis, OfferSavingsV2) { + 'use strict'; + + + + + /** + * The OfferPriceV2 model module. + * @module model/OfferPriceV2 + * @version 1.0.0 + */ + + /** + * Constructs a new OfferPriceV2. + * @alias module:model/OfferPriceV2 + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a OfferPriceV2 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OfferPriceV2} obj Optional instance to populate. + * @return {module:model/OfferPriceV2} The populated OfferPriceV2 instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Money')) { + obj['Money'] = Money.constructFromObject(data['Money']); + } + if (data.hasOwnProperty('PricePerUnit')) { + obj['PricePerUnit'] = Money.constructFromObject(data['PricePerUnit']); + } + if (data.hasOwnProperty('Savings')) { + obj['Savings'] = OfferSavingsV2.constructFromObject(data['Savings']); + } + if (data.hasOwnProperty('SavingBasis')) { + obj['SavingBasis'] = OfferSavingBasis.constructFromObject(data['SavingBasis']); + } + } + return obj; + } + + /** + * @member {module:model/Money} Money + */ + exports.prototype['Money'] = undefined; + /** + * @member {module:model/Money} PricePerUnit + */ + exports.prototype['PricePerUnit'] = undefined; + /** + * @member {module:model/OfferSavingsV2} Savings + */ + exports.prototype['Savings'] = undefined; + /** + * @member {module:model/OfferSavingBasis} SavingBasis + */ + exports.prototype['SavingBasis'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/OfferProgramEligibility.js b/src/model/OfferProgramEligibility.js index 24d65dd..5a9a9c0 100644 --- a/src/model/OfferProgramEligibility.js +++ b/src/model/OfferProgramEligibility.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferPromotion.js b/src/model/OfferPromotion.js index 229ea0f..8446eb2 100644 --- a/src/model/OfferPromotion.js +++ b/src/model/OfferPromotion.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferSavingBasis.js b/src/model/OfferSavingBasis.js new file mode 100644 index 0000000..e2be6fe --- /dev/null +++ b/src/model/OfferSavingBasis.js @@ -0,0 +1,103 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Money', 'model/SavingBasisType'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./Money'), require('./SavingBasisType')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferSavingBasis = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.Money, root.ProductAdvertisingAPIv1.SavingBasisType); + } +}(this, function(ApiClient, Money, SavingBasisType) { + 'use strict'; + + + + + /** + * The OfferSavingBasis model module. + * @module model/OfferSavingBasis + * @version 1.0.0 + */ + + /** + * Constructs a new OfferSavingBasis. + * @alias module:model/OfferSavingBasis + * @class + */ + var exports = function() { + var _this = this; + + + + + }; + + /** + * Constructs a OfferSavingBasis from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OfferSavingBasis} obj Optional instance to populate. + * @return {module:model/OfferSavingBasis} The populated OfferSavingBasis instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Money')) { + obj['Money'] = Money.constructFromObject(data['Money']); + } + if (data.hasOwnProperty('SavingBasisType')) { + obj['SavingBasisType'] = SavingBasisType.constructFromObject(data['SavingBasisType']); + } + if (data.hasOwnProperty('SavingBasisTypeLabel')) { + obj['SavingBasisTypeLabel'] = ApiClient.convertToType(data['SavingBasisTypeLabel'], 'String'); + } + } + return obj; + } + + /** + * @member {module:model/Money} Money + */ + exports.prototype['Money'] = undefined; + /** + * @member {module:model/SavingBasisType} SavingBasisType + */ + exports.prototype['SavingBasisType'] = undefined; + /** + * @member {String} SavingBasisTypeLabel + */ + exports.prototype['SavingBasisTypeLabel'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/OfferSavings.js b/src/model/OfferSavings.js index 4c9473a..0ea66d4 100644 --- a/src/model/OfferSavings.js +++ b/src/model/OfferSavings.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferSavingsV2.js b/src/model/OfferSavingsV2.js new file mode 100644 index 0000000..4676f22 --- /dev/null +++ b/src/model/OfferSavingsV2.js @@ -0,0 +1,95 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Money'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./Money')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferSavingsV2 = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.Money); + } +}(this, function(ApiClient, Money) { + 'use strict'; + + + + + /** + * The OfferSavingsV2 model module. + * @module model/OfferSavingsV2 + * @version 1.0.0 + */ + + /** + * Constructs a new OfferSavingsV2. + * @alias module:model/OfferSavingsV2 + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a OfferSavingsV2 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OfferSavingsV2} obj Optional instance to populate. + * @return {module:model/OfferSavingsV2} The populated OfferSavingsV2 instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Money')) { + obj['Money'] = Money.constructFromObject(data['Money']); + } + if (data.hasOwnProperty('Percentage')) { + obj['Percentage'] = ApiClient.convertToType(data['Percentage'], 'Number'); + } + } + return obj; + } + + /** + * @member {module:model/Money} Money + */ + exports.prototype['Money'] = undefined; + /** + * @member {Number} Percentage + */ + exports.prototype['Percentage'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/OfferShippingCharge.js b/src/model/OfferShippingCharge.js index 1452fc6..a32191f 100644 --- a/src/model/OfferShippingCharge.js +++ b/src/model/OfferShippingCharge.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferSubCondition.js b/src/model/OfferSubCondition.js index 1dff831..e398b26 100644 --- a/src/model/OfferSubCondition.js +++ b/src/model/OfferSubCondition.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferSummary.js b/src/model/OfferSummary.js index 1cd132d..042fe93 100644 --- a/src/model/OfferSummary.js +++ b/src/model/OfferSummary.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OfferType.js b/src/model/OfferType.js new file mode 100644 index 0000000..3d6f594 --- /dev/null +++ b/src/model/OfferType.js @@ -0,0 +1,69 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OfferType = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + /** + * Enum class OfferType. + * @enum {} + * @readonly + */ + var exports = { + /** + * value: "SUBSCRIBE_AND_SAVE" + * @const + */ + "SUBSCRIBE_AND_SAVE": "SUBSCRIBE_AND_SAVE", + /** + * value: "LIGHTNING_DEAL" + * @const + */ + "LIGHTNING_DEAL": "LIGHTNING_DEAL" }; + + /** + * Returns a OfferType enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/OfferType} The enum OfferType value. + */ + exports.constructFromObject = function(object) { + return object; + } + + return exports; +})); + + diff --git a/src/model/Offers.js b/src/model/Offers.js index 6327f7f..4c29d10 100644 --- a/src/model/Offers.js +++ b/src/model/Offers.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/OffersV2.js b/src/model/OffersV2.js new file mode 100644 index 0000000..16b5495 --- /dev/null +++ b/src/model/OffersV2.js @@ -0,0 +1,87 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/OfferListingsV2'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./OfferListingsV2')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.OffersV2 = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.OfferListingsV2); + } +}(this, function(ApiClient, OfferListingsV2) { + 'use strict'; + + + + + /** + * The OffersV2 model module. + * @module model/OffersV2 + * @version 1.0.0 + */ + + /** + * Constructs a new OffersV2. + * @alias module:model/OffersV2 + * @class + */ + var exports = function() { + var _this = this; + + + }; + + /** + * Constructs a OffersV2 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OffersV2} obj Optional instance to populate. + * @return {module:model/OffersV2} The populated OffersV2 instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Listings')) { + obj['Listings'] = OfferListingsV2.constructFromObject(data['Listings']); + } + } + return obj; + } + + /** + * @member {module:model/OfferListingsV2} Listings + */ + exports.prototype['Listings'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/PartnerType.js b/src/model/PartnerType.js index 9f031d1..185501e 100644 --- a/src/model/PartnerType.js +++ b/src/model/PartnerType.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Price.js b/src/model/Price.js index 34846bb..4147c89 100644 --- a/src/model/Price.js +++ b/src/model/Price.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/PriceType.js b/src/model/PriceType.js new file mode 100644 index 0000000..280793c --- /dev/null +++ b/src/model/PriceType.js @@ -0,0 +1,79 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.PriceType = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + /** + * Enum class PriceType. + * @enum {} + * @readonly + */ + var exports = { + /** + * value: "LIST_PRICE" + * @const + */ + "LIST_PRICE": "LIST_PRICE", + /** + * value: "LOWEST_PRICE" + * @const + */ + "LOWEST_PRICE": "LOWEST_PRICE", + /** + * value: "LOWEST_PRICE_STRIKETHROUGH" + * @const + */ + "LOWEST_PRICE_STRIKETHROUGH": "LOWEST_PRICE_STRIKETHROUGH", + /** + * value: "WAS_PRICE" + * @const + */ + "WAS_PRICE": "WAS_PRICE" }; + + /** + * Returns a PriceType enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/PriceType} The enum PriceType value. + */ + exports.constructFromObject = function(object) { + return object; + } + + return exports; +})); + + diff --git a/src/model/ProductAdvertisingAPIClientException.js b/src/model/ProductAdvertisingAPIClientException.js index 3d4f6bc..dcca053 100644 --- a/src/model/ProductAdvertisingAPIClientException.js +++ b/src/model/ProductAdvertisingAPIClientException.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ProductAdvertisingAPIServiceException.js b/src/model/ProductAdvertisingAPIServiceException.js index 27543fd..6873cfb 100644 --- a/src/model/ProductAdvertisingAPIServiceException.js +++ b/src/model/ProductAdvertisingAPIServiceException.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/ProductInfo.js b/src/model/ProductInfo.js index 707a5a3..1e95b02 100644 --- a/src/model/ProductInfo.js +++ b/src/model/ProductInfo.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Properties.js b/src/model/Properties.js index 00e679c..2c202fd 100644 --- a/src/model/Properties.js +++ b/src/model/Properties.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/Rating.js b/src/model/Rating.js new file mode 100644 index 0000000..9d2e749 --- /dev/null +++ b/src/model/Rating.js @@ -0,0 +1,87 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.Rating = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The Rating model module. + * @module model/Rating + * @version 1.0.0 + */ + + /** + * Constructs a new Rating. + * @alias module:model/Rating + * @class + */ + var exports = function() { + var _this = this; + + + }; + + /** + * Constructs a Rating from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Rating} obj Optional instance to populate. + * @return {module:model/Rating} The populated Rating instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('Value')) { + obj['Value'] = ApiClient.convertToType(data['Value'], 'Number'); + } + } + return obj; + } + + /** + * @member {Number} Value + */ + exports.prototype['Value'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/Refinement.js b/src/model/Refinement.js index 6f303d1..6e565ef 100644 --- a/src/model/Refinement.js +++ b/src/model/Refinement.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/RefinementBin.js b/src/model/RefinementBin.js index e375f28..9f48250 100644 --- a/src/model/RefinementBin.js +++ b/src/model/RefinementBin.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/RentalOfferListing.js b/src/model/RentalOfferListing.js index c67e774..662a70d 100644 --- a/src/model/RentalOfferListing.js +++ b/src/model/RentalOfferListing.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/RentalOffers.js b/src/model/RentalOffers.js index b58f997..cf3bf02 100644 --- a/src/model/RentalOffers.js +++ b/src/model/RentalOffers.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/SavingBasisType.js b/src/model/SavingBasisType.js new file mode 100644 index 0000000..4bbfa3d --- /dev/null +++ b/src/model/SavingBasisType.js @@ -0,0 +1,79 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.SavingBasisType = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + /** + * Enum class SavingBasisType. + * @enum {} + * @readonly + */ + var exports = { + /** + * value: "LIST_PRICE" + * @const + */ + "LIST_PRICE": "LIST_PRICE", + /** + * value: "LOWEST_PRICE" + * @const + */ + "LOWEST_PRICE": "LOWEST_PRICE", + /** + * value: "LOWEST_PRICE_STRIKETHROUGH" + * @const + */ + "LOWEST_PRICE_STRIKETHROUGH": "LOWEST_PRICE_STRIKETHROUGH", + /** + * value: "WAS_PRICE" + * @const + */ + "WAS_PRICE": "WAS_PRICE" }; + + /** + * Returns a SavingBasisType enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/SavingBasisType} The enum SavingBasisType value. + */ + exports.constructFromObject = function(object) { + return object; + } + + return exports; +})); + + diff --git a/src/model/SearchIndex.js b/src/model/SearchIndex.js new file mode 100644 index 0000000..65bf786 --- /dev/null +++ b/src/model/SearchIndex.js @@ -0,0 +1,75 @@ +/** + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.ProductAdvertisingAPIv1) { + root.ProductAdvertisingAPIv1 = {}; + } + root.ProductAdvertisingAPIv1.SearchIndex = factory(root.ProductAdvertisingAPIv1.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The SearchIndex model module. + * @module model/SearchIndex + * @version 1.0.0 + */ + + /** + * Constructs a new SearchIndex. + * @alias module:model/SearchIndex + * @class + */ + var exports = function() { + var _this = this; + + }; + + /** + * Constructs a SearchIndex from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/SearchIndex} obj Optional instance to populate. + * @return {module:model/SearchIndex} The populated SearchIndex instance. + */ + exports.constructFromObject = function(data, obj) { + return data; + } + + + + + return exports; +})); + + diff --git a/src/model/SearchItemsRequest.js b/src/model/SearchItemsRequest.js index 67e6197..db4d24b 100644 --- a/src/model/SearchItemsRequest.js +++ b/src/model/SearchItemsRequest.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/SearchItemsResource.js b/src/model/SearchItemsResource.js index 2bba2dd..9007534 100644 --- a/src/model/SearchItemsResource.js +++ b/src/model/SearchItemsResource.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -63,6 +63,16 @@ * @const */ "BrowseNodeInfo.WebsiteSalesRank": "BrowseNodeInfo.WebsiteSalesRank", + /** + * value: "CustomerReviews.Count" + * @const + */ + "CustomerReviews.Count": "CustomerReviews.Count", + /** + * value: "CustomerReviews.StarRating" + * @const + */ + "CustomerReviews.StarRating": "CustomerReviews.StarRating", /** * value: "Images.Primary.Small" * @const @@ -173,6 +183,11 @@ * @const */ "Offers.Listings.Condition": "Offers.Listings.Condition", + /** + * value: "Offers.Listings.Condition.ConditionNote" + * @const + */ + "Offers.Listings.Condition.ConditionNote": "Offers.Listings.Condition.ConditionNote", /** * value: "Offers.Listings.Condition.SubCondition" * @const @@ -288,6 +303,11 @@ * @const */ "RentalOffers.Listings.Condition": "RentalOffers.Listings.Condition", + /** + * value: "RentalOffers.Listings.Condition.ConditionNote" + * @const + */ + "RentalOffers.Listings.Condition.ConditionNote": "RentalOffers.Listings.Condition.ConditionNote", /** * value: "RentalOffers.Listings.Condition.SubCondition" * @const diff --git a/src/model/SearchItemsResponse.js b/src/model/SearchItemsResponse.js index c3c5b5e..156b76a 100644 --- a/src/model/SearchItemsResponse.js +++ b/src/model/SearchItemsResponse.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/SearchRefinements.js b/src/model/SearchRefinements.js index 8f55de3..b4cb1cc 100644 --- a/src/model/SearchRefinements.js +++ b/src/model/SearchRefinements.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/SearchResult.js b/src/model/SearchResult.js index 818954f..5eaeea9 100644 --- a/src/model/SearchResult.js +++ b/src/model/SearchResult.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/SingleBooleanValuedAttribute.js b/src/model/SingleBooleanValuedAttribute.js index 686e1d3..9340366 100644 --- a/src/model/SingleBooleanValuedAttribute.js +++ b/src/model/SingleBooleanValuedAttribute.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/SingleIntegerValuedAttribute.js b/src/model/SingleIntegerValuedAttribute.js index 7fffbb1..7c8f58f 100644 --- a/src/model/SingleIntegerValuedAttribute.js +++ b/src/model/SingleIntegerValuedAttribute.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/SingleStringValuedAttribute.js b/src/model/SingleStringValuedAttribute.js index 47845cf..f852c8f 100644 --- a/src/model/SingleStringValuedAttribute.js +++ b/src/model/SingleStringValuedAttribute.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/SortBy.js b/src/model/SortBy.js index d314420..50050fd 100644 --- a/src/model/SortBy.js +++ b/src/model/SortBy.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/TechnicalInfo.js b/src/model/TechnicalInfo.js index 1d04940..0c3132e 100644 --- a/src/model/TechnicalInfo.js +++ b/src/model/TechnicalInfo.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * @@ -22,18 +22,18 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient', 'model/MultiValuedAttribute'], factory); + define(['ApiClient', 'model/MultiValuedAttribute', 'model/SingleStringValuedAttribute'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('./MultiValuedAttribute')); + module.exports = factory(require('../ApiClient'), require('./MultiValuedAttribute'), require('./SingleStringValuedAttribute')); } else { // Browser globals (root is window) if (!root.ProductAdvertisingAPIv1) { root.ProductAdvertisingAPIv1 = {}; } - root.ProductAdvertisingAPIv1.TechnicalInfo = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.MultiValuedAttribute); + root.ProductAdvertisingAPIv1.TechnicalInfo = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.MultiValuedAttribute, root.ProductAdvertisingAPIv1.SingleStringValuedAttribute); } -}(this, function(ApiClient, MultiValuedAttribute) { +}(this, function(ApiClient, MultiValuedAttribute, SingleStringValuedAttribute) { 'use strict'; @@ -54,6 +54,7 @@ var _this = this; + }; /** @@ -67,6 +68,9 @@ if (data) { obj = obj || new exports(); + if (data.hasOwnProperty('EnergyEfficiencyClass')) { + obj['EnergyEfficiencyClass'] = SingleStringValuedAttribute.constructFromObject(data['EnergyEfficiencyClass']); + } if (data.hasOwnProperty('Formats')) { obj['Formats'] = MultiValuedAttribute.constructFromObject(data['Formats']); } @@ -74,6 +78,10 @@ return obj; } + /** + * @member {module:model/SingleStringValuedAttribute} EnergyEfficiencyClass + */ + exports.prototype['EnergyEfficiencyClass'] = undefined; /** * @member {module:model/MultiValuedAttribute} Formats */ diff --git a/src/model/TradeInInfo.js b/src/model/TradeInInfo.js index 3833357..bf7de89 100644 --- a/src/model/TradeInInfo.js +++ b/src/model/TradeInInfo.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/TradeInPrice.js b/src/model/TradeInPrice.js index 26625bf..83f5c36 100644 --- a/src/model/TradeInPrice.js +++ b/src/model/TradeInPrice.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/UnitBasedAttribute.js b/src/model/UnitBasedAttribute.js index 15603aa..51095f0 100644 --- a/src/model/UnitBasedAttribute.js +++ b/src/model/UnitBasedAttribute.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/VariationAttribute.js b/src/model/VariationAttribute.js index 669a6ba..2108b3a 100644 --- a/src/model/VariationAttribute.js +++ b/src/model/VariationAttribute.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/VariationDimension.js b/src/model/VariationDimension.js index 76635e1..bbd7fc2 100644 --- a/src/model/VariationDimension.js +++ b/src/model/VariationDimension.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/VariationSummary.js b/src/model/VariationSummary.js index 8cb2498..5276214 100644 --- a/src/model/VariationSummary.js +++ b/src/model/VariationSummary.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/VariationsResult.js b/src/model/VariationsResult.js index 9116692..c962e0a 100644 --- a/src/model/VariationsResult.js +++ b/src/model/VariationsResult.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html * diff --git a/src/model/WebsiteSalesRank.js b/src/model/WebsiteSalesRank.js index bc9284b..288189d 100644 --- a/src/model/WebsiteSalesRank.js +++ b/src/model/WebsiteSalesRank.js @@ -1,5 +1,5 @@ /** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -/** + /** * ProductAdvertisingAPI * https://webservices.amazon.com/paapi5/documentation/index.html *