dialmycalls_client 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/README.md +186 -0
  4. data/dialmycalls_client-1.0.0.gem +0 -0
  5. data/dialmycalls_client.gemspec +55 -0
  6. data/docs/Accessaccount.md +12 -0
  7. data/docs/Account.md +9 -0
  8. data/docs/AccountsApi.md +324 -0
  9. data/docs/CallRecipient.md +19 -0
  10. data/docs/CallerIdsApi.md +386 -0
  11. data/docs/Callerid.md +13 -0
  12. data/docs/CallsApi.md +278 -0
  13. data/docs/Callservice.md +17 -0
  14. data/docs/Contact.md +18 -0
  15. data/docs/ContactAttributes.md +11 -0
  16. data/docs/ContactsApi.md +330 -0
  17. data/docs/CreateAccessAccountParameters.md +10 -0
  18. data/docs/CreateCallParameters.md +18 -0
  19. data/docs/CreateCallerIdParameters.md +9 -0
  20. data/docs/CreateContactParameters.md +14 -0
  21. data/docs/CreateGroupParameters.md +8 -0
  22. data/docs/CreateRecordingByPhoneParameters.md +12 -0
  23. data/docs/CreateRecordingByUrlParameters.md +9 -0
  24. data/docs/CreateRecordingParameters.md +11 -0
  25. data/docs/CreateTextParameters.md +17 -0
  26. data/docs/CreateUnverifiedCallerIdParameters.md +9 -0
  27. data/docs/DoNotContactsApi.md +62 -0
  28. data/docs/Donotcontact.md +12 -0
  29. data/docs/Group.md +12 -0
  30. data/docs/GroupsApi.md +277 -0
  31. data/docs/Identifier.md +8 -0
  32. data/docs/Incomingtext.md +13 -0
  33. data/docs/Keyword.md +12 -0
  34. data/docs/KeywordsApi.md +168 -0
  35. data/docs/Polling.md +10 -0
  36. data/docs/PushToListenAgain.md +9 -0
  37. data/docs/PushToOptOut.md +9 -0
  38. data/docs/PushToRecord.md +9 -0
  39. data/docs/PushToTalk.md +12 -0
  40. data/docs/Recording.md +15 -0
  41. data/docs/RecordingsApi.md +383 -0
  42. data/docs/Service.md +16 -0
  43. data/docs/Shortcode.md +11 -0
  44. data/docs/TextRecipient.md +13 -0
  45. data/docs/TextsApi.md +492 -0
  46. data/docs/UpdateAccessAccountByIdParameters.md +10 -0
  47. data/docs/UpdateCallerIdByIdParameters.md +8 -0
  48. data/docs/UpdateContactByIdParameters.md +14 -0
  49. data/docs/UpdateGroupByIdParameters.md +8 -0
  50. data/docs/UpdateRecordingByIdParameters.md +8 -0
  51. data/docs/UpdateVanityNumberByIdParameters.md +12 -0
  52. data/docs/VanityNumbersApi.md +224 -0
  53. data/docs/Vanitynumber.md +16 -0
  54. data/docs/VerifyCallerIdByIdParameters.md +8 -0
  55. data/git_push.sh +67 -0
  56. data/lib/dialmycalls_client/api/accounts_api.rb +375 -0
  57. data/lib/dialmycalls_client/api/caller_ids_api.rb +440 -0
  58. data/lib/dialmycalls_client/api/calls_api.rb +321 -0
  59. data/lib/dialmycalls_client/api/contacts_api.rb +379 -0
  60. data/lib/dialmycalls_client/api/do_not_contacts_api.rb +90 -0
  61. data/lib/dialmycalls_client/api/groups_api.rb +322 -0
  62. data/lib/dialmycalls_client/api/keywords_api.rb +204 -0
  63. data/lib/dialmycalls_client/api/recordings_api.rb +436 -0
  64. data/lib/dialmycalls_client/api/texts_api.rb +547 -0
  65. data/lib/dialmycalls_client/api/vanity_numbers_api.rb +265 -0
  66. data/lib/dialmycalls_client/api_client.rb +379 -0
  67. data/lib/dialmycalls_client/api_error.rb +47 -0
  68. data/lib/dialmycalls_client/configuration.rb +214 -0
  69. data/lib/dialmycalls_client/models/accessaccount.rb +240 -0
  70. data/lib/dialmycalls_client/models/account.rb +210 -0
  71. data/lib/dialmycalls_client/models/call_recipient.rb +310 -0
  72. data/lib/dialmycalls_client/models/callerid.rb +250 -0
  73. data/lib/dialmycalls_client/models/callservice.rb +290 -0
  74. data/lib/dialmycalls_client/models/contact.rb +300 -0
  75. data/lib/dialmycalls_client/models/contact_attributes.rb +230 -0
  76. data/lib/dialmycalls_client/models/create_access_account_parameters.rb +220 -0
  77. data/lib/dialmycalls_client/models/create_call_parameters.rb +304 -0
  78. data/lib/dialmycalls_client/models/create_caller_id_parameters.rb +210 -0
  79. data/lib/dialmycalls_client/models/create_contact_parameters.rb +262 -0
  80. data/lib/dialmycalls_client/models/create_group_parameters.rb +200 -0
  81. data/lib/dialmycalls_client/models/create_recording_by_phone_parameters.rb +240 -0
  82. data/lib/dialmycalls_client/models/create_recording_by_url_parameters.rb +210 -0
  83. data/lib/dialmycalls_client/models/create_recording_parameters.rb +230 -0
  84. data/lib/dialmycalls_client/models/create_text_parameters.rb +294 -0
  85. data/lib/dialmycalls_client/models/create_unverified_caller_id_parameters.rb +210 -0
  86. data/lib/dialmycalls_client/models/donotcontact.rb +240 -0
  87. data/lib/dialmycalls_client/models/group.rb +240 -0
  88. data/lib/dialmycalls_client/models/identifier.rb +200 -0
  89. data/lib/dialmycalls_client/models/incomingtext.rb +250 -0
  90. data/lib/dialmycalls_client/models/keyword.rb +240 -0
  91. data/lib/dialmycalls_client/models/polling.rb +220 -0
  92. data/lib/dialmycalls_client/models/push_to_listen_again.rb +210 -0
  93. data/lib/dialmycalls_client/models/push_to_opt_out.rb +210 -0
  94. data/lib/dialmycalls_client/models/push_to_record.rb +210 -0
  95. data/lib/dialmycalls_client/models/push_to_talk.rb +240 -0
  96. data/lib/dialmycalls_client/models/recording.rb +270 -0
  97. data/lib/dialmycalls_client/models/service.rb +280 -0
  98. data/lib/dialmycalls_client/models/shortcode.rb +230 -0
  99. data/lib/dialmycalls_client/models/text_recipient.rb +250 -0
  100. data/lib/dialmycalls_client/models/update_access_account_by_id_parameters.rb +220 -0
  101. data/lib/dialmycalls_client/models/update_caller_id_by_id_parameters.rb +200 -0
  102. data/lib/dialmycalls_client/models/update_contact_by_id_parameters.rb +262 -0
  103. data/lib/dialmycalls_client/models/update_group_by_id_parameters.rb +200 -0
  104. data/lib/dialmycalls_client/models/update_recording_by_id_parameters.rb +200 -0
  105. data/lib/dialmycalls_client/models/update_vanity_number_by_id_parameters.rb +242 -0
  106. data/lib/dialmycalls_client/models/vanitynumber.rb +280 -0
  107. data/lib/dialmycalls_client/models/verify_caller_id_by_id_parameters.rb +200 -0
  108. data/lib/dialmycalls_client/version.rb +26 -0
  109. data/lib/dialmycalls_client.rb +99 -0
  110. data/spec/api/accounts_api_spec.rb +118 -0
  111. data/spec/api/caller_ids_api_spec.rb +132 -0
  112. data/spec/api/calls_api_spec.rb +107 -0
  113. data/spec/api/contacts_api_spec.rb +119 -0
  114. data/spec/api/do_not_contacts_api_spec.rb +58 -0
  115. data/spec/api/groups_api_spec.rb +107 -0
  116. data/spec/api/keywords_api_spec.rb +82 -0
  117. data/spec/api/recordings_api_spec.rb +131 -0
  118. data/spec/api/texts_api_spec.rb +155 -0
  119. data/spec/api/vanity_numbers_api_spec.rb +95 -0
  120. data/spec/api_client_spec.rb +237 -0
  121. data/spec/configuration_spec.rb +53 -0
  122. data/spec/models/accessaccount_spec.rb +77 -0
  123. data/spec/models/account_spec.rb +59 -0
  124. data/spec/models/call_recipient_spec.rb +119 -0
  125. data/spec/models/callerid_spec.rb +83 -0
  126. data/spec/models/callservice_spec.rb +107 -0
  127. data/spec/models/contact_attributes_spec.rb +71 -0
  128. data/spec/models/contact_spec.rb +113 -0
  129. data/spec/models/create_access_account_parameters_spec.rb +65 -0
  130. data/spec/models/create_call_parameters_spec.rb +113 -0
  131. data/spec/models/create_caller_id_parameters_spec.rb +59 -0
  132. data/spec/models/create_contact_parameters_spec.rb +89 -0
  133. data/spec/models/create_group_parameters_spec.rb +53 -0
  134. data/spec/models/create_recording_by_phone_parameters_spec.rb +77 -0
  135. data/spec/models/create_recording_by_url_parameters_spec.rb +59 -0
  136. data/spec/models/create_recording_parameters_spec.rb +71 -0
  137. data/spec/models/create_text_parameters_spec.rb +107 -0
  138. data/spec/models/create_unverified_caller_id_parameters_spec.rb +59 -0
  139. data/spec/models/donotcontact_spec.rb +77 -0
  140. data/spec/models/group_spec.rb +77 -0
  141. data/spec/models/identifier_spec.rb +53 -0
  142. data/spec/models/incomingtext_spec.rb +83 -0
  143. data/spec/models/keyword_spec.rb +77 -0
  144. data/spec/models/polling_spec.rb +65 -0
  145. data/spec/models/push_to_listen_again_spec.rb +59 -0
  146. data/spec/models/push_to_opt_out_spec.rb +59 -0
  147. data/spec/models/push_to_record_spec.rb +59 -0
  148. data/spec/models/push_to_talk_spec.rb +77 -0
  149. data/spec/models/recording_spec.rb +95 -0
  150. data/spec/models/service_spec.rb +101 -0
  151. data/spec/models/shortcode_spec.rb +71 -0
  152. data/spec/models/text_recipient_spec.rb +83 -0
  153. data/spec/models/update_access_account_by_id_parameters_spec.rb +65 -0
  154. data/spec/models/update_caller_id_by_id_parameters_spec.rb +53 -0
  155. data/spec/models/update_contact_by_id_parameters_spec.rb +89 -0
  156. data/spec/models/update_group_by_id_parameters_spec.rb +53 -0
  157. data/spec/models/update_recording_by_id_parameters_spec.rb +53 -0
  158. data/spec/models/update_vanity_number_by_id_parameters_spec.rb +77 -0
  159. data/spec/models/vanitynumber_spec.rb +101 -0
  160. data/spec/models/verify_caller_id_by_id_parameters_spec.rb +53 -0
  161. data/spec/spec_helper.rb +122 -0
  162. metadata +436 -0
@@ -0,0 +1,440 @@
1
+ =begin
2
+ #DialMyCalls API
3
+
4
+ #The DialMyCalls API
5
+
6
+ OpenAPI spec version: 2.0.1
7
+ Contact: support@dialmycalls.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module DialMyCalls
27
+ class CallerIdsApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Add Caller ID
35
+ # Add a caller ID. <br><br> Returns a caller ID object on success, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X POST -d \"{\\\"phone\\\": \\\"5555555555\\\", \\\"name\\\": \\\"New Number\\\"}\" https://$API_KEY@api.dialmycalls.com/2.0/callerid ```
36
+ # @param create_caller_id_parameters Request body
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Object]
39
+ def create_caller_id(create_caller_id_parameters, opts = {})
40
+ data, _status_code, _headers = create_caller_id_with_http_info(create_caller_id_parameters, opts)
41
+ return data
42
+ end
43
+
44
+ # Add Caller ID
45
+ # Add a caller ID. &lt;br&gt;&lt;br&gt; Returns a caller ID object on success, and returns an error otherwise. &lt;br&gt;&lt;br&gt; &#x60;&#x60;&#x60; curl -i -H \&quot;Content-Type: application/json\&quot; -X POST -d \&quot;{\\\&quot;phone\\\&quot;: \\\&quot;5555555555\\\&quot;, \\\&quot;name\\\&quot;: \\\&quot;New Number\\\&quot;}\&quot; https://$API_KEY@api.dialmycalls.com/2.0/callerid &#x60;&#x60;&#x60;
46
+ # @param create_caller_id_parameters Request body
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
49
+ def create_caller_id_with_http_info(create_caller_id_parameters, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: CallerIdsApi.create_caller_id ..."
52
+ end
53
+ # verify the required parameter 'create_caller_id_parameters' is set
54
+ fail ArgumentError, "Missing the required parameter 'create_caller_id_parameters' when calling CallerIdsApi.create_caller_id" if create_caller_id_parameters.nil?
55
+ # resource path
56
+ local_var_path = "/callerid".sub('{format}','json')
57
+
58
+ # query parameters
59
+ query_params = {}
60
+
61
+ # header parameters
62
+ header_params = {}
63
+
64
+ # HTTP header 'Accept' (if needed)
65
+ local_header_accept = ['application/json', 'application/xml']
66
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
67
+
68
+ # HTTP header 'Content-Type'
69
+ local_header_content_type = ['application/json', 'application/xml']
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = @api_client.object_to_http_body(create_caller_id_parameters)
77
+ auth_names = ['api_key']
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'Object')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: CallerIdsApi#create_caller_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ # Add Caller ID (Unverified)
92
+ # Initiate adding a new caller ID when you need to go through the verification process. You will receive a phone call at the phone number provided and will need to make a subsequent API call with the PIN code that you are provided. <br><br> Returns a caller ID object on success, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X POST -d \"{\\\"phone\\\": \\\"5555555555\\\", \\\"name\\\": \\\"New Number\\\"}\" https://$API_KEY@api.dialmycalls.com/2.0/verify/callerid ```
93
+ # @param create_unverified_caller_id_parameters Request body
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [Object]
96
+ def create_unverified_caller_id(create_unverified_caller_id_parameters, opts = {})
97
+ data, _status_code, _headers = create_unverified_caller_id_with_http_info(create_unverified_caller_id_parameters, opts)
98
+ return data
99
+ end
100
+
101
+ # Add Caller ID (Unverified)
102
+ # Initiate adding a new caller ID when you need to go through the verification process. You will receive a phone call at the phone number provided and will need to make a subsequent API call with the PIN code that you are provided. &lt;br&gt;&lt;br&gt; Returns a caller ID object on success, and returns an error otherwise. &lt;br&gt;&lt;br&gt; &#x60;&#x60;&#x60; curl -i -H \&quot;Content-Type: application/json\&quot; -X POST -d \&quot;{\\\&quot;phone\\\&quot;: \\\&quot;5555555555\\\&quot;, \\\&quot;name\\\&quot;: \\\&quot;New Number\\\&quot;}\&quot; https://$API_KEY@api.dialmycalls.com/2.0/verify/callerid &#x60;&#x60;&#x60;
103
+ # @param create_unverified_caller_id_parameters Request body
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
106
+ def create_unverified_caller_id_with_http_info(create_unverified_caller_id_parameters, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug "Calling API: CallerIdsApi.create_unverified_caller_id ..."
109
+ end
110
+ # verify the required parameter 'create_unverified_caller_id_parameters' is set
111
+ fail ArgumentError, "Missing the required parameter 'create_unverified_caller_id_parameters' when calling CallerIdsApi.create_unverified_caller_id" if create_unverified_caller_id_parameters.nil?
112
+ # resource path
113
+ local_var_path = "/verify/callerid".sub('{format}','json')
114
+
115
+ # query parameters
116
+ query_params = {}
117
+
118
+ # header parameters
119
+ header_params = {}
120
+
121
+ # HTTP header 'Accept' (if needed)
122
+ local_header_accept = ['application/json', 'application/xml']
123
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
124
+
125
+ # HTTP header 'Content-Type'
126
+ local_header_content_type = ['application/json', 'application/xml']
127
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
128
+
129
+ # form parameters
130
+ form_params = {}
131
+
132
+ # http body (model)
133
+ post_body = @api_client.object_to_http_body(create_unverified_caller_id_parameters)
134
+ auth_names = ['api_key']
135
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
136
+ :header_params => header_params,
137
+ :query_params => query_params,
138
+ :form_params => form_params,
139
+ :body => post_body,
140
+ :auth_names => auth_names,
141
+ :return_type => 'Object')
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: CallerIdsApi#create_unverified_caller_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Delete Caller ID
149
+ # Delete a caller ID. <br><br> Returns the following if a valid identifier was provided, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X DELETE https://$API_KEY@api.dialmycalls.com/2.0/callerid/$CALLERID_ID ```
150
+ # @param callerid_id CalleridId
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [Object]
153
+ def delete_caller_id_by_id(callerid_id, opts = {})
154
+ data, _status_code, _headers = delete_caller_id_by_id_with_http_info(callerid_id, opts)
155
+ return data
156
+ end
157
+
158
+ # Delete Caller ID
159
+ # Delete a caller ID. &lt;br&gt;&lt;br&gt; Returns the following if a valid identifier was provided, and returns an error otherwise. &lt;br&gt;&lt;br&gt; &#x60;&#x60;&#x60; curl -i -H \&quot;Content-Type: application/json\&quot; -X DELETE https://$API_KEY@api.dialmycalls.com/2.0/callerid/$CALLERID_ID &#x60;&#x60;&#x60;
160
+ # @param callerid_id CalleridId
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
163
+ def delete_caller_id_by_id_with_http_info(callerid_id, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "Calling API: CallerIdsApi.delete_caller_id_by_id ..."
166
+ end
167
+ # verify the required parameter 'callerid_id' is set
168
+ fail ArgumentError, "Missing the required parameter 'callerid_id' when calling CallerIdsApi.delete_caller_id_by_id" if callerid_id.nil?
169
+ # resource path
170
+ local_var_path = "/callerid/{CalleridId}".sub('{format}','json').sub('{' + 'CalleridId' + '}', callerid_id.to_s)
171
+
172
+ # query parameters
173
+ query_params = {}
174
+
175
+ # header parameters
176
+ header_params = {}
177
+
178
+ # HTTP header 'Accept' (if needed)
179
+ local_header_accept = ['application/json', 'application/xml']
180
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
181
+
182
+ # HTTP header 'Content-Type'
183
+ local_header_content_type = ['application/json', 'application/xml']
184
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
185
+
186
+ # form parameters
187
+ form_params = {}
188
+
189
+ # http body (model)
190
+ post_body = nil
191
+ auth_names = ['api_key']
192
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
193
+ :header_params => header_params,
194
+ :query_params => query_params,
195
+ :form_params => form_params,
196
+ :body => post_body,
197
+ :auth_names => auth_names,
198
+ :return_type => 'Object')
199
+ if @api_client.config.debugging
200
+ @api_client.config.logger.debug "API called: CallerIdsApi#delete_caller_id_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
201
+ end
202
+ return data, status_code, headers
203
+ end
204
+
205
+ # Get Caller ID
206
+ # Retrieve a caller ID. <br><br> Returns a caller ID object if a valid identifier was provided, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X GET https://$API_KEY@api.dialmycalls.com/2.0/callerid/$CALLERID_ID ```
207
+ # @param callerid_id CalleridId
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [Object]
210
+ def get_caller_id_by_id(callerid_id, opts = {})
211
+ data, _status_code, _headers = get_caller_id_by_id_with_http_info(callerid_id, opts)
212
+ return data
213
+ end
214
+
215
+ # Get Caller ID
216
+ # Retrieve a caller ID. &lt;br&gt;&lt;br&gt; Returns a caller ID object if a valid identifier was provided, and returns an error otherwise. &lt;br&gt;&lt;br&gt; &#x60;&#x60;&#x60; curl -i -H \&quot;Content-Type: application/json\&quot; -X GET https://$API_KEY@api.dialmycalls.com/2.0/callerid/$CALLERID_ID &#x60;&#x60;&#x60;
217
+ # @param callerid_id CalleridId
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
220
+ def get_caller_id_by_id_with_http_info(callerid_id, opts = {})
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "Calling API: CallerIdsApi.get_caller_id_by_id ..."
223
+ end
224
+ # verify the required parameter 'callerid_id' is set
225
+ fail ArgumentError, "Missing the required parameter 'callerid_id' when calling CallerIdsApi.get_caller_id_by_id" if callerid_id.nil?
226
+ # resource path
227
+ local_var_path = "/callerid/{CalleridId}".sub('{format}','json').sub('{' + 'CalleridId' + '}', callerid_id.to_s)
228
+
229
+ # query parameters
230
+ query_params = {}
231
+
232
+ # header parameters
233
+ header_params = {}
234
+
235
+ # HTTP header 'Accept' (if needed)
236
+ local_header_accept = ['application/json', 'application/xml']
237
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
238
+
239
+ # HTTP header 'Content-Type'
240
+ local_header_content_type = ['application/json', 'application/xml']
241
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
242
+
243
+ # form parameters
244
+ form_params = {}
245
+
246
+ # http body (model)
247
+ post_body = nil
248
+ auth_names = ['api_key']
249
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
250
+ :header_params => header_params,
251
+ :query_params => query_params,
252
+ :form_params => form_params,
253
+ :body => post_body,
254
+ :auth_names => auth_names,
255
+ :return_type => 'Object')
256
+ if @api_client.config.debugging
257
+ @api_client.config.logger.debug "API called: CallerIdsApi#get_caller_id_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
258
+ end
259
+ return data, status_code, headers
260
+ end
261
+
262
+ # List Caller IDs
263
+ # Retrieve a list of caller IDs. <br><br> Returns a list of caller ID objects. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X GET https://$API_KEY@api.dialmycalls.com/2.0/callerids ```
264
+ # @param [Hash] opts the optional parameters
265
+ # @option opts [String] :range Range (ie \&quot;records&#x3D;201-300\&quot;) of callerids requested
266
+ # @return [Object]
267
+ def get_caller_ids(opts = {})
268
+ data, _status_code, _headers = get_caller_ids_with_http_info(opts)
269
+ return data
270
+ end
271
+
272
+ # List Caller IDs
273
+ # Retrieve a list of caller IDs. &lt;br&gt;&lt;br&gt; Returns a list of caller ID objects. &lt;br&gt;&lt;br&gt; &#x60;&#x60;&#x60; curl -i -H \&quot;Content-Type: application/json\&quot; -X GET https://$API_KEY@api.dialmycalls.com/2.0/callerids &#x60;&#x60;&#x60;
274
+ # @param [Hash] opts the optional parameters
275
+ # @option opts [String] :range Range (ie \&quot;records&#x3D;201-300\&quot;) of callerids requested
276
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
277
+ def get_caller_ids_with_http_info(opts = {})
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug "Calling API: CallerIdsApi.get_caller_ids ..."
280
+ end
281
+ # resource path
282
+ local_var_path = "/callerids".sub('{format}','json')
283
+
284
+ # query parameters
285
+ query_params = {}
286
+
287
+ # header parameters
288
+ header_params = {}
289
+
290
+ # HTTP header 'Accept' (if needed)
291
+ local_header_accept = ['application/json', 'application/xml']
292
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
293
+
294
+ # HTTP header 'Content-Type'
295
+ local_header_content_type = ['application/json', 'application/xml']
296
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
297
+ header_params[:'Range'] = opts[:'range'] if !opts[:'range'].nil?
298
+
299
+ # form parameters
300
+ form_params = {}
301
+
302
+ # http body (model)
303
+ post_body = nil
304
+ auth_names = ['api_key']
305
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
306
+ :header_params => header_params,
307
+ :query_params => query_params,
308
+ :form_params => form_params,
309
+ :body => post_body,
310
+ :auth_names => auth_names,
311
+ :return_type => 'Object')
312
+ if @api_client.config.debugging
313
+ @api_client.config.logger.debug "API called: CallerIdsApi#get_caller_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
314
+ end
315
+ return data, status_code, headers
316
+ end
317
+
318
+ # Update Caller ID
319
+ # Update an existing caller ID. <br><br> Returns a caller ID object if a valid identifier was provided and input validation passed, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X PUT -d \"{\\\"name\\\": \\\"New Number Updated\\\"}\" https://$API_KEY@api.dialmycalls.com/2.0/callerid/$CALLERID_ID ```
320
+ # @param update_caller_id_by_id_parameters Request body
321
+ # @param callerid_id CalleridId
322
+ # @param [Hash] opts the optional parameters
323
+ # @return [Object]
324
+ def update_caller_id_by_id(update_caller_id_by_id_parameters, callerid_id, opts = {})
325
+ data, _status_code, _headers = update_caller_id_by_id_with_http_info(update_caller_id_by_id_parameters, callerid_id, opts)
326
+ return data
327
+ end
328
+
329
+ # Update Caller ID
330
+ # Update an existing caller ID. &lt;br&gt;&lt;br&gt; Returns a caller ID object if a valid identifier was provided and input validation passed, and returns an error otherwise. &lt;br&gt;&lt;br&gt; &#x60;&#x60;&#x60; curl -i -H \&quot;Content-Type: application/json\&quot; -X PUT -d \&quot;{\\\&quot;name\\\&quot;: \\\&quot;New Number Updated\\\&quot;}\&quot; https://$API_KEY@api.dialmycalls.com/2.0/callerid/$CALLERID_ID &#x60;&#x60;&#x60;
331
+ # @param update_caller_id_by_id_parameters Request body
332
+ # @param callerid_id CalleridId
333
+ # @param [Hash] opts the optional parameters
334
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
335
+ def update_caller_id_by_id_with_http_info(update_caller_id_by_id_parameters, callerid_id, opts = {})
336
+ if @api_client.config.debugging
337
+ @api_client.config.logger.debug "Calling API: CallerIdsApi.update_caller_id_by_id ..."
338
+ end
339
+ # verify the required parameter 'update_caller_id_by_id_parameters' is set
340
+ fail ArgumentError, "Missing the required parameter 'update_caller_id_by_id_parameters' when calling CallerIdsApi.update_caller_id_by_id" if update_caller_id_by_id_parameters.nil?
341
+ # verify the required parameter 'callerid_id' is set
342
+ fail ArgumentError, "Missing the required parameter 'callerid_id' when calling CallerIdsApi.update_caller_id_by_id" if callerid_id.nil?
343
+ # resource path
344
+ local_var_path = "/callerid/{CalleridId}".sub('{format}','json').sub('{' + 'CalleridId' + '}', callerid_id.to_s)
345
+
346
+ # query parameters
347
+ query_params = {}
348
+
349
+ # header parameters
350
+ header_params = {}
351
+
352
+ # HTTP header 'Accept' (if needed)
353
+ local_header_accept = ['application/json', 'application/xml']
354
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
355
+
356
+ # HTTP header 'Content-Type'
357
+ local_header_content_type = ['application/json', 'application/xml']
358
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
359
+
360
+ # form parameters
361
+ form_params = {}
362
+
363
+ # http body (model)
364
+ post_body = @api_client.object_to_http_body(update_caller_id_by_id_parameters)
365
+ auth_names = ['api_key']
366
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
367
+ :header_params => header_params,
368
+ :query_params => query_params,
369
+ :form_params => form_params,
370
+ :body => post_body,
371
+ :auth_names => auth_names,
372
+ :return_type => 'Object')
373
+ if @api_client.config.debugging
374
+ @api_client.config.logger.debug "API called: CallerIdsApi#update_caller_id_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
375
+ end
376
+ return data, status_code, headers
377
+ end
378
+
379
+ # Verify Caller ID
380
+ # Verify a new caller ID. <br><br> Returns a caller ID object if a valid identifier was provided, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X POST -d \"{\\\"phone\\\": \\\"5555555555\\\", \\\"name\\\": \\\"New Number\\\"}\" https://$API_KEY@api.dialmycalls.com/2.0/verify/callerid/$CALLERID_ID ```
381
+ # @param verify_caller_id_by_id_parameters Request body
382
+ # @param callerid_id CalleridId
383
+ # @param [Hash] opts the optional parameters
384
+ # @return [Object]
385
+ def verify_caller_id_by_id(verify_caller_id_by_id_parameters, callerid_id, opts = {})
386
+ data, _status_code, _headers = verify_caller_id_by_id_with_http_info(verify_caller_id_by_id_parameters, callerid_id, opts)
387
+ return data
388
+ end
389
+
390
+ # Verify Caller ID
391
+ # Verify a new caller ID. &lt;br&gt;&lt;br&gt; Returns a caller ID object if a valid identifier was provided, and returns an error otherwise. &lt;br&gt;&lt;br&gt; &#x60;&#x60;&#x60; curl -i -H \&quot;Content-Type: application/json\&quot; -X POST -d \&quot;{\\\&quot;phone\\\&quot;: \\\&quot;5555555555\\\&quot;, \\\&quot;name\\\&quot;: \\\&quot;New Number\\\&quot;}\&quot; https://$API_KEY@api.dialmycalls.com/2.0/verify/callerid/$CALLERID_ID &#x60;&#x60;&#x60;
392
+ # @param verify_caller_id_by_id_parameters Request body
393
+ # @param callerid_id CalleridId
394
+ # @param [Hash] opts the optional parameters
395
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
396
+ def verify_caller_id_by_id_with_http_info(verify_caller_id_by_id_parameters, callerid_id, opts = {})
397
+ if @api_client.config.debugging
398
+ @api_client.config.logger.debug "Calling API: CallerIdsApi.verify_caller_id_by_id ..."
399
+ end
400
+ # verify the required parameter 'verify_caller_id_by_id_parameters' is set
401
+ fail ArgumentError, "Missing the required parameter 'verify_caller_id_by_id_parameters' when calling CallerIdsApi.verify_caller_id_by_id" if verify_caller_id_by_id_parameters.nil?
402
+ # verify the required parameter 'callerid_id' is set
403
+ fail ArgumentError, "Missing the required parameter 'callerid_id' when calling CallerIdsApi.verify_caller_id_by_id" if callerid_id.nil?
404
+ # resource path
405
+ local_var_path = "/verify/callerid/{CalleridId}".sub('{format}','json').sub('{' + 'CalleridId' + '}', callerid_id.to_s)
406
+
407
+ # query parameters
408
+ query_params = {}
409
+
410
+ # header parameters
411
+ header_params = {}
412
+
413
+ # HTTP header 'Accept' (if needed)
414
+ local_header_accept = ['application/json', 'application/xml']
415
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
416
+
417
+ # HTTP header 'Content-Type'
418
+ local_header_content_type = ['application/json', 'application/xml']
419
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
420
+
421
+ # form parameters
422
+ form_params = {}
423
+
424
+ # http body (model)
425
+ post_body = @api_client.object_to_http_body(verify_caller_id_by_id_parameters)
426
+ auth_names = ['api_key']
427
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
428
+ :header_params => header_params,
429
+ :query_params => query_params,
430
+ :form_params => form_params,
431
+ :body => post_body,
432
+ :auth_names => auth_names,
433
+ :return_type => 'Object')
434
+ if @api_client.config.debugging
435
+ @api_client.config.logger.debug "API called: CallerIdsApi#verify_caller_id_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
436
+ end
437
+ return data, status_code, headers
438
+ end
439
+ end
440
+ end