dwolla_swagger 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dwolla_swagger.gemspec +1 -1
- data/lib/dwolla_swagger.rb +10 -3
- data/lib/dwolla_swagger/api/businessclassifications_api.rb +95 -0
- data/lib/dwolla_swagger/api/customers_api.rb +46 -0
- data/lib/dwolla_swagger/api/root_api.rb +88 -0
- data/lib/dwolla_swagger/models/business_classification.rb +62 -0
- data/lib/dwolla_swagger/models/business_classification_list_response.rb +54 -0
- data/lib/dwolla_swagger/models/catalog_response.rb +46 -0
- data/lib/dwolla_swagger/models/o_auth_response.rb +86 -0
- data/lib/dwolla_swagger/models/verification_token.rb +54 -0
- data/lib/dwolla_swagger/swagger.rb +3 -3
- data/lib/dwolla_swagger/swagger/configuration.rb +1 -1
- data/lib/dwolla_swagger/swagger/request.rb +1 -1
- data/lib/dwolla_swagger/swagger/version.rb +1 -1
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2f7d9259e82ce54b3b53ce4ec0cde29c01ca9a2
|
4
|
+
data.tar.gz: 4ec5f8c3d2faaa80f89fe3f562a529da53336484
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e43f63587e2fd2af80c3876095e04956a5e2a693b60a345345dffc75cf91b3381dc1eaa8d96b88ad9bb5cc6b8894ec744aa4962060b87aca0db49c0bd4b3818a
|
7
|
+
data.tar.gz: b15642b48d39b7412692b38578b9cb86ecf41589d45162cb5cb5f00cfa6415c68c29ebcff4e8eede2a052c034a004525e7ea1d88a7ca6c053ffde95afd1fb750
|
data/dwolla_swagger.gemspec
CHANGED
data/lib/dwolla_swagger.rb
CHANGED
@@ -9,13 +9,15 @@ require 'dwolla_swagger/swagger/version'
|
|
9
9
|
# Models
|
10
10
|
require 'dwolla_swagger/models/base_object'
|
11
11
|
require 'dwolla_swagger/models/create_webhook'
|
12
|
-
require 'dwolla_swagger/models/document_list_response'
|
13
12
|
require 'dwolla_swagger/models/event_list_response'
|
14
|
-
require 'dwolla_swagger/models/
|
13
|
+
require 'dwolla_swagger/models/document_list_response'
|
15
14
|
require 'dwolla_swagger/models/funding_source_list_response'
|
15
|
+
require 'dwolla_swagger/models/customer'
|
16
16
|
require 'dwolla_swagger/models/customer_list_response'
|
17
|
-
require 'dwolla_swagger/models/
|
17
|
+
require 'dwolla_swagger/models/catalog_response'
|
18
18
|
require 'dwolla_swagger/models/document'
|
19
|
+
require 'dwolla_swagger/models/transfer_list_response'
|
20
|
+
require 'dwolla_swagger/models/o_auth_response'
|
19
21
|
require 'dwolla_swagger/models/webhook_http_response'
|
20
22
|
require 'dwolla_swagger/models/hal_link'
|
21
23
|
require 'dwolla_swagger/models/money'
|
@@ -28,12 +30,15 @@ require 'dwolla_swagger/models/webhook_attempt'
|
|
28
30
|
require 'dwolla_swagger/models/unit__'
|
29
31
|
require 'dwolla_swagger/models/update_customer'
|
30
32
|
require 'dwolla_swagger/models/webhook_http_request'
|
33
|
+
require 'dwolla_swagger/models/verification_token'
|
31
34
|
require 'dwolla_swagger/models/webhook_subscription'
|
32
35
|
require 'dwolla_swagger/models/webhook_header'
|
33
36
|
require 'dwolla_swagger/models/amount'
|
34
37
|
require 'dwolla_swagger/models/application_event'
|
38
|
+
require 'dwolla_swagger/models/business_classification_list_response'
|
35
39
|
require 'dwolla_swagger/models/webhook_event_list_response'
|
36
40
|
require 'dwolla_swagger/models/verify_micro_deposits_request'
|
41
|
+
require 'dwolla_swagger/models/business_classification'
|
37
42
|
require 'dwolla_swagger/models/transfer'
|
38
43
|
require 'dwolla_swagger/models/webhook'
|
39
44
|
require 'dwolla_swagger/models/funding_source'
|
@@ -42,12 +47,14 @@ require 'dwolla_swagger/models/create_customer'
|
|
42
47
|
|
43
48
|
# APIs
|
44
49
|
require 'dwolla_swagger/api/webhooksubscriptions_api'
|
50
|
+
require 'dwolla_swagger/api/root_api'
|
45
51
|
require 'dwolla_swagger/api/fundingsources_api'
|
46
52
|
require 'dwolla_swagger/api/customers_api'
|
47
53
|
require 'dwolla_swagger/api/events_api'
|
48
54
|
require 'dwolla_swagger/api/documents_api'
|
49
55
|
require 'dwolla_swagger/api/transfers_api'
|
50
56
|
require 'dwolla_swagger/api/webhooks_api'
|
57
|
+
require 'dwolla_swagger/api/businessclassifications_api'
|
51
58
|
require 'dwolla_swagger/api/accounts_api'
|
52
59
|
|
53
60
|
module DwollaSwagger
|
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
3
|
+
module DwollaSwagger
|
4
|
+
class BusinessclassificationsApi
|
5
|
+
basePath = "https://localhost/"
|
6
|
+
# apiInvoker = APIInvoker
|
7
|
+
@auth_names = ['oauth2']
|
8
|
+
|
9
|
+
|
10
|
+
# Get a list business classifications.
|
11
|
+
#
|
12
|
+
# @param [Hash] opts the optional parameters
|
13
|
+
# @return [BusinessClassificationListResponse]
|
14
|
+
def self.list(opts = {})
|
15
|
+
|
16
|
+
|
17
|
+
# resource path
|
18
|
+
path = "/business-classifications".sub('{format}','json')
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
# query parameters
|
23
|
+
query_params = {}
|
24
|
+
|
25
|
+
# header parameters
|
26
|
+
header_params = {}
|
27
|
+
|
28
|
+
# HTTP header 'Accept' (if needed)
|
29
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
30
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
31
|
+
|
32
|
+
# HTTP header 'Content-Type'
|
33
|
+
_header_content_type = []
|
34
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
35
|
+
|
36
|
+
# form parameters
|
37
|
+
form_params = {}
|
38
|
+
|
39
|
+
# http body (model)
|
40
|
+
post_body = nil
|
41
|
+
|
42
|
+
|
43
|
+
response = Swagger::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make
|
44
|
+
|
45
|
+
response.code == 201 ? obj = response.headers['Location'] : (obj = BusinessClassificationListResponse.new() and obj.build_from_hash(response.body))
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
# Get a business classification with a list of industry classifications.
|
50
|
+
#
|
51
|
+
# @param id Id of business classification to get.
|
52
|
+
# @param [Hash] opts the optional parameters
|
53
|
+
# @return [Customer]
|
54
|
+
def self.get_business_classification(id, opts = {})
|
55
|
+
|
56
|
+
# verify the required parameter 'id' is set
|
57
|
+
raise "Missing the required parameter 'id' when calling get_business_classification" if id.nil?
|
58
|
+
|
59
|
+
|
60
|
+
# resource path
|
61
|
+
path = "/business-classifications/{id}".sub('{format}','json')
|
62
|
+
|
63
|
+
|
64
|
+
# check if id parameter is resource URI, otherwise substitute for ID
|
65
|
+
path = id =~ URI::regexp ? path.sub('{' + 'id' + '}', id.split('/')[-1].to_s) : path.sub('{' + 'id' + '}', id.to_s)
|
66
|
+
|
67
|
+
|
68
|
+
# query parameters
|
69
|
+
query_params = {}
|
70
|
+
|
71
|
+
# header parameters
|
72
|
+
header_params = {}
|
73
|
+
|
74
|
+
# HTTP header 'Accept' (if needed)
|
75
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
76
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
77
|
+
|
78
|
+
# HTTP header 'Content-Type'
|
79
|
+
_header_content_type = []
|
80
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
81
|
+
|
82
|
+
# form parameters
|
83
|
+
form_params = {}
|
84
|
+
|
85
|
+
# http body (model)
|
86
|
+
post_body = nil
|
87
|
+
|
88
|
+
|
89
|
+
response = Swagger::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make
|
90
|
+
|
91
|
+
response.code == 201 ? obj = response.headers['Location'] : (obj = Customer.new() and obj.build_from_hash(response.body))
|
92
|
+
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -267,5 +267,51 @@ module DwollaSwagger
|
|
267
267
|
response.code == 201 ? obj = response.headers['Location'] : (obj = Unit.new() and obj.build_from_hash(response.body))
|
268
268
|
|
269
269
|
end
|
270
|
+
|
271
|
+
# Get verification token for customer.
|
272
|
+
#
|
273
|
+
# @param id ID of customer.
|
274
|
+
# @param [Hash] opts the optional parameters
|
275
|
+
# @return [VerificationToken]
|
276
|
+
def self.get_customer_verification_token(id, opts = {})
|
277
|
+
|
278
|
+
# verify the required parameter 'id' is set
|
279
|
+
raise "Missing the required parameter 'id' when calling get_customer_verification_token" if id.nil?
|
280
|
+
|
281
|
+
|
282
|
+
# resource path
|
283
|
+
path = "/customers/{id}/verification-token".sub('{format}','json')
|
284
|
+
|
285
|
+
|
286
|
+
# check if id parameter is resource URI, otherwise substitute for ID
|
287
|
+
path = id =~ URI::regexp ? path.sub('{' + 'id' + '}', id.split('/')[-1].to_s) : path.sub('{' + 'id' + '}', id.to_s)
|
288
|
+
|
289
|
+
|
290
|
+
# query parameters
|
291
|
+
query_params = {}
|
292
|
+
|
293
|
+
# header parameters
|
294
|
+
header_params = {}
|
295
|
+
|
296
|
+
# HTTP header 'Accept' (if needed)
|
297
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
298
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
299
|
+
|
300
|
+
# HTTP header 'Content-Type'
|
301
|
+
_header_content_type = []
|
302
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
303
|
+
|
304
|
+
# form parameters
|
305
|
+
form_params = {}
|
306
|
+
|
307
|
+
# http body (model)
|
308
|
+
post_body = nil
|
309
|
+
|
310
|
+
|
311
|
+
response = Swagger::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make
|
312
|
+
|
313
|
+
response.code == 201 ? obj = response.headers['Location'] : (obj = VerificationToken.new() and obj.build_from_hash(response.body))
|
314
|
+
|
315
|
+
end
|
270
316
|
end
|
271
317
|
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
3
|
+
module DwollaSwagger
|
4
|
+
class RootApi
|
5
|
+
basePath = "https://localhost/"
|
6
|
+
# apiInvoker = APIInvoker
|
7
|
+
@auth_names = ['oauth2']
|
8
|
+
|
9
|
+
|
10
|
+
# Get root
|
11
|
+
#
|
12
|
+
# @param [Hash] opts the optional parameters
|
13
|
+
# @return [CatalogResponse]
|
14
|
+
def self.root(opts = {})
|
15
|
+
|
16
|
+
|
17
|
+
# resource path
|
18
|
+
path = "/".sub('{format}','json')
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
# query parameters
|
23
|
+
query_params = {}
|
24
|
+
|
25
|
+
# header parameters
|
26
|
+
header_params = {}
|
27
|
+
|
28
|
+
# HTTP header 'Accept' (if needed)
|
29
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
30
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
31
|
+
|
32
|
+
# HTTP header 'Content-Type'
|
33
|
+
_header_content_type = []
|
34
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
35
|
+
|
36
|
+
# form parameters
|
37
|
+
form_params = {}
|
38
|
+
|
39
|
+
# http body (model)
|
40
|
+
post_body = nil
|
41
|
+
|
42
|
+
|
43
|
+
response = Swagger::Request.new(:GET, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make
|
44
|
+
|
45
|
+
response.code == 201 ? obj = response.headers['Location'] : (obj = CatalogResponse.new() and obj.build_from_hash(response.body))
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
# OAuth get token response
|
50
|
+
#
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @return [OAuthResponse]
|
53
|
+
def self.oauth(opts = {})
|
54
|
+
|
55
|
+
|
56
|
+
# resource path
|
57
|
+
path = "/oauth".sub('{format}','json')
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
# query parameters
|
62
|
+
query_params = {}
|
63
|
+
|
64
|
+
# header parameters
|
65
|
+
header_params = {}
|
66
|
+
|
67
|
+
# HTTP header 'Accept' (if needed)
|
68
|
+
_header_accept = ['application/json']
|
69
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
70
|
+
|
71
|
+
# HTTP header 'Content-Type'
|
72
|
+
_header_content_type = []
|
73
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
74
|
+
|
75
|
+
# form parameters
|
76
|
+
form_params = {}
|
77
|
+
|
78
|
+
# http body (model)
|
79
|
+
post_body = nil
|
80
|
+
|
81
|
+
|
82
|
+
response = Swagger::Request.new(:POST, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make
|
83
|
+
|
84
|
+
response.code == 201 ? obj = response.headers['Location'] : (obj = OAuthResponse.new() and obj.build_from_hash(response.body))
|
85
|
+
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
module DwollaSwagger
|
2
|
+
#
|
3
|
+
class BusinessClassification < BaseObject
|
4
|
+
attr_accessor :_links, :_embedded, :id, :name
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'_links' => :'_links',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'_embedded' => :'_embedded',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'id' => :'id',
|
17
|
+
|
18
|
+
#
|
19
|
+
:'name' => :'name'
|
20
|
+
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# attribute type
|
25
|
+
def self.swagger_types
|
26
|
+
{
|
27
|
+
:'_links' => :'map[string,HalLink]',
|
28
|
+
:'_embedded' => :'object',
|
29
|
+
:'id' => :'string',
|
30
|
+
:'name' => :'string'
|
31
|
+
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
40
|
+
|
41
|
+
|
42
|
+
if attributes[:'_links']
|
43
|
+
if (value = attributes[:'_links']).is_a?(Array)
|
44
|
+
@_links = value
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
if attributes[:'_embedded']
|
49
|
+
@_embedded = attributes[:'_embedded']
|
50
|
+
end
|
51
|
+
|
52
|
+
if attributes[:'id']
|
53
|
+
@id = attributes[:'id']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes[:'name']
|
57
|
+
@name = attributes[:'name']
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module DwollaSwagger
|
2
|
+
#
|
3
|
+
class BusinessClassificationListResponse < BaseObject
|
4
|
+
attr_accessor :_links, :_embedded, :total
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'_links' => :'_links',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'_embedded' => :'_embedded',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'total' => :'total'
|
17
|
+
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# attribute type
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
:'_links' => :'map[string,HalLink]',
|
25
|
+
:'_embedded' => :'object',
|
26
|
+
:'total' => :'int'
|
27
|
+
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def initialize(attributes = {})
|
32
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
33
|
+
|
34
|
+
# convert string to symbol for hash key
|
35
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
36
|
+
|
37
|
+
|
38
|
+
if attributes[:'_links']
|
39
|
+
if (value = attributes[:'_links']).is_a?(Array)
|
40
|
+
@_links = value
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
if attributes[:'_embedded']
|
45
|
+
@_embedded = attributes[:'_embedded']
|
46
|
+
end
|
47
|
+
|
48
|
+
if attributes[:'total']
|
49
|
+
@total = attributes[:'total']
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module DwollaSwagger
|
2
|
+
#
|
3
|
+
class CatalogResponse < BaseObject
|
4
|
+
attr_accessor :_links, :_embedded
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'_links' => :'_links',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'_embedded' => :'_embedded'
|
14
|
+
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
# attribute type
|
19
|
+
def self.swagger_types
|
20
|
+
{
|
21
|
+
:'_links' => :'map[string,HalLink]',
|
22
|
+
:'_embedded' => :'object'
|
23
|
+
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def initialize(attributes = {})
|
28
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
29
|
+
|
30
|
+
# convert string to symbol for hash key
|
31
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
32
|
+
|
33
|
+
|
34
|
+
if attributes[:'_links']
|
35
|
+
if (value = attributes[:'_links']).is_a?(Array)
|
36
|
+
@_links = value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
if attributes[:'_embedded']
|
41
|
+
@_embedded = attributes[:'_embedded']
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
module DwollaSwagger
|
2
|
+
#
|
3
|
+
class OAuthResponse < BaseObject
|
4
|
+
attr_accessor :_links, :access_token, :expires_in, :refresh_token, :refresh_expires_in, :token_type, :scope
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'_links' => :'_links',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'access_token' => :'access_token',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'expires_in' => :'expires_in',
|
17
|
+
|
18
|
+
#
|
19
|
+
:'refresh_token' => :'refresh_token',
|
20
|
+
|
21
|
+
#
|
22
|
+
:'refresh_expires_in' => :'refresh_expires_in',
|
23
|
+
|
24
|
+
#
|
25
|
+
:'token_type' => :'token_type',
|
26
|
+
|
27
|
+
#
|
28
|
+
:'scope' => :'scope'
|
29
|
+
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# attribute type
|
34
|
+
def self.swagger_types
|
35
|
+
{
|
36
|
+
:'_links' => :'map[string,HalLink]',
|
37
|
+
:'access_token' => :'string',
|
38
|
+
:'expires_in' => :'double',
|
39
|
+
:'refresh_token' => :'string',
|
40
|
+
:'refresh_expires_in' => :'double',
|
41
|
+
:'token_type' => :'string',
|
42
|
+
:'scope' => :'string'
|
43
|
+
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
def initialize(attributes = {})
|
48
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
49
|
+
|
50
|
+
# convert string to symbol for hash key
|
51
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
52
|
+
|
53
|
+
|
54
|
+
if attributes[:'_links']
|
55
|
+
if (value = attributes[:'_links']).is_a?(Array)
|
56
|
+
@_links = value
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
if attributes[:'access_token']
|
61
|
+
@access_token = attributes[:'access_token']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes[:'expires_in']
|
65
|
+
@expires_in = attributes[:'expires_in']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes[:'refresh_token']
|
69
|
+
@refresh_token = attributes[:'refresh_token']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes[:'refresh_expires_in']
|
73
|
+
@refresh_expires_in = attributes[:'refresh_expires_in']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes[:'token_type']
|
77
|
+
@token_type = attributes[:'token_type']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes[:'scope']
|
81
|
+
@scope = attributes[:'scope']
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module DwollaSwagger
|
2
|
+
#
|
3
|
+
class VerificationToken < BaseObject
|
4
|
+
attr_accessor :_links, :_embedded, :token
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'_links' => :'_links',
|
11
|
+
|
12
|
+
#
|
13
|
+
:'_embedded' => :'_embedded',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'token' => :'token'
|
17
|
+
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# attribute type
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
:'_links' => :'map[string,HalLink]',
|
25
|
+
:'_embedded' => :'object',
|
26
|
+
:'token' => :'string'
|
27
|
+
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def initialize(attributes = {})
|
32
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
33
|
+
|
34
|
+
# convert string to symbol for hash key
|
35
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
36
|
+
|
37
|
+
|
38
|
+
if attributes[:'_links']
|
39
|
+
if (value = attributes[:'_links']).is_a?(Array)
|
40
|
+
@_links = value
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
if attributes[:'_embedded']
|
45
|
+
@_embedded = attributes[:'_embedded']
|
46
|
+
end
|
47
|
+
|
48
|
+
if attributes[:'token']
|
49
|
+
@token = attributes[:'token']
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -41,11 +41,11 @@ module DwollaSwagger
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def authenticated?
|
44
|
-
Swagger.configuration.
|
44
|
+
Swagger.configuration.access_token.present?
|
45
45
|
end
|
46
46
|
|
47
47
|
def de_authenticate
|
48
|
-
Swagger.configuration.
|
48
|
+
Swagger.configuration.access_token = nil
|
49
49
|
end
|
50
50
|
|
51
51
|
def authenticate
|
@@ -65,7 +65,7 @@ module DwollaSwagger
|
|
65
65
|
)
|
66
66
|
|
67
67
|
response_body = request.response.body
|
68
|
-
Swagger.configuration.
|
68
|
+
Swagger.configuration.access_token = response_body['token']
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module DwollaSwagger
|
2
2
|
module Swagger
|
3
3
|
class Configuration
|
4
|
-
attr_accessor :format, :api_key, :api_key_prefix, :username, :password, :
|
4
|
+
attr_accessor :format, :api_key, :api_key_prefix, :username, :password, :access_token, :scheme, :host, :base_path, :user_agent, :logger, :inject_format, :force_ending_format, :camelize_params, :user_agent, :verify_ssl
|
5
5
|
|
6
6
|
# Defaults go in here..
|
7
7
|
def initialize
|
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.3
|
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-10-
|
13
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: typhoeus
|
@@ -224,10 +224,12 @@ files:
|
|
224
224
|
- dwolla_swagger.gemspec
|
225
225
|
- lib/dwolla_swagger.rb
|
226
226
|
- lib/dwolla_swagger/api/accounts_api.rb
|
227
|
+
- lib/dwolla_swagger/api/businessclassifications_api.rb
|
227
228
|
- lib/dwolla_swagger/api/customers_api.rb
|
228
229
|
- lib/dwolla_swagger/api/documents_api.rb
|
229
230
|
- lib/dwolla_swagger/api/events_api.rb
|
230
231
|
- lib/dwolla_swagger/api/fundingsources_api.rb
|
232
|
+
- lib/dwolla_swagger/api/root_api.rb
|
231
233
|
- lib/dwolla_swagger/api/transfers_api.rb
|
232
234
|
- lib/dwolla_swagger/api/webhooks_api.rb
|
233
235
|
- lib/dwolla_swagger/api/webhooksubscriptions_api.rb
|
@@ -235,6 +237,9 @@ files:
|
|
235
237
|
- lib/dwolla_swagger/models/amount.rb
|
236
238
|
- lib/dwolla_swagger/models/application_event.rb
|
237
239
|
- lib/dwolla_swagger/models/base_object.rb
|
240
|
+
- lib/dwolla_swagger/models/business_classification.rb
|
241
|
+
- lib/dwolla_swagger/models/business_classification_list_response.rb
|
242
|
+
- lib/dwolla_swagger/models/catalog_response.rb
|
238
243
|
- lib/dwolla_swagger/models/create_customer.rb
|
239
244
|
- lib/dwolla_swagger/models/create_funding_source_request.rb
|
240
245
|
- lib/dwolla_swagger/models/create_webhook.rb
|
@@ -247,11 +252,13 @@ files:
|
|
247
252
|
- lib/dwolla_swagger/models/funding_source_list_response.rb
|
248
253
|
- lib/dwolla_swagger/models/hal_link.rb
|
249
254
|
- lib/dwolla_swagger/models/money.rb
|
255
|
+
- lib/dwolla_swagger/models/o_auth_response.rb
|
250
256
|
- lib/dwolla_swagger/models/transfer.rb
|
251
257
|
- lib/dwolla_swagger/models/transfer_list_response.rb
|
252
258
|
- lib/dwolla_swagger/models/transfer_request_body.rb
|
253
259
|
- lib/dwolla_swagger/models/unit__.rb
|
254
260
|
- lib/dwolla_swagger/models/update_customer.rb
|
261
|
+
- lib/dwolla_swagger/models/verification_token.rb
|
255
262
|
- lib/dwolla_swagger/models/verify_micro_deposits_request.rb
|
256
263
|
- lib/dwolla_swagger/models/webhook.rb
|
257
264
|
- lib/dwolla_swagger/models/webhook_attempt.rb
|