=begin #Synctera API #
Welcome to the official reference documentation for Synctera APIs. Our APIs are the best way to automate your company's banking needs and are designed to be easy to understand and implement.
We're continuously growing this library and what you see here is just the start, but if you need something specific or have a question, contact us.
The version of the OpenAPI document: 0.60.0 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.5.0 =end require 'cgi' module SyncteraRubySdk class CashPickupsAlphaApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Create a cash pickup # Create a cash pickup # @param cash_pickup_post_request [CashPickupPostRequest] cash pickup to create # @param [Hash] opts the optional parameters # @return [CashPickup] def create_cash_pickup(cash_pickup_post_request, opts = {}) data, _status_code, _headers = create_cash_pickup_with_http_info(cash_pickup_post_request, opts) data end # Create a cash pickup # Create a cash pickup # @param cash_pickup_post_request [CashPickupPostRequest] cash pickup to create # @param [Hash] opts the optional parameters # @return [Array<(CashPickup, Integer, Hash)>] CashPickup data, response status code and response headers def create_cash_pickup_with_http_info(cash_pickup_post_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CashPickupsAlphaApi.create_cash_pickup ...' end # verify the required parameter 'cash_pickup_post_request' is set if @api_client.config.client_side_validation && cash_pickup_post_request.nil? fail ArgumentError, "Missing the required parameter 'cash_pickup_post_request' when calling CashPickupsAlphaApi.create_cash_pickup" end # resource path local_var_path = '/cash_pickups' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(cash_pickup_post_request) # return_type return_type = opts[:debug_return_type] || 'CashPickup' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] new_options = opts.merge( :operation => :"CashPickupsAlphaApi.create_cash_pickup", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CashPickupsAlphaApi#create_cash_pickup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a cash pickup # Get a cash pickup # @param cash_pickup_id [String] The unique identifier of a cash pickup # @param [Hash] opts the optional parameters # @return [CashPickup] def get_cash_pickup(cash_pickup_id, opts = {}) data, _status_code, _headers = get_cash_pickup_with_http_info(cash_pickup_id, opts) data end # Get a cash pickup # Get a cash pickup # @param cash_pickup_id [String] The unique identifier of a cash pickup # @param [Hash] opts the optional parameters # @return [Array<(CashPickup, Integer, Hash)>] CashPickup data, response status code and response headers def get_cash_pickup_with_http_info(cash_pickup_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CashPickupsAlphaApi.get_cash_pickup ...' end # verify the required parameter 'cash_pickup_id' is set if @api_client.config.client_side_validation && cash_pickup_id.nil? fail ArgumentError, "Missing the required parameter 'cash_pickup_id' when calling CashPickupsAlphaApi.get_cash_pickup" end # resource path local_var_path = '/cash_pickups/{cash_pickup_id}'.sub('{' + 'cash_pickup_id' + '}', CGI.escape(cash_pickup_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CashPickup' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] new_options = opts.merge( :operation => :"CashPickupsAlphaApi.get_cash_pickup", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CashPickupsAlphaApi#get_cash_pickup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List cash pickups # Get paginated list of cash pickups # @param [Hash] opts the optional parameters # @option opts [Integer] :limit (default to 100) # @option opts [String] :page_token # @return [CashPickupList] def list_cash_pickups(opts = {}) data, _status_code, _headers = list_cash_pickups_with_http_info(opts) data end # List cash pickups # Get paginated list of cash pickups # @param [Hash] opts the optional parameters # @option opts [Integer] :limit (default to 100) # @option opts [String] :page_token # @return [Array<(CashPickupList, Integer, Hash)>] CashPickupList data, response status code and response headers def list_cash_pickups_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CashPickupsAlphaApi.list_cash_pickups ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CashPickupsAlphaApi.list_cash_pickups, must be greater than or equal to 1.' end # resource path local_var_path = '/cash_pickups' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CashPickupList' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] new_options = opts.merge( :operation => :"CashPickupsAlphaApi.list_cash_pickups", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CashPickupsAlphaApi#list_cash_pickups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a cash pickup # Update a cash pickup # @param cash_pickup_id [String] The unique identifier of a cash pickup # @param cash_pickup_patch_request [CashPickupPatchRequest] cash pickup to update # @param [Hash] opts the optional parameters # @return [CashPickup] def patch_cash_pickup(cash_pickup_id, cash_pickup_patch_request, opts = {}) data, _status_code, _headers = patch_cash_pickup_with_http_info(cash_pickup_id, cash_pickup_patch_request, opts) data end # Update a cash pickup # Update a cash pickup # @param cash_pickup_id [String] The unique identifier of a cash pickup # @param cash_pickup_patch_request [CashPickupPatchRequest] cash pickup to update # @param [Hash] opts the optional parameters # @return [Array<(CashPickup, Integer, Hash)>] CashPickup data, response status code and response headers def patch_cash_pickup_with_http_info(cash_pickup_id, cash_pickup_patch_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CashPickupsAlphaApi.patch_cash_pickup ...' end # verify the required parameter 'cash_pickup_id' is set if @api_client.config.client_side_validation && cash_pickup_id.nil? fail ArgumentError, "Missing the required parameter 'cash_pickup_id' when calling CashPickupsAlphaApi.patch_cash_pickup" end # verify the required parameter 'cash_pickup_patch_request' is set if @api_client.config.client_side_validation && cash_pickup_patch_request.nil? fail ArgumentError, "Missing the required parameter 'cash_pickup_patch_request' when calling CashPickupsAlphaApi.patch_cash_pickup" end # resource path local_var_path = '/cash_pickups/{cash_pickup_id}'.sub('{' + 'cash_pickup_id' + '}', CGI.escape(cash_pickup_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(cash_pickup_patch_request) # return_type return_type = opts[:debug_return_type] || 'CashPickup' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] new_options = opts.merge( :operation => :"CashPickupsAlphaApi.patch_cash_pickup", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: CashPickupsAlphaApi#patch_cash_pickup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end