armor_payments 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/armor_payments/api/users.rb +5 -0
- data/lib/armor_payments/version.rb +1 -1
- data/spec/armor_payments/api/users_spec.rb +9 -0
- 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: 9beee54df9041f6715c169c437ec0399256a7e7b
|
4
|
+
data.tar.gz: ce46559c08ac4361c9dc913753384491979bfb0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3eda0ffe74ec9aef47d0efa8d2dd4d1d7caa3cfb8957033539cf98f2fa6e4758c09c6efbe0ff1374e8a472104f3a0c15d1035a21f1b49df5c8e0b83ff81fbac6
|
7
|
+
data.tar.gz: f740f0d56ce517f7d0eb20dfe1b818a212110f5cb51a896b23ab95136b1449824409ddb4ad70efb0ebf21ebc905472d89cb14db8973f5e73add5f11022da9c34
|
data/README.md
CHANGED
@@ -109,6 +109,8 @@ client.accounts.update(account_id, your_data)
|
|
109
109
|
|
110
110
|
client.accounts.bankaccounts(account_id).create(your_data)
|
111
111
|
|
112
|
+
client.accounts.users(account_id).create(your_data)
|
113
|
+
|
112
114
|
client.accounts.users(account_id).authentications(user_id).create(your_data)
|
113
115
|
|
114
116
|
client.orders(account_id).create(your_data)
|
@@ -1,6 +1,11 @@
|
|
1
1
|
module ArmorPayments
|
2
2
|
class Users < Resource
|
3
3
|
|
4
|
+
def create data
|
5
|
+
headers = authenticator.secure_headers 'post', uri
|
6
|
+
request :post, { path: uri, headers: headers, body: JSON.generate(data) }
|
7
|
+
end
|
8
|
+
|
4
9
|
def update user_id, data
|
5
10
|
headers = authenticator.secure_headers 'post', uri(user_id)
|
6
11
|
request :post, { path: uri(user_id), headers: headers, body: JSON.generate(data) }
|
@@ -16,5 +16,14 @@ module ArmorPayments
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
describe "#create" do
|
20
|
+
|
21
|
+
it "makes POST with the appropriate URI and JSONified data" do
|
22
|
+
expect(users).to receive(:request).with( :post, hash_including(path: '/accounts/1234/users', body: '{"name":"Bobby Lee"}'))
|
23
|
+
users.create({ 'name' => 'Bobby Lee'})
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
19
28
|
end
|
20
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: armor_payments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Wilson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|