def authorize(
      amazon_order_reference_id,
      authorization_reference_id,
      amount,
      currency_code: @currency_code,
      seller_authorization_note: nil,
      transaction_timeout: nil,
      capture_now: nil,
      soft_descriptor: nil,
      provider_credit_details: nil,
      merchant_id: @merchant_id,
      mws_auth_token: nil
    )

      parameters = {
        'Action' => 'Authorize',
        'SellerId' => merchant_id,
        'AmazonOrderReferenceId' => amazon_order_reference_id,
        'AuthorizationReferenceId' => authorization_reference_id,
        'AuthorizationAmount.Amount' => amount,
        'AuthorizationAmount.CurrencyCode' => currency_code
      }

      optional = {
        'SellerAuthorizationNote' => seller_authorization_note,
        'TransactionTimeout' => transaction_timeout,
        'CaptureNow' => capture_now,
        'SoftDescriptor' => soft_descriptor,
        'MWSAuthToken' => mws_auth_token
      }

      optional.merge!(set_provider_credit_details(provider_credit_details)) if provider_credit_details

      operation(parameters, optional)
    end
def authorize(
      amazon_order_reference_id,
      authorization_reference_id,
      amount,
      currency_code: @currency_code,
      seller_authorization_note: nil,
      transaction_timeout: nil,
      capture_now: nil,
      soft_descriptor: nil,
      provider_credit_details: nil,
      merchant_id: @merchant_id,
      mws_auth_token: nil
    )

      parameters = {
        'Action' => 'Authorize',
        'SellerId' => merchant_id,
        'AmazonOrderReferenceId' => amazon_order_reference_id,
        'AuthorizationReferenceId' => authorization_reference_id,
        'AuthorizationAmount.Amount' => amount,
        'AuthorizationAmount.CurrencyCode' => currency_code
      }

      optional = {
        'SellerAuthorizationNote' => seller_authorization_note,
        'TransactionTimeout' => transaction_timeout,
        'CaptureNow' => capture_now,
        'SoftDescriptor' => soft_descriptor,
        'MWSAuthToken' => mws_auth_token
      }

      optional.merge!(set_provider_credit_details(provider_credit_details)) if provider_credit_details

      operation(parameters, optional)
    end
Reserves a specified amount against the payment method(s) stored in the
 order reference
 @see https://pay.amazon.com/documentation/apireference/201751630#201752010
 @param amazon_order_reference_id [String]
 @param authorization_reference_id [String]
 @param amount [String]
 @optional currency_code [String]
 @optional seller_authorization_note [String]
 @optional transaction_timeout [Integer]
 @optional capture_now [Boolean]
 @optional soft_descriptor [String]
 @optional provider_credit_details [Array of Hash]
 @optional merchant_id [String]
 @optional mws_auth_token [String]