fidor_api 2.0.1 → 2.0.2

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
  SHA256:
3
- metadata.gz: ea591697f4b9ea4d84d1b836aa2cb67de5e70d86c9cb726518c139cdfa3df157
4
- data.tar.gz: d69f03db3d2efceef5ed2851d6780c088bdae26baeded6de1dbbe7144cbdaf1d
3
+ metadata.gz: f161e9822fbceefb3e7489d724fa03ad74caf6b4a2cdda9124d84200eaa25e9f
4
+ data.tar.gz: 184b885970ca54f5abaf3ae6231b3c7f535af360a970868382ac18e3be479062
5
5
  SHA512:
6
- metadata.gz: 8bd4cd844e1385350d18a38cbe9c8ecfcd333b0ff476f8be646d9e66e5c5a9590543baa73f924218459b10ef0afb7c7b8a9492dc0f4b97bb9d01b84b95d11c7d
7
- data.tar.gz: ef18b392a1561fafd657720f9e7b116ae5a1c0e09d4a47a0b2560c62d79c7bb91f93f3a6c8b35c1486a96f961c78a22b8b011cae97dd0f50687b8ebc3a96a3e6
6
+ metadata.gz: 264b621669e7e4a42e2d0da1416ebdaa3ee72993873d6cf901b80204d2eea8ca03c7a434783709853aa65a867623c611c743d0b5837d47a6c9492d68d83ab53c
7
+ data.tar.gz: 8698d599b46510f3bea8ffdeaa1bfbbb52d236eae2ec8f7fd3d7930b33beb08049706dba8f18ce4665fd638ff44853513d8a657e68f9ccd922d2145b74da3977
@@ -36,14 +36,14 @@ module FidorApi
36
36
  request(klass, endpoint, :post, attributes)
37
37
  end
38
38
 
39
- def update(klass, endpoint, id, attributes)
40
- request(klass, endpoint, :put, attributes.merge(id: id))
39
+ def update(klass, endpoint, id, attributes, headers = {})
40
+ request(klass, endpoint, :put, attributes.merge(id: id), headers)
41
41
  end
42
42
 
43
- def request(klass, endpoint, method, attributes) # rubocop:disable Metrics/AbcSize
43
+ def request(klass, endpoint, method, attributes, headers = {}) # rubocop:disable Metrics/AbcSize
44
44
  model = klass.new(attributes)
45
45
  model.tap do |m|
46
- response = connection.public_send(method, endpoint, body: m.as_json)
46
+ response = connection.public_send(method, endpoint, body: m.as_json, headers: headers)
47
47
  m.set_attributes(response.body) if response.body.is_a?(Hash)
48
48
  m.confirmable_action_id = extract_confirmable_id(response.headers)
49
49
  end
@@ -1,3 +1,3 @@
1
1
  module FidorApi
2
- VERSION = '2.0.1'.freeze
2
+ VERSION = '2.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fidor_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fidor Solutions AG
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-20 00:00:00.000000000 Z
11
+ date: 2018-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel