class SezzleClient::OrderApi
Attributes
Public Class Methods
# File lib/sezzle_client/api/order_api.rb, line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Get order details @param order_uuid Order
UUID @param [Hash] opts the optional parameters @return [InlineResponse2001]
# File lib/sezzle_client/api/order_api.rb, line 23 def get_v2_order(order_uuid, opts = {}) data, _status_code, _headers = get_v2_order_with_http_info(order_uuid, opts) data end
Get order details @param order_uuid Order
UUID @param [Hash] opts the optional parameters @return [Array<(InlineResponse2001
, Integer, Hash)>] InlineResponse2001
data, response status code and response headers
# File lib/sezzle_client/api/order_api.rb, line 32 def get_v2_order_with_http_info(order_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.get_v2_order ...' end # verify the required parameter 'order_uuid' is set if @api_client.config.client_side_validation && order_uuid.nil? fail ArgumentError, "Missing the required parameter 'order_uuid' when calling OrderApi.get_v2_order" end # resource path local_var_path = '/order/{order_uuid}'.sub('{' + 'order_uuid' + '}', order_uuid.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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'InlineResponse2001' auth_names = opts[:auth_names] || ['Bearer'] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#get_v2_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update order @param body Session
request @param order_uuid Order
UUID @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/sezzle_client/api/order_api.rb, line 88 def patch_v2_checkout_with_http_info(body, order_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.patch_v2_checkout ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling OrderApi.patch_v2_checkout" end # verify the required parameter 'order_uuid' is set if @api_client.config.client_side_validation && order_uuid.nil? fail ArgumentError, "Missing the required parameter 'order_uuid' when calling OrderApi.patch_v2_checkout" end # resource path local_var_path = '/order/{order_uuid}'.sub('{' + 'order_uuid' + '}', order_uuid.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] auth_names = opts[:auth_names] || ['Bearer'] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#patch_v2_checkout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Capture
amount by order @param order_uuid Order
UUID @param [Hash] opts the optional parameters @option opts [Body3] :body Capture
request @return [InlineResponse2006]
# File lib/sezzle_client/api/order_api.rb, line 140 def post_v2_capture_by_order(order_uuid, opts = {}) data, _status_code, _headers = post_v2_capture_by_order_with_http_info(order_uuid, opts) data end
Capture
amount by order @param order_uuid Order
UUID @param [Hash] opts the optional parameters @option opts [Body3] :body Capture
request @return [Array<(InlineResponse2006
, Integer, Hash)>] InlineResponse2006
data, response status code and response headers
# File lib/sezzle_client/api/order_api.rb, line 150 def post_v2_capture_by_order_with_http_info(order_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.post_v2_capture_by_order ...' end # verify the required parameter 'order_uuid' is set if @api_client.config.client_side_validation && order_uuid.nil? fail ArgumentError, "Missing the required parameter 'order_uuid' when calling OrderApi.post_v2_capture_by_order" end # resource path local_var_path = '/order/{order_uuid}/capture'.sub('{' + 'order_uuid' + '}', order_uuid.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) return_type = opts[:return_type] || 'InlineResponse2006' auth_names = opts[:auth_names] || ['Bearer'] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#post_v2_capture_by_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Refund
amount by order @param order_uuid Order
UUID @param [Hash] opts the optional parameters @option opts [Price] :body Refund
request @return [InlineResponse2006]
# File lib/sezzle_client/api/order_api.rb, line 258 def post_v2_refund_by_order(order_uuid, opts = {}) data, _status_code, _headers = post_v2_refund_by_order_with_http_info(order_uuid, opts) data end
Refund
amount by order @param order_uuid Order
UUID @param [Hash] opts the optional parameters @option opts [Price] :body Refund
request @return [Array<(InlineResponse2006
, Integer, Hash)>] InlineResponse2006
data, response status code and response headers
# File lib/sezzle_client/api/order_api.rb, line 268 def post_v2_refund_by_order_with_http_info(order_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.post_v2_refund_by_order ...' end # verify the required parameter 'order_uuid' is set if @api_client.config.client_side_validation && order_uuid.nil? fail ArgumentError, "Missing the required parameter 'order_uuid' when calling OrderApi.post_v2_refund_by_order" end # resource path local_var_path = '/order/{order_uuid}/refund'.sub('{' + 'order_uuid' + '}', order_uuid.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) return_type = opts[:return_type] || 'InlineResponse2006' auth_names = opts[:auth_names] || ['Bearer'] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#post_v2_refund_by_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Release amount by order @param order_uuid Order
UUID @param [Hash] opts the optional parameters @option opts [Price] :body Release request @return [InlineResponse2006]
# File lib/sezzle_client/api/order_api.rb, line 316 def post_v2_release_by_order(order_uuid, opts = {}) data, _status_code, _headers = post_v2_release_by_order_with_http_info(order_uuid, opts) data end
Release amount by order @param order_uuid Order
UUID @param [Hash] opts the optional parameters @option opts [Price] :body Release request @return [Array<(InlineResponse2006
, Integer, Hash)>] InlineResponse2006
data, response status code and response headers
# File lib/sezzle_client/api/order_api.rb, line 326 def post_v2_release_by_order_with_http_info(order_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.post_v2_release_by_order ...' end # verify the required parameter 'order_uuid' is set if @api_client.config.client_side_validation && order_uuid.nil? fail ArgumentError, "Missing the required parameter 'order_uuid' when calling OrderApi.post_v2_release_by_order" end # resource path local_var_path = '/order/{order_uuid}/release'.sub('{' + 'order_uuid' + '}', order_uuid.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) return_type = opts[:return_type] || 'InlineResponse2006' auth_names = opts[:auth_names] || ['Bearer'] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#post_v2_release_by_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Upcharge amount by order ### DEVELOPER PREVIEW *This API is subject to change and limited to select merchants. Bug fixes and new features will be released based on feedback throughout the preview period.* - This endpoint is not live and will return a `501 Not Implemented` @param order_uuid Order
UUID @param [Hash] opts the optional parameters @option opts [Body4] :body Upcharge request @return [InlineResponse2007]
# File lib/sezzle_client/api/order_api.rb, line 375 def post_v2_upcharge_by_order(order_uuid, opts = {}) data, _status_code, _headers = post_v2_upcharge_by_order_with_http_info(order_uuid, opts) data end
Upcharge amount by order ### DEVELOPER PREVIEW *This API is subject to change and limited to select merchants. Bug fixes and new features will be released based on feedback throughout the preview period.* - This endpoint is not live and will return a `501 Not Implemented` @param order_uuid Order
UUID @param [Hash] opts the optional parameters @option opts [Body4] :body Upcharge request @return [Array<(InlineResponse2007
, Integer, Hash)>] InlineResponse2007
data, response status code and response headers
# File lib/sezzle_client/api/order_api.rb, line 386 def post_v2_upcharge_by_order_with_http_info(order_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.post_v2_upcharge_by_order ...' end # verify the required parameter 'order_uuid' is set if @api_client.config.client_side_validation && order_uuid.nil? fail ArgumentError, "Missing the required parameter 'order_uuid' when calling OrderApi.post_v2_upcharge_by_order" end # resource path local_var_path = '/order/{order_uuid}/upcharge'.sub('{' + 'order_uuid' + '}', order_uuid.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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) return_type = opts[:return_type] || 'InlineResponse2007' auth_names = opts[:auth_names] || ['Bearer'] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#post_v2_upcharge_by_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end