Skip to content

Commit e1e4181

Browse files
committed
Improve typing of Stripe::ApiResource#metadata
Per the docs, values are always strings (there is no nesting). I opted to not change the signature of `#metadata=` because you can technically pass in non-strings to the method and either the values will be stringified (e.g. `1` becomes `"1"`) or the keys ignored (e.g. a key with a `nil` value). https://docs.stripe.com/metadata
1 parent 005af41 commit e1e4181

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rbi/annotations/stripe.rbi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Stripe::APIResource < Stripe::StripeObject
1212

1313
# not all objects, at all times have metadata (deleted customers for instance)
1414
# @method_missing: from StripeObject
15-
sig { returns(T::Hash[T.any(String, Symbol), T.untyped]) }
15+
sig { returns(T::Hash[T.any(String, Symbol), String]) }
1616
def metadata; end
1717

1818
# @method_missing: from StripeObject

0 commit comments

Comments
 (0)