class WineShipping::SalesOrderApi
Attributes
Public Class Methods
# File lib/wine_shipping/api/sales_order_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Use this operation to cancel an existing open sales order. Successful execution of this method will cancel the sales order in Wineshipping system. If the order cannot be cancelled for some reason standard HTTP Status Code and a reason will be returned. @param cancel_sales_order_request @param [Hash] opts the optional parameters @return [nil]
# File lib/wine_shipping/api/sales_order_api.rb, line 26 def cancel_sales_order(cancel_sales_order_request, opts = {}) cancel_sales_order_with_http_info(cancel_sales_order_request, opts) nil end
Use this operation to cancel an existing open sales order. Successful execution of this method will cancel the sales order in Wineshipping system. If the order cannot be cancelled for some reason standard HTTP Status Code and a reason will be returned. @param cancel_sales_order_request @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/wine_shipping/api/sales_order_api.rb, line 35 def cancel_sales_order_with_http_info(cancel_sales_order_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SalesOrderApi.cancel_sales_order ...' end # verify the required parameter 'cancel_sales_order_request' is set if @api_client.config.client_side_validation && cancel_sales_order_request.nil? fail ArgumentError, "Missing the required parameter 'cancel_sales_order_request' when calling SalesOrderApi.cancel_sales_order" end # resource path local_var_path = '/api/SalesOrder/CancelSalesOrder' # query parameters query_params = {} # 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/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(cancel_sales_order_request) 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SalesOrderApi#cancel_sales_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Successful execution of this method will generate a new shipment order in Wineshipping's system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with your order. @param order_details_info @param [Hash] opts the optional parameters @return [nil]
# File lib/wine_shipping/api/sales_order_api.rb, line 77 def create_sales_order(order_details_info, opts = {}) create_sales_order_with_http_info(order_details_info, opts) nil end
Successful execution of this method will generate a new shipment order in Wineshipping's system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with your order. @param order_details_info @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/wine_shipping/api/sales_order_api.rb, line 86 def create_sales_order_with_http_info(order_details_info, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SalesOrderApi.create_sales_order ...' end # verify the required parameter 'order_details_info' is set if @api_client.config.client_side_validation && order_details_info.nil? fail ArgumentError, "Missing the required parameter 'order_details_info' when calling SalesOrderApi.create_sales_order" end # resource path local_var_path = '/api/SalesOrder/CreateSalesOrder' # query parameters query_params = {} # 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/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(order_details_info) 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SalesOrderApi#create_sales_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Use this operation to retrieve a list of on-hold orders for a customer. Successful execution of this method will generate a list of on hold orders from Wineshipping's system and if no orders are on hold, HTTP status code Not Found response will be returned. @param authentication_details @param [Hash] opts the optional parameters @return [Array<OrderOnHold>]
# File lib/wine_shipping/api/sales_order_api.rb, line 128 def get_orders_on_hold(authentication_details, opts = {}) data, _status_code, _headers = get_orders_on_hold_with_http_info(authentication_details, opts) data end
Use this operation to retrieve a list of on-hold orders for a customer. Successful execution of this method will generate a list of on hold orders from Wineshipping's system and if no orders are on hold, HTTP status code Not Found response will be returned. @param authentication_details @param [Hash] opts the optional parameters @return [Array<(Array<OrderOnHold>, Fixnum, Hash)>] Array<OrderOnHold> data, response status code and response headers
# File lib/wine_shipping/api/sales_order_api.rb, line 137 def get_orders_on_hold_with_http_info(authentication_details, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SalesOrderApi.get_orders_on_hold ...' end # verify the required parameter 'authentication_details' is set if @api_client.config.client_side_validation && authentication_details.nil? fail ArgumentError, "Missing the required parameter 'authentication_details' when calling SalesOrderApi.get_orders_on_hold" end # resource path local_var_path = '/api/SalesOrder/GetOrdersOnHold' # query parameters query_params = {} # 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/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(authentication_details) 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 => 'Array<OrderOnHold>') if @api_client.config.debugging @api_client.config.logger.debug "API called: SalesOrderApi#get_orders_on_hold\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Use this operation to retrieve a list of return sales orders for a customer. Successful execution of this method will generate a list of returns from Wineshipping system. @param returns_request_details @param [Hash] opts the optional parameters @return [ReturnResult]
# File lib/wine_shipping/api/sales_order_api.rb, line 180 def get_returns(returns_request_details, opts = {}) data, _status_code, _headers = get_returns_with_http_info(returns_request_details, opts) data end
Use this operation to retrieve a list of return sales orders for a customer. Successful execution of this method will generate a list of returns from Wineshipping system. @param returns_request_details @param [Hash] opts the optional parameters @return [Array<(ReturnResult
, Fixnum, Hash)>] ReturnResult
data, response status code and response headers
# File lib/wine_shipping/api/sales_order_api.rb, line 189 def get_returns_with_http_info(returns_request_details, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SalesOrderApi.get_returns ...' end # verify the required parameter 'returns_request_details' is set if @api_client.config.client_side_validation && returns_request_details.nil? fail ArgumentError, "Missing the required parameter 'returns_request_details' when calling SalesOrderApi.get_returns" end # resource path local_var_path = '/api/SalesOrder/GetReturns' # query parameters query_params = {} # 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/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(returns_request_details) 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 => 'ReturnResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: SalesOrderApi#get_returns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Use this operation to replace/update an existing open sales order. Successful execution of this method will replace an open sales order in Wineshipping system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with your replacement order. If the order cannot be replaced for some, reason standard HTTP Status Code and a reason message will be returned. @param order_details_info @param [Hash] opts the optional parameters @return [nil]
# File lib/wine_shipping/api/sales_order_api.rb, line 232 def replace_sales_order(order_details_info, opts = {}) replace_sales_order_with_http_info(order_details_info, opts) nil end
Use this operation to replace/update an existing open sales order. Successful execution of this method will replace an open sales order in Wineshipping system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with your replacement order. If the order cannot be replaced for some, reason standard HTTP Status Code and a reason message will be returned. @param order_details_info @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/wine_shipping/api/sales_order_api.rb, line 241 def replace_sales_order_with_http_info(order_details_info, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SalesOrderApi.replace_sales_order ...' end # verify the required parameter 'order_details_info' is set if @api_client.config.client_side_validation && order_details_info.nil? fail ArgumentError, "Missing the required parameter 'order_details_info' when calling SalesOrderApi.replace_sales_order" end # resource path local_var_path = '/api/SalesOrder/ReplaceSalesOrder' # query parameters query_params = {} # 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/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(order_details_info) 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SalesOrderApi#replace_sales_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end