dwolla_swagger 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/dwolla_swagger.gemspec +32 -0
  3. data/lib/dwolla_swagger/api/accounts_api.rb +54 -0
  4. data/lib/dwolla_swagger/api/customers_api.rb +223 -0
  5. data/lib/dwolla_swagger/api/documents_api.rb +54 -0
  6. data/lib/dwolla_swagger/api/events_api.rb +98 -0
  7. data/lib/dwolla_swagger/api/fundingsources_api.rb +231 -0
  8. data/lib/dwolla_swagger/api/transfers_api.rb +143 -0
  9. data/lib/dwolla_swagger/api/webhooks_api.rb +190 -0
  10. data/lib/dwolla_swagger/api/webhooksubscriptions_api.rb +179 -0
  11. data/lib/dwolla_swagger/models/account_info.rb +62 -0
  12. data/lib/dwolla_swagger/models/amount.rb +44 -0
  13. data/lib/dwolla_swagger/models/application_event.rb +86 -0
  14. data/lib/dwolla_swagger/models/base_object.rb +84 -0
  15. data/lib/dwolla_swagger/models/create_customer.rb +132 -0
  16. data/lib/dwolla_swagger/models/create_funding_source_request.rb +60 -0
  17. data/lib/dwolla_swagger/models/create_webhook.rb +44 -0
  18. data/lib/dwolla_swagger/models/customer.rb +102 -0
  19. data/lib/dwolla_swagger/models/customer_list_response.rb +54 -0
  20. data/lib/dwolla_swagger/models/document.rb +78 -0
  21. data/lib/dwolla_swagger/models/document_list_response.rb +54 -0
  22. data/lib/dwolla_swagger/models/event_list_response.rb +54 -0
  23. data/lib/dwolla_swagger/models/funding_source.rb +96 -0
  24. data/lib/dwolla_swagger/models/funding_source_list_response.rb +46 -0
  25. data/lib/dwolla_swagger/models/hal_link.rb +44 -0
  26. data/lib/dwolla_swagger/models/money.rb +44 -0
  27. data/lib/dwolla_swagger/models/transfer.rb +86 -0
  28. data/lib/dwolla_swagger/models/transfer_list_response.rb +54 -0
  29. data/lib/dwolla_swagger/models/transfer_request_body.rb +54 -0
  30. data/lib/dwolla_swagger/models/unit__.rb +28 -0
  31. data/lib/dwolla_swagger/models/webhook.rb +96 -0
  32. data/lib/dwolla_swagger/models/webhook_attempt.rb +52 -0
  33. data/lib/dwolla_swagger/models/webhook_event_list_response.rb +54 -0
  34. data/lib/dwolla_swagger/models/webhook_header.rb +44 -0
  35. data/lib/dwolla_swagger/models/webhook_http_request.rb +62 -0
  36. data/lib/dwolla_swagger/models/webhook_http_response.rb +62 -0
  37. data/lib/dwolla_swagger/models/webhook_list_response.rb +54 -0
  38. data/lib/dwolla_swagger/models/webhook_retry.rb +70 -0
  39. data/lib/dwolla_swagger/models/webhook_retry_request_list_response.rb +54 -0
  40. data/lib/dwolla_swagger/models/webhook_subscription.rb +70 -0
  41. data/lib/dwolla_swagger/monkey.rb +90 -0
  42. data/lib/dwolla_swagger/swagger/configuration.rb +29 -0
  43. data/lib/dwolla_swagger/swagger/request.rb +264 -0
  44. data/lib/dwolla_swagger/swagger/response.rb +70 -0
  45. data/lib/dwolla_swagger/swagger/version.rb +5 -0
  46. data/lib/dwolla_swagger/swagger.rb +78 -0
  47. data/lib/dwolla_swagger.rb +54 -0
  48. metadata +294 -0
@@ -0,0 +1,231 @@
1
+ require "uri"
2
+
3
+ module DwollaSwagger
4
+ class FundingsourcesApi
5
+ basePath = "https://localhost/"
6
+ # apiInvoker = APIInvoker
7
+ @auth_names = ['oauth2']
8
+
9
+
10
+ # Get an account's funding sources.
11
+ #
12
+ # @param id Account UUID to get funding sources for.
13
+ # @param [Hash] opts the optional parameters
14
+ # @return [FundingSourceListResponse]
15
+ def self.get_account_funding_sources(id, opts = {})
16
+
17
+ # verify the required parameter 'id' is set
18
+ raise "Missing the required parameter 'id' when calling get_account_funding_sources" if id.nil?
19
+
20
+
21
+ # resource path
22
+ path = "/accounts/{id}/funding-sources".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 = FundingSourceListResponse.new() and obj.build_from_hash(response)
51
+ end
52
+ end
53
+
54
+ # Get a customer's funding sources.
55
+ #
56
+ # @param id Customer UUID to get funding sources for.
57
+ # @param [Hash] opts the optional parameters
58
+ # @return [FundingSourceListResponse]
59
+ def self.get_customer_funding_sources(id, opts = {})
60
+
61
+ # verify the required parameter 'id' is set
62
+ raise "Missing the required parameter 'id' when calling get_customer_funding_sources" if id.nil?
63
+
64
+
65
+ # resource path
66
+ path = "/customers/{id}/funding-sources".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 = ['application/vnd.dwolla.v1.hal+json']
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 = FundingSourceListResponse.new() and obj.build_from_hash(response)
95
+ end
96
+ end
97
+
98
+ # Create a new funding source.
99
+ #
100
+ # @param id Customer UUID to create funding source for.
101
+ # @param [Hash] opts the optional parameters
102
+ # @option opts [CreateFundingSourceRequest] :body Funding source to create.
103
+ # @return [FundingSource]
104
+ def self.create_customer_funding_source(id, opts = {})
105
+
106
+ # verify the required parameter 'id' is set
107
+ raise "Missing the required parameter 'id' when calling create_customer_funding_source" if id.nil?
108
+
109
+
110
+ # resource path
111
+ path = "/customers/{id}/funding-sources".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
112
+
113
+ # query parameters
114
+ query_params = {}
115
+
116
+ # header parameters
117
+ header_params = {}
118
+
119
+ # HTTP header 'Accept' (if needed)
120
+ _header_accept = ['application/vnd.dwolla.v1.hal+json']
121
+ _header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
122
+
123
+ # HTTP header 'Content-Type'
124
+ _header_content_type = ['application/vnd.dwolla.v1.hal+json']
125
+ header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
126
+
127
+ # form parameters
128
+ form_params = {}
129
+
130
+ # http body (model)
131
+ post_body = Swagger::Request.object_to_http_body(opts[:'body'])
132
+
133
+
134
+ if :POST == :POST
135
+ 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
136
+ response['Location']
137
+ else
138
+ 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
139
+ obj = FundingSource.new() and obj.build_from_hash(response)
140
+ end
141
+ end
142
+
143
+ # Get a funding source by id.
144
+ #
145
+ # @param id Funding source ID to get.
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [FundingSource]
148
+ def self.id(id, opts = {})
149
+
150
+ # verify the required parameter 'id' is set
151
+ raise "Missing the required parameter 'id' when calling id" if id.nil?
152
+
153
+
154
+ # resource path
155
+ path = "/funding-sources/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
156
+
157
+ # query parameters
158
+ query_params = {}
159
+
160
+ # header parameters
161
+ header_params = {}
162
+
163
+ # HTTP header 'Accept' (if needed)
164
+ _header_accept = ['application/vnd.dwolla.v1.hal+json']
165
+ _header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
166
+
167
+ # HTTP header 'Content-Type'
168
+ _header_content_type = []
169
+ header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
170
+
171
+ # form parameters
172
+ form_params = {}
173
+
174
+ # http body (model)
175
+ post_body = nil
176
+
177
+
178
+ if :GET == :POST
179
+ 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
180
+ response['Location']
181
+ else
182
+ 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
183
+ obj = FundingSource.new() and obj.build_from_hash(response)
184
+ end
185
+ end
186
+
187
+ # Delete a funding source by id.
188
+ #
189
+ # @param id Funding source ID to delete.
190
+ # @param [Hash] opts the optional parameters
191
+ # @return [FundingSource]
192
+ def self.delete(id, opts = {})
193
+
194
+ # verify the required parameter 'id' is set
195
+ raise "Missing the required parameter 'id' when calling delete" if id.nil?
196
+
197
+
198
+ # resource path
199
+ path = "/funding-sources/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
200
+
201
+ # query parameters
202
+ query_params = {}
203
+
204
+ # header parameters
205
+ header_params = {}
206
+
207
+ # HTTP header 'Accept' (if needed)
208
+ _header_accept = ['application/vnd.dwolla.v1.hal+json']
209
+ _header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
210
+
211
+ # HTTP header 'Content-Type'
212
+ _header_content_type = []
213
+ header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
214
+
215
+ # form parameters
216
+ form_params = {}
217
+
218
+ # http body (model)
219
+ post_body = nil
220
+
221
+
222
+ if :DELETE == :POST
223
+ response = Swagger::Request.new(:DELETE, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make.headers
224
+ response['Location']
225
+ else
226
+ response = Swagger::Request.new(:DELETE, path, {:params => query_params, :headers => header_params, :form_params => form_params, :body => post_body, :auth_names => @auth_names}).make.body
227
+ obj = FundingSource.new() and obj.build_from_hash(response)
228
+ end
229
+ end
230
+ end
231
+ end
@@ -0,0 +1,143 @@
1
+ require "uri"
2
+
3
+ module DwollaSwagger
4
+ class TransfersApi
5
+ basePath = "https://localhost/"
6
+ # apiInvoker = APIInvoker
7
+ @auth_names = ['oauth2']
8
+
9
+
10
+ # Get a customer's transfers.
11
+ #
12
+ # @param id Customer 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_customer_transfers(id, opts = {})
18
+
19
+ # verify the required parameter 'id' is set
20
+ raise "Missing the required parameter 'id' when calling get_customer_transfers" if id.nil?
21
+
22
+
23
+ # resource path
24
+ path = "/customers/{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
+
58
+ # Create a new transfer.
59
+ #
60
+ # @param [Hash] opts the optional parameters
61
+ # @option opts [TransferRequestBody] :body Transfer request.
62
+ # @return [Unit]
63
+ def self.create(opts = {})
64
+
65
+
66
+ # resource path
67
+ path = "/transfers".sub('{format}','json')
68
+
69
+ # query parameters
70
+ query_params = {}
71
+
72
+ # header parameters
73
+ header_params = {}
74
+
75
+ # HTTP header 'Accept' (if needed)
76
+ _header_accept = ['application/vnd.dwolla.v1.hal+json']
77
+ _header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
78
+
79
+ # HTTP header 'Content-Type'
80
+ _header_content_type = ['application/vnd.dwolla.v1.hal+json']
81
+ header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
82
+
83
+ # form parameters
84
+ form_params = {}
85
+
86
+ # http body (model)
87
+ post_body = Swagger::Request.object_to_http_body(opts[:'body'])
88
+
89
+
90
+ if :POST == :POST
91
+ 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
92
+ response['Location']
93
+ else
94
+ 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
95
+ obj = Unit.new() and obj.build_from_hash(response)
96
+ end
97
+ end
98
+
99
+ # Get a transfer by id.
100
+ #
101
+ # @param id ID of transfer to get.
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Transfer]
104
+ def self.by_id(id, opts = {})
105
+
106
+ # verify the required parameter 'id' is set
107
+ raise "Missing the required parameter 'id' when calling by_id" if id.nil?
108
+
109
+
110
+ # resource path
111
+ path = "/transfers/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
112
+
113
+ # query parameters
114
+ query_params = {}
115
+
116
+ # header parameters
117
+ header_params = {}
118
+
119
+ # HTTP header 'Accept' (if needed)
120
+ _header_accept = ['application/vnd.dwolla.v1.hal+json']
121
+ _header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
122
+
123
+ # HTTP header 'Content-Type'
124
+ _header_content_type = []
125
+ header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
126
+
127
+ # form parameters
128
+ form_params = {}
129
+
130
+ # http body (model)
131
+ post_body = nil
132
+
133
+
134
+ if :GET == :POST
135
+ 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
136
+ response['Location']
137
+ else
138
+ 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
139
+ obj = Transfer.new() and obj.build_from_hash(response)
140
+ end
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,190 @@
1
+ require "uri"
2
+
3
+ module DwollaSwagger
4
+ class WebhooksApi
5
+ basePath = "https://localhost/"
6
+ # apiInvoker = APIInvoker
7
+ @auth_names = ['oauth2']
8
+
9
+
10
+ # Get webhooks by subscription id.
11
+ #
12
+ # @param id ID of webhook to get.
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 [WebhookEventListResponse]
17
+ def self.hooks_by_id(id, opts = {})
18
+
19
+ # verify the required parameter 'id' is set
20
+ raise "Missing the required parameter 'id' when calling hooks_by_id" if id.nil?
21
+
22
+
23
+ # resource path
24
+ path = "/webhook-subscriptions/{id}/webhooks".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 = []
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 = WebhookEventListResponse.new() and obj.build_from_hash(response)
55
+ end
56
+ end
57
+
58
+ # Get a webhook by id.
59
+ #
60
+ # @param id ID of webhook to get.
61
+ # @param [Hash] opts the optional parameters
62
+ # @return [Webhook]
63
+ def self.id(id, opts = {})
64
+
65
+ # verify the required parameter 'id' is set
66
+ raise "Missing the required parameter 'id' when calling id" if id.nil?
67
+
68
+
69
+ # resource path
70
+ path = "/webhooks/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
71
+
72
+ # query parameters
73
+ query_params = {}
74
+
75
+ # header parameters
76
+ header_params = {}
77
+
78
+ # HTTP header 'Accept' (if needed)
79
+ _header_accept = ['application/vnd.dwolla.v1.hal+json']
80
+ _header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
81
+
82
+ # HTTP header 'Content-Type'
83
+ _header_content_type = []
84
+ header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
85
+
86
+ # form parameters
87
+ form_params = {}
88
+
89
+ # http body (model)
90
+ post_body = nil
91
+
92
+
93
+ if :GET == :POST
94
+ 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
95
+ response['Location']
96
+ else
97
+ 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
98
+ obj = Webhook.new() and obj.build_from_hash(response)
99
+ end
100
+ end
101
+
102
+ # Get retries requested by webhook id.
103
+ #
104
+ # @param id ID of webhook to get retries for.
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [WebhookRetryRequestListResponse]
107
+ def self.retries_by_id(id, opts = {})
108
+
109
+ # verify the required parameter 'id' is set
110
+ raise "Missing the required parameter 'id' when calling retries_by_id" if id.nil?
111
+
112
+
113
+ # resource path
114
+ path = "/webhooks/{id}/retries".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
115
+
116
+ # query parameters
117
+ query_params = {}
118
+
119
+ # header parameters
120
+ header_params = {}
121
+
122
+ # HTTP header 'Accept' (if needed)
123
+ _header_accept = ['application/vnd.dwolla.v1.hal+json']
124
+ _header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
125
+
126
+ # HTTP header 'Content-Type'
127
+ _header_content_type = []
128
+ header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
129
+
130
+ # form parameters
131
+ form_params = {}
132
+
133
+ # http body (model)
134
+ post_body = nil
135
+
136
+
137
+ if :GET == :POST
138
+ 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
139
+ response['Location']
140
+ else
141
+ 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
142
+ obj = WebhookRetryRequestListResponse.new() and obj.build_from_hash(response)
143
+ end
144
+ end
145
+
146
+ # Retry a webhook by id.
147
+ #
148
+ # @param id ID of webhook to retry.
149
+ # @param [Hash] opts the optional parameters
150
+ # @return [WebhookRetry]
151
+ def self.retry_webhook(id, opts = {})
152
+
153
+ # verify the required parameter 'id' is set
154
+ raise "Missing the required parameter 'id' when calling retry_webhook" if id.nil?
155
+
156
+
157
+ # resource path
158
+ path = "/webhooks/{id}/retries".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
159
+
160
+ # query parameters
161
+ query_params = {}
162
+
163
+ # header parameters
164
+ header_params = {}
165
+
166
+ # HTTP header 'Accept' (if needed)
167
+ _header_accept = ['application/vnd.dwolla.v1.hal+json']
168
+ _header_accept_result = Swagger::Request.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
169
+
170
+ # HTTP header 'Content-Type'
171
+ _header_content_type = []
172
+ header_params['Content-Type'] = Swagger::Request.select_header_content_type(_header_content_type)
173
+
174
+ # form parameters
175
+ form_params = {}
176
+
177
+ # http body (model)
178
+ post_body = nil
179
+
180
+
181
+ if :POST == :POST
182
+ 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
183
+ response['Location']
184
+ else
185
+ 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
186
+ obj = WebhookRetry.new() and obj.build_from_hash(response)
187
+ end
188
+ end
189
+ end
190
+ end