class SibApiV3Sdk::ResellerApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

add_credits(child_identifier, add_credits, opts = {}) click to toggle source

Add Email and/or SMS credits to a specific child account @param child_identifier Either auth key or id of reseller's child @param add_credits Values to post to add credit to a specific child account @param [Hash] opts the optional parameters @return [RemainingCreditModel]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 37
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 = {}) click to toggle source

Add Email and/or SMS credits to a specific child account @param child_identifier Either auth key or id of reseller&#39;s child @param add_credits Values to post to add credit to a specific child account @param [Hash] opts the optional parameters @return [Array<(RemainingCreditModel, Fixnum, Hash)>] RemainingCreditModel data, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 47
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 = {}) click to toggle source

Associate a dedicated IP to the child @param child_identifier Either auth key or id of reseller&#39;s child @param ip IP to associate @param [Hash] opts the optional parameters @return [nil]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 95
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 = {}) click to toggle source

Associate a dedicated IP to the child @param child_identifier Either auth key or id of reseller&#39;s child @param ip IP to associate @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 105
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 = {}) click to toggle source

Create a domain for a child account @param child_identifier Either auth key or id of reseller&#39;s child @param add_child_domain Sender domain to add for a specific child account. This will not be displayed to the parent account. @param [Hash] opts the optional parameters @return [nil]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 152
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 = {}) click to toggle source

Create a domain for a child account @param child_identifier Either auth key or id of reseller&#39;s child @param add_child_domain Sender domain to add for a specific child account. This will not be displayed to the parent account. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 162
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 = {}) click to toggle source

Creates a reseller child @param [Hash] opts the optional parameters @option opts [CreateChild] :reseller_child reseller child to add @return [CreateReseller]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 208
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 = {}) click to toggle source

Creates a reseller child @param [Hash] opts the optional parameters @option opts [CreateChild] :reseller_child reseller child to add @return [Array<(CreateReseller, Fixnum, Hash)>] CreateReseller data, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 217
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 = {}) click to toggle source

Delete the sender domain of the reseller child based on the childIdentifier and domainName passed @param child_identifier Either auth key or id of reseller&#39;s child @param domain_name Pass the existing domain that needs to be deleted @param [Hash] opts the optional parameters @return [nil]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 257
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 = {}) click to toggle source

Delete the sender domain of the reseller child based on the childIdentifier and domainName passed @param child_identifier Either auth key or id of reseller&#39;s child @param domain_name Pass the existing domain that needs to be deleted @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 267
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 = {}) click to toggle source

Delete a single reseller child based on the child identifier supplied @param child_identifier Either auth key or child id of reseller&#39;s child @param [Hash] opts the optional parameters @return [nil]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 313
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 = {}) click to toggle source

Delete a single reseller child based on the child identifier supplied @param child_identifier Either auth key or child id of reseller&#39;s child @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 322
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 = {}) click to toggle source

Dissociate a dedicated IP to the child @param child_identifier Either auth key or id of reseller&#39;s child @param ip IP to dissociate @param [Hash] opts the optional parameters @return [nil]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 365
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 = {}) click to toggle source

Dissociate a dedicated IP to the child @param child_identifier Either auth key or id of reseller&#39;s child @param ip IP to dissociate @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 375
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 = {}) click to toggle source

Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied @param child_identifier Either auth key or id of reseller&#39;s child @param [Hash] opts the optional parameters @return [GetChildAccountCreationStatus]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 421
def get_child_account_creation_status(child_identifier, opts = {})
  data, _status_code, _headers = get_child_account_creation_status_with_http_info(child_identifier, opts)
  data
end
get_child_account_creation_status_with_http_info(child_identifier, opts = {}) click to toggle source

Get the status of a reseller&#39;s child account creation, whether it is successfully created (exists) or not based on the identifier supplied @param child_identifier Either auth key or id of reseller&#39;s child @param [Hash] opts the optional parameters @return [Array<(GetChildAccountCreationStatus, Fixnum, Hash)>] GetChildAccountCreationStatus data, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 430
def get_child_account_creation_status_with_http_info(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 = {}) click to toggle source

Get all sender domains for a specific child account @param child_identifier Either auth key or id of reseller&#39;s child @param [Hash] opts the optional parameters @return [GetChildDomains]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 473
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 = {}) click to toggle source

Get all sender domains for a specific child account @param child_identifier Either auth key or id of reseller&#39;s child @param [Hash] opts the optional parameters @return [Array<(GetChildDomains, Fixnum, Hash)>] GetChildDomains data, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 482
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 = {}) click to toggle source

Get a child account's details @param child_identifier Either auth key or id of reseller&#39;s child @param [Hash] opts the optional parameters @return [GetChildInfo]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 525
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 = {}) click to toggle source

Get a child account&#39;s details @param child_identifier Either auth key or id of reseller&#39;s child @param [Hash] opts the optional parameters @return [Array<(GetChildInfo, Fixnum, Hash)>] GetChildInfo data, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 534
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 = {}) click to toggle source

Get the list of all children accounts @param [Hash] opts the optional parameters @option opts [Integer] :limit Number of documents for child accounts information per page (default to 10) @option opts [Integer] :offset Index of the first document in the page (default to 0) @return [GetChildrenList]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 578
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 = {}) click to toggle source

Get the list of all children accounts @param [Hash] opts the optional parameters @option opts [Integer] :limit Number of documents for child accounts information per page @option opts [Integer] :offset Index of the first document in the page @return [Array<(GetChildrenList, Fixnum, Hash)>] GetChildrenList data, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 588
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 = {}) click to toggle source

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] @param child_identifier Either auth key or id of reseller&#39;s child @param [Hash] opts the optional parameters @return [GetSsoToken]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 634
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 = {}) click to toggle source

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=[token] @param child_identifier Either auth key or id of reseller&#39;s child @param [Hash] opts the optional parameters @return [Array<(GetSsoToken, Fixnum, Hash)>] GetSsoToken data, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 644
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 = {}) click to toggle source

Remove Email and/or SMS credits from a specific child account @param child_identifier Either auth key or id of reseller&#39;s child @param remove_credits Values to post to remove email or SMS credits from a specific child account @param [Hash] opts the optional parameters @return [RemainingCreditModel]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 688
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 = {}) click to toggle source

Remove Email and/or SMS credits from a specific child account @param child_identifier Either auth key or id of reseller&#39;s child @param remove_credits Values to post to remove email or SMS credits from a specific child account @param [Hash] opts the optional parameters @return [Array<(RemainingCreditModel, Fixnum, Hash)>] RemainingCreditModel data, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 698
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
setUserAgent(user_agent) click to toggle source

Set custom user_agent if explicitly passed in api default will still remain Swagger-Codegen/#{VERSION}/ruby

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 25
def setUserAgent(user_agent)
  @user_agent = user_agent
  if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
    @api_client.default_headers['User-Agent'] = @user_agent
  end
end
update_child_account_status(child_identifier, update_child_account_status, opts = {}) click to toggle source

Update info of reseller's child account status based on the childIdentifier supplied @param child_identifier Either auth key or id of reseller&#39;s child @param update_child_account_status values to update in child account status @param [Hash] opts the optional parameters @return [nil]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 746
def update_child_account_status(child_identifier, update_child_account_status, opts = {})
  update_child_account_status_with_http_info(child_identifier, update_child_account_status, opts)
  nil
end
update_child_account_status_with_http_info(child_identifier, update_child_account_status, opts = {}) click to toggle source

Update info of reseller&#39;s child account status based on the childIdentifier supplied @param child_identifier Either auth key or id of reseller&#39;s child @param update_child_account_status values to update in child account status @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 756
def update_child_account_status_with_http_info(child_identifier, update_child_account_status, 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 && update_child_account_status.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(update_child_account_status)
  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 = {}) click to toggle source

Update the sender domain of reseller's child based on the childIdentifier and domainName passed @param child_identifier Either auth key or id of reseller&#39;s child @param domain_name Pass the existing domain that needs to be updated @param update_child_domain value to update for sender domain @param [Hash] opts the optional parameters @return [nil]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 804
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 = {}) click to toggle source

Update the sender domain of reseller&#39;s child based on the childIdentifier and domainName passed @param child_identifier Either auth key or id of reseller&#39;s child @param domain_name Pass the existing domain that needs to be updated @param update_child_domain value to update for sender domain @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 815
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 = {}) click to toggle source

Update info of reseller's child based on the child identifier supplied @param child_identifier Either auth key or id of reseller&#39;s child @param reseller_child values to update in child profile @param [Hash] opts the optional parameters @return [nil]

# File lib/sib-api-v3-sdk/api/reseller_api.rb, line 866
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 = {}) click to toggle source

Update info of reseller&#39;s child based on the child identifier supplied @param child_identifier Either auth key or id of reseller&#39;s child @param reseller_child values to update in child profile @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

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