aliseeks_api 1.0.4

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.
Files changed (199) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +8 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +171 -0
  5. data/Rakefile +10 -0
  6. data/aliseeks_api.gemspec +45 -0
  7. data/docs/Amount.md +9 -0
  8. data/docs/BestSellingSearchItem.md +15 -0
  9. data/docs/BestSellingSearchRequest.md +12 -0
  10. data/docs/BestSellingSearchResponse.md +8 -0
  11. data/docs/DoubleRange.md +9 -0
  12. data/docs/ImageSearchCategory.md +9 -0
  13. data/docs/ImageSearchItem.md +12 -0
  14. data/docs/ImageSearchRequest.md +12 -0
  15. data/docs/ImageSearchResponse.md +10 -0
  16. data/docs/IntegerRange.md +9 -0
  17. data/docs/NonRealtimeCurrency.md +7 -0
  18. data/docs/PriceRange.md +9 -0
  19. data/docs/PriceSummary.md +13 -0
  20. data/docs/Product.md +28 -0
  21. data/docs/ProductAttribute.md +11 -0
  22. data/docs/ProductBulkOption.md +10 -0
  23. data/docs/ProductDetail.md +24 -0
  24. data/docs/ProductDetailsRequest.md +12 -0
  25. data/docs/ProductHtmlDescription.md +8 -0
  26. data/docs/ProductHtmlDescriptionRequest.md +8 -0
  27. data/docs/ProductPriceOption.md +14 -0
  28. data/docs/ProductPromotion.md +9 -0
  29. data/docs/ProductPropertyVariationIdentifier.md +10 -0
  30. data/docs/ProductRequest.md +15 -0
  31. data/docs/ProductRequestComponent.md +7 -0
  32. data/docs/ProductReview.md +18 -0
  33. data/docs/ProductReviews.md +17 -0
  34. data/docs/ProductReviewsRequest.md +10 -0
  35. data/docs/ProductSeller.md +12 -0
  36. data/docs/ProductShipping.md +8 -0
  37. data/docs/ProductShippingOptions.md +15 -0
  38. data/docs/ProductShippingRequest.md +12 -0
  39. data/docs/ProductSku.md +16 -0
  40. data/docs/ProductSkus.md +8 -0
  41. data/docs/ProductSkusRequest.md +11 -0
  42. data/docs/ProductsApi.md +316 -0
  43. data/docs/PromotionOption.md +12 -0
  44. data/docs/RealtimeCurrency.md +7 -0
  45. data/docs/RealtimeSearchAggregation.md +9 -0
  46. data/docs/RealtimeSearchItem.md +14 -0
  47. data/docs/RealtimeSearchRequest.md +14 -0
  48. data/docs/RealtimeSearchResponse.md +9 -0
  49. data/docs/SearchAggregation.md +11 -0
  50. data/docs/SearchApi.md +263 -0
  51. data/docs/SearchItem.md +20 -0
  52. data/docs/SearchItemFreight.md +9 -0
  53. data/docs/SearchItemFreightType.md +8 -0
  54. data/docs/SearchItemSeller.md +13 -0
  55. data/docs/SearchPriceOption.md +10 -0
  56. data/docs/SearchRequest.md +24 -0
  57. data/docs/SearchResponse.md +9 -0
  58. data/docs/SkuPriceOption.md +16 -0
  59. data/docs/SkuPriceOptionProperty.md +13 -0
  60. data/docs/SkuProperty.md +10 -0
  61. data/docs/SkuPropertyValue.md +10 -0
  62. data/docs/StringRange.md +9 -0
  63. data/docs/TimeDuration.md +11 -0
  64. data/docs/TradeInformation.md +9 -0
  65. data/docs/UploadImageByUrlRequest.md +8 -0
  66. data/docs/UploadImageResponse.md +8 -0
  67. data/docs/WebError.md +11 -0
  68. data/git_push.sh +55 -0
  69. data/lib/aliseeks_api.rb +100 -0
  70. data/lib/aliseeks_api/api/products_api.rb +337 -0
  71. data/lib/aliseeks_api/api/search_api.rb +288 -0
  72. data/lib/aliseeks_api/api_client.rb +389 -0
  73. data/lib/aliseeks_api/api_error.rb +38 -0
  74. data/lib/aliseeks_api/configuration.rb +251 -0
  75. data/lib/aliseeks_api/models/amount.rb +195 -0
  76. data/lib/aliseeks_api/models/best_selling_search_item.rb +257 -0
  77. data/lib/aliseeks_api/models/best_selling_search_request.rb +278 -0
  78. data/lib/aliseeks_api/models/best_selling_search_response.rb +187 -0
  79. data/lib/aliseeks_api/models/double_range.rb +193 -0
  80. data/lib/aliseeks_api/models/image_search_category.rb +195 -0
  81. data/lib/aliseeks_api/models/image_search_item.rb +224 -0
  82. data/lib/aliseeks_api/models/image_search_request.rb +240 -0
  83. data/lib/aliseeks_api/models/image_search_response.rb +209 -0
  84. data/lib/aliseeks_api/models/integer_range.rb +193 -0
  85. data/lib/aliseeks_api/models/non_realtime_currency.rb +48 -0
  86. data/lib/aliseeks_api/models/price_range.rb +193 -0
  87. data/lib/aliseeks_api/models/price_summary.rb +229 -0
  88. data/lib/aliseeks_api/models/product.rb +422 -0
  89. data/lib/aliseeks_api/models/product_attribute.rb +215 -0
  90. data/lib/aliseeks_api/models/product_bulk_option.rb +204 -0
  91. data/lib/aliseeks_api/models/product_detail.rb +353 -0
  92. data/lib/aliseeks_api/models/product_details_request.rb +230 -0
  93. data/lib/aliseeks_api/models/product_html_description.rb +185 -0
  94. data/lib/aliseeks_api/models/product_html_description_request.rb +185 -0
  95. data/lib/aliseeks_api/models/product_price_option.rb +240 -0
  96. data/lib/aliseeks_api/models/product_promotion.rb +194 -0
  97. data/lib/aliseeks_api/models/product_property_variation_identifier.rb +205 -0
  98. data/lib/aliseeks_api/models/product_request.rb +288 -0
  99. data/lib/aliseeks_api/models/product_request_component.rb +31 -0
  100. data/lib/aliseeks_api/models/product_review.rb +287 -0
  101. data/lib/aliseeks_api/models/product_reviews.rb +270 -0
  102. data/lib/aliseeks_api/models/product_reviews_request.rb +235 -0
  103. data/lib/aliseeks_api/models/product_seller.rb +225 -0
  104. data/lib/aliseeks_api/models/product_shipping.rb +187 -0
  105. data/lib/aliseeks_api/models/product_shipping_options.rb +253 -0
  106. data/lib/aliseeks_api/models/product_shipping_request.rb +256 -0
  107. data/lib/aliseeks_api/models/product_sku.rb +266 -0
  108. data/lib/aliseeks_api/models/product_skus.rb +187 -0
  109. data/lib/aliseeks_api/models/product_skus_request.rb +218 -0
  110. data/lib/aliseeks_api/models/promotion_option.rb +222 -0
  111. data/lib/aliseeks_api/models/realtime_currency.rb +45 -0
  112. data/lib/aliseeks_api/models/realtime_search_aggregation.rb +197 -0
  113. data/lib/aliseeks_api/models/realtime_search_item.rb +246 -0
  114. data/lib/aliseeks_api/models/realtime_search_request.rb +304 -0
  115. data/lib/aliseeks_api/models/realtime_search_response.rb +196 -0
  116. data/lib/aliseeks_api/models/search_aggregation.rb +215 -0
  117. data/lib/aliseeks_api/models/search_item.rb +304 -0
  118. data/lib/aliseeks_api/models/search_item_freight.rb +194 -0
  119. data/lib/aliseeks_api/models/search_item_freight_type.rb +185 -0
  120. data/lib/aliseeks_api/models/search_item_seller.rb +235 -0
  121. data/lib/aliseeks_api/models/search_price_option.rb +203 -0
  122. data/lib/aliseeks_api/models/search_request.rb +441 -0
  123. data/lib/aliseeks_api/models/search_response.rb +196 -0
  124. data/lib/aliseeks_api/models/sku_price_option.rb +264 -0
  125. data/lib/aliseeks_api/models/sku_price_option_property.rb +235 -0
  126. data/lib/aliseeks_api/models/sku_property.rb +207 -0
  127. data/lib/aliseeks_api/models/sku_property_value.rb +205 -0
  128. data/lib/aliseeks_api/models/string_range.rb +193 -0
  129. data/lib/aliseeks_api/models/time_duration.rb +211 -0
  130. data/lib/aliseeks_api/models/trade_information.rb +195 -0
  131. data/lib/aliseeks_api/models/upload_image_by_url_request.rb +185 -0
  132. data/lib/aliseeks_api/models/upload_image_response.rb +185 -0
  133. data/lib/aliseeks_api/models/web_error.rb +211 -0
  134. data/lib/aliseeks_api/version.rb +15 -0
  135. data/spec/api/products_api_spec.rb +101 -0
  136. data/spec/api/search_api_spec.rb +90 -0
  137. data/spec/api_client_spec.rb +226 -0
  138. data/spec/configuration_spec.rb +42 -0
  139. data/spec/models/amount_spec.rb +47 -0
  140. data/spec/models/best_selling_search_item_spec.rb +83 -0
  141. data/spec/models/best_selling_search_request_spec.rb +73 -0
  142. data/spec/models/best_selling_search_response_spec.rb +41 -0
  143. data/spec/models/double_range_spec.rb +47 -0
  144. data/spec/models/image_search_category_spec.rb +47 -0
  145. data/spec/models/image_search_item_spec.rb +65 -0
  146. data/spec/models/image_search_request_spec.rb +65 -0
  147. data/spec/models/image_search_response_spec.rb +53 -0
  148. data/spec/models/integer_range_spec.rb +47 -0
  149. data/spec/models/non_realtime_currency_spec.rb +35 -0
  150. data/spec/models/price_range_spec.rb +47 -0
  151. data/spec/models/price_summary_spec.rb +71 -0
  152. data/spec/models/product_attribute_spec.rb +59 -0
  153. data/spec/models/product_bulk_option_spec.rb +53 -0
  154. data/spec/models/product_detail_spec.rb +137 -0
  155. data/spec/models/product_details_request_spec.rb +65 -0
  156. data/spec/models/product_html_description_request_spec.rb +41 -0
  157. data/spec/models/product_html_description_spec.rb +41 -0
  158. data/spec/models/product_price_option_spec.rb +77 -0
  159. data/spec/models/product_promotion_spec.rb +47 -0
  160. data/spec/models/product_property_variation_identifier_spec.rb +53 -0
  161. data/spec/models/product_request_component_spec.rb +35 -0
  162. data/spec/models/product_request_spec.rb +83 -0
  163. data/spec/models/product_review_spec.rb +101 -0
  164. data/spec/models/product_reviews_request_spec.rb +53 -0
  165. data/spec/models/product_reviews_spec.rb +95 -0
  166. data/spec/models/product_seller_spec.rb +65 -0
  167. data/spec/models/product_shipping_options_spec.rb +83 -0
  168. data/spec/models/product_shipping_request_spec.rb +65 -0
  169. data/spec/models/product_shipping_spec.rb +41 -0
  170. data/spec/models/product_sku_spec.rb +89 -0
  171. data/spec/models/product_skus_request_spec.rb +59 -0
  172. data/spec/models/product_skus_spec.rb +41 -0
  173. data/spec/models/product_spec.rb +165 -0
  174. data/spec/models/promotion_option_spec.rb +65 -0
  175. data/spec/models/realtime_currency_spec.rb +35 -0
  176. data/spec/models/realtime_search_aggregation_spec.rb +47 -0
  177. data/spec/models/realtime_search_item_spec.rb +77 -0
  178. data/spec/models/realtime_search_request_spec.rb +81 -0
  179. data/spec/models/realtime_search_response_spec.rb +47 -0
  180. data/spec/models/search_aggregation_spec.rb +59 -0
  181. data/spec/models/search_item_freight_spec.rb +47 -0
  182. data/spec/models/search_item_freight_type_spec.rb +41 -0
  183. data/spec/models/search_item_seller_spec.rb +71 -0
  184. data/spec/models/search_item_spec.rb +113 -0
  185. data/spec/models/search_price_option_spec.rb +53 -0
  186. data/spec/models/search_request_spec.rb +145 -0
  187. data/spec/models/search_response_spec.rb +47 -0
  188. data/spec/models/sku_price_option_property_spec.rb +71 -0
  189. data/spec/models/sku_price_option_spec.rb +89 -0
  190. data/spec/models/sku_property_spec.rb +53 -0
  191. data/spec/models/sku_property_value_spec.rb +53 -0
  192. data/spec/models/string_range_spec.rb +47 -0
  193. data/spec/models/time_duration_spec.rb +59 -0
  194. data/spec/models/trade_information_spec.rb +47 -0
  195. data/spec/models/upload_image_by_url_request_spec.rb +41 -0
  196. data/spec/models/upload_image_response_spec.rb +41 -0
  197. data/spec/models/web_error_spec.rb +59 -0
  198. data/spec/spec_helper.rb +111 -0
  199. metadata +485 -0
@@ -0,0 +1,16 @@
1
+ # AliseeksApi::SkuPriceOption
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **original_price** | [**Amount**](Amount.md) | | [optional]
7
+ **discounted_price** | [**Amount**](Amount.md) | | [optional]
8
+ **bulk_price** | [**Amount**](Amount.md) | | [optional]
9
+ **bulk_quantity** | **Integer** | The quantity that needs to be ordered to qualify for the bulk discount | [optional]
10
+ **sku_image** | **String** | The image associated with the sku | [optional]
11
+ **discounted_stock** | **Integer** | The stock left at the discounted price | [optional]
12
+ **stock** | **Integer** | The stock left for the sku | [optional]
13
+ **sku_identifier** | **String** | The identifier of the sku | [optional]
14
+ **properties** | [**Array<SkuPriceOptionProperty>**](SkuPriceOptionProperty.md) | The properties associated with this sku | [optional]
15
+
16
+
@@ -0,0 +1,13 @@
1
+ # AliseeksApi::SkuPriceOptionProperty
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **property_id** | **Integer** | The ID of the property | [optional]
7
+ **property_name** | **String** | The name of the property | [optional]
8
+ **value_id** | **Integer** | The ID of the property value | [optional]
9
+ **value_name** | **String** | The name of the property value | [optional]
10
+ **value_display_name** | **String** | The display name of the property value | [optional]
11
+ **ship_from_country** | **String** | The country that the sku is shipped from | [optional]
12
+
13
+
@@ -0,0 +1,10 @@
1
+ # AliseeksApi::SkuProperty
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **property_id** | **Integer** | The ID of the SKU property | [optional]
7
+ **property_name** | **String** | The name of the property | [optional]
8
+ **values** | [**Array<SkuPropertyValue>**](SkuPropertyValue.md) | The values of this SKU property | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # AliseeksApi::SkuPropertyValue
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **property_value_name** | **String** | The name of a sku value | [optional]
7
+ **property_value_id** | **Integer** | The ID of the sku value | [optional]
8
+ **property_value_display_name** | **String** | The display name of the sku value | [optional]
9
+
10
+
@@ -0,0 +1,9 @@
1
+ # AliseeksApi::StringRange
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **from** | **String** | | [optional]
7
+ **to** | **String** | | [optional]
8
+
9
+
@@ -0,0 +1,11 @@
1
+ # AliseeksApi::TimeDuration
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **days** | **Integer** | | [optional]
7
+ **hours** | **Integer** | | [optional]
8
+ **minutes** | **Integer** | | [optional]
9
+ **seconds** | **Integer** | | [optional]
10
+
11
+
@@ -0,0 +1,9 @@
1
+ # AliseeksApi::TradeInformation
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **stock** | **Integer** | The product stock | [optional]
7
+ **sold** | **Integer** | The amount sold of the product | [optional]
8
+
9
+
@@ -0,0 +1,8 @@
1
+ # AliseeksApi::UploadImageByUrlRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **url** | **String** | The web address of the image. Make sure its accessible from the public internet. | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # AliseeksApi::UploadImageResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **upload_key** | **String** | The upload key that should be used when performing an image search request | [optional]
7
+
8
+
@@ -0,0 +1,11 @@
1
+ # AliseeksApi::WebError
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **exception** | **String** | | [optional]
7
+ **type** | **String** | | [optional]
8
+ **cause** | **String** | | [optional]
9
+ **message** | **String** | | [optional]
10
+
11
+
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://openapi-generator.tech
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="aliseeks"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="connect-ruby-sdk"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,100 @@
1
+ =begin
2
+ #Aliseeks API
3
+
4
+ #AliExpress product searching and product details retrieval API.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.4
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'aliseeks_api/api_client'
15
+ require 'aliseeks_api/api_error'
16
+ require 'aliseeks_api/version'
17
+ require 'aliseeks_api/configuration'
18
+
19
+ # Models
20
+ require 'aliseeks_api/models/amount'
21
+ require 'aliseeks_api/models/best_selling_search_item'
22
+ require 'aliseeks_api/models/best_selling_search_request'
23
+ require 'aliseeks_api/models/best_selling_search_response'
24
+ require 'aliseeks_api/models/double_range'
25
+ require 'aliseeks_api/models/image_search_category'
26
+ require 'aliseeks_api/models/image_search_item'
27
+ require 'aliseeks_api/models/image_search_request'
28
+ require 'aliseeks_api/models/image_search_response'
29
+ require 'aliseeks_api/models/integer_range'
30
+ require 'aliseeks_api/models/non_realtime_currency'
31
+ require 'aliseeks_api/models/price_range'
32
+ require 'aliseeks_api/models/price_summary'
33
+ require 'aliseeks_api/models/product'
34
+ require 'aliseeks_api/models/product_attribute'
35
+ require 'aliseeks_api/models/product_bulk_option'
36
+ require 'aliseeks_api/models/product_detail'
37
+ require 'aliseeks_api/models/product_details_request'
38
+ require 'aliseeks_api/models/product_html_description'
39
+ require 'aliseeks_api/models/product_html_description_request'
40
+ require 'aliseeks_api/models/product_price_option'
41
+ require 'aliseeks_api/models/product_promotion'
42
+ require 'aliseeks_api/models/product_property_variation_identifier'
43
+ require 'aliseeks_api/models/product_request'
44
+ require 'aliseeks_api/models/product_request_component'
45
+ require 'aliseeks_api/models/product_review'
46
+ require 'aliseeks_api/models/product_reviews'
47
+ require 'aliseeks_api/models/product_reviews_request'
48
+ require 'aliseeks_api/models/product_seller'
49
+ require 'aliseeks_api/models/product_shipping'
50
+ require 'aliseeks_api/models/product_shipping_options'
51
+ require 'aliseeks_api/models/product_shipping_request'
52
+ require 'aliseeks_api/models/product_sku'
53
+ require 'aliseeks_api/models/product_skus'
54
+ require 'aliseeks_api/models/product_skus_request'
55
+ require 'aliseeks_api/models/promotion_option'
56
+ require 'aliseeks_api/models/realtime_currency'
57
+ require 'aliseeks_api/models/realtime_search_aggregation'
58
+ require 'aliseeks_api/models/realtime_search_item'
59
+ require 'aliseeks_api/models/realtime_search_request'
60
+ require 'aliseeks_api/models/realtime_search_response'
61
+ require 'aliseeks_api/models/search_aggregation'
62
+ require 'aliseeks_api/models/search_item'
63
+ require 'aliseeks_api/models/search_item_freight'
64
+ require 'aliseeks_api/models/search_item_freight_type'
65
+ require 'aliseeks_api/models/search_item_seller'
66
+ require 'aliseeks_api/models/search_price_option'
67
+ require 'aliseeks_api/models/search_request'
68
+ require 'aliseeks_api/models/search_response'
69
+ require 'aliseeks_api/models/sku_price_option'
70
+ require 'aliseeks_api/models/sku_price_option_property'
71
+ require 'aliseeks_api/models/sku_property'
72
+ require 'aliseeks_api/models/sku_property_value'
73
+ require 'aliseeks_api/models/string_range'
74
+ require 'aliseeks_api/models/time_duration'
75
+ require 'aliseeks_api/models/trade_information'
76
+ require 'aliseeks_api/models/upload_image_by_url_request'
77
+ require 'aliseeks_api/models/upload_image_response'
78
+ require 'aliseeks_api/models/web_error'
79
+
80
+ # APIs
81
+ require 'aliseeks_api/api/products_api'
82
+ require 'aliseeks_api/api/search_api'
83
+
84
+ module AliseeksApi
85
+ class << self
86
+ # Customize default settings for the SDK using block.
87
+ # AliseeksApi.configure do |config|
88
+ # config.username = "xxx"
89
+ # config.password = "xxx"
90
+ # end
91
+ # If no block given, return the default Configuration object.
92
+ def configure
93
+ if block_given?
94
+ yield(Configuration.default)
95
+ else
96
+ Configuration.default
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,337 @@
1
+ =begin
2
+ #Aliseeks API
3
+
4
+ #AliExpress product searching and product details retrieval API.
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.4
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module AliseeksApi
16
+ class ProductsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get products details as an aggregated request from AliExpress in realtime.
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [ProductRequest] :product_request The request body of get product
25
+ # @return [Product]
26
+ def get_product(opts = {})
27
+ data, _status_code, _headers = get_product_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Get products details as an aggregated request from AliExpress in realtime.
32
+ # @param [Hash] opts the optional parameters
33
+ # @option opts [ProductRequest] :product_request The request body of get product
34
+ # @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
35
+ def get_product_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: ProductsApi.get_product ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/products'
41
+
42
+ # query parameters
43
+ query_params = {}
44
+
45
+ # header parameters
46
+ header_params = {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+ # HTTP header 'Content-Type'
50
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
51
+
52
+ # form parameters
53
+ form_params = {}
54
+
55
+ # http body (model)
56
+ post_body = @api_client.object_to_http_body(opts[:'product_request'])
57
+ auth_names = ['ApiKeyAuth']
58
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
59
+ :header_params => header_params,
60
+ :query_params => query_params,
61
+ :form_params => form_params,
62
+ :body => post_body,
63
+ :auth_names => auth_names,
64
+ :return_type => 'Product')
65
+ if @api_client.config.debugging
66
+ @api_client.config.logger.debug "API called: ProductsApi#get_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
67
+ end
68
+ return data, status_code, headers
69
+ end
70
+
71
+ # Gets product details from AliExpress in realtime.
72
+ # @param product_details_request The request body to get product details
73
+ # @param [Hash] opts the optional parameters
74
+ # @return [ProductDetail]
75
+ def get_product_details(product_details_request, opts = {})
76
+ data, _status_code, _headers = get_product_details_with_http_info(product_details_request, opts)
77
+ data
78
+ end
79
+
80
+ # Gets product details from AliExpress in realtime.
81
+ # @param product_details_request The request body to get product details
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [Array<(ProductDetail, Fixnum, Hash)>] ProductDetail data, response status code and response headers
84
+ def get_product_details_with_http_info(product_details_request, opts = {})
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug 'Calling API: ProductsApi.get_product_details ...'
87
+ end
88
+ # verify the required parameter 'product_details_request' is set
89
+ if @api_client.config.client_side_validation && product_details_request.nil?
90
+ fail ArgumentError, "Missing the required parameter 'product_details_request' when calling ProductsApi.get_product_details"
91
+ end
92
+ # resource path
93
+ local_var_path = '/products/details'
94
+
95
+ # query parameters
96
+ query_params = {}
97
+
98
+ # header parameters
99
+ header_params = {}
100
+ # HTTP header 'Accept' (if needed)
101
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
102
+ # HTTP header 'Content-Type'
103
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
104
+
105
+ # form parameters
106
+ form_params = {}
107
+
108
+ # http body (model)
109
+ post_body = @api_client.object_to_http_body(product_details_request)
110
+ auth_names = ['ApiKeyAuth']
111
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
112
+ :header_params => header_params,
113
+ :query_params => query_params,
114
+ :form_params => form_params,
115
+ :body => post_body,
116
+ :auth_names => auth_names,
117
+ :return_type => 'ProductDetail')
118
+ if @api_client.config.debugging
119
+ @api_client.config.logger.debug "API called: ProductsApi#get_product_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
120
+ end
121
+ return data, status_code, headers
122
+ end
123
+
124
+ # Get product HTML description from AliExpress in realtime.
125
+ # @param product_html_description_request The request body to get product html description
126
+ # @param [Hash] opts the optional parameters
127
+ # @return [ProductHtmlDescription]
128
+ def get_product_html_description(product_html_description_request, opts = {})
129
+ data, _status_code, _headers = get_product_html_description_with_http_info(product_html_description_request, opts)
130
+ data
131
+ end
132
+
133
+ # Get product HTML description from AliExpress in realtime.
134
+ # @param product_html_description_request The request body to get product html description
135
+ # @param [Hash] opts the optional parameters
136
+ # @return [Array<(ProductHtmlDescription, Fixnum, Hash)>] ProductHtmlDescription data, response status code and response headers
137
+ def get_product_html_description_with_http_info(product_html_description_request, opts = {})
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug 'Calling API: ProductsApi.get_product_html_description ...'
140
+ end
141
+ # verify the required parameter 'product_html_description_request' is set
142
+ if @api_client.config.client_side_validation && product_html_description_request.nil?
143
+ fail ArgumentError, "Missing the required parameter 'product_html_description_request' when calling ProductsApi.get_product_html_description"
144
+ end
145
+ # resource path
146
+ local_var_path = '/products/description/html'
147
+
148
+ # query parameters
149
+ query_params = {}
150
+
151
+ # header parameters
152
+ header_params = {}
153
+ # HTTP header 'Accept' (if needed)
154
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
155
+ # HTTP header 'Content-Type'
156
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
157
+
158
+ # form parameters
159
+ form_params = {}
160
+
161
+ # http body (model)
162
+ post_body = @api_client.object_to_http_body(product_html_description_request)
163
+ auth_names = ['ApiKeyAuth']
164
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
165
+ :header_params => header_params,
166
+ :query_params => query_params,
167
+ :form_params => form_params,
168
+ :body => post_body,
169
+ :auth_names => auth_names,
170
+ :return_type => 'ProductHtmlDescription')
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug "API called: ProductsApi#get_product_html_description\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
173
+ end
174
+ return data, status_code, headers
175
+ end
176
+
177
+ # Get product reviews from AliExpress in realtime
178
+ # @param product_reviews_request The request body to get product reviews
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [ProductReviews]
181
+ def get_product_reviews(product_reviews_request, opts = {})
182
+ data, _status_code, _headers = get_product_reviews_with_http_info(product_reviews_request, opts)
183
+ data
184
+ end
185
+
186
+ # Get product reviews from AliExpress in realtime
187
+ # @param product_reviews_request The request body to get product reviews
188
+ # @param [Hash] opts the optional parameters
189
+ # @return [Array<(ProductReviews, Fixnum, Hash)>] ProductReviews data, response status code and response headers
190
+ def get_product_reviews_with_http_info(product_reviews_request, opts = {})
191
+ if @api_client.config.debugging
192
+ @api_client.config.logger.debug 'Calling API: ProductsApi.get_product_reviews ...'
193
+ end
194
+ # verify the required parameter 'product_reviews_request' is set
195
+ if @api_client.config.client_side_validation && product_reviews_request.nil?
196
+ fail ArgumentError, "Missing the required parameter 'product_reviews_request' when calling ProductsApi.get_product_reviews"
197
+ end
198
+ # resource path
199
+ local_var_path = '/products/reviews'
200
+
201
+ # query parameters
202
+ query_params = {}
203
+
204
+ # header parameters
205
+ header_params = {}
206
+ # HTTP header 'Accept' (if needed)
207
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
208
+ # HTTP header 'Content-Type'
209
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
210
+
211
+ # form parameters
212
+ form_params = {}
213
+
214
+ # http body (model)
215
+ post_body = @api_client.object_to_http_body(product_reviews_request)
216
+ auth_names = ['ApiKeyAuth']
217
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
218
+ :header_params => header_params,
219
+ :query_params => query_params,
220
+ :form_params => form_params,
221
+ :body => post_body,
222
+ :auth_names => auth_names,
223
+ :return_type => 'ProductReviews')
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug "API called: ProductsApi#get_product_reviews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
+ end
227
+ return data, status_code, headers
228
+ end
229
+
230
+ # Gets product shipping information AliExpress in realtime.
231
+ # @param product_shipping_request The request body to get product shipping
232
+ # @param [Hash] opts the optional parameters
233
+ # @return [ProductShipping]
234
+ def get_product_shipping(product_shipping_request, opts = {})
235
+ data, _status_code, _headers = get_product_shipping_with_http_info(product_shipping_request, opts)
236
+ data
237
+ end
238
+
239
+ # Gets product shipping information AliExpress in realtime.
240
+ # @param product_shipping_request The request body to get product shipping
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [Array<(ProductShipping, Fixnum, Hash)>] ProductShipping data, response status code and response headers
243
+ def get_product_shipping_with_http_info(product_shipping_request, opts = {})
244
+ if @api_client.config.debugging
245
+ @api_client.config.logger.debug 'Calling API: ProductsApi.get_product_shipping ...'
246
+ end
247
+ # verify the required parameter 'product_shipping_request' is set
248
+ if @api_client.config.client_side_validation && product_shipping_request.nil?
249
+ fail ArgumentError, "Missing the required parameter 'product_shipping_request' when calling ProductsApi.get_product_shipping"
250
+ end
251
+ # resource path
252
+ local_var_path = '/products/shipping'
253
+
254
+ # query parameters
255
+ query_params = {}
256
+
257
+ # header parameters
258
+ header_params = {}
259
+ # HTTP header 'Accept' (if needed)
260
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
261
+ # HTTP header 'Content-Type'
262
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
263
+
264
+ # form parameters
265
+ form_params = {}
266
+
267
+ # http body (model)
268
+ post_body = @api_client.object_to_http_body(product_shipping_request)
269
+ auth_names = ['ApiKeyAuth']
270
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :form_params => form_params,
274
+ :body => post_body,
275
+ :auth_names => auth_names,
276
+ :return_type => 'ProductShipping')
277
+ if @api_client.config.debugging
278
+ @api_client.config.logger.debug "API called: ProductsApi#get_product_shipping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
279
+ end
280
+ return data, status_code, headers
281
+ end
282
+
283
+ # Gets product skus / variation information from AliExpress in realtime.
284
+ # @param product_skus_request The request body to get product skus / variations
285
+ # @param [Hash] opts the optional parameters
286
+ # @return [ProductSkus]
287
+ def get_product_skus(product_skus_request, opts = {})
288
+ data, _status_code, _headers = get_product_skus_with_http_info(product_skus_request, opts)
289
+ data
290
+ end
291
+
292
+ # Gets product skus / variation information from AliExpress in realtime.
293
+ # @param product_skus_request The request body to get product skus / variations
294
+ # @param [Hash] opts the optional parameters
295
+ # @return [Array<(ProductSkus, Fixnum, Hash)>] ProductSkus data, response status code and response headers
296
+ def get_product_skus_with_http_info(product_skus_request, opts = {})
297
+ if @api_client.config.debugging
298
+ @api_client.config.logger.debug 'Calling API: ProductsApi.get_product_skus ...'
299
+ end
300
+ # verify the required parameter 'product_skus_request' is set
301
+ if @api_client.config.client_side_validation && product_skus_request.nil?
302
+ fail ArgumentError, "Missing the required parameter 'product_skus_request' when calling ProductsApi.get_product_skus"
303
+ end
304
+ # resource path
305
+ local_var_path = '/products/variations'
306
+
307
+ # query parameters
308
+ query_params = {}
309
+
310
+ # header parameters
311
+ header_params = {}
312
+ # HTTP header 'Accept' (if needed)
313
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
314
+ # HTTP header 'Content-Type'
315
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
316
+
317
+ # form parameters
318
+ form_params = {}
319
+
320
+ # http body (model)
321
+ post_body = @api_client.object_to_http_body(product_skus_request)
322
+ auth_names = ['ApiKeyAuth']
323
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
324
+ :header_params => header_params,
325
+ :query_params => query_params,
326
+ :form_params => form_params,
327
+ :body => post_body,
328
+ :auth_names => auth_names,
329
+ :return_type => 'ProductSkus')
330
+ if @api_client.config.debugging
331
+ @api_client.config.logger.debug "API called: ProductsApi#get_product_skus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
332
+ end
333
+ return data, status_code, headers
334
+ end
335
+
336
+ end
337
+ end