order_cloud 0.0.1

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 (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,1509 @@
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 OrderApi
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 order_id ID of the order.
38
+ # @param promo_code Promo code of the order.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Promotion]
41
+ def add_promotion(buyer_id, order_id, promo_code, opts = {})
42
+ data, _status_code, _headers = add_promotion_with_http_info(buyer_id, order_id, promo_code, opts)
43
+ return data
44
+ end
45
+
46
+ #
47
+ #
48
+ # @param buyer_id ID of the buyer.
49
+ # @param order_id ID of the order.
50
+ # @param promo_code Promo code of the order.
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [Array<(Promotion, Fixnum, Hash)>] Promotion data, response status code and response headers
53
+ def add_promotion_with_http_info(buyer_id, order_id, promo_code, opts = {})
54
+ if @api_client.config.debugging
55
+ @api_client.config.logger.debug "Calling API: OrderApi.add_promotion ..."
56
+ end
57
+ # verify the required parameter 'buyer_id' is set
58
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.add_promotion" if buyer_id.nil?
59
+ # verify the required parameter 'order_id' is set
60
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.add_promotion" if order_id.nil?
61
+ # verify the required parameter 'promo_code' is set
62
+ fail ArgumentError, "Missing the required parameter 'promo_code' when calling OrderApi.add_promotion" if promo_code.nil?
63
+ # resource path
64
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/promotions/{promoCode}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'promoCode' + '}', promo_code.to_s)
65
+
66
+ # query parameters
67
+ query_params = {}
68
+
69
+ # header parameters
70
+ header_params = {}
71
+
72
+ # HTTP header 'Accept' (if needed)
73
+ local_header_accept = ['application/json']
74
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
75
+
76
+ # HTTP header 'Content-Type'
77
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
78
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
79
+
80
+ # form parameters
81
+ form_params = {}
82
+
83
+ # http body (model)
84
+ post_body = nil
85
+ auth_names = ['oauth2']
86
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :auth_names => auth_names,
92
+ :return_type => 'Promotion')
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: OrderApi#add_promotion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
99
+ #
100
+ #
101
+ # @param buyer_id ID of the buyer.
102
+ # @param order_id ID of the order.
103
+ # @param [Hash] opts the optional parameters
104
+ # @option opts [String] :comments Comments to be saved with the order approval.
105
+ # @return [Order]
106
+ def approve(buyer_id, order_id, opts = {})
107
+ data, _status_code, _headers = approve_with_http_info(buyer_id, order_id, opts)
108
+ return data
109
+ end
110
+
111
+ #
112
+ #
113
+ # @param buyer_id ID of the buyer.
114
+ # @param order_id ID of the order.
115
+ # @param [Hash] opts the optional parameters
116
+ # @option opts [String] :comments Comments to be saved with the order approval.
117
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
118
+ def approve_with_http_info(buyer_id, order_id, opts = {})
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug "Calling API: OrderApi.approve ..."
121
+ end
122
+ # verify the required parameter 'buyer_id' is set
123
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.approve" if buyer_id.nil?
124
+ # verify the required parameter 'order_id' is set
125
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.approve" if order_id.nil?
126
+ # resource path
127
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/approve".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
128
+
129
+ # query parameters
130
+ query_params = {}
131
+ query_params[:'comments'] = opts[:'comments'] if !opts[:'comments'].nil?
132
+
133
+ # header parameters
134
+ header_params = {}
135
+
136
+ # HTTP header 'Accept' (if needed)
137
+ local_header_accept = ['application/json']
138
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
139
+
140
+ # HTTP header 'Content-Type'
141
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
142
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
143
+
144
+ # form parameters
145
+ form_params = {}
146
+
147
+ # http body (model)
148
+ post_body = nil
149
+ auth_names = ['oauth2']
150
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
151
+ :header_params => header_params,
152
+ :query_params => query_params,
153
+ :form_params => form_params,
154
+ :body => post_body,
155
+ :auth_names => auth_names,
156
+ :return_type => 'Order')
157
+ if @api_client.config.debugging
158
+ @api_client.config.logger.debug "API called: OrderApi#approve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
159
+ end
160
+ return data, status_code, headers
161
+ end
162
+
163
+ #
164
+ #
165
+ # @param buyer_id ID of the buyer.
166
+ # @param order_id ID of the order.
167
+ # @param [Hash] opts the optional parameters
168
+ # @return [Order]
169
+ def cancel(buyer_id, order_id, opts = {})
170
+ data, _status_code, _headers = cancel_with_http_info(buyer_id, order_id, opts)
171
+ return data
172
+ end
173
+
174
+ #
175
+ #
176
+ # @param buyer_id ID of the buyer.
177
+ # @param order_id ID of the order.
178
+ # @param [Hash] opts the optional parameters
179
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
180
+ def cancel_with_http_info(buyer_id, order_id, opts = {})
181
+ if @api_client.config.debugging
182
+ @api_client.config.logger.debug "Calling API: OrderApi.cancel ..."
183
+ end
184
+ # verify the required parameter 'buyer_id' is set
185
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.cancel" if buyer_id.nil?
186
+ # verify the required parameter 'order_id' is set
187
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.cancel" if order_id.nil?
188
+ # resource path
189
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/cancel".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_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(:POST, 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 => 'Order')
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "API called: OrderApi#cancel\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 order
228
+ # @param [Hash] opts the optional parameters
229
+ # @return [Order]
230
+ def create(buyer_id, order, opts = {})
231
+ data, _status_code, _headers = create_with_http_info(buyer_id, order, opts)
232
+ return data
233
+ end
234
+
235
+ #
236
+ #
237
+ # @param buyer_id ID of the buyer.
238
+ # @param order
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
241
+ def create_with_http_info(buyer_id, order, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug "Calling API: OrderApi.create ..."
244
+ end
245
+ # verify the required parameter 'buyer_id' is set
246
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.create" if buyer_id.nil?
247
+ # verify the required parameter 'order' is set
248
+ fail ArgumentError, "Missing the required parameter 'order' when calling OrderApi.create" if order.nil?
249
+ # resource path
250
+ local_var_path = "/buyers/{buyerID}/orders".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_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 = @api_client.object_to_http_body(order)
271
+ auth_names = ['oauth2']
272
+ data, status_code, headers = @api_client.call_api(:POST, 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 => 'Order')
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug "API called: OrderApi#create\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 order_id ID of the order.
289
+ # @param [Hash] opts the optional parameters
290
+ # @option opts [String] :comments Comments to be saved with the order denial.
291
+ # @return [Order]
292
+ def decline(buyer_id, order_id, opts = {})
293
+ data, _status_code, _headers = decline_with_http_info(buyer_id, order_id, opts)
294
+ return data
295
+ end
296
+
297
+ #
298
+ #
299
+ # @param buyer_id ID of the buyer.
300
+ # @param order_id ID of the order.
301
+ # @param [Hash] opts the optional parameters
302
+ # @option opts [String] :comments Comments to be saved with the order denial.
303
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
304
+ def decline_with_http_info(buyer_id, order_id, opts = {})
305
+ if @api_client.config.debugging
306
+ @api_client.config.logger.debug "Calling API: OrderApi.decline ..."
307
+ end
308
+ # verify the required parameter 'buyer_id' is set
309
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.decline" if buyer_id.nil?
310
+ # verify the required parameter 'order_id' is set
311
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.decline" if order_id.nil?
312
+ # resource path
313
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/decline".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
314
+
315
+ # query parameters
316
+ query_params = {}
317
+ query_params[:'comments'] = opts[:'comments'] if !opts[:'comments'].nil?
318
+
319
+ # header parameters
320
+ header_params = {}
321
+
322
+ # HTTP header 'Accept' (if needed)
323
+ local_header_accept = ['application/json']
324
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
325
+
326
+ # HTTP header 'Content-Type'
327
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
328
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
329
+
330
+ # form parameters
331
+ form_params = {}
332
+
333
+ # http body (model)
334
+ post_body = nil
335
+ auth_names = ['oauth2']
336
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
337
+ :header_params => header_params,
338
+ :query_params => query_params,
339
+ :form_params => form_params,
340
+ :body => post_body,
341
+ :auth_names => auth_names,
342
+ :return_type => 'Order')
343
+ if @api_client.config.debugging
344
+ @api_client.config.logger.debug "API called: OrderApi#decline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
345
+ end
346
+ return data, status_code, headers
347
+ end
348
+
349
+ #
350
+ #
351
+ # @param buyer_id ID of the buyer.
352
+ # @param order_id ID of the order.
353
+ # @param [Hash] opts the optional parameters
354
+ # @return [nil]
355
+ def delete(buyer_id, order_id, opts = {})
356
+ delete_with_http_info(buyer_id, order_id, opts)
357
+ return nil
358
+ end
359
+
360
+ #
361
+ #
362
+ # @param buyer_id ID of the buyer.
363
+ # @param order_id ID of the order.
364
+ # @param [Hash] opts the optional parameters
365
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
366
+ def delete_with_http_info(buyer_id, order_id, opts = {})
367
+ if @api_client.config.debugging
368
+ @api_client.config.logger.debug "Calling API: OrderApi.delete ..."
369
+ end
370
+ # verify the required parameter 'buyer_id' is set
371
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.delete" if buyer_id.nil?
372
+ # verify the required parameter 'order_id' is set
373
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.delete" if order_id.nil?
374
+ # resource path
375
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
376
+
377
+ # query parameters
378
+ query_params = {}
379
+
380
+ # header parameters
381
+ header_params = {}
382
+
383
+ # HTTP header 'Accept' (if needed)
384
+ local_header_accept = ['application/json']
385
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
386
+
387
+ # HTTP header 'Content-Type'
388
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
389
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
390
+
391
+ # form parameters
392
+ form_params = {}
393
+
394
+ # http body (model)
395
+ post_body = nil
396
+ auth_names = ['oauth2']
397
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
398
+ :header_params => header_params,
399
+ :query_params => query_params,
400
+ :form_params => form_params,
401
+ :body => post_body,
402
+ :auth_names => auth_names)
403
+ if @api_client.config.debugging
404
+ @api_client.config.logger.debug "API called: OrderApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
405
+ end
406
+ return data, status_code, headers
407
+ end
408
+
409
+ #
410
+ #
411
+ # @param buyer_id ID of the buyer.
412
+ # @param order_id ID of the order.
413
+ # @param [Hash] opts the optional parameters
414
+ # @return [Order]
415
+ def get(buyer_id, order_id, opts = {})
416
+ data, _status_code, _headers = get_with_http_info(buyer_id, order_id, opts)
417
+ return data
418
+ end
419
+
420
+ #
421
+ #
422
+ # @param buyer_id ID of the buyer.
423
+ # @param order_id ID of the order.
424
+ # @param [Hash] opts the optional parameters
425
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
426
+ def get_with_http_info(buyer_id, order_id, opts = {})
427
+ if @api_client.config.debugging
428
+ @api_client.config.logger.debug "Calling API: OrderApi.get ..."
429
+ end
430
+ # verify the required parameter 'buyer_id' is set
431
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.get" if buyer_id.nil?
432
+ # verify the required parameter 'order_id' is set
433
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.get" if order_id.nil?
434
+ # resource path
435
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
436
+
437
+ # query parameters
438
+ query_params = {}
439
+
440
+ # header parameters
441
+ header_params = {}
442
+
443
+ # HTTP header 'Accept' (if needed)
444
+ local_header_accept = ['application/json']
445
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
446
+
447
+ # HTTP header 'Content-Type'
448
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
449
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
450
+
451
+ # form parameters
452
+ form_params = {}
453
+
454
+ # http body (model)
455
+ post_body = nil
456
+ auth_names = ['oauth2']
457
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
458
+ :header_params => header_params,
459
+ :query_params => query_params,
460
+ :form_params => form_params,
461
+ :body => post_body,
462
+ :auth_names => auth_names,
463
+ :return_type => 'Order')
464
+ if @api_client.config.debugging
465
+ @api_client.config.logger.debug "API called: OrderApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
466
+ end
467
+ return data, status_code, headers
468
+ end
469
+
470
+ #
471
+ #
472
+ # @param buyer_id ID of the buyer.
473
+ # @param order_id ID of the order.
474
+ # @param [Hash] opts the optional parameters
475
+ # @option opts [String] :search Word or phrase to search for.
476
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
477
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
478
+ # @option opts [Integer] :page Page of results to return. Default: 1
479
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
480
+ # @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;
481
+ # @return [ListOrderApproval]
482
+ def list_approvals(buyer_id, order_id, opts = {})
483
+ data, _status_code, _headers = list_approvals_with_http_info(buyer_id, order_id, opts)
484
+ return data
485
+ end
486
+
487
+ #
488
+ #
489
+ # @param buyer_id ID of the buyer.
490
+ # @param order_id ID of the order.
491
+ # @param [Hash] opts the optional parameters
492
+ # @option opts [String] :search Word or phrase to search for.
493
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
494
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
495
+ # @option opts [Integer] :page Page of results to return. Default: 1
496
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
497
+ # @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;
498
+ # @return [Array<(ListOrderApproval, Fixnum, Hash)>] ListOrderApproval data, response status code and response headers
499
+ def list_approvals_with_http_info(buyer_id, order_id, opts = {})
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug "Calling API: OrderApi.list_approvals ..."
502
+ end
503
+ # verify the required parameter 'buyer_id' is set
504
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.list_approvals" if buyer_id.nil?
505
+ # verify the required parameter 'order_id' is set
506
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.list_approvals" if order_id.nil?
507
+ # resource path
508
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/approvals".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
509
+
510
+ # query parameters
511
+ query_params = {}
512
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
513
+ query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
514
+ query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
515
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
516
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
517
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
518
+
519
+ # header parameters
520
+ header_params = {}
521
+
522
+ # HTTP header 'Accept' (if needed)
523
+ local_header_accept = ['application/json']
524
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
525
+
526
+ # HTTP header 'Content-Type'
527
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
528
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
529
+
530
+ # form parameters
531
+ form_params = {}
532
+
533
+ # http body (model)
534
+ post_body = nil
535
+ auth_names = ['oauth2']
536
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
537
+ :header_params => header_params,
538
+ :query_params => query_params,
539
+ :form_params => form_params,
540
+ :body => post_body,
541
+ :auth_names => auth_names,
542
+ :return_type => 'ListOrderApproval')
543
+ if @api_client.config.debugging
544
+ @api_client.config.logger.debug "API called: OrderApi#list_approvals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
545
+ end
546
+ return data, status_code, headers
547
+ end
548
+
549
+ #
550
+ #
551
+ # @param buyer_id ID of the buyer.
552
+ # @param order_id ID of the order.
553
+ # @param [Hash] opts the optional parameters
554
+ # @option opts [String] :search Word or phrase to search for.
555
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
556
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
557
+ # @option opts [Integer] :page Page of results to return. Default: 1
558
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
559
+ # @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;
560
+ # @return [ListUser]
561
+ def list_eligible_approvers(buyer_id, order_id, opts = {})
562
+ data, _status_code, _headers = list_eligible_approvers_with_http_info(buyer_id, order_id, opts)
563
+ return data
564
+ end
565
+
566
+ #
567
+ #
568
+ # @param buyer_id ID of the buyer.
569
+ # @param order_id ID of the order.
570
+ # @param [Hash] opts the optional parameters
571
+ # @option opts [String] :search Word or phrase to search for.
572
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
573
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
574
+ # @option opts [Integer] :page Page of results to return. Default: 1
575
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
576
+ # @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;
577
+ # @return [Array<(ListUser, Fixnum, Hash)>] ListUser data, response status code and response headers
578
+ def list_eligible_approvers_with_http_info(buyer_id, order_id, opts = {})
579
+ if @api_client.config.debugging
580
+ @api_client.config.logger.debug "Calling API: OrderApi.list_eligible_approvers ..."
581
+ end
582
+ # verify the required parameter 'buyer_id' is set
583
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.list_eligible_approvers" if buyer_id.nil?
584
+ # verify the required parameter 'order_id' is set
585
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.list_eligible_approvers" if order_id.nil?
586
+ # resource path
587
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/eligibleapprovers".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
588
+
589
+ # query parameters
590
+ query_params = {}
591
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
592
+ query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
593
+ query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
594
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
595
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
596
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
597
+
598
+ # header parameters
599
+ header_params = {}
600
+
601
+ # HTTP header 'Accept' (if needed)
602
+ local_header_accept = ['application/json']
603
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
604
+
605
+ # HTTP header 'Content-Type'
606
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
607
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
608
+
609
+ # form parameters
610
+ form_params = {}
611
+
612
+ # http body (model)
613
+ post_body = nil
614
+ auth_names = ['oauth2']
615
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
616
+ :header_params => header_params,
617
+ :query_params => query_params,
618
+ :form_params => form_params,
619
+ :body => post_body,
620
+ :auth_names => auth_names,
621
+ :return_type => 'ListUser')
622
+ if @api_client.config.debugging
623
+ @api_client.config.logger.debug "API called: OrderApi#list_eligible_approvers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
624
+ end
625
+ return data, status_code, headers
626
+ end
627
+
628
+ #
629
+ #
630
+ # @param [Hash] opts the optional parameters
631
+ # @option opts [String] :buyer_id ID of the buyer.
632
+ # @option opts [String] :from Lower bound of date range that the order was submitted.
633
+ # @option opts [String] :to Upper bound of date range that the order was submitted.
634
+ # @option opts [String] :search Word or phrase to search for.
635
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
636
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
637
+ # @option opts [Integer] :page Page of results to return. Default: 1
638
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
639
+ # @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;
640
+ # @return [ListOrder]
641
+ def list_incoming(opts = {})
642
+ data, _status_code, _headers = list_incoming_with_http_info(opts)
643
+ return data
644
+ end
645
+
646
+ #
647
+ #
648
+ # @param [Hash] opts the optional parameters
649
+ # @option opts [String] :buyer_id ID of the buyer.
650
+ # @option opts [String] :from Lower bound of date range that the order was submitted.
651
+ # @option opts [String] :to Upper bound of date range that the order was submitted.
652
+ # @option opts [String] :search Word or phrase to search for.
653
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
654
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
655
+ # @option opts [Integer] :page Page of results to return. Default: 1
656
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
657
+ # @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;
658
+ # @return [Array<(ListOrder, Fixnum, Hash)>] ListOrder data, response status code and response headers
659
+ def list_incoming_with_http_info(opts = {})
660
+ if @api_client.config.debugging
661
+ @api_client.config.logger.debug "Calling API: OrderApi.list_incoming ..."
662
+ end
663
+ # resource path
664
+ local_var_path = "/orders/incoming".sub('{format}','json')
665
+
666
+ # query parameters
667
+ query_params = {}
668
+ query_params[:'buyerID'] = opts[:'buyer_id'] if !opts[:'buyer_id'].nil?
669
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
670
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
671
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
672
+ query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
673
+ query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
674
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
675
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
676
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
677
+
678
+ # header parameters
679
+ header_params = {}
680
+
681
+ # HTTP header 'Accept' (if needed)
682
+ local_header_accept = ['application/json']
683
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
684
+
685
+ # HTTP header 'Content-Type'
686
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
687
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
688
+
689
+ # form parameters
690
+ form_params = {}
691
+
692
+ # http body (model)
693
+ post_body = nil
694
+ auth_names = ['oauth2']
695
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
696
+ :header_params => header_params,
697
+ :query_params => query_params,
698
+ :form_params => form_params,
699
+ :body => post_body,
700
+ :auth_names => auth_names,
701
+ :return_type => 'ListOrder')
702
+ if @api_client.config.debugging
703
+ @api_client.config.logger.debug "API called: OrderApi#list_incoming\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
704
+ end
705
+ return data, status_code, headers
706
+ end
707
+
708
+ #
709
+ #
710
+ # @param [Hash] opts the optional parameters
711
+ # @option opts [String] :buyer_id ID of the buyer.
712
+ # @option opts [String] :from Lower bound of date range that the order was created.
713
+ # @option opts [String] :to Upper bound of date range that the order was created.
714
+ # @option opts [String] :search Word or phrase to search for.
715
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
716
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
717
+ # @option opts [Integer] :page Page of results to return. Default: 1
718
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
719
+ # @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;
720
+ # @return [ListOrder]
721
+ def list_outgoing(opts = {})
722
+ data, _status_code, _headers = list_outgoing_with_http_info(opts)
723
+ return data
724
+ end
725
+
726
+ #
727
+ #
728
+ # @param [Hash] opts the optional parameters
729
+ # @option opts [String] :buyer_id ID of the buyer.
730
+ # @option opts [String] :from Lower bound of date range that the order was created.
731
+ # @option opts [String] :to Upper bound of date range that the order was created.
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 [Array<(ListOrder, Fixnum, Hash)>] ListOrder data, response status code and response headers
739
+ def list_outgoing_with_http_info(opts = {})
740
+ if @api_client.config.debugging
741
+ @api_client.config.logger.debug "Calling API: OrderApi.list_outgoing ..."
742
+ end
743
+ # resource path
744
+ local_var_path = "/orders/outgoing".sub('{format}','json')
745
+
746
+ # query parameters
747
+ query_params = {}
748
+ query_params[:'buyerID'] = opts[:'buyer_id'] if !opts[:'buyer_id'].nil?
749
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
750
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
751
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
752
+ query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
753
+ query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
754
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
755
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
756
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
757
+
758
+ # header parameters
759
+ header_params = {}
760
+
761
+ # HTTP header 'Accept' (if needed)
762
+ local_header_accept = ['application/json']
763
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
764
+
765
+ # HTTP header 'Content-Type'
766
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
767
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
768
+
769
+ # form parameters
770
+ form_params = {}
771
+
772
+ # http body (model)
773
+ post_body = nil
774
+ auth_names = ['oauth2']
775
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
776
+ :header_params => header_params,
777
+ :query_params => query_params,
778
+ :form_params => form_params,
779
+ :body => post_body,
780
+ :auth_names => auth_names,
781
+ :return_type => 'ListOrder')
782
+ if @api_client.config.debugging
783
+ @api_client.config.logger.debug "API called: OrderApi#list_outgoing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
784
+ end
785
+ return data, status_code, headers
786
+ end
787
+
788
+ #
789
+ #
790
+ # @param buyer_id ID of the buyer.
791
+ # @param order_id ID of the order.
792
+ # @param [Hash] opts the optional parameters
793
+ # @option opts [String] :search Word or phrase to search for.
794
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
795
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
796
+ # @option opts [Integer] :page Page of results to return. Default: 1
797
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
798
+ # @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;
799
+ # @return [ListOrderPromotion]
800
+ def list_promotions(buyer_id, order_id, opts = {})
801
+ data, _status_code, _headers = list_promotions_with_http_info(buyer_id, order_id, opts)
802
+ return data
803
+ end
804
+
805
+ #
806
+ #
807
+ # @param buyer_id ID of the buyer.
808
+ # @param order_id ID of the order.
809
+ # @param [Hash] opts the optional parameters
810
+ # @option opts [String] :search Word or phrase to search for.
811
+ # @option opts [String] :search_on Comma-delimited list of fields to search on.
812
+ # @option opts [String] :sort_by Comma-delimited list of fields to sort by.
813
+ # @option opts [Integer] :page Page of results to return. Default: 1
814
+ # @option opts [Integer] :page_size Number of results to return per page. Default: 20, max: 100.
815
+ # @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;
816
+ # @return [Array<(ListOrderPromotion, Fixnum, Hash)>] ListOrderPromotion data, response status code and response headers
817
+ def list_promotions_with_http_info(buyer_id, order_id, opts = {})
818
+ if @api_client.config.debugging
819
+ @api_client.config.logger.debug "Calling API: OrderApi.list_promotions ..."
820
+ end
821
+ # verify the required parameter 'buyer_id' is set
822
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.list_promotions" if buyer_id.nil?
823
+ # verify the required parameter 'order_id' is set
824
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.list_promotions" if order_id.nil?
825
+ # resource path
826
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/promotions".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
827
+
828
+ # query parameters
829
+ query_params = {}
830
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
831
+ query_params[:'searchOn'] = opts[:'search_on'] if !opts[:'search_on'].nil?
832
+ query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
833
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
834
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
835
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
836
+
837
+ # header parameters
838
+ header_params = {}
839
+
840
+ # HTTP header 'Accept' (if needed)
841
+ local_header_accept = ['application/json']
842
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
843
+
844
+ # HTTP header 'Content-Type'
845
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
846
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
847
+
848
+ # form parameters
849
+ form_params = {}
850
+
851
+ # http body (model)
852
+ post_body = nil
853
+ auth_names = ['oauth2']
854
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
855
+ :header_params => header_params,
856
+ :query_params => query_params,
857
+ :form_params => form_params,
858
+ :body => post_body,
859
+ :auth_names => auth_names,
860
+ :return_type => 'ListOrderPromotion')
861
+ if @api_client.config.debugging
862
+ @api_client.config.logger.debug "API called: OrderApi#list_promotions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
863
+ end
864
+ return data, status_code, headers
865
+ end
866
+
867
+ #
868
+ #
869
+ # @param buyer_id ID of the buyer.
870
+ # @param order_id ID of the order.
871
+ # @param partial_order
872
+ # @param [Hash] opts the optional parameters
873
+ # @return [Order]
874
+ def patch(buyer_id, order_id, partial_order, opts = {})
875
+ data, _status_code, _headers = patch_with_http_info(buyer_id, order_id, partial_order, opts)
876
+ return data
877
+ end
878
+
879
+ #
880
+ #
881
+ # @param buyer_id ID of the buyer.
882
+ # @param order_id ID of the order.
883
+ # @param partial_order
884
+ # @param [Hash] opts the optional parameters
885
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
886
+ def patch_with_http_info(buyer_id, order_id, partial_order, opts = {})
887
+ if @api_client.config.debugging
888
+ @api_client.config.logger.debug "Calling API: OrderApi.patch ..."
889
+ end
890
+ # verify the required parameter 'buyer_id' is set
891
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.patch" if buyer_id.nil?
892
+ # verify the required parameter 'order_id' is set
893
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.patch" if order_id.nil?
894
+ # verify the required parameter 'partial_order' is set
895
+ fail ArgumentError, "Missing the required parameter 'partial_order' when calling OrderApi.patch" if partial_order.nil?
896
+ # resource path
897
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
898
+
899
+ # query parameters
900
+ query_params = {}
901
+
902
+ # header parameters
903
+ header_params = {}
904
+
905
+ # HTTP header 'Accept' (if needed)
906
+ local_header_accept = ['application/json']
907
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
908
+
909
+ # HTTP header 'Content-Type'
910
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
911
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
912
+
913
+ # form parameters
914
+ form_params = {}
915
+
916
+ # http body (model)
917
+ post_body = @api_client.object_to_http_body(partial_order)
918
+ auth_names = ['oauth2']
919
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
920
+ :header_params => header_params,
921
+ :query_params => query_params,
922
+ :form_params => form_params,
923
+ :body => post_body,
924
+ :auth_names => auth_names,
925
+ :return_type => 'Order')
926
+ if @api_client.config.debugging
927
+ @api_client.config.logger.debug "API called: OrderApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
928
+ end
929
+ return data, status_code, headers
930
+ end
931
+
932
+ #
933
+ #
934
+ # @param buyer_id ID of the buyer.
935
+ # @param order_id ID of the order.
936
+ # @param address
937
+ # @param [Hash] opts the optional parameters
938
+ # @return [Order]
939
+ def patch_billing_address(buyer_id, order_id, address, opts = {})
940
+ data, _status_code, _headers = patch_billing_address_with_http_info(buyer_id, order_id, address, opts)
941
+ return data
942
+ end
943
+
944
+ #
945
+ #
946
+ # @param buyer_id ID of the buyer.
947
+ # @param order_id ID of the order.
948
+ # @param address
949
+ # @param [Hash] opts the optional parameters
950
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
951
+ def patch_billing_address_with_http_info(buyer_id, order_id, address, opts = {})
952
+ if @api_client.config.debugging
953
+ @api_client.config.logger.debug "Calling API: OrderApi.patch_billing_address ..."
954
+ end
955
+ # verify the required parameter 'buyer_id' is set
956
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.patch_billing_address" if buyer_id.nil?
957
+ # verify the required parameter 'order_id' is set
958
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.patch_billing_address" if order_id.nil?
959
+ # verify the required parameter 'address' is set
960
+ fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.patch_billing_address" if address.nil?
961
+ # resource path
962
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/billto".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
963
+
964
+ # query parameters
965
+ query_params = {}
966
+
967
+ # header parameters
968
+ header_params = {}
969
+
970
+ # HTTP header 'Accept' (if needed)
971
+ local_header_accept = ['application/json']
972
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
973
+
974
+ # HTTP header 'Content-Type'
975
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
976
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
977
+
978
+ # form parameters
979
+ form_params = {}
980
+
981
+ # http body (model)
982
+ post_body = @api_client.object_to_http_body(address)
983
+ auth_names = ['oauth2']
984
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
985
+ :header_params => header_params,
986
+ :query_params => query_params,
987
+ :form_params => form_params,
988
+ :body => post_body,
989
+ :auth_names => auth_names,
990
+ :return_type => 'Order')
991
+ if @api_client.config.debugging
992
+ @api_client.config.logger.debug "API called: OrderApi#patch_billing_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
993
+ end
994
+ return data, status_code, headers
995
+ end
996
+
997
+ #
998
+ #
999
+ # @param buyer_id ID of the buyer.
1000
+ # @param order_id ID of the order.
1001
+ # @param address
1002
+ # @param [Hash] opts the optional parameters
1003
+ # @return [Order]
1004
+ def patch_shipping_address(buyer_id, order_id, address, opts = {})
1005
+ data, _status_code, _headers = patch_shipping_address_with_http_info(buyer_id, order_id, address, opts)
1006
+ return data
1007
+ end
1008
+
1009
+ #
1010
+ #
1011
+ # @param buyer_id ID of the buyer.
1012
+ # @param order_id ID of the order.
1013
+ # @param address
1014
+ # @param [Hash] opts the optional parameters
1015
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
1016
+ def patch_shipping_address_with_http_info(buyer_id, order_id, address, opts = {})
1017
+ if @api_client.config.debugging
1018
+ @api_client.config.logger.debug "Calling API: OrderApi.patch_shipping_address ..."
1019
+ end
1020
+ # verify the required parameter 'buyer_id' is set
1021
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.patch_shipping_address" if buyer_id.nil?
1022
+ # verify the required parameter 'order_id' is set
1023
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.patch_shipping_address" if order_id.nil?
1024
+ # verify the required parameter 'address' is set
1025
+ fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.patch_shipping_address" if address.nil?
1026
+ # resource path
1027
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/shipto".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
1028
+
1029
+ # query parameters
1030
+ query_params = {}
1031
+
1032
+ # header parameters
1033
+ header_params = {}
1034
+
1035
+ # HTTP header 'Accept' (if needed)
1036
+ local_header_accept = ['application/json']
1037
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1038
+
1039
+ # HTTP header 'Content-Type'
1040
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1041
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1042
+
1043
+ # form parameters
1044
+ form_params = {}
1045
+
1046
+ # http body (model)
1047
+ post_body = @api_client.object_to_http_body(address)
1048
+ auth_names = ['oauth2']
1049
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
1050
+ :header_params => header_params,
1051
+ :query_params => query_params,
1052
+ :form_params => form_params,
1053
+ :body => post_body,
1054
+ :auth_names => auth_names,
1055
+ :return_type => 'Order')
1056
+ if @api_client.config.debugging
1057
+ @api_client.config.logger.debug "API called: OrderApi#patch_shipping_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1058
+ end
1059
+ return data, status_code, headers
1060
+ end
1061
+
1062
+ #
1063
+ #
1064
+ # @param buyer_id ID of the buyer.
1065
+ # @param order_id ID of the order.
1066
+ # @param promo_code Promo code of the order.
1067
+ # @param [Hash] opts the optional parameters
1068
+ # @return [Order]
1069
+ def remove_promotion(buyer_id, order_id, promo_code, opts = {})
1070
+ data, _status_code, _headers = remove_promotion_with_http_info(buyer_id, order_id, promo_code, opts)
1071
+ return data
1072
+ end
1073
+
1074
+ #
1075
+ #
1076
+ # @param buyer_id ID of the buyer.
1077
+ # @param order_id ID of the order.
1078
+ # @param promo_code Promo code of the order.
1079
+ # @param [Hash] opts the optional parameters
1080
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
1081
+ def remove_promotion_with_http_info(buyer_id, order_id, promo_code, opts = {})
1082
+ if @api_client.config.debugging
1083
+ @api_client.config.logger.debug "Calling API: OrderApi.remove_promotion ..."
1084
+ end
1085
+ # verify the required parameter 'buyer_id' is set
1086
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.remove_promotion" if buyer_id.nil?
1087
+ # verify the required parameter 'order_id' is set
1088
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.remove_promotion" if order_id.nil?
1089
+ # verify the required parameter 'promo_code' is set
1090
+ fail ArgumentError, "Missing the required parameter 'promo_code' when calling OrderApi.remove_promotion" if promo_code.nil?
1091
+ # resource path
1092
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/promotions/{promoCode}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'promoCode' + '}', promo_code.to_s)
1093
+
1094
+ # query parameters
1095
+ query_params = {}
1096
+
1097
+ # header parameters
1098
+ header_params = {}
1099
+
1100
+ # HTTP header 'Accept' (if needed)
1101
+ local_header_accept = ['application/json']
1102
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1103
+
1104
+ # HTTP header 'Content-Type'
1105
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1106
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1107
+
1108
+ # form parameters
1109
+ form_params = {}
1110
+
1111
+ # http body (model)
1112
+ post_body = nil
1113
+ auth_names = ['oauth2']
1114
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1115
+ :header_params => header_params,
1116
+ :query_params => query_params,
1117
+ :form_params => form_params,
1118
+ :body => post_body,
1119
+ :auth_names => auth_names,
1120
+ :return_type => 'Order')
1121
+ if @api_client.config.debugging
1122
+ @api_client.config.logger.debug "API called: OrderApi#remove_promotion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1123
+ end
1124
+ return data, status_code, headers
1125
+ end
1126
+
1127
+ #
1128
+ #
1129
+ # @param buyer_id ID of the buyer.
1130
+ # @param order_id ID of the order.
1131
+ # @param address
1132
+ # @param [Hash] opts the optional parameters
1133
+ # @return [Order]
1134
+ def set_billing_address(buyer_id, order_id, address, opts = {})
1135
+ data, _status_code, _headers = set_billing_address_with_http_info(buyer_id, order_id, address, opts)
1136
+ return data
1137
+ end
1138
+
1139
+ #
1140
+ #
1141
+ # @param buyer_id ID of the buyer.
1142
+ # @param order_id ID of the order.
1143
+ # @param address
1144
+ # @param [Hash] opts the optional parameters
1145
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
1146
+ def set_billing_address_with_http_info(buyer_id, order_id, address, opts = {})
1147
+ if @api_client.config.debugging
1148
+ @api_client.config.logger.debug "Calling API: OrderApi.set_billing_address ..."
1149
+ end
1150
+ # verify the required parameter 'buyer_id' is set
1151
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.set_billing_address" if buyer_id.nil?
1152
+ # verify the required parameter 'order_id' is set
1153
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.set_billing_address" if order_id.nil?
1154
+ # verify the required parameter 'address' is set
1155
+ fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.set_billing_address" if address.nil?
1156
+ # resource path
1157
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/billto".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
1158
+
1159
+ # query parameters
1160
+ query_params = {}
1161
+
1162
+ # header parameters
1163
+ header_params = {}
1164
+
1165
+ # HTTP header 'Accept' (if needed)
1166
+ local_header_accept = ['application/json']
1167
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1168
+
1169
+ # HTTP header 'Content-Type'
1170
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1171
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1172
+
1173
+ # form parameters
1174
+ form_params = {}
1175
+
1176
+ # http body (model)
1177
+ post_body = @api_client.object_to_http_body(address)
1178
+ auth_names = ['oauth2']
1179
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1180
+ :header_params => header_params,
1181
+ :query_params => query_params,
1182
+ :form_params => form_params,
1183
+ :body => post_body,
1184
+ :auth_names => auth_names,
1185
+ :return_type => 'Order')
1186
+ if @api_client.config.debugging
1187
+ @api_client.config.logger.debug "API called: OrderApi#set_billing_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1188
+ end
1189
+ return data, status_code, headers
1190
+ end
1191
+
1192
+ #
1193
+ #
1194
+ # @param buyer_id ID of the buyer.
1195
+ # @param order_id ID of the order.
1196
+ # @param address
1197
+ # @param [Hash] opts the optional parameters
1198
+ # @return [Order]
1199
+ def set_shipping_address(buyer_id, order_id, address, opts = {})
1200
+ data, _status_code, _headers = set_shipping_address_with_http_info(buyer_id, order_id, address, opts)
1201
+ return data
1202
+ end
1203
+
1204
+ #
1205
+ #
1206
+ # @param buyer_id ID of the buyer.
1207
+ # @param order_id ID of the order.
1208
+ # @param address
1209
+ # @param [Hash] opts the optional parameters
1210
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
1211
+ def set_shipping_address_with_http_info(buyer_id, order_id, address, opts = {})
1212
+ if @api_client.config.debugging
1213
+ @api_client.config.logger.debug "Calling API: OrderApi.set_shipping_address ..."
1214
+ end
1215
+ # verify the required parameter 'buyer_id' is set
1216
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.set_shipping_address" if buyer_id.nil?
1217
+ # verify the required parameter 'order_id' is set
1218
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.set_shipping_address" if order_id.nil?
1219
+ # verify the required parameter 'address' is set
1220
+ fail ArgumentError, "Missing the required parameter 'address' when calling OrderApi.set_shipping_address" if address.nil?
1221
+ # resource path
1222
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/shipto".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
1223
+
1224
+ # query parameters
1225
+ query_params = {}
1226
+
1227
+ # header parameters
1228
+ header_params = {}
1229
+
1230
+ # HTTP header 'Accept' (if needed)
1231
+ local_header_accept = ['application/json']
1232
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1233
+
1234
+ # HTTP header 'Content-Type'
1235
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1236
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1237
+
1238
+ # form parameters
1239
+ form_params = {}
1240
+
1241
+ # http body (model)
1242
+ post_body = @api_client.object_to_http_body(address)
1243
+ auth_names = ['oauth2']
1244
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1245
+ :header_params => header_params,
1246
+ :query_params => query_params,
1247
+ :form_params => form_params,
1248
+ :body => post_body,
1249
+ :auth_names => auth_names,
1250
+ :return_type => 'Order')
1251
+ if @api_client.config.debugging
1252
+ @api_client.config.logger.debug "API called: OrderApi#set_shipping_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1253
+ end
1254
+ return data, status_code, headers
1255
+ end
1256
+
1257
+ #
1258
+ #
1259
+ # @param buyer_id ID of the buyer.
1260
+ # @param order_id ID of the order.
1261
+ # @param shipment
1262
+ # @param [Hash] opts the optional parameters
1263
+ # @return [Order]
1264
+ def ship(buyer_id, order_id, shipment, opts = {})
1265
+ data, _status_code, _headers = ship_with_http_info(buyer_id, order_id, shipment, opts)
1266
+ return data
1267
+ end
1268
+
1269
+ #
1270
+ #
1271
+ # @param buyer_id ID of the buyer.
1272
+ # @param order_id ID of the order.
1273
+ # @param shipment
1274
+ # @param [Hash] opts the optional parameters
1275
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
1276
+ def ship_with_http_info(buyer_id, order_id, shipment, opts = {})
1277
+ if @api_client.config.debugging
1278
+ @api_client.config.logger.debug "Calling API: OrderApi.ship ..."
1279
+ end
1280
+ # verify the required parameter 'buyer_id' is set
1281
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.ship" if buyer_id.nil?
1282
+ # verify the required parameter 'order_id' is set
1283
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.ship" if order_id.nil?
1284
+ # verify the required parameter 'shipment' is set
1285
+ fail ArgumentError, "Missing the required parameter 'shipment' when calling OrderApi.ship" if shipment.nil?
1286
+ # resource path
1287
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/ship".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
1288
+
1289
+ # query parameters
1290
+ query_params = {}
1291
+
1292
+ # header parameters
1293
+ header_params = {}
1294
+
1295
+ # HTTP header 'Accept' (if needed)
1296
+ local_header_accept = ['application/json']
1297
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1298
+
1299
+ # HTTP header 'Content-Type'
1300
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1301
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1302
+
1303
+ # form parameters
1304
+ form_params = {}
1305
+
1306
+ # http body (model)
1307
+ post_body = @api_client.object_to_http_body(shipment)
1308
+ auth_names = ['oauth2']
1309
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1310
+ :header_params => header_params,
1311
+ :query_params => query_params,
1312
+ :form_params => form_params,
1313
+ :body => post_body,
1314
+ :auth_names => auth_names,
1315
+ :return_type => 'Order')
1316
+ if @api_client.config.debugging
1317
+ @api_client.config.logger.debug "API called: OrderApi#ship\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1318
+ end
1319
+ return data, status_code, headers
1320
+ end
1321
+
1322
+ #
1323
+ #
1324
+ # @param buyer_id ID of the buyer.
1325
+ # @param order_id ID of the order.
1326
+ # @param [Hash] opts the optional parameters
1327
+ # @return [Order]
1328
+ def submit(buyer_id, order_id, opts = {})
1329
+ data, _status_code, _headers = submit_with_http_info(buyer_id, order_id, opts)
1330
+ return data
1331
+ end
1332
+
1333
+ #
1334
+ #
1335
+ # @param buyer_id ID of the buyer.
1336
+ # @param order_id ID of the order.
1337
+ # @param [Hash] opts the optional parameters
1338
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
1339
+ def submit_with_http_info(buyer_id, order_id, opts = {})
1340
+ if @api_client.config.debugging
1341
+ @api_client.config.logger.debug "Calling API: OrderApi.submit ..."
1342
+ end
1343
+ # verify the required parameter 'buyer_id' is set
1344
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.submit" if buyer_id.nil?
1345
+ # verify the required parameter 'order_id' is set
1346
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.submit" if order_id.nil?
1347
+ # resource path
1348
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}/submit".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
1349
+
1350
+ # query parameters
1351
+ query_params = {}
1352
+
1353
+ # header parameters
1354
+ header_params = {}
1355
+
1356
+ # HTTP header 'Accept' (if needed)
1357
+ local_header_accept = ['application/json']
1358
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1359
+
1360
+ # HTTP header 'Content-Type'
1361
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1362
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1363
+
1364
+ # form parameters
1365
+ form_params = {}
1366
+
1367
+ # http body (model)
1368
+ post_body = nil
1369
+ auth_names = ['oauth2']
1370
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1371
+ :header_params => header_params,
1372
+ :query_params => query_params,
1373
+ :form_params => form_params,
1374
+ :body => post_body,
1375
+ :auth_names => auth_names,
1376
+ :return_type => 'Order')
1377
+ if @api_client.config.debugging
1378
+ @api_client.config.logger.debug "API called: OrderApi#submit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1379
+ end
1380
+ return data, status_code, headers
1381
+ end
1382
+
1383
+ #
1384
+ #
1385
+ # @param buyer_id ID of the buyer.
1386
+ # @param temp_user_token Temp user token of the order.
1387
+ # @param [Hash] opts the optional parameters
1388
+ # @return [nil]
1389
+ def transfer_temp_user_order(buyer_id, temp_user_token, opts = {})
1390
+ transfer_temp_user_order_with_http_info(buyer_id, temp_user_token, opts)
1391
+ return nil
1392
+ end
1393
+
1394
+ #
1395
+ #
1396
+ # @param buyer_id ID of the buyer.
1397
+ # @param temp_user_token Temp user token of the order.
1398
+ # @param [Hash] opts the optional parameters
1399
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1400
+ def transfer_temp_user_order_with_http_info(buyer_id, temp_user_token, opts = {})
1401
+ if @api_client.config.debugging
1402
+ @api_client.config.logger.debug "Calling API: OrderApi.transfer_temp_user_order ..."
1403
+ end
1404
+ # verify the required parameter 'buyer_id' is set
1405
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.transfer_temp_user_order" if buyer_id.nil?
1406
+ # verify the required parameter 'temp_user_token' is set
1407
+ fail ArgumentError, "Missing the required parameter 'temp_user_token' when calling OrderApi.transfer_temp_user_order" if temp_user_token.nil?
1408
+ # resource path
1409
+ local_var_path = "/buyers/{buyerID}/orders".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)
1410
+
1411
+ # query parameters
1412
+ query_params = {}
1413
+ query_params[:'tempUserToken'] = temp_user_token
1414
+
1415
+ # header parameters
1416
+ header_params = {}
1417
+
1418
+ # HTTP header 'Accept' (if needed)
1419
+ local_header_accept = ['application/json']
1420
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1421
+
1422
+ # HTTP header 'Content-Type'
1423
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1424
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1425
+
1426
+ # form parameters
1427
+ form_params = {}
1428
+
1429
+ # http body (model)
1430
+ post_body = nil
1431
+ auth_names = ['oauth2']
1432
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1433
+ :header_params => header_params,
1434
+ :query_params => query_params,
1435
+ :form_params => form_params,
1436
+ :body => post_body,
1437
+ :auth_names => auth_names)
1438
+ if @api_client.config.debugging
1439
+ @api_client.config.logger.debug "API called: OrderApi#transfer_temp_user_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1440
+ end
1441
+ return data, status_code, headers
1442
+ end
1443
+
1444
+ #
1445
+ #
1446
+ # @param buyer_id ID of the buyer.
1447
+ # @param order_id ID of the order.
1448
+ # @param order
1449
+ # @param [Hash] opts the optional parameters
1450
+ # @return [Order]
1451
+ def update(buyer_id, order_id, order, opts = {})
1452
+ data, _status_code, _headers = update_with_http_info(buyer_id, order_id, order, opts)
1453
+ return data
1454
+ end
1455
+
1456
+ #
1457
+ #
1458
+ # @param buyer_id ID of the buyer.
1459
+ # @param order_id ID of the order.
1460
+ # @param order
1461
+ # @param [Hash] opts the optional parameters
1462
+ # @return [Array<(Order, Fixnum, Hash)>] Order data, response status code and response headers
1463
+ def update_with_http_info(buyer_id, order_id, order, opts = {})
1464
+ if @api_client.config.debugging
1465
+ @api_client.config.logger.debug "Calling API: OrderApi.update ..."
1466
+ end
1467
+ # verify the required parameter 'buyer_id' is set
1468
+ fail ArgumentError, "Missing the required parameter 'buyer_id' when calling OrderApi.update" if buyer_id.nil?
1469
+ # verify the required parameter 'order_id' is set
1470
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.update" if order_id.nil?
1471
+ # verify the required parameter 'order' is set
1472
+ fail ArgumentError, "Missing the required parameter 'order' when calling OrderApi.update" if order.nil?
1473
+ # resource path
1474
+ local_var_path = "/buyers/{buyerID}/orders/{orderID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s)
1475
+
1476
+ # query parameters
1477
+ query_params = {}
1478
+
1479
+ # header parameters
1480
+ header_params = {}
1481
+
1482
+ # HTTP header 'Accept' (if needed)
1483
+ local_header_accept = ['application/json']
1484
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
1485
+
1486
+ # HTTP header 'Content-Type'
1487
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
1488
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
1489
+
1490
+ # form parameters
1491
+ form_params = {}
1492
+
1493
+ # http body (model)
1494
+ post_body = @api_client.object_to_http_body(order)
1495
+ auth_names = ['oauth2']
1496
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1497
+ :header_params => header_params,
1498
+ :query_params => query_params,
1499
+ :form_params => form_params,
1500
+ :body => post_body,
1501
+ :auth_names => auth_names,
1502
+ :return_type => 'Order')
1503
+ if @api_client.config.debugging
1504
+ @api_client.config.logger.debug "API called: OrderApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1505
+ end
1506
+ return data, status_code, headers
1507
+ end
1508
+ end
1509
+ end