econt 0.1.0 → 0.1.1

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: 72d630d421e9bfb7d741ba051f81722c740f251fd6d50e2d66b98fb73d1aba4f
4
- data.tar.gz: a1c465eaf16fecc9a83f114d0e5403de12e2af41d24b7a2381cde2a3d1968165
3
+ metadata.gz: c826a914b9d9ef63b097a5a03c60b9aa3c53ca23ef08ea9b3657d03033818e30
4
+ data.tar.gz: 64500b8cd2713d506155ab1b2319f8cc769e17f791bdae090a22989a055e50e7
5
5
  SHA512:
6
- metadata.gz: cc999dd5f5f08b1468d56444500a5b623a56a16a3f805757db5899a8365dbc56315ea9a5139d5f3768b54a076bcfe16735166030d4c5794c91efcd6808d26dbf
7
- data.tar.gz: 553ef848b6016d4d1635dba09e8a7f27c0b6aca61ac3f974a31d62c9f47bfe34e2451d132a90dfc76477f0d5cd81e8363c735a7cd97a28e87fdae1072f603211
6
+ metadata.gz: e1d3761fb0e925f8b8fa12a61a09b73477d17f3868e32ec83b32ce0a5d0193b996605f369faa22b1053d39d0bff88ff96ef7b700b89f836c9c1f81c5093a9c5b
7
+ data.tar.gz: 7dd66c57c80d09f9ee3fe472e61ca1ab9afa546152f04e045d49fe0974b024d947632c34cc09602747bf828ca4af20986d1082e3daa8d4750d0a642669553ef3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
1
  # Changelog
2
2
 
3
- Release notes will start after the initial release.
3
+ ## Unreleased
4
+
5
+ ## 0.1.1 — 2026-10-12
6
+
7
+ - Default demo API requests to HTTPS and update production configuration examples.
8
+ - Explicitly enable TLS certificate verification.
9
+ - Clarify that Econt supports HTTPS with Basic authentication; client-certificate
10
+ authentication is a separate unsupported feature. Explicit HTTP URLs remain
11
+ configurable, but TLS failures never cause an HTTP fallback.
12
+
13
+ ## 0.1.0 — 2026-10-12
14
+
15
+ - Initial release of the Econt Ruby API client.
data/README.md CHANGED
@@ -6,7 +6,7 @@ typed responses, Basic authentication, and configurable timeouts.
6
6
  Only JSON endpoints are supported; SOAP is not supported.
7
7
 
8
8
  Community maintained; not affiliated with or endorsed by Econt.
9
- See the [official API documentation](http://ee.econt.com/services/) for account
9
+ See the [official API documentation](https://ee.econt.com/services/) for account
10
10
  access and required fields.
11
11
 
12
12
  ## Installation
@@ -24,18 +24,21 @@ Econt::Client.configure do |config|
24
24
  config.username = ENV.fetch('ECONT_USERNAME')
25
25
  config.password = ENV.fetch('ECONT_PASSWORD')
26
26
  # Demo is the default. Use this URL for production:
27
- config.base_url = 'http://ee.econt.com/services/'
27
+ config.base_url = 'https://ee.econt.com/services/'
28
28
  config.open_timeout = 10
29
29
  config.read_timeout = 30
30
30
  config.write_timeout = 30
31
31
  end
32
32
  ```
33
33
 
34
- **Transport warning:** Econt documents HTTP service endpoints. Basic credentials
35
- and shipment data are transmitted without TLS. Use a trusted server-side network
36
- path and assess this risk before production use; never call the API from browser
37
- code. Demo uses `http://demo.econt.com/ee/services/`, with separate credentials.
38
- The client does not replace documented URLs with HTTPS.
34
+ The default demo URL is `https://demo.econt.com/ee/services/`; production uses
35
+ `https://ee.econt.com/services/`, with separate credentials. Econt's documentation
36
+ lists HTTP example URLs but explicitly permits SSL connections with Basic
37
+ authentication. Authentication using client SSL certificates is not supported;
38
+ this is separate from HTTPS transport. Use HTTPS to protect credentials and
39
+ shipment data in transit, and keep requests server-side. TLS certificate
40
+ verification is enabled by default; TLS failures do not trigger an HTTP fallback.
41
+ An explicitly configured HTTP URL is still accepted but sends data without TLS.
39
42
 
40
43
  ### Rails initializer
41
44
 
@@ -44,7 +47,7 @@ The client does not replace documented URLs with HTTPS.
44
47
  Econt::Client.configure do |config|
45
48
  config.username = Rails.application.credentials.dig(:econt, :username)
46
49
  config.password = Rails.application.credentials.dig(:econt, :password)
47
- config.base_url = ENV.fetch('ECONT_BASE_URL', 'http://demo.econt.com/ee/services/')
50
+ config.base_url = ENV.fetch('ECONT_BASE_URL', 'https://demo.econt.com/ee/services/')
48
51
  end
49
52
  ```
50
53
 
data/SECURITY.md CHANGED
@@ -15,17 +15,21 @@ has taken place.
15
15
  Only the latest released version receives security fixes. Pull requests are
16
16
  welcome after coordinated disclosure.
17
17
 
18
- ## Econt transport limitation
18
+ ## HTTPS transport and credentials
19
19
 
20
- Econt documents its demo and production service URLs as HTTP endpoints using
21
- HTTP Basic authentication. Consequently, credentials and shipment data are not
22
- protected by TLS in transit. This gem preserves those documented URLs and does
23
- not claim to solve that carrier-side limitation.
20
+ The client defaults to `https://demo.econt.com/ee/services/`. Use
21
+ `https://ee.econt.com/services/` for production. Econt's documentation lists HTTP
22
+ example URLs but explicitly supports SSL connections with Basic authentication.
23
+ The lack of client-certificate authentication does not mean HTTPS is unavailable.
24
24
 
25
- Run requests only from trusted server-side infrastructure and through a network
26
- path whose risks you accept. Never call Econt directly from browser code. Keep
27
- credentials out of source control, rotate them if exposed, and limit access to
28
- application logs and VCR cassettes.
25
+ TLS certificate verification is enabled by default. The client does not fall
26
+ back to HTTP when TLS fails. Explicit HTTP base URLs remain configurable for
27
+ compatibility, but they transmit credentials and shipment data without TLS.
28
+ Use HTTPS and do not disable certificate verification.
29
+
30
+ Run requests only from server-side infrastructure. Never call Econt directly
31
+ from browser code. Keep credentials out of source control, rotate them if
32
+ exposed, and limit access to application logs and VCR cassettes.
29
33
 
30
34
  Debug mode filters the configured username, password, and Basic token. Request
31
35
  and response bodies are disabled by default because they may contain personal
data/docs/API.md CHANGED
@@ -33,7 +33,7 @@ logistics = Econt::Services::ThreeWayLogistics::ThreeWayLogistics.new
33
33
 
34
34
  Signatures show Ruby defaults, not carrier requirements: an optional `nil`
35
35
  or empty array does **not** mean the API accepts an incomplete request. Supply
36
- the business fields required by the [official EEcont documentation](http://ee.econt.com/services/).
36
+ the business fields required by the [official EEcont documentation](https://ee.econt.com/services/).
37
37
  Nested hashes use snake_case except the legacy three-way logistics operation.
38
38
 
39
39
  Examples are independent snippets, not a script to execute wholesale.
@@ -550,7 +550,7 @@ result = logistics.three_way_logistics(**logistics_payload)
550
550
  ## Payload and model details
551
551
 
552
552
  For nested request fields, consult the corresponding operation and model on the
553
- [official service index](http://ee.econt.com/services/): `ShippingLabel`,
553
+ [official service index](https://ee.econt.com/services/): `ShippingLabel`,
554
554
  `Address`, `ClientProfile`, `CDPayOptions`, `PaymentInstruction`,
555
555
  `PaymentAdditionPrice`, and `ThreeWayLogisticsRequest`.
556
556
  The gem forwards supplied request fields; it does not perform full business validation.
data/docs/VCR.md CHANGED
@@ -14,6 +14,10 @@ overridden. WebMock also disables network connections. The replay spec is
14
14
  separate from the opt-in recording suite, so account-specific recording settings
15
15
  cannot silently skip CI coverage.
16
16
 
17
+ Existing reviewed cassettes were recorded over HTTP. Replay explicitly uses
18
+ that historical base URL with all network access blocked; the recordings are
19
+ not relabeled as HTTPS evidence. New demo recordings default to HTTPS.
20
+
17
21
  Each endpoint has an independent cassette so a failed recording can be removed
18
22
  and retried without discarding unrelated evidence.
19
23
 
data/lib/econt/client.rb CHANGED
@@ -27,7 +27,7 @@ module Econt
27
27
  :open_timeout, :read_timeout, :write_timeout
28
28
 
29
29
  def initialize
30
- @base_url = 'http://demo.econt.com/ee/services/' # Default to demo
30
+ @base_url = 'https://demo.econt.com/ee/services/' # Default to demo
31
31
  @adapter = Faraday.default_adapter
32
32
  @acronyms = {} # nil to disable, {} to keep defaults
33
33
  @replace_acronym_defaults = false
@@ -46,7 +46,7 @@ module Econt
46
46
  def setup_connection!
47
47
  validate_credentials!
48
48
 
49
- @connection = Faraday.new(base_url) do |conn|
49
+ @connection = Faraday.new(base_url, ssl: { verify: true }) do |conn|
50
50
  configure_timeouts(conn)
51
51
  conn.use Econt::CamelCaseMiddleware,
52
52
  acronyms: @acronyms,
@@ -19,7 +19,7 @@ module Econt
19
19
  def get_countries
20
20
  response = post('getCountries')
21
21
  collection(response, Econt::Models::Nomenclatures::Country)
22
- # http://ee.econt.com/services/Nomenclatures/NomenclaturesService.getCountries.json(.soap?wsdl)
22
+ # https://ee.econt.com/services/Nomenclatures/NomenclaturesService.getCountries.json(.soap?wsdl)
23
23
  end
24
24
 
25
25
  # List cities for a country.
@@ -36,7 +36,7 @@ module Econt
36
36
  def get_cities(country_code:)
37
37
  response = post('getCities', body: { country_code: country_code })
38
38
  collection(response, Econt::Models::Nomenclatures::City)
39
- # http://ee.econt.com/services/Nomenclatures/NomenclaturesService.getCities.json(.soap?wsdl)
39
+ # https://ee.econt.com/services/Nomenclatures/NomenclaturesService.getCities.json(.soap?wsdl)
40
40
  end
41
41
 
42
42
  # Fetch cities and derive unique, sorted region names; this is a local helper, not a separate endpoint.
@@ -80,7 +80,7 @@ module Econt
80
80
  serving_receptions: serving_receptions
81
81
  })
82
82
  collection(response, Econt::Models::Nomenclatures::Office)
83
- # http://ee.econt.com/services/Nomenclatures/NomenclaturesService.getOffices.json(.soap?wsdl)
83
+ # https://ee.econt.com/services/Nomenclatures/NomenclaturesService.getOffices.json(.soap?wsdl)
84
84
  end
85
85
 
86
86
  # List streets, optionally restricted to a city.
@@ -97,7 +97,7 @@ module Econt
97
97
  def get_streets(city_id: nil)
98
98
  response = post('getStreets', body: { city_id: city_id })
99
99
  collection(response, Econt::Models::Nomenclatures::Street)
100
- # http://ee.econt.com/services/Nomenclatures/NomenclaturesService.getStreets.json(.soap?wsdl)
100
+ # https://ee.econt.com/services/Nomenclatures/NomenclaturesService.getStreets.json(.soap?wsdl)
101
101
  end
102
102
 
103
103
  # List quarters, optionally restricted to a city.
@@ -114,7 +114,7 @@ module Econt
114
114
  def get_quarters(city_id: nil)
115
115
  response = post('getQuarters', body: { city_id: city_id })
116
116
  collection(response, Econt::Models::Nomenclatures::Quarter)
117
- # http://ee.econt.com/services/Nomenclatures/NomenclaturesService.getQuarters.json(.soap?wsdl)
117
+ # https://ee.econt.com/services/Nomenclatures/NomenclaturesService.getQuarters.json(.soap?wsdl)
118
118
  end
119
119
  end
120
120
  end
data/lib/econt/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Econt
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: econt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boyan Georgiev