mercadopago-ruby 0.10.9 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58b0eae1c8f7b70853fcf5d518131018d48fa959e321542b702eafb01cb22a32
4
- data.tar.gz: 281d3382dc4b60d9bc16d434441bc3e2ebbe9a6785b9322b5a73ffea964b0fa4
3
+ metadata.gz: 33c793b3183c497b0513492a00046c23c6bfefe03272cec004850c873fed4cd8
4
+ data.tar.gz: 5e7b870755fef440d1c04114708cc95a2ee2748a54ec55c67386435f2d95367b
5
5
  SHA512:
6
- metadata.gz: d49465e837fab0af6c84dc36a1bf42a93786ab220efd28d6eeac97463e34f5fefb95361706cf14241666be30e8069a8674489509b5809e63d21d537c4bf36fb6
7
- data.tar.gz: 0eaa84b968c3d0369ad92e1b0ed4c3dfc69d6da7baa1d5d29395f5a2b416a3b231989c50429d025269260f86dbde379ec2b2d16877c66b6d6b500324f8af80da
6
+ metadata.gz: b6e29dfde5848dc6ebe681b7cd3b4b8a4e91e84d761342e2418ec3fd8a652807f460f272b16335e80e93f32239dff0ff2e87d914d10c4affdc1f2c7ab1fa4fbd
7
+ data.tar.gz: e4004d88e40ebb217191de0bc669a4de2b4dcce6d1870675f5a1393423f5e4d51b87bb35d7674a97f09a93d67ce3f146fceb9f217c641e404ff2aab8a4641289
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Mercado Pago Gem
2
2
  [![Gem Version](https://badge.fury.io/rb/mercadopago-ruby.svg)](https://badge.fury.io/rb/mercadopago-ruby)
3
+ [Official Mercado Pago documentation](https://www.mercadopago.com.ar/developers/es/)
3
4
  -----
4
5
  ## Index
5
6
  - [Installation](#installation)
@@ -26,7 +27,7 @@
26
27
  - Get a customer by email
27
28
  ```ruby
28
29
  @client = MercadoPago::API::Clients.new(access_token: ACCESS_TOKEN)
29
- @client.search_customers_by_email(email: 'customer@mail.com')
30
+ @client.search_customers_by_email('customer@mail.com')
30
31
  ```
31
32
  - Get a customer by any criteria
32
33
  ```ruby
@@ -48,8 +49,17 @@
48
49
  @client.update_customer(CUSTOMER_ID, payload)
49
50
  ```
50
51
  ## Cards
52
+ Mercado Pago provides credit cards to being used in the sandbox environment. [See list](https://www.mercadopago.com.ar/developers/es/solutions/payments/custom-checkout/test-cards/)
53
+ - Adding a new card
54
+ Cards should be added using the official Mercado Pago's JS SDK, because risky data should not go through our Backend side, intead, Mercado Pago will return a **card_token** attribute which you can be used to add a new card to an existing customer.
55
+ [How to create a new card](https://www.mercadopago.com.br/developers/en/solutions/payments/custom-checkout/charge-with-creditcard/javascript/)
56
+ - Add a card to an existing customer
57
+ Once you have your **card_token** and you **customer_id** you can associate both, in this way adding a card to an existing customer.
58
+ ```ruby
59
+ @client = MercadoPago::API::Cards.new(access_token: ACCESS_TOKEN)
60
+ @client.add_card_to_customer(CUSTOMER_ID, CARD_TOKEN)
61
+ ```
51
62
  - Retrieve customer cards
52
- ```ruby
53
- @client = MercadoPago::API::Cards.new(access_token: ACCESS_TOKEN)
54
- @client.retrieve_customer_cards(CUSTOMER_ID)
55
- ```
63
+ ```ruby
64
+ @client.retrieve_customer_cards(CUSTOMER_ID)
65
+ ```
@@ -24,8 +24,8 @@ module MercadoPago
24
24
  end
25
25
 
26
26
  # Argument must be an Hash
27
- def search_customers_by_email(payload)
28
- response = connection.get(customers_search_endpoint, payload) do |req|
27
+ def search_customers_by_email(email)
28
+ response = connection.get(customers_search_endpoint, email: email) do |req|
29
29
  req.params['access_token'] = access_token
30
30
  end
31
31
  response = process_response(response)
@@ -3,8 +3,8 @@
3
3
  module MercadoPago
4
4
  class Version
5
5
  MAJOR = 0
6
- MINOR = 10
7
- PATCH = 9
6
+ MINOR = 11
7
+ PATCH = 0
8
8
 
9
9
  class << self
10
10
  # @return [String]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercadopago-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.9
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nardo Nykolyszyn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-19 00:00:00.000000000 Z
11
+ date: 2019-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: 1.3.5
147
147
  requirements: []
148
148
  rubyforge_project:
149
- rubygems_version: 2.7.7
149
+ rubygems_version: 2.7.6
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: Mercado Pago gem.