freeclimb 4.5.2 → 4.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/Gemfile.lock +1 -1
- data/README.md +15 -7
- data/docs/AddToConference.md +0 -2
- data/docs/AddToConferenceAllOf.md +0 -2
- data/docs/CreateWebRTCToken.md +22 -0
- data/docs/DefaultApi.md +303 -7
- data/docs/GetDigits.md +1 -1
- data/docs/GetDigitsAllOf.md +1 -1
- data/docs/IncomingNumberResult.md +3 -1
- data/docs/IncomingNumberResultAllOf.md +3 -1
- data/docs/MessageRequest.md +2 -2
- data/docs/MessageRequestAllOf.md +2 -2
- data/docs/MessageResult.md +3 -1
- data/docs/MessageResultAllOf.md +3 -1
- data/docs/Play.md +0 -2
- data/docs/PlayAllOf.md +0 -2
- data/docs/RemoveFromConference.md +1 -4
- data/docs/SMSTenDLCCampaign.md +10 -0
- data/docs/SMSTollFreeCampaign.md +30 -0
- data/docs/SMSTollFreeCampaignsListResult.md +32 -0
- data/docs/SMSTollFreeCampaignsListResultAllOf.md +18 -0
- data/docs/Say.md +0 -2
- data/docs/SayAllOf.md +0 -2
- data/docs/SetListen.md +0 -2
- data/docs/SetListenAllOf.md +0 -2
- data/docs/SetTalk.md +0 -2
- data/docs/SetTalkAllOf.md +0 -2
- data/docs/TFN.md +18 -0
- data/docs/TerminateConference.md +1 -4
- data/docs/TranscribeUtterance.md +1 -1
- data/docs/TranscribeUtteranceAllOf.md +28 -0
- data/docs/TranscribeUtteranceAllOfRecord.md +22 -0
- data/lib/freeclimb/api/default_api.rb +262 -7
- data/lib/freeclimb/models/account_request.rb +0 -2
- data/lib/freeclimb/models/account_result.rb +0 -6
- data/lib/freeclimb/models/add_to_conference.rb +1 -29
- data/lib/freeclimb/models/add_to_conference_all_of.rb +1 -29
- data/lib/freeclimb/models/application_result.rb +0 -6
- data/lib/freeclimb/models/buy_incoming_number_request.rb +0 -4
- data/lib/freeclimb/models/call_result.rb +0 -6
- data/lib/freeclimb/models/conference_participant_result.rb +0 -6
- data/lib/freeclimb/models/conference_result.rb +0 -6
- data/lib/freeclimb/models/create_conference.rb +0 -8
- data/lib/freeclimb/models/create_conference_all_of.rb +0 -8
- data/lib/freeclimb/models/create_conference_request.rb +0 -6
- data/lib/freeclimb/models/create_web_rtc_token.rb +274 -0
- data/lib/freeclimb/models/dequeue.rb +1 -0
- data/lib/freeclimb/models/enqueue.rb +0 -6
- data/lib/freeclimb/models/enqueue_all_of.rb +0 -6
- data/lib/freeclimb/models/get_digits.rb +1 -17
- data/lib/freeclimb/models/get_digits_all_of.rb +1 -17
- data/lib/freeclimb/models/get_speech.rb +0 -22
- data/lib/freeclimb/models/get_speech_all_of.rb +0 -22
- data/lib/freeclimb/models/incoming_number_request.rb +0 -2
- data/lib/freeclimb/models/incoming_number_result.rb +14 -13
- data/lib/freeclimb/models/incoming_number_result_all_of.rb +14 -5
- data/lib/freeclimb/models/make_call_request.rb +0 -18
- data/lib/freeclimb/models/message_request.rb +10 -24
- data/lib/freeclimb/models/message_request_all_of.rb +10 -16
- data/lib/freeclimb/models/message_result.rb +17 -11
- data/lib/freeclimb/models/message_result_all_of.rb +17 -5
- data/lib/freeclimb/models/mutable_resource_model.rb +0 -6
- data/lib/freeclimb/models/out_dial.rb +0 -18
- data/lib/freeclimb/models/out_dial_all_of.rb +0 -18
- data/lib/freeclimb/models/park.rb +0 -4
- data/lib/freeclimb/models/park_all_of.rb +0 -4
- data/lib/freeclimb/models/play.rb +1 -17
- data/lib/freeclimb/models/play_all_of.rb +1 -17
- data/lib/freeclimb/models/queue_request.rb +0 -2
- data/lib/freeclimb/models/queue_result.rb +0 -6
- data/lib/freeclimb/models/record_utterance.rb +0 -12
- data/lib/freeclimb/models/record_utterance_all_of.rb +0 -12
- data/lib/freeclimb/models/recording_result.rb +0 -6
- data/lib/freeclimb/models/remove_from_conference.rb +4 -23
- data/lib/freeclimb/models/say.rb +1 -19
- data/lib/freeclimb/models/say_all_of.rb +1 -19
- data/lib/freeclimb/models/send_digits.rb +0 -4
- data/lib/freeclimb/models/send_digits_all_of.rb +0 -4
- data/lib/freeclimb/models/set_listen.rb +2 -18
- data/lib/freeclimb/models/set_listen_all_of.rb +2 -18
- data/lib/freeclimb/models/set_talk.rb +2 -18
- data/lib/freeclimb/models/set_talk_all_of.rb +2 -18
- data/lib/freeclimb/models/sms.rb +0 -6
- data/lib/freeclimb/models/sms_all_of.rb +0 -6
- data/lib/freeclimb/models/sms_ten_dlc_brand.rb +0 -60
- data/lib/freeclimb/models/sms_ten_dlc_campaign.rb +121 -41
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb +0 -44
- data/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb +0 -20
- data/lib/freeclimb/models/sms_toll_free_campaign.rb +337 -0
- data/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb +311 -0
- data/lib/freeclimb/models/{remove_from_conference_all_of.rb → sms_toll_free_campaigns_list_result_all_of.rb} +14 -16
- data/lib/freeclimb/models/start_record_call.rb +1 -0
- data/lib/freeclimb/models/terminate_conference.rb +4 -23
- data/lib/freeclimb/models/{terminate_conference_all_of.rb → tfn.rb} +15 -14
- data/lib/freeclimb/models/transcribe_utterance.rb +11 -16
- data/lib/freeclimb/models/transcribe_utterance_all_of.rb +281 -0
- data/lib/freeclimb/models/{transcribe_utterance_record.rb → transcribe_utterance_all_of_record.rb} +3 -7
- data/lib/freeclimb/models/unpark.rb +1 -0
- data/lib/freeclimb/models/update_conference_participant_request.rb +0 -2
- data/lib/freeclimb/models/update_conference_request.rb +0 -2
- data/lib/freeclimb/version.rb +1 -1
- data/lib/freeclimb.rb +8 -4
- data/openapi.json +407 -88
- data/package.json +8 -0
- data/spec/api/default_api_spec.rb +215 -55
- data/spec/models/account_request_spec.rb +8 -6
- data/spec/models/account_result_spec.rb +28 -9
- data/spec/models/add_to_conference_spec.rb +21 -37
- data/spec/models/application_list_spec.rb +46 -22
- data/spec/models/application_request_spec.rb +13 -6
- data/spec/models/application_result_spec.rb +24 -9
- data/spec/models/available_number_list_spec.rb +46 -22
- data/spec/models/available_number_spec.rb +23 -10
- data/spec/models/buy_incoming_number_request_spec.rb +11 -7
- data/spec/models/call_list_spec.rb +46 -22
- data/spec/models/call_result_spec.rb +49 -15
- data/spec/models/capabilities_spec.rb +26 -11
- data/spec/models/conference_list_spec.rb +46 -22
- data/spec/models/conference_participant_list_spec.rb +46 -22
- data/spec/models/conference_participant_result_spec.rb +24 -9
- data/spec/models/conference_result_spec.rb +32 -9
- data/spec/models/create_conference_request_spec.rb +15 -6
- data/spec/models/create_conference_spec.rb +19 -7
- data/spec/models/create_web_rtc_token_spec.rb +231 -0
- data/spec/models/enqueue_spec.rb +16 -9
- data/spec/models/filter_logs_request_spec.rb +9 -7
- data/spec/models/get_digits_spec.rb +59 -35
- data/spec/models/get_speech_spec.rb +60 -24
- data/spec/models/hangup_spec.rb +7 -6
- data/spec/models/incoming_number_list_spec.rb +46 -22
- data/spec/models/incoming_number_request_spec.rb +9 -6
- data/spec/models/incoming_number_result_spec.rb +68 -13
- data/spec/models/log_list_spec.rb +46 -22
- data/spec/models/log_result_spec.rb +21 -9
- data/spec/models/make_call_request_spec.rb +26 -11
- data/spec/models/message_request_spec.rb +49 -35
- data/spec/models/message_result_spec.rb +64 -11
- data/spec/models/messages_list_spec.rb +46 -22
- data/spec/models/mutable_resource_model_spec.rb +15 -9
- data/spec/models/out_dial_spec.rb +33 -13
- data/spec/models/pagination_model_spec.rb +40 -21
- data/spec/models/park_spec.rb +13 -8
- data/spec/models/pause_spec.rb +14 -10
- data/spec/models/percl_command_spec.rb +6 -6
- data/spec/models/percl_script_spec.rb +11 -6
- data/spec/models/play_early_media_spec.rb +9 -7
- data/spec/models/play_spec.rb +17 -40
- data/spec/models/queue_list_spec.rb +46 -22
- data/spec/models/queue_member_list_spec.rb +46 -22
- data/spec/models/queue_member_spec.rb +21 -12
- data/spec/models/queue_request_spec.rb +13 -9
- data/spec/models/queue_result_spec.rb +37 -18
- data/spec/models/record_utterance_spec.rb +28 -13
- data/spec/models/recording_list_spec.rb +46 -22
- data/spec/models/recording_result_spec.rb +25 -12
- data/spec/models/redirect_spec.rb +9 -7
- data/spec/models/reject_spec.rb +7 -6
- data/spec/models/remove_from_conference_spec.rb +0 -133
- data/spec/models/say_spec.rb +18 -40
- data/spec/models/send_digits_spec.rb +17 -10
- data/spec/models/set_listen_spec.rb +8 -37
- data/spec/models/set_talk_spec.rb +8 -37
- data/spec/models/sms_spec.rb +16 -9
- data/spec/models/sms_ten_dlc_brand_spec.rb +38 -4
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +46 -22
- data/spec/models/sms_ten_dlc_campaign_spec.rb +228 -4
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +46 -22
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +25 -7
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +56 -8
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +46 -22
- data/spec/models/sms_toll_free_campaign_spec.rb +382 -0
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +395 -0
- data/spec/models/terminate_conference_spec.rb +0 -133
- data/spec/models/tfn_spec.rb +164 -0
- data/spec/models/{transcribe_utterance_record_spec.rb → transcribe_utterance_all_of_record_spec.rb} +78 -67
- data/spec/models/transcribe_utterance_spec.rb +37 -96
- data/spec/models/update_call_request_spec.rb +12 -7
- data/spec/models/update_conference_participant_request_spec.rb +10 -6
- data/spec/models/update_conference_request_spec.rb +15 -6
- data/yarn.lock +1292 -0
- metadata +105 -84
@@ -0,0 +1,311 @@
|
|
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
|
+
class SMSTollFreeCampaignsListResult
|
18
|
+
# Total amount of requested resource.
|
19
|
+
attr_accessor :total
|
20
|
+
|
21
|
+
# Resource index at start of current page
|
22
|
+
attr_accessor :start
|
23
|
+
|
24
|
+
# Resource index at end of current page
|
25
|
+
attr_accessor :_end
|
26
|
+
|
27
|
+
# Current page
|
28
|
+
attr_accessor :page
|
29
|
+
|
30
|
+
# Total number of pages
|
31
|
+
attr_accessor :num_pages
|
32
|
+
|
33
|
+
# Number of items per page
|
34
|
+
attr_accessor :page_size
|
35
|
+
|
36
|
+
# Uri to retrieve the next page of items
|
37
|
+
attr_accessor :next_page_uri
|
38
|
+
|
39
|
+
attr_accessor :brands
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
def self.attribute_map
|
43
|
+
{
|
44
|
+
:'total' => :'total',
|
45
|
+
:'start' => :'start',
|
46
|
+
:'_end' => :'end',
|
47
|
+
:'page' => :'page',
|
48
|
+
:'num_pages' => :'numPages',
|
49
|
+
:'page_size' => :'pageSize',
|
50
|
+
:'next_page_uri' => :'nextPageUri',
|
51
|
+
:'brands' => :'brands'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Returns all the JSON keys this model knows about
|
56
|
+
def self.acceptable_attributes
|
57
|
+
attribute_map.values
|
58
|
+
end
|
59
|
+
|
60
|
+
# Attribute type mapping.
|
61
|
+
def self.openapi_types
|
62
|
+
{
|
63
|
+
:'total' => :'Integer',
|
64
|
+
:'start' => :'Integer',
|
65
|
+
:'_end' => :'Integer',
|
66
|
+
:'page' => :'Integer',
|
67
|
+
:'num_pages' => :'Integer',
|
68
|
+
:'page_size' => :'Integer',
|
69
|
+
:'next_page_uri' => :'String',
|
70
|
+
:'brands' => :'Array<SMSTollFreeCampaign>'
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
# List of attributes with nullable: true
|
75
|
+
def self.openapi_nullable
|
76
|
+
Set.new([
|
77
|
+
:'total',
|
78
|
+
:'start',
|
79
|
+
:'_end',
|
80
|
+
:'page',
|
81
|
+
:'num_pages',
|
82
|
+
:'page_size',
|
83
|
+
:'next_page_uri',
|
84
|
+
:'brands'
|
85
|
+
])
|
86
|
+
end
|
87
|
+
|
88
|
+
# List of class defined in allOf (OpenAPI v3)
|
89
|
+
def self.openapi_all_of
|
90
|
+
[
|
91
|
+
:'PaginationModel',
|
92
|
+
:'SMSTollFreeCampaignsListResultAllOf'
|
93
|
+
]
|
94
|
+
end
|
95
|
+
|
96
|
+
# Initializes the object
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
def initialize(attributes = {})
|
99
|
+
if (!attributes.is_a?(Hash))
|
100
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTollFreeCampaignsListResult` initialize method"
|
101
|
+
end
|
102
|
+
|
103
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
104
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
105
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
106
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTollFreeCampaignsListResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
107
|
+
end
|
108
|
+
h[k.to_sym] = v
|
109
|
+
}
|
110
|
+
|
111
|
+
if attributes.key?(:'total')
|
112
|
+
self.total = attributes[:'total']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'start')
|
116
|
+
self.start = attributes[:'start']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'_end')
|
120
|
+
self._end = attributes[:'_end']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'page')
|
124
|
+
self.page = attributes[:'page']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'num_pages')
|
128
|
+
self.num_pages = attributes[:'num_pages']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'page_size')
|
132
|
+
self.page_size = attributes[:'page_size']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'next_page_uri')
|
136
|
+
self.next_page_uri = attributes[:'next_page_uri']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'brands')
|
140
|
+
if (value = attributes[:'brands']).is_a?(Array)
|
141
|
+
self.brands = value
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
147
|
+
# @return Array for valid properties with the reasons
|
148
|
+
def list_invalid_properties
|
149
|
+
invalid_properties = Array.new
|
150
|
+
invalid_properties
|
151
|
+
end
|
152
|
+
|
153
|
+
# Check to see if the all the properties in the model are valid
|
154
|
+
# @return true if the model is valid
|
155
|
+
def valid?
|
156
|
+
|
157
|
+
if @total.nil?
|
158
|
+
false
|
159
|
+
else
|
160
|
+
list_invalid_properties.length() == 0
|
161
|
+
end
|
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
|
+
total == o.total &&
|
170
|
+
start == o.start &&
|
171
|
+
_end == o._end &&
|
172
|
+
page == o.page &&
|
173
|
+
num_pages == o.num_pages &&
|
174
|
+
page_size == o.page_size &&
|
175
|
+
next_page_uri == o.next_page_uri &&
|
176
|
+
brands == o.brands
|
177
|
+
end
|
178
|
+
|
179
|
+
# @see the `==` method
|
180
|
+
# @param [Object] Object to be compared
|
181
|
+
def eql?(o)
|
182
|
+
self == o
|
183
|
+
end
|
184
|
+
|
185
|
+
# Calculates hash code according to all attributes.
|
186
|
+
# @return [Integer] Hash code
|
187
|
+
def hash
|
188
|
+
[total, start, _end, page, num_pages, page_size, next_page_uri, brands].hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Builds the object from hash
|
192
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
193
|
+
# @return [Object] Returns the model itself
|
194
|
+
def self.build_from_hash(attributes)
|
195
|
+
new.build_from_hash(attributes)
|
196
|
+
end
|
197
|
+
|
198
|
+
# Builds the object from hash
|
199
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
200
|
+
# @return [Object] Returns the model itself
|
201
|
+
def build_from_hash(attributes)
|
202
|
+
return nil unless attributes.is_a?(Hash)
|
203
|
+
self.class.openapi_types.each_pair do |key, type|
|
204
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
205
|
+
self.send("#{key}=", nil)
|
206
|
+
elsif 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
|
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 :Time
|
227
|
+
Time.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
|
+
# models (e.g. Pet) or oneOf
|
258
|
+
klass = Freeclimb.const_get(type)
|
259
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
# Returns the string representation of the object
|
264
|
+
# @return [String] String presentation of the object
|
265
|
+
def to_s
|
266
|
+
to_hash.to_s
|
267
|
+
end
|
268
|
+
|
269
|
+
# to_body is an alias to to_hash (backward compatibility)
|
270
|
+
# @return [Hash] Returns the object in the form of hash
|
271
|
+
def to_body
|
272
|
+
to_hash
|
273
|
+
end
|
274
|
+
|
275
|
+
# Returns the object in the form of hash
|
276
|
+
# @return [Hash] Returns the object in the form of hash
|
277
|
+
def to_hash
|
278
|
+
hash = {}
|
279
|
+
self.class.attribute_map.each_pair do |attr, param|
|
280
|
+
value = self.send(attr)
|
281
|
+
if value.nil?
|
282
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
283
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
284
|
+
end
|
285
|
+
|
286
|
+
hash[param] = _to_hash(value)
|
287
|
+
end
|
288
|
+
hash
|
289
|
+
end
|
290
|
+
|
291
|
+
# Outputs non-array value in the form of hash
|
292
|
+
# For object, use to_hash. Otherwise, just return the value
|
293
|
+
# @param [Object] value Any valid value
|
294
|
+
# @return [Hash] Returns the value in the form of hash
|
295
|
+
def _to_hash(value)
|
296
|
+
if value.is_a?(Array)
|
297
|
+
value.compact.map { |v| _to_hash(v) }
|
298
|
+
elsif value.is_a?(Hash)
|
299
|
+
{}.tap do |hash|
|
300
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
301
|
+
end
|
302
|
+
elsif value.respond_to? :to_hash
|
303
|
+
value.to_hash
|
304
|
+
else
|
305
|
+
value
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
end
|
310
|
+
|
311
|
+
end
|
@@ -14,14 +14,13 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Freeclimb
|
17
|
-
class
|
18
|
-
|
19
|
-
attr_accessor :call_id
|
17
|
+
class SMSTollFreeCampaignsListResultAllOf
|
18
|
+
attr_accessor :brands
|
20
19
|
|
21
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
21
|
def self.attribute_map
|
23
22
|
{
|
24
|
-
:'
|
23
|
+
:'brands' => :'brands'
|
25
24
|
}
|
26
25
|
end
|
27
26
|
|
@@ -33,13 +32,14 @@ module Freeclimb
|
|
33
32
|
# Attribute type mapping.
|
34
33
|
def self.openapi_types
|
35
34
|
{
|
36
|
-
:'
|
35
|
+
:'brands' => :'Array<SMSTollFreeCampaign>'
|
37
36
|
}
|
38
37
|
end
|
39
38
|
|
40
39
|
# List of attributes with nullable: true
|
41
40
|
def self.openapi_nullable
|
42
41
|
Set.new([
|
42
|
+
:'brands'
|
43
43
|
])
|
44
44
|
end
|
45
45
|
|
@@ -47,19 +47,21 @@ module Freeclimb
|
|
47
47
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
48
|
def initialize(attributes = {})
|
49
49
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::SMSTollFreeCampaignsListResultAllOf` initialize method"
|
51
51
|
end
|
52
52
|
|
53
53
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
54
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
55
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::SMSTollFreeCampaignsListResultAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
57
|
end
|
58
58
|
h[k.to_sym] = v
|
59
59
|
}
|
60
60
|
|
61
|
-
if attributes.key?(:'
|
62
|
-
|
61
|
+
if attributes.key?(:'brands')
|
62
|
+
if (value = attributes[:'brands']).is_a?(Array)
|
63
|
+
self.brands = value
|
64
|
+
end
|
63
65
|
end
|
64
66
|
end
|
65
67
|
|
@@ -67,10 +69,6 @@ module Freeclimb
|
|
67
69
|
# @return Array for valid properties with the reasons
|
68
70
|
def list_invalid_properties
|
69
71
|
invalid_properties = Array.new
|
70
|
-
if @call_id.nil?
|
71
|
-
invalid_properties.push('invalid value for "call_id", call_id cannot be nil.')
|
72
|
-
end
|
73
|
-
|
74
72
|
invalid_properties
|
75
73
|
end
|
76
74
|
|
@@ -78,7 +76,7 @@ module Freeclimb
|
|
78
76
|
# @return true if the model is valid
|
79
77
|
def valid?
|
80
78
|
|
81
|
-
if @
|
79
|
+
if @brands.nil?
|
82
80
|
false
|
83
81
|
else
|
84
82
|
list_invalid_properties.length() == 0
|
@@ -90,7 +88,7 @@ module Freeclimb
|
|
90
88
|
def ==(o)
|
91
89
|
return true if self.equal?(o)
|
92
90
|
self.class == o.class &&
|
93
|
-
|
91
|
+
brands == o.brands
|
94
92
|
end
|
95
93
|
|
96
94
|
# @see the `==` method
|
@@ -102,7 +100,7 @@ module Freeclimb
|
|
102
100
|
# Calculates hash code according to all attributes.
|
103
101
|
# @return [Integer] Hash code
|
104
102
|
def hash
|
105
|
-
[
|
103
|
+
[brands].hash
|
106
104
|
end
|
107
105
|
|
108
106
|
# Builds the object from hash
|
@@ -16,13 +16,9 @@ require 'time'
|
|
16
16
|
module Freeclimb
|
17
17
|
# The `TerminateConference` command terminates an existing Conference. Any active participants are hung up on by FreeClimb. If this is not the desired behavior, use the `RemoveFromConference` command to unbridge Calls that should not be hung up. Note: The Call requesting TerminateConference must be on the same Conference for this command to execute.
|
18
18
|
class TerminateConference < PerclCommand
|
19
|
-
# ID of the conference to terminate.
|
20
|
-
attr_accessor :conference_id
|
21
|
-
|
22
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
20
|
def self.attribute_map
|
24
21
|
{
|
25
|
-
:'conference_id' => :'conferenceId'
|
26
22
|
}
|
27
23
|
end
|
28
24
|
|
@@ -34,7 +30,6 @@ module Freeclimb
|
|
34
30
|
# Attribute type mapping.
|
35
31
|
def self.openapi_types
|
36
32
|
{
|
37
|
-
:'conference_id' => :'String'
|
38
33
|
}
|
39
34
|
end
|
40
35
|
|
@@ -47,8 +42,7 @@ module Freeclimb
|
|
47
42
|
# List of class defined in allOf (OpenAPI v3)
|
48
43
|
def self.openapi_all_of
|
49
44
|
[
|
50
|
-
:'PerclCommand'
|
51
|
-
:'TerminateConferenceAllOf'
|
45
|
+
:'PerclCommand'
|
52
46
|
]
|
53
47
|
end
|
54
48
|
|
@@ -69,10 +63,6 @@ module Freeclimb
|
|
69
63
|
|
70
64
|
# call parent's initialize
|
71
65
|
super(attributes)
|
72
|
-
|
73
|
-
if attributes.key?(:'conference_id')
|
74
|
-
self.conference_id = attributes[:'conference_id']
|
75
|
-
end
|
76
66
|
self.command = "TerminateConference"
|
77
67
|
end
|
78
68
|
|
@@ -80,10 +70,6 @@ module Freeclimb
|
|
80
70
|
# @return Array for valid properties with the reasons
|
81
71
|
def list_invalid_properties
|
82
72
|
invalid_properties = super
|
83
|
-
if @conference_id.nil?
|
84
|
-
invalid_properties.push('invalid value for "conference_id", conference_id cannot be nil.')
|
85
|
-
end
|
86
|
-
|
87
73
|
invalid_properties
|
88
74
|
end
|
89
75
|
|
@@ -91,19 +77,14 @@ module Freeclimb
|
|
91
77
|
# @return true if the model is valid
|
92
78
|
def valid?
|
93
79
|
|
94
|
-
|
95
|
-
false
|
96
|
-
else
|
97
|
-
list_invalid_properties.length() == 0
|
98
|
-
end
|
80
|
+
true
|
99
81
|
end
|
100
82
|
|
101
83
|
# Checks equality by comparing each attribute.
|
102
84
|
# @param [Object] Object to be compared
|
103
85
|
def ==(o)
|
104
86
|
return true if self.equal?(o)
|
105
|
-
self.class == o.class &&
|
106
|
-
conference_id == o.conference_id && super(o)
|
87
|
+
self.class == o.class && super(o)
|
107
88
|
end
|
108
89
|
|
109
90
|
# @see the `==` method
|
@@ -115,7 +96,7 @@ module Freeclimb
|
|
115
96
|
# Calculates hash code according to all attributes.
|
116
97
|
# @return [Integer] Hash code
|
117
98
|
def hash
|
118
|
-
[
|
99
|
+
[].hash
|
119
100
|
end
|
120
101
|
|
121
102
|
# Builds the object from hash
|
@@ -14,14 +14,15 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Freeclimb
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
# TollFree Campaign details for this number
|
18
|
+
class TFN
|
19
|
+
# alphanumeric identifier for the TollFree campaign associated with this number
|
20
|
+
attr_accessor :campaign_id
|
20
21
|
|
21
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
23
|
def self.attribute_map
|
23
24
|
{
|
24
|
-
:'
|
25
|
+
:'campaign_id' => :'campaignId'
|
25
26
|
}
|
26
27
|
end
|
27
28
|
|
@@ -33,7 +34,7 @@ module Freeclimb
|
|
33
34
|
# Attribute type mapping.
|
34
35
|
def self.openapi_types
|
35
36
|
{
|
36
|
-
:'
|
37
|
+
:'campaign_id' => :'String'
|
37
38
|
}
|
38
39
|
end
|
39
40
|
|
@@ -47,19 +48,19 @@ module Freeclimb
|
|
47
48
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
49
|
def initialize(attributes = {})
|
49
50
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::
|
51
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::TFN` initialize method"
|
51
52
|
end
|
52
53
|
|
53
54
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
55
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
56
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::
|
57
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::TFN`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
58
|
end
|
58
59
|
h[k.to_sym] = v
|
59
60
|
}
|
60
61
|
|
61
|
-
if attributes.key?(:'
|
62
|
-
self.
|
62
|
+
if attributes.key?(:'campaign_id')
|
63
|
+
self.campaign_id = attributes[:'campaign_id']
|
63
64
|
end
|
64
65
|
end
|
65
66
|
|
@@ -67,8 +68,8 @@ module Freeclimb
|
|
67
68
|
# @return Array for valid properties with the reasons
|
68
69
|
def list_invalid_properties
|
69
70
|
invalid_properties = Array.new
|
70
|
-
if @
|
71
|
-
invalid_properties.push('invalid value for "
|
71
|
+
if @campaign_id.nil?
|
72
|
+
invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.')
|
72
73
|
end
|
73
74
|
|
74
75
|
invalid_properties
|
@@ -78,7 +79,7 @@ module Freeclimb
|
|
78
79
|
# @return true if the model is valid
|
79
80
|
def valid?
|
80
81
|
|
81
|
-
if @
|
82
|
+
if @campaign_id.nil?
|
82
83
|
false
|
83
84
|
else
|
84
85
|
list_invalid_properties.length() == 0
|
@@ -90,7 +91,7 @@ module Freeclimb
|
|
90
91
|
def ==(o)
|
91
92
|
return true if self.equal?(o)
|
92
93
|
self.class == o.class &&
|
93
|
-
|
94
|
+
campaign_id == o.campaign_id
|
94
95
|
end
|
95
96
|
|
96
97
|
# @see the `==` method
|
@@ -102,7 +103,7 @@ module Freeclimb
|
|
102
103
|
# Calculates hash code according to all attributes.
|
103
104
|
# @return [Integer] Hash code
|
104
105
|
def hash
|
105
|
-
[
|
106
|
+
[campaign_id].hash
|
106
107
|
end
|
107
108
|
|
108
109
|
# Builds the object from hash
|
@@ -40,9 +40,9 @@ module Freeclimb
|
|
40
40
|
}
|
41
41
|
end
|
42
42
|
|
43
|
-
# Returns all the JSON keys this model knows about
|
43
|
+
# Returns all the JSON keys this model knows about, including the ones defined in its parent(s)
|
44
44
|
def self.acceptable_attributes
|
45
|
-
attribute_map.values
|
45
|
+
attribute_map.values.concat(superclass.acceptable_attributes)
|
46
46
|
end
|
47
47
|
|
48
48
|
# Attribute type mapping.
|
@@ -50,7 +50,7 @@ module Freeclimb
|
|
50
50
|
{
|
51
51
|
:'action_url' => :'String',
|
52
52
|
:'play_beep' => :'Boolean',
|
53
|
-
:'record' => :'
|
53
|
+
:'record' => :'TranscribeUtteranceAllOfRecord',
|
54
54
|
:'privacy_for_logging' => :'Boolean',
|
55
55
|
:'privacy_for_recording' => :'Boolean',
|
56
56
|
:'prompts' => :'Array<Object>'
|
@@ -66,7 +66,8 @@ module Freeclimb
|
|
66
66
|
# List of class defined in allOf (OpenAPI v3)
|
67
67
|
def self.openapi_all_of
|
68
68
|
[
|
69
|
-
:'PerclCommand'
|
69
|
+
:'PerclCommand',
|
70
|
+
:'TranscribeUtteranceAllOf'
|
70
71
|
]
|
71
72
|
end
|
72
73
|
|
@@ -85,6 +86,9 @@ module Freeclimb
|
|
85
86
|
h[k.to_sym] = v
|
86
87
|
}
|
87
88
|
|
89
|
+
# call parent's initialize
|
90
|
+
super(attributes)
|
91
|
+
|
88
92
|
if attributes.key?(:'action_url')
|
89
93
|
self.action_url = attributes[:'action_url']
|
90
94
|
end
|
@@ -122,7 +126,7 @@ module Freeclimb
|
|
122
126
|
# Show invalid properties with the reasons. Usually used together with valid?
|
123
127
|
# @return Array for valid properties with the reasons
|
124
128
|
def list_invalid_properties
|
125
|
-
invalid_properties =
|
129
|
+
invalid_properties = super
|
126
130
|
if @action_url.nil?
|
127
131
|
invalid_properties.push('invalid value for "action_url", action_url cannot be nil.')
|
128
132
|
end
|
@@ -136,16 +140,6 @@ module Freeclimb
|
|
136
140
|
|
137
141
|
if @action_url.nil?
|
138
142
|
false
|
139
|
-
elsif @play_beep.nil?
|
140
|
-
false
|
141
|
-
elsif @record.nil?
|
142
|
-
false
|
143
|
-
elsif @privacy_for_logging.nil?
|
144
|
-
false
|
145
|
-
elsif @privacy_for_recording.nil?
|
146
|
-
false
|
147
|
-
elsif @prompts.nil?
|
148
|
-
false
|
149
143
|
else
|
150
144
|
list_invalid_properties.length() == 0
|
151
145
|
end
|
@@ -161,7 +155,7 @@ module Freeclimb
|
|
161
155
|
record == o.record &&
|
162
156
|
privacy_for_logging == o.privacy_for_logging &&
|
163
157
|
privacy_for_recording == o.privacy_for_recording &&
|
164
|
-
prompts == o.prompts
|
158
|
+
prompts == o.prompts && super(o)
|
165
159
|
end
|
166
160
|
|
167
161
|
# @see the `==` method
|
@@ -188,6 +182,7 @@ module Freeclimb
|
|
188
182
|
# @return [Object] Returns the model itself
|
189
183
|
def build_from_hash(attributes)
|
190
184
|
return nil unless attributes.is_a?(Hash)
|
185
|
+
super(attributes)
|
191
186
|
self.class.openapi_types.each_pair do |key, type|
|
192
187
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
193
188
|
self.send("#{key}=", nil)
|