midas_client 0.1.3 → 0.1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -3
- data/lib/midas_client.rb +6 -3
- data/lib/midas_client/request.rb +1 -1
- data/lib/midas_client/subscription.rb +2 -2
- data/lib/midas_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3ec35f5131e1304acf26ba2dd20420837d3bbec
|
4
|
+
data.tar.gz: 3d1f73a438cf3b5dda84e28787da901659b6c730
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f29c794f3ee70d79875afbf75dc98f9e6dcc8011fffc9172b27bd5e0d3001cac3fdf2fb85bee800e4697622a4a5aa29e30f0e95fc2916d0b581b726ab68f0cd4
|
7
|
+
data.tar.gz: cb324eac3066f58d782e36170e30b132d687e5c3c6d8267b768b97a6f2dce546c3285771659dd2275ab1d25281d3f2d86f5a236140fc72ab8dc999f2570fb88c
|
data/README.md
CHANGED
@@ -38,10 +38,13 @@ Request
|
|
38
38
|
|
39
39
|
Response
|
40
40
|
|
41
|
-
$ [
|
42
|
-
$ [
|
41
|
+
$ [17/05/2017 20:48:05.087]METHOD: post URL: https://sandbox.ansertecnologia.net/midas-core/v2/creditcard login: pdv01 password: /eFRsg8RLne+I0GlECQofYvnsDfb0w== payload: {:externalId=>"teste_midas_client_00002", :pan=>"552952@@@@@@4124", :expirationMonth=>"01", :expirationYear=>"2021", :holderName=>"TESTE MIDAS CLIENT", :customer=>{:documentType=>"CPF", :documentNumber=>"36549450152"}}
|
42
|
+
$ [17/05/2017 20:48:06.103][RESPONSE] {:result=>{:success=>true, :code=>"010", :message=>"O cartao jah foi armazenado anteriormente"}, :brand=>"MASTER", :cardToken=>"f887d732863eb3ef2e45c0bd8b57ed33"}
|
43
43
|
|
44
44
|
## Change Releases
|
45
|
+
VERSION - 0.1.3.1 - 2017/05/28
|
46
|
+
- publishing stable gem
|
47
|
+
- read.me
|
45
48
|
|
46
49
|
VERSION - 0.1.3 - 2017/05/22
|
47
50
|
- Removing Rails log dependency
|
@@ -84,7 +87,8 @@ Subscriptions
|
|
84
87
|
|
85
88
|
## Contributing
|
86
89
|
|
87
|
-
|
90
|
+
- Tests must be implemented, please pull request tests
|
91
|
+
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/midas_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
88
92
|
|
89
93
|
## License
|
90
94
|
|
data/lib/midas_client.rb
CHANGED
@@ -17,9 +17,12 @@ require_relative "midas_client/subscription"
|
|
17
17
|
#end
|
18
18
|
|
19
19
|
module MidasClient
|
20
|
-
@@spec = Gem::Specification.find_by_name("midas_client")
|
21
|
-
@@gem_root = @@spec.gem_dir
|
22
20
|
|
23
21
|
class << self
|
22
|
+
attr_reader :gem_root
|
23
|
+
|
24
|
+
spec = Gem::Specification.find_by_name("midas_client")
|
25
|
+
@gem_root = spec.gem_dir
|
26
|
+
|
24
27
|
end
|
25
|
-
end
|
28
|
+
end
|
data/lib/midas_client/request.rb
CHANGED
@@ -132,10 +132,10 @@ module MidasClient
|
|
132
132
|
response = request(method, endpoint, self.login, self.password, params)
|
133
133
|
|
134
134
|
# recupera a lista de invoices da assinatura para chamar o método de atualização de cada invoice.
|
135
|
-
invoices = subscription_invoices(subscription_token)
|
135
|
+
result, invoices = subscription_invoices(subscription_token)
|
136
136
|
|
137
137
|
# filtra apenas as invoices em aberto
|
138
|
-
opened_invoices = invoices
|
138
|
+
opened_invoices = invoices.select{|s| s[:status] == 'OPEN'}
|
139
139
|
|
140
140
|
# percorre cada uma das invoices abertas e chama o método de atualização
|
141
141
|
opened_invoices.each do |inv|
|
data/lib/midas_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: midas_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.3
|
4
|
+
version: 0.1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Andre Oliveira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|