synapse_payments 0.6.4 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/lib/synapse_payments.rb +0 -6
- data/lib/synapse_payments/client.rb +1 -1
- data/lib/synapse_payments/user_client.rb +0 -13
- data/lib/synapse_payments/version.rb +1 -1
- data/samples.md +4 -1
- data/synapse_payments.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4c1d872b18b79d0ec209a972048146597f8c79d
|
4
|
+
data.tar.gz: 7205bac033861e4147d7251a6e9f04deb63b8157
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c1cb20b7aab8374bec99867e6d30be51902d5dca67e1f670d93dbcc93fb5a44151cdeae66255e3fbe9d94e51c9995d50a99e16a9c4e3293fe5228f46b3b6d9d
|
7
|
+
data.tar.gz: ee7f97cf5b68c4c5cdb6e474fa73e006c3b84c957470631fb7c1c8629a6c4f96db674097ffe2ae0d378d17804f73b78436c2100f3ab51f40b4aa48b2f585f2d7
|
data/.travis.yml
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
3
|
- 2.1.5
|
4
|
-
- 2.2.
|
4
|
+
- 2.2.4
|
5
|
+
- 2.3.0
|
5
6
|
before_install: gem install bundler -v 1.10.6
|
6
7
|
cache: bundler
|
7
8
|
sudo: false
|
8
9
|
fast_finish: true
|
9
10
|
env:
|
10
|
-
- USER_ID= SYNAPSE_PAYMENTS_CLIENT_ID= SYNAPSE_PAYMENTS_CLIENT_SECRET=
|
11
|
+
- USER_ID= SYNAPSE_PAYMENTS_CLIENT_ID= SYNAPSE_PAYMENTS_CLIENT_SECRET= SYNAPSE_PAYMENTS_FINGERPRINT=
|
11
12
|
notifications:
|
12
13
|
email:
|
13
14
|
on_success: always
|
data/lib/synapse_payments.rb
CHANGED
@@ -15,6 +15,7 @@ module SynapsePayments
|
|
15
15
|
# @return [SynapsePayments::Client]
|
16
16
|
def initialize(options={})
|
17
17
|
@sandbox_mode = true
|
18
|
+
@timeout_options = { write: 2, connect: 5, read: 10 }
|
18
19
|
|
19
20
|
options.each do |key, value|
|
20
21
|
instance_variable_set("@#{key}", value)
|
@@ -22,7 +23,6 @@ module SynapsePayments
|
|
22
23
|
|
23
24
|
yield(self) if block_given?
|
24
25
|
|
25
|
-
@timeout_options ||= { write: 2, connect: 5, read: 10 }
|
26
26
|
@api_base = @sandbox_mode ? API_TEST : API_LIVE
|
27
27
|
|
28
28
|
@users = Users.new(self)
|
@@ -74,19 +74,6 @@ module SynapsePayments
|
|
74
74
|
@client.patch(path: "/users/#{@user_id}", oauth_key: @oauth_key, fingerprint: @fingerprint, json: data)
|
75
75
|
end
|
76
76
|
|
77
|
-
def attach_file(file_path)
|
78
|
-
file_contents = open(file_path) { |f| f.read }
|
79
|
-
file_type = MIME::Types.type_for(file_path).first.content_type
|
80
|
-
|
81
|
-
data = {
|
82
|
-
doc: {
|
83
|
-
attachment: "data:#{file_type};base64,#{Base64.encode64(file_contents).gsub(/\n/, '')}"
|
84
|
-
}
|
85
|
-
}
|
86
|
-
|
87
|
-
@client.patch(path: "/users/#{@user_id}", oauth_key: @oauth_key, fingerprint: @fingerprint, json: data)
|
88
|
-
end
|
89
|
-
|
90
77
|
# Adds a bank account by creating a node of node type ACH-US.
|
91
78
|
#
|
92
79
|
# @param name [String] the name of the account holder
|
data/samples.md
CHANGED
@@ -138,7 +138,10 @@ response = user_client.answer_kba(
|
|
138
138
|
#### Attach photo ID or another file type
|
139
139
|
|
140
140
|
```ruby
|
141
|
-
|
141
|
+
file_contents = File.read('image.png')
|
142
|
+
encoded_file = "data:image/png;base64,#{Base64.encode64(file_contents).gsub(/\n/, '')}"
|
143
|
+
|
144
|
+
user_client.update(doc: { attachment: encoded_file })
|
142
145
|
```
|
143
146
|
|
144
147
|
#### Add a bank account
|
data/synapse_payments.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synapse_payments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Julio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -122,20 +122,6 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0.9'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: mime-types
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '2.9'
|
132
|
-
type: :runtime
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '2.9'
|
139
125
|
description: Requires Ruby 2.1 and up. Not all API actions are supported. Find out
|
140
126
|
more in the readme todo section.
|
141
127
|
email:
|