<commit_before>module Paypal
  module Express
    class Request < NVP::Request

      ATTRIBUTES_TO_KEYS = {
        :currency_code          => :CURRENCYCODE,
        :invoice_number         => :INVNUM,
        :description            => :DESC,
        :msg_submission_id      => :MSGSUBID,
        :custom                 => :CUSTOM,
        :note                   => :NOTE,
        :invoice_id             => :INVOICEID,
        :solution_type          => :SOLUTIONTYPE,
        :landing_page           => :LANDINGPAGE,
        :email                  => :EMAIL,
        :brand                  => :BRANDNAME,
        :locale                 => :LOCALECODE,
        :logo                   => :LOGOIMG,
        :cart_border_color      => :CARTBORDERCOLOR,
        :payflow_color          => :PAYFLOWCOLOR
        :billing_agreement_desc => :BILLINGAGREEMENTDESCRIPTION
        :button_source          => :BUTTONSOURCE
      }

      # Common

      def setup(payment_requests, return_url, cancel_url, options = {})
        params = {
          :RETURNURL => return_url,
          :CANCELURL => cancel_url
        }
        if options.delete(:no_shipping)
          params[:REQCONFIRMSHIPPING] = 0
          params[:NOSHIPPING] = 1
        end

        params[:ALLOWNOTE] = 0 if options.delete(:allow_note) == false

        params = translated_params(options).merge(params)
        Array(payment_requests).each_with_index do |payment_request, index|
          params.merge! payment_request.to_params(index)<commit_msg>Can't believe I did that<commit_after>module Paypal
  module Express
    class Request < NVP::Request

      ATTRIBUTES_TO_KEYS = {
        :currency_code          => :CURRENCYCODE,
        :invoice_number         => :INVNUM,
        :description            => :DESC,
        :msg_submission_id      => :MSGSUBID,
        :custom                 => :CUSTOM,
        :note                   => :NOTE,
        :invoice_id             => :INVOICEID,
        :solution_type          => :SOLUTIONTYPE,
        :landing_page           => :LANDINGPAGE,
        :email                  => :EMAIL,
        :brand                  => :BRANDNAME,
        :locale                 => :LOCALECODE,
        :logo                   => :LOGOIMG,
        :cart_border_color      => :CARTBORDERCOLOR,
        :payflow_color          => :PAYFLOWCOLOR
        :billing_agreement_desc => :BILLINGAGREEMENTDESCRIPTION,
        :button_source          => :BUTTONSOURCE
      }

      # Common

      def setup(payment_requests, return_url, cancel_url, options = {})
        params = {
          :RETURNURL => return_url,
          :CANCELURL => cancel_url
        }
        if options.delete(:no_shipping)
          params[:REQCONFIRMSHIPPING] = 0
          params[:NOSHIPPING] = 1
        end

        params[:ALLOWNOTE] = 0 if options.delete(:allow_note) == false

        params = translated_params(options).merge(params)
        Array(payment_requests).each_with_index do |payment_request, index|
          params.merge! payment_request.to_params(index)
{'fraction_non_alphanumeric': 0.09823182711198428, 'fraction_numerical': 0.0019646365422396855, 'mean_word_length': 1.6313522825150732, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7562753', 'n_tokens_mistral': 910, 'n_tokens_neox': 863, 'n_words': 149}