<commit_before>Chargify API wrapper for Ruby (using ActiveResource)
====================================================
[![build status](https://secure.travis-ci.org/chargify/chargify_api_ares.png)](http://travis-ci.org/chargify/chargify_api_ares)

This is a Ruby wrapper for the [Chargify](http://chargify.com) API that leverages ActiveResource.

ActiveResource versions 3.0.0 to 3.0.19 are not compatible and will throw an exception. Please use at least version 3.0.20 if on 3.0. 

It allows you to interface with the Chargify API using simple ActiveRecord-like syntax, i.e.:

``` ruby
Chargify::Subscription.create(
  :customer_reference => 'moklett',
  :product_handle => 'chargify-api-ares-test',
  :credit_card_attributes => {
    :first_name => "Michael",
    :last_name => "Klett",
    :expiration_month => 1,
    :expiration_year => 2010,
    :full_number => "1234-1234-1234-1234"
  }
)

subscription.credit_card_attributes = { :expiration_year => 2013 }
subscription.save

subscription.cancel
```

See the `examples` directory for more usage examples.

### Installation

This library can be installed as a gem. It is hosted on [Rubygems](http://rubygems.org).<commit_msg>Add more background of when yaml bug was fixed in rails<commit_after>Chargify API wrapper for Ruby (using ActiveResource)
====================================================
[![build status](https://secure.travis-ci.org/chargify/chargify_api_ares.png)](http://travis-ci.org/chargify/chargify_api_ares)

This is a Ruby wrapper for the [Chargify](http://chargify.com) API that leverages ActiveResource.

ActiveResource versions 3.0.0 to 3.0.19 are not compatible and will throw an exception. Please use at least version 3.0.20 if on 3.0. For more information see the [relevant rails pull request](https://github.com/rails/rails/pull/8853/files).

It allows you to interface with the Chargify API using simple ActiveRecord-like syntax, i.e.:

``` ruby
Chargify::Subscription.create(
  :customer_reference => 'moklett',
  :product_handle => 'chargify-api-ares-test',
  :credit_card_attributes => {
    :first_name => "Michael",
    :last_name => "Klett",
    :expiration_month => 1,
    :expiration_year => 2010,
    :full_number => "1234-1234-1234-1234"
  }
)

subscription.credit_card_attributes = { :expiration_year => 2013 }
subscription.save

subscription.cancel
```

See the `examples` directory for more usage examples.

### Installation

This library can be installed as a gem. It is hosted on [Rubygems](http://rubygems.org).
{'fraction_non_alphanumeric': 0.15598885793871867, 'fraction_numerical': 0.03183446080382014, 'mean_word_length': 4.792626728110599, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 3, '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': '6358202', 'n_tokens_mistral': 834, 'n_tokens_neox': 758, 'n_words': 220}