<commit_before>module CardconnectSdk
  module Deposit
    class Response
      include Attributable

      attr_reader :deposits

      def initialize(deposits=[])
        @deposits = []
        deposits.each do |dep|
          @deposits << AchDeposit.new(dep)
        end
      end

      def self.from_json(json)
        self.new(JSON.parse(json))
      end

    end
  end
end

# [
#   {
#     "cardtype": "VI",
#     "postdate": "20121009",
#     "cbakamnt": "0.00",
#     "feeamnt": "0.55",
#     "currency": "USD",
#     "amount": "11.00",
#     "txns": [
#       {<commit_msg>Explain the override for #from_json<commit_after>module CardconnectSdk
  module Deposit
    class Response
      include Attributable

      attr_reader :deposits

      def initialize(deposits=[])
        @deposits = []
        deposits.each do |dep|
          @deposits << AchDeposit.new(dep)
        end
      end

      # Overridden because the json returns an array instead of
      # a typical hash, so deep_stringify_keys would fail.
      def self.from_json(json)
        self.new(JSON.parse(json))
      end

    end
  end
end

# [
#   {
#     "cardtype": "VI",
#     "postdate": "20121009",
#     "cbakamnt": "0.00",
#     "feeamnt": "0.55",
#     "currency": "USD",
#     "amount": "11.00",
#     "txns": [
#       {
{'fraction_non_alphanumeric': 0.13674560733384264, 'fraction_numerical': 0.02750190985485103, 'mean_word_length': 2.075117370892019, 'pattern_counts': {'":': 14, '<': 7, '<?xml version=': 0, '>': 3, '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': '1353744', 'n_tokens_mistral': 489, 'n_tokens_neox': 458, 'n_words': 100}