Class: QwilAPI::ManagersApi
- Inherits:
-
Object
- Object
- QwilAPI::ManagersApi
- Defined in:
- lib/qwil_api/api/managers_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ ManagersApi
constructor
A new instance of ManagersApi.
-
#manager_platform_create(manager_pk, name, company_information, opts = {}) ⇒ ManagerPlatformSerializer
Endpoint for the Platforms owned by a Manager Endpoint for the Platforms owned by a Manager.
-
#manager_platform_create_with_http_info(manager_pk, name, company_information, opts = {}) ⇒ Array<(ManagerPlatformSerializer, Fixnum, Hash)>
Endpoint for the Platforms owned by a Manager Endpoint for the Platforms owned by a Manager.
-
#manager_platform_list(manager_pk, opts = {}) ⇒ Array<ManagerPlatformSerializer>
Endpoint for the Platforms owned by a Manager Endpoint for the Platforms owned by a Manager.
-
#manager_platform_list_with_http_info(manager_pk, opts = {}) ⇒ Array<(Array<ManagerPlatformSerializer>, Fixnum, Hash)>
Endpoint for the Platforms owned by a Manager Endpoint for the Platforms owned by a Manager.
-
#manager_retrieve(pk, opts = {}) ⇒ ManagerSerializer
Endpoint for Manager objects, which describe entities that can create and manage Platforms Endpoint for Manager objects, which describe entities that can create and manage Platforms.
-
#manager_retrieve_with_http_info(pk, opts = {}) ⇒ Array<(ManagerSerializer, Fixnum, Hash)>
Endpoint for Manager objects, which describe entities that can create and manage Platforms Endpoint for Manager objects, which describe entities that can create and manage Platforms.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ManagersApi
Returns a new instance of ManagersApi.
28 29 30 |
# File 'lib/qwil_api/api/managers_api.rb', line 28 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
26 27 28 |
# File 'lib/qwil_api/api/managers_api.rb', line 26 def api_client @api_client end |
Instance Method Details
#manager_platform_create(manager_pk, name, company_information, opts = {}) ⇒ ManagerPlatformSerializer
Endpoint for the Platforms owned by a Manager Endpoint for the Platforms owned by a Manager.
45 46 47 48 |
# File 'lib/qwil_api/api/managers_api.rb', line 45 def manager_platform_create(manager_pk, name, company_information, opts = {}) data, _status_code, _headers = manager_platform_create_with_http_info(manager_pk, name, company_information, opts) return data end |
#manager_platform_create_with_http_info(manager_pk, name, company_information, opts = {}) ⇒ Array<(ManagerPlatformSerializer, Fixnum, Hash)>
Endpoint for the Platforms owned by a Manager Endpoint for the Platforms owned by a Manager.
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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/qwil_api/api/managers_api.rb', line 63 def manager_platform_create_with_http_info(manager_pk, name, company_information, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ManagersApi.manager_platform_create ..." end # verify the required parameter 'manager_pk' is set fail ArgumentError, "Missing the required parameter 'manager_pk' when calling ManagersApi.manager_platform_create" if manager_pk.nil? # verify the required parameter 'name' is set fail ArgumentError, "Missing the required parameter 'name' when calling ManagersApi.manager_platform_create" if name.nil? # verify the required parameter 'company_information' is set fail ArgumentError, "Missing the required parameter 'company_information' when calling ManagersApi.manager_platform_create" if company_information.nil? if opts[:'currency'] && !['USD', 'GBP'].include?(opts[:'currency']) fail ArgumentError, 'invalid value for "currency", must be one of USD, GBP' end if opts[:'payment_schedule'] && !['WEEKLY', 'FORTNIGHT', 'MONTHLY', 'DAILY'].include?(opts[:'payment_schedule']) fail ArgumentError, 'invalid value for "payment_schedule", must be one of WEEKLY, FORTNIGHT, MONTHLY, DAILY' end # resource path local_var_path = "/managers/{manager_pk}/platforms/".sub('{format}','json').sub('{' + 'manager_pk' + '}', manager_pk.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["name"] = name form_params["company_information"] = company_information form_params["contact_information"] = opts[:'contact_information'] if !opts[:'contact_information'].nil? form_params["currency"] = opts[:'currency'] if !opts[:'currency'].nil? form_params["payment_schedule"] = opts[:'payment_schedule'] if !opts[:'payment_schedule'].nil? form_params["payment_date"] = opts[:'payment_date'] if !opts[:'payment_date'].nil? form_params["accounts"] = opts[:'accounts'] if !opts[:'accounts'].nil? form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil? # http body (model) post_body = nil auth_names = [] 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 => 'ManagerPlatformSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: ManagersApi#manager_platform_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#manager_platform_list(manager_pk, opts = {}) ⇒ Array<ManagerPlatformSerializer>
Endpoint for the Platforms owned by a Manager Endpoint for the Platforms owned by a Manager.
128 129 130 131 |
# File 'lib/qwil_api/api/managers_api.rb', line 128 def manager_platform_list(manager_pk, opts = {}) data, _status_code, _headers = manager_platform_list_with_http_info(manager_pk, opts) return data end |
#manager_platform_list_with_http_info(manager_pk, opts = {}) ⇒ Array<(Array<ManagerPlatformSerializer>, Fixnum, Hash)>
Endpoint for the Platforms owned by a Manager Endpoint for the Platforms owned by a Manager.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/qwil_api/api/managers_api.rb', line 138 def manager_platform_list_with_http_info(manager_pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ManagersApi.manager_platform_list ..." end # verify the required parameter 'manager_pk' is set fail ArgumentError, "Missing the required parameter 'manager_pk' when calling ManagersApi.manager_platform_list" if manager_pk.nil? # resource path local_var_path = "/managers/{manager_pk}/platforms/".sub('{format}','json').sub('{' + 'manager_pk' + '}', manager_pk.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'Array<ManagerPlatformSerializer>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ManagersApi#manager_platform_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#manager_retrieve(pk, opts = {}) ⇒ ManagerSerializer
Endpoint for Manager objects, which describe entities that can create and manage Platforms Endpoint for Manager objects, which describe entities that can create and manage Platforms.
185 186 187 188 |
# File 'lib/qwil_api/api/managers_api.rb', line 185 def manager_retrieve(pk, opts = {}) data, _status_code, _headers = manager_retrieve_with_http_info(pk, opts) return data end |
#manager_retrieve_with_http_info(pk, opts = {}) ⇒ Array<(ManagerSerializer, Fixnum, Hash)>
Endpoint for Manager objects, which describe entities that can create and manage Platforms Endpoint for Manager objects, which describe entities that can create and manage Platforms.
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/qwil_api/api/managers_api.rb', line 195 def manager_retrieve_with_http_info(pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ManagersApi.manager_retrieve ..." end # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling ManagersApi.manager_retrieve" if pk.nil? # resource path local_var_path = "/managers/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'ManagerSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: ManagersApi#manager_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |