apimatic_core 0.3.20 → 0.3.21

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: f7d8b0c1b444eea245cf2e0ca29d5fbd980529d682183b50a74e9a930fa90930
4
- data.tar.gz: 72438e6b5d173296dac13e5289e93ca9705de8a28e57b9beff52e7c59f9f6607
3
+ metadata.gz: fb0870e0a357bb24b716bae4e8e73d89b103982bc23ae6b231c3c6f570b87ff0
4
+ data.tar.gz: 6edef52c90db1b9c37aaca09ca476b8c4f749f7fefd7d638bc8616a136a050f8
5
5
  SHA512:
6
- metadata.gz: 3bf3553f1053f3da1ab4a9e971aec4466d20ff84bcecdf2bf20051f3920e4ba0f471f782dc606875429214196ba934d9988ab9a2884a193a6f4aade5f692d1e4
7
- data.tar.gz: e39757f877aeba7cd2f80cc70d15076daa9b44700dab1830608cc77b7799866e5abc389aa502b64aeeb2ad715a128ba4ddf898c853ffda4ffb2601f37425111a
6
+ metadata.gz: 78830d653884998aceba2c8510211728d08b589c8b738158a3c7e5c6a55fa39000ebe8015bf35ba089f5770e463cebcbf4448c7d0bee07a17ee100ac25bbcd83
7
+ data.tar.gz: e7901e13ae3d15116707bd3457a403e54c09245afa2a2122dda4d87f2d653d660580284f7c63121082a138449e6f10aa8c89b8a29eecd6e4255192c4f899c4cb
@@ -38,5 +38,25 @@ module CoreLibrary
38
38
  hash[:password] = password if password
39
39
  end
40
40
  end
41
+
42
+ ##
43
+ # Creates a ProxySettings instance from a hash.
44
+ #
45
+ # @param hash [Hash] A hash containing :address, :port, :username, and/or :password.
46
+ # @return [ProxySettings, nil] Returns a new instance or nil if hash is nil/empty.
47
+ #
48
+ def self.from_hash(hash)
49
+ return nil if hash.nil? || hash.empty?
50
+
51
+ # Support both symbol and string keys
52
+ address = hash[:address] || hash['address']
53
+ port = hash[:port] || hash['port']
54
+ username = hash[:username] || hash['username']
55
+ password = hash[:password] || hash['password']
56
+
57
+ return nil if address.nil? || address.strip.empty?
58
+
59
+ new(address: address, port: port, username: username, password: password)
60
+ end
41
61
  end
42
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apimatic_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.20
4
+ version: 0.3.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - APIMatic Ltd.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-03 00:00:00.000000000 Z
11
+ date: 2025-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apimatic_core_interfaces
@@ -235,6 +235,6 @@ requirements: []
235
235
  rubygems_version: 3.4.19
236
236
  signing_key:
237
237
  specification_version: 4
238
- summary: A library that contains apimatic-apimatic-core logic and utilities for consuming
239
- REST APIs using Python SDKs generated by APIMatic.
238
+ summary: A library that contains apimatic-core logic and utilities for consuming REST
239
+ APIs using Ruby SDKs generated by APIMatic.
240
240
  test_files: []