finix 0.6 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/circle.yml +7 -4
- data/finix.gemspec +10 -4
- data/lib/finix/pagination.rb +1 -0
- data/lib/finix/resources/dispute.rb +0 -2
- data/lib/finix/resources/resource.rb +6 -20
- data/lib/finix/resources/verifiable.rb +1 -1
- data/lib/finix/version.rb +1 -1
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjIwZTY2OGE1ZjA0OWNhYWEwOGZmOTFkZWM1MjU5MzE0ZTdlNGQ0Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzA3ZmQ1ZGZmMDliMzU5ZTU4NmZlYzllYWU5NzQ3MjZlYjRmZTNmNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTc4NzJjMWE5Y2JkZjhjMjVlZDI3OTM4MjZjZDVjZDNhMzc3NjdhZGJlZTZl
|
10
|
+
YzAzOTdjODBiMDdiZmFiZWVmMDc2MGQwYzI3MzlmOGYwMmI4OTBhNDJjMDU2
|
11
|
+
ZDRhNzA3MmI1YzA2NTBkZDNlNzcyMDlhOGU5NDI1MGZhZjExZjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzJmZWZiYTExMDg5YTI5OTBhNjA2OGY5MzIzMWRlMGE0YTA5ZGUxYjQ0MjAx
|
14
|
+
OTA2ZDk0NWJhY2NlMDBhMWIwNmNhOTNiZDkzMWYwZTVlYWUyMWVmYjY1NTc0
|
15
|
+
NTY1MGViMzViODZhMDhkZGE3ZDM4ZTJhYmM5ZWE1MzUxMGVjZDA=
|
data/circle.yml
CHANGED
@@ -3,16 +3,19 @@ machine:
|
|
3
3
|
version: 1.9.3
|
4
4
|
|
5
5
|
environment:
|
6
|
+
RUBY_VERSIONS: 1.9.3,2.0.0,2.1.10,2.2.5,2.2.6,2.3.1,2.3.3,2.4.0-preview3
|
6
7
|
PROCESSING_URL: https://api-staging.finix.io/
|
7
8
|
|
8
9
|
dependencies:
|
9
10
|
override:
|
10
|
-
-
|
11
|
-
-
|
11
|
+
- rvm get head
|
12
|
+
- rvm install $RUBY_VERSIONS
|
13
|
+
- rvm $RUBY_VERSIONS --verbose do gem install bundler
|
14
|
+
- rvm $RUBY_VERSIONS --verbose do bundle install
|
12
15
|
|
13
16
|
test:
|
14
17
|
override:
|
15
|
-
- rake test
|
18
|
+
- rvm $RUBY_VERSIONS --verbose do bundle exec rake test
|
16
19
|
|
17
20
|
post:
|
18
|
-
|
21
|
+
- cp -Rf .report/ $CIRCLE_ARTIFACTS
|
data/finix.gemspec
CHANGED
@@ -22,9 +22,15 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
|
-
spec.add_dependency('
|
26
|
-
spec.add_dependency('faraday', '~> 0.9.2')
|
25
|
+
spec.add_dependency('faraday', '~> 0.10.0')
|
27
26
|
spec.add_dependency('faraday_middleware', '~> 0.10.1')
|
28
|
-
|
29
|
-
|
27
|
+
|
28
|
+
if RUBY_VERSION >= '2.0'
|
29
|
+
spec.add_dependency('json', '~> 2.0.2')
|
30
|
+
spec.add_dependency('addressable', '~> 2.5.0')
|
31
|
+
else
|
32
|
+
spec.add_dependency('public_suffix', '~> 1.4.6')
|
33
|
+
spec.add_dependency('json', '~> 1.8')
|
34
|
+
spec.add_dependency('addressable', '~> 2.3')
|
35
|
+
end
|
30
36
|
end
|
data/lib/finix/pagination.rb
CHANGED
@@ -71,6 +71,7 @@ module Finix
|
|
71
71
|
resource_name, resources = body.delete('_embedded').first
|
72
72
|
@resource_class = Finix.from_hypermedia_registry resource_name
|
73
73
|
@attributes['items'] = resources.map { |item| @resource_class.construct_from_response item }
|
74
|
+
@attributes['page'] = body.delete('page')
|
74
75
|
end
|
75
76
|
end
|
76
77
|
|
@@ -6,8 +6,6 @@ module Finix
|
|
6
6
|
define_hypermedia_types [:disputes]
|
7
7
|
|
8
8
|
def upload_evidence(evidence_file_path)
|
9
|
-
# self.evidence.file = Faraday::UploadIO.new(evidence_file_path, 'application/octet-stream')
|
10
|
-
# self.evidence.file = Faraday::UploadIO.new(evidence_file_path, 'application/octet-stream')
|
11
9
|
self.evidence.create :file => Faraday::UploadIO.new(evidence_file_path, 'application/octet-stream')
|
12
10
|
end
|
13
11
|
end
|
@@ -22,10 +22,8 @@ module Finix
|
|
22
22
|
|
23
23
|
if property == 'self'
|
24
24
|
@hyperlinks[:self] = link[:href]
|
25
|
-
# @attributes['href'] = link[:href]
|
26
25
|
else
|
27
26
|
@hyperlinks[property] = Finix::Utils.callable(Finix::Pagination.new(link[:href], {}))
|
28
|
-
# @hyperlinks[property] = Finix.from_hypermedia_registry(property).new 'href' => link[:href]
|
29
27
|
end
|
30
28
|
end
|
31
29
|
end
|
@@ -114,38 +112,26 @@ module Finix
|
|
114
112
|
end
|
115
113
|
|
116
114
|
def fetch(*arguments)
|
117
|
-
if arguments.nil? or arguments.empty? or arguments[0].nil? or arguments[0].to_s.empty?
|
118
|
-
|
115
|
+
if arguments.nil? or arguments.empty? or arguments[0].nil? or arguments[0].to_s.empty?
|
116
|
+
href = Finix.hypermedia_registry.key(self)
|
117
|
+
return Finix::Pagination.new href
|
119
118
|
end
|
120
119
|
|
121
120
|
options = arguments.slice!(0) or {}
|
122
|
-
if options.is_a? String
|
121
|
+
if options.is_a? String and options =~ URI::regexp
|
123
122
|
href = options
|
124
123
|
else
|
125
124
|
href = Finix.hypermedia_registry.key(self) or Finix.hypermedia_registry.key(self.class)
|
126
|
-
id = options.
|
125
|
+
id = options if options.is_a? String
|
126
|
+
id = options.delete(:id) if options.is_a? Hash
|
127
127
|
href = "#{href}/#{id}" unless id.nil?
|
128
128
|
end
|
129
129
|
|
130
130
|
response = Finix.get href
|
131
131
|
construct_from_response response.body
|
132
|
-
|
133
132
|
end
|
134
133
|
|
135
134
|
alias find fetch
|
136
|
-
|
137
|
-
# def paginate(options = {})
|
138
|
-
# Finix::Pagination.new href, options
|
139
|
-
# end
|
140
|
-
|
141
|
-
# alias scoped paginate
|
142
|
-
# alias where paginate
|
143
|
-
|
144
|
-
# def all(options = {})
|
145
|
-
# pager = paginate(options)
|
146
|
-
# pager.to_a
|
147
|
-
# end
|
148
|
-
|
149
135
|
end
|
150
136
|
|
151
137
|
end
|
data/lib/finix/version.rb
CHANGED
metadata
CHANGED
@@ -1,85 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.7'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- finix-payments
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.10.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.10.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: faraday_middleware
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.10.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.10.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: public_suffix
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.4.6
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.4.6
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: json
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '1.8'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '1.8'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: addressable
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '2.3'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '2.3'
|
83
83
|
description: Finix Ruby Client
|
84
84
|
email:
|
85
85
|
- support@finixpayments.com
|