easy_broker 1.0.1 → 1.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: 45d36d59dcaf0b6a07c5fb9d065711747dca59b66349850fa13f592a04bb9b25
4
- data.tar.gz: 634332b115e07adc6710cd84a1a8919a330def6bdcae57348cf54dc8e1308250
3
+ metadata.gz: 417f7f736a72535965e55d9223869e88f6f3f9e14a055668f8dfe7c165ed0d45
4
+ data.tar.gz: c7196e2f63f4cebe1e9483ce909fdd2be313935d6cca05f5261686e96f4acf58
5
5
  SHA512:
6
- metadata.gz: c49e16d780adbf8ed5976c6fa0693569f629cb5424e9e84c50f94ee29c8ea373333613eebc4aaa3f2b34e080a8aaf6fd6bc6e025bb2da07eb32882547c6c532e
7
- data.tar.gz: c6f04a4c3af67649bd51fb423e11a0059d46e58dba92aee0062c4467a47c55e44ef56aa60a7beeca1581095e1b63e17dd1e8274510ee3b2acb7eadf49611a117
6
+ metadata.gz: 05d8a95e19cb55312fc15bc5150d126e26540dea895cfb397ffc4fe896d73a9a7b44c8ba3ed9c54c5bc4c16680a7b350b204b2132cd1a4619b69595c74ff8fdc
7
+ data.tar.gz: a6fee3cde01a6f5381b0aa2e189ff808e88377de181b483b8a37699a15cb8c0de80d38e2b0b63d935466cebfb32141b9b5b5f08623b88218e9e5cc790ac211da
data/CHANGELOG.md CHANGED
@@ -21,3 +21,6 @@
21
21
 
22
22
  # 1.0.1
23
23
  * Added support for agencies, agents, properties and property_integrations endpoints for integration partners.
24
+
25
+ # 1.0.2
26
+ * Added support to configure the country code header for integration partners endpoints.
data/README.md CHANGED
@@ -29,6 +29,9 @@ EasyBroker.configure do |config|
29
29
 
30
30
  # Optionally change the root API URL
31
31
  # config.api_root_url = EasyBroker::STAGING_API_ROOT_URL
32
+
33
+ # As an integration partner you must configure the country code
34
+ # config.country_code = 'MX'
32
35
  end
33
36
  ```
34
37
 
@@ -10,8 +10,9 @@ class EasyBroker::ApiClient
10
10
  def initialize(logger: nil)
11
11
  self.class.base_uri EasyBroker.configuration.api_root_url
12
12
  self.class.headers EasyBroker::DEFAULT_HEADERS.merge(
13
- EasyBroker::AUTHORIZATION_HEADER => EasyBroker.configuration.api_key
14
- )
13
+ EasyBroker::AUTHORIZATION_HEADER => EasyBroker.configuration.api_key,
14
+ EasyBroker::COUNTRY_CODE_HEADER => EasyBroker.configuration.country_code
15
+ ).compact
15
16
  @logger = logger
16
17
  end
17
18
 
@@ -1,8 +1,9 @@
1
1
  class EasyBroker::Configuration
2
- attr_accessor :api_key, :api_root_url
2
+ attr_accessor :api_key, :api_root_url, :country_code
3
3
 
4
4
  def initialize
5
5
  @api_key = nil
6
+ @country_code = nil
6
7
  @api_root_url = EasyBroker::DEFAULT_API_ROOT_URL
7
8
  end
8
9
  end
@@ -8,4 +8,5 @@ module EasyBroker
8
8
  DEFAULT_API_ROOT_URL = 'https://api.easybroker.com/v1'
9
9
  STAGING_API_ROOT_URL = 'https://api.stagingeb.com/v1'
10
10
  AUTHORIZATION_HEADER = 'X-Authorization'
11
+ COUNTRY_CODE_HEADER = 'Country-Code'
11
12
  end
@@ -10,7 +10,7 @@ module EasyBroker
10
10
 
11
11
  class AuthenticationError < Error
12
12
  def initialize(response)
13
- super('Invalid API Key or missing permissions', response)
13
+ super('Invalid API Key or missing configurations', response)
14
14
  end
15
15
  end
16
- end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module EasyBroker
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
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.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Northam
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-08 00:00:00.000000000 Z
11
+ date: 2022-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty