freeclimb 3.0.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/Gemfile +4 -2
- data/Gemfile.lock +38 -19
- data/README.md +37 -35
- data/docs/AccountRequest.md +9 -8
- data/docs/AccountResult.md +27 -26
- data/docs/AccountResultAllOf.md +19 -18
- data/docs/AddToConference.md +25 -24
- data/docs/AddToConferenceAllOf.md +25 -24
- data/docs/ApplicationList.md +21 -20
- data/docs/ApplicationListAllOf.md +7 -6
- data/docs/ApplicationRequest.md +19 -18
- data/docs/ApplicationResult.md +31 -30
- data/docs/ApplicationResultAllOf.md +23 -22
- data/docs/AvailableNumber.md +17 -16
- data/docs/AvailableNumberList.md +21 -20
- data/docs/AvailableNumberListAllOf.md +7 -6
- data/docs/BuyIncomingNumberRequest.md +11 -10
- data/docs/CallList.md +21 -20
- data/docs/CallListAllOf.md +7 -6
- data/docs/CallResult.md +43 -44
- data/docs/CallResultAllOf.md +35 -36
- data/docs/Capabilities.md +26 -0
- data/docs/ConferenceList.md +21 -20
- data/docs/ConferenceListAllOf.md +7 -6
- data/docs/ConferenceParticipantList.md +21 -20
- data/docs/ConferenceParticipantListAllOf.md +7 -6
- data/docs/ConferenceParticipantResult.md +25 -24
- data/docs/ConferenceParticipantResultAllOf.md +17 -16
- data/docs/ConferenceResult.md +33 -32
- data/docs/ConferenceResultAllOf.md +25 -24
- data/docs/CreateConference.md +17 -16
- data/docs/CreateConferenceAllOf.md +17 -16
- data/docs/CreateConferenceRequest.md +15 -14
- data/docs/DefaultApi.md +1629 -629
- data/docs/Dequeue.md +3 -4
- data/docs/Enqueue.md +13 -12
- data/docs/EnqueueAllOf.md +13 -12
- data/docs/FilterLogsRequest.md +7 -6
- data/docs/GetDigits.md +23 -22
- data/docs/GetDigitsAllOf.md +23 -22
- data/docs/GetSpeech.md +31 -30
- data/docs/GetSpeechAllOf.md +31 -30
- data/docs/Hangup.md +7 -6
- data/docs/HangupAllOf.md +7 -6
- data/docs/IncomingNumberList.md +21 -20
- data/docs/IncomingNumberListAllOf.md +7 -6
- data/docs/IncomingNumberRequest.md +9 -8
- data/docs/IncomingNumberResult.md +33 -30
- data/docs/IncomingNumberResultAllOf.md +25 -22
- data/docs/LogList.md +21 -20
- data/docs/LogListAllOf.md +7 -6
- data/docs/LogResult.md +19 -18
- data/docs/MakeCallRequest.md +25 -24
- data/docs/MessageRequest.md +23 -22
- data/docs/MessageRequestAllOf.md +15 -14
- data/docs/MessageResult.md +29 -28
- data/docs/MessageResultAllOf.md +21 -20
- data/docs/MessagesList.md +21 -20
- data/docs/MessagesListAllOf.md +7 -6
- data/docs/MutableResourceModel.md +13 -12
- data/docs/OutDial.md +25 -24
- data/docs/OutDialAllOf.md +25 -24
- data/docs/PaginationModel.md +19 -18
- data/docs/Pause.md +7 -6
- data/docs/PauseAllOf.md +7 -6
- data/docs/PerclCommand.md +7 -6
- data/docs/PerclScript.md +7 -6
- data/docs/Play.md +13 -12
- data/docs/PlayAllOf.md +13 -12
- data/docs/PlayEarlyMedia.md +7 -6
- data/docs/PlayEarlyMediaAllOf.md +7 -6
- data/docs/QueueList.md +21 -20
- data/docs/QueueListAllOf.md +7 -6
- data/docs/QueueMember.md +15 -14
- data/docs/QueueMemberList.md +21 -20
- data/docs/QueueMemberListAllOf.md +7 -6
- data/docs/QueueRequest.md +9 -8
- data/docs/QueueResult.md +27 -26
- data/docs/QueueResultAllOf.md +19 -18
- data/docs/RecordUtterance.md +19 -18
- data/docs/RecordUtteranceAllOf.md +19 -18
- data/docs/RecordingList.md +21 -20
- data/docs/RecordingListAllOf.md +7 -6
- data/docs/RecordingResult.md +23 -22
- data/docs/RecordingResultAllOf.md +15 -14
- data/docs/Redirect.md +7 -6
- data/docs/RedirectAllOf.md +7 -6
- data/docs/Reject.md +7 -6
- data/docs/RejectAllOf.md +7 -6
- data/docs/RemoveFromConference.md +7 -6
- data/docs/RemoveFromConferenceAllOf.md +7 -6
- data/docs/Say.md +15 -14
- data/docs/SayAllOf.md +15 -14
- data/docs/SendDigits.md +11 -10
- data/docs/SendDigitsAllOf.md +11 -10
- data/docs/SetListen.md +9 -8
- data/docs/SetListenAllOf.md +9 -8
- data/docs/SetTalk.md +9 -8
- data/docs/SetTalkAllOf.md +9 -8
- data/docs/Sms.md +13 -12
- data/docs/SmsAllOf.md +13 -12
- data/docs/StartRecordCall.md +3 -4
- data/docs/TerminateConference.md +7 -6
- data/docs/TerminateConferenceAllOf.md +7 -6
- data/docs/UpdateCallRequest.md +7 -6
- data/docs/UpdateConferenceParticipantRequest.md +9 -8
- data/docs/UpdateConferenceRequest.md +11 -10
- data/freeclimb.gemspec +3 -4
- data/lib/freeclimb/api/default_api.rb +449 -263
- data/lib/freeclimb/api_client.rb +55 -51
- data/lib/freeclimb/api_error.rb +2 -2
- data/lib/freeclimb/configuration.rb +41 -11
- data/lib/freeclimb/models/account_request.rb +20 -8
- data/lib/freeclimb/models/account_result.rb +39 -8
- data/lib/freeclimb/models/account_result_all_of.rb +39 -8
- data/lib/freeclimb/models/add_to_conference.rb +21 -8
- data/lib/freeclimb/models/add_to_conference_all_of.rb +20 -8
- data/lib/freeclimb/models/application_list.rb +28 -8
- data/lib/freeclimb/models/application_list_all_of.rb +21 -8
- data/lib/freeclimb/models/application_request.rb +20 -8
- data/lib/freeclimb/models/application_result.rb +29 -8
- data/lib/freeclimb/models/application_result_all_of.rb +29 -8
- data/lib/freeclimb/models/available_number.rb +35 -19
- data/lib/freeclimb/models/available_number_list.rb +28 -8
- data/lib/freeclimb/models/available_number_list_all_of.rb +21 -8
- data/lib/freeclimb/models/buy_incoming_number_request.rb +20 -8
- data/lib/freeclimb/models/call_list.rb +28 -8
- data/lib/freeclimb/models/call_list_all_of.rb +21 -8
- data/lib/freeclimb/models/call_result.rb +36 -21
- data/lib/freeclimb/models/call_result_all_of.rb +36 -21
- data/lib/freeclimb/models/capabilities.rb +265 -0
- data/lib/freeclimb/models/conference_list.rb +28 -8
- data/lib/freeclimb/models/conference_list_all_of.rb +21 -8
- data/lib/freeclimb/models/conference_participant_list.rb +28 -8
- data/lib/freeclimb/models/conference_participant_list_all_of.rb +21 -8
- data/lib/freeclimb/models/conference_participant_result.rb +26 -8
- data/lib/freeclimb/models/conference_participant_result_all_of.rb +26 -8
- data/lib/freeclimb/models/conference_result.rb +30 -8
- data/lib/freeclimb/models/conference_result_all_of.rb +30 -8
- data/lib/freeclimb/models/create_conference.rb +21 -8
- data/lib/freeclimb/models/create_conference_all_of.rb +20 -8
- data/lib/freeclimb/models/create_conference_request.rb +20 -8
- data/lib/freeclimb/models/dequeue.rb +21 -8
- data/lib/freeclimb/models/enqueue.rb +21 -8
- data/lib/freeclimb/models/enqueue_all_of.rb +20 -8
- data/lib/freeclimb/models/filter_logs_request.rb +20 -8
- data/lib/freeclimb/models/get_digits.rb +21 -8
- data/lib/freeclimb/models/get_digits_all_of.rb +20 -8
- data/lib/freeclimb/models/get_speech.rb +21 -8
- data/lib/freeclimb/models/get_speech_all_of.rb +20 -8
- data/lib/freeclimb/models/hangup.rb +21 -8
- data/lib/freeclimb/models/hangup_all_of.rb +20 -8
- data/lib/freeclimb/models/incoming_number_list.rb +28 -8
- data/lib/freeclimb/models/incoming_number_list_all_of.rb +21 -8
- data/lib/freeclimb/models/incoming_number_request.rb +20 -8
- data/lib/freeclimb/models/incoming_number_result.rb +39 -9
- data/lib/freeclimb/models/incoming_number_result_all_of.rb +39 -9
- data/lib/freeclimb/models/log_list.rb +28 -8
- data/lib/freeclimb/models/log_list_all_of.rb +21 -8
- data/lib/freeclimb/models/log_result.rb +27 -8
- data/lib/freeclimb/models/make_call_request.rb +22 -8
- data/lib/freeclimb/models/message_request.rb +20 -8
- data/lib/freeclimb/models/message_request_all_of.rb +20 -8
- data/lib/freeclimb/models/message_result.rb +28 -8
- data/lib/freeclimb/models/message_result_all_of.rb +28 -8
- data/lib/freeclimb/models/messages_list.rb +28 -8
- data/lib/freeclimb/models/messages_list_all_of.rb +21 -8
- data/lib/freeclimb/models/mutable_resource_model.rb +20 -8
- data/lib/freeclimb/models/out_dial.rb +21 -8
- data/lib/freeclimb/models/out_dial_all_of.rb +20 -8
- data/lib/freeclimb/models/pagination_model.rb +27 -8
- data/lib/freeclimb/models/pause.rb +21 -8
- data/lib/freeclimb/models/pause_all_of.rb +20 -8
- data/lib/freeclimb/models/percl_command.rb +39 -8
- data/lib/freeclimb/models/percl_script.rb +24 -8
- data/lib/freeclimb/models/play.rb +21 -8
- data/lib/freeclimb/models/play_all_of.rb +20 -8
- data/lib/freeclimb/models/play_early_media.rb +21 -8
- data/lib/freeclimb/models/play_early_media_all_of.rb +20 -8
- data/lib/freeclimb/models/queue_list.rb +28 -8
- data/lib/freeclimb/models/queue_list_all_of.rb +21 -8
- data/lib/freeclimb/models/queue_member.rb +25 -8
- data/lib/freeclimb/models/queue_member_list.rb +28 -8
- data/lib/freeclimb/models/queue_member_list_all_of.rb +21 -8
- data/lib/freeclimb/models/queue_request.rb +22 -8
- data/lib/freeclimb/models/queue_result.rb +27 -8
- data/lib/freeclimb/models/queue_result_all_of.rb +27 -8
- data/lib/freeclimb/models/record_utterance.rb +21 -8
- data/lib/freeclimb/models/record_utterance_all_of.rb +20 -8
- data/lib/freeclimb/models/recording_list.rb +28 -8
- data/lib/freeclimb/models/recording_list_all_of.rb +21 -8
- data/lib/freeclimb/models/recording_result.rb +25 -8
- data/lib/freeclimb/models/recording_result_all_of.rb +25 -8
- data/lib/freeclimb/models/redirect.rb +21 -8
- data/lib/freeclimb/models/redirect_all_of.rb +20 -8
- data/lib/freeclimb/models/reject.rb +21 -8
- data/lib/freeclimb/models/reject_all_of.rb +20 -8
- data/lib/freeclimb/models/remove_from_conference.rb +21 -8
- data/lib/freeclimb/models/remove_from_conference_all_of.rb +20 -8
- data/lib/freeclimb/models/say.rb +21 -8
- data/lib/freeclimb/models/say_all_of.rb +20 -8
- data/lib/freeclimb/models/send_digits.rb +21 -8
- data/lib/freeclimb/models/send_digits_all_of.rb +20 -8
- data/lib/freeclimb/models/set_listen.rb +21 -8
- data/lib/freeclimb/models/set_listen_all_of.rb +20 -8
- data/lib/freeclimb/models/set_talk.rb +21 -8
- data/lib/freeclimb/models/set_talk_all_of.rb +20 -8
- data/lib/freeclimb/models/sms.rb +21 -8
- data/lib/freeclimb/models/sms_all_of.rb +20 -8
- data/lib/freeclimb/models/start_record_call.rb +21 -8
- data/lib/freeclimb/models/terminate_conference.rb +21 -8
- data/lib/freeclimb/models/terminate_conference_all_of.rb +20 -8
- data/lib/freeclimb/models/update_call_request.rb +20 -8
- data/lib/freeclimb/models/update_conference_participant_request.rb +20 -8
- data/lib/freeclimb/models/update_conference_request.rb +20 -8
- data/lib/freeclimb/version.rb +3 -3
- data/lib/freeclimb.rb +25 -53
- data/spec/api/default_api_spec.rb +1095 -668
- data/spec/api_client_spec.rb +7 -7
- data/spec/configuration_spec.rb +13 -5
- data/spec/factories.rb +80 -0
- data/spec/models/account_request_spec.rb +20 -13
- data/spec/models/account_result_spec.rb +81 -12
- data/spec/models/add_to_conference_spec.rb +7 -14
- data/spec/models/application_list_spec.rb +55 -12
- data/spec/models/application_request_spec.rb +49 -12
- data/spec/models/application_result_spec.rb +85 -12
- data/spec/models/available_number_list_spec.rb +55 -13
- data/spec/models/available_number_spec.rb +43 -12
- data/spec/models/buy_incoming_number_request_spec.rb +25 -12
- data/spec/models/call_list_spec.rb +55 -13
- data/spec/models/call_result_spec.rb +124 -12
- data/spec/models/capabilities_spec.rb +58 -0
- data/spec/models/conference_list_spec.rb +55 -12
- data/spec/models/conference_participant_list_spec.rb +55 -12
- data/spec/models/conference_participant_result_spec.rb +67 -12
- data/spec/models/conference_result_spec.rb +99 -13
- data/spec/models/create_conference_request_spec.rb +41 -13
- data/spec/models/create_conference_spec.rb +7 -14
- data/spec/models/dequeue_spec.rb +7 -14
- data/spec/models/enqueue_spec.rb +7 -14
- data/spec/models/filter_logs_request_spec.rb +15 -14
- data/spec/models/get_digits_spec.rb +13 -14
- data/spec/models/get_speech_spec.rb +8 -15
- data/spec/models/hangup_spec.rb +5 -12
- data/spec/models/incoming_number_list_spec.rb +55 -13
- data/spec/models/incoming_number_request_spec.rb +20 -13
- data/spec/models/incoming_number_result_spec.rb +91 -13
- data/spec/models/log_list_spec.rb +55 -12
- data/spec/models/log_result_spec.rb +53 -12
- data/spec/models/make_call_request_spec.rb +67 -12
- data/spec/models/message_request_spec.rb +61 -13
- data/spec/models/message_result_spec.rb +83 -12
- data/spec/models/messages_list_spec.rb +55 -12
- data/spec/models/mutable_resource_model_spec.rb +31 -13
- data/spec/models/out_dial_spec.rb +13 -14
- data/spec/models/pagination_model_spec.rb +49 -12
- data/spec/models/pause_spec.rb +7 -14
- data/spec/models/percl_command_spec.rb +7 -14
- data/spec/models/percl_script_spec.rb +7 -14
- data/spec/models/play_early_media_spec.rb +7 -14
- data/spec/models/play_spec.rb +13 -14
- data/spec/models/queue_list_spec.rb +54 -12
- data/spec/models/queue_member_list_spec.rb +55 -12
- data/spec/models/queue_member_spec.rb +37 -13
- data/spec/models/queue_request_spec.rb +20 -14
- data/spec/models/queue_result_spec.rb +73 -12
- data/spec/models/record_utterance_spec.rb +13 -14
- data/spec/models/recording_list_spec.rb +55 -12
- data/spec/models/recording_result_spec.rb +61 -12
- data/spec/models/redirect_spec.rb +7 -14
- data/spec/models/reject_spec.rb +5 -12
- data/spec/models/remove_from_conference_spec.rb +7 -14
- data/spec/models/say_spec.rb +8 -15
- data/spec/models/send_digits_spec.rb +13 -14
- data/spec/models/set_listen_spec.rb +7 -14
- data/spec/models/set_talk_spec.rb +7 -14
- data/spec/models/sms_spec.rb +7 -14
- data/spec/models/start_record_call_spec.rb +7 -14
- data/spec/models/terminate_conference_spec.rb +7 -14
- data/spec/models/update_call_request_spec.rb +19 -14
- data/spec/models/update_conference_participant_request_spec.rb +20 -13
- data/spec/models/update_conference_request_spec.rb +29 -12
- data/spec/quickstart_spec.rb +10 -0
- data/spec/spec_helper.rb +62 -7
- metadata +17 -38
- data/freeclimb-2.0.3.gem +0 -0
- data/freeclimb-2.1.0.gem +0 -0
- data/freeclimb-2.1.1.gem +0 -0
- data/freeclimb-2.1.2.gem +0 -0
- data/freeclimb-2.2.0.gem +0 -0
- data/freeclimb-3.0.0.gem +0 -0
- data/lib/freeclimb/utils.rb +0 -34
- data/spec/api/web_mocks.rb +0 -473
@@ -4,13 +4,14 @@
|
|
4
4
|
#FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
|
-
|
7
|
+
Contact: support@freeclimb.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module Freeclimb
|
16
17
|
class CallResult
|
@@ -44,9 +45,6 @@ module Freeclimb
|
|
44
45
|
# If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI).
|
45
46
|
attr_accessor :phone_number_id
|
46
47
|
|
47
|
-
# Whether the call is currently active or has concluded.
|
48
|
-
attr_accessor :active
|
49
|
-
|
50
48
|
# * `queued` – Call is ready and waiting in line before going out. * `ringing` – Call is currently ringing. * `inProgress` – Call was answered and is currently in progress. * `canceled` – Call was hung up while it was queued or ringing. * `completed` – Call was answered and has ended normally. * `busy` – Caller received a busy signal. * `failed` – Call could not be completed as dialed, most likely because the phone number was non-existent. * `noAnswer` – Call ended without being answered.
|
51
49
|
attr_accessor :status
|
52
50
|
|
@@ -109,7 +107,6 @@ module Freeclimb
|
|
109
107
|
:'from' => :'from',
|
110
108
|
:'to' => :'to',
|
111
109
|
:'phone_number_id' => :'phoneNumberId',
|
112
|
-
:'active' => :'active',
|
113
110
|
:'status' => :'status',
|
114
111
|
:'start_time' => :'startTime',
|
115
112
|
:'connect_time' => :'connectTime',
|
@@ -122,6 +119,11 @@ module Freeclimb
|
|
122
119
|
}
|
123
120
|
end
|
124
121
|
|
122
|
+
# Returns all the JSON keys this model knows about
|
123
|
+
def self.acceptable_attributes
|
124
|
+
attribute_map.values
|
125
|
+
end
|
126
|
+
|
125
127
|
# Attribute type mapping.
|
126
128
|
def self.openapi_types
|
127
129
|
{
|
@@ -135,7 +137,6 @@ module Freeclimb
|
|
135
137
|
:'from' => :'String',
|
136
138
|
:'to' => :'String',
|
137
139
|
:'phone_number_id' => :'String',
|
138
|
-
:'active' => :'Boolean',
|
139
140
|
:'status' => :'String',
|
140
141
|
:'start_time' => :'String',
|
141
142
|
:'connect_time' => :'String',
|
@@ -151,6 +152,21 @@ module Freeclimb
|
|
151
152
|
# List of attributes with nullable: true
|
152
153
|
def self.openapi_nullable
|
153
154
|
Set.new([
|
155
|
+
:'call_id',
|
156
|
+
:'parent_call_id',
|
157
|
+
:'account_id',
|
158
|
+
:'from',
|
159
|
+
:'to',
|
160
|
+
:'phone_number_id',
|
161
|
+
:'status',
|
162
|
+
:'start_time',
|
163
|
+
:'connect_time',
|
164
|
+
:'end_time',
|
165
|
+
:'duration',
|
166
|
+
:'connect_duration',
|
167
|
+
:'direction',
|
168
|
+
:'answered_by',
|
169
|
+
:'subresource_uris'
|
154
170
|
])
|
155
171
|
end
|
156
172
|
|
@@ -217,12 +233,6 @@ module Freeclimb
|
|
217
233
|
self.phone_number_id = attributes[:'phone_number_id']
|
218
234
|
end
|
219
235
|
|
220
|
-
if attributes.key?(:'active')
|
221
|
-
self.active = attributes[:'active']
|
222
|
-
else
|
223
|
-
self.active = false
|
224
|
-
end
|
225
|
-
|
226
236
|
if attributes.key?(:'status')
|
227
237
|
self.status = attributes[:'status']
|
228
238
|
end
|
@@ -300,7 +310,6 @@ module Freeclimb
|
|
300
310
|
from == o.from &&
|
301
311
|
to == o.to &&
|
302
312
|
phone_number_id == o.phone_number_id &&
|
303
|
-
active == o.active &&
|
304
313
|
status == o.status &&
|
305
314
|
start_time == o.start_time &&
|
306
315
|
connect_time == o.connect_time &&
|
@@ -321,7 +330,7 @@ module Freeclimb
|
|
321
330
|
# Calculates hash code according to all attributes.
|
322
331
|
# @return [Integer] Hash code
|
323
332
|
def hash
|
324
|
-
[uri, date_created, date_updated, revision, call_id, parent_call_id, account_id, from, to, phone_number_id,
|
333
|
+
[uri, date_created, date_updated, revision, call_id, parent_call_id, account_id, from, to, phone_number_id, status, start_time, connect_time, end_time, duration, connect_duration, direction, answered_by, subresource_uris].hash
|
325
334
|
end
|
326
335
|
|
327
336
|
# Builds the object from hash
|
@@ -337,7 +346,9 @@ module Freeclimb
|
|
337
346
|
def build_from_hash(attributes)
|
338
347
|
return nil unless attributes.is_a?(Hash)
|
339
348
|
self.class.openapi_types.each_pair do |key, type|
|
340
|
-
if
|
349
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
350
|
+
self.send("#{key}=", nil)
|
351
|
+
elsif type =~ /\AArray<(.*)>/i
|
341
352
|
# check to ensure the input is an array given that the attribute
|
342
353
|
# is documented as an array but the input is not
|
343
354
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -345,7 +356,7 @@ module Freeclimb
|
|
345
356
|
end
|
346
357
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
347
358
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
348
|
-
end
|
359
|
+
end
|
349
360
|
end
|
350
361
|
|
351
362
|
self
|
@@ -357,8 +368,8 @@ module Freeclimb
|
|
357
368
|
# @return [Object] Deserialized data
|
358
369
|
def _deserialize(type, value)
|
359
370
|
case type.to_sym
|
360
|
-
when :
|
361
|
-
|
371
|
+
when :Time
|
372
|
+
Time.parse(value)
|
362
373
|
when :Date
|
363
374
|
Date.parse(value)
|
364
375
|
when :String
|
@@ -388,7 +399,9 @@ module Freeclimb
|
|
388
399
|
end
|
389
400
|
end
|
390
401
|
else # model
|
391
|
-
|
402
|
+
# models (e.g. Pet) or oneOf
|
403
|
+
klass = Freeclimb.const_get(type)
|
404
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
392
405
|
end
|
393
406
|
end
|
394
407
|
|
@@ -414,7 +427,7 @@ module Freeclimb
|
|
414
427
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
415
428
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
416
429
|
end
|
417
|
-
|
430
|
+
|
418
431
|
hash[param] = _to_hash(value)
|
419
432
|
end
|
420
433
|
hash
|
@@ -437,5 +450,7 @@ module Freeclimb
|
|
437
450
|
value
|
438
451
|
end
|
439
452
|
end
|
453
|
+
|
440
454
|
end
|
455
|
+
|
441
456
|
end
|
@@ -4,13 +4,14 @@
|
|
4
4
|
#FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
|
-
|
7
|
+
Contact: support@freeclimb.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module Freeclimb
|
16
17
|
class CallResultAllOf
|
@@ -32,9 +33,6 @@ module Freeclimb
|
|
32
33
|
# If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI).
|
33
34
|
attr_accessor :phone_number_id
|
34
35
|
|
35
|
-
# Whether the call is currently active or has concluded.
|
36
|
-
attr_accessor :active
|
37
|
-
|
38
36
|
# * `queued` – Call is ready and waiting in line before going out. * `ringing` – Call is currently ringing. * `inProgress` – Call was answered and is currently in progress. * `canceled` – Call was hung up while it was queued or ringing. * `completed` – Call was answered and has ended normally. * `busy` – Caller received a busy signal. * `failed` – Call could not be completed as dialed, most likely because the phone number was non-existent. * `noAnswer` – Call ended without being answered.
|
39
37
|
attr_accessor :status
|
40
38
|
|
@@ -93,7 +91,6 @@ module Freeclimb
|
|
93
91
|
:'from' => :'from',
|
94
92
|
:'to' => :'to',
|
95
93
|
:'phone_number_id' => :'phoneNumberId',
|
96
|
-
:'active' => :'active',
|
97
94
|
:'status' => :'status',
|
98
95
|
:'start_time' => :'startTime',
|
99
96
|
:'connect_time' => :'connectTime',
|
@@ -106,6 +103,11 @@ module Freeclimb
|
|
106
103
|
}
|
107
104
|
end
|
108
105
|
|
106
|
+
# Returns all the JSON keys this model knows about
|
107
|
+
def self.acceptable_attributes
|
108
|
+
attribute_map.values
|
109
|
+
end
|
110
|
+
|
109
111
|
# Attribute type mapping.
|
110
112
|
def self.openapi_types
|
111
113
|
{
|
@@ -115,7 +117,6 @@ module Freeclimb
|
|
115
117
|
:'from' => :'String',
|
116
118
|
:'to' => :'String',
|
117
119
|
:'phone_number_id' => :'String',
|
118
|
-
:'active' => :'Boolean',
|
119
120
|
:'status' => :'String',
|
120
121
|
:'start_time' => :'String',
|
121
122
|
:'connect_time' => :'String',
|
@@ -131,6 +132,21 @@ module Freeclimb
|
|
131
132
|
# List of attributes with nullable: true
|
132
133
|
def self.openapi_nullable
|
133
134
|
Set.new([
|
135
|
+
:'call_id',
|
136
|
+
:'parent_call_id',
|
137
|
+
:'account_id',
|
138
|
+
:'from',
|
139
|
+
:'to',
|
140
|
+
:'phone_number_id',
|
141
|
+
:'status',
|
142
|
+
:'start_time',
|
143
|
+
:'connect_time',
|
144
|
+
:'end_time',
|
145
|
+
:'duration',
|
146
|
+
:'connect_duration',
|
147
|
+
:'direction',
|
148
|
+
:'answered_by',
|
149
|
+
:'subresource_uris'
|
134
150
|
])
|
135
151
|
end
|
136
152
|
|
@@ -173,12 +189,6 @@ module Freeclimb
|
|
173
189
|
self.phone_number_id = attributes[:'phone_number_id']
|
174
190
|
end
|
175
191
|
|
176
|
-
if attributes.key?(:'active')
|
177
|
-
self.active = attributes[:'active']
|
178
|
-
else
|
179
|
-
self.active = false
|
180
|
-
end
|
181
|
-
|
182
192
|
if attributes.key?(:'status')
|
183
193
|
self.status = attributes[:'status']
|
184
194
|
end
|
@@ -252,7 +262,6 @@ module Freeclimb
|
|
252
262
|
from == o.from &&
|
253
263
|
to == o.to &&
|
254
264
|
phone_number_id == o.phone_number_id &&
|
255
|
-
active == o.active &&
|
256
265
|
status == o.status &&
|
257
266
|
start_time == o.start_time &&
|
258
267
|
connect_time == o.connect_time &&
|
@@ -273,7 +282,7 @@ module Freeclimb
|
|
273
282
|
# Calculates hash code according to all attributes.
|
274
283
|
# @return [Integer] Hash code
|
275
284
|
def hash
|
276
|
-
[call_id, parent_call_id, account_id, from, to, phone_number_id,
|
285
|
+
[call_id, parent_call_id, account_id, from, to, phone_number_id, status, start_time, connect_time, end_time, duration, connect_duration, direction, answered_by, subresource_uris].hash
|
277
286
|
end
|
278
287
|
|
279
288
|
# Builds the object from hash
|
@@ -289,7 +298,9 @@ module Freeclimb
|
|
289
298
|
def build_from_hash(attributes)
|
290
299
|
return nil unless attributes.is_a?(Hash)
|
291
300
|
self.class.openapi_types.each_pair do |key, type|
|
292
|
-
if
|
301
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
302
|
+
self.send("#{key}=", nil)
|
303
|
+
elsif type =~ /\AArray<(.*)>/i
|
293
304
|
# check to ensure the input is an array given that the attribute
|
294
305
|
# is documented as an array but the input is not
|
295
306
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -297,7 +308,7 @@ module Freeclimb
|
|
297
308
|
end
|
298
309
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
299
310
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
300
|
-
end
|
311
|
+
end
|
301
312
|
end
|
302
313
|
|
303
314
|
self
|
@@ -309,8 +320,8 @@ module Freeclimb
|
|
309
320
|
# @return [Object] Deserialized data
|
310
321
|
def _deserialize(type, value)
|
311
322
|
case type.to_sym
|
312
|
-
when :
|
313
|
-
|
323
|
+
when :Time
|
324
|
+
Time.parse(value)
|
314
325
|
when :Date
|
315
326
|
Date.parse(value)
|
316
327
|
when :String
|
@@ -340,7 +351,9 @@ module Freeclimb
|
|
340
351
|
end
|
341
352
|
end
|
342
353
|
else # model
|
343
|
-
|
354
|
+
# models (e.g. Pet) or oneOf
|
355
|
+
klass = Freeclimb.const_get(type)
|
356
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
344
357
|
end
|
345
358
|
end
|
346
359
|
|
@@ -366,7 +379,7 @@ module Freeclimb
|
|
366
379
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
367
380
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
368
381
|
end
|
369
|
-
|
382
|
+
|
370
383
|
hash[param] = _to_hash(value)
|
371
384
|
end
|
372
385
|
hash
|
@@ -389,5 +402,7 @@ module Freeclimb
|
|
389
402
|
value
|
390
403
|
end
|
391
404
|
end
|
405
|
+
|
392
406
|
end
|
407
|
+
|
393
408
|
end
|
@@ -0,0 +1,265 @@
|
|
1
|
+
=begin
|
2
|
+
#FreeClimb API
|
3
|
+
|
4
|
+
#FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: support@freeclimb.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Freeclimb
|
17
|
+
# Details for which features this number may be used.
|
18
|
+
class Capabilities
|
19
|
+
# Indicates whether a number can be used for voice calls. Replaces voiceEnabled.
|
20
|
+
attr_accessor :voice
|
21
|
+
|
22
|
+
# Indicates whether a number can be used SMS messaging. Replaces smsEnabled.
|
23
|
+
attr_accessor :sms
|
24
|
+
|
25
|
+
# Indicates that a number is toll-free and will make toll-free calls, and when enabled, toll-free messages.
|
26
|
+
attr_accessor :toll_free
|
27
|
+
|
28
|
+
# Indicates that a number, if sms is true, will be used for 10DLC messaging
|
29
|
+
attr_accessor :ten_dlc
|
30
|
+
|
31
|
+
# Indicates that a number is a short code and can be used for short code messaging
|
32
|
+
attr_accessor :short_code
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'voice' => :'voice',
|
38
|
+
:'sms' => :'sms',
|
39
|
+
:'toll_free' => :'tollFree',
|
40
|
+
:'ten_dlc' => :'tenDLC',
|
41
|
+
:'short_code' => :'shortCode'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Returns all the JSON keys this model knows about
|
46
|
+
def self.acceptable_attributes
|
47
|
+
attribute_map.values
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping.
|
51
|
+
def self.openapi_types
|
52
|
+
{
|
53
|
+
:'voice' => :'Boolean',
|
54
|
+
:'sms' => :'Boolean',
|
55
|
+
:'toll_free' => :'Boolean',
|
56
|
+
:'ten_dlc' => :'Boolean',
|
57
|
+
:'short_code' => :'Boolean'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# List of attributes with nullable: true
|
62
|
+
def self.openapi_nullable
|
63
|
+
Set.new([
|
64
|
+
:'voice',
|
65
|
+
:'sms',
|
66
|
+
:'toll_free',
|
67
|
+
:'ten_dlc',
|
68
|
+
:'short_code'
|
69
|
+
])
|
70
|
+
end
|
71
|
+
|
72
|
+
# Initializes the object
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
+
def initialize(attributes = {})
|
75
|
+
if (!attributes.is_a?(Hash))
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::Capabilities` initialize method"
|
77
|
+
end
|
78
|
+
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
81
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::Capabilities`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
83
|
+
end
|
84
|
+
h[k.to_sym] = v
|
85
|
+
}
|
86
|
+
|
87
|
+
if attributes.key?(:'voice')
|
88
|
+
self.voice = attributes[:'voice']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.key?(:'sms')
|
92
|
+
self.sms = attributes[:'sms']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'toll_free')
|
96
|
+
self.toll_free = attributes[:'toll_free']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'ten_dlc')
|
100
|
+
self.ten_dlc = attributes[:'ten_dlc']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'short_code')
|
104
|
+
self.short_code = attributes[:'short_code']
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
109
|
+
# @return Array for valid properties with the reasons
|
110
|
+
def list_invalid_properties
|
111
|
+
invalid_properties = Array.new
|
112
|
+
invalid_properties
|
113
|
+
end
|
114
|
+
|
115
|
+
# Check to see if the all the properties in the model are valid
|
116
|
+
# @return true if the model is valid
|
117
|
+
def valid?
|
118
|
+
true
|
119
|
+
end
|
120
|
+
|
121
|
+
# Checks equality by comparing each attribute.
|
122
|
+
# @param [Object] Object to be compared
|
123
|
+
def ==(o)
|
124
|
+
return true if self.equal?(o)
|
125
|
+
self.class == o.class &&
|
126
|
+
voice == o.voice &&
|
127
|
+
sms == o.sms &&
|
128
|
+
toll_free == o.toll_free &&
|
129
|
+
ten_dlc == o.ten_dlc &&
|
130
|
+
short_code == o.short_code
|
131
|
+
end
|
132
|
+
|
133
|
+
# @see the `==` method
|
134
|
+
# @param [Object] Object to be compared
|
135
|
+
def eql?(o)
|
136
|
+
self == o
|
137
|
+
end
|
138
|
+
|
139
|
+
# Calculates hash code according to all attributes.
|
140
|
+
# @return [Integer] Hash code
|
141
|
+
def hash
|
142
|
+
[voice, sms, toll_free, ten_dlc, short_code].hash
|
143
|
+
end
|
144
|
+
|
145
|
+
# Builds the object from hash
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
+
# @return [Object] Returns the model itself
|
148
|
+
def self.build_from_hash(attributes)
|
149
|
+
new.build_from_hash(attributes)
|
150
|
+
end
|
151
|
+
|
152
|
+
# Builds the object from hash
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
# @return [Object] Returns the model itself
|
155
|
+
def build_from_hash(attributes)
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
157
|
+
self.class.openapi_types.each_pair do |key, type|
|
158
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
159
|
+
self.send("#{key}=", nil)
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
161
|
+
# check to ensure the input is an array given that the attribute
|
162
|
+
# is documented as an array but the input is not
|
163
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
164
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
165
|
+
end
|
166
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
167
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
self
|
172
|
+
end
|
173
|
+
|
174
|
+
# Deserializes the data based on type
|
175
|
+
# @param string type Data type
|
176
|
+
# @param string value Value to be deserialized
|
177
|
+
# @return [Object] Deserialized data
|
178
|
+
def _deserialize(type, value)
|
179
|
+
case type.to_sym
|
180
|
+
when :Time
|
181
|
+
Time.parse(value)
|
182
|
+
when :Date
|
183
|
+
Date.parse(value)
|
184
|
+
when :String
|
185
|
+
value.to_s
|
186
|
+
when :Integer
|
187
|
+
value.to_i
|
188
|
+
when :Float
|
189
|
+
value.to_f
|
190
|
+
when :Boolean
|
191
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
192
|
+
true
|
193
|
+
else
|
194
|
+
false
|
195
|
+
end
|
196
|
+
when :Object
|
197
|
+
# generic object (usually a Hash), return directly
|
198
|
+
value
|
199
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
200
|
+
inner_type = Regexp.last_match[:inner_type]
|
201
|
+
value.map { |v| _deserialize(inner_type, v) }
|
202
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
203
|
+
k_type = Regexp.last_match[:k_type]
|
204
|
+
v_type = Regexp.last_match[:v_type]
|
205
|
+
{}.tap do |hash|
|
206
|
+
value.each do |k, v|
|
207
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
else # model
|
211
|
+
# models (e.g. Pet) or oneOf
|
212
|
+
klass = Freeclimb.const_get(type)
|
213
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns the string representation of the object
|
218
|
+
# @return [String] String presentation of the object
|
219
|
+
def to_s
|
220
|
+
to_hash.to_s
|
221
|
+
end
|
222
|
+
|
223
|
+
# to_body is an alias to to_hash (backward compatibility)
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_body
|
226
|
+
to_hash
|
227
|
+
end
|
228
|
+
|
229
|
+
# Returns the object in the form of hash
|
230
|
+
# @return [Hash] Returns the object in the form of hash
|
231
|
+
def to_hash
|
232
|
+
hash = {}
|
233
|
+
self.class.attribute_map.each_pair do |attr, param|
|
234
|
+
value = self.send(attr)
|
235
|
+
if value.nil?
|
236
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
237
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
238
|
+
end
|
239
|
+
|
240
|
+
hash[param] = _to_hash(value)
|
241
|
+
end
|
242
|
+
hash
|
243
|
+
end
|
244
|
+
|
245
|
+
# Outputs non-array value in the form of hash
|
246
|
+
# For object, use to_hash. Otherwise, just return the value
|
247
|
+
# @param [Object] value Any valid value
|
248
|
+
# @return [Hash] Returns the value in the form of hash
|
249
|
+
def _to_hash(value)
|
250
|
+
if value.is_a?(Array)
|
251
|
+
value.compact.map { |v| _to_hash(v) }
|
252
|
+
elsif value.is_a?(Hash)
|
253
|
+
{}.tap do |hash|
|
254
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
255
|
+
end
|
256
|
+
elsif value.respond_to? :to_hash
|
257
|
+
value.to_hash
|
258
|
+
else
|
259
|
+
value
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|
264
|
+
|
265
|
+
end
|
@@ -4,13 +4,14 @@
|
|
4
4
|
#FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
|
-
|
7
|
+
Contact: support@freeclimb.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module Freeclimb
|
16
17
|
class ConferenceList
|
@@ -51,6 +52,11 @@ module Freeclimb
|
|
51
52
|
}
|
52
53
|
end
|
53
54
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
56
|
+
def self.acceptable_attributes
|
57
|
+
attribute_map.values
|
58
|
+
end
|
59
|
+
|
54
60
|
# Attribute type mapping.
|
55
61
|
def self.openapi_types
|
56
62
|
{
|
@@ -68,6 +74,14 @@ module Freeclimb
|
|
68
74
|
# List of attributes with nullable: true
|
69
75
|
def self.openapi_nullable
|
70
76
|
Set.new([
|
77
|
+
:'total',
|
78
|
+
:'start',
|
79
|
+
:'_end',
|
80
|
+
:'page',
|
81
|
+
:'num_pages',
|
82
|
+
:'page_size',
|
83
|
+
:'next_page_uri',
|
84
|
+
:'conferences'
|
71
85
|
])
|
72
86
|
end
|
73
87
|
|
@@ -182,7 +196,9 @@ module Freeclimb
|
|
182
196
|
def build_from_hash(attributes)
|
183
197
|
return nil unless attributes.is_a?(Hash)
|
184
198
|
self.class.openapi_types.each_pair do |key, type|
|
185
|
-
if
|
199
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
200
|
+
self.send("#{key}=", nil)
|
201
|
+
elsif type =~ /\AArray<(.*)>/i
|
186
202
|
# check to ensure the input is an array given that the attribute
|
187
203
|
# is documented as an array but the input is not
|
188
204
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -190,7 +206,7 @@ module Freeclimb
|
|
190
206
|
end
|
191
207
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
192
208
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
193
|
-
end
|
209
|
+
end
|
194
210
|
end
|
195
211
|
|
196
212
|
self
|
@@ -202,8 +218,8 @@ module Freeclimb
|
|
202
218
|
# @return [Object] Deserialized data
|
203
219
|
def _deserialize(type, value)
|
204
220
|
case type.to_sym
|
205
|
-
when :
|
206
|
-
|
221
|
+
when :Time
|
222
|
+
Time.parse(value)
|
207
223
|
when :Date
|
208
224
|
Date.parse(value)
|
209
225
|
when :String
|
@@ -233,7 +249,9 @@ module Freeclimb
|
|
233
249
|
end
|
234
250
|
end
|
235
251
|
else # model
|
236
|
-
|
252
|
+
# models (e.g. Pet) or oneOf
|
253
|
+
klass = Freeclimb.const_get(type)
|
254
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
237
255
|
end
|
238
256
|
end
|
239
257
|
|
@@ -259,7 +277,7 @@ module Freeclimb
|
|
259
277
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
260
278
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
261
279
|
end
|
262
|
-
|
280
|
+
|
263
281
|
hash[param] = _to_hash(value)
|
264
282
|
end
|
265
283
|
hash
|
@@ -282,5 +300,7 @@ module Freeclimb
|
|
282
300
|
value
|
283
301
|
end
|
284
302
|
end
|
303
|
+
|
285
304
|
end
|
305
|
+
|
286
306
|
end
|