dwolla_swagger 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dwolla_swagger/api/customers_api.rb +45 -0
- data/lib/dwolla_swagger/api/transfers_api.rb +48 -0
- data/lib/dwolla_swagger/models/create_customer.rb +5 -5
- data/lib/dwolla_swagger/models/funding_source.rb +11 -11
- data/lib/dwolla_swagger/models/update_customer.rb +132 -0
- data/lib/dwolla_swagger/swagger/version.rb +1 -1
- data/lib/dwolla_swagger.rb +4 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c81a67101dd5280f2c4f2024a8b71264279e511
|
4
|
+
data.tar.gz: ad8994680662ef368dac234ad8976ff1289c2024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bde5f918c9aece0de8d823911d834d20863ab72084040a8618b83eceabcb623513a90267da48790d5050ea8c9a4c48c6455579ce4f0fdb84432563195da28290
|
7
|
+
data.tar.gz: b41acc2e017e894a27b37e971e8d2377789e8dee768a39808baf60adf2ad6a72f233bf6ab5c95807e3f103bdae0ddc2feabd305578203ac57f17da3aec508cf1
|
@@ -136,6 +136,51 @@ module DwollaSwagger
|
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
139
|
+
# Update customer record. Personal customer records are re-verified upon update.
|
140
|
+
#
|
141
|
+
# @param id Id of customer to update.
|
142
|
+
# @param [Hash] opts the optional parameters
|
143
|
+
# @option opts [UpdateCustomer] :body Customer to update.
|
144
|
+
# @return [Customer]
|
145
|
+
def self.update_customer(id, opts = {})
|
146
|
+
|
147
|
+
# verify the required parameter 'id' is set
|
148
|
+
raise "Missing the required parameter 'id' when calling update_customer" if id.nil?
|
149
|
+
|
150
|
+
|
151
|
+
# resource path
|
152
|
+
path = "/customers/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
153
|
+
|
154
|
+
# query parameters
|
155
|
+
query_params = {}
|
156
|
+
|
157
|
+
# header parameters
|
158
|
+
header_params = {}
|
159
|
+
|
160
|
+
# HTTP header 'Accept' (if needed)
|
161
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
162
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
163
|
+
|
164
|
+
# HTTP header 'Content-Type'
|
165
|
+
_header_content_type = ['application/vnd.dwolla.v1.hal+json']
|
166
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
167
|
+
|
168
|
+
# form parameters
|
169
|
+
form_params = {}
|
170
|
+
|
171
|
+
# http body (model)
|
172
|
+
post_body = Swagger::Request.object_to_http_body(opts[:'body'])
|
173
|
+
|
174
|
+
|
175
|
+
if :POST == :POST
|
176
|
+
response = Swagger::Request.new(:POST, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make.headers
|
177
|
+
response['Location']
|
178
|
+
else
|
179
|
+
response = Swagger::Request.new(:POST, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make.body
|
180
|
+
obj = Customer.new() and obj.build_from_hash(response)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
139
184
|
# Get documents uploaded for customer.
|
140
185
|
#
|
141
186
|
# @param id ID of customer.
|
@@ -7,6 +7,54 @@ module DwollaSwagger
|
|
7
7
|
@auth_names = ['oauth2']
|
8
8
|
|
9
9
|
|
10
|
+
# Get an account's transfers.
|
11
|
+
#
|
12
|
+
# @param id Account UUID to get transfers for.
|
13
|
+
# @param [Hash] opts the optional parameters
|
14
|
+
# @option opts [int] :limit How many results to return.
|
15
|
+
# @option opts [int] :offset How many results to skip.
|
16
|
+
# @return [TransferListResponse]
|
17
|
+
def self.get_account_transfers(id, opts = {})
|
18
|
+
|
19
|
+
# verify the required parameter 'id' is set
|
20
|
+
raise "Missing the required parameter 'id' when calling get_account_transfers" if id.nil?
|
21
|
+
|
22
|
+
|
23
|
+
# resource path
|
24
|
+
path = "/accounts/{id}/transfers".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
25
|
+
|
26
|
+
# query parameters
|
27
|
+
query_params = {}
|
28
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
29
|
+
query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
|
30
|
+
|
31
|
+
# header parameters
|
32
|
+
header_params = {}
|
33
|
+
|
34
|
+
# HTTP header 'Accept' (if needed)
|
35
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
36
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
37
|
+
|
38
|
+
# HTTP header 'Content-Type'
|
39
|
+
_header_content_type = ['application/vnd.dwolla.v1.hal+json']
|
40
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
41
|
+
|
42
|
+
# form parameters
|
43
|
+
form_params = {}
|
44
|
+
|
45
|
+
# http body (model)
|
46
|
+
post_body = nil
|
47
|
+
|
48
|
+
|
49
|
+
if :GET == :POST
|
50
|
+
response = Swagger::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make.headers
|
51
|
+
response['Location']
|
52
|
+
else
|
53
|
+
response = Swagger::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make.body
|
54
|
+
obj = TransferListResponse.new() and obj.build_from_hash(response)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
10
58
|
# Get a customer's transfers.
|
11
59
|
#
|
12
60
|
# @param id Customer UUID to get transfers for.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module DwollaSwagger
|
2
2
|
#
|
3
3
|
class CreateCustomer < BaseObject
|
4
|
-
attr_accessor :first_name, :last_name, :email, :ip_address, :type, :address1, :address2, :city, :state, :postal_code, :date_of_birth, :
|
4
|
+
attr_accessor :first_name, :last_name, :email, :ip_address, :type, :address1, :address2, :city, :state, :postal_code, :date_of_birth, :ssn, :phone
|
5
5
|
# attribute mapping from ruby-style variable name to JSON key
|
6
6
|
def self.attribute_map
|
7
7
|
{
|
@@ -40,7 +40,7 @@ module DwollaSwagger
|
|
40
40
|
:'date_of_birth' => :'dateOfBirth',
|
41
41
|
|
42
42
|
#
|
43
|
-
:'
|
43
|
+
:'ssn' => :'ssn',
|
44
44
|
|
45
45
|
#
|
46
46
|
:'phone' => :'phone'
|
@@ -62,7 +62,7 @@ module DwollaSwagger
|
|
62
62
|
:'state' => :'string',
|
63
63
|
:'postal_code' => :'string',
|
64
64
|
:'date_of_birth' => :'string',
|
65
|
-
:'
|
65
|
+
:'ssn' => :'string',
|
66
66
|
:'phone' => :'string'
|
67
67
|
|
68
68
|
}
|
@@ -119,8 +119,8 @@ module DwollaSwagger
|
|
119
119
|
@date_of_birth = attributes[:'dateOfBirth']
|
120
120
|
end
|
121
121
|
|
122
|
-
if attributes[:'
|
123
|
-
@
|
122
|
+
if attributes[:'ssn']
|
123
|
+
@ssn = attributes[:'ssn']
|
124
124
|
end
|
125
125
|
|
126
126
|
if attributes[:'phone']
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module DwollaSwagger
|
2
2
|
#
|
3
3
|
class FundingSource < BaseObject
|
4
|
-
attr_accessor :_links, :_embedded, :id, :
|
4
|
+
attr_accessor :_links, :_embedded, :id, :status, :type, :name, :created, :balance
|
5
5
|
# attribute mapping from ruby-style variable name to JSON key
|
6
6
|
def self.attribute_map
|
7
7
|
{
|
@@ -15,9 +15,6 @@ module DwollaSwagger
|
|
15
15
|
#
|
16
16
|
:'id' => :'id',
|
17
17
|
|
18
|
-
#
|
19
|
-
:'account_id' => :'accountId',
|
20
|
-
|
21
18
|
#
|
22
19
|
:'status' => :'status',
|
23
20
|
|
@@ -28,7 +25,10 @@ module DwollaSwagger
|
|
28
25
|
:'name' => :'name',
|
29
26
|
|
30
27
|
#
|
31
|
-
:'created' => :'created'
|
28
|
+
:'created' => :'created',
|
29
|
+
|
30
|
+
#
|
31
|
+
:'balance' => :'balance'
|
32
32
|
|
33
33
|
}
|
34
34
|
end
|
@@ -39,11 +39,11 @@ module DwollaSwagger
|
|
39
39
|
:'_links' => :'map[string,HalLink]',
|
40
40
|
:'_embedded' => :'array[map[string,object]]',
|
41
41
|
:'id' => :'string',
|
42
|
-
:'account_id' => :'string',
|
43
42
|
:'status' => :'string',
|
44
43
|
:'type' => :'string',
|
45
44
|
:'name' => :'string',
|
46
|
-
:'created' => :'DateTime'
|
45
|
+
:'created' => :'DateTime',
|
46
|
+
:'balance' => :'object'
|
47
47
|
|
48
48
|
}
|
49
49
|
end
|
@@ -71,10 +71,6 @@ module DwollaSwagger
|
|
71
71
|
@id = attributes[:'id']
|
72
72
|
end
|
73
73
|
|
74
|
-
if attributes[:'accountId']
|
75
|
-
@account_id = attributes[:'accountId']
|
76
|
-
end
|
77
|
-
|
78
74
|
if attributes[:'status']
|
79
75
|
@status = attributes[:'status']
|
80
76
|
end
|
@@ -91,6 +87,10 @@ module DwollaSwagger
|
|
91
87
|
@created = attributes[:'created']
|
92
88
|
end
|
93
89
|
|
90
|
+
if attributes[:'balance']
|
91
|
+
@balance = attributes[:'balance']
|
92
|
+
end
|
93
|
+
|
94
94
|
end
|
95
95
|
end
|
96
96
|
end
|
@@ -0,0 +1,132 @@
|
|
1
|
+
module DwollaSwagger
|
2
|
+
#
|
3
|
+
class UpdateCustomer < BaseObject
|
4
|
+
attr_accessor :first_name, :last_name, :email, :ip_address, :type, :address1, :address2, :city, :state, :postal_code, :date_of_birth, :ssn, :phone
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'first_name' => :'firstName',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'last_name' => :'lastName',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'email' => :'email',
|
17
|
+
|
18
|
+
#
|
19
|
+
:'ip_address' => :'ipAddress',
|
20
|
+
|
21
|
+
#
|
22
|
+
:'type' => :'type',
|
23
|
+
|
24
|
+
#
|
25
|
+
:'address1' => :'address1',
|
26
|
+
|
27
|
+
#
|
28
|
+
:'address2' => :'address2',
|
29
|
+
|
30
|
+
#
|
31
|
+
:'city' => :'city',
|
32
|
+
|
33
|
+
#
|
34
|
+
:'state' => :'state',
|
35
|
+
|
36
|
+
#
|
37
|
+
:'postal_code' => :'postalCode',
|
38
|
+
|
39
|
+
#
|
40
|
+
:'date_of_birth' => :'dateOfBirth',
|
41
|
+
|
42
|
+
#
|
43
|
+
:'ssn' => :'ssn',
|
44
|
+
|
45
|
+
#
|
46
|
+
:'phone' => :'phone'
|
47
|
+
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# attribute type
|
52
|
+
def self.swagger_types
|
53
|
+
{
|
54
|
+
:'first_name' => :'string',
|
55
|
+
:'last_name' => :'string',
|
56
|
+
:'email' => :'string',
|
57
|
+
:'ip_address' => :'string',
|
58
|
+
:'type' => :'string',
|
59
|
+
:'address1' => :'string',
|
60
|
+
:'address2' => :'string',
|
61
|
+
:'city' => :'string',
|
62
|
+
:'state' => :'string',
|
63
|
+
:'postal_code' => :'string',
|
64
|
+
:'date_of_birth' => :'string',
|
65
|
+
:'ssn' => :'string',
|
66
|
+
:'phone' => :'string'
|
67
|
+
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
def initialize(attributes = {})
|
72
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
73
|
+
|
74
|
+
# convert string to symbol for hash key
|
75
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
76
|
+
|
77
|
+
|
78
|
+
if attributes[:'firstName']
|
79
|
+
@first_name = attributes[:'firstName']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes[:'lastName']
|
83
|
+
@last_name = attributes[:'lastName']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes[:'email']
|
87
|
+
@email = attributes[:'email']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes[:'ipAddress']
|
91
|
+
@ip_address = attributes[:'ipAddress']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes[:'type']
|
95
|
+
@type = attributes[:'type']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes[:'address1']
|
99
|
+
@address1 = attributes[:'address1']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes[:'address2']
|
103
|
+
@address2 = attributes[:'address2']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes[:'city']
|
107
|
+
@city = attributes[:'city']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes[:'state']
|
111
|
+
@state = attributes[:'state']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes[:'postalCode']
|
115
|
+
@postal_code = attributes[:'postalCode']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes[:'dateOfBirth']
|
119
|
+
@date_of_birth = attributes[:'dateOfBirth']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes[:'ssn']
|
123
|
+
@ssn = attributes[:'ssn']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes[:'phone']
|
127
|
+
@phone = attributes[:'phone']
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
data/lib/dwolla_swagger.rb
CHANGED
@@ -10,8 +10,8 @@ require 'dwolla_swagger/swagger/version'
|
|
10
10
|
require 'dwolla_swagger/models/base_object'
|
11
11
|
require 'dwolla_swagger/models/webhook_http_request'
|
12
12
|
require 'dwolla_swagger/models/webhook_event_list_response'
|
13
|
-
require 'dwolla_swagger/models/account_info'
|
14
13
|
require 'dwolla_swagger/models/hal_link'
|
14
|
+
require 'dwolla_swagger/models/account_info'
|
15
15
|
require 'dwolla_swagger/models/document_list_response'
|
16
16
|
require 'dwolla_swagger/models/customer_list_response'
|
17
17
|
require 'dwolla_swagger/models/transfer_list_response'
|
@@ -23,17 +23,18 @@ require 'dwolla_swagger/models/funding_source_list_response'
|
|
23
23
|
require 'dwolla_swagger/models/create_customer'
|
24
24
|
require 'dwolla_swagger/models/unit__'
|
25
25
|
require 'dwolla_swagger/models/customer'
|
26
|
+
require 'dwolla_swagger/models/amount'
|
26
27
|
require 'dwolla_swagger/models/document'
|
27
28
|
require 'dwolla_swagger/models/webhook_list_response'
|
28
|
-
require 'dwolla_swagger/models/amount'
|
29
29
|
require 'dwolla_swagger/models/webhook_header'
|
30
30
|
require 'dwolla_swagger/models/webhook_attempt'
|
31
31
|
require 'dwolla_swagger/models/money'
|
32
32
|
require 'dwolla_swagger/models/webhook'
|
33
33
|
require 'dwolla_swagger/models/funding_source'
|
34
|
-
require 'dwolla_swagger/models/transfer'
|
35
34
|
require 'dwolla_swagger/models/event_list_response'
|
35
|
+
require 'dwolla_swagger/models/transfer'
|
36
36
|
require 'dwolla_swagger/models/create_funding_source_request'
|
37
|
+
require 'dwolla_swagger/models/update_customer'
|
37
38
|
require 'dwolla_swagger/models/webhook_retry_request_list_response'
|
38
39
|
require 'dwolla_swagger/models/create_webhook'
|
39
40
|
require 'dwolla_swagger/models/webhook_http_response'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dwolla_swagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zeke Sikelianos
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-10-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: typhoeus
|
@@ -251,6 +251,7 @@ files:
|
|
251
251
|
- lib/dwolla_swagger/models/transfer_list_response.rb
|
252
252
|
- lib/dwolla_swagger/models/transfer_request_body.rb
|
253
253
|
- lib/dwolla_swagger/models/unit__.rb
|
254
|
+
- lib/dwolla_swagger/models/update_customer.rb
|
254
255
|
- lib/dwolla_swagger/models/webhook.rb
|
255
256
|
- lib/dwolla_swagger/models/webhook_attempt.rb
|
256
257
|
- lib/dwolla_swagger/models/webhook_event_list_response.rb
|