korona-cloud-client 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +71 -4
  3. data/docs/AddressInformation.md +2 -0
  4. data/docs/Cashier.md +16 -6
  5. data/docs/CashierRole.md +27 -0
  6. data/docs/CashierRolesApi.md +402 -0
  7. data/docs/CashiersApi.md +286 -2
  8. data/docs/CloudSubscriptionDetails.md +19 -0
  9. data/docs/CurrenciesApi.md +166 -0
  10. data/docs/Customer.md +5 -1
  11. data/docs/EconomicZonesApi.md +166 -0
  12. data/docs/FiscalTransaction.md +43 -0
  13. data/docs/FiscalUnit.md +51 -0
  14. data/docs/FiscalUnitCertificateInfo.md +19 -0
  15. data/docs/FiscalUnitState.md +27 -0
  16. data/docs/FiscalUnitStateUsageLevel.md +23 -0
  17. data/docs/FiscalUnitStateUsageLevelValue.md +19 -0
  18. data/docs/FiscalUnitStateVersionInfo.md +21 -0
  19. data/docs/FiscalUnitsApi.md +299 -0
  20. data/docs/InfoTextsApi.md +166 -0
  21. data/docs/KoronaAccount.md +2 -0
  22. data/docs/OrganizationalUnit.md +9 -7
  23. data/docs/PaymentMethod.md +2 -0
  24. data/docs/PointsOfSaleApi.md +6 -2
  25. data/docs/Pos.md +10 -4
  26. data/docs/PriceGroupsApi.md +166 -0
  27. data/docs/ProductionType.md +33 -0
  28. data/docs/ProductionTypesApi.md +294 -0
  29. data/docs/Receipt.md +18 -8
  30. data/docs/ReceiptItem.md +3 -1
  31. data/docs/ReceiptMaxRevisions.md +27 -0
  32. data/docs/ReceiptsApi.md +9 -3
  33. data/docs/ResultListCashierRole.md +27 -0
  34. data/docs/ResultListFiscalUnit.md +27 -0
  35. data/docs/ResultListProductionType.md +27 -0
  36. data/docs/ResultListStockOrder.md +27 -0
  37. data/docs/SalesTax.md +2 -0
  38. data/docs/SalesTaxesApi.md +166 -0
  39. data/docs/SectorsApi.md +54 -0
  40. data/docs/Service.md +19 -0
  41. data/docs/StockOrder.md +73 -0
  42. data/docs/StockOrderItem.md +39 -0
  43. data/docs/StockOrdersApi.md +195 -0
  44. data/docs/StockReceipt.md +4 -0
  45. data/docs/SuppliersApi.md +166 -0
  46. data/docs/TicketingApi.md +223 -3
  47. data/docs/VoidedReceiptItem.md +25 -0
  48. data/korona-cloud-client-1.0.1.gem +0 -0
  49. data/korona-cloud-client.gemspec +2 -2
  50. data/lib/korona-cloud-client.rb +24 -1
  51. data/lib/korona-cloud-client/api/accounts_api.rb +1 -1
  52. data/lib/korona-cloud-client/api/additional_receipt_info_types_api.rb +1 -1
  53. data/lib/korona-cloud-client/api/assortments_api.rb +1 -1
  54. data/lib/korona-cloud-client/api/cashier_roles_api.rb +513 -0
  55. data/lib/korona-cloud-client/api/cashiers_api.rb +366 -1
  56. data/lib/korona-cloud-client/api/commodity_groups_api.rb +1 -1
  57. data/lib/korona-cloud-client/api/currencies_api.rb +208 -1
  58. data/lib/korona-cloud-client/api/customer_groups_api.rb +1 -1
  59. data/lib/korona-cloud-client/api/customer_orders_api.rb +1 -1
  60. data/lib/korona-cloud-client/api/customers_api.rb +1 -1
  61. data/lib/korona-cloud-client/api/delivery_notes_api.rb +1 -1
  62. data/lib/korona-cloud-client/api/economic_zones_api.rb +208 -1
  63. data/lib/korona-cloud-client/api/external_system_calls_api.rb +1 -1
  64. data/lib/korona-cloud-client/api/fiscal_units_api.rb +389 -0
  65. data/lib/korona-cloud-client/api/images_api.rb +1 -1
  66. data/lib/korona-cloud-client/api/info_texts_api.rb +208 -1
  67. data/lib/korona-cloud-client/api/inventories_api.rb +1 -1
  68. data/lib/korona-cloud-client/api/korona_account_api.rb +1 -1
  69. data/lib/korona-cloud-client/api/organizational_units_api.rb +1 -1
  70. data/lib/korona-cloud-client/api/payment_methods_api.rb +1 -1
  71. data/lib/korona-cloud-client/api/points_of_sale_api.rb +7 -1
  72. data/lib/korona-cloud-client/api/price_groups_api.rb +208 -1
  73. data/lib/korona-cloud-client/api/production_types_api.rb +373 -0
  74. data/lib/korona-cloud-client/api/products_api.rb +1 -1
  75. data/lib/korona-cloud-client/api/receipts_api.rb +7 -1
  76. data/lib/korona-cloud-client/api/sales_taxes_api.rb +208 -1
  77. data/lib/korona-cloud-client/api/sectors_api.rb +69 -1
  78. data/lib/korona-cloud-client/api/statistics_api.rb +1 -1
  79. data/lib/korona-cloud-client/api/stock_orders_api.rb +257 -0
  80. data/lib/korona-cloud-client/api/stock_receipts_api.rb +1 -1
  81. data/lib/korona-cloud-client/api/suppliers_api.rb +208 -1
  82. data/lib/korona-cloud-client/api/tags_api.rb +1 -1
  83. data/lib/korona-cloud-client/api/ticket_creation_api.rb +1 -1
  84. data/lib/korona-cloud-client/api/ticketing_api.rb +277 -4
  85. data/lib/korona-cloud-client/api/time_tracking_api.rb +1 -1
  86. data/lib/korona-cloud-client/api_client.rb +1 -1
  87. data/lib/korona-cloud-client/api_error.rb +1 -1
  88. data/lib/korona-cloud-client/configuration.rb +1 -1
  89. data/lib/korona-cloud-client/models/account.rb +1 -1
  90. data/lib/korona-cloud-client/models/account_summary.rb +1 -1
  91. data/lib/korona-cloud-client/models/account_transaction.rb +1 -1
  92. data/lib/korona-cloud-client/models/add_or_update_result.rb +1 -1
  93. data/lib/korona-cloud-client/models/additional_info.rb +1 -1
  94. data/lib/korona-cloud-client/models/additional_receipt_info_type.rb +1 -1
  95. data/lib/korona-cloud-client/models/address_information.rb +11 -2
  96. data/lib/korona-cloud-client/models/admission.rb +1 -1
  97. data/lib/korona-cloud-client/models/amount.rb +1 -1
  98. data/lib/korona-cloud-client/models/amount_count_data.rb +1 -1
  99. data/lib/korona-cloud-client/models/assortment.rb +1 -1
  100. data/lib/korona-cloud-client/models/attendance.rb +1 -1
  101. data/lib/korona-cloud-client/models/bad_request_error.rb +1 -1
  102. data/lib/korona-cloud-client/models/capacity.rb +1 -1
  103. data/lib/korona-cloud-client/models/cashier.rb +55 -10
  104. data/lib/korona-cloud-client/models/cashier_role.rb +279 -0
  105. data/lib/korona-cloud-client/models/cashier_summary.rb +1 -1
  106. data/lib/korona-cloud-client/models/category.rb +1 -1
  107. data/lib/korona-cloud-client/models/cloud_subscription.rb +1 -1
  108. data/lib/korona-cloud-client/models/cloud_subscription_details.rb +249 -0
  109. data/lib/korona-cloud-client/models/commodity_group.rb +1 -1
  110. data/lib/korona-cloud-client/models/commodity_group_summary.rb +1 -1
  111. data/lib/korona-cloud-client/models/company_identification.rb +1 -1
  112. data/lib/korona-cloud-client/models/creation_task.rb +1 -1
  113. data/lib/korona-cloud-client/models/currency.rb +1 -1
  114. data/lib/korona-cloud-client/models/currency_denomination.rb +1 -1
  115. data/lib/korona-cloud-client/models/currency_exchange_rate.rb +1 -1
  116. data/lib/korona-cloud-client/models/customer.rb +23 -5
  117. data/lib/korona-cloud-client/models/customer_card.rb +1 -1
  118. data/lib/korona-cloud-client/models/customer_data.rb +1 -1
  119. data/lib/korona-cloud-client/models/customer_group.rb +1 -1
  120. data/lib/korona-cloud-client/models/customer_group_summary.rb +1 -1
  121. data/lib/korona-cloud-client/models/customer_information.rb +1 -1
  122. data/lib/korona-cloud-client/models/customer_order.rb +1 -1
  123. data/lib/korona-cloud-client/models/day_rating.rb +1 -1
  124. data/lib/korona-cloud-client/models/day_time_period.rb +1 -1
  125. data/lib/korona-cloud-client/models/delivery_note.rb +1 -1
  126. data/lib/korona-cloud-client/models/delivery_note_item.rb +1 -1
  127. data/lib/korona-cloud-client/models/deposit.rb +1 -1
  128. data/lib/korona-cloud-client/models/device_information.rb +1 -1
  129. data/lib/korona-cloud-client/models/discount.rb +1 -1
  130. data/lib/korona-cloud-client/models/economic_zone.rb +1 -1
  131. data/lib/korona-cloud-client/models/end_of_day_statement.rb +1 -1
  132. data/lib/korona-cloud-client/models/end_of_day_statement_summary.rb +1 -1
  133. data/lib/korona-cloud-client/models/entry_gate.rb +1 -1
  134. data/lib/korona-cloud-client/models/event.rb +1 -1
  135. data/lib/korona-cloud-client/models/external_system_call.rb +1 -1
  136. data/lib/korona-cloud-client/models/fiscal_transaction.rb +342 -0
  137. data/lib/korona-cloud-client/models/fiscal_unit.rb +415 -0
  138. data/lib/korona-cloud-client/models/fiscal_unit_certificate_info.rb +233 -0
  139. data/lib/korona-cloud-client/models/fiscal_unit_state.rb +287 -0
  140. data/lib/korona-cloud-client/models/fiscal_unit_state_usage_level.rb +233 -0
  141. data/lib/korona-cloud-client/models/fiscal_unit_state_usage_level_value.rb +215 -0
  142. data/lib/korona-cloud-client/models/fiscal_unit_state_version_info.rb +224 -0
  143. data/lib/korona-cloud-client/models/forbidden_error.rb +1 -1
  144. data/lib/korona-cloud-client/models/geo_location.rb +1 -1
  145. data/lib/korona-cloud-client/models/info_text.rb +1 -1
  146. data/lib/korona-cloud-client/models/interval.rb +1 -1
  147. data/lib/korona-cloud-client/models/inventory.rb +1 -1
  148. data/lib/korona-cloud-client/models/inventory_list.rb +1 -1
  149. data/lib/korona-cloud-client/models/inventory_list_item.rb +1 -1
  150. data/lib/korona-cloud-client/models/inventory_list_item_stock.rb +1 -1
  151. data/lib/korona-cloud-client/models/korona_account.rb +13 -2
  152. data/lib/korona-cloud-client/models/media_url.rb +1 -1
  153. data/lib/korona-cloud-client/models/method_not_allowed_error.rb +1 -1
  154. data/lib/korona-cloud-client/models/model_reference.rb +1 -1
  155. data/lib/korona-cloud-client/models/not_found_error.rb +1 -1
  156. data/lib/korona-cloud-client/models/opening_hours.rb +1 -1
  157. data/lib/korona-cloud-client/models/organizational_unit.rb +43 -34
  158. data/lib/korona-cloud-client/models/payment.rb +1 -1
  159. data/lib/korona-cloud-client/models/payment_method.rb +11 -2
  160. data/lib/korona-cloud-client/models/payment_summary.rb +1 -1
  161. data/lib/korona-cloud-client/models/period.rb +1 -1
  162. data/lib/korona-cloud-client/models/period_list_top_seller.rb +1 -1
  163. data/lib/korona-cloud-client/models/period_map_string_revenue_data.rb +1 -1
  164. data/lib/korona-cloud-client/models/period_object.rb +1 -1
  165. data/lib/korona-cloud-client/models/period_revenue_data.rb +1 -1
  166. data/lib/korona-cloud-client/models/pos.rb +44 -17
  167. data/lib/korona-cloud-client/models/price_group.rb +1 -1
  168. data/lib/korona-cloud-client/models/product.rb +1 -1
  169. data/lib/korona-cloud-client/models/product_code.rb +1 -1
  170. data/lib/korona-cloud-client/models/product_description.rb +1 -1
  171. data/lib/korona-cloud-client/models/product_price.rb +1 -1
  172. data/lib/korona-cloud-client/models/product_stock.rb +1 -1
  173. data/lib/korona-cloud-client/models/product_subproduct.rb +1 -1
  174. data/lib/korona-cloud-client/models/product_supplier_price.rb +1 -1
  175. data/lib/korona-cloud-client/models/product_transfer_involved_party_information.rb +1 -1
  176. data/lib/korona-cloud-client/models/product_transfer_involved_party_information_data.rb +1 -1
  177. data/lib/korona-cloud-client/models/production_type.rb +328 -0
  178. data/lib/korona-cloud-client/models/rating.rb +1 -1
  179. data/lib/korona-cloud-client/models/receipt.rb +82 -31
  180. data/lib/korona-cloud-client/models/receipt_item.rb +14 -5
  181. data/lib/korona-cloud-client/models/receipt_max_revisions.rb +251 -0
  182. data/lib/korona-cloud-client/models/result_list.rb +1 -1
  183. data/lib/korona-cloud-client/models/result_list_account.rb +1 -1
  184. data/lib/korona-cloud-client/models/result_list_additional_receipt_info_type.rb +1 -1
  185. data/lib/korona-cloud-client/models/result_list_assortment.rb +1 -1
  186. data/lib/korona-cloud-client/models/result_list_attendance.rb +1 -1
  187. data/lib/korona-cloud-client/models/result_list_cashier.rb +1 -1
  188. data/lib/korona-cloud-client/models/result_list_cashier_role.rb +291 -0
  189. data/lib/korona-cloud-client/models/result_list_commodity_group.rb +1 -1
  190. data/lib/korona-cloud-client/models/result_list_creation_task.rb +1 -1
  191. data/lib/korona-cloud-client/models/result_list_currency.rb +1 -1
  192. data/lib/korona-cloud-client/models/result_list_customer.rb +1 -1
  193. data/lib/korona-cloud-client/models/result_list_customer_group.rb +1 -1
  194. data/lib/korona-cloud-client/models/result_list_customer_order.rb +1 -1
  195. data/lib/korona-cloud-client/models/result_list_day_rating.rb +1 -1
  196. data/lib/korona-cloud-client/models/result_list_delivery_note.rb +1 -1
  197. data/lib/korona-cloud-client/models/result_list_economic_zone.rb +1 -1
  198. data/lib/korona-cloud-client/models/result_list_end_of_day_statement.rb +1 -1
  199. data/lib/korona-cloud-client/models/result_list_entry_gate.rb +1 -1
  200. data/lib/korona-cloud-client/models/result_list_event.rb +1 -1
  201. data/lib/korona-cloud-client/models/result_list_external_system_call.rb +1 -1
  202. data/lib/korona-cloud-client/models/result_list_fiscal_unit.rb +291 -0
  203. data/lib/korona-cloud-client/models/result_list_info_text.rb +1 -1
  204. data/lib/korona-cloud-client/models/result_list_inventory.rb +1 -1
  205. data/lib/korona-cloud-client/models/result_list_inventory_list.rb +1 -1
  206. data/lib/korona-cloud-client/models/result_list_inventory_list_item.rb +1 -1
  207. data/lib/korona-cloud-client/models/result_list_organizational_unit.rb +1 -1
  208. data/lib/korona-cloud-client/models/result_list_payment_method.rb +1 -1
  209. data/lib/korona-cloud-client/models/result_list_pos.rb +1 -1
  210. data/lib/korona-cloud-client/models/result_list_price_group.rb +1 -1
  211. data/lib/korona-cloud-client/models/result_list_product.rb +1 -1
  212. data/lib/korona-cloud-client/models/result_list_product_stock.rb +1 -1
  213. data/lib/korona-cloud-client/models/result_list_production_type.rb +291 -0
  214. data/lib/korona-cloud-client/models/result_list_receipt.rb +1 -1
  215. data/lib/korona-cloud-client/models/result_list_sales_tax.rb +1 -1
  216. data/lib/korona-cloud-client/models/result_list_sector.rb +1 -1
  217. data/lib/korona-cloud-client/models/result_list_stock_order.rb +291 -0
  218. data/lib/korona-cloud-client/models/result_list_stock_receipt.rb +1 -1
  219. data/lib/korona-cloud-client/models/result_list_stock_receipt_item.rb +1 -1
  220. data/lib/korona-cloud-client/models/result_list_supplier.rb +1 -1
  221. data/lib/korona-cloud-client/models/result_list_tag.rb +1 -1
  222. data/lib/korona-cloud-client/models/result_list_ticket.rb +1 -1
  223. data/lib/korona-cloud-client/models/result_list_ticket_definition.rb +1 -1
  224. data/lib/korona-cloud-client/models/result_list_time_tracking_entity.rb +1 -1
  225. data/lib/korona-cloud-client/models/result_list_time_tracking_entry.rb +1 -1
  226. data/lib/korona-cloud-client/models/revenue_data.rb +1 -1
  227. data/lib/korona-cloud-client/models/sales_tax.rb +45 -2
  228. data/lib/korona-cloud-client/models/sales_tax_rate.rb +1 -1
  229. data/lib/korona-cloud-client/models/sector.rb +1 -1
  230. data/lib/korona-cloud-client/models/sector_revenue_account_item.rb +1 -1
  231. data/lib/korona-cloud-client/models/sector_sales_tax_item.rb +1 -1
  232. data/lib/korona-cloud-client/models/service.rb +249 -0
  233. data/lib/korona-cloud-client/models/signature.rb +1 -1
  234. data/lib/korona-cloud-client/models/statistic.rb +1 -1
  235. data/lib/korona-cloud-client/models/statistic_list_top_seller.rb +1 -1
  236. data/lib/korona-cloud-client/models/statistic_map_string_revenue_data.rb +1 -1
  237. data/lib/korona-cloud-client/models/statistic_revenue_data.rb +1 -1
  238. data/lib/korona-cloud-client/models/stock_order.rb +498 -0
  239. data/lib/korona-cloud-client/models/stock_order_item.rb +305 -0
  240. data/lib/korona-cloud-client/models/stock_receipt.rb +20 -2
  241. data/lib/korona-cloud-client/models/stock_receipt_item.rb +1 -1
  242. data/lib/korona-cloud-client/models/stock_receipt_item_amount.rb +1 -1
  243. data/lib/korona-cloud-client/models/stock_receipt_item_identification.rb +1 -1
  244. data/lib/korona-cloud-client/models/stock_receipt_item_purchase_price.rb +1 -1
  245. data/lib/korona-cloud-client/models/supplier.rb +1 -1
  246. data/lib/korona-cloud-client/models/supplier_contact.rb +1 -1
  247. data/lib/korona-cloud-client/models/supplier_contact_person.rb +1 -1
  248. data/lib/korona-cloud-client/models/supplier_payment_information.rb +1 -1
  249. data/lib/korona-cloud-client/models/tag.rb +1 -1
  250. data/lib/korona-cloud-client/models/tax_payment.rb +1 -1
  251. data/lib/korona-cloud-client/models/tax_summary.rb +1 -1
  252. data/lib/korona-cloud-client/models/ticket.rb +1 -1
  253. data/lib/korona-cloud-client/models/ticket_data.rb +1 -1
  254. data/lib/korona-cloud-client/models/ticket_definition.rb +1 -1
  255. data/lib/korona-cloud-client/models/ticket_personalization.rb +1 -1
  256. data/lib/korona-cloud-client/models/time_period.rb +1 -1
  257. data/lib/korona-cloud-client/models/time_tracking_entity.rb +1 -1
  258. data/lib/korona-cloud-client/models/time_tracking_entry.rb +1 -1
  259. data/lib/korona-cloud-client/models/too_many_requests_error.rb +1 -1
  260. data/lib/korona-cloud-client/models/top_seller.rb +1 -1
  261. data/lib/korona-cloud-client/models/total_period.rb +1 -1
  262. data/lib/korona-cloud-client/models/total_price.rb +1 -1
  263. data/lib/korona-cloud-client/models/validity.rb +1 -1
  264. data/lib/korona-cloud-client/models/voided_receipt_item.rb +242 -0
  265. data/lib/korona-cloud-client/models/weather.rb +1 -1
  266. data/lib/korona-cloud-client/version.rb +2 -2
  267. data/spec/api/cashier_roles_api_spec.rb +126 -0
  268. data/spec/api/fiscal_units_api_spec.rb +104 -0
  269. data/spec/api/production_types_api_spec.rb +101 -0
  270. data/spec/api/stock_orders_api_spec.rb +83 -0
  271. data/spec/models/cashier_role_spec.rb +75 -0
  272. data/spec/models/cloud_subscription_details_spec.rb +51 -0
  273. data/spec/models/fiscal_transaction_spec.rb +119 -0
  274. data/spec/models/fiscal_unit_certificate_info_spec.rb +47 -0
  275. data/spec/models/fiscal_unit_spec.rb +147 -0
  276. data/spec/models/fiscal_unit_state_spec.rb +75 -0
  277. data/spec/models/fiscal_unit_state_usage_level_spec.rb +59 -0
  278. data/spec/models/fiscal_unit_state_usage_level_value_spec.rb +47 -0
  279. data/spec/models/fiscal_unit_state_version_info_spec.rb +53 -0
  280. data/spec/models/production_type_spec.rb +97 -0
  281. data/spec/models/receipt_max_revisions_spec.rb +71 -0
  282. data/spec/models/result_list_cashier_role_spec.rb +71 -0
  283. data/spec/models/result_list_fiscal_unit_spec.rb +71 -0
  284. data/spec/models/result_list_production_type_spec.rb +71 -0
  285. data/spec/models/result_list_stock_order_spec.rb +71 -0
  286. data/spec/models/service_spec.rb +51 -0
  287. data/spec/models/stock_order_item_spec.rb +107 -0
  288. data/spec/models/stock_order_spec.rb +213 -0
  289. data/spec/models/voided_receipt_item_spec.rb +65 -0
  290. metadata +96 -3
@@ -0,0 +1,415 @@
1
+ =begin
2
+ #KORONA.cloud API v3
3
+
4
+ #Our api provides access to our cloud services
5
+
6
+ The version of the OpenAPI document: 2.14.7
7
+ Contact: support@combase.net
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module KoronaCloudClient
16
+ class FiscalUnit
17
+ # indicates whether the object is active for use or not
18
+ attr_accessor :active
19
+
20
+ # global object uuid (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
21
+ attr_accessor :id
22
+
23
+ # number of the object, like it is set in backoffice; will be removed when active=false
24
+ attr_accessor :number
25
+
26
+ # 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.
27
+ attr_accessor :revision
28
+
29
+ attr_accessor :admin_pin
30
+
31
+ attr_accessor :admin_puk
32
+
33
+ attr_accessor :certificate
34
+
35
+ attr_accessor :log_time_format
36
+
37
+ attr_accessor :name
38
+
39
+ attr_accessor :process_data_encoding
40
+
41
+ # public key of the fiscal unit. Value can only be set on create and is not changable on update.
42
+ attr_accessor :public_key
43
+
44
+ attr_accessor :signature_algorithm
45
+
46
+ attr_accessor :state
47
+
48
+ attr_accessor :time_admin_pin
49
+
50
+ attr_accessor :type
51
+
52
+ attr_accessor :api_key
53
+
54
+ attr_accessor :api_secret
55
+
56
+ attr_accessor :remote_url
57
+
58
+ class EnumAttributeValidator
59
+ attr_reader :datatype
60
+ attr_reader :allowable_values
61
+
62
+ def initialize(datatype, allowable_values)
63
+ @allowable_values = allowable_values.map do |value|
64
+ case datatype.to_s
65
+ when /Integer/i
66
+ value.to_i
67
+ when /Float/i
68
+ value.to_f
69
+ else
70
+ value
71
+ end
72
+ end
73
+ end
74
+
75
+ def valid?(value)
76
+ !value || allowable_values.include?(value)
77
+ end
78
+ end
79
+
80
+ # Attribute mapping from ruby-style variable name to JSON key.
81
+ def self.attribute_map
82
+ {
83
+ :'active' => :'active',
84
+ :'id' => :'id',
85
+ :'number' => :'number',
86
+ :'revision' => :'revision',
87
+ :'admin_pin' => :'adminPin',
88
+ :'admin_puk' => :'adminPuk',
89
+ :'certificate' => :'certificate',
90
+ :'log_time_format' => :'logTimeFormat',
91
+ :'name' => :'name',
92
+ :'process_data_encoding' => :'processDataEncoding',
93
+ :'public_key' => :'publicKey',
94
+ :'signature_algorithm' => :'signatureAlgorithm',
95
+ :'state' => :'state',
96
+ :'time_admin_pin' => :'timeAdminPin',
97
+ :'type' => :'type',
98
+ :'api_key' => :'apiKey',
99
+ :'api_secret' => :'apiSecret',
100
+ :'remote_url' => :'remoteUrl'
101
+ }
102
+ end
103
+
104
+ # Attribute type mapping.
105
+ def self.openapi_types
106
+ {
107
+ :'active' => :'Boolean',
108
+ :'id' => :'String',
109
+ :'number' => :'String',
110
+ :'revision' => :'Integer',
111
+ :'admin_pin' => :'String',
112
+ :'admin_puk' => :'String',
113
+ :'certificate' => :'FiscalUnitCertificateInfo',
114
+ :'log_time_format' => :'String',
115
+ :'name' => :'String',
116
+ :'process_data_encoding' => :'String',
117
+ :'public_key' => :'String',
118
+ :'signature_algorithm' => :'String',
119
+ :'state' => :'FiscalUnitState',
120
+ :'time_admin_pin' => :'String',
121
+ :'type' => :'String',
122
+ :'api_key' => :'String',
123
+ :'api_secret' => :'String',
124
+ :'remote_url' => :'String'
125
+ }
126
+ end
127
+
128
+ # List of attributes with nullable: true
129
+ def self.openapi_nullable
130
+ Set.new([
131
+ ])
132
+ end
133
+
134
+ # Initializes the object
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ def initialize(attributes = {})
137
+ if (!attributes.is_a?(Hash))
138
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KoronaCloudClient::FiscalUnit` initialize method"
139
+ end
140
+
141
+ # check to see if the attribute exists and convert string to symbol for hash key
142
+ attributes = attributes.each_with_object({}) { |(k, v), h|
143
+ if (!self.class.attribute_map.key?(k.to_sym))
144
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KoronaCloudClient::FiscalUnit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
145
+ end
146
+ h[k.to_sym] = v
147
+ }
148
+
149
+ if attributes.key?(:'active')
150
+ self.active = attributes[:'active']
151
+ end
152
+
153
+ if attributes.key?(:'id')
154
+ self.id = attributes[:'id']
155
+ end
156
+
157
+ if attributes.key?(:'number')
158
+ self.number = attributes[:'number']
159
+ end
160
+
161
+ if attributes.key?(:'revision')
162
+ self.revision = attributes[:'revision']
163
+ end
164
+
165
+ if attributes.key?(:'admin_pin')
166
+ self.admin_pin = attributes[:'admin_pin']
167
+ end
168
+
169
+ if attributes.key?(:'admin_puk')
170
+ self.admin_puk = attributes[:'admin_puk']
171
+ end
172
+
173
+ if attributes.key?(:'certificate')
174
+ self.certificate = attributes[:'certificate']
175
+ end
176
+
177
+ if attributes.key?(:'log_time_format')
178
+ self.log_time_format = attributes[:'log_time_format']
179
+ end
180
+
181
+ if attributes.key?(:'name')
182
+ self.name = attributes[:'name']
183
+ end
184
+
185
+ if attributes.key?(:'process_data_encoding')
186
+ self.process_data_encoding = attributes[:'process_data_encoding']
187
+ end
188
+
189
+ if attributes.key?(:'public_key')
190
+ self.public_key = attributes[:'public_key']
191
+ end
192
+
193
+ if attributes.key?(:'signature_algorithm')
194
+ self.signature_algorithm = attributes[:'signature_algorithm']
195
+ end
196
+
197
+ if attributes.key?(:'state')
198
+ self.state = attributes[:'state']
199
+ end
200
+
201
+ if attributes.key?(:'time_admin_pin')
202
+ self.time_admin_pin = attributes[:'time_admin_pin']
203
+ end
204
+
205
+ if attributes.key?(:'type')
206
+ self.type = attributes[:'type']
207
+ end
208
+
209
+ if attributes.key?(:'api_key')
210
+ self.api_key = attributes[:'api_key']
211
+ end
212
+
213
+ if attributes.key?(:'api_secret')
214
+ self.api_secret = attributes[:'api_secret']
215
+ end
216
+
217
+ if attributes.key?(:'remote_url')
218
+ self.remote_url = attributes[:'remote_url']
219
+ end
220
+ end
221
+
222
+ # Show invalid properties with the reasons. Usually used together with valid?
223
+ # @return Array for valid properties with the reasons
224
+ def list_invalid_properties
225
+ invalid_properties = Array.new
226
+ pattern = Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
227
+ if !@public_key.nil? && @public_key !~ pattern
228
+ invalid_properties.push("invalid value for \"public_key\", must conform to the pattern #{pattern}.")
229
+ end
230
+
231
+ invalid_properties
232
+ end
233
+
234
+ # Check to see if the all the properties in the model are valid
235
+ # @return true if the model is valid
236
+ def valid?
237
+ return false if !@public_key.nil? && @public_key !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
238
+ type_validator = EnumAttributeValidator.new('String', ["EFSTA", "FISKALY", "SWISSBIT", "SWISSBIT_LAN"])
239
+ return false unless type_validator.valid?(@type)
240
+ true
241
+ end
242
+
243
+ # Custom attribute writer method with validation
244
+ # @param [Object] public_key Value to be assigned
245
+ def public_key=(public_key)
246
+ pattern = Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
247
+ if !public_key.nil? && public_key !~ pattern
248
+ fail ArgumentError, "invalid value for \"public_key\", must conform to the pattern #{pattern}."
249
+ end
250
+
251
+ @public_key = public_key
252
+ end
253
+
254
+ # Custom attribute writer method checking allowed values (enum).
255
+ # @param [Object] type Object to be assigned
256
+ def type=(type)
257
+ validator = EnumAttributeValidator.new('String', ["EFSTA", "FISKALY", "SWISSBIT", "SWISSBIT_LAN"])
258
+ unless validator.valid?(type)
259
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
260
+ end
261
+ @type = type
262
+ end
263
+
264
+ # Checks equality by comparing each attribute.
265
+ # @param [Object] Object to be compared
266
+ def ==(o)
267
+ return true if self.equal?(o)
268
+ self.class == o.class &&
269
+ active == o.active &&
270
+ id == o.id &&
271
+ number == o.number &&
272
+ revision == o.revision &&
273
+ admin_pin == o.admin_pin &&
274
+ admin_puk == o.admin_puk &&
275
+ certificate == o.certificate &&
276
+ log_time_format == o.log_time_format &&
277
+ name == o.name &&
278
+ process_data_encoding == o.process_data_encoding &&
279
+ public_key == o.public_key &&
280
+ signature_algorithm == o.signature_algorithm &&
281
+ state == o.state &&
282
+ time_admin_pin == o.time_admin_pin &&
283
+ type == o.type &&
284
+ api_key == o.api_key &&
285
+ api_secret == o.api_secret &&
286
+ remote_url == o.remote_url
287
+ end
288
+
289
+ # @see the `==` method
290
+ # @param [Object] Object to be compared
291
+ def eql?(o)
292
+ self == o
293
+ end
294
+
295
+ # Calculates hash code according to all attributes.
296
+ # @return [Integer] Hash code
297
+ def hash
298
+ [active, id, number, revision, admin_pin, admin_puk, certificate, log_time_format, name, process_data_encoding, public_key, signature_algorithm, state, time_admin_pin, type, api_key, api_secret, remote_url].hash
299
+ end
300
+
301
+ # Builds the object from hash
302
+ # @param [Hash] attributes Model attributes in the form of hash
303
+ # @return [Object] Returns the model itself
304
+ def self.build_from_hash(attributes)
305
+ new.build_from_hash(attributes)
306
+ end
307
+
308
+ # Builds the object from hash
309
+ # @param [Hash] attributes Model attributes in the form of hash
310
+ # @return [Object] Returns the model itself
311
+ def build_from_hash(attributes)
312
+ return nil unless attributes.is_a?(Hash)
313
+ self.class.openapi_types.each_pair do |key, type|
314
+ if type =~ /\AArray<(.*)>/i
315
+ # check to ensure the input is an array given that the attribute
316
+ # is documented as an array but the input is not
317
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
318
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
319
+ end
320
+ elsif !attributes[self.class.attribute_map[key]].nil?
321
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
322
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
323
+ end
324
+
325
+ self
326
+ end
327
+
328
+ # Deserializes the data based on type
329
+ # @param string type Data type
330
+ # @param string value Value to be deserialized
331
+ # @return [Object] Deserialized data
332
+ def _deserialize(type, value)
333
+ case type.to_sym
334
+ when :DateTime
335
+ DateTime.parse(value)
336
+ when :Date
337
+ Date.parse(value)
338
+ when :String
339
+ value.to_s
340
+ when :Integer
341
+ value.to_i
342
+ when :Float
343
+ value.to_f
344
+ when :Boolean
345
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
346
+ true
347
+ else
348
+ false
349
+ end
350
+ when :Object
351
+ # generic object (usually a Hash), return directly
352
+ value
353
+ when /\AArray<(?<inner_type>.+)>\z/
354
+ inner_type = Regexp.last_match[:inner_type]
355
+ value.map { |v| _deserialize(inner_type, v) }
356
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
357
+ k_type = Regexp.last_match[:k_type]
358
+ v_type = Regexp.last_match[:v_type]
359
+ {}.tap do |hash|
360
+ value.each do |k, v|
361
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
362
+ end
363
+ end
364
+ else # model
365
+ KoronaCloudClient.const_get(type).build_from_hash(value)
366
+ end
367
+ end
368
+
369
+ # Returns the string representation of the object
370
+ # @return [String] String presentation of the object
371
+ def to_s
372
+ to_hash.to_s
373
+ end
374
+
375
+ # to_body is an alias to to_hash (backward compatibility)
376
+ # @return [Hash] Returns the object in the form of hash
377
+ def to_body
378
+ to_hash
379
+ end
380
+
381
+ # Returns the object in the form of hash
382
+ # @return [Hash] Returns the object in the form of hash
383
+ def to_hash
384
+ hash = {}
385
+ self.class.attribute_map.each_pair do |attr, param|
386
+ value = self.send(attr)
387
+ if value.nil?
388
+ is_nullable = self.class.openapi_nullable.include?(attr)
389
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
390
+ end
391
+
392
+ hash[param] = _to_hash(value)
393
+ end
394
+ hash
395
+ end
396
+
397
+ # Outputs non-array value in the form of hash
398
+ # For object, use to_hash. Otherwise, just return the value
399
+ # @param [Object] value Any valid value
400
+ # @return [Hash] Returns the value in the form of hash
401
+ def _to_hash(value)
402
+ if value.is_a?(Array)
403
+ value.compact.map { |v| _to_hash(v) }
404
+ elsif value.is_a?(Hash)
405
+ {}.tap do |hash|
406
+ value.each { |k, v| hash[k] = _to_hash(v) }
407
+ end
408
+ elsif value.respond_to? :to_hash
409
+ value.to_hash
410
+ else
411
+ value
412
+ end
413
+ end
414
+ end
415
+ end
@@ -0,0 +1,233 @@
1
+ =begin
2
+ #KORONA.cloud API v3
3
+
4
+ #Our api provides access to our cloud services
5
+
6
+ The version of the OpenAPI document: 2.14.7
7
+ Contact: support@combase.net
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module KoronaCloudClient
16
+ class FiscalUnitCertificateInfo
17
+ # log message certificate of the fiscal unit. Value can only be set on create and is not changable on update.
18
+ attr_accessor :data
19
+
20
+ attr_accessor :expiration_date
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'data' => :'data',
26
+ :'expiration_date' => :'expirationDate'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.openapi_types
32
+ {
33
+ :'data' => :'String',
34
+ :'expiration_date' => :'DateTime'
35
+ }
36
+ end
37
+
38
+ # List of attributes with nullable: true
39
+ def self.openapi_nullable
40
+ Set.new([
41
+ ])
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KoronaCloudClient::FiscalUnitCertificateInfo` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KoronaCloudClient::FiscalUnitCertificateInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'data')
60
+ self.data = attributes[:'data']
61
+ end
62
+
63
+ if attributes.key?(:'expiration_date')
64
+ self.expiration_date = attributes[:'expiration_date']
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ pattern = Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
73
+ if !@data.nil? && @data !~ pattern
74
+ invalid_properties.push("invalid value for \"data\", must conform to the pattern #{pattern}.")
75
+ end
76
+
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ return false if !@data.nil? && @data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
84
+ true
85
+ end
86
+
87
+ # Custom attribute writer method with validation
88
+ # @param [Object] data Value to be assigned
89
+ def data=(data)
90
+ pattern = Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
91
+ if !data.nil? && data !~ pattern
92
+ fail ArgumentError, "invalid value for \"data\", must conform to the pattern #{pattern}."
93
+ end
94
+
95
+ @data = data
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ data == o.data &&
104
+ expiration_date == o.expiration_date
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [data, expiration_date].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ self.class.openapi_types.each_pair do |key, type|
132
+ if type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :DateTime
153
+ DateTime.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ KoronaCloudClient.const_get(type).build_from_hash(value)
184
+ end
185
+ end
186
+
187
+ # Returns the string representation of the object
188
+ # @return [String] String presentation of the object
189
+ def to_s
190
+ to_hash.to_s
191
+ end
192
+
193
+ # to_body is an alias to to_hash (backward compatibility)
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_body
196
+ to_hash
197
+ end
198
+
199
+ # Returns the object in the form of hash
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ if value.nil?
206
+ is_nullable = self.class.openapi_nullable.include?(attr)
207
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
+ end
209
+
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map { |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+ end
233
+ end