class Yapstone::RefundsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/yapstone-payments/api/refunds_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

cancel_refund(authorization, x_yapstone_ip_address, refund_id, opts = {}) click to toggle source

Cancel Payment by payment Id @param authorization [String] Authorization @param x_yapstone_ip_address [String] Ip Address of the client @param refund_id [String] refundId @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id X-Yapstone-Trace-Id @option opts [String] :x_yapstone_fpsid Device Finger Print Id @return [RefundCancelResponse]

# File lib/yapstone-payments/api/refunds_api.rb, line 30
def cancel_refund(authorization, x_yapstone_ip_address, refund_id, opts = {})
  data, _status_code, _headers = cancel_refund_with_http_info(authorization, x_yapstone_ip_address, refund_id, opts)
  data
end
cancel_refund_with_http_info(authorization, x_yapstone_ip_address, refund_id, opts = {}) click to toggle source

Cancel Payment by payment Id @param authorization [String] Authorization @param x_yapstone_ip_address [String] Ip Address of the client @param refund_id [String] refundId @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id X-Yapstone-Trace-Id @option opts [String] :x_yapstone_fpsid Device Finger Print Id @return [Array<(RefundCancelResponse, Integer, Hash)>] RefundCancelResponse data, response status code and response headers

# File lib/yapstone-payments/api/refunds_api.rb, line 43
def cancel_refund_with_http_info(authorization, x_yapstone_ip_address, refund_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RefundsApi.cancel_refund ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling RefundsApi.cancel_refund"
  end
  # verify the required parameter 'x_yapstone_ip_address' is set
  if @api_client.config.client_side_validation && x_yapstone_ip_address.nil?
    fail ArgumentError, "Missing the required parameter 'x_yapstone_ip_address' when calling RefundsApi.cancel_refund"
  end
  # verify the required parameter 'refund_id' is set
  if @api_client.config.client_side_validation && refund_id.nil?
    fail ArgumentError, "Missing the required parameter 'refund_id' when calling RefundsApi.cancel_refund"
  end
  # resource path
  local_var_path = '/v2/refunds/refund/{refundId}'.sub('{' + 'refundId' + '}', CGI.escape(refund_id.to_s).gsub('%2F', '/'))

  # 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'])
  header_params[:'Authorization'] = authorization
  header_params[:'X-Yapstone-IPAddress'] = x_yapstone_ip_address
  header_params[:'X-Yapstone-Trace-Id'] = opts[:'x_yapstone_trace_id'] if !opts[:'x_yapstone_trace_id'].nil?
  header_params[:'X-Yapstone-fpsid'] = opts[:'x_yapstone_fpsid'] if !opts[:'x_yapstone_fpsid'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'RefundCancelResponse' 

  # auth_names
  auth_names = opts[:auth_names] || ['Bearer']

  new_options = opts.merge(
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RefundsApi#cancel_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_payment_refund(authorization, x_yapstone_ip_address, refund_request, opts = {}) click to toggle source

Create a refund Create a refund for a payment that was processed @param authorization [String] Authorization @param x_yapstone_ip_address [String] IP Address of the client @param refund_request [RefundRequest] @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id Optionally provide a unique identifier for this request, for use later if you need to debug this request with Yapstone support. Can be any arbitrary string. @option opts [String] :x_yapstone_fpsid Device Finger Print Id @return [RefundResponse]

# File lib/yapstone-payments/api/refunds_api.rb, line 111
def create_payment_refund(authorization, x_yapstone_ip_address, refund_request, opts = {})
  data, _status_code, _headers = create_payment_refund_with_http_info(authorization, x_yapstone_ip_address, refund_request, opts)
  data
end
create_payment_refund_with_http_info(authorization, x_yapstone_ip_address, refund_request, opts = {}) click to toggle source

Create a refund Create a refund for a payment that was processed @param authorization [String] Authorization @param x_yapstone_ip_address [String] IP Address of the client @param refund_request [RefundRequest] @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id Optionally provide a unique identifier for this request, for use later if you need to debug this request with Yapstone support. Can be any arbitrary string. @option opts [String] :x_yapstone_fpsid Device Finger Print Id @return [Array<(RefundResponse, Integer, Hash)>] RefundResponse data, response status code and response headers

# File lib/yapstone-payments/api/refunds_api.rb, line 125
def create_payment_refund_with_http_info(authorization, x_yapstone_ip_address, refund_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RefundsApi.create_payment_refund ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling RefundsApi.create_payment_refund"
  end
  # verify the required parameter 'x_yapstone_ip_address' is set
  if @api_client.config.client_side_validation && x_yapstone_ip_address.nil?
    fail ArgumentError, "Missing the required parameter 'x_yapstone_ip_address' when calling RefundsApi.create_payment_refund"
  end
  # verify the required parameter 'refund_request' is set
  if @api_client.config.client_side_validation && refund_request.nil?
    fail ArgumentError, "Missing the required parameter 'refund_request' when calling RefundsApi.create_payment_refund"
  end
  # resource path
  local_var_path = '/v2/refunds/payment'

  # 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'])
  header_params[:'Authorization'] = authorization
  header_params[:'X-Yapstone-IPAddress'] = x_yapstone_ip_address
  header_params[:'X-Yapstone-Trace-Id'] = opts[:'x_yapstone_trace_id'] if !opts[:'x_yapstone_trace_id'].nil?
  header_params[:'X-Yapstone-fpsid'] = opts[:'x_yapstone_fpsid'] if !opts[:'x_yapstone_fpsid'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(refund_request) 

  # return_type
  return_type = opts[:return_type] || 'RefundResponse' 

  # auth_names
  auth_names = opts[:auth_names] || ['Bearer']

  new_options = opts.merge(
    :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: RefundsApi#create_payment_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_transaction_refund(authorization, x_yapstone_ip_address, transaction, opts = {}) click to toggle source

Create a refund Use this end point to kick off a refund for transaction. If you've already captured the transaction, this will result in a refund of the amount captured and the details of that refund will be returned in the response body. @param authorization [String] Authorization @param x_yapstone_ip_address [String] IP Address of the client @param transaction [Transaction] @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id Optionally provide a unique identifier for this request, for use later if you need to debug this request with Yapstone support. Can be any arbitrary string. @option opts [String] :x_yapstone_fpsid Device Finger Print Id @return [RefundResponse]

# File lib/yapstone-payments/api/refunds_api.rb, line 195
def create_transaction_refund(authorization, x_yapstone_ip_address, transaction, opts = {})
  data, _status_code, _headers = create_transaction_refund_with_http_info(authorization, x_yapstone_ip_address, transaction, opts)
  data
end
create_transaction_refund_with_http_info(authorization, x_yapstone_ip_address, transaction, opts = {}) click to toggle source

Create a refund Use this end point to kick off a refund for transaction. If you&#39;ve already captured the transaction, this will result in a refund of the amount captured and the details of that refund will be returned in the response body. @param authorization [String] Authorization @param x_yapstone_ip_address [String] IP Address of the client @param transaction [Transaction] @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id Optionally provide a unique identifier for this request, for use later if you need to debug this request with Yapstone support. Can be any arbitrary string. @option opts [String] :x_yapstone_fpsid Device Finger Print Id @return [Array<(RefundResponse, Integer, Hash)>] RefundResponse data, response status code and response headers

# File lib/yapstone-payments/api/refunds_api.rb, line 209
def create_transaction_refund_with_http_info(authorization, x_yapstone_ip_address, transaction, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RefundsApi.create_transaction_refund ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling RefundsApi.create_transaction_refund"
  end
  # verify the required parameter 'x_yapstone_ip_address' is set
  if @api_client.config.client_side_validation && x_yapstone_ip_address.nil?
    fail ArgumentError, "Missing the required parameter 'x_yapstone_ip_address' when calling RefundsApi.create_transaction_refund"
  end
  # verify the required parameter 'transaction' is set
  if @api_client.config.client_side_validation && transaction.nil?
    fail ArgumentError, "Missing the required parameter 'transaction' when calling RefundsApi.create_transaction_refund"
  end
  # resource path
  local_var_path = '/v2/refunds/transaction'

  # 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'])
  header_params[:'Authorization'] = authorization
  header_params[:'X-Yapstone-IPAddress'] = x_yapstone_ip_address
  header_params[:'X-Yapstone-Trace-Id'] = opts[:'x_yapstone_trace_id'] if !opts[:'x_yapstone_trace_id'].nil?
  header_params[:'X-Yapstone-fpsid'] = opts[:'x_yapstone_fpsid'] if !opts[:'x_yapstone_fpsid'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(transaction) 

  # return_type
  return_type = opts[:return_type] || 'RefundResponse' 

  # auth_names
  auth_names = opts[:auth_names] || ['Bearer']

  new_options = opts.merge(
    :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: RefundsApi#create_transaction_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_by_originaltransaction_id(authorization, x_yapstone_ip_address, transaction_id, opts = {}) click to toggle source

Get master Transaction details including all refund details by transaction Id Transactions are nested inside payments. Master transactions are nested inside the master payment. @param authorization [String] Authorization @param x_yapstone_ip_address [String] IP Address of the client @param transaction_id [String] transactionId @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id Optionally provide a unique identifier for this request, for use later if you need to debug this request with Yapstone support. Can be any arbitrary string. @return [TransactionResponse]

# File lib/yapstone-payments/api/refunds_api.rb, line 278
def get_by_originaltransaction_id(authorization, x_yapstone_ip_address, transaction_id, opts = {})
  data, _status_code, _headers = get_by_originaltransaction_id_with_http_info(authorization, x_yapstone_ip_address, transaction_id, opts)
  data
end
get_by_originaltransaction_id_with_http_info(authorization, x_yapstone_ip_address, transaction_id, opts = {}) click to toggle source

Get master Transaction details including all refund details by transaction Id Transactions are nested inside payments. Master transactions are nested inside the master payment. @param authorization [String] Authorization @param x_yapstone_ip_address [String] IP Address of the client @param transaction_id [String] transactionId @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id Optionally provide a unique identifier for this request, for use later if you need to debug this request with Yapstone support. Can be any arbitrary string. @return [Array<(TransactionResponse, Integer, Hash)>] TransactionResponse data, response status code and response headers

# File lib/yapstone-payments/api/refunds_api.rb, line 291
def get_by_originaltransaction_id_with_http_info(authorization, x_yapstone_ip_address, transaction_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RefundsApi.get_by_originaltransaction_id ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling RefundsApi.get_by_originaltransaction_id"
  end
  # verify the required parameter 'x_yapstone_ip_address' is set
  if @api_client.config.client_side_validation && x_yapstone_ip_address.nil?
    fail ArgumentError, "Missing the required parameter 'x_yapstone_ip_address' when calling RefundsApi.get_by_originaltransaction_id"
  end
  # verify the required parameter 'transaction_id' is set
  if @api_client.config.client_side_validation && transaction_id.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_id' when calling RefundsApi.get_by_originaltransaction_id"
  end
  # resource path
  local_var_path = '/v2/refunds/transaction/{transactionId}'.sub('{' + 'transactionId' + '}', CGI.escape(transaction_id.to_s).gsub('%2F', '/'))

  # 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'])
  header_params[:'Authorization'] = authorization
  header_params[:'X-Yapstone-IPAddress'] = x_yapstone_ip_address
  header_params[:'X-Yapstone-Trace-Id'] = opts[:'x_yapstone_trace_id'] if !opts[:'x_yapstone_trace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'TransactionResponse' 

  # auth_names
  auth_names = opts[:auth_names] || ['Bearer']

  new_options = opts.merge(
    :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: RefundsApi#get_by_originaltransaction_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_refund(authorization, x_yapstone_ip_address, refund_id, opts = {}) click to toggle source

Get master payment details including all refund detail by refund ID. A master payment is the initial payment that all other payment details and transactions tied to that payment connect to. You can use a refund ID to retrieve master payment information. @param authorization [String] Authorization @param x_yapstone_ip_address [String] IP Address of the client @param refund_id [String] refundId @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id Optionally provide a unique identifier for this request, for use later if you need to debug this request with Yapstone support. Can be any arbitrary string. @return [RefundResponse]

# File lib/yapstone-payments/api/refunds_api.rb, line 357
def get_refund(authorization, x_yapstone_ip_address, refund_id, opts = {})
  data, _status_code, _headers = get_refund_with_http_info(authorization, x_yapstone_ip_address, refund_id, opts)
  data
end
get_refund_by_payment_id(authorization, x_yapstone_ip_address, payment_id, opts = {}) click to toggle source

Get master payment details including all refund details by Payment Id. A master payment is the initial payment that all other payment details and transactions tied to that payment connect to. @param authorization [String] Authorization @param x_yapstone_ip_address [String] IP Address of the client @param payment_id [String] paymentId @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id Optionally provide a unique identifier for this request, for use later if you need to debug this request with Yapstone support. Can be any arbitrary string. @return [RefundResponse]

# File lib/yapstone-payments/api/refunds_api.rb, line 436
def get_refund_by_payment_id(authorization, x_yapstone_ip_address, payment_id, opts = {})
  data, _status_code, _headers = get_refund_by_payment_id_with_http_info(authorization, x_yapstone_ip_address, payment_id, opts)
  data
end
get_refund_by_payment_id_with_http_info(authorization, x_yapstone_ip_address, payment_id, opts = {}) click to toggle source

Get master payment details including all refund details by Payment Id. A master payment is the initial payment that all other payment details and transactions tied to that payment connect to. @param authorization [String] Authorization @param x_yapstone_ip_address [String] IP Address of the client @param payment_id [String] paymentId @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id Optionally provide a unique identifier for this request, for use later if you need to debug this request with Yapstone support. Can be any arbitrary string. @return [Array<(RefundResponse, Integer, Hash)>] RefundResponse data, response status code and response headers

# File lib/yapstone-payments/api/refunds_api.rb, line 449
def get_refund_by_payment_id_with_http_info(authorization, x_yapstone_ip_address, payment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RefundsApi.get_refund_by_payment_id ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling RefundsApi.get_refund_by_payment_id"
  end
  # verify the required parameter 'x_yapstone_ip_address' is set
  if @api_client.config.client_side_validation && x_yapstone_ip_address.nil?
    fail ArgumentError, "Missing the required parameter 'x_yapstone_ip_address' when calling RefundsApi.get_refund_by_payment_id"
  end
  # verify the required parameter 'payment_id' is set
  if @api_client.config.client_side_validation && payment_id.nil?
    fail ArgumentError, "Missing the required parameter 'payment_id' when calling RefundsApi.get_refund_by_payment_id"
  end
  # resource path
  local_var_path = '/v2/refunds/payment/{paymentId}'.sub('{' + 'paymentId' + '}', CGI.escape(payment_id.to_s).gsub('%2F', '/'))

  # 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'])
  header_params[:'Authorization'] = authorization
  header_params[:'X-Yapstone-IPAddress'] = x_yapstone_ip_address
  header_params[:'X-Yapstone-Trace-Id'] = opts[:'x_yapstone_trace_id'] if !opts[:'x_yapstone_trace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'RefundResponse' 

  # auth_names
  auth_names = opts[:auth_names] || ['Bearer']

  new_options = opts.merge(
    :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: RefundsApi#get_refund_by_payment_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_refund_with_http_info(authorization, x_yapstone_ip_address, refund_id, opts = {}) click to toggle source

Get master payment details including all refund detail by refund ID. A master payment is the initial payment that all other payment details and transactions tied to that payment connect to. You can use a refund ID to retrieve master payment information. @param authorization [String] Authorization @param x_yapstone_ip_address [String] IP Address of the client @param refund_id [String] refundId @param [Hash] opts the optional parameters @option opts [String] :x_yapstone_trace_id Optionally provide a unique identifier for this request, for use later if you need to debug this request with Yapstone support. Can be any arbitrary string. @return [Array<(RefundResponse, Integer, Hash)>] RefundResponse data, response status code and response headers

# File lib/yapstone-payments/api/refunds_api.rb, line 370
def get_refund_with_http_info(authorization, x_yapstone_ip_address, refund_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RefundsApi.get_refund ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling RefundsApi.get_refund"
  end
  # verify the required parameter 'x_yapstone_ip_address' is set
  if @api_client.config.client_side_validation && x_yapstone_ip_address.nil?
    fail ArgumentError, "Missing the required parameter 'x_yapstone_ip_address' when calling RefundsApi.get_refund"
  end
  # verify the required parameter 'refund_id' is set
  if @api_client.config.client_side_validation && refund_id.nil?
    fail ArgumentError, "Missing the required parameter 'refund_id' when calling RefundsApi.get_refund"
  end
  # resource path
  local_var_path = '/v2/refunds/refund/{refundId}'.sub('{' + 'refundId' + '}', CGI.escape(refund_id.to_s).gsub('%2F', '/'))

  # 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'])
  header_params[:'Authorization'] = authorization
  header_params[:'X-Yapstone-IPAddress'] = x_yapstone_ip_address
  header_params[:'X-Yapstone-Trace-Id'] = opts[:'x_yapstone_trace_id'] if !opts[:'x_yapstone_trace_id'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'RefundResponse' 

  # auth_names
  auth_names = opts[:auth_names] || ['Bearer']

  new_options = opts.merge(
    :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: RefundsApi#get_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end