order_cloud 1.0.45.pre.staging → 1.0.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (446) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +28 -0
  3. data/Gemfile.lock +34 -0
  4. data/LICENSE +201 -0
  5. data/README.md +552 -0
  6. data/Rakefile +31 -0
  7. data/docs/AccessToken.md +11 -0
  8. data/docs/Address.md +20 -0
  9. data/docs/AddressApi.md +520 -0
  10. data/docs/AddressAssignment.md +12 -0
  11. data/docs/AdminAddressApi.md +324 -0
  12. data/docs/AdminUserApi.md +324 -0
  13. data/docs/AdminUserGroupApi.md +482 -0
  14. data/docs/ApprovalRule.md +13 -0
  15. data/docs/ApprovalRuleApi.md +342 -0
  16. data/docs/BaseSpec.md +16 -0
  17. data/docs/Buyer.md +12 -0
  18. data/docs/BuyerAddress.md +23 -0
  19. data/docs/BuyerApi.md +324 -0
  20. data/docs/BuyerCreditCard.md +16 -0
  21. data/docs/BuyerProduct.md +23 -0
  22. data/docs/BuyerShipment.md +19 -0
  23. data/docs/BuyerSpec.md +17 -0
  24. data/docs/Catalog.md +13 -0
  25. data/docs/CatalogApi.md +640 -0
  26. data/docs/CatalogAssignment.md +11 -0
  27. data/docs/Category.md +15 -0
  28. data/docs/CategoryApi.md +690 -0
  29. data/docs/CategoryAssignment.md +12 -0
  30. data/docs/CategoryProductAssignment.md +10 -0
  31. data/docs/CostCenter.md +11 -0
  32. data/docs/CostCenterApi.md +516 -0
  33. data/docs/CostCenterAssignment.md +9 -0
  34. data/docs/CreditCard.md +15 -0
  35. data/docs/CreditCardApi.md +516 -0
  36. data/docs/CreditCardAssignment.md +10 -0
  37. data/docs/ImpersonateTokenRequest.md +9 -0
  38. data/docs/ImpersonationConfig.md +16 -0
  39. data/docs/ImpersonationConfigApi.md +324 -0
  40. data/docs/Inventory.md +13 -0
  41. data/docs/LineItem.md +24 -0
  42. data/docs/LineItemApi.md +478 -0
  43. data/docs/LineItemProduct.md +16 -0
  44. data/docs/LineItemSpec.md +11 -0
  45. data/docs/ListAddress.md +9 -0
  46. data/docs/ListAddressAssignment.md +9 -0
  47. data/docs/ListApprovalRule.md +9 -0
  48. data/docs/ListArgs.md +13 -0
  49. data/docs/ListBuyer.md +9 -0
  50. data/docs/ListBuyerAddress.md +9 -0
  51. data/docs/ListBuyerCreditCard.md +9 -0
  52. data/docs/ListBuyerProduct.md +9 -0
  53. data/docs/ListBuyerShipment.md +9 -0
  54. data/docs/ListBuyerSpec.md +9 -0
  55. data/docs/ListCatalog.md +9 -0
  56. data/docs/ListCatalogAssignment.md +9 -0
  57. data/docs/ListCategory.md +9 -0
  58. data/docs/ListCategoryAssignment.md +9 -0
  59. data/docs/ListCategoryProductAssignment.md +9 -0
  60. data/docs/ListCostCenter.md +9 -0
  61. data/docs/ListCostCenterAssignment.md +9 -0
  62. data/docs/ListCreditCard.md +9 -0
  63. data/docs/ListCreditCardAssignment.md +9 -0
  64. data/docs/ListImpersonationConfig.md +9 -0
  65. data/docs/ListLineItem.md +9 -0
  66. data/docs/ListMessageCCListenerAssignment.md +9 -0
  67. data/docs/ListMessageConfig.md +9 -0
  68. data/docs/ListMessageSender.md +9 -0
  69. data/docs/ListMessageSenderAssignment.md +9 -0
  70. data/docs/ListOrder.md +9 -0
  71. data/docs/ListOrderApproval.md +9 -0
  72. data/docs/ListOrderPromotion.md +9 -0
  73. data/docs/ListPayment.md +9 -0
  74. data/docs/ListPriceSchedule.md +9 -0
  75. data/docs/ListProduct.md +9 -0
  76. data/docs/ListProductAssignment.md +9 -0
  77. data/docs/ListProductCatalogAssignment.md +9 -0
  78. data/docs/ListPromotion.md +9 -0
  79. data/docs/ListPromotionAssignment.md +9 -0
  80. data/docs/ListSecurityProfile.md +9 -0
  81. data/docs/ListSecurityProfileAssignment.md +9 -0
  82. data/docs/ListShipment.md +9 -0
  83. data/docs/ListShipmentItem.md +9 -0
  84. data/docs/ListSpec.md +9 -0
  85. data/docs/ListSpecOption.md +9 -0
  86. data/docs/ListSpecProductAssignment.md +9 -0
  87. data/docs/ListSpendingAccount.md +9 -0
  88. data/docs/ListSpendingAccountAssignment.md +9 -0
  89. data/docs/ListSupplier.md +9 -0
  90. data/docs/ListUser.md +9 -0
  91. data/docs/ListUserGroup.md +9 -0
  92. data/docs/ListUserGroupAssignment.md +9 -0
  93. data/docs/ListVariant.md +9 -0
  94. data/docs/MeApi.md +2002 -0
  95. data/docs/MeBuyer.md +9 -0
  96. data/docs/MeUser.md +19 -0
  97. data/docs/MessageCCListenerAssignment.md +13 -0
  98. data/docs/MessageConfig.md +14 -0
  99. data/docs/MessageSender.md +10 -0
  100. data/docs/MessageSenderAssignment.md +11 -0
  101. data/docs/MessageSendersApi.md +398 -0
  102. data/docs/Meta.md +12 -0
  103. data/docs/Order.md +30 -0
  104. data/docs/OrderApi.md +1161 -0
  105. data/docs/OrderApproval.md +14 -0
  106. data/docs/OrderApprovalInfo.md +9 -0
  107. data/docs/OrderPromotion.md +22 -0
  108. data/docs/PasswordReset.md +10 -0
  109. data/docs/PasswordResetApi.md +109 -0
  110. data/docs/PasswordResetRequest.md +11 -0
  111. data/docs/Payment.md +17 -0
  112. data/docs/PaymentApi.md +418 -0
  113. data/docs/PaymentTransaction.md +15 -0
  114. data/docs/PriceBreak.md +9 -0
  115. data/docs/PriceSchedule.md +17 -0
  116. data/docs/PriceScheduleApi.md +429 -0
  117. data/docs/Product.md +23 -0
  118. data/docs/ProductApi.md +953 -0
  119. data/docs/ProductAssignment.md +11 -0
  120. data/docs/ProductBase.md +22 -0
  121. data/docs/ProductCatalogAssignment.md +9 -0
  122. data/docs/Promotion.md +21 -0
  123. data/docs/PromotionApi.md +494 -0
  124. data/docs/PromotionAssignment.md +10 -0
  125. data/docs/SecurityProfile.md +10 -0
  126. data/docs/SecurityProfileApi.md +292 -0
  127. data/docs/SecurityProfileAssignment.md +12 -0
  128. data/docs/Shipment.md +20 -0
  129. data/docs/ShipmentApi.md +554 -0
  130. data/docs/ShipmentItem.md +16 -0
  131. data/docs/Spec.md +17 -0
  132. data/docs/SpecApi.md +820 -0
  133. data/docs/SpecOption.md +14 -0
  134. data/docs/SpecProductAssignment.md +11 -0
  135. data/docs/SpendingAccount.md +15 -0
  136. data/docs/SpendingAccountApi.md +516 -0
  137. data/docs/SpendingAccountAssignment.md +11 -0
  138. data/docs/Supplier.md +11 -0
  139. data/docs/SupplierApi.md +324 -0
  140. data/docs/SupplierUserApi.md +400 -0
  141. data/docs/SupplierUserGroupApi.md +509 -0
  142. data/docs/TokenPasswordReset.md +8 -0
  143. data/docs/User.md +18 -0
  144. data/docs/UserApi.md +400 -0
  145. data/docs/UserGroup.md +11 -0
  146. data/docs/UserGroupApi.md +509 -0
  147. data/docs/UserGroupAssignment.md +9 -0
  148. data/docs/Variant.md +12 -0
  149. data/git_push.sh +67 -0
  150. data/lib/order_cloud.rb +193 -0
  151. data/lib/order_cloud/api/address_api.rb +628 -0
  152. data/lib/order_cloud/api/admin_address_api.rb +397 -0
  153. data/lib/order_cloud/api/admin_user_api.rb +397 -0
  154. data/lib/order_cloud/api/admin_user_group_api.rb +578 -0
  155. data/lib/order_cloud/api/approval_rule_api.rb +421 -0
  156. data/lib/order_cloud/api/auth_api.rb +138 -0
  157. data/lib/order_cloud/api/buyer_api.rb +397 -0
  158. data/lib/order_cloud/api/catalog_api.rb +760 -0
  159. data/lib/order_cloud/api/category_api.rb +826 -0
  160. data/lib/order_cloud/api/cost_center_api.rb +622 -0
  161. data/lib/order_cloud/api/credit_card_api.rb +622 -0
  162. data/lib/order_cloud/api/impersonation_config_api.rb +397 -0
  163. data/lib/order_cloud/api/line_item_api.rb +583 -0
  164. data/lib/order_cloud/api/me_api.rb +2345 -0
  165. data/lib/order_cloud/api/message_senders_api.rb +484 -0
  166. data/lib/order_cloud/api/order_api.rb +1377 -0
  167. data/lib/order_cloud/api/password_reset_api.rb +150 -0
  168. data/lib/order_cloud/api/payment_api.rb +513 -0
  169. data/lib/order_cloud/api/price_schedule_api.rb +519 -0
  170. data/lib/order_cloud/api/product_api.rb +1126 -0
  171. data/lib/order_cloud/api/promotion_api.rb +594 -0
  172. data/lib/order_cloud/api/security_profile_api.rb +363 -0
  173. data/lib/order_cloud/api/shipment_api.rb +665 -0
  174. data/lib/order_cloud/api/spec_api.rb +971 -0
  175. data/lib/order_cloud/api/spending_account_api.rb +622 -0
  176. data/lib/order_cloud/api/supplier_api.rb +397 -0
  177. data/lib/order_cloud/api/supplier_user_api.rb +489 -0
  178. data/lib/order_cloud/api/supplier_user_group_api.rb +614 -0
  179. data/lib/order_cloud/api/user_api.rb +489 -0
  180. data/lib/order_cloud/api/user_group_api.rb +614 -0
  181. data/lib/order_cloud/api_client.rb +385 -0
  182. data/lib/order_cloud/api_error.rb +47 -0
  183. data/lib/order_cloud/configuration.rb +245 -0
  184. data/lib/order_cloud/models/access_token.rb +226 -0
  185. data/lib/order_cloud/models/address.rb +307 -0
  186. data/lib/order_cloud/models/address_assignment.rb +235 -0
  187. data/lib/order_cloud/models/approval_rule.rb +244 -0
  188. data/lib/order_cloud/models/base_spec.rb +271 -0
  189. data/lib/order_cloud/models/buyer.rb +235 -0
  190. data/lib/order_cloud/models/buyer_address.rb +334 -0
  191. data/lib/order_cloud/models/buyer_credit_card.rb +271 -0
  192. data/lib/order_cloud/models/buyer_product.rb +334 -0
  193. data/lib/order_cloud/models/buyer_shipment.rb +298 -0
  194. data/lib/order_cloud/models/buyer_spec.rb +282 -0
  195. data/lib/order_cloud/models/catalog.rb +244 -0
  196. data/lib/order_cloud/models/catalog_assignment.rb +226 -0
  197. data/lib/order_cloud/models/category.rb +262 -0
  198. data/lib/order_cloud/models/category_assignment.rb +235 -0
  199. data/lib/order_cloud/models/category_product_assignment.rb +217 -0
  200. data/lib/order_cloud/models/cost_center.rb +226 -0
  201. data/lib/order_cloud/models/cost_center_assignment.rb +208 -0
  202. data/lib/order_cloud/models/credit_card.rb +262 -0
  203. data/lib/order_cloud/models/credit_card_assignment.rb +217 -0
  204. data/lib/order_cloud/models/impersonate_token_request.rb +210 -0
  205. data/lib/order_cloud/models/impersonation_config.rb +271 -0
  206. data/lib/order_cloud/models/inventory.rb +244 -0
  207. data/lib/order_cloud/models/line_item.rb +345 -0
  208. data/lib/order_cloud/models/line_item_product.rb +271 -0
  209. data/lib/order_cloud/models/line_item_spec.rb +226 -0
  210. data/lib/order_cloud/models/list_address.rb +210 -0
  211. data/lib/order_cloud/models/list_address_assignment.rb +210 -0
  212. data/lib/order_cloud/models/list_approval_rule.rb +210 -0
  213. data/lib/order_cloud/models/list_args.rb +248 -0
  214. data/lib/order_cloud/models/list_buyer.rb +210 -0
  215. data/lib/order_cloud/models/list_buyer_address.rb +210 -0
  216. data/lib/order_cloud/models/list_buyer_credit_card.rb +210 -0
  217. data/lib/order_cloud/models/list_buyer_product.rb +210 -0
  218. data/lib/order_cloud/models/list_buyer_shipment.rb +210 -0
  219. data/lib/order_cloud/models/list_buyer_spec.rb +210 -0
  220. data/lib/order_cloud/models/list_catalog.rb +210 -0
  221. data/lib/order_cloud/models/list_catalog_assignment.rb +210 -0
  222. data/lib/order_cloud/models/list_category.rb +210 -0
  223. data/lib/order_cloud/models/list_category_assignment.rb +210 -0
  224. data/lib/order_cloud/models/list_category_product_assignment.rb +210 -0
  225. data/lib/order_cloud/models/list_cost_center.rb +210 -0
  226. data/lib/order_cloud/models/list_cost_center_assignment.rb +210 -0
  227. data/lib/order_cloud/models/list_credit_card.rb +210 -0
  228. data/lib/order_cloud/models/list_credit_card_assignment.rb +210 -0
  229. data/lib/order_cloud/models/list_impersonation_config.rb +210 -0
  230. data/lib/order_cloud/models/list_line_item.rb +210 -0
  231. data/lib/order_cloud/models/list_message_cc_listener_assignment.rb +210 -0
  232. data/lib/order_cloud/models/list_message_config.rb +210 -0
  233. data/lib/order_cloud/models/list_message_sender.rb +210 -0
  234. data/lib/order_cloud/models/list_message_sender_assignment.rb +210 -0
  235. data/lib/order_cloud/models/list_order.rb +210 -0
  236. data/lib/order_cloud/models/list_order_approval.rb +210 -0
  237. data/lib/order_cloud/models/list_order_promotion.rb +210 -0
  238. data/lib/order_cloud/models/list_payment.rb +210 -0
  239. data/lib/order_cloud/models/list_price_schedule.rb +210 -0
  240. data/lib/order_cloud/models/list_product.rb +210 -0
  241. data/lib/order_cloud/models/list_product_assignment.rb +210 -0
  242. data/lib/order_cloud/models/list_product_catalog_assignment.rb +210 -0
  243. data/lib/order_cloud/models/list_promotion.rb +210 -0
  244. data/lib/order_cloud/models/list_promotion_assignment.rb +210 -0
  245. data/lib/order_cloud/models/list_security_profile.rb +210 -0
  246. data/lib/order_cloud/models/list_security_profile_assignment.rb +210 -0
  247. data/lib/order_cloud/models/list_shipment.rb +210 -0
  248. data/lib/order_cloud/models/list_shipment_item.rb +210 -0
  249. data/lib/order_cloud/models/list_spec.rb +210 -0
  250. data/lib/order_cloud/models/list_spec_option.rb +210 -0
  251. data/lib/order_cloud/models/list_spec_product_assignment.rb +210 -0
  252. data/lib/order_cloud/models/list_spending_account.rb +210 -0
  253. data/lib/order_cloud/models/list_spending_account_assignment.rb +210 -0
  254. data/lib/order_cloud/models/list_supplier.rb +210 -0
  255. data/lib/order_cloud/models/list_user.rb +210 -0
  256. data/lib/order_cloud/models/list_user_group.rb +210 -0
  257. data/lib/order_cloud/models/list_user_group_assignment.rb +210 -0
  258. data/lib/order_cloud/models/list_variant.rb +210 -0
  259. data/lib/order_cloud/models/me_buyer.rb +208 -0
  260. data/lib/order_cloud/models/me_user.rb +300 -0
  261. data/lib/order_cloud/models/message_cc_listener_assignment.rb +244 -0
  262. data/lib/order_cloud/models/message_config.rb +255 -0
  263. data/lib/order_cloud/models/message_sender.rb +219 -0
  264. data/lib/order_cloud/models/message_sender_assignment.rb +226 -0
  265. data/lib/order_cloud/models/meta.rb +237 -0
  266. data/lib/order_cloud/models/order.rb +397 -0
  267. data/lib/order_cloud/models/order_approval.rb +253 -0
  268. data/lib/order_cloud/models/order_approval_info.rb +208 -0
  269. data/lib/order_cloud/models/order_promotion.rb +325 -0
  270. data/lib/order_cloud/models/password_reset.rb +217 -0
  271. data/lib/order_cloud/models/password_reset_request.rb +226 -0
  272. data/lib/order_cloud/models/payment.rb +282 -0
  273. data/lib/order_cloud/models/payment_transaction.rb +262 -0
  274. data/lib/order_cloud/models/price_break.rb +208 -0
  275. data/lib/order_cloud/models/price_schedule.rb +282 -0
  276. data/lib/order_cloud/models/product.rb +334 -0
  277. data/lib/order_cloud/models/product_assignment.rb +226 -0
  278. data/lib/order_cloud/models/product_base.rb +325 -0
  279. data/lib/order_cloud/models/product_catalog_assignment.rb +208 -0
  280. data/lib/order_cloud/models/promotion.rb +316 -0
  281. data/lib/order_cloud/models/promotion_assignment.rb +217 -0
  282. data/lib/order_cloud/models/security_profile.rb +219 -0
  283. data/lib/order_cloud/models/security_profile_assignment.rb +235 -0
  284. data/lib/order_cloud/models/shipment.rb +307 -0
  285. data/lib/order_cloud/models/shipment_item.rb +273 -0
  286. data/lib/order_cloud/models/spec.rb +280 -0
  287. data/lib/order_cloud/models/spec_option.rb +253 -0
  288. data/lib/order_cloud/models/spec_product_assignment.rb +226 -0
  289. data/lib/order_cloud/models/spending_account.rb +262 -0
  290. data/lib/order_cloud/models/spending_account_assignment.rb +226 -0
  291. data/lib/order_cloud/models/supplier.rb +226 -0
  292. data/lib/order_cloud/models/token_password_reset.rb +199 -0
  293. data/lib/order_cloud/models/user.rb +291 -0
  294. data/lib/order_cloud/models/user_group.rb +226 -0
  295. data/lib/order_cloud/models/user_group_assignment.rb +208 -0
  296. data/lib/order_cloud/models/variant.rb +235 -0
  297. data/lib/order_cloud/version.rb +26 -0
  298. data/order_cloud-1.0.56.gem +0 -0
  299. data/order_cloud.gemspec +56 -0
  300. data/spec/api/address_api_spec.rb +179 -0
  301. data/spec/api/admin_address_api_spec.rb +125 -0
  302. data/spec/api/admin_user_api_spec.rb +125 -0
  303. data/spec/api/admin_user_group_api_spec.rb +165 -0
  304. data/spec/api/approval_rule_api_spec.rb +131 -0
  305. data/spec/api/auth_api_spec.rb +165 -0
  306. data/spec/api/buyer_api_spec.rb +125 -0
  307. data/spec/api/catalog_api_spec.rb +205 -0
  308. data/spec/api/category_api_spec.rb +223 -0
  309. data/spec/api/cost_center_api_spec.rb +177 -0
  310. data/spec/api/credit_card_api_spec.rb +177 -0
  311. data/spec/api/impersonation_config_api_spec.rb +125 -0
  312. data/spec/api/line_item_api_spec.rb +167 -0
  313. data/spec/api/me_api_spec.rb +568 -0
  314. data/spec/api/message_senders_api_spec.rb +149 -0
  315. data/spec/api/order_api_spec.rb +344 -0
  316. data/spec/api/password_reset_api_spec.rb +71 -0
  317. data/spec/api/payment_api_spec.rb +152 -0
  318. data/spec/api/price_schedule_api_spec.rb +151 -0
  319. data/spec/api/product_api_spec.rb +290 -0
  320. data/spec/api/promotion_api_spec.rb +170 -0
  321. data/spec/api/security_profile_api_spec.rb +122 -0
  322. data/spec/api/shipment_api_spec.rb +185 -0
  323. data/spec/api/spec_api_spec.rb +252 -0
  324. data/spec/api/spending_account_api_spec.rb +177 -0
  325. data/spec/api/supplier_api_spec.rb +125 -0
  326. data/spec/api/supplier_user_api_spec.rb +146 -0
  327. data/spec/api/supplier_user_group_api_spec.rb +174 -0
  328. data/spec/api/user_api_spec.rb +146 -0
  329. data/spec/api/user_group_api_spec.rb +174 -0
  330. data/spec/api_client_spec.rb +237 -0
  331. data/spec/configuration_spec.rb +80 -0
  332. data/spec/models/access_token_spec.rb +71 -0
  333. data/spec/models/address_assignment_spec.rb +77 -0
  334. data/spec/models/address_spec.rb +125 -0
  335. data/spec/models/approval_rule_spec.rb +83 -0
  336. data/spec/models/base_spec_spec.rb +101 -0
  337. data/spec/models/buyer_address_spec.rb +143 -0
  338. data/spec/models/buyer_credit_card_spec.rb +101 -0
  339. data/spec/models/buyer_product_spec.rb +143 -0
  340. data/spec/models/buyer_shipment_spec.rb +119 -0
  341. data/spec/models/buyer_spec.rb +77 -0
  342. data/spec/models/buyer_spec_spec.rb +107 -0
  343. data/spec/models/catalog_assignment_spec.rb +71 -0
  344. data/spec/models/catalog_spec.rb +83 -0
  345. data/spec/models/category_assignment_spec.rb +77 -0
  346. data/spec/models/category_product_assignment_spec.rb +65 -0
  347. data/spec/models/category_spec.rb +95 -0
  348. data/spec/models/cost_center_assignment_spec.rb +59 -0
  349. data/spec/models/cost_center_spec.rb +71 -0
  350. data/spec/models/credit_card_assignment_spec.rb +65 -0
  351. data/spec/models/credit_card_spec.rb +95 -0
  352. data/spec/models/impersonate_token_request_spec.rb +59 -0
  353. data/spec/models/impersonation_config_spec.rb +101 -0
  354. data/spec/models/inventory_spec.rb +83 -0
  355. data/spec/models/line_item_product_spec.rb +101 -0
  356. data/spec/models/line_item_spec.rb +149 -0
  357. data/spec/models/line_item_spec_spec.rb +71 -0
  358. data/spec/models/list_address_assignment_spec.rb +59 -0
  359. data/spec/models/list_address_spec.rb +59 -0
  360. data/spec/models/list_approval_rule_spec.rb +59 -0
  361. data/spec/models/list_args_spec.rb +83 -0
  362. data/spec/models/list_buyer_address_spec.rb +59 -0
  363. data/spec/models/list_buyer_credit_card_spec.rb +59 -0
  364. data/spec/models/list_buyer_product_spec.rb +59 -0
  365. data/spec/models/list_buyer_shipment_spec.rb +59 -0
  366. data/spec/models/list_buyer_spec.rb +59 -0
  367. data/spec/models/list_buyer_spec_spec.rb +59 -0
  368. data/spec/models/list_catalog_assignment_spec.rb +59 -0
  369. data/spec/models/list_catalog_spec.rb +59 -0
  370. data/spec/models/list_category_assignment_spec.rb +59 -0
  371. data/spec/models/list_category_product_assignment_spec.rb +59 -0
  372. data/spec/models/list_category_spec.rb +59 -0
  373. data/spec/models/list_cost_center_assignment_spec.rb +59 -0
  374. data/spec/models/list_cost_center_spec.rb +59 -0
  375. data/spec/models/list_credit_card_assignment_spec.rb +59 -0
  376. data/spec/models/list_credit_card_spec.rb +59 -0
  377. data/spec/models/list_impersonation_config_spec.rb +59 -0
  378. data/spec/models/list_line_item_spec.rb +59 -0
  379. data/spec/models/list_message_cc_listener_assignment_spec.rb +59 -0
  380. data/spec/models/list_message_config_spec.rb +59 -0
  381. data/spec/models/list_message_sender_assignment_spec.rb +59 -0
  382. data/spec/models/list_message_sender_spec.rb +59 -0
  383. data/spec/models/list_order_approval_spec.rb +59 -0
  384. data/spec/models/list_order_promotion_spec.rb +59 -0
  385. data/spec/models/list_order_spec.rb +59 -0
  386. data/spec/models/list_payment_spec.rb +59 -0
  387. data/spec/models/list_price_schedule_spec.rb +59 -0
  388. data/spec/models/list_product_assignment_spec.rb +59 -0
  389. data/spec/models/list_product_catalog_assignment_spec.rb +59 -0
  390. data/spec/models/list_product_spec.rb +59 -0
  391. data/spec/models/list_promotion_assignment_spec.rb +59 -0
  392. data/spec/models/list_promotion_spec.rb +59 -0
  393. data/spec/models/list_security_profile_assignment_spec.rb +59 -0
  394. data/spec/models/list_security_profile_spec.rb +59 -0
  395. data/spec/models/list_shipment_item_spec.rb +59 -0
  396. data/spec/models/list_shipment_spec.rb +59 -0
  397. data/spec/models/list_spec_option_spec.rb +59 -0
  398. data/spec/models/list_spec_product_assignment_spec.rb +59 -0
  399. data/spec/models/list_spec_spec.rb +59 -0
  400. data/spec/models/list_spending_account_assignment_spec.rb +59 -0
  401. data/spec/models/list_spending_account_spec.rb +59 -0
  402. data/spec/models/list_supplier_spec.rb +59 -0
  403. data/spec/models/list_user_group_assignment_spec.rb +59 -0
  404. data/spec/models/list_user_group_spec.rb +59 -0
  405. data/spec/models/list_user_spec.rb +59 -0
  406. data/spec/models/list_variant_spec.rb +59 -0
  407. data/spec/models/me_buyer_spec.rb +59 -0
  408. data/spec/models/me_user_spec.rb +119 -0
  409. data/spec/models/message_cc_listener_assignment_spec.rb +83 -0
  410. data/spec/models/message_config_spec.rb +89 -0
  411. data/spec/models/message_sender_assignment_spec.rb +71 -0
  412. data/spec/models/message_sender_spec.rb +65 -0
  413. data/spec/models/meta_spec.rb +77 -0
  414. data/spec/models/order_approval_info_spec.rb +59 -0
  415. data/spec/models/order_approval_spec.rb +89 -0
  416. data/spec/models/order_promotion_spec.rb +137 -0
  417. data/spec/models/order_spec.rb +185 -0
  418. data/spec/models/password_reset_request_spec.rb +71 -0
  419. data/spec/models/password_reset_spec.rb +65 -0
  420. data/spec/models/payment_spec.rb +107 -0
  421. data/spec/models/payment_transaction_spec.rb +95 -0
  422. data/spec/models/price_break_spec.rb +59 -0
  423. data/spec/models/price_schedule_spec.rb +107 -0
  424. data/spec/models/product_assignment_spec.rb +71 -0
  425. data/spec/models/product_base_spec.rb +137 -0
  426. data/spec/models/product_catalog_assignment_spec.rb +59 -0
  427. data/spec/models/product_spec.rb +143 -0
  428. data/spec/models/promotion_assignment_spec.rb +65 -0
  429. data/spec/models/promotion_spec.rb +131 -0
  430. data/spec/models/security_profile_assignment_spec.rb +77 -0
  431. data/spec/models/security_profile_spec.rb +65 -0
  432. data/spec/models/shipment_item_spec.rb +101 -0
  433. data/spec/models/shipment_spec.rb +125 -0
  434. data/spec/models/spec_option_spec.rb +89 -0
  435. data/spec/models/spec_product_assignment_spec.rb +71 -0
  436. data/spec/models/spec_spec.rb +107 -0
  437. data/spec/models/spending_account_assignment_spec.rb +71 -0
  438. data/spec/models/spending_account_spec.rb +95 -0
  439. data/spec/models/supplier_spec.rb +71 -0
  440. data/spec/models/token_password_reset_spec.rb +53 -0
  441. data/spec/models/user_group_assignment_spec.rb +59 -0
  442. data/spec/models/user_group_spec.rb +71 -0
  443. data/spec/models/user_spec.rb +113 -0
  444. data/spec/models/variant_spec.rb +77 -0
  445. data/spec/spec_helper.rb +122 -0
  446. metadata +596 -6
@@ -0,0 +1,1126 @@
1
+ =begin
2
+ #OrderCloud
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0
7
+ Contact: ordercloud@four51.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module OrderCloud
27
+ class ProductApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ #
35
+ #
36
+ # @param product
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Product]
39
+ def create(product, opts = {})
40
+ data, _status_code, _headers = create_with_http_info(product, opts)
41
+ return data
42
+ end
43
+
44
+ #
45
+ #
46
+ # @param product
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
49
+ def create_with_http_info(product, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: ProductApi.create ..."
52
+ end
53
+ # verify the required parameter 'product' is set
54
+ fail ArgumentError, "Missing the required parameter 'product' when calling ProductApi.create" if product.nil?
55
+ # resource path
56
+ local_var_path = "/products".sub('{format}','json')
57
+
58
+ # query parameters
59
+ query_params = {}
60
+
61
+ # header parameters
62
+ header_params = {}
63
+
64
+ # HTTP header 'Accept' (if needed)
65
+ local_header_accept = ['application/json']
66
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
67
+
68
+ # HTTP header 'Content-Type'
69
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = @api_client.object_to_http_body(product)
77
+ auth_names = ['oauth2']
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'Product')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: ProductApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ #
92
+ #
93
+ # @param product_id ID of the product.
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [nil]
96
+ def delete(product_id, opts = {})
97
+ delete_with_http_info(product_id, opts)
98
+ return nil
99
+ end
100
+
101
+ #
102
+ #
103
+ # @param product_id ID of the product.
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
106
+ def delete_with_http_info(product_id, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug "Calling API: ProductApi.delete ..."
109
+ end
110
+ # verify the required parameter 'product_id' is set
111
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.delete" if product_id.nil?
112
+ # resource path
113
+ local_var_path = "/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
114
+
115
+ # query parameters
116
+ query_params = {}
117
+
118
+ # header parameters
119
+ header_params = {}
120
+
121
+ # HTTP header 'Accept' (if needed)
122
+ local_header_accept = ['application/json']
123
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
124
+
125
+ # HTTP header 'Content-Type'
126
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
127
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
128
+
129
+ # form parameters
130
+ form_params = {}
131
+
132
+ # http body (model)
133
+ post_body = nil
134
+ auth_names = ['oauth2']
135
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
136
+ :header_params => header_params,
137
+ :query_params => query_params,
138
+ :form_params => form_params,
139
+ :body => post_body,
140
+ :auth_names => auth_names)
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "API called: ProductApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ end
144
+ return data, status_code, headers
145
+ end
146
+
147
+ #
148
+ #
149
+ # @param product_id ID of the product.
150
+ # @param buyer_id ID of the buyer.
151
+ # @param [Hash] opts the optional parameters
152
+ # @option opts [String] :user_id ID of the user.
153
+ # @option opts [String] :user_group_id ID of the user group.
154
+ # @return [nil]
155
+ def delete_assignment(product_id, buyer_id, opts = {})
156
+ delete_assignment_with_http_info(product_id, buyer_id, opts)
157
+ return nil
158
+ end
159
+
160
+ #
161
+ #
162
+ # @param product_id ID of the product.
163
+ # @param buyer_id ID of the buyer.
164
+ # @param [Hash] opts the optional parameters
165
+ # @option opts [String] :user_id ID of the user.
166
+ # @option opts [String] :user_group_id ID of the user group.
167
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
168
+ def delete_assignment_with_http_info(product_id, buyer_id, opts = {})
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug "Calling API: ProductApi.delete_assignment ..."
171
+ end
172
+ # verify the required parameter 'product_id' is set
173
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.delete_assignment" if product_id.nil?
174
+ # verify the required parameter 'buyer_id' is set
175
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ProductApi.delete_assignment" if buyer_id.nil?
176
+ # resource path
177
+ local_var_path = "/products/{productID}/assignments/{buyerID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'buyerID' + '}', buyer_id.to_s)
178
+
179
+ # query parameters
180
+ query_params = {}
181
+ query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
182
+ query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
183
+
184
+ # header parameters
185
+ header_params = {}
186
+
187
+ # HTTP header 'Accept' (if needed)
188
+ local_header_accept = ['application/json']
189
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
190
+
191
+ # HTTP header 'Content-Type'
192
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
193
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
194
+
195
+ # form parameters
196
+ form_params = {}
197
+
198
+ # http body (model)
199
+ post_body = nil
200
+ auth_names = ['oauth2']
201
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
202
+ :header_params => header_params,
203
+ :query_params => query_params,
204
+ :form_params => form_params,
205
+ :body => post_body,
206
+ :auth_names => auth_names)
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: ProductApi#delete_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+
213
+ #
214
+ #
215
+ # @param product_id ID of the product.
216
+ # @param [Hash] opts the optional parameters
217
+ # @option opts [BOOLEAN] :overwrite_existing Overwrite existing of the product.
218
+ # @return [Product]
219
+ def generate_variants(product_id, opts = {})
220
+ data, _status_code, _headers = generate_variants_with_http_info(product_id, opts)
221
+ return data
222
+ end
223
+
224
+ #
225
+ #
226
+ # @param product_id ID of the product.
227
+ # @param [Hash] opts the optional parameters
228
+ # @option opts [BOOLEAN] :overwrite_existing Overwrite existing of the product.
229
+ # @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
230
+ def generate_variants_with_http_info(product_id, opts = {})
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug "Calling API: ProductApi.generate_variants ..."
233
+ end
234
+ # verify the required parameter 'product_id' is set
235
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.generate_variants" if product_id.nil?
236
+ # resource path
237
+ local_var_path = "/products/{productID}/variants/generate".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
238
+
239
+ # query parameters
240
+ query_params = {}
241
+ query_params[:'overwriteExisting'] = opts[:'overwrite_existing'] if !opts[:'overwrite_existing'].nil?
242
+
243
+ # header parameters
244
+ header_params = {}
245
+
246
+ # HTTP header 'Accept' (if needed)
247
+ local_header_accept = ['application/json']
248
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
249
+
250
+ # HTTP header 'Content-Type'
251
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
252
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
253
+
254
+ # form parameters
255
+ form_params = {}
256
+
257
+ # http body (model)
258
+ post_body = nil
259
+ auth_names = ['oauth2']
260
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
261
+ :header_params => header_params,
262
+ :query_params => query_params,
263
+ :form_params => form_params,
264
+ :body => post_body,
265
+ :auth_names => auth_names,
266
+ :return_type => 'Product')
267
+ if @api_client.config.debugging
268
+ @api_client.config.logger.debug "API called: ProductApi#generate_variants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
269
+ end
270
+ return data, status_code, headers
271
+ end
272
+
273
+ #
274
+ #
275
+ # @param product_id ID of the product.
276
+ # @param [Hash] opts the optional parameters
277
+ # @return [Product]
278
+ def get(product_id, opts = {})
279
+ data, _status_code, _headers = get_with_http_info(product_id, opts)
280
+ return data
281
+ end
282
+
283
+ #
284
+ #
285
+ # @param product_id ID of the product.
286
+ # @param [Hash] opts the optional parameters
287
+ # @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
288
+ def get_with_http_info(product_id, opts = {})
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug "Calling API: ProductApi.get ..."
291
+ end
292
+ # verify the required parameter 'product_id' is set
293
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.get" if product_id.nil?
294
+ # resource path
295
+ local_var_path = "/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
296
+
297
+ # query parameters
298
+ query_params = {}
299
+
300
+ # header parameters
301
+ header_params = {}
302
+
303
+ # HTTP header 'Accept' (if needed)
304
+ local_header_accept = ['application/json']
305
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
306
+
307
+ # HTTP header 'Content-Type'
308
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
309
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
310
+
311
+ # form parameters
312
+ form_params = {}
313
+
314
+ # http body (model)
315
+ post_body = nil
316
+ auth_names = ['oauth2']
317
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
318
+ :header_params => header_params,
319
+ :query_params => query_params,
320
+ :form_params => form_params,
321
+ :body => post_body,
322
+ :auth_names => auth_names,
323
+ :return_type => 'Product')
324
+ if @api_client.config.debugging
325
+ @api_client.config.logger.debug "API called: ProductApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
326
+ end
327
+ return data, status_code, headers
328
+ end
329
+
330
+ #
331
+ #
332
+ # @param product_id ID of the product.
333
+ # @param variant_id ID of the variant.
334
+ # @param [Hash] opts the optional parameters
335
+ # @return [Variant]
336
+ def get_variant(product_id, variant_id, opts = {})
337
+ data, _status_code, _headers = get_variant_with_http_info(product_id, variant_id, opts)
338
+ return data
339
+ end
340
+
341
+ #
342
+ #
343
+ # @param product_id ID of the product.
344
+ # @param variant_id ID of the variant.
345
+ # @param [Hash] opts the optional parameters
346
+ # @return [Array<(Variant, Fixnum, Hash)>] Variant data, response status code and response headers
347
+ def get_variant_with_http_info(product_id, variant_id, opts = {})
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug "Calling API: ProductApi.get_variant ..."
350
+ end
351
+ # verify the required parameter 'product_id' is set
352
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.get_variant" if product_id.nil?
353
+ # verify the required parameter 'variant_id' is set
354
+ fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.get_variant" if variant_id.nil?
355
+ # resource path
356
+ local_var_path = "/products/{productID}/variants/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
357
+
358
+ # query parameters
359
+ query_params = {}
360
+
361
+ # header parameters
362
+ header_params = {}
363
+
364
+ # HTTP header 'Accept' (if needed)
365
+ local_header_accept = ['application/json']
366
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
367
+
368
+ # HTTP header 'Content-Type'
369
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
370
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
371
+
372
+ # form parameters
373
+ form_params = {}
374
+
375
+ # http body (model)
376
+ post_body = nil
377
+ auth_names = ['oauth2']
378
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
379
+ :header_params => header_params,
380
+ :query_params => query_params,
381
+ :form_params => form_params,
382
+ :body => post_body,
383
+ :auth_names => auth_names,
384
+ :return_type => 'Variant')
385
+ if @api_client.config.debugging
386
+ @api_client.config.logger.debug "API called: ProductApi#get_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
387
+ end
388
+ return data, status_code, headers
389
+ end
390
+
391
+ #
392
+ #
393
+ # @param [Hash] opts the optional parameters
394
+ # @option opts [String] :catalog_id ID of the catalog.
395
+ # @option opts [String] :category_id ID of the category.
396
+ # @option opts [String] :supplier_id ID of the supplier.
397
+ # @option opts [String] :search Search of the product.
398
+ # @option opts [Array<String>] :search_on Search on of the product.
399
+ # @option opts [Array<String>] :sort_by Sort by of the product.
400
+ # @option opts [Integer] :page Page of the product.
401
+ # @option opts [Integer] :page_size Page size of the product.
402
+ # @option opts [Hash<String, String>] :filters Filters of the product.
403
+ # @return [ListProduct]
404
+ def list(opts = {})
405
+ data, _status_code, _headers = list_with_http_info(opts)
406
+ return data
407
+ end
408
+
409
+ #
410
+ #
411
+ # @param [Hash] opts the optional parameters
412
+ # @option opts [String] :catalog_id ID of the catalog.
413
+ # @option opts [String] :category_id ID of the category.
414
+ # @option opts [String] :supplier_id ID of the supplier.
415
+ # @option opts [String] :search Search of the product.
416
+ # @option opts [Array<String>] :search_on Search on of the product.
417
+ # @option opts [Array<String>] :sort_by Sort by of the product.
418
+ # @option opts [Integer] :page Page of the product.
419
+ # @option opts [Integer] :page_size Page size of the product.
420
+ # @option opts [Hash<String, String>] :filters Filters of the product.
421
+ # @return [Array<(ListProduct, Fixnum, Hash)>] ListProduct data, response status code and response headers
422
+ def list_with_http_info(opts = {})
423
+ if @api_client.config.debugging
424
+ @api_client.config.logger.debug "Calling API: ProductApi.list ..."
425
+ end
426
+ # resource path
427
+ local_var_path = "/products".sub('{format}','json')
428
+
429
+ # query parameters
430
+ query_params = {}
431
+ query_params[:'catalogID'] = opts[:'catalog_id'] if !opts[:'catalog_id'].nil?
432
+ query_params[:'categoryID'] = opts[:'category_id'] if !opts[:'category_id'].nil?
433
+ query_params[:'supplierID'] = opts[:'supplier_id'] if !opts[:'supplier_id'].nil?
434
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
435
+ query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
436
+ query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
437
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
438
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
439
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
440
+
441
+ # header parameters
442
+ header_params = {}
443
+
444
+ # HTTP header 'Accept' (if needed)
445
+ local_header_accept = ['application/json']
446
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
447
+
448
+ # HTTP header 'Content-Type'
449
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
450
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
451
+
452
+ # form parameters
453
+ form_params = {}
454
+
455
+ # http body (model)
456
+ post_body = nil
457
+ auth_names = ['oauth2']
458
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
459
+ :header_params => header_params,
460
+ :query_params => query_params,
461
+ :form_params => form_params,
462
+ :body => post_body,
463
+ :auth_names => auth_names,
464
+ :return_type => 'ListProduct')
465
+ if @api_client.config.debugging
466
+ @api_client.config.logger.debug "API called: ProductApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
467
+ end
468
+ return data, status_code, headers
469
+ end
470
+
471
+ #
472
+ #
473
+ # @param [Hash] opts the optional parameters
474
+ # @option opts [String] :product_id ID of the product.
475
+ # @option opts [String] :price_schedule_id ID of the price schedule.
476
+ # @option opts [String] :buyer_id ID of the buyer.
477
+ # @option opts [String] :user_id ID of the user.
478
+ # @option opts [String] :user_group_id ID of the user group.
479
+ # @option opts [String] :level Level of the product.
480
+ # @option opts [Integer] :page Page of the product.
481
+ # @option opts [Integer] :page_size Page size of the product.
482
+ # @return [ListProductAssignment]
483
+ def list_assignments(opts = {})
484
+ data, _status_code, _headers = list_assignments_with_http_info(opts)
485
+ return data
486
+ end
487
+
488
+ #
489
+ #
490
+ # @param [Hash] opts the optional parameters
491
+ # @option opts [String] :product_id ID of the product.
492
+ # @option opts [String] :price_schedule_id ID of the price schedule.
493
+ # @option opts [String] :buyer_id ID of the buyer.
494
+ # @option opts [String] :user_id ID of the user.
495
+ # @option opts [String] :user_group_id ID of the user group.
496
+ # @option opts [String] :level Level of the product.
497
+ # @option opts [Integer] :page Page of the product.
498
+ # @option opts [Integer] :page_size Page size of the product.
499
+ # @return [Array<(ListProductAssignment, Fixnum, Hash)>] ListProductAssignment data, response status code and response headers
500
+ def list_assignments_with_http_info(opts = {})
501
+ if @api_client.config.debugging
502
+ @api_client.config.logger.debug "Calling API: ProductApi.list_assignments ..."
503
+ end
504
+ # resource path
505
+ local_var_path = "/products/assignments".sub('{format}','json')
506
+
507
+ # query parameters
508
+ query_params = {}
509
+ query_params[:'productID'] = opts[:'product_id'] if !opts[:'product_id'].nil?
510
+ query_params[:'priceScheduleID'] = opts[:'price_schedule_id'] if !opts[:'price_schedule_id'].nil?
511
+ query_params[:'buyerID'] = opts[:'buyer_id'] if !opts[:'buyer_id'].nil?
512
+ query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
513
+ query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
514
+ query_params[:'level'] = opts[:'level'] if !opts[:'level'].nil?
515
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
516
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
517
+
518
+ # header parameters
519
+ header_params = {}
520
+
521
+ # HTTP header 'Accept' (if needed)
522
+ local_header_accept = ['application/json']
523
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
524
+
525
+ # HTTP header 'Content-Type'
526
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
527
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
528
+
529
+ # form parameters
530
+ form_params = {}
531
+
532
+ # http body (model)
533
+ post_body = nil
534
+ auth_names = ['oauth2']
535
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
536
+ :header_params => header_params,
537
+ :query_params => query_params,
538
+ :form_params => form_params,
539
+ :body => post_body,
540
+ :auth_names => auth_names,
541
+ :return_type => 'ListProductAssignment')
542
+ if @api_client.config.debugging
543
+ @api_client.config.logger.debug "API called: ProductApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
544
+ end
545
+ return data, status_code, headers
546
+ end
547
+
548
+ #
549
+ #
550
+ # @param product_id ID of the product.
551
+ # @param [Hash] opts the optional parameters
552
+ # @option opts [String] :search Search of the product.
553
+ # @option opts [Array<String>] :search_on Search on of the product.
554
+ # @option opts [Array<String>] :sort_by Sort by of the product.
555
+ # @option opts [Integer] :page Page of the product.
556
+ # @option opts [Integer] :page_size Page size of the product.
557
+ # @option opts [Hash<String, String>] :filters Filters of the product.
558
+ # @return [ListSupplier]
559
+ def list_suppliers(product_id, opts = {})
560
+ data, _status_code, _headers = list_suppliers_with_http_info(product_id, opts)
561
+ return data
562
+ end
563
+
564
+ #
565
+ #
566
+ # @param product_id ID of the product.
567
+ # @param [Hash] opts the optional parameters
568
+ # @option opts [String] :search Search of the product.
569
+ # @option opts [Array<String>] :search_on Search on of the product.
570
+ # @option opts [Array<String>] :sort_by Sort by of the product.
571
+ # @option opts [Integer] :page Page of the product.
572
+ # @option opts [Integer] :page_size Page size of the product.
573
+ # @option opts [Hash<String, String>] :filters Filters of the product.
574
+ # @return [Array<(ListSupplier, Fixnum, Hash)>] ListSupplier data, response status code and response headers
575
+ def list_suppliers_with_http_info(product_id, opts = {})
576
+ if @api_client.config.debugging
577
+ @api_client.config.logger.debug "Calling API: ProductApi.list_suppliers ..."
578
+ end
579
+ # verify the required parameter 'product_id' is set
580
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.list_suppliers" if product_id.nil?
581
+ # resource path
582
+ local_var_path = "/products/{productID}/suppliers".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
583
+
584
+ # query parameters
585
+ query_params = {}
586
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
587
+ query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
588
+ query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
589
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
590
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
591
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
592
+
593
+ # header parameters
594
+ header_params = {}
595
+
596
+ # HTTP header 'Accept' (if needed)
597
+ local_header_accept = ['application/json']
598
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
599
+
600
+ # HTTP header 'Content-Type'
601
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
602
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
603
+
604
+ # form parameters
605
+ form_params = {}
606
+
607
+ # http body (model)
608
+ post_body = nil
609
+ auth_names = ['oauth2']
610
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
611
+ :header_params => header_params,
612
+ :query_params => query_params,
613
+ :form_params => form_params,
614
+ :body => post_body,
615
+ :auth_names => auth_names,
616
+ :return_type => 'ListSupplier')
617
+ if @api_client.config.debugging
618
+ @api_client.config.logger.debug "API called: ProductApi#list_suppliers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
619
+ end
620
+ return data, status_code, headers
621
+ end
622
+
623
+ #
624
+ #
625
+ # @param product_id ID of the product.
626
+ # @param [Hash] opts the optional parameters
627
+ # @option opts [String] :search Search of the product.
628
+ # @option opts [Array<String>] :search_on Search on of the product.
629
+ # @option opts [Array<String>] :sort_by Sort by of the product.
630
+ # @option opts [Integer] :page Page of the product.
631
+ # @option opts [Integer] :page_size Page size of the product.
632
+ # @option opts [Hash<String, String>] :filters Filters of the product.
633
+ # @return [ListVariant]
634
+ def list_variants(product_id, opts = {})
635
+ data, _status_code, _headers = list_variants_with_http_info(product_id, opts)
636
+ return data
637
+ end
638
+
639
+ #
640
+ #
641
+ # @param product_id ID of the product.
642
+ # @param [Hash] opts the optional parameters
643
+ # @option opts [String] :search Search of the product.
644
+ # @option opts [Array<String>] :search_on Search on of the product.
645
+ # @option opts [Array<String>] :sort_by Sort by of the product.
646
+ # @option opts [Integer] :page Page of the product.
647
+ # @option opts [Integer] :page_size Page size of the product.
648
+ # @option opts [Hash<String, String>] :filters Filters of the product.
649
+ # @return [Array<(ListVariant, Fixnum, Hash)>] ListVariant data, response status code and response headers
650
+ def list_variants_with_http_info(product_id, opts = {})
651
+ if @api_client.config.debugging
652
+ @api_client.config.logger.debug "Calling API: ProductApi.list_variants ..."
653
+ end
654
+ # verify the required parameter 'product_id' is set
655
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.list_variants" if product_id.nil?
656
+ # resource path
657
+ local_var_path = "/products/{productID}/variants".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
658
+
659
+ # query parameters
660
+ query_params = {}
661
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
662
+ query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
663
+ query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
664
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
665
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
666
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
667
+
668
+ # header parameters
669
+ header_params = {}
670
+
671
+ # HTTP header 'Accept' (if needed)
672
+ local_header_accept = ['application/json']
673
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
674
+
675
+ # HTTP header 'Content-Type'
676
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
677
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
678
+
679
+ # form parameters
680
+ form_params = {}
681
+
682
+ # http body (model)
683
+ post_body = nil
684
+ auth_names = ['oauth2']
685
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
686
+ :header_params => header_params,
687
+ :query_params => query_params,
688
+ :form_params => form_params,
689
+ :body => post_body,
690
+ :auth_names => auth_names,
691
+ :return_type => 'ListVariant')
692
+ if @api_client.config.debugging
693
+ @api_client.config.logger.debug "API called: ProductApi#list_variants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
694
+ end
695
+ return data, status_code, headers
696
+ end
697
+
698
+ #
699
+ #
700
+ # @param product_id ID of the product.
701
+ # @param product
702
+ # @param [Hash] opts the optional parameters
703
+ # @return [Product]
704
+ def patch(product_id, product, opts = {})
705
+ data, _status_code, _headers = patch_with_http_info(product_id, product, opts)
706
+ return data
707
+ end
708
+
709
+ #
710
+ #
711
+ # @param product_id ID of the product.
712
+ # @param product
713
+ # @param [Hash] opts the optional parameters
714
+ # @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
715
+ def patch_with_http_info(product_id, product, opts = {})
716
+ if @api_client.config.debugging
717
+ @api_client.config.logger.debug "Calling API: ProductApi.patch ..."
718
+ end
719
+ # verify the required parameter 'product_id' is set
720
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.patch" if product_id.nil?
721
+ # verify the required parameter 'product' is set
722
+ fail ArgumentError, "Missing the required parameter 'product' when calling ProductApi.patch" if product.nil?
723
+ # resource path
724
+ local_var_path = "/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
725
+
726
+ # query parameters
727
+ query_params = {}
728
+
729
+ # header parameters
730
+ header_params = {}
731
+
732
+ # HTTP header 'Accept' (if needed)
733
+ local_header_accept = ['application/json']
734
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
735
+
736
+ # HTTP header 'Content-Type'
737
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
738
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
739
+
740
+ # form parameters
741
+ form_params = {}
742
+
743
+ # http body (model)
744
+ post_body = @api_client.object_to_http_body(product)
745
+ auth_names = ['oauth2']
746
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
747
+ :header_params => header_params,
748
+ :query_params => query_params,
749
+ :form_params => form_params,
750
+ :body => post_body,
751
+ :auth_names => auth_names,
752
+ :return_type => 'Product')
753
+ if @api_client.config.debugging
754
+ @api_client.config.logger.debug "API called: ProductApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
755
+ end
756
+ return data, status_code, headers
757
+ end
758
+
759
+ #
760
+ #
761
+ # @param product_id ID of the product.
762
+ # @param variant_id ID of the variant.
763
+ # @param variant
764
+ # @param [Hash] opts the optional parameters
765
+ # @return [Variant]
766
+ def patch_variant(product_id, variant_id, variant, opts = {})
767
+ data, _status_code, _headers = patch_variant_with_http_info(product_id, variant_id, variant, opts)
768
+ return data
769
+ end
770
+
771
+ #
772
+ #
773
+ # @param product_id ID of the product.
774
+ # @param variant_id ID of the variant.
775
+ # @param variant
776
+ # @param [Hash] opts the optional parameters
777
+ # @return [Array<(Variant, Fixnum, Hash)>] Variant data, response status code and response headers
778
+ def patch_variant_with_http_info(product_id, variant_id, variant, opts = {})
779
+ if @api_client.config.debugging
780
+ @api_client.config.logger.debug "Calling API: ProductApi.patch_variant ..."
781
+ end
782
+ # verify the required parameter 'product_id' is set
783
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.patch_variant" if product_id.nil?
784
+ # verify the required parameter 'variant_id' is set
785
+ fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.patch_variant" if variant_id.nil?
786
+ # verify the required parameter 'variant' is set
787
+ fail ArgumentError, "Missing the required parameter 'variant' when calling ProductApi.patch_variant" if variant.nil?
788
+ # resource path
789
+ local_var_path = "/products/{productID}/variants/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
790
+
791
+ # query parameters
792
+ query_params = {}
793
+
794
+ # header parameters
795
+ header_params = {}
796
+
797
+ # HTTP header 'Accept' (if needed)
798
+ local_header_accept = ['application/json']
799
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
800
+
801
+ # HTTP header 'Content-Type'
802
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
803
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
804
+
805
+ # form parameters
806
+ form_params = {}
807
+
808
+ # http body (model)
809
+ post_body = @api_client.object_to_http_body(variant)
810
+ auth_names = ['oauth2']
811
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
812
+ :header_params => header_params,
813
+ :query_params => query_params,
814
+ :form_params => form_params,
815
+ :body => post_body,
816
+ :auth_names => auth_names,
817
+ :return_type => 'Variant')
818
+ if @api_client.config.debugging
819
+ @api_client.config.logger.debug "API called: ProductApi#patch_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
820
+ end
821
+ return data, status_code, headers
822
+ end
823
+
824
+ #
825
+ #
826
+ # @param product_id ID of the product.
827
+ # @param supplier_id ID of the supplier.
828
+ # @param [Hash] opts the optional parameters
829
+ # @return [nil]
830
+ def remove_supplier(product_id, supplier_id, opts = {})
831
+ remove_supplier_with_http_info(product_id, supplier_id, opts)
832
+ return nil
833
+ end
834
+
835
+ #
836
+ #
837
+ # @param product_id ID of the product.
838
+ # @param supplier_id ID of the supplier.
839
+ # @param [Hash] opts the optional parameters
840
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
841
+ def remove_supplier_with_http_info(product_id, supplier_id, opts = {})
842
+ if @api_client.config.debugging
843
+ @api_client.config.logger.debug "Calling API: ProductApi.remove_supplier ..."
844
+ end
845
+ # verify the required parameter 'product_id' is set
846
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.remove_supplier" if product_id.nil?
847
+ # verify the required parameter 'supplier_id' is set
848
+ fail ArgumentError, "Missing the required parameter 'supplier_id' when calling ProductApi.remove_supplier" if supplier_id.nil?
849
+ # resource path
850
+ local_var_path = "/products/{productID}/suppliers/{supplierID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'supplierID' + '}', supplier_id.to_s)
851
+
852
+ # query parameters
853
+ query_params = {}
854
+
855
+ # header parameters
856
+ header_params = {}
857
+
858
+ # HTTP header 'Accept' (if needed)
859
+ local_header_accept = ['application/json']
860
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
861
+
862
+ # HTTP header 'Content-Type'
863
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
864
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
865
+
866
+ # form parameters
867
+ form_params = {}
868
+
869
+ # http body (model)
870
+ post_body = nil
871
+ auth_names = ['oauth2']
872
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
873
+ :header_params => header_params,
874
+ :query_params => query_params,
875
+ :form_params => form_params,
876
+ :body => post_body,
877
+ :auth_names => auth_names)
878
+ if @api_client.config.debugging
879
+ @api_client.config.logger.debug "API called: ProductApi#remove_supplier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
880
+ end
881
+ return data, status_code, headers
882
+ end
883
+
884
+ #
885
+ #
886
+ # @param product_assignment
887
+ # @param [Hash] opts the optional parameters
888
+ # @return [nil]
889
+ def save_assignment(product_assignment, opts = {})
890
+ save_assignment_with_http_info(product_assignment, opts)
891
+ return nil
892
+ end
893
+
894
+ #
895
+ #
896
+ # @param product_assignment
897
+ # @param [Hash] opts the optional parameters
898
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
899
+ def save_assignment_with_http_info(product_assignment, opts = {})
900
+ if @api_client.config.debugging
901
+ @api_client.config.logger.debug "Calling API: ProductApi.save_assignment ..."
902
+ end
903
+ # verify the required parameter 'product_assignment' is set
904
+ fail ArgumentError, "Missing the required parameter 'product_assignment' when calling ProductApi.save_assignment" if product_assignment.nil?
905
+ # resource path
906
+ local_var_path = "/products/assignments".sub('{format}','json')
907
+
908
+ # query parameters
909
+ query_params = {}
910
+
911
+ # header parameters
912
+ header_params = {}
913
+
914
+ # HTTP header 'Accept' (if needed)
915
+ local_header_accept = ['application/json']
916
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
917
+
918
+ # HTTP header 'Content-Type'
919
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
920
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
921
+
922
+ # form parameters
923
+ form_params = {}
924
+
925
+ # http body (model)
926
+ post_body = @api_client.object_to_http_body(product_assignment)
927
+ auth_names = ['oauth2']
928
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
929
+ :header_params => header_params,
930
+ :query_params => query_params,
931
+ :form_params => form_params,
932
+ :body => post_body,
933
+ :auth_names => auth_names)
934
+ if @api_client.config.debugging
935
+ @api_client.config.logger.debug "API called: ProductApi#save_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
936
+ end
937
+ return data, status_code, headers
938
+ end
939
+
940
+ #
941
+ #
942
+ # @param product_id ID of the product.
943
+ # @param supplier_id ID of the supplier.
944
+ # @param [Hash] opts the optional parameters
945
+ # @return [nil]
946
+ def save_supplier(product_id, supplier_id, opts = {})
947
+ save_supplier_with_http_info(product_id, supplier_id, opts)
948
+ return nil
949
+ end
950
+
951
+ #
952
+ #
953
+ # @param product_id ID of the product.
954
+ # @param supplier_id ID of the supplier.
955
+ # @param [Hash] opts the optional parameters
956
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
957
+ def save_supplier_with_http_info(product_id, supplier_id, opts = {})
958
+ if @api_client.config.debugging
959
+ @api_client.config.logger.debug "Calling API: ProductApi.save_supplier ..."
960
+ end
961
+ # verify the required parameter 'product_id' is set
962
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.save_supplier" if product_id.nil?
963
+ # verify the required parameter 'supplier_id' is set
964
+ fail ArgumentError, "Missing the required parameter 'supplier_id' when calling ProductApi.save_supplier" if supplier_id.nil?
965
+ # resource path
966
+ local_var_path = "/products/{productID}/suppliers/{supplierID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'supplierID' + '}', supplier_id.to_s)
967
+
968
+ # query parameters
969
+ query_params = {}
970
+
971
+ # header parameters
972
+ header_params = {}
973
+
974
+ # HTTP header 'Accept' (if needed)
975
+ local_header_accept = ['application/json']
976
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
977
+
978
+ # HTTP header 'Content-Type'
979
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
980
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
981
+
982
+ # form parameters
983
+ form_params = {}
984
+
985
+ # http body (model)
986
+ post_body = nil
987
+ auth_names = ['oauth2']
988
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
989
+ :header_params => header_params,
990
+ :query_params => query_params,
991
+ :form_params => form_params,
992
+ :body => post_body,
993
+ :auth_names => auth_names)
994
+ if @api_client.config.debugging
995
+ @api_client.config.logger.debug "API called: ProductApi#save_supplier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
996
+ end
997
+ return data, status_code, headers
998
+ end
999
+
1000
+ #
1001
+ #
1002
+ # @param product_id ID of the product.
1003
+ # @param product
1004
+ # @param [Hash] opts the optional parameters
1005
+ # @return [Product]
1006
+ def update(product_id, product, opts = {})
1007
+ data, _status_code, _headers = update_with_http_info(product_id, product, opts)
1008
+ return data
1009
+ end
1010
+
1011
+ #
1012
+ #
1013
+ # @param product_id ID of the product.
1014
+ # @param product
1015
+ # @param [Hash] opts the optional parameters
1016
+ # @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
1017
+ def update_with_http_info(product_id, product, opts = {})
1018
+ if @api_client.config.debugging
1019
+ @api_client.config.logger.debug "Calling API: ProductApi.update ..."
1020
+ end
1021
+ # verify the required parameter 'product_id' is set
1022
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.update" if product_id.nil?
1023
+ # verify the required parameter 'product' is set
1024
+ fail ArgumentError, "Missing the required parameter 'product' when calling ProductApi.update" if product.nil?
1025
+ # resource path
1026
+ local_var_path = "/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
1027
+
1028
+ # query parameters
1029
+ query_params = {}
1030
+
1031
+ # header parameters
1032
+ header_params = {}
1033
+
1034
+ # HTTP header 'Accept' (if needed)
1035
+ local_header_accept = ['application/json']
1036
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1037
+
1038
+ # HTTP header 'Content-Type'
1039
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1040
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1041
+
1042
+ # form parameters
1043
+ form_params = {}
1044
+
1045
+ # http body (model)
1046
+ post_body = @api_client.object_to_http_body(product)
1047
+ auth_names = ['oauth2']
1048
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1049
+ :header_params => header_params,
1050
+ :query_params => query_params,
1051
+ :form_params => form_params,
1052
+ :body => post_body,
1053
+ :auth_names => auth_names,
1054
+ :return_type => 'Product')
1055
+ if @api_client.config.debugging
1056
+ @api_client.config.logger.debug "API called: ProductApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1057
+ end
1058
+ return data, status_code, headers
1059
+ end
1060
+
1061
+ #
1062
+ #
1063
+ # @param product_id ID of the product.
1064
+ # @param variant_id ID of the variant.
1065
+ # @param variant
1066
+ # @param [Hash] opts the optional parameters
1067
+ # @return [Variant]
1068
+ def update_variant(product_id, variant_id, variant, opts = {})
1069
+ data, _status_code, _headers = update_variant_with_http_info(product_id, variant_id, variant, opts)
1070
+ return data
1071
+ end
1072
+
1073
+ #
1074
+ #
1075
+ # @param product_id ID of the product.
1076
+ # @param variant_id ID of the variant.
1077
+ # @param variant
1078
+ # @param [Hash] opts the optional parameters
1079
+ # @return [Array<(Variant, Fixnum, Hash)>] Variant data, response status code and response headers
1080
+ def update_variant_with_http_info(product_id, variant_id, variant, opts = {})
1081
+ if @api_client.config.debugging
1082
+ @api_client.config.logger.debug "Calling API: ProductApi.update_variant ..."
1083
+ end
1084
+ # verify the required parameter 'product_id' is set
1085
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.update_variant" if product_id.nil?
1086
+ # verify the required parameter 'variant_id' is set
1087
+ fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.update_variant" if variant_id.nil?
1088
+ # verify the required parameter 'variant' is set
1089
+ fail ArgumentError, "Missing the required parameter 'variant' when calling ProductApi.update_variant" if variant.nil?
1090
+ # resource path
1091
+ local_var_path = "/products/{productID}/variants/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
1092
+
1093
+ # query parameters
1094
+ query_params = {}
1095
+
1096
+ # header parameters
1097
+ header_params = {}
1098
+
1099
+ # HTTP header 'Accept' (if needed)
1100
+ local_header_accept = ['application/json']
1101
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1102
+
1103
+ # HTTP header 'Content-Type'
1104
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1105
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1106
+
1107
+ # form parameters
1108
+ form_params = {}
1109
+
1110
+ # http body (model)
1111
+ post_body = @api_client.object_to_http_body(variant)
1112
+ auth_names = ['oauth2']
1113
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1114
+ :header_params => header_params,
1115
+ :query_params => query_params,
1116
+ :form_params => form_params,
1117
+ :body => post_body,
1118
+ :auth_names => auth_names,
1119
+ :return_type => 'Variant')
1120
+ if @api_client.config.debugging
1121
+ @api_client.config.logger.debug "API called: ProductApi#update_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1122
+ end
1123
+ return data, status_code, headers
1124
+ end
1125
+ end
1126
+ end