api-moip-assinaturas 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/api_moip_assinaturas.gemspec +2 -2
- data/lib/moip/configuration.rb +2 -1
- data/lib/moip/header.rb +8 -1
- data/lib/moip/models/payment.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NmQ5OTA1M2RkYzdkYmFiODZkOTAzZDA3Y2FhNzFlMDczZDhmZjI5Zg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
YzhjZGE3ZmJlOGQyZGY4ZDg4OWM5ZjQwYWE1MjM3MDMxMGJkMWFjNQ==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Y2M3YWI1MzUzNWYwYWY1OGNmYzU3MzVjMzJiYTkyZDNkNzU5ZTU4NDY4Njhl
|
|
10
|
+
MzdiNDQ3ZWY5MjdmMTRmNjc2ZTYxZGE4ZGZhOTM4MWY0NzRkYjJlMmQ4MmYz
|
|
11
|
+
OGJmYzI1NjhlYTg5MjBlMzkwNmZjMzkzODcxMGM2YzlkNmI1OTg=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
Y2E2ZTAzZTk4YzIxZDFmYTdjZjRmMTU1YTZlM2QwYTU4NjM2OTY2NjY0YTBh
|
|
14
|
+
ZTJiOWY1NTlmZTc0OTg2NGU1MzVkOTNkYzMwZDQ4Nzg3OGJiNjEyYWE2MjFj
|
|
15
|
+
Zjc1M2VjMTY2MGM1NWRkMzUzYmJlMjg1N2VkYjNhMGFiNTA5MGY=
|
|
@@ -3,8 +3,8 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = 'api-moip-assinaturas'
|
|
6
|
-
s.version = '0.2.
|
|
7
|
-
s.date = '2013-06-
|
|
6
|
+
s.version = '0.2.3'
|
|
7
|
+
s.date = '2013-06-26'
|
|
8
8
|
s.summary = "Moip Assinaturas by Pixxel"
|
|
9
9
|
s.description = "Gem desenvolvida para atender aos requisitos do moip api de assinaturas"
|
|
10
10
|
s.authors = ["Douglas Rossignolli"]
|
data/lib/moip/configuration.rb
CHANGED
|
@@ -14,12 +14,13 @@ module Moip
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
class Configuration
|
|
17
|
-
attr_accessor :token, :acount_key, :auth_key
|
|
17
|
+
attr_accessor :token, :acount_key, :auth_key, :env
|
|
18
18
|
|
|
19
19
|
def initialize
|
|
20
20
|
self.token = ""
|
|
21
21
|
self.acount_key = ""
|
|
22
22
|
self.auth_key = ""
|
|
23
|
+
self.env = ""
|
|
23
24
|
end
|
|
24
25
|
end
|
|
25
26
|
end
|
data/lib/moip/header.rb
CHANGED
|
@@ -14,7 +14,14 @@ module Moip
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def base_url model, options = {}
|
|
17
|
-
url = "
|
|
17
|
+
url = ""
|
|
18
|
+
|
|
19
|
+
if Moip.conf.env == "production"
|
|
20
|
+
url = "https://api.moip.com.br/assinaturas/v1/#{model.to_s}"
|
|
21
|
+
else
|
|
22
|
+
url = "https://sandbox.moip.com.br/assinaturas/v1/#{model.to_s}"
|
|
23
|
+
end
|
|
24
|
+
|
|
18
25
|
url << "/#{options[:code]}" if options[:code]
|
|
19
26
|
url << "/#{options[:status]}" if options[:status]
|
|
20
27
|
url << "?#{options[:params]}" if options[:params]
|
data/lib/moip/models/payment.rb
CHANGED
|
@@ -34,7 +34,7 @@ class Moip::Payment < Moip::Model
|
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def load
|
|
37
|
-
self.class.get(base_url(:invoices, :code => self.subscription_code, :status => "payments"), default_header).parsed_response
|
|
37
|
+
list = self.class.get(base_url(:invoices, :code => self.subscription_code, :status => "payments"), default_header).parsed_response
|
|
38
38
|
self.payments = list["payments"]
|
|
39
39
|
end
|
|
40
40
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: api-moip-assinaturas
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Douglas Rossignolli
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-06-
|
|
11
|
+
date: 2013-06-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|