dialmycalls_client 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/README.md +186 -0
- data/dialmycalls_client-1.0.0.gem +0 -0
- data/dialmycalls_client.gemspec +55 -0
- data/docs/Accessaccount.md +12 -0
- data/docs/Account.md +9 -0
- data/docs/AccountsApi.md +324 -0
- data/docs/CallRecipient.md +19 -0
- data/docs/CallerIdsApi.md +386 -0
- data/docs/Callerid.md +13 -0
- data/docs/CallsApi.md +278 -0
- data/docs/Callservice.md +17 -0
- data/docs/Contact.md +18 -0
- data/docs/ContactAttributes.md +11 -0
- data/docs/ContactsApi.md +330 -0
- data/docs/CreateAccessAccountParameters.md +10 -0
- data/docs/CreateCallParameters.md +18 -0
- data/docs/CreateCallerIdParameters.md +9 -0
- data/docs/CreateContactParameters.md +14 -0
- data/docs/CreateGroupParameters.md +8 -0
- data/docs/CreateRecordingByPhoneParameters.md +12 -0
- data/docs/CreateRecordingByUrlParameters.md +9 -0
- data/docs/CreateRecordingParameters.md +11 -0
- data/docs/CreateTextParameters.md +17 -0
- data/docs/CreateUnverifiedCallerIdParameters.md +9 -0
- data/docs/DoNotContactsApi.md +62 -0
- data/docs/Donotcontact.md +12 -0
- data/docs/Group.md +12 -0
- data/docs/GroupsApi.md +277 -0
- data/docs/Identifier.md +8 -0
- data/docs/Incomingtext.md +13 -0
- data/docs/Keyword.md +12 -0
- data/docs/KeywordsApi.md +168 -0
- data/docs/Polling.md +10 -0
- data/docs/PushToListenAgain.md +9 -0
- data/docs/PushToOptOut.md +9 -0
- data/docs/PushToRecord.md +9 -0
- data/docs/PushToTalk.md +12 -0
- data/docs/Recording.md +15 -0
- data/docs/RecordingsApi.md +383 -0
- data/docs/Service.md +16 -0
- data/docs/Shortcode.md +11 -0
- data/docs/TextRecipient.md +13 -0
- data/docs/TextsApi.md +492 -0
- data/docs/UpdateAccessAccountByIdParameters.md +10 -0
- data/docs/UpdateCallerIdByIdParameters.md +8 -0
- data/docs/UpdateContactByIdParameters.md +14 -0
- data/docs/UpdateGroupByIdParameters.md +8 -0
- data/docs/UpdateRecordingByIdParameters.md +8 -0
- data/docs/UpdateVanityNumberByIdParameters.md +12 -0
- data/docs/VanityNumbersApi.md +224 -0
- data/docs/Vanitynumber.md +16 -0
- data/docs/VerifyCallerIdByIdParameters.md +8 -0
- data/git_push.sh +67 -0
- data/lib/dialmycalls_client/api/accounts_api.rb +375 -0
- data/lib/dialmycalls_client/api/caller_ids_api.rb +440 -0
- data/lib/dialmycalls_client/api/calls_api.rb +321 -0
- data/lib/dialmycalls_client/api/contacts_api.rb +379 -0
- data/lib/dialmycalls_client/api/do_not_contacts_api.rb +90 -0
- data/lib/dialmycalls_client/api/groups_api.rb +322 -0
- data/lib/dialmycalls_client/api/keywords_api.rb +204 -0
- data/lib/dialmycalls_client/api/recordings_api.rb +436 -0
- data/lib/dialmycalls_client/api/texts_api.rb +547 -0
- data/lib/dialmycalls_client/api/vanity_numbers_api.rb +265 -0
- data/lib/dialmycalls_client/api_client.rb +379 -0
- data/lib/dialmycalls_client/api_error.rb +47 -0
- data/lib/dialmycalls_client/configuration.rb +214 -0
- data/lib/dialmycalls_client/models/accessaccount.rb +240 -0
- data/lib/dialmycalls_client/models/account.rb +210 -0
- data/lib/dialmycalls_client/models/call_recipient.rb +310 -0
- data/lib/dialmycalls_client/models/callerid.rb +250 -0
- data/lib/dialmycalls_client/models/callservice.rb +290 -0
- data/lib/dialmycalls_client/models/contact.rb +300 -0
- data/lib/dialmycalls_client/models/contact_attributes.rb +230 -0
- data/lib/dialmycalls_client/models/create_access_account_parameters.rb +220 -0
- data/lib/dialmycalls_client/models/create_call_parameters.rb +304 -0
- data/lib/dialmycalls_client/models/create_caller_id_parameters.rb +210 -0
- data/lib/dialmycalls_client/models/create_contact_parameters.rb +262 -0
- data/lib/dialmycalls_client/models/create_group_parameters.rb +200 -0
- data/lib/dialmycalls_client/models/create_recording_by_phone_parameters.rb +240 -0
- data/lib/dialmycalls_client/models/create_recording_by_url_parameters.rb +210 -0
- data/lib/dialmycalls_client/models/create_recording_parameters.rb +230 -0
- data/lib/dialmycalls_client/models/create_text_parameters.rb +294 -0
- data/lib/dialmycalls_client/models/create_unverified_caller_id_parameters.rb +210 -0
- data/lib/dialmycalls_client/models/donotcontact.rb +240 -0
- data/lib/dialmycalls_client/models/group.rb +240 -0
- data/lib/dialmycalls_client/models/identifier.rb +200 -0
- data/lib/dialmycalls_client/models/incomingtext.rb +250 -0
- data/lib/dialmycalls_client/models/keyword.rb +240 -0
- data/lib/dialmycalls_client/models/polling.rb +220 -0
- data/lib/dialmycalls_client/models/push_to_listen_again.rb +210 -0
- data/lib/dialmycalls_client/models/push_to_opt_out.rb +210 -0
- data/lib/dialmycalls_client/models/push_to_record.rb +210 -0
- data/lib/dialmycalls_client/models/push_to_talk.rb +240 -0
- data/lib/dialmycalls_client/models/recording.rb +270 -0
- data/lib/dialmycalls_client/models/service.rb +280 -0
- data/lib/dialmycalls_client/models/shortcode.rb +230 -0
- data/lib/dialmycalls_client/models/text_recipient.rb +250 -0
- data/lib/dialmycalls_client/models/update_access_account_by_id_parameters.rb +220 -0
- data/lib/dialmycalls_client/models/update_caller_id_by_id_parameters.rb +200 -0
- data/lib/dialmycalls_client/models/update_contact_by_id_parameters.rb +262 -0
- data/lib/dialmycalls_client/models/update_group_by_id_parameters.rb +200 -0
- data/lib/dialmycalls_client/models/update_recording_by_id_parameters.rb +200 -0
- data/lib/dialmycalls_client/models/update_vanity_number_by_id_parameters.rb +242 -0
- data/lib/dialmycalls_client/models/vanitynumber.rb +280 -0
- data/lib/dialmycalls_client/models/verify_caller_id_by_id_parameters.rb +200 -0
- data/lib/dialmycalls_client/version.rb +26 -0
- data/lib/dialmycalls_client.rb +99 -0
- data/spec/api/accounts_api_spec.rb +118 -0
- data/spec/api/caller_ids_api_spec.rb +132 -0
- data/spec/api/calls_api_spec.rb +107 -0
- data/spec/api/contacts_api_spec.rb +119 -0
- data/spec/api/do_not_contacts_api_spec.rb +58 -0
- data/spec/api/groups_api_spec.rb +107 -0
- data/spec/api/keywords_api_spec.rb +82 -0
- data/spec/api/recordings_api_spec.rb +131 -0
- data/spec/api/texts_api_spec.rb +155 -0
- data/spec/api/vanity_numbers_api_spec.rb +95 -0
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +53 -0
- data/spec/models/accessaccount_spec.rb +77 -0
- data/spec/models/account_spec.rb +59 -0
- data/spec/models/call_recipient_spec.rb +119 -0
- data/spec/models/callerid_spec.rb +83 -0
- data/spec/models/callservice_spec.rb +107 -0
- data/spec/models/contact_attributes_spec.rb +71 -0
- data/spec/models/contact_spec.rb +113 -0
- data/spec/models/create_access_account_parameters_spec.rb +65 -0
- data/spec/models/create_call_parameters_spec.rb +113 -0
- data/spec/models/create_caller_id_parameters_spec.rb +59 -0
- data/spec/models/create_contact_parameters_spec.rb +89 -0
- data/spec/models/create_group_parameters_spec.rb +53 -0
- data/spec/models/create_recording_by_phone_parameters_spec.rb +77 -0
- data/spec/models/create_recording_by_url_parameters_spec.rb +59 -0
- data/spec/models/create_recording_parameters_spec.rb +71 -0
- data/spec/models/create_text_parameters_spec.rb +107 -0
- data/spec/models/create_unverified_caller_id_parameters_spec.rb +59 -0
- data/spec/models/donotcontact_spec.rb +77 -0
- data/spec/models/group_spec.rb +77 -0
- data/spec/models/identifier_spec.rb +53 -0
- data/spec/models/incomingtext_spec.rb +83 -0
- data/spec/models/keyword_spec.rb +77 -0
- data/spec/models/polling_spec.rb +65 -0
- data/spec/models/push_to_listen_again_spec.rb +59 -0
- data/spec/models/push_to_opt_out_spec.rb +59 -0
- data/spec/models/push_to_record_spec.rb +59 -0
- data/spec/models/push_to_talk_spec.rb +77 -0
- data/spec/models/recording_spec.rb +95 -0
- data/spec/models/service_spec.rb +101 -0
- data/spec/models/shortcode_spec.rb +71 -0
- data/spec/models/text_recipient_spec.rb +83 -0
- data/spec/models/update_access_account_by_id_parameters_spec.rb +65 -0
- data/spec/models/update_caller_id_by_id_parameters_spec.rb +53 -0
- data/spec/models/update_contact_by_id_parameters_spec.rb +89 -0
- data/spec/models/update_group_by_id_parameters_spec.rb +53 -0
- data/spec/models/update_recording_by_id_parameters_spec.rb +53 -0
- data/spec/models/update_vanity_number_by_id_parameters_spec.rb +77 -0
- data/spec/models/vanitynumber_spec.rb +101 -0
- data/spec/models/verify_caller_id_by_id_parameters_spec.rb +53 -0
- data/spec/spec_helper.rb +122 -0
- metadata +436 -0
@@ -0,0 +1,322 @@
|
|
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 GroupsApi
|
28
|
+
attr_accessor :api_client
|
29
|
+
|
30
|
+
def initialize(api_client = ApiClient.default)
|
31
|
+
@api_client = api_client
|
32
|
+
end
|
33
|
+
|
34
|
+
# Add Group
|
35
|
+
# Add a contact group. <br><br> Returns a group object on success, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X POST -d \"{\\\"name\\\": \\\"Test Group\\\"}\" https://$API_KEY@api.dialmycalls.com/2.0/group ```
|
36
|
+
# @param create_group_parameters Request body
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Object]
|
39
|
+
def create_group(create_group_parameters, opts = {})
|
40
|
+
data, _status_code, _headers = create_group_with_http_info(create_group_parameters, opts)
|
41
|
+
return data
|
42
|
+
end
|
43
|
+
|
44
|
+
# Add Group
|
45
|
+
# Add a contact group. <br><br> Returns a group object on success, and returns an error otherwise. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X POST -d \"{\\\"name\\\": \\\"Test Group\\\"}\" https://$API_KEY@api.dialmycalls.com/2.0/group ```
|
46
|
+
# @param create_group_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_group_with_http_info(create_group_parameters, opts = {})
|
50
|
+
if @api_client.config.debugging
|
51
|
+
@api_client.config.logger.debug "Calling API: GroupsApi.create_group ..."
|
52
|
+
end
|
53
|
+
# verify the required parameter 'create_group_parameters' is set
|
54
|
+
fail ArgumentError, "Missing the required parameter 'create_group_parameters' when calling GroupsApi.create_group" if create_group_parameters.nil?
|
55
|
+
# resource path
|
56
|
+
local_var_path = "/group".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_group_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: GroupsApi#create_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
87
|
+
end
|
88
|
+
return data, status_code, headers
|
89
|
+
end
|
90
|
+
|
91
|
+
# Delete Group
|
92
|
+
# Delete a contact group. <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/group/$GROUP_ID ```
|
93
|
+
# @param group_id GroupId
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @return [Object]
|
96
|
+
def delete_group_by_id(group_id, opts = {})
|
97
|
+
data, _status_code, _headers = delete_group_by_id_with_http_info(group_id, opts)
|
98
|
+
return data
|
99
|
+
end
|
100
|
+
|
101
|
+
# Delete Group
|
102
|
+
# Delete a contact group. <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/group/$GROUP_ID ```
|
103
|
+
# @param group_id GroupId
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
106
|
+
def delete_group_by_id_with_http_info(group_id, opts = {})
|
107
|
+
if @api_client.config.debugging
|
108
|
+
@api_client.config.logger.debug "Calling API: GroupsApi.delete_group_by_id ..."
|
109
|
+
end
|
110
|
+
# verify the required parameter 'group_id' is set
|
111
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.delete_group_by_id" if group_id.nil?
|
112
|
+
# resource path
|
113
|
+
local_var_path = "/group/{GroupId}".sub('{format}','json').sub('{' + 'GroupId' + '}', group_id.to_s)
|
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 = nil
|
134
|
+
auth_names = ['api_key']
|
135
|
+
data, status_code, headers = @api_client.call_api(:DELETE, 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: GroupsApi#delete_group_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# Get Group
|
149
|
+
# Retrieve a contact group. <br><br> Returns a group 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/group/$GROUP_ID ```
|
150
|
+
# @param group_id GroupId
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @return [Object]
|
153
|
+
def get_group_by_id(group_id, opts = {})
|
154
|
+
data, _status_code, _headers = get_group_by_id_with_http_info(group_id, opts)
|
155
|
+
return data
|
156
|
+
end
|
157
|
+
|
158
|
+
# Get Group
|
159
|
+
# Retrieve a contact group. <br><br> Returns a group 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/group/$GROUP_ID ```
|
160
|
+
# @param group_id GroupId
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
163
|
+
def get_group_by_id_with_http_info(group_id, opts = {})
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug "Calling API: GroupsApi.get_group_by_id ..."
|
166
|
+
end
|
167
|
+
# verify the required parameter 'group_id' is set
|
168
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group_by_id" if group_id.nil?
|
169
|
+
# resource path
|
170
|
+
local_var_path = "/group/{GroupId}".sub('{format}','json').sub('{' + 'GroupId' + '}', group_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(:GET, 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: GroupsApi#get_group_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
201
|
+
end
|
202
|
+
return data, status_code, headers
|
203
|
+
end
|
204
|
+
|
205
|
+
# List Groups
|
206
|
+
# Retrieve a list of contact groups. <br><br> Returns a list of group objects. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X GET https://$API_KEY@api.dialmycalls.com/2.0/groups ```
|
207
|
+
# @param [Hash] opts the optional parameters
|
208
|
+
# @option opts [String] :range Range (ie \"records=201-300\") of groups requested
|
209
|
+
# @return [Object]
|
210
|
+
def get_groups(opts = {})
|
211
|
+
data, _status_code, _headers = get_groups_with_http_info(opts)
|
212
|
+
return data
|
213
|
+
end
|
214
|
+
|
215
|
+
# List Groups
|
216
|
+
# Retrieve a list of contact groups. <br><br> Returns a list of group objects. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X GET https://$API_KEY@api.dialmycalls.com/2.0/groups ```
|
217
|
+
# @param [Hash] opts the optional parameters
|
218
|
+
# @option opts [String] :range Range (ie \"records=201-300\") of groups requested
|
219
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
220
|
+
def get_groups_with_http_info(opts = {})
|
221
|
+
if @api_client.config.debugging
|
222
|
+
@api_client.config.logger.debug "Calling API: GroupsApi.get_groups ..."
|
223
|
+
end
|
224
|
+
# resource path
|
225
|
+
local_var_path = "/groups".sub('{format}','json')
|
226
|
+
|
227
|
+
# query parameters
|
228
|
+
query_params = {}
|
229
|
+
|
230
|
+
# header parameters
|
231
|
+
header_params = {}
|
232
|
+
|
233
|
+
# HTTP header 'Accept' (if needed)
|
234
|
+
local_header_accept = ['application/json', 'application/xml']
|
235
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
236
|
+
|
237
|
+
# HTTP header 'Content-Type'
|
238
|
+
local_header_content_type = ['application/json', 'application/xml']
|
239
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
240
|
+
header_params[:'Range'] = opts[:'range'] if !opts[:'range'].nil?
|
241
|
+
|
242
|
+
# form parameters
|
243
|
+
form_params = {}
|
244
|
+
|
245
|
+
# http body (model)
|
246
|
+
post_body = nil
|
247
|
+
auth_names = ['api_key']
|
248
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
249
|
+
:header_params => header_params,
|
250
|
+
:query_params => query_params,
|
251
|
+
:form_params => form_params,
|
252
|
+
:body => post_body,
|
253
|
+
:auth_names => auth_names,
|
254
|
+
:return_type => 'Object')
|
255
|
+
if @api_client.config.debugging
|
256
|
+
@api_client.config.logger.debug "API called: GroupsApi#get_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
257
|
+
end
|
258
|
+
return data, status_code, headers
|
259
|
+
end
|
260
|
+
|
261
|
+
# Update Group
|
262
|
+
# Update an existing contact group. <br><br> Returns a group 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\\\": \\\"Test Group Updated\\\"}\" https://$API_KEY@api.dialmycalls.com/2.0/group/$GROUP_ID ```
|
263
|
+
# @param update_group_by_id_parameters Request body
|
264
|
+
# @param group_id GroupId
|
265
|
+
# @param [Hash] opts the optional parameters
|
266
|
+
# @return [Object]
|
267
|
+
def update_group_by_id(update_group_by_id_parameters, group_id, opts = {})
|
268
|
+
data, _status_code, _headers = update_group_by_id_with_http_info(update_group_by_id_parameters, group_id, opts)
|
269
|
+
return data
|
270
|
+
end
|
271
|
+
|
272
|
+
# Update Group
|
273
|
+
# Update an existing contact group. <br><br> Returns a group 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\\\": \\\"Test Group Updated\\\"}\" https://$API_KEY@api.dialmycalls.com/2.0/group/$GROUP_ID ```
|
274
|
+
# @param update_group_by_id_parameters Request body
|
275
|
+
# @param group_id GroupId
|
276
|
+
# @param [Hash] opts the optional parameters
|
277
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
278
|
+
def update_group_by_id_with_http_info(update_group_by_id_parameters, group_id, opts = {})
|
279
|
+
if @api_client.config.debugging
|
280
|
+
@api_client.config.logger.debug "Calling API: GroupsApi.update_group_by_id ..."
|
281
|
+
end
|
282
|
+
# verify the required parameter 'update_group_by_id_parameters' is set
|
283
|
+
fail ArgumentError, "Missing the required parameter 'update_group_by_id_parameters' when calling GroupsApi.update_group_by_id" if update_group_by_id_parameters.nil?
|
284
|
+
# verify the required parameter 'group_id' is set
|
285
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.update_group_by_id" if group_id.nil?
|
286
|
+
# resource path
|
287
|
+
local_var_path = "/group/{GroupId}".sub('{format}','json').sub('{' + 'GroupId' + '}', group_id.to_s)
|
288
|
+
|
289
|
+
# query parameters
|
290
|
+
query_params = {}
|
291
|
+
|
292
|
+
# header parameters
|
293
|
+
header_params = {}
|
294
|
+
|
295
|
+
# HTTP header 'Accept' (if needed)
|
296
|
+
local_header_accept = ['application/json', 'application/xml']
|
297
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
298
|
+
|
299
|
+
# HTTP header 'Content-Type'
|
300
|
+
local_header_content_type = ['application/json', 'application/xml']
|
301
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
302
|
+
|
303
|
+
# form parameters
|
304
|
+
form_params = {}
|
305
|
+
|
306
|
+
# http body (model)
|
307
|
+
post_body = @api_client.object_to_http_body(update_group_by_id_parameters)
|
308
|
+
auth_names = ['api_key']
|
309
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
310
|
+
:header_params => header_params,
|
311
|
+
:query_params => query_params,
|
312
|
+
:form_params => form_params,
|
313
|
+
:body => post_body,
|
314
|
+
:auth_names => auth_names,
|
315
|
+
:return_type => 'Object')
|
316
|
+
if @api_client.config.debugging
|
317
|
+
@api_client.config.logger.debug "API called: GroupsApi#update_group_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
318
|
+
end
|
319
|
+
return data, status_code, headers
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|
@@ -0,0 +1,204 @@
|
|
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 KeywordsApi
|
28
|
+
attr_accessor :api_client
|
29
|
+
|
30
|
+
def initialize(api_client = ApiClient.default)
|
31
|
+
@api_client = api_client
|
32
|
+
end
|
33
|
+
|
34
|
+
# Delete Keyword
|
35
|
+
# Delete a keyword. <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/keyword/$KEYWORD_ID ```
|
36
|
+
# @param keyword_id KeywordId
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Object]
|
39
|
+
def delete_keyword_by_id(keyword_id, opts = {})
|
40
|
+
data, _status_code, _headers = delete_keyword_by_id_with_http_info(keyword_id, opts)
|
41
|
+
return data
|
42
|
+
end
|
43
|
+
|
44
|
+
# Delete Keyword
|
45
|
+
# Delete a keyword. <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/keyword/$KEYWORD_ID ```
|
46
|
+
# @param keyword_id KeywordId
|
47
|
+
# @param [Hash] opts the optional parameters
|
48
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
49
|
+
def delete_keyword_by_id_with_http_info(keyword_id, opts = {})
|
50
|
+
if @api_client.config.debugging
|
51
|
+
@api_client.config.logger.debug "Calling API: KeywordsApi.delete_keyword_by_id ..."
|
52
|
+
end
|
53
|
+
# verify the required parameter 'keyword_id' is set
|
54
|
+
fail ArgumentError, "Missing the required parameter 'keyword_id' when calling KeywordsApi.delete_keyword_by_id" if keyword_id.nil?
|
55
|
+
# resource path
|
56
|
+
local_var_path = "/keyword/{KeywordId}".sub('{format}','json').sub('{' + 'KeywordId' + '}', keyword_id.to_s)
|
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 = nil
|
77
|
+
auth_names = ['api_key']
|
78
|
+
data, status_code, headers = @api_client.call_api(:DELETE, 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: KeywordsApi#delete_keyword_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
87
|
+
end
|
88
|
+
return data, status_code, headers
|
89
|
+
end
|
90
|
+
|
91
|
+
# Get Keyword
|
92
|
+
# Retrieve a keyword. <br><br> Returns a keyword 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/keyword/$KEYWORD_ID ```
|
93
|
+
# @param keyword_id KeywordId
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @return [Object]
|
96
|
+
def get_keyword_by_id(keyword_id, opts = {})
|
97
|
+
data, _status_code, _headers = get_keyword_by_id_with_http_info(keyword_id, opts)
|
98
|
+
return data
|
99
|
+
end
|
100
|
+
|
101
|
+
# Get Keyword
|
102
|
+
# Retrieve a keyword. <br><br> Returns a keyword 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/keyword/$KEYWORD_ID ```
|
103
|
+
# @param keyword_id KeywordId
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
106
|
+
def get_keyword_by_id_with_http_info(keyword_id, opts = {})
|
107
|
+
if @api_client.config.debugging
|
108
|
+
@api_client.config.logger.debug "Calling API: KeywordsApi.get_keyword_by_id ..."
|
109
|
+
end
|
110
|
+
# verify the required parameter 'keyword_id' is set
|
111
|
+
fail ArgumentError, "Missing the required parameter 'keyword_id' when calling KeywordsApi.get_keyword_by_id" if keyword_id.nil?
|
112
|
+
# resource path
|
113
|
+
local_var_path = "/keyword/{KeywordId}".sub('{format}','json').sub('{' + 'KeywordId' + '}', keyword_id.to_s)
|
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 = nil
|
134
|
+
auth_names = ['api_key']
|
135
|
+
data, status_code, headers = @api_client.call_api(:GET, 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: KeywordsApi#get_keyword_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# List Keywords
|
149
|
+
# Retrieve a list of keywords. <br><br> Returns a list of keyword objects. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X GET https://$API_KEY@api.dialmycalls.com/2.0/keywords ```
|
150
|
+
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [String] :range Range (ie \"records=201-300\") of keywords requested
|
152
|
+
# @return [Object]
|
153
|
+
def get_keywords(opts = {})
|
154
|
+
data, _status_code, _headers = get_keywords_with_http_info(opts)
|
155
|
+
return data
|
156
|
+
end
|
157
|
+
|
158
|
+
# List Keywords
|
159
|
+
# Retrieve a list of keywords. <br><br> Returns a list of keyword objects. <br><br> ``` curl -i -H \"Content-Type: application/json\" -X GET https://$API_KEY@api.dialmycalls.com/2.0/keywords ```
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @option opts [String] :range Range (ie \"records=201-300\") of keywords requested
|
162
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
163
|
+
def get_keywords_with_http_info(opts = {})
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug "Calling API: KeywordsApi.get_keywords ..."
|
166
|
+
end
|
167
|
+
# resource path
|
168
|
+
local_var_path = "/keywords".sub('{format}','json')
|
169
|
+
|
170
|
+
# query parameters
|
171
|
+
query_params = {}
|
172
|
+
|
173
|
+
# header parameters
|
174
|
+
header_params = {}
|
175
|
+
|
176
|
+
# HTTP header 'Accept' (if needed)
|
177
|
+
local_header_accept = ['application/json', 'application/xml']
|
178
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
179
|
+
|
180
|
+
# HTTP header 'Content-Type'
|
181
|
+
local_header_content_type = ['application/json', 'application/xml']
|
182
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
183
|
+
header_params[:'Range'] = opts[:'range'] if !opts[:'range'].nil?
|
184
|
+
|
185
|
+
# form parameters
|
186
|
+
form_params = {}
|
187
|
+
|
188
|
+
# http body (model)
|
189
|
+
post_body = nil
|
190
|
+
auth_names = ['api_key']
|
191
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
192
|
+
:header_params => header_params,
|
193
|
+
:query_params => query_params,
|
194
|
+
:form_params => form_params,
|
195
|
+
:body => post_body,
|
196
|
+
:auth_names => auth_names,
|
197
|
+
:return_type => 'Object')
|
198
|
+
if @api_client.config.debugging
|
199
|
+
@api_client.config.logger.debug "API called: KeywordsApi#get_keywords\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
200
|
+
end
|
201
|
+
return data, status_code, headers
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|