synapse_pay_rest 0.0.15 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -2
  3. data/Gemfile.lock +10 -6
  4. data/LICENSE +20 -0
  5. data/README.md +80 -22
  6. data/lib/synapse_pay_rest.rb +65 -21
  7. data/lib/synapse_pay_rest/api/nodes.rb +93 -19
  8. data/lib/synapse_pay_rest/api/transactions.rb +103 -0
  9. data/lib/synapse_pay_rest/api/users.rb +101 -41
  10. data/lib/synapse_pay_rest/client.rb +49 -0
  11. data/lib/synapse_pay_rest/error.rb +8 -2
  12. data/lib/synapse_pay_rest/http_client.rb +94 -27
  13. data/lib/synapse_pay_rest/models/node/ach_us_node.rb +111 -0
  14. data/lib/synapse_pay_rest/models/node/base_node.rb +192 -0
  15. data/lib/synapse_pay_rest/models/node/eft_ind_node.rb +19 -0
  16. data/lib/synapse_pay_rest/models/node/eft_node.rb +27 -0
  17. data/lib/synapse_pay_rest/models/node/eft_np_node.rb +19 -0
  18. data/lib/synapse_pay_rest/models/node/iou_node.rb +27 -0
  19. data/lib/synapse_pay_rest/models/node/node.rb +99 -0
  20. data/lib/synapse_pay_rest/models/node/reserve_us_node.rb +23 -0
  21. data/lib/synapse_pay_rest/models/node/synapse_ind_node.rb +22 -0
  22. data/lib/synapse_pay_rest/models/node/synapse_node.rb +25 -0
  23. data/lib/synapse_pay_rest/models/node/synapse_np_node.rb +22 -0
  24. data/lib/synapse_pay_rest/models/node/synapse_us_node.rb +23 -0
  25. data/lib/synapse_pay_rest/models/node/unverified_node.rb +73 -0
  26. data/lib/synapse_pay_rest/models/node/wire_int_node.rb +23 -0
  27. data/lib/synapse_pay_rest/models/node/wire_node.rb +38 -0
  28. data/lib/synapse_pay_rest/models/node/wire_us_node.rb +23 -0
  29. data/lib/synapse_pay_rest/models/transaction/transaction.rb +212 -0
  30. data/lib/synapse_pay_rest/models/user/base_document.rb +346 -0
  31. data/lib/synapse_pay_rest/models/user/document.rb +71 -0
  32. data/lib/synapse_pay_rest/models/user/physical_document.rb +29 -0
  33. data/lib/synapse_pay_rest/models/user/question.rb +45 -0
  34. data/lib/synapse_pay_rest/models/user/social_document.rb +7 -0
  35. data/lib/synapse_pay_rest/models/user/user.rb +593 -0
  36. data/lib/synapse_pay_rest/models/user/virtual_document.rb +77 -0
  37. data/lib/synapse_pay_rest/version.rb +2 -1
  38. data/samples.md +391 -219
  39. data/synapse_pay_rest.gemspec +13 -12
  40. metadata +78 -24
  41. data/lib/synapse_pay_rest/api/trans.rb +0 -38
@@ -6,23 +6,24 @@ Gem::Specification.new do |s|
6
6
  s.name = 'synapse_pay_rest'
7
7
  s.version = SynapsePayRest::VERSION
8
8
  s.date = Date.today.to_s
9
- s.summary = "SynapsePay v3 Rest API Wrapper"
10
- s.description = "A simple ruby wrapper for the SynapsePay v3 Rest API"
11
- s.authors = ["Thomas Hipps", "Steven Broderick"]
12
- s.email = 'steven@synapsepay.com'
9
+ s.authors = ['Thomas Hipps', 'Steven Broderick']
10
+ s.email = 'help@synapsepay.com'
11
+ s.summary = 'SynapsePay v3 Rest Native API Library'
13
12
  s.homepage = 'https://rubygems.org/gems/synapse_pay_rest'
14
13
  s.license = 'MIT'
15
14
 
16
15
  s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- s.bindir = "exe"
16
+ s.bindir = 'exe'
18
17
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- s.require_paths = ["lib"]
18
+ s.require_paths = ['lib']
20
19
 
21
- s.add_development_dependency "bundler", "~> 1.10"
22
- s.add_development_dependency "rake", "~> 10.0"
23
- s.add_development_dependency "minitest"
24
- s.add_development_dependency "minitest-reporters"
25
- s.add_development_dependency "dotenv"
20
+ s.add_dependency 'rest-client', '~> 2.0'
26
21
 
27
- s.add_dependency "rest-client"
22
+ s.add_development_dependency 'bundler', '~> 1.10'
23
+ s.add_development_dependency 'rake', '~> 10.0'
24
+ s.add_development_dependency 'minitest', '~> 5.8.2'
25
+ s.add_development_dependency 'minitest-reporters', '~> 1.1.5'
26
+ s.add_development_dependency 'dotenv', '~> 2.1.1'
27
+ s.add_development_dependency 'faker', '~> 1.6.6'
28
+ s.add_development_dependency 'simplecov', '~> 0.12.0'
28
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synapse_pay_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Hipps
@@ -9,8 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-09-29 00:00:00.000000000 Z
12
+ date: 2016-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rest-client
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '2.0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '2.0'
14
28
  - !ruby/object:Gem::Dependency
15
29
  name: bundler
16
30
  requirement: !ruby/object:Gem::Requirement
@@ -43,60 +57,74 @@ dependencies:
43
57
  name: minitest
44
58
  requirement: !ruby/object:Gem::Requirement
45
59
  requirements:
46
- - - ">="
60
+ - - "~>"
47
61
  - !ruby/object:Gem::Version
48
- version: '0'
62
+ version: 5.8.2
49
63
  type: :development
50
64
  prerelease: false
51
65
  version_requirements: !ruby/object:Gem::Requirement
52
66
  requirements:
53
- - - ">="
67
+ - - "~>"
54
68
  - !ruby/object:Gem::Version
55
- version: '0'
69
+ version: 5.8.2
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: minitest-reporters
58
72
  requirement: !ruby/object:Gem::Requirement
59
73
  requirements:
60
- - - ">="
74
+ - - "~>"
61
75
  - !ruby/object:Gem::Version
62
- version: '0'
76
+ version: 1.1.5
63
77
  type: :development
64
78
  prerelease: false
65
79
  version_requirements: !ruby/object:Gem::Requirement
66
80
  requirements:
67
- - - ">="
81
+ - - "~>"
68
82
  - !ruby/object:Gem::Version
69
- version: '0'
83
+ version: 1.1.5
70
84
  - !ruby/object:Gem::Dependency
71
85
  name: dotenv
72
86
  requirement: !ruby/object:Gem::Requirement
73
87
  requirements:
74
- - - ">="
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: 2.1.1
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: 2.1.1
98
+ - !ruby/object:Gem::Dependency
99
+ name: faker
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
75
103
  - !ruby/object:Gem::Version
76
- version: '0'
104
+ version: 1.6.6
77
105
  type: :development
78
106
  prerelease: false
79
107
  version_requirements: !ruby/object:Gem::Requirement
80
108
  requirements:
81
- - - ">="
109
+ - - "~>"
82
110
  - !ruby/object:Gem::Version
83
- version: '0'
111
+ version: 1.6.6
84
112
  - !ruby/object:Gem::Dependency
85
- name: rest-client
113
+ name: simplecov
86
114
  requirement: !ruby/object:Gem::Requirement
87
115
  requirements:
88
- - - ">="
116
+ - - "~>"
89
117
  - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :runtime
118
+ version: 0.12.0
119
+ type: :development
92
120
  prerelease: false
93
121
  version_requirements: !ruby/object:Gem::Requirement
94
122
  requirements:
95
- - - ">="
123
+ - - "~>"
96
124
  - !ruby/object:Gem::Version
97
- version: '0'
98
- description: A simple ruby wrapper for the SynapsePay v3 Rest API
99
- email: steven@synapsepay.com
125
+ version: 0.12.0
126
+ description:
127
+ email: help@synapsepay.com
100
128
  executables: []
101
129
  extensions: []
102
130
  extra_rdoc_files: []
@@ -104,14 +132,40 @@ files:
104
132
  - ".gitignore"
105
133
  - Gemfile
106
134
  - Gemfile.lock
135
+ - LICENSE
107
136
  - README.md
108
137
  - Rakefile
109
138
  - lib/synapse_pay_rest.rb
110
139
  - lib/synapse_pay_rest/api/nodes.rb
111
- - lib/synapse_pay_rest/api/trans.rb
140
+ - lib/synapse_pay_rest/api/transactions.rb
112
141
  - lib/synapse_pay_rest/api/users.rb
142
+ - lib/synapse_pay_rest/client.rb
113
143
  - lib/synapse_pay_rest/error.rb
114
144
  - lib/synapse_pay_rest/http_client.rb
145
+ - lib/synapse_pay_rest/models/node/ach_us_node.rb
146
+ - lib/synapse_pay_rest/models/node/base_node.rb
147
+ - lib/synapse_pay_rest/models/node/eft_ind_node.rb
148
+ - lib/synapse_pay_rest/models/node/eft_node.rb
149
+ - lib/synapse_pay_rest/models/node/eft_np_node.rb
150
+ - lib/synapse_pay_rest/models/node/iou_node.rb
151
+ - lib/synapse_pay_rest/models/node/node.rb
152
+ - lib/synapse_pay_rest/models/node/reserve_us_node.rb
153
+ - lib/synapse_pay_rest/models/node/synapse_ind_node.rb
154
+ - lib/synapse_pay_rest/models/node/synapse_node.rb
155
+ - lib/synapse_pay_rest/models/node/synapse_np_node.rb
156
+ - lib/synapse_pay_rest/models/node/synapse_us_node.rb
157
+ - lib/synapse_pay_rest/models/node/unverified_node.rb
158
+ - lib/synapse_pay_rest/models/node/wire_int_node.rb
159
+ - lib/synapse_pay_rest/models/node/wire_node.rb
160
+ - lib/synapse_pay_rest/models/node/wire_us_node.rb
161
+ - lib/synapse_pay_rest/models/transaction/transaction.rb
162
+ - lib/synapse_pay_rest/models/user/base_document.rb
163
+ - lib/synapse_pay_rest/models/user/document.rb
164
+ - lib/synapse_pay_rest/models/user/physical_document.rb
165
+ - lib/synapse_pay_rest/models/user/question.rb
166
+ - lib/synapse_pay_rest/models/user/social_document.rb
167
+ - lib/synapse_pay_rest/models/user/user.rb
168
+ - lib/synapse_pay_rest/models/user/virtual_document.rb
115
169
  - lib/synapse_pay_rest/version.rb
116
170
  - samples.md
117
171
  - synapse_pay_rest.gemspec
@@ -138,5 +192,5 @@ rubyforge_project:
138
192
  rubygems_version: 2.5.1
139
193
  signing_key:
140
194
  specification_version: 4
141
- summary: SynapsePay v3 Rest API Wrapper
195
+ summary: SynapsePay v3 Rest Native API Library
142
196
  test_files: []
@@ -1,38 +0,0 @@
1
- module SynapsePayRest
2
- # rename this
3
- class Trans
4
- attr_accessor :client
5
-
6
- def initialize(client)
7
- @client = client
8
- end
9
-
10
- def create_transaction_path(node_id: raise("node_id is required"), trans_id: nil)
11
- path = ['/users', client.user_id, 'nodes', node_id, 'trans' ]
12
- path << trans_id if trans_id
13
- return path.join('/')
14
- end
15
-
16
- def create(node_id: raise("node_id is required"), payload: raise("payload is required"))
17
- path = create_transaction_path(node_id: node_id)
18
- client.post(path, payload)
19
- end
20
-
21
- def update(node_id: raise("node_id is required"), trans_id: raise("trans_id is required"), payload: raise("payload is required"))
22
- path = create_transaction_path(node_id: node_id, trans_id: trans_id)
23
- client.patch(path, payload)
24
- end
25
-
26
- def get(node_id: raise("node_id is required"), trans_id: nil, page: nil)
27
- path = create_transaction_path(node_id: node_id, trans_id: trans_id)
28
- # This part really should just be a generic params generator
29
- path += "?page=#{page}" if page
30
- client.get(path)
31
- end
32
-
33
- def delete(node_id: raise("node_id is required"), trans_id: raise("trans_id is required"))
34
- path = create_transaction_path(node_id: node_id, trans_id: trans_id)
35
- client.delete(path)
36
- end
37
- end
38
- end