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.
- checksums.yaml +4 -4
- data/README.md +71 -4
- data/docs/AddressInformation.md +2 -0
- data/docs/Cashier.md +16 -6
- data/docs/CashierRole.md +27 -0
- data/docs/CashierRolesApi.md +402 -0
- data/docs/CashiersApi.md +286 -2
- data/docs/CloudSubscriptionDetails.md +19 -0
- data/docs/CurrenciesApi.md +166 -0
- data/docs/Customer.md +5 -1
- data/docs/EconomicZonesApi.md +166 -0
- data/docs/FiscalTransaction.md +43 -0
- data/docs/FiscalUnit.md +51 -0
- data/docs/FiscalUnitCertificateInfo.md +19 -0
- data/docs/FiscalUnitState.md +27 -0
- data/docs/FiscalUnitStateUsageLevel.md +23 -0
- data/docs/FiscalUnitStateUsageLevelValue.md +19 -0
- data/docs/FiscalUnitStateVersionInfo.md +21 -0
- data/docs/FiscalUnitsApi.md +299 -0
- data/docs/InfoTextsApi.md +166 -0
- data/docs/KoronaAccount.md +2 -0
- data/docs/OrganizationalUnit.md +9 -7
- data/docs/PaymentMethod.md +2 -0
- data/docs/PointsOfSaleApi.md +6 -2
- data/docs/Pos.md +10 -4
- data/docs/PriceGroupsApi.md +166 -0
- data/docs/ProductionType.md +33 -0
- data/docs/ProductionTypesApi.md +294 -0
- data/docs/Receipt.md +18 -8
- data/docs/ReceiptItem.md +3 -1
- data/docs/ReceiptMaxRevisions.md +27 -0
- data/docs/ReceiptsApi.md +9 -3
- data/docs/ResultListCashierRole.md +27 -0
- data/docs/ResultListFiscalUnit.md +27 -0
- data/docs/ResultListProductionType.md +27 -0
- data/docs/ResultListStockOrder.md +27 -0
- data/docs/SalesTax.md +2 -0
- data/docs/SalesTaxesApi.md +166 -0
- data/docs/SectorsApi.md +54 -0
- data/docs/Service.md +19 -0
- data/docs/StockOrder.md +73 -0
- data/docs/StockOrderItem.md +39 -0
- data/docs/StockOrdersApi.md +195 -0
- data/docs/StockReceipt.md +4 -0
- data/docs/SuppliersApi.md +166 -0
- data/docs/TicketingApi.md +223 -3
- data/docs/VoidedReceiptItem.md +25 -0
- data/korona-cloud-client-1.0.1.gem +0 -0
- data/korona-cloud-client.gemspec +2 -2
- data/lib/korona-cloud-client.rb +24 -1
- data/lib/korona-cloud-client/api/accounts_api.rb +1 -1
- data/lib/korona-cloud-client/api/additional_receipt_info_types_api.rb +1 -1
- data/lib/korona-cloud-client/api/assortments_api.rb +1 -1
- data/lib/korona-cloud-client/api/cashier_roles_api.rb +513 -0
- data/lib/korona-cloud-client/api/cashiers_api.rb +366 -1
- data/lib/korona-cloud-client/api/commodity_groups_api.rb +1 -1
- data/lib/korona-cloud-client/api/currencies_api.rb +208 -1
- data/lib/korona-cloud-client/api/customer_groups_api.rb +1 -1
- data/lib/korona-cloud-client/api/customer_orders_api.rb +1 -1
- data/lib/korona-cloud-client/api/customers_api.rb +1 -1
- data/lib/korona-cloud-client/api/delivery_notes_api.rb +1 -1
- data/lib/korona-cloud-client/api/economic_zones_api.rb +208 -1
- data/lib/korona-cloud-client/api/external_system_calls_api.rb +1 -1
- data/lib/korona-cloud-client/api/fiscal_units_api.rb +389 -0
- data/lib/korona-cloud-client/api/images_api.rb +1 -1
- data/lib/korona-cloud-client/api/info_texts_api.rb +208 -1
- data/lib/korona-cloud-client/api/inventories_api.rb +1 -1
- data/lib/korona-cloud-client/api/korona_account_api.rb +1 -1
- data/lib/korona-cloud-client/api/organizational_units_api.rb +1 -1
- data/lib/korona-cloud-client/api/payment_methods_api.rb +1 -1
- data/lib/korona-cloud-client/api/points_of_sale_api.rb +7 -1
- data/lib/korona-cloud-client/api/price_groups_api.rb +208 -1
- data/lib/korona-cloud-client/api/production_types_api.rb +373 -0
- data/lib/korona-cloud-client/api/products_api.rb +1 -1
- data/lib/korona-cloud-client/api/receipts_api.rb +7 -1
- data/lib/korona-cloud-client/api/sales_taxes_api.rb +208 -1
- data/lib/korona-cloud-client/api/sectors_api.rb +69 -1
- data/lib/korona-cloud-client/api/statistics_api.rb +1 -1
- data/lib/korona-cloud-client/api/stock_orders_api.rb +257 -0
- data/lib/korona-cloud-client/api/stock_receipts_api.rb +1 -1
- data/lib/korona-cloud-client/api/suppliers_api.rb +208 -1
- data/lib/korona-cloud-client/api/tags_api.rb +1 -1
- data/lib/korona-cloud-client/api/ticket_creation_api.rb +1 -1
- data/lib/korona-cloud-client/api/ticketing_api.rb +277 -4
- data/lib/korona-cloud-client/api/time_tracking_api.rb +1 -1
- data/lib/korona-cloud-client/api_client.rb +1 -1
- data/lib/korona-cloud-client/api_error.rb +1 -1
- data/lib/korona-cloud-client/configuration.rb +1 -1
- data/lib/korona-cloud-client/models/account.rb +1 -1
- data/lib/korona-cloud-client/models/account_summary.rb +1 -1
- data/lib/korona-cloud-client/models/account_transaction.rb +1 -1
- data/lib/korona-cloud-client/models/add_or_update_result.rb +1 -1
- data/lib/korona-cloud-client/models/additional_info.rb +1 -1
- data/lib/korona-cloud-client/models/additional_receipt_info_type.rb +1 -1
- data/lib/korona-cloud-client/models/address_information.rb +11 -2
- data/lib/korona-cloud-client/models/admission.rb +1 -1
- data/lib/korona-cloud-client/models/amount.rb +1 -1
- data/lib/korona-cloud-client/models/amount_count_data.rb +1 -1
- data/lib/korona-cloud-client/models/assortment.rb +1 -1
- data/lib/korona-cloud-client/models/attendance.rb +1 -1
- data/lib/korona-cloud-client/models/bad_request_error.rb +1 -1
- data/lib/korona-cloud-client/models/capacity.rb +1 -1
- data/lib/korona-cloud-client/models/cashier.rb +55 -10
- data/lib/korona-cloud-client/models/cashier_role.rb +279 -0
- data/lib/korona-cloud-client/models/cashier_summary.rb +1 -1
- data/lib/korona-cloud-client/models/category.rb +1 -1
- data/lib/korona-cloud-client/models/cloud_subscription.rb +1 -1
- data/lib/korona-cloud-client/models/cloud_subscription_details.rb +249 -0
- data/lib/korona-cloud-client/models/commodity_group.rb +1 -1
- data/lib/korona-cloud-client/models/commodity_group_summary.rb +1 -1
- data/lib/korona-cloud-client/models/company_identification.rb +1 -1
- data/lib/korona-cloud-client/models/creation_task.rb +1 -1
- data/lib/korona-cloud-client/models/currency.rb +1 -1
- data/lib/korona-cloud-client/models/currency_denomination.rb +1 -1
- data/lib/korona-cloud-client/models/currency_exchange_rate.rb +1 -1
- data/lib/korona-cloud-client/models/customer.rb +23 -5
- data/lib/korona-cloud-client/models/customer_card.rb +1 -1
- data/lib/korona-cloud-client/models/customer_data.rb +1 -1
- data/lib/korona-cloud-client/models/customer_group.rb +1 -1
- data/lib/korona-cloud-client/models/customer_group_summary.rb +1 -1
- data/lib/korona-cloud-client/models/customer_information.rb +1 -1
- data/lib/korona-cloud-client/models/customer_order.rb +1 -1
- data/lib/korona-cloud-client/models/day_rating.rb +1 -1
- data/lib/korona-cloud-client/models/day_time_period.rb +1 -1
- data/lib/korona-cloud-client/models/delivery_note.rb +1 -1
- data/lib/korona-cloud-client/models/delivery_note_item.rb +1 -1
- data/lib/korona-cloud-client/models/deposit.rb +1 -1
- data/lib/korona-cloud-client/models/device_information.rb +1 -1
- data/lib/korona-cloud-client/models/discount.rb +1 -1
- data/lib/korona-cloud-client/models/economic_zone.rb +1 -1
- data/lib/korona-cloud-client/models/end_of_day_statement.rb +1 -1
- data/lib/korona-cloud-client/models/end_of_day_statement_summary.rb +1 -1
- data/lib/korona-cloud-client/models/entry_gate.rb +1 -1
- data/lib/korona-cloud-client/models/event.rb +1 -1
- data/lib/korona-cloud-client/models/external_system_call.rb +1 -1
- data/lib/korona-cloud-client/models/fiscal_transaction.rb +342 -0
- data/lib/korona-cloud-client/models/fiscal_unit.rb +415 -0
- data/lib/korona-cloud-client/models/fiscal_unit_certificate_info.rb +233 -0
- data/lib/korona-cloud-client/models/fiscal_unit_state.rb +287 -0
- data/lib/korona-cloud-client/models/fiscal_unit_state_usage_level.rb +233 -0
- data/lib/korona-cloud-client/models/fiscal_unit_state_usage_level_value.rb +215 -0
- data/lib/korona-cloud-client/models/fiscal_unit_state_version_info.rb +224 -0
- data/lib/korona-cloud-client/models/forbidden_error.rb +1 -1
- data/lib/korona-cloud-client/models/geo_location.rb +1 -1
- data/lib/korona-cloud-client/models/info_text.rb +1 -1
- data/lib/korona-cloud-client/models/interval.rb +1 -1
- data/lib/korona-cloud-client/models/inventory.rb +1 -1
- data/lib/korona-cloud-client/models/inventory_list.rb +1 -1
- data/lib/korona-cloud-client/models/inventory_list_item.rb +1 -1
- data/lib/korona-cloud-client/models/inventory_list_item_stock.rb +1 -1
- data/lib/korona-cloud-client/models/korona_account.rb +13 -2
- data/lib/korona-cloud-client/models/media_url.rb +1 -1
- data/lib/korona-cloud-client/models/method_not_allowed_error.rb +1 -1
- data/lib/korona-cloud-client/models/model_reference.rb +1 -1
- data/lib/korona-cloud-client/models/not_found_error.rb +1 -1
- data/lib/korona-cloud-client/models/opening_hours.rb +1 -1
- data/lib/korona-cloud-client/models/organizational_unit.rb +43 -34
- data/lib/korona-cloud-client/models/payment.rb +1 -1
- data/lib/korona-cloud-client/models/payment_method.rb +11 -2
- data/lib/korona-cloud-client/models/payment_summary.rb +1 -1
- data/lib/korona-cloud-client/models/period.rb +1 -1
- data/lib/korona-cloud-client/models/period_list_top_seller.rb +1 -1
- data/lib/korona-cloud-client/models/period_map_string_revenue_data.rb +1 -1
- data/lib/korona-cloud-client/models/period_object.rb +1 -1
- data/lib/korona-cloud-client/models/period_revenue_data.rb +1 -1
- data/lib/korona-cloud-client/models/pos.rb +44 -17
- data/lib/korona-cloud-client/models/price_group.rb +1 -1
- data/lib/korona-cloud-client/models/product.rb +1 -1
- data/lib/korona-cloud-client/models/product_code.rb +1 -1
- data/lib/korona-cloud-client/models/product_description.rb +1 -1
- data/lib/korona-cloud-client/models/product_price.rb +1 -1
- data/lib/korona-cloud-client/models/product_stock.rb +1 -1
- data/lib/korona-cloud-client/models/product_subproduct.rb +1 -1
- data/lib/korona-cloud-client/models/product_supplier_price.rb +1 -1
- data/lib/korona-cloud-client/models/product_transfer_involved_party_information.rb +1 -1
- data/lib/korona-cloud-client/models/product_transfer_involved_party_information_data.rb +1 -1
- data/lib/korona-cloud-client/models/production_type.rb +328 -0
- data/lib/korona-cloud-client/models/rating.rb +1 -1
- data/lib/korona-cloud-client/models/receipt.rb +82 -31
- data/lib/korona-cloud-client/models/receipt_item.rb +14 -5
- data/lib/korona-cloud-client/models/receipt_max_revisions.rb +251 -0
- data/lib/korona-cloud-client/models/result_list.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_account.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_additional_receipt_info_type.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_assortment.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_attendance.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_cashier.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_cashier_role.rb +291 -0
- data/lib/korona-cloud-client/models/result_list_commodity_group.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_creation_task.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_currency.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_customer.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_customer_group.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_customer_order.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_day_rating.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_delivery_note.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_economic_zone.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_end_of_day_statement.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_entry_gate.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_event.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_external_system_call.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_fiscal_unit.rb +291 -0
- data/lib/korona-cloud-client/models/result_list_info_text.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_inventory.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_inventory_list.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_inventory_list_item.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_organizational_unit.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_payment_method.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_pos.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_price_group.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_product.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_product_stock.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_production_type.rb +291 -0
- data/lib/korona-cloud-client/models/result_list_receipt.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_sales_tax.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_sector.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_stock_order.rb +291 -0
- data/lib/korona-cloud-client/models/result_list_stock_receipt.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_stock_receipt_item.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_supplier.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_tag.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_ticket.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_ticket_definition.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_time_tracking_entity.rb +1 -1
- data/lib/korona-cloud-client/models/result_list_time_tracking_entry.rb +1 -1
- data/lib/korona-cloud-client/models/revenue_data.rb +1 -1
- data/lib/korona-cloud-client/models/sales_tax.rb +45 -2
- data/lib/korona-cloud-client/models/sales_tax_rate.rb +1 -1
- data/lib/korona-cloud-client/models/sector.rb +1 -1
- data/lib/korona-cloud-client/models/sector_revenue_account_item.rb +1 -1
- data/lib/korona-cloud-client/models/sector_sales_tax_item.rb +1 -1
- data/lib/korona-cloud-client/models/service.rb +249 -0
- data/lib/korona-cloud-client/models/signature.rb +1 -1
- data/lib/korona-cloud-client/models/statistic.rb +1 -1
- data/lib/korona-cloud-client/models/statistic_list_top_seller.rb +1 -1
- data/lib/korona-cloud-client/models/statistic_map_string_revenue_data.rb +1 -1
- data/lib/korona-cloud-client/models/statistic_revenue_data.rb +1 -1
- data/lib/korona-cloud-client/models/stock_order.rb +498 -0
- data/lib/korona-cloud-client/models/stock_order_item.rb +305 -0
- data/lib/korona-cloud-client/models/stock_receipt.rb +20 -2
- data/lib/korona-cloud-client/models/stock_receipt_item.rb +1 -1
- data/lib/korona-cloud-client/models/stock_receipt_item_amount.rb +1 -1
- data/lib/korona-cloud-client/models/stock_receipt_item_identification.rb +1 -1
- data/lib/korona-cloud-client/models/stock_receipt_item_purchase_price.rb +1 -1
- data/lib/korona-cloud-client/models/supplier.rb +1 -1
- data/lib/korona-cloud-client/models/supplier_contact.rb +1 -1
- data/lib/korona-cloud-client/models/supplier_contact_person.rb +1 -1
- data/lib/korona-cloud-client/models/supplier_payment_information.rb +1 -1
- data/lib/korona-cloud-client/models/tag.rb +1 -1
- data/lib/korona-cloud-client/models/tax_payment.rb +1 -1
- data/lib/korona-cloud-client/models/tax_summary.rb +1 -1
- data/lib/korona-cloud-client/models/ticket.rb +1 -1
- data/lib/korona-cloud-client/models/ticket_data.rb +1 -1
- data/lib/korona-cloud-client/models/ticket_definition.rb +1 -1
- data/lib/korona-cloud-client/models/ticket_personalization.rb +1 -1
- data/lib/korona-cloud-client/models/time_period.rb +1 -1
- data/lib/korona-cloud-client/models/time_tracking_entity.rb +1 -1
- data/lib/korona-cloud-client/models/time_tracking_entry.rb +1 -1
- data/lib/korona-cloud-client/models/too_many_requests_error.rb +1 -1
- data/lib/korona-cloud-client/models/top_seller.rb +1 -1
- data/lib/korona-cloud-client/models/total_period.rb +1 -1
- data/lib/korona-cloud-client/models/total_price.rb +1 -1
- data/lib/korona-cloud-client/models/validity.rb +1 -1
- data/lib/korona-cloud-client/models/voided_receipt_item.rb +242 -0
- data/lib/korona-cloud-client/models/weather.rb +1 -1
- data/lib/korona-cloud-client/version.rb +2 -2
- data/spec/api/cashier_roles_api_spec.rb +126 -0
- data/spec/api/fiscal_units_api_spec.rb +104 -0
- data/spec/api/production_types_api_spec.rb +101 -0
- data/spec/api/stock_orders_api_spec.rb +83 -0
- data/spec/models/cashier_role_spec.rb +75 -0
- data/spec/models/cloud_subscription_details_spec.rb +51 -0
- data/spec/models/fiscal_transaction_spec.rb +119 -0
- data/spec/models/fiscal_unit_certificate_info_spec.rb +47 -0
- data/spec/models/fiscal_unit_spec.rb +147 -0
- data/spec/models/fiscal_unit_state_spec.rb +75 -0
- data/spec/models/fiscal_unit_state_usage_level_spec.rb +59 -0
- data/spec/models/fiscal_unit_state_usage_level_value_spec.rb +47 -0
- data/spec/models/fiscal_unit_state_version_info_spec.rb +53 -0
- data/spec/models/production_type_spec.rb +97 -0
- data/spec/models/receipt_max_revisions_spec.rb +71 -0
- data/spec/models/result_list_cashier_role_spec.rb +71 -0
- data/spec/models/result_list_fiscal_unit_spec.rb +71 -0
- data/spec/models/result_list_production_type_spec.rb +71 -0
- data/spec/models/result_list_stock_order_spec.rb +71 -0
- data/spec/models/service_spec.rb +51 -0
- data/spec/models/stock_order_item_spec.rb +107 -0
- data/spec/models/stock_order_spec.rb +213 -0
- data/spec/models/voided_receipt_item_spec.rb +65 -0
- metadata +96 -3
@@ -0,0 +1,287 @@
|
|
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 FiscalUnitState
|
17
|
+
attr_accessor :additional_information
|
18
|
+
|
19
|
+
attr_accessor :error_description
|
20
|
+
|
21
|
+
attr_accessor :setup_failed
|
22
|
+
|
23
|
+
attr_accessor :usage_level
|
24
|
+
|
25
|
+
attr_accessor :versions
|
26
|
+
|
27
|
+
attr_accessor :working_state
|
28
|
+
|
29
|
+
class EnumAttributeValidator
|
30
|
+
attr_reader :datatype
|
31
|
+
attr_reader :allowable_values
|
32
|
+
|
33
|
+
def initialize(datatype, allowable_values)
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
35
|
+
case datatype.to_s
|
36
|
+
when /Integer/i
|
37
|
+
value.to_i
|
38
|
+
when /Float/i
|
39
|
+
value.to_f
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def valid?(value)
|
47
|
+
!value || allowable_values.include?(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'additional_information' => :'additionalInformation',
|
55
|
+
:'error_description' => :'errorDescription',
|
56
|
+
:'setup_failed' => :'setupFailed',
|
57
|
+
:'usage_level' => :'usageLevel',
|
58
|
+
:'versions' => :'versions',
|
59
|
+
:'working_state' => :'workingState'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.openapi_types
|
65
|
+
{
|
66
|
+
:'additional_information' => :'Hash<String, String>',
|
67
|
+
:'error_description' => :'String',
|
68
|
+
:'setup_failed' => :'Boolean',
|
69
|
+
:'usage_level' => :'FiscalUnitStateUsageLevel',
|
70
|
+
:'versions' => :'FiscalUnitStateVersionInfo',
|
71
|
+
:'working_state' => :'String'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# List of attributes with nullable: true
|
76
|
+
def self.openapi_nullable
|
77
|
+
Set.new([
|
78
|
+
])
|
79
|
+
end
|
80
|
+
|
81
|
+
# Initializes the object
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
def initialize(attributes = {})
|
84
|
+
if (!attributes.is_a?(Hash))
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `KoronaCloudClient::FiscalUnitState` initialize method"
|
86
|
+
end
|
87
|
+
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
90
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `KoronaCloudClient::FiscalUnitState`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
92
|
+
end
|
93
|
+
h[k.to_sym] = v
|
94
|
+
}
|
95
|
+
|
96
|
+
if attributes.key?(:'additional_information')
|
97
|
+
if (value = attributes[:'additional_information']).is_a?(Hash)
|
98
|
+
self.additional_information = value
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'error_description')
|
103
|
+
self.error_description = attributes[:'error_description']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'setup_failed')
|
107
|
+
self.setup_failed = attributes[:'setup_failed']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'usage_level')
|
111
|
+
self.usage_level = attributes[:'usage_level']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'versions')
|
115
|
+
self.versions = attributes[:'versions']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'working_state')
|
119
|
+
self.working_state = attributes[:'working_state']
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
124
|
+
# @return Array for valid properties with the reasons
|
125
|
+
def list_invalid_properties
|
126
|
+
invalid_properties = Array.new
|
127
|
+
invalid_properties
|
128
|
+
end
|
129
|
+
|
130
|
+
# Check to see if the all the properties in the model are valid
|
131
|
+
# @return true if the model is valid
|
132
|
+
def valid?
|
133
|
+
working_state_validator = EnumAttributeValidator.new('String', ["DECOMMISSIONED", "INITIALIZED", "UNINITIALIZED"])
|
134
|
+
return false unless working_state_validator.valid?(@working_state)
|
135
|
+
true
|
136
|
+
end
|
137
|
+
|
138
|
+
# Custom attribute writer method checking allowed values (enum).
|
139
|
+
# @param [Object] working_state Object to be assigned
|
140
|
+
def working_state=(working_state)
|
141
|
+
validator = EnumAttributeValidator.new('String', ["DECOMMISSIONED", "INITIALIZED", "UNINITIALIZED"])
|
142
|
+
unless validator.valid?(working_state)
|
143
|
+
fail ArgumentError, "invalid value for \"working_state\", must be one of #{validator.allowable_values}."
|
144
|
+
end
|
145
|
+
@working_state = working_state
|
146
|
+
end
|
147
|
+
|
148
|
+
# Checks equality by comparing each attribute.
|
149
|
+
# @param [Object] Object to be compared
|
150
|
+
def ==(o)
|
151
|
+
return true if self.equal?(o)
|
152
|
+
self.class == o.class &&
|
153
|
+
additional_information == o.additional_information &&
|
154
|
+
error_description == o.error_description &&
|
155
|
+
setup_failed == o.setup_failed &&
|
156
|
+
usage_level == o.usage_level &&
|
157
|
+
versions == o.versions &&
|
158
|
+
working_state == o.working_state
|
159
|
+
end
|
160
|
+
|
161
|
+
# @see the `==` method
|
162
|
+
# @param [Object] Object to be compared
|
163
|
+
def eql?(o)
|
164
|
+
self == o
|
165
|
+
end
|
166
|
+
|
167
|
+
# Calculates hash code according to all attributes.
|
168
|
+
# @return [Integer] Hash code
|
169
|
+
def hash
|
170
|
+
[additional_information, error_description, setup_failed, usage_level, versions, working_state].hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Builds the object from hash
|
174
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
175
|
+
# @return [Object] Returns the model itself
|
176
|
+
def self.build_from_hash(attributes)
|
177
|
+
new.build_from_hash(attributes)
|
178
|
+
end
|
179
|
+
|
180
|
+
# Builds the object from hash
|
181
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
182
|
+
# @return [Object] Returns the model itself
|
183
|
+
def build_from_hash(attributes)
|
184
|
+
return nil unless attributes.is_a?(Hash)
|
185
|
+
self.class.openapi_types.each_pair do |key, type|
|
186
|
+
if type =~ /\AArray<(.*)>/i
|
187
|
+
# check to ensure the input is an array given that the attribute
|
188
|
+
# is documented as an array but the input is not
|
189
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
190
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
191
|
+
end
|
192
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
193
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
194
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
195
|
+
end
|
196
|
+
|
197
|
+
self
|
198
|
+
end
|
199
|
+
|
200
|
+
# Deserializes the data based on type
|
201
|
+
# @param string type Data type
|
202
|
+
# @param string value Value to be deserialized
|
203
|
+
# @return [Object] Deserialized data
|
204
|
+
def _deserialize(type, value)
|
205
|
+
case type.to_sym
|
206
|
+
when :DateTime
|
207
|
+
DateTime.parse(value)
|
208
|
+
when :Date
|
209
|
+
Date.parse(value)
|
210
|
+
when :String
|
211
|
+
value.to_s
|
212
|
+
when :Integer
|
213
|
+
value.to_i
|
214
|
+
when :Float
|
215
|
+
value.to_f
|
216
|
+
when :Boolean
|
217
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
218
|
+
true
|
219
|
+
else
|
220
|
+
false
|
221
|
+
end
|
222
|
+
when :Object
|
223
|
+
# generic object (usually a Hash), return directly
|
224
|
+
value
|
225
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
226
|
+
inner_type = Regexp.last_match[:inner_type]
|
227
|
+
value.map { |v| _deserialize(inner_type, v) }
|
228
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
229
|
+
k_type = Regexp.last_match[:k_type]
|
230
|
+
v_type = Regexp.last_match[:v_type]
|
231
|
+
{}.tap do |hash|
|
232
|
+
value.each do |k, v|
|
233
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
else # model
|
237
|
+
KoronaCloudClient.const_get(type).build_from_hash(value)
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
# Returns the string representation of the object
|
242
|
+
# @return [String] String presentation of the object
|
243
|
+
def to_s
|
244
|
+
to_hash.to_s
|
245
|
+
end
|
246
|
+
|
247
|
+
# to_body is an alias to to_hash (backward compatibility)
|
248
|
+
# @return [Hash] Returns the object in the form of hash
|
249
|
+
def to_body
|
250
|
+
to_hash
|
251
|
+
end
|
252
|
+
|
253
|
+
# Returns the object in the form of hash
|
254
|
+
# @return [Hash] Returns the object in the form of hash
|
255
|
+
def to_hash
|
256
|
+
hash = {}
|
257
|
+
self.class.attribute_map.each_pair do |attr, param|
|
258
|
+
value = self.send(attr)
|
259
|
+
if value.nil?
|
260
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
261
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
262
|
+
end
|
263
|
+
|
264
|
+
hash[param] = _to_hash(value)
|
265
|
+
end
|
266
|
+
hash
|
267
|
+
end
|
268
|
+
|
269
|
+
# Outputs non-array value in the form of hash
|
270
|
+
# For object, use to_hash. Otherwise, just return the value
|
271
|
+
# @param [Object] value Any valid value
|
272
|
+
# @return [Hash] Returns the value in the form of hash
|
273
|
+
def _to_hash(value)
|
274
|
+
if value.is_a?(Array)
|
275
|
+
value.compact.map { |v| _to_hash(v) }
|
276
|
+
elsif value.is_a?(Hash)
|
277
|
+
{}.tap do |hash|
|
278
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
279
|
+
end
|
280
|
+
elsif value.respond_to? :to_hash
|
281
|
+
value.to_hash
|
282
|
+
else
|
283
|
+
value
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|
287
|
+
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 FiscalUnitStateUsageLevel
|
17
|
+
attr_accessor :registered_clients
|
18
|
+
|
19
|
+
attr_accessor :created_signatures
|
20
|
+
|
21
|
+
attr_accessor :stored_bytes
|
22
|
+
|
23
|
+
attr_accessor :unfinished_transactions
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'registered_clients' => :'registeredClients',
|
29
|
+
:'created_signatures' => :'createdSignatures',
|
30
|
+
:'stored_bytes' => :'storedBytes',
|
31
|
+
:'unfinished_transactions' => :'unfinishedTransactions'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'registered_clients' => :'FiscalUnitStateUsageLevelValue',
|
39
|
+
:'created_signatures' => :'FiscalUnitStateUsageLevelValue',
|
40
|
+
:'stored_bytes' => :'FiscalUnitStateUsageLevelValue',
|
41
|
+
:'unfinished_transactions' => :'FiscalUnitStateUsageLevelValue'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `KoronaCloudClient::FiscalUnitStateUsageLevel` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `KoronaCloudClient::FiscalUnitStateUsageLevel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'registered_clients')
|
67
|
+
self.registered_clients = attributes[:'registered_clients']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'created_signatures')
|
71
|
+
self.created_signatures = attributes[:'created_signatures']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'stored_bytes')
|
75
|
+
self.stored_bytes = attributes[:'stored_bytes']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'unfinished_transactions')
|
79
|
+
self.unfinished_transactions = attributes[:'unfinished_transactions']
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
84
|
+
# @return Array for valid properties with the reasons
|
85
|
+
def list_invalid_properties
|
86
|
+
invalid_properties = Array.new
|
87
|
+
invalid_properties
|
88
|
+
end
|
89
|
+
|
90
|
+
# Check to see if the all the properties in the model are valid
|
91
|
+
# @return true if the model is valid
|
92
|
+
def valid?
|
93
|
+
true
|
94
|
+
end
|
95
|
+
|
96
|
+
# Checks equality by comparing each attribute.
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def ==(o)
|
99
|
+
return true if self.equal?(o)
|
100
|
+
self.class == o.class &&
|
101
|
+
registered_clients == o.registered_clients &&
|
102
|
+
created_signatures == o.created_signatures &&
|
103
|
+
stored_bytes == o.stored_bytes &&
|
104
|
+
unfinished_transactions == o.unfinished_transactions
|
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
|
+
[registered_clients, created_signatures, stored_bytes, unfinished_transactions].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
|