freeclimb 1.0.1 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +80 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +67 -42
  5. data/docs/AccountRequest.md +3 -5
  6. data/docs/AccountResult.md +12 -12
  7. data/docs/AccountResultAllOf.md +8 -8
  8. data/docs/AddToConference.md +35 -0
  9. data/docs/AddToConferenceAllOf.md +35 -0
  10. data/docs/ApplicationList.md +9 -9
  11. data/docs/ApplicationListAllOf.md +2 -2
  12. data/docs/ApplicationRequest.md +8 -10
  13. data/docs/ApplicationResult.md +14 -14
  14. data/docs/ApplicationResultAllOf.md +10 -10
  15. data/docs/AvailableNumber.md +7 -7
  16. data/docs/AvailableNumberList.md +9 -9
  17. data/docs/AvailableNumberListAllOf.md +2 -2
  18. data/docs/BuyIncomingNumberRequest.md +4 -6
  19. data/docs/CallList.md +9 -9
  20. data/docs/CallListAllOf.md +2 -2
  21. data/docs/CallResult.md +20 -20
  22. data/docs/CallResultAllOf.md +16 -16
  23. data/docs/ConferenceList.md +9 -9
  24. data/docs/ConferenceListAllOf.md +2 -2
  25. data/docs/ConferenceParticipantList.md +9 -9
  26. data/docs/ConferenceParticipantListAllOf.md +2 -2
  27. data/docs/ConferenceParticipantResult.md +11 -11
  28. data/docs/ConferenceParticipantResultAllOf.md +7 -7
  29. data/docs/ConferenceResult.md +15 -15
  30. data/docs/ConferenceResultAllOf.md +11 -11
  31. data/docs/CreateConference.md +27 -0
  32. data/docs/CreateConferenceAllOf.md +27 -0
  33. data/docs/CreateConferenceRequest.md +6 -8
  34. data/docs/DefaultApi.md +22 -38
  35. data/docs/Dequeue.md +16 -0
  36. data/docs/Enqueue.md +23 -0
  37. data/docs/EnqueueAllOf.md +23 -0
  38. data/docs/FilterLogsRequest.md +2 -4
  39. data/docs/GetDigits.md +33 -0
  40. data/docs/GetDigitsAllOf.md +33 -0
  41. data/docs/GetSpeech.md +41 -0
  42. data/docs/GetSpeechAllOf.md +41 -0
  43. data/docs/IncomingNumberList.md +9 -9
  44. data/docs/IncomingNumberListAllOf.md +2 -2
  45. data/docs/IncomingNumberRequest.md +3 -5
  46. data/docs/IncomingNumberResult.md +14 -14
  47. data/docs/IncomingNumberResultAllOf.md +10 -10
  48. data/docs/LogList.md +9 -9
  49. data/docs/LogListAllOf.md +2 -2
  50. data/docs/LogResult.md +8 -8
  51. data/docs/MakeCallRequest.md +11 -11
  52. data/docs/MessageRequest.md +10 -12
  53. data/docs/MessageRequestAllOf.md +6 -8
  54. data/docs/MessageResult.md +14 -14
  55. data/docs/MessageResultAllOf.md +10 -10
  56. data/docs/MessagesList.md +9 -9
  57. data/docs/MessagesListAllOf.md +2 -2
  58. data/docs/MutableResourceModel.md +5 -5
  59. data/docs/OutDial.md +35 -0
  60. data/docs/OutDialAllOf.md +35 -0
  61. data/docs/PaginationModel.md +8 -8
  62. data/docs/Pause.md +17 -0
  63. data/docs/PauseAllOf.md +17 -0
  64. data/docs/PerclCommand.md +17 -0
  65. data/docs/PerclScript.md +17 -0
  66. data/docs/Play.md +23 -0
  67. data/docs/PlayAllOf.md +23 -0
  68. data/docs/PlayEarlyMedia.md +17 -0
  69. data/docs/PlayEarlyMediaAllOf.md +17 -0
  70. data/docs/QueueList.md +9 -9
  71. data/docs/QueueListAllOf.md +2 -2
  72. data/docs/QueueMember.md +6 -6
  73. data/docs/QueueMemberList.md +9 -9
  74. data/docs/QueueMemberListAllOf.md +2 -2
  75. data/docs/QueueRequest.md +3 -5
  76. data/docs/QueueResult.md +12 -12
  77. data/docs/QueueResultAllOf.md +8 -8
  78. data/docs/RecordUtterance.md +27 -0
  79. data/docs/RecordUtteranceAllOf.md +27 -0
  80. data/docs/RecordingList.md +9 -9
  81. data/docs/RecordingListAllOf.md +2 -2
  82. data/docs/RecordingResult.md +10 -10
  83. data/docs/RecordingResultAllOf.md +6 -6
  84. data/docs/Redirect.md +17 -0
  85. data/docs/RedirectAllOf.md +17 -0
  86. data/docs/RemoveFromConference.md +17 -0
  87. data/docs/RemoveFromConferenceAllOf.md +17 -0
  88. data/docs/Say.md +25 -0
  89. data/docs/SayAllOf.md +25 -0
  90. data/docs/SendDigits.md +21 -0
  91. data/docs/SendDigitsAllOf.md +21 -0
  92. data/docs/SetListen.md +19 -0
  93. data/docs/SetListenAllOf.md +19 -0
  94. data/docs/SetTalk.md +19 -0
  95. data/docs/SetTalkAllOf.md +19 -0
  96. data/docs/Sms.md +23 -0
  97. data/docs/SmsAllOf.md +23 -0
  98. data/docs/StartRecordCall.md +16 -0
  99. data/docs/TerminateConference.md +17 -0
  100. data/docs/TerminateConferenceAllOf.md +17 -0
  101. data/docs/UpdateCallRequest.md +2 -4
  102. data/docs/UpdateConferenceParticipantRequest.md +3 -5
  103. data/docs/UpdateConferenceRequest.md +4 -6
  104. data/freeclimb-2.1.0.gem +0 -0
  105. data/lib/freeclimb.rb +69 -2
  106. data/lib/freeclimb/api/default_api.rb +42 -34
  107. data/lib/freeclimb/api_client.rb +1 -1
  108. data/lib/freeclimb/models/account_request.rb +4 -14
  109. data/lib/freeclimb/models/add_to_conference.rb +320 -0
  110. data/lib/freeclimb/models/add_to_conference_all_of.rb +307 -0
  111. data/lib/freeclimb/models/application_request.rb +4 -14
  112. data/lib/freeclimb/models/buy_incoming_number_request.rb +4 -14
  113. data/lib/freeclimb/models/create_conference.rb +275 -0
  114. data/lib/freeclimb/models/create_conference_all_of.rb +262 -0
  115. data/lib/freeclimb/models/create_conference_request.rb +4 -14
  116. data/lib/freeclimb/models/dequeue.rb +209 -0
  117. data/lib/freeclimb/models/enqueue.rb +265 -0
  118. data/lib/freeclimb/models/enqueue_all_of.rb +252 -0
  119. data/lib/freeclimb/models/filter_logs_request.rb +4 -14
  120. data/lib/freeclimb/models/get_digits.rb +307 -0
  121. data/lib/freeclimb/models/get_digits_all_of.rb +294 -0
  122. data/lib/freeclimb/models/get_speech.rb +352 -0
  123. data/lib/freeclimb/models/get_speech_all_of.rb +339 -0
  124. data/lib/freeclimb/models/incoming_number_request.rb +4 -14
  125. data/lib/freeclimb/models/make_call_request.rb +14 -14
  126. data/lib/freeclimb/models/message_request.rb +1 -11
  127. data/lib/freeclimb/models/message_request_all_of.rb +1 -11
  128. data/lib/freeclimb/models/message_result.rb +3 -3
  129. data/lib/freeclimb/models/message_result_all_of.rb +3 -3
  130. data/lib/freeclimb/models/out_dial.rb +330 -0
  131. data/lib/freeclimb/models/out_dial_all_of.rb +317 -0
  132. data/lib/freeclimb/models/pause.rb +225 -0
  133. data/lib/freeclimb/models/{dequeue_member_request.rb → pause_all_of.rb} +16 -11
  134. data/lib/freeclimb/models/percl_command.rb +211 -0
  135. data/lib/freeclimb/models/percl_script.rb +210 -0
  136. data/lib/freeclimb/models/play.rb +255 -0
  137. data/lib/freeclimb/models/play_all_of.rb +242 -0
  138. data/lib/freeclimb/models/play_early_media.rb +225 -0
  139. data/lib/freeclimb/models/play_early_media_all_of.rb +212 -0
  140. data/lib/freeclimb/models/queue_request.rb +4 -14
  141. data/lib/freeclimb/models/record_utterance.rb +275 -0
  142. data/lib/freeclimb/models/record_utterance_all_of.rb +262 -0
  143. data/lib/freeclimb/models/redirect.rb +220 -0
  144. data/lib/freeclimb/models/redirect_all_of.rb +207 -0
  145. data/lib/freeclimb/models/remove_from_conference.rb +225 -0
  146. data/lib/freeclimb/models/remove_from_conference_all_of.rb +212 -0
  147. data/lib/freeclimb/models/say.rb +265 -0
  148. data/lib/freeclimb/models/say_all_of.rb +252 -0
  149. data/lib/freeclimb/models/send_digits.rb +245 -0
  150. data/lib/freeclimb/models/send_digits_all_of.rb +232 -0
  151. data/lib/freeclimb/models/set_listen.rb +235 -0
  152. data/lib/freeclimb/models/set_listen_all_of.rb +222 -0
  153. data/lib/freeclimb/models/set_talk.rb +235 -0
  154. data/lib/freeclimb/models/set_talk_all_of.rb +222 -0
  155. data/lib/freeclimb/models/sms.rb +265 -0
  156. data/lib/freeclimb/models/sms_all_of.rb +252 -0
  157. data/lib/freeclimb/models/start_record_call.rb +209 -0
  158. data/lib/freeclimb/models/terminate_conference.rb +225 -0
  159. data/lib/freeclimb/models/terminate_conference_all_of.rb +212 -0
  160. data/lib/freeclimb/models/update_call_request.rb +4 -14
  161. data/lib/freeclimb/models/update_conference_participant_request.rb +4 -14
  162. data/lib/freeclimb/models/update_conference_request.rb +4 -14
  163. data/lib/freeclimb/version.rb +1 -1
  164. data/spec/api/default_api_spec.rb +9 -24
  165. data/spec/models/add_to_conference_spec.rb +95 -0
  166. data/spec/models/create_conference_spec.rb +71 -0
  167. data/spec/models/{dequeue_member_request_spec.rb → dequeue_spec.rb} +8 -7
  168. data/spec/models/enqueue_spec.rb +59 -0
  169. data/spec/models/get_digits_spec.rb +83 -0
  170. data/spec/models/get_speech_spec.rb +113 -0
  171. data/spec/models/out_dial_spec.rb +89 -0
  172. data/spec/models/pause_spec.rb +41 -0
  173. data/spec/models/percl_command_spec.rb +41 -0
  174. data/spec/models/percl_script_spec.rb +41 -0
  175. data/spec/models/play_early_media_spec.rb +41 -0
  176. data/spec/models/play_spec.rb +53 -0
  177. data/spec/models/record_utterance_spec.rb +71 -0
  178. data/spec/models/redirect_spec.rb +41 -0
  179. data/spec/models/remove_from_conference_spec.rb +41 -0
  180. data/spec/models/say_spec.rb +65 -0
  181. data/spec/models/send_digits_spec.rb +47 -0
  182. data/spec/models/set_listen_spec.rb +47 -0
  183. data/spec/models/set_talk_spec.rb +47 -0
  184. data/spec/models/sms_spec.rb +59 -0
  185. data/spec/models/start_record_call_spec.rb +35 -0
  186. data/spec/models/terminate_conference_spec.rb +41 -0
  187. metadata +128 -34
  188. data/docs/DequeueMemberRequest.md +0 -17
  189. data/docs/Percl.md +0 -697
  190. data/lib/percl/calls.rb +0 -43
  191. data/lib/percl/conference_participants.rb +0 -40
  192. data/lib/percl/conferences.rb +0 -21
  193. data/lib/percl/ivr.rb +0 -63
  194. data/lib/percl/jsonable.rb +0 -23
  195. data/lib/percl/percl.rb +0 -29
  196. data/lib/percl/queue_members.rb +0 -15
  197. data/lib/percl/recordings.rb +0 -15
  198. data/lib/percl/sms.rb +0 -11
  199. data/spec/percl/calls_spec.rb +0 -111
  200. data/spec/percl/conference_participant_spec.rb +0 -96
  201. data/spec/percl/conference_spec.rb +0 -46
  202. data/spec/percl/ivr_spec.rb +0 -155
  203. data/spec/percl/jsonable_spec.rb +0 -28
  204. data/spec/percl/percl_spec.rb +0 -31
  205. data/spec/percl/queue_members_spec.rb +0 -35
  206. data/spec/percl/recordings_spec.rb +0 -32
  207. data/spec/percl/sms_spec.rb +0 -29
@@ -30,7 +30,7 @@ module Freeclimb
30
30
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
31
31
  def initialize(config = Configuration.default)
32
32
  @config = config
33
- @user_agent = "FreeClimbSDK/1.0.1/ruby"
33
+ @user_agent = "FreeClimbSDK/2.0.3/ruby"
34
34
  @default_headers = {
35
35
  'Content-Type' => 'application/json',
36
36
  'User-Agent' => @user_agent
@@ -20,15 +20,11 @@ module Freeclimb
20
20
  # Group to which this account belongs.
21
21
  attr_accessor :label
22
22
 
23
- # RequestId for this request starting with prefix *RQ* followed by 40 hexadecimal characters. FreeClimb logs generated while processing this request will include this requestId. If it is not provided, FreeClimb will generate a requestId and return it as a header in the response, e.g. X-Pulse-Request-Id: <requestId>
24
- attr_accessor :request_id
25
-
26
23
  # Attribute mapping from ruby-style variable name to JSON key.
27
24
  def self.attribute_map
28
25
  {
29
26
  :'_alias' => :'alias',
30
- :'label' => :'label',
31
- :'request_id' => :'requestId'
27
+ :'label' => :'label'
32
28
  }
33
29
  end
34
30
 
@@ -36,8 +32,7 @@ module Freeclimb
36
32
  def self.openapi_types
37
33
  {
38
34
  :'_alias' => :'String',
39
- :'label' => :'String',
40
- :'request_id' => :'String'
35
+ :'label' => :'String'
41
36
  }
42
37
  end
43
38
 
@@ -69,10 +64,6 @@ module Freeclimb
69
64
  if attributes.key?(:'label')
70
65
  self.label = attributes[:'label']
71
66
  end
72
-
73
- if attributes.key?(:'request_id')
74
- self.request_id = attributes[:'request_id']
75
- end
76
67
  end
77
68
 
78
69
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -94,8 +85,7 @@ module Freeclimb
94
85
  return true if self.equal?(o)
95
86
  self.class == o.class &&
96
87
  _alias == o._alias &&
97
- label == o.label &&
98
- request_id == o.request_id
88
+ label == o.label
99
89
  end
100
90
 
101
91
  # @see the `==` method
@@ -107,7 +97,7 @@ module Freeclimb
107
97
  # Calculates hash code according to all attributes.
108
98
  # @return [Integer] Hash code
109
99
  def hash
110
- [_alias, label, request_id].hash
100
+ [_alias, label].hash
111
101
  end
112
102
 
113
103
  # Builds the object from hash
@@ -0,0 +1,320 @@
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
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Freeclimb
16
+ # The `AddToConference` command adds a Participant to a Conference. If this Participant currently is in another Conference, the Participant is first removed from that Conference. Two Call legs can be bridged together by creating a Conference and adding both Call legs to it via `AddToConference`.
17
+ class AddToConference < PerclCommand
18
+ # If `true`, Call control will be enabled for this Participant's Call leg.
19
+ attr_accessor :allow_call_control
20
+
21
+ # Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used.
22
+ attr_accessor :call_control_sequence
23
+
24
+ # URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute.
25
+ attr_accessor :call_control_url
26
+
27
+ # ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result.
28
+ attr_accessor :conference_id
29
+
30
+ # ID of the Call that will be added to the specified Conference. The Call must be in progress or an error will result. If the Call is part of an existing Conference, it is first removed from that Conference and is then moved to the new one.
31
+ attr_accessor :call_id
32
+
33
+ # URL to be invoked when the Participant leaves the Conference.
34
+ attr_accessor :leave_conference_url
35
+
36
+ # If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command.
37
+ attr_accessor :listen
38
+
39
+ # When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters.
40
+ attr_accessor :notification_url
41
+
42
+ # Flag that indicates whether a Conference starts upon entry of this particular Participant. This is usually set to `true` for moderators and `false` for all other Participants.
43
+ attr_accessor :start_conf_on_enter
44
+
45
+ # If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command.
46
+ attr_accessor :talk
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'allow_call_control' => :'allowCallControl',
52
+ :'call_control_sequence' => :'callControlSequence',
53
+ :'call_control_url' => :'callControlUrl',
54
+ :'conference_id' => :'conferenceId',
55
+ :'call_id' => :'callId',
56
+ :'leave_conference_url' => :'leaveConferenceUrl',
57
+ :'listen' => :'listen',
58
+ :'notification_url' => :'notificationUrl',
59
+ :'start_conf_on_enter' => :'startConfOnEnter',
60
+ :'talk' => :'talk'
61
+ }
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.openapi_types
66
+ {
67
+ :'allow_call_control' => :'Boolean',
68
+ :'call_control_sequence' => :'String',
69
+ :'call_control_url' => :'String',
70
+ :'conference_id' => :'String',
71
+ :'call_id' => :'Boolean',
72
+ :'leave_conference_url' => :'String',
73
+ :'listen' => :'Boolean',
74
+ :'notification_url' => :'String',
75
+ :'start_conf_on_enter' => :'Boolean',
76
+ :'talk' => :'Boolean'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # List of class defined in allOf (OpenAPI v3)
87
+ def self.openapi_all_of
88
+ [
89
+ :'AddToConferenceAllOf',
90
+ :'PerclCommand'
91
+ ]
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::AddToConference` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!self.class.attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::AddToConference`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ # call parent's initialize
110
+ super(attributes)
111
+
112
+ if attributes.key?(:'allow_call_control')
113
+ self.allow_call_control = attributes[:'allow_call_control']
114
+ end
115
+
116
+ if attributes.key?(:'call_control_sequence')
117
+ self.call_control_sequence = attributes[:'call_control_sequence']
118
+ end
119
+
120
+ if attributes.key?(:'call_control_url')
121
+ self.call_control_url = attributes[:'call_control_url']
122
+ end
123
+
124
+ if attributes.key?(:'conference_id')
125
+ self.conference_id = attributes[:'conference_id']
126
+ end
127
+
128
+ if attributes.key?(:'call_id')
129
+ self.call_id = attributes[:'call_id']
130
+ end
131
+
132
+ if attributes.key?(:'leave_conference_url')
133
+ self.leave_conference_url = attributes[:'leave_conference_url']
134
+ end
135
+
136
+ if attributes.key?(:'listen')
137
+ self.listen = attributes[:'listen']
138
+ end
139
+
140
+ if attributes.key?(:'notification_url')
141
+ self.notification_url = attributes[:'notification_url']
142
+ end
143
+
144
+ if attributes.key?(:'start_conf_on_enter')
145
+ self.start_conf_on_enter = attributes[:'start_conf_on_enter']
146
+ end
147
+
148
+ if attributes.key?(:'talk')
149
+ self.talk = attributes[:'talk']
150
+ end
151
+ end
152
+
153
+ # Show invalid properties with the reasons. Usually used together with valid?
154
+ # @return Array for valid properties with the reasons
155
+ def list_invalid_properties
156
+ invalid_properties = super
157
+ if @conference_id.nil?
158
+ invalid_properties.push('invalid value for "conference_id", conference_id cannot be nil.')
159
+ end
160
+
161
+ if @call_id.nil?
162
+ invalid_properties.push('invalid value for "call_id", call_id cannot be nil.')
163
+ end
164
+
165
+ invalid_properties
166
+ end
167
+
168
+ # Check to see if the all the properties in the model are valid
169
+ # @return true if the model is valid
170
+ def valid?
171
+ return false if @conference_id.nil?
172
+ return false if @call_id.nil?
173
+ true && super
174
+ end
175
+
176
+ # Checks equality by comparing each attribute.
177
+ # @param [Object] Object to be compared
178
+ def ==(o)
179
+ return true if self.equal?(o)
180
+ self.class == o.class &&
181
+ allow_call_control == o.allow_call_control &&
182
+ call_control_sequence == o.call_control_sequence &&
183
+ call_control_url == o.call_control_url &&
184
+ conference_id == o.conference_id &&
185
+ call_id == o.call_id &&
186
+ leave_conference_url == o.leave_conference_url &&
187
+ listen == o.listen &&
188
+ notification_url == o.notification_url &&
189
+ start_conf_on_enter == o.start_conf_on_enter &&
190
+ talk == o.talk && super(o)
191
+ end
192
+
193
+ # @see the `==` method
194
+ # @param [Object] Object to be compared
195
+ def eql?(o)
196
+ self == o
197
+ end
198
+
199
+ # Calculates hash code according to all attributes.
200
+ # @return [Integer] Hash code
201
+ def hash
202
+ [allow_call_control, call_control_sequence, call_control_url, conference_id, call_id, leave_conference_url, listen, notification_url, start_conf_on_enter, talk].hash
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def self.build_from_hash(attributes)
209
+ new.build_from_hash(attributes)
210
+ end
211
+
212
+ # Builds the object from hash
213
+ # @param [Hash] attributes Model attributes in the form of hash
214
+ # @return [Object] Returns the model itself
215
+ def build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ super(attributes)
218
+ self.class.openapi_types.each_pair do |key, type|
219
+ if type =~ /\AArray<(.*)>/i
220
+ # check to ensure the input is an array given that the attribute
221
+ # is documented as an array but the input is not
222
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
223
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
224
+ end
225
+ elsif !attributes[self.class.attribute_map[key]].nil?
226
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
227
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
228
+ end
229
+
230
+ self
231
+ end
232
+
233
+ # Deserializes the data based on type
234
+ # @param string type Data type
235
+ # @param string value Value to be deserialized
236
+ # @return [Object] Deserialized data
237
+ def _deserialize(type, value)
238
+ case type.to_sym
239
+ when :DateTime
240
+ DateTime.parse(value)
241
+ when :Date
242
+ Date.parse(value)
243
+ when :String
244
+ value.to_s
245
+ when :Integer
246
+ value.to_i
247
+ when :Float
248
+ value.to_f
249
+ when :Boolean
250
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
251
+ true
252
+ else
253
+ false
254
+ end
255
+ when :Object
256
+ # generic object (usually a Hash), return directly
257
+ value
258
+ when /\AArray<(?<inner_type>.+)>\z/
259
+ inner_type = Regexp.last_match[:inner_type]
260
+ value.map { |v| _deserialize(inner_type, v) }
261
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
262
+ k_type = Regexp.last_match[:k_type]
263
+ v_type = Regexp.last_match[:v_type]
264
+ {}.tap do |hash|
265
+ value.each do |k, v|
266
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
267
+ end
268
+ end
269
+ else # model
270
+ Freeclimb.const_get(type).build_from_hash(value)
271
+ end
272
+ end
273
+
274
+ # Returns the string representation of the object
275
+ # @return [String] String presentation of the object
276
+ def to_s
277
+ to_hash.to_s
278
+ end
279
+
280
+ # to_body is an alias to to_hash (backward compatibility)
281
+ # @return [Hash] Returns the object in the form of hash
282
+ def to_body
283
+ to_hash
284
+ end
285
+
286
+ # Returns the object in the form of hash
287
+ # @return [Hash] Returns the object in the form of hash
288
+ def to_hash
289
+ hash = super
290
+ self.class.attribute_map.each_pair do |attr, param|
291
+ value = self.send(attr)
292
+ if value.nil?
293
+ is_nullable = self.class.openapi_nullable.include?(attr)
294
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
295
+ end
296
+
297
+ hash[param] = _to_hash(value)
298
+ end
299
+ hash
300
+ end
301
+
302
+ # Outputs non-array value in the form of hash
303
+ # For object, use to_hash. Otherwise, just return the value
304
+ # @param [Object] value Any valid value
305
+ # @return [Hash] Returns the value in the form of hash
306
+ def _to_hash(value)
307
+ if value.is_a?(Array)
308
+ value.compact.map { |v| _to_hash(v) }
309
+ elsif value.is_a?(Hash)
310
+ {}.tap do |hash|
311
+ value.each { |k, v| hash[k] = _to_hash(v) }
312
+ end
313
+ elsif value.respond_to? :to_hash
314
+ value.to_hash
315
+ else
316
+ value
317
+ end
318
+ end
319
+ end
320
+ end
@@ -0,0 +1,307 @@
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
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Freeclimb
16
+ class AddToConferenceAllOf
17
+ # If `true`, Call control will be enabled for this Participant's Call leg.
18
+ attr_accessor :allow_call_control
19
+
20
+ # Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used.
21
+ attr_accessor :call_control_sequence
22
+
23
+ # URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute.
24
+ attr_accessor :call_control_url
25
+
26
+ # ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result.
27
+ attr_accessor :conference_id
28
+
29
+ # ID of the Call that will be added to the specified Conference. The Call must be in progress or an error will result. If the Call is part of an existing Conference, it is first removed from that Conference and is then moved to the new one.
30
+ attr_accessor :call_id
31
+
32
+ # URL to be invoked when the Participant leaves the Conference.
33
+ attr_accessor :leave_conference_url
34
+
35
+ # If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command.
36
+ attr_accessor :listen
37
+
38
+ # When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters.
39
+ attr_accessor :notification_url
40
+
41
+ # Flag that indicates whether a Conference starts upon entry of this particular Participant. This is usually set to `true` for moderators and `false` for all other Participants.
42
+ attr_accessor :start_conf_on_enter
43
+
44
+ # If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command.
45
+ attr_accessor :talk
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'allow_call_control' => :'allowCallControl',
51
+ :'call_control_sequence' => :'callControlSequence',
52
+ :'call_control_url' => :'callControlUrl',
53
+ :'conference_id' => :'conferenceId',
54
+ :'call_id' => :'callId',
55
+ :'leave_conference_url' => :'leaveConferenceUrl',
56
+ :'listen' => :'listen',
57
+ :'notification_url' => :'notificationUrl',
58
+ :'start_conf_on_enter' => :'startConfOnEnter',
59
+ :'talk' => :'talk'
60
+ }
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.openapi_types
65
+ {
66
+ :'allow_call_control' => :'Boolean',
67
+ :'call_control_sequence' => :'String',
68
+ :'call_control_url' => :'String',
69
+ :'conference_id' => :'String',
70
+ :'call_id' => :'Boolean',
71
+ :'leave_conference_url' => :'String',
72
+ :'listen' => :'Boolean',
73
+ :'notification_url' => :'String',
74
+ :'start_conf_on_enter' => :'Boolean',
75
+ :'talk' => :'Boolean'
76
+ }
77
+ end
78
+
79
+ # List of attributes with nullable: true
80
+ def self.openapi_nullable
81
+ Set.new([
82
+ ])
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::AddToConferenceAllOf` initialize method"
90
+ end
91
+
92
+ # check to see if the attribute exists and convert string to symbol for hash key
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!self.class.attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::AddToConferenceAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'allow_call_control')
101
+ self.allow_call_control = attributes[:'allow_call_control']
102
+ end
103
+
104
+ if attributes.key?(:'call_control_sequence')
105
+ self.call_control_sequence = attributes[:'call_control_sequence']
106
+ end
107
+
108
+ if attributes.key?(:'call_control_url')
109
+ self.call_control_url = attributes[:'call_control_url']
110
+ end
111
+
112
+ if attributes.key?(:'conference_id')
113
+ self.conference_id = attributes[:'conference_id']
114
+ end
115
+
116
+ if attributes.key?(:'call_id')
117
+ self.call_id = attributes[:'call_id']
118
+ end
119
+
120
+ if attributes.key?(:'leave_conference_url')
121
+ self.leave_conference_url = attributes[:'leave_conference_url']
122
+ end
123
+
124
+ if attributes.key?(:'listen')
125
+ self.listen = attributes[:'listen']
126
+ end
127
+
128
+ if attributes.key?(:'notification_url')
129
+ self.notification_url = attributes[:'notification_url']
130
+ end
131
+
132
+ if attributes.key?(:'start_conf_on_enter')
133
+ self.start_conf_on_enter = attributes[:'start_conf_on_enter']
134
+ end
135
+
136
+ if attributes.key?(:'talk')
137
+ self.talk = attributes[:'talk']
138
+ end
139
+ end
140
+
141
+ # Show invalid properties with the reasons. Usually used together with valid?
142
+ # @return Array for valid properties with the reasons
143
+ def list_invalid_properties
144
+ invalid_properties = Array.new
145
+ if @conference_id.nil?
146
+ invalid_properties.push('invalid value for "conference_id", conference_id cannot be nil.')
147
+ end
148
+
149
+ if @call_id.nil?
150
+ invalid_properties.push('invalid value for "call_id", call_id cannot be nil.')
151
+ end
152
+
153
+ invalid_properties
154
+ end
155
+
156
+ # Check to see if the all the properties in the model are valid
157
+ # @return true if the model is valid
158
+ def valid?
159
+ return false if @conference_id.nil?
160
+ return false if @call_id.nil?
161
+ true
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ allow_call_control == o.allow_call_control &&
170
+ call_control_sequence == o.call_control_sequence &&
171
+ call_control_url == o.call_control_url &&
172
+ conference_id == o.conference_id &&
173
+ call_id == o.call_id &&
174
+ leave_conference_url == o.leave_conference_url &&
175
+ listen == o.listen &&
176
+ notification_url == o.notification_url &&
177
+ start_conf_on_enter == o.start_conf_on_enter &&
178
+ talk == o.talk
179
+ end
180
+
181
+ # @see the `==` method
182
+ # @param [Object] Object to be compared
183
+ def eql?(o)
184
+ self == o
185
+ end
186
+
187
+ # Calculates hash code according to all attributes.
188
+ # @return [Integer] Hash code
189
+ def hash
190
+ [allow_call_control, call_control_sequence, call_control_url, conference_id, call_id, leave_conference_url, listen, notification_url, start_conf_on_enter, talk].hash
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def self.build_from_hash(attributes)
197
+ new.build_from_hash(attributes)
198
+ end
199
+
200
+ # Builds the object from hash
201
+ # @param [Hash] attributes Model attributes in the form of hash
202
+ # @return [Object] Returns the model itself
203
+ def build_from_hash(attributes)
204
+ return nil unless attributes.is_a?(Hash)
205
+ self.class.openapi_types.each_pair do |key, type|
206
+ if type =~ /\AArray<(.*)>/i
207
+ # check to ensure the input is an array given that the attribute
208
+ # is documented as an array but the input is not
209
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
210
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
211
+ end
212
+ elsif !attributes[self.class.attribute_map[key]].nil?
213
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
214
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
215
+ end
216
+
217
+ self
218
+ end
219
+
220
+ # Deserializes the data based on type
221
+ # @param string type Data type
222
+ # @param string value Value to be deserialized
223
+ # @return [Object] Deserialized data
224
+ def _deserialize(type, value)
225
+ case type.to_sym
226
+ when :DateTime
227
+ DateTime.parse(value)
228
+ when :Date
229
+ Date.parse(value)
230
+ when :String
231
+ value.to_s
232
+ when :Integer
233
+ value.to_i
234
+ when :Float
235
+ value.to_f
236
+ when :Boolean
237
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
238
+ true
239
+ else
240
+ false
241
+ end
242
+ when :Object
243
+ # generic object (usually a Hash), return directly
244
+ value
245
+ when /\AArray<(?<inner_type>.+)>\z/
246
+ inner_type = Regexp.last_match[:inner_type]
247
+ value.map { |v| _deserialize(inner_type, v) }
248
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
249
+ k_type = Regexp.last_match[:k_type]
250
+ v_type = Regexp.last_match[:v_type]
251
+ {}.tap do |hash|
252
+ value.each do |k, v|
253
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
254
+ end
255
+ end
256
+ else # model
257
+ Freeclimb.const_get(type).build_from_hash(value)
258
+ end
259
+ end
260
+
261
+ # Returns the string representation of the object
262
+ # @return [String] String presentation of the object
263
+ def to_s
264
+ to_hash.to_s
265
+ end
266
+
267
+ # to_body is an alias to to_hash (backward compatibility)
268
+ # @return [Hash] Returns the object in the form of hash
269
+ def to_body
270
+ to_hash
271
+ end
272
+
273
+ # Returns the object in the form of hash
274
+ # @return [Hash] Returns the object in the form of hash
275
+ def to_hash
276
+ hash = {}
277
+ self.class.attribute_map.each_pair do |attr, param|
278
+ value = self.send(attr)
279
+ if value.nil?
280
+ is_nullable = self.class.openapi_nullable.include?(attr)
281
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
282
+ end
283
+
284
+ hash[param] = _to_hash(value)
285
+ end
286
+ hash
287
+ end
288
+
289
+ # Outputs non-array value in the form of hash
290
+ # For object, use to_hash. Otherwise, just return the value
291
+ # @param [Object] value Any valid value
292
+ # @return [Hash] Returns the value in the form of hash
293
+ def _to_hash(value)
294
+ if value.is_a?(Array)
295
+ value.compact.map { |v| _to_hash(v) }
296
+ elsif value.is_a?(Hash)
297
+ {}.tap do |hash|
298
+ value.each { |k, v| hash[k] = _to_hash(v) }
299
+ end
300
+ elsif value.respond_to? :to_hash
301
+ value.to_hash
302
+ else
303
+ value
304
+ end
305
+ end
306
+ end
307
+ end