<commit_before>require 'forwardable'
module Subspp
  class Subscriber < Resource
    extend Forwardable
    include Base

    attr_accessor :site, :customer_id, :doc, :configuration

    define_attribute_method :first_name, 'billing-first-name'
    define_attribute_method :last_name, 'billing-last-name'
    define_attribute_method :email
    define_attribute_method :active_until
    define_attribute_method :expired_at
    define_attribute_method :recurring
    define_attribute_method :store_credit
    define_attribute_method :grace_until

    delegate [:host, :api_version, :site, :token] => :configuration

    def initialize(options)
      set_instance_variable_from_options(options)
      @configuration = Subspp.configuration
    end

    def url
      [ host, 'api',  api_version, site, 'subscribers', "#{customer_id}.xml" ].
        join('/')
    end

    def subscribed?
      grace_until > Time.now
    end<commit_msg>Add more attributes to Subscriber<commit_after>require 'forwardable'
module Subspp
  class Subscriber < Resource
    extend Forwardable
    include Base

    attr_accessor :site, :customer_id, :doc, :configuration

    define_attribute_method :first_name, 'billing-first-name'
    define_attribute_method :last_name, 'billing-last-name'
    define_attribute_method :email
    define_attribute_method :active_until
    define_attribute_method :expired_at
    define_attribute_method :recurring
    define_attribute_method :store_credit
    define_attribute_method :grace_until
    define_attribute_method :customer_id
    define_attribute_method :subscription_plan_name
    define_attribute_method :created_at
    define_attribute_method :updated_at

    delegate [:host, :api_version, :site, :token] => :configuration

    def initialize(options)
      set_instance_variable_from_options(options)
      @configuration = Subspp.configuration
    end

    def url
      [ host, 'api',  api_version, site, 'subscribers', "#{customer_id}.xml" ].
        join('/')
    end

    def subscribed?
      grace_until > Time.now
    end
{'fraction_non_alphanumeric': 0.07583859990277103, 'fraction_numerical': 0.0, 'mean_word_length': 4.0814814814814815, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1274222', 'n_tokens_mistral': 616, 'n_tokens_neox': 602, 'n_words': 133}