lithic 0.1.0.pre.alpha.42 → 0.1.0.pre.alpha.43

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: 940f61d0d1fe56281a1add2c889aef444bd2aef7152414d722892a8c5e13c571
4
- data.tar.gz: 543a9027684460fe71cc14b9e0c3b8d7ca52a30d52283eaa4f7ba6aceb7057ff
3
+ metadata.gz: 21e9addcee76f9bfe59787212940d0f8b8809897372fd70b2abd9ffc60726d75
4
+ data.tar.gz: 1c2101f6ad278cb7b4e50e2b4a0d260306eedfad43c23cf30c489fe1dd1a5490
5
5
  SHA512:
6
- metadata.gz: 94cefe2570966953c1c44279bb8a2ff6675ff074a0296497847cc7eae25daa02077af003438858783a6ad47d267130928000a894ed4d0275df5d2a7248a66755
7
- data.tar.gz: 4b8b80d6046adba49bbe5502a7fb660f1ce694b05fa4d25503649303e1a41317a2976d215f09f7e89153e97a6329d3bf04742909087205f00362015a948deb57
6
+ metadata.gz: 10238fe4062921326719e7b6a3d509c5c982e4f2a54bd5f682b82a2ea3ba64733a368c12d415e77b95a3b23e15d75ad76d48ca14551f669b7cccb80ac7fb23b0
7
+ data.tar.gz: 118a5b70a06ec13d8748bed261c13a5d85e727255336284bcc9b938af33f18c928db83c37ff130818dbc5a5b833edcd25acc882f36ee7d36d4f64f06d66e05d0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.43 (2025-09-11)
4
+
5
+ Full Changelog: [v0.1.0-alpha.42...v0.1.0-alpha.43](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.42...v0.1.0-alpha.43)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([bde90fd](https://github.com/lithic-com/lithic-ruby/commit/bde90fdad11812628ad656e2a32c40d06184cbaf))
10
+
3
11
  ## 0.1.0-alpha.42 (2025-09-09)
4
12
 
5
13
  Full Changelog: [v0.1.0-alpha.41...v0.1.0-alpha.42](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.41...v0.1.0-alpha.42)
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.42"
18
+ gem "lithic", "~> 0.1.0.pre.alpha.43"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::Transactions#simulate_credit_authorization_advice
6
+ class TransactionSimulateCreditAuthorizationAdviceParams < Lithic::Internal::Type::BaseModel
7
+ extend Lithic::Internal::Type::RequestParameters::Converter
8
+ include Lithic::Internal::Type::RequestParameters
9
+
10
+ # @!attribute amount
11
+ # Amount (in cents). Any value entered will be converted into a negative amount in
12
+ # the simulated transaction. For example, entering 100 in this field will appear
13
+ # as a -100 amount in the transaction.
14
+ #
15
+ # @return [Integer]
16
+ required :amount, Integer
17
+
18
+ # @!attribute descriptor
19
+ # Merchant descriptor.
20
+ #
21
+ # @return [String]
22
+ required :descriptor, String
23
+
24
+ # @!attribute pan
25
+ # Sixteen digit card number.
26
+ #
27
+ # @return [String]
28
+ required :pan, String
29
+
30
+ # @!attribute mcc
31
+ # Merchant category code for the transaction to be simulated. A four-digit number
32
+ # listed in ISO 18245. Supported merchant category codes can be found
33
+ # [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
34
+ #
35
+ # @return [String, nil]
36
+ optional :mcc, String
37
+
38
+ # @!attribute merchant_acceptor_id
39
+ # Unique identifier to identify the payment card acceptor.
40
+ #
41
+ # @return [String, nil]
42
+ optional :merchant_acceptor_id, String
43
+
44
+ # @!method initialize(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_id: nil, request_options: {})
45
+ # Some parameter documentations has been truncated, see
46
+ # {Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams} for more
47
+ # details.
48
+ #
49
+ # @param amount [Integer] Amount (in cents). Any value entered will be converted into a negative amount in
50
+ #
51
+ # @param descriptor [String] Merchant descriptor.
52
+ #
53
+ # @param pan [String] Sixteen digit card number.
54
+ #
55
+ # @param mcc [String] Merchant category code for the transaction to be simulated. A four-digit number
56
+ #
57
+ # @param merchant_acceptor_id [String] Unique identifier to identify the payment card acceptor.
58
+ #
59
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::Transactions#simulate_credit_authorization_advice
6
+ class TransactionSimulateCreditAuthorizationAdviceResponse < Lithic::Internal::Type::BaseModel
7
+ # @!attribute token
8
+ # A unique token to reference this transaction.
9
+ #
10
+ # @return [String, nil]
11
+ optional :token, String
12
+
13
+ # @!attribute debugging_request_id
14
+ # Debugging request ID to share with Lithic Support team.
15
+ #
16
+ # @return [String, nil]
17
+ optional :debugging_request_id, String
18
+
19
+ # @!method initialize(token: nil, debugging_request_id: nil)
20
+ # @param token [String] A unique token to reference this transaction.
21
+ #
22
+ # @param debugging_request_id [String] Debugging request ID to share with Lithic Support team.
23
+ end
24
+ end
25
+ end
data/lib/lithic/models.rb CHANGED
@@ -375,6 +375,9 @@ module Lithic
375
375
 
376
376
  TransactionSimulateClearingParams = Lithic::Models::TransactionSimulateClearingParams
377
377
 
378
+ TransactionSimulateCreditAuthorizationAdviceParams =
379
+ Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams
380
+
378
381
  TransactionSimulateCreditAuthorizationParams =
379
382
  Lithic::Models::TransactionSimulateCreditAuthorizationParams
380
383
 
@@ -204,6 +204,8 @@ module Lithic
204
204
  )
205
205
  end
206
206
 
207
+ # @deprecated use `simulate_credit_authorization_advice` instead
208
+ #
207
209
  # Some parameter documentations has been truncated, see
208
210
  # {Lithic::Models::TransactionSimulateCreditAuthorizationParams} for more details.
209
211
  #
@@ -238,6 +240,41 @@ module Lithic
238
240
  )
239
241
  end
240
242
 
243
+ # Some parameter documentations has been truncated, see
244
+ # {Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams} for more
245
+ # details.
246
+ #
247
+ # Simulates a credit authorization advice from the card network. This message
248
+ # indicates that the network approved a credit authorization on your behalf.
249
+ #
250
+ # @overload simulate_credit_authorization_advice(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_id: nil, request_options: {})
251
+ #
252
+ # @param amount [Integer] Amount (in cents). Any value entered will be converted into a negative amount in
253
+ #
254
+ # @param descriptor [String] Merchant descriptor.
255
+ #
256
+ # @param pan [String] Sixteen digit card number.
257
+ #
258
+ # @param mcc [String] Merchant category code for the transaction to be simulated. A four-digit number
259
+ #
260
+ # @param merchant_acceptor_id [String] Unique identifier to identify the payment card acceptor.
261
+ #
262
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
263
+ #
264
+ # @return [Lithic::Models::TransactionSimulateCreditAuthorizationAdviceResponse]
265
+ #
266
+ # @see Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams
267
+ def simulate_credit_authorization_advice(params)
268
+ parsed, options = Lithic::TransactionSimulateCreditAuthorizationAdviceParams.dump_request(params)
269
+ @client.request(
270
+ method: :post,
271
+ path: "v1/simulate/credit_authorization_advice",
272
+ body: parsed,
273
+ model: Lithic::Models::TransactionSimulateCreditAuthorizationAdviceResponse,
274
+ options: options
275
+ )
276
+ end
277
+
241
278
  # Returns, or refunds, an amount back to a card. Returns simulated via this
242
279
  # endpoint clear immediately, without prior authorization, and result in a
243
280
  # `SETTLED` transaction status.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lithic
4
- VERSION = "0.1.0.pre.alpha.42"
4
+ VERSION = "0.1.0.pre.alpha.43"
5
5
  end
data/lib/lithic.rb CHANGED
@@ -339,6 +339,8 @@ require_relative "lithic/models/transaction_simulate_authorization_params"
339
339
  require_relative "lithic/models/transaction_simulate_authorization_response"
340
340
  require_relative "lithic/models/transaction_simulate_clearing_params"
341
341
  require_relative "lithic/models/transaction_simulate_clearing_response"
342
+ require_relative "lithic/models/transaction_simulate_credit_authorization_advice_params"
343
+ require_relative "lithic/models/transaction_simulate_credit_authorization_advice_response"
342
344
  require_relative "lithic/models/transaction_simulate_credit_authorization_params"
343
345
  require_relative "lithic/models/transaction_simulate_credit_authorization_response"
344
346
  require_relative "lithic/models/transaction_simulate_return_params"
@@ -0,0 +1,92 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ class TransactionSimulateCreditAuthorizationAdviceParams < Lithic::Internal::Type::BaseModel
6
+ extend Lithic::Internal::Type::RequestParameters::Converter
7
+ include Lithic::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Lithic::TransactionSimulateCreditAuthorizationAdviceParams,
13
+ Lithic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Amount (in cents). Any value entered will be converted into a negative amount in
18
+ # the simulated transaction. For example, entering 100 in this field will appear
19
+ # as a -100 amount in the transaction.
20
+ sig { returns(Integer) }
21
+ attr_accessor :amount
22
+
23
+ # Merchant descriptor.
24
+ sig { returns(String) }
25
+ attr_accessor :descriptor
26
+
27
+ # Sixteen digit card number.
28
+ sig { returns(String) }
29
+ attr_accessor :pan
30
+
31
+ # Merchant category code for the transaction to be simulated. A four-digit number
32
+ # listed in ISO 18245. Supported merchant category codes can be found
33
+ # [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
34
+ sig { returns(T.nilable(String)) }
35
+ attr_reader :mcc
36
+
37
+ sig { params(mcc: String).void }
38
+ attr_writer :mcc
39
+
40
+ # Unique identifier to identify the payment card acceptor.
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :merchant_acceptor_id
43
+
44
+ sig { params(merchant_acceptor_id: String).void }
45
+ attr_writer :merchant_acceptor_id
46
+
47
+ sig do
48
+ params(
49
+ amount: Integer,
50
+ descriptor: String,
51
+ pan: String,
52
+ mcc: String,
53
+ merchant_acceptor_id: String,
54
+ request_options: Lithic::RequestOptions::OrHash
55
+ ).returns(T.attached_class)
56
+ end
57
+ def self.new(
58
+ # Amount (in cents). Any value entered will be converted into a negative amount in
59
+ # the simulated transaction. For example, entering 100 in this field will appear
60
+ # as a -100 amount in the transaction.
61
+ amount:,
62
+ # Merchant descriptor.
63
+ descriptor:,
64
+ # Sixteen digit card number.
65
+ pan:,
66
+ # Merchant category code for the transaction to be simulated. A four-digit number
67
+ # listed in ISO 18245. Supported merchant category codes can be found
68
+ # [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
69
+ mcc: nil,
70
+ # Unique identifier to identify the payment card acceptor.
71
+ merchant_acceptor_id: nil,
72
+ request_options: {}
73
+ )
74
+ end
75
+
76
+ sig do
77
+ override.returns(
78
+ {
79
+ amount: Integer,
80
+ descriptor: String,
81
+ pan: String,
82
+ mcc: String,
83
+ merchant_acceptor_id: String,
84
+ request_options: Lithic::RequestOptions
85
+ }
86
+ )
87
+ end
88
+ def to_hash
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,46 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ class TransactionSimulateCreditAuthorizationAdviceResponse < Lithic::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Lithic::Models::TransactionSimulateCreditAuthorizationAdviceResponse,
10
+ Lithic::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # A unique token to reference this transaction.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :token
17
+
18
+ sig { params(token: String).void }
19
+ attr_writer :token
20
+
21
+ # Debugging request ID to share with Lithic Support team.
22
+ sig { returns(T.nilable(String)) }
23
+ attr_reader :debugging_request_id
24
+
25
+ sig { params(debugging_request_id: String).void }
26
+ attr_writer :debugging_request_id
27
+
28
+ sig do
29
+ params(token: String, debugging_request_id: String).returns(
30
+ T.attached_class
31
+ )
32
+ end
33
+ def self.new(
34
+ # A unique token to reference this transaction.
35
+ token: nil,
36
+ # Debugging request ID to share with Lithic Support team.
37
+ debugging_request_id: nil
38
+ )
39
+ end
40
+
41
+ sig { override.returns({ token: String, debugging_request_id: String }) }
42
+ def to_hash
43
+ end
44
+ end
45
+ end
46
+ end
@@ -367,6 +367,9 @@ module Lithic
367
367
  TransactionSimulateClearingParams =
368
368
  Lithic::Models::TransactionSimulateClearingParams
369
369
 
370
+ TransactionSimulateCreditAuthorizationAdviceParams =
371
+ Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams
372
+
370
373
  TransactionSimulateCreditAuthorizationParams =
371
374
  Lithic::Models::TransactionSimulateCreditAuthorizationParams
372
375
 
@@ -241,6 +241,39 @@ module Lithic
241
241
  )
242
242
  end
243
243
 
244
+ # Simulates a credit authorization advice from the card network. This message
245
+ # indicates that the network approved a credit authorization on your behalf.
246
+ sig do
247
+ params(
248
+ amount: Integer,
249
+ descriptor: String,
250
+ pan: String,
251
+ mcc: String,
252
+ merchant_acceptor_id: String,
253
+ request_options: Lithic::RequestOptions::OrHash
254
+ ).returns(
255
+ Lithic::Models::TransactionSimulateCreditAuthorizationAdviceResponse
256
+ )
257
+ end
258
+ def simulate_credit_authorization_advice(
259
+ # Amount (in cents). Any value entered will be converted into a negative amount in
260
+ # the simulated transaction. For example, entering 100 in this field will appear
261
+ # as a -100 amount in the transaction.
262
+ amount:,
263
+ # Merchant descriptor.
264
+ descriptor:,
265
+ # Sixteen digit card number.
266
+ pan:,
267
+ # Merchant category code for the transaction to be simulated. A four-digit number
268
+ # listed in ISO 18245. Supported merchant category codes can be found
269
+ # [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
270
+ mcc: nil,
271
+ # Unique identifier to identify the payment card acceptor.
272
+ merchant_acceptor_id: nil,
273
+ request_options: {}
274
+ )
275
+ end
276
+
244
277
  # Returns, or refunds, an amount back to a card. Returns simulated via this
245
278
  # endpoint clear immediately, without prior authorization, and result in a
246
279
  # `SETTLED` transaction status.
@@ -0,0 +1,50 @@
1
+ module Lithic
2
+ module Models
3
+ type transaction_simulate_credit_authorization_advice_params =
4
+ {
5
+ amount: Integer,
6
+ descriptor: String,
7
+ pan: String,
8
+ mcc: String,
9
+ merchant_acceptor_id: String
10
+ }
11
+ & Lithic::Internal::Type::request_parameters
12
+
13
+ class TransactionSimulateCreditAuthorizationAdviceParams < Lithic::Internal::Type::BaseModel
14
+ extend Lithic::Internal::Type::RequestParameters::Converter
15
+ include Lithic::Internal::Type::RequestParameters
16
+
17
+ attr_accessor amount: Integer
18
+
19
+ attr_accessor descriptor: String
20
+
21
+ attr_accessor pan: String
22
+
23
+ attr_reader mcc: String?
24
+
25
+ def mcc=: (String) -> String
26
+
27
+ attr_reader merchant_acceptor_id: String?
28
+
29
+ def merchant_acceptor_id=: (String) -> String
30
+
31
+ def initialize: (
32
+ amount: Integer,
33
+ descriptor: String,
34
+ pan: String,
35
+ ?mcc: String,
36
+ ?merchant_acceptor_id: String,
37
+ ?request_options: Lithic::request_opts
38
+ ) -> void
39
+
40
+ def to_hash: -> {
41
+ amount: Integer,
42
+ descriptor: String,
43
+ pan: String,
44
+ mcc: String,
45
+ merchant_acceptor_id: String,
46
+ request_options: Lithic::RequestOptions
47
+ }
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,20 @@
1
+ module Lithic
2
+ module Models
3
+ type transaction_simulate_credit_authorization_advice_response =
4
+ { token: String, debugging_request_id: String }
5
+
6
+ class TransactionSimulateCreditAuthorizationAdviceResponse < Lithic::Internal::Type::BaseModel
7
+ attr_reader token: String?
8
+
9
+ def token=: (String) -> String
10
+
11
+ attr_reader debugging_request_id: String?
12
+
13
+ def debugging_request_id=: (String) -> String
14
+
15
+ def initialize: (?token: String, ?debugging_request_id: String) -> void
16
+
17
+ def to_hash: -> { token: String, debugging_request_id: String }
18
+ end
19
+ end
20
+ end
@@ -333,6 +333,8 @@ module Lithic
333
333
 
334
334
  class TransactionSimulateClearingParams = Lithic::Models::TransactionSimulateClearingParams
335
335
 
336
+ class TransactionSimulateCreditAuthorizationAdviceParams = Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams
337
+
336
338
  class TransactionSimulateCreditAuthorizationParams = Lithic::Models::TransactionSimulateCreditAuthorizationParams
337
339
 
338
340
  class TransactionSimulateReturnParams = Lithic::Models::TransactionSimulateReturnParams
@@ -63,6 +63,15 @@ module Lithic
63
63
  ?request_options: Lithic::request_opts
64
64
  ) -> Lithic::Models::TransactionSimulateCreditAuthorizationResponse
65
65
 
66
+ def simulate_credit_authorization_advice: (
67
+ amount: Integer,
68
+ descriptor: String,
69
+ pan: String,
70
+ ?mcc: String,
71
+ ?merchant_acceptor_id: String,
72
+ ?request_options: Lithic::request_opts
73
+ ) -> Lithic::Models::TransactionSimulateCreditAuthorizationAdviceResponse
74
+
66
75
  def simulate_return: (
67
76
  amount: Integer,
68
77
  descriptor: String,
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.42
4
+ version: 0.1.0.pre.alpha.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lithic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-09 00:00:00.000000000 Z
11
+ date: 2025-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -340,6 +340,8 @@ files:
340
340
  - lib/lithic/models/transaction_simulate_authorization_response.rb
341
341
  - lib/lithic/models/transaction_simulate_clearing_params.rb
342
342
  - lib/lithic/models/transaction_simulate_clearing_response.rb
343
+ - lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb
344
+ - lib/lithic/models/transaction_simulate_credit_authorization_advice_response.rb
343
345
  - lib/lithic/models/transaction_simulate_credit_authorization_params.rb
344
346
  - lib/lithic/models/transaction_simulate_credit_authorization_response.rb
345
347
  - lib/lithic/models/transaction_simulate_return_params.rb
@@ -716,6 +718,8 @@ files:
716
718
  - rbi/lithic/models/transaction_simulate_authorization_response.rbi
717
719
  - rbi/lithic/models/transaction_simulate_clearing_params.rbi
718
720
  - rbi/lithic/models/transaction_simulate_clearing_response.rbi
721
+ - rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi
722
+ - rbi/lithic/models/transaction_simulate_credit_authorization_advice_response.rbi
719
723
  - rbi/lithic/models/transaction_simulate_credit_authorization_params.rbi
720
724
  - rbi/lithic/models/transaction_simulate_credit_authorization_response.rbi
721
725
  - rbi/lithic/models/transaction_simulate_return_params.rbi
@@ -1091,6 +1095,8 @@ files:
1091
1095
  - sig/lithic/models/transaction_simulate_authorization_response.rbs
1092
1096
  - sig/lithic/models/transaction_simulate_clearing_params.rbs
1093
1097
  - sig/lithic/models/transaction_simulate_clearing_response.rbs
1098
+ - sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs
1099
+ - sig/lithic/models/transaction_simulate_credit_authorization_advice_response.rbs
1094
1100
  - sig/lithic/models/transaction_simulate_credit_authorization_params.rbs
1095
1101
  - sig/lithic/models/transaction_simulate_credit_authorization_response.rbs
1096
1102
  - sig/lithic/models/transaction_simulate_return_params.rbs