lithic 0.1.0.pre.alpha.10 → 0.1.0.pre.alpha.12
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 +267 -0
- data/README.md +5 -12
- data/SECURITY.md +27 -0
- data/lib/lithic/client.rb +5 -11
- data/lib/lithic/internal/cursor_page.rb +25 -25
- data/lib/lithic/internal/single_page.rb +25 -25
- data/lib/lithic/internal/transport/base_client.rb +13 -3
- data/lib/lithic/internal/transport/pooled_net_requester.rb +6 -2
- data/lib/lithic/internal/type/array_of.rb +17 -2
- data/lib/lithic/internal/type/base_model.rb +33 -5
- data/lib/lithic/internal/type/base_page.rb +1 -0
- data/lib/lithic/internal/type/boolean.rb +2 -0
- data/lib/lithic/internal/type/converter.rb +24 -0
- data/lib/lithic/internal/type/enum.rb +19 -3
- data/lib/lithic/internal/type/hash_of.rb +17 -2
- data/lib/lithic/internal/type/io_like.rb +2 -0
- data/lib/lithic/internal/type/union.rb +17 -3
- data/lib/lithic/internal/type/unknown.rb +2 -0
- data/lib/lithic/internal/util.rb +36 -9
- data/lib/lithic/internal.rb +5 -1
- data/lib/lithic/version.rb +1 -1
- data/rbi/lib/lithic/client.rbi +3 -2
- data/rbi/lib/lithic/internal/cursor_page.rbi +1 -0
- data/rbi/lib/lithic/internal/single_page.rbi +1 -0
- data/rbi/lib/lithic/internal/transport/base_client.rbi +1 -0
- data/rbi/lib/lithic/internal/type/array_of.rbi +12 -9
- data/rbi/lib/lithic/internal/type/base_model.rbi +7 -0
- data/rbi/lib/lithic/internal/type/boolean.rbi +4 -5
- data/rbi/lib/lithic/internal/type/converter.rbi +8 -0
- data/rbi/lib/lithic/internal/type/enum.rbi +4 -0
- data/rbi/lib/lithic/internal/type/hash_of.rbi +12 -9
- data/rbi/lib/lithic/internal/type/io_like.rbi +4 -5
- data/rbi/lib/lithic/internal/type/union.rbi +4 -0
- data/rbi/lib/lithic/internal/type/unknown.rbi +4 -5
- data/rbi/lib/lithic/internal/util.rbi +15 -0
- data/rbi/lib/lithic/internal.rbi +1 -1
- data/sig/lithic/internal/type/array_of.rbs +2 -0
- data/sig/lithic/internal/type/base_model.rbs +2 -0
- data/sig/lithic/internal/type/converter.rbs +4 -0
- data/sig/lithic/internal/type/enum.rbs +2 -0
- data/sig/lithic/internal/type/hash_of.rbs +2 -0
- data/sig/lithic/internal/type/union.rbs +2 -0
- data/sig/lithic/internal/util.rbs +2 -0
- data/sig/lithic/internal.rbs +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 488e7e7c02bda44d666c79ab398ee65c00d5994049f4aa48439bdb344330fbb6
|
4
|
+
data.tar.gz: 7ff630d6290e4abe4304cc2bde7325650d83d2e7b710ac1b93536e22ce8e1351
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b88593452a1e5a38014849baf782b3030d41bce4fb0b19c3656172590fc381a12892dc7c597d6e9a718560be4be2c083a5d2967140f463aafcf43e493af48d3f
|
7
|
+
data.tar.gz: c72e9785ce3b02549023b34b8d8e2a5c3616928ae0bf964f85c8ed7e25e3f2bfa88e97830af80ae7e1c9a107b918eeab7a534c3576360267657d1300fafca04f
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,267 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.1.0-alpha.12 (2025-04-17)
|
4
|
+
|
5
|
+
Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.11...v0.1.0-alpha.12)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **client:** enable setting base URL from environment variable ([4f4585e](https://github.com/lithic-com/lithic-ruby/commit/4f4585e1557f60480629b83e6e2850f6b4a5dc98))
|
10
|
+
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
* **client:** send correct HTTP path ([743cdc2](https://github.com/lithic-com/lithic-ruby/commit/743cdc28a16b5cfd724bf5b66cd699c840af8bad))
|
15
|
+
|
16
|
+
|
17
|
+
### Chores
|
18
|
+
|
19
|
+
* **internal:** always run post-processing when formatting when syntax_tree ([cfb9196](https://github.com/lithic-com/lithic-ruby/commit/cfb9196cccd8dea098fc52678e0eb2c777b0f900))
|
20
|
+
* **internal:** codegen related update ([c743e5d](https://github.com/lithic-com/lithic-ruby/commit/c743e5dd161480e7d3bf5305fb1135137b55d7de))
|
21
|
+
* **internal:** loosen internal type restrictions ([be1ae99](https://github.com/lithic-com/lithic-ruby/commit/be1ae999e5f9c36ed16367dfd9a9d0be4115b108))
|
22
|
+
* **internal:** minor touch ups on sdk internals ([a9ff4a6](https://github.com/lithic-com/lithic-ruby/commit/a9ff4a6e7da32387c68195b1bdbfe683f63435ff))
|
23
|
+
* **internal:** mostly README touch ups ([95ec3f1](https://github.com/lithic-com/lithic-ruby/commit/95ec3f10b027ca3be7dce6ffa2c45b9f8ba0b258))
|
24
|
+
* **internal:** protect SSE parsing pipeline from broken UTF-8 characters ([810686a](https://github.com/lithic-com/lithic-ruby/commit/810686a28f0a1d4710c632be010912b2ae41316f))
|
25
|
+
* make internal types pretty print ([eb5f0d9](https://github.com/lithic-com/lithic-ruby/commit/eb5f0d9f11b86370cfdca97b4a4716565a20c140))
|
26
|
+
|
27
|
+
|
28
|
+
### Documentation
|
29
|
+
|
30
|
+
* update documentation links to be more uniform ([6d246be](https://github.com/lithic-com/lithic-ruby/commit/6d246be6b7a3d16f4e8fb88980d2f53b45d85346))
|
31
|
+
|
32
|
+
## 0.1.0-alpha.11 (2025-04-11)
|
33
|
+
|
34
|
+
Full Changelog: [v0.1.0-alpha.10...v0.1.0-alpha.11](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.10...v0.1.0-alpha.11)
|
35
|
+
|
36
|
+
### Bug Fixes
|
37
|
+
|
38
|
+
* inaccuracies in the README.md ([32837de](https://github.com/lithic-com/lithic-ruby/commit/32837de7e1a29ced61aa4459cd37def264246000))
|
39
|
+
|
40
|
+
## 0.1.0-alpha.10 (2025-04-09)
|
41
|
+
|
42
|
+
Full Changelog: [v0.1.0-alpha.9...v0.1.0-alpha.10](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.9...v0.1.0-alpha.10)
|
43
|
+
|
44
|
+
### Features
|
45
|
+
|
46
|
+
* **api:** manual updates ([1cacebf](https://github.com/lithic-com/lithic-ruby/commit/1cacebf87c011d14633c09bc7cabfe3adaa92881))
|
47
|
+
|
48
|
+
|
49
|
+
### Chores
|
50
|
+
|
51
|
+
* **internal:** reduce CI branch coverage ([23e51cc](https://github.com/lithic-com/lithic-ruby/commit/23e51cc9fb3b621407223b67bdebab4548ac5815))
|
52
|
+
|
53
|
+
## 0.1.0-alpha.9 (2025-04-09)
|
54
|
+
|
55
|
+
Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
|
56
|
+
|
57
|
+
### Bug Fixes
|
58
|
+
|
59
|
+
* **internal:** update release-please to use ruby strategy for README.md ([#83](https://github.com/lithic-com/lithic-ruby/issues/83)) ([dbea289](https://github.com/lithic-com/lithic-ruby/commit/dbea289d9e77902a14f3394a2657de5f59ec2147))
|
60
|
+
|
61
|
+
|
62
|
+
### Chores
|
63
|
+
|
64
|
+
* configure new SDK language ([510319f](https://github.com/lithic-com/lithic-ruby/commit/510319f4ea674725c4a1eb8c177b0a765c260545))
|
65
|
+
* ensure readme.md is bumped when release please updates versions ([#82](https://github.com/lithic-com/lithic-ruby/issues/82)) ([a1c3675](https://github.com/lithic-com/lithic-ruby/commit/a1c36757b893b169eec1ca51102ffa75181e3daa))
|
66
|
+
* **internal:** expand CI branch coverage ([#84](https://github.com/lithic-com/lithic-ruby/issues/84)) ([b2707e7](https://github.com/lithic-com/lithic-ruby/commit/b2707e7690ba6bf15f80fe1a0efe2d593ce1bc85))
|
67
|
+
* **internal:** version bump ([355bac7](https://github.com/lithic-com/lithic-ruby/commit/355bac7ac68d215af2432a193c29e22f184f6e77))
|
68
|
+
|
69
|
+
## 0.1.0-alpha.8 (2025-04-08)
|
70
|
+
|
71
|
+
Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
|
72
|
+
|
73
|
+
### Features
|
74
|
+
|
75
|
+
* use Pathname alongside raw IO handles for file uploads ([#78](https://github.com/lithic-com/lithic-ruby/issues/78)) ([84571f8](https://github.com/lithic-com/lithic-ruby/commit/84571f8430878b7a0d65c038eb2593eb08e9eed2))
|
76
|
+
|
77
|
+
|
78
|
+
### Bug Fixes
|
79
|
+
|
80
|
+
* raise connection error for errors that result from HTTP transports ([#79](https://github.com/lithic-com/lithic-ruby/issues/79)) ([332efd2](https://github.com/lithic-com/lithic-ruby/commit/332efd2bc1d75a84212b6eda176b9841de113a96))
|
81
|
+
|
82
|
+
|
83
|
+
### Chores
|
84
|
+
|
85
|
+
* add README docs for using solargraph when installing gem from git ([#77](https://github.com/lithic-com/lithic-ruby/issues/77)) ([fda330a](https://github.com/lithic-com/lithic-ruby/commit/fda330adc0571aff714c5bc09065687689c3f95b))
|
86
|
+
* **internal:** version bump ([99ef2b9](https://github.com/lithic-com/lithic-ruby/commit/99ef2b996fc7909bb161e03a67340620f2bfbcdc))
|
87
|
+
* loosen const and integer coercion rules ([#80](https://github.com/lithic-com/lithic-ruby/issues/80)) ([5e9fcd4](https://github.com/lithic-com/lithic-ruby/commit/5e9fcd4f98224819930048224b2eb9c66f538f19))
|
88
|
+
* make client tests look prettier ([#76](https://github.com/lithic-com/lithic-ruby/issues/76)) ([aa7a696](https://github.com/lithic-com/lithic-ruby/commit/aa7a696cc89108e9a86bb4525ef3baa28e71a947))
|
89
|
+
* **tests:** improve enum examples ([#75](https://github.com/lithic-com/lithic-ruby/issues/75)) ([03c8cfb](https://github.com/lithic-com/lithic-ruby/commit/03c8cfbffc9da1edcd2c4ef0d9a7b18017ebcf65))
|
90
|
+
|
91
|
+
## 0.1.0-alpha.7 (2025-04-08)
|
92
|
+
|
93
|
+
Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)
|
94
|
+
|
95
|
+
### Features
|
96
|
+
|
97
|
+
* **api:** introduce TransactionSeries and update ShippingMethod fields ([#73](https://github.com/lithic-com/lithic-ruby/issues/73)) ([8c6e64e](https://github.com/lithic-com/lithic-ruby/commit/8c6e64e56b2019e391f85507eafecb7843c1c55d))
|
98
|
+
|
99
|
+
|
100
|
+
### Chores
|
101
|
+
|
102
|
+
* always fold up method bodies in sorbet type definitions ([#68](https://github.com/lithic-com/lithic-ruby/issues/68)) ([9fead9c](https://github.com/lithic-com/lithic-ruby/commit/9fead9caea79f55334725581a26263c93d7cd965))
|
103
|
+
* **internal:** codegen related update ([#71](https://github.com/lithic-com/lithic-ruby/issues/71)) ([0d0b308](https://github.com/lithic-com/lithic-ruby/commit/0d0b3082948af8910830955cef786d3d8ab5a3a4))
|
104
|
+
* **internal:** codegen related update ([#72](https://github.com/lithic-com/lithic-ruby/issues/72)) ([08e8290](https://github.com/lithic-com/lithic-ruby/commit/08e8290d145dc353c4574cd915cd6264c2e4b55f))
|
105
|
+
* **internal:** misc small improvements ([#65](https://github.com/lithic-com/lithic-ruby/issues/65)) ([be44033](https://github.com/lithic-com/lithic-ruby/commit/be44033edc9c1c846713f586aa5d527a01a355aa))
|
106
|
+
* **internal:** more concise handling of parameter naming conflicts ([#70](https://github.com/lithic-com/lithic-ruby/issues/70)) ([bc0cb73](https://github.com/lithic-com/lithic-ruby/commit/bc0cb7328d11dd3efb283443072de6838552eef7))
|
107
|
+
* **internal:** rubocop rules ([#67](https://github.com/lithic-com/lithic-ruby/issues/67)) ([b78e352](https://github.com/lithic-com/lithic-ruby/commit/b78e35233fa2cc7b94522dba21e479f359536e91))
|
108
|
+
* **internal:** run rubocop linter in parallel ([#66](https://github.com/lithic-com/lithic-ruby/issues/66)) ([28b8538](https://github.com/lithic-com/lithic-ruby/commit/28b85382d1f447c542cfd4b0b871b7e66180abf0))
|
109
|
+
* **internal:** version bump ([#63](https://github.com/lithic-com/lithic-ruby/issues/63)) ([60e1ca9](https://github.com/lithic-com/lithic-ruby/commit/60e1ca9a19b209531e7069d17fb6ecac0ad7c6ce))
|
110
|
+
* update yard comment formatting ([#69](https://github.com/lithic-com/lithic-ruby/issues/69)) ([a66a715](https://github.com/lithic-com/lithic-ruby/commit/a66a7155e5a8f88235ea8a23a471946164e3425f))
|
111
|
+
|
112
|
+
## 0.1.0-alpha.6 (2025-04-05)
|
113
|
+
|
114
|
+
Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
|
115
|
+
|
116
|
+
### Features
|
117
|
+
|
118
|
+
* allow all valid `JSON` types to be encoded ([#60](https://github.com/lithic-com/lithic-ruby/issues/60)) ([38374fd](https://github.com/lithic-com/lithic-ruby/commit/38374fda2d025ac1b6625174619f83262b00c7ac))
|
119
|
+
* support query, header, and body params that have identical names ([#58](https://github.com/lithic-com/lithic-ruby/issues/58)) ([ac5c767](https://github.com/lithic-com/lithic-ruby/commit/ac5c7672360f3a91fbf1722340faa887df856b31))
|
120
|
+
* support solargraph generics ([#53](https://github.com/lithic-com/lithic-ruby/issues/53)) ([850275b](https://github.com/lithic-com/lithic-ruby/commit/850275bcbc2d23deda110645faea0e7fa5decae5))
|
121
|
+
|
122
|
+
|
123
|
+
### Bug Fixes
|
124
|
+
|
125
|
+
* converter should transform stringio into string where applicable ([#62](https://github.com/lithic-com/lithic-ruby/issues/62)) ([17f61ed](https://github.com/lithic-com/lithic-ruby/commit/17f61ed9dde1a981c145f24ba4d60f46d4f1db9c))
|
126
|
+
|
127
|
+
|
128
|
+
### Chores
|
129
|
+
|
130
|
+
* do not use literals for version in type definitions ([#54](https://github.com/lithic-com/lithic-ruby/issues/54)) ([eb2fb32](https://github.com/lithic-com/lithic-ruby/commit/eb2fb32424f211bdeb512139784b34615b5b639c))
|
131
|
+
* document LSP support in read me ([#57](https://github.com/lithic-com/lithic-ruby/issues/57)) ([ee03c93](https://github.com/lithic-com/lithic-ruby/commit/ee03c93a4e613bfc1a45fdd81bb67d0cca121661))
|
132
|
+
* **internal:** version bump ([#52](https://github.com/lithic-com/lithic-ruby/issues/52)) ([4209a43](https://github.com/lithic-com/lithic-ruby/commit/4209a435a3515bfa4d84bf2d39c8bc46dd580051))
|
133
|
+
* misc sdk polish ([#56](https://github.com/lithic-com/lithic-ruby/issues/56)) ([ff2a257](https://github.com/lithic-com/lithic-ruby/commit/ff2a257bf3329e9553dd641b4ecf2f73cdcf7f8e))
|
134
|
+
* rename confusing `Type::BooleanModel` to `Type::Boolean` ([#61](https://github.com/lithic-com/lithic-ruby/issues/61)) ([83ac959](https://github.com/lithic-com/lithic-ruby/commit/83ac959d8057b053d05e2e063cbc91cb8acdde66))
|
135
|
+
* simplify internal utils ([#55](https://github.com/lithic-com/lithic-ruby/issues/55)) ([ba30a09](https://github.com/lithic-com/lithic-ruby/commit/ba30a09612a6b36d164b8feea2924e8444413ba5))
|
136
|
+
|
137
|
+
## 0.1.0-alpha.5 (2025-04-03)
|
138
|
+
|
139
|
+
Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)
|
140
|
+
|
141
|
+
### ⚠ BREAKING CHANGES
|
142
|
+
|
143
|
+
* bump min supported ruby version to 3.1 (oldest non-EOL) ([#49](https://github.com/lithic-com/lithic-ruby/issues/49))
|
144
|
+
* remove top level type aliases to relocated classes ([#48](https://github.com/lithic-com/lithic-ruby/issues/48))
|
145
|
+
|
146
|
+
### Features
|
147
|
+
|
148
|
+
* bump min supported ruby version to 3.1 (oldest non-EOL) ([#49](https://github.com/lithic-com/lithic-ruby/issues/49)) ([4d44818](https://github.com/lithic-com/lithic-ruby/commit/4d44818a8195fb8ec30e829cb513b07a09c9196f))
|
149
|
+
* remove top level type aliases to relocated classes ([#48](https://github.com/lithic-com/lithic-ruby/issues/48)) ([3ebfaa5](https://github.com/lithic-com/lithic-ruby/commit/3ebfaa59516d8f8b810df5441fed33778a5ee24c))
|
150
|
+
|
151
|
+
|
152
|
+
### Bug Fixes
|
153
|
+
|
154
|
+
* pre-release version string should match ruby, not semver conventions ([#51](https://github.com/lithic-com/lithic-ruby/issues/51)) ([cb04839](https://github.com/lithic-com/lithic-ruby/commit/cb048393543b826b166c590f63dbfec8019806dd))
|
155
|
+
|
156
|
+
|
157
|
+
### Chores
|
158
|
+
|
159
|
+
* demonstrate how to make undocumented requests in README ([#50](https://github.com/lithic-com/lithic-ruby/issues/50)) ([1b44d90](https://github.com/lithic-com/lithic-ruby/commit/1b44d9086244f14706dc69515b43b7278ae081bb))
|
160
|
+
* **internal:** version bump ([#45](https://github.com/lithic-com/lithic-ruby/issues/45)) ([fe7c581](https://github.com/lithic-com/lithic-ruby/commit/fe7c5819142eb7574afe8a5450d6b368b63564a3))
|
161
|
+
* move private classes into internal module ([#47](https://github.com/lithic-com/lithic-ruby/issues/47)) ([7b3792a](https://github.com/lithic-com/lithic-ruby/commit/7b3792a4f2f2eec24c83c0e5daca9bd96ba940d8))
|
162
|
+
|
163
|
+
## 0.1.0-alpha.4 (2025-04-02)
|
164
|
+
|
165
|
+
Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
|
166
|
+
|
167
|
+
### ⚠ BREAKING CHANGES
|
168
|
+
|
169
|
+
* use descriptive prefixes for enum names that start with otherwise illegal identifiers ([#44](https://github.com/lithic-com/lithic-ruby/issues/44))
|
170
|
+
|
171
|
+
### Features
|
172
|
+
|
173
|
+
* add reference links in yard ([#37](https://github.com/lithic-com/lithic-ruby/issues/37)) ([75a7096](https://github.com/lithic-com/lithic-ruby/commit/75a70968f724c4551f8138d6e69ba38eddcd6c7a))
|
174
|
+
* implement `to_json` for base model ([#42](https://github.com/lithic-com/lithic-ruby/issues/42)) ([f83789b](https://github.com/lithic-com/lithic-ruby/commit/f83789b31150bb73f943e313f2126c8523a7920c))
|
175
|
+
* link response models to their methods in yard doc ([#39](https://github.com/lithic-com/lithic-ruby/issues/39)) ([29aca97](https://github.com/lithic-com/lithic-ruby/commit/29aca97f8d7754f182bb8843212623110a799969))
|
176
|
+
|
177
|
+
|
178
|
+
### Bug Fixes
|
179
|
+
|
180
|
+
* use descriptive prefixes for enum names that start with otherwise illegal identifiers ([#44](https://github.com/lithic-com/lithic-ruby/issues/44)) ([6c0fc8d](https://github.com/lithic-com/lithic-ruby/commit/6c0fc8dbdef637f03c4f80171c8f7d38590672b2))
|
181
|
+
|
182
|
+
|
183
|
+
### Chores
|
184
|
+
|
185
|
+
* extract error classes into own module ([#43](https://github.com/lithic-com/lithic-ruby/issues/43)) ([60bf116](https://github.com/lithic-com/lithic-ruby/commit/60bf1165c8c5939a884097a2892aa1c968d8d8fc))
|
186
|
+
* improve yard docs readability ([#38](https://github.com/lithic-com/lithic-ruby/issues/38)) ([c806392](https://github.com/lithic-com/lithic-ruby/commit/c806392316f3be153eda5386f4a886e1b0cfb1bd))
|
187
|
+
* **internal:** version bump ([#35](https://github.com/lithic-com/lithic-ruby/issues/35)) ([2e19979](https://github.com/lithic-com/lithic-ruby/commit/2e1997954c72bed364c674f019402257348be920))
|
188
|
+
* order client variables by "importance" ([#41](https://github.com/lithic-com/lithic-ruby/issues/41)) ([7005a9c](https://github.com/lithic-com/lithic-ruby/commit/7005a9c71ef4bab65384b81ea3805029699acbe0))
|
189
|
+
* relax sorbet enum parameters to allow `String` in addition to `Symbol` ([#40](https://github.com/lithic-com/lithic-ruby/issues/40)) ([f6eaf95](https://github.com/lithic-com/lithic-ruby/commit/f6eaf9570f36f80d72fbbf10a2b5ff6c364d448d))
|
190
|
+
|
191
|
+
## 0.1.0-alpha.3 (2025-04-01)
|
192
|
+
|
193
|
+
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
|
194
|
+
|
195
|
+
### Bug Fixes
|
196
|
+
|
197
|
+
* path interpolation template strings ([#34](https://github.com/lithic-com/lithic-ruby/issues/34)) ([b5a88e9](https://github.com/lithic-com/lithic-ruby/commit/b5a88e924ab324bf8cd12788715f7811ab23d6a0))
|
198
|
+
|
199
|
+
|
200
|
+
### Chores
|
201
|
+
|
202
|
+
* **internal:** version bump ([#31](https://github.com/lithic-com/lithic-ruby/issues/31)) ([3cf8b58](https://github.com/lithic-com/lithic-ruby/commit/3cf8b5839cbf0bdb1ed4311c8f62e87ce61c1de3))
|
203
|
+
* use fully qualified name in sorbet README example ([#33](https://github.com/lithic-com/lithic-ruby/issues/33)) ([c2400cf](https://github.com/lithic-com/lithic-ruby/commit/c2400cf3d3660df01708ef0dcb111475c16b6d23))
|
204
|
+
|
205
|
+
## 0.1.0-alpha.2 (2025-04-01)
|
206
|
+
|
207
|
+
Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
|
208
|
+
|
209
|
+
### Features
|
210
|
+
|
211
|
+
* **internal:** converter interface should recurse without schema ([#24](https://github.com/lithic-com/lithic-ruby/issues/24)) ([79e3bee](https://github.com/lithic-com/lithic-ruby/commit/79e3beed6781f642b3a92d8a8b8f87e58769b6d6))
|
212
|
+
|
213
|
+
|
214
|
+
### Bug Fixes
|
215
|
+
|
216
|
+
* switch to github compatible markdown engine ([#29](https://github.com/lithic-com/lithic-ruby/issues/29)) ([af478ad](https://github.com/lithic-com/lithic-ruby/commit/af478ad01947caaa51819d43b6e2913a77504f5e))
|
217
|
+
|
218
|
+
|
219
|
+
### Chores
|
220
|
+
|
221
|
+
* fix misc rubocop errors ([#30](https://github.com/lithic-com/lithic-ruby/issues/30)) ([d69480c](https://github.com/lithic-com/lithic-ruby/commit/d69480cbf8c90cf2c7a122889de178dd2b3954a5))
|
222
|
+
* internal codegen changes ([9865114](https://github.com/lithic-com/lithic-ruby/commit/9865114d89129552f76e5c81769e8214c2a09266))
|
223
|
+
* internal codegen changes ([ed29c22](https://github.com/lithic-com/lithic-ruby/commit/ed29c226a417d498b6afe65296a87e837e4016f7))
|
224
|
+
* **internal:** minor refactoring of utils ([#23](https://github.com/lithic-com/lithic-ruby/issues/23)) ([c20a18e](https://github.com/lithic-com/lithic-ruby/commit/c20a18e7c48cb57c4fd59a00d65c9db9f8da92f1))
|
225
|
+
* **internal:** remove workflow condition ([#22](https://github.com/lithic-com/lithic-ruby/issues/22)) ([9a7ca60](https://github.com/lithic-com/lithic-ruby/commit/9a7ca608e1a6f321f38ae3e3d2508d879e93a805))
|
226
|
+
* more accurate type annotations for SDK internals ([#27](https://github.com/lithic-com/lithic-ruby/issues/27)) ([952833a](https://github.com/lithic-com/lithic-ruby/commit/952833a2ad4b14ff490cf2bb33dcdc4630e93331))
|
227
|
+
* more aggressive tapioca detection logic for skipping compiler introspection ([#18](https://github.com/lithic-com/lithic-ruby/issues/18)) ([490e34a](https://github.com/lithic-com/lithic-ruby/commit/490e34a34f635430ad006d0ee31438139a0afc3a))
|
228
|
+
* re-order assignment lines to make unions easier to read ([#20](https://github.com/lithic-com/lithic-ruby/issues/20)) ([144c1f9](https://github.com/lithic-com/lithic-ruby/commit/144c1f900f5b8d6db914722f00070f76058c2377))
|
229
|
+
* relocate internal modules ([#26](https://github.com/lithic-com/lithic-ruby/issues/26)) ([8943495](https://github.com/lithic-com/lithic-ruby/commit/89434958a333ac17cb6c85c81328f1f15182507f))
|
230
|
+
* remove unnecessary & confusing module ([#25](https://github.com/lithic-com/lithic-ruby/issues/25)) ([ccb4da4](https://github.com/lithic-com/lithic-ruby/commit/ccb4da42fe8b083ebaf27a8172c05f883281cdee))
|
231
|
+
* update readme ([#28](https://github.com/lithic-com/lithic-ruby/issues/28)) ([084ab7e](https://github.com/lithic-com/lithic-ruby/commit/084ab7e139a0063233f7976973205ecaed7253d4))
|
232
|
+
|
233
|
+
## 0.1.0-alpha.1 (2025-03-26)
|
234
|
+
|
235
|
+
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/lithic-com/lithic-ruby/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
|
236
|
+
|
237
|
+
### ⚠ BREAKING CHANGES
|
238
|
+
|
239
|
+
* use tagged enums in sorbet type definitions ([#4](https://github.com/lithic-com/lithic-ruby/issues/4))
|
240
|
+
* support `for item in stream` style iteration on `Stream`s ([#1](https://github.com/lithic-com/lithic-ruby/issues/1))
|
241
|
+
|
242
|
+
### Features
|
243
|
+
|
244
|
+
* consistently accept `AnyHash` types in parameter positions in sorbet ([#9](https://github.com/lithic-com/lithic-ruby/issues/9)) ([834c2d1](https://github.com/lithic-com/lithic-ruby/commit/834c2d14e78c83e2beb2675d7bd4a8da32aca4be))
|
245
|
+
* prevent tapioca from introspecting the gem internals ([#8](https://github.com/lithic-com/lithic-ruby/issues/8)) ([c316306](https://github.com/lithic-com/lithic-ruby/commit/c316306e82fd376e92e54844661dc0dc3b901a7f))
|
246
|
+
* support `for item in stream` style iteration on `Stream`s ([#1](https://github.com/lithic-com/lithic-ruby/issues/1)) ([00f0df1](https://github.com/lithic-com/lithic-ruby/commit/00f0df1b9d34605a6c40b52dd35ca0603e7876ac))
|
247
|
+
* use tagged enums in sorbet type definitions ([#4](https://github.com/lithic-com/lithic-ruby/issues/4)) ([07a5b4d](https://github.com/lithic-com/lithic-ruby/commit/07a5b4dab5793761618a02a0ea791e222973b0f8))
|
248
|
+
|
249
|
+
|
250
|
+
### Bug Fixes
|
251
|
+
|
252
|
+
* pages should be able to accept non-converter models ([#12](https://github.com/lithic-com/lithic-ruby/issues/12)) ([f36c4b6](https://github.com/lithic-com/lithic-ruby/commit/f36c4b62aa3bc4f783110bfd635feba14bb0891e))
|
253
|
+
* resolve tapioca derived sorbet errors ([#3](https://github.com/lithic-com/lithic-ruby/issues/3)) ([e5d8b78](https://github.com/lithic-com/lithic-ruby/commit/e5d8b78632b38867f2cfa79aaf1ba06f0a5e0e73))
|
254
|
+
* yard example tag formatting ([#6](https://github.com/lithic-com/lithic-ruby/issues/6)) ([b5e3b7f](https://github.com/lithic-com/lithic-ruby/commit/b5e3b7feda9be01ee2026a4093c49e406af67e96))
|
255
|
+
|
256
|
+
|
257
|
+
### Chores
|
258
|
+
|
259
|
+
* `BaseModel` fields that are `BaseModel` typed should also accept `Hash` ([#5](https://github.com/lithic-com/lithic-ruby/issues/5)) ([83a2861](https://github.com/lithic-com/lithic-ruby/commit/83a286144f2469ec0d90c93144201e8626656543))
|
260
|
+
* add type annotations for enum and union member listing methods ([#7](https://github.com/lithic-com/lithic-ruby/issues/7)) ([86672a1](https://github.com/lithic-com/lithic-ruby/commit/86672a1faea539aaf14c637f48c63205e8588734))
|
261
|
+
* **api:** new attribute targets for Auth Rules and new Financial Account State schema ([#16](https://github.com/lithic-com/lithic-ruby/issues/16)) ([c8ef1a1](https://github.com/lithic-com/lithic-ruby/commit/c8ef1a11fef96c3e806d0a696c8ac901e3eddbdd))
|
262
|
+
* disable dangerous rubocop auto correct rule ([#14](https://github.com/lithic-com/lithic-ruby/issues/14)) ([e31dbfb](https://github.com/lithic-com/lithic-ruby/commit/e31dbfb6c109e1777c7ded5d6d6e77ca3293990d))
|
263
|
+
* fix typos ([#17](https://github.com/lithic-com/lithic-ruby/issues/17)) ([258055f](https://github.com/lithic-com/lithic-ruby/commit/258055fc6d742413ab4e6dc845d5cdad410f3ce9))
|
264
|
+
* more readable output when tests fail ([#15](https://github.com/lithic-com/lithic-ruby/issues/15)) ([f231c30](https://github.com/lithic-com/lithic-ruby/commit/f231c3096d9e666896d514ec6fb9b5863c5acd86))
|
265
|
+
* recursively accept `AnyHash` for `BaseModel`s in arrays and hashes ([#10](https://github.com/lithic-com/lithic-ruby/issues/10)) ([8852810](https://github.com/lithic-com/lithic-ruby/commit/8852810fa3e990794d5e655bbfe953132bcb6614))
|
266
|
+
* reduce verbosity in type declarations ([#13](https://github.com/lithic-com/lithic-ruby/issues/13)) ([354c40b](https://github.com/lithic-com/lithic-ruby/commit/354c40b1dc4a23446314176f768322ea15d9abc9))
|
267
|
+
* switch to prettier looking sorbet annotations ([#11](https://github.com/lithic-com/lithic-ruby/issues/11)) ([80c80b2](https://github.com/lithic-com/lithic-ruby/commit/80c80b2eb0bd921b9a029253484d3bf61724cea2))
|
data/README.md
CHANGED
@@ -4,9 +4,9 @@ The Lithic Ruby library provides convenient access to the Lithic REST API from a
|
|
4
4
|
|
5
5
|
## Documentation
|
6
6
|
|
7
|
-
Documentation for
|
7
|
+
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/lithic).
|
8
8
|
|
9
|
-
The
|
9
|
+
The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com).
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
|
@@ -15,17 +15,11 @@ To use this gem, install via Bundler by adding the following to your application
|
|
15
15
|
<!-- x-release-please-start-version -->
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
gem "lithic", "~> 0.1.0.pre.alpha.
|
18
|
+
gem "lithic", "~> 0.1.0.pre.alpha.12"
|
19
19
|
```
|
20
20
|
|
21
21
|
<!-- x-release-please-end -->
|
22
22
|
|
23
|
-
To fetch an initial copy of the gem:
|
24
|
-
|
25
|
-
```sh
|
26
|
-
bundle install
|
27
|
-
```
|
28
|
-
|
29
23
|
## Usage
|
30
24
|
|
31
25
|
```ruby
|
@@ -63,7 +57,7 @@ end
|
|
63
57
|
|
64
58
|
### Errors
|
65
59
|
|
66
|
-
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Lithic::
|
60
|
+
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Lithic::Errors::APIError` will be thrown:
|
67
61
|
|
68
62
|
```ruby
|
69
63
|
begin
|
@@ -189,8 +183,7 @@ If you want to explicitly send an extra param, you can do so with the `extra_que
|
|
189
183
|
To make requests to undocumented endpoints, you can make requests using `client.request`. Options on the client will be respected (such as retries) when making this request.
|
190
184
|
|
191
185
|
```ruby
|
192
|
-
response =
|
193
|
-
client.request(
|
186
|
+
response = client.request(
|
194
187
|
method: :post,
|
195
188
|
path: '/undocumented/endpoint',
|
196
189
|
query: {"dog": "woof"},
|
data/SECURITY.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Reporting Security Issues
|
4
|
+
|
5
|
+
This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
|
6
|
+
|
7
|
+
To report a security issue, please contact the Stainless team at security@stainless.com.
|
8
|
+
|
9
|
+
## Responsible Disclosure
|
10
|
+
|
11
|
+
We appreciate the efforts of security researchers and individuals who help us maintain the security of
|
12
|
+
SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible
|
13
|
+
disclosure practices by allowing us a reasonable amount of time to investigate and address the issue
|
14
|
+
before making any information public.
|
15
|
+
|
16
|
+
## Reporting Non-SDK Related Security Issues
|
17
|
+
|
18
|
+
If you encounter security issues that are not directly related to SDKs but pertain to the services
|
19
|
+
or products provided by Lithic please follow the respective company's security reporting guidelines.
|
20
|
+
|
21
|
+
### Lithic Terms and Policies
|
22
|
+
|
23
|
+
Please contact sdk-feedback@lithic.com for any questions or concerns regarding security of our services.
|
24
|
+
|
25
|
+
---
|
26
|
+
|
27
|
+
Thank you for helping us keep the SDKs and systems they interact with secure.
|
data/lib/lithic/client.rb
CHANGED
@@ -134,7 +134,8 @@ module Lithic
|
|
134
134
|
# - `production` corresponds to `https://api.lithic.com`
|
135
135
|
# - `sandbox` corresponds to `https://sandbox.lithic.com`
|
136
136
|
#
|
137
|
-
# @param base_url [String, nil] Override the default base URL for the API, e.g.,
|
137
|
+
# @param base_url [String, nil] Override the default base URL for the API, e.g.,
|
138
|
+
# `"https://api.example.com/v2/"`. Defaults to `ENV["LITHIC_BASE_URL"]`
|
138
139
|
#
|
139
140
|
# @param max_retries [Integer] Max number of retries to attempt after a failed retryable request.
|
140
141
|
#
|
@@ -146,21 +147,14 @@ module Lithic
|
|
146
147
|
def initialize(
|
147
148
|
api_key: ENV["LITHIC_API_KEY"],
|
148
149
|
environment: nil,
|
149
|
-
base_url:
|
150
|
+
base_url: ENV["LITHIC_BASE_URL"],
|
150
151
|
max_retries: DEFAULT_MAX_RETRIES,
|
151
152
|
timeout: DEFAULT_TIMEOUT_IN_SECONDS,
|
152
153
|
initial_retry_delay: DEFAULT_INITIAL_RETRY_DELAY,
|
153
154
|
max_retry_delay: DEFAULT_MAX_RETRY_DELAY
|
154
155
|
)
|
155
|
-
|
156
|
-
|
157
|
-
raise ArgumentError.new("both environment and base_url given, expected only one")
|
158
|
-
in [Symbol | String, nil]
|
159
|
-
base_url = ENVIRONMENTS.fetch(environment.to_sym) do
|
160
|
-
raise ArgumentError.new("environment must be one of #{ENVIRONMENTS.keys}, got #{environment}")
|
161
|
-
end
|
162
|
-
else
|
163
|
-
base_url ||= ENVIRONMENTS.fetch(:production)
|
156
|
+
base_url ||= ENVIRONMENTS.fetch(environment || :production) do
|
157
|
+
raise ArgumentError.new("environment must be one of #{ENVIRONMENTS.keys}, got #{environment}")
|
164
158
|
end
|
165
159
|
|
166
160
|
if api_key.nil?
|
@@ -22,29 +22,6 @@ module Lithic
|
|
22
22
|
# @return [Boolean]
|
23
23
|
attr_accessor :has_more
|
24
24
|
|
25
|
-
# @api private
|
26
|
-
#
|
27
|
-
# @param client [Lithic::Internal::Transport::BaseClient]
|
28
|
-
# @param req [Hash{Symbol=>Object}]
|
29
|
-
# @param headers [Hash{String=>String}, Net::HTTPHeader]
|
30
|
-
# @param page_data [Hash{Symbol=>Object}]
|
31
|
-
def initialize(client:, req:, headers:, page_data:)
|
32
|
-
super
|
33
|
-
model = req.fetch(:model)
|
34
|
-
|
35
|
-
case page_data
|
36
|
-
in {data: Array | nil => data}
|
37
|
-
@data = data&.map { Lithic::Internal::Type::Converter.coerce(model, _1) }
|
38
|
-
else
|
39
|
-
end
|
40
|
-
|
41
|
-
case page_data
|
42
|
-
in {has_more: true | false => has_more}
|
43
|
-
@has_more = has_more
|
44
|
-
else
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
25
|
# @return [Boolean]
|
49
26
|
def next_page?
|
50
27
|
has_more
|
@@ -69,17 +46,40 @@ module Lithic
|
|
69
46
|
unless block_given?
|
70
47
|
raise ArgumentError.new("A block must be given to ##{__method__}")
|
71
48
|
end
|
49
|
+
|
72
50
|
page = self
|
73
51
|
loop do
|
74
|
-
page.data&.each
|
52
|
+
page.data&.each(&blk)
|
53
|
+
|
75
54
|
break unless page.next_page?
|
76
55
|
page = page.next_page
|
77
56
|
end
|
78
57
|
end
|
79
58
|
|
59
|
+
# @api private
|
60
|
+
#
|
61
|
+
# @param client [Lithic::Internal::Transport::BaseClient]
|
62
|
+
# @param req [Hash{Symbol=>Object}]
|
63
|
+
# @param headers [Hash{String=>String}, Net::HTTPHeader]
|
64
|
+
# @param page_data [Hash{Symbol=>Object}]
|
65
|
+
def initialize(client:, req:, headers:, page_data:)
|
66
|
+
super
|
67
|
+
|
68
|
+
case page_data
|
69
|
+
in {data: Array | nil => data}
|
70
|
+
@data = data&.map { Lithic::Internal::Type::Converter.coerce(@model, _1) }
|
71
|
+
else
|
72
|
+
end
|
73
|
+
@has_more = page_data[:has_more]
|
74
|
+
end
|
75
|
+
|
76
|
+
# @api private
|
77
|
+
#
|
80
78
|
# @return [String]
|
81
79
|
def inspect
|
82
|
-
|
80
|
+
model = Lithic::Internal::Type::Converter.inspect(@model, depth: 1)
|
81
|
+
|
82
|
+
"#<#{self.class}[#{model}]:0x#{object_id.to_s(16)} has_more=#{has_more.inspect}>"
|
83
83
|
end
|
84
84
|
end
|
85
85
|
end
|
@@ -22,29 +22,6 @@ module Lithic
|
|
22
22
|
# @return [Boolean]
|
23
23
|
attr_accessor :has_more
|
24
24
|
|
25
|
-
# @api private
|
26
|
-
#
|
27
|
-
# @param client [Lithic::Internal::Transport::BaseClient]
|
28
|
-
# @param req [Hash{Symbol=>Object}]
|
29
|
-
# @param headers [Hash{String=>String}, Net::HTTPHeader]
|
30
|
-
# @param page_data [Array<Object>]
|
31
|
-
def initialize(client:, req:, headers:, page_data:)
|
32
|
-
super
|
33
|
-
model = req.fetch(:model)
|
34
|
-
|
35
|
-
case page_data
|
36
|
-
in {data: Array | nil => data}
|
37
|
-
@data = data&.map { Lithic::Internal::Type::Converter.coerce(model, _1) }
|
38
|
-
else
|
39
|
-
end
|
40
|
-
|
41
|
-
case page_data
|
42
|
-
in {has_more: true | false => has_more}
|
43
|
-
@has_more = has_more
|
44
|
-
else
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
25
|
# @return [Boolean]
|
49
26
|
def next_page?
|
50
27
|
has_more
|
@@ -63,17 +40,40 @@ module Lithic
|
|
63
40
|
unless block_given?
|
64
41
|
raise ArgumentError.new("A block must be given to ##{__method__}")
|
65
42
|
end
|
43
|
+
|
66
44
|
page = self
|
67
45
|
loop do
|
68
|
-
page.data&.each
|
46
|
+
page.data&.each(&blk)
|
47
|
+
|
69
48
|
break unless page.next_page?
|
70
49
|
page = page.next_page
|
71
50
|
end
|
72
51
|
end
|
73
52
|
|
53
|
+
# @api private
|
54
|
+
#
|
55
|
+
# @param client [Lithic::Internal::Transport::BaseClient]
|
56
|
+
# @param req [Hash{Symbol=>Object}]
|
57
|
+
# @param headers [Hash{String=>String}, Net::HTTPHeader]
|
58
|
+
# @param page_data [Array<Object>]
|
59
|
+
def initialize(client:, req:, headers:, page_data:)
|
60
|
+
super
|
61
|
+
|
62
|
+
case page_data
|
63
|
+
in {data: Array | nil => data}
|
64
|
+
@data = data&.map { Lithic::Internal::Type::Converter.coerce(@model, _1) }
|
65
|
+
else
|
66
|
+
end
|
67
|
+
@has_more = page_data[:has_more]
|
68
|
+
end
|
69
|
+
|
70
|
+
# @api private
|
71
|
+
#
|
74
72
|
# @return [String]
|
75
73
|
def inspect
|
76
|
-
|
74
|
+
model = Lithic::Internal::Type::Converter.inspect(@model, depth: 1)
|
75
|
+
|
76
|
+
"#<#{self.class}[#{model}]:0x#{object_id.to_s(16)} has_more=#{has_more.inspect}>"
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
@@ -93,7 +93,11 @@ module Lithic
|
|
93
93
|
URI.join(url, response_headers["location"])
|
94
94
|
rescue ArgumentError
|
95
95
|
message = "Server responded with status #{status} but no valid location header."
|
96
|
-
raise Lithic::Errors::APIConnectionError.new(
|
96
|
+
raise Lithic::Errors::APIConnectionError.new(
|
97
|
+
url: url,
|
98
|
+
response: response_headers,
|
99
|
+
message: message
|
100
|
+
)
|
97
101
|
end
|
98
102
|
|
99
103
|
request = {**request, url: location}
|
@@ -101,7 +105,11 @@ module Lithic
|
|
101
105
|
case [url.scheme, location.scheme]
|
102
106
|
in ["https", "http"]
|
103
107
|
message = "Tried to redirect to a insecure URL"
|
104
|
-
raise Lithic::Errors::APIConnectionError.new(
|
108
|
+
raise Lithic::Errors::APIConnectionError.new(
|
109
|
+
url: url,
|
110
|
+
response: response_headers,
|
111
|
+
message: message
|
112
|
+
)
|
105
113
|
else
|
106
114
|
nil
|
107
115
|
end
|
@@ -350,7 +358,7 @@ module Lithic
|
|
350
358
|
self.class.reap_connection!(status, stream: stream)
|
351
359
|
|
352
360
|
message = "Failed to complete the request within #{self.class::MAX_REDIRECTS} redirects."
|
353
|
-
raise Lithic::Errors::APIConnectionError.new(url: url, message: message)
|
361
|
+
raise Lithic::Errors::APIConnectionError.new(url: url, response: response, message: message)
|
354
362
|
in 300..399
|
355
363
|
self.class.reap_connection!(status, stream: stream)
|
356
364
|
|
@@ -460,6 +468,8 @@ module Lithic
|
|
460
468
|
end
|
461
469
|
end
|
462
470
|
|
471
|
+
# @api private
|
472
|
+
#
|
463
473
|
# @return [String]
|
464
474
|
def inspect
|
465
475
|
# rubocop:disable Layout/LineLength
|
@@ -57,11 +57,15 @@ module Lithic
|
|
57
57
|
# @return [Array(Net::HTTPGenericRequest, Proc)]
|
58
58
|
def build_request(request, &blk)
|
59
59
|
method, url, headers, body = request.fetch_values(:method, :url, :headers, :body)
|
60
|
+
|
61
|
+
# ensure we construct a URI class of the right scheme
|
62
|
+
url = URI(url.to_s)
|
63
|
+
|
60
64
|
req = Net::HTTPGenericRequest.new(
|
61
65
|
method.to_s.upcase,
|
62
66
|
!body.nil?,
|
63
67
|
method != :head,
|
64
|
-
url
|
68
|
+
url
|
65
69
|
)
|
66
70
|
|
67
71
|
headers.each { req[_1] = _2 }
|
@@ -149,7 +153,7 @@ module Lithic
|
|
149
153
|
break if finished
|
150
154
|
|
151
155
|
rsp.read_body do |bytes|
|
152
|
-
y << bytes
|
156
|
+
y << bytes.force_encoding(Encoding::BINARY)
|
153
157
|
break if finished
|
154
158
|
|
155
159
|
self.class.calibrate_socket_timeout(conn, deadline)
|