korona_client 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (309) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +171 -89
  3. data/config.json +6 -0
  4. data/docs/AccountTransaction.md +2 -0
  5. data/docs/AccountsApi.md +12 -12
  6. data/docs/AddOrUpdateResult.md +1 -0
  7. data/docs/AdditionalInfo.md +9 -0
  8. data/docs/AdditionalReceiptInfoType.md +22 -0
  9. data/docs/AdditionalReceiptInfoTypesApi.md +133 -0
  10. data/docs/AssortmentsApi.md +217 -48
  11. data/docs/Attendance.md +17 -0
  12. data/docs/Cashier.md +1 -0
  13. data/docs/CashiersApi.md +15 -13
  14. data/docs/Category.md +1 -0
  15. data/docs/CommodityGroupsApi.md +423 -0
  16. data/docs/CreationTask.md +17 -0
  17. data/docs/CurrenciesApi.md +15 -13
  18. data/docs/CustomerGroupsApi.md +15 -13
  19. data/docs/CustomerOrder.md +2 -2
  20. data/docs/CustomerOrdersApi.md +52 -46
  21. data/docs/CustomersApi.md +108 -45
  22. data/docs/DayTimePeriod.md +9 -0
  23. data/docs/DeliveryNote.md +22 -0
  24. data/docs/DeliveryNoteItem.md +14 -0
  25. data/docs/DeliveryNotesApi.md +316 -0
  26. data/docs/Deposit.md +12 -0
  27. data/docs/Discount.md +10 -0
  28. data/docs/EconomicZonesApi.md +15 -13
  29. data/docs/EndOfDayStatement.md +1 -1
  30. data/docs/Event.md +2 -0
  31. data/docs/ExternalSystemCall.md +20 -0
  32. data/docs/ExternalSystemCallsApi.md +423 -0
  33. data/docs/ImagesApi.md +8 -7
  34. data/docs/InfoTextsApi.md +15 -13
  35. data/docs/InventoriesApi.md +894 -0
  36. data/docs/KoronaAccount.md +1 -0
  37. data/docs/KoronaAccountApi.md +5 -5
  38. data/docs/MediaUrl.md +8 -0
  39. data/docs/OrganizationalUnit.md +1 -0
  40. data/docs/OrganizationalUnitsApi.md +108 -104
  41. data/docs/PaymentMethod.md +3 -0
  42. data/docs/PaymentMethodsApi.md +15 -13
  43. data/docs/PointsOfSaleApi.md +85 -74
  44. data/docs/Pos.md +5 -3
  45. data/docs/PriceGroupsApi.md +15 -13
  46. data/docs/Product.md +2 -0
  47. data/docs/ProductsApi.md +121 -58
  48. data/docs/Receipt.md +5 -1
  49. data/docs/ReceiptItem.md +3 -0
  50. data/docs/ReceiptsApi.md +20 -14
  51. data/docs/ResultListAdditionalReceiptInfoType.md +13 -0
  52. data/docs/ResultListAttendance.md +13 -0
  53. data/docs/ResultListCreationTask.md +13 -0
  54. data/docs/ResultListDeliveryNote.md +13 -0
  55. data/docs/ResultListExternalSystemCall.md +13 -0
  56. data/docs/ResultListTicket.md +13 -0
  57. data/docs/ResultListTimeTrackingEntity.md +13 -0
  58. data/docs/ResultListTimeTrackingEntry.md +13 -0
  59. data/docs/SalesTaxesApi.md +15 -13
  60. data/docs/Sector.md +1 -0
  61. data/docs/SectorRevenueAccountItem.md +9 -0
  62. data/docs/SectorsApi.md +15 -13
  63. data/docs/Signature.md +10 -0
  64. data/docs/StatisticsApi.md +28 -28
  65. data/docs/StockReceipt.md +1 -0
  66. data/docs/StockReceiptsApi.md +687 -0
  67. data/docs/SuppliersApi.md +15 -13
  68. data/docs/TagsApi.md +303 -13
  69. data/docs/Ticket.md +14 -0
  70. data/docs/TicketCreationApi.md +127 -0
  71. data/docs/TicketPersonalization.md +11 -0
  72. data/docs/TicketingApi.md +975 -76
  73. data/docs/TimeTrackingApi.md +388 -0
  74. data/docs/TimeTrackingEntity.md +13 -0
  75. data/docs/TimeTrackingEntry.md +14 -0
  76. data/docs/TotalPeriod.md +9 -0
  77. data/docs/Validity.md +11 -0
  78. data/korona_client-1.0.0.gem +0 -0
  79. data/korona_client.gemspec +7 -8
  80. data/lib/korona_client.rb +38 -5
  81. data/lib/korona_client/api/accounts_api.rb +24 -26
  82. data/lib/korona_client/api/additional_receipt_info_types_api.rb +155 -0
  83. data/lib/korona_client/api/assortments_api.rb +259 -82
  84. data/lib/korona_client/api/cashiers_api.rb +27 -26
  85. data/lib/korona_client/api/commodity_groups_api.rb +462 -0
  86. data/lib/korona_client/api/currencies_api.rb +27 -26
  87. data/lib/korona_client/api/customer_groups_api.rb +27 -26
  88. data/lib/korona_client/api/customer_orders_api.rb +78 -78
  89. data/lib/korona_client/api/customers_api.rb +137 -77
  90. data/lib/korona_client/api/delivery_notes_api.rb +354 -0
  91. data/lib/korona_client/api/economic_zones_api.rb +27 -26
  92. data/lib/korona_client/api/external_system_calls_api.rb +462 -0
  93. data/lib/korona_client/api/images_api.rb +16 -16
  94. data/lib/korona_client/api/info_texts_api.rb +27 -26
  95. data/lib/korona_client/api/inventories_api.rb +1014 -0
  96. data/lib/korona_client/api/korona_account_api.rb +11 -12
  97. data/lib/korona_client/api/organizational_units_api.rb +157 -162
  98. data/lib/korona_client/api/payment_methods_api.rb +27 -26
  99. data/lib/korona_client/api/points_of_sale_api.rb +127 -121
  100. data/lib/korona_client/api/price_groups_api.rb +27 -26
  101. data/lib/korona_client/api/products_api.rb +154 -95
  102. data/lib/korona_client/api/receipts_api.rb +27 -20
  103. data/lib/korona_client/api/sales_taxes_api.rb +27 -26
  104. data/lib/korona_client/api/sectors_api.rb +27 -26
  105. data/lib/korona_client/api/statistics_api.rb +32 -36
  106. data/lib/korona_client/api/stock_receipts_api.rb +769 -0
  107. data/lib/korona_client/api/suppliers_api.rb +27 -26
  108. data/lib/korona_client/api/tags_api.rb +326 -21
  109. data/lib/korona_client/api/ticket_creation_api.rb +149 -0
  110. data/lib/korona_client/api/ticketing_api.rb +1084 -132
  111. data/lib/korona_client/api/time_tracking_api.rb +425 -0
  112. data/lib/korona_client/api_client.rb +11 -11
  113. data/lib/korona_client/api_error.rb +3 -3
  114. data/lib/korona_client/configuration.rb +4 -4
  115. data/lib/korona_client/models/account.rb +11 -15
  116. data/lib/korona_client/models/account_summary.rb +8 -13
  117. data/lib/korona_client/models/account_transaction.rb +32 -15
  118. data/lib/korona_client/models/add_or_update_result.rb +24 -19
  119. data/lib/korona_client/models/additional_info.rb +192 -0
  120. data/lib/korona_client/models/additional_receipt_info_type.rb +319 -0
  121. data/lib/korona_client/models/address_information.rb +8 -13
  122. data/lib/korona_client/models/admission.rb +8 -13
  123. data/lib/korona_client/models/amount.rb +8 -13
  124. data/lib/korona_client/models/amount_count_data.rb +8 -13
  125. data/lib/korona_client/models/assortment.rb +8 -13
  126. data/lib/korona_client/models/attendance.rb +268 -0
  127. data/lib/korona_client/models/bad_request_error.rb +11 -15
  128. data/lib/korona_client/models/capacity.rb +8 -13
  129. data/lib/korona_client/models/cashier.rb +21 -16
  130. data/lib/korona_client/models/cashier_summary.rb +8 -13
  131. data/lib/korona_client/models/category.rb +19 -15
  132. data/lib/korona_client/models/cloud_subscription.rb +11 -15
  133. data/lib/korona_client/models/commodity_group.rb +8 -13
  134. data/lib/korona_client/models/commodity_group_summary.rb +8 -13
  135. data/lib/korona_client/models/company_identification.rb +8 -13
  136. data/lib/korona_client/models/creation_task.rb +298 -0
  137. data/lib/korona_client/models/currency.rb +8 -13
  138. data/lib/korona_client/models/currency_denomination.rb +11 -15
  139. data/lib/korona_client/models/currency_exchange_rate.rb +8 -13
  140. data/lib/korona_client/models/customer.rb +11 -15
  141. data/lib/korona_client/models/customer_card.rb +11 -15
  142. data/lib/korona_client/models/customer_data.rb +8 -13
  143. data/lib/korona_client/models/customer_group.rb +8 -13
  144. data/lib/korona_client/models/customer_group_summary.rb +8 -13
  145. data/lib/korona_client/models/customer_information.rb +8 -13
  146. data/lib/korona_client/models/customer_order.rb +28 -29
  147. data/lib/korona_client/models/day_rating.rb +8 -13
  148. data/lib/korona_client/models/day_time_period.rb +192 -0
  149. data/lib/korona_client/models/delivery_note.rb +316 -0
  150. data/lib/korona_client/models/delivery_note_item.rb +239 -0
  151. data/lib/korona_client/models/deposit.rb +219 -0
  152. data/lib/korona_client/models/device_information.rb +8 -13
  153. data/lib/korona_client/models/discount.rb +201 -0
  154. data/lib/korona_client/models/economic_zone.rb +8 -13
  155. data/lib/korona_client/models/end_of_day_statement.rb +15 -20
  156. data/lib/korona_client/models/end_of_day_statement_summary.rb +8 -13
  157. data/lib/korona_client/models/entry_gate.rb +8 -13
  158. data/lib/korona_client/models/event.rb +30 -15
  159. data/lib/korona_client/models/external_system_call.rb +295 -0
  160. data/lib/korona_client/models/forbidden_error.rb +11 -15
  161. data/lib/korona_client/models/geo_location.rb +8 -13
  162. data/lib/korona_client/models/info_text.rb +11 -15
  163. data/lib/korona_client/models/interval.rb +8 -13
  164. data/lib/korona_client/models/inventory.rb +14 -18
  165. data/lib/korona_client/models/inventory_list.rb +11 -15
  166. data/lib/korona_client/models/inventory_list_item.rb +8 -13
  167. data/lib/korona_client/models/inventory_list_item_stock.rb +8 -13
  168. data/lib/korona_client/models/korona_account.rb +41 -13
  169. data/lib/korona_client/models/media_url.rb +183 -0
  170. data/lib/korona_client/models/method_not_allowed_error.rb +11 -15
  171. data/lib/korona_client/models/model_reference.rb +8 -12
  172. data/lib/korona_client/models/not_found_error.rb +11 -15
  173. data/lib/korona_client/models/organizational_unit.rb +20 -16
  174. data/lib/korona_client/models/payment.rb +8 -13
  175. data/lib/korona_client/models/payment_method.rb +37 -15
  176. data/lib/korona_client/models/payment_summary.rb +8 -13
  177. data/lib/korona_client/models/period.rb +8 -13
  178. data/lib/korona_client/models/period_list_top_seller.rb +8 -13
  179. data/lib/korona_client/models/period_map_string_revenue_data.rb +8 -13
  180. data/lib/korona_client/models/period_object.rb +8 -13
  181. data/lib/korona_client/models/period_revenue_data.rb +8 -13
  182. data/lib/korona_client/models/pos.rb +31 -15
  183. data/lib/korona_client/models/price_group.rb +8 -13
  184. data/lib/korona_client/models/product.rb +35 -19
  185. data/lib/korona_client/models/product_code.rb +8 -13
  186. data/lib/korona_client/models/product_description.rb +11 -15
  187. data/lib/korona_client/models/product_price.rb +8 -13
  188. data/lib/korona_client/models/product_stock.rb +8 -13
  189. data/lib/korona_client/models/product_subproduct.rb +8 -13
  190. data/lib/korona_client/models/product_supplier_price.rb +8 -13
  191. data/lib/korona_client/models/product_transfer_involved_party_information.rb +8 -13
  192. data/lib/korona_client/models/product_transfer_involved_party_information_data.rb +8 -13
  193. data/lib/korona_client/models/rating.rb +8 -13
  194. data/lib/korona_client/models/receipt.rb +55 -20
  195. data/lib/korona_client/models/receipt_item.rb +40 -14
  196. data/lib/korona_client/models/result_list.rb +14 -19
  197. data/lib/korona_client/models/result_list_account.rb +14 -19
  198. data/lib/korona_client/models/result_list_additional_receipt_info_type.rb +268 -0
  199. data/lib/korona_client/models/result_list_assortment.rb +14 -19
  200. data/lib/korona_client/models/result_list_attendance.rb +268 -0
  201. data/lib/korona_client/models/result_list_cashier.rb +14 -19
  202. data/lib/korona_client/models/result_list_commodity_group.rb +14 -19
  203. data/lib/korona_client/models/result_list_creation_task.rb +268 -0
  204. data/lib/korona_client/models/result_list_currency.rb +14 -19
  205. data/lib/korona_client/models/result_list_customer.rb +14 -19
  206. data/lib/korona_client/models/result_list_customer_group.rb +14 -19
  207. data/lib/korona_client/models/result_list_customer_order.rb +14 -19
  208. data/lib/korona_client/models/result_list_day_rating.rb +14 -19
  209. data/lib/korona_client/models/result_list_delivery_note.rb +268 -0
  210. data/lib/korona_client/models/result_list_economic_zone.rb +14 -19
  211. data/lib/korona_client/models/result_list_end_of_day_statement.rb +14 -19
  212. data/lib/korona_client/models/result_list_entry_gate.rb +14 -19
  213. data/lib/korona_client/models/result_list_event.rb +14 -19
  214. data/lib/korona_client/models/result_list_external_system_call.rb +268 -0
  215. data/lib/korona_client/models/result_list_info_text.rb +14 -19
  216. data/lib/korona_client/models/result_list_inventory.rb +14 -19
  217. data/lib/korona_client/models/result_list_inventory_list.rb +14 -19
  218. data/lib/korona_client/models/result_list_inventory_list_item.rb +14 -19
  219. data/lib/korona_client/models/result_list_organizational_unit.rb +14 -19
  220. data/lib/korona_client/models/result_list_payment_method.rb +14 -19
  221. data/lib/korona_client/models/result_list_pos.rb +14 -19
  222. data/lib/korona_client/models/result_list_price_group.rb +14 -19
  223. data/lib/korona_client/models/result_list_product.rb +14 -19
  224. data/lib/korona_client/models/result_list_product_stock.rb +14 -19
  225. data/lib/korona_client/models/result_list_receipt.rb +14 -19
  226. data/lib/korona_client/models/result_list_sales_tax.rb +14 -19
  227. data/lib/korona_client/models/result_list_sector.rb +14 -19
  228. data/lib/korona_client/models/result_list_stock_receipt.rb +14 -19
  229. data/lib/korona_client/models/result_list_stock_receipt_item.rb +14 -19
  230. data/lib/korona_client/models/result_list_supplier.rb +14 -19
  231. data/lib/korona_client/models/result_list_tag.rb +14 -19
  232. data/lib/korona_client/models/result_list_ticket.rb +268 -0
  233. data/lib/korona_client/models/result_list_ticket_definition.rb +14 -19
  234. data/lib/korona_client/models/result_list_time_tracking_entity.rb +268 -0
  235. data/lib/korona_client/models/result_list_time_tracking_entry.rb +268 -0
  236. data/lib/korona_client/models/revenue_data.rb +8 -13
  237. data/lib/korona_client/models/sales_tax.rb +8 -13
  238. data/lib/korona_client/models/sales_tax_rate.rb +8 -13
  239. data/lib/korona_client/models/sector.rb +21 -15
  240. data/lib/korona_client/models/sector_revenue_account_item.rb +192 -0
  241. data/lib/korona_client/models/sector_sales_tax_item.rb +8 -13
  242. data/lib/korona_client/models/signature.rb +216 -0
  243. data/lib/korona_client/models/statistic.rb +8 -13
  244. data/lib/korona_client/models/statistic_list_top_seller.rb +8 -13
  245. data/lib/korona_client/models/statistic_map_string_revenue_data.rb +8 -13
  246. data/lib/korona_client/models/statistic_revenue_data.rb +8 -13
  247. data/lib/korona_client/models/stock_receipt.rb +21 -16
  248. data/lib/korona_client/models/stock_receipt_item.rb +8 -13
  249. data/lib/korona_client/models/stock_receipt_item_amount.rb +8 -13
  250. data/lib/korona_client/models/stock_receipt_item_identification.rb +8 -13
  251. data/lib/korona_client/models/stock_receipt_item_purchase_price.rb +8 -13
  252. data/lib/korona_client/models/supplier.rb +8 -13
  253. data/lib/korona_client/models/supplier_contact.rb +8 -13
  254. data/lib/korona_client/models/supplier_contact_person.rb +8 -13
  255. data/lib/korona_client/models/supplier_payment_information.rb +11 -15
  256. data/lib/korona_client/models/tag.rb +8 -13
  257. data/lib/korona_client/models/tax_payment.rb +8 -13
  258. data/lib/korona_client/models/tax_summary.rb +8 -13
  259. data/lib/korona_client/models/ticket.rb +237 -0
  260. data/lib/korona_client/models/ticket_definition.rb +8 -13
  261. data/lib/korona_client/models/ticket_personalization.rb +225 -0
  262. data/lib/korona_client/models/time_period.rb +8 -13
  263. data/lib/korona_client/models/time_tracking_entity.rb +232 -0
  264. data/lib/korona_client/models/time_tracking_entry.rb +240 -0
  265. data/lib/korona_client/models/too_many_requests_error.rb +11 -15
  266. data/lib/korona_client/models/top_seller.rb +8 -13
  267. data/lib/korona_client/models/total_period.rb +192 -0
  268. data/lib/korona_client/models/total_price.rb +10 -14
  269. data/lib/korona_client/models/validity.rb +236 -0
  270. data/lib/korona_client/models/weather.rb +11 -15
  271. data/lib/korona_client/version.rb +4 -4
  272. data/node_modules/.yarn-integrity +12 -0
  273. data/spec/api/additional_receipt_info_types_api_spec.rb +66 -0
  274. data/spec/api/commodity_groups_api_spec.rb +133 -0
  275. data/spec/api/delivery_notes_api_spec.rb +112 -0
  276. data/spec/api/external_system_calls_api_spec.rb +133 -0
  277. data/spec/api/inventories_api_spec.rb +253 -0
  278. data/spec/api/stock_receipts_api_spec.rb +201 -0
  279. data/spec/api/ticket_creation_api_spec.rb +63 -0
  280. data/spec/api/time_tracking_api_spec.rb +129 -0
  281. data/spec/models/additional_info_spec.rb +47 -0
  282. data/spec/models/additional_receipt_info_type_spec.rb +125 -0
  283. data/spec/models/attendance_spec.rb +95 -0
  284. data/spec/models/creation_task_spec.rb +99 -0
  285. data/spec/models/day_time_period_spec.rb +47 -0
  286. data/spec/models/delivery_note_item_spec.rb +77 -0
  287. data/spec/models/delivery_note_spec.rb +125 -0
  288. data/spec/models/deposit_spec.rb +65 -0
  289. data/spec/models/discount_spec.rb +53 -0
  290. data/spec/models/external_system_call_spec.rb +113 -0
  291. data/spec/models/media_url_spec.rb +41 -0
  292. data/spec/models/result_list_additional_receipt_info_type_spec.rb +71 -0
  293. data/spec/models/result_list_attendance_spec.rb +71 -0
  294. data/spec/models/result_list_creation_task_spec.rb +71 -0
  295. data/spec/models/result_list_delivery_note_spec.rb +71 -0
  296. data/spec/models/result_list_external_system_call_spec.rb +71 -0
  297. data/spec/models/result_list_ticket_spec.rb +71 -0
  298. data/spec/models/result_list_time_tracking_entity_spec.rb +71 -0
  299. data/spec/models/result_list_time_tracking_entry_spec.rb +71 -0
  300. data/spec/models/sector_revenue_account_item_spec.rb +47 -0
  301. data/spec/models/signature_spec.rb +53 -0
  302. data/spec/models/ticket_personalization_spec.rb +59 -0
  303. data/spec/models/ticket_spec.rb +77 -0
  304. data/spec/models/time_tracking_entity_spec.rb +71 -0
  305. data/spec/models/time_tracking_entry_spec.rb +77 -0
  306. data/spec/models/total_period_spec.rb +47 -0
  307. data/spec/models/validity_spec.rb +63 -0
  308. data/yarn.lock +4 -0
  309. metadata +162 -18
@@ -0,0 +1,769 @@
1
+ =begin
2
+ #KORONA.cloud API v3
3
+
4
+ #Our api provides access to our cloud services
5
+
6
+ OpenAPI spec version: 2.11.21
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.8
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module KoronaClient
16
+ class StockReceiptsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # adds stock-receipt items
23
+ #
24
+ # @param korona_account_id account id of the KORONA.cloud account
25
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
26
+ # @param body data to add
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [Array<AddOrUpdateResult>]
29
+ def add_stock_receipt_items(korona_account_id, stock_receipt_id, body, opts = {})
30
+ data, _status_code, _headers = add_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts)
31
+ data
32
+ end
33
+
34
+ # adds stock-receipt items
35
+ #
36
+ # @param korona_account_id account id of the KORONA.cloud account
37
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
38
+ # @param body data to add
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>] Array<AddOrUpdateResult> data, response status code and response headers
41
+ def add_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.add_stock_receipt_items ...'
44
+ end
45
+ # verify the required parameter 'korona_account_id' is set
46
+ if @api_client.config.client_side_validation && korona_account_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.add_stock_receipt_items"
48
+ end
49
+ # verify the required parameter 'stock_receipt_id' is set
50
+ if @api_client.config.client_side_validation && stock_receipt_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.add_stock_receipt_items"
52
+ end
53
+ # verify the required parameter 'body' is set
54
+ if @api_client.config.client_side_validation && body.nil?
55
+ fail ArgumentError, "Missing the required parameter 'body' when calling StockReceiptsApi.add_stock_receipt_items"
56
+ end
57
+ # resource path
58
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s)
59
+
60
+ # query parameters
61
+ query_params = {}
62
+
63
+ # header parameters
64
+ header_params = {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
67
+ # HTTP header 'Content-Type'
68
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
69
+
70
+ # form parameters
71
+ form_params = {}
72
+
73
+ # http body (model)
74
+ post_body = @api_client.object_to_http_body(body)
75
+ auth_names = ['basicAuth']
76
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => 'Array<AddOrUpdateResult>')
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: StockReceiptsApi#add_stock_receipt_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+ # adds stock-receipts
89
+ #
90
+ # @param korona_account_id account id of the KORONA.cloud account
91
+ # @param body data to add
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [Array<AddOrUpdateResult>]
94
+ def add_stock_receipts(korona_account_id, body, opts = {})
95
+ data, _status_code, _headers = add_stock_receipts_with_http_info(korona_account_id, body, opts)
96
+ data
97
+ end
98
+
99
+ # adds stock-receipts
100
+ #
101
+ # @param korona_account_id account id of the KORONA.cloud account
102
+ # @param body data to add
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>] Array<AddOrUpdateResult> data, response status code and response headers
105
+ def add_stock_receipts_with_http_info(korona_account_id, body, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.add_stock_receipts ...'
108
+ end
109
+ # verify the required parameter 'korona_account_id' is set
110
+ if @api_client.config.client_side_validation && korona_account_id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.add_stock_receipts"
112
+ end
113
+ # verify the required parameter 'body' is set
114
+ if @api_client.config.client_side_validation && body.nil?
115
+ fail ArgumentError, "Missing the required parameter 'body' when calling StockReceiptsApi.add_stock_receipts"
116
+ end
117
+ # resource path
118
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s)
119
+
120
+ # query parameters
121
+ query_params = {}
122
+
123
+ # header parameters
124
+ header_params = {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+ # HTTP header 'Content-Type'
128
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
129
+
130
+ # form parameters
131
+ form_params = {}
132
+
133
+ # http body (model)
134
+ post_body = @api_client.object_to_http_body(body)
135
+ auth_names = ['basicAuth']
136
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => 'Array<AddOrUpdateResult>')
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: StockReceiptsApi#add_stock_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+ # book the single stock-receipt
149
+ #
150
+ # @param korona_account_id account id of the KORONA.cloud account
151
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [nil]
154
+ def book_stock_receipt(korona_account_id, stock_receipt_id, opts = {})
155
+ book_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts)
156
+ nil
157
+ end
158
+
159
+ # book the single stock-receipt
160
+ #
161
+ # @param korona_account_id account id of the KORONA.cloud account
162
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
163
+ # @param [Hash] opts the optional parameters
164
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
165
+ def book_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts = {})
166
+ if @api_client.config.debugging
167
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.book_stock_receipt ...'
168
+ end
169
+ # verify the required parameter 'korona_account_id' is set
170
+ if @api_client.config.client_side_validation && korona_account_id.nil?
171
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.book_stock_receipt"
172
+ end
173
+ # verify the required parameter 'stock_receipt_id' is set
174
+ if @api_client.config.client_side_validation && stock_receipt_id.nil?
175
+ fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.book_stock_receipt"
176
+ end
177
+ # resource path
178
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/book'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s)
179
+
180
+ # query parameters
181
+ query_params = {}
182
+
183
+ # header parameters
184
+ header_params = {}
185
+ # HTTP header 'Accept' (if needed)
186
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
187
+ # HTTP header 'Content-Type'
188
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
189
+
190
+ # form parameters
191
+ form_params = {}
192
+
193
+ # http body (model)
194
+ post_body = nil
195
+ auth_names = ['basicAuth']
196
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
197
+ :header_params => header_params,
198
+ :query_params => query_params,
199
+ :form_params => form_params,
200
+ :body => post_body,
201
+ :auth_names => auth_names)
202
+ if @api_client.config.debugging
203
+ @api_client.config.logger.debug "API called: StockReceiptsApi#book_stock_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
204
+ end
205
+ return data, status_code, headers
206
+ end
207
+ # deletes the single stock-receipt item
208
+ #
209
+ # @param korona_account_id account id of the KORONA.cloud account
210
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
211
+ # @param product_id id of the related object (important: id should match the uuid-format)
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [nil]
214
+ def delete_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, opts = {})
215
+ delete_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts)
216
+ nil
217
+ end
218
+
219
+ # deletes the single stock-receipt item
220
+ #
221
+ # @param korona_account_id account id of the KORONA.cloud account
222
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
223
+ # @param product_id id of the related object (important: id should match the uuid-format)
224
+ # @param [Hash] opts the optional parameters
225
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
226
+ def delete_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts = {})
227
+ if @api_client.config.debugging
228
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.delete_stock_receipt_item ...'
229
+ end
230
+ # verify the required parameter 'korona_account_id' is set
231
+ if @api_client.config.client_side_validation && korona_account_id.nil?
232
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.delete_stock_receipt_item"
233
+ end
234
+ # verify the required parameter 'stock_receipt_id' is set
235
+ if @api_client.config.client_side_validation && stock_receipt_id.nil?
236
+ fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.delete_stock_receipt_item"
237
+ end
238
+ # verify the required parameter 'product_id' is set
239
+ if @api_client.config.client_side_validation && product_id.nil?
240
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling StockReceiptsApi.delete_stock_receipt_item"
241
+ end
242
+ # resource path
243
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s).sub('{' + 'productId' + '}', product_id.to_s)
244
+
245
+ # query parameters
246
+ query_params = {}
247
+
248
+ # header parameters
249
+ header_params = {}
250
+ # HTTP header 'Accept' (if needed)
251
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
252
+ # HTTP header 'Content-Type'
253
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
254
+
255
+ # form parameters
256
+ form_params = {}
257
+
258
+ # http body (model)
259
+ post_body = nil
260
+ auth_names = ['basicAuth']
261
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
262
+ :header_params => header_params,
263
+ :query_params => query_params,
264
+ :form_params => form_params,
265
+ :body => post_body,
266
+ :auth_names => auth_names)
267
+ if @api_client.config.debugging
268
+ @api_client.config.logger.debug "API called: StockReceiptsApi#delete_stock_receipt_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
269
+ end
270
+ return data, status_code, headers
271
+ end
272
+ # returns the single stock-receipt
273
+ #
274
+ # @param korona_account_id account id of the KORONA.cloud account
275
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
276
+ # @param [Hash] opts the optional parameters
277
+ # @return [StockReceipt]
278
+ def get_stock_receipt(korona_account_id, stock_receipt_id, opts = {})
279
+ data, _status_code, _headers = get_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts)
280
+ data
281
+ end
282
+
283
+ # returns the single stock-receipt
284
+ #
285
+ # @param korona_account_id account id of the KORONA.cloud account
286
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [Array<(StockReceipt, Fixnum, Hash)>] StockReceipt data, response status code and response headers
289
+ def get_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, opts = {})
290
+ if @api_client.config.debugging
291
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.get_stock_receipt ...'
292
+ end
293
+ # verify the required parameter 'korona_account_id' is set
294
+ if @api_client.config.client_side_validation && korona_account_id.nil?
295
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.get_stock_receipt"
296
+ end
297
+ # verify the required parameter 'stock_receipt_id' is set
298
+ if @api_client.config.client_side_validation && stock_receipt_id.nil?
299
+ fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.get_stock_receipt"
300
+ end
301
+ # resource path
302
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s)
303
+
304
+ # query parameters
305
+ query_params = {}
306
+
307
+ # header parameters
308
+ header_params = {}
309
+ # HTTP header 'Accept' (if needed)
310
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
311
+ # HTTP header 'Content-Type'
312
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
313
+
314
+ # form parameters
315
+ form_params = {}
316
+
317
+ # http body (model)
318
+ post_body = nil
319
+ auth_names = ['basicAuth']
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 => 'StockReceipt')
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug "API called: StockReceiptsApi#get_stock_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
329
+ end
330
+ return data, status_code, headers
331
+ end
332
+ # returns the single stock-receipt item
333
+ #
334
+ # @param korona_account_id account id of the KORONA.cloud account
335
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
336
+ # @param product_id id of the related object (important: id should match the uuid-format)
337
+ # @param [Hash] opts the optional parameters
338
+ # @return [StockReceiptItem]
339
+ def get_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, opts = {})
340
+ data, _status_code, _headers = get_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts)
341
+ data
342
+ end
343
+
344
+ # returns the single stock-receipt item
345
+ #
346
+ # @param korona_account_id account id of the KORONA.cloud account
347
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
348
+ # @param product_id id of the related object (important: id should match the uuid-format)
349
+ # @param [Hash] opts the optional parameters
350
+ # @return [Array<(StockReceiptItem, Fixnum, Hash)>] StockReceiptItem data, response status code and response headers
351
+ def get_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, opts = {})
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.get_stock_receipt_item ...'
354
+ end
355
+ # verify the required parameter 'korona_account_id' is set
356
+ if @api_client.config.client_side_validation && korona_account_id.nil?
357
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.get_stock_receipt_item"
358
+ end
359
+ # verify the required parameter 'stock_receipt_id' is set
360
+ if @api_client.config.client_side_validation && stock_receipt_id.nil?
361
+ fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.get_stock_receipt_item"
362
+ end
363
+ # verify the required parameter 'product_id' is set
364
+ if @api_client.config.client_side_validation && product_id.nil?
365
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling StockReceiptsApi.get_stock_receipt_item"
366
+ end
367
+ # resource path
368
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s).sub('{' + 'productId' + '}', product_id.to_s)
369
+
370
+ # query parameters
371
+ query_params = {}
372
+
373
+ # header parameters
374
+ header_params = {}
375
+ # HTTP header 'Accept' (if needed)
376
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
377
+ # HTTP header 'Content-Type'
378
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
379
+
380
+ # form parameters
381
+ form_params = {}
382
+
383
+ # http body (model)
384
+ post_body = nil
385
+ auth_names = ['basicAuth']
386
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
387
+ :header_params => header_params,
388
+ :query_params => query_params,
389
+ :form_params => form_params,
390
+ :body => post_body,
391
+ :auth_names => auth_names,
392
+ :return_type => 'StockReceiptItem')
393
+ if @api_client.config.debugging
394
+ @api_client.config.logger.debug "API called: StockReceiptsApi#get_stock_receipt_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
395
+ end
396
+ return data, status_code, headers
397
+ end
398
+ # lists all stock-receipt items
399
+ #
400
+ # @param korona_account_id account id of the KORONA.cloud account
401
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
402
+ # @param [Hash] opts the optional parameters
403
+ # @option opts [Integer] :page number of the page to fetch
404
+ # @option opts [Integer] :size amount of objects to return per page
405
+ # @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5)
406
+ # @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned
407
+ # @return [ResultListStockReceiptItem]
408
+ def get_stock_receipt_items(korona_account_id, stock_receipt_id, opts = {})
409
+ data, _status_code, _headers = get_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, opts)
410
+ data
411
+ end
412
+
413
+ # lists all stock-receipt items
414
+ #
415
+ # @param korona_account_id account id of the KORONA.cloud account
416
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
417
+ # @param [Hash] opts the optional parameters
418
+ # @option opts [Integer] :page number of the page to fetch
419
+ # @option opts [Integer] :size amount of objects to return per page
420
+ # @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5)
421
+ # @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned
422
+ # @return [Array<(ResultListStockReceiptItem, Fixnum, Hash)>] ResultListStockReceiptItem data, response status code and response headers
423
+ def get_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, opts = {})
424
+ if @api_client.config.debugging
425
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.get_stock_receipt_items ...'
426
+ end
427
+ # verify the required parameter 'korona_account_id' is set
428
+ if @api_client.config.client_side_validation && korona_account_id.nil?
429
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.get_stock_receipt_items"
430
+ end
431
+ # verify the required parameter 'stock_receipt_id' is set
432
+ if @api_client.config.client_side_validation && stock_receipt_id.nil?
433
+ fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.get_stock_receipt_items"
434
+ end
435
+ # resource path
436
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s)
437
+
438
+ # query parameters
439
+ query_params = {}
440
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
441
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
442
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
443
+ query_params[:'revision'] = opts[:'revision'] if !opts[:'revision'].nil?
444
+
445
+ # header parameters
446
+ header_params = {}
447
+ # HTTP header 'Accept' (if needed)
448
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
449
+ # HTTP header 'Content-Type'
450
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
451
+
452
+ # form parameters
453
+ form_params = {}
454
+
455
+ # http body (model)
456
+ post_body = nil
457
+ auth_names = ['basicAuth']
458
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
459
+ :header_params => header_params,
460
+ :query_params => query_params,
461
+ :form_params => form_params,
462
+ :body => post_body,
463
+ :auth_names => auth_names,
464
+ :return_type => 'ResultListStockReceiptItem')
465
+ if @api_client.config.debugging
466
+ @api_client.config.logger.debug "API called: StockReceiptsApi#get_stock_receipt_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
467
+ end
468
+ return data, status_code, headers
469
+ end
470
+ # lists all stock-receipts
471
+ #
472
+ # @param korona_account_id account id of the KORONA.cloud account
473
+ # @param [Hash] opts the optional parameters
474
+ # @option opts [Integer] :page number of the page to fetch
475
+ # @option opts [Integer] :size amount of objects to return per page
476
+ # @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5)
477
+ # @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned
478
+ # @option opts [BOOLEAN] :include_deleted indicates deleted objects should be loaded or not (default: false)
479
+ # @option opts [DateTime] :min_create_time min (inclusive) create time of the receipt (ISO 8601; date, time and timezone)
480
+ # @option opts [DateTime] :max_create_time max (inclusive) create time of the receipt (ISO 8601; date, time and timezone)
481
+ # @option opts [DateTime] :min_booking_time min (inclusive) booking time of the receipt (ISO 8601; date, time and timezone)
482
+ # @option opts [DateTime] :max_booking_time max (inclusive) booking time of the receipt (ISO 8601; date, time and timezone)
483
+ # @option opts [String] :organizational_unit organizational unit
484
+ # @option opts [String] :source_organizational_unit source organizational unit
485
+ # @option opts [String] :booking_status booking status (possible values: BOOKED, IN_PROGRESS)
486
+ # @option opts [String] :number number of the related object
487
+ # @return [ResultListStockReceipt]
488
+ def get_stock_receipts(korona_account_id, opts = {})
489
+ data, _status_code, _headers = get_stock_receipts_with_http_info(korona_account_id, opts)
490
+ data
491
+ end
492
+
493
+ # lists all stock-receipts
494
+ #
495
+ # @param korona_account_id account id of the KORONA.cloud account
496
+ # @param [Hash] opts the optional parameters
497
+ # @option opts [Integer] :page number of the page to fetch
498
+ # @option opts [Integer] :size amount of objects to return per page
499
+ # @option opts [String] :sort attribute to sort by (multiple separated by comma; max. 5)
500
+ # @option opts [Integer] :revision last revision number, objects with a greater revision than this will be returned
501
+ # @option opts [BOOLEAN] :include_deleted indicates deleted objects should be loaded or not (default: false)
502
+ # @option opts [DateTime] :min_create_time min (inclusive) create time of the receipt (ISO 8601; date, time and timezone)
503
+ # @option opts [DateTime] :max_create_time max (inclusive) create time of the receipt (ISO 8601; date, time and timezone)
504
+ # @option opts [DateTime] :min_booking_time min (inclusive) booking time of the receipt (ISO 8601; date, time and timezone)
505
+ # @option opts [DateTime] :max_booking_time max (inclusive) booking time of the receipt (ISO 8601; date, time and timezone)
506
+ # @option opts [String] :organizational_unit organizational unit
507
+ # @option opts [String] :source_organizational_unit source organizational unit
508
+ # @option opts [String] :booking_status booking status (possible values: BOOKED, IN_PROGRESS)
509
+ # @option opts [String] :number number of the related object
510
+ # @return [Array<(ResultListStockReceipt, Fixnum, Hash)>] ResultListStockReceipt data, response status code and response headers
511
+ def get_stock_receipts_with_http_info(korona_account_id, opts = {})
512
+ if @api_client.config.debugging
513
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.get_stock_receipts ...'
514
+ end
515
+ # verify the required parameter 'korona_account_id' is set
516
+ if @api_client.config.client_side_validation && korona_account_id.nil?
517
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.get_stock_receipts"
518
+ end
519
+ if @api_client.config.client_side_validation && opts[:'booking_status'] && !['BOOKED', 'IN_PROGRESS'].include?(opts[:'booking_status'])
520
+ fail ArgumentError, 'invalid value for "booking_status", must be one of BOOKED, IN_PROGRESS'
521
+ end
522
+ # resource path
523
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s)
524
+
525
+ # query parameters
526
+ query_params = {}
527
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
528
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
529
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
530
+ query_params[:'revision'] = opts[:'revision'] if !opts[:'revision'].nil?
531
+ query_params[:'includeDeleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil?
532
+ query_params[:'minCreateTime'] = opts[:'min_create_time'] if !opts[:'min_create_time'].nil?
533
+ query_params[:'maxCreateTime'] = opts[:'max_create_time'] if !opts[:'max_create_time'].nil?
534
+ query_params[:'minBookingTime'] = opts[:'min_booking_time'] if !opts[:'min_booking_time'].nil?
535
+ query_params[:'maxBookingTime'] = opts[:'max_booking_time'] if !opts[:'max_booking_time'].nil?
536
+ query_params[:'organizationalUnit'] = opts[:'organizational_unit'] if !opts[:'organizational_unit'].nil?
537
+ query_params[:'sourceOrganizationalUnit'] = opts[:'source_organizational_unit'] if !opts[:'source_organizational_unit'].nil?
538
+ query_params[:'bookingStatus'] = opts[:'booking_status'] if !opts[:'booking_status'].nil?
539
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
540
+
541
+ # header parameters
542
+ header_params = {}
543
+ # HTTP header 'Accept' (if needed)
544
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
545
+ # HTTP header 'Content-Type'
546
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
547
+
548
+ # form parameters
549
+ form_params = {}
550
+
551
+ # http body (model)
552
+ post_body = nil
553
+ auth_names = ['basicAuth']
554
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
555
+ :header_params => header_params,
556
+ :query_params => query_params,
557
+ :form_params => form_params,
558
+ :body => post_body,
559
+ :auth_names => auth_names,
560
+ :return_type => 'ResultListStockReceipt')
561
+ if @api_client.config.debugging
562
+ @api_client.config.logger.debug "API called: StockReceiptsApi#get_stock_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
563
+ end
564
+ return data, status_code, headers
565
+ end
566
+ # updates the single stock-receipt
567
+ #
568
+ # @param korona_account_id account id of the KORONA.cloud account
569
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
570
+ # @param body data to update
571
+ # @param [Hash] opts the optional parameters
572
+ # @return [nil]
573
+ def update_stock_receipt(korona_account_id, stock_receipt_id, body, opts = {})
574
+ update_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, body, opts)
575
+ nil
576
+ end
577
+
578
+ # updates the single stock-receipt
579
+ #
580
+ # @param korona_account_id account id of the KORONA.cloud account
581
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
582
+ # @param body data to update
583
+ # @param [Hash] opts the optional parameters
584
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
585
+ def update_stock_receipt_with_http_info(korona_account_id, stock_receipt_id, body, opts = {})
586
+ if @api_client.config.debugging
587
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.update_stock_receipt ...'
588
+ end
589
+ # verify the required parameter 'korona_account_id' is set
590
+ if @api_client.config.client_side_validation && korona_account_id.nil?
591
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.update_stock_receipt"
592
+ end
593
+ # verify the required parameter 'stock_receipt_id' is set
594
+ if @api_client.config.client_side_validation && stock_receipt_id.nil?
595
+ fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.update_stock_receipt"
596
+ end
597
+ # verify the required parameter 'body' is set
598
+ if @api_client.config.client_side_validation && body.nil?
599
+ fail ArgumentError, "Missing the required parameter 'body' when calling StockReceiptsApi.update_stock_receipt"
600
+ end
601
+ # resource path
602
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s)
603
+
604
+ # query parameters
605
+ query_params = {}
606
+
607
+ # header parameters
608
+ header_params = {}
609
+ # HTTP header 'Accept' (if needed)
610
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
611
+ # HTTP header 'Content-Type'
612
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
613
+
614
+ # form parameters
615
+ form_params = {}
616
+
617
+ # http body (model)
618
+ post_body = @api_client.object_to_http_body(body)
619
+ auth_names = ['basicAuth']
620
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
621
+ :header_params => header_params,
622
+ :query_params => query_params,
623
+ :form_params => form_params,
624
+ :body => post_body,
625
+ :auth_names => auth_names)
626
+ if @api_client.config.debugging
627
+ @api_client.config.logger.debug "API called: StockReceiptsApi#update_stock_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
628
+ end
629
+ return data, status_code, headers
630
+ end
631
+ # updates the single stock-receipt item
632
+ #
633
+ # @param korona_account_id account id of the KORONA.cloud account
634
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
635
+ # @param product_id id of the related object (important: id should match the uuid-format)
636
+ # @param body data to update
637
+ # @param [Hash] opts the optional parameters
638
+ # @return [nil]
639
+ def update_stock_receipt_item(korona_account_id, stock_receipt_id, product_id, body, opts = {})
640
+ update_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, body, opts)
641
+ nil
642
+ end
643
+
644
+ # updates the single stock-receipt item
645
+ #
646
+ # @param korona_account_id account id of the KORONA.cloud account
647
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
648
+ # @param product_id id of the related object (important: id should match the uuid-format)
649
+ # @param body data to update
650
+ # @param [Hash] opts the optional parameters
651
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
652
+ def update_stock_receipt_item_with_http_info(korona_account_id, stock_receipt_id, product_id, body, opts = {})
653
+ if @api_client.config.debugging
654
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.update_stock_receipt_item ...'
655
+ end
656
+ # verify the required parameter 'korona_account_id' is set
657
+ if @api_client.config.client_side_validation && korona_account_id.nil?
658
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.update_stock_receipt_item"
659
+ end
660
+ # verify the required parameter 'stock_receipt_id' is set
661
+ if @api_client.config.client_side_validation && stock_receipt_id.nil?
662
+ fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.update_stock_receipt_item"
663
+ end
664
+ # verify the required parameter 'product_id' is set
665
+ if @api_client.config.client_side_validation && product_id.nil?
666
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling StockReceiptsApi.update_stock_receipt_item"
667
+ end
668
+ # verify the required parameter 'body' is set
669
+ if @api_client.config.client_side_validation && body.nil?
670
+ fail ArgumentError, "Missing the required parameter 'body' when calling StockReceiptsApi.update_stock_receipt_item"
671
+ end
672
+ # resource path
673
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items/{productId}'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s).sub('{' + 'productId' + '}', product_id.to_s)
674
+
675
+ # query parameters
676
+ query_params = {}
677
+
678
+ # header parameters
679
+ header_params = {}
680
+ # HTTP header 'Accept' (if needed)
681
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
682
+ # HTTP header 'Content-Type'
683
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
684
+
685
+ # form parameters
686
+ form_params = {}
687
+
688
+ # http body (model)
689
+ post_body = @api_client.object_to_http_body(body)
690
+ auth_names = ['basicAuth']
691
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
692
+ :header_params => header_params,
693
+ :query_params => query_params,
694
+ :form_params => form_params,
695
+ :body => post_body,
696
+ :auth_names => auth_names)
697
+ if @api_client.config.debugging
698
+ @api_client.config.logger.debug "API called: StockReceiptsApi#update_stock_receipt_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
699
+ end
700
+ return data, status_code, headers
701
+ end
702
+ # updates stock-receipt items
703
+ #
704
+ # @param korona_account_id account id of the KORONA.cloud account
705
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
706
+ # @param body data to update
707
+ # @param [Hash] opts the optional parameters
708
+ # @return [Array<AddOrUpdateResult>]
709
+ def update_stock_receipt_items(korona_account_id, stock_receipt_id, body, opts = {})
710
+ data, _status_code, _headers = update_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts)
711
+ data
712
+ end
713
+
714
+ # updates stock-receipt items
715
+ #
716
+ # @param korona_account_id account id of the KORONA.cloud account
717
+ # @param stock_receipt_id id of the related object (important: id should match the uuid-format)
718
+ # @param body data to update
719
+ # @param [Hash] opts the optional parameters
720
+ # @return [Array<(Array<AddOrUpdateResult>, Fixnum, Hash)>] Array<AddOrUpdateResult> data, response status code and response headers
721
+ def update_stock_receipt_items_with_http_info(korona_account_id, stock_receipt_id, body, opts = {})
722
+ if @api_client.config.debugging
723
+ @api_client.config.logger.debug 'Calling API: StockReceiptsApi.update_stock_receipt_items ...'
724
+ end
725
+ # verify the required parameter 'korona_account_id' is set
726
+ if @api_client.config.client_side_validation && korona_account_id.nil?
727
+ fail ArgumentError, "Missing the required parameter 'korona_account_id' when calling StockReceiptsApi.update_stock_receipt_items"
728
+ end
729
+ # verify the required parameter 'stock_receipt_id' is set
730
+ if @api_client.config.client_side_validation && stock_receipt_id.nil?
731
+ fail ArgumentError, "Missing the required parameter 'stock_receipt_id' when calling StockReceiptsApi.update_stock_receipt_items"
732
+ end
733
+ # verify the required parameter 'body' is set
734
+ if @api_client.config.client_side_validation && body.nil?
735
+ fail ArgumentError, "Missing the required parameter 'body' when calling StockReceiptsApi.update_stock_receipt_items"
736
+ end
737
+ # resource path
738
+ local_var_path = '/accounts/{koronaAccountId}/stockReceipts/{stockReceiptId}/items'.sub('{' + 'koronaAccountId' + '}', korona_account_id.to_s).sub('{' + 'stockReceiptId' + '}', stock_receipt_id.to_s)
739
+
740
+ # query parameters
741
+ query_params = {}
742
+
743
+ # header parameters
744
+ header_params = {}
745
+ # HTTP header 'Accept' (if needed)
746
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
747
+ # HTTP header 'Content-Type'
748
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
749
+
750
+ # form parameters
751
+ form_params = {}
752
+
753
+ # http body (model)
754
+ post_body = @api_client.object_to_http_body(body)
755
+ auth_names = ['basicAuth']
756
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
757
+ :header_params => header_params,
758
+ :query_params => query_params,
759
+ :form_params => form_params,
760
+ :body => post_body,
761
+ :auth_names => auth_names,
762
+ :return_type => 'Array<AddOrUpdateResult>')
763
+ if @api_client.config.debugging
764
+ @api_client.config.logger.debug "API called: StockReceiptsApi#update_stock_receipt_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
765
+ end
766
+ return data, status_code, headers
767
+ end
768
+ end
769
+ end