order_cloud 1.0.45.pre.staging → 1.0.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (446) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +28 -0
  3. data/Gemfile.lock +34 -0
  4. data/LICENSE +201 -0
  5. data/README.md +552 -0
  6. data/Rakefile +31 -0
  7. data/docs/AccessToken.md +11 -0
  8. data/docs/Address.md +20 -0
  9. data/docs/AddressApi.md +520 -0
  10. data/docs/AddressAssignment.md +12 -0
  11. data/docs/AdminAddressApi.md +324 -0
  12. data/docs/AdminUserApi.md +324 -0
  13. data/docs/AdminUserGroupApi.md +482 -0
  14. data/docs/ApprovalRule.md +13 -0
  15. data/docs/ApprovalRuleApi.md +342 -0
  16. data/docs/BaseSpec.md +16 -0
  17. data/docs/Buyer.md +12 -0
  18. data/docs/BuyerAddress.md +23 -0
  19. data/docs/BuyerApi.md +324 -0
  20. data/docs/BuyerCreditCard.md +16 -0
  21. data/docs/BuyerProduct.md +23 -0
  22. data/docs/BuyerShipment.md +19 -0
  23. data/docs/BuyerSpec.md +17 -0
  24. data/docs/Catalog.md +13 -0
  25. data/docs/CatalogApi.md +640 -0
  26. data/docs/CatalogAssignment.md +11 -0
  27. data/docs/Category.md +15 -0
  28. data/docs/CategoryApi.md +690 -0
  29. data/docs/CategoryAssignment.md +12 -0
  30. data/docs/CategoryProductAssignment.md +10 -0
  31. data/docs/CostCenter.md +11 -0
  32. data/docs/CostCenterApi.md +516 -0
  33. data/docs/CostCenterAssignment.md +9 -0
  34. data/docs/CreditCard.md +15 -0
  35. data/docs/CreditCardApi.md +516 -0
  36. data/docs/CreditCardAssignment.md +10 -0
  37. data/docs/ImpersonateTokenRequest.md +9 -0
  38. data/docs/ImpersonationConfig.md +16 -0
  39. data/docs/ImpersonationConfigApi.md +324 -0
  40. data/docs/Inventory.md +13 -0
  41. data/docs/LineItem.md +24 -0
  42. data/docs/LineItemApi.md +478 -0
  43. data/docs/LineItemProduct.md +16 -0
  44. data/docs/LineItemSpec.md +11 -0
  45. data/docs/ListAddress.md +9 -0
  46. data/docs/ListAddressAssignment.md +9 -0
  47. data/docs/ListApprovalRule.md +9 -0
  48. data/docs/ListArgs.md +13 -0
  49. data/docs/ListBuyer.md +9 -0
  50. data/docs/ListBuyerAddress.md +9 -0
  51. data/docs/ListBuyerCreditCard.md +9 -0
  52. data/docs/ListBuyerProduct.md +9 -0
  53. data/docs/ListBuyerShipment.md +9 -0
  54. data/docs/ListBuyerSpec.md +9 -0
  55. data/docs/ListCatalog.md +9 -0
  56. data/docs/ListCatalogAssignment.md +9 -0
  57. data/docs/ListCategory.md +9 -0
  58. data/docs/ListCategoryAssignment.md +9 -0
  59. data/docs/ListCategoryProductAssignment.md +9 -0
  60. data/docs/ListCostCenter.md +9 -0
  61. data/docs/ListCostCenterAssignment.md +9 -0
  62. data/docs/ListCreditCard.md +9 -0
  63. data/docs/ListCreditCardAssignment.md +9 -0
  64. data/docs/ListImpersonationConfig.md +9 -0
  65. data/docs/ListLineItem.md +9 -0
  66. data/docs/ListMessageCCListenerAssignment.md +9 -0
  67. data/docs/ListMessageConfig.md +9 -0
  68. data/docs/ListMessageSender.md +9 -0
  69. data/docs/ListMessageSenderAssignment.md +9 -0
  70. data/docs/ListOrder.md +9 -0
  71. data/docs/ListOrderApproval.md +9 -0
  72. data/docs/ListOrderPromotion.md +9 -0
  73. data/docs/ListPayment.md +9 -0
  74. data/docs/ListPriceSchedule.md +9 -0
  75. data/docs/ListProduct.md +9 -0
  76. data/docs/ListProductAssignment.md +9 -0
  77. data/docs/ListProductCatalogAssignment.md +9 -0
  78. data/docs/ListPromotion.md +9 -0
  79. data/docs/ListPromotionAssignment.md +9 -0
  80. data/docs/ListSecurityProfile.md +9 -0
  81. data/docs/ListSecurityProfileAssignment.md +9 -0
  82. data/docs/ListShipment.md +9 -0
  83. data/docs/ListShipmentItem.md +9 -0
  84. data/docs/ListSpec.md +9 -0
  85. data/docs/ListSpecOption.md +9 -0
  86. data/docs/ListSpecProductAssignment.md +9 -0
  87. data/docs/ListSpendingAccount.md +9 -0
  88. data/docs/ListSpendingAccountAssignment.md +9 -0
  89. data/docs/ListSupplier.md +9 -0
  90. data/docs/ListUser.md +9 -0
  91. data/docs/ListUserGroup.md +9 -0
  92. data/docs/ListUserGroupAssignment.md +9 -0
  93. data/docs/ListVariant.md +9 -0
  94. data/docs/MeApi.md +2002 -0
  95. data/docs/MeBuyer.md +9 -0
  96. data/docs/MeUser.md +19 -0
  97. data/docs/MessageCCListenerAssignment.md +13 -0
  98. data/docs/MessageConfig.md +14 -0
  99. data/docs/MessageSender.md +10 -0
  100. data/docs/MessageSenderAssignment.md +11 -0
  101. data/docs/MessageSendersApi.md +398 -0
  102. data/docs/Meta.md +12 -0
  103. data/docs/Order.md +30 -0
  104. data/docs/OrderApi.md +1161 -0
  105. data/docs/OrderApproval.md +14 -0
  106. data/docs/OrderApprovalInfo.md +9 -0
  107. data/docs/OrderPromotion.md +22 -0
  108. data/docs/PasswordReset.md +10 -0
  109. data/docs/PasswordResetApi.md +109 -0
  110. data/docs/PasswordResetRequest.md +11 -0
  111. data/docs/Payment.md +17 -0
  112. data/docs/PaymentApi.md +418 -0
  113. data/docs/PaymentTransaction.md +15 -0
  114. data/docs/PriceBreak.md +9 -0
  115. data/docs/PriceSchedule.md +17 -0
  116. data/docs/PriceScheduleApi.md +429 -0
  117. data/docs/Product.md +23 -0
  118. data/docs/ProductApi.md +953 -0
  119. data/docs/ProductAssignment.md +11 -0
  120. data/docs/ProductBase.md +22 -0
  121. data/docs/ProductCatalogAssignment.md +9 -0
  122. data/docs/Promotion.md +21 -0
  123. data/docs/PromotionApi.md +494 -0
  124. data/docs/PromotionAssignment.md +10 -0
  125. data/docs/SecurityProfile.md +10 -0
  126. data/docs/SecurityProfileApi.md +292 -0
  127. data/docs/SecurityProfileAssignment.md +12 -0
  128. data/docs/Shipment.md +20 -0
  129. data/docs/ShipmentApi.md +554 -0
  130. data/docs/ShipmentItem.md +16 -0
  131. data/docs/Spec.md +17 -0
  132. data/docs/SpecApi.md +820 -0
  133. data/docs/SpecOption.md +14 -0
  134. data/docs/SpecProductAssignment.md +11 -0
  135. data/docs/SpendingAccount.md +15 -0
  136. data/docs/SpendingAccountApi.md +516 -0
  137. data/docs/SpendingAccountAssignment.md +11 -0
  138. data/docs/Supplier.md +11 -0
  139. data/docs/SupplierApi.md +324 -0
  140. data/docs/SupplierUserApi.md +400 -0
  141. data/docs/SupplierUserGroupApi.md +509 -0
  142. data/docs/TokenPasswordReset.md +8 -0
  143. data/docs/User.md +18 -0
  144. data/docs/UserApi.md +400 -0
  145. data/docs/UserGroup.md +11 -0
  146. data/docs/UserGroupApi.md +509 -0
  147. data/docs/UserGroupAssignment.md +9 -0
  148. data/docs/Variant.md +12 -0
  149. data/git_push.sh +67 -0
  150. data/lib/order_cloud.rb +193 -0
  151. data/lib/order_cloud/api/address_api.rb +628 -0
  152. data/lib/order_cloud/api/admin_address_api.rb +397 -0
  153. data/lib/order_cloud/api/admin_user_api.rb +397 -0
  154. data/lib/order_cloud/api/admin_user_group_api.rb +578 -0
  155. data/lib/order_cloud/api/approval_rule_api.rb +421 -0
  156. data/lib/order_cloud/api/auth_api.rb +138 -0
  157. data/lib/order_cloud/api/buyer_api.rb +397 -0
  158. data/lib/order_cloud/api/catalog_api.rb +760 -0
  159. data/lib/order_cloud/api/category_api.rb +826 -0
  160. data/lib/order_cloud/api/cost_center_api.rb +622 -0
  161. data/lib/order_cloud/api/credit_card_api.rb +622 -0
  162. data/lib/order_cloud/api/impersonation_config_api.rb +397 -0
  163. data/lib/order_cloud/api/line_item_api.rb +583 -0
  164. data/lib/order_cloud/api/me_api.rb +2345 -0
  165. data/lib/order_cloud/api/message_senders_api.rb +484 -0
  166. data/lib/order_cloud/api/order_api.rb +1377 -0
  167. data/lib/order_cloud/api/password_reset_api.rb +150 -0
  168. data/lib/order_cloud/api/payment_api.rb +513 -0
  169. data/lib/order_cloud/api/price_schedule_api.rb +519 -0
  170. data/lib/order_cloud/api/product_api.rb +1126 -0
  171. data/lib/order_cloud/api/promotion_api.rb +594 -0
  172. data/lib/order_cloud/api/security_profile_api.rb +363 -0
  173. data/lib/order_cloud/api/shipment_api.rb +665 -0
  174. data/lib/order_cloud/api/spec_api.rb +971 -0
  175. data/lib/order_cloud/api/spending_account_api.rb +622 -0
  176. data/lib/order_cloud/api/supplier_api.rb +397 -0
  177. data/lib/order_cloud/api/supplier_user_api.rb +489 -0
  178. data/lib/order_cloud/api/supplier_user_group_api.rb +614 -0
  179. data/lib/order_cloud/api/user_api.rb +489 -0
  180. data/lib/order_cloud/api/user_group_api.rb +614 -0
  181. data/lib/order_cloud/api_client.rb +385 -0
  182. data/lib/order_cloud/api_error.rb +47 -0
  183. data/lib/order_cloud/configuration.rb +245 -0
  184. data/lib/order_cloud/models/access_token.rb +226 -0
  185. data/lib/order_cloud/models/address.rb +307 -0
  186. data/lib/order_cloud/models/address_assignment.rb +235 -0
  187. data/lib/order_cloud/models/approval_rule.rb +244 -0
  188. data/lib/order_cloud/models/base_spec.rb +271 -0
  189. data/lib/order_cloud/models/buyer.rb +235 -0
  190. data/lib/order_cloud/models/buyer_address.rb +334 -0
  191. data/lib/order_cloud/models/buyer_credit_card.rb +271 -0
  192. data/lib/order_cloud/models/buyer_product.rb +334 -0
  193. data/lib/order_cloud/models/buyer_shipment.rb +298 -0
  194. data/lib/order_cloud/models/buyer_spec.rb +282 -0
  195. data/lib/order_cloud/models/catalog.rb +244 -0
  196. data/lib/order_cloud/models/catalog_assignment.rb +226 -0
  197. data/lib/order_cloud/models/category.rb +262 -0
  198. data/lib/order_cloud/models/category_assignment.rb +235 -0
  199. data/lib/order_cloud/models/category_product_assignment.rb +217 -0
  200. data/lib/order_cloud/models/cost_center.rb +226 -0
  201. data/lib/order_cloud/models/cost_center_assignment.rb +208 -0
  202. data/lib/order_cloud/models/credit_card.rb +262 -0
  203. data/lib/order_cloud/models/credit_card_assignment.rb +217 -0
  204. data/lib/order_cloud/models/impersonate_token_request.rb +210 -0
  205. data/lib/order_cloud/models/impersonation_config.rb +271 -0
  206. data/lib/order_cloud/models/inventory.rb +244 -0
  207. data/lib/order_cloud/models/line_item.rb +345 -0
  208. data/lib/order_cloud/models/line_item_product.rb +271 -0
  209. data/lib/order_cloud/models/line_item_spec.rb +226 -0
  210. data/lib/order_cloud/models/list_address.rb +210 -0
  211. data/lib/order_cloud/models/list_address_assignment.rb +210 -0
  212. data/lib/order_cloud/models/list_approval_rule.rb +210 -0
  213. data/lib/order_cloud/models/list_args.rb +248 -0
  214. data/lib/order_cloud/models/list_buyer.rb +210 -0
  215. data/lib/order_cloud/models/list_buyer_address.rb +210 -0
  216. data/lib/order_cloud/models/list_buyer_credit_card.rb +210 -0
  217. data/lib/order_cloud/models/list_buyer_product.rb +210 -0
  218. data/lib/order_cloud/models/list_buyer_shipment.rb +210 -0
  219. data/lib/order_cloud/models/list_buyer_spec.rb +210 -0
  220. data/lib/order_cloud/models/list_catalog.rb +210 -0
  221. data/lib/order_cloud/models/list_catalog_assignment.rb +210 -0
  222. data/lib/order_cloud/models/list_category.rb +210 -0
  223. data/lib/order_cloud/models/list_category_assignment.rb +210 -0
  224. data/lib/order_cloud/models/list_category_product_assignment.rb +210 -0
  225. data/lib/order_cloud/models/list_cost_center.rb +210 -0
  226. data/lib/order_cloud/models/list_cost_center_assignment.rb +210 -0
  227. data/lib/order_cloud/models/list_credit_card.rb +210 -0
  228. data/lib/order_cloud/models/list_credit_card_assignment.rb +210 -0
  229. data/lib/order_cloud/models/list_impersonation_config.rb +210 -0
  230. data/lib/order_cloud/models/list_line_item.rb +210 -0
  231. data/lib/order_cloud/models/list_message_cc_listener_assignment.rb +210 -0
  232. data/lib/order_cloud/models/list_message_config.rb +210 -0
  233. data/lib/order_cloud/models/list_message_sender.rb +210 -0
  234. data/lib/order_cloud/models/list_message_sender_assignment.rb +210 -0
  235. data/lib/order_cloud/models/list_order.rb +210 -0
  236. data/lib/order_cloud/models/list_order_approval.rb +210 -0
  237. data/lib/order_cloud/models/list_order_promotion.rb +210 -0
  238. data/lib/order_cloud/models/list_payment.rb +210 -0
  239. data/lib/order_cloud/models/list_price_schedule.rb +210 -0
  240. data/lib/order_cloud/models/list_product.rb +210 -0
  241. data/lib/order_cloud/models/list_product_assignment.rb +210 -0
  242. data/lib/order_cloud/models/list_product_catalog_assignment.rb +210 -0
  243. data/lib/order_cloud/models/list_promotion.rb +210 -0
  244. data/lib/order_cloud/models/list_promotion_assignment.rb +210 -0
  245. data/lib/order_cloud/models/list_security_profile.rb +210 -0
  246. data/lib/order_cloud/models/list_security_profile_assignment.rb +210 -0
  247. data/lib/order_cloud/models/list_shipment.rb +210 -0
  248. data/lib/order_cloud/models/list_shipment_item.rb +210 -0
  249. data/lib/order_cloud/models/list_spec.rb +210 -0
  250. data/lib/order_cloud/models/list_spec_option.rb +210 -0
  251. data/lib/order_cloud/models/list_spec_product_assignment.rb +210 -0
  252. data/lib/order_cloud/models/list_spending_account.rb +210 -0
  253. data/lib/order_cloud/models/list_spending_account_assignment.rb +210 -0
  254. data/lib/order_cloud/models/list_supplier.rb +210 -0
  255. data/lib/order_cloud/models/list_user.rb +210 -0
  256. data/lib/order_cloud/models/list_user_group.rb +210 -0
  257. data/lib/order_cloud/models/list_user_group_assignment.rb +210 -0
  258. data/lib/order_cloud/models/list_variant.rb +210 -0
  259. data/lib/order_cloud/models/me_buyer.rb +208 -0
  260. data/lib/order_cloud/models/me_user.rb +300 -0
  261. data/lib/order_cloud/models/message_cc_listener_assignment.rb +244 -0
  262. data/lib/order_cloud/models/message_config.rb +255 -0
  263. data/lib/order_cloud/models/message_sender.rb +219 -0
  264. data/lib/order_cloud/models/message_sender_assignment.rb +226 -0
  265. data/lib/order_cloud/models/meta.rb +237 -0
  266. data/lib/order_cloud/models/order.rb +397 -0
  267. data/lib/order_cloud/models/order_approval.rb +253 -0
  268. data/lib/order_cloud/models/order_approval_info.rb +208 -0
  269. data/lib/order_cloud/models/order_promotion.rb +325 -0
  270. data/lib/order_cloud/models/password_reset.rb +217 -0
  271. data/lib/order_cloud/models/password_reset_request.rb +226 -0
  272. data/lib/order_cloud/models/payment.rb +282 -0
  273. data/lib/order_cloud/models/payment_transaction.rb +262 -0
  274. data/lib/order_cloud/models/price_break.rb +208 -0
  275. data/lib/order_cloud/models/price_schedule.rb +282 -0
  276. data/lib/order_cloud/models/product.rb +334 -0
  277. data/lib/order_cloud/models/product_assignment.rb +226 -0
  278. data/lib/order_cloud/models/product_base.rb +325 -0
  279. data/lib/order_cloud/models/product_catalog_assignment.rb +208 -0
  280. data/lib/order_cloud/models/promotion.rb +316 -0
  281. data/lib/order_cloud/models/promotion_assignment.rb +217 -0
  282. data/lib/order_cloud/models/security_profile.rb +219 -0
  283. data/lib/order_cloud/models/security_profile_assignment.rb +235 -0
  284. data/lib/order_cloud/models/shipment.rb +307 -0
  285. data/lib/order_cloud/models/shipment_item.rb +273 -0
  286. data/lib/order_cloud/models/spec.rb +280 -0
  287. data/lib/order_cloud/models/spec_option.rb +253 -0
  288. data/lib/order_cloud/models/spec_product_assignment.rb +226 -0
  289. data/lib/order_cloud/models/spending_account.rb +262 -0
  290. data/lib/order_cloud/models/spending_account_assignment.rb +226 -0
  291. data/lib/order_cloud/models/supplier.rb +226 -0
  292. data/lib/order_cloud/models/token_password_reset.rb +199 -0
  293. data/lib/order_cloud/models/user.rb +291 -0
  294. data/lib/order_cloud/models/user_group.rb +226 -0
  295. data/lib/order_cloud/models/user_group_assignment.rb +208 -0
  296. data/lib/order_cloud/models/variant.rb +235 -0
  297. data/lib/order_cloud/version.rb +26 -0
  298. data/order_cloud-1.0.56.gem +0 -0
  299. data/order_cloud.gemspec +56 -0
  300. data/spec/api/address_api_spec.rb +179 -0
  301. data/spec/api/admin_address_api_spec.rb +125 -0
  302. data/spec/api/admin_user_api_spec.rb +125 -0
  303. data/spec/api/admin_user_group_api_spec.rb +165 -0
  304. data/spec/api/approval_rule_api_spec.rb +131 -0
  305. data/spec/api/auth_api_spec.rb +165 -0
  306. data/spec/api/buyer_api_spec.rb +125 -0
  307. data/spec/api/catalog_api_spec.rb +205 -0
  308. data/spec/api/category_api_spec.rb +223 -0
  309. data/spec/api/cost_center_api_spec.rb +177 -0
  310. data/spec/api/credit_card_api_spec.rb +177 -0
  311. data/spec/api/impersonation_config_api_spec.rb +125 -0
  312. data/spec/api/line_item_api_spec.rb +167 -0
  313. data/spec/api/me_api_spec.rb +568 -0
  314. data/spec/api/message_senders_api_spec.rb +149 -0
  315. data/spec/api/order_api_spec.rb +344 -0
  316. data/spec/api/password_reset_api_spec.rb +71 -0
  317. data/spec/api/payment_api_spec.rb +152 -0
  318. data/spec/api/price_schedule_api_spec.rb +151 -0
  319. data/spec/api/product_api_spec.rb +290 -0
  320. data/spec/api/promotion_api_spec.rb +170 -0
  321. data/spec/api/security_profile_api_spec.rb +122 -0
  322. data/spec/api/shipment_api_spec.rb +185 -0
  323. data/spec/api/spec_api_spec.rb +252 -0
  324. data/spec/api/spending_account_api_spec.rb +177 -0
  325. data/spec/api/supplier_api_spec.rb +125 -0
  326. data/spec/api/supplier_user_api_spec.rb +146 -0
  327. data/spec/api/supplier_user_group_api_spec.rb +174 -0
  328. data/spec/api/user_api_spec.rb +146 -0
  329. data/spec/api/user_group_api_spec.rb +174 -0
  330. data/spec/api_client_spec.rb +237 -0
  331. data/spec/configuration_spec.rb +80 -0
  332. data/spec/models/access_token_spec.rb +71 -0
  333. data/spec/models/address_assignment_spec.rb +77 -0
  334. data/spec/models/address_spec.rb +125 -0
  335. data/spec/models/approval_rule_spec.rb +83 -0
  336. data/spec/models/base_spec_spec.rb +101 -0
  337. data/spec/models/buyer_address_spec.rb +143 -0
  338. data/spec/models/buyer_credit_card_spec.rb +101 -0
  339. data/spec/models/buyer_product_spec.rb +143 -0
  340. data/spec/models/buyer_shipment_spec.rb +119 -0
  341. data/spec/models/buyer_spec.rb +77 -0
  342. data/spec/models/buyer_spec_spec.rb +107 -0
  343. data/spec/models/catalog_assignment_spec.rb +71 -0
  344. data/spec/models/catalog_spec.rb +83 -0
  345. data/spec/models/category_assignment_spec.rb +77 -0
  346. data/spec/models/category_product_assignment_spec.rb +65 -0
  347. data/spec/models/category_spec.rb +95 -0
  348. data/spec/models/cost_center_assignment_spec.rb +59 -0
  349. data/spec/models/cost_center_spec.rb +71 -0
  350. data/spec/models/credit_card_assignment_spec.rb +65 -0
  351. data/spec/models/credit_card_spec.rb +95 -0
  352. data/spec/models/impersonate_token_request_spec.rb +59 -0
  353. data/spec/models/impersonation_config_spec.rb +101 -0
  354. data/spec/models/inventory_spec.rb +83 -0
  355. data/spec/models/line_item_product_spec.rb +101 -0
  356. data/spec/models/line_item_spec.rb +149 -0
  357. data/spec/models/line_item_spec_spec.rb +71 -0
  358. data/spec/models/list_address_assignment_spec.rb +59 -0
  359. data/spec/models/list_address_spec.rb +59 -0
  360. data/spec/models/list_approval_rule_spec.rb +59 -0
  361. data/spec/models/list_args_spec.rb +83 -0
  362. data/spec/models/list_buyer_address_spec.rb +59 -0
  363. data/spec/models/list_buyer_credit_card_spec.rb +59 -0
  364. data/spec/models/list_buyer_product_spec.rb +59 -0
  365. data/spec/models/list_buyer_shipment_spec.rb +59 -0
  366. data/spec/models/list_buyer_spec.rb +59 -0
  367. data/spec/models/list_buyer_spec_spec.rb +59 -0
  368. data/spec/models/list_catalog_assignment_spec.rb +59 -0
  369. data/spec/models/list_catalog_spec.rb +59 -0
  370. data/spec/models/list_category_assignment_spec.rb +59 -0
  371. data/spec/models/list_category_product_assignment_spec.rb +59 -0
  372. data/spec/models/list_category_spec.rb +59 -0
  373. data/spec/models/list_cost_center_assignment_spec.rb +59 -0
  374. data/spec/models/list_cost_center_spec.rb +59 -0
  375. data/spec/models/list_credit_card_assignment_spec.rb +59 -0
  376. data/spec/models/list_credit_card_spec.rb +59 -0
  377. data/spec/models/list_impersonation_config_spec.rb +59 -0
  378. data/spec/models/list_line_item_spec.rb +59 -0
  379. data/spec/models/list_message_cc_listener_assignment_spec.rb +59 -0
  380. data/spec/models/list_message_config_spec.rb +59 -0
  381. data/spec/models/list_message_sender_assignment_spec.rb +59 -0
  382. data/spec/models/list_message_sender_spec.rb +59 -0
  383. data/spec/models/list_order_approval_spec.rb +59 -0
  384. data/spec/models/list_order_promotion_spec.rb +59 -0
  385. data/spec/models/list_order_spec.rb +59 -0
  386. data/spec/models/list_payment_spec.rb +59 -0
  387. data/spec/models/list_price_schedule_spec.rb +59 -0
  388. data/spec/models/list_product_assignment_spec.rb +59 -0
  389. data/spec/models/list_product_catalog_assignment_spec.rb +59 -0
  390. data/spec/models/list_product_spec.rb +59 -0
  391. data/spec/models/list_promotion_assignment_spec.rb +59 -0
  392. data/spec/models/list_promotion_spec.rb +59 -0
  393. data/spec/models/list_security_profile_assignment_spec.rb +59 -0
  394. data/spec/models/list_security_profile_spec.rb +59 -0
  395. data/spec/models/list_shipment_item_spec.rb +59 -0
  396. data/spec/models/list_shipment_spec.rb +59 -0
  397. data/spec/models/list_spec_option_spec.rb +59 -0
  398. data/spec/models/list_spec_product_assignment_spec.rb +59 -0
  399. data/spec/models/list_spec_spec.rb +59 -0
  400. data/spec/models/list_spending_account_assignment_spec.rb +59 -0
  401. data/spec/models/list_spending_account_spec.rb +59 -0
  402. data/spec/models/list_supplier_spec.rb +59 -0
  403. data/spec/models/list_user_group_assignment_spec.rb +59 -0
  404. data/spec/models/list_user_group_spec.rb +59 -0
  405. data/spec/models/list_user_spec.rb +59 -0
  406. data/spec/models/list_variant_spec.rb +59 -0
  407. data/spec/models/me_buyer_spec.rb +59 -0
  408. data/spec/models/me_user_spec.rb +119 -0
  409. data/spec/models/message_cc_listener_assignment_spec.rb +83 -0
  410. data/spec/models/message_config_spec.rb +89 -0
  411. data/spec/models/message_sender_assignment_spec.rb +71 -0
  412. data/spec/models/message_sender_spec.rb +65 -0
  413. data/spec/models/meta_spec.rb +77 -0
  414. data/spec/models/order_approval_info_spec.rb +59 -0
  415. data/spec/models/order_approval_spec.rb +89 -0
  416. data/spec/models/order_promotion_spec.rb +137 -0
  417. data/spec/models/order_spec.rb +185 -0
  418. data/spec/models/password_reset_request_spec.rb +71 -0
  419. data/spec/models/password_reset_spec.rb +65 -0
  420. data/spec/models/payment_spec.rb +107 -0
  421. data/spec/models/payment_transaction_spec.rb +95 -0
  422. data/spec/models/price_break_spec.rb +59 -0
  423. data/spec/models/price_schedule_spec.rb +107 -0
  424. data/spec/models/product_assignment_spec.rb +71 -0
  425. data/spec/models/product_base_spec.rb +137 -0
  426. data/spec/models/product_catalog_assignment_spec.rb +59 -0
  427. data/spec/models/product_spec.rb +143 -0
  428. data/spec/models/promotion_assignment_spec.rb +65 -0
  429. data/spec/models/promotion_spec.rb +131 -0
  430. data/spec/models/security_profile_assignment_spec.rb +77 -0
  431. data/spec/models/security_profile_spec.rb +65 -0
  432. data/spec/models/shipment_item_spec.rb +101 -0
  433. data/spec/models/shipment_spec.rb +125 -0
  434. data/spec/models/spec_option_spec.rb +89 -0
  435. data/spec/models/spec_product_assignment_spec.rb +71 -0
  436. data/spec/models/spec_spec.rb +107 -0
  437. data/spec/models/spending_account_assignment_spec.rb +71 -0
  438. data/spec/models/spending_account_spec.rb +95 -0
  439. data/spec/models/supplier_spec.rb +71 -0
  440. data/spec/models/token_password_reset_spec.rb +53 -0
  441. data/spec/models/user_group_assignment_spec.rb +59 -0
  442. data/spec/models/user_group_spec.rb +71 -0
  443. data/spec/models/user_spec.rb +113 -0
  444. data/spec/models/variant_spec.rb +77 -0
  445. data/spec/spec_helper.rb +122 -0
  446. metadata +596 -6
@@ -0,0 +1,363 @@
1
+ =begin
2
+ #OrderCloud
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0
7
+ Contact: ordercloud@four51.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module OrderCloud
27
+ class 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 security_profile_id ID of the security profile.
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [String] :buyer_id ID of the buyer.
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(security_profile_id, opts = {})
43
+ delete_assignment_with_http_info(security_profile_id, opts)
44
+ return nil
45
+ end
46
+
47
+ #
48
+ #
49
+ # @param security_profile_id ID of the security profile.
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [String] :buyer_id ID of the buyer.
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(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 'security_profile_id' is set
60
+ fail ArgumentError, "Missing the required parameter 'security_profile_id' when calling SecurityProfileApi.delete_assignment" if security_profile_id.nil?
61
+ # resource path
62
+ local_var_path = "/securityprofiles/{securityProfileID}/assignments".sub('{format}','json').sub('{' + 'securityProfileID' + '}', security_profile_id.to_s)
63
+
64
+ # query parameters
65
+ query_params = {}
66
+ query_params[:'buyerID'] = opts[:'buyer_id'] if !opts[:'buyer_id'].nil?
67
+ query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
68
+ query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
69
+
70
+ # header parameters
71
+ header_params = {}
72
+
73
+ # HTTP header 'Accept' (if needed)
74
+ local_header_accept = ['application/json']
75
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
76
+
77
+ # HTTP header 'Content-Type'
78
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
79
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
80
+
81
+ # form parameters
82
+ form_params = {}
83
+
84
+ # http body (model)
85
+ post_body = nil
86
+ auth_names = ['oauth2']
87
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
88
+ :header_params => header_params,
89
+ :query_params => query_params,
90
+ :form_params => form_params,
91
+ :body => post_body,
92
+ :auth_names => auth_names)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: SecurityProfileApi#delete_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
99
+ #
100
+ #
101
+ # @param security_profile_id ID of the security profile.
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [SecurityProfile]
104
+ def get(security_profile_id, opts = {})
105
+ data, _status_code, _headers = get_with_http_info(security_profile_id, opts)
106
+ return data
107
+ end
108
+
109
+ #
110
+ #
111
+ # @param security_profile_id ID of the security profile.
112
+ # @param [Hash] opts the optional parameters
113
+ # @return [Array<(SecurityProfile, Fixnum, Hash)>] SecurityProfile data, response status code and response headers
114
+ def get_with_http_info(security_profile_id, opts = {})
115
+ if @api_client.config.debugging
116
+ @api_client.config.logger.debug "Calling API: SecurityProfileApi.get ..."
117
+ end
118
+ # verify the required parameter 'security_profile_id' is set
119
+ fail ArgumentError, "Missing the required parameter 'security_profile_id' when calling SecurityProfileApi.get" if security_profile_id.nil?
120
+ # resource path
121
+ local_var_path = "/securityprofiles/{securityProfileID}".sub('{format}','json').sub('{' + 'securityProfileID' + '}', security_profile_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(:GET, 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
+ :return_type => 'SecurityProfile')
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: SecurityProfileApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ #
157
+ #
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [String] :search Search of the security profile.
160
+ # @option opts [Array<String>] :search_on Search on of the security profile.
161
+ # @option opts [Array<String>] :sort_by Sort by of the security profile.
162
+ # @option opts [Integer] :page Page of the security profile.
163
+ # @option opts [Integer] :page_size Page size of the security profile.
164
+ # @option opts [Hash<String, String>] :filters Filters of the security profile.
165
+ # @return [ListSecurityProfile]
166
+ def list(opts = {})
167
+ data, _status_code, _headers = list_with_http_info(opts)
168
+ return data
169
+ end
170
+
171
+ #
172
+ #
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [String] :search Search of the security profile.
175
+ # @option opts [Array<String>] :search_on Search on of the security profile.
176
+ # @option opts [Array<String>] :sort_by Sort by of the security profile.
177
+ # @option opts [Integer] :page Page of the security profile.
178
+ # @option opts [Integer] :page_size Page size of the security profile.
179
+ # @option opts [Hash<String, String>] :filters Filters of the security profile.
180
+ # @return [Array<(ListSecurityProfile, Fixnum, Hash)>] ListSecurityProfile data, response status code and response headers
181
+ def list_with_http_info(opts = {})
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug "Calling API: SecurityProfileApi.list ..."
184
+ end
185
+ # resource path
186
+ local_var_path = "/securityprofiles".sub('{format}','json')
187
+
188
+ # query parameters
189
+ query_params = {}
190
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
191
+ query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
192
+ query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
193
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
194
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
195
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
196
+
197
+ # header parameters
198
+ header_params = {}
199
+
200
+ # HTTP header 'Accept' (if needed)
201
+ local_header_accept = ['application/json']
202
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
203
+
204
+ # HTTP header 'Content-Type'
205
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
206
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
207
+
208
+ # form parameters
209
+ form_params = {}
210
+
211
+ # http body (model)
212
+ post_body = nil
213
+ auth_names = ['oauth2']
214
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
215
+ :header_params => header_params,
216
+ :query_params => query_params,
217
+ :form_params => form_params,
218
+ :body => post_body,
219
+ :auth_names => auth_names,
220
+ :return_type => 'ListSecurityProfile')
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "API called: SecurityProfileApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
+ end
224
+ return data, status_code, headers
225
+ end
226
+
227
+ #
228
+ #
229
+ # @param [Hash] opts the optional parameters
230
+ # @option opts [String] :buyer_id ID of the buyer.
231
+ # @option opts [String] :supplier_id ID of the supplier.
232
+ # @option opts [String] :security_profile_id ID of the security profile.
233
+ # @option opts [String] :user_id ID of the user.
234
+ # @option opts [String] :user_group_id ID of the user group.
235
+ # @option opts [String] :commerce_role Commerce role of the security profile.
236
+ # @option opts [String] :level Level of the security profile.
237
+ # @option opts [Integer] :page Page of the security profile.
238
+ # @option opts [Integer] :page_size Page size of the security profile.
239
+ # @return [ListSecurityProfileAssignment]
240
+ def list_assignments(opts = {})
241
+ data, _status_code, _headers = list_assignments_with_http_info(opts)
242
+ return data
243
+ end
244
+
245
+ #
246
+ #
247
+ # @param [Hash] opts the optional parameters
248
+ # @option opts [String] :buyer_id ID of the buyer.
249
+ # @option opts [String] :supplier_id ID of the supplier.
250
+ # @option opts [String] :security_profile_id ID of the security profile.
251
+ # @option opts [String] :user_id ID of the user.
252
+ # @option opts [String] :user_group_id ID of the user group.
253
+ # @option opts [String] :commerce_role Commerce role of the security profile.
254
+ # @option opts [String] :level Level of the security profile.
255
+ # @option opts [Integer] :page Page of the security profile.
256
+ # @option opts [Integer] :page_size Page size of the security profile.
257
+ # @return [Array<(ListSecurityProfileAssignment, Fixnum, Hash)>] ListSecurityProfileAssignment data, response status code and response headers
258
+ def list_assignments_with_http_info(opts = {})
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug "Calling API: SecurityProfileApi.list_assignments ..."
261
+ end
262
+ # resource path
263
+ local_var_path = "/securityprofiles/assignments".sub('{format}','json')
264
+
265
+ # query parameters
266
+ query_params = {}
267
+ query_params[:'buyerID'] = opts[:'buyer_id'] if !opts[:'buyer_id'].nil?
268
+ query_params[:'supplierID'] = opts[:'supplier_id'] if !opts[:'supplier_id'].nil?
269
+ query_params[:'securityProfileID'] = opts[:'security_profile_id'] if !opts[:'security_profile_id'].nil?
270
+ query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
271
+ query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
272
+ query_params[:'commerceRole'] = opts[:'commerce_role'] if !opts[:'commerce_role'].nil?
273
+ query_params[:'level'] = opts[:'level'] if !opts[:'level'].nil?
274
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
275
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
276
+
277
+ # header parameters
278
+ header_params = {}
279
+
280
+ # HTTP header 'Accept' (if needed)
281
+ local_header_accept = ['application/json']
282
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
283
+
284
+ # HTTP header 'Content-Type'
285
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
286
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
287
+
288
+ # form parameters
289
+ form_params = {}
290
+
291
+ # http body (model)
292
+ post_body = nil
293
+ auth_names = ['oauth2']
294
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
295
+ :header_params => header_params,
296
+ :query_params => query_params,
297
+ :form_params => form_params,
298
+ :body => post_body,
299
+ :auth_names => auth_names,
300
+ :return_type => 'ListSecurityProfileAssignment')
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug "API called: SecurityProfileApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
303
+ end
304
+ return data, status_code, headers
305
+ end
306
+
307
+ #
308
+ #
309
+ # @param assignment
310
+ # @param [Hash] opts the optional parameters
311
+ # @return [nil]
312
+ def save_assignment(assignment, opts = {})
313
+ save_assignment_with_http_info(assignment, opts)
314
+ return nil
315
+ end
316
+
317
+ #
318
+ #
319
+ # @param assignment
320
+ # @param [Hash] opts the optional parameters
321
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
322
+ def save_assignment_with_http_info(assignment, opts = {})
323
+ if @api_client.config.debugging
324
+ @api_client.config.logger.debug "Calling API: SecurityProfileApi.save_assignment ..."
325
+ end
326
+ # verify the required parameter 'assignment' is set
327
+ fail ArgumentError, "Missing the required parameter 'assignment' when calling SecurityProfileApi.save_assignment" if assignment.nil?
328
+ # resource path
329
+ local_var_path = "/securityprofiles/assignments".sub('{format}','json')
330
+
331
+ # query parameters
332
+ query_params = {}
333
+
334
+ # header parameters
335
+ header_params = {}
336
+
337
+ # HTTP header 'Accept' (if needed)
338
+ local_header_accept = ['application/json']
339
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
340
+
341
+ # HTTP header 'Content-Type'
342
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
343
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
344
+
345
+ # form parameters
346
+ form_params = {}
347
+
348
+ # http body (model)
349
+ post_body = @api_client.object_to_http_body(assignment)
350
+ auth_names = ['oauth2']
351
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
352
+ :header_params => header_params,
353
+ :query_params => query_params,
354
+ :form_params => form_params,
355
+ :body => post_body,
356
+ :auth_names => auth_names)
357
+ if @api_client.config.debugging
358
+ @api_client.config.logger.debug "API called: SecurityProfileApi#save_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
359
+ end
360
+ return data, status_code, headers
361
+ end
362
+ end
363
+ end
@@ -0,0 +1,665 @@
1
+ =begin
2
+ #OrderCloud
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0
7
+ Contact: ordercloud@four51.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module OrderCloud
27
+ class 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 shipment
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Shipment]
39
+ def create(shipment, opts = {})
40
+ data, _status_code, _headers = create_with_http_info(shipment, opts)
41
+ return data
42
+ end
43
+
44
+ #
45
+ #
46
+ # @param shipment
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(Shipment, Fixnum, Hash)>] Shipment data, response status code and response headers
49
+ def create_with_http_info(shipment, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: ShipmentApi.create ..."
52
+ end
53
+ # verify the required parameter 'shipment' is set
54
+ fail ArgumentError, "Missing the required parameter 'shipment' when calling ShipmentApi.create" if shipment.nil?
55
+ # resource path
56
+ local_var_path = "/shipments".sub('{format}','json')
57
+
58
+ # query parameters
59
+ query_params = {}
60
+
61
+ # header parameters
62
+ header_params = {}
63
+
64
+ # HTTP header 'Accept' (if needed)
65
+ local_header_accept = ['application/json']
66
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
67
+
68
+ # HTTP header 'Content-Type'
69
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = @api_client.object_to_http_body(shipment)
77
+ auth_names = ['oauth2']
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'Shipment')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: ShipmentApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ #
92
+ #
93
+ # @param shipment_id ID of the shipment.
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [nil]
96
+ def delete(shipment_id, opts = {})
97
+ delete_with_http_info(shipment_id, opts)
98
+ return nil
99
+ end
100
+
101
+ #
102
+ #
103
+ # @param shipment_id ID of the shipment.
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
106
+ def delete_with_http_info(shipment_id, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug "Calling API: ShipmentApi.delete ..."
109
+ end
110
+ # verify the required parameter 'shipment_id' is set
111
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.delete" if shipment_id.nil?
112
+ # resource path
113
+ local_var_path = "/shipments/{shipmentID}".sub('{format}','json').sub('{' + 'shipmentID' + '}', shipment_id.to_s)
114
+
115
+ # query parameters
116
+ query_params = {}
117
+
118
+ # header parameters
119
+ header_params = {}
120
+
121
+ # HTTP header 'Accept' (if needed)
122
+ local_header_accept = ['application/json']
123
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
124
+
125
+ # HTTP header 'Content-Type'
126
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
127
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
128
+
129
+ # form parameters
130
+ form_params = {}
131
+
132
+ # http body (model)
133
+ post_body = nil
134
+ auth_names = ['oauth2']
135
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
136
+ :header_params => header_params,
137
+ :query_params => query_params,
138
+ :form_params => form_params,
139
+ :body => post_body,
140
+ :auth_names => auth_names)
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "API called: ShipmentApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ end
144
+ return data, status_code, headers
145
+ end
146
+
147
+ #
148
+ #
149
+ # @param shipment_id ID of the shipment.
150
+ # @param order_id ID of the order.
151
+ # @param line_item_id ID of the line item.
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [nil]
154
+ def delete_item(shipment_id, order_id, line_item_id, opts = {})
155
+ delete_item_with_http_info(shipment_id, order_id, line_item_id, opts)
156
+ return nil
157
+ end
158
+
159
+ #
160
+ #
161
+ # @param shipment_id ID of the shipment.
162
+ # @param order_id ID of the order.
163
+ # @param line_item_id ID of the line item.
164
+ # @param [Hash] opts the optional parameters
165
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
166
+ def delete_item_with_http_info(shipment_id, order_id, line_item_id, opts = {})
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "Calling API: ShipmentApi.delete_item ..."
169
+ end
170
+ # verify the required parameter 'shipment_id' is set
171
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.delete_item" if shipment_id.nil?
172
+ # verify the required parameter 'order_id' is set
173
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling ShipmentApi.delete_item" if order_id.nil?
174
+ # verify the required parameter 'line_item_id' is set
175
+ fail ArgumentError, "Missing the required parameter 'line_item_id' when calling ShipmentApi.delete_item" if line_item_id.nil?
176
+ # resource path
177
+ local_var_path = "/shipments/{shipmentID}/items/{orderID}/{lineItemID}".sub('{format}','json').sub('{' + 'shipmentID' + '}', shipment_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'lineItemID' + '}', line_item_id.to_s)
178
+
179
+ # query parameters
180
+ query_params = {}
181
+
182
+ # header parameters
183
+ header_params = {}
184
+
185
+ # HTTP header 'Accept' (if needed)
186
+ local_header_accept = ['application/json']
187
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
188
+
189
+ # HTTP header 'Content-Type'
190
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
191
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
192
+
193
+ # form parameters
194
+ form_params = {}
195
+
196
+ # http body (model)
197
+ post_body = nil
198
+ auth_names = ['oauth2']
199
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
200
+ :header_params => header_params,
201
+ :query_params => query_params,
202
+ :form_params => form_params,
203
+ :body => post_body,
204
+ :auth_names => auth_names)
205
+ if @api_client.config.debugging
206
+ @api_client.config.logger.debug "API called: ShipmentApi#delete_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
207
+ end
208
+ return data, status_code, headers
209
+ end
210
+
211
+ #
212
+ #
213
+ # @param shipment_id ID of the shipment.
214
+ # @param [Hash] opts the optional parameters
215
+ # @return [Shipment]
216
+ def get(shipment_id, opts = {})
217
+ data, _status_code, _headers = get_with_http_info(shipment_id, opts)
218
+ return data
219
+ end
220
+
221
+ #
222
+ #
223
+ # @param shipment_id ID of the shipment.
224
+ # @param [Hash] opts the optional parameters
225
+ # @return [Array<(Shipment, Fixnum, Hash)>] Shipment data, response status code and response headers
226
+ def get_with_http_info(shipment_id, opts = {})
227
+ if @api_client.config.debugging
228
+ @api_client.config.logger.debug "Calling API: ShipmentApi.get ..."
229
+ end
230
+ # verify the required parameter 'shipment_id' is set
231
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.get" if shipment_id.nil?
232
+ # resource path
233
+ local_var_path = "/shipments/{shipmentID}".sub('{format}','json').sub('{' + 'shipmentID' + '}', shipment_id.to_s)
234
+
235
+ # query parameters
236
+ query_params = {}
237
+
238
+ # header parameters
239
+ header_params = {}
240
+
241
+ # HTTP header 'Accept' (if needed)
242
+ local_header_accept = ['application/json']
243
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
244
+
245
+ # HTTP header 'Content-Type'
246
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
247
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
248
+
249
+ # form parameters
250
+ form_params = {}
251
+
252
+ # http body (model)
253
+ post_body = nil
254
+ auth_names = ['oauth2']
255
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
256
+ :header_params => header_params,
257
+ :query_params => query_params,
258
+ :form_params => form_params,
259
+ :body => post_body,
260
+ :auth_names => auth_names,
261
+ :return_type => 'Shipment')
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug "API called: ShipmentApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
264
+ end
265
+ return data, status_code, headers
266
+ end
267
+
268
+ #
269
+ #
270
+ # @param shipment_id ID of the shipment.
271
+ # @param order_id ID of the order.
272
+ # @param line_item_id ID of the line item.
273
+ # @param [Hash] opts the optional parameters
274
+ # @return [ShipmentItem]
275
+ def get_item(shipment_id, order_id, line_item_id, opts = {})
276
+ data, _status_code, _headers = get_item_with_http_info(shipment_id, order_id, line_item_id, opts)
277
+ return data
278
+ end
279
+
280
+ #
281
+ #
282
+ # @param shipment_id ID of the shipment.
283
+ # @param order_id ID of the order.
284
+ # @param line_item_id ID of the line item.
285
+ # @param [Hash] opts the optional parameters
286
+ # @return [Array<(ShipmentItem, Fixnum, Hash)>] ShipmentItem data, response status code and response headers
287
+ def get_item_with_http_info(shipment_id, order_id, line_item_id, opts = {})
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug "Calling API: ShipmentApi.get_item ..."
290
+ end
291
+ # verify the required parameter 'shipment_id' is set
292
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.get_item" if shipment_id.nil?
293
+ # verify the required parameter 'order_id' is set
294
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling ShipmentApi.get_item" if order_id.nil?
295
+ # verify the required parameter 'line_item_id' is set
296
+ fail ArgumentError, "Missing the required parameter 'line_item_id' when calling ShipmentApi.get_item" if line_item_id.nil?
297
+ # resource path
298
+ local_var_path = "/shipments/{shipmentID}/items/{orderID}/{lineItemID}".sub('{format}','json').sub('{' + 'shipmentID' + '}', shipment_id.to_s).sub('{' + 'orderID' + '}', order_id.to_s).sub('{' + 'lineItemID' + '}', line_item_id.to_s)
299
+
300
+ # query parameters
301
+ query_params = {}
302
+
303
+ # header parameters
304
+ header_params = {}
305
+
306
+ # HTTP header 'Accept' (if needed)
307
+ local_header_accept = ['application/json']
308
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
309
+
310
+ # HTTP header 'Content-Type'
311
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
312
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
313
+
314
+ # form parameters
315
+ form_params = {}
316
+
317
+ # http body (model)
318
+ post_body = nil
319
+ auth_names = ['oauth2']
320
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
321
+ :header_params => header_params,
322
+ :query_params => query_params,
323
+ :form_params => form_params,
324
+ :body => post_body,
325
+ :auth_names => auth_names,
326
+ :return_type => 'ShipmentItem')
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug "API called: ShipmentApi#get_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
329
+ end
330
+ return data, status_code, headers
331
+ end
332
+
333
+ #
334
+ #
335
+ # @param [Hash] opts the optional parameters
336
+ # @option opts [String] :order_id ID of the order.
337
+ # @option opts [String] :search Search of the shipment.
338
+ # @option opts [Array<String>] :search_on Search on of the shipment.
339
+ # @option opts [Array<String>] :sort_by Sort by of the shipment.
340
+ # @option opts [Integer] :page Page of the shipment.
341
+ # @option opts [Integer] :page_size Page size of the shipment.
342
+ # @option opts [Hash<String, String>] :filters Filters of the shipment.
343
+ # @return [ListShipment]
344
+ def list(opts = {})
345
+ data, _status_code, _headers = list_with_http_info(opts)
346
+ return data
347
+ end
348
+
349
+ #
350
+ #
351
+ # @param [Hash] opts the optional parameters
352
+ # @option opts [String] :order_id ID of the order.
353
+ # @option opts [String] :search Search of the shipment.
354
+ # @option opts [Array<String>] :search_on Search on of the shipment.
355
+ # @option opts [Array<String>] :sort_by Sort by of the shipment.
356
+ # @option opts [Integer] :page Page of the shipment.
357
+ # @option opts [Integer] :page_size Page size of the shipment.
358
+ # @option opts [Hash<String, String>] :filters Filters of the shipment.
359
+ # @return [Array<(ListShipment, Fixnum, Hash)>] ListShipment data, response status code and response headers
360
+ def list_with_http_info(opts = {})
361
+ if @api_client.config.debugging
362
+ @api_client.config.logger.debug "Calling API: ShipmentApi.list ..."
363
+ end
364
+ # resource path
365
+ local_var_path = "/shipments".sub('{format}','json')
366
+
367
+ # query parameters
368
+ query_params = {}
369
+ query_params[:'orderID'] = opts[:'order_id'] if !opts[:'order_id'].nil?
370
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
371
+ query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
372
+ query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
373
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
374
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
375
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
376
+
377
+ # header parameters
378
+ header_params = {}
379
+
380
+ # HTTP header 'Accept' (if needed)
381
+ local_header_accept = ['application/json']
382
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
383
+
384
+ # HTTP header 'Content-Type'
385
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
386
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
387
+
388
+ # form parameters
389
+ form_params = {}
390
+
391
+ # http body (model)
392
+ post_body = nil
393
+ auth_names = ['oauth2']
394
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
395
+ :header_params => header_params,
396
+ :query_params => query_params,
397
+ :form_params => form_params,
398
+ :body => post_body,
399
+ :auth_names => auth_names,
400
+ :return_type => 'ListShipment')
401
+ if @api_client.config.debugging
402
+ @api_client.config.logger.debug "API called: ShipmentApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
403
+ end
404
+ return data, status_code, headers
405
+ end
406
+
407
+ #
408
+ #
409
+ # @param shipment_id ID of the shipment.
410
+ # @param [Hash] opts the optional parameters
411
+ # @option opts [String] :search Search of the shipment.
412
+ # @option opts [Array<String>] :search_on Search on of the shipment.
413
+ # @option opts [Array<String>] :sort_by Sort by of the shipment.
414
+ # @option opts [Integer] :page Page of the shipment.
415
+ # @option opts [Integer] :page_size Page size of the shipment.
416
+ # @option opts [Hash<String, String>] :filters Filters of the shipment.
417
+ # @return [ListShipmentItem]
418
+ def list_items(shipment_id, opts = {})
419
+ data, _status_code, _headers = list_items_with_http_info(shipment_id, opts)
420
+ return data
421
+ end
422
+
423
+ #
424
+ #
425
+ # @param shipment_id ID of the shipment.
426
+ # @param [Hash] opts the optional parameters
427
+ # @option opts [String] :search Search of the shipment.
428
+ # @option opts [Array<String>] :search_on Search on of the shipment.
429
+ # @option opts [Array<String>] :sort_by Sort by of the shipment.
430
+ # @option opts [Integer] :page Page of the shipment.
431
+ # @option opts [Integer] :page_size Page size of the shipment.
432
+ # @option opts [Hash<String, String>] :filters Filters of the shipment.
433
+ # @return [Array<(ListShipmentItem, Fixnum, Hash)>] ListShipmentItem data, response status code and response headers
434
+ def list_items_with_http_info(shipment_id, opts = {})
435
+ if @api_client.config.debugging
436
+ @api_client.config.logger.debug "Calling API: ShipmentApi.list_items ..."
437
+ end
438
+ # verify the required parameter 'shipment_id' is set
439
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.list_items" if shipment_id.nil?
440
+ # resource path
441
+ local_var_path = "/shipments/{shipmentID}/items".sub('{format}','json').sub('{' + 'shipmentID' + '}', shipment_id.to_s)
442
+
443
+ # query parameters
444
+ query_params = {}
445
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
446
+ query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
447
+ query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
448
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
449
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
450
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
451
+
452
+ # header parameters
453
+ header_params = {}
454
+
455
+ # HTTP header 'Accept' (if needed)
456
+ local_header_accept = ['application/json']
457
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
458
+
459
+ # HTTP header 'Content-Type'
460
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
461
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
462
+
463
+ # form parameters
464
+ form_params = {}
465
+
466
+ # http body (model)
467
+ post_body = nil
468
+ auth_names = ['oauth2']
469
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
470
+ :header_params => header_params,
471
+ :query_params => query_params,
472
+ :form_params => form_params,
473
+ :body => post_body,
474
+ :auth_names => auth_names,
475
+ :return_type => 'ListShipmentItem')
476
+ if @api_client.config.debugging
477
+ @api_client.config.logger.debug "API called: ShipmentApi#list_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
478
+ end
479
+ return data, status_code, headers
480
+ end
481
+
482
+ #
483
+ #
484
+ # @param shipment_id ID of the shipment.
485
+ # @param shipment
486
+ # @param [Hash] opts the optional parameters
487
+ # @return [Shipment]
488
+ def patch(shipment_id, shipment, opts = {})
489
+ data, _status_code, _headers = patch_with_http_info(shipment_id, shipment, opts)
490
+ return data
491
+ end
492
+
493
+ #
494
+ #
495
+ # @param shipment_id ID of the shipment.
496
+ # @param shipment
497
+ # @param [Hash] opts the optional parameters
498
+ # @return [Array<(Shipment, Fixnum, Hash)>] Shipment data, response status code and response headers
499
+ def patch_with_http_info(shipment_id, shipment, opts = {})
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug "Calling API: ShipmentApi.patch ..."
502
+ end
503
+ # verify the required parameter 'shipment_id' is set
504
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.patch" if shipment_id.nil?
505
+ # verify the required parameter 'shipment' is set
506
+ fail ArgumentError, "Missing the required parameter 'shipment' when calling ShipmentApi.patch" if shipment.nil?
507
+ # resource path
508
+ local_var_path = "/shipments/{shipmentID}".sub('{format}','json').sub('{' + 'shipmentID' + '}', shipment_id.to_s)
509
+
510
+ # query parameters
511
+ query_params = {}
512
+
513
+ # header parameters
514
+ header_params = {}
515
+
516
+ # HTTP header 'Accept' (if needed)
517
+ local_header_accept = ['application/json']
518
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
519
+
520
+ # HTTP header 'Content-Type'
521
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
522
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
523
+
524
+ # form parameters
525
+ form_params = {}
526
+
527
+ # http body (model)
528
+ post_body = @api_client.object_to_http_body(shipment)
529
+ auth_names = ['oauth2']
530
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
531
+ :header_params => header_params,
532
+ :query_params => query_params,
533
+ :form_params => form_params,
534
+ :body => post_body,
535
+ :auth_names => auth_names,
536
+ :return_type => 'Shipment')
537
+ if @api_client.config.debugging
538
+ @api_client.config.logger.debug "API called: ShipmentApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
539
+ end
540
+ return data, status_code, headers
541
+ end
542
+
543
+ #
544
+ #
545
+ # @param shipment_id ID of the shipment.
546
+ # @param item
547
+ # @param [Hash] opts the optional parameters
548
+ # @return [ShipmentItem]
549
+ def save_item(shipment_id, item, opts = {})
550
+ data, _status_code, _headers = save_item_with_http_info(shipment_id, item, opts)
551
+ return data
552
+ end
553
+
554
+ #
555
+ #
556
+ # @param shipment_id ID of the shipment.
557
+ # @param item
558
+ # @param [Hash] opts the optional parameters
559
+ # @return [Array<(ShipmentItem, Fixnum, Hash)>] ShipmentItem data, response status code and response headers
560
+ def save_item_with_http_info(shipment_id, item, opts = {})
561
+ if @api_client.config.debugging
562
+ @api_client.config.logger.debug "Calling API: ShipmentApi.save_item ..."
563
+ end
564
+ # verify the required parameter 'shipment_id' is set
565
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.save_item" if shipment_id.nil?
566
+ # verify the required parameter 'item' is set
567
+ fail ArgumentError, "Missing the required parameter 'item' when calling ShipmentApi.save_item" if item.nil?
568
+ # resource path
569
+ local_var_path = "/shipments/{shipmentID}/items".sub('{format}','json').sub('{' + 'shipmentID' + '}', shipment_id.to_s)
570
+
571
+ # query parameters
572
+ query_params = {}
573
+
574
+ # header parameters
575
+ header_params = {}
576
+
577
+ # HTTP header 'Accept' (if needed)
578
+ local_header_accept = ['application/json']
579
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
580
+
581
+ # HTTP header 'Content-Type'
582
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
583
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
584
+
585
+ # form parameters
586
+ form_params = {}
587
+
588
+ # http body (model)
589
+ post_body = @api_client.object_to_http_body(item)
590
+ auth_names = ['oauth2']
591
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
592
+ :header_params => header_params,
593
+ :query_params => query_params,
594
+ :form_params => form_params,
595
+ :body => post_body,
596
+ :auth_names => auth_names,
597
+ :return_type => 'ShipmentItem')
598
+ if @api_client.config.debugging
599
+ @api_client.config.logger.debug "API called: ShipmentApi#save_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
600
+ end
601
+ return data, status_code, headers
602
+ end
603
+
604
+ #
605
+ #
606
+ # @param shipment_id ID of the shipment.
607
+ # @param shipment
608
+ # @param [Hash] opts the optional parameters
609
+ # @return [Shipment]
610
+ def update(shipment_id, shipment, opts = {})
611
+ data, _status_code, _headers = update_with_http_info(shipment_id, shipment, opts)
612
+ return data
613
+ end
614
+
615
+ #
616
+ #
617
+ # @param shipment_id ID of the shipment.
618
+ # @param shipment
619
+ # @param [Hash] opts the optional parameters
620
+ # @return [Array<(Shipment, Fixnum, Hash)>] Shipment data, response status code and response headers
621
+ def update_with_http_info(shipment_id, shipment, opts = {})
622
+ if @api_client.config.debugging
623
+ @api_client.config.logger.debug "Calling API: ShipmentApi.update ..."
624
+ end
625
+ # verify the required parameter 'shipment_id' is set
626
+ fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentApi.update" if shipment_id.nil?
627
+ # verify the required parameter 'shipment' is set
628
+ fail ArgumentError, "Missing the required parameter 'shipment' when calling ShipmentApi.update" if shipment.nil?
629
+ # resource path
630
+ local_var_path = "/shipments/{shipmentID}".sub('{format}','json').sub('{' + 'shipmentID' + '}', shipment_id.to_s)
631
+
632
+ # query parameters
633
+ query_params = {}
634
+
635
+ # header parameters
636
+ header_params = {}
637
+
638
+ # HTTP header 'Accept' (if needed)
639
+ local_header_accept = ['application/json']
640
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
641
+
642
+ # HTTP header 'Content-Type'
643
+ local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
644
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
645
+
646
+ # form parameters
647
+ form_params = {}
648
+
649
+ # http body (model)
650
+ post_body = @api_client.object_to_http_body(shipment)
651
+ auth_names = ['oauth2']
652
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
653
+ :header_params => header_params,
654
+ :query_params => query_params,
655
+ :form_params => form_params,
656
+ :body => post_body,
657
+ :auth_names => auth_names,
658
+ :return_type => 'Shipment')
659
+ if @api_client.config.debugging
660
+ @api_client.config.logger.debug "API called: ShipmentApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
661
+ end
662
+ return data, status_code, headers
663
+ end
664
+ end
665
+ end