synapse_client 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/synapse_client/customer.rb +7 -0
- data/lib/synapse_client/version.rb +1 -1
- data/spec/synapse_client_customer_spec.rb +16 -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: a8fd75549bf08d7e0c59b5cbd7b65d48e06e8236
|
4
|
+
data.tar.gz: de11a6f196f5f3e941e2c3c85db63308c8549ebb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d5a41d48848670e496963cc03f33973795a09a242e9347b54bfcc2a2fe71a43d4fd9cbd3dfbf44a7ebe198e1176cc38dbb806a2409819cedad7d187cc101a71
|
7
|
+
data.tar.gz: 575692d1cdeade8efbb230003061753a6898e3f909517846e624647a35d7a6b74b62c84488ba4f75e5ea06c6d6a0f76158170feed266ceb44ee30c57dc6607f0
|
@@ -59,6 +59,13 @@ module SynapseClient
|
|
59
59
|
response
|
60
60
|
end
|
61
61
|
|
62
|
+
#
|
63
|
+
def edit_info(opts={})
|
64
|
+
SynapseClient.request(:post, "/api/v2/user/edit", opts.merge({
|
65
|
+
:access_token => @access_token
|
66
|
+
}))
|
67
|
+
end
|
68
|
+
|
62
69
|
#
|
63
70
|
def add_kyc_info(opts={})
|
64
71
|
response = SynapseClient.request(:post, "/api/v2/user/ssn/add", opts.merge({
|
@@ -64,6 +64,22 @@ describe SynapseClient::Customer do
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
+
describe "editing a customer" do
|
68
|
+
it "should successfully update a user's info" do
|
69
|
+
|
70
|
+
customer = SynapseClient::Customer.retrieve(@customer.access_token, @customer.refresh_token)
|
71
|
+
|
72
|
+
expect(customer).to be_a SynapseClient::Customer
|
73
|
+
|
74
|
+
new_pass = "changeme"
|
75
|
+
|
76
|
+
response = customer.edit_info(new_password: new_pass)
|
77
|
+
|
78
|
+
expect(response.success).to eq true
|
79
|
+
expect(response.data.user.email).to eq customer.email
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
67
83
|
describe "refreshing and retrieving customer" do
|
68
84
|
it "should successfully get new oauth consumer key, refresh token, and expires in." do
|
69
85
|
customer = SynapseClient::Customer.retrieve(@customer.access_token, @customer.refresh_token)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synapse_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Matthias
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|