Mercado Pago Gem

Index
- Installation
- API end-points
- Clients
- Search a customer by email
- Search a customer by any criteria
- Create a customer
- Remove customer
- Update customer
- Cards
* Retrieve
Installation
$ gem install mercadopago-ruby
require 'mercadopago'
Clients
- Get a customer by email
ruby
@client = MercadoPago::API::Clients.new(access_token: ACCESS_TOKEN)
@client.search_customers_by_email(email: '[email protected]')
- Get a customer by any criteria
ruby
@client.search_by(first_name: 'Peter Khaule')
- Create a new customer
ruby
@client.create_customer(email: '[email protected]')
- Remove customer
ruby
@client.remove_customer(CUSTOMER_ID)
- Update customer
ruby
payload = {
first_name: 'Peter Khaule'
}
@client.update_customer(CUSTOMER_ID, payload)
## Cards
- Retrieve customer cards
ruby
@client = MercadoPago::API::Cards.new(access_token: ACCESS_TOKEN)
@client.retrieve_customer_cards(CUSTOMER_ID)