Class: Brevo::ResellerApi
- Inherits:
-
Object
- Object
- Brevo::ResellerApi
- Defined in:
- lib/brevo/api/reseller_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_credits(child_identifier, add_credits, opts = {}) ⇒ RemainingCreditModel
Add Email and/or SMS credits to a specific child account.
-
#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.
-
#associate_ip_to_child(child_identifier, ip, opts = {}) ⇒ nil
Associate a dedicated IP to the child.
-
#associate_ip_to_child_with_http_info(child_identifier, ip, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Associate a dedicated IP to the child.
-
#create_child_domain(child_identifier, add_child_domain, opts = {}) ⇒ nil
Create a domain for a child account.
-
#create_child_domain_with_http_info(child_identifier, add_child_domain, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create a domain for a child account.
-
#create_reseller_child(opts = {}) ⇒ CreateReseller
Creates a reseller child.
-
#create_reseller_child_with_http_info(opts = {}) ⇒ Array<(CreateReseller, Fixnum, Hash)>
Creates a reseller child.
-
#delete_child_domain(child_identifier, domain_name, opts = {}) ⇒ nil
Delete the sender domain of the reseller child based on the childIdentifier and domainName passed.
-
#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.
-
#delete_reseller_child(child_identifier, opts = {}) ⇒ nil
Delete a single reseller child based on the child identifier supplied.
-
#delete_reseller_child_with_http_info(child_identifier, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a single reseller child based on the child identifier supplied.
-
#dissociate_ip_from_child(child_identifier, ip, opts = {}) ⇒ nil
Dissociate a dedicated IP to the child.
-
#dissociate_ip_from_child_with_http_info(child_identifier, ip, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Dissociate a dedicated IP to the child.
-
#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.
-
#get_child_account_creation_status_with_http_info(child_identifier, opts = {}) ⇒ Array<(GetChildAccountCreationStatus, Fixnum, Hash)>
Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied.
-
#get_child_domains(child_identifier, opts = {}) ⇒ GetChildDomains
Get all sender domains for a specific child account.
-
#get_child_domains_with_http_info(child_identifier, opts = {}) ⇒ Array<(GetChildDomains, Fixnum, Hash)>
Get all sender domains for a specific child account.
-
#get_child_info(child_identifier, opts = {}) ⇒ GetChildInfo
Get a child account’s details.
-
#get_child_info_with_http_info(child_identifier, opts = {}) ⇒ Array<(GetChildInfo, Fixnum, Hash)>
Get a child account's details.
-
#get_reseller_childs(opts = {}) ⇒ GetChildrenList
Get the list of all children accounts.
-
#get_reseller_childs_with_http_info(opts = {}) ⇒ Array<(GetChildrenList, Fixnum, Hash)>
Get the list of all children accounts.
-
#get_sso_token(child_identifier, opts = {}) ⇒ GetSsoToken
Get session token to access Brevo (SSO) It returns a session [token] which will remain valid for a short period of time.
-
#get_sso_token_with_http_info(child_identifier, opts = {}) ⇒ Array<(GetSsoToken, Fixnum, Hash)>
Get session token to access Brevo (SSO) It returns a session [token] which will remain valid for a short period of time.
-
#initialize(api_client = ApiClient.default) ⇒ ResellerApi
constructor
A new instance of ResellerApi.
-
#remove_credits(child_identifier, remove_credits, opts = {}) ⇒ RemainingCreditModel
Remove Email and/or SMS credits from a specific child account.
-
#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.
-
#setUserAgent(user_agent) ⇒ Object
Set custom user_agent if explicitly passed in api default will still remain Swagger-Codegen/#VERSION/ruby.
-
#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.
-
#update_child_account_status_with_http_info(child_identifier, update_child_account_status, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update info of reseller's child account status based on the childIdentifier supplied.
-
#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.
-
#update_child_domain_with_http_info(child_identifier, domain_name, update_child_domain, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update the sender domain of reseller's child based on the childIdentifier and domainName passed.
-
#update_reseller_child(child_identifier, reseller_child, opts = {}) ⇒ nil
Update info of reseller’s child based on the child identifier supplied.
-
#update_reseller_child_with_http_info(child_identifier, reseller_child, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update info of reseller's child based on the child identifier supplied.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ResellerApi
Returns a new instance of ResellerApi.
19 20 21 |
# File 'lib/brevo/api/reseller_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/brevo/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
37 38 39 40 |
# File 'lib/brevo/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 = {}) ⇒ Array<(RemainingCreditModel, Fixnum, Hash)>
Add Email and/or SMS credits to a specific child account
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/brevo/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 = {}) ⇒ nil
Associate a dedicated IP to the child
95 96 97 98 |
# File 'lib/brevo/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 = {}) ⇒ Array<(nil, Fixnum, Hash)>
Associate a dedicated IP to the child
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/brevo/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 = {}) ⇒ nil
Create a domain for a child account
152 153 154 155 |
# File 'lib/brevo/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 = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create a domain for a child account
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 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/brevo/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 = {}) ⇒ CreateReseller
Creates a reseller child
208 209 210 211 |
# File 'lib/brevo/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 = {}) ⇒ Array<(CreateReseller, Fixnum, Hash)>
Creates a reseller child
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/brevo/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 = {}) ⇒ nil
Delete the sender domain of the reseller child based on the childIdentifier and domainName passed
257 258 259 260 |
# File 'lib/brevo/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 = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete the sender domain of the reseller child based on the childIdentifier and domainName passed
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/brevo/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 = {}) ⇒ nil
Delete a single reseller child based on the child identifier supplied
313 314 315 316 |
# File 'lib/brevo/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 = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a single reseller child based on the child identifier supplied
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 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/brevo/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 = {}) ⇒ nil
Dissociate a dedicated IP to the child
365 366 367 368 |
# File 'lib/brevo/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 = {}) ⇒ Array<(nil, Fixnum, Hash)>
Dissociate a dedicated IP to the child
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 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/brevo/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 = {}) ⇒ GetChildAccountCreationStatus
Get the status of a reseller’s child account creation, whether it is successfully created (exists) or not based on the identifier supplied
421 422 423 424 |
# File 'lib/brevo/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 = {}) ⇒ Array<(GetChildAccountCreationStatus, Fixnum, Hash)>
Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/brevo/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 = {}) ⇒ GetChildDomains
Get all sender domains for a specific child account
473 474 475 476 |
# File 'lib/brevo/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 = {}) ⇒ Array<(GetChildDomains, Fixnum, Hash)>
Get all sender domains for a specific child account
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 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/brevo/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 = {}) ⇒ GetChildInfo
Get a child account’s details
525 526 527 528 |
# File 'lib/brevo/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 = {}) ⇒ Array<(GetChildInfo, Fixnum, Hash)>
Get a child account's details
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 563 564 565 566 567 568 569 570 571 572 |
# File 'lib/brevo/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 = {}) ⇒ GetChildrenList
Get the list of all children accounts
578 579 580 581 |
# File 'lib/brevo/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 = {}) ⇒ Array<(GetChildrenList, Fixnum, Hash)>
Get the list of all children accounts
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 619 620 621 622 623 624 625 626 627 628 629 630 631 632 |
# File 'lib/brevo/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 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_sso_token(child_identifier, opts = {}) ⇒ GetSsoToken
Get session token to access Brevo (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]
638 639 640 641 |
# File 'lib/brevo/api/reseller_api.rb', line 638 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 Brevo (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]
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 673 674 675 676 677 678 679 680 681 682 683 684 685 686 |
# File 'lib/brevo/api/reseller_api.rb', line 648 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
692 693 694 695 |
# File 'lib/brevo/api/reseller_api.rb', line 692 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
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 731 732 733 734 735 736 737 738 739 740 741 742 743 744 |
# File 'lib/brevo/api/reseller_api.rb', line 702 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) ⇒ Object
Set custom user_agent if explicitly passed in api default will still remain Swagger-Codegen/#VERSION/ruby
25 26 27 28 29 30 |
# File 'lib/brevo/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?('brevo_') @api_client.default_headers['User-Agent'] = @user_agent end 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
750 751 752 753 |
# File 'lib/brevo/api/reseller_api.rb', line 750 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 = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update info of reseller's child account status based on the childIdentifier supplied
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 788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
# File 'lib/brevo/api/reseller_api.rb', line 760 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 = {}) ⇒ nil
Update the sender domain of reseller’s child based on the childIdentifier and domainName passed
808 809 810 811 |
# File 'lib/brevo/api/reseller_api.rb', line 808 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's child based on the childIdentifier and domainName passed
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 851 852 853 854 855 856 857 858 859 860 861 862 863 864 |
# File 'lib/brevo/api/reseller_api.rb', line 819 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
870 871 872 873 |
# File 'lib/brevo/api/reseller_api.rb', line 870 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's child based on the child identifier supplied
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 908 909 910 911 912 913 914 915 916 917 918 919 920 921 |
# File 'lib/brevo/api/reseller_api.rb', line 880 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 |