<commit_before>require 'accepton/api/utils'

module AcceptOn
  module API
    module Refunding
      include AcceptOn::API::Utils

      # Refunds a charge by the specified amount
      #
      # @api public
      #
      # @example Create a refund of $1.00 on charge chg_47ce6dacb1ec5124
      #   refund(amount: 1_00, authorization_id: 'chg_<PASSWORD>')
      #
      # @param args [Hash] Attributes to set on the refund
      # @option args [Integer] :amount The amount in cents to refund
      # @option args [String] :authorization_id The id of the charge to refund
      #
      # @raise [AcceptOn::Error] If an API error happens
      # @return [AcceptOn::Refund]
      def refund(args = {})
        perform_post_with_object('/v1/refunds', args, AcceptOn::Refund)
      end
    end
  end
end<commit_msg>Rename refund's authorization_id to charge_id<commit_after>require 'accepton/api/utils'

module AcceptOn
  module API
    module Refunding
      include AcceptOn::API::Utils

      # Refunds a charge by the specified amount
      #
      # @api public
      #
      # @example Create a refund of $1.00 on charge chg_47ce6dacb1ec5124
      #   refund(amount: 1_00, charge_id: 'chg_47ce6dacb1ec5124')
      #
      # @param args [Hash] Attributes to set on the refund
      # @option args [Integer] :amount The amount in cents to refund
      # @option args [String] :charge_id The id of the charge to refund
      #
      # @raise [AcceptOn::Error] If an API error happens
      # @return [AcceptOn::Refund]
      def refund(args = {})
        perform_post_with_object('/v1/refunds', args, AcceptOn::Refund)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08819951338199514, 'fraction_numerical': 0.023114355231143552, 'mean_word_length': 2.7133182844243793, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '97545', 'n_tokens_mistral': 534, 'n_tokens_neox': 515, 'n_words': 163}