terminal-shop 3.8.8 → 3.8.10
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 +28 -0
- data/README.md +1 -1
- data/lib/terminal_shop/internal/transport/base_client.rb +2 -5
- data/lib/terminal_shop/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/terminal_shop/internal/type/array_of.rb +1 -0
- data/lib/terminal_shop/internal/type/base_model.rb +4 -9
- data/lib/terminal_shop/internal/type/converter.rb +27 -0
- data/lib/terminal_shop/internal/type/hash_of.rb +1 -0
- data/lib/terminal_shop/internal/type/union.rb +9 -7
- data/lib/terminal_shop/internal/util.rb +1 -1
- data/lib/terminal_shop/models/product.rb +9 -1
- data/lib/terminal_shop/models/product_variant.rb +1 -9
- data/lib/terminal_shop/version.rb +1 -1
- data/rbi/terminal_shop/errors.rbi +2 -2
- data/rbi/terminal_shop/internal/transport/base_client.rbi +1 -1
- data/rbi/terminal_shop/internal/type/converter.rbi +58 -0
- data/rbi/terminal_shop/internal/type/union.rbi +9 -2
- data/rbi/terminal_shop/models/product.rbi +14 -3
- data/rbi/terminal_shop/models/product_variant.rbi +0 -11
- data/sig/terminal_shop/internal/transport/base_client.rbs +1 -1
- data/sig/terminal_shop/internal/type/converter.rbs +17 -0
- data/sig/terminal_shop/internal/type/union.rbs +2 -2
- data/sig/terminal_shop/models/product.rbs +10 -3
- data/sig/terminal_shop/models/product_variant.rbs +0 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 735ea5c13eb9d20e691914ed8abc5c3d621d01c931f378aa683800ab7d24e688
|
4
|
+
data.tar.gz: 2b1d08ff276e9ff2ff6e2ae1038d32421bf29ec0151706edfa11a67f745b6cc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3418f0d40cb1cbc90a4a69642e913c5207059c596cc7b1ff9682ec048f375af51d727079c888558c3ddaaada8d90471f94bd4d19bf2285f729a51d0d2e3309fb
|
7
|
+
data.tar.gz: cf043f4d72df8b85f7c1ae530afbb80cf7f9bad4fa3612044fe9e90e7ab74bb3f4fb7a3fabcd314d4be20574c6e81dc02503ea1cabd3aa52f9043b952fd633f2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,33 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 3.8.10 (2025-08-20)
|
4
|
+
|
5
|
+
Full Changelog: [v3.8.9...v3.8.10](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.8.9...v3.8.10)
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
* bump sorbet version and fix new type errors from the breaking change ([b8a165c](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/b8a165c99dda340d95ee12680ad4a662dae84adb))
|
10
|
+
|
11
|
+
|
12
|
+
### Chores
|
13
|
+
|
14
|
+
* collect metadata from type DSL ([48d6bd6](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/48d6bd6aef75e097d4fac1e87680a56194a46849))
|
15
|
+
* **internal:** update comment in script ([29e8d0e](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/29e8d0ee82f862af88091ce124082f798a73d52f))
|
16
|
+
* update @stainless-api/prism-cli to v5.15.0 ([c859658](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/c85965842c1dd5e37ed2f37010a8dfa096f12147))
|
17
|
+
|
18
|
+
## 3.8.9 (2025-08-05)
|
19
|
+
|
20
|
+
Full Changelog: [v3.8.8...v3.8.9](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.8.8...v3.8.9)
|
21
|
+
|
22
|
+
### Features
|
23
|
+
|
24
|
+
* **api:** manual updates ([6f6a036](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/6f6a036504e2d3e45b1dee5eb419bd0a462a4e08))
|
25
|
+
|
26
|
+
|
27
|
+
### Chores
|
28
|
+
|
29
|
+
* **internal:** increase visibility of internal helper method ([bb446db](https://github.com/terminaldotshop/terminal-sdk-ruby/commit/bb446db6d6005b09cee51a48fab1490ca07b2ada))
|
30
|
+
|
3
31
|
## 3.8.8 (2025-07-29)
|
4
32
|
|
5
33
|
Full Changelog: [v3.8.7...v3.8.8](https://github.com/terminaldotshop/terminal-sdk-ruby/compare/v3.8.7...v3.8.8)
|
data/README.md
CHANGED
@@ -365,12 +365,9 @@ module TerminalShop
|
|
365
365
|
#
|
366
366
|
# @raise [TerminalShop::Errors::APIError]
|
367
367
|
# @return [Array(Integer, Net::HTTPResponse, Enumerable<String>)]
|
368
|
-
|
368
|
+
def send_request(request, redirect_count:, retry_count:, send_retry_header:)
|
369
369
|
url, headers, max_retries, timeout = request.fetch_values(:url, :headers, :max_retries, :timeout)
|
370
|
-
input = {
|
371
|
-
**request.except(:timeout),
|
372
|
-
deadline: TerminalShop::Internal::Util.monotonic_secs + timeout
|
373
|
-
}
|
370
|
+
input = {**request.except(:timeout), deadline: TerminalShop::Internal::Util.monotonic_secs + timeout}
|
374
371
|
|
375
372
|
if send_retry_header
|
376
373
|
headers["x-stainless-retry-count"] = retry_count.to_s
|
@@ -193,15 +193,7 @@ module TerminalShop
|
|
193
193
|
end
|
194
194
|
|
195
195
|
define_sorbet_constant!(:Request) do
|
196
|
-
T.type_alias
|
197
|
-
{
|
198
|
-
method: Symbol,
|
199
|
-
url: URI::Generic,
|
200
|
-
headers: T::Hash[String, String],
|
201
|
-
body: T.anything,
|
202
|
-
deadline: Float
|
203
|
-
}
|
204
|
-
end
|
196
|
+
T.type_alias { {method: Symbol, url: URI::Generic, headers: T::Hash[String, String], body: T.anything, deadline: Float} }
|
205
197
|
end
|
206
198
|
end
|
207
199
|
end
|
@@ -148,6 +148,7 @@ module TerminalShop
|
|
148
148
|
# @option spec [Boolean] :"nil?"
|
149
149
|
def initialize(type_info, spec = {})
|
150
150
|
@item_type_fn = TerminalShop::Internal::Type::Converter.type_info(type_info || spec)
|
151
|
+
@meta = TerminalShop::Internal::Type::Converter.meta_info(type_info, spec)
|
151
152
|
@nilable = spec.fetch(:nil?, false)
|
152
153
|
end
|
153
154
|
|
@@ -52,6 +52,7 @@ module TerminalShop
|
|
52
52
|
#
|
53
53
|
# @option spec [Boolean] :"nil?"
|
54
54
|
private def add_field(name_sym, required:, type_info:, spec:)
|
55
|
+
meta = TerminalShop::Internal::Type::Converter.meta_info(type_info, spec)
|
55
56
|
type_fn, info =
|
56
57
|
case type_info
|
57
58
|
in Proc | TerminalShop::Internal::Type::Converter | Class
|
@@ -63,14 +64,7 @@ module TerminalShop
|
|
63
64
|
setter = :"#{name_sym}="
|
64
65
|
api_name = info.fetch(:api_name, name_sym)
|
65
66
|
nilable = info.fetch(:nil?, false)
|
66
|
-
const =
|
67
|
-
info.fetch(
|
68
|
-
:const,
|
69
|
-
TerminalShop::Internal::OMIT
|
70
|
-
)
|
71
|
-
else
|
72
|
-
TerminalShop::Internal::OMIT
|
73
|
-
end
|
67
|
+
const = required && !nilable ? info.fetch(:const, TerminalShop::Internal::OMIT) : TerminalShop::Internal::OMIT
|
74
68
|
|
75
69
|
[name_sym, setter].each { undef_method(_1) } if known_fields.key?(name_sym)
|
76
70
|
|
@@ -81,7 +75,8 @@ module TerminalShop
|
|
81
75
|
required: required,
|
82
76
|
nilable: nilable,
|
83
77
|
const: const,
|
84
|
-
type_fn: type_fn
|
78
|
+
type_fn: type_fn,
|
79
|
+
meta: meta
|
85
80
|
}
|
86
81
|
|
87
82
|
define_method(setter) do |value|
|
@@ -98,6 +98,33 @@ module TerminalShop
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
+
# @api private
|
102
|
+
#
|
103
|
+
# @param type_info [Hash{Symbol=>Object}, Proc, TerminalShop::Internal::Type::Converter, Class] .
|
104
|
+
#
|
105
|
+
# @option type_info [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
|
106
|
+
#
|
107
|
+
# @option type_info [Proc] :enum
|
108
|
+
#
|
109
|
+
# @option type_info [Proc] :union
|
110
|
+
#
|
111
|
+
# @option type_info [Boolean] :"nil?"
|
112
|
+
#
|
113
|
+
# @param spec [Hash{Symbol=>Object}, Proc, TerminalShop::Internal::Type::Converter, Class] .
|
114
|
+
#
|
115
|
+
# @option spec [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
|
116
|
+
#
|
117
|
+
# @option spec [Proc] :enum
|
118
|
+
#
|
119
|
+
# @option spec [Proc] :union
|
120
|
+
#
|
121
|
+
# @option spec [Boolean] :"nil?"
|
122
|
+
#
|
123
|
+
# @return [Hash{Symbol=>Object}]
|
124
|
+
def meta_info(type_info, spec)
|
125
|
+
[spec, type_info].grep(Hash).first.to_h.except(:const, :enum, :union, :nil?)
|
126
|
+
end
|
127
|
+
|
101
128
|
# @api private
|
102
129
|
#
|
103
130
|
# @param translate_names [Boolean]
|
@@ -168,6 +168,7 @@ module TerminalShop
|
|
168
168
|
# @option spec [Boolean] :"nil?"
|
169
169
|
def initialize(type_info, spec = {})
|
170
170
|
@item_type_fn = TerminalShop::Internal::Type::Converter.type_info(type_info || spec)
|
171
|
+
@meta = TerminalShop::Internal::Type::Converter.meta_info(type_info, spec)
|
171
172
|
@nilable = spec.fetch(:nil?, false)
|
172
173
|
end
|
173
174
|
|
@@ -12,20 +12,20 @@ module TerminalShop
|
|
12
12
|
#
|
13
13
|
# All of the specified variant info for this union.
|
14
14
|
#
|
15
|
-
# @return [Array<Array(Symbol, Proc)>]
|
15
|
+
# @return [Array<Array(Symbol, Proc, Hash{Symbol=>Object})>]
|
16
16
|
private def known_variants = (@known_variants ||= [])
|
17
17
|
|
18
18
|
# @api private
|
19
19
|
#
|
20
|
-
# @return [Array<Array(Symbol, Object)>]
|
20
|
+
# @return [Array<Array(Symbol, Object, Hash{Symbol=>Object})>]
|
21
21
|
protected def derefed_variants
|
22
|
-
known_variants.map { |key, variant_fn| [key, variant_fn.call] }
|
22
|
+
known_variants.map { |key, variant_fn, meta| [key, variant_fn.call, meta] }
|
23
23
|
end
|
24
24
|
|
25
25
|
# All of the specified variants for this union.
|
26
26
|
#
|
27
27
|
# @return [Array<Object>]
|
28
|
-
def variants = derefed_variants.map
|
28
|
+
def variants = derefed_variants.map { _2 }
|
29
29
|
|
30
30
|
# @api private
|
31
31
|
#
|
@@ -51,12 +51,13 @@ module TerminalShop
|
|
51
51
|
#
|
52
52
|
# @option spec [Boolean] :"nil?"
|
53
53
|
private def variant(key, spec = nil)
|
54
|
+
meta = TerminalShop::Internal::Type::Converter.meta_info(nil, spec)
|
54
55
|
variant_info =
|
55
56
|
case key
|
56
57
|
in Symbol
|
57
|
-
[key, TerminalShop::Internal::Type::Converter.type_info(spec)]
|
58
|
+
[key, TerminalShop::Internal::Type::Converter.type_info(spec), meta]
|
58
59
|
in Proc | TerminalShop::Internal::Type::Converter | Class | Hash
|
59
|
-
[nil, TerminalShop::Internal::Type::Converter.type_info(key)]
|
60
|
+
[nil, TerminalShop::Internal::Type::Converter.type_info(key), meta]
|
60
61
|
end
|
61
62
|
|
62
63
|
known_variants << variant_info
|
@@ -79,7 +80,8 @@ module TerminalShop
|
|
79
80
|
return nil if key == TerminalShop::Internal::OMIT
|
80
81
|
|
81
82
|
key = key.to_sym if key.is_a?(String)
|
82
|
-
known_variants.find { |k,| k == key }
|
83
|
+
_, found = known_variants.find { |k,| k == key }
|
84
|
+
found&.call
|
83
85
|
else
|
84
86
|
nil
|
85
87
|
end
|
@@ -244,7 +244,7 @@ module TerminalShop
|
|
244
244
|
#
|
245
245
|
# @return [String]
|
246
246
|
def uri_origin(uri)
|
247
|
-
"#{uri.scheme}://#{uri.host}#{uri.port
|
247
|
+
"#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
|
248
248
|
end
|
249
249
|
|
250
250
|
# @api private
|
@@ -45,7 +45,13 @@ module TerminalShop
|
|
45
45
|
# @return [TerminalShop::Models::ProductAPI::Tags, nil]
|
46
46
|
optional :tags, -> { TerminalShop::ProductAPI::Tags }
|
47
47
|
|
48
|
-
# @!
|
48
|
+
# @!attribute time_hidden
|
49
|
+
# Timestamp when the product was hidden from public view.
|
50
|
+
#
|
51
|
+
# @return [String, nil]
|
52
|
+
optional :time_hidden, String, api_name: :timeHidden
|
53
|
+
|
54
|
+
# @!method initialize(id:, description:, name:, variants:, order: nil, subscription: nil, tags: nil, time_hidden: nil)
|
49
55
|
# Some parameter documentations has been truncated, see
|
50
56
|
# {TerminalShop::Models::ProductAPI} for more details.
|
51
57
|
#
|
@@ -64,6 +70,8 @@ module TerminalShop
|
|
64
70
|
# @param subscription [Symbol, TerminalShop::Models::ProductAPI::Subscription] Whether the product must be or can be subscribed to.
|
65
71
|
#
|
66
72
|
# @param tags [TerminalShop::Models::ProductAPI::Tags] Tags for the product.
|
73
|
+
#
|
74
|
+
# @param time_hidden [String] Timestamp when the product was hidden from public view.
|
67
75
|
|
68
76
|
# Whether the product must be or can be subscribed to.
|
69
77
|
#
|
@@ -21,19 +21,13 @@ module TerminalShop
|
|
21
21
|
# @return [Integer]
|
22
22
|
required :price, Integer
|
23
23
|
|
24
|
-
# @!attribute description
|
25
|
-
# Description of the product variant.
|
26
|
-
#
|
27
|
-
# @return [String, nil]
|
28
|
-
optional :description, String
|
29
|
-
|
30
24
|
# @!attribute tags
|
31
25
|
# Tags for the product variant.
|
32
26
|
#
|
33
27
|
# @return [TerminalShop::Models::ProductVariant::Tags, nil]
|
34
28
|
optional :tags, -> { TerminalShop::ProductVariant::Tags }
|
35
29
|
|
36
|
-
# @!method initialize(id:, name:, price:,
|
30
|
+
# @!method initialize(id:, name:, price:, tags: nil)
|
37
31
|
# Some parameter documentations has been truncated, see
|
38
32
|
# {TerminalShop::Models::ProductVariant} for more details.
|
39
33
|
#
|
@@ -45,8 +39,6 @@ module TerminalShop
|
|
45
39
|
#
|
46
40
|
# @param price [Integer] Price of the product variant in cents (USD).
|
47
41
|
#
|
48
|
-
# @param description [String] Description of the product variant.
|
49
|
-
#
|
50
42
|
# @param tags [TerminalShop::Models::ProductVariant::Tags] Tags for the product variant.
|
51
43
|
|
52
44
|
# @see TerminalShop::Models::ProductVariant#tags
|
@@ -59,10 +59,10 @@ module TerminalShop
|
|
59
59
|
end
|
60
60
|
|
61
61
|
class APIConnectionError < TerminalShop::Errors::APIError
|
62
|
-
sig {
|
62
|
+
sig { returns(NilClass) }
|
63
63
|
attr_accessor :status
|
64
64
|
|
65
|
-
sig {
|
65
|
+
sig { returns(NilClass) }
|
66
66
|
attr_accessor :body
|
67
67
|
|
68
68
|
# @api private
|
@@ -92,6 +92,64 @@ module TerminalShop
|
|
92
92
|
def self.type_info(spec)
|
93
93
|
end
|
94
94
|
|
95
|
+
# @api private
|
96
|
+
sig do
|
97
|
+
params(
|
98
|
+
type_info:
|
99
|
+
T.any(
|
100
|
+
{
|
101
|
+
const:
|
102
|
+
T.nilable(
|
103
|
+
T.any(NilClass, T::Boolean, Integer, Float, Symbol)
|
104
|
+
),
|
105
|
+
enum:
|
106
|
+
T.nilable(
|
107
|
+
T.proc.returns(
|
108
|
+
TerminalShop::Internal::Type::Converter::Input
|
109
|
+
)
|
110
|
+
),
|
111
|
+
union:
|
112
|
+
T.nilable(
|
113
|
+
T.proc.returns(
|
114
|
+
TerminalShop::Internal::Type::Converter::Input
|
115
|
+
)
|
116
|
+
)
|
117
|
+
},
|
118
|
+
T.proc.returns(
|
119
|
+
TerminalShop::Internal::Type::Converter::Input
|
120
|
+
),
|
121
|
+
TerminalShop::Internal::Type::Converter::Input
|
122
|
+
),
|
123
|
+
spec:
|
124
|
+
T.any(
|
125
|
+
{
|
126
|
+
const:
|
127
|
+
T.nilable(
|
128
|
+
T.any(NilClass, T::Boolean, Integer, Float, Symbol)
|
129
|
+
),
|
130
|
+
enum:
|
131
|
+
T.nilable(
|
132
|
+
T.proc.returns(
|
133
|
+
TerminalShop::Internal::Type::Converter::Input
|
134
|
+
)
|
135
|
+
),
|
136
|
+
union:
|
137
|
+
T.nilable(
|
138
|
+
T.proc.returns(
|
139
|
+
TerminalShop::Internal::Type::Converter::Input
|
140
|
+
)
|
141
|
+
)
|
142
|
+
},
|
143
|
+
T.proc.returns(
|
144
|
+
TerminalShop::Internal::Type::Converter::Input
|
145
|
+
),
|
146
|
+
TerminalShop::Internal::Type::Converter::Input
|
147
|
+
)
|
148
|
+
).returns(TerminalShop::Internal::AnyHash)
|
149
|
+
end
|
150
|
+
def self.meta_info(type_info, spec)
|
151
|
+
end
|
152
|
+
|
95
153
|
# @api private
|
96
154
|
sig do
|
97
155
|
params(translate_names: T::Boolean).returns(
|
@@ -16,7 +16,8 @@ module TerminalShop
|
|
16
16
|
T::Array[
|
17
17
|
[
|
18
18
|
T.nilable(Symbol),
|
19
|
-
T.proc.returns(TerminalShop::Internal::Type::Converter::Input)
|
19
|
+
T.proc.returns(TerminalShop::Internal::Type::Converter::Input),
|
20
|
+
TerminalShop::Internal::AnyHash
|
20
21
|
]
|
21
22
|
]
|
22
23
|
)
|
@@ -25,7 +26,13 @@ module TerminalShop
|
|
25
26
|
end
|
26
27
|
|
27
28
|
# @api private
|
28
|
-
sig
|
29
|
+
sig do
|
30
|
+
returns(
|
31
|
+
T::Array[
|
32
|
+
[T.nilable(Symbol), T.anything, TerminalShop::Internal::AnyHash]
|
33
|
+
]
|
34
|
+
)
|
35
|
+
end
|
29
36
|
protected def derefed_variants
|
30
37
|
end
|
31
38
|
|
@@ -51,6 +51,13 @@ module TerminalShop
|
|
51
51
|
sig { params(tags: TerminalShop::ProductAPI::Tags::OrHash).void }
|
52
52
|
attr_writer :tags
|
53
53
|
|
54
|
+
# Timestamp when the product was hidden from public view.
|
55
|
+
sig { returns(T.nilable(String)) }
|
56
|
+
attr_reader :time_hidden
|
57
|
+
|
58
|
+
sig { params(time_hidden: String).void }
|
59
|
+
attr_writer :time_hidden
|
60
|
+
|
54
61
|
# Product sold in the Terminal shop.
|
55
62
|
sig do
|
56
63
|
params(
|
@@ -60,7 +67,8 @@ module TerminalShop
|
|
60
67
|
variants: T::Array[TerminalShop::ProductVariant::OrHash],
|
61
68
|
order: Integer,
|
62
69
|
subscription: TerminalShop::ProductAPI::Subscription::OrSymbol,
|
63
|
-
tags: TerminalShop::ProductAPI::Tags::OrHash
|
70
|
+
tags: TerminalShop::ProductAPI::Tags::OrHash,
|
71
|
+
time_hidden: String
|
64
72
|
).returns(T.attached_class)
|
65
73
|
end
|
66
74
|
def self.new(
|
@@ -77,7 +85,9 @@ module TerminalShop
|
|
77
85
|
# Whether the product must be or can be subscribed to.
|
78
86
|
subscription: nil,
|
79
87
|
# Tags for the product.
|
80
|
-
tags: nil
|
88
|
+
tags: nil,
|
89
|
+
# Timestamp when the product was hidden from public view.
|
90
|
+
time_hidden: nil
|
81
91
|
)
|
82
92
|
end
|
83
93
|
|
@@ -90,7 +100,8 @@ module TerminalShop
|
|
90
100
|
variants: T::Array[TerminalShop::ProductVariant],
|
91
101
|
order: Integer,
|
92
102
|
subscription: TerminalShop::ProductAPI::Subscription::TaggedSymbol,
|
93
|
-
tags: TerminalShop::ProductAPI::Tags
|
103
|
+
tags: TerminalShop::ProductAPI::Tags,
|
104
|
+
time_hidden: String
|
94
105
|
}
|
95
106
|
)
|
96
107
|
end
|
@@ -20,13 +20,6 @@ module TerminalShop
|
|
20
20
|
sig { returns(Integer) }
|
21
21
|
attr_accessor :price
|
22
22
|
|
23
|
-
# Description of the product variant.
|
24
|
-
sig { returns(T.nilable(String)) }
|
25
|
-
attr_reader :description
|
26
|
-
|
27
|
-
sig { params(description: String).void }
|
28
|
-
attr_writer :description
|
29
|
-
|
30
23
|
# Tags for the product variant.
|
31
24
|
sig { returns(T.nilable(TerminalShop::ProductVariant::Tags)) }
|
32
25
|
attr_reader :tags
|
@@ -40,7 +33,6 @@ module TerminalShop
|
|
40
33
|
id: String,
|
41
34
|
name: String,
|
42
35
|
price: Integer,
|
43
|
-
description: String,
|
44
36
|
tags: TerminalShop::ProductVariant::Tags::OrHash
|
45
37
|
).returns(T.attached_class)
|
46
38
|
end
|
@@ -51,8 +43,6 @@ module TerminalShop
|
|
51
43
|
name:,
|
52
44
|
# Price of the product variant in cents (USD).
|
53
45
|
price:,
|
54
|
-
# Description of the product variant.
|
55
|
-
description: nil,
|
56
46
|
# Tags for the product variant.
|
57
47
|
tags: nil
|
58
48
|
)
|
@@ -64,7 +54,6 @@ module TerminalShop
|
|
64
54
|
id: String,
|
65
55
|
name: String,
|
66
56
|
price: Integer,
|
67
|
-
description: String,
|
68
57
|
tags: TerminalShop::ProductVariant::Tags
|
69
58
|
}
|
70
59
|
)
|
@@ -39,6 +39,23 @@ module TerminalShop
|
|
39
39
|
| TerminalShop::Internal::Type::Converter::input spec
|
40
40
|
) -> (^-> top)
|
41
41
|
|
42
|
+
def self.meta_info: (
|
43
|
+
{
|
44
|
+
const: (nil | bool | Integer | Float | Symbol)?,
|
45
|
+
enum: ^-> TerminalShop::Internal::Type::Converter::input?,
|
46
|
+
union: ^-> TerminalShop::Internal::Type::Converter::input?
|
47
|
+
}
|
48
|
+
| ^-> TerminalShop::Internal::Type::Converter::input
|
49
|
+
| TerminalShop::Internal::Type::Converter::input type_info,
|
50
|
+
{
|
51
|
+
const: (nil | bool | Integer | Float | Symbol)?,
|
52
|
+
enum: ^-> TerminalShop::Internal::Type::Converter::input?,
|
53
|
+
union: ^-> TerminalShop::Internal::Type::Converter::input?
|
54
|
+
}
|
55
|
+
| ^-> TerminalShop::Internal::Type::Converter::input
|
56
|
+
| TerminalShop::Internal::Type::Converter::input spec
|
57
|
+
) -> ::Hash[Symbol, top]
|
58
|
+
|
42
59
|
def self.new_coerce_state: (
|
43
60
|
?translate_names: bool
|
44
61
|
) -> TerminalShop::Internal::Type::Converter::coerce_state
|
@@ -5,9 +5,9 @@ module TerminalShop
|
|
5
5
|
include TerminalShop::Internal::Type::Converter
|
6
6
|
include TerminalShop::Internal::Util::SorbetRuntimeSupport
|
7
7
|
|
8
|
-
private def self.known_variants: -> ::Array[[Symbol?, (^-> TerminalShop::Internal::Type::Converter::input)]]
|
8
|
+
private def self.known_variants: -> ::Array[[Symbol?, (^-> TerminalShop::Internal::Type::Converter::input), ::Hash[Symbol, top]]]
|
9
9
|
|
10
|
-
def self.derefed_variants: -> ::Array[[Symbol?, top]]
|
10
|
+
def self.derefed_variants: -> ::Array[[Symbol?, top, ::Hash[Symbol, top]]]
|
11
11
|
|
12
12
|
def self.variants: -> ::Array[top]
|
13
13
|
|
@@ -8,7 +8,8 @@ module TerminalShop
|
|
8
8
|
variants: ::Array[TerminalShop::ProductVariant],
|
9
9
|
order: Integer,
|
10
10
|
subscription: TerminalShop::Models::ProductAPI::subscription,
|
11
|
-
tags: TerminalShop::ProductAPI::Tags
|
11
|
+
tags: TerminalShop::ProductAPI::Tags,
|
12
|
+
time_hidden: String
|
12
13
|
}
|
13
14
|
|
14
15
|
class ProductAPI < TerminalShop::Internal::Type::BaseModel
|
@@ -36,6 +37,10 @@ module TerminalShop
|
|
36
37
|
TerminalShop::ProductAPI::Tags
|
37
38
|
) -> TerminalShop::ProductAPI::Tags
|
38
39
|
|
40
|
+
attr_reader time_hidden: String?
|
41
|
+
|
42
|
+
def time_hidden=: (String) -> String
|
43
|
+
|
39
44
|
def initialize: (
|
40
45
|
id: String,
|
41
46
|
description: String,
|
@@ -43,7 +48,8 @@ module TerminalShop
|
|
43
48
|
variants: ::Array[TerminalShop::ProductVariant],
|
44
49
|
?order: Integer,
|
45
50
|
?subscription: TerminalShop::Models::ProductAPI::subscription,
|
46
|
-
?tags: TerminalShop::ProductAPI::Tags
|
51
|
+
?tags: TerminalShop::ProductAPI::Tags,
|
52
|
+
?time_hidden: String
|
47
53
|
) -> void
|
48
54
|
|
49
55
|
def to_hash: -> {
|
@@ -53,7 +59,8 @@ module TerminalShop
|
|
53
59
|
variants: ::Array[TerminalShop::ProductVariant],
|
54
60
|
order: Integer,
|
55
61
|
subscription: TerminalShop::Models::ProductAPI::subscription,
|
56
|
-
tags: TerminalShop::ProductAPI::Tags
|
62
|
+
tags: TerminalShop::ProductAPI::Tags,
|
63
|
+
time_hidden: String
|
57
64
|
}
|
58
65
|
|
59
66
|
type subscription = :allowed | :required
|
@@ -5,7 +5,6 @@ module TerminalShop
|
|
5
5
|
id: String,
|
6
6
|
name: String,
|
7
7
|
price: Integer,
|
8
|
-
description: String,
|
9
8
|
tags: TerminalShop::ProductVariant::Tags
|
10
9
|
}
|
11
10
|
|
@@ -16,10 +15,6 @@ module TerminalShop
|
|
16
15
|
|
17
16
|
attr_accessor price: Integer
|
18
17
|
|
19
|
-
attr_reader description: String?
|
20
|
-
|
21
|
-
def description=: (String) -> String
|
22
|
-
|
23
18
|
attr_reader tags: TerminalShop::ProductVariant::Tags?
|
24
19
|
|
25
20
|
def tags=: (
|
@@ -30,7 +25,6 @@ module TerminalShop
|
|
30
25
|
id: String,
|
31
26
|
name: String,
|
32
27
|
price: Integer,
|
33
|
-
?description: String,
|
34
28
|
?tags: TerminalShop::ProductVariant::Tags
|
35
29
|
) -> void
|
36
30
|
|
@@ -38,7 +32,6 @@ module TerminalShop
|
|
38
32
|
id: String,
|
39
33
|
name: String,
|
40
34
|
price: Integer,
|
41
|
-
description: String,
|
42
35
|
tags: TerminalShop::ProductVariant::Tags
|
43
36
|
}
|
44
37
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terminal-shop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Terminal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|