Class: MistApi::MSPsLogo

Inherits:
BaseController show all
Defined in:
lib/mist_api/controllers/ms_ps_logo.rb

Overview

MSPsLogo

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent

Constructor Details

This class inherits a constructor from MistApi::BaseController

Instance Method Details

#delete_msp_logo(msp_id) ⇒ ApiResponse

Delete MSP Logo here

Parameters:

  • msp_id (UUID | String)

    Required parameter: TODO: type description

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/mist_api/controllers/ms_ps_logo.rb', line 13

def (msp_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::DELETE,
                                 '/api/v1/msps/{msp_id}/logo',
                                 Server::API_HOST)
               .template_param(new_parameter(msp_id, key: 'msp_id')
                                .should_encode(true))
               .auth(Or.new('apiToken', 'basicAuth', And.new('basicAuth', 'csrfToken'))))
    .response(new_response_handler
                .is_nullify404(true)
                .is_response_void(true)
                .is_api_response(true)
                .local_error('400',
                             'Bad Syntax',
                             APIException)
                .local_error('401',
                             'Unauthorized',
                             APIException)
                .local_error('403',
                             'Permission Denied',
                             APIException)
                .local_error('404',
                             'Not found. The API endpoint doesn’t exist or resource doesn’ t'\
                              ' exist',
                             APIException)
                .local_error('429',
                             'Too Many Request. The API Token used for the request reached'\
                              ' the 5000 API Calls per hour threshold',
                             APIException))
    .execute
end

#post_msp_logo(msp_id, body: nil) ⇒ ApiResponse

Upload Logo (only for advanced msp tier) here

Parameters:

  • msp_id (UUID | String)

    Required parameter: TODO: type description

  • body (MspLogo) (defaults to: nil)

    Optional parameter: TODO: type description here

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



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
# File 'lib/mist_api/controllers/ms_ps_logo.rb', line 50

def (msp_id,
                  body: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/api/v1/msps/{msp_id}/logo',
                                 Server::API_HOST)
               .template_param(new_parameter(msp_id, key: 'msp_id')
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Or.new('apiToken', 'basicAuth', And.new('basicAuth', 'csrfToken'))))
    .response(new_response_handler
                .is_nullify404(true)
                .is_response_void(true)
                .is_api_response(true)
                .local_error('400',
                             'Bad Syntax',
                             APIException)
                .local_error('401',
                             'Unauthorized',
                             APIException)
                .local_error('403',
                             'Permission Denied',
                             APIException)
                .local_error('404',
                             'Not found. The API endpoint doesn’t exist or resource doesn’ t'\
                              ' exist',
                             APIException)
                .local_error('429',
                             'Too Many Request. The API Token used for the request reached'\
                              ' the 5000 API Calls per hour threshold',
                             APIException))
    .execute
end