freeclimb 4.5.2 → 4.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +15 -7
  5. data/docs/AddToConference.md +0 -2
  6. data/docs/AddToConferenceAllOf.md +0 -2
  7. data/docs/CreateWebRTCToken.md +22 -0
  8. data/docs/DefaultApi.md +303 -7
  9. data/docs/GetDigits.md +1 -1
  10. data/docs/GetDigitsAllOf.md +1 -1
  11. data/docs/IncomingNumberResult.md +3 -1
  12. data/docs/IncomingNumberResultAllOf.md +3 -1
  13. data/docs/MessageRequest.md +2 -2
  14. data/docs/MessageRequestAllOf.md +2 -2
  15. data/docs/MessageResult.md +3 -1
  16. data/docs/MessageResultAllOf.md +3 -1
  17. data/docs/Play.md +0 -2
  18. data/docs/PlayAllOf.md +0 -2
  19. data/docs/RemoveFromConference.md +1 -4
  20. data/docs/SMSTenDLCCampaign.md +10 -0
  21. data/docs/SMSTollFreeCampaign.md +30 -0
  22. data/docs/SMSTollFreeCampaignsListResult.md +32 -0
  23. data/docs/SMSTollFreeCampaignsListResultAllOf.md +18 -0
  24. data/docs/Say.md +0 -2
  25. data/docs/SayAllOf.md +0 -2
  26. data/docs/SetListen.md +0 -2
  27. data/docs/SetListenAllOf.md +0 -2
  28. data/docs/SetTalk.md +0 -2
  29. data/docs/SetTalkAllOf.md +0 -2
  30. data/docs/TFN.md +18 -0
  31. data/docs/TerminateConference.md +1 -4
  32. data/docs/TranscribeUtterance.md +1 -1
  33. data/docs/TranscribeUtteranceAllOf.md +28 -0
  34. data/docs/TranscribeUtteranceAllOfRecord.md +22 -0
  35. data/lib/freeclimb/api/default_api.rb +262 -7
  36. data/lib/freeclimb/models/account_request.rb +0 -2
  37. data/lib/freeclimb/models/account_result.rb +0 -6
  38. data/lib/freeclimb/models/add_to_conference.rb +1 -29
  39. data/lib/freeclimb/models/add_to_conference_all_of.rb +1 -29
  40. data/lib/freeclimb/models/application_result.rb +0 -6
  41. data/lib/freeclimb/models/buy_incoming_number_request.rb +0 -4
  42. data/lib/freeclimb/models/call_result.rb +0 -6
  43. data/lib/freeclimb/models/conference_participant_result.rb +0 -6
  44. data/lib/freeclimb/models/conference_result.rb +0 -6
  45. data/lib/freeclimb/models/create_conference.rb +0 -8
  46. data/lib/freeclimb/models/create_conference_all_of.rb +0 -8
  47. data/lib/freeclimb/models/create_conference_request.rb +0 -6
  48. data/lib/freeclimb/models/create_web_rtc_token.rb +274 -0
  49. data/lib/freeclimb/models/dequeue.rb +1 -0
  50. data/lib/freeclimb/models/enqueue.rb +0 -6
  51. data/lib/freeclimb/models/enqueue_all_of.rb +0 -6
  52. data/lib/freeclimb/models/get_digits.rb +1 -17
  53. data/lib/freeclimb/models/get_digits_all_of.rb +1 -17
  54. data/lib/freeclimb/models/get_speech.rb +0 -22
  55. data/lib/freeclimb/models/get_speech_all_of.rb +0 -22
  56. data/lib/freeclimb/models/incoming_number_request.rb +0 -2
  57. data/lib/freeclimb/models/incoming_number_result.rb +14 -13
  58. data/lib/freeclimb/models/incoming_number_result_all_of.rb +14 -5
  59. data/lib/freeclimb/models/make_call_request.rb +0 -18
  60. data/lib/freeclimb/models/message_request.rb +10 -24
  61. data/lib/freeclimb/models/message_request_all_of.rb +10 -16
  62. data/lib/freeclimb/models/message_result.rb +17 -11
  63. data/lib/freeclimb/models/message_result_all_of.rb +17 -5
  64. data/lib/freeclimb/models/mutable_resource_model.rb +0 -6
  65. data/lib/freeclimb/models/out_dial.rb +0 -18
  66. data/lib/freeclimb/models/out_dial_all_of.rb +0 -18
  67. data/lib/freeclimb/models/park.rb +0 -4
  68. data/lib/freeclimb/models/park_all_of.rb +0 -4
  69. data/lib/freeclimb/models/play.rb +1 -17
  70. data/lib/freeclimb/models/play_all_of.rb +1 -17
  71. data/lib/freeclimb/models/queue_request.rb +0 -2
  72. data/lib/freeclimb/models/queue_result.rb +0 -6
  73. data/lib/freeclimb/models/record_utterance.rb +0 -12
  74. data/lib/freeclimb/models/record_utterance_all_of.rb +0 -12
  75. data/lib/freeclimb/models/recording_result.rb +0 -6
  76. data/lib/freeclimb/models/remove_from_conference.rb +4 -23
  77. data/lib/freeclimb/models/say.rb +1 -19
  78. data/lib/freeclimb/models/say_all_of.rb +1 -19
  79. data/lib/freeclimb/models/send_digits.rb +0 -4
  80. data/lib/freeclimb/models/send_digits_all_of.rb +0 -4
  81. data/lib/freeclimb/models/set_listen.rb +2 -18
  82. data/lib/freeclimb/models/set_listen_all_of.rb +2 -18
  83. data/lib/freeclimb/models/set_talk.rb +2 -18
  84. data/lib/freeclimb/models/set_talk_all_of.rb +2 -18
  85. data/lib/freeclimb/models/sms.rb +0 -6
  86. data/lib/freeclimb/models/sms_all_of.rb +0 -6
  87. data/lib/freeclimb/models/sms_ten_dlc_brand.rb +0 -60
  88. data/lib/freeclimb/models/sms_ten_dlc_campaign.rb +121 -41
  89. data/lib/freeclimb/models/sms_ten_dlc_partner_campaign.rb +0 -44
  90. data/lib/freeclimb/models/sms_ten_dlc_partner_campaign_brand.rb +0 -20
  91. data/lib/freeclimb/models/sms_toll_free_campaign.rb +337 -0
  92. data/lib/freeclimb/models/sms_toll_free_campaigns_list_result.rb +311 -0
  93. data/lib/freeclimb/models/{remove_from_conference_all_of.rb → sms_toll_free_campaigns_list_result_all_of.rb} +14 -16
  94. data/lib/freeclimb/models/start_record_call.rb +1 -0
  95. data/lib/freeclimb/models/terminate_conference.rb +4 -23
  96. data/lib/freeclimb/models/{terminate_conference_all_of.rb → tfn.rb} +15 -14
  97. data/lib/freeclimb/models/transcribe_utterance.rb +11 -16
  98. data/lib/freeclimb/models/transcribe_utterance_all_of.rb +281 -0
  99. data/lib/freeclimb/models/{transcribe_utterance_record.rb → transcribe_utterance_all_of_record.rb} +3 -7
  100. data/lib/freeclimb/models/unpark.rb +1 -0
  101. data/lib/freeclimb/models/update_conference_participant_request.rb +0 -2
  102. data/lib/freeclimb/models/update_conference_request.rb +0 -2
  103. data/lib/freeclimb/version.rb +1 -1
  104. data/lib/freeclimb.rb +8 -4
  105. data/openapi.json +407 -88
  106. data/package.json +8 -0
  107. data/spec/api/default_api_spec.rb +215 -55
  108. data/spec/models/account_request_spec.rb +8 -6
  109. data/spec/models/account_result_spec.rb +28 -9
  110. data/spec/models/add_to_conference_spec.rb +21 -37
  111. data/spec/models/application_list_spec.rb +46 -22
  112. data/spec/models/application_request_spec.rb +13 -6
  113. data/spec/models/application_result_spec.rb +24 -9
  114. data/spec/models/available_number_list_spec.rb +46 -22
  115. data/spec/models/available_number_spec.rb +23 -10
  116. data/spec/models/buy_incoming_number_request_spec.rb +11 -7
  117. data/spec/models/call_list_spec.rb +46 -22
  118. data/spec/models/call_result_spec.rb +49 -15
  119. data/spec/models/capabilities_spec.rb +26 -11
  120. data/spec/models/conference_list_spec.rb +46 -22
  121. data/spec/models/conference_participant_list_spec.rb +46 -22
  122. data/spec/models/conference_participant_result_spec.rb +24 -9
  123. data/spec/models/conference_result_spec.rb +32 -9
  124. data/spec/models/create_conference_request_spec.rb +15 -6
  125. data/spec/models/create_conference_spec.rb +19 -7
  126. data/spec/models/create_web_rtc_token_spec.rb +231 -0
  127. data/spec/models/enqueue_spec.rb +16 -9
  128. data/spec/models/filter_logs_request_spec.rb +9 -7
  129. data/spec/models/get_digits_spec.rb +59 -35
  130. data/spec/models/get_speech_spec.rb +60 -24
  131. data/spec/models/hangup_spec.rb +7 -6
  132. data/spec/models/incoming_number_list_spec.rb +46 -22
  133. data/spec/models/incoming_number_request_spec.rb +9 -6
  134. data/spec/models/incoming_number_result_spec.rb +68 -13
  135. data/spec/models/log_list_spec.rb +46 -22
  136. data/spec/models/log_result_spec.rb +21 -9
  137. data/spec/models/make_call_request_spec.rb +26 -11
  138. data/spec/models/message_request_spec.rb +49 -35
  139. data/spec/models/message_result_spec.rb +64 -11
  140. data/spec/models/messages_list_spec.rb +46 -22
  141. data/spec/models/mutable_resource_model_spec.rb +15 -9
  142. data/spec/models/out_dial_spec.rb +33 -13
  143. data/spec/models/pagination_model_spec.rb +40 -21
  144. data/spec/models/park_spec.rb +13 -8
  145. data/spec/models/pause_spec.rb +14 -10
  146. data/spec/models/percl_command_spec.rb +6 -6
  147. data/spec/models/percl_script_spec.rb +11 -6
  148. data/spec/models/play_early_media_spec.rb +9 -7
  149. data/spec/models/play_spec.rb +17 -40
  150. data/spec/models/queue_list_spec.rb +46 -22
  151. data/spec/models/queue_member_list_spec.rb +46 -22
  152. data/spec/models/queue_member_spec.rb +21 -12
  153. data/spec/models/queue_request_spec.rb +13 -9
  154. data/spec/models/queue_result_spec.rb +37 -18
  155. data/spec/models/record_utterance_spec.rb +28 -13
  156. data/spec/models/recording_list_spec.rb +46 -22
  157. data/spec/models/recording_result_spec.rb +25 -12
  158. data/spec/models/redirect_spec.rb +9 -7
  159. data/spec/models/reject_spec.rb +7 -6
  160. data/spec/models/remove_from_conference_spec.rb +0 -133
  161. data/spec/models/say_spec.rb +18 -40
  162. data/spec/models/send_digits_spec.rb +17 -10
  163. data/spec/models/set_listen_spec.rb +8 -37
  164. data/spec/models/set_talk_spec.rb +8 -37
  165. data/spec/models/sms_spec.rb +16 -9
  166. data/spec/models/sms_ten_dlc_brand_spec.rb +38 -4
  167. data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +46 -22
  168. data/spec/models/sms_ten_dlc_campaign_spec.rb +228 -4
  169. data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +46 -22
  170. data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +25 -7
  171. data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +56 -8
  172. data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +46 -22
  173. data/spec/models/sms_toll_free_campaign_spec.rb +382 -0
  174. data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +395 -0
  175. data/spec/models/terminate_conference_spec.rb +0 -133
  176. data/spec/models/tfn_spec.rb +164 -0
  177. data/spec/models/{transcribe_utterance_record_spec.rb → transcribe_utterance_all_of_record_spec.rb} +78 -67
  178. data/spec/models/transcribe_utterance_spec.rb +37 -96
  179. data/spec/models/update_call_request_spec.rb +12 -7
  180. data/spec/models/update_conference_participant_request_spec.rb +10 -6
  181. data/spec/models/update_conference_request_spec.rb +15 -6
  182. data/yarn.lock +1292 -0
  183. metadata +105 -84
@@ -0,0 +1,395 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Freeclimb::SMSTollFreeCampaignsListResult
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Freeclimb::SMSTollFreeCampaignsListResult do
21
+ let(:instance) { Freeclimb::SMSTollFreeCampaignsListResult.new }
22
+
23
+ describe 'test an instance of SMSTollFreeCampaignsListResult' do
24
+ it 'should create an instance of SMSTollFreeCampaignsListResult' do
25
+ expect(instance).to be_instance_of(Freeclimb::SMSTollFreeCampaignsListResult)
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "total"' do
30
+ it 'should work' do
31
+
32
+
33
+ instance.total = 1
34
+ expect(instance.total).to eq(1)
35
+
36
+ end
37
+ end
38
+
39
+ describe 'test attribute "start"' do
40
+ it 'should work' do
41
+
42
+
43
+ instance.start = 1
44
+ expect(instance.start).to eq(1)
45
+
46
+ end
47
+ end
48
+
49
+ describe 'test attribute "_end"' do
50
+ it 'should work' do
51
+
52
+
53
+ instance._end = 1
54
+ expect(instance._end).to eq(1)
55
+
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "page"' do
60
+ it 'should work' do
61
+
62
+
63
+ instance.page = 1
64
+ expect(instance.page).to eq(1)
65
+
66
+ end
67
+ end
68
+
69
+ describe 'test attribute "num_pages"' do
70
+ it 'should work' do
71
+
72
+
73
+ instance.num_pages = 1
74
+ expect(instance.num_pages).to eq(1)
75
+
76
+ end
77
+ end
78
+
79
+ describe 'test attribute "page_size"' do
80
+ it 'should work' do
81
+
82
+
83
+ instance.page_size = 1
84
+ expect(instance.page_size).to eq(1)
85
+
86
+ end
87
+ end
88
+
89
+ describe 'test attribute "next_page_uri"' do
90
+ it 'should work' do
91
+ instance.next_page_uri = "TEST_STRING"
92
+ expect(instance.next_page_uri).to eq("TEST_STRING")
93
+
94
+ end
95
+ end
96
+
97
+ describe 'test attribute "brands"' do
98
+ it 'should work' do
99
+
100
+ instance.brands = ["ELEMENT_1", "ELEMENT_2"]
101
+ expect(instance.brands).to eq(["ELEMENT_1", "ELEMENT_2"])
102
+ end
103
+ end
104
+
105
+ describe 'test method "initialize"' do
106
+ it 'properly initializes with values' do
107
+ expect{instance = Freeclimb::SMSTollFreeCampaignsListResult.new(
108
+ total: 1,
109
+ start: 1,
110
+ _end: 1,
111
+ page: 1,
112
+ num_pages: 1,
113
+ page_size: 1,
114
+ next_page_uri: "TS",
115
+ brands: Array.new(),
116
+ )}.not_to raise_error()
117
+ end
118
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::SMSTollFreeCampaignsListResult' do
119
+ expect{instance = Freeclimb::SMSTollFreeCampaignsListResult.new(
120
+ total: 1,
121
+ start: 1,
122
+ _end: 1,
123
+ page: 1,
124
+ num_pages: 1,
125
+ page_size: 1,
126
+ next_page_uri: "TS",
127
+ brands: Array.new(),
128
+ invalid_attribute: true
129
+ )}.to raise_error(ArgumentError)
130
+ end
131
+ it 'fails to initialize with invalid attribute' do
132
+ expect{instance = Freeclimb::SMSTollFreeCampaignsListResult.new(
133
+ total: 1,
134
+ start: 1,
135
+ _end: 1,
136
+ page: 1,
137
+ num_pages: 1,
138
+ page_size: 1,
139
+ next_page_uri: "TS",
140
+ brands: Array.new(),
141
+ invalid_attribute: true
142
+ )}.to raise_error(ArgumentError)
143
+ end
144
+ end
145
+
146
+ describe 'test method "valid"' do
147
+ it 'checks if properties are valid' do
148
+ instance = Freeclimb::SMSTollFreeCampaignsListResult.new(
149
+ total: 1,
150
+ start: 1,
151
+ _end: 1,
152
+ page: 1,
153
+ num_pages: 1,
154
+ page_size: 1,
155
+ next_page_uri: "TS",
156
+ brands: Array.new(),
157
+ )
158
+ expect(instance.valid?).to eq(true)
159
+ end
160
+
161
+ it 'checks if properties are invalid' do
162
+ instance = Freeclimb::SMSTollFreeCampaignsListResult.new(
163
+
164
+ )
165
+ expect(instance.valid?).to eq(false)
166
+ end
167
+
168
+ end
169
+
170
+ describe 'test method "eql?"' do
171
+ it 'checks if objects are equal' do
172
+ obj = Object.new()
173
+ instance_1 = Freeclimb::SMSTollFreeCampaignsListResult.new(
174
+ total: 1,
175
+ start: 1,
176
+ _end: 1,
177
+ page: 1,
178
+ num_pages: 1,
179
+ page_size: 1,
180
+ next_page_uri: "TS",
181
+ brands: Freeclimb::SMSTollFreeCampaign.new(),
182
+ brands: [],
183
+ )
184
+ instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new(
185
+ total: 1,
186
+ start: 1,
187
+ _end: 1,
188
+ page: 1,
189
+ num_pages: 1,
190
+ page_size: 1,
191
+ next_page_uri: "TS",
192
+ brands: Freeclimb::SMSTollFreeCampaign.new(),
193
+ brands: [],
194
+ )
195
+ expect(instance_1.eql?(instance_2)).to eq(true)
196
+ end
197
+
198
+ it 'checks if objects are not equal' do
199
+ instance_1 = Freeclimb::SMSTollFreeCampaignsListResult.new(
200
+ total: 2,
201
+ start: 2,
202
+ _end: 2,
203
+ page: 2,
204
+ num_pages: 2,
205
+ page_size: 2,
206
+ next_page_uri: "TS",
207
+ brands: Freeclimb::SMSTollFreeCampaign.new(),
208
+ brands: [],
209
+ )
210
+ instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new(
211
+ total: 1,
212
+ start: 1,
213
+ _end: 1,
214
+ page: 1,
215
+ num_pages: 1,
216
+ page_size: 1,
217
+ next_page_uri: "ST",
218
+ brands: Freeclimb::SMSTollFreeCampaign.new(),
219
+ brands: nil,
220
+ )
221
+ expect(instance_1.eql?(instance_2)).to eq(false)
222
+ end
223
+ end
224
+
225
+ describe 'test method "hash"' do
226
+ it 'calculates hash code' do
227
+ instance = Freeclimb::SMSTollFreeCampaignsListResult.new(
228
+ total: 1,
229
+ start: 1,
230
+ _end: 1,
231
+ page: 1,
232
+ num_pages: 1,
233
+ page_size: 1,
234
+ next_page_uri: "TS",
235
+ brands: Array.new(),
236
+ )
237
+ expect(instance.hash).to be_a_kind_of(Integer)
238
+ end
239
+ end
240
+
241
+ describe 'test method "build_from_hash"' do
242
+ it 'builds equivalent model from hash code' do
243
+ instance_1 = Freeclimb::SMSTollFreeCampaignsListResult.new(
244
+ total: 1,
245
+ start: 1,
246
+ _end: 1,
247
+ page: 1,
248
+ num_pages: 1,
249
+ page_size: 1,
250
+ next_page_uri: "TS",
251
+ brands: Array.new(),
252
+ )
253
+ instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new
254
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
255
+ end
256
+ end
257
+
258
+ describe 'test method "_deserialize"' do
259
+ instance = Freeclimb::SMSTollFreeCampaignsListResult.new(
260
+ total: 1,
261
+ start: 1,
262
+ _end: 1,
263
+ page: 1,
264
+ num_pages: 1,
265
+ page_size: 1,
266
+ next_page_uri: "TS",
267
+ brands: Array.new(),
268
+ )
269
+ it 'deserializes the data of total' do
270
+ expect(instance._deserialize("Integer", instance.total)).to be_a_kind_of(Integer)
271
+ end
272
+ it 'deserializes the data of start' do
273
+ expect(instance._deserialize("Integer", instance.start)).to be_a_kind_of(Integer)
274
+ end
275
+ it 'deserializes the data of _end' do
276
+ expect(instance._deserialize("Integer", instance._end)).to be_a_kind_of(Integer)
277
+ end
278
+ it 'deserializes the data of page' do
279
+ expect(instance._deserialize("Integer", instance.page)).to be_a_kind_of(Integer)
280
+ end
281
+ it 'deserializes the data of num_pages' do
282
+ expect(instance._deserialize("Integer", instance.num_pages)).to be_a_kind_of(Integer)
283
+ end
284
+ it 'deserializes the data of page_size' do
285
+ expect(instance._deserialize("Integer", instance.page_size)).to be_a_kind_of(Integer)
286
+ end
287
+ it 'deserializes the data of next_page_uri' do
288
+ expect(instance._deserialize("String", instance.next_page_uri)).to be_a_kind_of(String)
289
+ end
290
+ it 'deserializes the data of brands' do
291
+ expect(instance._deserialize("Array<SMSTollFreeCampaign>", instance.brands)).to be_a_kind_of(Array)
292
+ end
293
+ end
294
+
295
+ describe 'test method "to_s"' do
296
+ it 'returns the string representation of the object' do
297
+ instance = Freeclimb::SMSTollFreeCampaignsListResult.new(
298
+ total: 1,
299
+ start: 1,
300
+ _end: 1,
301
+ page: 1,
302
+ num_pages: 1,
303
+ page_size: 1,
304
+ next_page_uri: "TS",
305
+ brands: Array.new(),
306
+ )
307
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
308
+ end
309
+ end
310
+
311
+ describe 'test method "to_hash"' do
312
+ it 'returns the object in the form of hash' do
313
+ instance = Freeclimb::SMSTollFreeCampaignsListResult.new(
314
+ total: 1,
315
+ start: 1,
316
+ _end: 1,
317
+ page: 1,
318
+ num_pages: 1,
319
+ page_size: 1,
320
+ next_page_uri: "TS",
321
+ brands: Array.new(),
322
+ )
323
+ expect(instance.to_hash).to be_a_kind_of(Hash)
324
+ end
325
+ it 'creates equal hash for two equal objects' do
326
+ obj = Object.new()
327
+ instance_1 = Freeclimb::SMSTollFreeCampaignsListResult.new(
328
+ total: 1,
329
+ start: 1,
330
+ _end: 1,
331
+ page: 1,
332
+ num_pages: 1,
333
+ page_size: 1,
334
+ next_page_uri: "TS",
335
+ brands: Array.new(),
336
+ )
337
+ instance_2 = Freeclimb::SMSTollFreeCampaignsListResult.new(
338
+ total: 1,
339
+ start: 1,
340
+ _end: 1,
341
+ page: 1,
342
+ num_pages: 1,
343
+ page_size: 1,
344
+ next_page_uri: "TS",
345
+ brands: Array.new(),
346
+ )
347
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
348
+ end
349
+ end
350
+
351
+ describe 'test method "_to_hash"' do
352
+ instance = Freeclimb::SMSTollFreeCampaignsListResult.new(
353
+ total: 1,
354
+
355
+ start: 1,
356
+
357
+ _end: 1,
358
+
359
+ page: 1,
360
+
361
+ num_pages: 1,
362
+
363
+ page_size: 1,
364
+
365
+ next_page_uri: "TS",
366
+
367
+ brands: Array.new(),
368
+ )
369
+ it 'returns total in the form of hash' do
370
+ expect(instance._to_hash(instance.total)).to eq(instance.total)
371
+ end
372
+ it 'returns start in the form of hash' do
373
+ expect(instance._to_hash(instance.start)).to eq(instance.start)
374
+ end
375
+ it 'returns _end in the form of hash' do
376
+ expect(instance._to_hash(instance._end)).to eq(instance._end)
377
+ end
378
+ it 'returns page in the form of hash' do
379
+ expect(instance._to_hash(instance.page)).to eq(instance.page)
380
+ end
381
+ it 'returns num_pages in the form of hash' do
382
+ expect(instance._to_hash(instance.num_pages)).to eq(instance.num_pages)
383
+ end
384
+ it 'returns page_size in the form of hash' do
385
+ expect(instance._to_hash(instance.page_size)).to eq(instance.page_size)
386
+ end
387
+ it 'returns next_page_uri in the form of hash' do
388
+ expect(instance._to_hash(instance.next_page_uri)).to eq(instance.next_page_uri)
389
+ end
390
+ it 'returns brands in the form of hash' do
391
+ expect(instance._to_hash(instance.brands)).to eq(instance.brands)
392
+ end
393
+ end
394
+
395
+ end
@@ -26,137 +26,4 @@ describe Freeclimb::TerminateConference do
26
26
  end
27
27
  end
28
28
 
29
- describe 'test attribute "conference_id"' do
30
- it 'should work' do
31
- instance.conference_id = "TEST_STRING"
32
- expect(instance.conference_id).to eq("TEST_STRING")
33
- end
34
- end
35
-
36
- describe 'test method "initialize"' do
37
- it 'properly initializes with values' do
38
- expect{instance = Freeclimb::TerminateConference.new(
39
- conference_id: "TS",
40
- )}.not_to raise_error()
41
- end
42
- it 'fails to initialize with input argument that is not a hash in Freeclimb::TerminateConference' do
43
- expect{instance = Freeclimb::TerminateConference.new(
44
- conference_id: "TS",
45
- invalid_attribute: true
46
- )}.to raise_error(ArgumentError)
47
- end
48
- it 'fails to initialize with invalid attribute' do
49
- expect{instance = Freeclimb::TerminateConference.new(
50
- conference_id: "TS",
51
- invalid_attribute: true
52
- )}.to raise_error(ArgumentError)
53
- end
54
- end
55
-
56
- describe 'test method "valid"' do
57
- it 'checks if properties are valid' do
58
- instance = Freeclimb::TerminateConference.new(
59
- conference_id: "TS",
60
- )
61
- expect(instance.valid?).to eq(true)
62
- end
63
- it 'checks if properties are invalid' do
64
- instance = Freeclimb::TerminateConference.new(
65
- conference_id: nil,
66
- )
67
- expect(instance.valid?).to eq(false)
68
- end
69
- it 'checks if model is empty' do
70
- instance = Freeclimb::TerminateConference.new()
71
- expect(instance.valid?).to eq(false)
72
- end
73
- end
74
-
75
- describe 'test method "eql?"' do
76
- it 'checks if objects are equal' do
77
- obj = Object.new()
78
- instance_1 = Freeclimb::TerminateConference.new(
79
- conference_id: "TS",
80
- )
81
- instance_2 = Freeclimb::TerminateConference.new(
82
- conference_id: "TS",
83
- )
84
- expect(instance_1.eql?(instance_2)).to eq(true)
85
- end
86
- it 'checks if objects are not equal' do
87
- instance_1 = Freeclimb::TerminateConference.new(
88
- conference_id: "TS",
89
- )
90
- instance_2 = Freeclimb::TerminateConference.new(
91
- conference_id: "ST",
92
- )
93
- expect(instance_1.eql?(instance_2)).to eq(false)
94
- end
95
- end
96
-
97
- describe 'test method "hash"' do
98
- it 'calculates hash code' do
99
- instance = Freeclimb::TerminateConference.new(
100
- conference_id: "TS",
101
- )
102
- expect(instance.hash).to be_a_kind_of(Integer)
103
- end
104
- end
105
-
106
- describe 'test method "build_from_hash"' do
107
- it 'builds equivalent model from hash code' do
108
- instance_1 = Freeclimb::TerminateConference.new(
109
- conference_id: "TS",
110
- )
111
- instance_2 = Freeclimb::TerminateConference.new
112
- expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
113
- end
114
- end
115
-
116
- describe 'test method "_deserialize"' do
117
- instance = Freeclimb::TerminateConference.new(
118
- conference_id: "TS",
119
- )
120
- it 'deserializes the data of conference_id' do
121
- expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String)
122
- end
123
- end
124
-
125
- describe 'test method "to_s"' do
126
- it 'returns the string representation of the object' do
127
- instance = Freeclimb::TerminateConference.new(
128
- conference_id: "TS",
129
- )
130
- expect(instance.to_s).to eq(instance.to_hash.to_s)
131
- end
132
- end
133
-
134
- describe 'test method "to_hash"' do
135
- it 'returns the object in the form of hash' do
136
- instance = Freeclimb::TerminateConference.new(
137
- conference_id: "TS",
138
- )
139
- expect(instance.to_hash).to be_a_kind_of(Hash)
140
- end
141
- it 'creates equal hash for two equal objects' do
142
- obj = Object.new()
143
- instance_1 = Freeclimb::TerminateConference.new(
144
- conference_id: "TS",
145
- )
146
- instance_2 = Freeclimb::TerminateConference.new(
147
- conference_id: "TS",
148
- )
149
- expect(instance_1.to_hash).to eq(instance_2.to_hash)
150
- end
151
- end
152
-
153
- describe 'test method "_to_hash"' do
154
- instance = Freeclimb::TerminateConference.new(
155
- conference_id: "TS",
156
- )
157
- it 'returns conference_id in the form of hash' do
158
- expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id)
159
- end
160
- end
161
-
162
29
  end
@@ -0,0 +1,164 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Freeclimb::TFN
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Freeclimb::TFN do
21
+ let(:instance) { Freeclimb::TFN.new }
22
+
23
+ describe 'test an instance of TFN' do
24
+ it 'should create an instance of TFN' do
25
+ expect(instance).to be_instance_of(Freeclimb::TFN)
26
+ end
27
+ end
28
+
29
+ describe 'test attribute "campaign_id"' do
30
+ it 'should work' do
31
+ instance.campaign_id = "TEST_STRING"
32
+ expect(instance.campaign_id).to eq("TEST_STRING")
33
+
34
+ end
35
+ end
36
+
37
+ describe 'test method "initialize"' do
38
+ it 'properly initializes with values' do
39
+ expect{instance = Freeclimb::TFN.new(
40
+ campaign_id: "TS",
41
+ )}.not_to raise_error()
42
+ end
43
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::TFN' do
44
+ expect{instance = Freeclimb::TFN.new(
45
+ campaign_id: "TS",
46
+ invalid_attribute: true
47
+ )}.to raise_error(ArgumentError)
48
+ end
49
+ it 'fails to initialize with invalid attribute' do
50
+ expect{instance = Freeclimb::TFN.new(
51
+ campaign_id: "TS",
52
+ invalid_attribute: true
53
+ )}.to raise_error(ArgumentError)
54
+ end
55
+ end
56
+
57
+ describe 'test method "valid"' do
58
+ it 'checks if properties are valid' do
59
+ instance = Freeclimb::TFN.new(
60
+ campaign_id: "TS",
61
+ )
62
+ expect(instance.valid?).to eq(true)
63
+ end
64
+
65
+ it 'checks if properties are invalid' do
66
+ instance = Freeclimb::TFN.new(
67
+
68
+ campaign_id: nil,
69
+
70
+ )
71
+ expect(instance.valid?).to eq(false)
72
+ end
73
+
74
+ end
75
+
76
+ describe 'test method "eql?"' do
77
+ it 'checks if objects are equal' do
78
+ obj = Object.new()
79
+ instance_1 = Freeclimb::TFN.new(
80
+ campaign_id: "TS",
81
+ )
82
+ instance_2 = Freeclimb::TFN.new(
83
+ campaign_id: "TS",
84
+ )
85
+ expect(instance_1.eql?(instance_2)).to eq(true)
86
+ end
87
+
88
+ it 'checks if objects are not equal' do
89
+ instance_1 = Freeclimb::TFN.new(
90
+ campaign_id: "TS",
91
+ )
92
+ instance_2 = Freeclimb::TFN.new(
93
+ campaign_id: "ST",
94
+ )
95
+ expect(instance_1.eql?(instance_2)).to eq(false)
96
+ end
97
+ end
98
+
99
+ describe 'test method "hash"' do
100
+ it 'calculates hash code' do
101
+ instance = Freeclimb::TFN.new(
102
+ campaign_id: "TS",
103
+ )
104
+ expect(instance.hash).to be_a_kind_of(Integer)
105
+ end
106
+ end
107
+
108
+ describe 'test method "build_from_hash"' do
109
+ it 'builds equivalent model from hash code' do
110
+ instance_1 = Freeclimb::TFN.new(
111
+ campaign_id: "TS",
112
+ )
113
+ instance_2 = Freeclimb::TFN.new
114
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
115
+ end
116
+ end
117
+
118
+ describe 'test method "_deserialize"' do
119
+ instance = Freeclimb::TFN.new(
120
+ campaign_id: "TS",
121
+ )
122
+ it 'deserializes the data of campaign_id' do
123
+ expect(instance._deserialize("String", instance.campaign_id)).to be_a_kind_of(String)
124
+ end
125
+ end
126
+
127
+ describe 'test method "to_s"' do
128
+ it 'returns the string representation of the object' do
129
+ instance = Freeclimb::TFN.new(
130
+ campaign_id: "TS",
131
+ )
132
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
133
+ end
134
+ end
135
+
136
+ describe 'test method "to_hash"' do
137
+ it 'returns the object in the form of hash' do
138
+ instance = Freeclimb::TFN.new(
139
+ campaign_id: "TS",
140
+ )
141
+ expect(instance.to_hash).to be_a_kind_of(Hash)
142
+ end
143
+ it 'creates equal hash for two equal objects' do
144
+ obj = Object.new()
145
+ instance_1 = Freeclimb::TFN.new(
146
+ campaign_id: "TS",
147
+ )
148
+ instance_2 = Freeclimb::TFN.new(
149
+ campaign_id: "TS",
150
+ )
151
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
152
+ end
153
+ end
154
+
155
+ describe 'test method "_to_hash"' do
156
+ instance = Freeclimb::TFN.new(
157
+ campaign_id: "TS",
158
+ )
159
+ it 'returns campaign_id in the form of hash' do
160
+ expect(instance._to_hash(instance.campaign_id)).to eq(instance.campaign_id)
161
+ end
162
+ end
163
+
164
+ end