|
| 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 commit comments