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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f221c8e43b49519cd23ebbadc2756cf3ec9733de
4
- data.tar.gz: f7719bda6376cf20f960ee558cf79868e13015d5
3
+ metadata.gz: 9beee54df9041f6715c169c437ec0399256a7e7b
4
+ data.tar.gz: ce46559c08ac4361c9dc913753384491979bfb0c
5
5
  SHA512:
6
- metadata.gz: 528d2a20398199e74d9e7f965484b93c785ee55b59474990c45742517eadb73f8a6dbbafde0045c0099a14bac0c3ccdcc82be4f5465a20e8d019cdd0410a9eea
7
- data.tar.gz: bd2764dc0d69be5dbaeea16067176bf960388e6abec8df2c43fc462e3476f94dbd322658451bca266c9fe741d904c010e28bf3593433fe17dfa994b5e6a5b5d9
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) }
@@ -1,3 +1,3 @@
1
1
  module ArmorPayments
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -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.3
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-05-22 00:00:00.000000000 Z
12
+ date: 2015-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler