README.md in tokenex-0.4.1 vs README.md in tokenex-0.5.1
- old
+ new
@@ -20,22 +20,44 @@
## Usage
### Tokenization
-Let's start with a simple tokenization and detokenization of a credit card record:
+#### Initialize your TokenEx object
+The examples below require you first instantiate a new TokenEx object
+
```ruby
tokenex = Tokenex::Environment.new(api_base_url, token_ex_id, api_key)
+```
+
+#### Tokenize a credit card number
+```ruby
token = tokenex.token_from_ccnum(4242424242424242)
-ccnum = tokenex.detokenize(token)
-is_valid_token = tokenex.validate_token(token)
+```
+
+#### Tokenize arbitrary data
+```ruby
+token = tokenex.tokenize("This is random data containing 3 numbers less than 10")
+```
+
+#### Detokenize a token
+```ruby
+token = tokenex.token_from_ccnum(4242424242424242)
+data = tokenex.detokenize(token)
+```
+
+#### Validate a token
+```ruby
+token = tokenex.token_from_ccnum(4242424242424242)
+token_is_valid = tokenex.validate_token(token)
+```
+
+#### Delete a token
+```ruby
+token = tokenex.token_from_ccnum(4242424242424242)
tokenex.delete_token(token)
-arbitrary_data = "This is my string with 3 numbers less than 10"
-token = tokenex.tokenize(arbitrary_data)
-arbitrary_data = tokenex.detokenize(token)
-tokenex.delete_token(token)
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -48,6 +70,5 @@
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
-