pactas_itero 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 993950d87b187cf5e0b54727452b031dc19ce17c75cc7163ee728648ab00391a
4
- data.tar.gz: 8a719e09d3ddff36c4fa7c320f89032edd56074ea3df2e96a7be8226bacf6033
3
+ metadata.gz: d9611470052cfaaefbde037941f3446b6f0a068c1fba5e9f25ad1a6f696d26c8
4
+ data.tar.gz: 3cc60ac8cd8fe564d390690a092db730ba408fa15aea61fb06d8e376590971cd
5
5
  SHA512:
6
- metadata.gz: f383857f10fba81859b5859e22b87c539c824aa1b8334107da48977f4d1fcd9ddd2efa0fd46c29086bdd38db911fd502c650a8f9e9f1ce6523c8010cef6663d0
7
- data.tar.gz: b2692fc994d34361c98c0e4ffab9dd88860c20aae63203437ba3d7aaad452a1315d6b10a8a7cdb5961b66447654b28404ac829951b42b648b5902e43dfe68daa
6
+ metadata.gz: 816bd5c740e45d95ddbfeaacb064aae067fbebd65fd24208d67c6637b0c9d4d123e68a8c07b0c25c291a57dc400c1a3d6d964c634e9619688c6537db984bfd3a
7
+ data.tar.gz: b7cd30423efa883c70e4f4c2318202001ed9919453975dc16698ed262fbfe5aa11e3dd9b05e85869e6aba95755f667545a30a1b496697be6f61ccd15150b4495
data/CHANGELOG.md CHANGED
@@ -11,6 +11,12 @@
11
11
 
12
12
  ### Security
13
13
 
14
+ ## [0.9.0] - 2023-11-28
15
+
16
+ ### Added
17
+
18
+ - Add client option to send a legal entity id (https://github.com/shipcloud/billwerk/pull/152)
19
+
14
20
  ## [0.8.0] - 2022-02-22
15
21
 
16
22
  # What's Changed
@@ -10,6 +10,8 @@ module PactasItero
10
10
  include PactasItero::Configurable
11
11
  include PactasItero::Api
12
12
 
13
+ LEGAL_ENTITY_HEADER_FIELD = "X-SELECTED-LEGAL-ENTITY-ID"
14
+
13
15
  attr_accessor :bearer_token
14
16
 
15
17
  def initialize(options = {})
@@ -71,6 +73,8 @@ module PactasItero
71
73
  headers[:authorization] = auth_header
72
74
  end
73
75
 
76
+ headers[LEGAL_ENTITY_HEADER_FIELD] = params.delete(:legal_entity_id) || legal_entity_id
77
+
74
78
  response = connection.send(method.to_sym, path, params) do |request|
75
79
  request.headers.update(headers)
76
80
  end.env
@@ -3,7 +3,7 @@
3
3
  module PactasItero
4
4
  module Configurable
5
5
  attr_accessor :bearer_token, :client_id, :client_secret, :user_agent,
6
- :default_media_type, :middleware, :production
6
+ :default_media_type, :middleware, :production, :legal_entity_id
7
7
  attr_writer :api_endpoint
8
8
 
9
9
  class << self
@@ -17,7 +17,8 @@ module PactasItero
17
17
  :user_agent,
18
18
  :default_media_type,
19
19
  :middleware,
20
- :production
20
+ :production,
21
+ :legal_entity_id
21
22
  ]
22
23
  end
23
24
  end
@@ -71,6 +71,10 @@ module PactasItero
71
71
  def user_agent
72
72
  ENV["PACTAS_ITERO_USER_AGENT"] || USER_AGENT
73
73
  end
74
+
75
+ def legal_entity_id
76
+ ENV["PACTAS_ITERO_LEGAL_ENTITY_ID"]
77
+ end
74
78
  end
75
79
  end
76
80
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PactasItero
4
- VERSION = "0.8.0"
4
+ VERSION = "0.9.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pactas_itero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Fröhler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-11 00:00:00.000000000 Z
11
+ date: 2023-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday_middleware