Class: SibApiV3Sdk::ResellerApi
- Inherits:
-
Object
- Object
- SibApiV3Sdk::ResellerApi
- Defined in:
- lib/sib-api-v3-sdk/api/reseller_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_credits(child_id, add_credits, opts = {}) ⇒ RemainingCreditModel
Add Email and/or SMS credits to a specific child account.
-
#add_credits_with_http_info(child_id, add_credits, opts = {}) ⇒ Array<(RemainingCreditModel, Fixnum, Hash)>
Add Email and/or SMS credits to a specific child account.
-
#associate_ip_to_child(child_id, ip_id, opts = {}) ⇒ nil
Associate a dedicated IP to the child.
-
#associate_ip_to_child_with_http_info(child_id, ip_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Associate a dedicated IP to the child.
-
#create_reseller_child(opts = {}) ⇒ CreateModel
Creates a reseller child.
-
#create_reseller_child_with_http_info(opts = {}) ⇒ Array<(CreateModel, Fixnum, Hash)>
Creates a reseller child.
-
#delete_reseller_child(child_id, opts = {}) ⇒ nil
Deletes a single reseller child based on the childId supplied.
-
#delete_reseller_child_with_http_info(child_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Deletes a single reseller child based on the childId supplied.
-
#dissociate_ip_from_child(child_id, ip_id, opts = {}) ⇒ nil
Dissociate a dedicated IP to the child.
-
#dissociate_ip_from_child_with_http_info(child_id, ip_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Dissociate a dedicated IP to the child.
-
#get_child_info(child_id, opts = {}) ⇒ GetChildInfo
Gets the info about a specific child account.
-
#get_child_info_with_http_info(child_id, opts = {}) ⇒ Array<(GetChildInfo, Fixnum, Hash)>
Gets the info about a specific child account.
-
#get_reseller_childs(opts = {}) ⇒ GetChildrenList
Gets the list of all reseller’s children accounts.
-
#get_reseller_childs_with_http_info(opts = {}) ⇒ Array<(GetChildrenList, Fixnum, Hash)>
Gets the list of all reseller's children accounts.
-
#initialize(api_client = ApiClient.default) ⇒ ResellerApi
constructor
A new instance of ResellerApi.
-
#remove_credits(child_id, remove_credits, opts = {}) ⇒ RemainingCreditModel
Remove Email and/or SMS credits from a specific child account.
-
#remove_credits_with_http_info(child_id, remove_credits, opts = {}) ⇒ Array<(RemainingCreditModel, Fixnum, Hash)>
Remove Email and/or SMS credits from a specific child account.
-
#update_reseller_child(child_id, reseller_child, opts = {}) ⇒ nil
Updates infos of reseller’s child based on the childId supplied.
-
#update_reseller_child_with_http_info(child_id, reseller_child, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Updates infos of reseller's child based on the childId supplied.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ResellerApi
Returns a new instance of ResellerApi.
19 20 21 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_credits(child_id, add_credits, opts = {}) ⇒ RemainingCreditModel
Add Email and/or SMS credits to a specific child account
29 30 31 32 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 29 def add_credits(child_id, add_credits, opts = {}) data, _status_code, _headers = add_credits_with_http_info(child_id, add_credits, opts) return data end |
#add_credits_with_http_info(child_id, add_credits, opts = {}) ⇒ Array<(RemainingCreditModel, Fixnum, Hash)>
Add Email and/or SMS credits to a specific child account
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 40 def add_credits_with_http_info(child_id, add_credits, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.add_credits ..." end # verify the required parameter 'child_id' is set if @api_client.config.client_side_validation && child_id.nil? fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.add_credits" end # verify the required parameter 'add_credits' is set if @api_client.config.client_side_validation && add_credits.nil? fail ArgumentError, "Missing the required parameter 'add_credits' when calling ResellerApi.add_credits" end # resource path local_var_path = "/reseller/children/{childId}/credits/add".sub('{' + 'childId' + '}', child_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(add_credits) auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RemainingCreditModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResellerApi#add_credits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#associate_ip_to_child(child_id, ip_id, opts = {}) ⇒ nil
Associate a dedicated IP to the child
90 91 92 93 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 90 def associate_ip_to_child(child_id, ip_id, opts = {}) associate_ip_to_child_with_http_info(child_id, ip_id, opts) return nil end |
#associate_ip_to_child_with_http_info(child_id, ip_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Associate a dedicated IP to the child
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 101 def associate_ip_to_child_with_http_info(child_id, ip_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.associate_ip_to_child ..." end # verify the required parameter 'child_id' is set if @api_client.config.client_side_validation && child_id.nil? fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.associate_ip_to_child" end # verify the required parameter 'ip_id' is set if @api_client.config.client_side_validation && ip_id.nil? fail ArgumentError, "Missing the required parameter 'ip_id' when calling ResellerApi.associate_ip_to_child" end # resource path local_var_path = "/reseller/children/{childId}/ips/associate".sub('{' + 'childId' + '}', child_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(ip_id) auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ResellerApi#associate_ip_to_child\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_reseller_child(opts = {}) ⇒ CreateModel
Creates a reseller child
149 150 151 152 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 149 def create_reseller_child(opts = {}) data, _status_code, _headers = create_reseller_child_with_http_info(opts) return data end |
#create_reseller_child_with_http_info(opts = {}) ⇒ Array<(CreateModel, Fixnum, Hash)>
Creates a reseller child
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 159 def create_reseller_child_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.create_reseller_child ..." end # resource path local_var_path = "/reseller/children" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'reseller_child']) auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CreateModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResellerApi#create_reseller_child\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_reseller_child(child_id, opts = {}) ⇒ nil
Deletes a single reseller child based on the childId supplied
200 201 202 203 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 200 def delete_reseller_child(child_id, opts = {}) delete_reseller_child_with_http_info(child_id, opts) return nil end |
#delete_reseller_child_with_http_info(child_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Deletes a single reseller child based on the childId supplied
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 210 def delete_reseller_child_with_http_info(child_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.delete_reseller_child ..." end # verify the required parameter 'child_id' is set if @api_client.config.client_side_validation && child_id.nil? fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.delete_reseller_child" end # resource path local_var_path = "/reseller/children/{childId}".sub('{' + 'childId' + '}', child_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ResellerApi#delete_reseller_child\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#dissociate_ip_from_child(child_id, ip_id, opts = {}) ⇒ nil
Dissociate a dedicated IP to the child
255 256 257 258 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 255 def dissociate_ip_from_child(child_id, ip_id, opts = {}) dissociate_ip_from_child_with_http_info(child_id, ip_id, opts) return nil end |
#dissociate_ip_from_child_with_http_info(child_id, ip_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Dissociate a dedicated IP to the child
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 266 def dissociate_ip_from_child_with_http_info(child_id, ip_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.dissociate_ip_from_child ..." end # verify the required parameter 'child_id' is set if @api_client.config.client_side_validation && child_id.nil? fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.dissociate_ip_from_child" end # verify the required parameter 'ip_id' is set if @api_client.config.client_side_validation && ip_id.nil? fail ArgumentError, "Missing the required parameter 'ip_id' when calling ResellerApi.dissociate_ip_from_child" end # resource path local_var_path = "/reseller/children/{childId}/ips/dissociate".sub('{' + 'childId' + '}', child_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(ip_id) auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ResellerApi#dissociate_ip_from_child\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_child_info(child_id, opts = {}) ⇒ GetChildInfo
Gets the info about a specific child account
314 315 316 317 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 314 def get_child_info(child_id, opts = {}) data, _status_code, _headers = get_child_info_with_http_info(child_id, opts) return data end |
#get_child_info_with_http_info(child_id, opts = {}) ⇒ Array<(GetChildInfo, Fixnum, Hash)>
Gets the info about a specific child account
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 324 def get_child_info_with_http_info(child_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.get_child_info ..." end # verify the required parameter 'child_id' is set if @api_client.config.client_side_validation && child_id.nil? fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.get_child_info" end # resource path local_var_path = "/reseller/children/{childId}".sub('{' + 'childId' + '}', child_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetChildInfo') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResellerApi#get_child_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_reseller_childs(opts = {}) ⇒ GetChildrenList
Gets the list of all reseller’s children accounts
368 369 370 371 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 368 def get_reseller_childs(opts = {}) data, _status_code, _headers = get_reseller_childs_with_http_info(opts) return data end |
#get_reseller_childs_with_http_info(opts = {}) ⇒ Array<(GetChildrenList, Fixnum, Hash)>
Gets the list of all reseller's children accounts
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 377 def get_reseller_childs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.get_reseller_childs ..." end # resource path local_var_path = "/reseller/children" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetChildrenList') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResellerApi#get_reseller_childs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#remove_credits(child_id, remove_credits, opts = {}) ⇒ RemainingCreditModel
Remove Email and/or SMS credits from a specific child account
419 420 421 422 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 419 def remove_credits(child_id, remove_credits, opts = {}) data, _status_code, _headers = remove_credits_with_http_info(child_id, remove_credits, opts) return data end |
#remove_credits_with_http_info(child_id, remove_credits, opts = {}) ⇒ Array<(RemainingCreditModel, Fixnum, Hash)>
Remove Email and/or SMS credits from a specific child account
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 430 def remove_credits_with_http_info(child_id, remove_credits, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.remove_credits ..." end # verify the required parameter 'child_id' is set if @api_client.config.client_side_validation && child_id.nil? fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.remove_credits" end # verify the required parameter 'remove_credits' is set if @api_client.config.client_side_validation && remove_credits.nil? fail ArgumentError, "Missing the required parameter 'remove_credits' when calling ResellerApi.remove_credits" end # resource path local_var_path = "/reseller/children/{childId}/credits/remove".sub('{' + 'childId' + '}', child_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(remove_credits) auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RemainingCreditModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: ResellerApi#remove_credits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_reseller_child(child_id, reseller_child, opts = {}) ⇒ nil
Updates infos of reseller’s child based on the childId supplied
480 481 482 483 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 480 def update_reseller_child(child_id, reseller_child, opts = {}) update_reseller_child_with_http_info(child_id, reseller_child, opts) return nil end |
#update_reseller_child_with_http_info(child_id, reseller_child, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Updates infos of reseller's child based on the childId supplied
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 |
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 491 def update_reseller_child_with_http_info(child_id, reseller_child, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ResellerApi.update_reseller_child ..." end # verify the required parameter 'child_id' is set if @api_client.config.client_side_validation && child_id.nil? fail ArgumentError, "Missing the required parameter 'child_id' when calling ResellerApi.update_reseller_child" end # verify the required parameter 'reseller_child' is set if @api_client.config.client_side_validation && reseller_child.nil? fail ArgumentError, "Missing the required parameter 'reseller_child' when calling ResellerApi.update_reseller_child" end # resource path local_var_path = "/reseller/children/{childId}".sub('{' + 'childId' + '}', child_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(reseller_child) auth_names = ['api-key'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ResellerApi#update_reseller_child\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |