easy_broker 1.0.3 → 1.0.4

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: a2f84f22e90d4f7314cde19e7cb255f85524d793c7446abb6cff4266b4ee4b85
4
- data.tar.gz: c9389b86e64570e9580f3bb006eedcdfcc3fc5fb3940da72e7142122ae01584b
3
+ metadata.gz: ad3880a242a4ada8476e4d4f5f049d641d109736c58d4c096ce8986856c96cf6
4
+ data.tar.gz: 4c0681a55ea64209c34e6ce0a5dd84e5f7077308f473759275e11353bad278d7
5
5
  SHA512:
6
- metadata.gz: 121360e24da0f94a1844d283c6f5804fb7ae9a370ccc567aa63d1e013916bc761d8244aa571949f25a363b2d2ebc3ed81712875cbe35ccfddbd2bf8a14ccf13d
7
- data.tar.gz: 647ee5039a59627191607abe3312909ede624130e25883219f552724bb93565d7ae7ded22c8e39e39c2f2d5107d93cf9becd1f0181c974656759098b3118aaea
6
+ metadata.gz: a348abbd2b28a57d7fc4d1f0fb9c9eb8986ad0d5f3a519a60a39df6920f91695ac24ac7e2d145d1efb4b662947c5b7ce90f5baf799c8c8ef140035ca4a5ff4d7
7
+ data.tar.gz: 7aac506ee4828a589696bf665889d322f7313801f385a90c1817e675789cb127b1ed460698b418f1e4a99db02ceecf468917f7e5a7613e29f345eeb73150cdeb
data/CHANGELOG.md CHANGED
@@ -27,3 +27,6 @@
27
27
 
28
28
  ## 1.0.3
29
29
  * Update httparty dependency from 0.18 to 0.21
30
+
31
+ ## 1.0.4
32
+ * Added support to configure the use partner code header for integration partners endpoints.
data/README.md CHANGED
@@ -32,6 +32,9 @@ EasyBroker.configure do |config|
32
32
 
33
33
  # As an integration partner you must configure the country code
34
34
  # config.country_code = 'MX'
35
+
36
+ # Get the information from the organizations connected to your site using a partner code
37
+ # config.use_partner_code = true
35
38
  end
36
39
  ```
37
40
 
@@ -11,7 +11,8 @@ class EasyBroker::ApiClient
11
11
  self.class.base_uri EasyBroker.configuration.api_root_url
12
12
  self.class.headers EasyBroker::DEFAULT_HEADERS.merge(
13
13
  EasyBroker::AUTHORIZATION_HEADER => EasyBroker.configuration.api_key,
14
- EasyBroker::COUNTRY_CODE_HEADER => EasyBroker.configuration.country_code
14
+ EasyBroker::COUNTRY_CODE_HEADER => EasyBroker.configuration.country_code,
15
+ EasyBroker::USE_PARTNER_CODE_HEADER => EasyBroker.configuration.use_partner_code&.to_s
15
16
  ).compact
16
17
  @logger = logger
17
18
  end
@@ -1,9 +1,10 @@
1
1
  class EasyBroker::Configuration
2
- attr_accessor :api_key, :api_root_url, :country_code
2
+ attr_accessor :api_key, :api_root_url, :country_code, :use_partner_code
3
3
 
4
4
  def initialize
5
5
  @api_key = nil
6
6
  @country_code = nil
7
+ @use_partner_code = nil
7
8
  @api_root_url = EasyBroker::DEFAULT_API_ROOT_URL
8
9
  end
9
10
  end
@@ -9,4 +9,5 @@ module EasyBroker
9
9
  STAGING_API_ROOT_URL = 'https://api.stagingeb.com/v1'
10
10
  AUTHORIZATION_HEADER = 'X-Authorization'
11
11
  COUNTRY_CODE_HEADER = 'Country-Code'
12
+ USE_PARTNER_CODE_HEADER = 'Use-Partner-Code'
12
13
  end
@@ -1,3 +1,3 @@
1
1
  module EasyBroker
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Northam
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-15 00:00:00.000000000 Z
11
+ date: 2023-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty