amazon-creators-api 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +202 -0
- package/README.md +102 -0
- package/dist/ApiClient.d.ts +273 -0
- package/dist/ApiClient.js +895 -0
- package/dist/api/DefaultApi.d.ts +124 -0
- package/dist/api/DefaultApi.js +409 -0
- package/dist/api/TypedDefaultApi.d.ts +132 -0
- package/dist/api/TypedDefaultApi.js +223 -0
- package/dist/auth/OAuth2Config.d.ts +78 -0
- package/dist/auth/OAuth2Config.js +152 -0
- package/dist/auth/OAuth2TokenManager.d.ts +38 -0
- package/dist/auth/OAuth2TokenManager.js +177 -0
- package/dist/index.d.ts +94 -0
- package/dist/index.js +657 -0
- package/dist/model/AccessDeniedExceptionResponseContent.d.ts +42 -0
- package/dist/model/AccessDeniedExceptionResponseContent.js +139 -0
- package/dist/model/AccessDeniedReason.d.ts +32 -0
- package/dist/model/AccessDeniedReason.js +65 -0
- package/dist/model/Availability.d.ts +27 -0
- package/dist/model/Availability.js +60 -0
- package/dist/model/BrowseNode.d.ts +35 -0
- package/dist/model/BrowseNode.js +184 -0
- package/dist/model/BrowseNodeAncestor.d.ts +32 -0
- package/dist/model/BrowseNodeAncestor.js +129 -0
- package/dist/model/BrowseNodeChild.d.ts +31 -0
- package/dist/model/BrowseNodeChild.js +116 -0
- package/dist/model/BrowseNodeInfo.d.ts +30 -0
- package/dist/model/BrowseNodeInfo.js +128 -0
- package/dist/model/BrowseNodesResult.d.ts +29 -0
- package/dist/model/BrowseNodesResult.js +114 -0
- package/dist/model/ByLineInfo.d.ts +31 -0
- package/dist/model/ByLineInfo.js +141 -0
- package/dist/model/Classifications.d.ts +30 -0
- package/dist/model/Classifications.js +107 -0
- package/dist/model/Condition.d.ts +27 -0
- package/dist/model/Condition.js +60 -0
- package/dist/model/ContentInfo.d.ts +32 -0
- package/dist/model/ContentInfo.js +135 -0
- package/dist/model/ContentRating.d.ts +29 -0
- package/dist/model/ContentRating.js +94 -0
- package/dist/model/Contributor.d.ts +32 -0
- package/dist/model/Contributor.js +128 -0
- package/dist/model/CustomerReviews.d.ts +30 -0
- package/dist/model/CustomerReviews.js +102 -0
- package/dist/model/DealDetails.d.ts +34 -0
- package/dist/model/DealDetails.js +144 -0
- package/dist/model/DeliveryFlag.d.ts +37 -0
- package/dist/model/DeliveryFlag.js +70 -0
- package/dist/model/DimensionBasedAttribute.d.ts +32 -0
- package/dist/model/DimensionBasedAttribute.js +133 -0
- package/dist/model/ErrorData.d.ts +41 -0
- package/dist/model/ErrorData.js +131 -0
- package/dist/model/ExternalIds.d.ts +31 -0
- package/dist/model/ExternalIds.js +120 -0
- package/dist/model/Feed.d.ts +44 -0
- package/dist/model/Feed.js +152 -0
- package/dist/model/GetBrowseNodesRequestContent.d.ts +43 -0
- package/dist/model/GetBrowseNodesRequestContent.js +158 -0
- package/dist/model/GetBrowseNodesResource.d.ts +27 -0
- package/dist/model/GetBrowseNodesResource.js +60 -0
- package/dist/model/GetBrowseNodesResponseContent.d.ts +30 -0
- package/dist/model/GetBrowseNodesResponseContent.js +128 -0
- package/dist/model/GetFeedRequestContent.d.ts +38 -0
- package/dist/model/GetFeedRequestContent.js +114 -0
- package/dist/model/GetFeedResponseContent.d.ts +38 -0
- package/dist/model/GetFeedResponseContent.js +114 -0
- package/dist/model/GetItemsRequestContent.d.ts +45 -0
- package/dist/model/GetItemsRequestContent.js +188 -0
- package/dist/model/GetItemsResource.d.ts +187 -0
- package/dist/model/GetItemsResource.js +220 -0
- package/dist/model/GetItemsResponseContent.d.ts +30 -0
- package/dist/model/GetItemsResponseContent.js +128 -0
- package/dist/model/GetReportRequestContent.d.ts +38 -0
- package/dist/model/GetReportRequestContent.js +114 -0
- package/dist/model/GetReportResponseContent.d.ts +38 -0
- package/dist/model/GetReportResponseContent.js +114 -0
- package/dist/model/GetVariationsRequestContent.d.ts +48 -0
- package/dist/model/GetVariationsRequestContent.js +209 -0
- package/dist/model/GetVariationsResource.d.ts +202 -0
- package/dist/model/GetVariationsResource.js +235 -0
- package/dist/model/GetVariationsResponseContent.d.ts +30 -0
- package/dist/model/GetVariationsResponseContent.js +128 -0
- package/dist/model/ImageSize.d.ts +31 -0
- package/dist/model/ImageSize.js +108 -0
- package/dist/model/ImageType.d.ts +32 -0
- package/dist/model/ImageType.js +133 -0
- package/dist/model/Images.d.ts +30 -0
- package/dist/model/Images.js +127 -0
- package/dist/model/InternalServerExceptionResponseContent.d.ts +40 -0
- package/dist/model/InternalServerExceptionResponseContent.js +128 -0
- package/dist/model/Item.d.ts +38 -0
- package/dist/model/Item.js +228 -0
- package/dist/model/ItemInfo.d.ts +39 -0
- package/dist/model/ItemInfo.js +234 -0
- package/dist/model/ItemsResult.d.ts +29 -0
- package/dist/model/ItemsResult.js +114 -0
- package/dist/model/LanguageType.d.ts +30 -0
- package/dist/model/LanguageType.js +104 -0
- package/dist/model/Languages.d.ts +31 -0
- package/dist/model/Languages.js +138 -0
- package/dist/model/ListFeedsResponseContent.d.ts +29 -0
- package/dist/model/ListFeedsResponseContent.js +112 -0
- package/dist/model/ListReportsResponseContent.d.ts +38 -0
- package/dist/model/ListReportsResponseContent.js +132 -0
- package/dist/model/ManufactureInfo.d.ts +31 -0
- package/dist/model/ManufactureInfo.js +120 -0
- package/dist/model/Money.d.ts +31 -0
- package/dist/model/Money.js +112 -0
- package/dist/model/MultiValuedAttribute.d.ts +31 -0
- package/dist/model/MultiValuedAttribute.js +117 -0
- package/dist/model/OfferAvailabilityV2.d.ts +32 -0
- package/dist/model/OfferAvailabilityV2.js +120 -0
- package/dist/model/OfferConditionV2.d.ts +31 -0
- package/dist/model/OfferConditionV2.js +116 -0
- package/dist/model/OfferListingV2.d.ts +37 -0
- package/dist/model/OfferListingV2.js +189 -0
- package/dist/model/OfferLoyaltyPointsV2.d.ts +29 -0
- package/dist/model/OfferLoyaltyPointsV2.js +88 -0
- package/dist/model/OfferMerchantInfoV2.d.ts +30 -0
- package/dist/model/OfferMerchantInfoV2.js +104 -0
- package/dist/model/OfferPriceV2.d.ts +32 -0
- package/dist/model/OfferPriceV2.js +135 -0
- package/dist/model/OfferSavingBasis.d.ts +31 -0
- package/dist/model/OfferSavingBasis.js +115 -0
- package/dist/model/OfferSavings.d.ts +30 -0
- package/dist/model/OfferSavings.js +102 -0
- package/dist/model/OfferType.d.ts +32 -0
- package/dist/model/OfferType.js +65 -0
- package/dist/model/OffersV2.d.ts +29 -0
- package/dist/model/OffersV2.js +114 -0
- package/dist/model/ProductInfo.d.ts +34 -0
- package/dist/model/ProductInfo.js +162 -0
- package/dist/model/Rating.d.ts +29 -0
- package/dist/model/Rating.js +88 -0
- package/dist/model/Refinement.d.ts +31 -0
- package/dist/model/Refinement.js +138 -0
- package/dist/model/RefinementBin.d.ts +30 -0
- package/dist/model/RefinementBin.js +104 -0
- package/dist/model/ReportMetadata.d.ts +44 -0
- package/dist/model/ReportMetadata.js +152 -0
- package/dist/model/ResourceNotFoundExceptionResponseContent.d.ts +44 -0
- package/dist/model/ResourceNotFoundExceptionResponseContent.js +156 -0
- package/dist/model/SavingBasisType.d.ts +37 -0
- package/dist/model/SavingBasisType.js +70 -0
- package/dist/model/SearchItemsRequestContent.d.ts +51 -0
- package/dist/model/SearchItemsRequestContent.js +343 -0
- package/dist/model/SearchItemsResource.d.ts +192 -0
- package/dist/model/SearchItemsResource.js +225 -0
- package/dist/model/SearchItemsResponseContent.d.ts +30 -0
- package/dist/model/SearchItemsResponseContent.js +128 -0
- package/dist/model/SearchRefinements.d.ts +31 -0
- package/dist/model/SearchRefinements.js +140 -0
- package/dist/model/SearchResult.d.ts +32 -0
- package/dist/model/SearchResult.js +148 -0
- package/dist/model/SingleBooleanValuedAttribute.d.ts +31 -0
- package/dist/model/SingleBooleanValuedAttribute.js +112 -0
- package/dist/model/SingleIntegerValuedAttribute.d.ts +31 -0
- package/dist/model/SingleIntegerValuedAttribute.js +112 -0
- package/dist/model/SingleStringValuedAttribute.d.ts +31 -0
- package/dist/model/SingleStringValuedAttribute.js +116 -0
- package/dist/model/SortBy.d.ts +47 -0
- package/dist/model/SortBy.js +80 -0
- package/dist/model/TechnicalInfo.d.ts +30 -0
- package/dist/model/TechnicalInfo.js +108 -0
- package/dist/model/ThrottleExceptionResponseContent.d.ts +42 -0
- package/dist/model/ThrottleExceptionResponseContent.js +152 -0
- package/dist/model/TradeInInfo.d.ts +30 -0
- package/dist/model/TradeInInfo.js +102 -0
- package/dist/model/TradeInPrice.d.ts +31 -0
- package/dist/model/TradeInPrice.js +112 -0
- package/dist/model/UnauthorizedExceptionReason.d.ts +62 -0
- package/dist/model/UnauthorizedExceptionReason.js +95 -0
- package/dist/model/UnauthorizedExceptionResponseContent.d.ts +41 -0
- package/dist/model/UnauthorizedExceptionResponseContent.js +137 -0
- package/dist/model/UnitBasedAttribute.d.ts +32 -0
- package/dist/model/UnitBasedAttribute.js +124 -0
- package/dist/model/ValidationExceptionField.d.ts +41 -0
- package/dist/model/ValidationExceptionField.js +129 -0
- package/dist/model/ValidationExceptionReason.d.ts +47 -0
- package/dist/model/ValidationExceptionReason.js +80 -0
- package/dist/model/ValidationExceptionResponseContent.d.ts +43 -0
- package/dist/model/ValidationExceptionResponseContent.js +170 -0
- package/dist/model/VariationAttribute.d.ts +30 -0
- package/dist/model/VariationAttribute.js +104 -0
- package/dist/model/VariationDimension.d.ts +32 -0
- package/dist/model/VariationDimension.js +132 -0
- package/dist/model/VariationSummary.d.ts +32 -0
- package/dist/model/VariationSummary.js +146 -0
- package/dist/model/VariationSummaryPrice.d.ts +30 -0
- package/dist/model/VariationSummaryPrice.js +107 -0
- package/dist/model/VariationsResult.d.ts +30 -0
- package/dist/model/VariationsResult.js +128 -0
- package/dist/model/WebsiteSalesRank.d.ts +32 -0
- package/dist/model/WebsiteSalesRank.js +124 -0
- package/package.json +67 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _Money = _interopRequireDefault(require("./Money"));
|
|
9
|
+
var _OfferSavingBasis = _interopRequireDefault(require("./OfferSavingBasis"));
|
|
10
|
+
var _OfferSavings = _interopRequireDefault(require("./OfferSavings"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
+
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
19
|
+
*
|
|
20
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
21
|
+
* You may not use this file except in compliance with the License.
|
|
22
|
+
* A copy of the License is located at
|
|
23
|
+
*
|
|
24
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
*
|
|
26
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
27
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
28
|
+
* express or implied. See the License for the specific language governing
|
|
29
|
+
* permissions and limitations under the License.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The OfferPriceV2 model module.
|
|
33
|
+
* @module model/OfferPriceV2
|
|
34
|
+
* @version 1.0.0
|
|
35
|
+
*/
|
|
36
|
+
var OfferPriceV2 = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>OfferPriceV2</code>.
|
|
39
|
+
* Specifies buying price of an offer.
|
|
40
|
+
* @alias module:model/OfferPriceV2
|
|
41
|
+
*/
|
|
42
|
+
function OfferPriceV2() {
|
|
43
|
+
_classCallCheck(this, OfferPriceV2);
|
|
44
|
+
OfferPriceV2.initialize(this);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initializes the fields of this object.
|
|
49
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
50
|
+
* Only for internal use.
|
|
51
|
+
*/
|
|
52
|
+
return _createClass(OfferPriceV2, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj) {}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>OfferPriceV2</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
+
* @param {module:model/OfferPriceV2} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/OfferPriceV2} The populated <code>OfferPriceV2</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new OfferPriceV2();
|
|
68
|
+
if (data.hasOwnProperty('money')) {
|
|
69
|
+
obj['money'] = _Money["default"].constructFromObject(data['money']);
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('pricePerUnit')) {
|
|
72
|
+
obj['pricePerUnit'] = _Money["default"].constructFromObject(data['pricePerUnit']);
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('savings')) {
|
|
75
|
+
obj['savings'] = _OfferSavings["default"].constructFromObject(data['savings']);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('savingBasis')) {
|
|
78
|
+
obj['savingBasis'] = _OfferSavingBasis["default"].constructFromObject(data['savingBasis']);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return obj;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Validates the JSON data with respect to <code>OfferPriceV2</code>.
|
|
86
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
87
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>OfferPriceV2</code>.
|
|
88
|
+
*/
|
|
89
|
+
}, {
|
|
90
|
+
key: "validateJSON",
|
|
91
|
+
value: function validateJSON(data) {
|
|
92
|
+
// validate the optional field `money`
|
|
93
|
+
if (data['money']) {
|
|
94
|
+
// data not null
|
|
95
|
+
_Money["default"].validateJSON(data['money']);
|
|
96
|
+
}
|
|
97
|
+
// validate the optional field `pricePerUnit`
|
|
98
|
+
if (data['pricePerUnit']) {
|
|
99
|
+
// data not null
|
|
100
|
+
_Money["default"].validateJSON(data['pricePerUnit']);
|
|
101
|
+
}
|
|
102
|
+
// validate the optional field `savings`
|
|
103
|
+
if (data['savings']) {
|
|
104
|
+
// data not null
|
|
105
|
+
_OfferSavings["default"].validateJSON(data['savings']);
|
|
106
|
+
}
|
|
107
|
+
// validate the optional field `savingBasis`
|
|
108
|
+
if (data['savingBasis']) {
|
|
109
|
+
// data not null
|
|
110
|
+
_OfferSavingBasis["default"].validateJSON(data['savingBasis']);
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
}]);
|
|
115
|
+
}();
|
|
116
|
+
/**
|
|
117
|
+
* @member {module:model/Money} money
|
|
118
|
+
*/
|
|
119
|
+
OfferPriceV2.prototype['money'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @member {module:model/Money} pricePerUnit
|
|
123
|
+
*/
|
|
124
|
+
OfferPriceV2.prototype['pricePerUnit'] = undefined;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @member {module:model/OfferSavings} savings
|
|
128
|
+
*/
|
|
129
|
+
OfferPriceV2.prototype['savings'] = undefined;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @member {module:model/OfferSavingBasis} savingBasis
|
|
133
|
+
*/
|
|
134
|
+
OfferPriceV2.prototype['savingBasis'] = undefined;
|
|
135
|
+
var _default = exports["default"] = OfferPriceV2;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export default OfferSavingBasis;
|
|
2
|
+
/**
|
|
3
|
+
* The OfferSavingBasis model module.
|
|
4
|
+
* @module model/OfferSavingBasis
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class OfferSavingBasis {
|
|
8
|
+
/**
|
|
9
|
+
* Initializes the fields of this object.
|
|
10
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
11
|
+
* Only for internal use.
|
|
12
|
+
*/
|
|
13
|
+
static initialize(obj: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a <code>OfferSavingBasis</code> from a plain JavaScript object, optionally creating a new instance.
|
|
16
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
17
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
18
|
+
* @param {module:model/OfferSavingBasis} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/OfferSavingBasis} The populated <code>OfferSavingBasis</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): OfferSavingBasis;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>OfferSavingBasis</code>.
|
|
24
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
25
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>OfferSavingBasis</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
money: import('./Money').default;
|
|
29
|
+
savingBasisType: import('./SavingBasisType').default;
|
|
30
|
+
savingBasisTypeLabel: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _Money = _interopRequireDefault(require("./Money"));
|
|
9
|
+
var _SavingBasisType = _interopRequireDefault(require("./SavingBasisType"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
17
|
+
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
18
|
+
*
|
|
19
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
20
|
+
* You may not use this file except in compliance with the License.
|
|
21
|
+
* A copy of the License is located at
|
|
22
|
+
*
|
|
23
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
24
|
+
*
|
|
25
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
26
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
27
|
+
* express or implied. See the License for the specific language governing
|
|
28
|
+
* permissions and limitations under the License.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The OfferSavingBasis model module.
|
|
32
|
+
* @module model/OfferSavingBasis
|
|
33
|
+
* @version 1.0.0
|
|
34
|
+
*/
|
|
35
|
+
var OfferSavingBasis = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>OfferSavingBasis</code>.
|
|
38
|
+
* Specifies Saving Basis of an offer
|
|
39
|
+
* @alias module:model/OfferSavingBasis
|
|
40
|
+
*/
|
|
41
|
+
function OfferSavingBasis() {
|
|
42
|
+
_classCallCheck(this, OfferSavingBasis);
|
|
43
|
+
OfferSavingBasis.initialize(this);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(OfferSavingBasis, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj) {}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>OfferSavingBasis</code> from a plain JavaScript object, optionally creating a new instance.
|
|
57
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
58
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
59
|
+
* @param {module:model/OfferSavingBasis} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/OfferSavingBasis} The populated <code>OfferSavingBasis</code> instance.
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "constructFromObject",
|
|
64
|
+
value: function constructFromObject(data, obj) {
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new OfferSavingBasis();
|
|
67
|
+
if (data.hasOwnProperty('money')) {
|
|
68
|
+
obj['money'] = _Money["default"].constructFromObject(data['money']);
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('savingBasisType')) {
|
|
71
|
+
obj['savingBasisType'] = _SavingBasisType["default"].constructFromObject(data['savingBasisType']);
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('savingBasisTypeLabel')) {
|
|
74
|
+
obj['savingBasisTypeLabel'] = _ApiClient["default"].convertToType(data['savingBasisTypeLabel'], 'String');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return obj;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Validates the JSON data with respect to <code>OfferSavingBasis</code>.
|
|
82
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
83
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>OfferSavingBasis</code>.
|
|
84
|
+
*/
|
|
85
|
+
}, {
|
|
86
|
+
key: "validateJSON",
|
|
87
|
+
value: function validateJSON(data) {
|
|
88
|
+
// validate the optional field `money`
|
|
89
|
+
if (data['money']) {
|
|
90
|
+
// data not null
|
|
91
|
+
_Money["default"].validateJSON(data['money']);
|
|
92
|
+
}
|
|
93
|
+
// ensure the json data is a string
|
|
94
|
+
if (data['savingBasisTypeLabel'] && !(typeof data['savingBasisTypeLabel'] === 'string' || data['savingBasisTypeLabel'] instanceof String)) {
|
|
95
|
+
throw new Error("Expected the field `savingBasisTypeLabel` to be a primitive type in the JSON string but got " + data['savingBasisTypeLabel']);
|
|
96
|
+
}
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
}]);
|
|
100
|
+
}();
|
|
101
|
+
/**
|
|
102
|
+
* @member {module:model/Money} money
|
|
103
|
+
*/
|
|
104
|
+
OfferSavingBasis.prototype['money'] = undefined;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @member {module:model/SavingBasisType} savingBasisType
|
|
108
|
+
*/
|
|
109
|
+
OfferSavingBasis.prototype['savingBasisType'] = undefined;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @member {String} savingBasisTypeLabel
|
|
113
|
+
*/
|
|
114
|
+
OfferSavingBasis.prototype['savingBasisTypeLabel'] = undefined;
|
|
115
|
+
var _default = exports["default"] = OfferSavingBasis;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default OfferSavings;
|
|
2
|
+
/**
|
|
3
|
+
* The OfferSavings model module.
|
|
4
|
+
* @module model/OfferSavings
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class OfferSavings {
|
|
8
|
+
/**
|
|
9
|
+
* Initializes the fields of this object.
|
|
10
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
11
|
+
* Only for internal use.
|
|
12
|
+
*/
|
|
13
|
+
static initialize(obj: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a <code>OfferSavings</code> from a plain JavaScript object, optionally creating a new instance.
|
|
16
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
17
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
18
|
+
* @param {module:model/OfferSavings} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/OfferSavings} The populated <code>OfferSavings</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): OfferSavings;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>OfferSavings</code>.
|
|
24
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
25
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>OfferSavings</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
money: import('./Money').default;
|
|
29
|
+
percentage: number;
|
|
30
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _Money = _interopRequireDefault(require("./Money"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
|
+
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
17
|
+
*
|
|
18
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
19
|
+
* You may not use this file except in compliance with the License.
|
|
20
|
+
* A copy of the License is located at
|
|
21
|
+
*
|
|
22
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
25
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
26
|
+
* express or implied. See the License for the specific language governing
|
|
27
|
+
* permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The OfferSavings model module.
|
|
31
|
+
* @module model/OfferSavings
|
|
32
|
+
* @version 1.0.0
|
|
33
|
+
*/
|
|
34
|
+
var OfferSavings = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>OfferSavings</code>.
|
|
37
|
+
* Specifies savings on an offer. This is calculated by taking reference as saving basis price.
|
|
38
|
+
* @alias module:model/OfferSavings
|
|
39
|
+
*/
|
|
40
|
+
function OfferSavings() {
|
|
41
|
+
_classCallCheck(this, OfferSavings);
|
|
42
|
+
OfferSavings.initialize(this);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(OfferSavings, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj) {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Constructs a <code>OfferSavings</code> from a plain JavaScript object, optionally creating a new instance.
|
|
56
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
57
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
58
|
+
* @param {module:model/OfferSavings} obj Optional instance to populate.
|
|
59
|
+
* @return {module:model/OfferSavings} The populated <code>OfferSavings</code> instance.
|
|
60
|
+
*/
|
|
61
|
+
}, {
|
|
62
|
+
key: "constructFromObject",
|
|
63
|
+
value: function constructFromObject(data, obj) {
|
|
64
|
+
if (data) {
|
|
65
|
+
obj = obj || new OfferSavings();
|
|
66
|
+
if (data.hasOwnProperty('money')) {
|
|
67
|
+
obj['money'] = _Money["default"].constructFromObject(data['money']);
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('percentage')) {
|
|
70
|
+
obj['percentage'] = _ApiClient["default"].convertToType(data['percentage'], 'Number');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>OfferSavings</code>.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>OfferSavings</code>.
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "validateJSON",
|
|
83
|
+
value: function validateJSON(data) {
|
|
84
|
+
// validate the optional field `money`
|
|
85
|
+
if (data['money']) {
|
|
86
|
+
// data not null
|
|
87
|
+
_Money["default"].validateJSON(data['money']);
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
}]);
|
|
92
|
+
}();
|
|
93
|
+
/**
|
|
94
|
+
* @member {module:model/Money} money
|
|
95
|
+
*/
|
|
96
|
+
OfferSavings.prototype['money'] = undefined;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @member {Number} percentage
|
|
100
|
+
*/
|
|
101
|
+
OfferSavings.prototype['percentage'] = undefined;
|
|
102
|
+
var _default = exports["default"] = OfferSavings;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum class OfferType.
|
|
3
|
+
* @enum {}
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
export default class OfferType {
|
|
7
|
+
/**
|
|
8
|
+
* Returns a <code>OfferType</code> enum value from a Javascript object name.
|
|
9
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
10
|
+
* @return {module:model/OfferType} The enum <code>OfferType</code> value.
|
|
11
|
+
*/
|
|
12
|
+
static constructFromObject(object: any): OfferType;
|
|
13
|
+
/**
|
|
14
|
+
* value: "HAUL"
|
|
15
|
+
* @const
|
|
16
|
+
*/
|
|
17
|
+
HAUL: 'HAUL';
|
|
18
|
+
/**
|
|
19
|
+
* value: "SUBSCRIBE_AND_SAVE"
|
|
20
|
+
* @const
|
|
21
|
+
*/
|
|
22
|
+
SUBSCRIBE_AND_SAVE: 'SUBSCRIBE_AND_SAVE';
|
|
23
|
+
/**
|
|
24
|
+
* value: "LIGHTNING_DEAL"
|
|
25
|
+
* @const
|
|
26
|
+
*/
|
|
27
|
+
LIGHTNING_DEAL: 'LIGHTNING_DEAL';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* *
|
|
31
|
+
*/
|
|
32
|
+
export type OfferType = 'HAUL' | 'SUBSCRIBE_AND_SAVE' | 'LIGHTNING_DEAL';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
|
+
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
17
|
+
*
|
|
18
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
19
|
+
* You may not use this file except in compliance with the License.
|
|
20
|
+
* A copy of the License is located at
|
|
21
|
+
*
|
|
22
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
25
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
26
|
+
* express or implied. See the License for the specific language governing
|
|
27
|
+
* permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Enum class OfferType.
|
|
31
|
+
* @enum {}
|
|
32
|
+
* @readonly
|
|
33
|
+
*/
|
|
34
|
+
var OfferType = exports["default"] = /*#__PURE__*/function () {
|
|
35
|
+
function OfferType() {
|
|
36
|
+
_classCallCheck(this, OfferType);
|
|
37
|
+
/**
|
|
38
|
+
* value: "HAUL"
|
|
39
|
+
* @const
|
|
40
|
+
*/
|
|
41
|
+
_defineProperty(this, "HAUL", "HAUL");
|
|
42
|
+
/**
|
|
43
|
+
* value: "SUBSCRIBE_AND_SAVE"
|
|
44
|
+
* @const
|
|
45
|
+
*/
|
|
46
|
+
_defineProperty(this, "SUBSCRIBE_AND_SAVE", "SUBSCRIBE_AND_SAVE");
|
|
47
|
+
/**
|
|
48
|
+
* value: "LIGHTNING_DEAL"
|
|
49
|
+
* @const
|
|
50
|
+
*/
|
|
51
|
+
_defineProperty(this, "LIGHTNING_DEAL", "LIGHTNING_DEAL");
|
|
52
|
+
}
|
|
53
|
+
return _createClass(OfferType, null, [{
|
|
54
|
+
key: "constructFromObject",
|
|
55
|
+
value:
|
|
56
|
+
/**
|
|
57
|
+
* Returns a <code>OfferType</code> enum value from a Javascript object name.
|
|
58
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
59
|
+
* @return {module:model/OfferType} The enum <code>OfferType</code> value.
|
|
60
|
+
*/
|
|
61
|
+
function constructFromObject(object) {
|
|
62
|
+
return object;
|
|
63
|
+
}
|
|
64
|
+
}]);
|
|
65
|
+
}();
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export default OffersV2;
|
|
2
|
+
/**
|
|
3
|
+
* The OffersV2 model module.
|
|
4
|
+
* @module model/OffersV2
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class OffersV2 {
|
|
8
|
+
/**
|
|
9
|
+
* Initializes the fields of this object.
|
|
10
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
11
|
+
* Only for internal use.
|
|
12
|
+
*/
|
|
13
|
+
static initialize(obj: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a <code>OffersV2</code> from a plain JavaScript object, optionally creating a new instance.
|
|
16
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
17
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
18
|
+
* @param {module:model/OffersV2} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/OffersV2} The populated <code>OffersV2</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): OffersV2;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>OffersV2</code>.
|
|
24
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
25
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>OffersV2</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
listings: import('./OfferListingV2').default[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _OfferListingV = _interopRequireDefault(require("./OfferListingV2"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
|
+
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
20
|
+
*
|
|
21
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
22
|
+
* You may not use this file except in compliance with the License.
|
|
23
|
+
* A copy of the License is located at
|
|
24
|
+
*
|
|
25
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
26
|
+
*
|
|
27
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
28
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
29
|
+
* express or implied. See the License for the specific language governing
|
|
30
|
+
* permissions and limitations under the License.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* The OffersV2 model module.
|
|
34
|
+
* @module model/OffersV2
|
|
35
|
+
* @version 1.0.0
|
|
36
|
+
*/
|
|
37
|
+
var OffersV2 = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new <code>OffersV2</code>.
|
|
40
|
+
* The Offers resource contains various resources related to offer listings and summaries for an item.
|
|
41
|
+
* @alias module:model/OffersV2
|
|
42
|
+
*/
|
|
43
|
+
function OffersV2() {
|
|
44
|
+
_classCallCheck(this, OffersV2);
|
|
45
|
+
OffersV2.initialize(this);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
return _createClass(OffersV2, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj) {}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>OffersV2</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
+
* @param {module:model/OffersV2} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/OffersV2} The populated <code>OffersV2</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new OffersV2();
|
|
69
|
+
if (data.hasOwnProperty('listings')) {
|
|
70
|
+
obj['listings'] = _ApiClient["default"].convertToType(data['listings'], [_OfferListingV["default"]]);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>OffersV2</code>.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>OffersV2</code>.
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "validateJSON",
|
|
83
|
+
value: function validateJSON(data) {
|
|
84
|
+
if (data['listings']) {
|
|
85
|
+
// data not null
|
|
86
|
+
// ensure the json data is an array
|
|
87
|
+
if (!Array.isArray(data['listings'])) {
|
|
88
|
+
throw new Error("Expected the field `listings` to be an array in the JSON data but got " + data['listings']);
|
|
89
|
+
}
|
|
90
|
+
// validate the optional field `listings` (array)
|
|
91
|
+
var _iterator = _createForOfIteratorHelper(data['listings']),
|
|
92
|
+
_step;
|
|
93
|
+
try {
|
|
94
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
95
|
+
var item = _step.value;
|
|
96
|
+
_OfferListingV["default"].validateJSON(item);
|
|
97
|
+
}
|
|
98
|
+
} catch (err) {
|
|
99
|
+
_iterator.e(err);
|
|
100
|
+
} finally {
|
|
101
|
+
_iterator.f();
|
|
102
|
+
}
|
|
103
|
+
;
|
|
104
|
+
}
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
}]);
|
|
108
|
+
}();
|
|
109
|
+
/**
|
|
110
|
+
* List of offer listing associated with a product.
|
|
111
|
+
* @member {Array.<module:model/OfferListingV2>} listings
|
|
112
|
+
*/
|
|
113
|
+
OffersV2.prototype['listings'] = undefined;
|
|
114
|
+
var _default = exports["default"] = OffersV2;
|