Skip to content

Commit 745a6cd

Browse files
feat(api): add tags field to Payment model
1 parent 28a4b65 commit 745a6cd

6 files changed

Lines changed: 40 additions & 3 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 213
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-42c58dcdae350a8544a75a19ad38aaeb70f3ed98dc642b4a7b47a4b92d8c9c91.yml
3-
openapi_spec_hash: c26c7c8fab1f49977c23bb698ec64e28
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-b42f0fb5ca219622c46728ac767a2a23ec6a8aecd2b32c92efa449fd69576a6d.yml
3+
openapi_spec_hash: b591dcd3405c0738c10b626852284a1b
44
config_hash: 126e04f676f61e5871a82889336dbf9d

lib/lithic/models/payment.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ class Payment < Lithic::Internal::Type::BaseModel
124124
# @return [String, nil]
125125
optional :external_bank_account_token, String, nil?: true
126126

127+
# @!attribute tags
128+
# Key-value pairs for tagging resources. Tags allow you to associate arbitrary
129+
# metadata with a resource for your own purposes.
130+
#
131+
# @return [Hash{Symbol=>String}, nil]
132+
optional :tags, Lithic::Internal::Type::HashOf[String]
133+
127134
# @!attribute type
128135
#
129136
# @return [Symbol, Lithic::Models::Payment::Type, nil]
@@ -135,7 +142,10 @@ class Payment < Lithic::Internal::Type::BaseModel
135142
# @return [String, nil]
136143
optional :user_defined_id, String, nil?: true
137144

138-
# @!method initialize(token:, category:, created:, descriptor:, direction:, events:, financial_account_token:, method_:, method_attributes:, pending_amount:, related_account_tokens:, result:, settled_amount:, source:, status:, updated:, currency: nil, expected_release_date: nil, external_bank_account_token: nil, type: nil, user_defined_id: nil, family: :PAYMENT)
145+
# @!method initialize(token:, category:, created:, descriptor:, direction:, events:, financial_account_token:, method_:, method_attributes:, pending_amount:, related_account_tokens:, result:, settled_amount:, source:, status:, updated:, currency: nil, expected_release_date: nil, external_bank_account_token: nil, tags: nil, type: nil, user_defined_id: nil, family: :PAYMENT)
146+
# Some parameter documentations has been truncated, see {Lithic::Models::Payment}
147+
# for more details.
148+
#
139149
# Payment transaction
140150
#
141151
# @param token [String] Unique identifier for the transaction
@@ -176,6 +186,8 @@ class Payment < Lithic::Internal::Type::BaseModel
176186
#
177187
# @param external_bank_account_token [String, nil] External bank account token
178188
#
189+
# @param tags [Hash{Symbol=>String}] Key-value pairs for tagging resources. Tags allow you to associate arbitrary met
190+
#
179191
# @param type [Symbol, Lithic::Models::Payment::Type]
180192
#
181193
# @param user_defined_id [String, nil] User-defined identifier

rbi/lithic/models/payment.rbi

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ module Lithic
9797
sig { returns(T.nilable(String)) }
9898
attr_accessor :external_bank_account_token
9999

100+
# Key-value pairs for tagging resources. Tags allow you to associate arbitrary
101+
# metadata with a resource for your own purposes.
102+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
103+
attr_reader :tags
104+
105+
sig { params(tags: T::Hash[Symbol, String]).void }
106+
attr_writer :tags
107+
100108
sig { returns(T.nilable(Lithic::Payment::Type::TaggedSymbol)) }
101109
attr_reader :type
102110

@@ -134,6 +142,7 @@ module Lithic
134142
currency: String,
135143
expected_release_date: T.nilable(Date),
136144
external_bank_account_token: T.nilable(String),
145+
tags: T::Hash[Symbol, String],
137146
type: Lithic::Payment::Type::OrSymbol,
138147
user_defined_id: T.nilable(String),
139148
family: Symbol
@@ -178,6 +187,9 @@ module Lithic
178187
expected_release_date: nil,
179188
# External bank account token
180189
external_bank_account_token: nil,
190+
# Key-value pairs for tagging resources. Tags allow you to associate arbitrary
191+
# metadata with a resource for your own purposes.
192+
tags: nil,
181193
type: nil,
182194
# User-defined identifier
183195
user_defined_id: nil,
@@ -210,6 +222,7 @@ module Lithic
210222
currency: String,
211223
expected_release_date: T.nilable(Date),
212224
external_bank_account_token: T.nilable(String),
225+
tags: T::Hash[Symbol, String],
213226
type: Lithic::Payment::Type::TaggedSymbol,
214227
user_defined_id: T.nilable(String)
215228
}

sig/lithic/models/payment.rbs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module Lithic
2222
currency: String,
2323
expected_release_date: Date?,
2424
external_bank_account_token: String?,
25+
tags: ::Hash[Symbol, String],
2526
type: Lithic::Models::Payment::type_,
2627
user_defined_id: String?
2728
}
@@ -69,6 +70,10 @@ module Lithic
6970

7071
attr_accessor external_bank_account_token: String?
7172

73+
attr_reader tags: ::Hash[Symbol, String]?
74+
75+
def tags=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
76+
7277
attr_reader type: Lithic::Models::Payment::type_?
7378

7479
def type=: (
@@ -97,6 +102,7 @@ module Lithic
97102
?currency: String,
98103
?expected_release_date: Date?,
99104
?external_bank_account_token: String?,
105+
?tags: ::Hash[Symbol, String],
100106
?type: Lithic::Models::Payment::type_,
101107
?user_defined_id: String?,
102108
?family: :PAYMENT
@@ -123,6 +129,7 @@ module Lithic
123129
currency: String,
124130
expected_release_date: Date?,
125131
external_bank_account_token: String?,
132+
tags: ::Hash[Symbol, String],
126133
type: Lithic::Models::Payment::type_,
127134
user_defined_id: String?
128135
}

test/lithic/resources/account_activity_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def test_list
8585
currency: String | nil,
8686
expected_release_date: Date | nil,
8787
external_bank_account_token: String | nil,
88+
tags: ^(Lithic::Internal::Type::HashOf[String]) | nil,
8889
type: Lithic::Payment::Type | nil,
8990
user_defined_id: String | nil
9091
}
@@ -215,6 +216,7 @@ def test_retrieve_transaction
215216
currency: String | nil,
216217
expected_release_date: Date | nil,
217218
external_bank_account_token: String | nil,
219+
tags: ^(Lithic::Internal::Type::HashOf[String]) | nil,
218220
type: Lithic::Payment::Type | nil,
219221
user_defined_id: String | nil
220222
}

test/lithic/resources/payments_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def test_retrieve
4848
currency: String | nil,
4949
expected_release_date: Date | nil,
5050
external_bank_account_token: String | nil,
51+
tags: ^(Lithic::Internal::Type::HashOf[String]) | nil,
5152
type: Lithic::Payment::Type | nil,
5253
user_defined_id: String | nil
5354
}
@@ -90,6 +91,7 @@ def test_list
9091
currency: String | nil,
9192
expected_release_date: Date | nil,
9293
external_bank_account_token: String | nil,
94+
tags: ^(Lithic::Internal::Type::HashOf[String]) | nil,
9395
type: Lithic::Payment::Type | nil,
9496
user_defined_id: String | nil
9597
}
@@ -138,6 +140,7 @@ def test_return__required_params
138140
currency: String | nil,
139141
expected_release_date: Date | nil,
140142
external_bank_account_token: String | nil,
143+
tags: ^(Lithic::Internal::Type::HashOf[String]) | nil,
141144
type: Lithic::Payment::Type | nil,
142145
user_defined_id: String | nil
143146
}

0 commit comments

Comments
 (0)