korona_client 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +171 -89
- data/config.json +6 -0
- data/docs/AccountTransaction.md +2 -0
- data/docs/AccountsApi.md +12 -12
- data/docs/AddOrUpdateResult.md +1 -0
- data/docs/AdditionalInfo.md +9 -0
- data/docs/AdditionalReceiptInfoType.md +22 -0
- data/docs/AdditionalReceiptInfoTypesApi.md +133 -0
- data/docs/AssortmentsApi.md +217 -48
- data/docs/Attendance.md +17 -0
- data/docs/Cashier.md +1 -0
- data/docs/CashiersApi.md +15 -13
- data/docs/Category.md +1 -0
- data/docs/CommodityGroupsApi.md +423 -0
- data/docs/CreationTask.md +17 -0
- data/docs/CurrenciesApi.md +15 -13
- data/docs/CustomerGroupsApi.md +15 -13
- data/docs/CustomerOrder.md +2 -2
- data/docs/CustomerOrdersApi.md +52 -46
- data/docs/CustomersApi.md +108 -45
- data/docs/DayTimePeriod.md +9 -0
- data/docs/DeliveryNote.md +22 -0
- data/docs/DeliveryNoteItem.md +14 -0
- data/docs/DeliveryNotesApi.md +316 -0
- data/docs/Deposit.md +12 -0
- data/docs/Discount.md +10 -0
- data/docs/EconomicZonesApi.md +15 -13
- data/docs/EndOfDayStatement.md +1 -1
- data/docs/Event.md +2 -0
- data/docs/ExternalSystemCall.md +20 -0
- data/docs/ExternalSystemCallsApi.md +423 -0
- data/docs/ImagesApi.md +8 -7
- data/docs/InfoTextsApi.md +15 -13
- data/docs/InventoriesApi.md +894 -0
- data/docs/KoronaAccount.md +1 -0
- data/docs/KoronaAccountApi.md +5 -5
- data/docs/MediaUrl.md +8 -0
- data/docs/OrganizationalUnit.md +1 -0
- data/docs/OrganizationalUnitsApi.md +108 -104
- data/docs/PaymentMethod.md +3 -0
- data/docs/PaymentMethodsApi.md +15 -13
- data/docs/PointsOfSaleApi.md +85 -74
- data/docs/Pos.md +5 -3
- data/docs/PriceGroupsApi.md +15 -13
- data/docs/Product.md +2 -0
- data/docs/ProductsApi.md +121 -58
- data/docs/Receipt.md +5 -1
- data/docs/ReceiptItem.md +3 -0
- data/docs/ReceiptsApi.md +20 -14
- data/docs/ResultListAdditionalReceiptInfoType.md +13 -0
- data/docs/ResultListAttendance.md +13 -0
- data/docs/ResultListCreationTask.md +13 -0
- data/docs/ResultListDeliveryNote.md +13 -0
- data/docs/ResultListExternalSystemCall.md +13 -0
- data/docs/ResultListTicket.md +13 -0
- data/docs/ResultListTimeTrackingEntity.md +13 -0
- data/docs/ResultListTimeTrackingEntry.md +13 -0
- data/docs/SalesTaxesApi.md +15 -13
- data/docs/Sector.md +1 -0
- data/docs/SectorRevenueAccountItem.md +9 -0
- data/docs/SectorsApi.md +15 -13
- data/docs/Signature.md +10 -0
- data/docs/StatisticsApi.md +28 -28
- data/docs/StockReceipt.md +1 -0
- data/docs/StockReceiptsApi.md +687 -0
- data/docs/SuppliersApi.md +15 -13
- data/docs/TagsApi.md +303 -13
- data/docs/Ticket.md +14 -0
- data/docs/TicketCreationApi.md +127 -0
- data/docs/TicketPersonalization.md +11 -0
- data/docs/TicketingApi.md +975 -76
- data/docs/TimeTrackingApi.md +388 -0
- data/docs/TimeTrackingEntity.md +13 -0
- data/docs/TimeTrackingEntry.md +14 -0
- data/docs/TotalPeriod.md +9 -0
- data/docs/Validity.md +11 -0
- data/korona_client-1.0.0.gem +0 -0
- data/korona_client.gemspec +7 -8
- data/lib/korona_client.rb +38 -5
- data/lib/korona_client/api/accounts_api.rb +24 -26
- data/lib/korona_client/api/additional_receipt_info_types_api.rb +155 -0
- data/lib/korona_client/api/assortments_api.rb +259 -82
- data/lib/korona_client/api/cashiers_api.rb +27 -26
- data/lib/korona_client/api/commodity_groups_api.rb +462 -0
- data/lib/korona_client/api/currencies_api.rb +27 -26
- data/lib/korona_client/api/customer_groups_api.rb +27 -26
- data/lib/korona_client/api/customer_orders_api.rb +78 -78
- data/lib/korona_client/api/customers_api.rb +137 -77
- data/lib/korona_client/api/delivery_notes_api.rb +354 -0
- data/lib/korona_client/api/economic_zones_api.rb +27 -26
- data/lib/korona_client/api/external_system_calls_api.rb +462 -0
- data/lib/korona_client/api/images_api.rb +16 -16
- data/lib/korona_client/api/info_texts_api.rb +27 -26
- data/lib/korona_client/api/inventories_api.rb +1014 -0
- data/lib/korona_client/api/korona_account_api.rb +11 -12
- data/lib/korona_client/api/organizational_units_api.rb +157 -162
- data/lib/korona_client/api/payment_methods_api.rb +27 -26
- data/lib/korona_client/api/points_of_sale_api.rb +127 -121
- data/lib/korona_client/api/price_groups_api.rb +27 -26
- data/lib/korona_client/api/products_api.rb +154 -95
- data/lib/korona_client/api/receipts_api.rb +27 -20
- data/lib/korona_client/api/sales_taxes_api.rb +27 -26
- data/lib/korona_client/api/sectors_api.rb +27 -26
- data/lib/korona_client/api/statistics_api.rb +32 -36
- data/lib/korona_client/api/stock_receipts_api.rb +769 -0
- data/lib/korona_client/api/suppliers_api.rb +27 -26
- data/lib/korona_client/api/tags_api.rb +326 -21
- data/lib/korona_client/api/ticket_creation_api.rb +149 -0
- data/lib/korona_client/api/ticketing_api.rb +1084 -132
- data/lib/korona_client/api/time_tracking_api.rb +425 -0
- data/lib/korona_client/api_client.rb +11 -11
- data/lib/korona_client/api_error.rb +3 -3
- data/lib/korona_client/configuration.rb +4 -4
- data/lib/korona_client/models/account.rb +11 -15
- data/lib/korona_client/models/account_summary.rb +8 -13
- data/lib/korona_client/models/account_transaction.rb +32 -15
- data/lib/korona_client/models/add_or_update_result.rb +24 -19
- data/lib/korona_client/models/additional_info.rb +192 -0
- data/lib/korona_client/models/additional_receipt_info_type.rb +319 -0
- data/lib/korona_client/models/address_information.rb +8 -13
- data/lib/korona_client/models/admission.rb +8 -13
- data/lib/korona_client/models/amount.rb +8 -13
- data/lib/korona_client/models/amount_count_data.rb +8 -13
- data/lib/korona_client/models/assortment.rb +8 -13
- data/lib/korona_client/models/attendance.rb +268 -0
- data/lib/korona_client/models/bad_request_error.rb +11 -15
- data/lib/korona_client/models/capacity.rb +8 -13
- data/lib/korona_client/models/cashier.rb +21 -16
- data/lib/korona_client/models/cashier_summary.rb +8 -13
- data/lib/korona_client/models/category.rb +19 -15
- data/lib/korona_client/models/cloud_subscription.rb +11 -15
- data/lib/korona_client/models/commodity_group.rb +8 -13
- data/lib/korona_client/models/commodity_group_summary.rb +8 -13
- data/lib/korona_client/models/company_identification.rb +8 -13
- data/lib/korona_client/models/creation_task.rb +298 -0
- data/lib/korona_client/models/currency.rb +8 -13
- data/lib/korona_client/models/currency_denomination.rb +11 -15
- data/lib/korona_client/models/currency_exchange_rate.rb +8 -13
- data/lib/korona_client/models/customer.rb +11 -15
- data/lib/korona_client/models/customer_card.rb +11 -15
- data/lib/korona_client/models/customer_data.rb +8 -13
- data/lib/korona_client/models/customer_group.rb +8 -13
- data/lib/korona_client/models/customer_group_summary.rb +8 -13
- data/lib/korona_client/models/customer_information.rb +8 -13
- data/lib/korona_client/models/customer_order.rb +28 -29
- data/lib/korona_client/models/day_rating.rb +8 -13
- data/lib/korona_client/models/day_time_period.rb +192 -0
- data/lib/korona_client/models/delivery_note.rb +316 -0
- data/lib/korona_client/models/delivery_note_item.rb +239 -0
- data/lib/korona_client/models/deposit.rb +219 -0
- data/lib/korona_client/models/device_information.rb +8 -13
- data/lib/korona_client/models/discount.rb +201 -0
- data/lib/korona_client/models/economic_zone.rb +8 -13
- data/lib/korona_client/models/end_of_day_statement.rb +15 -20
- data/lib/korona_client/models/end_of_day_statement_summary.rb +8 -13
- data/lib/korona_client/models/entry_gate.rb +8 -13
- data/lib/korona_client/models/event.rb +30 -15
- data/lib/korona_client/models/external_system_call.rb +295 -0
- data/lib/korona_client/models/forbidden_error.rb +11 -15
- data/lib/korona_client/models/geo_location.rb +8 -13
- data/lib/korona_client/models/info_text.rb +11 -15
- data/lib/korona_client/models/interval.rb +8 -13
- data/lib/korona_client/models/inventory.rb +14 -18
- data/lib/korona_client/models/inventory_list.rb +11 -15
- data/lib/korona_client/models/inventory_list_item.rb +8 -13
- data/lib/korona_client/models/inventory_list_item_stock.rb +8 -13
- data/lib/korona_client/models/korona_account.rb +41 -13
- data/lib/korona_client/models/media_url.rb +183 -0
- data/lib/korona_client/models/method_not_allowed_error.rb +11 -15
- data/lib/korona_client/models/model_reference.rb +8 -12
- data/lib/korona_client/models/not_found_error.rb +11 -15
- data/lib/korona_client/models/organizational_unit.rb +20 -16
- data/lib/korona_client/models/payment.rb +8 -13
- data/lib/korona_client/models/payment_method.rb +37 -15
- data/lib/korona_client/models/payment_summary.rb +8 -13
- data/lib/korona_client/models/period.rb +8 -13
- data/lib/korona_client/models/period_list_top_seller.rb +8 -13
- data/lib/korona_client/models/period_map_string_revenue_data.rb +8 -13
- data/lib/korona_client/models/period_object.rb +8 -13
- data/lib/korona_client/models/period_revenue_data.rb +8 -13
- data/lib/korona_client/models/pos.rb +31 -15
- data/lib/korona_client/models/price_group.rb +8 -13
- data/lib/korona_client/models/product.rb +35 -19
- data/lib/korona_client/models/product_code.rb +8 -13
- data/lib/korona_client/models/product_description.rb +11 -15
- data/lib/korona_client/models/product_price.rb +8 -13
- data/lib/korona_client/models/product_stock.rb +8 -13
- data/lib/korona_client/models/product_subproduct.rb +8 -13
- data/lib/korona_client/models/product_supplier_price.rb +8 -13
- data/lib/korona_client/models/product_transfer_involved_party_information.rb +8 -13
- data/lib/korona_client/models/product_transfer_involved_party_information_data.rb +8 -13
- data/lib/korona_client/models/rating.rb +8 -13
- data/lib/korona_client/models/receipt.rb +55 -20
- data/lib/korona_client/models/receipt_item.rb +40 -14
- data/lib/korona_client/models/result_list.rb +14 -19
- data/lib/korona_client/models/result_list_account.rb +14 -19
- data/lib/korona_client/models/result_list_additional_receipt_info_type.rb +268 -0
- data/lib/korona_client/models/result_list_assortment.rb +14 -19
- data/lib/korona_client/models/result_list_attendance.rb +268 -0
- data/lib/korona_client/models/result_list_cashier.rb +14 -19
- data/lib/korona_client/models/result_list_commodity_group.rb +14 -19
- data/lib/korona_client/models/result_list_creation_task.rb +268 -0
- data/lib/korona_client/models/result_list_currency.rb +14 -19
- data/lib/korona_client/models/result_list_customer.rb +14 -19
- data/lib/korona_client/models/result_list_customer_group.rb +14 -19
- data/lib/korona_client/models/result_list_customer_order.rb +14 -19
- data/lib/korona_client/models/result_list_day_rating.rb +14 -19
- data/lib/korona_client/models/result_list_delivery_note.rb +268 -0
- data/lib/korona_client/models/result_list_economic_zone.rb +14 -19
- data/lib/korona_client/models/result_list_end_of_day_statement.rb +14 -19
- data/lib/korona_client/models/result_list_entry_gate.rb +14 -19
- data/lib/korona_client/models/result_list_event.rb +14 -19
- data/lib/korona_client/models/result_list_external_system_call.rb +268 -0
- data/lib/korona_client/models/result_list_info_text.rb +14 -19
- data/lib/korona_client/models/result_list_inventory.rb +14 -19
- data/lib/korona_client/models/result_list_inventory_list.rb +14 -19
- data/lib/korona_client/models/result_list_inventory_list_item.rb +14 -19
- data/lib/korona_client/models/result_list_organizational_unit.rb +14 -19
- data/lib/korona_client/models/result_list_payment_method.rb +14 -19
- data/lib/korona_client/models/result_list_pos.rb +14 -19
- data/lib/korona_client/models/result_list_price_group.rb +14 -19
- data/lib/korona_client/models/result_list_product.rb +14 -19
- data/lib/korona_client/models/result_list_product_stock.rb +14 -19
- data/lib/korona_client/models/result_list_receipt.rb +14 -19
- data/lib/korona_client/models/result_list_sales_tax.rb +14 -19
- data/lib/korona_client/models/result_list_sector.rb +14 -19
- data/lib/korona_client/models/result_list_stock_receipt.rb +14 -19
- data/lib/korona_client/models/result_list_stock_receipt_item.rb +14 -19
- data/lib/korona_client/models/result_list_supplier.rb +14 -19
- data/lib/korona_client/models/result_list_tag.rb +14 -19
- data/lib/korona_client/models/result_list_ticket.rb +268 -0
- data/lib/korona_client/models/result_list_ticket_definition.rb +14 -19
- data/lib/korona_client/models/result_list_time_tracking_entity.rb +268 -0
- data/lib/korona_client/models/result_list_time_tracking_entry.rb +268 -0
- data/lib/korona_client/models/revenue_data.rb +8 -13
- data/lib/korona_client/models/sales_tax.rb +8 -13
- data/lib/korona_client/models/sales_tax_rate.rb +8 -13
- data/lib/korona_client/models/sector.rb +21 -15
- data/lib/korona_client/models/sector_revenue_account_item.rb +192 -0
- data/lib/korona_client/models/sector_sales_tax_item.rb +8 -13
- data/lib/korona_client/models/signature.rb +216 -0
- data/lib/korona_client/models/statistic.rb +8 -13
- data/lib/korona_client/models/statistic_list_top_seller.rb +8 -13
- data/lib/korona_client/models/statistic_map_string_revenue_data.rb +8 -13
- data/lib/korona_client/models/statistic_revenue_data.rb +8 -13
- data/lib/korona_client/models/stock_receipt.rb +21 -16
- data/lib/korona_client/models/stock_receipt_item.rb +8 -13
- data/lib/korona_client/models/stock_receipt_item_amount.rb +8 -13
- data/lib/korona_client/models/stock_receipt_item_identification.rb +8 -13
- data/lib/korona_client/models/stock_receipt_item_purchase_price.rb +8 -13
- data/lib/korona_client/models/supplier.rb +8 -13
- data/lib/korona_client/models/supplier_contact.rb +8 -13
- data/lib/korona_client/models/supplier_contact_person.rb +8 -13
- data/lib/korona_client/models/supplier_payment_information.rb +11 -15
- data/lib/korona_client/models/tag.rb +8 -13
- data/lib/korona_client/models/tax_payment.rb +8 -13
- data/lib/korona_client/models/tax_summary.rb +8 -13
- data/lib/korona_client/models/ticket.rb +237 -0
- data/lib/korona_client/models/ticket_definition.rb +8 -13
- data/lib/korona_client/models/ticket_personalization.rb +225 -0
- data/lib/korona_client/models/time_period.rb +8 -13
- data/lib/korona_client/models/time_tracking_entity.rb +232 -0
- data/lib/korona_client/models/time_tracking_entry.rb +240 -0
- data/lib/korona_client/models/too_many_requests_error.rb +11 -15
- data/lib/korona_client/models/top_seller.rb +8 -13
- data/lib/korona_client/models/total_period.rb +192 -0
- data/lib/korona_client/models/total_price.rb +10 -14
- data/lib/korona_client/models/validity.rb +236 -0
- data/lib/korona_client/models/weather.rb +11 -15
- data/lib/korona_client/version.rb +4 -4
- data/node_modules/.yarn-integrity +12 -0
- data/spec/api/additional_receipt_info_types_api_spec.rb +66 -0
- data/spec/api/commodity_groups_api_spec.rb +133 -0
- data/spec/api/delivery_notes_api_spec.rb +112 -0
- data/spec/api/external_system_calls_api_spec.rb +133 -0
- data/spec/api/inventories_api_spec.rb +253 -0
- data/spec/api/stock_receipts_api_spec.rb +201 -0
- data/spec/api/ticket_creation_api_spec.rb +63 -0
- data/spec/api/time_tracking_api_spec.rb +129 -0
- data/spec/models/additional_info_spec.rb +47 -0
- data/spec/models/additional_receipt_info_type_spec.rb +125 -0
- data/spec/models/attendance_spec.rb +95 -0
- data/spec/models/creation_task_spec.rb +99 -0
- data/spec/models/day_time_period_spec.rb +47 -0
- data/spec/models/delivery_note_item_spec.rb +77 -0
- data/spec/models/delivery_note_spec.rb +125 -0
- data/spec/models/deposit_spec.rb +65 -0
- data/spec/models/discount_spec.rb +53 -0
- data/spec/models/external_system_call_spec.rb +113 -0
- data/spec/models/media_url_spec.rb +41 -0
- data/spec/models/result_list_additional_receipt_info_type_spec.rb +71 -0
- data/spec/models/result_list_attendance_spec.rb +71 -0
- data/spec/models/result_list_creation_task_spec.rb +71 -0
- data/spec/models/result_list_delivery_note_spec.rb +71 -0
- data/spec/models/result_list_external_system_call_spec.rb +71 -0
- data/spec/models/result_list_ticket_spec.rb +71 -0
- data/spec/models/result_list_time_tracking_entity_spec.rb +71 -0
- data/spec/models/result_list_time_tracking_entry_spec.rb +71 -0
- data/spec/models/sector_revenue_account_item_spec.rb +47 -0
- data/spec/models/signature_spec.rb +53 -0
- data/spec/models/ticket_personalization_spec.rb +59 -0
- data/spec/models/ticket_spec.rb +77 -0
- data/spec/models/time_tracking_entity_spec.rb +71 -0
- data/spec/models/time_tracking_entry_spec.rb +77 -0
- data/spec/models/total_period_spec.rb +47 -0
- data/spec/models/validity_spec.rb +63 -0
- data/yarn.lock +4 -0
- metadata +162 -18
@@ -3,17 +3,16 @@
|
|
3
3
|
|
4
4
|
#Our api provides access to our cloud services
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
7
|
-
|
6
|
+
OpenAPI spec version: 2.11.21
|
7
|
+
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.8
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module KoronaClient
|
16
|
-
|
17
16
|
class RevenueData
|
18
17
|
attr_accessor :net_value
|
19
18
|
|
@@ -25,7 +24,6 @@ module KoronaClient
|
|
25
24
|
|
26
25
|
attr_accessor :customers_total
|
27
26
|
|
28
|
-
|
29
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
28
|
def self.attribute_map
|
31
29
|
{
|
@@ -54,7 +52,7 @@ module KoronaClient
|
|
54
52
|
return unless attributes.is_a?(Hash)
|
55
53
|
|
56
54
|
# convert string to symbol for hash key
|
57
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
56
|
|
59
57
|
if attributes.has_key?(:'netValue')
|
60
58
|
self.net_value = attributes[:'netValue']
|
@@ -75,20 +73,19 @@ module KoronaClient
|
|
75
73
|
if attributes.has_key?(:'customersTotal')
|
76
74
|
self.customers_total = attributes[:'customersTotal']
|
77
75
|
end
|
78
|
-
|
79
76
|
end
|
80
77
|
|
81
78
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
79
|
# @return Array for valid properties with the reasons
|
83
80
|
def list_invalid_properties
|
84
81
|
invalid_properties = Array.new
|
85
|
-
|
82
|
+
invalid_properties
|
86
83
|
end
|
87
84
|
|
88
85
|
# Check to see if the all the properties in the model are valid
|
89
86
|
# @return true if the model is valid
|
90
87
|
def valid?
|
91
|
-
|
88
|
+
true
|
92
89
|
end
|
93
90
|
|
94
91
|
# Checks equality by comparing each attribute.
|
@@ -125,7 +122,7 @@ module KoronaClient
|
|
125
122
|
# check to ensure the input is an array given that the the attribute
|
126
123
|
# is documented as an array but the input is not
|
127
124
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
125
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
129
126
|
end
|
130
127
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
128
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -207,7 +204,7 @@ module KoronaClient
|
|
207
204
|
# @return [Hash] Returns the value in the form of hash
|
208
205
|
def _to_hash(value)
|
209
206
|
if value.is_a?(Array)
|
210
|
-
value.compact.map{ |v| _to_hash(v) }
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
211
208
|
elsif value.is_a?(Hash)
|
212
209
|
{}.tap do |hash|
|
213
210
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -218,7 +215,5 @@ module KoronaClient
|
|
218
215
|
value
|
219
216
|
end
|
220
217
|
end
|
221
|
-
|
222
218
|
end
|
223
|
-
|
224
219
|
end
|
@@ -3,17 +3,16 @@
|
|
3
3
|
|
4
4
|
#Our api provides access to our cloud services
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
7
|
-
|
6
|
+
OpenAPI spec version: 2.11.21
|
7
|
+
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.8
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module KoronaClient
|
16
|
-
|
17
16
|
class SalesTax
|
18
17
|
# indicates whether the object is active for use or not
|
19
18
|
attr_accessor :active
|
@@ -35,7 +34,6 @@ module KoronaClient
|
|
35
34
|
|
36
35
|
attr_accessor :rates
|
37
36
|
|
38
|
-
|
39
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
38
|
def self.attribute_map
|
41
39
|
{
|
@@ -70,7 +68,7 @@ module KoronaClient
|
|
70
68
|
return unless attributes.is_a?(Hash)
|
71
69
|
|
72
70
|
# convert string to symbol for hash key
|
73
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
74
72
|
|
75
73
|
if attributes.has_key?(:'active')
|
76
74
|
self.active = attributes[:'active']
|
@@ -105,20 +103,19 @@ module KoronaClient
|
|
105
103
|
self.rates = value
|
106
104
|
end
|
107
105
|
end
|
108
|
-
|
109
106
|
end
|
110
107
|
|
111
108
|
# Show invalid properties with the reasons. Usually used together with valid?
|
112
109
|
# @return Array for valid properties with the reasons
|
113
110
|
def list_invalid_properties
|
114
111
|
invalid_properties = Array.new
|
115
|
-
|
112
|
+
invalid_properties
|
116
113
|
end
|
117
114
|
|
118
115
|
# Check to see if the all the properties in the model are valid
|
119
116
|
# @return true if the model is valid
|
120
117
|
def valid?
|
121
|
-
|
118
|
+
true
|
122
119
|
end
|
123
120
|
|
124
121
|
# Checks equality by comparing each attribute.
|
@@ -158,7 +155,7 @@ module KoronaClient
|
|
158
155
|
# check to ensure the input is an array given that the the attribute
|
159
156
|
# is documented as an array but the input is not
|
160
157
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
161
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
158
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
162
159
|
end
|
163
160
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
164
161
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -240,7 +237,7 @@ module KoronaClient
|
|
240
237
|
# @return [Hash] Returns the value in the form of hash
|
241
238
|
def _to_hash(value)
|
242
239
|
if value.is_a?(Array)
|
243
|
-
value.compact.map{ |v| _to_hash(v) }
|
240
|
+
value.compact.map { |v| _to_hash(v) }
|
244
241
|
elsif value.is_a?(Hash)
|
245
242
|
{}.tap do |hash|
|
246
243
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -251,7 +248,5 @@ module KoronaClient
|
|
251
248
|
value
|
252
249
|
end
|
253
250
|
end
|
254
|
-
|
255
251
|
end
|
256
|
-
|
257
252
|
end
|
@@ -3,23 +3,21 @@
|
|
3
3
|
|
4
4
|
#Our api provides access to our cloud services
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
7
|
-
|
6
|
+
OpenAPI spec version: 2.11.21
|
7
|
+
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.8
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module KoronaClient
|
16
|
-
|
17
16
|
class SalesTaxRate
|
18
17
|
attr_accessor :rate
|
19
18
|
|
20
19
|
attr_accessor :valid_from
|
21
20
|
|
22
|
-
|
23
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
22
|
def self.attribute_map
|
25
23
|
{
|
@@ -42,7 +40,7 @@ module KoronaClient
|
|
42
40
|
return unless attributes.is_a?(Hash)
|
43
41
|
|
44
42
|
# convert string to symbol for hash key
|
45
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
44
|
|
47
45
|
if attributes.has_key?(:'rate')
|
48
46
|
self.rate = attributes[:'rate']
|
@@ -51,20 +49,19 @@ module KoronaClient
|
|
51
49
|
if attributes.has_key?(:'validFrom')
|
52
50
|
self.valid_from = attributes[:'validFrom']
|
53
51
|
end
|
54
|
-
|
55
52
|
end
|
56
53
|
|
57
54
|
# Show invalid properties with the reasons. Usually used together with valid?
|
58
55
|
# @return Array for valid properties with the reasons
|
59
56
|
def list_invalid_properties
|
60
57
|
invalid_properties = Array.new
|
61
|
-
|
58
|
+
invalid_properties
|
62
59
|
end
|
63
60
|
|
64
61
|
# Check to see if the all the properties in the model are valid
|
65
62
|
# @return true if the model is valid
|
66
63
|
def valid?
|
67
|
-
|
64
|
+
true
|
68
65
|
end
|
69
66
|
|
70
67
|
# Checks equality by comparing each attribute.
|
@@ -98,7 +95,7 @@ module KoronaClient
|
|
98
95
|
# check to ensure the input is an array given that the the attribute
|
99
96
|
# is documented as an array but the input is not
|
100
97
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
101
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
102
99
|
end
|
103
100
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
104
101
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -180,7 +177,7 @@ module KoronaClient
|
|
180
177
|
# @return [Hash] Returns the value in the form of hash
|
181
178
|
def _to_hash(value)
|
182
179
|
if value.is_a?(Array)
|
183
|
-
value.compact.map{ |v| _to_hash(v) }
|
180
|
+
value.compact.map { |v| _to_hash(v) }
|
184
181
|
elsif value.is_a?(Hash)
|
185
182
|
{}.tap do |hash|
|
186
183
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -191,7 +188,5 @@ module KoronaClient
|
|
191
188
|
value
|
192
189
|
end
|
193
190
|
end
|
194
|
-
|
195
191
|
end
|
196
|
-
|
197
192
|
end
|
@@ -3,17 +3,16 @@
|
|
3
3
|
|
4
4
|
#Our api provides access to our cloud services
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
7
|
-
|
6
|
+
OpenAPI spec version: 2.11.21
|
7
|
+
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.8
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module KoronaClient
|
16
|
-
|
17
16
|
class Sector
|
18
17
|
# indicates whether the object is active for use or not
|
19
18
|
attr_accessor :active
|
@@ -31,6 +30,7 @@ module KoronaClient
|
|
31
30
|
|
32
31
|
attr_accessor :sales_taxes
|
33
32
|
|
33
|
+
attr_accessor :revenue_accounts
|
34
34
|
|
35
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
36
36
|
def self.attribute_map
|
@@ -40,7 +40,8 @@ module KoronaClient
|
|
40
40
|
:'number' => :'number',
|
41
41
|
:'revision' => :'revision',
|
42
42
|
:'name' => :'name',
|
43
|
-
:'sales_taxes' => :'salesTaxes'
|
43
|
+
:'sales_taxes' => :'salesTaxes',
|
44
|
+
:'revenue_accounts' => :'revenueAccounts'
|
44
45
|
}
|
45
46
|
end
|
46
47
|
|
@@ -52,7 +53,8 @@ module KoronaClient
|
|
52
53
|
:'number' => :'String',
|
53
54
|
:'revision' => :'Integer',
|
54
55
|
:'name' => :'String',
|
55
|
-
:'sales_taxes' => :'Array<SectorSalesTaxItem>'
|
56
|
+
:'sales_taxes' => :'Array<SectorSalesTaxItem>',
|
57
|
+
:'revenue_accounts' => :'Array<SectorRevenueAccountItem>'
|
56
58
|
}
|
57
59
|
end
|
58
60
|
|
@@ -62,7 +64,7 @@ module KoronaClient
|
|
62
64
|
return unless attributes.is_a?(Hash)
|
63
65
|
|
64
66
|
# convert string to symbol for hash key
|
65
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
66
68
|
|
67
69
|
if attributes.has_key?(:'active')
|
68
70
|
self.active = attributes[:'active']
|
@@ -90,19 +92,24 @@ module KoronaClient
|
|
90
92
|
end
|
91
93
|
end
|
92
94
|
|
95
|
+
if attributes.has_key?(:'revenueAccounts')
|
96
|
+
if (value = attributes[:'revenueAccounts']).is_a?(Array)
|
97
|
+
self.revenue_accounts = value
|
98
|
+
end
|
99
|
+
end
|
93
100
|
end
|
94
101
|
|
95
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
96
103
|
# @return Array for valid properties with the reasons
|
97
104
|
def list_invalid_properties
|
98
105
|
invalid_properties = Array.new
|
99
|
-
|
106
|
+
invalid_properties
|
100
107
|
end
|
101
108
|
|
102
109
|
# Check to see if the all the properties in the model are valid
|
103
110
|
# @return true if the model is valid
|
104
111
|
def valid?
|
105
|
-
|
112
|
+
true
|
106
113
|
end
|
107
114
|
|
108
115
|
# Checks equality by comparing each attribute.
|
@@ -115,7 +122,8 @@ module KoronaClient
|
|
115
122
|
number == o.number &&
|
116
123
|
revision == o.revision &&
|
117
124
|
name == o.name &&
|
118
|
-
sales_taxes == o.sales_taxes
|
125
|
+
sales_taxes == o.sales_taxes &&
|
126
|
+
revenue_accounts == o.revenue_accounts
|
119
127
|
end
|
120
128
|
|
121
129
|
# @see the `==` method
|
@@ -127,7 +135,7 @@ module KoronaClient
|
|
127
135
|
# Calculates hash code according to all attributes.
|
128
136
|
# @return [Fixnum] Hash code
|
129
137
|
def hash
|
130
|
-
[active, id, number, revision, name, sales_taxes].hash
|
138
|
+
[active, id, number, revision, name, sales_taxes, revenue_accounts].hash
|
131
139
|
end
|
132
140
|
|
133
141
|
# Builds the object from hash
|
@@ -140,7 +148,7 @@ module KoronaClient
|
|
140
148
|
# check to ensure the input is an array given that the the attribute
|
141
149
|
# is documented as an array but the input is not
|
142
150
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
143
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
151
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
144
152
|
end
|
145
153
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
146
154
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -222,7 +230,7 @@ module KoronaClient
|
|
222
230
|
# @return [Hash] Returns the value in the form of hash
|
223
231
|
def _to_hash(value)
|
224
232
|
if value.is_a?(Array)
|
225
|
-
value.compact.map{ |v| _to_hash(v) }
|
233
|
+
value.compact.map { |v| _to_hash(v) }
|
226
234
|
elsif value.is_a?(Hash)
|
227
235
|
{}.tap do |hash|
|
228
236
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -233,7 +241,5 @@ module KoronaClient
|
|
233
241
|
value
|
234
242
|
end
|
235
243
|
end
|
236
|
-
|
237
244
|
end
|
238
|
-
|
239
245
|
end
|
@@ -0,0 +1,192 @@
|
|
1
|
+
=begin
|
2
|
+
#KORONA.cloud API v3
|
3
|
+
|
4
|
+
#Our api provides access to our cloud services
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.11.21
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.8
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module KoronaClient
|
16
|
+
class SectorRevenueAccountItem
|
17
|
+
attr_accessor :revenue_account
|
18
|
+
|
19
|
+
attr_accessor :economic_zone
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'revenue_account' => :'revenueAccount',
|
25
|
+
:'economic_zone' => :'economicZone'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Attribute type mapping.
|
30
|
+
def self.swagger_types
|
31
|
+
{
|
32
|
+
:'revenue_account' => :'ModelReference',
|
33
|
+
:'economic_zone' => :'ModelReference'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Initializes the object
|
38
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
39
|
+
def initialize(attributes = {})
|
40
|
+
return unless attributes.is_a?(Hash)
|
41
|
+
|
42
|
+
# convert string to symbol for hash key
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
44
|
+
|
45
|
+
if attributes.has_key?(:'revenueAccount')
|
46
|
+
self.revenue_account = attributes[:'revenueAccount']
|
47
|
+
end
|
48
|
+
|
49
|
+
if attributes.has_key?(:'economicZone')
|
50
|
+
self.economic_zone = attributes[:'economicZone']
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
55
|
+
# @return Array for valid properties with the reasons
|
56
|
+
def list_invalid_properties
|
57
|
+
invalid_properties = Array.new
|
58
|
+
invalid_properties
|
59
|
+
end
|
60
|
+
|
61
|
+
# Check to see if the all the properties in the model are valid
|
62
|
+
# @return true if the model is valid
|
63
|
+
def valid?
|
64
|
+
true
|
65
|
+
end
|
66
|
+
|
67
|
+
# Checks equality by comparing each attribute.
|
68
|
+
# @param [Object] Object to be compared
|
69
|
+
def ==(o)
|
70
|
+
return true if self.equal?(o)
|
71
|
+
self.class == o.class &&
|
72
|
+
revenue_account == o.revenue_account &&
|
73
|
+
economic_zone == o.economic_zone
|
74
|
+
end
|
75
|
+
|
76
|
+
# @see the `==` method
|
77
|
+
# @param [Object] Object to be compared
|
78
|
+
def eql?(o)
|
79
|
+
self == o
|
80
|
+
end
|
81
|
+
|
82
|
+
# Calculates hash code according to all attributes.
|
83
|
+
# @return [Fixnum] Hash code
|
84
|
+
def hash
|
85
|
+
[revenue_account, economic_zone].hash
|
86
|
+
end
|
87
|
+
|
88
|
+
# Builds the object from hash
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
90
|
+
# @return [Object] Returns the model itself
|
91
|
+
def build_from_hash(attributes)
|
92
|
+
return nil unless attributes.is_a?(Hash)
|
93
|
+
self.class.swagger_types.each_pair do |key, type|
|
94
|
+
if type =~ /\AArray<(.*)>/i
|
95
|
+
# check to ensure the input is an array given that the the attribute
|
96
|
+
# is documented as an array but the input is not
|
97
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
99
|
+
end
|
100
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
101
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
102
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
103
|
+
end
|
104
|
+
|
105
|
+
self
|
106
|
+
end
|
107
|
+
|
108
|
+
# Deserializes the data based on type
|
109
|
+
# @param string type Data type
|
110
|
+
# @param string value Value to be deserialized
|
111
|
+
# @return [Object] Deserialized data
|
112
|
+
def _deserialize(type, value)
|
113
|
+
case type.to_sym
|
114
|
+
when :DateTime
|
115
|
+
DateTime.parse(value)
|
116
|
+
when :Date
|
117
|
+
Date.parse(value)
|
118
|
+
when :String
|
119
|
+
value.to_s
|
120
|
+
when :Integer
|
121
|
+
value.to_i
|
122
|
+
when :Float
|
123
|
+
value.to_f
|
124
|
+
when :BOOLEAN
|
125
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
126
|
+
true
|
127
|
+
else
|
128
|
+
false
|
129
|
+
end
|
130
|
+
when :Object
|
131
|
+
# generic object (usually a Hash), return directly
|
132
|
+
value
|
133
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
134
|
+
inner_type = Regexp.last_match[:inner_type]
|
135
|
+
value.map { |v| _deserialize(inner_type, v) }
|
136
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
137
|
+
k_type = Regexp.last_match[:k_type]
|
138
|
+
v_type = Regexp.last_match[:v_type]
|
139
|
+
{}.tap do |hash|
|
140
|
+
value.each do |k, v|
|
141
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
else # model
|
145
|
+
temp_model = KoronaClient.const_get(type).new
|
146
|
+
temp_model.build_from_hash(value)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
# Returns the string representation of the object
|
151
|
+
# @return [String] String presentation of the object
|
152
|
+
def to_s
|
153
|
+
to_hash.to_s
|
154
|
+
end
|
155
|
+
|
156
|
+
# to_body is an alias to to_hash (backward compatibility)
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
158
|
+
def to_body
|
159
|
+
to_hash
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the object in the form of hash
|
163
|
+
# @return [Hash] Returns the object in the form of hash
|
164
|
+
def to_hash
|
165
|
+
hash = {}
|
166
|
+
self.class.attribute_map.each_pair do |attr, param|
|
167
|
+
value = self.send(attr)
|
168
|
+
next if value.nil?
|
169
|
+
hash[param] = _to_hash(value)
|
170
|
+
end
|
171
|
+
hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Outputs non-array value in the form of hash
|
175
|
+
# For object, use to_hash. Otherwise, just return the value
|
176
|
+
# @param [Object] value Any valid value
|
177
|
+
# @return [Hash] Returns the value in the form of hash
|
178
|
+
def _to_hash(value)
|
179
|
+
if value.is_a?(Array)
|
180
|
+
value.compact.map { |v| _to_hash(v) }
|
181
|
+
elsif value.is_a?(Hash)
|
182
|
+
{}.tap do |hash|
|
183
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
184
|
+
end
|
185
|
+
elsif value.respond_to? :to_hash
|
186
|
+
value.to_hash
|
187
|
+
else
|
188
|
+
value
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|