Class: SibApiV3Sdk::ResellerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/sib-api-v3-sdk/api/reseller_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_clientObject

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_identifier, add_credits, opts = {}) ⇒ RemainingCreditModel

Add Email and/or SMS credits to a specific child account

Parameters:

  • child_identifier

    Either auth key or id of reseller's child

  • add_credits

    Values to post to add credit to a specific child account

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 27

def add_credits(child_identifier, add_credits, opts = {})
  data, _status_code, _headers = add_credits_with_http_info(child_identifier, add_credits, opts)
  data
end

#add_credits_with_http_info(child_identifier, add_credits, opts = {}) ⇒ Array<(RemainingCreditModel, Fixnum, Hash)>

Add Email and/or SMS credits to a specific child account

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • add_credits

    Values to post to add credit to a specific child account

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RemainingCreditModel, Fixnum, Hash)>)

    RemainingCreditModel data, response status code and response headers



37
38
39
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
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 37

def add_credits_with_http_info(child_identifier, add_credits, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.add_credits ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' 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/{childIdentifier}/credits/add'.sub('{' + 'childIdentifier' + '}', child_identifier.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', 'partner-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_identifier, ip, opts = {}) ⇒ nil

Associate a dedicated IP to the child

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • ip

    IP to associate

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


85
86
87
88
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 85

def associate_ip_to_child(child_identifier, ip, opts = {})
  associate_ip_to_child_with_http_info(child_identifier, ip, opts)
  nil
end

#associate_ip_to_child_with_http_info(child_identifier, ip, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Associate a dedicated IP to the child

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • ip

    IP to associate

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



95
96
97
98
99
100
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
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 95

def associate_ip_to_child_with_http_info(child_identifier, ip, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.associate_ip_to_child ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.associate_ip_to_child"
  end
  # verify the required parameter 'ip' is set
  if @api_client.config.client_side_validation && ip.nil?
    fail ArgumentError, "Missing the required parameter 'ip' when calling ResellerApi.associate_ip_to_child"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}/ips/associate'.sub('{' + 'childIdentifier' + '}', child_identifier.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)
  auth_names = ['api-key', 'partner-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_child_domain(child_identifier, add_child_domain, opts = {}) ⇒ nil

Create a domain for a child account

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • add_child_domain

    Sender domain to add for a specific child account. This will not be displayed to the parent account.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


142
143
144
145
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 142

def create_child_domain(child_identifier, add_child_domain, opts = {})
  create_child_domain_with_http_info(child_identifier, add_child_domain, opts)
  nil
end

#create_child_domain_with_http_info(child_identifier, add_child_domain, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create a domain for a child account

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • add_child_domain

    Sender domain to add for a specific child account. This will not be displayed to the parent account.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



152
153
154
155
156
157
158
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 152

def create_child_domain_with_http_info(child_identifier, add_child_domain, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.create_child_domain ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.create_child_domain"
  end
  # verify the required parameter 'add_child_domain' is set
  if @api_client.config.client_side_validation && add_child_domain.nil?
    fail ArgumentError, "Missing the required parameter 'add_child_domain' when calling ResellerApi.create_child_domain"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}/domains'.sub('{' + 'childIdentifier' + '}', child_identifier.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_child_domain)
  auth_names = ['api-key', 'partner-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#create_child_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_reseller_child(opts = {}) ⇒ CreateReseller

Creates a reseller child

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :reseller_child (CreateChild)

    reseller child to add

Returns:



198
199
200
201
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 198

def create_reseller_child(opts = {})
  data, _status_code, _headers = create_reseller_child_with_http_info(opts)
  data
end

#create_reseller_child_with_http_info(opts = {}) ⇒ Array<(CreateReseller, Fixnum, Hash)>

Creates a reseller child

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :reseller_child (CreateChild)

    reseller child to add

Returns:

  • (Array<(CreateReseller, Fixnum, Hash)>)

    CreateReseller data, response status code and response headers



207
208
209
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
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 207

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', 'partner-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 => 'CreateReseller')
  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_child_domain(child_identifier, domain_name, opts = {}) ⇒ nil

Delete the sender domain of the reseller child based on the childIdentifier and domainName passed

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • domain_name

    Pass the existing domain that needs to be deleted

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


247
248
249
250
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 247

def delete_child_domain(child_identifier, domain_name, opts = {})
  delete_child_domain_with_http_info(child_identifier, domain_name, opts)
  nil
end

#delete_child_domain_with_http_info(child_identifier, domain_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete the sender domain of the reseller child based on the childIdentifier and domainName passed

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • domain_name

    Pass the existing domain that needs to be deleted

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



257
258
259
260
261
262
263
264
265
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
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 257

def delete_child_domain_with_http_info(child_identifier, domain_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.delete_child_domain ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.delete_child_domain"
  end
  # verify the required parameter 'domain_name' is set
  if @api_client.config.client_side_validation && domain_name.nil?
    fail ArgumentError, "Missing the required parameter 'domain_name' when calling ResellerApi.delete_child_domain"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}/domains/{domainName}'.sub('{' + 'childIdentifier' + '}', child_identifier.to_s).sub('{' + 'domainName' + '}', domain_name.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', 'partner-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_child_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_reseller_child(child_identifier, opts = {}) ⇒ nil

Delete a single reseller child based on the child identifier supplied

Parameters:

  • child_identifier

    Either auth key or child id of reseller&#39;s child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


303
304
305
306
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 303

def delete_reseller_child(child_identifier, opts = {})
  delete_reseller_child_with_http_info(child_identifier, opts)
  nil
end

#delete_reseller_child_with_http_info(child_identifier, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a single reseller child based on the child identifier supplied

Parameters:

  • child_identifier

    Either auth key or child id of reseller&#39;s child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



312
313
314
315
316
317
318
319
320
321
322
323
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
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 312

def delete_reseller_child_with_http_info(child_identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.delete_reseller_child ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.delete_reseller_child"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}'.sub('{' + 'childIdentifier' + '}', child_identifier.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', 'partner-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_identifier, ip, opts = {}) ⇒ nil

Dissociate a dedicated IP to the child

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • ip

    IP to dissociate

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


355
356
357
358
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 355

def dissociate_ip_from_child(child_identifier, ip, opts = {})
  dissociate_ip_from_child_with_http_info(child_identifier, ip, opts)
  nil
end

#dissociate_ip_from_child_with_http_info(child_identifier, ip, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Dissociate a dedicated IP to the child

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • ip

    IP to dissociate

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



365
366
367
368
369
370
371
372
373
374
375
376
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
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 365

def dissociate_ip_from_child_with_http_info(child_identifier, ip, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.dissociate_ip_from_child ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.dissociate_ip_from_child"
  end
  # verify the required parameter 'ip' is set
  if @api_client.config.client_side_validation && ip.nil?
    fail ArgumentError, "Missing the required parameter 'ip' when calling ResellerApi.dissociate_ip_from_child"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}/ips/dissociate'.sub('{' + 'childIdentifier' + '}', child_identifier.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)
  auth_names = ['api-key', 'partner-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_account_creation_status(child_identifier, opts = {}) ⇒ GetChildAccountCreationStatus

Get the status of a reseller’s child account creation, whether it is successfully created (exists) or not based on the identifier supplied

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



411
412
413
414
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 411

def (child_identifier, opts = {})
  data, _status_code, _headers = (child_identifier, opts)
  data
end

#get_child_account_creation_status_with_http_info(child_identifier, opts = {}) ⇒ Array<(GetChildAccountCreationStatus, Fixnum, Hash)>

Get the status of a reseller&#39;s child account creation, whether it is successfully created (exists) or not based on the identifier supplied

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



420
421
422
423
424
425
426
427
428
429
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
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 420

def (child_identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.get_child_account_creation_status ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.get_child_account_creation_status"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}/accountCreationStatus'.sub('{' + 'childIdentifier' + '}', child_identifier.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', 'partner-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 => 'GetChildAccountCreationStatus')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ResellerApi#get_child_account_creation_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_child_domains(child_identifier, opts = {}) ⇒ GetChildDomains

Get all sender domains for a specific child account

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



463
464
465
466
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 463

def get_child_domains(child_identifier, opts = {})
  data, _status_code, _headers = get_child_domains_with_http_info(child_identifier, opts)
  data
end

#get_child_domains_with_http_info(child_identifier, opts = {}) ⇒ Array<(GetChildDomains, Fixnum, Hash)>

Get all sender domains for a specific child account

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetChildDomains, Fixnum, Hash)>)

    GetChildDomains data, response status code and response headers



472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 472

def get_child_domains_with_http_info(child_identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.get_child_domains ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.get_child_domains"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}/domains'.sub('{' + 'childIdentifier' + '}', child_identifier.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', 'partner-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 => 'GetChildDomains')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ResellerApi#get_child_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_child_info(child_identifier, opts = {}) ⇒ GetChildInfo

Get a child account’s details

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



515
516
517
518
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 515

def get_child_info(child_identifier, opts = {})
  data, _status_code, _headers = get_child_info_with_http_info(child_identifier, opts)
  data
end

#get_child_info_with_http_info(child_identifier, opts = {}) ⇒ Array<(GetChildInfo, Fixnum, Hash)>

Get a child account&#39;s details

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetChildInfo, Fixnum, Hash)>)

    GetChildInfo data, response status code and response headers



524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 524

def get_child_info_with_http_info(child_identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.get_child_info ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.get_child_info"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}'.sub('{' + 'childIdentifier' + '}', child_identifier.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', 'partner-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

Get the list of all children accounts

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Number of documents for child accounts information per page (default to 10)

  • :offset (Integer)

    Index of the first document in the page (default to 0)

Returns:



568
569
570
571
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 568

def get_reseller_childs(opts = {})
  data, _status_code, _headers = get_reseller_childs_with_http_info(opts)
  data
end

#get_reseller_childs_with_http_info(opts = {}) ⇒ Array<(GetChildrenList, Fixnum, Hash)>

Get the list of all children accounts

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Number of documents for child accounts information per page

  • :offset (Integer)

    Index of the first document in the page

Returns:

  • (Array<(GetChildrenList, Fixnum, Hash)>)

    GetChildrenList data, response status code and response headers



578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 578

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
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 20
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ResellerApi.get_reseller_childs, must be smaller than or equal to 20.'
  end

  # resource path
  local_var_path = '/reseller/children'

  # query parameters
  query_params = {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # 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', 'partner-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

#get_sso_token(child_identifier, opts = {}) ⇒ GetSsoToken

Get session token to access Sendinblue (SSO) It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern => email.mydomain.com/login/sso?token=[token]

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



624
625
626
627
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 624

def get_sso_token(child_identifier, opts = {})
  data, _status_code, _headers = get_sso_token_with_http_info(child_identifier, opts)
  data
end

#get_sso_token_with_http_info(child_identifier, opts = {}) ⇒ Array<(GetSsoToken, Fixnum, Hash)>

Get session token to access Sendinblue (SSO) It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern &#x3D;&gt; email.mydomain.com/login/sso?token&#x3D;[token]

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetSsoToken, Fixnum, Hash)>)

    GetSsoToken data, response status code and response headers



634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 634

def get_sso_token_with_http_info(child_identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.get_sso_token ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.get_sso_token"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}/auth'.sub('{' + 'childIdentifier' + '}', child_identifier.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', 'partner-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 => 'GetSsoToken')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ResellerApi#get_sso_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_credits(child_identifier, remove_credits, opts = {}) ⇒ RemainingCreditModel

Remove Email and/or SMS credits from a specific child account

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • remove_credits

    Values to post to remove email or SMS credits from a specific child account

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



678
679
680
681
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 678

def remove_credits(child_identifier, remove_credits, opts = {})
  data, _status_code, _headers = remove_credits_with_http_info(child_identifier, remove_credits, opts)
  data
end

#remove_credits_with_http_info(child_identifier, remove_credits, opts = {}) ⇒ Array<(RemainingCreditModel, Fixnum, Hash)>

Remove Email and/or SMS credits from a specific child account

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • remove_credits

    Values to post to remove email or SMS credits from a specific child account

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RemainingCreditModel, Fixnum, Hash)>)

    RemainingCreditModel data, response status code and response headers



688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 688

def remove_credits_with_http_info(child_identifier, remove_credits, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.remove_credits ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' 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/{childIdentifier}/credits/remove'.sub('{' + 'childIdentifier' + '}', child_identifier.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', 'partner-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_child_account_status(child_identifier, update_child_account_status, opts = {}) ⇒ nil

Update info of reseller’s child account status based on the childIdentifier supplied

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • update_child_account_status

    values to update in child account status

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


736
737
738
739
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 736

def (child_identifier, , opts = {})
  (child_identifier, , opts)
  nil
end

#update_child_account_status_with_http_info(child_identifier, update_child_account_status, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update info of reseller&#39;s child account status based on the childIdentifier supplied

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • update_child_account_status

    values to update in child account status

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 746

def (child_identifier, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.update_child_account_status ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.update_child_account_status"
  end
  # verify the required parameter 'update_child_account_status' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'update_child_account_status' when calling ResellerApi.update_child_account_status"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}/accountStatus'.sub('{' + 'childIdentifier' + '}', child_identifier.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()
  auth_names = ['api-key', 'partner-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_child_account_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_child_domain(child_identifier, domain_name, update_child_domain, opts = {}) ⇒ nil

Update the sender domain of reseller’s child based on the childIdentifier and domainName passed

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • domain_name

    Pass the existing domain that needs to be updated

  • update_child_domain

    value to update for sender domain

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


794
795
796
797
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 794

def update_child_domain(child_identifier, domain_name, update_child_domain, opts = {})
  update_child_domain_with_http_info(child_identifier, domain_name, update_child_domain, opts)
  nil
end

#update_child_domain_with_http_info(child_identifier, domain_name, update_child_domain, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update the sender domain of reseller&#39;s child based on the childIdentifier and domainName passed

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • domain_name

    Pass the existing domain that needs to be updated

  • update_child_domain

    value to update for sender domain

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 805

def update_child_domain_with_http_info(child_identifier, domain_name, update_child_domain, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ResellerApi.update_child_domain ...'
  end
  # verify the required parameter 'child_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' when calling ResellerApi.update_child_domain"
  end
  # verify the required parameter 'domain_name' is set
  if @api_client.config.client_side_validation && domain_name.nil?
    fail ArgumentError, "Missing the required parameter 'domain_name' when calling ResellerApi.update_child_domain"
  end
  # verify the required parameter 'update_child_domain' is set
  if @api_client.config.client_side_validation && update_child_domain.nil?
    fail ArgumentError, "Missing the required parameter 'update_child_domain' when calling ResellerApi.update_child_domain"
  end
  # resource path
  local_var_path = '/reseller/children/{childIdentifier}/domains/{domainName}'.sub('{' + 'childIdentifier' + '}', child_identifier.to_s).sub('{' + 'domainName' + '}', domain_name.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(update_child_domain)
  auth_names = ['api-key', 'partner-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_child_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_reseller_child(child_identifier, reseller_child, opts = {}) ⇒ nil

Update info of reseller’s child based on the child identifier supplied

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • reseller_child

    values to update in child profile

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


856
857
858
859
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 856

def update_reseller_child(child_identifier, reseller_child, opts = {})
  update_reseller_child_with_http_info(child_identifier, reseller_child, opts)
  nil
end

#update_reseller_child_with_http_info(child_identifier, reseller_child, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update info of reseller&#39;s child based on the child identifier supplied

Parameters:

  • child_identifier

    Either auth key or id of reseller&#39;s child

  • reseller_child

    values to update in child profile

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
# File 'lib/sib-api-v3-sdk/api/reseller_api.rb', line 866

def update_reseller_child_with_http_info(child_identifier, 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_identifier' is set
  if @api_client.config.client_side_validation && child_identifier.nil?
    fail ArgumentError, "Missing the required parameter 'child_identifier' 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/{childIdentifier}'.sub('{' + 'childIdentifier' + '}', child_identifier.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', 'partner-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