korona_client 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -0
- data/README.md +332 -0
- data/Rakefile +8 -0
- data/docs/Account.md +19 -0
- data/docs/AccountSummary.md +10 -0
- data/docs/AccountTransaction.md +11 -0
- data/docs/AccountsApi.md +131 -0
- data/docs/AddOrUpdateResult.md +13 -0
- data/docs/AddressInformation.md +14 -0
- data/docs/Admission.md +9 -0
- data/docs/Amount.md +12 -0
- data/docs/AmountCountData.md +9 -0
- data/docs/Assortment.md +15 -0
- data/docs/AssortmentsApi.md +254 -0
- data/docs/BadRequestError.md +9 -0
- data/docs/Capacity.md +9 -0
- data/docs/Cashier.md +20 -0
- data/docs/CashierSummary.md +13 -0
- data/docs/CashiersApi.md +131 -0
- data/docs/Category.md +9 -0
- data/docs/CloudSubscription.md +9 -0
- data/docs/CommodityGroup.md +13 -0
- data/docs/CommodityGroupSummary.md +11 -0
- data/docs/CompanyIdentification.md +9 -0
- data/docs/CurrenciesApi.md +131 -0
- data/docs/Currency.md +19 -0
- data/docs/CurrencyDenomination.md +9 -0
- data/docs/CurrencyExchangeRate.md +9 -0
- data/docs/Customer.md +26 -0
- data/docs/CustomerCard.md +9 -0
- data/docs/CustomerData.md +9 -0
- data/docs/CustomerGroup.md +13 -0
- data/docs/CustomerGroupSummary.md +11 -0
- data/docs/CustomerGroupsApi.md +131 -0
- data/docs/CustomerInformation.md +10 -0
- data/docs/CustomerOrder.md +26 -0
- data/docs/CustomerOrdersApi.md +368 -0
- data/docs/CustomersApi.md +360 -0
- data/docs/DayRating.md +17 -0
- data/docs/DeviceInformation.md +9 -0
- data/docs/EconomicZone.md +12 -0
- data/docs/EconomicZonesApi.md +131 -0
- data/docs/EndOfDayStatement.md +16 -0
- data/docs/EndOfDayStatementSummary.md +13 -0
- data/docs/EntryGate.md +14 -0
- data/docs/Event.md +17 -0
- data/docs/ForbiddenError.md +9 -0
- data/docs/GeoLocation.md +9 -0
- data/docs/ImagesApi.md +64 -0
- data/docs/InfoText.md +13 -0
- data/docs/InfoTextsApi.md +131 -0
- data/docs/Interval.md +9 -0
- data/docs/InventoriesKORONARetailApi.md +890 -0
- data/docs/Inventory.md +26 -0
- data/docs/InventoryList.md +22 -0
- data/docs/InventoryListItem.md +13 -0
- data/docs/InventoryListItemStock.md +9 -0
- data/docs/KoronaAccount.md +16 -0
- data/docs/KoronaAccountApi.md +62 -0
- data/docs/MethodNotAllowedError.md +9 -0
- data/docs/ModelReference.md +10 -0
- data/docs/NotFoundError.md +9 -0
- data/docs/OrganizationalUnit.md +17 -0
- data/docs/OrganizationalUnitsApi.md +724 -0
- data/docs/Payment.md +12 -0
- data/docs/PaymentMethod.md +17 -0
- data/docs/PaymentMethodsApi.md +131 -0
- data/docs/PaymentSummary.md +10 -0
- data/docs/Period.md +10 -0
- data/docs/PeriodListTopSeller.md +10 -0
- data/docs/PeriodMapStringRevenueData.md +10 -0
- data/docs/PeriodObject.md +10 -0
- data/docs/PeriodRevenueData.md +10 -0
- data/docs/PointsOfSaleApi.md +537 -0
- data/docs/Pos.md +25 -0
- data/docs/PriceGroup.md +14 -0
- data/docs/PriceGroupsApi.md +131 -0
- data/docs/Product.md +49 -0
- data/docs/ProductCode.md +9 -0
- data/docs/ProductDescription.md +9 -0
- data/docs/ProductPrice.md +12 -0
- data/docs/ProductStock.md +12 -0
- data/docs/ProductSubproduct.md +10 -0
- data/docs/ProductSupplierPrice.md +12 -0
- data/docs/ProductTransferInvolvedPartyInformation.md +13 -0
- data/docs/ProductTransferInvolvedPartyInformationData.md +10 -0
- data/docs/ProductsApi.md +435 -0
- data/docs/Rating.md +10 -0
- data/docs/Receipt.md +28 -0
- data/docs/ReceiptItem.md +16 -0
- data/docs/ReceiptsApi.md +139 -0
- data/docs/ResultList.md +13 -0
- data/docs/ResultListAccount.md +13 -0
- data/docs/ResultListAssortment.md +13 -0
- data/docs/ResultListCashier.md +13 -0
- data/docs/ResultListCommodityGroup.md +13 -0
- data/docs/ResultListCurrency.md +13 -0
- data/docs/ResultListCustomer.md +13 -0
- data/docs/ResultListCustomerGroup.md +13 -0
- data/docs/ResultListCustomerOrder.md +13 -0
- data/docs/ResultListDayRating.md +13 -0
- data/docs/ResultListEconomicZone.md +13 -0
- data/docs/ResultListEndOfDayStatement.md +13 -0
- data/docs/ResultListEntryGate.md +13 -0
- data/docs/ResultListEvent.md +13 -0
- data/docs/ResultListInfoText.md +13 -0
- data/docs/ResultListInventory.md +13 -0
- data/docs/ResultListInventoryList.md +13 -0
- data/docs/ResultListInventoryListItem.md +13 -0
- data/docs/ResultListOrganizationalUnit.md +13 -0
- data/docs/ResultListPaymentMethod.md +13 -0
- data/docs/ResultListPos.md +13 -0
- data/docs/ResultListPriceGroup.md +13 -0
- data/docs/ResultListProduct.md +13 -0
- data/docs/ResultListProductStock.md +13 -0
- data/docs/ResultListReceipt.md +13 -0
- data/docs/ResultListSalesTax.md +13 -0
- data/docs/ResultListSector.md +13 -0
- data/docs/ResultListStockReceipt.md +13 -0
- data/docs/ResultListStockReceiptItem.md +13 -0
- data/docs/ResultListSupplier.md +13 -0
- data/docs/ResultListTag.md +13 -0
- data/docs/ResultListTicketDefinition.md +13 -0
- data/docs/RevenueData.md +12 -0
- data/docs/SalesTax.md +15 -0
- data/docs/SalesTaxRate.md +9 -0
- data/docs/SalesTaxesApi.md +131 -0
- data/docs/Sector.md +13 -0
- data/docs/SectorSalesTaxItem.md +9 -0
- data/docs/SectorsApi.md +131 -0
- data/docs/Statistic.md +10 -0
- data/docs/StatisticListTopSeller.md +10 -0
- data/docs/StatisticMapStringRevenueData.md +10 -0
- data/docs/StatisticRevenueData.md +10 -0
- data/docs/StatisticsApi.md +250 -0
- data/docs/StockReceipt.md +28 -0
- data/docs/StockReceiptItem.md +14 -0
- data/docs/StockReceiptItemAmount.md +9 -0
- data/docs/StockReceiptItemIdentification.md +10 -0
- data/docs/StockReceiptItemPurchasePrice.md +9 -0
- data/docs/StockReceiptsKORONARetailApi.md +629 -0
- data/docs/Supplier.md +19 -0
- data/docs/SupplierContact.md +11 -0
- data/docs/SupplierContactPerson.md +14 -0
- data/docs/SupplierPaymentInformation.md +16 -0
- data/docs/SuppliersApi.md +131 -0
- data/docs/Tag.md +12 -0
- data/docs/TagsApi.md +131 -0
- data/docs/TaxPayment.md +11 -0
- data/docs/TaxSummary.md +10 -0
- data/docs/TicketDefinition.md +19 -0
- data/docs/TicketingApi.md +377 -0
- data/docs/TimePeriod.md +14 -0
- data/docs/TooManyRequestsError.md +9 -0
- data/docs/TopSeller.md +12 -0
- data/docs/TotalPrice.md +12 -0
- data/docs/Weather.md +10 -0
- data/git_push.sh +55 -0
- data/korona_client.gemspec +46 -0
- data/lib/korona_client.rb +193 -0
- data/lib/korona_client/api/accounts_api.rb +154 -0
- data/lib/korona_client/api/assortments_api.rb +285 -0
- data/lib/korona_client/api/cashiers_api.rb +154 -0
- data/lib/korona_client/api/currencies_api.rb +154 -0
- data/lib/korona_client/api/customer_groups_api.rb +154 -0
- data/lib/korona_client/api/customer_orders_api.rb +414 -0
- data/lib/korona_client/api/customers_api.rb +402 -0
- data/lib/korona_client/api/economic_zones_api.rb +154 -0
- data/lib/korona_client/api/images_api.rb +81 -0
- data/lib/korona_client/api/info_texts_api.rb +154 -0
- data/lib/korona_client/api/inventories_korona_retail_api.rb +1022 -0
- data/lib/korona_client/api/korona_account_api.rb +78 -0
- data/lib/korona_client/api/organizational_units_api.rb +827 -0
- data/lib/korona_client/api/payment_methods_api.rb +154 -0
- data/lib/korona_client/api/points_of_sale_api.rb +604 -0
- data/lib/korona_client/api/price_groups_api.rb +154 -0
- data/lib/korona_client/api/products_api.rb +487 -0
- data/lib/korona_client/api/receipts_api.rb +166 -0
- data/lib/korona_client/api/sales_taxes_api.rb +154 -0
- data/lib/korona_client/api/sectors_api.rb +154 -0
- data/lib/korona_client/api/statistics_api.rb +282 -0
- data/lib/korona_client/api/stock_receipts_korona_retail_api.rb +717 -0
- data/lib/korona_client/api/suppliers_api.rb +154 -0
- data/lib/korona_client/api/tags_api.rb +154 -0
- data/lib/korona_client/api/ticketing_api.rb +416 -0
- data/lib/korona_client/api_client.rb +389 -0
- data/lib/korona_client/api_error.rb +38 -0
- data/lib/korona_client/configuration.rb +209 -0
- data/lib/korona_client/models/account.rb +324 -0
- data/lib/korona_client/models/account_summary.rb +206 -0
- data/lib/korona_client/models/account_transaction.rb +215 -0
- data/lib/korona_client/models/add_or_update_result.rb +278 -0
- data/lib/korona_client/models/address_information.rb +242 -0
- data/lib/korona_client/models/admission.rb +197 -0
- data/lib/korona_client/models/amount.rb +224 -0
- data/lib/korona_client/models/amount_count_data.rb +197 -0
- data/lib/korona_client/models/assortment.rb +255 -0
- data/lib/korona_client/models/bad_request_error.rb +232 -0
- data/lib/korona_client/models/capacity.rb +197 -0
- data/lib/korona_client/models/cashier.rb +337 -0
- data/lib/korona_client/models/cashier_summary.rb +233 -0
- data/lib/korona_client/models/category.rb +197 -0
- data/lib/korona_client/models/cloud_subscription.rb +230 -0
- data/lib/korona_client/models/commodity_group.rb +237 -0
- data/lib/korona_client/models/commodity_group_summary.rb +215 -0
- data/lib/korona_client/models/company_identification.rb +197 -0
- data/lib/korona_client/models/currency.rb +295 -0
- data/lib/korona_client/models/currency_denomination.rb +230 -0
- data/lib/korona_client/models/currency_exchange_rate.rb +197 -0
- data/lib/korona_client/models/customer.rb +391 -0
- data/lib/korona_client/models/customer_card.rb +230 -0
- data/lib/korona_client/models/customer_data.rb +197 -0
- data/lib/korona_client/models/customer_group.rb +237 -0
- data/lib/korona_client/models/customer_group_summary.rb +215 -0
- data/lib/korona_client/models/customer_information.rb +206 -0
- data/lib/korona_client/models/customer_order.rb +356 -0
- data/lib/korona_client/models/day_rating.rb +269 -0
- data/lib/korona_client/models/device_information.rb +197 -0
- data/lib/korona_client/models/economic_zone.rb +228 -0
- data/lib/korona_client/models/end_of_day_statement.rb +264 -0
- data/lib/korona_client/models/end_of_day_statement_summary.rb +245 -0
- data/lib/korona_client/models/entry_gate.rb +246 -0
- data/lib/korona_client/models/event.rb +275 -0
- data/lib/korona_client/models/forbidden_error.rb +232 -0
- data/lib/korona_client/models/geo_location.rb +197 -0
- data/lib/korona_client/models/info_text.rb +270 -0
- data/lib/korona_client/models/interval.rb +197 -0
- data/lib/korona_client/models/inventory.rb +408 -0
- data/lib/korona_client/models/inventory_list.rb +351 -0
- data/lib/korona_client/models/inventory_list_item.rb +233 -0
- data/lib/korona_client/models/inventory_list_item_stock.rb +197 -0
- data/lib/korona_client/models/korona_account.rb +264 -0
- data/lib/korona_client/models/method_not_allowed_error.rb +232 -0
- data/lib/korona_client/models/model_reference.rb +209 -0
- data/lib/korona_client/models/not_found_error.rb +232 -0
- data/lib/korona_client/models/organizational_unit.rb +278 -0
- data/lib/korona_client/models/payment.rb +224 -0
- data/lib/korona_client/models/payment_method.rb +273 -0
- data/lib/korona_client/models/payment_summary.rb +206 -0
- data/lib/korona_client/models/period.rb +206 -0
- data/lib/korona_client/models/period_list_top_seller.rb +208 -0
- data/lib/korona_client/models/period_map_string_revenue_data.rb +208 -0
- data/lib/korona_client/models/period_object.rb +206 -0
- data/lib/korona_client/models/period_revenue_data.rb +206 -0
- data/lib/korona_client/models/pos.rb +351 -0
- data/lib/korona_client/models/price_group.rb +246 -0
- data/lib/korona_client/models/product.rb +620 -0
- data/lib/korona_client/models/product_code.rb +197 -0
- data/lib/korona_client/models/product_description.rb +230 -0
- data/lib/korona_client/models/product_price.rb +224 -0
- data/lib/korona_client/models/product_stock.rb +224 -0
- data/lib/korona_client/models/product_subproduct.rb +208 -0
- data/lib/korona_client/models/product_supplier_price.rb +224 -0
- data/lib/korona_client/models/product_transfer_involved_party_information.rb +233 -0
- data/lib/korona_client/models/product_transfer_involved_party_information_data.rb +206 -0
- data/lib/korona_client/models/rating.rb +206 -0
- data/lib/korona_client/models/receipt.rb +378 -0
- data/lib/korona_client/models/receipt_item.rb +262 -0
- data/lib/korona_client/models/result_list.rb +273 -0
- data/lib/korona_client/models/result_list_account.rb +273 -0
- data/lib/korona_client/models/result_list_assortment.rb +273 -0
- data/lib/korona_client/models/result_list_cashier.rb +273 -0
- data/lib/korona_client/models/result_list_commodity_group.rb +273 -0
- data/lib/korona_client/models/result_list_currency.rb +273 -0
- data/lib/korona_client/models/result_list_customer.rb +273 -0
- data/lib/korona_client/models/result_list_customer_group.rb +273 -0
- data/lib/korona_client/models/result_list_customer_order.rb +273 -0
- data/lib/korona_client/models/result_list_day_rating.rb +273 -0
- data/lib/korona_client/models/result_list_economic_zone.rb +273 -0
- data/lib/korona_client/models/result_list_end_of_day_statement.rb +273 -0
- data/lib/korona_client/models/result_list_entry_gate.rb +273 -0
- data/lib/korona_client/models/result_list_event.rb +273 -0
- data/lib/korona_client/models/result_list_info_text.rb +273 -0
- data/lib/korona_client/models/result_list_inventory.rb +273 -0
- data/lib/korona_client/models/result_list_inventory_list.rb +273 -0
- data/lib/korona_client/models/result_list_inventory_list_item.rb +273 -0
- data/lib/korona_client/models/result_list_organizational_unit.rb +273 -0
- data/lib/korona_client/models/result_list_payment_method.rb +273 -0
- data/lib/korona_client/models/result_list_pos.rb +273 -0
- data/lib/korona_client/models/result_list_price_group.rb +273 -0
- data/lib/korona_client/models/result_list_product.rb +273 -0
- data/lib/korona_client/models/result_list_product_stock.rb +273 -0
- data/lib/korona_client/models/result_list_receipt.rb +273 -0
- data/lib/korona_client/models/result_list_sales_tax.rb +273 -0
- data/lib/korona_client/models/result_list_sector.rb +273 -0
- data/lib/korona_client/models/result_list_stock_receipt.rb +273 -0
- data/lib/korona_client/models/result_list_stock_receipt_item.rb +273 -0
- data/lib/korona_client/models/result_list_supplier.rb +273 -0
- data/lib/korona_client/models/result_list_tag.rb +273 -0
- data/lib/korona_client/models/result_list_ticket_definition.rb +273 -0
- data/lib/korona_client/models/revenue_data.rb +224 -0
- data/lib/korona_client/models/sales_tax.rb +257 -0
- data/lib/korona_client/models/sales_tax_rate.rb +197 -0
- data/lib/korona_client/models/sector.rb +239 -0
- data/lib/korona_client/models/sector_sales_tax_item.rb +197 -0
- data/lib/korona_client/models/statistic.rb +206 -0
- data/lib/korona_client/models/statistic_list_top_seller.rb +206 -0
- data/lib/korona_client/models/statistic_map_string_revenue_data.rb +206 -0
- data/lib/korona_client/models/statistic_revenue_data.rb +206 -0
- data/lib/korona_client/models/stock_receipt.rb +405 -0
- data/lib/korona_client/models/stock_receipt_item.rb +242 -0
- data/lib/korona_client/models/stock_receipt_item_amount.rb +197 -0
- data/lib/korona_client/models/stock_receipt_item_identification.rb +206 -0
- data/lib/korona_client/models/stock_receipt_item_purchase_price.rb +197 -0
- data/lib/korona_client/models/supplier.rb +291 -0
- data/lib/korona_client/models/supplier_contact.rb +215 -0
- data/lib/korona_client/models/supplier_contact_person.rb +242 -0
- data/lib/korona_client/models/supplier_payment_information.rb +293 -0
- data/lib/korona_client/models/tag.rb +228 -0
- data/lib/korona_client/models/tax_payment.rb +215 -0
- data/lib/korona_client/models/tax_summary.rb +206 -0
- data/lib/korona_client/models/ticket_definition.rb +293 -0
- data/lib/korona_client/models/time_period.rb +242 -0
- data/lib/korona_client/models/too_many_requests_error.rb +232 -0
- data/lib/korona_client/models/top_seller.rb +227 -0
- data/lib/korona_client/models/total_price.rb +241 -0
- data/lib/korona_client/models/weather.rb +239 -0
- data/lib/korona_client/version.rb +15 -0
- data/spec/api/accounts_api_spec.rb +65 -0
- data/spec/api/assortments_api_spec.rb +95 -0
- data/spec/api/cashiers_api_spec.rb +65 -0
- data/spec/api/currencies_api_spec.rb +65 -0
- data/spec/api/customer_groups_api_spec.rb +65 -0
- data/spec/api/customer_orders_api_spec.rb +122 -0
- data/spec/api/customers_api_spec.rb +118 -0
- data/spec/api/economic_zones_api_spec.rb +65 -0
- data/spec/api/images_api_spec.rb +48 -0
- data/spec/api/info_texts_api_spec.rb +65 -0
- data/spec/api/inventories_korona_retail_api_spec.rb +251 -0
- data/spec/api/korona_account_api_spec.rb +47 -0
- data/spec/api/organizational_units_api_spec.rb +216 -0
- data/spec/api/payment_methods_api_spec.rb +65 -0
- data/spec/api/points_of_sale_api_spec.rb +166 -0
- data/spec/api/price_groups_api_spec.rb +65 -0
- data/spec/api/products_api_spec.rb +139 -0
- data/spec/api/receipts_api_spec.rb +69 -0
- data/spec/api/sales_taxes_api_spec.rb +65 -0
- data/spec/api/sectors_api_spec.rb +65 -0
- data/spec/api/statistics_api_spec.rb +92 -0
- data/spec/api/stock_receipts_korona_retail_api_spec.rb +187 -0
- data/spec/api/suppliers_api_spec.rb +65 -0
- data/spec/api/tags_api_spec.rb +65 -0
- data/spec/api/ticketing_api_spec.rb +125 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_spec.rb +112 -0
- data/spec/models/account_summary_spec.rb +54 -0
- data/spec/models/account_transaction_spec.rb +60 -0
- data/spec/models/add_or_update_result_spec.rb +80 -0
- data/spec/models/address_information_spec.rb +78 -0
- data/spec/models/admission_spec.rb +48 -0
- data/spec/models/amount_count_data_spec.rb +48 -0
- data/spec/models/amount_spec.rb +66 -0
- data/spec/models/assortment_spec.rb +84 -0
- data/spec/models/bad_request_error_spec.rb +52 -0
- data/spec/models/capacity_spec.rb +48 -0
- data/spec/models/cashier_spec.rb +122 -0
- data/spec/models/cashier_summary_spec.rb +72 -0
- data/spec/models/category_spec.rb +48 -0
- data/spec/models/cloud_subscription_spec.rb +52 -0
- data/spec/models/commodity_group_spec.rb +72 -0
- data/spec/models/commodity_group_summary_spec.rb +60 -0
- data/spec/models/company_identification_spec.rb +48 -0
- data/spec/models/currency_denomination_spec.rb +52 -0
- data/spec/models/currency_exchange_rate_spec.rb +48 -0
- data/spec/models/currency_spec.rb +108 -0
- data/spec/models/customer_card_spec.rb +52 -0
- data/spec/models/customer_data_spec.rb +48 -0
- data/spec/models/customer_group_spec.rb +72 -0
- data/spec/models/customer_group_summary_spec.rb +60 -0
- data/spec/models/customer_information_spec.rb +54 -0
- data/spec/models/customer_order_spec.rb +150 -0
- data/spec/models/customer_spec.rb +154 -0
- data/spec/models/day_rating_spec.rb +96 -0
- data/spec/models/device_information_spec.rb +48 -0
- data/spec/models/economic_zone_spec.rb +66 -0
- data/spec/models/end_of_day_statement_spec.rb +90 -0
- data/spec/models/end_of_day_statement_summary_spec.rb +72 -0
- data/spec/models/entry_gate_spec.rb +78 -0
- data/spec/models/event_spec.rb +96 -0
- data/spec/models/forbidden_error_spec.rb +52 -0
- data/spec/models/geo_location_spec.rb +48 -0
- data/spec/models/info_text_spec.rb +76 -0
- data/spec/models/interval_spec.rb +48 -0
- data/spec/models/inventory_list_item_spec.rb +72 -0
- data/spec/models/inventory_list_item_stock_spec.rb +48 -0
- data/spec/models/inventory_list_spec.rb +130 -0
- data/spec/models/inventory_spec.rb +162 -0
- data/spec/models/korona_account_spec.rb +90 -0
- data/spec/models/method_not_allowed_error_spec.rb +52 -0
- data/spec/models/model_reference_spec.rb +54 -0
- data/spec/models/not_found_error_spec.rb +52 -0
- data/spec/models/organizational_unit_spec.rb +96 -0
- data/spec/models/payment_method_spec.rb +96 -0
- data/spec/models/payment_spec.rb +66 -0
- data/spec/models/payment_summary_spec.rb +54 -0
- data/spec/models/period_list_top_seller_spec.rb +54 -0
- data/spec/models/period_map_string_revenue_data_spec.rb +54 -0
- data/spec/models/period_object_spec.rb +54 -0
- data/spec/models/period_revenue_data_spec.rb +54 -0
- data/spec/models/period_spec.rb +54 -0
- data/spec/models/pos_spec.rb +144 -0
- data/spec/models/price_group_spec.rb +78 -0
- data/spec/models/product_code_spec.rb +48 -0
- data/spec/models/product_description_spec.rb +52 -0
- data/spec/models/product_price_spec.rb +66 -0
- data/spec/models/product_spec.rb +296 -0
- data/spec/models/product_stock_spec.rb +66 -0
- data/spec/models/product_subproduct_spec.rb +54 -0
- data/spec/models/product_supplier_price_spec.rb +66 -0
- data/spec/models/product_transfer_involved_party_information_data_spec.rb +54 -0
- data/spec/models/product_transfer_involved_party_information_spec.rb +72 -0
- data/spec/models/rating_spec.rb +54 -0
- data/spec/models/receipt_item_spec.rb +90 -0
- data/spec/models/receipt_spec.rb +162 -0
- data/spec/models/result_list_account_spec.rb +72 -0
- data/spec/models/result_list_assortment_spec.rb +72 -0
- data/spec/models/result_list_cashier_spec.rb +72 -0
- data/spec/models/result_list_commodity_group_spec.rb +72 -0
- data/spec/models/result_list_currency_spec.rb +72 -0
- data/spec/models/result_list_customer_group_spec.rb +72 -0
- data/spec/models/result_list_customer_order_spec.rb +72 -0
- data/spec/models/result_list_customer_spec.rb +72 -0
- data/spec/models/result_list_day_rating_spec.rb +72 -0
- data/spec/models/result_list_economic_zone_spec.rb +72 -0
- data/spec/models/result_list_end_of_day_statement_spec.rb +72 -0
- data/spec/models/result_list_entry_gate_spec.rb +72 -0
- data/spec/models/result_list_event_spec.rb +72 -0
- data/spec/models/result_list_info_text_spec.rb +72 -0
- data/spec/models/result_list_inventory_list_item_spec.rb +72 -0
- data/spec/models/result_list_inventory_list_spec.rb +72 -0
- data/spec/models/result_list_inventory_spec.rb +72 -0
- data/spec/models/result_list_organizational_unit_spec.rb +72 -0
- data/spec/models/result_list_payment_method_spec.rb +72 -0
- data/spec/models/result_list_pos_spec.rb +72 -0
- data/spec/models/result_list_price_group_spec.rb +72 -0
- data/spec/models/result_list_product_spec.rb +72 -0
- data/spec/models/result_list_product_stock_spec.rb +72 -0
- data/spec/models/result_list_receipt_spec.rb +72 -0
- data/spec/models/result_list_sales_tax_spec.rb +72 -0
- data/spec/models/result_list_sector_spec.rb +72 -0
- data/spec/models/result_list_spec.rb +72 -0
- data/spec/models/result_list_stock_receipt_item_spec.rb +72 -0
- data/spec/models/result_list_stock_receipt_spec.rb +72 -0
- data/spec/models/result_list_supplier_spec.rb +72 -0
- data/spec/models/result_list_tag_spec.rb +72 -0
- data/spec/models/result_list_ticket_definition_spec.rb +72 -0
- data/spec/models/revenue_data_spec.rb +66 -0
- data/spec/models/sales_tax_rate_spec.rb +48 -0
- data/spec/models/sales_tax_spec.rb +84 -0
- data/spec/models/sector_sales_tax_item_spec.rb +48 -0
- data/spec/models/sector_spec.rb +72 -0
- data/spec/models/statistic_list_top_seller_spec.rb +54 -0
- data/spec/models/statistic_map_string_revenue_data_spec.rb +54 -0
- data/spec/models/statistic_revenue_data_spec.rb +54 -0
- data/spec/models/statistic_spec.rb +54 -0
- data/spec/models/stock_receipt_item_amount_spec.rb +48 -0
- data/spec/models/stock_receipt_item_identification_spec.rb +54 -0
- data/spec/models/stock_receipt_item_purchase_price_spec.rb +48 -0
- data/spec/models/stock_receipt_item_spec.rb +78 -0
- data/spec/models/stock_receipt_spec.rb +166 -0
- data/spec/models/supplier_contact_person_spec.rb +78 -0
- data/spec/models/supplier_contact_spec.rb +60 -0
- data/spec/models/supplier_payment_information_spec.rb +94 -0
- data/spec/models/supplier_spec.rb +108 -0
- data/spec/models/tag_spec.rb +66 -0
- data/spec/models/tax_payment_spec.rb +60 -0
- data/spec/models/tax_summary_spec.rb +54 -0
- data/spec/models/ticket_definition_spec.rb +108 -0
- data/spec/models/time_period_spec.rb +78 -0
- data/spec/models/too_many_requests_error_spec.rb +52 -0
- data/spec/models/top_seller_spec.rb +66 -0
- data/spec/models/total_price_spec.rb +66 -0
- data/spec/models/weather_spec.rb +58 -0
- data/spec/spec_helper.rb +111 -0
- metadata +856 -0
@@ -0,0 +1,273 @@
|
|
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 ResultListEconomicZone
|
18
|
+
# number of the current page, starting from 1
|
19
|
+
attr_accessor :current_page
|
20
|
+
|
21
|
+
# navigation links (previous, self, next)
|
22
|
+
attr_accessor :links
|
23
|
+
|
24
|
+
# pages count total
|
25
|
+
attr_accessor :pages_total
|
26
|
+
|
27
|
+
# result list
|
28
|
+
attr_accessor :results
|
29
|
+
|
30
|
+
# result count of the current page
|
31
|
+
attr_accessor :results_of_page
|
32
|
+
|
33
|
+
# result count total
|
34
|
+
attr_accessor :results_total
|
35
|
+
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'current_page' => :'currentPage',
|
41
|
+
:'links' => :'links',
|
42
|
+
:'pages_total' => :'pagesTotal',
|
43
|
+
:'results' => :'results',
|
44
|
+
:'results_of_page' => :'resultsOfPage',
|
45
|
+
:'results_total' => :'resultsTotal'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.swagger_types
|
51
|
+
{
|
52
|
+
:'current_page' => :'Integer',
|
53
|
+
:'links' => :'Hash<String, String>',
|
54
|
+
:'pages_total' => :'Integer',
|
55
|
+
:'results' => :'Array<EconomicZone>',
|
56
|
+
:'results_of_page' => :'Integer',
|
57
|
+
:'results_total' => :'Integer'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
return unless attributes.is_a?(Hash)
|
65
|
+
|
66
|
+
# convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
68
|
+
|
69
|
+
if attributes.has_key?(:'currentPage')
|
70
|
+
self.current_page = attributes[:'currentPage']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'links')
|
74
|
+
if (value = attributes[:'links']).is_a?(Hash)
|
75
|
+
self.links = value
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.has_key?(:'pagesTotal')
|
80
|
+
self.pages_total = attributes[:'pagesTotal']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.has_key?(:'results')
|
84
|
+
if (value = attributes[:'results']).is_a?(Array)
|
85
|
+
self.results = value
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'resultsOfPage')
|
90
|
+
self.results_of_page = attributes[:'resultsOfPage']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'resultsTotal')
|
94
|
+
self.results_total = attributes[:'resultsTotal']
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
100
|
+
# @return Array for valid properties with the reasons
|
101
|
+
def list_invalid_properties
|
102
|
+
invalid_properties = Array.new
|
103
|
+
if @current_page.nil?
|
104
|
+
invalid_properties.push("invalid value for 'current_page', current_page cannot be nil.")
|
105
|
+
end
|
106
|
+
|
107
|
+
if @links.nil?
|
108
|
+
invalid_properties.push("invalid value for 'links', links cannot be nil.")
|
109
|
+
end
|
110
|
+
|
111
|
+
if @pages_total.nil?
|
112
|
+
invalid_properties.push("invalid value for 'pages_total', pages_total cannot be nil.")
|
113
|
+
end
|
114
|
+
|
115
|
+
if @results.nil?
|
116
|
+
invalid_properties.push("invalid value for 'results', results cannot be nil.")
|
117
|
+
end
|
118
|
+
|
119
|
+
if @results_of_page.nil?
|
120
|
+
invalid_properties.push("invalid value for 'results_of_page', results_of_page cannot be nil.")
|
121
|
+
end
|
122
|
+
|
123
|
+
if @results_total.nil?
|
124
|
+
invalid_properties.push("invalid value for 'results_total', results_total cannot be nil.")
|
125
|
+
end
|
126
|
+
|
127
|
+
return 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
|
+
return false if @current_page.nil?
|
134
|
+
return false if @links.nil?
|
135
|
+
return false if @pages_total.nil?
|
136
|
+
return false if @results.nil?
|
137
|
+
return false if @results_of_page.nil?
|
138
|
+
return false if @results_total.nil?
|
139
|
+
return true
|
140
|
+
end
|
141
|
+
|
142
|
+
# Checks equality by comparing each attribute.
|
143
|
+
# @param [Object] Object to be compared
|
144
|
+
def ==(o)
|
145
|
+
return true if self.equal?(o)
|
146
|
+
self.class == o.class &&
|
147
|
+
current_page == o.current_page &&
|
148
|
+
links == o.links &&
|
149
|
+
pages_total == o.pages_total &&
|
150
|
+
results == o.results &&
|
151
|
+
results_of_page == o.results_of_page &&
|
152
|
+
results_total == o.results_total
|
153
|
+
end
|
154
|
+
|
155
|
+
# @see the `==` method
|
156
|
+
# @param [Object] Object to be compared
|
157
|
+
def eql?(o)
|
158
|
+
self == o
|
159
|
+
end
|
160
|
+
|
161
|
+
# Calculates hash code according to all attributes.
|
162
|
+
# @return [Fixnum] Hash code
|
163
|
+
def hash
|
164
|
+
[current_page, links, pages_total, results, results_of_page, results_total].hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Builds the object from hash
|
168
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
169
|
+
# @return [Object] Returns the model itself
|
170
|
+
def build_from_hash(attributes)
|
171
|
+
return nil unless attributes.is_a?(Hash)
|
172
|
+
self.class.swagger_types.each_pair do |key, type|
|
173
|
+
if type =~ /\AArray<(.*)>/i
|
174
|
+
# check to ensure the input is an array given that the the attribute
|
175
|
+
# is documented as an array but the input is not
|
176
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
177
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
178
|
+
end
|
179
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
180
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
181
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
182
|
+
end
|
183
|
+
|
184
|
+
self
|
185
|
+
end
|
186
|
+
|
187
|
+
# Deserializes the data based on type
|
188
|
+
# @param string type Data type
|
189
|
+
# @param string value Value to be deserialized
|
190
|
+
# @return [Object] Deserialized data
|
191
|
+
def _deserialize(type, value)
|
192
|
+
case type.to_sym
|
193
|
+
when :DateTime
|
194
|
+
DateTime.parse(value)
|
195
|
+
when :Date
|
196
|
+
Date.parse(value)
|
197
|
+
when :String
|
198
|
+
value.to_s
|
199
|
+
when :Integer
|
200
|
+
value.to_i
|
201
|
+
when :Float
|
202
|
+
value.to_f
|
203
|
+
when :BOOLEAN
|
204
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
205
|
+
true
|
206
|
+
else
|
207
|
+
false
|
208
|
+
end
|
209
|
+
when :Object
|
210
|
+
# generic object (usually a Hash), return directly
|
211
|
+
value
|
212
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
213
|
+
inner_type = Regexp.last_match[:inner_type]
|
214
|
+
value.map { |v| _deserialize(inner_type, v) }
|
215
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
216
|
+
k_type = Regexp.last_match[:k_type]
|
217
|
+
v_type = Regexp.last_match[:v_type]
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each do |k, v|
|
220
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
else # model
|
224
|
+
temp_model = KoronaClient.const_get(type).new
|
225
|
+
temp_model.build_from_hash(value)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
# Returns the string representation of the object
|
230
|
+
# @return [String] String presentation of the object
|
231
|
+
def to_s
|
232
|
+
to_hash.to_s
|
233
|
+
end
|
234
|
+
|
235
|
+
# to_body is an alias to to_hash (backward compatibility)
|
236
|
+
# @return [Hash] Returns the object in the form of hash
|
237
|
+
def to_body
|
238
|
+
to_hash
|
239
|
+
end
|
240
|
+
|
241
|
+
# Returns the object in the form of hash
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
243
|
+
def to_hash
|
244
|
+
hash = {}
|
245
|
+
self.class.attribute_map.each_pair do |attr, param|
|
246
|
+
value = self.send(attr)
|
247
|
+
next if value.nil?
|
248
|
+
hash[param] = _to_hash(value)
|
249
|
+
end
|
250
|
+
hash
|
251
|
+
end
|
252
|
+
|
253
|
+
# Outputs non-array value in the form of hash
|
254
|
+
# For object, use to_hash. Otherwise, just return the value
|
255
|
+
# @param [Object] value Any valid value
|
256
|
+
# @return [Hash] Returns the value in the form of hash
|
257
|
+
def _to_hash(value)
|
258
|
+
if value.is_a?(Array)
|
259
|
+
value.compact.map{ |v| _to_hash(v) }
|
260
|
+
elsif value.is_a?(Hash)
|
261
|
+
{}.tap do |hash|
|
262
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
263
|
+
end
|
264
|
+
elsif value.respond_to? :to_hash
|
265
|
+
value.to_hash
|
266
|
+
else
|
267
|
+
value
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
end
|
272
|
+
|
273
|
+
end
|
@@ -0,0 +1,273 @@
|
|
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 ResultListEndOfDayStatement
|
18
|
+
# number of the current page, starting from 1
|
19
|
+
attr_accessor :current_page
|
20
|
+
|
21
|
+
# navigation links (previous, self, next)
|
22
|
+
attr_accessor :links
|
23
|
+
|
24
|
+
# pages count total
|
25
|
+
attr_accessor :pages_total
|
26
|
+
|
27
|
+
# result list
|
28
|
+
attr_accessor :results
|
29
|
+
|
30
|
+
# result count of the current page
|
31
|
+
attr_accessor :results_of_page
|
32
|
+
|
33
|
+
# result count total
|
34
|
+
attr_accessor :results_total
|
35
|
+
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'current_page' => :'currentPage',
|
41
|
+
:'links' => :'links',
|
42
|
+
:'pages_total' => :'pagesTotal',
|
43
|
+
:'results' => :'results',
|
44
|
+
:'results_of_page' => :'resultsOfPage',
|
45
|
+
:'results_total' => :'resultsTotal'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.swagger_types
|
51
|
+
{
|
52
|
+
:'current_page' => :'Integer',
|
53
|
+
:'links' => :'Hash<String, String>',
|
54
|
+
:'pages_total' => :'Integer',
|
55
|
+
:'results' => :'Array<EndOfDayStatement>',
|
56
|
+
:'results_of_page' => :'Integer',
|
57
|
+
:'results_total' => :'Integer'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
return unless attributes.is_a?(Hash)
|
65
|
+
|
66
|
+
# convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
68
|
+
|
69
|
+
if attributes.has_key?(:'currentPage')
|
70
|
+
self.current_page = attributes[:'currentPage']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'links')
|
74
|
+
if (value = attributes[:'links']).is_a?(Hash)
|
75
|
+
self.links = value
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.has_key?(:'pagesTotal')
|
80
|
+
self.pages_total = attributes[:'pagesTotal']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.has_key?(:'results')
|
84
|
+
if (value = attributes[:'results']).is_a?(Array)
|
85
|
+
self.results = value
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'resultsOfPage')
|
90
|
+
self.results_of_page = attributes[:'resultsOfPage']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'resultsTotal')
|
94
|
+
self.results_total = attributes[:'resultsTotal']
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
100
|
+
# @return Array for valid properties with the reasons
|
101
|
+
def list_invalid_properties
|
102
|
+
invalid_properties = Array.new
|
103
|
+
if @current_page.nil?
|
104
|
+
invalid_properties.push("invalid value for 'current_page', current_page cannot be nil.")
|
105
|
+
end
|
106
|
+
|
107
|
+
if @links.nil?
|
108
|
+
invalid_properties.push("invalid value for 'links', links cannot be nil.")
|
109
|
+
end
|
110
|
+
|
111
|
+
if @pages_total.nil?
|
112
|
+
invalid_properties.push("invalid value for 'pages_total', pages_total cannot be nil.")
|
113
|
+
end
|
114
|
+
|
115
|
+
if @results.nil?
|
116
|
+
invalid_properties.push("invalid value for 'results', results cannot be nil.")
|
117
|
+
end
|
118
|
+
|
119
|
+
if @results_of_page.nil?
|
120
|
+
invalid_properties.push("invalid value for 'results_of_page', results_of_page cannot be nil.")
|
121
|
+
end
|
122
|
+
|
123
|
+
if @results_total.nil?
|
124
|
+
invalid_properties.push("invalid value for 'results_total', results_total cannot be nil.")
|
125
|
+
end
|
126
|
+
|
127
|
+
return 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
|
+
return false if @current_page.nil?
|
134
|
+
return false if @links.nil?
|
135
|
+
return false if @pages_total.nil?
|
136
|
+
return false if @results.nil?
|
137
|
+
return false if @results_of_page.nil?
|
138
|
+
return false if @results_total.nil?
|
139
|
+
return true
|
140
|
+
end
|
141
|
+
|
142
|
+
# Checks equality by comparing each attribute.
|
143
|
+
# @param [Object] Object to be compared
|
144
|
+
def ==(o)
|
145
|
+
return true if self.equal?(o)
|
146
|
+
self.class == o.class &&
|
147
|
+
current_page == o.current_page &&
|
148
|
+
links == o.links &&
|
149
|
+
pages_total == o.pages_total &&
|
150
|
+
results == o.results &&
|
151
|
+
results_of_page == o.results_of_page &&
|
152
|
+
results_total == o.results_total
|
153
|
+
end
|
154
|
+
|
155
|
+
# @see the `==` method
|
156
|
+
# @param [Object] Object to be compared
|
157
|
+
def eql?(o)
|
158
|
+
self == o
|
159
|
+
end
|
160
|
+
|
161
|
+
# Calculates hash code according to all attributes.
|
162
|
+
# @return [Fixnum] Hash code
|
163
|
+
def hash
|
164
|
+
[current_page, links, pages_total, results, results_of_page, results_total].hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Builds the object from hash
|
168
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
169
|
+
# @return [Object] Returns the model itself
|
170
|
+
def build_from_hash(attributes)
|
171
|
+
return nil unless attributes.is_a?(Hash)
|
172
|
+
self.class.swagger_types.each_pair do |key, type|
|
173
|
+
if type =~ /\AArray<(.*)>/i
|
174
|
+
# check to ensure the input is an array given that the the attribute
|
175
|
+
# is documented as an array but the input is not
|
176
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
177
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
178
|
+
end
|
179
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
180
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
181
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
182
|
+
end
|
183
|
+
|
184
|
+
self
|
185
|
+
end
|
186
|
+
|
187
|
+
# Deserializes the data based on type
|
188
|
+
# @param string type Data type
|
189
|
+
# @param string value Value to be deserialized
|
190
|
+
# @return [Object] Deserialized data
|
191
|
+
def _deserialize(type, value)
|
192
|
+
case type.to_sym
|
193
|
+
when :DateTime
|
194
|
+
DateTime.parse(value)
|
195
|
+
when :Date
|
196
|
+
Date.parse(value)
|
197
|
+
when :String
|
198
|
+
value.to_s
|
199
|
+
when :Integer
|
200
|
+
value.to_i
|
201
|
+
when :Float
|
202
|
+
value.to_f
|
203
|
+
when :BOOLEAN
|
204
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
205
|
+
true
|
206
|
+
else
|
207
|
+
false
|
208
|
+
end
|
209
|
+
when :Object
|
210
|
+
# generic object (usually a Hash), return directly
|
211
|
+
value
|
212
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
213
|
+
inner_type = Regexp.last_match[:inner_type]
|
214
|
+
value.map { |v| _deserialize(inner_type, v) }
|
215
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
216
|
+
k_type = Regexp.last_match[:k_type]
|
217
|
+
v_type = Regexp.last_match[:v_type]
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each do |k, v|
|
220
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
else # model
|
224
|
+
temp_model = KoronaClient.const_get(type).new
|
225
|
+
temp_model.build_from_hash(value)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
# Returns the string representation of the object
|
230
|
+
# @return [String] String presentation of the object
|
231
|
+
def to_s
|
232
|
+
to_hash.to_s
|
233
|
+
end
|
234
|
+
|
235
|
+
# to_body is an alias to to_hash (backward compatibility)
|
236
|
+
# @return [Hash] Returns the object in the form of hash
|
237
|
+
def to_body
|
238
|
+
to_hash
|
239
|
+
end
|
240
|
+
|
241
|
+
# Returns the object in the form of hash
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
243
|
+
def to_hash
|
244
|
+
hash = {}
|
245
|
+
self.class.attribute_map.each_pair do |attr, param|
|
246
|
+
value = self.send(attr)
|
247
|
+
next if value.nil?
|
248
|
+
hash[param] = _to_hash(value)
|
249
|
+
end
|
250
|
+
hash
|
251
|
+
end
|
252
|
+
|
253
|
+
# Outputs non-array value in the form of hash
|
254
|
+
# For object, use to_hash. Otherwise, just return the value
|
255
|
+
# @param [Object] value Any valid value
|
256
|
+
# @return [Hash] Returns the value in the form of hash
|
257
|
+
def _to_hash(value)
|
258
|
+
if value.is_a?(Array)
|
259
|
+
value.compact.map{ |v| _to_hash(v) }
|
260
|
+
elsif value.is_a?(Hash)
|
261
|
+
{}.tap do |hash|
|
262
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
263
|
+
end
|
264
|
+
elsif value.respond_to? :to_hash
|
265
|
+
value.to_hash
|
266
|
+
else
|
267
|
+
value
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
end
|
272
|
+
|
273
|
+
end
|