dwolla_swagger 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/dwolla_swagger.gemspec +32 -0
- data/lib/dwolla_swagger/api/accounts_api.rb +54 -0
- data/lib/dwolla_swagger/api/customers_api.rb +223 -0
- data/lib/dwolla_swagger/api/documents_api.rb +54 -0
- data/lib/dwolla_swagger/api/events_api.rb +98 -0
- data/lib/dwolla_swagger/api/fundingsources_api.rb +231 -0
- data/lib/dwolla_swagger/api/transfers_api.rb +143 -0
- data/lib/dwolla_swagger/api/webhooks_api.rb +190 -0
- data/lib/dwolla_swagger/api/webhooksubscriptions_api.rb +179 -0
- data/lib/dwolla_swagger/models/account_info.rb +62 -0
- data/lib/dwolla_swagger/models/amount.rb +44 -0
- data/lib/dwolla_swagger/models/application_event.rb +86 -0
- data/lib/dwolla_swagger/models/base_object.rb +84 -0
- data/lib/dwolla_swagger/models/create_customer.rb +132 -0
- data/lib/dwolla_swagger/models/create_funding_source_request.rb +60 -0
- data/lib/dwolla_swagger/models/create_webhook.rb +44 -0
- data/lib/dwolla_swagger/models/customer.rb +102 -0
- data/lib/dwolla_swagger/models/customer_list_response.rb +54 -0
- data/lib/dwolla_swagger/models/document.rb +78 -0
- data/lib/dwolla_swagger/models/document_list_response.rb +54 -0
- data/lib/dwolla_swagger/models/event_list_response.rb +54 -0
- data/lib/dwolla_swagger/models/funding_source.rb +96 -0
- data/lib/dwolla_swagger/models/funding_source_list_response.rb +46 -0
- data/lib/dwolla_swagger/models/hal_link.rb +44 -0
- data/lib/dwolla_swagger/models/money.rb +44 -0
- data/lib/dwolla_swagger/models/transfer.rb +86 -0
- data/lib/dwolla_swagger/models/transfer_list_response.rb +54 -0
- data/lib/dwolla_swagger/models/transfer_request_body.rb +54 -0
- data/lib/dwolla_swagger/models/unit__.rb +28 -0
- data/lib/dwolla_swagger/models/webhook.rb +96 -0
- data/lib/dwolla_swagger/models/webhook_attempt.rb +52 -0
- data/lib/dwolla_swagger/models/webhook_event_list_response.rb +54 -0
- data/lib/dwolla_swagger/models/webhook_header.rb +44 -0
- data/lib/dwolla_swagger/models/webhook_http_request.rb +62 -0
- data/lib/dwolla_swagger/models/webhook_http_response.rb +62 -0
- data/lib/dwolla_swagger/models/webhook_list_response.rb +54 -0
- data/lib/dwolla_swagger/models/webhook_retry.rb +70 -0
- data/lib/dwolla_swagger/models/webhook_retry_request_list_response.rb +54 -0
- data/lib/dwolla_swagger/models/webhook_subscription.rb +70 -0
- data/lib/dwolla_swagger/monkey.rb +90 -0
- data/lib/dwolla_swagger/swagger/configuration.rb +29 -0
- data/lib/dwolla_swagger/swagger/request.rb +264 -0
- data/lib/dwolla_swagger/swagger/response.rb +70 -0
- data/lib/dwolla_swagger/swagger/version.rb +5 -0
- data/lib/dwolla_swagger/swagger.rb +78 -0
- data/lib/dwolla_swagger.rb +54 -0
- metadata +294 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9150b8f24f7351534b6fea7a292feb1398e75fbb
|
4
|
+
data.tar.gz: 0f1a3edf49951478a10f161551b9b5e75a4706ce
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1bb9a1ff8aa295bf1f76e716fbc1c269d28ef4a2fb5a3540a524d17e9fb2338448de7a2ec0f7afb6792c9800e5c0798ba115454cc6cdc440a93a481e8f7e1307
|
7
|
+
data.tar.gz: 98b1c9b555323d3018a35e6ff4c254b32feb7d58d75358edced03aeeea8793c074f60391150b79d742f5038223f433d7e4543034dd162208ad587bc724ad1990
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "dwolla_swagger/swagger/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "dwolla_swagger"
|
7
|
+
s.version = DwollaSwagger::Swagger::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Zeke Sikelianos", "Tony Tam", "David Stancu"]
|
10
|
+
s.email = ["zeke@wordnik.com", "fehguy@gmail.com", "dstancu@nyu.edu"]
|
11
|
+
s.homepage = "http://developers.dwolla.com"
|
12
|
+
s.summary = %q{Dwolla API V2 SDK}
|
13
|
+
s.description = %q{Dwolla API V2 Swagger SDK wrapper.}
|
14
|
+
s.license = "Apache-2.0"
|
15
|
+
|
16
|
+
s.add_runtime_dependency 'typhoeus', '~> 0.2', '>= 0.2.1'
|
17
|
+
s.add_runtime_dependency 'addressable', '~> 2.2', '>= 2.2.4'
|
18
|
+
s.add_runtime_dependency 'json', '~> 1.4', '>= 1.4.6'
|
19
|
+
|
20
|
+
s.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0'
|
21
|
+
s.add_development_dependency 'vcr', '~> 2.9', '>= 2.9.3'
|
22
|
+
s.add_development_dependency 'webmock', '~> 1.6', '>= 1.6.2'
|
23
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
24
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
25
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
26
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.10'
|
27
|
+
|
28
|
+
s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
|
29
|
+
s.test_files = `find spec/*`.split("\n")
|
30
|
+
s.executables = []
|
31
|
+
s.require_paths = ["lib"]
|
32
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
3
|
+
module DwollaSwagger
|
4
|
+
class AccountsApi
|
5
|
+
basePath = "https://localhost/"
|
6
|
+
# apiInvoker = APIInvoker
|
7
|
+
@auth_names = ['oauth2']
|
8
|
+
|
9
|
+
|
10
|
+
# Get account info by id.
|
11
|
+
#
|
12
|
+
# @param id Account ID to get info for.
|
13
|
+
# @param [Hash] opts the optional parameters
|
14
|
+
# @return [AccountInfo]
|
15
|
+
def self.id(id, opts = {})
|
16
|
+
|
17
|
+
# verify the required parameter 'id' is set
|
18
|
+
raise "Missing the required parameter 'id' when calling id" if id.nil?
|
19
|
+
|
20
|
+
|
21
|
+
# resource path
|
22
|
+
path = "/accounts/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
23
|
+
|
24
|
+
# query parameters
|
25
|
+
query_params = {}
|
26
|
+
|
27
|
+
# header parameters
|
28
|
+
header_params = {}
|
29
|
+
|
30
|
+
# HTTP header 'Accept' (if needed)
|
31
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
32
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
33
|
+
|
34
|
+
# HTTP header 'Content-Type'
|
35
|
+
_header_content_type = []
|
36
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
37
|
+
|
38
|
+
# form parameters
|
39
|
+
form_params = {}
|
40
|
+
|
41
|
+
# http body (model)
|
42
|
+
post_body = nil
|
43
|
+
|
44
|
+
|
45
|
+
if :GET == :POST
|
46
|
+
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
|
47
|
+
response['Location']
|
48
|
+
else
|
49
|
+
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
|
50
|
+
obj = AccountInfo.new() and obj.build_from_hash(response)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,223 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
3
|
+
module DwollaSwagger
|
4
|
+
class CustomersApi
|
5
|
+
basePath = "https://localhost/"
|
6
|
+
# apiInvoker = APIInvoker
|
7
|
+
@auth_names = ['oauth2']
|
8
|
+
|
9
|
+
|
10
|
+
# Get a list of customers.
|
11
|
+
#
|
12
|
+
# @param [Hash] opts the optional parameters
|
13
|
+
# @option opts [int] :limit How many results to return.
|
14
|
+
# @option opts [int] :offset How many results to skip.
|
15
|
+
# @return [CustomerListResponse]
|
16
|
+
def self.list(opts = {})
|
17
|
+
|
18
|
+
|
19
|
+
# resource path
|
20
|
+
path = "/customers".sub('{format}','json')
|
21
|
+
|
22
|
+
# query parameters
|
23
|
+
query_params = {}
|
24
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
25
|
+
query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
|
26
|
+
|
27
|
+
# header parameters
|
28
|
+
header_params = {}
|
29
|
+
|
30
|
+
# HTTP header 'Accept' (if needed)
|
31
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
32
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
33
|
+
|
34
|
+
# HTTP header 'Content-Type'
|
35
|
+
_header_content_type = []
|
36
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
37
|
+
|
38
|
+
# form parameters
|
39
|
+
form_params = {}
|
40
|
+
|
41
|
+
# http body (model)
|
42
|
+
post_body = nil
|
43
|
+
|
44
|
+
|
45
|
+
if :GET == :POST
|
46
|
+
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
|
47
|
+
response['Location']
|
48
|
+
else
|
49
|
+
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
|
50
|
+
obj = CustomerListResponse.new() and obj.build_from_hash(response)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Create a new customer.
|
55
|
+
#
|
56
|
+
# @param [Hash] opts the optional parameters
|
57
|
+
# @option opts [CreateCustomer] :body Customer to create.
|
58
|
+
# @return [Unit]
|
59
|
+
def self.create(opts = {})
|
60
|
+
|
61
|
+
|
62
|
+
# resource path
|
63
|
+
path = "/customers".sub('{format}','json')
|
64
|
+
|
65
|
+
# query parameters
|
66
|
+
query_params = {}
|
67
|
+
|
68
|
+
# header parameters
|
69
|
+
header_params = {}
|
70
|
+
|
71
|
+
# HTTP header 'Accept' (if needed)
|
72
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
73
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
74
|
+
|
75
|
+
# HTTP header 'Content-Type'
|
76
|
+
_header_content_type = ['application/vnd.dwolla.v1.hal+json']
|
77
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
78
|
+
|
79
|
+
# form parameters
|
80
|
+
form_params = {}
|
81
|
+
|
82
|
+
# http body (model)
|
83
|
+
post_body = Swagger::Request.object_to_http_body(opts[:'body'])
|
84
|
+
|
85
|
+
|
86
|
+
if :POST == :POST
|
87
|
+
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
|
88
|
+
response['Location']
|
89
|
+
else
|
90
|
+
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
|
91
|
+
obj = Unit.new() and obj.build_from_hash(response)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# Get a customer by id
|
96
|
+
#
|
97
|
+
# @param id Id of customer to get.
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [Customer]
|
100
|
+
def self.get_customer(id, opts = {})
|
101
|
+
|
102
|
+
# verify the required parameter 'id' is set
|
103
|
+
raise "Missing the required parameter 'id' when calling get_customer" if id.nil?
|
104
|
+
|
105
|
+
|
106
|
+
# resource path
|
107
|
+
path = "/customers/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
108
|
+
|
109
|
+
# query parameters
|
110
|
+
query_params = {}
|
111
|
+
|
112
|
+
# header parameters
|
113
|
+
header_params = {}
|
114
|
+
|
115
|
+
# HTTP header 'Accept' (if needed)
|
116
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
117
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
118
|
+
|
119
|
+
# HTTP header 'Content-Type'
|
120
|
+
_header_content_type = ['application/vnd.dwolla.v1.hal+json']
|
121
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
122
|
+
|
123
|
+
# form parameters
|
124
|
+
form_params = {}
|
125
|
+
|
126
|
+
# http body (model)
|
127
|
+
post_body = nil
|
128
|
+
|
129
|
+
|
130
|
+
if :GET == :POST
|
131
|
+
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
|
132
|
+
response['Location']
|
133
|
+
else
|
134
|
+
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
|
135
|
+
obj = Customer.new() and obj.build_from_hash(response)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
# Get documents uploaded for customer.
|
140
|
+
#
|
141
|
+
# @param id ID of customer.
|
142
|
+
# @param [Hash] opts the optional parameters
|
143
|
+
# @return [DocumentListResponse]
|
144
|
+
def self.get_customer_documents(id, opts = {})
|
145
|
+
|
146
|
+
# verify the required parameter 'id' is set
|
147
|
+
raise "Missing the required parameter 'id' when calling get_customer_documents" if id.nil?
|
148
|
+
|
149
|
+
|
150
|
+
# resource path
|
151
|
+
path = "/customers/{id}/documents".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
152
|
+
|
153
|
+
# query parameters
|
154
|
+
query_params = {}
|
155
|
+
|
156
|
+
# header parameters
|
157
|
+
header_params = {}
|
158
|
+
|
159
|
+
# HTTP header 'Accept' (if needed)
|
160
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
161
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
162
|
+
|
163
|
+
# HTTP header 'Content-Type'
|
164
|
+
_header_content_type = []
|
165
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
166
|
+
|
167
|
+
# form parameters
|
168
|
+
form_params = {}
|
169
|
+
|
170
|
+
# http body (model)
|
171
|
+
post_body = nil
|
172
|
+
|
173
|
+
|
174
|
+
if :GET == :POST
|
175
|
+
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
|
176
|
+
response['Location']
|
177
|
+
else
|
178
|
+
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
|
179
|
+
obj = DocumentListResponse.new() and obj.build_from_hash(response)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# Upload a verification document.
|
184
|
+
#
|
185
|
+
# @param [Hash] opts the optional parameters
|
186
|
+
# @return [Unit]
|
187
|
+
def self.upload_document(opts = {})
|
188
|
+
|
189
|
+
|
190
|
+
# resource path
|
191
|
+
path = "/customers/{id}/documents".sub('{format}','json')
|
192
|
+
|
193
|
+
# query parameters
|
194
|
+
query_params = {}
|
195
|
+
|
196
|
+
# header parameters
|
197
|
+
header_params = {}
|
198
|
+
|
199
|
+
# HTTP header 'Accept' (if needed)
|
200
|
+
_header_accept = []
|
201
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
202
|
+
|
203
|
+
# HTTP header 'Content-Type'
|
204
|
+
_header_content_type = ['multipart/form-data']
|
205
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
206
|
+
|
207
|
+
# form parameters
|
208
|
+
form_params = {}
|
209
|
+
|
210
|
+
# http body (model)
|
211
|
+
post_body = nil
|
212
|
+
|
213
|
+
|
214
|
+
if :POST == :POST
|
215
|
+
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
|
216
|
+
response['Location']
|
217
|
+
else
|
218
|
+
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
|
219
|
+
obj = Unit.new() and obj.build_from_hash(response)
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
3
|
+
module DwollaSwagger
|
4
|
+
class DocumentsApi
|
5
|
+
basePath = "https://localhost/"
|
6
|
+
# apiInvoker = APIInvoker
|
7
|
+
@auth_names = ['oauth2']
|
8
|
+
|
9
|
+
|
10
|
+
# Get a document by id
|
11
|
+
#
|
12
|
+
# @param id Id of document to get.
|
13
|
+
# @param [Hash] opts the optional parameters
|
14
|
+
# @return [Document]
|
15
|
+
def self.get_document(id, opts = {})
|
16
|
+
|
17
|
+
# verify the required parameter 'id' is set
|
18
|
+
raise "Missing the required parameter 'id' when calling get_document" if id.nil?
|
19
|
+
|
20
|
+
|
21
|
+
# resource path
|
22
|
+
path = "/documents/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
23
|
+
|
24
|
+
# query parameters
|
25
|
+
query_params = {}
|
26
|
+
|
27
|
+
# header parameters
|
28
|
+
header_params = {}
|
29
|
+
|
30
|
+
# HTTP header 'Accept' (if needed)
|
31
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
32
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
33
|
+
|
34
|
+
# HTTP header 'Content-Type'
|
35
|
+
_header_content_type = ['application/vnd.dwolla.v1.hal+json']
|
36
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
37
|
+
|
38
|
+
# form parameters
|
39
|
+
form_params = {}
|
40
|
+
|
41
|
+
# http body (model)
|
42
|
+
post_body = nil
|
43
|
+
|
44
|
+
|
45
|
+
if :GET == :POST
|
46
|
+
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
|
47
|
+
response['Location']
|
48
|
+
else
|
49
|
+
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
|
50
|
+
obj = Document.new() and obj.build_from_hash(response)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
require "uri"
|
2
|
+
|
3
|
+
module DwollaSwagger
|
4
|
+
class EventsApi
|
5
|
+
basePath = "https://localhost/"
|
6
|
+
# apiInvoker = APIInvoker
|
7
|
+
@auth_names = ['oauth2']
|
8
|
+
|
9
|
+
|
10
|
+
# List events.
|
11
|
+
#
|
12
|
+
# @param [Hash] opts the optional parameters
|
13
|
+
# @option opts [int] :limit How many results to return.
|
14
|
+
# @option opts [int] :offset How many results to skip.
|
15
|
+
# @return [EventListResponse]
|
16
|
+
def self.events(opts = {})
|
17
|
+
|
18
|
+
|
19
|
+
# resource path
|
20
|
+
path = "/events".sub('{format}','json')
|
21
|
+
|
22
|
+
# query parameters
|
23
|
+
query_params = {}
|
24
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
25
|
+
query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
|
26
|
+
|
27
|
+
# header parameters
|
28
|
+
header_params = {}
|
29
|
+
|
30
|
+
# HTTP header 'Accept' (if needed)
|
31
|
+
_header_accept = ['application/vnd.dwolla.v1.hal+json']
|
32
|
+
_header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
33
|
+
|
34
|
+
# HTTP header 'Content-Type'
|
35
|
+
_header_content_type = []
|
36
|
+
header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
|
37
|
+
|
38
|
+
# form parameters
|
39
|
+
form_params = {}
|
40
|
+
|
41
|
+
# http body (model)
|
42
|
+
post_body = nil
|
43
|
+
|
44
|
+
|
45
|
+
if :GET == :POST
|
46
|
+
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
|
47
|
+
response['Location']
|
48
|
+
else
|
49
|
+
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
|
50
|
+
obj = EventListResponse.new() and obj.build_from_hash(response)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Get an event by id.
|
55
|
+
#
|
56
|
+
# @param id ID of application event to get.
|
57
|
+
# @param [Hash] opts the optional parameters
|
58
|
+
# @return [ApplicationEvent]
|
59
|
+
def self.id(id, opts = {})
|
60
|
+
|
61
|
+
# verify the required parameter 'id' is set
|
62
|
+
raise "Missing the required parameter 'id' when calling id" if id.nil?
|
63
|
+
|
64
|
+
|
65
|
+
# resource path
|
66
|
+
path = "/events/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
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
|
+
if :GET == :POST
|
90
|
+
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
|
91
|
+
response['Location']
|
92
|
+
else
|
93
|
+
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
|
94
|
+
obj = ApplicationEvent.new() and obj.build_from_hash(response)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|