<commit_before># frozen_string_literal: true

class Acme::Client::Resources::Account
  attr_reader :status, :contact, :term_of_service, :orders_url

  def self.arguments_from_response(response)
    attributes = response.body
    status = attributes.fetch('status')
    term_of_service = attributes['termsOfServiceAgreed']
    contact = attributes.fetch('contact', [])

    { term_of_service: term_of_service, status: status, contact: contact }
  end

  def initialize(client, **arguments)
    @client = client
    assign_attributes(arguments)
  end

  def kid
    url
  end

  def reload
    assign_attributes **@client.authorization(location: url).to_h
    true
  end

  def to_h
    {
      term_of_service: term_of_service,
      status: status,
      contact: contact
    }<commit_msg>Fix url accessor on account<commit_after># frozen_string_literal: true

class Acme::Client::Resources::Account
  attr_reader :url, :status, :contact, :term_of_service, :orders_url

  def self.arguments_from_response(response)
    attributes = response.body
    status = attributes.fetch('status')
    term_of_service = attributes['termsOfServiceAgreed']
    contact = attributes.fetch('contact', [])

    { term_of_service: term_of_service, status: status, contact: contact }
  end

  def initialize(client, **arguments)
    @client = client
    assign_attributes(arguments)
  end

  def kid
    url
  end

  def reload
    assign_attributes **@client.authorization(location: url).to_h
    true
  end

  def to_h
    {
      term_of_service: term_of_service,
      status: status,
      contact: contact
    }
{'fraction_non_alphanumeric': 0.09386733416770963, 'fraction_numerical': 0.0, 'mean_word_length': 3.875, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7041624', 'n_tokens_mistral': 497, 'n_tokens_neox': 479, 'n_words': 111}