<commit_before># Omise Ruby Client

## Installation

Install using bundle (via github only at this time).

```ruby
gem 'omise', github: 'omise/omise-ruby'
```

## Examples

First configure your api key.

```ruby
Omise.api_key = "<KEY>"
```

Then you're ready to go. Here's how to create, find, update and destroy a customer:

```ruby
customer = Omise::Customer.create({
  description: "<NAME>",
  email: "<EMAIL>"
})

customer.attributes #  =>  {
  "object" => "customer",
  "id" => "...",
  "livemode" => false,
  "location" => "/customers/...",
  "default_card" => nil,
  "email" => "<EMAIL>",
  "description" => "<NAME>",
  "created" => "2014-09-05T09:03:05Z",
  "cards" =>  {
    "object": "list",
    ...
  }
}

customer = Omise::Customer.find(customer.id)

customer.update description: "<NAME>"
customer.description # => "<NAME>"

customer.destroy
customer.destroyed? # => true
```<commit_msg>Update example<commit_after># Omise Ruby Client

## Installation

Install using bundle (via github only at this time).

```ruby
gem 'omise', github: 'omise/omise-ruby'
```

## Examples

First configure your api key.

```ruby
Omise.api_key = "<KEY>"
```

Then you're ready to go. Here's how to create customer:

```ruby
customer = Omise::Customer.create({
  description: "<NAME>",
  email: "<EMAIL>"
})

puts customer.attributes
# {
#   "object" => "customer",
#   "id" => "...",
#   "livemode" => false,
#   "location" => "/customers/...",
#   "default_card" => nil,
#   "email" => "<EMAIL>",
#   "description" => "<NAME>",
#   "created" => "2014-09-05T09:03:05Z",
#   "cards" =>  {
#     "object": "list",
#     ...
#   }
# }
```

Then find, update and destroy that customer.

```ruby
customer = Omise::Customer.find("cust_test_4xald9y2ttb5mvplw0c")

customer.update description: "<NAME>"
customer.description # => "<NAME>"

customer.destroy
customer.destroyed? # => true
```
{'fraction_non_alphanumeric': 0.20693333333333333, 'fraction_numerical': 0.0176, 'mean_word_length': 3.910994764397906, 'pattern_counts': {'":': 2, '<': 17, '<?xml version=': 0, '>': 40, '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': '845203', 'n_tokens_mistral': 705, 'n_tokens_neox': 657, 'n_words': 163}