class QwilAPI::PlatformsApi
Attributes
Public Class Methods
# File lib/qwil_api/api/platforms_api.rb, line 28 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
View to offer a View to offer a ./accept endpoint for accepting a IncomeRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Object]
# File lib/qwil_api/api/platforms_api.rb, line 38 def accept_income_request_get(platform_pk, pk, opts = {}) data, _status_code, _headers = accept_income_request_get_with_http_info(platform_pk, pk, opts) return data end
View to offer a View to offer a ./accept endpoint for accepting a IncomeRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 49 def accept_income_request_get_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.accept_income_request_get ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.accept_income_request_get" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.accept_income_request_get" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/income_requests/{pk}/accept/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#accept_income_request_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
View to offer a View to offer a ./accept endpoint for accepting a IncomeRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Object]
# File lib/qwil_api/api/platforms_api.rb, line 99 def accept_income_request_post(platform_pk, pk, opts = {}) data, _status_code, _headers = accept_income_request_post_with_http_info(platform_pk, pk, opts) return data end
View to offer a View to offer a ./accept endpoint for accepting a IncomeRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 110 def accept_income_request_post_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.accept_income_request_post ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.accept_income_request_post" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.accept_income_request_post" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/income_requests/{pk}/accept/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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(: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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#accept_income_request_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
View to offer a View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Object]
# File lib/qwil_api/api/platforms_api.rb, line 160 def accept_platform_membership_request_get(platform_pk, pk, opts = {}) data, _status_code, _headers = accept_platform_membership_request_get_with_http_info(platform_pk, pk, opts) return data end
View to offer a View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 171 def accept_platform_membership_request_get_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.accept_platform_membership_request_get ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.accept_platform_membership_request_get" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.accept_platform_membership_request_get" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/membership_requests/{pk}/accept/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#accept_platform_membership_request_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
View to offer a View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Object]
# File lib/qwil_api/api/platforms_api.rb, line 221 def accept_platform_membership_request_post(platform_pk, pk, opts = {}) data, _status_code, _headers = accept_platform_membership_request_post_with_http_info(platform_pk, pk, opts) return data end
View to offer a View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 232 def accept_platform_membership_request_post_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.accept_platform_membership_request_post ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.accept_platform_membership_request_post" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.accept_platform_membership_request_post" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/membership_requests/{pk}/accept/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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(: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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#accept_platform_membership_request_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
View to offer a View to offer a ./deny endpoint for denying a IncomeRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Object]
# File lib/qwil_api/api/platforms_api.rb, line 282 def deny_income_request_get(platform_pk, pk, opts = {}) data, _status_code, _headers = deny_income_request_get_with_http_info(platform_pk, pk, opts) return data end
View to offer a View to offer a ./deny endpoint for denying a IncomeRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 293 def deny_income_request_get_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.deny_income_request_get ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.deny_income_request_get" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.deny_income_request_get" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/income_requests/{pk}/deny/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#deny_income_request_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
View to offer a View to offer a ./deny endpoint for denying a IncomeRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Object]
# File lib/qwil_api/api/platforms_api.rb, line 343 def deny_income_request_post(platform_pk, pk, opts = {}) data, _status_code, _headers = deny_income_request_post_with_http_info(platform_pk, pk, opts) return data end
View to offer a View to offer a ./deny endpoint for denying a IncomeRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 354 def deny_income_request_post_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.deny_income_request_post ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.deny_income_request_post" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.deny_income_request_post" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/income_requests/{pk}/deny/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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(: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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#deny_income_request_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
View to offer a View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Object]
# File lib/qwil_api/api/platforms_api.rb, line 404 def deny_platform_membership_request_get(platform_pk, pk, opts = {}) data, _status_code, _headers = deny_platform_membership_request_get_with_http_info(platform_pk, pk, opts) return data end
View to offer a View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 415 def deny_platform_membership_request_get_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.deny_platform_membership_request_get ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.deny_platform_membership_request_get" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.deny_platform_membership_request_get" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/membership_requests/{pk}/deny/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#deny_platform_membership_request_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
View to offer a View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Object]
# File lib/qwil_api/api/platforms_api.rb, line 465 def deny_platform_membership_request_post(platform_pk, pk, opts = {}) data, _status_code, _headers = deny_platform_membership_request_post_with_http_info(platform_pk, pk, opts) return data end
View to offer a View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 476 def deny_platform_membership_request_post_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.deny_platform_membership_request_post ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.deny_platform_membership_request_post" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.deny_platform_membership_request_post" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/membership_requests/{pk}/deny/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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(: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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#deny_platform_membership_request_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
The list of Income items for a specific User The list of Income items for a specific User.<br/>This can be filtered by date using the start_date and end_date query parameters. @param platform_pk @param user @param amount @param [Hash] opts the optional parameters @option opts [String] :external_id Optional unique ID to correlate this Income to a record in another system. If specified, this will prevent duplicate Incomes being created with the same external_id. This field is unique per Platform. If this field is omitted, no uniqueness check is performed. @option opts [DateTime] :payment_time @option opts [String] :notes @return [IncomeSerializerFixedSource]
# File lib/qwil_api/api/platforms_api.rb, line 530 def income_platform_create(platform_pk, user, amount, opts = {}) data, _status_code, _headers = income_platform_create_with_http_info(platform_pk, user, amount, opts) return data end
The list of Income items for a specific User The list of Income items for a specific User.<br/>This can be filtered by date using the start_date and end_date query parameters. @param platform_pk @param user @param amount @param [Hash] opts the optional parameters @option opts [String] :external_id Optional unique ID to correlate this Income to a record in another system. If specified, this will prevent duplicate Incomes being created with the same external_id. This field is unique per Platform. If this field is omitted, no uniqueness check is performed. @option opts [DateTime] :payment_time @option opts [String] :notes @return [Array<(IncomeSerializerFixedSource
, Fixnum, Hash)>] IncomeSerializerFixedSource
data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 545 def income_platform_create_with_http_info(platform_pk, user, amount, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.income_platform_create ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.income_platform_create" if platform_pk.nil? # verify the required parameter 'user' is set fail ArgumentError, "Missing the required parameter 'user' when calling PlatformsApi.income_platform_create" if user.nil? # verify the required parameter 'amount' is set fail ArgumentError, "Missing the required parameter 'amount' when calling PlatformsApi.income_platform_create" if amount.nil? # resource path local_var_path = "/platforms/{platform_pk}/income/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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["user"] = user form_params["amount"] = amount form_params["external_id"] = opts[:'external_id'] if !opts[:'external_id'].nil? form_params["payment_time"] = opts[:'payment_time'] if !opts[:'payment_time'].nil? form_params["notes"] = opts[:'notes'] if !opts[:'notes'].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 => 'IncomeSerializerFixedSource') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#income_platform_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
The list of Income items for a specific User The list of Income items for a specific User.<br/>This can be filtered by date using the start_date and end_date query parameters. @param platform_pk @param [Hash] opts the optional parameters @return [Array<IncomeSerializerFixedSource>]
# File lib/qwil_api/api/platforms_api.rb, line 601 def income_platform_list(platform_pk, opts = {}) data, _status_code, _headers = income_platform_list_with_http_info(platform_pk, opts) return data end
The list of Income items for a specific User The list of Income items for a specific User.<br/>This can be filtered by date using the start_date and end_date query parameters. @param platform_pk @param [Hash] opts the optional parameters @return [Array<(Array<IncomeSerializerFixedSource>, Fixnum, Hash)>] Array<IncomeSerializerFixedSource> data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 611 def income_platform_list_with_http_info(platform_pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.income_platform_list ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.income_platform_list" if platform_pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/income/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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<IncomeSerializerFixedSource>') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#income_platform_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
The set of users on a specific Platform The set of users on a specific Platform.<br/>Any users created through this ViewSet will have a profile created with the Platform set to the resource specified in the URL, e.g. POST /platforms/3/contractors/ will create a user with User.Profile.platform = '/platforms/3/'. @param platform_pk @param email @param [Hash] opts the optional parameters @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type (default to INDIVIDUAL) @option opts [String] :personal_information @option opts [String] :default_account Default account to use for payment of unpaid income. @return [ContractorSerializer]
# File lib/qwil_api/api/platforms_api.rb, line 665 def platform_contractor_create(platform_pk, email, opts = {}) data, _status_code, _headers = platform_contractor_create_with_http_info(platform_pk, email, opts) return data end
The set of users on a specific Platform The set of users on a specific Platform.<br/>Any users created through this ViewSet will have a profile created with the Platform set to the resource specified in the URL, e.g. POST /platforms/3/contractors/ will create a user with User.Profile.platform = '/platforms/3/'. @param platform_pk @param email @param [Hash] opts the optional parameters @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type @option opts [String] :personal_information @option opts [String] :default_account Default account to use for payment of unpaid income. @return [Array<(ContractorSerializer
, Fixnum, Hash)>] ContractorSerializer
data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 682 def platform_contractor_create_with_http_info(platform_pk, email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_contractor_create ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_contractor_create" if platform_pk.nil? # verify the required parameter 'email' is set fail ArgumentError, "Missing the required parameter 'email' when calling PlatformsApi.platform_contractor_create" if email.nil? if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type']) fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS' end # resource path local_var_path = "/platforms/{platform_pk}/contractors/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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["email"] = email form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil? form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil? form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil? form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil? form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].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 => 'ContractorSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_contractor_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
The set of users on a specific Platform The set of users on a specific Platform.<br/>Any users created through this ViewSet will have a profile created with the Platform set to the resource specified in the URL, e.g. POST /platforms/3/contractors/ will create a user with User.Profile.platform = '/platforms/3/'. @param platform_pk @param [Hash] opts the optional parameters @return [Array<ContractorSerializer>]
# File lib/qwil_api/api/platforms_api.rb, line 741 def platform_contractor_list(platform_pk, opts = {}) data, _status_code, _headers = platform_contractor_list_with_http_info(platform_pk, opts) return data end
The set of users on a specific Platform The set of users on a specific Platform.<br/>Any users created through this ViewSet will have a profile created with the Platform set to the resource specified in the URL, e.g. POST /platforms/3/contractors/ will create a user with User.Profile.platform = '/platforms/3/'. @param platform_pk @param [Hash] opts the optional parameters @return [Array<(Array<ContractorSerializer>, Fixnum, Hash)>] Array<ContractorSerializer> data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 751 def platform_contractor_list_with_http_info(platform_pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_contractor_list ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_contractor_list" if platform_pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/contractors/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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<ContractorSerializer>') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_contractor_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
The set of users on a specific Platform The set of users on a specific Platform.<br/>Any users created through this ViewSet will have a profile created with the Platform set to the resource specified in the URL, e.g. POST /platforms/3/contractors/ will create a user with User.Profile.platform = '/platforms/3/'. @param platform_pk @param pk @param [Hash] opts the optional parameters @option opts [String] :email @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type (default to INDIVIDUAL) @option opts [String] :personal_information @option opts [String] :default_account Default account to use for payment of unpaid income. @return [ContractorSerializer]
# File lib/qwil_api/api/platforms_api.rb, line 806 def platform_contractor_partial_update(platform_pk, pk, opts = {}) data, _status_code, _headers = platform_contractor_partial_update_with_http_info(platform_pk, pk, opts) return data end
The set of users on a specific Platform The set of users on a specific Platform.<br/>Any users created through this ViewSet will have a profile created with the Platform set to the resource specified in the URL, e.g. POST /platforms/3/contractors/ will create a user with User.Profile.platform = '/platforms/3/'. @param platform_pk @param pk @param [Hash] opts the optional parameters @option opts [String] :email @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type @option opts [String] :personal_information @option opts [String] :default_account Default account to use for payment of unpaid income. @return [Array<(ContractorSerializer
, Fixnum, Hash)>] ContractorSerializer
data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 824 def platform_contractor_partial_update_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_contractor_partial_update ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_contractor_partial_update" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.platform_contractor_partial_update" if pk.nil? if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type']) fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS' end # resource path local_var_path = "/platforms/{platform_pk}/contractors/{pk}/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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 = {} form_params["email"] = opts[:'email'] if !opts[:'email'].nil? form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil? form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil? form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil? form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil? form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].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(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ContractorSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_contractor_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
The set of users on a specific Platform The set of users on a specific Platform.<br/>Any users created through this ViewSet will have a profile created with the Platform set to the resource specified in the URL, e.g. POST /platforms/3/contractors/ will create a user with User.Profile.platform = '/platforms/3/'. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [ContractorSerializer]
# File lib/qwil_api/api/platforms_api.rb, line 884 def platform_contractor_retrieve(platform_pk, pk, opts = {}) data, _status_code, _headers = platform_contractor_retrieve_with_http_info(platform_pk, pk, opts) return data end
The set of users on a specific Platform The set of users on a specific Platform.<br/>Any users created through this ViewSet will have a profile created with the Platform set to the resource specified in the URL, e.g. POST /platforms/3/contractors/ will create a user with User.Profile.platform = '/platforms/3/'. @param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(ContractorSerializer
, Fixnum, Hash)>] ContractorSerializer
data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 895 def platform_contractor_retrieve_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_contractor_retrieve ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_contractor_retrieve" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.platform_contractor_retrieve" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/contractors/{pk}/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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 => 'ContractorSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_contractor_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
The set of users on a specific Platform The set of users on a specific Platform.<br/>Any users created through this ViewSet will have a profile created with the Platform set to the resource specified in the URL, e.g. POST /platforms/3/contractors/ will create a user with User.Profile.platform = '/platforms/3/'. @param platform_pk @param pk @param email @param [Hash] opts the optional parameters @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type (default to INDIVIDUAL) @option opts [String] :personal_information @option opts [String] :default_account Default account to use for payment of unpaid income. @return [ContractorSerializer]
# File lib/qwil_api/api/platforms_api.rb, line 952 def platform_contractor_update(platform_pk, pk, email, opts = {}) data, _status_code, _headers = platform_contractor_update_with_http_info(platform_pk, pk, email, opts) return data end
The set of users on a specific Platform The set of users on a specific Platform.<br/>Any users created through this ViewSet will have a profile created with the Platform set to the resource specified in the URL, e.g. POST /platforms/3/contractors/ will create a user with User.Profile.platform = '/platforms/3/'. @param platform_pk @param pk @param email @param [Hash] opts the optional parameters @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type @option opts [String] :personal_information @option opts [String] :default_account Default account to use for payment of unpaid income. @return [Array<(ContractorSerializer
, Fixnum, Hash)>] ContractorSerializer
data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 970 def platform_contractor_update_with_http_info(platform_pk, pk, email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_contractor_update ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_contractor_update" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.platform_contractor_update" if pk.nil? # verify the required parameter 'email' is set fail ArgumentError, "Missing the required parameter 'email' when calling PlatformsApi.platform_contractor_update" if email.nil? if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type']) fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS' end # resource path local_var_path = "/platforms/{platform_pk}/contractors/{pk}/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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 = {} form_params["email"] = email form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil? form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil? form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil? form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil? form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].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(: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 => 'ContractorSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_contractor_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Viewset for uploading CSV files containing Income config Viewset for uploading CSV files containing Income config.<br/>The POST must use Content-Type: multipart/form-data<br/>The field name for the form-data must be "income-data".<br/>The first line specifies the field names, and each subsequent line will specify an Income object. @param platform_pk @param [Hash] opts the optional parameters @return [Object]
# File lib/qwil_api/api/platforms_api.rb, line 1031 def platform_csv_upload_income_file_post(platform_pk, opts = {}) data, _status_code, _headers = platform_csv_upload_income_file_post_with_http_info(platform_pk, opts) return data end
Viewset for uploading CSV files containing Income config Viewset for uploading CSV files containing Income config.<br/>The POST must use Content-Type: multipart/form-data<br/>The field name for the form-data must be "income-data".<br/>The first line specifies the field names, and each subsequent line will specify an Income object. @param platform_pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1041 def platform_csv_upload_income_file_post_with_http_info(platform_pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_csv_upload_income_file_post ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_csv_upload_income_file_post" if platform_pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/csv-upload/income".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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(: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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_csv_upload_income_file_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Viewset for uploading CSV files containing User config Viewset for uploading CSV files containing User config.<br/>The POST must use Content-Type: multipart/form-data<br/>The field name for the form-data must be "user-data".<br/>The first line specifies the field names, and each subsequent line will specify a User object.<br/>Note that the fields in User.PersonalInformation can also be specified,<br/>e.g. first_name,last_name,email,tax_id_number @param platform_pk @param [Hash] opts the optional parameters @return [Object]
# File lib/qwil_api/api/platforms_api.rb, line 1088 def platform_csv_upload_user_file_post(platform_pk, opts = {}) data, _status_code, _headers = platform_csv_upload_user_file_post_with_http_info(platform_pk, opts) return data end
Viewset for uploading CSV files containing User config Viewset for uploading CSV files containing User config.<br/>The POST must use Content-Type: multipart/form-data<br/>The field name for the form-data must be "user-data".<br/>The first line specifies the field names, and each subsequent line will specify a User object.<br/>Note that the fields in User.PersonalInformation can also be specified,<br/>e.g. first_name,last_name,email,tax_id_number @param platform_pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1098 def platform_csv_upload_user_file_post_with_http_info(platform_pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_csv_upload_user_file_post ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_csv_upload_user_file_post" if platform_pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/csv-upload/user".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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(: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 => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_csv_upload_user_file_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param platform_pk @param [Hash] opts the optional parameters @return [Array<PlatformIncomeRequestSerializer>]
# File lib/qwil_api/api/platforms_api.rb, line 1145 def platform_income_request_list(platform_pk, opts = {}) data, _status_code, _headers = platform_income_request_list_with_http_info(platform_pk, opts) return data end
@param platform_pk @param [Hash] opts the optional parameters @return [Array<(Array<PlatformIncomeRequestSerializer>, Fixnum, Hash)>] Array<PlatformIncomeRequestSerializer> data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1155 def platform_income_request_list_with_http_info(platform_pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_income_request_list ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_income_request_list" if platform_pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/income_requests/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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<PlatformIncomeRequestSerializer>') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_income_request_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param platform_pk @param pk @param [Hash] opts the optional parameters @return [PlatformIncomeRequestSerializer]
# File lib/qwil_api/api/platforms_api.rb, line 1203 def platform_income_request_retrieve(platform_pk, pk, opts = {}) data, _status_code, _headers = platform_income_request_retrieve_with_http_info(platform_pk, pk, opts) return data end
@param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(PlatformIncomeRequestSerializer
, Fixnum, Hash)>] PlatformIncomeRequestSerializer
data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1214 def platform_income_request_retrieve_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_income_request_retrieve ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_income_request_retrieve" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.platform_income_request_retrieve" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/income_requests/{pk}/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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 => 'PlatformIncomeRequestSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_income_request_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param platform_pk @param income @param [Hash] opts the optional parameters @option opts [String] :external_id Optional unique ID to correlate this Invoice to a record in another system. If specified, this will prevent duplicate Invoices being created with the same external_id. This field is unique per Platform. If this field is omitted, no uniqueness check is performed. @return [InvoiceSerializerFixedSourceCreate]
# File lib/qwil_api/api/platforms_api.rb, line 1265 def platform_invoice_create_create(platform_pk, income, opts = {}) data, _status_code, _headers = platform_invoice_create_create_with_http_info(platform_pk, income, opts) return data end
@param platform_pk @param income @param [Hash] opts the optional parameters @option opts [String] :external_id Optional unique ID to correlate this Invoice to a record in another system. If specified, this will prevent duplicate Invoices being created with the same external_id. This field is unique per Platform. If this field is omitted, no uniqueness check is performed. @return [Array<(InvoiceSerializerFixedSourceCreate
, Fixnum, Hash)>] InvoiceSerializerFixedSourceCreate
data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1277 def platform_invoice_create_create_with_http_info(platform_pk, income, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_invoice_create_create ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_invoice_create_create" if platform_pk.nil? # verify the required parameter 'income' is set fail ArgumentError, "Missing the required parameter 'income' when calling PlatformsApi.platform_invoice_create_create" if income.nil? # resource path local_var_path = "/platforms/{platform_pk}/create_invoice/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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["income"] = income form_params["external_id"] = opts[:'external_id'] if !opts[:'external_id'].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 => 'InvoiceSerializerFixedSourceCreate') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_invoice_create_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param platform_pk @param [Hash] opts the optional parameters @return [Array<InvoiceSerializer>]
# File lib/qwil_api/api/platforms_api.rb, line 1328 def platform_invoice_list(platform_pk, opts = {}) data, _status_code, _headers = platform_invoice_list_with_http_info(platform_pk, opts) return data end
@param platform_pk @param [Hash] opts the optional parameters @return [Array<(Array<InvoiceSerializer>, Fixnum, Hash)>] Array<InvoiceSerializer> data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1338 def platform_invoice_list_with_http_info(platform_pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_invoice_list ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_invoice_list" if platform_pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/invoices/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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<InvoiceSerializer>') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_invoice_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param platform_pk @param user @param [Hash] opts the optional parameters @return [MembershipSerializer]
# File lib/qwil_api/api/platforms_api.rb, line 1386 def platform_membership_create(platform_pk, user, opts = {}) data, _status_code, _headers = platform_membership_create_with_http_info(platform_pk, user, opts) return data end
@param platform_pk @param user @param [Hash] opts the optional parameters @return [Array<(MembershipSerializer
, Fixnum, Hash)>] MembershipSerializer
data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1397 def platform_membership_create_with_http_info(platform_pk, user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_membership_create ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_membership_create" if platform_pk.nil? # verify the required parameter 'user' is set fail ArgumentError, "Missing the required parameter 'user' when calling PlatformsApi.platform_membership_create" if user.nil? # resource path local_var_path = "/platforms/{platform_pk}/memberships/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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["user"] = user # 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 => 'MembershipSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_membership_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Temporary special-case logic to map old Platform memberships onto the new API Temporary special-case logic to map old Platform memberships onto the new API.<br/>Generate a faux Membership for each User.profile.platform FKey ref. @param platform_pk @param [Hash] opts the optional parameters @return [Array<MembershipSerializer>]
# File lib/qwil_api/api/platforms_api.rb, line 1447 def platform_membership_list(platform_pk, opts = {}) data, _status_code, _headers = platform_membership_list_with_http_info(platform_pk, opts) return data end
Temporary special-case logic to map old Platform memberships onto the new API Temporary special-case logic to map old Platform memberships onto the new API.<br/>Generate a faux Membership for each User.profile.platform FKey ref. @param platform_pk @param [Hash] opts the optional parameters @return [Array<(Array<MembershipSerializer>, Fixnum, Hash)>] Array<MembershipSerializer> data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1457 def platform_membership_list_with_http_info(platform_pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_membership_list ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_membership_list" if platform_pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/memberships/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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<MembershipSerializer>') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_membership_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param platform_pk @param [Hash] opts the optional parameters @return [Array<PlatformMembershipRequestSerializer>]
# File lib/qwil_api/api/platforms_api.rb, line 1504 def platform_membership_request_list(platform_pk, opts = {}) data, _status_code, _headers = platform_membership_request_list_with_http_info(platform_pk, opts) return data end
@param platform_pk @param [Hash] opts the optional parameters @return [Array<(Array<PlatformMembershipRequestSerializer>, Fixnum, Hash)>] Array<PlatformMembershipRequestSerializer> data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1514 def platform_membership_request_list_with_http_info(platform_pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_membership_request_list ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_membership_request_list" if platform_pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/membership_requests/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_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<PlatformMembershipRequestSerializer>') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_membership_request_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param platform_pk @param pk @param [Hash] opts the optional parameters @return [PlatformMembershipRequestSerializer]
# File lib/qwil_api/api/platforms_api.rb, line 1562 def platform_membership_request_retrieve(platform_pk, pk, opts = {}) data, _status_code, _headers = platform_membership_request_retrieve_with_http_info(platform_pk, pk, opts) return data end
@param platform_pk @param pk @param [Hash] opts the optional parameters @return [Array<(PlatformMembershipRequestSerializer
, Fixnum, Hash)>] PlatformMembershipRequestSerializer
data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1573 def platform_membership_request_retrieve_with_http_info(platform_pk, pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_membership_request_retrieve ..." end # verify the required parameter 'platform_pk' is set fail ArgumentError, "Missing the required parameter 'platform_pk' when calling PlatformsApi.platform_membership_request_retrieve" if platform_pk.nil? # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.platform_membership_request_retrieve" if pk.nil? # resource path local_var_path = "/platforms/{platform_pk}/membership_requests/{pk}/".sub('{format}','json').sub('{' + 'platform_pk' + '}', platform_pk.to_s).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 => 'PlatformMembershipRequestSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_membership_request_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param pk @param [Hash] opts the optional parameters @return [PlatformSerializer]
# File lib/qwil_api/api/platforms_api.rb, line 1622 def platform_retrieve(pk, opts = {}) data, _status_code, _headers = platform_retrieve_with_http_info(pk, opts) return data end
@param pk @param [Hash] opts the optional parameters @return [Array<(PlatformSerializer
, Fixnum, Hash)>] PlatformSerializer
data, response status code and response headers
# File lib/qwil_api/api/platforms_api.rb, line 1632 def platform_retrieve_with_http_info(pk, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlatformsApi.platform_retrieve ..." end # verify the required parameter 'pk' is set fail ArgumentError, "Missing the required parameter 'pk' when calling PlatformsApi.platform_retrieve" if pk.nil? # resource path local_var_path = "/platforms/{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 => 'PlatformSerializer') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlatformsApi#platform_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end