trevol 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +15 -0
- data/GENERADO.md +14 -0
- data/LICENSE +21 -0
- data/README.md +173 -0
- data/lib/trevol/client.rb +94 -0
- data/lib/trevol/errors.rb +152 -0
- data/lib/trevol/llave.rb +21 -0
- data/lib/trevol/paginacion.rb +41 -0
- data/lib/trevol/transporte.rb +173 -0
- data/lib/trevol/webhook.rb +100 -0
- data/lib/trevol.rb +18 -0
- data/lib/trevol_generado/api/balance_api.rb +220 -0
- data/lib/trevol_generado/api/credit_notes_api.rb +671 -0
- data/lib/trevol_generado/api/debit_notes_api.rb +671 -0
- data/lib/trevol_generado/api/equivalent_document_adjustments_api.rb +691 -0
- data/lib/trevol_generado/api/equivalent_documents_api.rb +698 -0
- data/lib/trevol_generado/api/events_api.rb +231 -0
- data/lib/trevol_generado/api/general_api.rb +201 -0
- data/lib/trevol_generado/api/invoices_api.rb +736 -0
- data/lib/trevol_generado/api/payroll_adjustments_api.rb +637 -0
- data/lib/trevol_generado/api/payrolls_api.rb +637 -0
- data/lib/trevol_generado/api/radian_events_api.rb +431 -0
- data/lib/trevol_generado/api/requests_api.rb +97 -0
- data/lib/trevol_generado/api/support_document_adjustments_api.rb +565 -0
- data/lib/trevol_generado/api/support_documents_api.rb +565 -0
- data/lib/trevol_generado/api/webhook_endpoints_api.rb +556 -0
- data/lib/trevol_generado/api_client.rb +441 -0
- data/lib/trevol_generado/api_error.rb +58 -0
- data/lib/trevol_generado/api_model_base.rb +88 -0
- data/lib/trevol_generado/configuration.rb +392 -0
- data/lib/trevol_generado/models/acquirer.rb +209 -0
- data/lib/trevol_generado/models/air_collection.rb +205 -0
- data/lib/trevol_generado/models/air_extension.rb +216 -0
- data/lib/trevol_generado/models/allowance_charge.rb +250 -0
- data/lib/trevol_generado/models/alternative_currency.rb +180 -0
- data/lib/trevol_generado/models/balance.rb +244 -0
- data/lib/trevol_generado/models/balance_event_data.rb +172 -0
- data/lib/trevol_generado/models/balance_transaction.rb +265 -0
- data/lib/trevol_generado/models/balance_transaction_company.rb +172 -0
- data/lib/trevol_generado/models/balance_transaction_document.rb +173 -0
- data/lib/trevol_generado/models/balance_transaction_list.rb +191 -0
- data/lib/trevol_generado/models/carrier.rb +219 -0
- data/lib/trevol_generado/models/certificate_event_data.rb +180 -0
- data/lib/trevol_generado/models/cinema_extension.rb +214 -0
- data/lib/trevol_generado/models/cinema_screening.rb +256 -0
- data/lib/trevol_generado/models/company.rb +267 -0
- data/lib/trevol_generado/models/company_key.rb +182 -0
- data/lib/trevol_generado/models/company_numbering.rb +201 -0
- data/lib/trevol_generado/models/consumption.rb +246 -0
- data/lib/trevol_generado/models/consumption_adjustment.rb +204 -0
- data/lib/trevol_generado/models/contingency.rb +160 -0
- data/lib/trevol_generado/models/credit_note_list.rb +191 -0
- data/lib/trevol_generado/models/currency.rb +241 -0
- data/lib/trevol_generado/models/customer.rb +360 -0
- data/lib/trevol_generado/models/debit_note_list.rb +191 -0
- data/lib/trevol_generado/models/deleted_object.rb +178 -0
- data/lib/trevol_generado/models/delivery.rb +200 -0
- data/lib/trevol_generado/models/delivery_email.rb +181 -0
- data/lib/trevol_generado/models/delivery_terms.rb +169 -0
- data/lib/trevol_generado/models/dian_result.rb +182 -0
- data/lib/trevol_generado/models/dian_rule.rb +216 -0
- data/lib/trevol_generado/models/document.rb +432 -0
- data/lib/trevol_generado/models/document_event_data.rb +315 -0
- data/lib/trevol_generado/models/document_reference.rb +169 -0
- data/lib/trevol_generado/models/document_totals.rb +299 -0
- data/lib/trevol_generado/models/document_totals_currency.rb +197 -0
- data/lib/trevol_generado/models/document_totals_item.rb +196 -0
- data/lib/trevol_generado/models/document_totals_tax.rb +197 -0
- data/lib/trevol_generado/models/document_totals_withholding.rb +206 -0
- data/lib/trevol_generado/models/equivalent_adjustment_item.rb +374 -0
- data/lib/trevol_generado/models/equivalent_document.rb +470 -0
- data/lib/trevol_generado/models/equivalent_document_adjustment.rb +440 -0
- data/lib/trevol_generado/models/equivalent_document_adjustment_input.rb +388 -0
- data/lib/trevol_generado/models/equivalent_document_adjustment_list.rb +191 -0
- data/lib/trevol_generado/models/equivalent_document_contingency.rb +181 -0
- data/lib/trevol_generado/models/equivalent_document_contingency_backup.rb +171 -0
- data/lib/trevol_generado/models/equivalent_document_event_data.rb +313 -0
- data/lib/trevol_generado/models/equivalent_document_input.rb +365 -0
- data/lib/trevol_generado/models/equivalent_document_list.rb +191 -0
- data/lib/trevol_generado/models/equivalent_document_reference.rb +241 -0
- data/lib/trevol_generado/models/equivalent_item.rb +387 -0
- data/lib/trevol_generado/models/event.rb +223 -0
- data/lib/trevol_generado/models/event_claim.rb +170 -0
- data/lib/trevol_generado/models/event_delivery.rb +178 -0
- data/lib/trevol_generado/models/event_delivery_email.rb +161 -0
- data/lib/trevol_generado/models/event_dian_result.rb +173 -0
- data/lib/trevol_generado/models/event_dian_rule.rb +170 -0
- data/lib/trevol_generado/models/event_document_error.rb +170 -0
- data/lib/trevol_generado/models/event_equivalent_document_ref.rb +161 -0
- data/lib/trevol_generado/models/event_error.rb +170 -0
- data/lib/trevol_generado/models/event_invoice_ref.rb +161 -0
- data/lib/trevol_generado/models/event_list.rb +191 -0
- data/lib/trevol_generado/models/event_payroll_ref.rb +160 -0
- data/lib/trevol_generado/models/event_radian_invoice_ref.rb +181 -0
- data/lib/trevol_generado/models/event_resend_input.rb +177 -0
- data/lib/trevol_generado/models/event_support_document_ref.rb +161 -0
- data/lib/trevol_generado/models/extension.rb +215 -0
- data/lib/trevol_generado/models/foreign_address.rb +218 -0
- data/lib/trevol_generado/models/free_of_charge.rb +170 -0
- data/lib/trevol_generado/models/game.rb +203 -0
- data/lib/trevol_generado/models/game_credit.rb +204 -0
- data/lib/trevol_generado/models/games_extension.rb +216 -0
- data/lib/trevol_generado/models/games_venue.rb +204 -0
- data/lib/trevol_generado/models/interoperability.rb +205 -0
- data/lib/trevol_generado/models/interoperability_collection.rb +171 -0
- data/lib/trevol_generado/models/interoperability_data.rb +186 -0
- data/lib/trevol_generado/models/invoice_input.rb +364 -0
- data/lib/trevol_generado/models/invoice_list.rb +191 -0
- data/lib/trevol_generado/models/invoice_reference.rb +198 -0
- data/lib/trevol_generado/models/item.rb +439 -0
- data/lib/trevol_generado/models/item_allowance.rb +190 -0
- data/lib/trevol_generado/models/item_consignment.rb +286 -0
- data/lib/trevol_generado/models/item_mandator.rb +231 -0
- data/lib/trevol_generado/models/item_notary.rb +204 -0
- data/lib/trevol_generado/models/item_property.rb +223 -0
- data/lib/trevol_generado/models/item_tax.rb +246 -0
- data/lib/trevol_generado/models/item_withholding.rb +214 -0
- data/lib/trevol_generado/models/meter.rb +233 -0
- data/lib/trevol_generado/models/note_input.rb +329 -0
- data/lib/trevol_generado/models/numbering.rb +178 -0
- data/lib/trevol_generado/models/numbering_expiring_event_data.rb +209 -0
- data/lib/trevol_generado/models/numbering_low_event_data.rb +209 -0
- data/lib/trevol_generado/models/origin_note.rb +230 -0
- data/lib/trevol_generado/models/payment.rb +232 -0
- data/lib/trevol_generado/models/payment_method.rb +187 -0
- data/lib/trevol_generado/models/payroll.rb +455 -0
- data/lib/trevol_generado/models/payroll_adjustment.rb +467 -0
- data/lib/trevol_generado/models/payroll_adjustment_input.rb +362 -0
- data/lib/trevol_generado/models/payroll_adjustment_list.rb +191 -0
- data/lib/trevol_generado/models/payroll_basic.rb +204 -0
- data/lib/trevol_generado/models/payroll_compensated_vacation.rb +204 -0
- data/lib/trevol_generado/models/payroll_compensation.rb +205 -0
- data/lib/trevol_generado/models/payroll_deductions.rb +370 -0
- data/lib/trevol_generado/models/payroll_disability.rb +249 -0
- data/lib/trevol_generado/models/payroll_earnings.rb +406 -0
- data/lib/trevol_generado/models/payroll_employee.rb +437 -0
- data/lib/trevol_generado/models/payroll_employer.rb +238 -0
- data/lib/trevol_generado/models/payroll_epctv_bonus.rb +191 -0
- data/lib/trevol_generado/models/payroll_event_data.rb +303 -0
- data/lib/trevol_generado/models/payroll_files.rb +179 -0
- data/lib/trevol_generado/models/payroll_input.rb +420 -0
- data/lib/trevol_generado/models/payroll_leaves.rb +184 -0
- data/lib/trevol_generado/models/payroll_list.rb +191 -0
- data/lib/trevol_generado/models/payroll_loan.rb +204 -0
- data/lib/trevol_generado/models/payroll_novelty.rb +177 -0
- data/lib/trevol_generado/models/payroll_other_concept.rb +197 -0
- data/lib/trevol_generado/models/payroll_overtime.rb +262 -0
- data/lib/trevol_generado/models/payroll_paid_period.rb +222 -0
- data/lib/trevol_generado/models/payroll_payment.rb +215 -0
- data/lib/trevol_generado/models/payroll_percent_amount.rb +205 -0
- data/lib/trevol_generado/models/payroll_period.rb +247 -0
- data/lib/trevol_generado/models/payroll_place.rb +179 -0
- data/lib/trevol_generado/models/payroll_reference.rb +188 -0
- data/lib/trevol_generado/models/payroll_salary_amounts.rb +171 -0
- data/lib/trevol_generado/models/payroll_sanction.rb +205 -0
- data/lib/trevol_generado/models/payroll_service_bonus.rb +214 -0
- data/lib/trevol_generado/models/payroll_severance.rb +232 -0
- data/lib/trevol_generado/models/payroll_solidarity_fund.rb +191 -0
- data/lib/trevol_generado/models/payroll_totals.rb +188 -0
- data/lib/trevol_generado/models/payroll_transport.rb +181 -0
- data/lib/trevol_generado/models/payroll_unpaid_period.rb +195 -0
- data/lib/trevol_generado/models/payroll_vacation.rb +173 -0
- data/lib/trevol_generado/models/payroll_workplace.rb +188 -0
- data/lib/trevol_generado/models/period.rb +169 -0
- data/lib/trevol_generado/models/physical_document.rb +179 -0
- data/lib/trevol_generado/models/pos.rb +186 -0
- data/lib/trevol_generado/models/pos_buyer.rb +181 -0
- data/lib/trevol_generado/models/pos_register.rb +269 -0
- data/lib/trevol_generado/models/prepayment.rb +248 -0
- data/lib/trevol_generado/models/preview.rb +195 -0
- data/lib/trevol_generado/models/problem.rb +329 -0
- data/lib/trevol_generado/models/problem_error.rb +178 -0
- data/lib/trevol_generado/models/public_services_extension.rb +385 -0
- data/lib/trevol_generado/models/radian_event.rb +359 -0
- data/lib/trevol_generado/models/radian_event_data.rb +289 -0
- data/lib/trevol_generado/models/radian_event_input.rb +284 -0
- data/lib/trevol_generado/models/radian_event_invoice.rb +208 -0
- data/lib/trevol_generado/models/radian_event_list.rb +191 -0
- data/lib/trevol_generado/models/received_invoice.rb +200 -0
- data/lib/trevol_generado/models/received_invoice_issuer.rb +190 -0
- data/lib/trevol_generado/models/references.rb +182 -0
- data/lib/trevol_generado/models/request_list.rb +191 -0
- data/lib/trevol_generado/models/request_log.rb +275 -0
- data/lib/trevol_generado/models/seller.rb +385 -0
- data/lib/trevol_generado/models/shipment.rb +178 -0
- data/lib/trevol_generado/models/show_event.rb +276 -0
- data/lib/trevol_generado/models/show_extension.rb +203 -0
- data/lib/trevol_generado/models/show_producer.rb +212 -0
- data/lib/trevol_generado/models/standard_code.rb +169 -0
- data/lib/trevol_generado/models/stock_exchange_extension.rb +320 -0
- data/lib/trevol_generado/models/stock_exchange_prices.rb +169 -0
- data/lib/trevol_generado/models/support_adjustment_item.rb +295 -0
- data/lib/trevol_generado/models/support_adjustment_reference.rb +188 -0
- data/lib/trevol_generado/models/support_currency.rb +231 -0
- data/lib/trevol_generado/models/support_document.rb +401 -0
- data/lib/trevol_generado/models/support_document_adjustment.rb +409 -0
- data/lib/trevol_generado/models/support_document_adjustment_input.rb +331 -0
- data/lib/trevol_generado/models/support_document_adjustment_list.rb +191 -0
- data/lib/trevol_generado/models/support_document_delivery.rb +199 -0
- data/lib/trevol_generado/models/support_document_event_data.rb +305 -0
- data/lib/trevol_generado/models/support_document_input.rb +331 -0
- data/lib/trevol_generado/models/support_document_list.rb +191 -0
- data/lib/trevol_generado/models/support_document_reference.rb +198 -0
- data/lib/trevol_generado/models/support_item.rb +317 -0
- data/lib/trevol_generado/models/support_item_charge.rb +180 -0
- data/lib/trevol_generado/models/support_item_tax.rb +197 -0
- data/lib/trevol_generado/models/support_item_withholding.rb +205 -0
- data/lib/trevol_generado/models/tacit_acceptance.rb +224 -0
- data/lib/trevol_generado/models/tacit_acceptance_rule.rb +226 -0
- data/lib/trevol_generado/models/test_event_data.rb +171 -0
- data/lib/trevol_generado/models/third_party_charge.rb +277 -0
- data/lib/trevol_generado/models/third_party_company.rb +203 -0
- data/lib/trevol_generado/models/top_up.rb +199 -0
- data/lib/trevol_generado/models/top_up_buyer.rb +352 -0
- data/lib/trevol_generado/models/top_up_input.rb +187 -0
- data/lib/trevol_generado/models/top_up_wompi.rb +209 -0
- data/lib/trevol_generado/models/transport_extension.rb +281 -0
- data/lib/trevol_generado/models/webhook_delivery.rb +267 -0
- data/lib/trevol_generado/models/webhook_delivery_attempt.rb +192 -0
- data/lib/trevol_generado/models/webhook_delivery_list.rb +191 -0
- data/lib/trevol_generado/models/webhook_endpoint.rb +317 -0
- data/lib/trevol_generado/models/webhook_endpoint_input.rb +229 -0
- data/lib/trevol_generado/models/webhook_endpoint_list.rb +191 -0
- data/lib/trevol_generado/models/webhook_endpoint_rotate_input.rb +160 -0
- data/lib/trevol_generado/models/webhook_endpoint_update.rb +227 -0
- data/lib/trevol_generado/models/withholding.rb +224 -0
- data/lib/trevol_generado/tablas.rb +243 -0
- data/lib/trevol_generado/version.rb +15 -0
- data/lib/trevol_generado.rb +251 -0
- metadata +386 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#API de Trevol
|
|
3
|
+
|
|
4
|
+
#Trevol API. Documentación: https://platform.trevol.si/docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026-10-22
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TrevolGenerado
|
|
17
|
+
class Game < ApiModelBase
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
attr_accessor :total
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'type' => :'type',
|
|
26
|
+
:'total' => :'total'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'type' => :'String',
|
|
44
|
+
:'total' => :'Integer'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns attribute type mapping
|
|
55
|
+
def self.acceptable_openapi_types
|
|
56
|
+
openapi_types
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Returns the nullable attributes
|
|
60
|
+
def self.acceptable_openapi_nullable
|
|
61
|
+
openapi_nullable
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::Game` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::Game`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'type')
|
|
81
|
+
self.type = attributes[:'type']
|
|
82
|
+
else
|
|
83
|
+
self.type = nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'total')
|
|
87
|
+
self.total = attributes[:'total']
|
|
88
|
+
else
|
|
89
|
+
self.total = nil
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
94
|
+
# @return Array for valid properties with the reasons
|
|
95
|
+
def list_invalid_properties
|
|
96
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
97
|
+
invalid_properties = Array.new
|
|
98
|
+
if @type.nil?
|
|
99
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if @total.nil?
|
|
103
|
+
invalid_properties.push('invalid value for "total", total cannot be nil.')
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
invalid_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check to see if the all the properties in the model are valid
|
|
110
|
+
# @return true if the model is valid
|
|
111
|
+
def valid?
|
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
+
return false if @type.nil?
|
|
114
|
+
return false if @total.nil?
|
|
115
|
+
true
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] type Value to be assigned
|
|
120
|
+
def type=(type)
|
|
121
|
+
if type.nil?
|
|
122
|
+
fail ArgumentError, 'type cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@type = type
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method with validation
|
|
129
|
+
# @param [Object] total Value to be assigned
|
|
130
|
+
def total=(total)
|
|
131
|
+
if total.nil?
|
|
132
|
+
fail ArgumentError, 'total cannot be nil'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
@total = total
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Checks equality by comparing each attribute.
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def ==(o)
|
|
141
|
+
return true if self.equal?(o)
|
|
142
|
+
self.class == o.class &&
|
|
143
|
+
type == o.type &&
|
|
144
|
+
total == o.total
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @see the `==` method
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def eql?(o)
|
|
150
|
+
self == o
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Calculates hash code according to all attributes.
|
|
154
|
+
# @return [Integer] Hash code
|
|
155
|
+
def hash
|
|
156
|
+
[type, total].hash
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Builds the object from hash
|
|
160
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
161
|
+
# @return [Object] Returns the model itself
|
|
162
|
+
def self.build_from_hash(attributes)
|
|
163
|
+
return nil unless attributes.is_a?(Hash)
|
|
164
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
165
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
166
|
+
map = acceptable_attribute_map
|
|
167
|
+
transformed_hash = {}
|
|
168
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
169
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
170
|
+
transformed_hash["#{key}"] = nil
|
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
172
|
+
# check to ensure the input is an array given that the attribute
|
|
173
|
+
# is documented as an array but the input is not
|
|
174
|
+
if attributes[map[key]].is_a?(Array)
|
|
175
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
176
|
+
end
|
|
177
|
+
elsif !attributes[map[key]].nil?
|
|
178
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
new(transformed_hash)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Returns the object in the form of hash
|
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
|
186
|
+
def to_hash
|
|
187
|
+
hash = {}
|
|
188
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
189
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
190
|
+
value = self.send(attr)
|
|
191
|
+
if value.nil?
|
|
192
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
193
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
hash[param] = _to_hash(value)
|
|
197
|
+
end
|
|
198
|
+
hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#API de Trevol
|
|
3
|
+
|
|
4
|
+
#Trevol API. Documentación: https://platform.trevol.si/docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026-10-22
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TrevolGenerado
|
|
17
|
+
class GameCredit < ApiModelBase
|
|
18
|
+
attr_accessor :serial
|
|
19
|
+
|
|
20
|
+
# Número o texto decimal con punto («150000.50»).
|
|
21
|
+
attr_accessor :amount
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'serial' => :'serial',
|
|
27
|
+
:'amount' => :'amount'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'serial' => :'String',
|
|
45
|
+
:'amount' => :'String'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute type mapping
|
|
56
|
+
def self.acceptable_openapi_types
|
|
57
|
+
openapi_types
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns the nullable attributes
|
|
61
|
+
def self.acceptable_openapi_nullable
|
|
62
|
+
openapi_nullable
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::GameCredit` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::GameCredit`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'serial')
|
|
82
|
+
self.serial = attributes[:'serial']
|
|
83
|
+
else
|
|
84
|
+
self.serial = nil
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'amount')
|
|
88
|
+
self.amount = attributes[:'amount']
|
|
89
|
+
else
|
|
90
|
+
self.amount = nil
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
95
|
+
# @return Array for valid properties with the reasons
|
|
96
|
+
def list_invalid_properties
|
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
if @serial.nil?
|
|
100
|
+
invalid_properties.push('invalid value for "serial", serial cannot be nil.')
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if @amount.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
invalid_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Check to see if the all the properties in the model are valid
|
|
111
|
+
# @return true if the model is valid
|
|
112
|
+
def valid?
|
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
114
|
+
return false if @serial.nil?
|
|
115
|
+
return false if @amount.nil?
|
|
116
|
+
true
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Custom attribute writer method with validation
|
|
120
|
+
# @param [Object] serial Value to be assigned
|
|
121
|
+
def serial=(serial)
|
|
122
|
+
if serial.nil?
|
|
123
|
+
fail ArgumentError, 'serial cannot be nil'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
@serial = serial
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method with validation
|
|
130
|
+
# @param [Object] amount Value to be assigned
|
|
131
|
+
def amount=(amount)
|
|
132
|
+
if amount.nil?
|
|
133
|
+
fail ArgumentError, 'amount cannot be nil'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
@amount = amount
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Checks equality by comparing each attribute.
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def ==(o)
|
|
142
|
+
return true if self.equal?(o)
|
|
143
|
+
self.class == o.class &&
|
|
144
|
+
serial == o.serial &&
|
|
145
|
+
amount == o.amount
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# @see the `==` method
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def eql?(o)
|
|
151
|
+
self == o
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Calculates hash code according to all attributes.
|
|
155
|
+
# @return [Integer] Hash code
|
|
156
|
+
def hash
|
|
157
|
+
[serial, amount].hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Builds the object from hash
|
|
161
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
162
|
+
# @return [Object] Returns the model itself
|
|
163
|
+
def self.build_from_hash(attributes)
|
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
|
165
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
166
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
167
|
+
map = acceptable_attribute_map
|
|
168
|
+
transformed_hash = {}
|
|
169
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
170
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = nil
|
|
172
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
173
|
+
# check to ensure the input is an array given that the attribute
|
|
174
|
+
# is documented as an array but the input is not
|
|
175
|
+
if attributes[map[key]].is_a?(Array)
|
|
176
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
177
|
+
end
|
|
178
|
+
elsif !attributes[map[key]].nil?
|
|
179
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
new(transformed_hash)
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Returns the object in the form of hash
|
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
|
187
|
+
def to_hash
|
|
188
|
+
hash = {}
|
|
189
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
190
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
191
|
+
value = self.send(attr)
|
|
192
|
+
if value.nil?
|
|
193
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
194
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
hash[param] = _to_hash(value)
|
|
198
|
+
end
|
|
199
|
+
hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
end
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#API de Trevol
|
|
3
|
+
|
|
4
|
+
#Trevol API. Documentación: https://platform.trevol.si/docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2026-10-22
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TrevolGenerado
|
|
17
|
+
class GamesExtension < ApiModelBase
|
|
18
|
+
attr_accessor :venue
|
|
19
|
+
|
|
20
|
+
attr_accessor :games
|
|
21
|
+
|
|
22
|
+
attr_accessor :credits
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'venue' => :'venue',
|
|
28
|
+
:'games' => :'games',
|
|
29
|
+
:'credits' => :'credits'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'venue' => :'GamesVenue',
|
|
47
|
+
:'games' => :'Array<Game>',
|
|
48
|
+
:'credits' => :'Array<GameCredit>'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns attribute type mapping
|
|
59
|
+
def self.acceptable_openapi_types
|
|
60
|
+
openapi_types
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns the nullable attributes
|
|
64
|
+
def self.acceptable_openapi_nullable
|
|
65
|
+
openapi_nullable
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Initializes the object
|
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
|
+
def initialize(attributes = {})
|
|
71
|
+
if (!attributes.is_a?(Hash))
|
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrevolGenerado::GamesExtension` initialize method"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
77
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrevolGenerado::GamesExtension`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
80
|
+
end
|
|
81
|
+
h[k.to_sym] = v
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'venue')
|
|
85
|
+
self.venue = attributes[:'venue']
|
|
86
|
+
else
|
|
87
|
+
self.venue = nil
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'games')
|
|
91
|
+
if (value = attributes[:'games']).is_a?(Array)
|
|
92
|
+
self.games = value
|
|
93
|
+
end
|
|
94
|
+
else
|
|
95
|
+
self.games = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'credits')
|
|
99
|
+
if (value = attributes[:'credits']).is_a?(Array)
|
|
100
|
+
self.credits = value
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
if @venue.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "venue", venue cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @games.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "games", games cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
invalid_properties
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Check to see if the all the properties in the model are valid
|
|
122
|
+
# @return true if the model is valid
|
|
123
|
+
def valid?
|
|
124
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
125
|
+
return false if @venue.nil?
|
|
126
|
+
return false if @games.nil?
|
|
127
|
+
true
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Custom attribute writer method with validation
|
|
131
|
+
# @param [Object] venue Value to be assigned
|
|
132
|
+
def venue=(venue)
|
|
133
|
+
if venue.nil?
|
|
134
|
+
fail ArgumentError, 'venue cannot be nil'
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
@venue = venue
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Custom attribute writer method with validation
|
|
141
|
+
# @param [Object] games Value to be assigned
|
|
142
|
+
def games=(games)
|
|
143
|
+
if games.nil?
|
|
144
|
+
fail ArgumentError, 'games cannot be nil'
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
@games = games
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Checks equality by comparing each attribute.
|
|
151
|
+
# @param [Object] Object to be compared
|
|
152
|
+
def ==(o)
|
|
153
|
+
return true if self.equal?(o)
|
|
154
|
+
self.class == o.class &&
|
|
155
|
+
venue == o.venue &&
|
|
156
|
+
games == o.games &&
|
|
157
|
+
credits == o.credits
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# @see the `==` method
|
|
161
|
+
# @param [Object] Object to be compared
|
|
162
|
+
def eql?(o)
|
|
163
|
+
self == o
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Calculates hash code according to all attributes.
|
|
167
|
+
# @return [Integer] Hash code
|
|
168
|
+
def hash
|
|
169
|
+
[venue, games, credits].hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Builds the object from hash
|
|
173
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
174
|
+
# @return [Object] Returns the model itself
|
|
175
|
+
def self.build_from_hash(attributes)
|
|
176
|
+
return nil unless attributes.is_a?(Hash)
|
|
177
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
178
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
179
|
+
map = acceptable_attribute_map
|
|
180
|
+
transformed_hash = {}
|
|
181
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
182
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
183
|
+
transformed_hash["#{key}"] = nil
|
|
184
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
185
|
+
# check to ensure the input is an array given that the attribute
|
|
186
|
+
# is documented as an array but the input is not
|
|
187
|
+
if attributes[map[key]].is_a?(Array)
|
|
188
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
189
|
+
end
|
|
190
|
+
elsif !attributes[map[key]].nil?
|
|
191
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
new(transformed_hash)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Returns the object in the form of hash
|
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
|
199
|
+
def to_hash
|
|
200
|
+
hash = {}
|
|
201
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
202
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
203
|
+
value = self.send(attr)
|
|
204
|
+
if value.nil?
|
|
205
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
hash[param] = _to_hash(value)
|
|
210
|
+
end
|
|
211
|
+
hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
end
|