<commit_before>module StripeMock
  module Data

    def self.mock_account(params = {})
      id = params[:id] || 'acct_103ED82ePvKYlo2C'
      {
        id: id,
        email: "<EMAIL>",
        statement_descriptor: nil,
        display_name: "Stripe.com",
        timezone: "US/Pacific",
        details_submitted: false,
        charges_enabled: false,
        transfers_enabled: false,
        currencies_supported: [
          "usd"
        ],

      }.merge(params)
    end

    def self.mock_customer(sources, params)
      cus_id = params[:id] || "test_cus_default"
      sources.each {|source| source[:customer] = cus_id}
      {
        email: '<EMAIL>',
        description: 'an auto-generated stripe customer data mock',
        object: "customer",
        created: 1372126710,
        id: cus_id,
        livemode: false,
        delinquent: false,
        discount: nil,
        account_balance: 0,
        sources: {
          object: "list",
          total_count: sources.size,
          url: "/v1/customers/#{cus_id}/sources",
          data: sources
        },
        subscriptions: {
          object: "list",
          total_count: 0,
          url: "/v1/customers/#{cus_id}/subscriptions",
          data: []
        },
        default_source: nil
      }.merge(params)
    end

    def self.mock_charge(params={})
      charge_id = params[:id] || "ch_1fD6uiR9FAA2zc"
      {
        id: charge_id,
        object: "charge",
        created: 1366194027,
        livemode: false,
        paid: true,
        amount: 0,
        currency: "usd",
        refunded: false,
        fee: 0,
        status: 'succeeded',
        fee_details: [
        ],
        source: {
          object: "card",
          last4: "4242",
          type: "Visa",
          brand: "Visa",
          funding: "credit",
          exp_month: 12,
          exp_year: 2013,
          fingerprint: "3TQGpK9JoY1GgXPw",
          country: "US",
          name: "name",
          address_line1: nil,<commit_msg>remove fee fields from charge mock<commit_after>module StripeMock
  module Data

    def self.mock_account(params = {})
      id = params[:id] || 'acct_103ED82ePvKYlo2C'
      {
        id: id,
        email: "<EMAIL>",
        statement_descriptor: nil,
        display_name: "Stripe.com",
        timezone: "US/Pacific",
        details_submitted: false,
        charges_enabled: false,
        transfers_enabled: false,
        currencies_supported: [
          "usd"
        ],

      }.merge(params)
    end

    def self.mock_customer(sources, params)
      cus_id = params[:id] || "test_cus_default"
      sources.each {|source| source[:customer] = cus_id}
      {
        email: '<EMAIL>',
        description: 'an auto-generated stripe customer data mock',
        object: "customer",
        created: 1372126710,
        id: cus_id,
        livemode: false,
        delinquent: false,
        discount: nil,
        account_balance: 0,
        sources: {
          object: "list",
          total_count: sources.size,
          url: "/v1/customers/#{cus_id}/sources",
          data: sources
        },
        subscriptions: {
          object: "list",
          total_count: 0,
          url: "/v1/customers/#{cus_id}/subscriptions",
          data: []
        },
        default_source: nil
      }.merge(params)
    end

    def self.mock_charge(params={})
      charge_id = params[:id] || "ch_1fD6uiR9FAA2zc"
      {
        id: charge_id,
        object: "charge",
        created: 1366194027,
        livemode: false,
        paid: true,
        amount: 0,
        currency: "usd",
        refunded: false,
        status: 'succeeded',
        source: {
          object: "card",
          last4: "4242",
          type: "Visa",
          brand: "Visa",
          funding: "credit",
          exp_month: 12,
          exp_year: 2013,
          fingerprint: "3TQGpK9JoY1GgXPw",
          country: "US",
          name: "name",
          address_line1: nil,
{'fraction_non_alphanumeric': 0.11930531084822552, 'fraction_numerical': 0.025421595771457337, 'mean_word_length': 1.7015635622025833, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4590364', 'n_tokens_mistral': 1335, 'n_tokens_neox': 1245, 'n_words': 265}