=begin
#Budgea API Documentation
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.1
=end
require 'uri'
module BudgeaClient
class ConnectionsApi
attr_accessor :api_client
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
# Get list of connectors
#
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse2008]
def banks_get(opts = {})
data, _status_code, _headers = banks_get_with_http_info(opts)
data
end
# Get list of connectors
#
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse2008, Fixnum, Hash)>] InlineResponse2008 data, response status code and response headers
def banks_get_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.banks_get ...'
end
# resource path
local_var_path = '/banks'
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse2008')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#banks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get a subset of id_connection with the largest diversity of account
# By default, it selects a set of 3 connections.
# @param id_connector
# @param [Hash] opts the optional parameters
# @option opts [Integer] :range the length of the connection subset
# @option opts [Integer] :type to target a specific account type which will be
# @option opts [Integer] :occurrences require at least N accounts of the targeted
# @option opts [String] :expand
# @return [InlineResponse2009]
def banks_id_connector_connections_get(id_connector, opts = {})
data, _status_code, _headers = banks_id_connector_connections_get_with_http_info(id_connector, opts)
data
end
# Get a subset of id_connection with the largest diversity of account
# By default, it selects a set of 3 connections.<br><br>
# @param id_connector
# @param [Hash] opts the optional parameters
# @option opts [Integer] :range the length of the connection subset
# @option opts [Integer] :type to target a specific account type which will be
# @option opts [Integer] :occurrences require at least N accounts of the targeted
# @option opts [String] :expand
# @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers
def banks_id_connector_connections_get_with_http_info(id_connector, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.banks_id_connector_connections_get ...'
end
# verify the required parameter 'id_connector' is set
if @api_client.config.client_side_validation && id_connector.nil?
fail ArgumentError, "Missing the required parameter 'id_connector' when calling ConnectionsApi.banks_id_connector_connections_get"
end
# resource path
local_var_path = '/banks/{id_connector}/connections'.sub('{' + 'id_connector' + '}', id_connector.to_s)
# query parameters
query_params = {}
query_params[:'range'] = opts[:'range'] if !opts[:'range'].nil?
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
query_params[:'occurrences'] = opts[:'occurrences'] if !opts[:'occurrences'].nil?
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse2009')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#banks_id_connector_connections_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get list of connector sources
#
# @param id_connector
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse20011]
def banks_id_connector_sources_get(id_connector, opts = {})
data, _status_code, _headers = banks_id_connector_sources_get_with_http_info(id_connector, opts)
data
end
# Get list of connector sources
#
# @param id_connector
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse20011, Fixnum, Hash)>] InlineResponse20011 data, response status code and response headers
def banks_id_connector_sources_get_with_http_info(id_connector, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.banks_id_connector_sources_get ...'
end
# verify the required parameter 'id_connector' is set
if @api_client.config.client_side_validation && id_connector.nil?
fail ArgumentError, "Missing the required parameter 'id_connector' when calling ConnectionsApi.banks_id_connector_sources_get"
end
# resource path
local_var_path = '/banks/{id_connector}/sources'.sub('{' + 'id_connector' + '}', id_connector.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20011')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#banks_id_connector_sources_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get connections without a user
#
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse2009]
def connections_get(opts = {})
data, _status_code, _headers = connections_get_with_http_info(opts)
data
end
# Get connections without a user
#
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers
def connections_get_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.connections_get ...'
end
# resource path
local_var_path = '/connections'
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse2009')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#connections_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get connection logs
# Get logs about connections.
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit limit number of results
# @option opts [Integer] :offset offset of first result
# @option opts [Date] :min_date minimal date
# @option opts [Date] :max_date maximum date
# @option opts [Integer] :state state of user
# @option opts [String] :period period to group logs
# @option opts [Integer] :id_user ID of a user
# @option opts [Integer] :id_connection2 ID of a connection
# @option opts [Integer] :id_connector ID of a connector
# @option opts [BOOLEAN] :charged consider only logs for charged connectors
# @option opts [Integer] :id_source ID of a source
# @option opts [String] :expand
# @return [InlineResponse20015]
def connections_id_connection_logs_get(id_connection, opts = {})
data, _status_code, _headers = connections_id_connection_logs_get_with_http_info(id_connection, opts)
data
end
# Get connection logs
# Get logs about connections.<br><br>
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit limit number of results
# @option opts [Integer] :offset offset of first result
# @option opts [Date] :min_date minimal date
# @option opts [Date] :max_date maximum date
# @option opts [Integer] :state state of user
# @option opts [String] :period period to group logs
# @option opts [Integer] :id_user ID of a user
# @option opts [Integer] :id_connection2 ID of a connection
# @option opts [Integer] :id_connector ID of a connector
# @option opts [BOOLEAN] :charged consider only logs for charged connectors
# @option opts [Integer] :id_source ID of a source
# @option opts [String] :expand
# @return [Array<(InlineResponse20015, Fixnum, Hash)>] InlineResponse20015 data, response status code and response headers
def connections_id_connection_logs_get_with_http_info(id_connection, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.connections_id_connection_logs_get ...'
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.connections_id_connection_logs_get"
end
# resource path
local_var_path = '/connections/{id_connection}/logs'.sub('{' + 'id_connection' + '}', id_connection.to_s)
# query parameters
query_params = {}
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
query_params[:'min_date'] = opts[:'min_date'] if !opts[:'min_date'].nil?
query_params[:'max_date'] = opts[:'max_date'] if !opts[:'max_date'].nil?
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
query_params[:'id_user'] = opts[:'id_user'] if !opts[:'id_user'].nil?
query_params[:'id_connection'] = opts[:'id_connection2'] if !opts[:'id_connection2'].nil?
query_params[:'id_connector'] = opts[:'id_connector'] if !opts[:'id_connector'].nil?
query_params[:'charged'] = opts[:'charged'] if !opts[:'charged'].nil?
query_params[:'id_source'] = opts[:'id_source'] if !opts[:'id_source'].nil?
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20015')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#connections_id_connection_logs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get connection sources
#
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse20016]
def connections_id_connection_sources_get(id_connection, opts = {})
data, _status_code, _headers = connections_id_connection_sources_get_with_http_info(id_connection, opts)
data
end
# Get connection sources
#
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse20016, Fixnum, Hash)>] InlineResponse20016 data, response status code and response headers
def connections_id_connection_sources_get_with_http_info(id_connection, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.connections_id_connection_sources_get ...'
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.connections_id_connection_sources_get"
end
# resource path
local_var_path = '/connections/{id_connection}/sources'.sub('{' + 'id_connection' + '}', id_connection.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20016')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#connections_id_connection_sources_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Disable a connection source
# This will make it so the specified source will not be synchronized anymore.
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [ConnectionSource]
def connections_id_connection_sources_id_source_delete(id_connection, id_source, opts = {})
data, _status_code, _headers = connections_id_connection_sources_id_source_delete_with_http_info(id_connection, id_source, opts)
data
end
# Disable a connection source
# This will make it so the specified source will not be synchronized anymore.<br><br>
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(ConnectionSource, Fixnum, Hash)>] ConnectionSource data, response status code and response headers
def connections_id_connection_sources_id_source_delete_with_http_info(id_connection, id_source, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.connections_id_connection_sources_id_source_delete ...'
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.connections_id_connection_sources_id_source_delete"
end
# verify the required parameter 'id_source' is set
if @api_client.config.client_side_validation && id_source.nil?
fail ArgumentError, "Missing the required parameter 'id_source' when calling ConnectionsApi.connections_id_connection_sources_id_source_delete"
end
# resource path
local_var_path = '/connections/{id_connection}/sources/{id_source}'.sub('{' + 'id_connection' + '}', id_connection.to_s).sub('{' + 'id_source' + '}', id_source.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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,
:return_type => 'ConnectionSource')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#connections_id_connection_sources_id_source_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Enable connection source
# This will make it so the specified source will be able to be synchronized.
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [ConnectionSource]
def connections_id_connection_sources_id_source_post(id_connection, id_source, opts = {})
data, _status_code, _headers = connections_id_connection_sources_id_source_post_with_http_info(id_connection, id_source, opts)
data
end
# Enable connection source
# This will make it so the specified source will be able to be synchronized.<br><br>
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(ConnectionSource, Fixnum, Hash)>] ConnectionSource data, response status code and response headers
def connections_id_connection_sources_id_source_post_with_http_info(id_connection, id_source, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.connections_id_connection_sources_id_source_post ...'
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.connections_id_connection_sources_id_source_post"
end
# verify the required parameter 'id_source' is set
if @api_client.config.client_side_validation && id_source.nil?
fail ArgumentError, "Missing the required parameter 'id_source' when calling ConnectionsApi.connections_id_connection_sources_id_source_post"
end
# resource path
local_var_path = '/connections/{id_connection}/sources/{id_source}'.sub('{' + 'id_connection' + '}', id_connection.to_s).sub('{' + 'id_source' + '}', id_source.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'ConnectionSource')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#connections_id_connection_sources_id_source_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Enable connection source
# This will make it so the specified source will be able to be synchronized.
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [ConnectionSource]
def connections_id_connection_sources_id_source_put(id_connection, id_source, opts = {})
data, _status_code, _headers = connections_id_connection_sources_id_source_put_with_http_info(id_connection, id_source, opts)
data
end
# Enable connection source
# This will make it so the specified source will be able to be synchronized.<br><br>
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(ConnectionSource, Fixnum, Hash)>] ConnectionSource data, response status code and response headers
def connections_id_connection_sources_id_source_put_with_http_info(id_connection, id_source, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.connections_id_connection_sources_id_source_put ...'
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.connections_id_connection_sources_id_source_put"
end
# verify the required parameter 'id_source' is set
if @api_client.config.client_side_validation && id_source.nil?
fail ArgumentError, "Missing the required parameter 'id_source' when calling ConnectionsApi.connections_id_connection_sources_id_source_put"
end
# resource path
local_var_path = '/connections/{id_connection}/sources/{id_source}'.sub('{' + 'id_connection' + '}', id_connection.to_s).sub('{' + 'id_source' + '}', id_source.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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,
:return_type => 'ConnectionSource')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#connections_id_connection_sources_id_source_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get list of connectors
#
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse20017]
def connectors_get(opts = {})
data, _status_code, _headers = connectors_get_with_http_info(opts)
data
end
# Get list of connectors
#
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse20017, Fixnum, Hash)>] InlineResponse20017 data, response status code and response headers
def connectors_get_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.connectors_get ...'
end
# resource path
local_var_path = '/connectors'
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20017')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#connectors_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get list of connector sources
#
# @param id_connector
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse20011]
def connectors_id_connector_sources_get(id_connector, opts = {})
data, _status_code, _headers = connectors_id_connector_sources_get_with_http_info(id_connector, opts)
data
end
# Get list of connector sources
#
# @param id_connector
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse20011, Fixnum, Hash)>] InlineResponse20011 data, response status code and response headers
def connectors_id_connector_sources_get_with_http_info(id_connector, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.connectors_id_connector_sources_get ...'
end
# verify the required parameter 'id_connector' is set
if @api_client.config.client_side_validation && id_connector.nil?
fail ArgumentError, "Missing the required parameter 'id_connector' when calling ConnectionsApi.connectors_id_connector_sources_get"
end
# resource path
local_var_path = '/connectors/{id_connector}/sources'.sub('{' + 'id_connector' + '}', id_connector.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20011')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#connectors_id_connector_sources_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Edit the provided connector source
#
# @param id_connector
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :auth_mechanism the authentication mechanism to use for this connector source
# @option opts [DateTime] :disabled to enable or disable connector source
# @option opts [String] :expand
# @return [ConnectorSource]
def connectors_id_connector_sources_id_source_put(id_connector, id_source, opts = {})
data, _status_code, _headers = connectors_id_connector_sources_id_source_put_with_http_info(id_connector, id_source, opts)
data
end
# Edit the provided connector source
#
# @param id_connector
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :auth_mechanism the authentication mechanism to use for this connector source
# @option opts [DateTime] :disabled to enable or disable connector source
# @option opts [String] :expand
# @return [Array<(ConnectorSource, Fixnum, Hash)>] ConnectorSource data, response status code and response headers
def connectors_id_connector_sources_id_source_put_with_http_info(id_connector, id_source, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.connectors_id_connector_sources_id_source_put ...'
end
# verify the required parameter 'id_connector' is set
if @api_client.config.client_side_validation && id_connector.nil?
fail ArgumentError, "Missing the required parameter 'id_connector' when calling ConnectionsApi.connectors_id_connector_sources_id_source_put"
end
# verify the required parameter 'id_source' is set
if @api_client.config.client_side_validation && id_source.nil?
fail ArgumentError, "Missing the required parameter 'id_source' when calling ConnectionsApi.connectors_id_connector_sources_id_source_put"
end
# resource path
local_var_path = '/connectors/{id_connector}/sources/{id_source}'.sub('{' + 'id_connector' + '}', id_connector.to_s).sub('{' + 'id_source' + '}', id_source.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
form_params['auth_mechanism'] = opts[:'auth_mechanism'] if !opts[:'auth_mechanism'].nil?
form_params['disabled'] = opts[:'disabled'] if !opts[:'disabled'].nil?
# http body (model)
post_body = nil
auth_names = ['api_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,
:return_type => 'ConnectorSource')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#connectors_id_connector_sources_id_source_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Request a new connector
# Send a request to add a new connector
# @param name Name of the bank or provider
# @param login Users login
# @param password Users password
# @param [Hash] opts the optional parameters
# @option opts [String] :url Url of the bank
# @option opts [String] :email Email of the user
# @option opts [String] :types Type of connector, eg. banks or providers
# @option opts [String] :comment Optionnal comment
# @option opts [BOOLEAN] :sendmail if set, send an email to user
# @option opts [String] :expand
# @return [Connector]
def connectors_post(name, login, password, opts = {})
data, _status_code, _headers = connectors_post_with_http_info(name, login, password, opts)
data
end
# Request a new connector
# Send a request to add a new connector<br><br>
# @param name Name of the bank or provider
# @param login Users login
# @param password Users password
# @param [Hash] opts the optional parameters
# @option opts [String] :url Url of the bank
# @option opts [String] :email Email of the user
# @option opts [String] :types Type of connector, eg. banks or providers
# @option opts [String] :comment Optionnal comment
# @option opts [BOOLEAN] :sendmail if set, send an email to user
# @option opts [String] :expand
# @return [Array<(Connector, Fixnum, Hash)>] Connector data, response status code and response headers
def connectors_post_with_http_info(name, login, password, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.connectors_post ...'
end
# verify the required parameter 'name' is set
if @api_client.config.client_side_validation && name.nil?
fail ArgumentError, "Missing the required parameter 'name' when calling ConnectionsApi.connectors_post"
end
# verify the required parameter 'login' is set
if @api_client.config.client_side_validation && login.nil?
fail ArgumentError, "Missing the required parameter 'login' when calling ConnectionsApi.connectors_post"
end
# verify the required parameter 'password' is set
if @api_client.config.client_side_validation && password.nil?
fail ArgumentError, "Missing the required parameter 'password' when calling ConnectionsApi.connectors_post"
end
# resource path
local_var_path = '/connectors'
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
form_params['name'] = name
form_params['login'] = login
form_params['password'] = password
form_params['url'] = opts[:'url'] if !opts[:'url'].nil?
form_params['email'] = opts[:'email'] if !opts[:'email'].nil?
form_params['types'] = opts[:'types'] if !opts[:'types'].nil?
form_params['comment'] = opts[:'comment'] if !opts[:'comment'].nil?
form_params['sendmail'] = opts[:'sendmail'] if !opts[:'sendmail'].nil?
# http body (model)
post_body = nil
auth_names = ['api_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 => 'Connector')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#connectors_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get connection logs
# Get logs about connections.
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit limit number of results
# @option opts [Integer] :offset offset of first result
# @option opts [Date] :min_date minimal date
# @option opts [Date] :max_date maximum date
# @option opts [Integer] :state state of user
# @option opts [String] :period period to group logs
# @option opts [Integer] :id_user ID of a user
# @option opts [Integer] :id_connection ID of a connection
# @option opts [Integer] :id_connector ID of a connector
# @option opts [BOOLEAN] :charged consider only logs for charged connectors
# @option opts [Integer] :id_source ID of a source
# @option opts [String] :expand
# @return [InlineResponse20015]
def logs_get(opts = {})
data, _status_code, _headers = logs_get_with_http_info(opts)
data
end
# Get connection logs
# Get logs about connections.<br><br>
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit limit number of results
# @option opts [Integer] :offset offset of first result
# @option opts [Date] :min_date minimal date
# @option opts [Date] :max_date maximum date
# @option opts [Integer] :state state of user
# @option opts [String] :period period to group logs
# @option opts [Integer] :id_user ID of a user
# @option opts [Integer] :id_connection ID of a connection
# @option opts [Integer] :id_connector ID of a connector
# @option opts [BOOLEAN] :charged consider only logs for charged connectors
# @option opts [Integer] :id_source ID of a source
# @option opts [String] :expand
# @return [Array<(InlineResponse20015, Fixnum, Hash)>] InlineResponse20015 data, response status code and response headers
def logs_get_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.logs_get ...'
end
# resource path
local_var_path = '/logs'
# query parameters
query_params = {}
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
query_params[:'min_date'] = opts[:'min_date'] if !opts[:'min_date'].nil?
query_params[:'max_date'] = opts[:'max_date'] if !opts[:'max_date'].nil?
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
query_params[:'id_user'] = opts[:'id_user'] if !opts[:'id_user'].nil?
query_params[:'id_connection'] = opts[:'id_connection'] if !opts[:'id_connection'].nil?
query_params[:'id_connector'] = opts[:'id_connector'] if !opts[:'id_connector'].nil?
query_params[:'charged'] = opts[:'charged'] if !opts[:'charged'].nil?
query_params[:'id_source'] = opts[:'id_source'] if !opts[:'id_source'].nil?
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20015')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#logs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get list of connectors
#
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse20020]
def providers_get(opts = {})
data, _status_code, _headers = providers_get_with_http_info(opts)
data
end
# Get list of connectors
#
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse20020, Fixnum, Hash)>] InlineResponse20020 data, response status code and response headers
def providers_get_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.providers_get ...'
end
# resource path
local_var_path = '/providers'
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20020')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#providers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get a random subset of provider's id_connection
# By default, it selects a set of 3 connections.
# @param id_connector
# @param [Hash] opts the optional parameters
# @option opts [Integer] :range the length of the connection subset
# @option opts [String] :expand
# @return [InlineResponse2009]
def providers_id_connector_connections_get(id_connector, opts = {})
data, _status_code, _headers = providers_id_connector_connections_get_with_http_info(id_connector, opts)
data
end
# Get a random subset of provider's id_connection
# By default, it selects a set of 3 connections.<br><br>
# @param id_connector
# @param [Hash] opts the optional parameters
# @option opts [Integer] :range the length of the connection subset
# @option opts [String] :expand
# @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers
def providers_id_connector_connections_get_with_http_info(id_connector, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.providers_id_connector_connections_get ...'
end
# verify the required parameter 'id_connector' is set
if @api_client.config.client_side_validation && id_connector.nil?
fail ArgumentError, "Missing the required parameter 'id_connector' when calling ConnectionsApi.providers_id_connector_connections_get"
end
# resource path
local_var_path = '/providers/{id_connector}/connections'.sub('{' + 'id_connector' + '}', id_connector.to_s)
# query parameters
query_params = {}
query_params[:'range'] = opts[:'range'] if !opts[:'range'].nil?
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse2009')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#providers_id_connector_connections_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get list of connector sources
#
# @param id_connector
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse20011]
def providers_id_connector_sources_get(id_connector, opts = {})
data, _status_code, _headers = providers_id_connector_sources_get_with_http_info(id_connector, opts)
data
end
# Get list of connector sources
#
# @param id_connector
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse20011, Fixnum, Hash)>] InlineResponse20011 data, response status code and response headers
def providers_id_connector_sources_get_with_http_info(id_connector, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.providers_id_connector_sources_get ...'
end
# verify the required parameter 'id_connector' is set
if @api_client.config.client_side_validation && id_connector.nil?
fail ArgumentError, "Missing the required parameter 'id_connector' when calling ConnectionsApi.providers_id_connector_sources_get"
end
# resource path
local_var_path = '/providers/{id_connector}/sources'.sub('{' + 'id_connector' + '}', id_connector.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20011')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#providers_id_connector_sources_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Delete all connections
#
# @param id_user Hint: you can use 'me' or 'all'
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Connection]
def users_id_user_connections_delete(id_user, opts = {})
data, _status_code, _headers = users_id_user_connections_delete_with_http_info(id_user, opts)
data
end
# Delete all connections
#
# @param id_user Hint: you can use 'me' or 'all'
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(Connection, Fixnum, Hash)>] Connection data, response status code and response headers
def users_id_user_connections_delete_with_http_info(id_user, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_delete ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_delete"
end
# resource path
local_var_path = '/users/{id_user}/connections'.sub('{' + 'id_user' + '}', id_user.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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,
:return_type => 'Connection')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get connections
#
# @param id_user Hint: you can use 'me' or 'all'
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse2009]
def users_id_user_connections_get(id_user, opts = {})
data, _status_code, _headers = users_id_user_connections_get_with_http_info(id_user, opts)
data
end
# Get connections
#
# @param id_user Hint: you can use 'me' or 'all'
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers
def users_id_user_connections_get_with_http_info(id_user, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_get ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_get"
end
# resource path
local_var_path = '/users/{id_user}/connections'.sub('{' + 'id_user' + '}', id_user.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse2009')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Delete a connection.
# This endpoint deletes a connection and all related accounts and transactions.
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Connection]
def users_id_user_connections_id_connection_delete(id_user, id_connection, opts = {})
data, _status_code, _headers = users_id_user_connections_id_connection_delete_with_http_info(id_user, id_connection, opts)
data
end
# Delete a connection.
# This endpoint deletes a connection and all related accounts and transactions.<br><br>
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(Connection, Fixnum, Hash)>] Connection data, response status code and response headers
def users_id_user_connections_id_connection_delete_with_http_info(id_user, id_connection, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_id_connection_delete ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_id_connection_delete"
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.users_id_user_connections_id_connection_delete"
end
# resource path
local_var_path = '/users/{id_user}/connections/{id_connection}'.sub('{' + 'id_user' + '}', id_user.to_s).sub('{' + 'id_connection' + '}', id_connection.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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,
:return_type => 'Connection')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_id_connection_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get connection
# Get connection by ID
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Connection]
def users_id_user_connections_id_connection_get(id_user, id_connection, opts = {})
data, _status_code, _headers = users_id_user_connections_id_connection_get_with_http_info(id_user, id_connection, opts)
data
end
# Get connection
# Get connection by ID
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(Connection, Fixnum, Hash)>] Connection data, response status code and response headers
def users_id_user_connections_id_connection_get_with_http_info(id_user, id_connection, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_id_connection_get ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_id_connection_get"
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.users_id_user_connections_id_connection_get"
end
# resource path
local_var_path = '/users/{id_user}/connections/{id_connection}'.sub('{' + 'id_user' + '}', id_user.to_s).sub('{' + 'id_connection' + '}', id_connection.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'Connection')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_id_connection_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get connection additionnal informations
#
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse2009]
def users_id_user_connections_id_connection_informations_get(id_user, id_connection, opts = {})
data, _status_code, _headers = users_id_user_connections_id_connection_informations_get_with_http_info(id_user, id_connection, opts)
data
end
# Get connection additionnal informations
# <br><br>
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers
def users_id_user_connections_id_connection_informations_get_with_http_info(id_user, id_connection, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_id_connection_informations_get ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_id_connection_informations_get"
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.users_id_user_connections_id_connection_informations_get"
end
# resource path
local_var_path = '/users/{id_user}/connections/{id_connection}/informations'.sub('{' + 'id_user' + '}', id_user.to_s).sub('{' + 'id_connection' + '}', id_connection.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse2009')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_id_connection_informations_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get connection logs
# Get logs about connections.
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit limit number of results
# @option opts [Integer] :offset offset of first result
# @option opts [Date] :min_date minimal date
# @option opts [Date] :max_date maximum date
# @option opts [Integer] :state state of user
# @option opts [String] :period period to group logs
# @option opts [Integer] :id_user2 ID of a user
# @option opts [Integer] :id_connection2 ID of a connection
# @option opts [Integer] :id_connector ID of a connector
# @option opts [BOOLEAN] :charged consider only logs for charged connectors
# @option opts [Integer] :id_source ID of a source
# @option opts [String] :expand
# @return [InlineResponse20015]
def users_id_user_connections_id_connection_logs_get(id_user, id_connection, opts = {})
data, _status_code, _headers = users_id_user_connections_id_connection_logs_get_with_http_info(id_user, id_connection, opts)
data
end
# Get connection logs
# Get logs about connections.<br><br>
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit limit number of results
# @option opts [Integer] :offset offset of first result
# @option opts [Date] :min_date minimal date
# @option opts [Date] :max_date maximum date
# @option opts [Integer] :state state of user
# @option opts [String] :period period to group logs
# @option opts [Integer] :id_user2 ID of a user
# @option opts [Integer] :id_connection2 ID of a connection
# @option opts [Integer] :id_connector ID of a connector
# @option opts [BOOLEAN] :charged consider only logs for charged connectors
# @option opts [Integer] :id_source ID of a source
# @option opts [String] :expand
# @return [Array<(InlineResponse20015, Fixnum, Hash)>] InlineResponse20015 data, response status code and response headers
def users_id_user_connections_id_connection_logs_get_with_http_info(id_user, id_connection, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_id_connection_logs_get ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_id_connection_logs_get"
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.users_id_user_connections_id_connection_logs_get"
end
# resource path
local_var_path = '/users/{id_user}/connections/{id_connection}/logs'.sub('{' + 'id_user' + '}', id_user.to_s).sub('{' + 'id_connection' + '}', id_connection.to_s)
# query parameters
query_params = {}
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
query_params[:'min_date'] = opts[:'min_date'] if !opts[:'min_date'].nil?
query_params[:'max_date'] = opts[:'max_date'] if !opts[:'max_date'].nil?
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
query_params[:'id_user'] = opts[:'id_user2'] if !opts[:'id_user2'].nil?
query_params[:'id_connection'] = opts[:'id_connection2'] if !opts[:'id_connection2'].nil?
query_params[:'id_connector'] = opts[:'id_connector'] if !opts[:'id_connector'].nil?
query_params[:'charged'] = opts[:'charged'] if !opts[:'charged'].nil?
query_params[:'id_source'] = opts[:'id_source'] if !opts[:'id_source'].nil?
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20015')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_id_connection_logs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Update a connection.
# Give new parameters to change on the configuration of this connection (for example \"password\").
It tests connection to website, and if it fails, a 400 response is given with the error code \"wrongpass\" or \"websiteUnavailable\".
You can also supply meta-parameters on connection, like 'active' or 'expire'.
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [BOOLEAN] :active Set if the connection synchronisation is active
# @option opts [DateTime] :expire Set expiration of the connection to this date
# @option opts [String] :login Set login to this new login
# @option opts [String] :password Set password to this new password
# @option opts [BOOLEAN] :decoupled Try to update a connection with the decoupled error
# @option opts [String] :expand
# @return [Connection]
def users_id_user_connections_id_connection_post(id_user, id_connection, opts = {})
data, _status_code, _headers = users_id_user_connections_id_connection_post_with_http_info(id_user, id_connection, opts)
data
end
# Update a connection.
# Give new parameters to change on the configuration of this connection (for example \"password\").<br><br>It tests connection to website, and if it fails, a 400 response is given with the error code \"wrongpass\" or \"websiteUnavailable\".<br><br>You can also supply meta-parameters on connection, like 'active' or 'expire'.<br><br>
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [BOOLEAN] :active Set if the connection synchronisation is active
# @option opts [DateTime] :expire Set expiration of the connection to this date
# @option opts [String] :login Set login to this new login
# @option opts [String] :password Set password to this new password
# @option opts [BOOLEAN] :decoupled Try to update a connection with the decoupled error
# @option opts [String] :expand
# @return [Array<(Connection, Fixnum, Hash)>] Connection data, response status code and response headers
def users_id_user_connections_id_connection_post_with_http_info(id_user, id_connection, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_id_connection_post ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_id_connection_post"
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.users_id_user_connections_id_connection_post"
end
# resource path
local_var_path = '/users/{id_user}/connections/{id_connection}'.sub('{' + 'id_user' + '}', id_user.to_s).sub('{' + 'id_connection' + '}', id_connection.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
form_params['active'] = opts[:'active'] if !opts[:'active'].nil?
form_params['expire'] = opts[:'expire'] if !opts[:'expire'].nil?
form_params['login'] = opts[:'login'] if !opts[:'login'].nil?
form_params['password'] = opts[:'password'] if !opts[:'password'].nil?
form_params['decoupled'] = opts[:'decoupled'] if !opts[:'decoupled'].nil?
# http body (model)
post_body = nil
auth_names = ['api_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 => 'Connection')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_id_connection_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Force synchronisation of a connection.
# We suggest to pass parameter expand=accounts[transactions] to get all *new* and *updated* transactions.
Query params: - expand (string): fields to expand - last_update (dateTime): if supplied, get transactions inserted since this date
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Connection]
def users_id_user_connections_id_connection_put(id_user, id_connection, opts = {})
data, _status_code, _headers = users_id_user_connections_id_connection_put_with_http_info(id_user, id_connection, opts)
data
end
# Force synchronisation of a connection.
# We suggest to pass parameter expand=accounts[transactions] to get all *new* and *updated* transactions.<br><br>Query params: - expand (string): fields to expand - last_update (dateTime): if supplied, get transactions inserted since this date<br><br>
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(Connection, Fixnum, Hash)>] Connection data, response status code and response headers
def users_id_user_connections_id_connection_put_with_http_info(id_user, id_connection, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_id_connection_put ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_id_connection_put"
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.users_id_user_connections_id_connection_put"
end
# resource path
local_var_path = '/users/{id_user}/connections/{id_connection}'.sub('{' + 'id_user' + '}', id_user.to_s).sub('{' + 'id_connection' + '}', id_connection.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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,
:return_type => 'Connection')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_id_connection_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get connection sources
#
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [InlineResponse20016]
def users_id_user_connections_id_connection_sources_get(id_user, id_connection, opts = {})
data, _status_code, _headers = users_id_user_connections_id_connection_sources_get_with_http_info(id_user, id_connection, opts)
data
end
# Get connection sources
#
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(InlineResponse20016, Fixnum, Hash)>] InlineResponse20016 data, response status code and response headers
def users_id_user_connections_id_connection_sources_get_with_http_info(id_user, id_connection, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_id_connection_sources_get ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_get"
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_get"
end
# resource path
local_var_path = '/users/{id_user}/connections/{id_connection}/sources'.sub('{' + 'id_user' + '}', id_user.to_s).sub('{' + 'id_connection' + '}', id_connection.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20016')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_id_connection_sources_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Disable a connection source
# This will make it so the specified source will not be synchronized anymore.
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [ConnectionSource]
def users_id_user_connections_id_connection_sources_id_source_delete(id_user, id_connection, id_source, opts = {})
data, _status_code, _headers = users_id_user_connections_id_connection_sources_id_source_delete_with_http_info(id_user, id_connection, id_source, opts)
data
end
# Disable a connection source
# This will make it so the specified source will not be synchronized anymore.<br><br>
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(ConnectionSource, Fixnum, Hash)>] ConnectionSource data, response status code and response headers
def users_id_user_connections_id_connection_sources_id_source_delete_with_http_info(id_user, id_connection, id_source, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_delete ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_delete"
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_delete"
end
# verify the required parameter 'id_source' is set
if @api_client.config.client_side_validation && id_source.nil?
fail ArgumentError, "Missing the required parameter 'id_source' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_delete"
end
# resource path
local_var_path = '/users/{id_user}/connections/{id_connection}/sources/{id_source}'.sub('{' + 'id_user' + '}', id_user.to_s).sub('{' + 'id_connection' + '}', id_connection.to_s).sub('{' + 'id_source' + '}', id_source.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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,
:return_type => 'ConnectionSource')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_id_connection_sources_id_source_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Enable connection source
# This will make it so the specified source will be able to be synchronized.
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [ConnectionSource]
def users_id_user_connections_id_connection_sources_id_source_post(id_user, id_connection, id_source, opts = {})
data, _status_code, _headers = users_id_user_connections_id_connection_sources_id_source_post_with_http_info(id_user, id_connection, id_source, opts)
data
end
# Enable connection source
# This will make it so the specified source will be able to be synchronized.<br><br>
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(ConnectionSource, Fixnum, Hash)>] ConnectionSource data, response status code and response headers
def users_id_user_connections_id_connection_sources_id_source_post_with_http_info(id_user, id_connection, id_source, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_post ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_post"
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_post"
end
# verify the required parameter 'id_source' is set
if @api_client.config.client_side_validation && id_source.nil?
fail ArgumentError, "Missing the required parameter 'id_source' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_post"
end
# resource path
local_var_path = '/users/{id_user}/connections/{id_connection}/sources/{id_source}'.sub('{' + 'id_user' + '}', id_user.to_s).sub('{' + 'id_connection' + '}', id_connection.to_s).sub('{' + 'id_source' + '}', id_source.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'ConnectionSource')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_id_connection_sources_id_source_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Enable connection source
# This will make it so the specified source will be able to be synchronized.
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [ConnectionSource]
def users_id_user_connections_id_connection_sources_id_source_put(id_user, id_connection, id_source, opts = {})
data, _status_code, _headers = users_id_user_connections_id_connection_sources_id_source_put_with_http_info(id_user, id_connection, id_source, opts)
data
end
# Enable connection source
# This will make it so the specified source will be able to be synchronized.<br><br>
# @param id_user Hint: you can use 'me' or 'all'
# @param id_connection
# @param id_source
# @param [Hash] opts the optional parameters
# @option opts [String] :expand
# @return [Array<(ConnectionSource, Fixnum, Hash)>] ConnectionSource data, response status code and response headers
def users_id_user_connections_id_connection_sources_id_source_put_with_http_info(id_user, id_connection, id_source, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_put ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_put"
end
# verify the required parameter 'id_connection' is set
if @api_client.config.client_side_validation && id_connection.nil?
fail ArgumentError, "Missing the required parameter 'id_connection' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_put"
end
# verify the required parameter 'id_source' is set
if @api_client.config.client_side_validation && id_source.nil?
fail ArgumentError, "Missing the required parameter 'id_source' when calling ConnectionsApi.users_id_user_connections_id_connection_sources_id_source_put"
end
# resource path
local_var_path = '/users/{id_user}/connections/{id_connection}/sources/{id_source}'.sub('{' + 'id_user' + '}', id_user.to_s).sub('{' + 'id_connection' + '}', id_connection.to_s).sub('{' + 'id_source' + '}', id_source.to_s)
# query parameters
query_params = {}
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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,
:return_type => 'ConnectionSource')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_id_connection_sources_id_source_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Add a new connection.
# Create a new connection to a given bank or provider. You have to give all needed parameters (use /banks/ID/fields or /providers/ID/fields to get them).
# @param id_user Hint: you can use 'me' or 'all'
# @param [Hash] opts the optional parameters
# @option opts [String] :source optional comma-separated list of sources to use for the connection synchronization
# @option opts [Integer] :id_connector ID of the connector
# @option opts [String] :connector_uuid optional uuid of the connector (replaces id_connector)
# @option opts [String] :birthday bank additional login parameter
# @option opts [String] :password bank additional login parameter
# @option opts [String] :oauth_token bank additional login parameter
# @option opts [String] :oauth_token_secret bank additional login parameter
# @option opts [String] :auth_type bank additional login parameter
# @option opts [String] :secret bank additional login parameter
# @option opts [String] :type bank additional login parameter
# @option opts [String] :birthdate bank additional login parameter
# @option opts [String] :otp bank additional login parameter
# @option opts [String] :nuser bank additional login parameter
# @option opts [String] :openapiwebsite bank additional login parameter
# @option opts [String] :website bank additional login parameter
# @option opts [String] :login bank additional login parameter
# @option opts [Integer] :id_provider ID of the provider
# @option opts [BOOLEAN] :resume Resume a decoupled connection creation
# @option opts [String] :expand
# @return [Connection]
def users_id_user_connections_post(id_user, opts = {})
data, _status_code, _headers = users_id_user_connections_post_with_http_info(id_user, opts)
data
end
# Add a new connection.
# Create a new connection to a given bank or provider. You have to give all needed parameters (use /banks/ID/fields or /providers/ID/fields to get them).<br><br>
# @param id_user Hint: you can use 'me' or 'all'
# @param [Hash] opts the optional parameters
# @option opts [String] :source optional comma-separated list of sources to use for the connection synchronization
# @option opts [Integer] :id_connector ID of the connector
# @option opts [String] :connector_uuid optional uuid of the connector (replaces id_connector)
# @option opts [String] :birthday bank additional login parameter
# @option opts [String] :password bank additional login parameter
# @option opts [String] :oauth_token bank additional login parameter
# @option opts [String] :oauth_token_secret bank additional login parameter
# @option opts [String] :auth_type bank additional login parameter
# @option opts [String] :secret bank additional login parameter
# @option opts [String] :type bank additional login parameter
# @option opts [String] :birthdate bank additional login parameter
# @option opts [String] :otp bank additional login parameter
# @option opts [String] :nuser bank additional login parameter
# @option opts [String] :openapiwebsite bank additional login parameter
# @option opts [String] :website bank additional login parameter
# @option opts [String] :login bank additional login parameter
# @option opts [Integer] :id_provider ID of the provider
# @option opts [BOOLEAN] :resume Resume a decoupled connection creation
# @option opts [String] :expand
# @return [Array<(Connection, Fixnum, Hash)>] Connection data, response status code and response headers
def users_id_user_connections_post_with_http_info(id_user, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_connections_post ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_connections_post"
end
# resource path
local_var_path = '/users/{id_user}/connections'.sub('{' + 'id_user' + '}', id_user.to_s)
# query parameters
query_params = {}
query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
form_params['id_connector'] = opts[:'id_connector'] if !opts[:'id_connector'].nil?
form_params['connector_uuid'] = opts[:'connector_uuid'] if !opts[:'connector_uuid'].nil?
form_params['birthday'] = opts[:'birthday'] if !opts[:'birthday'].nil?
form_params['password'] = opts[:'password'] if !opts[:'password'].nil?
form_params['oauth_token'] = opts[:'oauth_token'] if !opts[:'oauth_token'].nil?
form_params['oauth_token_secret'] = opts[:'oauth_token_secret'] if !opts[:'oauth_token_secret'].nil?
form_params['auth_type'] = opts[:'auth_type'] if !opts[:'auth_type'].nil?
form_params['secret'] = opts[:'secret'] if !opts[:'secret'].nil?
form_params['type'] = opts[:'type'] if !opts[:'type'].nil?
form_params['birthdate'] = opts[:'birthdate'] if !opts[:'birthdate'].nil?
form_params['otp'] = opts[:'otp'] if !opts[:'otp'].nil?
form_params['nuser'] = opts[:'nuser'] if !opts[:'nuser'].nil?
form_params['openapiwebsite'] = opts[:'openapiwebsite'] if !opts[:'openapiwebsite'].nil?
form_params['website'] = opts[:'website'] if !opts[:'website'].nil?
form_params['login'] = opts[:'login'] if !opts[:'login'].nil?
form_params['id_provider'] = opts[:'id_provider'] if !opts[:'id_provider'].nil?
form_params['resume'] = opts[:'resume'] if !opts[:'resume'].nil?
# http body (model)
post_body = nil
auth_names = ['api_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 => 'Connection')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_connections_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get connection logs
# Get logs about connections.
# @param id_user Hint: you can use 'me' or 'all'
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit limit number of results
# @option opts [Integer] :offset offset of first result
# @option opts [Date] :min_date minimal date
# @option opts [Date] :max_date maximum date
# @option opts [Integer] :state state of user
# @option opts [String] :period period to group logs
# @option opts [Integer] :id_user2 ID of a user
# @option opts [Integer] :id_connection ID of a connection
# @option opts [Integer] :id_connector ID of a connector
# @option opts [BOOLEAN] :charged consider only logs for charged connectors
# @option opts [Integer] :id_source ID of a source
# @option opts [String] :expand
# @return [InlineResponse20015]
def users_id_user_logs_get(id_user, opts = {})
data, _status_code, _headers = users_id_user_logs_get_with_http_info(id_user, opts)
data
end
# Get connection logs
# Get logs about connections.<br><br>
# @param id_user Hint: you can use 'me' or 'all'
# @param [Hash] opts the optional parameters
# @option opts [Integer] :limit limit number of results
# @option opts [Integer] :offset offset of first result
# @option opts [Date] :min_date minimal date
# @option opts [Date] :max_date maximum date
# @option opts [Integer] :state state of user
# @option opts [String] :period period to group logs
# @option opts [Integer] :id_user2 ID of a user
# @option opts [Integer] :id_connection ID of a connection
# @option opts [Integer] :id_connector ID of a connector
# @option opts [BOOLEAN] :charged consider only logs for charged connectors
# @option opts [Integer] :id_source ID of a source
# @option opts [String] :expand
# @return [Array<(InlineResponse20015, Fixnum, Hash)>] InlineResponse20015 data, response status code and response headers
def users_id_user_logs_get_with_http_info(id_user, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ConnectionsApi.users_id_user_logs_get ...'
end
# verify the required parameter 'id_user' is set
if @api_client.config.client_side_validation && id_user.nil?
fail ArgumentError, "Missing the required parameter 'id_user' when calling ConnectionsApi.users_id_user_logs_get"
end
# resource path
local_var_path = '/users/{id_user}/logs'.sub('{' + 'id_user' + '}', id_user.to_s)
# query parameters
query_params = {}
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
query_params[:'min_date'] = opts[:'min_date'] if !opts[:'min_date'].nil?
query_params[:'max_date'] = opts[:'max_date'] if !opts[:'max_date'].nil?
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?
query_params[:'id_user'] = opts[:'id_user2'] if !opts[:'id_user2'].nil?
query_params[:'id_connection'] = opts[:'id_connection'] if !opts[:'id_connection'].nil?
query_params[:'id_connector'] = opts[:'id_connector'] if !opts[:'id_connector'].nil?
query_params[:'charged'] = opts[:'charged'] if !opts[:'charged'].nil?
query_params[:'id_source'] = opts[:'id_source'] if !opts[:'id_source'].nil?
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].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/x-www-form-urlencoded'])
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['api_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 => 'InlineResponse20015')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ConnectionsApi#users_id_user_logs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
end
end