mercadolibre 1.5.0 → 1.6.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
  SHA1:
3
- metadata.gz: f0a296bd9ee13aa9301b676cc7edf7876ea61b3e
4
- data.tar.gz: 839115726e97cd015b2693d76a8081937574d562
3
+ metadata.gz: e7b4ba86331cb735ae83c5d3ee2cbb11dde20b67
4
+ data.tar.gz: 0dec4be1b6e82d53314508af6f26df56572306ee
5
5
  SHA512:
6
- metadata.gz: 500ca5970a009bd2e6a5846d0f3ce87e6c61025b388d87a79d86adbc7f5f5eab18168c35a29702601763c04296363e5d1653eee3b385060d64cda95e4b367766
7
- data.tar.gz: db94dff527360dabf1b24a88d9b07d807b366d6f458fa47119cd7ad57a182dd9ef584d3522da99a006695023568ea850450978b227d94f6b222e5bfd40714fd2
6
+ metadata.gz: ba4542b74dab6deddc6e4a1ed4e3410010f50c35f12536624751d6a7fac8f0e319a77df9ee64fe305965088775679a5ead4d526525c2be1ebd5e68f338e27280
7
+ data.tar.gz: 2a1e0f1e4c7f12e7376bf6c0ebe447d886dfdd053c7dbb19bc17625b003bad6dc57b90ac4b7f1908581a2314b6ae901cd3cb19dabb7623713bc59e66dba6e393
data/CHANGELOG.md CHANGED
@@ -273,3 +273,7 @@
273
273
  ## v1.5.0
274
274
 
275
275
  * Added method to check money requests
276
+
277
+ ## v1.6.0
278
+
279
+ * Endpoint configurable
@@ -7,8 +7,19 @@ module Mercadolibre
7
7
  @app_secret = args[:app_secret]
8
8
  @callback_url = args[:callback_url]
9
9
  @access_token = args[:access_token]
10
- @endpoint_url = 'https://api.mercadolibre.com'
11
- @auth_url = 'https://auth.mercadolibre.com.ar'
10
+
11
+ if args[:endpoint_url].present?
12
+ @endpoint_url = args[:endpoint_url]
13
+ else
14
+ @endpoint_url = 'https://api.mercadolibre.com'
15
+ end
16
+
17
+ if args[:auth_url].present?
18
+ @auth_url = args[:auth_url]
19
+ else
20
+ @auth_url = 'https://auth.mercadolibre.com.ar'
21
+ end
22
+
12
23
  @site = args[:site]
13
24
  end
14
25
 
@@ -1,3 +1,3 @@
1
1
  module Mercadolibre
2
- VERSION = '1.5.0'
2
+ VERSION = '1.6.0'
3
3
  end
@@ -7,8 +7,19 @@ module Mercadopago
7
7
  @app_secret = args[:app_secret]
8
8
  @callback_url = args[:callback_url]
9
9
  @access_token = args[:access_token]
10
- @endpoint_url = 'https://api.mercadopago.com/v1'
11
- @auth_url = 'https://auth.mercadopago.com.ar'
10
+
11
+ if args[:endpoint_url].present?
12
+ @endpoint_url = args[:endpoint_url]
13
+ else
14
+ @endpoint_url = 'https://api.mercadopago.com'
15
+ end
16
+
17
+ if args[:auth_url].present?
18
+ @auth_url = args[:auth_url]
19
+ else
20
+ @auth_url = 'https://auth.mercadopago.com.ar'
21
+ end
22
+
12
23
  @site = args[:site]
13
24
  end
14
25
 
@@ -8,13 +8,11 @@ module Mercadopago
8
8
 
9
9
  def search_payments(filters={})
10
10
  filters.merge!({ access_token: @access_token })
11
-
12
11
  get_request('/payments/search', filters).body
13
12
  end
14
13
 
15
14
  def request_payment(attrs={})
16
15
  payload = attrs.to_json
17
-
18
16
  headers = { content_type: :json }
19
17
 
20
18
  post_request("/money_requests?access_token=#{@access_token}", payload, headers).body
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercadolibre
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Hick