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 +4 -4
- data/CHANGELOG.md +13 -1
- data/README.md +11 -8
- data/SECURITY.md +13 -9
- data/docs/API.md +2 -2
- data/docs/VCR.md +4 -0
- data/lib/econt/client.rb +2 -2
- data/lib/econt/services/nomenclatures/nomenclatures.rb +5 -5
- data/lib/econt/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c826a914b9d9ef63b097a5a03c60b9aa3c53ca23ef08ea9b3657d03033818e30
|
|
4
|
+
data.tar.gz: 64500b8cd2713d506155ab1b2319f8cc769e17f791bdae090a22989a055e50e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e1d3761fb0e925f8b8fa12a61a09b73477d17f3868e32ec83b32ce0a5d0193b996605f369faa22b1053d39d0bff88ff96ef7b700b89f836c9c1f81c5093a9c5b
|
|
7
|
+
data.tar.gz: 7dd66c57c80d09f9ee3fe472e61ca1ab9afa546152f04e045d49fe0974b024d947632c34cc09602747bf828ca4af20986d1082e3daa8d4750d0a642669553ef3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
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](
|
|
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 = '
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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', '
|
|
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
|
-
##
|
|
18
|
+
## HTTPS transport and credentials
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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](
|
|
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](
|
|
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 = '
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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