order_cloud 0.0.6 → 1.0.43

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 (415) hide show
  1. checksums.yaml +5 -13
  2. metadata +45 -594
  3. data/Gemfile +0 -28
  4. data/Gemfile.lock +0 -34
  5. data/LICENSE +0 -201
  6. data/README.md +0 -498
  7. data/Rakefile +0 -31
  8. data/docs/AccessToken.md +0 -10
  9. data/docs/Address.md +0 -20
  10. data/docs/AddressApi.md +0 -520
  11. data/docs/AddressAssignment.md +0 -12
  12. data/docs/AdminAddressApi.md +0 -324
  13. data/docs/AdminCompany.md +0 -10
  14. data/docs/AdminModelOnView.md +0 -7
  15. data/docs/AdminUserApi.md +0 -323
  16. data/docs/AdminUserGroupApi.md +0 -482
  17. data/docs/ApprovalRule.md +0 -20
  18. data/docs/ApprovalRuleApi.md +0 -342
  19. data/docs/BaseSpec.md +0 -15
  20. data/docs/Buyer.md +0 -11
  21. data/docs/BuyerAddress.md +0 -11
  22. data/docs/BuyerApi.md +0 -324
  23. data/docs/BuyerCreditCard.md +0 -9
  24. data/docs/BuyerProduct.md +0 -9
  25. data/docs/BuyerSpec.md +0 -9
  26. data/docs/Category.md +0 -15
  27. data/docs/CategoryApi.md +0 -685
  28. data/docs/CategoryAssignment.md +0 -10
  29. data/docs/CategoryProductAssignment.md +0 -10
  30. data/docs/CostCenter.md +0 -11
  31. data/docs/CostCenterApi.md +0 -516
  32. data/docs/CostCenterAssignment.md +0 -10
  33. data/docs/CreditCard.md +0 -15
  34. data/docs/CreditCardApi.md +0 -516
  35. data/docs/CreditCardAssignment.md +0 -10
  36. data/docs/EmailTemplate.md +0 -12
  37. data/docs/EmailTemplateApi.md +0 -223
  38. data/docs/File.md +0 -10
  39. data/docs/ImpersonateTokenRequest.md +0 -9
  40. data/docs/Inventory.md +0 -12
  41. data/docs/LineItem.md +0 -23
  42. data/docs/LineItemApi.md +0 -478
  43. data/docs/LineItemSpec.md +0 -11
  44. data/docs/ListAddress.md +0 -9
  45. data/docs/ListAddressAssignment.md +0 -9
  46. data/docs/ListAdminCompany.md +0 -9
  47. data/docs/ListApprovalRule.md +0 -9
  48. data/docs/ListBuyer.md +0 -9
  49. data/docs/ListBuyerAddress.md +0 -9
  50. data/docs/ListBuyerCreditCard.md +0 -9
  51. data/docs/ListBuyerProduct.md +0 -9
  52. data/docs/ListBuyerSpec.md +0 -9
  53. data/docs/ListCategory.md +0 -9
  54. data/docs/ListCategoryAssignment.md +0 -9
  55. data/docs/ListCategoryProductAssignment.md +0 -9
  56. data/docs/ListCostCenter.md +0 -9
  57. data/docs/ListCostCenterAssignment.md +0 -9
  58. data/docs/ListCreditCard.md +0 -9
  59. data/docs/ListCreditCardAssignment.md +0 -9
  60. data/docs/ListFile.md +0 -9
  61. data/docs/ListInventory.md +0 -9
  62. data/docs/ListLineItem.md +0 -9
  63. data/docs/ListMessageCCListenerAssignment.md +0 -9
  64. data/docs/ListMessageConfig.md +0 -9
  65. data/docs/ListMessageSender.md +0 -9
  66. data/docs/ListMessageSenderAssignment.md +0 -9
  67. data/docs/ListOrder.md +0 -9
  68. data/docs/ListOrderApproval.md +0 -9
  69. data/docs/ListOrderPromotion.md +0 -9
  70. data/docs/ListPayment.md +0 -9
  71. data/docs/ListPriceSchedule.md +0 -9
  72. data/docs/ListProduct.md +0 -9
  73. data/docs/ListProductAssignment.md +0 -9
  74. data/docs/ListPromotion.md +0 -9
  75. data/docs/ListPromotionAssignment.md +0 -9
  76. data/docs/ListSecurityProfile.md +0 -9
  77. data/docs/ListSecurityProfileAssignment.md +0 -9
  78. data/docs/ListShipment.md +0 -9
  79. data/docs/ListSpec.md +0 -9
  80. data/docs/ListSpecOption.md +0 -9
  81. data/docs/ListSpecProductAssignment.md +0 -9
  82. data/docs/ListSpendingAccount.md +0 -9
  83. data/docs/ListSpendingAccountAssignment.md +0 -9
  84. data/docs/ListUser.md +0 -9
  85. data/docs/ListUserGroup.md +0 -9
  86. data/docs/ListUserGroupAssignment.md +0 -9
  87. data/docs/ListVariant.md +0 -9
  88. data/docs/ListWebHook.md +0 -9
  89. data/docs/ListWebHookRoute.md +0 -9
  90. data/docs/ListXpIndex.md +0 -9
  91. data/docs/MeApi.md +0 -1488
  92. data/docs/MessageCCListenerAssignment.md +0 -13
  93. data/docs/MessageConfig.md +0 -11
  94. data/docs/MessageSender.md +0 -10
  95. data/docs/MessageSenderAssignment.md +0 -12
  96. data/docs/MessageSendersApi.md +0 -398
  97. data/docs/Meta.md +0 -12
  98. data/docs/Order.md +0 -31
  99. data/docs/OrderApi.md +0 -1277
  100. data/docs/OrderApproval.md +0 -16
  101. data/docs/OrderPromotion.md +0 -8
  102. data/docs/PasswordReset.md +0 -10
  103. data/docs/PasswordResetApi.md +0 -109
  104. data/docs/PasswordResetRequest.md +0 -11
  105. data/docs/Payment.md +0 -16
  106. data/docs/PaymentApi.md +0 -601
  107. data/docs/PaymentTransaction.md +0 -15
  108. data/docs/PingResponse.md +0 -8
  109. data/docs/PriceBreak.md +0 -9
  110. data/docs/PriceSchedule.md +0 -18
  111. data/docs/PriceScheduleApi.md +0 -429
  112. data/docs/Product.md +0 -26
  113. data/docs/ProductApi.md +0 -1116
  114. data/docs/ProductAssignment.md +0 -13
  115. data/docs/Promotion.md +0 -21
  116. data/docs/PromotionApi.md +0 -495
  117. data/docs/PromotionAssignment.md +0 -11
  118. data/docs/SecurityProfile.md +0 -11
  119. data/docs/SecurityProfileApi.md +0 -290
  120. data/docs/SecurityProfileAssignment.md +0 -11
  121. data/docs/Shipment.md +0 -14
  122. data/docs/ShipmentApi.md +0 -459
  123. data/docs/ShipmentItem.md +0 -10
  124. data/docs/Spec.md +0 -8
  125. data/docs/SpecApi.md +0 -816
  126. data/docs/SpecOption.md +0 -14
  127. data/docs/SpecProductAssignment.md +0 -10
  128. data/docs/SpendingAccount.md +0 -15
  129. data/docs/SpendingAccountApi.md +0 -516
  130. data/docs/SpendingAccountAssignment.md +0 -11
  131. data/docs/User.md +0 -18
  132. data/docs/UserApi.md +0 -400
  133. data/docs/UserGroup.md +0 -11
  134. data/docs/UserGroupApi.md +0 -509
  135. data/docs/UserGroupAssignment.md +0 -9
  136. data/docs/Variant.md +0 -12
  137. data/docs/WebHook.md +0 -18
  138. data/docs/WebHookRoute.md +0 -10
  139. data/docs/XpIndex.md +0 -9
  140. data/git_push.sh +0 -67
  141. data/lib/order_cloud.rb +0 -183
  142. data/lib/order_cloud/api/address_api.rb +0 -628
  143. data/lib/order_cloud/api/admin_address_api.rb +0 -397
  144. data/lib/order_cloud/api/admin_user_api.rb +0 -396
  145. data/lib/order_cloud/api/admin_user_group_api.rb +0 -578
  146. data/lib/order_cloud/api/approval_rule_api.rb +0 -421
  147. data/lib/order_cloud/api/buyer_api.rb +0 -397
  148. data/lib/order_cloud/api/category_api.rb +0 -818
  149. data/lib/order_cloud/api/cost_center_api.rb +0 -622
  150. data/lib/order_cloud/api/credit_card_api.rb +0 -622
  151. data/lib/order_cloud/api/email_template_api.rb +0 -283
  152. data/lib/order_cloud/api/line_item_api.rb +0 -583
  153. data/lib/order_cloud/api/me_api.rb +0 -1747
  154. data/lib/order_cloud/api/message_senders_api.rb +0 -484
  155. data/lib/order_cloud/api/order_api.rb +0 -1509
  156. data/lib/order_cloud/api/password_reset_api.rb +0 -150
  157. data/lib/order_cloud/api/payment_api.rb +0 -728
  158. data/lib/order_cloud/api/price_schedule_api.rb +0 -519
  159. data/lib/order_cloud/api/product_api.rb +0 -1312
  160. data/lib/order_cloud/api/promotion_api.rb +0 -596
  161. data/lib/order_cloud/api/security_profile_api.rb +0 -361
  162. data/lib/order_cloud/api/shipment_api.rb +0 -558
  163. data/lib/order_cloud/api/spec_api.rb +0 -965
  164. data/lib/order_cloud/api/spending_account_api.rb +0 -622
  165. data/lib/order_cloud/api/user_api.rb +0 -489
  166. data/lib/order_cloud/api/user_group_api.rb +0 -614
  167. data/lib/order_cloud/api_auth.rb +0 -108
  168. data/lib/order_cloud/api_client.rb +0 -385
  169. data/lib/order_cloud/api_error.rb +0 -47
  170. data/lib/order_cloud/configuration.rb +0 -245
  171. data/lib/order_cloud/models/access_token.rb +0 -217
  172. data/lib/order_cloud/models/address.rb +0 -307
  173. data/lib/order_cloud/models/address_assignment.rb +0 -235
  174. data/lib/order_cloud/models/admin_company.rb +0 -217
  175. data/lib/order_cloud/models/admin_model_on_view.rb +0 -190
  176. data/lib/order_cloud/models/approval_rule.rb +0 -307
  177. data/lib/order_cloud/models/base_spec.rb +0 -262
  178. data/lib/order_cloud/models/buyer.rb +0 -226
  179. data/lib/order_cloud/models/buyer_address.rb +0 -226
  180. data/lib/order_cloud/models/buyer_credit_card.rb +0 -208
  181. data/lib/order_cloud/models/buyer_product.rb +0 -208
  182. data/lib/order_cloud/models/buyer_spec.rb +0 -210
  183. data/lib/order_cloud/models/category.rb +0 -262
  184. data/lib/order_cloud/models/category_assignment.rb +0 -217
  185. data/lib/order_cloud/models/category_product_assignment.rb +0 -217
  186. data/lib/order_cloud/models/cost_center.rb +0 -226
  187. data/lib/order_cloud/models/cost_center_assignment.rb +0 -217
  188. data/lib/order_cloud/models/credit_card.rb +0 -262
  189. data/lib/order_cloud/models/credit_card_assignment.rb +0 -217
  190. data/lib/order_cloud/models/email_template.rb +0 -235
  191. data/lib/order_cloud/models/file.rb +0 -217
  192. data/lib/order_cloud/models/impersonate_token_request.rb +0 -208
  193. data/lib/order_cloud/models/inventory.rb +0 -235
  194. data/lib/order_cloud/models/line_item.rb +0 -336
  195. data/lib/order_cloud/models/line_item_spec.rb +0 -226
  196. data/lib/order_cloud/models/list_address.rb +0 -210
  197. data/lib/order_cloud/models/list_address_assignment.rb +0 -210
  198. data/lib/order_cloud/models/list_admin_company.rb +0 -210
  199. data/lib/order_cloud/models/list_approval_rule.rb +0 -210
  200. data/lib/order_cloud/models/list_buyer.rb +0 -210
  201. data/lib/order_cloud/models/list_buyer_address.rb +0 -210
  202. data/lib/order_cloud/models/list_buyer_credit_card.rb +0 -210
  203. data/lib/order_cloud/models/list_buyer_product.rb +0 -210
  204. data/lib/order_cloud/models/list_buyer_spec.rb +0 -210
  205. data/lib/order_cloud/models/list_category.rb +0 -210
  206. data/lib/order_cloud/models/list_category_assignment.rb +0 -210
  207. data/lib/order_cloud/models/list_category_product_assignment.rb +0 -210
  208. data/lib/order_cloud/models/list_cost_center.rb +0 -210
  209. data/lib/order_cloud/models/list_cost_center_assignment.rb +0 -210
  210. data/lib/order_cloud/models/list_credit_card.rb +0 -210
  211. data/lib/order_cloud/models/list_credit_card_assignment.rb +0 -210
  212. data/lib/order_cloud/models/list_file.rb +0 -210
  213. data/lib/order_cloud/models/list_inventory.rb +0 -210
  214. data/lib/order_cloud/models/list_line_item.rb +0 -210
  215. data/lib/order_cloud/models/list_message_cc_listener_assignment.rb +0 -210
  216. data/lib/order_cloud/models/list_message_config.rb +0 -210
  217. data/lib/order_cloud/models/list_message_sender.rb +0 -210
  218. data/lib/order_cloud/models/list_message_sender_assignment.rb +0 -210
  219. data/lib/order_cloud/models/list_order.rb +0 -210
  220. data/lib/order_cloud/models/list_order_approval.rb +0 -210
  221. data/lib/order_cloud/models/list_order_promotion.rb +0 -210
  222. data/lib/order_cloud/models/list_payment.rb +0 -210
  223. data/lib/order_cloud/models/list_price_schedule.rb +0 -210
  224. data/lib/order_cloud/models/list_product.rb +0 -210
  225. data/lib/order_cloud/models/list_product_assignment.rb +0 -210
  226. data/lib/order_cloud/models/list_promotion.rb +0 -210
  227. data/lib/order_cloud/models/list_promotion_assignment.rb +0 -210
  228. data/lib/order_cloud/models/list_security_profile.rb +0 -210
  229. data/lib/order_cloud/models/list_security_profile_assignment.rb +0 -210
  230. data/lib/order_cloud/models/list_shipment.rb +0 -210
  231. data/lib/order_cloud/models/list_spec.rb +0 -210
  232. data/lib/order_cloud/models/list_spec_option.rb +0 -210
  233. data/lib/order_cloud/models/list_spec_product_assignment.rb +0 -210
  234. data/lib/order_cloud/models/list_spending_account.rb +0 -210
  235. data/lib/order_cloud/models/list_spending_account_assignment.rb +0 -210
  236. data/lib/order_cloud/models/list_user.rb +0 -210
  237. data/lib/order_cloud/models/list_user_group.rb +0 -210
  238. data/lib/order_cloud/models/list_user_group_assignment.rb +0 -210
  239. data/lib/order_cloud/models/list_variant.rb +0 -210
  240. data/lib/order_cloud/models/list_web_hook.rb +0 -210
  241. data/lib/order_cloud/models/list_web_hook_route.rb +0 -210
  242. data/lib/order_cloud/models/list_xp_index.rb +0 -210
  243. data/lib/order_cloud/models/message_cc_listener_assignment.rb +0 -244
  244. data/lib/order_cloud/models/message_config.rb +0 -226
  245. data/lib/order_cloud/models/message_sender.rb +0 -217
  246. data/lib/order_cloud/models/message_sender_assignment.rb +0 -235
  247. data/lib/order_cloud/models/meta.rb +0 -237
  248. data/lib/order_cloud/models/order.rb +0 -406
  249. data/lib/order_cloud/models/order_approval.rb +0 -271
  250. data/lib/order_cloud/models/order_promotion.rb +0 -199
  251. data/lib/order_cloud/models/password_reset.rb +0 -217
  252. data/lib/order_cloud/models/password_reset_request.rb +0 -226
  253. data/lib/order_cloud/models/payment.rb +0 -273
  254. data/lib/order_cloud/models/payment_transaction.rb +0 -262
  255. data/lib/order_cloud/models/ping_response.rb +0 -199
  256. data/lib/order_cloud/models/price_break.rb +0 -208
  257. data/lib/order_cloud/models/price_schedule.rb +0 -291
  258. data/lib/order_cloud/models/product.rb +0 -361
  259. data/lib/order_cloud/models/product_assignment.rb +0 -244
  260. data/lib/order_cloud/models/promotion.rb +0 -316
  261. data/lib/order_cloud/models/promotion_assignment.rb +0 -226
  262. data/lib/order_cloud/models/security_profile.rb +0 -228
  263. data/lib/order_cloud/models/security_profile_assignment.rb +0 -226
  264. data/lib/order_cloud/models/shipment.rb +0 -255
  265. data/lib/order_cloud/models/shipment_item.rb +0 -217
  266. data/lib/order_cloud/models/spec.rb +0 -199
  267. data/lib/order_cloud/models/spec_option.rb +0 -253
  268. data/lib/order_cloud/models/spec_product_assignment.rb +0 -217
  269. data/lib/order_cloud/models/spending_account.rb +0 -262
  270. data/lib/order_cloud/models/spending_account_assignment.rb +0 -226
  271. data/lib/order_cloud/models/user.rb +0 -291
  272. data/lib/order_cloud/models/user_group.rb +0 -226
  273. data/lib/order_cloud/models/user_group_assignment.rb +0 -208
  274. data/lib/order_cloud/models/variant.rb +0 -235
  275. data/lib/order_cloud/models/web_hook.rb +0 -289
  276. data/lib/order_cloud/models/web_hook_route.rb +0 -217
  277. data/lib/order_cloud/models/xp_index.rb +0 -208
  278. data/lib/order_cloud/version.rb +0 -26
  279. data/order_cloud.gemspec +0 -56
  280. data/spec/api/address_api_spec.rb +0 -179
  281. data/spec/api/admin_address_api_spec.rb +0 -125
  282. data/spec/api/admin_user_api_spec.rb +0 -125
  283. data/spec/api/admin_user_group_api_spec.rb +0 -165
  284. data/spec/api/approval_rule_api_spec.rb +0 -131
  285. data/spec/api/buyer_api_spec.rb +0 -125
  286. data/spec/api/category_api_spec.rb +0 -221
  287. data/spec/api/cost_center_api_spec.rb +0 -177
  288. data/spec/api/credit_card_api_spec.rb +0 -177
  289. data/spec/api/email_template_api_spec.rb +0 -100
  290. data/spec/api/line_item_api_spec.rb +0 -167
  291. data/spec/api/me_api_spec.rb +0 -431
  292. data/spec/api/message_senders_api_spec.rb +0 -149
  293. data/spec/api/order_api_spec.rb +0 -375
  294. data/spec/api/password_reset_api_spec.rb +0 -71
  295. data/spec/api/payment_api_spec.rb +0 -199
  296. data/spec/api/price_schedule_api_spec.rb +0 -151
  297. data/spec/api/product_api_spec.rb +0 -330
  298. data/spec/api/promotion_api_spec.rb +0 -170
  299. data/spec/api/security_profile_api_spec.rb +0 -120
  300. data/spec/api/shipment_api_spec.rb +0 -161
  301. data/spec/api/spec_api_spec.rb +0 -250
  302. data/spec/api/spending_account_api_spec.rb +0 -177
  303. data/spec/api/user_api_spec.rb +0 -146
  304. data/spec/api/user_group_api_spec.rb +0 -174
  305. data/spec/api_auth_spec.rb +0 -165
  306. data/spec/api_client_spec.rb +0 -237
  307. data/spec/configuration_spec.rb +0 -80
  308. data/spec/models/access_token_spec.rb +0 -65
  309. data/spec/models/address_assignment_spec.rb +0 -77
  310. data/spec/models/address_spec.rb +0 -125
  311. data/spec/models/admin_company_spec.rb +0 -65
  312. data/spec/models/admin_model_on_view_spec.rb +0 -47
  313. data/spec/models/approval_rule_spec.rb +0 -125
  314. data/spec/models/base_spec_spec.rb +0 -95
  315. data/spec/models/buyer_address_spec.rb +0 -71
  316. data/spec/models/buyer_credit_card_spec.rb +0 -59
  317. data/spec/models/buyer_product_spec.rb +0 -59
  318. data/spec/models/buyer_spec.rb +0 -71
  319. data/spec/models/buyer_spec_spec.rb +0 -59
  320. data/spec/models/category_assignment_spec.rb +0 -65
  321. data/spec/models/category_product_assignment_spec.rb +0 -65
  322. data/spec/models/category_spec.rb +0 -95
  323. data/spec/models/cost_center_assignment_spec.rb +0 -65
  324. data/spec/models/cost_center_spec.rb +0 -71
  325. data/spec/models/credit_card_assignment_spec.rb +0 -65
  326. data/spec/models/credit_card_spec.rb +0 -95
  327. data/spec/models/email_template_spec.rb +0 -77
  328. data/spec/models/file_spec.rb +0 -65
  329. data/spec/models/impersonate_token_request_spec.rb +0 -59
  330. data/spec/models/inventory_spec.rb +0 -77
  331. data/spec/models/line_item_spec.rb +0 -143
  332. data/spec/models/line_item_spec_spec.rb +0 -71
  333. data/spec/models/list_address_assignment_spec.rb +0 -59
  334. data/spec/models/list_address_spec.rb +0 -59
  335. data/spec/models/list_admin_company_spec.rb +0 -59
  336. data/spec/models/list_approval_rule_spec.rb +0 -59
  337. data/spec/models/list_buyer_address_spec.rb +0 -59
  338. data/spec/models/list_buyer_credit_card_spec.rb +0 -59
  339. data/spec/models/list_buyer_product_spec.rb +0 -59
  340. data/spec/models/list_buyer_spec.rb +0 -59
  341. data/spec/models/list_buyer_spec_spec.rb +0 -59
  342. data/spec/models/list_category_assignment_spec.rb +0 -59
  343. data/spec/models/list_category_product_assignment_spec.rb +0 -59
  344. data/spec/models/list_category_spec.rb +0 -59
  345. data/spec/models/list_cost_center_assignment_spec.rb +0 -59
  346. data/spec/models/list_cost_center_spec.rb +0 -59
  347. data/spec/models/list_credit_card_assignment_spec.rb +0 -59
  348. data/spec/models/list_credit_card_spec.rb +0 -59
  349. data/spec/models/list_file_spec.rb +0 -59
  350. data/spec/models/list_inventory_spec.rb +0 -59
  351. data/spec/models/list_line_item_spec.rb +0 -59
  352. data/spec/models/list_message_cc_listener_assignment_spec.rb +0 -59
  353. data/spec/models/list_message_config_spec.rb +0 -59
  354. data/spec/models/list_message_sender_assignment_spec.rb +0 -59
  355. data/spec/models/list_message_sender_spec.rb +0 -59
  356. data/spec/models/list_order_approval_spec.rb +0 -59
  357. data/spec/models/list_order_promotion_spec.rb +0 -59
  358. data/spec/models/list_order_spec.rb +0 -59
  359. data/spec/models/list_payment_spec.rb +0 -59
  360. data/spec/models/list_price_schedule_spec.rb +0 -59
  361. data/spec/models/list_product_assignment_spec.rb +0 -59
  362. data/spec/models/list_product_spec.rb +0 -59
  363. data/spec/models/list_promotion_assignment_spec.rb +0 -59
  364. data/spec/models/list_promotion_spec.rb +0 -59
  365. data/spec/models/list_security_profile_assignment_spec.rb +0 -59
  366. data/spec/models/list_security_profile_spec.rb +0 -59
  367. data/spec/models/list_shipment_spec.rb +0 -59
  368. data/spec/models/list_spec_option_spec.rb +0 -59
  369. data/spec/models/list_spec_product_assignment_spec.rb +0 -59
  370. data/spec/models/list_spec_spec.rb +0 -59
  371. data/spec/models/list_spending_account_assignment_spec.rb +0 -59
  372. data/spec/models/list_spending_account_spec.rb +0 -59
  373. data/spec/models/list_user_group_assignment_spec.rb +0 -59
  374. data/spec/models/list_user_group_spec.rb +0 -59
  375. data/spec/models/list_user_spec.rb +0 -59
  376. data/spec/models/list_variant_spec.rb +0 -59
  377. data/spec/models/list_web_hook_route_spec.rb +0 -59
  378. data/spec/models/list_web_hook_spec.rb +0 -59
  379. data/spec/models/list_xp_index_spec.rb +0 -59
  380. data/spec/models/message_cc_listener_assignment_spec.rb +0 -83
  381. data/spec/models/message_config_spec.rb +0 -71
  382. data/spec/models/message_sender_assignment_spec.rb +0 -77
  383. data/spec/models/message_sender_spec.rb +0 -65
  384. data/spec/models/meta_spec.rb +0 -77
  385. data/spec/models/order_approval_spec.rb +0 -101
  386. data/spec/models/order_promotion_spec.rb +0 -53
  387. data/spec/models/order_spec.rb +0 -191
  388. data/spec/models/password_reset_request_spec.rb +0 -71
  389. data/spec/models/password_reset_spec.rb +0 -65
  390. data/spec/models/payment_spec.rb +0 -101
  391. data/spec/models/payment_transaction_spec.rb +0 -95
  392. data/spec/models/ping_response_spec.rb +0 -53
  393. data/spec/models/price_break_spec.rb +0 -59
  394. data/spec/models/price_schedule_spec.rb +0 -113
  395. data/spec/models/product_assignment_spec.rb +0 -83
  396. data/spec/models/product_spec.rb +0 -161
  397. data/spec/models/promotion_assignment_spec.rb +0 -71
  398. data/spec/models/promotion_spec.rb +0 -131
  399. data/spec/models/security_profile_assignment_spec.rb +0 -71
  400. data/spec/models/security_profile_spec.rb +0 -71
  401. data/spec/models/shipment_item_spec.rb +0 -65
  402. data/spec/models/shipment_spec.rb +0 -89
  403. data/spec/models/spec_option_spec.rb +0 -89
  404. data/spec/models/spec_product_assignment_spec.rb +0 -65
  405. data/spec/models/spec_spec.rb +0 -53
  406. data/spec/models/spending_account_assignment_spec.rb +0 -71
  407. data/spec/models/spending_account_spec.rb +0 -95
  408. data/spec/models/user_group_assignment_spec.rb +0 -59
  409. data/spec/models/user_group_spec.rb +0 -71
  410. data/spec/models/user_spec.rb +0 -113
  411. data/spec/models/variant_spec.rb +0 -77
  412. data/spec/models/web_hook_route_spec.rb +0 -65
  413. data/spec/models/web_hook_spec.rb +0 -113
  414. data/spec/models/xp_index_spec.rb +0 -59
  415. data/spec/spec_helper.rb +0 -122
@@ -1,1312 +0,0 @@
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 buyer_id ID of the buyer.
150
- # @param product_id ID of the product.
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(buyer_id, product_id, opts = {})
156
- delete_assignment_with_http_info(buyer_id, product_id, opts)
157
- return nil
158
- end
159
-
160
- #
161
- #
162
- # @param buyer_id ID of the buyer.
163
- # @param product_id ID of the product.
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(buyer_id, product_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 'buyer_id' is set
173
- fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ProductApi.delete_assignment" if buyer_id.nil?
174
- # verify the required parameter 'product_id' is set
175
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.delete_assignment" if product_id.nil?
176
- # resource path
177
- local_var_path = "/products/{productID}/assignments/{buyerID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'productID' + '}', product_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 [Hash] opts the optional parameters
334
- # @return [Inventory]
335
- def get_inventory(product_id, opts = {})
336
- data, _status_code, _headers = get_inventory_with_http_info(product_id, opts)
337
- return data
338
- end
339
-
340
- #
341
- #
342
- # @param product_id ID of the product.
343
- # @param [Hash] opts the optional parameters
344
- # @return [Array<(Inventory, Fixnum, Hash)>] Inventory data, response status code and response headers
345
- def get_inventory_with_http_info(product_id, opts = {})
346
- if @api_client.config.debugging
347
- @api_client.config.logger.debug "Calling API: ProductApi.get_inventory ..."
348
- end
349
- # verify the required parameter 'product_id' is set
350
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.get_inventory" if product_id.nil?
351
- # resource path
352
- local_var_path = "/products/{productID}/inventory".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
353
-
354
- # query parameters
355
- query_params = {}
356
-
357
- # header parameters
358
- header_params = {}
359
-
360
- # HTTP header 'Accept' (if needed)
361
- local_header_accept = ['application/json']
362
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
363
-
364
- # HTTP header 'Content-Type'
365
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
366
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
367
-
368
- # form parameters
369
- form_params = {}
370
-
371
- # http body (model)
372
- post_body = nil
373
- auth_names = ['oauth2']
374
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
375
- :header_params => header_params,
376
- :query_params => query_params,
377
- :form_params => form_params,
378
- :body => post_body,
379
- :auth_names => auth_names,
380
- :return_type => 'Inventory')
381
- if @api_client.config.debugging
382
- @api_client.config.logger.debug "API called: ProductApi#get_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
383
- end
384
- return data, status_code, headers
385
- end
386
-
387
- #
388
- #
389
- # @param product_id ID of the product.
390
- # @param variant_id ID of the variant.
391
- # @param [Hash] opts the optional parameters
392
- # @return [Variant]
393
- def get_variant(product_id, variant_id, opts = {})
394
- data, _status_code, _headers = get_variant_with_http_info(product_id, variant_id, opts)
395
- return data
396
- end
397
-
398
- #
399
- #
400
- # @param product_id ID of the product.
401
- # @param variant_id ID of the variant.
402
- # @param [Hash] opts the optional parameters
403
- # @return [Array<(Variant, Fixnum, Hash)>] Variant data, response status code and response headers
404
- def get_variant_with_http_info(product_id, variant_id, opts = {})
405
- if @api_client.config.debugging
406
- @api_client.config.logger.debug "Calling API: ProductApi.get_variant ..."
407
- end
408
- # verify the required parameter 'product_id' is set
409
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.get_variant" if product_id.nil?
410
- # verify the required parameter 'variant_id' is set
411
- fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.get_variant" if variant_id.nil?
412
- # resource path
413
- local_var_path = "/products/{productID}/variants/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
414
-
415
- # query parameters
416
- query_params = {}
417
-
418
- # header parameters
419
- header_params = {}
420
-
421
- # HTTP header 'Accept' (if needed)
422
- local_header_accept = ['application/json']
423
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
424
-
425
- # HTTP header 'Content-Type'
426
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
427
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
428
-
429
- # form parameters
430
- form_params = {}
431
-
432
- # http body (model)
433
- post_body = nil
434
- auth_names = ['oauth2']
435
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
436
- :header_params => header_params,
437
- :query_params => query_params,
438
- :form_params => form_params,
439
- :body => post_body,
440
- :auth_names => auth_names,
441
- :return_type => 'Variant')
442
- if @api_client.config.debugging
443
- @api_client.config.logger.debug "API called: ProductApi#get_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
444
- end
445
- return data, status_code, headers
446
- end
447
-
448
- #
449
- #
450
- # @param product_id ID of the product.
451
- # @param variant_id ID of the variant.
452
- # @param [Hash] opts the optional parameters
453
- # @return [Inventory]
454
- def get_variant_inventory(product_id, variant_id, opts = {})
455
- data, _status_code, _headers = get_variant_inventory_with_http_info(product_id, variant_id, opts)
456
- return data
457
- end
458
-
459
- #
460
- #
461
- # @param product_id ID of the product.
462
- # @param variant_id ID of the variant.
463
- # @param [Hash] opts the optional parameters
464
- # @return [Array<(Inventory, Fixnum, Hash)>] Inventory data, response status code and response headers
465
- def get_variant_inventory_with_http_info(product_id, variant_id, opts = {})
466
- if @api_client.config.debugging
467
- @api_client.config.logger.debug "Calling API: ProductApi.get_variant_inventory ..."
468
- end
469
- # verify the required parameter 'product_id' is set
470
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.get_variant_inventory" if product_id.nil?
471
- # verify the required parameter 'variant_id' is set
472
- fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.get_variant_inventory" if variant_id.nil?
473
- # resource path
474
- local_var_path = "/products/{productID}/variants/inventory/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
475
-
476
- # query parameters
477
- query_params = {}
478
-
479
- # header parameters
480
- header_params = {}
481
-
482
- # HTTP header 'Accept' (if needed)
483
- local_header_accept = ['application/json']
484
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
485
-
486
- # HTTP header 'Content-Type'
487
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
488
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
489
-
490
- # form parameters
491
- form_params = {}
492
-
493
- # http body (model)
494
- post_body = nil
495
- auth_names = ['oauth2']
496
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
497
- :header_params => header_params,
498
- :query_params => query_params,
499
- :form_params => form_params,
500
- :body => post_body,
501
- :auth_names => auth_names,
502
- :return_type => 'Inventory')
503
- if @api_client.config.debugging
504
- @api_client.config.logger.debug "API called: ProductApi#get_variant_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
505
- end
506
- return data, status_code, headers
507
- end
508
-
509
- #
510
- #
511
- # @param [Hash] opts the optional parameters
512
- # @option opts [String] :search Word or phrase to search for.
513
- # @option opts [String] :search_on Comma-delimited list of fields to search on.
514
- # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
515
- # @option opts [Integer] :page Page of results to return. Default: 1
516
- # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
517
- # @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;
518
- # @return [ListProduct]
519
- def list(opts = {})
520
- data, _status_code, _headers = list_with_http_info(opts)
521
- return data
522
- end
523
-
524
- #
525
- #
526
- # @param [Hash] opts the optional parameters
527
- # @option opts [String] :search Word or phrase to search for.
528
- # @option opts [String] :search_on Comma-delimited list of fields to search on.
529
- # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
530
- # @option opts [Integer] :page Page of results to return. Default: 1
531
- # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
532
- # @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;
533
- # @return [Array<(ListProduct, Fixnum, Hash)>] ListProduct data, response status code and response headers
534
- def list_with_http_info(opts = {})
535
- if @api_client.config.debugging
536
- @api_client.config.logger.debug "Calling API: ProductApi.list ..."
537
- end
538
- # resource path
539
- local_var_path = "/products".sub('{format}','json')
540
-
541
- # query parameters
542
- query_params = {}
543
- query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
544
- query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
545
- query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
546
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
547
- query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
548
- query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
549
-
550
- # header parameters
551
- header_params = {}
552
-
553
- # HTTP header 'Accept' (if needed)
554
- local_header_accept = ['application/json']
555
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
556
-
557
- # HTTP header 'Content-Type'
558
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
559
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
560
-
561
- # form parameters
562
- form_params = {}
563
-
564
- # http body (model)
565
- post_body = nil
566
- auth_names = ['oauth2']
567
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
568
- :header_params => header_params,
569
- :query_params => query_params,
570
- :form_params => form_params,
571
- :body => post_body,
572
- :auth_names => auth_names,
573
- :return_type => 'ListProduct')
574
- if @api_client.config.debugging
575
- @api_client.config.logger.debug "API called: ProductApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
576
- end
577
- return data, status_code, headers
578
- end
579
-
580
- #
581
- #
582
- # @param [Hash] opts the optional parameters
583
- # @option opts [String] :product_id ID of the product.
584
- # @option opts [String] :buyer_id ID of the buyer.
585
- # @option opts [String] :user_id ID of the user.
586
- # @option opts [String] :user_group_id ID of the user group.
587
- # @option opts [String] :level Level of the product.
588
- # @option opts [String] :price_schedule_id ID of the price schedule.
589
- # @option opts [Integer] :page Page of results to return. Default: 1
590
- # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
591
- # @return [ListProductAssignment]
592
- def list_assignments(opts = {})
593
- data, _status_code, _headers = list_assignments_with_http_info(opts)
594
- return data
595
- end
596
-
597
- #
598
- #
599
- # @param [Hash] opts the optional parameters
600
- # @option opts [String] :product_id ID of the product.
601
- # @option opts [String] :buyer_id ID of the buyer.
602
- # @option opts [String] :user_id ID of the user.
603
- # @option opts [String] :user_group_id ID of the user group.
604
- # @option opts [String] :level Level of the product.
605
- # @option opts [String] :price_schedule_id ID of the price schedule.
606
- # @option opts [Integer] :page Page of results to return. Default: 1
607
- # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
608
- # @return [Array<(ListProductAssignment, Fixnum, Hash)>] ListProductAssignment data, response status code and response headers
609
- def list_assignments_with_http_info(opts = {})
610
- if @api_client.config.debugging
611
- @api_client.config.logger.debug "Calling API: ProductApi.list_assignments ..."
612
- end
613
- # resource path
614
- local_var_path = "/products/assignments".sub('{format}','json')
615
-
616
- # query parameters
617
- query_params = {}
618
- query_params[:'productID'] = opts[:'product_id'] if !opts[:'product_id'].nil?
619
- query_params[:'buyerID'] = opts[:'buyer_id'] if !opts[:'buyer_id'].nil?
620
- query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
621
- query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
622
- query_params[:'level'] = opts[:'level'] if !opts[:'level'].nil?
623
- query_params[:'priceScheduleID'] = opts[:'price_schedule_id'] if !opts[:'price_schedule_id'].nil?
624
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
625
- query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
626
-
627
- # header parameters
628
- header_params = {}
629
-
630
- # HTTP header 'Accept' (if needed)
631
- local_header_accept = ['application/json']
632
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
633
-
634
- # HTTP header 'Content-Type'
635
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
636
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
637
-
638
- # form parameters
639
- form_params = {}
640
-
641
- # http body (model)
642
- post_body = nil
643
- auth_names = ['oauth2']
644
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
645
- :header_params => header_params,
646
- :query_params => query_params,
647
- :form_params => form_params,
648
- :body => post_body,
649
- :auth_names => auth_names,
650
- :return_type => 'ListProductAssignment')
651
- if @api_client.config.debugging
652
- @api_client.config.logger.debug "API called: ProductApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
653
- end
654
- return data, status_code, headers
655
- end
656
-
657
- #
658
- #
659
- # @param [Hash] opts the optional parameters
660
- # @option opts [String] :search Word or phrase to search for.
661
- # @option opts [String] :search_on Comma-delimited list of fields to search on.
662
- # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
663
- # @option opts [Integer] :page Page of results to return. Default: 1
664
- # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
665
- # @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;
666
- # @return [ListInventory]
667
- def list_inventory(opts = {})
668
- data, _status_code, _headers = list_inventory_with_http_info(opts)
669
- return data
670
- end
671
-
672
- #
673
- #
674
- # @param [Hash] opts the optional parameters
675
- # @option opts [String] :search Word or phrase to search for.
676
- # @option opts [String] :search_on Comma-delimited list of fields to search on.
677
- # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
678
- # @option opts [Integer] :page Page of results to return. Default: 1
679
- # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
680
- # @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;
681
- # @return [Array<(ListInventory, Fixnum, Hash)>] ListInventory data, response status code and response headers
682
- def list_inventory_with_http_info(opts = {})
683
- if @api_client.config.debugging
684
- @api_client.config.logger.debug "Calling API: ProductApi.list_inventory ..."
685
- end
686
- # resource path
687
- local_var_path = "/products/inventory".sub('{format}','json')
688
-
689
- # query parameters
690
- query_params = {}
691
- query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
692
- query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
693
- query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
694
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
695
- query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
696
- query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
697
-
698
- # header parameters
699
- header_params = {}
700
-
701
- # HTTP header 'Accept' (if needed)
702
- local_header_accept = ['application/json']
703
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
704
-
705
- # HTTP header 'Content-Type'
706
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
707
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
708
-
709
- # form parameters
710
- form_params = {}
711
-
712
- # http body (model)
713
- post_body = nil
714
- auth_names = ['oauth2']
715
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
716
- :header_params => header_params,
717
- :query_params => query_params,
718
- :form_params => form_params,
719
- :body => post_body,
720
- :auth_names => auth_names,
721
- :return_type => 'ListInventory')
722
- if @api_client.config.debugging
723
- @api_client.config.logger.debug "API called: ProductApi#list_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
724
- end
725
- return data, status_code, headers
726
- end
727
-
728
- #
729
- #
730
- # @param product_id ID of the product.
731
- # @param [Hash] opts the optional parameters
732
- # @option opts [String] :search Word or phrase to search for.
733
- # @option opts [String] :search_on Comma-delimited list of fields to search on.
734
- # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
735
- # @option opts [Integer] :page Page of results to return. Default: 1
736
- # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
737
- # @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;
738
- # @return [ListInventory]
739
- def list_variant_inventory(product_id, opts = {})
740
- data, _status_code, _headers = list_variant_inventory_with_http_info(product_id, opts)
741
- return data
742
- end
743
-
744
- #
745
- #
746
- # @param product_id ID of the product.
747
- # @param [Hash] opts the optional parameters
748
- # @option opts [String] :search Word or phrase to search for.
749
- # @option opts [String] :search_on Comma-delimited list of fields to search on.
750
- # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
751
- # @option opts [Integer] :page Page of results to return. Default: 1
752
- # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
753
- # @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;
754
- # @return [Array<(ListInventory, Fixnum, Hash)>] ListInventory data, response status code and response headers
755
- def list_variant_inventory_with_http_info(product_id, opts = {})
756
- if @api_client.config.debugging
757
- @api_client.config.logger.debug "Calling API: ProductApi.list_variant_inventory ..."
758
- end
759
- # verify the required parameter 'product_id' is set
760
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.list_variant_inventory" if product_id.nil?
761
- # resource path
762
- local_var_path = "/products/{productID}/variants/inventory".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
763
-
764
- # query parameters
765
- query_params = {}
766
- query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
767
- query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
768
- query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
769
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
770
- query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
771
- query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
772
-
773
- # header parameters
774
- header_params = {}
775
-
776
- # HTTP header 'Accept' (if needed)
777
- local_header_accept = ['application/json']
778
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
779
-
780
- # HTTP header 'Content-Type'
781
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
782
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
783
-
784
- # form parameters
785
- form_params = {}
786
-
787
- # http body (model)
788
- post_body = nil
789
- auth_names = ['oauth2']
790
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
791
- :header_params => header_params,
792
- :query_params => query_params,
793
- :form_params => form_params,
794
- :body => post_body,
795
- :auth_names => auth_names,
796
- :return_type => 'ListInventory')
797
- if @api_client.config.debugging
798
- @api_client.config.logger.debug "API called: ProductApi#list_variant_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
799
- end
800
- return data, status_code, headers
801
- end
802
-
803
- #
804
- #
805
- # @param product_id ID of the product.
806
- # @param [Hash] opts the optional parameters
807
- # @option opts [String] :search Word or phrase to search for.
808
- # @option opts [String] :search_on Comma-delimited list of fields to search on.
809
- # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
810
- # @option opts [Integer] :page Page of results to return. Default: 1
811
- # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
812
- # @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;
813
- # @return [ListVariant]
814
- def list_variants(product_id, opts = {})
815
- data, _status_code, _headers = list_variants_with_http_info(product_id, opts)
816
- return data
817
- end
818
-
819
- #
820
- #
821
- # @param product_id ID of the product.
822
- # @param [Hash] opts the optional parameters
823
- # @option opts [String] :search Word or phrase to search for.
824
- # @option opts [String] :search_on Comma-delimited list of fields to search on.
825
- # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
826
- # @option opts [Integer] :page Page of results to return. Default: 1
827
- # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
828
- # @option opts [Hash<String, String>] :filters Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or &#39;xp.???&#39;
829
- # @return [Array<(ListVariant, Fixnum, Hash)>] ListVariant data, response status code and response headers
830
- def list_variants_with_http_info(product_id, opts = {})
831
- if @api_client.config.debugging
832
- @api_client.config.logger.debug "Calling API: ProductApi.list_variants ..."
833
- end
834
- # verify the required parameter 'product_id' is set
835
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.list_variants" if product_id.nil?
836
- # resource path
837
- local_var_path = "/products/{productID}/variants".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
838
-
839
- # query parameters
840
- query_params = {}
841
- query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
842
- query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
843
- query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
844
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
845
- query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
846
- query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
847
-
848
- # header parameters
849
- header_params = {}
850
-
851
- # HTTP header 'Accept' (if needed)
852
- local_header_accept = ['application/json']
853
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
854
-
855
- # HTTP header 'Content-Type'
856
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
857
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
858
-
859
- # form parameters
860
- form_params = {}
861
-
862
- # http body (model)
863
- post_body = nil
864
- auth_names = ['oauth2']
865
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
866
- :header_params => header_params,
867
- :query_params => query_params,
868
- :form_params => form_params,
869
- :body => post_body,
870
- :auth_names => auth_names,
871
- :return_type => 'ListVariant')
872
- if @api_client.config.debugging
873
- @api_client.config.logger.debug "API called: ProductApi#list_variants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
874
- end
875
- return data, status_code, headers
876
- end
877
-
878
- #
879
- #
880
- # @param product_id ID of the product.
881
- # @param product
882
- # @param [Hash] opts the optional parameters
883
- # @return [Product]
884
- def patch(product_id, product, opts = {})
885
- data, _status_code, _headers = patch_with_http_info(product_id, product, opts)
886
- return data
887
- end
888
-
889
- #
890
- #
891
- # @param product_id ID of the product.
892
- # @param product
893
- # @param [Hash] opts the optional parameters
894
- # @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
895
- def patch_with_http_info(product_id, product, opts = {})
896
- if @api_client.config.debugging
897
- @api_client.config.logger.debug "Calling API: ProductApi.patch ..."
898
- end
899
- # verify the required parameter 'product_id' is set
900
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.patch" if product_id.nil?
901
- # verify the required parameter 'product' is set
902
- fail ArgumentError, "Missing the required parameter 'product' when calling ProductApi.patch" if product.nil?
903
- # resource path
904
- local_var_path = "/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
905
-
906
- # query parameters
907
- query_params = {}
908
-
909
- # header parameters
910
- header_params = {}
911
-
912
- # HTTP header 'Accept' (if needed)
913
- local_header_accept = ['application/json']
914
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
915
-
916
- # HTTP header 'Content-Type'
917
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
918
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
919
-
920
- # form parameters
921
- form_params = {}
922
-
923
- # http body (model)
924
- post_body = @api_client.object_to_http_body(product)
925
- auth_names = ['oauth2']
926
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
927
- :header_params => header_params,
928
- :query_params => query_params,
929
- :form_params => form_params,
930
- :body => post_body,
931
- :auth_names => auth_names,
932
- :return_type => 'Product')
933
- if @api_client.config.debugging
934
- @api_client.config.logger.debug "API called: ProductApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
935
- end
936
- return data, status_code, headers
937
- end
938
-
939
- #
940
- #
941
- # @param product_id ID of the product.
942
- # @param variant_id ID of the variant.
943
- # @param variant
944
- # @param [Hash] opts the optional parameters
945
- # @return [Variant]
946
- def patch_variant(product_id, variant_id, variant, opts = {})
947
- data, _status_code, _headers = patch_variant_with_http_info(product_id, variant_id, variant, opts)
948
- return data
949
- end
950
-
951
- #
952
- #
953
- # @param product_id ID of the product.
954
- # @param variant_id ID of the variant.
955
- # @param variant
956
- # @param [Hash] opts the optional parameters
957
- # @return [Array<(Variant, Fixnum, Hash)>] Variant data, response status code and response headers
958
- def patch_variant_with_http_info(product_id, variant_id, variant, opts = {})
959
- if @api_client.config.debugging
960
- @api_client.config.logger.debug "Calling API: ProductApi.patch_variant ..."
961
- end
962
- # verify the required parameter 'product_id' is set
963
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.patch_variant" if product_id.nil?
964
- # verify the required parameter 'variant_id' is set
965
- fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.patch_variant" if variant_id.nil?
966
- # verify the required parameter 'variant' is set
967
- fail ArgumentError, "Missing the required parameter 'variant' when calling ProductApi.patch_variant" if variant.nil?
968
- # resource path
969
- local_var_path = "/products/{productID}/variants/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
970
-
971
- # query parameters
972
- query_params = {}
973
-
974
- # header parameters
975
- header_params = {}
976
-
977
- # HTTP header 'Accept' (if needed)
978
- local_header_accept = ['application/json']
979
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
980
-
981
- # HTTP header 'Content-Type'
982
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
983
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
984
-
985
- # form parameters
986
- form_params = {}
987
-
988
- # http body (model)
989
- post_body = @api_client.object_to_http_body(variant)
990
- auth_names = ['oauth2']
991
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
992
- :header_params => header_params,
993
- :query_params => query_params,
994
- :form_params => form_params,
995
- :body => post_body,
996
- :auth_names => auth_names,
997
- :return_type => 'Variant')
998
- if @api_client.config.debugging
999
- @api_client.config.logger.debug "API called: ProductApi#patch_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1000
- end
1001
- return data, status_code, headers
1002
- end
1003
-
1004
- #
1005
- #
1006
- # @param product_assignment
1007
- # @param [Hash] opts the optional parameters
1008
- # @return [nil]
1009
- def save_assignment(product_assignment, opts = {})
1010
- save_assignment_with_http_info(product_assignment, opts)
1011
- return nil
1012
- end
1013
-
1014
- #
1015
- #
1016
- # @param product_assignment
1017
- # @param [Hash] opts the optional parameters
1018
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1019
- def save_assignment_with_http_info(product_assignment, opts = {})
1020
- if @api_client.config.debugging
1021
- @api_client.config.logger.debug "Calling API: ProductApi.save_assignment ..."
1022
- end
1023
- # verify the required parameter 'product_assignment' is set
1024
- fail ArgumentError, "Missing the required parameter 'product_assignment' when calling ProductApi.save_assignment" if product_assignment.nil?
1025
- # resource path
1026
- local_var_path = "/products/assignments".sub('{format}','json')
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_assignment)
1047
- auth_names = ['oauth2']
1048
- data, status_code, headers = @api_client.call_api(:POST, 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
- if @api_client.config.debugging
1055
- @api_client.config.logger.debug "API called: ProductApi#save_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1056
- end
1057
- return data, status_code, headers
1058
- end
1059
-
1060
- #
1061
- #
1062
- # @param product_id ID of the product.
1063
- # @param product
1064
- # @param [Hash] opts the optional parameters
1065
- # @return [Product]
1066
- def update(product_id, product, opts = {})
1067
- data, _status_code, _headers = update_with_http_info(product_id, product, opts)
1068
- return data
1069
- end
1070
-
1071
- #
1072
- #
1073
- # @param product_id ID of the product.
1074
- # @param product
1075
- # @param [Hash] opts the optional parameters
1076
- # @return [Array<(Product, Fixnum, Hash)>] Product data, response status code and response headers
1077
- def update_with_http_info(product_id, product, opts = {})
1078
- if @api_client.config.debugging
1079
- @api_client.config.logger.debug "Calling API: ProductApi.update ..."
1080
- end
1081
- # verify the required parameter 'product_id' is set
1082
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.update" if product_id.nil?
1083
- # verify the required parameter 'product' is set
1084
- fail ArgumentError, "Missing the required parameter 'product' when calling ProductApi.update" if product.nil?
1085
- # resource path
1086
- local_var_path = "/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)
1087
-
1088
- # query parameters
1089
- query_params = {}
1090
-
1091
- # header parameters
1092
- header_params = {}
1093
-
1094
- # HTTP header 'Accept' (if needed)
1095
- local_header_accept = ['application/json']
1096
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1097
-
1098
- # HTTP header 'Content-Type'
1099
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1100
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1101
-
1102
- # form parameters
1103
- form_params = {}
1104
-
1105
- # http body (model)
1106
- post_body = @api_client.object_to_http_body(product)
1107
- auth_names = ['oauth2']
1108
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1109
- :header_params => header_params,
1110
- :query_params => query_params,
1111
- :form_params => form_params,
1112
- :body => post_body,
1113
- :auth_names => auth_names,
1114
- :return_type => 'Product')
1115
- if @api_client.config.debugging
1116
- @api_client.config.logger.debug "API called: ProductApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1117
- end
1118
- return data, status_code, headers
1119
- end
1120
-
1121
- #
1122
- #
1123
- # @param product_id ID of the product.
1124
- # @param inventory Inventory of the product.
1125
- # @param [Hash] opts the optional parameters
1126
- # @return [Inventory]
1127
- def update_inventory(product_id, inventory, opts = {})
1128
- data, _status_code, _headers = update_inventory_with_http_info(product_id, inventory, opts)
1129
- return data
1130
- end
1131
-
1132
- #
1133
- #
1134
- # @param product_id ID of the product.
1135
- # @param inventory Inventory of the product.
1136
- # @param [Hash] opts the optional parameters
1137
- # @return [Array<(Inventory, Fixnum, Hash)>] Inventory data, response status code and response headers
1138
- def update_inventory_with_http_info(product_id, inventory, opts = {})
1139
- if @api_client.config.debugging
1140
- @api_client.config.logger.debug "Calling API: ProductApi.update_inventory ..."
1141
- end
1142
- # verify the required parameter 'product_id' is set
1143
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.update_inventory" if product_id.nil?
1144
- # verify the required parameter 'inventory' is set
1145
- fail ArgumentError, "Missing the required parameter 'inventory' when calling ProductApi.update_inventory" if inventory.nil?
1146
- # resource path
1147
- local_var_path = "/products/{productID}/inventory/{inventory}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'inventory' + '}', inventory.to_s)
1148
-
1149
- # query parameters
1150
- query_params = {}
1151
-
1152
- # header parameters
1153
- header_params = {}
1154
-
1155
- # HTTP header 'Accept' (if needed)
1156
- local_header_accept = ['application/json']
1157
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1158
-
1159
- # HTTP header 'Content-Type'
1160
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1161
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1162
-
1163
- # form parameters
1164
- form_params = {}
1165
-
1166
- # http body (model)
1167
- post_body = nil
1168
- auth_names = ['oauth2']
1169
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1170
- :header_params => header_params,
1171
- :query_params => query_params,
1172
- :form_params => form_params,
1173
- :body => post_body,
1174
- :auth_names => auth_names,
1175
- :return_type => 'Inventory')
1176
- if @api_client.config.debugging
1177
- @api_client.config.logger.debug "API called: ProductApi#update_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1178
- end
1179
- return data, status_code, headers
1180
- end
1181
-
1182
- #
1183
- #
1184
- # @param product_id ID of the product.
1185
- # @param variant_id ID of the variant.
1186
- # @param variant
1187
- # @param [Hash] opts the optional parameters
1188
- # @return [Variant]
1189
- def update_variant(product_id, variant_id, variant, opts = {})
1190
- data, _status_code, _headers = update_variant_with_http_info(product_id, variant_id, variant, opts)
1191
- return data
1192
- end
1193
-
1194
- #
1195
- #
1196
- # @param product_id ID of the product.
1197
- # @param variant_id ID of the variant.
1198
- # @param variant
1199
- # @param [Hash] opts the optional parameters
1200
- # @return [Array<(Variant, Fixnum, Hash)>] Variant data, response status code and response headers
1201
- def update_variant_with_http_info(product_id, variant_id, variant, opts = {})
1202
- if @api_client.config.debugging
1203
- @api_client.config.logger.debug "Calling API: ProductApi.update_variant ..."
1204
- end
1205
- # verify the required parameter 'product_id' is set
1206
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.update_variant" if product_id.nil?
1207
- # verify the required parameter 'variant_id' is set
1208
- fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.update_variant" if variant_id.nil?
1209
- # verify the required parameter 'variant' is set
1210
- fail ArgumentError, "Missing the required parameter 'variant' when calling ProductApi.update_variant" if variant.nil?
1211
- # resource path
1212
- local_var_path = "/products/{productID}/variants/{variantID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s)
1213
-
1214
- # query parameters
1215
- query_params = {}
1216
-
1217
- # header parameters
1218
- header_params = {}
1219
-
1220
- # HTTP header 'Accept' (if needed)
1221
- local_header_accept = ['application/json']
1222
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1223
-
1224
- # HTTP header 'Content-Type'
1225
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1226
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1227
-
1228
- # form parameters
1229
- form_params = {}
1230
-
1231
- # http body (model)
1232
- post_body = @api_client.object_to_http_body(variant)
1233
- auth_names = ['oauth2']
1234
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1235
- :header_params => header_params,
1236
- :query_params => query_params,
1237
- :form_params => form_params,
1238
- :body => post_body,
1239
- :auth_names => auth_names,
1240
- :return_type => 'Variant')
1241
- if @api_client.config.debugging
1242
- @api_client.config.logger.debug "API called: ProductApi#update_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1243
- end
1244
- return data, status_code, headers
1245
- end
1246
-
1247
- #
1248
- #
1249
- # @param product_id ID of the product.
1250
- # @param variant_id ID of the variant.
1251
- # @param inventory Inventory of the product.
1252
- # @param [Hash] opts the optional parameters
1253
- # @return [Inventory]
1254
- def update_variant_inventory(product_id, variant_id, inventory, opts = {})
1255
- data, _status_code, _headers = update_variant_inventory_with_http_info(product_id, variant_id, inventory, opts)
1256
- return data
1257
- end
1258
-
1259
- #
1260
- #
1261
- # @param product_id ID of the product.
1262
- # @param variant_id ID of the variant.
1263
- # @param inventory Inventory of the product.
1264
- # @param [Hash] opts the optional parameters
1265
- # @return [Array<(Inventory, Fixnum, Hash)>] Inventory data, response status code and response headers
1266
- def update_variant_inventory_with_http_info(product_id, variant_id, inventory, opts = {})
1267
- if @api_client.config.debugging
1268
- @api_client.config.logger.debug "Calling API: ProductApi.update_variant_inventory ..."
1269
- end
1270
- # verify the required parameter 'product_id' is set
1271
- fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductApi.update_variant_inventory" if product_id.nil?
1272
- # verify the required parameter 'variant_id' is set
1273
- fail ArgumentError, "Missing the required parameter 'variant_id' when calling ProductApi.update_variant_inventory" if variant_id.nil?
1274
- # verify the required parameter 'inventory' is set
1275
- fail ArgumentError, "Missing the required parameter 'inventory' when calling ProductApi.update_variant_inventory" if inventory.nil?
1276
- # resource path
1277
- local_var_path = "/products/{productID}/variants/inventory/{variantID}/{inventory}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'variantID' + '}', variant_id.to_s).sub('{' + 'inventory' + '}', inventory.to_s)
1278
-
1279
- # query parameters
1280
- query_params = {}
1281
-
1282
- # header parameters
1283
- header_params = {}
1284
-
1285
- # HTTP header 'Accept' (if needed)
1286
- local_header_accept = ['application/json']
1287
- local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1288
-
1289
- # HTTP header 'Content-Type'
1290
- local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1291
- header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1292
-
1293
- # form parameters
1294
- form_params = {}
1295
-
1296
- # http body (model)
1297
- post_body = nil
1298
- auth_names = ['oauth2']
1299
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1300
- :header_params => header_params,
1301
- :query_params => query_params,
1302
- :form_params => form_params,
1303
- :body => post_body,
1304
- :auth_names => auth_names,
1305
- :return_type => 'Inventory')
1306
- if @api_client.config.debugging
1307
- @api_client.config.logger.debug "API called: ProductApi#update_variant_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1308
- end
1309
- return data, status_code, headers
1310
- end
1311
- end
1312
- end