dwolla_v2 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6908dcf033e8318ff41ebb772bbb4b456ceae2f3
4
- data.tar.gz: 60cd8e1e175535f91e219b5b081b79db5b561c23
3
+ metadata.gz: ad6b7ab74c5f50cbf85b078209de77e79b64dc8b
4
+ data.tar.gz: b2daa3c11cd0de3ab7b44e052a36ea045c584ee6
5
5
  SHA512:
6
- metadata.gz: c4de8e933017b9576d7ca96569ae53c5db2950ddd10117e6e704aa3fefa6fbffdd5143d9aa1a264b61cba3776428837602746ac32ca3abb131c6ac1ab9021543
7
- data.tar.gz: e089126a0030e5524cb4d94d3d958318f69480e52236a8e7033d5db3e7e1ed9ec390b67b31840c3a177507e9d516e4d707545dd795dd313b670475b97351fbfb
6
+ metadata.gz: 2ce0550303ed9b08dd2891d5fc8d5b950b60706e5558b8a53e7cf491287d384284f5aae6f9b200a333d1e9ad4528ef1157ed1bb6d52ed5bc38516fa5b68cc98b
7
+ data.tar.gz: 3f01a36a0ab78d202f257fbd0c145617fef3d2049ee4b251197b625f1b3d59898058a9b75c5bac951942d1d7904b39920f76c957403257d58b8b5e463a4d16f5
data/README.md CHANGED
@@ -11,7 +11,7 @@ Dwolla V2 Ruby client. For the V1 Ruby client see [Dwolla/dwolla-ruby](https://g
11
11
  Add this line to your application's Gemfile:
12
12
 
13
13
  ```ruby
14
- gem 'dwolla_v2', '~> 1.0'
14
+ gem 'dwolla_v2', '~> 1.1'
15
15
  ```
16
16
 
17
17
  And then execute:
@@ -213,6 +213,17 @@ puts foo # only ready after `in_parallel` block has executed
213
213
  puts bar # only ready after `in_parallel` block has executed
214
214
  ```
215
215
 
216
+ #### Setting headers
217
+
218
+ To set additional headers on a request you can pass a `Hash` of headers as the 3rd argument.
219
+
220
+ For example:
221
+
222
+ ```ruby
223
+ token.post "customers", { firstName: "John", lastName: "Doe", email: "jd@doe.com" },
224
+ { 'Idempotency-Key': 'a52fcf63-0730-41c3-96e8-7147b5d1fb01' }
225
+ ```
226
+
216
227
  ## Responses
217
228
 
218
229
  Requests return a `DwollaV2::Response`.
@@ -275,7 +286,7 @@ end
275
286
  - `DwollaV2::InvalidAccessTokenError`
276
287
  - `DwollaV2::InvalidScopeError`
277
288
  - `DwollaV2::UnauthorizedClientError`
278
- - `DwollaV2::InvalidAccount_statusError`
289
+ - `DwollaV2::InvalidAccountStatusError`
279
290
  - `DwollaV2::InvalidScopesError`
280
291
  - `DwollaV2::UnsupportedGrantTypeError`
281
292
  - `DwollaV2::InvalidApplicationStatusError`
@@ -310,6 +321,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
310
321
 
311
322
  ## Changelog
312
323
 
324
+ - **1.1.0** - Support setting headers on a per-request basis.
313
325
  - **1.0.1** - Set user agent header.
314
326
  - **1.0.0** - Refactor `Error` class to be more like response, add ability to access keys using methods.
315
327
  - **0.4.0** - Refactor and document how `DwollaV2::Response` works
@@ -37,9 +37,9 @@ module DwollaV2
37
37
  end
38
38
 
39
39
  HTTP_METHODS.each do |method|
40
- define_method(method) do |path, params = nil|
40
+ define_method(method) do |path, params = nil, headers = nil|
41
41
  full_url = self.class.full_url client, path
42
- Response.new conn.public_send(method, full_url, params)
42
+ Response.new conn.public_send(method, full_url, params, headers)
43
43
  end
44
44
  end
45
45
 
@@ -1,3 +1,3 @@
1
1
  module DwollaV2
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dwolla_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ausman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-11 00:00:00.000000000 Z
11
+ date: 2016-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler