=begin #SendinBlue API #SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | OpenAPI spec version: 3.0.0 Contact: contact@sendinblue.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.19 =end require 'uri' module SibApiV3Sdk class ResellerApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Set custom user_agent if explicitly passed in api # default will still remain Swagger-Codegen/#{VERSION}/ruby 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 # 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] 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 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 [Array<(RemainingCreditModel, Fixnum, Hash)>] RemainingCreditModel data, response status code and response headers 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 a dedicated IP to the child # @param child_identifier Either auth key or id of reseller's child # @param ip IP to associate # @param [Hash] opts the optional parameters # @return [nil] def associate_ip_to_child(child_identifier, ip, opts = {}) associate_ip_to_child_with_http_info(child_identifier, ip, opts) nil end # Associate a dedicated IP to the child # @param child_identifier Either auth key or id of reseller'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 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 a domain for a child account # @param child_identifier Either auth key or id of reseller'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] 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 a domain for a child account # @param child_identifier Either auth key or id of reseller'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 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 # Creates a reseller child # @param [Hash] opts the optional parameters # @option opts [CreateChild] :reseller_child reseller child to add # @return [CreateReseller] def create_reseller_child(opts = {}) data, _status_code, _headers = create_reseller_child_with_http_info(opts) data end # 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 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 the sender domain of the reseller child based on the childIdentifier and domainName passed # @param child_identifier Either auth key or id of reseller's child # @param domain_name Pass the existing domain that needs to be deleted # @param [Hash] opts the optional parameters # @return [nil] def delete_child_domain(child_identifier, domain_name, opts = {}) delete_child_domain_with_http_info(child_identifier, domain_name, opts) nil end # 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'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 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 a single reseller child based on the child identifier supplied # @param child_identifier Either auth key or child id of reseller's child # @param [Hash] opts the optional parameters # @return [nil] def delete_reseller_child(child_identifier, opts = {}) delete_reseller_child_with_http_info(child_identifier, opts) nil end # Delete a single reseller child based on the child identifier supplied # @param child_identifier Either auth key or child id of reseller's child # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers 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 a dedicated IP to the child # @param child_identifier Either auth key or id of reseller's child # @param ip IP to dissociate # @param [Hash] opts the optional parameters # @return [nil] def dissociate_ip_from_child(child_identifier, ip, opts = {}) dissociate_ip_from_child_with_http_info(child_identifier, ip, opts) nil end # Dissociate a dedicated IP to the child # @param child_identifier Either auth key or id of reseller'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 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 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's child # @param [Hash] opts the optional parameters # @return [GetChildAccountCreationStatus] 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 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's child # @param [Hash] opts the optional parameters # @return [Array<(GetChildAccountCreationStatus, Fixnum, Hash)>] GetChildAccountCreationStatus data, response status code and response headers 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 all sender domains for a specific child account # @param child_identifier Either auth key or id of reseller's child # @param [Hash] opts the optional parameters # @return [GetChildDomains] def get_child_domains(child_identifier, opts = {}) data, _status_code, _headers = get_child_domains_with_http_info(child_identifier, opts) data end # Get all sender domains for a specific child account # @param child_identifier Either auth key or id of reseller's child # @param [Hash] opts the optional parameters # @return [Array<(GetChildDomains, Fixnum, Hash)>] GetChildDomains data, response status code and response headers 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 a child account's details # @param child_identifier Either auth key or id of reseller's child # @param [Hash] opts the optional parameters # @return [GetChildInfo] def get_child_info(child_identifier, opts = {}) data, _status_code, _headers = get_child_info_with_http_info(child_identifier, opts) data end # Get a child account's details # @param child_identifier Either auth key or id of reseller's child # @param [Hash] opts the optional parameters # @return [Array<(GetChildInfo, Fixnum, Hash)>] GetChildInfo data, response status code and response headers 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 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] def get_reseller_childs(opts = {}) data, _status_code, _headers = get_reseller_childs_with_http_info(opts) data end # 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 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 if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ResellerApi.get_reseller_childs, must be greater than or equal to 0.' 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 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 => https:/email.mydomain.com/login/sso?token=[token] # @param child_identifier Either auth key or id of reseller's child # @param [Hash] opts the optional parameters # @return [GetSsoToken] def get_sso_token(child_identifier, opts = {}) data, _status_code, _headers = get_sso_token_with_http_info(child_identifier, opts) data end # 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 => https:/email.mydomain.com/login/sso?token=[token] # @param child_identifier Either auth key or id of reseller's child # @param [Hash] opts the optional parameters # @return [Array<(GetSsoToken, Fixnum, Hash)>] GetSsoToken data, response status code and response headers 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 Email and/or SMS credits from a specific child account # @param child_identifier Either auth key or id of reseller'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] 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 Email and/or SMS credits from a specific child account # @param child_identifier Either auth key or id of reseller'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 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 info of reseller's child account status based on the childIdentifier supplied # @param child_identifier Either auth key or id of reseller's child # @param update_child_account_status values to update in child account status # @param [Hash] opts the optional parameters # @return [nil] 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 info of reseller's child account status based on the childIdentifier supplied # @param child_identifier Either auth key or id of reseller'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 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 the sender domain of reseller's child based on the childIdentifier and domainName passed # @param child_identifier Either auth key or id of reseller'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] 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 the sender domain of reseller's child based on the childIdentifier and domainName passed # @param child_identifier Either auth key or id of reseller'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 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 info of reseller's child based on the child identifier supplied # @param child_identifier Either auth key or id of reseller's child # @param reseller_child values to update in child profile # @param [Hash] opts the optional parameters # @return [nil] def update_reseller_child(child_identifier, reseller_child, opts = {}) update_reseller_child_with_http_info(child_identifier, reseller_child, opts) nil end # Update info of reseller's child based on the child identifier supplied # @param child_identifier Either auth key or id of reseller'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 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 end end