<commit_before>class Types::StripeAccountType < Types::BaseObject
  field :id, ID, null: false
  field :email, String, null: true
  field :charges_enabled, Boolean, null: false
  field :display_name, String, null: true

  def display_name
    object.settings&.dashboard&.display_name
  end

  field :account_onboarding_link, String, null: false do<commit_msg>Don't break if Stripe doesn't return an account email<commit_after>class Types::StripeAccountType < Types::BaseObject
  field :id, ID, null: false
  field :email, String, null: true
  field :charges_enabled, Boolean, null: false
  field :display_name, String, null: true

  def display_name
    object.settings&.dashboard&.display_name
  end

  def email
    # in case Stripe didn't return it, which it apparently sometimes doesn't
    object['email']
  end

  field :account_onboarding_link, String, null: false do
{'fraction_non_alphanumeric': 0.08695652173913043, 'fraction_numerical': 0.0, 'mean_word_length': 4.833333333333333, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6633027', 'n_tokens_mistral': 274, 'n_tokens_neox': 262, 'n_words': 88}