lithic 0.1.0.pre.alpha.28 → 0.1.0.pre.alpha.30

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: 426157664cabd078c520246758b0be9f3e439382455dd4fe952a8574d9e3078c
4
- data.tar.gz: b525e1679bbee873e6611a88b5f66d7fc84ef86d61c269cba80f3e9b0e4eea87
3
+ metadata.gz: 69dc9d2ddc7acfeb469907a8acc0a5be4d6974e3efcb4f3b496c3e139e46ab53
4
+ data.tar.gz: 67a86092130e3632d58bb8bdb1e7613d05f4f7934ce9273f5a7ff829ffdbbcf3
5
5
  SHA512:
6
- metadata.gz: d22da8f96ade56b0e448482b4e5a759737f91c9f6291b0425a723de9674d2ea9389225afd2beb280a127aef3262f4bc1e78d307f1379d4d91a3127574b7b8d00
7
- data.tar.gz: 458c6e85d3e27c08d31b7a27dd88fc8f7cc522f296268b1b3070c3c6b2805d7e706daa0280d09a14a6516056f290bdf6ad2c5bb4832f1f32222bbb008e789722
6
+ metadata.gz: 883fb853690e2dd6348725f0e09abe5c29ac69f1cb1fdea8973158c025a748e3b330d48409b376248df5725a2e9229beebc05d9d3d6d28b4ef40e19fbb3d3c19
7
+ data.tar.gz: 9d0e0d14111af87c763d4b9c1309e23d62899faaf20c03417fc40fa5cb3c056eae10e8bf1cd46503656164433f4e04e9654e16003b66b926e8d433a72e26d354
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.30 (2025-06-02)
4
+
5
+ Full Changelog: [v0.1.0-alpha.29...v0.1.0-alpha.30](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.29...v0.1.0-alpha.30)
6
+
7
+ ### Bug Fixes
8
+
9
+ * `to_sorbet_type` should not return branded types ([d044f89](https://github.com/lithic-com/lithic-ruby/commit/d044f89b4031bb1e24223df52626e7512da07ea3))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **api:** mark some methods as deprecated ([3e09fe4](https://github.com/lithic-com/lithic-ruby/commit/3e09fe4e86ee7d02a15f57917089a74b30876bda))
15
+
16
+ ## 0.1.0-alpha.29 (2025-05-27)
17
+
18
+ Full Changelog: [v0.1.0-alpha.28...v0.1.0-alpha.29](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.28...v0.1.0-alpha.29)
19
+
20
+ ### Bug Fixes
21
+
22
+ * sorbet types for enums, and make tapioca detection ignore `tapioca dsl` ([8f652e8](https://github.com/lithic-com/lithic-ruby/commit/8f652e819994698ce6b0b895349abd230755a9d8))
23
+
3
24
  ## 0.1.0-alpha.28 (2025-05-23)
4
25
 
5
26
  Full Changelog: [v0.1.0-alpha.27...v0.1.0-alpha.28](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.27...v0.1.0-alpha.28)
data/README.md CHANGED
@@ -15,7 +15,7 @@ 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.28"
18
+ gem "lithic", "~> 0.1.0.pre.alpha.30"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -112,11 +112,14 @@ module Lithic
112
112
  #
113
113
  # @return [Object]
114
114
  def to_sorbet_type
115
- case values
115
+ types = values.map { Lithic::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
116
+ case types
116
117
  in []
117
118
  T.noreturn
118
- in [value, *_]
119
- T.all(Lithic::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self)
119
+ in [type]
120
+ type
121
+ else
122
+ T.any(*types)
120
123
  end
121
124
  end
122
125
 
@@ -206,11 +206,14 @@ module Lithic
206
206
  #
207
207
  # @return [Object]
208
208
  def to_sorbet_type
209
- case (v = variants)
209
+ types = variants.map { Lithic::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
210
+ case types
210
211
  in []
211
212
  T.noreturn
213
+ in [type]
214
+ type
212
215
  else
213
- T.any(*v.map { Lithic::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) })
216
+ T.any(*types)
214
217
  end
215
218
  end
216
219
 
@@ -875,8 +875,12 @@ module Lithic
875
875
  case type
876
876
  in Lithic::Internal::Util::SorbetRuntimeSupport
877
877
  type.to_sorbet_type
878
- else
878
+ in Class | Module
879
879
  type
880
+ in true | false
881
+ T::Boolean
882
+ else
883
+ type.class
880
884
  end
881
885
  end
882
886
  end
data/lib/lithic/models.rb CHANGED
@@ -11,16 +11,16 @@ module Lithic
11
11
  mod.constants.each do |name|
12
12
  case mod.const_get(name)
13
13
  in true | false
14
- mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } }
14
+ mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
15
15
  mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
16
16
  in Integer
17
- mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } }
17
+ mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
18
18
  mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
19
19
  in Float
20
- mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } }
20
+ mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
21
21
  mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
22
22
  in Symbol
23
- mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } }
23
+ mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
24
24
  mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
25
25
  else
26
26
  end
@@ -158,6 +158,8 @@ module Lithic
158
158
  )
159
159
  end
160
160
 
161
+ # @deprecated
162
+ #
161
163
  # Associates a V2 authorization rule with a card program, the provided account(s)
162
164
  # or card(s).
163
165
  #
@@ -3,6 +3,8 @@
3
3
  module Lithic
4
4
  module Resources
5
5
  class Transfers
6
+ # @deprecated
7
+ #
6
8
  # Some parameter documentations has been truncated, see
7
9
  # {Lithic::Models::TransferCreateParams} for more details.
8
10
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lithic
4
- VERSION = "0.1.0.pre.alpha.28"
4
+ VERSION = "0.1.0.pre.alpha.30"
5
5
  end
data/lib/lithic.rb CHANGED
@@ -20,7 +20,9 @@ require "uri"
20
20
 
21
21
  # We already ship the preferred sorbet manifests in the package itself.
22
22
  # `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
23
- if Object.const_defined?(:Tapioca) && caller.chain([$PROGRAM_NAME]).chain(ARGV).grep(/tapioca/)
23
+ if Object.const_defined?(:Tapioca) &&
24
+ caller.chain([$PROGRAM_NAME]).chain(ARGV).any?(/tapioca/) &&
25
+ ARGV.none?(/dsl/)
24
26
  return
25
27
  end
26
28
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lithic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.alpha.28
4
+ version: 0.1.0.pre.alpha.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lithic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-23 00:00:00.000000000 Z
11
+ date: 2025-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool