order_cloud 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (392) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/README.md +476 -0
  4. data/Rakefile +31 -0
  5. data/docs/AccessToken.md +10 -0
  6. data/docs/Address.md +20 -0
  7. data/docs/AddressApi.md +520 -0
  8. data/docs/AddressAssignment.md +12 -0
  9. data/docs/AdminAddressApi.md +324 -0
  10. data/docs/AdminCompany.md +10 -0
  11. data/docs/AdminModelOnView.md +7 -0
  12. data/docs/AdminUserApi.md +323 -0
  13. data/docs/ApprovalRule.md +20 -0
  14. data/docs/ApprovalRuleApi.md +342 -0
  15. data/docs/BaseSpec.md +15 -0
  16. data/docs/Buyer.md +11 -0
  17. data/docs/BuyerAddress.md +11 -0
  18. data/docs/BuyerApi.md +324 -0
  19. data/docs/BuyerCreditCard.md +9 -0
  20. data/docs/BuyerProduct.md +9 -0
  21. data/docs/BuyerSpec.md +9 -0
  22. data/docs/Category.md +15 -0
  23. data/docs/CategoryApi.md +684 -0
  24. data/docs/CategoryAssignment.md +10 -0
  25. data/docs/CategoryProductAssignment.md +10 -0
  26. data/docs/CostCenter.md +11 -0
  27. data/docs/CostCenterApi.md +516 -0
  28. data/docs/CostCenterAssignment.md +10 -0
  29. data/docs/CreditCard.md +15 -0
  30. data/docs/CreditCardApi.md +516 -0
  31. data/docs/CreditCardAssignment.md +10 -0
  32. data/docs/EmailTemplate.md +12 -0
  33. data/docs/EmailTemplateApi.md +223 -0
  34. data/docs/File.md +10 -0
  35. data/docs/FileApi.md +162 -0
  36. data/docs/ImpersonateTokenRequest.md +9 -0
  37. data/docs/Inventory.md +12 -0
  38. data/docs/LineItem.md +23 -0
  39. data/docs/LineItemApi.md +478 -0
  40. data/docs/LineItemSpec.md +11 -0
  41. data/docs/ListAddress.md +9 -0
  42. data/docs/ListAddressAssignment.md +9 -0
  43. data/docs/ListAdminCompany.md +9 -0
  44. data/docs/ListApiClient.md +9 -0
  45. data/docs/ListApprovalRule.md +9 -0
  46. data/docs/ListBuyer.md +9 -0
  47. data/docs/ListBuyerAddress.md +9 -0
  48. data/docs/ListBuyerCreditCard.md +9 -0
  49. data/docs/ListBuyerProduct.md +9 -0
  50. data/docs/ListBuyerSpec.md +9 -0
  51. data/docs/ListCategory.md +9 -0
  52. data/docs/ListCategoryAssignment.md +9 -0
  53. data/docs/ListCategoryProductAssignment.md +9 -0
  54. data/docs/ListCostCenter.md +9 -0
  55. data/docs/ListCostCenterAssignment.md +9 -0
  56. data/docs/ListCreditCard.md +9 -0
  57. data/docs/ListCreditCardAssignment.md +9 -0
  58. data/docs/ListDevAccessibleCompany.md +9 -0
  59. data/docs/ListFile.md +9 -0
  60. data/docs/ListInventory.md +9 -0
  61. data/docs/ListLineItem.md +9 -0
  62. data/docs/ListOrder.md +9 -0
  63. data/docs/ListOrderApproval.md +9 -0
  64. data/docs/ListOrderPromotion.md +9 -0
  65. data/docs/ListPayment.md +9 -0
  66. data/docs/ListPriceSchedule.md +9 -0
  67. data/docs/ListProduct.md +9 -0
  68. data/docs/ListProductAssignment.md +9 -0
  69. data/docs/ListPromotion.md +9 -0
  70. data/docs/ListPromotionAssignment.md +9 -0
  71. data/docs/ListSecurityProfile.md +9 -0
  72. data/docs/ListSecurityProfileAssignment.md +9 -0
  73. data/docs/ListShipment.md +9 -0
  74. data/docs/ListSpec.md +9 -0
  75. data/docs/ListSpecOption.md +9 -0
  76. data/docs/ListSpecProductAssignment.md +9 -0
  77. data/docs/ListSpendingAccount.md +9 -0
  78. data/docs/ListSpendingAccountAssignment.md +9 -0
  79. data/docs/ListUser.md +9 -0
  80. data/docs/ListUserGroup.md +9 -0
  81. data/docs/ListUserGroupAssignment.md +9 -0
  82. data/docs/ListVariant.md +9 -0
  83. data/docs/ListWebHook.md +9 -0
  84. data/docs/ListWebHookRoute.md +9 -0
  85. data/docs/ListXpIndex.md +9 -0
  86. data/docs/MeApi.md +1488 -0
  87. data/docs/Meta.md +12 -0
  88. data/docs/Order.md +31 -0
  89. data/docs/OrderApi.md +1277 -0
  90. data/docs/OrderApproval.md +16 -0
  91. data/docs/OrderPromotion.md +8 -0
  92. data/docs/PasswordReset.md +10 -0
  93. data/docs/PasswordResetApi.md +109 -0
  94. data/docs/PasswordResetRequest.md +11 -0
  95. data/docs/Payment.md +16 -0
  96. data/docs/PaymentApi.md +601 -0
  97. data/docs/PaymentTransaction.md +15 -0
  98. data/docs/PingResponse.md +8 -0
  99. data/docs/PriceBreak.md +9 -0
  100. data/docs/PriceSchedule.md +18 -0
  101. data/docs/PriceScheduleApi.md +429 -0
  102. data/docs/Product.md +22 -0
  103. data/docs/ProductApi.md +1115 -0
  104. data/docs/ProductAssignment.md +13 -0
  105. data/docs/Promotion.md +21 -0
  106. data/docs/PromotionApi.md +495 -0
  107. data/docs/PromotionAssignment.md +11 -0
  108. data/docs/SecurityProfile.md +11 -0
  109. data/docs/SecurityProfileApi.md +290 -0
  110. data/docs/SecurityProfileAssignment.md +11 -0
  111. data/docs/Shipment.md +14 -0
  112. data/docs/ShipmentApi.md +459 -0
  113. data/docs/ShipmentItem.md +10 -0
  114. data/docs/Spec.md +8 -0
  115. data/docs/SpecApi.md +816 -0
  116. data/docs/SpecOption.md +14 -0
  117. data/docs/SpecProductAssignment.md +10 -0
  118. data/docs/SpendingAccount.md +15 -0
  119. data/docs/SpendingAccountApi.md +516 -0
  120. data/docs/SpendingAccountAssignment.md +11 -0
  121. data/docs/User.md +17 -0
  122. data/docs/UserApi.md +399 -0
  123. data/docs/UserGroup.md +11 -0
  124. data/docs/UserGroupApi.md +508 -0
  125. data/docs/UserGroupAssignment.md +9 -0
  126. data/docs/Variant.md +12 -0
  127. data/docs/WebHook.md +18 -0
  128. data/docs/WebHookRoute.md +10 -0
  129. data/docs/XpIndex.md +9 -0
  130. data/git_push.sh +67 -0
  131. data/lib/order_cloud.rb +176 -0
  132. data/lib/order_cloud/api/address_api.rb +628 -0
  133. data/lib/order_cloud/api/admin_address_api.rb +397 -0
  134. data/lib/order_cloud/api/admin_user_api.rb +396 -0
  135. data/lib/order_cloud/api/approval_rule_api.rb +421 -0
  136. data/lib/order_cloud/api/buyer_api.rb +397 -0
  137. data/lib/order_cloud/api/category_api.rb +817 -0
  138. data/lib/order_cloud/api/cost_center_api.rb +622 -0
  139. data/lib/order_cloud/api/credit_card_api.rb +622 -0
  140. data/lib/order_cloud/api/email_template_api.rb +283 -0
  141. data/lib/order_cloud/api/file_api.rb +206 -0
  142. data/lib/order_cloud/api/line_item_api.rb +583 -0
  143. data/lib/order_cloud/api/me_api.rb +1747 -0
  144. data/lib/order_cloud/api/order_api.rb +1509 -0
  145. data/lib/order_cloud/api/password_reset_api.rb +150 -0
  146. data/lib/order_cloud/api/payment_api.rb +728 -0
  147. data/lib/order_cloud/api/price_schedule_api.rb +519 -0
  148. data/lib/order_cloud/api/product_api.rb +1311 -0
  149. data/lib/order_cloud/api/promotion_api.rb +596 -0
  150. data/lib/order_cloud/api/security_profile_api.rb +361 -0
  151. data/lib/order_cloud/api/shipment_api.rb +558 -0
  152. data/lib/order_cloud/api/spec_api.rb +965 -0
  153. data/lib/order_cloud/api/spending_account_api.rb +622 -0
  154. data/lib/order_cloud/api/user_api.rb +488 -0
  155. data/lib/order_cloud/api/user_group_api.rb +613 -0
  156. data/lib/order_cloud/api_auth.rb +99 -0
  157. data/lib/order_cloud/api_client.rb +385 -0
  158. data/lib/order_cloud/api_error.rb +47 -0
  159. data/lib/order_cloud/configuration.rb +244 -0
  160. data/lib/order_cloud/models/access_token.rb +217 -0
  161. data/lib/order_cloud/models/address.rb +307 -0
  162. data/lib/order_cloud/models/address_assignment.rb +235 -0
  163. data/lib/order_cloud/models/admin_company.rb +217 -0
  164. data/lib/order_cloud/models/admin_model_on_view.rb +190 -0
  165. data/lib/order_cloud/models/approval_rule.rb +307 -0
  166. data/lib/order_cloud/models/base_spec.rb +262 -0
  167. data/lib/order_cloud/models/buyer.rb +226 -0
  168. data/lib/order_cloud/models/buyer_address.rb +226 -0
  169. data/lib/order_cloud/models/buyer_credit_card.rb +208 -0
  170. data/lib/order_cloud/models/buyer_product.rb +208 -0
  171. data/lib/order_cloud/models/buyer_spec.rb +210 -0
  172. data/lib/order_cloud/models/category.rb +262 -0
  173. data/lib/order_cloud/models/category_assignment.rb +217 -0
  174. data/lib/order_cloud/models/category_product_assignment.rb +217 -0
  175. data/lib/order_cloud/models/cost_center.rb +226 -0
  176. data/lib/order_cloud/models/cost_center_assignment.rb +217 -0
  177. data/lib/order_cloud/models/credit_card.rb +262 -0
  178. data/lib/order_cloud/models/credit_card_assignment.rb +217 -0
  179. data/lib/order_cloud/models/email_template.rb +235 -0
  180. data/lib/order_cloud/models/file.rb +217 -0
  181. data/lib/order_cloud/models/impersonate_token_request.rb +208 -0
  182. data/lib/order_cloud/models/inventory.rb +235 -0
  183. data/lib/order_cloud/models/line_item.rb +336 -0
  184. data/lib/order_cloud/models/line_item_spec.rb +226 -0
  185. data/lib/order_cloud/models/list_address.rb +210 -0
  186. data/lib/order_cloud/models/list_address_assignment.rb +210 -0
  187. data/lib/order_cloud/models/list_admin_company.rb +210 -0
  188. data/lib/order_cloud/models/list_api_client.rb +210 -0
  189. data/lib/order_cloud/models/list_approval_rule.rb +210 -0
  190. data/lib/order_cloud/models/list_buyer.rb +210 -0
  191. data/lib/order_cloud/models/list_buyer_address.rb +210 -0
  192. data/lib/order_cloud/models/list_buyer_credit_card.rb +210 -0
  193. data/lib/order_cloud/models/list_buyer_product.rb +210 -0
  194. data/lib/order_cloud/models/list_buyer_spec.rb +210 -0
  195. data/lib/order_cloud/models/list_category.rb +210 -0
  196. data/lib/order_cloud/models/list_category_assignment.rb +210 -0
  197. data/lib/order_cloud/models/list_category_product_assignment.rb +210 -0
  198. data/lib/order_cloud/models/list_cost_center.rb +210 -0
  199. data/lib/order_cloud/models/list_cost_center_assignment.rb +210 -0
  200. data/lib/order_cloud/models/list_credit_card.rb +210 -0
  201. data/lib/order_cloud/models/list_credit_card_assignment.rb +210 -0
  202. data/lib/order_cloud/models/list_dev_accessible_company.rb +210 -0
  203. data/lib/order_cloud/models/list_file.rb +210 -0
  204. data/lib/order_cloud/models/list_inventory.rb +210 -0
  205. data/lib/order_cloud/models/list_line_item.rb +210 -0
  206. data/lib/order_cloud/models/list_order.rb +210 -0
  207. data/lib/order_cloud/models/list_order_approval.rb +210 -0
  208. data/lib/order_cloud/models/list_order_promotion.rb +210 -0
  209. data/lib/order_cloud/models/list_payment.rb +210 -0
  210. data/lib/order_cloud/models/list_price_schedule.rb +210 -0
  211. data/lib/order_cloud/models/list_product.rb +210 -0
  212. data/lib/order_cloud/models/list_product_assignment.rb +210 -0
  213. data/lib/order_cloud/models/list_promotion.rb +210 -0
  214. data/lib/order_cloud/models/list_promotion_assignment.rb +210 -0
  215. data/lib/order_cloud/models/list_security_profile.rb +210 -0
  216. data/lib/order_cloud/models/list_security_profile_assignment.rb +210 -0
  217. data/lib/order_cloud/models/list_shipment.rb +210 -0
  218. data/lib/order_cloud/models/list_spec.rb +210 -0
  219. data/lib/order_cloud/models/list_spec_option.rb +210 -0
  220. data/lib/order_cloud/models/list_spec_product_assignment.rb +210 -0
  221. data/lib/order_cloud/models/list_spending_account.rb +210 -0
  222. data/lib/order_cloud/models/list_spending_account_assignment.rb +210 -0
  223. data/lib/order_cloud/models/list_user.rb +210 -0
  224. data/lib/order_cloud/models/list_user_group.rb +210 -0
  225. data/lib/order_cloud/models/list_user_group_assignment.rb +210 -0
  226. data/lib/order_cloud/models/list_variant.rb +210 -0
  227. data/lib/order_cloud/models/list_web_hook.rb +210 -0
  228. data/lib/order_cloud/models/list_web_hook_route.rb +210 -0
  229. data/lib/order_cloud/models/list_xp_index.rb +210 -0
  230. data/lib/order_cloud/models/meta.rb +237 -0
  231. data/lib/order_cloud/models/order.rb +406 -0
  232. data/lib/order_cloud/models/order_approval.rb +271 -0
  233. data/lib/order_cloud/models/order_promotion.rb +199 -0
  234. data/lib/order_cloud/models/password_reset.rb +217 -0
  235. data/lib/order_cloud/models/password_reset_request.rb +226 -0
  236. data/lib/order_cloud/models/payment.rb +273 -0
  237. data/lib/order_cloud/models/payment_transaction.rb +262 -0
  238. data/lib/order_cloud/models/ping_response.rb +199 -0
  239. data/lib/order_cloud/models/price_break.rb +208 -0
  240. data/lib/order_cloud/models/price_schedule.rb +291 -0
  241. data/lib/order_cloud/models/product.rb +325 -0
  242. data/lib/order_cloud/models/product_assignment.rb +244 -0
  243. data/lib/order_cloud/models/promotion.rb +316 -0
  244. data/lib/order_cloud/models/promotion_assignment.rb +226 -0
  245. data/lib/order_cloud/models/security_profile.rb +228 -0
  246. data/lib/order_cloud/models/security_profile_assignment.rb +226 -0
  247. data/lib/order_cloud/models/shipment.rb +255 -0
  248. data/lib/order_cloud/models/shipment_item.rb +217 -0
  249. data/lib/order_cloud/models/spec.rb +199 -0
  250. data/lib/order_cloud/models/spec_option.rb +253 -0
  251. data/lib/order_cloud/models/spec_product_assignment.rb +217 -0
  252. data/lib/order_cloud/models/spending_account.rb +262 -0
  253. data/lib/order_cloud/models/spending_account_assignment.rb +226 -0
  254. data/lib/order_cloud/models/user.rb +280 -0
  255. data/lib/order_cloud/models/user_group.rb +226 -0
  256. data/lib/order_cloud/models/user_group_assignment.rb +208 -0
  257. data/lib/order_cloud/models/variant.rb +235 -0
  258. data/lib/order_cloud/models/web_hook.rb +289 -0
  259. data/lib/order_cloud/models/web_hook_route.rb +217 -0
  260. data/lib/order_cloud/models/xp_index.rb +208 -0
  261. data/lib/order_cloud/version.rb +26 -0
  262. data/order_cloud.gemspec +56 -0
  263. data/spec/api/address_api_spec.rb +179 -0
  264. data/spec/api/admin_address_api_spec.rb +125 -0
  265. data/spec/api/admin_user_api_spec.rb +125 -0
  266. data/spec/api/approval_rule_api_spec.rb +131 -0
  267. data/spec/api/buyer_api_spec.rb +125 -0
  268. data/spec/api/category_api_spec.rb +221 -0
  269. data/spec/api/cost_center_api_spec.rb +177 -0
  270. data/spec/api/credit_card_api_spec.rb +177 -0
  271. data/spec/api/email_template_api_spec.rb +100 -0
  272. data/spec/api/file_api_spec.rb +83 -0
  273. data/spec/api/line_item_api_spec.rb +167 -0
  274. data/spec/api/me_api_spec.rb +431 -0
  275. data/spec/api/order_api_spec.rb +375 -0
  276. data/spec/api/password_reset_api_spec.rb +71 -0
  277. data/spec/api/payment_api_spec.rb +199 -0
  278. data/spec/api/price_schedule_api_spec.rb +151 -0
  279. data/spec/api/product_api_spec.rb +330 -0
  280. data/spec/api/promotion_api_spec.rb +170 -0
  281. data/spec/api/security_profile_api_spec.rb +120 -0
  282. data/spec/api/shipment_api_spec.rb +161 -0
  283. data/spec/api/spec_api_spec.rb +250 -0
  284. data/spec/api/spending_account_api_spec.rb +177 -0
  285. data/spec/api/user_api_spec.rb +146 -0
  286. data/spec/api/user_group_api_spec.rb +174 -0
  287. data/spec/api_auth_spec.rb +165 -0
  288. data/spec/api_client_spec.rb +237 -0
  289. data/spec/configuration_spec.rb +80 -0
  290. data/spec/models/access_token_spec.rb +65 -0
  291. data/spec/models/address_assignment_spec.rb +77 -0
  292. data/spec/models/address_spec.rb +125 -0
  293. data/spec/models/admin_company_spec.rb +65 -0
  294. data/spec/models/admin_model_on_view_spec.rb +47 -0
  295. data/spec/models/approval_rule_spec.rb +125 -0
  296. data/spec/models/base_spec_spec.rb +95 -0
  297. data/spec/models/buyer_address_spec.rb +71 -0
  298. data/spec/models/buyer_credit_card_spec.rb +59 -0
  299. data/spec/models/buyer_product_spec.rb +59 -0
  300. data/spec/models/buyer_spec.rb +71 -0
  301. data/spec/models/buyer_spec_spec.rb +59 -0
  302. data/spec/models/category_assignment_spec.rb +65 -0
  303. data/spec/models/category_product_assignment_spec.rb +65 -0
  304. data/spec/models/category_spec.rb +95 -0
  305. data/spec/models/cost_center_assignment_spec.rb +65 -0
  306. data/spec/models/cost_center_spec.rb +71 -0
  307. data/spec/models/credit_card_assignment_spec.rb +65 -0
  308. data/spec/models/credit_card_spec.rb +95 -0
  309. data/spec/models/email_template_spec.rb +77 -0
  310. data/spec/models/file_spec.rb +65 -0
  311. data/spec/models/impersonate_token_request_spec.rb +59 -0
  312. data/spec/models/inventory_spec.rb +77 -0
  313. data/spec/models/line_item_spec.rb +143 -0
  314. data/spec/models/line_item_spec_spec.rb +71 -0
  315. data/spec/models/list_address_assignment_spec.rb +59 -0
  316. data/spec/models/list_address_spec.rb +59 -0
  317. data/spec/models/list_admin_company_spec.rb +59 -0
  318. data/spec/models/list_api_client_spec.rb +59 -0
  319. data/spec/models/list_approval_rule_spec.rb +59 -0
  320. data/spec/models/list_buyer_address_spec.rb +59 -0
  321. data/spec/models/list_buyer_credit_card_spec.rb +59 -0
  322. data/spec/models/list_buyer_product_spec.rb +59 -0
  323. data/spec/models/list_buyer_spec.rb +59 -0
  324. data/spec/models/list_buyer_spec_spec.rb +59 -0
  325. data/spec/models/list_category_assignment_spec.rb +59 -0
  326. data/spec/models/list_category_product_assignment_spec.rb +59 -0
  327. data/spec/models/list_category_spec.rb +59 -0
  328. data/spec/models/list_cost_center_assignment_spec.rb +59 -0
  329. data/spec/models/list_cost_center_spec.rb +59 -0
  330. data/spec/models/list_credit_card_assignment_spec.rb +59 -0
  331. data/spec/models/list_credit_card_spec.rb +59 -0
  332. data/spec/models/list_dev_accessible_company_spec.rb +59 -0
  333. data/spec/models/list_file_spec.rb +59 -0
  334. data/spec/models/list_inventory_spec.rb +59 -0
  335. data/spec/models/list_line_item_spec.rb +59 -0
  336. data/spec/models/list_order_approval_spec.rb +59 -0
  337. data/spec/models/list_order_promotion_spec.rb +59 -0
  338. data/spec/models/list_order_spec.rb +59 -0
  339. data/spec/models/list_payment_spec.rb +59 -0
  340. data/spec/models/list_price_schedule_spec.rb +59 -0
  341. data/spec/models/list_product_assignment_spec.rb +59 -0
  342. data/spec/models/list_product_spec.rb +59 -0
  343. data/spec/models/list_promotion_assignment_spec.rb +59 -0
  344. data/spec/models/list_promotion_spec.rb +59 -0
  345. data/spec/models/list_security_profile_assignment_spec.rb +59 -0
  346. data/spec/models/list_security_profile_spec.rb +59 -0
  347. data/spec/models/list_shipment_spec.rb +59 -0
  348. data/spec/models/list_spec_option_spec.rb +59 -0
  349. data/spec/models/list_spec_product_assignment_spec.rb +59 -0
  350. data/spec/models/list_spec_spec.rb +59 -0
  351. data/spec/models/list_spending_account_assignment_spec.rb +59 -0
  352. data/spec/models/list_spending_account_spec.rb +59 -0
  353. data/spec/models/list_user_group_assignment_spec.rb +59 -0
  354. data/spec/models/list_user_group_spec.rb +59 -0
  355. data/spec/models/list_user_spec.rb +59 -0
  356. data/spec/models/list_variant_spec.rb +59 -0
  357. data/spec/models/list_web_hook_route_spec.rb +59 -0
  358. data/spec/models/list_web_hook_spec.rb +59 -0
  359. data/spec/models/list_xp_index_spec.rb +59 -0
  360. data/spec/models/meta_spec.rb +77 -0
  361. data/spec/models/order_approval_spec.rb +101 -0
  362. data/spec/models/order_promotion_spec.rb +53 -0
  363. data/spec/models/order_spec.rb +191 -0
  364. data/spec/models/password_reset_request_spec.rb +71 -0
  365. data/spec/models/password_reset_spec.rb +65 -0
  366. data/spec/models/payment_spec.rb +101 -0
  367. data/spec/models/payment_transaction_spec.rb +95 -0
  368. data/spec/models/ping_response_spec.rb +53 -0
  369. data/spec/models/price_break_spec.rb +59 -0
  370. data/spec/models/price_schedule_spec.rb +113 -0
  371. data/spec/models/product_assignment_spec.rb +83 -0
  372. data/spec/models/product_spec.rb +137 -0
  373. data/spec/models/promotion_assignment_spec.rb +71 -0
  374. data/spec/models/promotion_spec.rb +131 -0
  375. data/spec/models/security_profile_assignment_spec.rb +71 -0
  376. data/spec/models/security_profile_spec.rb +71 -0
  377. data/spec/models/shipment_item_spec.rb +65 -0
  378. data/spec/models/shipment_spec.rb +89 -0
  379. data/spec/models/spec_option_spec.rb +89 -0
  380. data/spec/models/spec_product_assignment_spec.rb +65 -0
  381. data/spec/models/spec_spec.rb +53 -0
  382. data/spec/models/spending_account_assignment_spec.rb +71 -0
  383. data/spec/models/spending_account_spec.rb +95 -0
  384. data/spec/models/user_group_assignment_spec.rb +59 -0
  385. data/spec/models/user_group_spec.rb +71 -0
  386. data/spec/models/user_spec.rb +107 -0
  387. data/spec/models/variant_spec.rb +77 -0
  388. data/spec/models/web_hook_route_spec.rb +65 -0
  389. data/spec/models/web_hook_spec.rb +113 -0
  390. data/spec/models/xp_index_spec.rb +59 -0
  391. data/spec/spec_helper.rb +122 -0
  392. metadata +757 -0
@@ -0,0 +1,361 @@
1
+ =begin
2
+ #OrderCloud
3
+
4
+ #A full ecommerce backend as a service.
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 SecurityProfileApi
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 buyer_id ID of the buyer.
37
+ # @param security_profile_id ID of the security profile.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :user_id ID of the user.
40
+ # @option opts [String] :user_group_id ID of the user group.
41
+ # @return [nil]
42
+ def delete_assignment(buyer_id, security_profile_id, opts = {})
43
+ delete_assignment_with_http_info(buyer_id, security_profile_id, opts)
44
+ return nil
45
+ end
46
+
47
+ #
48
+ #
49
+ # @param buyer_id ID of the buyer.
50
+ # @param security_profile_id ID of the security profile.
51
+ # @param [Hash] opts the optional parameters
52
+ # @option opts [String] :user_id ID of the user.
53
+ # @option opts [String] :user_group_id ID of the user group.
54
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
55
+ def delete_assignment_with_http_info(buyer_id, security_profile_id, opts = {})
56
+ if @api_client.config.debugging
57
+ @api_client.config.logger.debug "Calling API: SecurityProfileApi.delete_assignment ..."
58
+ end
59
+ # verify the required parameter 'buyer_id' is set
60
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling SecurityProfileApi.delete_assignment" if buyer_id.nil?
61
+ # verify the required parameter 'security_profile_id' is set
62
+ fail ArgumentError, "Missing the required parameter 'security_profile_id' when calling SecurityProfileApi.delete_assignment" if security_profile_id.nil?
63
+ # resource path
64
+ local_var_path = "/SecurityProfiles/{securityProfileID}/assignments".sub('{format}','json').sub('{' + 'securityProfileID' + '}', security_profile_id.to_s)
65
+
66
+ # query parameters
67
+ query_params = {}
68
+ query_params[:'buyerID'] = buyer_id
69
+ query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
70
+ query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
71
+
72
+ # header parameters
73
+ header_params = {}
74
+
75
+ # HTTP header 'Accept' (if needed)
76
+ local_header_accept = ['application/json']
77
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
78
+
79
+ # HTTP header 'Content-Type'
80
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
81
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
82
+
83
+ # form parameters
84
+ form_params = {}
85
+
86
+ # http body (model)
87
+ post_body = nil
88
+ auth_names = ['oauth2']
89
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
90
+ :header_params => header_params,
91
+ :query_params => query_params,
92
+ :form_params => form_params,
93
+ :body => post_body,
94
+ :auth_names => auth_names)
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug "API called: SecurityProfileApi#delete_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
97
+ end
98
+ return data, status_code, headers
99
+ end
100
+
101
+ #
102
+ #
103
+ # @param security_profile_id ID of the security profile.
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [SecurityProfile]
106
+ def get(security_profile_id, opts = {})
107
+ data, _status_code, _headers = get_with_http_info(security_profile_id, opts)
108
+ return data
109
+ end
110
+
111
+ #
112
+ #
113
+ # @param security_profile_id ID of the security profile.
114
+ # @param [Hash] opts the optional parameters
115
+ # @return [Array<(SecurityProfile, Fixnum, Hash)>] SecurityProfile data, response status code and response headers
116
+ def get_with_http_info(security_profile_id, opts = {})
117
+ if @api_client.config.debugging
118
+ @api_client.config.logger.debug "Calling API: SecurityProfileApi.get ..."
119
+ end
120
+ # verify the required parameter 'security_profile_id' is set
121
+ fail ArgumentError, "Missing the required parameter 'security_profile_id' when calling SecurityProfileApi.get" if security_profile_id.nil?
122
+ # resource path
123
+ local_var_path = "/SecurityProfiles/{securityProfileID}".sub('{format}','json').sub('{' + 'securityProfileID' + '}', security_profile_id.to_s)
124
+
125
+ # query parameters
126
+ query_params = {}
127
+
128
+ # header parameters
129
+ header_params = {}
130
+
131
+ # HTTP header 'Accept' (if needed)
132
+ local_header_accept = ['application/json']
133
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
134
+
135
+ # HTTP header 'Content-Type'
136
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
137
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
138
+
139
+ # form parameters
140
+ form_params = {}
141
+
142
+ # http body (model)
143
+ post_body = nil
144
+ auth_names = ['oauth2']
145
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
146
+ :header_params => header_params,
147
+ :query_params => query_params,
148
+ :form_params => form_params,
149
+ :body => post_body,
150
+ :auth_names => auth_names,
151
+ :return_type => 'SecurityProfile')
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: SecurityProfileApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ #
159
+ #
160
+ # @param [Hash] opts the optional parameters
161
+ # @option opts [String] :search Word or phrase to search for.
162
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
163
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
164
+ # @option opts [Integer] :page Page of results to return. Default: 1
165
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
166
+ # @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;
167
+ # @return [ListSecurityProfile]
168
+ def list(opts = {})
169
+ data, _status_code, _headers = list_with_http_info(opts)
170
+ return data
171
+ end
172
+
173
+ #
174
+ #
175
+ # @param [Hash] opts the optional parameters
176
+ # @option opts [String] :search Word or phrase to search for.
177
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
178
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
179
+ # @option opts [Integer] :page Page of results to return. Default: 1
180
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
181
+ # @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;
182
+ # @return [Array<(ListSecurityProfile, Fixnum, Hash)>] ListSecurityProfile data, response status code and response headers
183
+ def list_with_http_info(opts = {})
184
+ if @api_client.config.debugging
185
+ @api_client.config.logger.debug "Calling API: SecurityProfileApi.list ..."
186
+ end
187
+ # resource path
188
+ local_var_path = "/SecurityProfiles".sub('{format}','json')
189
+
190
+ # query parameters
191
+ query_params = {}
192
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
193
+ query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
194
+ query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
195
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
196
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
197
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
198
+
199
+ # header parameters
200
+ header_params = {}
201
+
202
+ # HTTP header 'Accept' (if needed)
203
+ local_header_accept = ['application/json']
204
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
205
+
206
+ # HTTP header 'Content-Type'
207
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
208
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
209
+
210
+ # form parameters
211
+ form_params = {}
212
+
213
+ # http body (model)
214
+ post_body = nil
215
+ auth_names = ['oauth2']
216
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
217
+ :header_params => header_params,
218
+ :query_params => query_params,
219
+ :form_params => form_params,
220
+ :body => post_body,
221
+ :auth_names => auth_names,
222
+ :return_type => 'ListSecurityProfile')
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug "API called: SecurityProfileApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
+ end
226
+ return data, status_code, headers
227
+ end
228
+
229
+ #
230
+ #
231
+ # @param buyer_id ID of the buyer.
232
+ # @param [Hash] opts the optional parameters
233
+ # @option opts [String] :security_profile_id ID of the security profile.
234
+ # @option opts [String] :user_id ID of the user.
235
+ # @option opts [String] :user_group_id ID of the user group.
236
+ # @option opts [String] :level Level of the security profile.
237
+ # @option opts [Integer] :page Page of results to return. Default: 1
238
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
239
+ # @return [ListSecurityProfileAssignment]
240
+ def list_assignments(buyer_id, opts = {})
241
+ data, _status_code, _headers = list_assignments_with_http_info(buyer_id, opts)
242
+ return data
243
+ end
244
+
245
+ #
246
+ #
247
+ # @param buyer_id ID of the buyer.
248
+ # @param [Hash] opts the optional parameters
249
+ # @option opts [String] :security_profile_id ID of the security profile.
250
+ # @option opts [String] :user_id ID of the user.
251
+ # @option opts [String] :user_group_id ID of the user group.
252
+ # @option opts [String] :level Level of the security profile.
253
+ # @option opts [Integer] :page Page of results to return. Default: 1
254
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
255
+ # @return [Array<(ListSecurityProfileAssignment, Fixnum, Hash)>] ListSecurityProfileAssignment data, response status code and response headers
256
+ def list_assignments_with_http_info(buyer_id, opts = {})
257
+ if @api_client.config.debugging
258
+ @api_client.config.logger.debug "Calling API: SecurityProfileApi.list_assignments ..."
259
+ end
260
+ # verify the required parameter 'buyer_id' is set
261
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling SecurityProfileApi.list_assignments" if buyer_id.nil?
262
+ # resource path
263
+ local_var_path = "/SecurityProfiles/assignments".sub('{format}','json')
264
+
265
+ # query parameters
266
+ query_params = {}
267
+ query_params[:'buyerID'] = buyer_id
268
+ query_params[:'securityProfileID'] = opts[:'security_profile_id'] if !opts[:'security_profile_id'].nil?
269
+ query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
270
+ query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
271
+ query_params[:'level'] = opts[:'level'] if !opts[:'level'].nil?
272
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
273
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
274
+
275
+ # header parameters
276
+ header_params = {}
277
+
278
+ # HTTP header 'Accept' (if needed)
279
+ local_header_accept = ['application/json']
280
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
281
+
282
+ # HTTP header 'Content-Type'
283
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
284
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
285
+
286
+ # form parameters
287
+ form_params = {}
288
+
289
+ # http body (model)
290
+ post_body = nil
291
+ auth_names = ['oauth2']
292
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
293
+ :header_params => header_params,
294
+ :query_params => query_params,
295
+ :form_params => form_params,
296
+ :body => post_body,
297
+ :auth_names => auth_names,
298
+ :return_type => 'ListSecurityProfileAssignment')
299
+ if @api_client.config.debugging
300
+ @api_client.config.logger.debug "API called: SecurityProfileApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
301
+ end
302
+ return data, status_code, headers
303
+ end
304
+
305
+ #
306
+ #
307
+ # @param assignment
308
+ # @param [Hash] opts the optional parameters
309
+ # @return [nil]
310
+ def save_assignment(assignment, opts = {})
311
+ save_assignment_with_http_info(assignment, opts)
312
+ return nil
313
+ end
314
+
315
+ #
316
+ #
317
+ # @param assignment
318
+ # @param [Hash] opts the optional parameters
319
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
320
+ def save_assignment_with_http_info(assignment, opts = {})
321
+ if @api_client.config.debugging
322
+ @api_client.config.logger.debug "Calling API: SecurityProfileApi.save_assignment ..."
323
+ end
324
+ # verify the required parameter 'assignment' is set
325
+ fail ArgumentError, "Missing the required parameter 'assignment' when calling SecurityProfileApi.save_assignment" if assignment.nil?
326
+ # resource path
327
+ local_var_path = "/SecurityProfiles/assignments".sub('{format}','json')
328
+
329
+ # query parameters
330
+ query_params = {}
331
+
332
+ # header parameters
333
+ header_params = {}
334
+
335
+ # HTTP header 'Accept' (if needed)
336
+ local_header_accept = ['application/json']
337
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
338
+
339
+ # HTTP header 'Content-Type'
340
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
341
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
342
+
343
+ # form parameters
344
+ form_params = {}
345
+
346
+ # http body (model)
347
+ post_body = @api_client.object_to_http_body(assignment)
348
+ auth_names = ['oauth2']
349
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
350
+ :header_params => header_params,
351
+ :query_params => query_params,
352
+ :form_params => form_params,
353
+ :body => post_body,
354
+ :auth_names => auth_names)
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug "API called: SecurityProfileApi#save_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
357
+ end
358
+ return data, status_code, headers
359
+ end
360
+ end
361
+ end
@@ -0,0 +1,558 @@
1
+ =begin
2
+ #OrderCloud
3
+
4
+ #A full ecommerce backend as a service.
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 ShipmentApi
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 buyer_id ID of the buyer.
37
+ # @param shipment
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [Shipment]
40
+ def create(buyer_id, shipment, opts = {})
41
+ data, _status_code, _headers = create_with_http_info(buyer_id, shipment, opts)
42
+ return data
43
+ end
44
+
45
+ #
46
+ #
47
+ # @param buyer_id ID of the buyer.
48
+ # @param shipment
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [Array<(Shipment, Fixnum, Hash)>] Shipment data, response status code and response headers
51
+ def create_with_http_info(buyer_id, shipment, opts = {})
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug "Calling API: ShipmentApi.create ..."
54
+ end
55
+ # verify the required parameter 'buyer_id' is set
56
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ShipmentApi.create" if buyer_id.nil?
57
+ # verify the required parameter 'shipment' is set
58
+ fail ArgumentError, "Missing the required parameter 'shipment' when calling ShipmentApi.create" if shipment.nil?
59
+ # resource path
60
+ local_var_path = "/buyers/{buyerID}/shipments".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)
61
+
62
+ # query parameters
63
+ query_params = {}
64
+
65
+ # header parameters
66
+ header_params = {}
67
+
68
+ # HTTP header 'Accept' (if needed)
69
+ local_header_accept = ['application/json']
70
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
71
+
72
+ # HTTP header 'Content-Type'
73
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
74
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
75
+
76
+ # form parameters
77
+ form_params = {}
78
+
79
+ # http body (model)
80
+ post_body = @api_client.object_to_http_body(shipment)
81
+ auth_names = ['oauth2']
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
83
+ :header_params => header_params,
84
+ :query_params => query_params,
85
+ :form_params => form_params,
86
+ :body => post_body,
87
+ :auth_names => auth_names,
88
+ :return_type => 'Shipment')
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug "API called: ShipmentApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
+ end
92
+ return data, status_code, headers
93
+ end
94
+
95
+ #
96
+ #
97
+ # @param buyer_id ID of the buyer.
98
+ # @param shipment_id ID of the shipment.
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [nil]
101
+ def delete(buyer_id, shipment_id, opts = {})
102
+ delete_with_http_info(buyer_id, shipment_id, opts)
103
+ return nil
104
+ end
105
+
106
+ #
107
+ #
108
+ # @param buyer_id ID of the buyer.
109
+ # @param shipment_id ID of the shipment.
110
+ # @param [Hash] opts the optional parameters
111
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
112
+ def delete_with_http_info(buyer_id, shipment_id, opts = {})
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug "Calling API: ShipmentApi.delete ..."
115
+ end
116
+ # verify the required parameter 'buyer_id' is set
117
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ShipmentApi.delete" if buyer_id.nil?
118
+ # verify the required parameter 'shipment_id' is set
119
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.delete" if shipment_id.nil?
120
+ # resource path
121
+ local_var_path = "/buyers/{buyerID}/shipments/{shipmentID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'shipmentID' + '}', shipment_id.to_s)
122
+
123
+ # query parameters
124
+ query_params = {}
125
+
126
+ # header parameters
127
+ header_params = {}
128
+
129
+ # HTTP header 'Accept' (if needed)
130
+ local_header_accept = ['application/json']
131
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
132
+
133
+ # HTTP header 'Content-Type'
134
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
135
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
136
+
137
+ # form parameters
138
+ form_params = {}
139
+
140
+ # http body (model)
141
+ post_body = nil
142
+ auth_names = ['oauth2']
143
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names)
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug "API called: ShipmentApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
151
+ end
152
+ return data, status_code, headers
153
+ end
154
+
155
+ #
156
+ #
157
+ # @param buyer_id ID of the buyer.
158
+ # @param shipment_id ID of the shipment.
159
+ # @param order_id ID of the order.
160
+ # @param line_item_id ID of the line item.
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Shipment]
163
+ def delete_item(buyer_id, shipment_id, order_id, line_item_id, opts = {})
164
+ data, _status_code, _headers = delete_item_with_http_info(buyer_id, shipment_id, order_id, line_item_id, opts)
165
+ return data
166
+ end
167
+
168
+ #
169
+ #
170
+ # @param buyer_id ID of the buyer.
171
+ # @param shipment_id ID of the shipment.
172
+ # @param order_id ID of the order.
173
+ # @param line_item_id ID of the line item.
174
+ # @param [Hash] opts the optional parameters
175
+ # @return [Array<(Shipment, Fixnum, Hash)>] Shipment data, response status code and response headers
176
+ def delete_item_with_http_info(buyer_id, shipment_id, order_id, line_item_id, opts = {})
177
+ if @api_client.config.debugging
178
+ @api_client.config.logger.debug "Calling API: ShipmentApi.delete_item ..."
179
+ end
180
+ # verify the required parameter 'buyer_id' is set
181
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ShipmentApi.delete_item" if buyer_id.nil?
182
+ # verify the required parameter 'shipment_id' is set
183
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.delete_item" if shipment_id.nil?
184
+ # verify the required parameter 'order_id' is set
185
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling ShipmentApi.delete_item" if order_id.nil?
186
+ # verify the required parameter 'line_item_id' is set
187
+ fail ArgumentError, "Missing the required parameter 'line_item_id' when calling ShipmentApi.delete_item" if line_item_id.nil?
188
+ # resource path
189
+ local_var_path = "/buyers/{buyerID}/shipments/{shipmentID}/items/{orderID}/{lineItemID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'shipmentID' + '}', shipment_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'lineItemID' + '}', line_item_id.to_s)
190
+
191
+ # query parameters
192
+ query_params = {}
193
+
194
+ # header parameters
195
+ header_params = {}
196
+
197
+ # HTTP header 'Accept' (if needed)
198
+ local_header_accept = ['application/json']
199
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
200
+
201
+ # HTTP header 'Content-Type'
202
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
203
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
204
+
205
+ # form parameters
206
+ form_params = {}
207
+
208
+ # http body (model)
209
+ post_body = nil
210
+ auth_names = ['oauth2']
211
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
212
+ :header_params => header_params,
213
+ :query_params => query_params,
214
+ :form_params => form_params,
215
+ :body => post_body,
216
+ :auth_names => auth_names,
217
+ :return_type => 'Shipment')
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "API called: ShipmentApi#delete_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
220
+ end
221
+ return data, status_code, headers
222
+ end
223
+
224
+ #
225
+ #
226
+ # @param buyer_id ID of the buyer.
227
+ # @param shipment_id ID of the shipment.
228
+ # @param [Hash] opts the optional parameters
229
+ # @return [Shipment]
230
+ def get(buyer_id, shipment_id, opts = {})
231
+ data, _status_code, _headers = get_with_http_info(buyer_id, shipment_id, opts)
232
+ return data
233
+ end
234
+
235
+ #
236
+ #
237
+ # @param buyer_id ID of the buyer.
238
+ # @param shipment_id ID of the shipment.
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [Array<(Shipment, Fixnum, Hash)>] Shipment data, response status code and response headers
241
+ def get_with_http_info(buyer_id, shipment_id, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug "Calling API: ShipmentApi.get ..."
244
+ end
245
+ # verify the required parameter 'buyer_id' is set
246
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ShipmentApi.get" if buyer_id.nil?
247
+ # verify the required parameter 'shipment_id' is set
248
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.get" if shipment_id.nil?
249
+ # resource path
250
+ local_var_path = "/buyers/{buyerID}/shipments/{shipmentID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'shipmentID' + '}', shipment_id.to_s)
251
+
252
+ # query parameters
253
+ query_params = {}
254
+
255
+ # header parameters
256
+ header_params = {}
257
+
258
+ # HTTP header 'Accept' (if needed)
259
+ local_header_accept = ['application/json']
260
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
261
+
262
+ # HTTP header 'Content-Type'
263
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
264
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
265
+
266
+ # form parameters
267
+ form_params = {}
268
+
269
+ # http body (model)
270
+ post_body = nil
271
+ auth_names = ['oauth2']
272
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
273
+ :header_params => header_params,
274
+ :query_params => query_params,
275
+ :form_params => form_params,
276
+ :body => post_body,
277
+ :auth_names => auth_names,
278
+ :return_type => 'Shipment')
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug "API called: ShipmentApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
281
+ end
282
+ return data, status_code, headers
283
+ end
284
+
285
+ #
286
+ #
287
+ # @param buyer_id ID of the buyer.
288
+ # @param [Hash] opts the optional parameters
289
+ # @option opts [String] :order_id ID of the order.
290
+ # @option opts [String] :search Word or phrase to search for.
291
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
292
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
293
+ # @option opts [Integer] :page Page of results to return. Default: 1
294
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
295
+ # @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;
296
+ # @return [ListShipment]
297
+ def list(buyer_id, opts = {})
298
+ data, _status_code, _headers = list_with_http_info(buyer_id, opts)
299
+ return data
300
+ end
301
+
302
+ #
303
+ #
304
+ # @param buyer_id ID of the buyer.
305
+ # @param [Hash] opts the optional parameters
306
+ # @option opts [String] :order_id ID of the order.
307
+ # @option opts [String] :search Word or phrase to search for.
308
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
309
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
310
+ # @option opts [Integer] :page Page of results to return. Default: 1
311
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
312
+ # @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;
313
+ # @return [Array<(ListShipment, Fixnum, Hash)>] ListShipment data, response status code and response headers
314
+ def list_with_http_info(buyer_id, opts = {})
315
+ if @api_client.config.debugging
316
+ @api_client.config.logger.debug "Calling API: ShipmentApi.list ..."
317
+ end
318
+ # verify the required parameter 'buyer_id' is set
319
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ShipmentApi.list" if buyer_id.nil?
320
+ # resource path
321
+ local_var_path = "/buyers/{buyerID}/shipments".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)
322
+
323
+ # query parameters
324
+ query_params = {}
325
+ query_params[:'orderID'] = opts[:'order_id'] if !opts[:'order_id'].nil?
326
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
327
+ query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
328
+ query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
329
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
330
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
331
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
332
+
333
+ # header parameters
334
+ header_params = {}
335
+
336
+ # HTTP header 'Accept' (if needed)
337
+ local_header_accept = ['application/json']
338
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
339
+
340
+ # HTTP header 'Content-Type'
341
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
342
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
343
+
344
+ # form parameters
345
+ form_params = {}
346
+
347
+ # http body (model)
348
+ post_body = nil
349
+ auth_names = ['oauth2']
350
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
351
+ :header_params => header_params,
352
+ :query_params => query_params,
353
+ :form_params => form_params,
354
+ :body => post_body,
355
+ :auth_names => auth_names,
356
+ :return_type => 'ListShipment')
357
+ if @api_client.config.debugging
358
+ @api_client.config.logger.debug "API called: ShipmentApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
359
+ end
360
+ return data, status_code, headers
361
+ end
362
+
363
+ #
364
+ #
365
+ # @param buyer_id ID of the buyer.
366
+ # @param shipment_id ID of the shipment.
367
+ # @param shipment
368
+ # @param [Hash] opts the optional parameters
369
+ # @return [Shipment]
370
+ def patch(buyer_id, shipment_id, shipment, opts = {})
371
+ data, _status_code, _headers = patch_with_http_info(buyer_id, shipment_id, shipment, opts)
372
+ return data
373
+ end
374
+
375
+ #
376
+ #
377
+ # @param buyer_id ID of the buyer.
378
+ # @param shipment_id ID of the shipment.
379
+ # @param shipment
380
+ # @param [Hash] opts the optional parameters
381
+ # @return [Array<(Shipment, Fixnum, Hash)>] Shipment data, response status code and response headers
382
+ def patch_with_http_info(buyer_id, shipment_id, shipment, opts = {})
383
+ if @api_client.config.debugging
384
+ @api_client.config.logger.debug "Calling API: ShipmentApi.patch ..."
385
+ end
386
+ # verify the required parameter 'buyer_id' is set
387
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ShipmentApi.patch" if buyer_id.nil?
388
+ # verify the required parameter 'shipment_id' is set
389
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.patch" if shipment_id.nil?
390
+ # verify the required parameter 'shipment' is set
391
+ fail ArgumentError, "Missing the required parameter 'shipment' when calling ShipmentApi.patch" if shipment.nil?
392
+ # resource path
393
+ local_var_path = "/buyers/{buyerID}/shipments/{shipmentID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'shipmentID' + '}', shipment_id.to_s)
394
+
395
+ # query parameters
396
+ query_params = {}
397
+
398
+ # header parameters
399
+ header_params = {}
400
+
401
+ # HTTP header 'Accept' (if needed)
402
+ local_header_accept = ['application/json']
403
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
404
+
405
+ # HTTP header 'Content-Type'
406
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
407
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
408
+
409
+ # form parameters
410
+ form_params = {}
411
+
412
+ # http body (model)
413
+ post_body = @api_client.object_to_http_body(shipment)
414
+ auth_names = ['oauth2']
415
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
416
+ :header_params => header_params,
417
+ :query_params => query_params,
418
+ :form_params => form_params,
419
+ :body => post_body,
420
+ :auth_names => auth_names,
421
+ :return_type => 'Shipment')
422
+ if @api_client.config.debugging
423
+ @api_client.config.logger.debug "API called: ShipmentApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
424
+ end
425
+ return data, status_code, headers
426
+ end
427
+
428
+ #
429
+ #
430
+ # @param buyer_id ID of the buyer.
431
+ # @param shipment_id ID of the shipment.
432
+ # @param item
433
+ # @param [Hash] opts the optional parameters
434
+ # @return [Shipment]
435
+ def save_item(buyer_id, shipment_id, item, opts = {})
436
+ data, _status_code, _headers = save_item_with_http_info(buyer_id, shipment_id, item, opts)
437
+ return data
438
+ end
439
+
440
+ #
441
+ #
442
+ # @param buyer_id ID of the buyer.
443
+ # @param shipment_id ID of the shipment.
444
+ # @param item
445
+ # @param [Hash] opts the optional parameters
446
+ # @return [Array<(Shipment, Fixnum, Hash)>] Shipment data, response status code and response headers
447
+ def save_item_with_http_info(buyer_id, shipment_id, item, opts = {})
448
+ if @api_client.config.debugging
449
+ @api_client.config.logger.debug "Calling API: ShipmentApi.save_item ..."
450
+ end
451
+ # verify the required parameter 'buyer_id' is set
452
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ShipmentApi.save_item" if buyer_id.nil?
453
+ # verify the required parameter 'shipment_id' is set
454
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.save_item" if shipment_id.nil?
455
+ # verify the required parameter 'item' is set
456
+ fail ArgumentError, "Missing the required parameter 'item' when calling ShipmentApi.save_item" if item.nil?
457
+ # resource path
458
+ local_var_path = "/buyers/{buyerID}/shipments/{shipmentID}/items".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'shipmentID' + '}', shipment_id.to_s)
459
+
460
+ # query parameters
461
+ query_params = {}
462
+
463
+ # header parameters
464
+ header_params = {}
465
+
466
+ # HTTP header 'Accept' (if needed)
467
+ local_header_accept = ['application/json']
468
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
469
+
470
+ # HTTP header 'Content-Type'
471
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
472
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
473
+
474
+ # form parameters
475
+ form_params = {}
476
+
477
+ # http body (model)
478
+ post_body = @api_client.object_to_http_body(item)
479
+ auth_names = ['oauth2']
480
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
481
+ :header_params => header_params,
482
+ :query_params => query_params,
483
+ :form_params => form_params,
484
+ :body => post_body,
485
+ :auth_names => auth_names,
486
+ :return_type => 'Shipment')
487
+ if @api_client.config.debugging
488
+ @api_client.config.logger.debug "API called: ShipmentApi#save_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
489
+ end
490
+ return data, status_code, headers
491
+ end
492
+
493
+ #
494
+ #
495
+ # @param buyer_id ID of the buyer.
496
+ # @param shipment_id ID of the shipment.
497
+ # @param shipment
498
+ # @param [Hash] opts the optional parameters
499
+ # @return [Shipment]
500
+ def update(buyer_id, shipment_id, shipment, opts = {})
501
+ data, _status_code, _headers = update_with_http_info(buyer_id, shipment_id, shipment, opts)
502
+ return data
503
+ end
504
+
505
+ #
506
+ #
507
+ # @param buyer_id ID of the buyer.
508
+ # @param shipment_id ID of the shipment.
509
+ # @param shipment
510
+ # @param [Hash] opts the optional parameters
511
+ # @return [Array<(Shipment, Fixnum, Hash)>] Shipment data, response status code and response headers
512
+ def update_with_http_info(buyer_id, shipment_id, shipment, opts = {})
513
+ if @api_client.config.debugging
514
+ @api_client.config.logger.debug "Calling API: ShipmentApi.update ..."
515
+ end
516
+ # verify the required parameter 'buyer_id' is set
517
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling ShipmentApi.update" if buyer_id.nil?
518
+ # verify the required parameter 'shipment_id' is set
519
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.update" if shipment_id.nil?
520
+ # verify the required parameter 'shipment' is set
521
+ fail ArgumentError, "Missing the required parameter 'shipment' when calling ShipmentApi.update" if shipment.nil?
522
+ # resource path
523
+ local_var_path = "/buyers/{buyerID}/shipments/{shipmentID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'shipmentID' + '}', shipment_id.to_s)
524
+
525
+ # query parameters
526
+ query_params = {}
527
+
528
+ # header parameters
529
+ header_params = {}
530
+
531
+ # HTTP header 'Accept' (if needed)
532
+ local_header_accept = ['application/json']
533
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
534
+
535
+ # HTTP header 'Content-Type'
536
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
537
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
538
+
539
+ # form parameters
540
+ form_params = {}
541
+
542
+ # http body (model)
543
+ post_body = @api_client.object_to_http_body(shipment)
544
+ auth_names = ['oauth2']
545
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
546
+ :header_params => header_params,
547
+ :query_params => query_params,
548
+ :form_params => form_params,
549
+ :body => post_body,
550
+ :auth_names => auth_names,
551
+ :return_type => 'Shipment')
552
+ if @api_client.config.debugging
553
+ @api_client.config.logger.debug "API called: ShipmentApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
554
+ end
555
+ return data, status_code, headers
556
+ end
557
+ end
558
+ end