korona_client 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (478) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/Gemfile.lock +69 -0
  4. data/README.md +332 -0
  5. data/Rakefile +8 -0
  6. data/docs/Account.md +19 -0
  7. data/docs/AccountSummary.md +10 -0
  8. data/docs/AccountTransaction.md +11 -0
  9. data/docs/AccountsApi.md +131 -0
  10. data/docs/AddOrUpdateResult.md +13 -0
  11. data/docs/AddressInformation.md +14 -0
  12. data/docs/Admission.md +9 -0
  13. data/docs/Amount.md +12 -0
  14. data/docs/AmountCountData.md +9 -0
  15. data/docs/Assortment.md +15 -0
  16. data/docs/AssortmentsApi.md +254 -0
  17. data/docs/BadRequestError.md +9 -0
  18. data/docs/Capacity.md +9 -0
  19. data/docs/Cashier.md +20 -0
  20. data/docs/CashierSummary.md +13 -0
  21. data/docs/CashiersApi.md +131 -0
  22. data/docs/Category.md +9 -0
  23. data/docs/CloudSubscription.md +9 -0
  24. data/docs/CommodityGroup.md +13 -0
  25. data/docs/CommodityGroupSummary.md +11 -0
  26. data/docs/CompanyIdentification.md +9 -0
  27. data/docs/CurrenciesApi.md +131 -0
  28. data/docs/Currency.md +19 -0
  29. data/docs/CurrencyDenomination.md +9 -0
  30. data/docs/CurrencyExchangeRate.md +9 -0
  31. data/docs/Customer.md +26 -0
  32. data/docs/CustomerCard.md +9 -0
  33. data/docs/CustomerData.md +9 -0
  34. data/docs/CustomerGroup.md +13 -0
  35. data/docs/CustomerGroupSummary.md +11 -0
  36. data/docs/CustomerGroupsApi.md +131 -0
  37. data/docs/CustomerInformation.md +10 -0
  38. data/docs/CustomerOrder.md +26 -0
  39. data/docs/CustomerOrdersApi.md +368 -0
  40. data/docs/CustomersApi.md +360 -0
  41. data/docs/DayRating.md +17 -0
  42. data/docs/DeviceInformation.md +9 -0
  43. data/docs/EconomicZone.md +12 -0
  44. data/docs/EconomicZonesApi.md +131 -0
  45. data/docs/EndOfDayStatement.md +16 -0
  46. data/docs/EndOfDayStatementSummary.md +13 -0
  47. data/docs/EntryGate.md +14 -0
  48. data/docs/Event.md +17 -0
  49. data/docs/ForbiddenError.md +9 -0
  50. data/docs/GeoLocation.md +9 -0
  51. data/docs/ImagesApi.md +64 -0
  52. data/docs/InfoText.md +13 -0
  53. data/docs/InfoTextsApi.md +131 -0
  54. data/docs/Interval.md +9 -0
  55. data/docs/InventoriesKORONARetailApi.md +890 -0
  56. data/docs/Inventory.md +26 -0
  57. data/docs/InventoryList.md +22 -0
  58. data/docs/InventoryListItem.md +13 -0
  59. data/docs/InventoryListItemStock.md +9 -0
  60. data/docs/KoronaAccount.md +16 -0
  61. data/docs/KoronaAccountApi.md +62 -0
  62. data/docs/MethodNotAllowedError.md +9 -0
  63. data/docs/ModelReference.md +10 -0
  64. data/docs/NotFoundError.md +9 -0
  65. data/docs/OrganizationalUnit.md +17 -0
  66. data/docs/OrganizationalUnitsApi.md +724 -0
  67. data/docs/Payment.md +12 -0
  68. data/docs/PaymentMethod.md +17 -0
  69. data/docs/PaymentMethodsApi.md +131 -0
  70. data/docs/PaymentSummary.md +10 -0
  71. data/docs/Period.md +10 -0
  72. data/docs/PeriodListTopSeller.md +10 -0
  73. data/docs/PeriodMapStringRevenueData.md +10 -0
  74. data/docs/PeriodObject.md +10 -0
  75. data/docs/PeriodRevenueData.md +10 -0
  76. data/docs/PointsOfSaleApi.md +537 -0
  77. data/docs/Pos.md +25 -0
  78. data/docs/PriceGroup.md +14 -0
  79. data/docs/PriceGroupsApi.md +131 -0
  80. data/docs/Product.md +49 -0
  81. data/docs/ProductCode.md +9 -0
  82. data/docs/ProductDescription.md +9 -0
  83. data/docs/ProductPrice.md +12 -0
  84. data/docs/ProductStock.md +12 -0
  85. data/docs/ProductSubproduct.md +10 -0
  86. data/docs/ProductSupplierPrice.md +12 -0
  87. data/docs/ProductTransferInvolvedPartyInformation.md +13 -0
  88. data/docs/ProductTransferInvolvedPartyInformationData.md +10 -0
  89. data/docs/ProductsApi.md +435 -0
  90. data/docs/Rating.md +10 -0
  91. data/docs/Receipt.md +28 -0
  92. data/docs/ReceiptItem.md +16 -0
  93. data/docs/ReceiptsApi.md +139 -0
  94. data/docs/ResultList.md +13 -0
  95. data/docs/ResultListAccount.md +13 -0
  96. data/docs/ResultListAssortment.md +13 -0
  97. data/docs/ResultListCashier.md +13 -0
  98. data/docs/ResultListCommodityGroup.md +13 -0
  99. data/docs/ResultListCurrency.md +13 -0
  100. data/docs/ResultListCustomer.md +13 -0
  101. data/docs/ResultListCustomerGroup.md +13 -0
  102. data/docs/ResultListCustomerOrder.md +13 -0
  103. data/docs/ResultListDayRating.md +13 -0
  104. data/docs/ResultListEconomicZone.md +13 -0
  105. data/docs/ResultListEndOfDayStatement.md +13 -0
  106. data/docs/ResultListEntryGate.md +13 -0
  107. data/docs/ResultListEvent.md +13 -0
  108. data/docs/ResultListInfoText.md +13 -0
  109. data/docs/ResultListInventory.md +13 -0
  110. data/docs/ResultListInventoryList.md +13 -0
  111. data/docs/ResultListInventoryListItem.md +13 -0
  112. data/docs/ResultListOrganizationalUnit.md +13 -0
  113. data/docs/ResultListPaymentMethod.md +13 -0
  114. data/docs/ResultListPos.md +13 -0
  115. data/docs/ResultListPriceGroup.md +13 -0
  116. data/docs/ResultListProduct.md +13 -0
  117. data/docs/ResultListProductStock.md +13 -0
  118. data/docs/ResultListReceipt.md +13 -0
  119. data/docs/ResultListSalesTax.md +13 -0
  120. data/docs/ResultListSector.md +13 -0
  121. data/docs/ResultListStockReceipt.md +13 -0
  122. data/docs/ResultListStockReceiptItem.md +13 -0
  123. data/docs/ResultListSupplier.md +13 -0
  124. data/docs/ResultListTag.md +13 -0
  125. data/docs/ResultListTicketDefinition.md +13 -0
  126. data/docs/RevenueData.md +12 -0
  127. data/docs/SalesTax.md +15 -0
  128. data/docs/SalesTaxRate.md +9 -0
  129. data/docs/SalesTaxesApi.md +131 -0
  130. data/docs/Sector.md +13 -0
  131. data/docs/SectorSalesTaxItem.md +9 -0
  132. data/docs/SectorsApi.md +131 -0
  133. data/docs/Statistic.md +10 -0
  134. data/docs/StatisticListTopSeller.md +10 -0
  135. data/docs/StatisticMapStringRevenueData.md +10 -0
  136. data/docs/StatisticRevenueData.md +10 -0
  137. data/docs/StatisticsApi.md +250 -0
  138. data/docs/StockReceipt.md +28 -0
  139. data/docs/StockReceiptItem.md +14 -0
  140. data/docs/StockReceiptItemAmount.md +9 -0
  141. data/docs/StockReceiptItemIdentification.md +10 -0
  142. data/docs/StockReceiptItemPurchasePrice.md +9 -0
  143. data/docs/StockReceiptsKORONARetailApi.md +629 -0
  144. data/docs/Supplier.md +19 -0
  145. data/docs/SupplierContact.md +11 -0
  146. data/docs/SupplierContactPerson.md +14 -0
  147. data/docs/SupplierPaymentInformation.md +16 -0
  148. data/docs/SuppliersApi.md +131 -0
  149. data/docs/Tag.md +12 -0
  150. data/docs/TagsApi.md +131 -0
  151. data/docs/TaxPayment.md +11 -0
  152. data/docs/TaxSummary.md +10 -0
  153. data/docs/TicketDefinition.md +19 -0
  154. data/docs/TicketingApi.md +377 -0
  155. data/docs/TimePeriod.md +14 -0
  156. data/docs/TooManyRequestsError.md +9 -0
  157. data/docs/TopSeller.md +12 -0
  158. data/docs/TotalPrice.md +12 -0
  159. data/docs/Weather.md +10 -0
  160. data/git_push.sh +55 -0
  161. data/korona_client.gemspec +46 -0
  162. data/lib/korona_client.rb +193 -0
  163. data/lib/korona_client/api/accounts_api.rb +154 -0
  164. data/lib/korona_client/api/assortments_api.rb +285 -0
  165. data/lib/korona_client/api/cashiers_api.rb +154 -0
  166. data/lib/korona_client/api/currencies_api.rb +154 -0
  167. data/lib/korona_client/api/customer_groups_api.rb +154 -0
  168. data/lib/korona_client/api/customer_orders_api.rb +414 -0
  169. data/lib/korona_client/api/customers_api.rb +402 -0
  170. data/lib/korona_client/api/economic_zones_api.rb +154 -0
  171. data/lib/korona_client/api/images_api.rb +81 -0
  172. data/lib/korona_client/api/info_texts_api.rb +154 -0
  173. data/lib/korona_client/api/inventories_korona_retail_api.rb +1022 -0
  174. data/lib/korona_client/api/korona_account_api.rb +78 -0
  175. data/lib/korona_client/api/organizational_units_api.rb +827 -0
  176. data/lib/korona_client/api/payment_methods_api.rb +154 -0
  177. data/lib/korona_client/api/points_of_sale_api.rb +604 -0
  178. data/lib/korona_client/api/price_groups_api.rb +154 -0
  179. data/lib/korona_client/api/products_api.rb +487 -0
  180. data/lib/korona_client/api/receipts_api.rb +166 -0
  181. data/lib/korona_client/api/sales_taxes_api.rb +154 -0
  182. data/lib/korona_client/api/sectors_api.rb +154 -0
  183. data/lib/korona_client/api/statistics_api.rb +282 -0
  184. data/lib/korona_client/api/stock_receipts_korona_retail_api.rb +717 -0
  185. data/lib/korona_client/api/suppliers_api.rb +154 -0
  186. data/lib/korona_client/api/tags_api.rb +154 -0
  187. data/lib/korona_client/api/ticketing_api.rb +416 -0
  188. data/lib/korona_client/api_client.rb +389 -0
  189. data/lib/korona_client/api_error.rb +38 -0
  190. data/lib/korona_client/configuration.rb +209 -0
  191. data/lib/korona_client/models/account.rb +324 -0
  192. data/lib/korona_client/models/account_summary.rb +206 -0
  193. data/lib/korona_client/models/account_transaction.rb +215 -0
  194. data/lib/korona_client/models/add_or_update_result.rb +278 -0
  195. data/lib/korona_client/models/address_information.rb +242 -0
  196. data/lib/korona_client/models/admission.rb +197 -0
  197. data/lib/korona_client/models/amount.rb +224 -0
  198. data/lib/korona_client/models/amount_count_data.rb +197 -0
  199. data/lib/korona_client/models/assortment.rb +255 -0
  200. data/lib/korona_client/models/bad_request_error.rb +232 -0
  201. data/lib/korona_client/models/capacity.rb +197 -0
  202. data/lib/korona_client/models/cashier.rb +337 -0
  203. data/lib/korona_client/models/cashier_summary.rb +233 -0
  204. data/lib/korona_client/models/category.rb +197 -0
  205. data/lib/korona_client/models/cloud_subscription.rb +230 -0
  206. data/lib/korona_client/models/commodity_group.rb +237 -0
  207. data/lib/korona_client/models/commodity_group_summary.rb +215 -0
  208. data/lib/korona_client/models/company_identification.rb +197 -0
  209. data/lib/korona_client/models/currency.rb +295 -0
  210. data/lib/korona_client/models/currency_denomination.rb +230 -0
  211. data/lib/korona_client/models/currency_exchange_rate.rb +197 -0
  212. data/lib/korona_client/models/customer.rb +391 -0
  213. data/lib/korona_client/models/customer_card.rb +230 -0
  214. data/lib/korona_client/models/customer_data.rb +197 -0
  215. data/lib/korona_client/models/customer_group.rb +237 -0
  216. data/lib/korona_client/models/customer_group_summary.rb +215 -0
  217. data/lib/korona_client/models/customer_information.rb +206 -0
  218. data/lib/korona_client/models/customer_order.rb +356 -0
  219. data/lib/korona_client/models/day_rating.rb +269 -0
  220. data/lib/korona_client/models/device_information.rb +197 -0
  221. data/lib/korona_client/models/economic_zone.rb +228 -0
  222. data/lib/korona_client/models/end_of_day_statement.rb +264 -0
  223. data/lib/korona_client/models/end_of_day_statement_summary.rb +245 -0
  224. data/lib/korona_client/models/entry_gate.rb +246 -0
  225. data/lib/korona_client/models/event.rb +275 -0
  226. data/lib/korona_client/models/forbidden_error.rb +232 -0
  227. data/lib/korona_client/models/geo_location.rb +197 -0
  228. data/lib/korona_client/models/info_text.rb +270 -0
  229. data/lib/korona_client/models/interval.rb +197 -0
  230. data/lib/korona_client/models/inventory.rb +408 -0
  231. data/lib/korona_client/models/inventory_list.rb +351 -0
  232. data/lib/korona_client/models/inventory_list_item.rb +233 -0
  233. data/lib/korona_client/models/inventory_list_item_stock.rb +197 -0
  234. data/lib/korona_client/models/korona_account.rb +264 -0
  235. data/lib/korona_client/models/method_not_allowed_error.rb +232 -0
  236. data/lib/korona_client/models/model_reference.rb +209 -0
  237. data/lib/korona_client/models/not_found_error.rb +232 -0
  238. data/lib/korona_client/models/organizational_unit.rb +278 -0
  239. data/lib/korona_client/models/payment.rb +224 -0
  240. data/lib/korona_client/models/payment_method.rb +273 -0
  241. data/lib/korona_client/models/payment_summary.rb +206 -0
  242. data/lib/korona_client/models/period.rb +206 -0
  243. data/lib/korona_client/models/period_list_top_seller.rb +208 -0
  244. data/lib/korona_client/models/period_map_string_revenue_data.rb +208 -0
  245. data/lib/korona_client/models/period_object.rb +206 -0
  246. data/lib/korona_client/models/period_revenue_data.rb +206 -0
  247. data/lib/korona_client/models/pos.rb +351 -0
  248. data/lib/korona_client/models/price_group.rb +246 -0
  249. data/lib/korona_client/models/product.rb +620 -0
  250. data/lib/korona_client/models/product_code.rb +197 -0
  251. data/lib/korona_client/models/product_description.rb +230 -0
  252. data/lib/korona_client/models/product_price.rb +224 -0
  253. data/lib/korona_client/models/product_stock.rb +224 -0
  254. data/lib/korona_client/models/product_subproduct.rb +208 -0
  255. data/lib/korona_client/models/product_supplier_price.rb +224 -0
  256. data/lib/korona_client/models/product_transfer_involved_party_information.rb +233 -0
  257. data/lib/korona_client/models/product_transfer_involved_party_information_data.rb +206 -0
  258. data/lib/korona_client/models/rating.rb +206 -0
  259. data/lib/korona_client/models/receipt.rb +378 -0
  260. data/lib/korona_client/models/receipt_item.rb +262 -0
  261. data/lib/korona_client/models/result_list.rb +273 -0
  262. data/lib/korona_client/models/result_list_account.rb +273 -0
  263. data/lib/korona_client/models/result_list_assortment.rb +273 -0
  264. data/lib/korona_client/models/result_list_cashier.rb +273 -0
  265. data/lib/korona_client/models/result_list_commodity_group.rb +273 -0
  266. data/lib/korona_client/models/result_list_currency.rb +273 -0
  267. data/lib/korona_client/models/result_list_customer.rb +273 -0
  268. data/lib/korona_client/models/result_list_customer_group.rb +273 -0
  269. data/lib/korona_client/models/result_list_customer_order.rb +273 -0
  270. data/lib/korona_client/models/result_list_day_rating.rb +273 -0
  271. data/lib/korona_client/models/result_list_economic_zone.rb +273 -0
  272. data/lib/korona_client/models/result_list_end_of_day_statement.rb +273 -0
  273. data/lib/korona_client/models/result_list_entry_gate.rb +273 -0
  274. data/lib/korona_client/models/result_list_event.rb +273 -0
  275. data/lib/korona_client/models/result_list_info_text.rb +273 -0
  276. data/lib/korona_client/models/result_list_inventory.rb +273 -0
  277. data/lib/korona_client/models/result_list_inventory_list.rb +273 -0
  278. data/lib/korona_client/models/result_list_inventory_list_item.rb +273 -0
  279. data/lib/korona_client/models/result_list_organizational_unit.rb +273 -0
  280. data/lib/korona_client/models/result_list_payment_method.rb +273 -0
  281. data/lib/korona_client/models/result_list_pos.rb +273 -0
  282. data/lib/korona_client/models/result_list_price_group.rb +273 -0
  283. data/lib/korona_client/models/result_list_product.rb +273 -0
  284. data/lib/korona_client/models/result_list_product_stock.rb +273 -0
  285. data/lib/korona_client/models/result_list_receipt.rb +273 -0
  286. data/lib/korona_client/models/result_list_sales_tax.rb +273 -0
  287. data/lib/korona_client/models/result_list_sector.rb +273 -0
  288. data/lib/korona_client/models/result_list_stock_receipt.rb +273 -0
  289. data/lib/korona_client/models/result_list_stock_receipt_item.rb +273 -0
  290. data/lib/korona_client/models/result_list_supplier.rb +273 -0
  291. data/lib/korona_client/models/result_list_tag.rb +273 -0
  292. data/lib/korona_client/models/result_list_ticket_definition.rb +273 -0
  293. data/lib/korona_client/models/revenue_data.rb +224 -0
  294. data/lib/korona_client/models/sales_tax.rb +257 -0
  295. data/lib/korona_client/models/sales_tax_rate.rb +197 -0
  296. data/lib/korona_client/models/sector.rb +239 -0
  297. data/lib/korona_client/models/sector_sales_tax_item.rb +197 -0
  298. data/lib/korona_client/models/statistic.rb +206 -0
  299. data/lib/korona_client/models/statistic_list_top_seller.rb +206 -0
  300. data/lib/korona_client/models/statistic_map_string_revenue_data.rb +206 -0
  301. data/lib/korona_client/models/statistic_revenue_data.rb +206 -0
  302. data/lib/korona_client/models/stock_receipt.rb +405 -0
  303. data/lib/korona_client/models/stock_receipt_item.rb +242 -0
  304. data/lib/korona_client/models/stock_receipt_item_amount.rb +197 -0
  305. data/lib/korona_client/models/stock_receipt_item_identification.rb +206 -0
  306. data/lib/korona_client/models/stock_receipt_item_purchase_price.rb +197 -0
  307. data/lib/korona_client/models/supplier.rb +291 -0
  308. data/lib/korona_client/models/supplier_contact.rb +215 -0
  309. data/lib/korona_client/models/supplier_contact_person.rb +242 -0
  310. data/lib/korona_client/models/supplier_payment_information.rb +293 -0
  311. data/lib/korona_client/models/tag.rb +228 -0
  312. data/lib/korona_client/models/tax_payment.rb +215 -0
  313. data/lib/korona_client/models/tax_summary.rb +206 -0
  314. data/lib/korona_client/models/ticket_definition.rb +293 -0
  315. data/lib/korona_client/models/time_period.rb +242 -0
  316. data/lib/korona_client/models/too_many_requests_error.rb +232 -0
  317. data/lib/korona_client/models/top_seller.rb +227 -0
  318. data/lib/korona_client/models/total_price.rb +241 -0
  319. data/lib/korona_client/models/weather.rb +239 -0
  320. data/lib/korona_client/version.rb +15 -0
  321. data/spec/api/accounts_api_spec.rb +65 -0
  322. data/spec/api/assortments_api_spec.rb +95 -0
  323. data/spec/api/cashiers_api_spec.rb +65 -0
  324. data/spec/api/currencies_api_spec.rb +65 -0
  325. data/spec/api/customer_groups_api_spec.rb +65 -0
  326. data/spec/api/customer_orders_api_spec.rb +122 -0
  327. data/spec/api/customers_api_spec.rb +118 -0
  328. data/spec/api/economic_zones_api_spec.rb +65 -0
  329. data/spec/api/images_api_spec.rb +48 -0
  330. data/spec/api/info_texts_api_spec.rb +65 -0
  331. data/spec/api/inventories_korona_retail_api_spec.rb +251 -0
  332. data/spec/api/korona_account_api_spec.rb +47 -0
  333. data/spec/api/organizational_units_api_spec.rb +216 -0
  334. data/spec/api/payment_methods_api_spec.rb +65 -0
  335. data/spec/api/points_of_sale_api_spec.rb +166 -0
  336. data/spec/api/price_groups_api_spec.rb +65 -0
  337. data/spec/api/products_api_spec.rb +139 -0
  338. data/spec/api/receipts_api_spec.rb +69 -0
  339. data/spec/api/sales_taxes_api_spec.rb +65 -0
  340. data/spec/api/sectors_api_spec.rb +65 -0
  341. data/spec/api/statistics_api_spec.rb +92 -0
  342. data/spec/api/stock_receipts_korona_retail_api_spec.rb +187 -0
  343. data/spec/api/suppliers_api_spec.rb +65 -0
  344. data/spec/api/tags_api_spec.rb +65 -0
  345. data/spec/api/ticketing_api_spec.rb +125 -0
  346. data/spec/api_client_spec.rb +226 -0
  347. data/spec/configuration_spec.rb +42 -0
  348. data/spec/models/account_spec.rb +112 -0
  349. data/spec/models/account_summary_spec.rb +54 -0
  350. data/spec/models/account_transaction_spec.rb +60 -0
  351. data/spec/models/add_or_update_result_spec.rb +80 -0
  352. data/spec/models/address_information_spec.rb +78 -0
  353. data/spec/models/admission_spec.rb +48 -0
  354. data/spec/models/amount_count_data_spec.rb +48 -0
  355. data/spec/models/amount_spec.rb +66 -0
  356. data/spec/models/assortment_spec.rb +84 -0
  357. data/spec/models/bad_request_error_spec.rb +52 -0
  358. data/spec/models/capacity_spec.rb +48 -0
  359. data/spec/models/cashier_spec.rb +122 -0
  360. data/spec/models/cashier_summary_spec.rb +72 -0
  361. data/spec/models/category_spec.rb +48 -0
  362. data/spec/models/cloud_subscription_spec.rb +52 -0
  363. data/spec/models/commodity_group_spec.rb +72 -0
  364. data/spec/models/commodity_group_summary_spec.rb +60 -0
  365. data/spec/models/company_identification_spec.rb +48 -0
  366. data/spec/models/currency_denomination_spec.rb +52 -0
  367. data/spec/models/currency_exchange_rate_spec.rb +48 -0
  368. data/spec/models/currency_spec.rb +108 -0
  369. data/spec/models/customer_card_spec.rb +52 -0
  370. data/spec/models/customer_data_spec.rb +48 -0
  371. data/spec/models/customer_group_spec.rb +72 -0
  372. data/spec/models/customer_group_summary_spec.rb +60 -0
  373. data/spec/models/customer_information_spec.rb +54 -0
  374. data/spec/models/customer_order_spec.rb +150 -0
  375. data/spec/models/customer_spec.rb +154 -0
  376. data/spec/models/day_rating_spec.rb +96 -0
  377. data/spec/models/device_information_spec.rb +48 -0
  378. data/spec/models/economic_zone_spec.rb +66 -0
  379. data/spec/models/end_of_day_statement_spec.rb +90 -0
  380. data/spec/models/end_of_day_statement_summary_spec.rb +72 -0
  381. data/spec/models/entry_gate_spec.rb +78 -0
  382. data/spec/models/event_spec.rb +96 -0
  383. data/spec/models/forbidden_error_spec.rb +52 -0
  384. data/spec/models/geo_location_spec.rb +48 -0
  385. data/spec/models/info_text_spec.rb +76 -0
  386. data/spec/models/interval_spec.rb +48 -0
  387. data/spec/models/inventory_list_item_spec.rb +72 -0
  388. data/spec/models/inventory_list_item_stock_spec.rb +48 -0
  389. data/spec/models/inventory_list_spec.rb +130 -0
  390. data/spec/models/inventory_spec.rb +162 -0
  391. data/spec/models/korona_account_spec.rb +90 -0
  392. data/spec/models/method_not_allowed_error_spec.rb +52 -0
  393. data/spec/models/model_reference_spec.rb +54 -0
  394. data/spec/models/not_found_error_spec.rb +52 -0
  395. data/spec/models/organizational_unit_spec.rb +96 -0
  396. data/spec/models/payment_method_spec.rb +96 -0
  397. data/spec/models/payment_spec.rb +66 -0
  398. data/spec/models/payment_summary_spec.rb +54 -0
  399. data/spec/models/period_list_top_seller_spec.rb +54 -0
  400. data/spec/models/period_map_string_revenue_data_spec.rb +54 -0
  401. data/spec/models/period_object_spec.rb +54 -0
  402. data/spec/models/period_revenue_data_spec.rb +54 -0
  403. data/spec/models/period_spec.rb +54 -0
  404. data/spec/models/pos_spec.rb +144 -0
  405. data/spec/models/price_group_spec.rb +78 -0
  406. data/spec/models/product_code_spec.rb +48 -0
  407. data/spec/models/product_description_spec.rb +52 -0
  408. data/spec/models/product_price_spec.rb +66 -0
  409. data/spec/models/product_spec.rb +296 -0
  410. data/spec/models/product_stock_spec.rb +66 -0
  411. data/spec/models/product_subproduct_spec.rb +54 -0
  412. data/spec/models/product_supplier_price_spec.rb +66 -0
  413. data/spec/models/product_transfer_involved_party_information_data_spec.rb +54 -0
  414. data/spec/models/product_transfer_involved_party_information_spec.rb +72 -0
  415. data/spec/models/rating_spec.rb +54 -0
  416. data/spec/models/receipt_item_spec.rb +90 -0
  417. data/spec/models/receipt_spec.rb +162 -0
  418. data/spec/models/result_list_account_spec.rb +72 -0
  419. data/spec/models/result_list_assortment_spec.rb +72 -0
  420. data/spec/models/result_list_cashier_spec.rb +72 -0
  421. data/spec/models/result_list_commodity_group_spec.rb +72 -0
  422. data/spec/models/result_list_currency_spec.rb +72 -0
  423. data/spec/models/result_list_customer_group_spec.rb +72 -0
  424. data/spec/models/result_list_customer_order_spec.rb +72 -0
  425. data/spec/models/result_list_customer_spec.rb +72 -0
  426. data/spec/models/result_list_day_rating_spec.rb +72 -0
  427. data/spec/models/result_list_economic_zone_spec.rb +72 -0
  428. data/spec/models/result_list_end_of_day_statement_spec.rb +72 -0
  429. data/spec/models/result_list_entry_gate_spec.rb +72 -0
  430. data/spec/models/result_list_event_spec.rb +72 -0
  431. data/spec/models/result_list_info_text_spec.rb +72 -0
  432. data/spec/models/result_list_inventory_list_item_spec.rb +72 -0
  433. data/spec/models/result_list_inventory_list_spec.rb +72 -0
  434. data/spec/models/result_list_inventory_spec.rb +72 -0
  435. data/spec/models/result_list_organizational_unit_spec.rb +72 -0
  436. data/spec/models/result_list_payment_method_spec.rb +72 -0
  437. data/spec/models/result_list_pos_spec.rb +72 -0
  438. data/spec/models/result_list_price_group_spec.rb +72 -0
  439. data/spec/models/result_list_product_spec.rb +72 -0
  440. data/spec/models/result_list_product_stock_spec.rb +72 -0
  441. data/spec/models/result_list_receipt_spec.rb +72 -0
  442. data/spec/models/result_list_sales_tax_spec.rb +72 -0
  443. data/spec/models/result_list_sector_spec.rb +72 -0
  444. data/spec/models/result_list_spec.rb +72 -0
  445. data/spec/models/result_list_stock_receipt_item_spec.rb +72 -0
  446. data/spec/models/result_list_stock_receipt_spec.rb +72 -0
  447. data/spec/models/result_list_supplier_spec.rb +72 -0
  448. data/spec/models/result_list_tag_spec.rb +72 -0
  449. data/spec/models/result_list_ticket_definition_spec.rb +72 -0
  450. data/spec/models/revenue_data_spec.rb +66 -0
  451. data/spec/models/sales_tax_rate_spec.rb +48 -0
  452. data/spec/models/sales_tax_spec.rb +84 -0
  453. data/spec/models/sector_sales_tax_item_spec.rb +48 -0
  454. data/spec/models/sector_spec.rb +72 -0
  455. data/spec/models/statistic_list_top_seller_spec.rb +54 -0
  456. data/spec/models/statistic_map_string_revenue_data_spec.rb +54 -0
  457. data/spec/models/statistic_revenue_data_spec.rb +54 -0
  458. data/spec/models/statistic_spec.rb +54 -0
  459. data/spec/models/stock_receipt_item_amount_spec.rb +48 -0
  460. data/spec/models/stock_receipt_item_identification_spec.rb +54 -0
  461. data/spec/models/stock_receipt_item_purchase_price_spec.rb +48 -0
  462. data/spec/models/stock_receipt_item_spec.rb +78 -0
  463. data/spec/models/stock_receipt_spec.rb +166 -0
  464. data/spec/models/supplier_contact_person_spec.rb +78 -0
  465. data/spec/models/supplier_contact_spec.rb +60 -0
  466. data/spec/models/supplier_payment_information_spec.rb +94 -0
  467. data/spec/models/supplier_spec.rb +108 -0
  468. data/spec/models/tag_spec.rb +66 -0
  469. data/spec/models/tax_payment_spec.rb +60 -0
  470. data/spec/models/tax_summary_spec.rb +54 -0
  471. data/spec/models/ticket_definition_spec.rb +108 -0
  472. data/spec/models/time_period_spec.rb +78 -0
  473. data/spec/models/too_many_requests_error_spec.rb +52 -0
  474. data/spec/models/top_seller_spec.rb +66 -0
  475. data/spec/models/total_price_spec.rb +66 -0
  476. data/spec/models/weather_spec.rb +58 -0
  477. data/spec/spec_helper.rb +111 -0
  478. metadata +856 -0
@@ -0,0 +1,246 @@
1
+ =begin
2
+ #KORONA.cloud API v3
3
+
4
+ #Our api provides access to our cloud services
5
+
6
+ OpenAPI spec version: 3
7
+ Contact: support@combase.net
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module KoronaClient
16
+
17
+ class PriceGroup
18
+ # indicates whether the object is active for use or not
19
+ attr_accessor :active
20
+
21
+ # global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
22
+ attr_accessor :id
23
+
24
+ # number of the object, like it is set in backoffice; will be removed when active=false
25
+ attr_accessor :number
26
+
27
+ # the revision number of the object. revision numbers are unique per object-type. there is is no object of the same type with identical revision numbers.
28
+ attr_accessor :revision
29
+
30
+ attr_accessor :currency
31
+
32
+ attr_accessor :name
33
+
34
+ attr_accessor :net_prices
35
+
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'active' => :'active',
41
+ :'id' => :'id',
42
+ :'number' => :'number',
43
+ :'revision' => :'revision',
44
+ :'currency' => :'currency',
45
+ :'name' => :'name',
46
+ :'net_prices' => :'netPrices'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.swagger_types
52
+ {
53
+ :'active' => :'BOOLEAN',
54
+ :'id' => :'String',
55
+ :'number' => :'String',
56
+ :'revision' => :'Integer',
57
+ :'currency' => :'ModelReference',
58
+ :'name' => :'String',
59
+ :'net_prices' => :'BOOLEAN'
60
+ }
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ return unless attributes.is_a?(Hash)
67
+
68
+ # convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
70
+
71
+ if attributes.has_key?(:'active')
72
+ self.active = attributes[:'active']
73
+ end
74
+
75
+ if attributes.has_key?(:'id')
76
+ self.id = attributes[:'id']
77
+ end
78
+
79
+ if attributes.has_key?(:'number')
80
+ self.number = attributes[:'number']
81
+ end
82
+
83
+ if attributes.has_key?(:'revision')
84
+ self.revision = attributes[:'revision']
85
+ end
86
+
87
+ if attributes.has_key?(:'currency')
88
+ self.currency = attributes[:'currency']
89
+ end
90
+
91
+ if attributes.has_key?(:'name')
92
+ self.name = attributes[:'name']
93
+ end
94
+
95
+ if attributes.has_key?(:'netPrices')
96
+ self.net_prices = attributes[:'netPrices']
97
+ end
98
+
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ invalid_properties = Array.new
105
+ return invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ return true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ active == o.active &&
120
+ id == o.id &&
121
+ number == o.number &&
122
+ revision == o.revision &&
123
+ currency == o.currency &&
124
+ name == o.name &&
125
+ net_prices == o.net_prices
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Fixnum] Hash code
136
+ def hash
137
+ [active, id, number, revision, currency, name, net_prices].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ self.class.swagger_types.each_pair do |key, type|
146
+ if type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Deserializes the data based on type
161
+ # @param string type Data type
162
+ # @param string value Value to be deserialized
163
+ # @return [Object] Deserialized data
164
+ def _deserialize(type, value)
165
+ case type.to_sym
166
+ when :DateTime
167
+ DateTime.parse(value)
168
+ when :Date
169
+ Date.parse(value)
170
+ when :String
171
+ value.to_s
172
+ when :Integer
173
+ value.to_i
174
+ when :Float
175
+ value.to_f
176
+ when :BOOLEAN
177
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
+ true
179
+ else
180
+ false
181
+ end
182
+ when :Object
183
+ # generic object (usually a Hash), return directly
184
+ value
185
+ when /\AArray<(?<inner_type>.+)>\z/
186
+ inner_type = Regexp.last_match[:inner_type]
187
+ value.map { |v| _deserialize(inner_type, v) }
188
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
+ k_type = Regexp.last_match[:k_type]
190
+ v_type = Regexp.last_match[:v_type]
191
+ {}.tap do |hash|
192
+ value.each do |k, v|
193
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
+ end
195
+ end
196
+ else # model
197
+ temp_model = KoronaClient.const_get(type).new
198
+ temp_model.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ next if value.nil?
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map{ |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+
246
+ end
@@ -0,0 +1,620 @@
1
+ =begin
2
+ #KORONA.cloud API v3
3
+
4
+ #Our api provides access to our cloud services
5
+
6
+ OpenAPI spec version: 3
7
+ Contact: support@combase.net
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module KoronaClient
16
+
17
+ class Product
18
+ # indicates whether the object is active for use or not
19
+ attr_accessor :active
20
+
21
+ # global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
22
+ attr_accessor :id
23
+
24
+ # number of the object, like it is set in backoffice; will be removed when active=false
25
+ attr_accessor :number
26
+
27
+ # the revision number of the object. revision numbers are unique per object-type. there is is no object of the same type with identical revision numbers.
28
+ attr_accessor :revision
29
+
30
+ attr_accessor :alternative_sector
31
+
32
+ attr_accessor :assortment
33
+
34
+ attr_accessor :codes
35
+
36
+ attr_accessor :commodity_group
37
+
38
+ attr_accessor :conversion
39
+
40
+ attr_accessor :costs
41
+
42
+ attr_accessor :deactivated
43
+
44
+ attr_accessor :deposit
45
+
46
+ attr_accessor :descriptions
47
+
48
+ attr_accessor :discountable
49
+
50
+ attr_accessor :image
51
+
52
+ attr_accessor :info_texts
53
+
54
+ attr_accessor :item_sequence
55
+
56
+ attr_accessor :last_purchase_price
57
+
58
+ attr_accessor :listed
59
+
60
+ attr_accessor :listed_since
61
+
62
+ attr_accessor :max_price
63
+
64
+ attr_accessor :min_price
65
+
66
+ attr_accessor :name
67
+
68
+ attr_accessor :packaging_quantity
69
+
70
+ attr_accessor :packaging_required
71
+
72
+ attr_accessor :packaging_unit
73
+
74
+ attr_accessor :personalization_required
75
+
76
+ attr_accessor :price_changable
77
+
78
+ attr_accessor :prices
79
+
80
+ attr_accessor :print_tickets_separately
81
+
82
+ attr_accessor :production_type
83
+
84
+ attr_accessor :recommended_retail_price
85
+
86
+ attr_accessor :related_products
87
+
88
+ attr_accessor :sector
89
+
90
+ attr_accessor :serial_number_required
91
+
92
+ attr_accessor :subproduct_presentation
93
+
94
+ attr_accessor :subproducts
95
+
96
+ attr_accessor :supplier_prices
97
+
98
+ attr_accessor :tags
99
+
100
+ attr_accessor :ticket_definition
101
+
102
+ attr_accessor :track_inventory
103
+
104
+ attr_accessor :stock_return_unsellable
105
+
106
+ class EnumAttributeValidator
107
+ attr_reader :datatype
108
+ attr_reader :allowable_values
109
+
110
+ def initialize(datatype, allowable_values)
111
+ @allowable_values = allowable_values.map do |value|
112
+ case datatype.to_s
113
+ when /Integer/i
114
+ value.to_i
115
+ when /Float/i
116
+ value.to_f
117
+ else
118
+ value
119
+ end
120
+ end
121
+ end
122
+
123
+ def valid?(value)
124
+ !value || allowable_values.include?(value)
125
+ end
126
+ end
127
+
128
+ # Attribute mapping from ruby-style variable name to JSON key.
129
+ def self.attribute_map
130
+ {
131
+ :'active' => :'active',
132
+ :'id' => :'id',
133
+ :'number' => :'number',
134
+ :'revision' => :'revision',
135
+ :'alternative_sector' => :'alternativeSector',
136
+ :'assortment' => :'assortment',
137
+ :'codes' => :'codes',
138
+ :'commodity_group' => :'commodityGroup',
139
+ :'conversion' => :'conversion',
140
+ :'costs' => :'costs',
141
+ :'deactivated' => :'deactivated',
142
+ :'deposit' => :'deposit',
143
+ :'descriptions' => :'descriptions',
144
+ :'discountable' => :'discountable',
145
+ :'image' => :'image',
146
+ :'info_texts' => :'infoTexts',
147
+ :'item_sequence' => :'itemSequence',
148
+ :'last_purchase_price' => :'lastPurchasePrice',
149
+ :'listed' => :'listed',
150
+ :'listed_since' => :'listedSince',
151
+ :'max_price' => :'maxPrice',
152
+ :'min_price' => :'minPrice',
153
+ :'name' => :'name',
154
+ :'packaging_quantity' => :'packagingQuantity',
155
+ :'packaging_required' => :'packagingRequired',
156
+ :'packaging_unit' => :'packagingUnit',
157
+ :'personalization_required' => :'personalizationRequired',
158
+ :'price_changable' => :'priceChangable',
159
+ :'prices' => :'prices',
160
+ :'print_tickets_separately' => :'printTicketsSeparately',
161
+ :'production_type' => :'productionType',
162
+ :'recommended_retail_price' => :'recommendedRetailPrice',
163
+ :'related_products' => :'relatedProducts',
164
+ :'sector' => :'sector',
165
+ :'serial_number_required' => :'serialNumberRequired',
166
+ :'subproduct_presentation' => :'subproductPresentation',
167
+ :'subproducts' => :'subproducts',
168
+ :'supplier_prices' => :'supplierPrices',
169
+ :'tags' => :'tags',
170
+ :'ticket_definition' => :'ticketDefinition',
171
+ :'track_inventory' => :'trackInventory',
172
+ :'stock_return_unsellable' => :'stockReturnUnsellable'
173
+ }
174
+ end
175
+
176
+ # Attribute type mapping.
177
+ def self.swagger_types
178
+ {
179
+ :'active' => :'BOOLEAN',
180
+ :'id' => :'String',
181
+ :'number' => :'String',
182
+ :'revision' => :'Integer',
183
+ :'alternative_sector' => :'ModelReference',
184
+ :'assortment' => :'ModelReference',
185
+ :'codes' => :'Array<ProductCode>',
186
+ :'commodity_group' => :'ModelReference',
187
+ :'conversion' => :'BOOLEAN',
188
+ :'costs' => :'Float',
189
+ :'deactivated' => :'BOOLEAN',
190
+ :'deposit' => :'BOOLEAN',
191
+ :'descriptions' => :'Array<ProductDescription>',
192
+ :'discountable' => :'BOOLEAN',
193
+ :'image' => :'ModelReference',
194
+ :'info_texts' => :'Array<ModelReference>',
195
+ :'item_sequence' => :'ModelReference',
196
+ :'last_purchase_price' => :'Float',
197
+ :'listed' => :'BOOLEAN',
198
+ :'listed_since' => :'DateTime',
199
+ :'max_price' => :'Float',
200
+ :'min_price' => :'Float',
201
+ :'name' => :'String',
202
+ :'packaging_quantity' => :'Float',
203
+ :'packaging_required' => :'BOOLEAN',
204
+ :'packaging_unit' => :'String',
205
+ :'personalization_required' => :'BOOLEAN',
206
+ :'price_changable' => :'BOOLEAN',
207
+ :'prices' => :'Array<ProductPrice>',
208
+ :'print_tickets_separately' => :'BOOLEAN',
209
+ :'production_type' => :'ModelReference',
210
+ :'recommended_retail_price' => :'Float',
211
+ :'related_products' => :'ModelReference',
212
+ :'sector' => :'ModelReference',
213
+ :'serial_number_required' => :'BOOLEAN',
214
+ :'subproduct_presentation' => :'String',
215
+ :'subproducts' => :'Array<ProductSubproduct>',
216
+ :'supplier_prices' => :'Array<ProductSupplierPrice>',
217
+ :'tags' => :'Array<ModelReference>',
218
+ :'ticket_definition' => :'ModelReference',
219
+ :'track_inventory' => :'BOOLEAN',
220
+ :'stock_return_unsellable' => :'BOOLEAN'
221
+ }
222
+ end
223
+
224
+ # Initializes the object
225
+ # @param [Hash] attributes Model attributes in the form of hash
226
+ def initialize(attributes = {})
227
+ return unless attributes.is_a?(Hash)
228
+
229
+ # convert string to symbol for hash key
230
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
231
+
232
+ if attributes.has_key?(:'active')
233
+ self.active = attributes[:'active']
234
+ end
235
+
236
+ if attributes.has_key?(:'id')
237
+ self.id = attributes[:'id']
238
+ end
239
+
240
+ if attributes.has_key?(:'number')
241
+ self.number = attributes[:'number']
242
+ end
243
+
244
+ if attributes.has_key?(:'revision')
245
+ self.revision = attributes[:'revision']
246
+ end
247
+
248
+ if attributes.has_key?(:'alternativeSector')
249
+ self.alternative_sector = attributes[:'alternativeSector']
250
+ end
251
+
252
+ if attributes.has_key?(:'assortment')
253
+ self.assortment = attributes[:'assortment']
254
+ end
255
+
256
+ if attributes.has_key?(:'codes')
257
+ if (value = attributes[:'codes']).is_a?(Array)
258
+ self.codes = value
259
+ end
260
+ end
261
+
262
+ if attributes.has_key?(:'commodityGroup')
263
+ self.commodity_group = attributes[:'commodityGroup']
264
+ end
265
+
266
+ if attributes.has_key?(:'conversion')
267
+ self.conversion = attributes[:'conversion']
268
+ end
269
+
270
+ if attributes.has_key?(:'costs')
271
+ self.costs = attributes[:'costs']
272
+ end
273
+
274
+ if attributes.has_key?(:'deactivated')
275
+ self.deactivated = attributes[:'deactivated']
276
+ end
277
+
278
+ if attributes.has_key?(:'deposit')
279
+ self.deposit = attributes[:'deposit']
280
+ end
281
+
282
+ if attributes.has_key?(:'descriptions')
283
+ if (value = attributes[:'descriptions']).is_a?(Array)
284
+ self.descriptions = value
285
+ end
286
+ end
287
+
288
+ if attributes.has_key?(:'discountable')
289
+ self.discountable = attributes[:'discountable']
290
+ end
291
+
292
+ if attributes.has_key?(:'image')
293
+ self.image = attributes[:'image']
294
+ end
295
+
296
+ if attributes.has_key?(:'infoTexts')
297
+ if (value = attributes[:'infoTexts']).is_a?(Array)
298
+ self.info_texts = value
299
+ end
300
+ end
301
+
302
+ if attributes.has_key?(:'itemSequence')
303
+ self.item_sequence = attributes[:'itemSequence']
304
+ end
305
+
306
+ if attributes.has_key?(:'lastPurchasePrice')
307
+ self.last_purchase_price = attributes[:'lastPurchasePrice']
308
+ end
309
+
310
+ if attributes.has_key?(:'listed')
311
+ self.listed = attributes[:'listed']
312
+ end
313
+
314
+ if attributes.has_key?(:'listedSince')
315
+ self.listed_since = attributes[:'listedSince']
316
+ end
317
+
318
+ if attributes.has_key?(:'maxPrice')
319
+ self.max_price = attributes[:'maxPrice']
320
+ end
321
+
322
+ if attributes.has_key?(:'minPrice')
323
+ self.min_price = attributes[:'minPrice']
324
+ end
325
+
326
+ if attributes.has_key?(:'name')
327
+ self.name = attributes[:'name']
328
+ end
329
+
330
+ if attributes.has_key?(:'packagingQuantity')
331
+ self.packaging_quantity = attributes[:'packagingQuantity']
332
+ end
333
+
334
+ if attributes.has_key?(:'packagingRequired')
335
+ self.packaging_required = attributes[:'packagingRequired']
336
+ end
337
+
338
+ if attributes.has_key?(:'packagingUnit')
339
+ self.packaging_unit = attributes[:'packagingUnit']
340
+ end
341
+
342
+ if attributes.has_key?(:'personalizationRequired')
343
+ self.personalization_required = attributes[:'personalizationRequired']
344
+ end
345
+
346
+ if attributes.has_key?(:'priceChangable')
347
+ self.price_changable = attributes[:'priceChangable']
348
+ end
349
+
350
+ if attributes.has_key?(:'prices')
351
+ if (value = attributes[:'prices']).is_a?(Array)
352
+ self.prices = value
353
+ end
354
+ end
355
+
356
+ if attributes.has_key?(:'printTicketsSeparately')
357
+ self.print_tickets_separately = attributes[:'printTicketsSeparately']
358
+ end
359
+
360
+ if attributes.has_key?(:'productionType')
361
+ self.production_type = attributes[:'productionType']
362
+ end
363
+
364
+ if attributes.has_key?(:'recommendedRetailPrice')
365
+ self.recommended_retail_price = attributes[:'recommendedRetailPrice']
366
+ end
367
+
368
+ if attributes.has_key?(:'relatedProducts')
369
+ self.related_products = attributes[:'relatedProducts']
370
+ end
371
+
372
+ if attributes.has_key?(:'sector')
373
+ self.sector = attributes[:'sector']
374
+ end
375
+
376
+ if attributes.has_key?(:'serialNumberRequired')
377
+ self.serial_number_required = attributes[:'serialNumberRequired']
378
+ end
379
+
380
+ if attributes.has_key?(:'subproductPresentation')
381
+ self.subproduct_presentation = attributes[:'subproductPresentation']
382
+ end
383
+
384
+ if attributes.has_key?(:'subproducts')
385
+ if (value = attributes[:'subproducts']).is_a?(Array)
386
+ self.subproducts = value
387
+ end
388
+ end
389
+
390
+ if attributes.has_key?(:'supplierPrices')
391
+ if (value = attributes[:'supplierPrices']).is_a?(Array)
392
+ self.supplier_prices = value
393
+ end
394
+ end
395
+
396
+ if attributes.has_key?(:'tags')
397
+ if (value = attributes[:'tags']).is_a?(Array)
398
+ self.tags = value
399
+ end
400
+ end
401
+
402
+ if attributes.has_key?(:'ticketDefinition')
403
+ self.ticket_definition = attributes[:'ticketDefinition']
404
+ end
405
+
406
+ if attributes.has_key?(:'trackInventory')
407
+ self.track_inventory = attributes[:'trackInventory']
408
+ end
409
+
410
+ if attributes.has_key?(:'stockReturnUnsellable')
411
+ self.stock_return_unsellable = attributes[:'stockReturnUnsellable']
412
+ end
413
+
414
+ end
415
+
416
+ # Show invalid properties with the reasons. Usually used together with valid?
417
+ # @return Array for valid properties with the reasons
418
+ def list_invalid_properties
419
+ invalid_properties = Array.new
420
+ return invalid_properties
421
+ end
422
+
423
+ # Check to see if the all the properties in the model are valid
424
+ # @return true if the model is valid
425
+ def valid?
426
+ packaging_unit_validator = EnumAttributeValidator.new('String', ["CUBIC_INCH", "CUBIC_METER", "FLUID_OUNCE", "GALLON_FL", "GRAM", "INCH", "KILOGRAM", "LITER", "METER", "MILLILITER", "OUNCE", "POUND", "SQUARE_INCH", "SQUARE_METER"])
427
+ return false unless packaging_unit_validator.valid?(@packaging_unit)
428
+ subproduct_presentation_validator = EnumAttributeValidator.new('String', ["DEFAULT", "HIDE_ALL", "HIDE_PRICES", "HIDE_QUANTITIES"])
429
+ return false unless subproduct_presentation_validator.valid?(@subproduct_presentation)
430
+ return true
431
+ end
432
+
433
+ # Custom attribute writer method checking allowed values (enum).
434
+ # @param [Object] packaging_unit Object to be assigned
435
+ def packaging_unit=(packaging_unit)
436
+ validator = EnumAttributeValidator.new('String', ["CUBIC_INCH", "CUBIC_METER", "FLUID_OUNCE", "GALLON_FL", "GRAM", "INCH", "KILOGRAM", "LITER", "METER", "MILLILITER", "OUNCE", "POUND", "SQUARE_INCH", "SQUARE_METER"])
437
+ unless validator.valid?(packaging_unit)
438
+ fail ArgumentError, "invalid value for 'packaging_unit', must be one of #{validator.allowable_values}."
439
+ end
440
+ @packaging_unit = packaging_unit
441
+ end
442
+
443
+ # Custom attribute writer method checking allowed values (enum).
444
+ # @param [Object] subproduct_presentation Object to be assigned
445
+ def subproduct_presentation=(subproduct_presentation)
446
+ validator = EnumAttributeValidator.new('String', ["DEFAULT", "HIDE_ALL", "HIDE_PRICES", "HIDE_QUANTITIES"])
447
+ unless validator.valid?(subproduct_presentation)
448
+ fail ArgumentError, "invalid value for 'subproduct_presentation', must be one of #{validator.allowable_values}."
449
+ end
450
+ @subproduct_presentation = subproduct_presentation
451
+ end
452
+
453
+ # Checks equality by comparing each attribute.
454
+ # @param [Object] Object to be compared
455
+ def ==(o)
456
+ return true if self.equal?(o)
457
+ self.class == o.class &&
458
+ active == o.active &&
459
+ id == o.id &&
460
+ number == o.number &&
461
+ revision == o.revision &&
462
+ alternative_sector == o.alternative_sector &&
463
+ assortment == o.assortment &&
464
+ codes == o.codes &&
465
+ commodity_group == o.commodity_group &&
466
+ conversion == o.conversion &&
467
+ costs == o.costs &&
468
+ deactivated == o.deactivated &&
469
+ deposit == o.deposit &&
470
+ descriptions == o.descriptions &&
471
+ discountable == o.discountable &&
472
+ image == o.image &&
473
+ info_texts == o.info_texts &&
474
+ item_sequence == o.item_sequence &&
475
+ last_purchase_price == o.last_purchase_price &&
476
+ listed == o.listed &&
477
+ listed_since == o.listed_since &&
478
+ max_price == o.max_price &&
479
+ min_price == o.min_price &&
480
+ name == o.name &&
481
+ packaging_quantity == o.packaging_quantity &&
482
+ packaging_required == o.packaging_required &&
483
+ packaging_unit == o.packaging_unit &&
484
+ personalization_required == o.personalization_required &&
485
+ price_changable == o.price_changable &&
486
+ prices == o.prices &&
487
+ print_tickets_separately == o.print_tickets_separately &&
488
+ production_type == o.production_type &&
489
+ recommended_retail_price == o.recommended_retail_price &&
490
+ related_products == o.related_products &&
491
+ sector == o.sector &&
492
+ serial_number_required == o.serial_number_required &&
493
+ subproduct_presentation == o.subproduct_presentation &&
494
+ subproducts == o.subproducts &&
495
+ supplier_prices == o.supplier_prices &&
496
+ tags == o.tags &&
497
+ ticket_definition == o.ticket_definition &&
498
+ track_inventory == o.track_inventory &&
499
+ stock_return_unsellable == o.stock_return_unsellable
500
+ end
501
+
502
+ # @see the `==` method
503
+ # @param [Object] Object to be compared
504
+ def eql?(o)
505
+ self == o
506
+ end
507
+
508
+ # Calculates hash code according to all attributes.
509
+ # @return [Fixnum] Hash code
510
+ def hash
511
+ [active, id, number, revision, alternative_sector, assortment, codes, commodity_group, conversion, costs, deactivated, deposit, descriptions, discountable, image, info_texts, item_sequence, last_purchase_price, listed, listed_since, max_price, min_price, name, packaging_quantity, packaging_required, packaging_unit, personalization_required, price_changable, prices, print_tickets_separately, production_type, recommended_retail_price, related_products, sector, serial_number_required, subproduct_presentation, subproducts, supplier_prices, tags, ticket_definition, track_inventory, stock_return_unsellable].hash
512
+ end
513
+
514
+ # Builds the object from hash
515
+ # @param [Hash] attributes Model attributes in the form of hash
516
+ # @return [Object] Returns the model itself
517
+ def build_from_hash(attributes)
518
+ return nil unless attributes.is_a?(Hash)
519
+ self.class.swagger_types.each_pair do |key, type|
520
+ if type =~ /\AArray<(.*)>/i
521
+ # check to ensure the input is an array given that the the attribute
522
+ # is documented as an array but the input is not
523
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
524
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
525
+ end
526
+ elsif !attributes[self.class.attribute_map[key]].nil?
527
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
528
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
529
+ end
530
+
531
+ self
532
+ end
533
+
534
+ # Deserializes the data based on type
535
+ # @param string type Data type
536
+ # @param string value Value to be deserialized
537
+ # @return [Object] Deserialized data
538
+ def _deserialize(type, value)
539
+ case type.to_sym
540
+ when :DateTime
541
+ DateTime.parse(value)
542
+ when :Date
543
+ Date.parse(value)
544
+ when :String
545
+ value.to_s
546
+ when :Integer
547
+ value.to_i
548
+ when :Float
549
+ value.to_f
550
+ when :BOOLEAN
551
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
552
+ true
553
+ else
554
+ false
555
+ end
556
+ when :Object
557
+ # generic object (usually a Hash), return directly
558
+ value
559
+ when /\AArray<(?<inner_type>.+)>\z/
560
+ inner_type = Regexp.last_match[:inner_type]
561
+ value.map { |v| _deserialize(inner_type, v) }
562
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
563
+ k_type = Regexp.last_match[:k_type]
564
+ v_type = Regexp.last_match[:v_type]
565
+ {}.tap do |hash|
566
+ value.each do |k, v|
567
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
568
+ end
569
+ end
570
+ else # model
571
+ temp_model = KoronaClient.const_get(type).new
572
+ temp_model.build_from_hash(value)
573
+ end
574
+ end
575
+
576
+ # Returns the string representation of the object
577
+ # @return [String] String presentation of the object
578
+ def to_s
579
+ to_hash.to_s
580
+ end
581
+
582
+ # to_body is an alias to to_hash (backward compatibility)
583
+ # @return [Hash] Returns the object in the form of hash
584
+ def to_body
585
+ to_hash
586
+ end
587
+
588
+ # Returns the object in the form of hash
589
+ # @return [Hash] Returns the object in the form of hash
590
+ def to_hash
591
+ hash = {}
592
+ self.class.attribute_map.each_pair do |attr, param|
593
+ value = self.send(attr)
594
+ next if value.nil?
595
+ hash[param] = _to_hash(value)
596
+ end
597
+ hash
598
+ end
599
+
600
+ # Outputs non-array value in the form of hash
601
+ # For object, use to_hash. Otherwise, just return the value
602
+ # @param [Object] value Any valid value
603
+ # @return [Hash] Returns the value in the form of hash
604
+ def _to_hash(value)
605
+ if value.is_a?(Array)
606
+ value.compact.map{ |v| _to_hash(v) }
607
+ elsif value.is_a?(Hash)
608
+ {}.tap do |hash|
609
+ value.each { |k, v| hash[k] = _to_hash(v) }
610
+ end
611
+ elsif value.respond_to? :to_hash
612
+ value.to_hash
613
+ else
614
+ value
615
+ end
616
+ end
617
+
618
+ end
619
+
620
+ end