def refund(
      amazon_capture_id,
      refund_reference_id,
      amount,
      currency_code: @currency_code,
      seller_refund_note: nil,
      soft_descriptor: nil,
      provider_credit_reversal_details: nil,
      merchant_id: @merchant_id,
      mws_auth_token: nil
    )

      parameters = {
        'Action' => 'Refund',
        'SellerId' => merchant_id,
        'AmazonCaptureId' => amazon_capture_id,
        'RefundReferenceId' => refund_reference_id,
        'RefundAmount.Amount' => amount,
        'RefundAmount.CurrencyCode' => currency_code
      }

      optional = {
        'SellerRefundNote' => seller_refund_note,
        'SoftDescriptor' => soft_descriptor,
        'MWSAuthToken' => mws_auth_token
      }

      optional.merge!(set_provider_credit_reversal_details(provider_credit_reversal_details)) if provider_credit_reversal_details

      operation(parameters, optional)
    end
def refund(
      amazon_capture_id,
      refund_reference_id,
      amount,
      currency_code: @currency_code,
      seller_refund_note: nil,
      soft_descriptor: nil,
      provider_credit_reversal_details: nil,
      merchant_id: @merchant_id,
      mws_auth_token: nil
    )

      parameters = {
        'Action' => 'Refund',
        'SellerId' => merchant_id,
        'AmazonCaptureId' => amazon_capture_id,
        'RefundReferenceId' => refund_reference_id,
        'RefundAmount.Amount' => amount,
        'RefundAmount.CurrencyCode' => currency_code
      }

      optional = {
        'SellerRefundNote' => seller_refund_note,
        'SoftDescriptor' => soft_descriptor,
        'MWSAuthToken' => mws_auth_token
      }

      optional.merge!(set_provider_credit_reversal_details(provider_credit_reversal_details)) if provider_credit_reversal_details

      operation(parameters, optional)
    end
Refunds a previously captured amount
 @see https://pay.amazon.com/documentation/apireference/201751630#201752080
 @param amazon_capture_id [String]
 @param refund_reference_id [String]
 @param amount [String]
 @optional currency_code [String]
 @optional seller_refund_note [String]
 @optional soft_descriptor [String]
 @optional provider_credit_reversal_details [Array of Hash]
 @optional merchant_id [String]
 @optional mws_auth_token [String]