Skip to content
forked from omise/omise-ruby

About

Omise Ruby Library

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omise Ruby Client

Code Climate

Installation

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

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

Examples

First configure your api key.

Omise.api_key = "skey_test_4xa89ox4z4bcfrikkh2"

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

customer = Omise::Customer.create({
  description: "John Doe",
  email: "john.doe@example.com"
})

puts customer.attributes
# {
#   "object" => "customer",
#   "id" => "...",
#   "livemode" => false,
#   "location" => "/customers/...",
#   "default_card" => nil,
#   "email" => "john.doe@example.com",
#   "description" => "John Doe",
#   "created" => "2014-09-05T09:03:05Z",
#   "cards" =>  {
#     "object": "list",
#     ...
#   }
# }

Then find, update and destroy that customer.

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

customer.update description: "John W. Doe"
customer.description # => "John W. Doe"

customer.destroy
customer.destroyed? # => true

About

Omise Ruby Library

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors