From d93934aa75ab7bc1b15240f5727f41fc6a0ef110 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:57:45 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 8 +- lib/increase.rb | 20 + lib/increase/client.rb | 12 + lib/increase/models.rb | 30 + lib/increase/models/card_push_transfer.rb | 824 ++++++++++ .../card_push_transfer_approve_params.rb | 14 + .../card_push_transfer_cancel_params.rb | 14 + .../card_push_transfer_create_params.rb | 215 +++ .../models/card_push_transfer_list_params.rb | 159 ++ .../card_push_transfer_retrieve_params.rb | 14 + lib/increase/models/card_token.rb | 87 + .../models/card_token_capabilities.rb | 123 ++ .../models/card_token_capabilities_params.rb | 14 + lib/increase/models/card_token_list_params.rb | 83 + .../models/card_token_retrieve_params.rb | 14 + lib/increase/models/card_validation.rb | 759 +++++++++ .../models/card_validation_create_params.rb | 116 ++ .../models/card_validation_list_params.rb | 150 ++ .../models/card_validation_retrieve_params.rb | 14 + .../simulations/card_token_create_params.rb | 140 ++ lib/increase/resources/card_push_transfers.rb | 167 ++ lib/increase/resources/card_tokens.rb | 86 + lib/increase/resources/card_validations.rb | 117 ++ lib/increase/resources/simulations.rb | 4 + .../resources/simulations/card_tokens.rb | 46 + rbi/increase/client.rbi | 9 + rbi/increase/models.rbi | 32 + rbi/increase/models/card_push_transfer.rbi | 1450 +++++++++++++++++ .../card_push_transfer_approve_params.rbi | 30 + .../card_push_transfer_cancel_params.rbi | 30 + .../card_push_transfer_create_params.rbi | 325 ++++ .../models/card_push_transfer_list_params.rbi | 329 ++++ .../card_push_transfer_retrieve_params.rbi | 30 + rbi/increase/models/card_token.rbi | 108 ++ .../models/card_token_capabilities.rbi | 250 +++ .../models/card_token_capabilities_params.rbi | 30 + .../models/card_token_list_params.rbi | 146 ++ .../models/card_token_retrieve_params.rbi | 27 + rbi/increase/models/card_validation.rbi | 1438 ++++++++++++++++ .../models/card_validation_create_params.rbi | 155 ++ .../models/card_validation_list_params.rbi | 295 ++++ .../card_validation_retrieve_params.rbi | 30 + .../simulations/card_token_create_params.rbi | 297 ++++ .../resources/card_push_transfers.rbi | 157 ++ rbi/increase/resources/card_tokens.rbi | 62 + rbi/increase/resources/card_validations.rbi | 107 ++ rbi/increase/resources/simulations.rbi | 3 + .../resources/simulations/card_tokens.rbi | 43 + sig/increase/client.rbs | 6 + sig/increase/models.rbs | 30 + sig/increase/models/card_push_transfer.rbs | 679 ++++++++ .../card_push_transfer_approve_params.rbs | 15 + .../card_push_transfer_cancel_params.rbs | 15 + .../card_push_transfer_create_params.rbs | 172 ++ .../models/card_push_transfer_list_params.rbs | 163 ++ .../card_push_transfer_retrieve_params.rbs | 15 + sig/increase/models/card_token.rbs | 60 + .../models/card_token_capabilities.rbs | 104 ++ .../models/card_token_capabilities_params.rbs | 15 + .../models/card_token_list_params.rbs | 79 + .../models/card_token_retrieve_params.rbs | 15 + sig/increase/models/card_validation.rbs | 634 +++++++ .../models/card_validation_create_params.rbs | 91 ++ .../models/card_validation_list_params.rbs | 151 ++ .../card_validation_retrieve_params.rbs | 15 + .../simulations/card_token_create_params.rbs | 129 ++ .../resources/card_push_transfers.rbs | 53 + sig/increase/resources/card_tokens.rbs | 24 + sig/increase/resources/card_validations.rbs | 38 + sig/increase/resources/simulations.rbs | 2 + .../resources/simulations/card_tokens.rbs | 18 + .../resources/card_push_transfers_test.rb | 235 +++ test/increase/resources/card_tokens_test.rb | 67 + .../resources/card_validations_test.rb | 120 ++ .../resources/simulations/card_tokens_test.rb | 25 + 75 files changed, 11579 insertions(+), 4 deletions(-) create mode 100644 lib/increase/models/card_push_transfer.rb create mode 100644 lib/increase/models/card_push_transfer_approve_params.rb create mode 100644 lib/increase/models/card_push_transfer_cancel_params.rb create mode 100644 lib/increase/models/card_push_transfer_create_params.rb create mode 100644 lib/increase/models/card_push_transfer_list_params.rb create mode 100644 lib/increase/models/card_push_transfer_retrieve_params.rb create mode 100644 lib/increase/models/card_token.rb create mode 100644 lib/increase/models/card_token_capabilities.rb create mode 100644 lib/increase/models/card_token_capabilities_params.rb create mode 100644 lib/increase/models/card_token_list_params.rb create mode 100644 lib/increase/models/card_token_retrieve_params.rb create mode 100644 lib/increase/models/card_validation.rb create mode 100644 lib/increase/models/card_validation_create_params.rb create mode 100644 lib/increase/models/card_validation_list_params.rb create mode 100644 lib/increase/models/card_validation_retrieve_params.rb create mode 100644 lib/increase/models/simulations/card_token_create_params.rb create mode 100644 lib/increase/resources/card_push_transfers.rb create mode 100644 lib/increase/resources/card_tokens.rb create mode 100644 lib/increase/resources/card_validations.rb create mode 100644 lib/increase/resources/simulations/card_tokens.rb create mode 100644 rbi/increase/models/card_push_transfer.rbi create mode 100644 rbi/increase/models/card_push_transfer_approve_params.rbi create mode 100644 rbi/increase/models/card_push_transfer_cancel_params.rbi create mode 100644 rbi/increase/models/card_push_transfer_create_params.rbi create mode 100644 rbi/increase/models/card_push_transfer_list_params.rbi create mode 100644 rbi/increase/models/card_push_transfer_retrieve_params.rbi create mode 100644 rbi/increase/models/card_token.rbi create mode 100644 rbi/increase/models/card_token_capabilities.rbi create mode 100644 rbi/increase/models/card_token_capabilities_params.rbi create mode 100644 rbi/increase/models/card_token_list_params.rbi create mode 100644 rbi/increase/models/card_token_retrieve_params.rbi create mode 100644 rbi/increase/models/card_validation.rbi create mode 100644 rbi/increase/models/card_validation_create_params.rbi create mode 100644 rbi/increase/models/card_validation_list_params.rbi create mode 100644 rbi/increase/models/card_validation_retrieve_params.rbi create mode 100644 rbi/increase/models/simulations/card_token_create_params.rbi create mode 100644 rbi/increase/resources/card_push_transfers.rbi create mode 100644 rbi/increase/resources/card_tokens.rbi create mode 100644 rbi/increase/resources/card_validations.rbi create mode 100644 rbi/increase/resources/simulations/card_tokens.rbi create mode 100644 sig/increase/models/card_push_transfer.rbs create mode 100644 sig/increase/models/card_push_transfer_approve_params.rbs create mode 100644 sig/increase/models/card_push_transfer_cancel_params.rbs create mode 100644 sig/increase/models/card_push_transfer_create_params.rbs create mode 100644 sig/increase/models/card_push_transfer_list_params.rbs create mode 100644 sig/increase/models/card_push_transfer_retrieve_params.rbs create mode 100644 sig/increase/models/card_token.rbs create mode 100644 sig/increase/models/card_token_capabilities.rbs create mode 100644 sig/increase/models/card_token_capabilities_params.rbs create mode 100644 sig/increase/models/card_token_list_params.rbs create mode 100644 sig/increase/models/card_token_retrieve_params.rbs create mode 100644 sig/increase/models/card_validation.rbs create mode 100644 sig/increase/models/card_validation_create_params.rbs create mode 100644 sig/increase/models/card_validation_list_params.rbs create mode 100644 sig/increase/models/card_validation_retrieve_params.rbs create mode 100644 sig/increase/models/simulations/card_token_create_params.rbs create mode 100644 sig/increase/resources/card_push_transfers.rbs create mode 100644 sig/increase/resources/card_tokens.rbs create mode 100644 sig/increase/resources/card_validations.rbs create mode 100644 sig/increase/resources/simulations/card_tokens.rbs create mode 100644 test/increase/resources/card_push_transfers_test.rb create mode 100644 test/increase/resources/card_tokens_test.rb create mode 100644 test/increase/resources/card_validations_test.rb create mode 100644 test/increase/resources/simulations/card_tokens_test.rb diff --git a/.stats.yml b/.stats.yml index c3a436da3..72e9c5c32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-06c4af41ee358cc77681ee9eb3e3997fb985c94baa60639f3b21bba1a73dd990.yml -openapi_spec_hash: 636b35479a21d9be089b2d9b95646ba9 -config_hash: a185e9a72778cc4658ea73fb3a7f1354 +configured_endpoints: 214 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-931013cdbe08378a853b2fd05800091aba88acebe919ec5088d2dd25c0846331.yml +openapi_spec_hash: 6cfed987ca287da4d3e52ace77b0e417 +config_hash: b0b366d8c705ea0efe62093bae953e5a diff --git a/lib/increase.rb b/lib/increase.rb index d6736d888..9622c09f8 100644 --- a/lib/increase.rb +++ b/lib/increase.rb @@ -111,8 +111,23 @@ require_relative "increase/models/card_purchase_supplement" require_relative "increase/models/card_purchase_supplement_list_params" require_relative "increase/models/card_purchase_supplement_retrieve_params" +require_relative "increase/models/card_push_transfer" +require_relative "increase/models/card_push_transfer_approve_params" +require_relative "increase/models/card_push_transfer_cancel_params" +require_relative "increase/models/card_push_transfer_create_params" +require_relative "increase/models/card_push_transfer_list_params" +require_relative "increase/models/card_push_transfer_retrieve_params" require_relative "increase/models/card_retrieve_params" +require_relative "increase/models/card_token" +require_relative "increase/models/card_token_capabilities" +require_relative "increase/models/card_token_capabilities_params" +require_relative "increase/models/card_token_list_params" +require_relative "increase/models/card_token_retrieve_params" require_relative "increase/models/card_update_params" +require_relative "increase/models/card_validation" +require_relative "increase/models/card_validation_create_params" +require_relative "increase/models/card_validation_list_params" +require_relative "increase/models/card_validation_retrieve_params" require_relative "increase/models/check_deposit" require_relative "increase/models/check_deposit_create_params" require_relative "increase/models/check_deposit_list_params" @@ -272,6 +287,7 @@ require_relative "increase/models/simulations/card_refund_create_params" require_relative "increase/models/simulations/card_reversal_create_params" require_relative "increase/models/simulations/card_settlement_create_params" +require_relative "increase/models/simulations/card_token_create_params" require_relative "increase/models/simulations/check_deposit_reject_params" require_relative "increase/models/simulations/check_deposit_return_params" require_relative "increase/models/simulations/check_deposit_submit_params" @@ -323,7 +339,10 @@ require_relative "increase/resources/card_disputes" require_relative "increase/resources/card_payments" require_relative "increase/resources/card_purchase_supplements" +require_relative "increase/resources/card_push_transfers" require_relative "increase/resources/cards" +require_relative "increase/resources/card_tokens" +require_relative "increase/resources/card_validations" require_relative "increase/resources/check_deposits" require_relative "increase/resources/check_transfers" require_relative "increase/resources/declined_transactions" @@ -370,6 +389,7 @@ require_relative "increase/resources/simulations/card_refunds" require_relative "increase/resources/simulations/card_reversals" require_relative "increase/resources/simulations/card_settlements" +require_relative "increase/resources/simulations/card_tokens" require_relative "increase/resources/simulations/check_deposits" require_relative "increase/resources/simulations/check_transfers" require_relative "increase/resources/simulations/digital_wallet_token_requests" diff --git a/lib/increase/client.rb b/lib/increase/client.rb index cc09b5e63..745902297 100644 --- a/lib/increase/client.rb +++ b/lib/increase/client.rb @@ -176,6 +176,15 @@ class Client < Increase::Internal::Transport::BaseClient # @return [Increase::Resources::IntrafiExclusions] attr_reader :intrafi_exclusions + # @return [Increase::Resources::CardTokens] + attr_reader :card_tokens + + # @return [Increase::Resources::CardPushTransfers] + attr_reader :card_push_transfers + + # @return [Increase::Resources::CardValidations] + attr_reader :card_validations + # @return [Increase::Resources::Simulations] attr_reader :simulations @@ -293,6 +302,9 @@ def initialize( @intrafi_account_enrollments = Increase::Resources::IntrafiAccountEnrollments.new(client: self) @intrafi_balances = Increase::Resources::IntrafiBalances.new(client: self) @intrafi_exclusions = Increase::Resources::IntrafiExclusions.new(client: self) + @card_tokens = Increase::Resources::CardTokens.new(client: self) + @card_push_transfers = Increase::Resources::CardPushTransfers.new(client: self) + @card_validations = Increase::Resources::CardValidations.new(client: self) @simulations = Increase::Resources::Simulations.new(client: self) end end diff --git a/lib/increase/models.rb b/lib/increase/models.rb index e815d8299..2113313d4 100644 --- a/lib/increase/models.rb +++ b/lib/increase/models.rb @@ -159,10 +159,40 @@ module Increase CardPurchaseSupplementRetrieveParams = Increase::Models::CardPurchaseSupplementRetrieveParams + CardPushTransfer = Increase::Models::CardPushTransfer + + CardPushTransferApproveParams = Increase::Models::CardPushTransferApproveParams + + CardPushTransferCancelParams = Increase::Models::CardPushTransferCancelParams + + CardPushTransferCreateParams = Increase::Models::CardPushTransferCreateParams + + CardPushTransferListParams = Increase::Models::CardPushTransferListParams + + CardPushTransferRetrieveParams = Increase::Models::CardPushTransferRetrieveParams + CardRetrieveParams = Increase::Models::CardRetrieveParams + CardToken = Increase::Models::CardToken + + CardTokenCapabilities = Increase::Models::CardTokenCapabilities + + CardTokenCapabilitiesParams = Increase::Models::CardTokenCapabilitiesParams + + CardTokenListParams = Increase::Models::CardTokenListParams + + CardTokenRetrieveParams = Increase::Models::CardTokenRetrieveParams + CardUpdateParams = Increase::Models::CardUpdateParams + CardValidation = Increase::Models::CardValidation + + CardValidationCreateParams = Increase::Models::CardValidationCreateParams + + CardValidationListParams = Increase::Models::CardValidationListParams + + CardValidationRetrieveParams = Increase::Models::CardValidationRetrieveParams + CheckDeposit = Increase::Models::CheckDeposit CheckDepositCreateParams = Increase::Models::CheckDepositCreateParams diff --git a/lib/increase/models/card_push_transfer.rb b/lib/increase/models/card_push_transfer.rb new file mode 100644 index 000000000..b58fe994f --- /dev/null +++ b/lib/increase/models/card_push_transfer.rb @@ -0,0 +1,824 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardPushTransfers#create + class CardPushTransfer < Increase::Internal::Type::BaseModel + # @!attribute id + # The Card Push Transfer's identifier. + # + # @return [String] + required :id, String + + # @!attribute acceptance + # If the transfer is accepted by the recipient bank, this will contain + # supplemental details. + # + # @return [Increase::Models::CardPushTransfer::Acceptance, nil] + required :acceptance, -> { Increase::CardPushTransfer::Acceptance }, nil?: true + + # @!attribute account_id + # The Account from which the transfer was sent. + # + # @return [String] + required :account_id, String + + # @!attribute amount + # The transfer amount in USD cents. + # + # @return [Integer] + required :amount, Integer + + # @!attribute approval + # If your account requires approvals for transfers and the transfer was approved, + # this will contain details of the approval. + # + # @return [Increase::Models::CardPushTransfer::Approval, nil] + required :approval, -> { Increase::CardPushTransfer::Approval }, nil?: true + + # @!attribute business_application_identifier + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + # + # @return [Symbol, Increase::Models::CardPushTransfer::BusinessApplicationIdentifier] + required :business_application_identifier, + enum: -> { Increase::CardPushTransfer::BusinessApplicationIdentifier } + + # @!attribute cancellation + # If your account requires approvals for transfers and the transfer was not + # approved, this will contain details of the cancellation. + # + # @return [Increase::Models::CardPushTransfer::Cancellation, nil] + required :cancellation, -> { Increase::CardPushTransfer::Cancellation }, nil?: true + + # @!attribute created_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute created_by + # What object created the transfer, either via the API or the dashboard. + # + # @return [Increase::Models::CardPushTransfer::CreatedBy, nil] + required :created_by, -> { Increase::CardPushTransfer::CreatedBy }, nil?: true + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's + # currency. + # + # @return [Symbol, Increase::Models::CardPushTransfer::Currency] + required :currency, enum: -> { Increase::CardPushTransfer::Currency } + + # @!attribute decline + # If the transfer is rejected by the card network or the destination financial + # institution, this will contain supplemental details. + # + # @return [Increase::Models::CardPushTransfer::Decline, nil] + required :decline, -> { Increase::CardPushTransfer::Decline }, nil?: true + + # @!attribute idempotency_key + # The idempotency key you chose for this object. This value is unique across + # Increase and is used to ensure that a request is only processed once. Learn more + # about [idempotency](https://increase.com/documentation/idempotency-keys). + # + # @return [String, nil] + required :idempotency_key, String, nil?: true + + # @!attribute merchant_category_code + # The merchant category code (MCC) of the merchant (generally your business) + # sending the transfer. This is a four-digit code that describes the type of + # business or service provided by the merchant. Your program must be approved for + # the specified MCC in order to use it. + # + # @return [String] + required :merchant_category_code, String + + # @!attribute merchant_city_name + # The city name of the merchant (generally your business) sending the transfer. + # + # @return [String] + required :merchant_city_name, String + + # @!attribute merchant_name + # The merchant name shows up as the statement descriptor for the transfer. This is + # typically the name of your business or organization. + # + # @return [String] + required :merchant_name, String + + # @!attribute merchant_name_prefix + # For certain Business Application Identifiers, the statement descriptor is + # `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + # four character prefix that identifies the merchant. + # + # @return [String] + required :merchant_name_prefix, String + + # @!attribute merchant_postal_code + # The postal code of the merchant (generally your business) sending the transfer. + # + # @return [String] + required :merchant_postal_code, String + + # @!attribute merchant_state + # The state of the merchant (generally your business) sending the transfer. + # + # @return [String] + required :merchant_state, String + + # @!attribute recipient_name + # The name of the funds recipient. + # + # @return [String] + required :recipient_name, String + + # @!attribute sender_address_city + # The city of the sender. + # + # @return [String] + required :sender_address_city, String + + # @!attribute sender_address_line1 + # The address line 1 of the sender. + # + # @return [String] + required :sender_address_line1, String + + # @!attribute sender_address_postal_code + # The postal code of the sender. + # + # @return [String] + required :sender_address_postal_code, String + + # @!attribute sender_address_state + # The state of the sender. + # + # @return [String] + required :sender_address_state, String + + # @!attribute sender_name + # The name of the funds originator. + # + # @return [String] + required :sender_name, String + + # @!attribute source_account_number_id + # The Account Number the recipient will see as having sent the transfer. + # + # @return [String] + required :source_account_number_id, String + + # @!attribute status + # The lifecycle status of the transfer. + # + # @return [Symbol, Increase::Models::CardPushTransfer::Status] + required :status, enum: -> { Increase::CardPushTransfer::Status } + + # @!attribute submission + # After the transfer is submitted to the card network, this will contain + # supplemental details. + # + # @return [Increase::Models::CardPushTransfer::Submission, nil] + required :submission, -> { Increase::CardPushTransfer::Submission }, nil?: true + + # @!attribute type + # A constant representing the object's type. For this resource it will always be + # `card_push_transfer`. + # + # @return [Symbol, Increase::Models::CardPushTransfer::Type] + required :type, enum: -> { Increase::CardPushTransfer::Type } + + # @!method initialize(id:, acceptance:, account_id:, amount:, approval:, business_application_identifier:, cancellation:, created_at:, created_by:, currency:, decline:, idempotency_key:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_name_prefix:, merchant_postal_code:, merchant_state:, recipient_name:, sender_address_city:, sender_address_line1:, sender_address_postal_code:, sender_address_state:, sender_name:, source_account_number_id:, status:, submission:, type:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransfer} for more details. + # + # Card Push Transfers send funds to a recipient's payment card in real-time. + # + # @param id [String] The Card Push Transfer's identifier. + # + # @param acceptance [Increase::Models::CardPushTransfer::Acceptance, nil] If the transfer is accepted by the recipient bank, this will contain supplementa + # + # @param account_id [String] The Account from which the transfer was sent. + # + # @param amount [Integer] The transfer amount in USD cents. + # + # @param approval [Increase::Models::CardPushTransfer::Approval, nil] If your account requires approvals for transfers and the transfer was approved, + # + # @param business_application_identifier [Symbol, Increase::Models::CardPushTransfer::BusinessApplicationIdentifier] The Business Application Identifier describes the type of transaction being perf + # + # @param cancellation [Increase::Models::CardPushTransfer::Cancellation, nil] If your account requires approvals for transfers and the transfer was not approv + # + # @param created_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param created_by [Increase::Models::CardPushTransfer::CreatedBy, nil] What object created the transfer, either via the API or the dashboard. + # + # @param currency [Symbol, Increase::Models::CardPushTransfer::Currency] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's c + # + # @param decline [Increase::Models::CardPushTransfer::Decline, nil] If the transfer is rejected by the card network or the destination financial ins + # + # @param idempotency_key [String, nil] The idempotency key you chose for this object. This value is unique across Incre + # + # @param merchant_category_code [String] The merchant category code (MCC) of the merchant (generally your business) sendi + # + # @param merchant_city_name [String] The city name of the merchant (generally your business) sending the transfer. + # + # @param merchant_name [String] The merchant name shows up as the statement descriptor for the transfer. This is + # + # @param merchant_name_prefix [String] For certain Business Application Identifiers, the statement descriptor is `merch + # + # @param merchant_postal_code [String] The postal code of the merchant (generally your business) sending the transfer. + # + # @param merchant_state [String] The state of the merchant (generally your business) sending the transfer. + # + # @param recipient_name [String] The name of the funds recipient. + # + # @param sender_address_city [String] The city of the sender. + # + # @param sender_address_line1 [String] The address line 1 of the sender. + # + # @param sender_address_postal_code [String] The postal code of the sender. + # + # @param sender_address_state [String] The state of the sender. + # + # @param sender_name [String] The name of the funds originator. + # + # @param source_account_number_id [String] The Account Number the recipient will see as having sent the transfer. + # + # @param status [Symbol, Increase::Models::CardPushTransfer::Status] The lifecycle status of the transfer. + # + # @param submission [Increase::Models::CardPushTransfer::Submission, nil] After the transfer is submitted to the card network, this will contain supplemen + # + # @param type [Symbol, Increase::Models::CardPushTransfer::Type] A constant representing the object's type. For this resource it will always be ` + + # @see Increase::Models::CardPushTransfer#acceptance + class Acceptance < Increase::Internal::Type::BaseModel + # @!attribute accepted_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was accepted by the issuing bank. + # + # @return [Time] + required :accepted_at, Time + + # @!attribute authorization_identification_response + # The authorization identification response from the issuing bank. + # + # @return [String] + required :authorization_identification_response, String + + # @!attribute card_verification_value2_result + # The result of the Card Verification Value 2 match. + # + # @return [Symbol, Increase::Models::CardPushTransfer::Acceptance::CardVerificationValue2Result, nil] + required :card_verification_value2_result, + enum: -> { Increase::CardPushTransfer::Acceptance::CardVerificationValue2Result }, + nil?: true + + # @!attribute network_transaction_identifier + # A unique identifier for the transaction on the card network. + # + # @return [String, nil] + required :network_transaction_identifier, String, nil?: true + + # @!method initialize(accepted_at:, authorization_identification_response:, card_verification_value2_result:, network_transaction_identifier:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransfer::Acceptance} for more details. + # + # If the transfer is accepted by the recipient bank, this will contain + # supplemental details. + # + # @param accepted_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param authorization_identification_response [String] The authorization identification response from the issuing bank. + # + # @param card_verification_value2_result [Symbol, Increase::Models::CardPushTransfer::Acceptance::CardVerificationValue2Result, nil] The result of the Card Verification Value 2 match. + # + # @param network_transaction_identifier [String, nil] A unique identifier for the transaction on the card network. + + # The result of the Card Verification Value 2 match. + # + # @see Increase::Models::CardPushTransfer::Acceptance#card_verification_value2_result + module CardVerificationValue2Result + extend Increase::Internal::Type::Enum + + # The Card Verification Value 2 (CVV2) matches the expected value. + MATCH = :match + + # The Card Verification Value 2 (CVV2) does not match the expected value. + NO_MATCH = :no_match + + # @!method self.values + # @return [Array] + end + end + + # @see Increase::Models::CardPushTransfer#approval + class Approval < Increase::Internal::Type::BaseModel + # @!attribute approved_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was approved. + # + # @return [Time] + required :approved_at, Time + + # @!attribute approved_by + # If the Transfer was approved by a user in the dashboard, the email address of + # that user. + # + # @return [String, nil] + required :approved_by, String, nil?: true + + # @!method initialize(approved_at:, approved_by:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransfer::Approval} for more details. + # + # If your account requires approvals for transfers and the transfer was approved, + # this will contain details of the approval. + # + # @param approved_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param approved_by [String, nil] If the Transfer was approved by a user in the dashboard, the email address of th + end + + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + # + # @see Increase::Models::CardPushTransfer#business_application_identifier + module BusinessApplicationIdentifier + extend Increase::Internal::Type::Enum + + # Account to Account + ACCOUNT_TO_ACCOUNT = :account_to_account + + # Business to Business + BUSINESS_TO_BUSINESS = :business_to_business + + # Money Transfer Bank Initiated + MONEY_TRANSFER_BANK_INITIATED = :money_transfer_bank_initiated + + # Non-Card Bill Payment + NON_CARD_BILL_PAYMENT = :non_card_bill_payment + + # Consumer Bill Payment + CONSUMER_BILL_PAYMENT = :consumer_bill_payment + + # Card Bill Payment + CARD_BILL_PAYMENT = :card_bill_payment + + # Funds Disbursement + FUNDS_DISBURSEMENT = :funds_disbursement + + # Funds Transfer + FUNDS_TRANSFER = :funds_transfer + + # Loyalty and Offers + LOYALTY_AND_OFFERS = :loyalty_and_offers + + # Merchant Disbursement + MERCHANT_DISBURSEMENT = :merchant_disbursement + + # Merchant Payment + MERCHANT_PAYMENT = :merchant_payment + + # Person to Person + PERSON_TO_PERSON = :person_to_person + + # Top Up + TOP_UP = :top_up + + # Wallet Transfer + WALLET_TRANSFER = :wallet_transfer + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::CardPushTransfer#cancellation + class Cancellation < Increase::Internal::Type::BaseModel + # @!attribute canceled_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the Transfer was canceled. + # + # @return [Time] + required :canceled_at, Time + + # @!attribute canceled_by + # If the Transfer was canceled by a user in the dashboard, the email address of + # that user. + # + # @return [String, nil] + required :canceled_by, String, nil?: true + + # @!method initialize(canceled_at:, canceled_by:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransfer::Cancellation} for more details. + # + # If your account requires approvals for transfers and the transfer was not + # approved, this will contain details of the cancellation. + # + # @param canceled_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param canceled_by [String, nil] If the Transfer was canceled by a user in the dashboard, the email address of th + end + + # @see Increase::Models::CardPushTransfer#created_by + class CreatedBy < Increase::Internal::Type::BaseModel + # @!attribute api_key + # If present, details about the API key that created the transfer. + # + # @return [Increase::Models::CardPushTransfer::CreatedBy::APIKey, nil] + required :api_key, -> { Increase::CardPushTransfer::CreatedBy::APIKey }, nil?: true + + # @!attribute category + # The type of object that created this transfer. + # + # @return [Symbol, Increase::Models::CardPushTransfer::CreatedBy::Category] + required :category, enum: -> { Increase::CardPushTransfer::CreatedBy::Category } + + # @!attribute oauth_application + # If present, details about the OAuth Application that created the transfer. + # + # @return [Increase::Models::CardPushTransfer::CreatedBy::OAuthApplication, nil] + required :oauth_application, + -> { + Increase::CardPushTransfer::CreatedBy::OAuthApplication + }, + nil?: true + + # @!attribute user + # If present, details about the User that created the transfer. + # + # @return [Increase::Models::CardPushTransfer::CreatedBy::User, nil] + required :user, -> { Increase::CardPushTransfer::CreatedBy::User }, nil?: true + + # @!method initialize(api_key:, category:, oauth_application:, user:) + # What object created the transfer, either via the API or the dashboard. + # + # @param api_key [Increase::Models::CardPushTransfer::CreatedBy::APIKey, nil] If present, details about the API key that created the transfer. + # + # @param category [Symbol, Increase::Models::CardPushTransfer::CreatedBy::Category] The type of object that created this transfer. + # + # @param oauth_application [Increase::Models::CardPushTransfer::CreatedBy::OAuthApplication, nil] If present, details about the OAuth Application that created the transfer. + # + # @param user [Increase::Models::CardPushTransfer::CreatedBy::User, nil] If present, details about the User that created the transfer. + + # @see Increase::Models::CardPushTransfer::CreatedBy#api_key + class APIKey < Increase::Internal::Type::BaseModel + # @!attribute description + # The description set for the API key when it was created. + # + # @return [String, nil] + required :description, String, nil?: true + + # @!method initialize(description:) + # If present, details about the API key that created the transfer. + # + # @param description [String, nil] The description set for the API key when it was created. + end + + # The type of object that created this transfer. + # + # @see Increase::Models::CardPushTransfer::CreatedBy#category + module Category + extend Increase::Internal::Type::Enum + + # An API key. Details will be under the `api_key` object. + API_KEY = :api_key + + # An OAuth application you connected to Increase. Details will be under the `oauth_application` object. + OAUTH_APPLICATION = :oauth_application + + # A User in the Increase dashboard. Details will be under the `user` object. + USER = :user + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::CardPushTransfer::CreatedBy#oauth_application + class OAuthApplication < Increase::Internal::Type::BaseModel + # @!attribute name + # The name of the OAuth Application. + # + # @return [String] + required :name, String + + # @!method initialize(name:) + # If present, details about the OAuth Application that created the transfer. + # + # @param name [String] The name of the OAuth Application. + end + + # @see Increase::Models::CardPushTransfer::CreatedBy#user + class User < Increase::Internal::Type::BaseModel + # @!attribute email + # The email address of the User. + # + # @return [String] + required :email, String + + # @!method initialize(email:) + # If present, details about the User that created the transfer. + # + # @param email [String] The email address of the User. + end + end + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's + # currency. + # + # @see Increase::Models::CardPushTransfer#currency + module Currency + extend Increase::Internal::Type::Enum + + # Canadian Dollar (CAD) + CAD = :CAD + + # Swiss Franc (CHF) + CHF = :CHF + + # Euro (EUR) + EUR = :EUR + + # British Pound (GBP) + GBP = :GBP + + # Japanese Yen (JPY) + JPY = :JPY + + # US Dollar (USD) + USD = :USD + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::CardPushTransfer#decline + class Decline < Increase::Internal::Type::BaseModel + # @!attribute declined_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer declined. + # + # @return [Time] + required :declined_at, Time + + # @!attribute network_transaction_identifier + # A unique identifier for the transaction on the card network. + # + # @return [String, nil] + required :network_transaction_identifier, String, nil?: true + + # @!attribute reason + # The reason why the transfer was declined. + # + # @return [Symbol, Increase::Models::CardPushTransfer::Decline::Reason] + required :reason, enum: -> { Increase::CardPushTransfer::Decline::Reason } + + # @!method initialize(declined_at:, network_transaction_identifier:, reason:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransfer::Decline} for more details. + # + # If the transfer is rejected by the card network or the destination financial + # institution, this will contain supplemental details. + # + # @param declined_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param network_transaction_identifier [String, nil] A unique identifier for the transaction on the card network. + # + # @param reason [Symbol, Increase::Models::CardPushTransfer::Decline::Reason] The reason why the transfer was declined. + + # The reason why the transfer was declined. + # + # @see Increase::Models::CardPushTransfer::Decline#reason + module Reason + extend Increase::Internal::Type::Enum + + # The card issuer has declined the transaction without providing a specific reason. + DO_NOT_HONOR = :do_not_honor + + # The number of transactions for the card has exceeded the limit set by the issuer. + ACTIVITY_COUNT_LIMIT_EXCEEDED = :activity_count_limit_exceeded + + # The card issuer requires the cardholder to contact them for further information regarding the transaction. + REFER_TO_CARD_ISSUER = :refer_to_card_issuer + + # The card issuer requires the cardholder to contact them due to a special condition related to the transaction. + REFER_TO_CARD_ISSUER_SPECIAL_CONDITION = :refer_to_card_issuer_special_condition + + # The merchant is not valid for this transaction. + INVALID_MERCHANT = :invalid_merchant + + # The card should be retained by the terminal. + PICK_UP_CARD = :pick_up_card + + # An error occurred during processing of the transaction. + ERROR = :error + + # The card should be retained by the terminal due to a special condition. + PICK_UP_CARD_SPECIAL = :pick_up_card_special + + # The transaction is invalid and cannot be processed. + INVALID_TRANSACTION = :invalid_transaction + + # The amount of the transaction is invalid. + INVALID_AMOUNT = :invalid_amount + + # The account number provided is invalid. + INVALID_ACCOUNT_NUMBER = :invalid_account_number + + # The issuer of the card could not be found. + NO_SUCH_ISSUER = :no_such_issuer + + # The transaction should be re-entered for processing. + RE_ENTER_TRANSACTION = :re_enter_transaction + + # There is no credit account associated with the card. + NO_CREDIT_ACCOUNT = :no_credit_account + + # The card should be retained by the terminal because it has been reported lost. + PICK_UP_CARD_LOST = :pick_up_card_lost + + # The card should be retained by the terminal because it has been reported stolen. + PICK_UP_CARD_STOLEN = :pick_up_card_stolen + + # The account associated with the card has been closed. + CLOSED_ACCOUNT = :closed_account + + # There are insufficient funds in the account to complete the transaction. + INSUFFICIENT_FUNDS = :insufficient_funds + + # There is no checking account associated with the card. + NO_CHECKING_ACCOUNT = :no_checking_account + + # There is no savings account associated with the card. + NO_SAVINGS_ACCOUNT = :no_savings_account + + # The card has expired and cannot be used for transactions. + EXPIRED_CARD = :expired_card + + # The transaction is not permitted for this cardholder. + TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER = :transaction_not_permitted_to_cardholder + + # The transaction is not allowed at this terminal. + TRANSACTION_NOT_ALLOWED_AT_TERMINAL = :transaction_not_allowed_at_terminal + + # The transaction has been flagged as suspected fraud and cannot be processed. + SUSPECTED_FRAUD = :suspected_fraud + + # The amount of activity on the card has exceeded the limit set by the issuer. + ACTIVITY_AMOUNT_LIMIT_EXCEEDED = :activity_amount_limit_exceeded + + # The card has restrictions that prevent it from being used for this transaction. + RESTRICTED_CARD = :restricted_card + + # A security violation has occurred, preventing the transaction from being processed. + SECURITY_VIOLATION = :security_violation + + # The transaction does not meet the anti-money laundering requirements set by the issuer. + TRANSACTION_DOES_NOT_FULFILL_ANTI_MONEY_LAUNDERING_REQUIREMENT = + :transaction_does_not_fulfill_anti_money_laundering_requirement + + # The first use of the card has been blocked by the issuer. + BLOCKED_FIRST_USE = :blocked_first_use + + # The credit issuer is currently unavailable to process the transaction. + CREDIT_ISSUER_UNAVAILABLE = :credit_issuer_unavailable + + # The card verification value (CVV) results were negative, indicating a potential issue with the card. + NEGATIVE_CARD_VERIFICATION_VALUE_RESULTS = :negative_card_verification_value_results + + # The issuer of the card is currently unavailable to process the transaction. + ISSUER_UNAVAILABLE = :issuer_unavailable + + # The financial institution associated with the card could not be found. + FINANCIAL_INSTITUTION_CANNOT_BE_FOUND = :financial_institution_cannot_be_found + + # The transaction cannot be completed due to an unspecified reason. + TRANSACTION_CANNOT_BE_COMPLETED = :transaction_cannot_be_completed + + # The transaction is a duplicate of a previous transaction and cannot be processed again. + DUPLICATE_TRANSACTION = :duplicate_transaction + + # A system malfunction occurred, preventing the transaction from being processed. + SYSTEM_MALFUNCTION = :system_malfunction + + # Additional customer authentication is required to complete the transaction. + ADDITIONAL_CUSTOMER_AUTHENTICATION_REQUIRED = :additional_customer_authentication_required + + # The surcharge amount applied to the transaction is not permitted by the issuer. + SURCHARGE_AMOUNT_NOT_PERMITTED = :surcharge_amount_not_permitted + + # The transaction was declined due to a failure in verifying the CVV2 code. + DECLINE_FOR_CVV2_FAILURE = :decline_for_cvv2_failure + + # A stop payment order has been placed on this transaction. + STOP_PAYMENT_ORDER = :stop_payment_order + + # An order has been placed to revoke authorization for this transaction. + REVOCATION_OF_AUTHORIZATION_ORDER = :revocation_of_authorization_order + + # An order has been placed to revoke all authorizations for this cardholder. + REVOCATION_OF_ALL_AUTHORIZATIONS_ORDER = :revocation_of_all_authorizations_order + + # @!method self.values + # @return [Array] + end + end + + # The lifecycle status of the transfer. + # + # @see Increase::Models::CardPushTransfer#status + module Status + extend Increase::Internal::Type::Enum + + # The transfer is pending approval. + PENDING_APPROVAL = :pending_approval + + # The transfer has been canceled. + CANCELED = :canceled + + # The transfer is pending review by Increase. + PENDING_REVIEWING = :pending_reviewing + + # The transfer requires attention from an Increase operator. + REQUIRES_ATTENTION = :requires_attention + + # The transfer is queued to be submitted to the card network. + PENDING_SUBMISSION = :pending_submission + + # The transfer has been submitted and is pending a response from the card network. + SUBMITTED = :submitted + + # The transfer has been sent successfully and is complete. + COMPLETE = :complete + + # The transfer was declined by the network or the recipient's bank. + DECLINED = :declined + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::CardPushTransfer#submission + class Submission < Increase::Internal::Type::BaseModel + # @!attribute retrieval_reference_number + # A 12-digit retrieval reference number that identifies the transfer. Usually a + # combination of a timestamp and the trace number. + # + # @return [String] + required :retrieval_reference_number, String + + # @!attribute sender_reference + # A unique reference for the transfer. + # + # @return [String] + required :sender_reference, String + + # @!attribute submitted_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was submitted to card network. + # + # @return [Time] + required :submitted_at, Time + + # @!attribute trace_number + # A 6-digit trace number that identifies the transfer within a small window of + # time. + # + # @return [String] + required :trace_number, String + + # @!method initialize(retrieval_reference_number:, sender_reference:, submitted_at:, trace_number:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransfer::Submission} for more details. + # + # After the transfer is submitted to the card network, this will contain + # supplemental details. + # + # @param retrieval_reference_number [String] A 12-digit retrieval reference number that identifies the transfer. Usually a co + # + # @param sender_reference [String] A unique reference for the transfer. + # + # @param submitted_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param trace_number [String] A 6-digit trace number that identifies the transfer within a small window of tim + end + + # A constant representing the object's type. For this resource it will always be + # `card_push_transfer`. + # + # @see Increase::Models::CardPushTransfer#type + module Type + extend Increase::Internal::Type::Enum + + CARD_PUSH_TRANSFER = :card_push_transfer + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/increase/models/card_push_transfer_approve_params.rb b/lib/increase/models/card_push_transfer_approve_params.rb new file mode 100644 index 000000000..c888065fa --- /dev/null +++ b/lib/increase/models/card_push_transfer_approve_params.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardPushTransfers#approve + class CardPushTransferApproveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!method initialize(request_options: {}) + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/increase/models/card_push_transfer_cancel_params.rb b/lib/increase/models/card_push_transfer_cancel_params.rb new file mode 100644 index 000000000..db1e8afb0 --- /dev/null +++ b/lib/increase/models/card_push_transfer_cancel_params.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardPushTransfers#cancel + class CardPushTransferCancelParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!method initialize(request_options: {}) + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/increase/models/card_push_transfer_create_params.rb b/lib/increase/models/card_push_transfer_create_params.rb new file mode 100644 index 000000000..c38f06826 --- /dev/null +++ b/lib/increase/models/card_push_transfer_create_params.rb @@ -0,0 +1,215 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardPushTransfers#create + class CardPushTransferCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!attribute amount + # The transfer amount in USD cents. For Card Push transfers, must be positive. + # + # @return [Integer] + required :amount, Integer + + # @!attribute business_application_identifier + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + # + # @return [Symbol, Increase::Models::CardPushTransferCreateParams::BusinessApplicationIdentifier] + required :business_application_identifier, + enum: -> { Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier } + + # @!attribute card_token_id + # The Increase identifier for the Card Token that represents the card number + # you're pushing funds to. + # + # @return [String] + required :card_token_id, String + + # @!attribute merchant_category_code + # The merchant category code (MCC) of the merchant (generally your business) + # sending the transfer. This is a four-digit code that describes the type of + # business or service provided by the merchant. Your program must be approved for + # the specified MCC in order to use it. + # + # @return [String] + required :merchant_category_code, String + + # @!attribute merchant_city_name + # The city name of the merchant (generally your business) sending the transfer. + # + # @return [String] + required :merchant_city_name, String + + # @!attribute merchant_name + # The merchant name shows up as the statement descriptor for the transfer. This is + # typically the name of your business or organization. + # + # @return [String] + required :merchant_name, String + + # @!attribute merchant_name_prefix + # For certain Business Application Identifiers, the statement descriptor is + # `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + # four character prefix that identifies the merchant. + # + # @return [String] + required :merchant_name_prefix, String + + # @!attribute merchant_postal_code + # The postal code of the merchant (generally your business) sending the transfer. + # + # @return [String] + required :merchant_postal_code, String + + # @!attribute merchant_state + # The state of the merchant (generally your business) sending the transfer. + # + # @return [String] + required :merchant_state, String + + # @!attribute recipient_name + # The name of the funds recipient. + # + # @return [String] + required :recipient_name, String + + # @!attribute sender_address_city + # The city of the sender. + # + # @return [String] + required :sender_address_city, String + + # @!attribute sender_address_line1 + # The address line 1 of the sender. + # + # @return [String] + required :sender_address_line1, String + + # @!attribute sender_address_postal_code + # The postal code of the sender. + # + # @return [String] + required :sender_address_postal_code, String + + # @!attribute sender_address_state + # The state of the sender. + # + # @return [String] + required :sender_address_state, String + + # @!attribute sender_name + # The name of the funds originator. + # + # @return [String] + required :sender_name, String + + # @!attribute source_account_number_id + # The identifier of the Account Number from which to send the transfer. + # + # @return [String] + required :source_account_number_id, String + + # @!attribute require_approval + # Whether the transfer requires explicit approval via the dashboard or API. + # + # @return [Boolean, nil] + optional :require_approval, Increase::Internal::Type::Boolean + + # @!method initialize(amount:, business_application_identifier:, card_token_id:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_name_prefix:, merchant_postal_code:, merchant_state:, recipient_name:, sender_address_city:, sender_address_line1:, sender_address_postal_code:, sender_address_state:, sender_name:, source_account_number_id:, require_approval: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransferCreateParams} for more details. + # + # @param amount [Integer] The transfer amount in USD cents. For Card Push transfers, must be positive. + # + # @param business_application_identifier [Symbol, Increase::Models::CardPushTransferCreateParams::BusinessApplicationIdentifier] The Business Application Identifier describes the type of transaction being perf + # + # @param card_token_id [String] The Increase identifier for the Card Token that represents the card number you'r + # + # @param merchant_category_code [String] The merchant category code (MCC) of the merchant (generally your business) sendi + # + # @param merchant_city_name [String] The city name of the merchant (generally your business) sending the transfer. + # + # @param merchant_name [String] The merchant name shows up as the statement descriptor for the transfer. This is + # + # @param merchant_name_prefix [String] For certain Business Application Identifiers, the statement descriptor is `merch + # + # @param merchant_postal_code [String] The postal code of the merchant (generally your business) sending the transfer. + # + # @param merchant_state [String] The state of the merchant (generally your business) sending the transfer. + # + # @param recipient_name [String] The name of the funds recipient. + # + # @param sender_address_city [String] The city of the sender. + # + # @param sender_address_line1 [String] The address line 1 of the sender. + # + # @param sender_address_postal_code [String] The postal code of the sender. + # + # @param sender_address_state [String] The state of the sender. + # + # @param sender_name [String] The name of the funds originator. + # + # @param source_account_number_id [String] The identifier of the Account Number from which to send the transfer. + # + # @param require_approval [Boolean] Whether the transfer requires explicit approval via the dashboard or API. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + module BusinessApplicationIdentifier + extend Increase::Internal::Type::Enum + + # Account to Account + ACCOUNT_TO_ACCOUNT = :account_to_account + + # Business to Business + BUSINESS_TO_BUSINESS = :business_to_business + + # Money Transfer Bank Initiated + MONEY_TRANSFER_BANK_INITIATED = :money_transfer_bank_initiated + + # Non-Card Bill Payment + NON_CARD_BILL_PAYMENT = :non_card_bill_payment + + # Consumer Bill Payment + CONSUMER_BILL_PAYMENT = :consumer_bill_payment + + # Card Bill Payment + CARD_BILL_PAYMENT = :card_bill_payment + + # Funds Disbursement + FUNDS_DISBURSEMENT = :funds_disbursement + + # Funds Transfer + FUNDS_TRANSFER = :funds_transfer + + # Loyalty and Offers + LOYALTY_AND_OFFERS = :loyalty_and_offers + + # Merchant Disbursement + MERCHANT_DISBURSEMENT = :merchant_disbursement + + # Merchant Payment + MERCHANT_PAYMENT = :merchant_payment + + # Person to Person + PERSON_TO_PERSON = :person_to_person + + # Top Up + TOP_UP = :top_up + + # Wallet Transfer + WALLET_TRANSFER = :wallet_transfer + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/increase/models/card_push_transfer_list_params.rb b/lib/increase/models/card_push_transfer_list_params.rb new file mode 100644 index 000000000..ab618b4ed --- /dev/null +++ b/lib/increase/models/card_push_transfer_list_params.rb @@ -0,0 +1,159 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardPushTransfers#list + class CardPushTransferListParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!attribute account_id + # Filter Card Push Transfers to ones belonging to the specified Account. + # + # @return [String, nil] + optional :account_id, String + + # @!attribute created_at + # + # @return [Increase::Models::CardPushTransferListParams::CreatedAt, nil] + optional :created_at, -> { Increase::CardPushTransferListParams::CreatedAt } + + # @!attribute cursor + # Return the page of entries after this one. + # + # @return [String, nil] + optional :cursor, String + + # @!attribute idempotency_key + # Filter records to the one with the specified `idempotency_key` you chose for + # that object. This value is unique across Increase and is used to ensure that a + # request is only processed once. Learn more about + # [idempotency](https://increase.com/documentation/idempotency-keys). + # + # @return [String, nil] + optional :idempotency_key, String + + # @!attribute limit + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + # + # @return [Integer, nil] + optional :limit, Integer + + # @!attribute status + # + # @return [Increase::Models::CardPushTransferListParams::Status, nil] + optional :status, -> { Increase::CardPushTransferListParams::Status } + + # @!method initialize(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransferListParams} for more details. + # + # @param account_id [String] Filter Card Push Transfers to ones belonging to the specified Account. + # + # @param created_at [Increase::Models::CardPushTransferListParams::CreatedAt] + # + # @param cursor [String] Return the page of entries after this one. + # + # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha + # + # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob + # + # @param status [Increase::Models::CardPushTransferListParams::Status] + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + + class CreatedAt < Increase::Internal::Type::BaseModel + # @!attribute after + # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + # + # @return [Time, nil] + optional :after, Time + + # @!attribute before + # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + # + # @return [Time, nil] + optional :before, Time + + # @!attribute on_or_after + # Return results on or after this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + # + # @return [Time, nil] + optional :on_or_after, Time + + # @!attribute on_or_before + # Return results on or before this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + # + # @return [Time, nil] + optional :on_or_before, Time + + # @!method initialize(after: nil, before: nil, on_or_after: nil, on_or_before: nil) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransferListParams::CreatedAt} for more details. + # + # @param after [Time] Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) tim + # + # @param before [Time] Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) ti + # + # @param on_or_after [Time] Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_860 + # + # @param on_or_before [Time] Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_86 + end + + class Status < Increase::Internal::Type::BaseModel + # @!attribute in_ + # Filter Card Push Transfers by status. For GET requests, this should be encoded + # as a comma-delimited string, such as `?in=one,two,three`. + # + # @return [Array, nil] + optional :in_, + -> { + Increase::Internal::Type::ArrayOf[enum: Increase::CardPushTransferListParams::Status::In] + }, + api_name: :in + + # @!method initialize(in_: nil) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransferListParams::Status} for more details. + # + # @param in_ [Array] Filter Card Push Transfers by status. For GET requests, this should be encoded a + + module In + extend Increase::Internal::Type::Enum + + # The transfer is pending approval. + PENDING_APPROVAL = :pending_approval + + # The transfer has been canceled. + CANCELED = :canceled + + # The transfer is pending review by Increase. + PENDING_REVIEWING = :pending_reviewing + + # The transfer requires attention from an Increase operator. + REQUIRES_ATTENTION = :requires_attention + + # The transfer is queued to be submitted to the card network. + PENDING_SUBMISSION = :pending_submission + + # The transfer has been submitted and is pending a response from the card network. + SUBMITTED = :submitted + + # The transfer has been sent successfully and is complete. + COMPLETE = :complete + + # The transfer was declined by the network or the recipient's bank. + DECLINED = :declined + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/increase/models/card_push_transfer_retrieve_params.rb b/lib/increase/models/card_push_transfer_retrieve_params.rb new file mode 100644 index 000000000..366c75553 --- /dev/null +++ b/lib/increase/models/card_push_transfer_retrieve_params.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardPushTransfers#retrieve + class CardPushTransferRetrieveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!method initialize(request_options: {}) + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/increase/models/card_token.rb b/lib/increase/models/card_token.rb new file mode 100644 index 000000000..9fe5c9824 --- /dev/null +++ b/lib/increase/models/card_token.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardTokens#retrieve + class CardToken < Increase::Internal::Type::BaseModel + # @!attribute id + # The Card Token's identifier. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the card token was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute expiration_date + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the card + # expires. + # + # @return [Date] + required :expiration_date, Date + + # @!attribute last4 + # The last 4 digits of the card number. + # + # @return [String] + required :last4, String + + # @!attribute length + # The length of the card number. + # + # @return [Integer] + required :length, Integer + + # @!attribute prefix + # The prefix of the card number, usually 8 digits. + # + # @return [String] + required :prefix, String + + # @!attribute type + # A constant representing the object's type. For this resource it will always be + # `card_token`. + # + # @return [Symbol, Increase::Models::CardToken::Type] + required :type, enum: -> { Increase::CardToken::Type } + + # @!method initialize(id:, created_at:, expiration_date:, last4:, length:, prefix:, type:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardToken} for more details. + # + # Card Tokens represent a tokenized card number that can be used for Card Push + # Transfers and Card Validations. + # + # @param id [String] The Card Token's identifier. + # + # @param created_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param expiration_date [Date] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the card expire + # + # @param last4 [String] The last 4 digits of the card number. + # + # @param length [Integer] The length of the card number. + # + # @param prefix [String] The prefix of the card number, usually 8 digits. + # + # @param type [Symbol, Increase::Models::CardToken::Type] A constant representing the object's type. For this resource it will always be ` + + # A constant representing the object's type. For this resource it will always be + # `card_token`. + # + # @see Increase::Models::CardToken#type + module Type + extend Increase::Internal::Type::Enum + + CARD_TOKEN = :card_token + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/increase/models/card_token_capabilities.rb b/lib/increase/models/card_token_capabilities.rb new file mode 100644 index 000000000..94f336afe --- /dev/null +++ b/lib/increase/models/card_token_capabilities.rb @@ -0,0 +1,123 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardTokens#capabilities + class CardTokenCapabilities < Increase::Internal::Type::BaseModel + # @!attribute routes + # Each route represent a path e.g., a push transfer can take. + # + # @return [Array] + required :routes, -> { Increase::Internal::Type::ArrayOf[Increase::CardTokenCapabilities::Route] } + + # @!attribute type + # A constant representing the object's type. For this resource it will always be + # `card_token_capabilities`. + # + # @return [Symbol, Increase::Models::CardTokenCapabilities::Type] + required :type, enum: -> { Increase::CardTokenCapabilities::Type } + + # @!method initialize(routes:, type:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardTokenCapabilities} for more details. + # + # The capabilities of a Card Token describe whether the card can be used for + # specific operations, such as Card Push Transfers. The capabilities can change + # over time based on the issuing bank's configuration of the card range. + # + # @param routes [Array] Each route represent a path e.g., a push transfer can take. + # + # @param type [Symbol, Increase::Models::CardTokenCapabilities::Type] A constant representing the object's type. For this resource it will always be ` + + class Route < Increase::Internal::Type::BaseModel + # @!attribute cross_border_push_transfers + # Whether you can push funds to the card using cross-border Card Push Transfers. + # + # @return [Symbol, Increase::Models::CardTokenCapabilities::Route::CrossBorderPushTransfers] + required :cross_border_push_transfers, + enum: -> { Increase::CardTokenCapabilities::Route::CrossBorderPushTransfers } + + # @!attribute domestic_push_transfers + # Whether you can push funds to the card using domestic Card Push Transfers. + # + # @return [Symbol, Increase::Models::CardTokenCapabilities::Route::DomesticPushTransfers] + required :domestic_push_transfers, + enum: -> { Increase::CardTokenCapabilities::Route::DomesticPushTransfers } + + # @!attribute route + # The card network route the capabilities apply to. + # + # @return [Symbol, Increase::Models::CardTokenCapabilities::Route::Route] + required :route, enum: -> { Increase::CardTokenCapabilities::Route::Route } + + # @!method initialize(cross_border_push_transfers:, domestic_push_transfers:, route:) + # @param cross_border_push_transfers [Symbol, Increase::Models::CardTokenCapabilities::Route::CrossBorderPushTransfers] Whether you can push funds to the card using cross-border Card Push Transfers. + # + # @param domestic_push_transfers [Symbol, Increase::Models::CardTokenCapabilities::Route::DomesticPushTransfers] Whether you can push funds to the card using domestic Card Push Transfers. + # + # @param route [Symbol, Increase::Models::CardTokenCapabilities::Route::Route] The card network route the capabilities apply to. + + # Whether you can push funds to the card using cross-border Card Push Transfers. + # + # @see Increase::Models::CardTokenCapabilities::Route#cross_border_push_transfers + module CrossBorderPushTransfers + extend Increase::Internal::Type::Enum + + # The capability is supported. + SUPPORTED = :supported + + # The capability is not supported. + NOT_SUPPORTED = :not_supported + + # @!method self.values + # @return [Array] + end + + # Whether you can push funds to the card using domestic Card Push Transfers. + # + # @see Increase::Models::CardTokenCapabilities::Route#domestic_push_transfers + module DomesticPushTransfers + extend Increase::Internal::Type::Enum + + # The capability is supported. + SUPPORTED = :supported + + # The capability is not supported. + NOT_SUPPORTED = :not_supported + + # @!method self.values + # @return [Array] + end + + # The card network route the capabilities apply to. + # + # @see Increase::Models::CardTokenCapabilities::Route#route + module Route + extend Increase::Internal::Type::Enum + + # Visa and Interlink + VISA = :visa + + # Mastercard and Maestro + MASTERCARD = :mastercard + + # @!method self.values + # @return [Array] + end + end + + # A constant representing the object's type. For this resource it will always be + # `card_token_capabilities`. + # + # @see Increase::Models::CardTokenCapabilities#type + module Type + extend Increase::Internal::Type::Enum + + CARD_TOKEN_CAPABILITIES = :card_token_capabilities + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/increase/models/card_token_capabilities_params.rb b/lib/increase/models/card_token_capabilities_params.rb new file mode 100644 index 000000000..cf6c5d7aa --- /dev/null +++ b/lib/increase/models/card_token_capabilities_params.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardTokens#capabilities + class CardTokenCapabilitiesParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!method initialize(request_options: {}) + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/increase/models/card_token_list_params.rb b/lib/increase/models/card_token_list_params.rb new file mode 100644 index 000000000..4d5fef57e --- /dev/null +++ b/lib/increase/models/card_token_list_params.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardTokens#list + class CardTokenListParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!attribute created_at + # + # @return [Increase::Models::CardTokenListParams::CreatedAt, nil] + optional :created_at, -> { Increase::CardTokenListParams::CreatedAt } + + # @!attribute cursor + # Return the page of entries after this one. + # + # @return [String, nil] + optional :cursor, String + + # @!attribute limit + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + # + # @return [Integer, nil] + optional :limit, Integer + + # @!method initialize(created_at: nil, cursor: nil, limit: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardTokenListParams} for more details. + # + # @param created_at [Increase::Models::CardTokenListParams::CreatedAt] + # + # @param cursor [String] Return the page of entries after this one. + # + # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + + class CreatedAt < Increase::Internal::Type::BaseModel + # @!attribute after + # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + # + # @return [Time, nil] + optional :after, Time + + # @!attribute before + # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + # + # @return [Time, nil] + optional :before, Time + + # @!attribute on_or_after + # Return results on or after this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + # + # @return [Time, nil] + optional :on_or_after, Time + + # @!attribute on_or_before + # Return results on or before this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + # + # @return [Time, nil] + optional :on_or_before, Time + + # @!method initialize(after: nil, before: nil, on_or_after: nil, on_or_before: nil) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardTokenListParams::CreatedAt} for more details. + # + # @param after [Time] Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) tim + # + # @param before [Time] Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) ti + # + # @param on_or_after [Time] Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_860 + # + # @param on_or_before [Time] Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_86 + end + end + end +end diff --git a/lib/increase/models/card_token_retrieve_params.rb b/lib/increase/models/card_token_retrieve_params.rb new file mode 100644 index 000000000..772b90b31 --- /dev/null +++ b/lib/increase/models/card_token_retrieve_params.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardTokens#retrieve + class CardTokenRetrieveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!method initialize(request_options: {}) + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/increase/models/card_validation.rb b/lib/increase/models/card_validation.rb new file mode 100644 index 000000000..0b738c636 --- /dev/null +++ b/lib/increase/models/card_validation.rb @@ -0,0 +1,759 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardValidations#create + class CardValidation < Increase::Internal::Type::BaseModel + # @!attribute id + # The Card Validation's identifier. + # + # @return [String] + required :id, String + + # @!attribute acceptance + # If the validation is accepted by the recipient bank, this will contain + # supplemental details. + # + # @return [Increase::Models::CardValidation::Acceptance, nil] + required :acceptance, -> { Increase::CardValidation::Acceptance }, nil?: true + + # @!attribute account_id + # The identifier of the Account from which to send the validation. + # + # @return [String] + required :account_id, String + + # @!attribute cardholder_first_name + # The cardholder's first name. + # + # @return [String, nil] + required :cardholder_first_name, String, nil?: true + + # @!attribute cardholder_last_name + # The cardholder's last name. + # + # @return [String, nil] + required :cardholder_last_name, String, nil?: true + + # @!attribute cardholder_middle_name + # The cardholder's middle name. + # + # @return [String, nil] + required :cardholder_middle_name, String, nil?: true + + # @!attribute cardholder_postal_code + # The postal code of the cardholder's address. + # + # @return [String, nil] + required :cardholder_postal_code, String, nil?: true + + # @!attribute cardholder_street_address + # The cardholder's street address. + # + # @return [String, nil] + required :cardholder_street_address, String, nil?: true + + # @!attribute created_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute created_by + # What object created the validation, either via the API or the dashboard. + # + # @return [Increase::Models::CardValidation::CreatedBy, nil] + required :created_by, -> { Increase::CardValidation::CreatedBy }, nil?: true + + # @!attribute decline + # If the validation is rejected by the card network or the destination financial + # institution, this will contain supplemental details. + # + # @return [Increase::Models::CardValidation::Decline, nil] + required :decline, -> { Increase::CardValidation::Decline }, nil?: true + + # @!attribute idempotency_key + # The idempotency key you chose for this object. This value is unique across + # Increase and is used to ensure that a request is only processed once. Learn more + # about [idempotency](https://increase.com/documentation/idempotency-keys). + # + # @return [String, nil] + required :idempotency_key, String, nil?: true + + # @!attribute merchant_category_code + # A four-digit code (MCC) identifying the type of business or service provided by + # the merchant. + # + # @return [String] + required :merchant_category_code, String + + # @!attribute merchant_city_name + # The city where the merchant (typically your business) is located. + # + # @return [String] + required :merchant_city_name, String + + # @!attribute merchant_name + # The merchant name that will appear in the cardholder’s statement descriptor. + # Typically your business name. + # + # @return [String] + required :merchant_name, String + + # @!attribute merchant_postal_code + # The postal code for the merchant’s (typically your business’s) location. + # + # @return [String] + required :merchant_postal_code, String + + # @!attribute merchant_state + # The U.S. state where the merchant (typically your business) is located. + # + # @return [String] + required :merchant_state, String + + # @!attribute status + # The lifecycle status of the validation. + # + # @return [Symbol, Increase::Models::CardValidation::Status] + required :status, enum: -> { Increase::CardValidation::Status } + + # @!attribute submission + # After the validation is submitted to the card network, this will contain + # supplemental details. + # + # @return [Increase::Models::CardValidation::Submission, nil] + required :submission, -> { Increase::CardValidation::Submission }, nil?: true + + # @!attribute type + # A constant representing the object's type. For this resource it will always be + # `card_validation`. + # + # @return [Symbol, Increase::Models::CardValidation::Type] + required :type, enum: -> { Increase::CardValidation::Type } + + # @!method initialize(id:, acceptance:, account_id:, cardholder_first_name:, cardholder_last_name:, cardholder_middle_name:, cardholder_postal_code:, cardholder_street_address:, created_at:, created_by:, decline:, idempotency_key:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_postal_code:, merchant_state:, status:, submission:, type:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardValidation} for more details. + # + # Card Validations are used to validate a card and its cardholder before sending + # funds to or pulling funds from a card. + # + # @param id [String] The Card Validation's identifier. + # + # @param acceptance [Increase::Models::CardValidation::Acceptance, nil] If the validation is accepted by the recipient bank, this will contain supplemen + # + # @param account_id [String] The identifier of the Account from which to send the validation. + # + # @param cardholder_first_name [String, nil] The cardholder's first name. + # + # @param cardholder_last_name [String, nil] The cardholder's last name. + # + # @param cardholder_middle_name [String, nil] The cardholder's middle name. + # + # @param cardholder_postal_code [String, nil] The postal code of the cardholder's address. + # + # @param cardholder_street_address [String, nil] The cardholder's street address. + # + # @param created_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param created_by [Increase::Models::CardValidation::CreatedBy, nil] What object created the validation, either via the API or the dashboard. + # + # @param decline [Increase::Models::CardValidation::Decline, nil] If the validation is rejected by the card network or the destination financial i + # + # @param idempotency_key [String, nil] The idempotency key you chose for this object. This value is unique across Incre + # + # @param merchant_category_code [String] A four-digit code (MCC) identifying the type of business or service provided by + # + # @param merchant_city_name [String] The city where the merchant (typically your business) is located. + # + # @param merchant_name [String] The merchant name that will appear in the cardholder’s statement descriptor. Typ + # + # @param merchant_postal_code [String] The postal code for the merchant’s (typically your business’s) location. + # + # @param merchant_state [String] The U.S. state where the merchant (typically your business) is located. + # + # @param status [Symbol, Increase::Models::CardValidation::Status] The lifecycle status of the validation. + # + # @param submission [Increase::Models::CardValidation::Submission, nil] After the validation is submitted to the card network, this will contain supplem + # + # @param type [Symbol, Increase::Models::CardValidation::Type] A constant representing the object's type. For this resource it will always be ` + + # @see Increase::Models::CardValidation#acceptance + class Acceptance < Increase::Internal::Type::BaseModel + # @!attribute accepted_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was accepted by the issuing bank. + # + # @return [Time] + required :accepted_at, Time + + # @!attribute authorization_identification_response + # The authorization identification response from the issuing bank. + # + # @return [String] + required :authorization_identification_response, String + + # @!attribute card_verification_value2_result + # The result of the Card Verification Value 2 match. + # + # @return [Symbol, Increase::Models::CardValidation::Acceptance::CardVerificationValue2Result, nil] + required :card_verification_value2_result, + enum: -> { Increase::CardValidation::Acceptance::CardVerificationValue2Result }, + nil?: true + + # @!attribute cardholder_first_name_result + # The result of the cardholder first name match. + # + # @return [Symbol, Increase::Models::CardValidation::Acceptance::CardholderFirstNameResult, nil] + required :cardholder_first_name_result, + enum: -> { Increase::CardValidation::Acceptance::CardholderFirstNameResult }, + nil?: true + + # @!attribute cardholder_full_name_result + # The result of the cardholder full name match. + # + # @return [Symbol, Increase::Models::CardValidation::Acceptance::CardholderFullNameResult, nil] + required :cardholder_full_name_result, + enum: -> { Increase::CardValidation::Acceptance::CardholderFullNameResult }, + nil?: true + + # @!attribute cardholder_last_name_result + # The result of the cardholder last name match. + # + # @return [Symbol, Increase::Models::CardValidation::Acceptance::CardholderLastNameResult, nil] + required :cardholder_last_name_result, + enum: -> { Increase::CardValidation::Acceptance::CardholderLastNameResult }, + nil?: true + + # @!attribute cardholder_middle_name_result + # The result of the cardholder middle name match. + # + # @return [Symbol, Increase::Models::CardValidation::Acceptance::CardholderMiddleNameResult, nil] + required :cardholder_middle_name_result, + enum: -> { Increase::CardValidation::Acceptance::CardholderMiddleNameResult }, + nil?: true + + # @!attribute cardholder_postal_code_result + # The result of the cardholder postal code match. + # + # @return [Symbol, Increase::Models::CardValidation::Acceptance::CardholderPostalCodeResult, nil] + required :cardholder_postal_code_result, + enum: -> { Increase::CardValidation::Acceptance::CardholderPostalCodeResult }, + nil?: true + + # @!attribute cardholder_street_address_result + # The result of the cardholder street address match. + # + # @return [Symbol, Increase::Models::CardValidation::Acceptance::CardholderStreetAddressResult, nil] + required :cardholder_street_address_result, + enum: -> { Increase::CardValidation::Acceptance::CardholderStreetAddressResult }, + nil?: true + + # @!attribute network_transaction_identifier + # A unique identifier for the transaction on the card network. + # + # @return [String, nil] + required :network_transaction_identifier, String, nil?: true + + # @!method initialize(accepted_at:, authorization_identification_response:, card_verification_value2_result:, cardholder_first_name_result:, cardholder_full_name_result:, cardholder_last_name_result:, cardholder_middle_name_result:, cardholder_postal_code_result:, cardholder_street_address_result:, network_transaction_identifier:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardValidation::Acceptance} for more details. + # + # If the validation is accepted by the recipient bank, this will contain + # supplemental details. + # + # @param accepted_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param authorization_identification_response [String] The authorization identification response from the issuing bank. + # + # @param card_verification_value2_result [Symbol, Increase::Models::CardValidation::Acceptance::CardVerificationValue2Result, nil] The result of the Card Verification Value 2 match. + # + # @param cardholder_first_name_result [Symbol, Increase::Models::CardValidation::Acceptance::CardholderFirstNameResult, nil] The result of the cardholder first name match. + # + # @param cardholder_full_name_result [Symbol, Increase::Models::CardValidation::Acceptance::CardholderFullNameResult, nil] The result of the cardholder full name match. + # + # @param cardholder_last_name_result [Symbol, Increase::Models::CardValidation::Acceptance::CardholderLastNameResult, nil] The result of the cardholder last name match. + # + # @param cardholder_middle_name_result [Symbol, Increase::Models::CardValidation::Acceptance::CardholderMiddleNameResult, nil] The result of the cardholder middle name match. + # + # @param cardholder_postal_code_result [Symbol, Increase::Models::CardValidation::Acceptance::CardholderPostalCodeResult, nil] The result of the cardholder postal code match. + # + # @param cardholder_street_address_result [Symbol, Increase::Models::CardValidation::Acceptance::CardholderStreetAddressResult, nil] The result of the cardholder street address match. + # + # @param network_transaction_identifier [String, nil] A unique identifier for the transaction on the card network. + + # The result of the Card Verification Value 2 match. + # + # @see Increase::Models::CardValidation::Acceptance#card_verification_value2_result + module CardVerificationValue2Result + extend Increase::Internal::Type::Enum + + # The Card Verification Value 2 (CVV2) matches the expected value. + MATCH = :match + + # The Card Verification Value 2 (CVV2) does not match the expected value. + NO_MATCH = :no_match + + # @!method self.values + # @return [Array] + end + + # The result of the cardholder first name match. + # + # @see Increase::Models::CardValidation::Acceptance#cardholder_first_name_result + module CardholderFirstNameResult + extend Increase::Internal::Type::Enum + + # The cardholder name component matches the expected value. + MATCH = :match + + # The cardholder name component does not match the expected value. + NO_MATCH = :no_match + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH = :partial_match + + # @!method self.values + # @return [Array] + end + + # The result of the cardholder full name match. + # + # @see Increase::Models::CardValidation::Acceptance#cardholder_full_name_result + module CardholderFullNameResult + extend Increase::Internal::Type::Enum + + # The cardholder name component matches the expected value. + MATCH = :match + + # The cardholder name component does not match the expected value. + NO_MATCH = :no_match + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH = :partial_match + + # @!method self.values + # @return [Array] + end + + # The result of the cardholder last name match. + # + # @see Increase::Models::CardValidation::Acceptance#cardholder_last_name_result + module CardholderLastNameResult + extend Increase::Internal::Type::Enum + + # The cardholder name component matches the expected value. + MATCH = :match + + # The cardholder name component does not match the expected value. + NO_MATCH = :no_match + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH = :partial_match + + # @!method self.values + # @return [Array] + end + + # The result of the cardholder middle name match. + # + # @see Increase::Models::CardValidation::Acceptance#cardholder_middle_name_result + module CardholderMiddleNameResult + extend Increase::Internal::Type::Enum + + # The cardholder name component matches the expected value. + MATCH = :match + + # The cardholder name component does not match the expected value. + NO_MATCH = :no_match + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH = :partial_match + + # @!method self.values + # @return [Array] + end + + # The result of the cardholder postal code match. + # + # @see Increase::Models::CardValidation::Acceptance#cardholder_postal_code_result + module CardholderPostalCodeResult + extend Increase::Internal::Type::Enum + + # The cardholder address component matches the expected value. + MATCH = :match + + # The cardholder address component does not match the expected value. + NO_MATCH = :no_match + + # @!method self.values + # @return [Array] + end + + # The result of the cardholder street address match. + # + # @see Increase::Models::CardValidation::Acceptance#cardholder_street_address_result + module CardholderStreetAddressResult + extend Increase::Internal::Type::Enum + + # The cardholder address component matches the expected value. + MATCH = :match + + # The cardholder address component does not match the expected value. + NO_MATCH = :no_match + + # @!method self.values + # @return [Array] + end + end + + # @see Increase::Models::CardValidation#created_by + class CreatedBy < Increase::Internal::Type::BaseModel + # @!attribute api_key + # If present, details about the API key that created the transfer. + # + # @return [Increase::Models::CardValidation::CreatedBy::APIKey, nil] + required :api_key, -> { Increase::CardValidation::CreatedBy::APIKey }, nil?: true + + # @!attribute category + # The type of object that created this transfer. + # + # @return [Symbol, Increase::Models::CardValidation::CreatedBy::Category] + required :category, enum: -> { Increase::CardValidation::CreatedBy::Category } + + # @!attribute oauth_application + # If present, details about the OAuth Application that created the transfer. + # + # @return [Increase::Models::CardValidation::CreatedBy::OAuthApplication, nil] + required :oauth_application, -> { Increase::CardValidation::CreatedBy::OAuthApplication }, nil?: true + + # @!attribute user + # If present, details about the User that created the transfer. + # + # @return [Increase::Models::CardValidation::CreatedBy::User, nil] + required :user, -> { Increase::CardValidation::CreatedBy::User }, nil?: true + + # @!method initialize(api_key:, category:, oauth_application:, user:) + # What object created the validation, either via the API or the dashboard. + # + # @param api_key [Increase::Models::CardValidation::CreatedBy::APIKey, nil] If present, details about the API key that created the transfer. + # + # @param category [Symbol, Increase::Models::CardValidation::CreatedBy::Category] The type of object that created this transfer. + # + # @param oauth_application [Increase::Models::CardValidation::CreatedBy::OAuthApplication, nil] If present, details about the OAuth Application that created the transfer. + # + # @param user [Increase::Models::CardValidation::CreatedBy::User, nil] If present, details about the User that created the transfer. + + # @see Increase::Models::CardValidation::CreatedBy#api_key + class APIKey < Increase::Internal::Type::BaseModel + # @!attribute description + # The description set for the API key when it was created. + # + # @return [String, nil] + required :description, String, nil?: true + + # @!method initialize(description:) + # If present, details about the API key that created the transfer. + # + # @param description [String, nil] The description set for the API key when it was created. + end + + # The type of object that created this transfer. + # + # @see Increase::Models::CardValidation::CreatedBy#category + module Category + extend Increase::Internal::Type::Enum + + # An API key. Details will be under the `api_key` object. + API_KEY = :api_key + + # An OAuth application you connected to Increase. Details will be under the `oauth_application` object. + OAUTH_APPLICATION = :oauth_application + + # A User in the Increase dashboard. Details will be under the `user` object. + USER = :user + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::CardValidation::CreatedBy#oauth_application + class OAuthApplication < Increase::Internal::Type::BaseModel + # @!attribute name + # The name of the OAuth Application. + # + # @return [String] + required :name, String + + # @!method initialize(name:) + # If present, details about the OAuth Application that created the transfer. + # + # @param name [String] The name of the OAuth Application. + end + + # @see Increase::Models::CardValidation::CreatedBy#user + class User < Increase::Internal::Type::BaseModel + # @!attribute email + # The email address of the User. + # + # @return [String] + required :email, String + + # @!method initialize(email:) + # If present, details about the User that created the transfer. + # + # @param email [String] The email address of the User. + end + end + + # @see Increase::Models::CardValidation#decline + class Decline < Increase::Internal::Type::BaseModel + # @!attribute declined_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was declined. + # + # @return [Time] + required :declined_at, Time + + # @!attribute network_transaction_identifier + # A unique identifier for the transaction on the card network. + # + # @return [String, nil] + required :network_transaction_identifier, String, nil?: true + + # @!attribute reason + # The reason why the validation was declined. + # + # @return [Symbol, Increase::Models::CardValidation::Decline::Reason] + required :reason, enum: -> { Increase::CardValidation::Decline::Reason } + + # @!method initialize(declined_at:, network_transaction_identifier:, reason:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardValidation::Decline} for more details. + # + # If the validation is rejected by the card network or the destination financial + # institution, this will contain supplemental details. + # + # @param declined_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param network_transaction_identifier [String, nil] A unique identifier for the transaction on the card network. + # + # @param reason [Symbol, Increase::Models::CardValidation::Decline::Reason] The reason why the validation was declined. + + # The reason why the validation was declined. + # + # @see Increase::Models::CardValidation::Decline#reason + module Reason + extend Increase::Internal::Type::Enum + + # The card issuer has declined the transaction without providing a specific reason. + DO_NOT_HONOR = :do_not_honor + + # The number of transactions for the card has exceeded the limit set by the issuer. + ACTIVITY_COUNT_LIMIT_EXCEEDED = :activity_count_limit_exceeded + + # The card issuer requires the cardholder to contact them for further information regarding the transaction. + REFER_TO_CARD_ISSUER = :refer_to_card_issuer + + # The card issuer requires the cardholder to contact them due to a special condition related to the transaction. + REFER_TO_CARD_ISSUER_SPECIAL_CONDITION = :refer_to_card_issuer_special_condition + + # The merchant is not valid for this transaction. + INVALID_MERCHANT = :invalid_merchant + + # The card should be retained by the terminal. + PICK_UP_CARD = :pick_up_card + + # An error occurred during processing of the transaction. + ERROR = :error + + # The card should be retained by the terminal due to a special condition. + PICK_UP_CARD_SPECIAL = :pick_up_card_special + + # The transaction is invalid and cannot be processed. + INVALID_TRANSACTION = :invalid_transaction + + # The amount of the transaction is invalid. + INVALID_AMOUNT = :invalid_amount + + # The account number provided is invalid. + INVALID_ACCOUNT_NUMBER = :invalid_account_number + + # The issuer of the card could not be found. + NO_SUCH_ISSUER = :no_such_issuer + + # The transaction should be re-entered for processing. + RE_ENTER_TRANSACTION = :re_enter_transaction + + # There is no credit account associated with the card. + NO_CREDIT_ACCOUNT = :no_credit_account + + # The card should be retained by the terminal because it has been reported lost. + PICK_UP_CARD_LOST = :pick_up_card_lost + + # The card should be retained by the terminal because it has been reported stolen. + PICK_UP_CARD_STOLEN = :pick_up_card_stolen + + # The account associated with the card has been closed. + CLOSED_ACCOUNT = :closed_account + + # There are insufficient funds in the account to complete the transaction. + INSUFFICIENT_FUNDS = :insufficient_funds + + # There is no checking account associated with the card. + NO_CHECKING_ACCOUNT = :no_checking_account + + # There is no savings account associated with the card. + NO_SAVINGS_ACCOUNT = :no_savings_account + + # The card has expired and cannot be used for transactions. + EXPIRED_CARD = :expired_card + + # The transaction is not permitted for this cardholder. + TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER = :transaction_not_permitted_to_cardholder + + # The transaction is not allowed at this terminal. + TRANSACTION_NOT_ALLOWED_AT_TERMINAL = :transaction_not_allowed_at_terminal + + # The transaction has been flagged as suspected fraud and cannot be processed. + SUSPECTED_FRAUD = :suspected_fraud + + # The amount of activity on the card has exceeded the limit set by the issuer. + ACTIVITY_AMOUNT_LIMIT_EXCEEDED = :activity_amount_limit_exceeded + + # The card has restrictions that prevent it from being used for this transaction. + RESTRICTED_CARD = :restricted_card + + # A security violation has occurred, preventing the transaction from being processed. + SECURITY_VIOLATION = :security_violation + + # The transaction does not meet the anti-money laundering requirements set by the issuer. + TRANSACTION_DOES_NOT_FULFILL_ANTI_MONEY_LAUNDERING_REQUIREMENT = + :transaction_does_not_fulfill_anti_money_laundering_requirement + + # The first use of the card has been blocked by the issuer. + BLOCKED_FIRST_USE = :blocked_first_use + + # The credit issuer is currently unavailable to process the transaction. + CREDIT_ISSUER_UNAVAILABLE = :credit_issuer_unavailable + + # The card verification value (CVV) results were negative, indicating a potential issue with the card. + NEGATIVE_CARD_VERIFICATION_VALUE_RESULTS = :negative_card_verification_value_results + + # The issuer of the card is currently unavailable to process the transaction. + ISSUER_UNAVAILABLE = :issuer_unavailable + + # The financial institution associated with the card could not be found. + FINANCIAL_INSTITUTION_CANNOT_BE_FOUND = :financial_institution_cannot_be_found + + # The transaction cannot be completed due to an unspecified reason. + TRANSACTION_CANNOT_BE_COMPLETED = :transaction_cannot_be_completed + + # The transaction is a duplicate of a previous transaction and cannot be processed again. + DUPLICATE_TRANSACTION = :duplicate_transaction + + # A system malfunction occurred, preventing the transaction from being processed. + SYSTEM_MALFUNCTION = :system_malfunction + + # Additional customer authentication is required to complete the transaction. + ADDITIONAL_CUSTOMER_AUTHENTICATION_REQUIRED = :additional_customer_authentication_required + + # The surcharge amount applied to the transaction is not permitted by the issuer. + SURCHARGE_AMOUNT_NOT_PERMITTED = :surcharge_amount_not_permitted + + # The transaction was declined due to a failure in verifying the CVV2 code. + DECLINE_FOR_CVV2_FAILURE = :decline_for_cvv2_failure + + # A stop payment order has been placed on this transaction. + STOP_PAYMENT_ORDER = :stop_payment_order + + # An order has been placed to revoke authorization for this transaction. + REVOCATION_OF_AUTHORIZATION_ORDER = :revocation_of_authorization_order + + # An order has been placed to revoke all authorizations for this cardholder. + REVOCATION_OF_ALL_AUTHORIZATIONS_ORDER = :revocation_of_all_authorizations_order + + # @!method self.values + # @return [Array] + end + end + + # The lifecycle status of the validation. + # + # @see Increase::Models::CardValidation#status + module Status + extend Increase::Internal::Type::Enum + + # The validation requires attention from an Increase operator. + REQUIRES_ATTENTION = :requires_attention + + # The validation is queued to be submitted to the card network. + PENDING_SUBMISSION = :pending_submission + + # The validation has been submitted and is pending a response from the card network. + SUBMITTED = :submitted + + # The validation has been sent successfully and is complete. + COMPLETE = :complete + + # The validation was declined by the network or the recipient's bank. + DECLINED = :declined + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::CardValidation#submission + class Submission < Increase::Internal::Type::BaseModel + # @!attribute retrieval_reference_number + # A 12-digit retrieval reference number that identifies the validation. Usually a + # combination of a timestamp and the trace number. + # + # @return [String] + required :retrieval_reference_number, String + + # @!attribute submitted_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was submitted to the card network. + # + # @return [Time] + required :submitted_at, Time + + # @!attribute trace_number + # A 6-digit trace number that identifies the validation within a short time + # window. + # + # @return [String] + required :trace_number, String + + # @!method initialize(retrieval_reference_number:, submitted_at:, trace_number:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardValidation::Submission} for more details. + # + # After the validation is submitted to the card network, this will contain + # supplemental details. + # + # @param retrieval_reference_number [String] A 12-digit retrieval reference number that identifies the validation. Usually a + # + # @param submitted_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param trace_number [String] A 6-digit trace number that identifies the validation within a short time window + end + + # A constant representing the object's type. For this resource it will always be + # `card_validation`. + # + # @see Increase::Models::CardValidation#type + module Type + extend Increase::Internal::Type::Enum + + CARD_VALIDATION = :card_validation + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/increase/models/card_validation_create_params.rb b/lib/increase/models/card_validation_create_params.rb new file mode 100644 index 000000000..93f05bd8c --- /dev/null +++ b/lib/increase/models/card_validation_create_params.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardValidations#create + class CardValidationCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!attribute account_id + # The identifier of the Account from which to send the validation. + # + # @return [String] + required :account_id, String + + # @!attribute card_token_id + # The Increase identifier for the Card Token that represents the card number + # you're validating. + # + # @return [String] + required :card_token_id, String + + # @!attribute merchant_category_code + # A four-digit code (MCC) identifying the type of business or service provided by + # the merchant. + # + # @return [String] + required :merchant_category_code, String + + # @!attribute merchant_city_name + # The city where the merchant (typically your business) is located. + # + # @return [String] + required :merchant_city_name, String + + # @!attribute merchant_name + # The merchant name that will appear in the cardholder’s statement descriptor. + # Typically your business name. + # + # @return [String] + required :merchant_name, String + + # @!attribute merchant_postal_code + # The postal code for the merchant’s (typically your business’s) location. + # + # @return [String] + required :merchant_postal_code, String + + # @!attribute merchant_state + # The U.S. state where the merchant (typically your business) is located. + # + # @return [String] + required :merchant_state, String + + # @!attribute cardholder_first_name + # The cardholder's first name. + # + # @return [String, nil] + optional :cardholder_first_name, String + + # @!attribute cardholder_last_name + # The cardholder's last name. + # + # @return [String, nil] + optional :cardholder_last_name, String + + # @!attribute cardholder_middle_name + # The cardholder's middle name. + # + # @return [String, nil] + optional :cardholder_middle_name, String + + # @!attribute cardholder_postal_code + # The postal code of the cardholder's address. + # + # @return [String, nil] + optional :cardholder_postal_code, String + + # @!attribute cardholder_street_address + # The cardholder's street address. + # + # @return [String, nil] + optional :cardholder_street_address, String + + # @!method initialize(account_id:, card_token_id:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_postal_code:, merchant_state:, cardholder_first_name: nil, cardholder_last_name: nil, cardholder_middle_name: nil, cardholder_postal_code: nil, cardholder_street_address: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardValidationCreateParams} for more details. + # + # @param account_id [String] The identifier of the Account from which to send the validation. + # + # @param card_token_id [String] The Increase identifier for the Card Token that represents the card number you'r + # + # @param merchant_category_code [String] A four-digit code (MCC) identifying the type of business or service provided by + # + # @param merchant_city_name [String] The city where the merchant (typically your business) is located. + # + # @param merchant_name [String] The merchant name that will appear in the cardholder’s statement descriptor. Typ + # + # @param merchant_postal_code [String] The postal code for the merchant’s (typically your business’s) location. + # + # @param merchant_state [String] The U.S. state where the merchant (typically your business) is located. + # + # @param cardholder_first_name [String] The cardholder's first name. + # + # @param cardholder_last_name [String] The cardholder's last name. + # + # @param cardholder_middle_name [String] The cardholder's middle name. + # + # @param cardholder_postal_code [String] The postal code of the cardholder's address. + # + # @param cardholder_street_address [String] The cardholder's street address. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/increase/models/card_validation_list_params.rb b/lib/increase/models/card_validation_list_params.rb new file mode 100644 index 000000000..8df1be7dd --- /dev/null +++ b/lib/increase/models/card_validation_list_params.rb @@ -0,0 +1,150 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardValidations#list + class CardValidationListParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!attribute account_id + # Filter Card Validations to ones belonging to the specified Account. + # + # @return [String, nil] + optional :account_id, String + + # @!attribute created_at + # + # @return [Increase::Models::CardValidationListParams::CreatedAt, nil] + optional :created_at, -> { Increase::CardValidationListParams::CreatedAt } + + # @!attribute cursor + # Return the page of entries after this one. + # + # @return [String, nil] + optional :cursor, String + + # @!attribute idempotency_key + # Filter records to the one with the specified `idempotency_key` you chose for + # that object. This value is unique across Increase and is used to ensure that a + # request is only processed once. Learn more about + # [idempotency](https://increase.com/documentation/idempotency-keys). + # + # @return [String, nil] + optional :idempotency_key, String + + # @!attribute limit + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + # + # @return [Integer, nil] + optional :limit, Integer + + # @!attribute status + # + # @return [Increase::Models::CardValidationListParams::Status, nil] + optional :status, -> { Increase::CardValidationListParams::Status } + + # @!method initialize(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardValidationListParams} for more details. + # + # @param account_id [String] Filter Card Validations to ones belonging to the specified Account. + # + # @param created_at [Increase::Models::CardValidationListParams::CreatedAt] + # + # @param cursor [String] Return the page of entries after this one. + # + # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha + # + # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob + # + # @param status [Increase::Models::CardValidationListParams::Status] + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + + class CreatedAt < Increase::Internal::Type::BaseModel + # @!attribute after + # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + # + # @return [Time, nil] + optional :after, Time + + # @!attribute before + # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + # + # @return [Time, nil] + optional :before, Time + + # @!attribute on_or_after + # Return results on or after this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + # + # @return [Time, nil] + optional :on_or_after, Time + + # @!attribute on_or_before + # Return results on or before this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + # + # @return [Time, nil] + optional :on_or_before, Time + + # @!method initialize(after: nil, before: nil, on_or_after: nil, on_or_before: nil) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardValidationListParams::CreatedAt} for more details. + # + # @param after [Time] Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) tim + # + # @param before [Time] Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) ti + # + # @param on_or_after [Time] Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_860 + # + # @param on_or_before [Time] Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_86 + end + + class Status < Increase::Internal::Type::BaseModel + # @!attribute in_ + # Filter Card Validations by status. For GET requests, this should be encoded as a + # comma-delimited string, such as `?in=one,two,three`. + # + # @return [Array, nil] + optional :in_, + -> { + Increase::Internal::Type::ArrayOf[enum: Increase::CardValidationListParams::Status::In] + }, + api_name: :in + + # @!method initialize(in_: nil) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardValidationListParams::Status} for more details. + # + # @param in_ [Array] Filter Card Validations by status. For GET requests, this should be encoded as a + + module In + extend Increase::Internal::Type::Enum + + # The validation requires attention from an Increase operator. + REQUIRES_ATTENTION = :requires_attention + + # The validation is queued to be submitted to the card network. + PENDING_SUBMISSION = :pending_submission + + # The validation has been submitted and is pending a response from the card network. + SUBMITTED = :submitted + + # The validation has been sent successfully and is complete. + COMPLETE = :complete + + # The validation was declined by the network or the recipient's bank. + DECLINED = :declined + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/increase/models/card_validation_retrieve_params.rb b/lib/increase/models/card_validation_retrieve_params.rb new file mode 100644 index 000000000..6f4690c9b --- /dev/null +++ b/lib/increase/models/card_validation_retrieve_params.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::CardValidations#retrieve + class CardValidationRetrieveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!method initialize(request_options: {}) + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/increase/models/simulations/card_token_create_params.rb b/lib/increase/models/simulations/card_token_create_params.rb new file mode 100644 index 000000000..b8459794e --- /dev/null +++ b/lib/increase/models/simulations/card_token_create_params.rb @@ -0,0 +1,140 @@ +# frozen_string_literal: true + +module Increase + module Models + module Simulations + # @see Increase::Resources::Simulations::CardTokens#create + class CardTokenCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!attribute capabilities + # The capabilities of the outbound card token. + # + # @return [Array, nil] + optional :capabilities, + -> { + Increase::Internal::Type::ArrayOf[Increase::Simulations::CardTokenCreateParams::Capability] + } + + # @!attribute expiration + # The expiration date of the card. + # + # @return [Date, nil] + optional :expiration, Date + + # @!attribute last4 + # The last 4 digits of the card number. + # + # @return [String, nil] + optional :last4, String + + # @!attribute prefix + # The prefix of the card number, usually the first 8 digits. + # + # @return [String, nil] + optional :prefix, String + + # @!attribute primary_account_number_length + # The total length of the card number, including prefix and last4. + # + # @return [Integer, nil] + optional :primary_account_number_length, Integer + + # @!method initialize(capabilities: nil, expiration: nil, last4: nil, prefix: nil, primary_account_number_length: nil, request_options: {}) + # @param capabilities [Array] The capabilities of the outbound card token. + # + # @param expiration [Date] The expiration date of the card. + # + # @param last4 [String] The last 4 digits of the card number. + # + # @param prefix [String] The prefix of the card number, usually the first 8 digits. + # + # @param primary_account_number_length [Integer] The total length of the card number, including prefix and last4. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + + class Capability < Increase::Internal::Type::BaseModel + # @!attribute cross_border_push_transfers + # The cross-border push transfers capability. + # + # @return [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers] + required :cross_border_push_transfers, + enum: -> { + Increase::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers + } + + # @!attribute domestic_push_transfers + # The domestic push transfers capability. + # + # @return [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers] + required :domestic_push_transfers, + enum: -> { + Increase::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers + } + + # @!attribute route + # The route of the capability. + # + # @return [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::Route] + required :route, enum: -> { Increase::Simulations::CardTokenCreateParams::Capability::Route } + + # @!method initialize(cross_border_push_transfers:, domestic_push_transfers:, route:) + # @param cross_border_push_transfers [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers] The cross-border push transfers capability. + # + # @param domestic_push_transfers [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers] The domestic push transfers capability. + # + # @param route [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::Route] The route of the capability. + + # The cross-border push transfers capability. + # + # @see Increase::Models::Simulations::CardTokenCreateParams::Capability#cross_border_push_transfers + module CrossBorderPushTransfers + extend Increase::Internal::Type::Enum + + # The capability is supported. + SUPPORTED = :supported + + # The capability is not supported. + NOT_SUPPORTED = :not_supported + + # @!method self.values + # @return [Array] + end + + # The domestic push transfers capability. + # + # @see Increase::Models::Simulations::CardTokenCreateParams::Capability#domestic_push_transfers + module DomesticPushTransfers + extend Increase::Internal::Type::Enum + + # The capability is supported. + SUPPORTED = :supported + + # The capability is not supported. + NOT_SUPPORTED = :not_supported + + # @!method self.values + # @return [Array] + end + + # The route of the capability. + # + # @see Increase::Models::Simulations::CardTokenCreateParams::Capability#route + module Route + extend Increase::Internal::Type::Enum + + # Visa and Interlink + VISA = :visa + + # Mastercard and Maestro + MASTERCARD = :mastercard + + # @!method self.values + # @return [Array] + end + end + end + end + end +end diff --git a/lib/increase/resources/card_push_transfers.rb b/lib/increase/resources/card_push_transfers.rb new file mode 100644 index 000000000..b71157931 --- /dev/null +++ b/lib/increase/resources/card_push_transfers.rb @@ -0,0 +1,167 @@ +# frozen_string_literal: true + +module Increase + module Resources + class CardPushTransfers + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransferCreateParams} for more details. + # + # Create a Card Push Transfer + # + # @overload create(amount:, business_application_identifier:, card_token_id:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_name_prefix:, merchant_postal_code:, merchant_state:, recipient_name:, sender_address_city:, sender_address_line1:, sender_address_postal_code:, sender_address_state:, sender_name:, source_account_number_id:, require_approval: nil, request_options: {}) + # + # @param amount [Integer] The transfer amount in USD cents. For Card Push transfers, must be positive. + # + # @param business_application_identifier [Symbol, Increase::Models::CardPushTransferCreateParams::BusinessApplicationIdentifier] The Business Application Identifier describes the type of transaction being perf + # + # @param card_token_id [String] The Increase identifier for the Card Token that represents the card number you'r + # + # @param merchant_category_code [String] The merchant category code (MCC) of the merchant (generally your business) sendi + # + # @param merchant_city_name [String] The city name of the merchant (generally your business) sending the transfer. + # + # @param merchant_name [String] The merchant name shows up as the statement descriptor for the transfer. This is + # + # @param merchant_name_prefix [String] For certain Business Application Identifiers, the statement descriptor is `merch + # + # @param merchant_postal_code [String] The postal code of the merchant (generally your business) sending the transfer. + # + # @param merchant_state [String] The state of the merchant (generally your business) sending the transfer. + # + # @param recipient_name [String] The name of the funds recipient. + # + # @param sender_address_city [String] The city of the sender. + # + # @param sender_address_line1 [String] The address line 1 of the sender. + # + # @param sender_address_postal_code [String] The postal code of the sender. + # + # @param sender_address_state [String] The state of the sender. + # + # @param sender_name [String] The name of the funds originator. + # + # @param source_account_number_id [String] The identifier of the Account Number from which to send the transfer. + # + # @param require_approval [Boolean] Whether the transfer requires explicit approval via the dashboard or API. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::CardPushTransfer] + # + # @see Increase::Models::CardPushTransferCreateParams + def create(params) + parsed, options = Increase::CardPushTransferCreateParams.dump_request(params) + @client.request( + method: :post, + path: "card_push_transfers", + body: parsed, + model: Increase::CardPushTransfer, + options: options + ) + end + + # Retrieve a Card Push Transfer + # + # @overload retrieve(card_push_transfer_id, request_options: {}) + # + # @param card_push_transfer_id [String] The identifier of the Card Push Transfer. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::CardPushTransfer] + # + # @see Increase::Models::CardPushTransferRetrieveParams + def retrieve(card_push_transfer_id, params = {}) + @client.request( + method: :get, + path: ["card_push_transfers/%1$s", card_push_transfer_id], + model: Increase::CardPushTransfer, + options: params[:request_options] + ) + end + + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPushTransferListParams} for more details. + # + # List Card Push Transfers + # + # @overload list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) + # + # @param account_id [String] Filter Card Push Transfers to ones belonging to the specified Account. + # + # @param created_at [Increase::Models::CardPushTransferListParams::CreatedAt] + # + # @param cursor [String] Return the page of entries after this one. + # + # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha + # + # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob + # + # @param status [Increase::Models::CardPushTransferListParams::Status] + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Internal::Page] + # + # @see Increase::Models::CardPushTransferListParams + def list(params = {}) + parsed, options = Increase::CardPushTransferListParams.dump_request(params) + @client.request( + method: :get, + path: "card_push_transfers", + query: parsed, + page: Increase::Internal::Page, + model: Increase::CardPushTransfer, + options: options + ) + end + + # Approves a Card Push Transfer in a pending_approval state. + # + # @overload approve(card_push_transfer_id, request_options: {}) + # + # @param card_push_transfer_id [String] The identifier of the Card Push Transfer to approve. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::CardPushTransfer] + # + # @see Increase::Models::CardPushTransferApproveParams + def approve(card_push_transfer_id, params = {}) + @client.request( + method: :post, + path: ["card_push_transfers/%1$s/approve", card_push_transfer_id], + model: Increase::CardPushTransfer, + options: params[:request_options] + ) + end + + # Cancels a Card Push Transfer in a pending_approval state. + # + # @overload cancel(card_push_transfer_id, request_options: {}) + # + # @param card_push_transfer_id [String] The identifier of the pending Card Push Transfer to cancel. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::CardPushTransfer] + # + # @see Increase::Models::CardPushTransferCancelParams + def cancel(card_push_transfer_id, params = {}) + @client.request( + method: :post, + path: ["card_push_transfers/%1$s/cancel", card_push_transfer_id], + model: Increase::CardPushTransfer, + options: params[:request_options] + ) + end + + # @api private + # + # @param client [Increase::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/increase/resources/card_tokens.rb b/lib/increase/resources/card_tokens.rb new file mode 100644 index 000000000..90c31fdf3 --- /dev/null +++ b/lib/increase/resources/card_tokens.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +module Increase + module Resources + class CardTokens + # Retrieve a Card Token + # + # @overload retrieve(card_token_id, request_options: {}) + # + # @param card_token_id [String] The identifier of the Card Token. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::CardToken] + # + # @see Increase::Models::CardTokenRetrieveParams + def retrieve(card_token_id, params = {}) + @client.request( + method: :get, + path: ["card_tokens/%1$s", card_token_id], + model: Increase::CardToken, + options: params[:request_options] + ) + end + + # Some parameter documentations has been truncated, see + # {Increase::Models::CardTokenListParams} for more details. + # + # List Card Tokens + # + # @overload list(created_at: nil, cursor: nil, limit: nil, request_options: {}) + # + # @param created_at [Increase::Models::CardTokenListParams::CreatedAt] + # + # @param cursor [String] Return the page of entries after this one. + # + # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Internal::Page] + # + # @see Increase::Models::CardTokenListParams + def list(params = {}) + parsed, options = Increase::CardTokenListParams.dump_request(params) + @client.request( + method: :get, + path: "card_tokens", + query: parsed, + page: Increase::Internal::Page, + model: Increase::CardToken, + options: options + ) + end + + # The capabilities of a Card Token describe whether the card can be used for + # specific operations, such as Card Push Transfers. The capabilities can change + # over time based on the issuing bank's configuration of the card range. + # + # @overload capabilities(card_token_id, request_options: {}) + # + # @param card_token_id [String] The identifier of the Card Token. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::CardTokenCapabilities] + # + # @see Increase::Models::CardTokenCapabilitiesParams + def capabilities(card_token_id, params = {}) + @client.request( + method: :get, + path: ["card_tokens/%1$s/capabilities", card_token_id], + model: Increase::CardTokenCapabilities, + options: params[:request_options] + ) + end + + # @api private + # + # @param client [Increase::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/increase/resources/card_validations.rb b/lib/increase/resources/card_validations.rb new file mode 100644 index 000000000..bf2bd23bc --- /dev/null +++ b/lib/increase/resources/card_validations.rb @@ -0,0 +1,117 @@ +# frozen_string_literal: true + +module Increase + module Resources + class CardValidations + # Some parameter documentations has been truncated, see + # {Increase::Models::CardValidationCreateParams} for more details. + # + # Create a Card Validation + # + # @overload create(account_id:, card_token_id:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_postal_code:, merchant_state:, cardholder_first_name: nil, cardholder_last_name: nil, cardholder_middle_name: nil, cardholder_postal_code: nil, cardholder_street_address: nil, request_options: {}) + # + # @param account_id [String] The identifier of the Account from which to send the validation. + # + # @param card_token_id [String] The Increase identifier for the Card Token that represents the card number you'r + # + # @param merchant_category_code [String] A four-digit code (MCC) identifying the type of business or service provided by + # + # @param merchant_city_name [String] The city where the merchant (typically your business) is located. + # + # @param merchant_name [String] The merchant name that will appear in the cardholder’s statement descriptor. Typ + # + # @param merchant_postal_code [String] The postal code for the merchant’s (typically your business’s) location. + # + # @param merchant_state [String] The U.S. state where the merchant (typically your business) is located. + # + # @param cardholder_first_name [String] The cardholder's first name. + # + # @param cardholder_last_name [String] The cardholder's last name. + # + # @param cardholder_middle_name [String] The cardholder's middle name. + # + # @param cardholder_postal_code [String] The postal code of the cardholder's address. + # + # @param cardholder_street_address [String] The cardholder's street address. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::CardValidation] + # + # @see Increase::Models::CardValidationCreateParams + def create(params) + parsed, options = Increase::CardValidationCreateParams.dump_request(params) + @client.request( + method: :post, + path: "card_validations", + body: parsed, + model: Increase::CardValidation, + options: options + ) + end + + # Retrieve a Card Validation + # + # @overload retrieve(card_validation_id, request_options: {}) + # + # @param card_validation_id [String] The identifier of the Card Validation. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::CardValidation] + # + # @see Increase::Models::CardValidationRetrieveParams + def retrieve(card_validation_id, params = {}) + @client.request( + method: :get, + path: ["card_validations/%1$s", card_validation_id], + model: Increase::CardValidation, + options: params[:request_options] + ) + end + + # Some parameter documentations has been truncated, see + # {Increase::Models::CardValidationListParams} for more details. + # + # List Card Validations + # + # @overload list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) + # + # @param account_id [String] Filter Card Validations to ones belonging to the specified Account. + # + # @param created_at [Increase::Models::CardValidationListParams::CreatedAt] + # + # @param cursor [String] Return the page of entries after this one. + # + # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha + # + # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob + # + # @param status [Increase::Models::CardValidationListParams::Status] + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Internal::Page] + # + # @see Increase::Models::CardValidationListParams + def list(params = {}) + parsed, options = Increase::CardValidationListParams.dump_request(params) + @client.request( + method: :get, + path: "card_validations", + query: parsed, + page: Increase::Internal::Page, + model: Increase::CardValidation, + options: options + ) + end + + # @api private + # + # @param client [Increase::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/increase/resources/simulations.rb b/lib/increase/resources/simulations.rb index 5196d8dc6..0546bdda2 100644 --- a/lib/increase/resources/simulations.rb +++ b/lib/increase/resources/simulations.rb @@ -87,6 +87,9 @@ class Simulations # @return [Increase::Resources::Simulations::Documents] attr_reader :documents + # @return [Increase::Resources::Simulations::CardTokens] + attr_reader :card_tokens + # @api private # # @param client [Increase::Client] @@ -125,6 +128,7 @@ def initialize(client:) @programs = Increase::Resources::Simulations::Programs.new(client: client) @account_statements = Increase::Resources::Simulations::AccountStatements.new(client: client) @documents = Increase::Resources::Simulations::Documents.new(client: client) + @card_tokens = Increase::Resources::Simulations::CardTokens.new(client: client) end end end diff --git a/lib/increase/resources/simulations/card_tokens.rb b/lib/increase/resources/simulations/card_tokens.rb new file mode 100644 index 000000000..8ae95a113 --- /dev/null +++ b/lib/increase/resources/simulations/card_tokens.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +module Increase + module Resources + class Simulations + class CardTokens + # Simulates tokenizing a card in the sandbox environment. + # + # @overload create(capabilities: nil, expiration: nil, last4: nil, prefix: nil, primary_account_number_length: nil, request_options: {}) + # + # @param capabilities [Array] The capabilities of the outbound card token. + # + # @param expiration [Date] The expiration date of the card. + # + # @param last4 [String] The last 4 digits of the card number. + # + # @param prefix [String] The prefix of the card number, usually the first 8 digits. + # + # @param primary_account_number_length [Integer] The total length of the card number, including prefix and last4. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::CardToken] + # + # @see Increase::Models::Simulations::CardTokenCreateParams + def create(params = {}) + parsed, options = Increase::Simulations::CardTokenCreateParams.dump_request(params) + @client.request( + method: :post, + path: "simulations/card_tokens", + body: parsed, + model: Increase::CardToken, + options: options + ) + end + + # @api private + # + # @param client [Increase::Client] + def initialize(client:) + @client = client + end + end + end + end +end diff --git a/rbi/increase/client.rbi b/rbi/increase/client.rbi index c5a50adaf..0f1dc8dec 100644 --- a/rbi/increase/client.rbi +++ b/rbi/increase/client.rbi @@ -175,6 +175,15 @@ module Increase sig { returns(Increase::Resources::IntrafiExclusions) } attr_reader :intrafi_exclusions + sig { returns(Increase::Resources::CardTokens) } + attr_reader :card_tokens + + sig { returns(Increase::Resources::CardPushTransfers) } + attr_reader :card_push_transfers + + sig { returns(Increase::Resources::CardValidations) } + attr_reader :card_validations + sig { returns(Increase::Resources::Simulations) } attr_reader :simulations diff --git a/rbi/increase/models.rbi b/rbi/increase/models.rbi index 2a63b115e..fc1343cfc 100644 --- a/rbi/increase/models.rbi +++ b/rbi/increase/models.rbi @@ -134,10 +134,42 @@ module Increase CardPurchaseSupplementRetrieveParams = Increase::Models::CardPurchaseSupplementRetrieveParams + CardPushTransfer = Increase::Models::CardPushTransfer + + CardPushTransferApproveParams = + Increase::Models::CardPushTransferApproveParams + + CardPushTransferCancelParams = Increase::Models::CardPushTransferCancelParams + + CardPushTransferCreateParams = Increase::Models::CardPushTransferCreateParams + + CardPushTransferListParams = Increase::Models::CardPushTransferListParams + + CardPushTransferRetrieveParams = + Increase::Models::CardPushTransferRetrieveParams + CardRetrieveParams = Increase::Models::CardRetrieveParams + CardToken = Increase::Models::CardToken + + CardTokenCapabilities = Increase::Models::CardTokenCapabilities + + CardTokenCapabilitiesParams = Increase::Models::CardTokenCapabilitiesParams + + CardTokenListParams = Increase::Models::CardTokenListParams + + CardTokenRetrieveParams = Increase::Models::CardTokenRetrieveParams + CardUpdateParams = Increase::Models::CardUpdateParams + CardValidation = Increase::Models::CardValidation + + CardValidationCreateParams = Increase::Models::CardValidationCreateParams + + CardValidationListParams = Increase::Models::CardValidationListParams + + CardValidationRetrieveParams = Increase::Models::CardValidationRetrieveParams + CheckDeposit = Increase::Models::CheckDeposit CheckDepositCreateParams = Increase::Models::CheckDepositCreateParams diff --git a/rbi/increase/models/card_push_transfer.rbi b/rbi/increase/models/card_push_transfer.rbi new file mode 100644 index 000000000..71265ea60 --- /dev/null +++ b/rbi/increase/models/card_push_transfer.rbi @@ -0,0 +1,1450 @@ +# typed: strong + +module Increase + module Models + class CardPushTransfer < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Increase::CardPushTransfer, Increase::Internal::AnyHash) + end + + # The Card Push Transfer's identifier. + sig { returns(String) } + attr_accessor :id + + # If the transfer is accepted by the recipient bank, this will contain + # supplemental details. + sig { returns(T.nilable(Increase::CardPushTransfer::Acceptance)) } + attr_reader :acceptance + + sig do + params( + acceptance: T.nilable(Increase::CardPushTransfer::Acceptance::OrHash) + ).void + end + attr_writer :acceptance + + # The Account from which the transfer was sent. + sig { returns(String) } + attr_accessor :account_id + + # The transfer amount in USD cents. + sig { returns(Integer) } + attr_accessor :amount + + # If your account requires approvals for transfers and the transfer was approved, + # this will contain details of the approval. + sig { returns(T.nilable(Increase::CardPushTransfer::Approval)) } + attr_reader :approval + + sig do + params( + approval: T.nilable(Increase::CardPushTransfer::Approval::OrHash) + ).void + end + attr_writer :approval + + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + sig do + returns( + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + end + attr_accessor :business_application_identifier + + # If your account requires approvals for transfers and the transfer was not + # approved, this will contain details of the cancellation. + sig { returns(T.nilable(Increase::CardPushTransfer::Cancellation)) } + attr_reader :cancellation + + sig do + params( + cancellation: + T.nilable(Increase::CardPushTransfer::Cancellation::OrHash) + ).void + end + attr_writer :cancellation + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was created. + sig { returns(Time) } + attr_accessor :created_at + + # What object created the transfer, either via the API or the dashboard. + sig { returns(T.nilable(Increase::CardPushTransfer::CreatedBy)) } + attr_reader :created_by + + sig do + params( + created_by: T.nilable(Increase::CardPushTransfer::CreatedBy::OrHash) + ).void + end + attr_writer :created_by + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's + # currency. + sig { returns(Increase::CardPushTransfer::Currency::TaggedSymbol) } + attr_accessor :currency + + # If the transfer is rejected by the card network or the destination financial + # institution, this will contain supplemental details. + sig { returns(T.nilable(Increase::CardPushTransfer::Decline)) } + attr_reader :decline + + sig do + params( + decline: T.nilable(Increase::CardPushTransfer::Decline::OrHash) + ).void + end + attr_writer :decline + + # The idempotency key you chose for this object. This value is unique across + # Increase and is used to ensure that a request is only processed once. Learn more + # about [idempotency](https://increase.com/documentation/idempotency-keys). + sig { returns(T.nilable(String)) } + attr_accessor :idempotency_key + + # The merchant category code (MCC) of the merchant (generally your business) + # sending the transfer. This is a four-digit code that describes the type of + # business or service provided by the merchant. Your program must be approved for + # the specified MCC in order to use it. + sig { returns(String) } + attr_accessor :merchant_category_code + + # The city name of the merchant (generally your business) sending the transfer. + sig { returns(String) } + attr_accessor :merchant_city_name + + # The merchant name shows up as the statement descriptor for the transfer. This is + # typically the name of your business or organization. + sig { returns(String) } + attr_accessor :merchant_name + + # For certain Business Application Identifiers, the statement descriptor is + # `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + # four character prefix that identifies the merchant. + sig { returns(String) } + attr_accessor :merchant_name_prefix + + # The postal code of the merchant (generally your business) sending the transfer. + sig { returns(String) } + attr_accessor :merchant_postal_code + + # The state of the merchant (generally your business) sending the transfer. + sig { returns(String) } + attr_accessor :merchant_state + + # The name of the funds recipient. + sig { returns(String) } + attr_accessor :recipient_name + + # The city of the sender. + sig { returns(String) } + attr_accessor :sender_address_city + + # The address line 1 of the sender. + sig { returns(String) } + attr_accessor :sender_address_line1 + + # The postal code of the sender. + sig { returns(String) } + attr_accessor :sender_address_postal_code + + # The state of the sender. + sig { returns(String) } + attr_accessor :sender_address_state + + # The name of the funds originator. + sig { returns(String) } + attr_accessor :sender_name + + # The Account Number the recipient will see as having sent the transfer. + sig { returns(String) } + attr_accessor :source_account_number_id + + # The lifecycle status of the transfer. + sig { returns(Increase::CardPushTransfer::Status::TaggedSymbol) } + attr_accessor :status + + # After the transfer is submitted to the card network, this will contain + # supplemental details. + sig { returns(T.nilable(Increase::CardPushTransfer::Submission)) } + attr_reader :submission + + sig do + params( + submission: T.nilable(Increase::CardPushTransfer::Submission::OrHash) + ).void + end + attr_writer :submission + + # A constant representing the object's type. For this resource it will always be + # `card_push_transfer`. + sig { returns(Increase::CardPushTransfer::Type::TaggedSymbol) } + attr_accessor :type + + # Card Push Transfers send funds to a recipient's payment card in real-time. + sig do + params( + id: String, + acceptance: T.nilable(Increase::CardPushTransfer::Acceptance::OrHash), + account_id: String, + amount: Integer, + approval: T.nilable(Increase::CardPushTransfer::Approval::OrHash), + business_application_identifier: + Increase::CardPushTransfer::BusinessApplicationIdentifier::OrSymbol, + cancellation: + T.nilable(Increase::CardPushTransfer::Cancellation::OrHash), + created_at: Time, + created_by: T.nilable(Increase::CardPushTransfer::CreatedBy::OrHash), + currency: Increase::CardPushTransfer::Currency::OrSymbol, + decline: T.nilable(Increase::CardPushTransfer::Decline::OrHash), + idempotency_key: T.nilable(String), + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + status: Increase::CardPushTransfer::Status::OrSymbol, + submission: T.nilable(Increase::CardPushTransfer::Submission::OrHash), + type: Increase::CardPushTransfer::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The Card Push Transfer's identifier. + id:, + # If the transfer is accepted by the recipient bank, this will contain + # supplemental details. + acceptance:, + # The Account from which the transfer was sent. + account_id:, + # The transfer amount in USD cents. + amount:, + # If your account requires approvals for transfers and the transfer was approved, + # this will contain details of the approval. + approval:, + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + business_application_identifier:, + # If your account requires approvals for transfers and the transfer was not + # approved, this will contain details of the cancellation. + cancellation:, + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was created. + created_at:, + # What object created the transfer, either via the API or the dashboard. + created_by:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's + # currency. + currency:, + # If the transfer is rejected by the card network or the destination financial + # institution, this will contain supplemental details. + decline:, + # The idempotency key you chose for this object. This value is unique across + # Increase and is used to ensure that a request is only processed once. Learn more + # about [idempotency](https://increase.com/documentation/idempotency-keys). + idempotency_key:, + # The merchant category code (MCC) of the merchant (generally your business) + # sending the transfer. This is a four-digit code that describes the type of + # business or service provided by the merchant. Your program must be approved for + # the specified MCC in order to use it. + merchant_category_code:, + # The city name of the merchant (generally your business) sending the transfer. + merchant_city_name:, + # The merchant name shows up as the statement descriptor for the transfer. This is + # typically the name of your business or organization. + merchant_name:, + # For certain Business Application Identifiers, the statement descriptor is + # `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + # four character prefix that identifies the merchant. + merchant_name_prefix:, + # The postal code of the merchant (generally your business) sending the transfer. + merchant_postal_code:, + # The state of the merchant (generally your business) sending the transfer. + merchant_state:, + # The name of the funds recipient. + recipient_name:, + # The city of the sender. + sender_address_city:, + # The address line 1 of the sender. + sender_address_line1:, + # The postal code of the sender. + sender_address_postal_code:, + # The state of the sender. + sender_address_state:, + # The name of the funds originator. + sender_name:, + # The Account Number the recipient will see as having sent the transfer. + source_account_number_id:, + # The lifecycle status of the transfer. + status:, + # After the transfer is submitted to the card network, this will contain + # supplemental details. + submission:, + # A constant representing the object's type. For this resource it will always be + # `card_push_transfer`. + type: + ) + end + + sig do + override.returns( + { + id: String, + acceptance: T.nilable(Increase::CardPushTransfer::Acceptance), + account_id: String, + amount: Integer, + approval: T.nilable(Increase::CardPushTransfer::Approval), + business_application_identifier: + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol, + cancellation: T.nilable(Increase::CardPushTransfer::Cancellation), + created_at: Time, + created_by: T.nilable(Increase::CardPushTransfer::CreatedBy), + currency: Increase::CardPushTransfer::Currency::TaggedSymbol, + decline: T.nilable(Increase::CardPushTransfer::Decline), + idempotency_key: T.nilable(String), + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + status: Increase::CardPushTransfer::Status::TaggedSymbol, + submission: T.nilable(Increase::CardPushTransfer::Submission), + type: Increase::CardPushTransfer::Type::TaggedSymbol + } + ) + end + def to_hash + end + + class Acceptance < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransfer::Acceptance, + Increase::Internal::AnyHash + ) + end + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was accepted by the issuing bank. + sig { returns(Time) } + attr_accessor :accepted_at + + # The authorization identification response from the issuing bank. + sig { returns(String) } + attr_accessor :authorization_identification_response + + # The result of the Card Verification Value 2 match. + sig do + returns( + T.nilable( + Increase::CardPushTransfer::Acceptance::CardVerificationValue2Result::TaggedSymbol + ) + ) + end + attr_accessor :card_verification_value2_result + + # A unique identifier for the transaction on the card network. + sig { returns(T.nilable(String)) } + attr_accessor :network_transaction_identifier + + # If the transfer is accepted by the recipient bank, this will contain + # supplemental details. + sig do + params( + accepted_at: Time, + authorization_identification_response: String, + card_verification_value2_result: + T.nilable( + Increase::CardPushTransfer::Acceptance::CardVerificationValue2Result::OrSymbol + ), + network_transaction_identifier: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was accepted by the issuing bank. + accepted_at:, + # The authorization identification response from the issuing bank. + authorization_identification_response:, + # The result of the Card Verification Value 2 match. + card_verification_value2_result:, + # A unique identifier for the transaction on the card network. + network_transaction_identifier: + ) + end + + sig do + override.returns( + { + accepted_at: Time, + authorization_identification_response: String, + card_verification_value2_result: + T.nilable( + Increase::CardPushTransfer::Acceptance::CardVerificationValue2Result::TaggedSymbol + ), + network_transaction_identifier: T.nilable(String) + } + ) + end + def to_hash + end + + # The result of the Card Verification Value 2 match. + module CardVerificationValue2Result + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPushTransfer::Acceptance::CardVerificationValue2Result + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The Card Verification Value 2 (CVV2) matches the expected value. + MATCH = + T.let( + :match, + Increase::CardPushTransfer::Acceptance::CardVerificationValue2Result::TaggedSymbol + ) + + # The Card Verification Value 2 (CVV2) does not match the expected value. + NO_MATCH = + T.let( + :no_match, + Increase::CardPushTransfer::Acceptance::CardVerificationValue2Result::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPushTransfer::Acceptance::CardVerificationValue2Result::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class Approval < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransfer::Approval, + Increase::Internal::AnyHash + ) + end + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was approved. + sig { returns(Time) } + attr_accessor :approved_at + + # If the Transfer was approved by a user in the dashboard, the email address of + # that user. + sig { returns(T.nilable(String)) } + attr_accessor :approved_by + + # If your account requires approvals for transfers and the transfer was approved, + # this will contain details of the approval. + sig do + params(approved_at: Time, approved_by: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was approved. + approved_at:, + # If the Transfer was approved by a user in the dashboard, the email address of + # that user. + approved_by: + ) + end + + sig do + override.returns( + { approved_at: Time, approved_by: T.nilable(String) } + ) + end + def to_hash + end + end + + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + module BusinessApplicationIdentifier + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPushTransfer::BusinessApplicationIdentifier + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Account to Account + ACCOUNT_TO_ACCOUNT = + T.let( + :account_to_account, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Business to Business + BUSINESS_TO_BUSINESS = + T.let( + :business_to_business, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Money Transfer Bank Initiated + MONEY_TRANSFER_BANK_INITIATED = + T.let( + :money_transfer_bank_initiated, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Non-Card Bill Payment + NON_CARD_BILL_PAYMENT = + T.let( + :non_card_bill_payment, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Consumer Bill Payment + CONSUMER_BILL_PAYMENT = + T.let( + :consumer_bill_payment, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Card Bill Payment + CARD_BILL_PAYMENT = + T.let( + :card_bill_payment, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Funds Disbursement + FUNDS_DISBURSEMENT = + T.let( + :funds_disbursement, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Funds Transfer + FUNDS_TRANSFER = + T.let( + :funds_transfer, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Loyalty and Offers + LOYALTY_AND_OFFERS = + T.let( + :loyalty_and_offers, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Merchant Disbursement + MERCHANT_DISBURSEMENT = + T.let( + :merchant_disbursement, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Merchant Payment + MERCHANT_PAYMENT = + T.let( + :merchant_payment, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Person to Person + PERSON_TO_PERSON = + T.let( + :person_to_person, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Top Up + TOP_UP = + T.let( + :top_up, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Wallet Transfer + WALLET_TRANSFER = + T.let( + :wallet_transfer, + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPushTransfer::BusinessApplicationIdentifier::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Cancellation < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransfer::Cancellation, + Increase::Internal::AnyHash + ) + end + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the Transfer was canceled. + sig { returns(Time) } + attr_accessor :canceled_at + + # If the Transfer was canceled by a user in the dashboard, the email address of + # that user. + sig { returns(T.nilable(String)) } + attr_accessor :canceled_by + + # If your account requires approvals for transfers and the transfer was not + # approved, this will contain details of the cancellation. + sig do + params(canceled_at: Time, canceled_by: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the Transfer was canceled. + canceled_at:, + # If the Transfer was canceled by a user in the dashboard, the email address of + # that user. + canceled_by: + ) + end + + sig do + override.returns( + { canceled_at: Time, canceled_by: T.nilable(String) } + ) + end + def to_hash + end + end + + class CreatedBy < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransfer::CreatedBy, + Increase::Internal::AnyHash + ) + end + + # If present, details about the API key that created the transfer. + sig do + returns(T.nilable(Increase::CardPushTransfer::CreatedBy::APIKey)) + end + attr_reader :api_key + + sig do + params( + api_key: + T.nilable(Increase::CardPushTransfer::CreatedBy::APIKey::OrHash) + ).void + end + attr_writer :api_key + + # The type of object that created this transfer. + sig do + returns(Increase::CardPushTransfer::CreatedBy::Category::TaggedSymbol) + end + attr_accessor :category + + # If present, details about the OAuth Application that created the transfer. + sig do + returns( + T.nilable(Increase::CardPushTransfer::CreatedBy::OAuthApplication) + ) + end + attr_reader :oauth_application + + sig do + params( + oauth_application: + T.nilable( + Increase::CardPushTransfer::CreatedBy::OAuthApplication::OrHash + ) + ).void + end + attr_writer :oauth_application + + # If present, details about the User that created the transfer. + sig { returns(T.nilable(Increase::CardPushTransfer::CreatedBy::User)) } + attr_reader :user + + sig do + params( + user: T.nilable(Increase::CardPushTransfer::CreatedBy::User::OrHash) + ).void + end + attr_writer :user + + # What object created the transfer, either via the API or the dashboard. + sig do + params( + api_key: + T.nilable(Increase::CardPushTransfer::CreatedBy::APIKey::OrHash), + category: Increase::CardPushTransfer::CreatedBy::Category::OrSymbol, + oauth_application: + T.nilable( + Increase::CardPushTransfer::CreatedBy::OAuthApplication::OrHash + ), + user: T.nilable(Increase::CardPushTransfer::CreatedBy::User::OrHash) + ).returns(T.attached_class) + end + def self.new( + # If present, details about the API key that created the transfer. + api_key:, + # The type of object that created this transfer. + category:, + # If present, details about the OAuth Application that created the transfer. + oauth_application:, + # If present, details about the User that created the transfer. + user: + ) + end + + sig do + override.returns( + { + api_key: T.nilable(Increase::CardPushTransfer::CreatedBy::APIKey), + category: + Increase::CardPushTransfer::CreatedBy::Category::TaggedSymbol, + oauth_application: + T.nilable( + Increase::CardPushTransfer::CreatedBy::OAuthApplication + ), + user: T.nilable(Increase::CardPushTransfer::CreatedBy::User) + } + ) + end + def to_hash + end + + class APIKey < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransfer::CreatedBy::APIKey, + Increase::Internal::AnyHash + ) + end + + # The description set for the API key when it was created. + sig { returns(T.nilable(String)) } + attr_accessor :description + + # If present, details about the API key that created the transfer. + sig do + params(description: T.nilable(String)).returns(T.attached_class) + end + def self.new( + # The description set for the API key when it was created. + description: + ) + end + + sig { override.returns({ description: T.nilable(String) }) } + def to_hash + end + end + + # The type of object that created this transfer. + module Category + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Increase::CardPushTransfer::CreatedBy::Category) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # An API key. Details will be under the `api_key` object. + API_KEY = + T.let( + :api_key, + Increase::CardPushTransfer::CreatedBy::Category::TaggedSymbol + ) + + # An OAuth application you connected to Increase. Details will be under the `oauth_application` object. + OAUTH_APPLICATION = + T.let( + :oauth_application, + Increase::CardPushTransfer::CreatedBy::Category::TaggedSymbol + ) + + # A User in the Increase dashboard. Details will be under the `user` object. + USER = + T.let( + :user, + Increase::CardPushTransfer::CreatedBy::Category::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPushTransfer::CreatedBy::Category::TaggedSymbol + ] + ) + end + def self.values + end + end + + class OAuthApplication < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransfer::CreatedBy::OAuthApplication, + Increase::Internal::AnyHash + ) + end + + # The name of the OAuth Application. + sig { returns(String) } + attr_accessor :name + + # If present, details about the OAuth Application that created the transfer. + sig { params(name: String).returns(T.attached_class) } + def self.new( + # The name of the OAuth Application. + name: + ) + end + + sig { override.returns({ name: String }) } + def to_hash + end + end + + class User < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransfer::CreatedBy::User, + Increase::Internal::AnyHash + ) + end + + # The email address of the User. + sig { returns(String) } + attr_accessor :email + + # If present, details about the User that created the transfer. + sig { params(email: String).returns(T.attached_class) } + def self.new( + # The email address of the User. + email: + ) + end + + sig { override.returns({ email: String }) } + def to_hash + end + end + end + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's + # currency. + module Currency + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Increase::CardPushTransfer::Currency) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Canadian Dollar (CAD) + CAD = T.let(:CAD, Increase::CardPushTransfer::Currency::TaggedSymbol) + + # Swiss Franc (CHF) + CHF = T.let(:CHF, Increase::CardPushTransfer::Currency::TaggedSymbol) + + # Euro (EUR) + EUR = T.let(:EUR, Increase::CardPushTransfer::Currency::TaggedSymbol) + + # British Pound (GBP) + GBP = T.let(:GBP, Increase::CardPushTransfer::Currency::TaggedSymbol) + + # Japanese Yen (JPY) + JPY = T.let(:JPY, Increase::CardPushTransfer::Currency::TaggedSymbol) + + # US Dollar (USD) + USD = T.let(:USD, Increase::CardPushTransfer::Currency::TaggedSymbol) + + sig do + override.returns( + T::Array[Increase::CardPushTransfer::Currency::TaggedSymbol] + ) + end + def self.values + end + end + + class Decline < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransfer::Decline, + Increase::Internal::AnyHash + ) + end + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer declined. + sig { returns(Time) } + attr_accessor :declined_at + + # A unique identifier for the transaction on the card network. + sig { returns(T.nilable(String)) } + attr_accessor :network_transaction_identifier + + # The reason why the transfer was declined. + sig do + returns(Increase::CardPushTransfer::Decline::Reason::TaggedSymbol) + end + attr_accessor :reason + + # If the transfer is rejected by the card network or the destination financial + # institution, this will contain supplemental details. + sig do + params( + declined_at: Time, + network_transaction_identifier: T.nilable(String), + reason: Increase::CardPushTransfer::Decline::Reason::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer declined. + declined_at:, + # A unique identifier for the transaction on the card network. + network_transaction_identifier:, + # The reason why the transfer was declined. + reason: + ) + end + + sig do + override.returns( + { + declined_at: Time, + network_transaction_identifier: T.nilable(String), + reason: Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + } + ) + end + def to_hash + end + + # The reason why the transfer was declined. + module Reason + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Increase::CardPushTransfer::Decline::Reason) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The card issuer has declined the transaction without providing a specific reason. + DO_NOT_HONOR = + T.let( + :do_not_honor, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The number of transactions for the card has exceeded the limit set by the issuer. + ACTIVITY_COUNT_LIMIT_EXCEEDED = + T.let( + :activity_count_limit_exceeded, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The card issuer requires the cardholder to contact them for further information regarding the transaction. + REFER_TO_CARD_ISSUER = + T.let( + :refer_to_card_issuer, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The card issuer requires the cardholder to contact them due to a special condition related to the transaction. + REFER_TO_CARD_ISSUER_SPECIAL_CONDITION = + T.let( + :refer_to_card_issuer_special_condition, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The merchant is not valid for this transaction. + INVALID_MERCHANT = + T.let( + :invalid_merchant, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The card should be retained by the terminal. + PICK_UP_CARD = + T.let( + :pick_up_card, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # An error occurred during processing of the transaction. + ERROR = + T.let( + :error, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The card should be retained by the terminal due to a special condition. + PICK_UP_CARD_SPECIAL = + T.let( + :pick_up_card_special, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The transaction is invalid and cannot be processed. + INVALID_TRANSACTION = + T.let( + :invalid_transaction, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The amount of the transaction is invalid. + INVALID_AMOUNT = + T.let( + :invalid_amount, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The account number provided is invalid. + INVALID_ACCOUNT_NUMBER = + T.let( + :invalid_account_number, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The issuer of the card could not be found. + NO_SUCH_ISSUER = + T.let( + :no_such_issuer, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The transaction should be re-entered for processing. + RE_ENTER_TRANSACTION = + T.let( + :re_enter_transaction, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # There is no credit account associated with the card. + NO_CREDIT_ACCOUNT = + T.let( + :no_credit_account, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The card should be retained by the terminal because it has been reported lost. + PICK_UP_CARD_LOST = + T.let( + :pick_up_card_lost, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The card should be retained by the terminal because it has been reported stolen. + PICK_UP_CARD_STOLEN = + T.let( + :pick_up_card_stolen, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The account associated with the card has been closed. + CLOSED_ACCOUNT = + T.let( + :closed_account, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # There are insufficient funds in the account to complete the transaction. + INSUFFICIENT_FUNDS = + T.let( + :insufficient_funds, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # There is no checking account associated with the card. + NO_CHECKING_ACCOUNT = + T.let( + :no_checking_account, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # There is no savings account associated with the card. + NO_SAVINGS_ACCOUNT = + T.let( + :no_savings_account, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The card has expired and cannot be used for transactions. + EXPIRED_CARD = + T.let( + :expired_card, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The transaction is not permitted for this cardholder. + TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER = + T.let( + :transaction_not_permitted_to_cardholder, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The transaction is not allowed at this terminal. + TRANSACTION_NOT_ALLOWED_AT_TERMINAL = + T.let( + :transaction_not_allowed_at_terminal, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The transaction has been flagged as suspected fraud and cannot be processed. + SUSPECTED_FRAUD = + T.let( + :suspected_fraud, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The amount of activity on the card has exceeded the limit set by the issuer. + ACTIVITY_AMOUNT_LIMIT_EXCEEDED = + T.let( + :activity_amount_limit_exceeded, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The card has restrictions that prevent it from being used for this transaction. + RESTRICTED_CARD = + T.let( + :restricted_card, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # A security violation has occurred, preventing the transaction from being processed. + SECURITY_VIOLATION = + T.let( + :security_violation, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The transaction does not meet the anti-money laundering requirements set by the issuer. + TRANSACTION_DOES_NOT_FULFILL_ANTI_MONEY_LAUNDERING_REQUIREMENT = + T.let( + :transaction_does_not_fulfill_anti_money_laundering_requirement, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The first use of the card has been blocked by the issuer. + BLOCKED_FIRST_USE = + T.let( + :blocked_first_use, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The credit issuer is currently unavailable to process the transaction. + CREDIT_ISSUER_UNAVAILABLE = + T.let( + :credit_issuer_unavailable, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The card verification value (CVV) results were negative, indicating a potential issue with the card. + NEGATIVE_CARD_VERIFICATION_VALUE_RESULTS = + T.let( + :negative_card_verification_value_results, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The issuer of the card is currently unavailable to process the transaction. + ISSUER_UNAVAILABLE = + T.let( + :issuer_unavailable, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The financial institution associated with the card could not be found. + FINANCIAL_INSTITUTION_CANNOT_BE_FOUND = + T.let( + :financial_institution_cannot_be_found, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The transaction cannot be completed due to an unspecified reason. + TRANSACTION_CANNOT_BE_COMPLETED = + T.let( + :transaction_cannot_be_completed, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The transaction is a duplicate of a previous transaction and cannot be processed again. + DUPLICATE_TRANSACTION = + T.let( + :duplicate_transaction, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # A system malfunction occurred, preventing the transaction from being processed. + SYSTEM_MALFUNCTION = + T.let( + :system_malfunction, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # Additional customer authentication is required to complete the transaction. + ADDITIONAL_CUSTOMER_AUTHENTICATION_REQUIRED = + T.let( + :additional_customer_authentication_required, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The surcharge amount applied to the transaction is not permitted by the issuer. + SURCHARGE_AMOUNT_NOT_PERMITTED = + T.let( + :surcharge_amount_not_permitted, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # The transaction was declined due to a failure in verifying the CVV2 code. + DECLINE_FOR_CVV2_FAILURE = + T.let( + :decline_for_cvv2_failure, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # A stop payment order has been placed on this transaction. + STOP_PAYMENT_ORDER = + T.let( + :stop_payment_order, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # An order has been placed to revoke authorization for this transaction. + REVOCATION_OF_AUTHORIZATION_ORDER = + T.let( + :revocation_of_authorization_order, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + # An order has been placed to revoke all authorizations for this cardholder. + REVOCATION_OF_ALL_AUTHORIZATIONS_ORDER = + T.let( + :revocation_of_all_authorizations_order, + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPushTransfer::Decline::Reason::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # The lifecycle status of the transfer. + module Status + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Increase::CardPushTransfer::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The transfer is pending approval. + PENDING_APPROVAL = + T.let( + :pending_approval, + Increase::CardPushTransfer::Status::TaggedSymbol + ) + + # The transfer has been canceled. + CANCELED = + T.let(:canceled, Increase::CardPushTransfer::Status::TaggedSymbol) + + # The transfer is pending review by Increase. + PENDING_REVIEWING = + T.let( + :pending_reviewing, + Increase::CardPushTransfer::Status::TaggedSymbol + ) + + # The transfer requires attention from an Increase operator. + REQUIRES_ATTENTION = + T.let( + :requires_attention, + Increase::CardPushTransfer::Status::TaggedSymbol + ) + + # The transfer is queued to be submitted to the card network. + PENDING_SUBMISSION = + T.let( + :pending_submission, + Increase::CardPushTransfer::Status::TaggedSymbol + ) + + # The transfer has been submitted and is pending a response from the card network. + SUBMITTED = + T.let(:submitted, Increase::CardPushTransfer::Status::TaggedSymbol) + + # The transfer has been sent successfully and is complete. + COMPLETE = + T.let(:complete, Increase::CardPushTransfer::Status::TaggedSymbol) + + # The transfer was declined by the network or the recipient's bank. + DECLINED = + T.let(:declined, Increase::CardPushTransfer::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[Increase::CardPushTransfer::Status::TaggedSymbol] + ) + end + def self.values + end + end + + class Submission < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransfer::Submission, + Increase::Internal::AnyHash + ) + end + + # A 12-digit retrieval reference number that identifies the transfer. Usually a + # combination of a timestamp and the trace number. + sig { returns(String) } + attr_accessor :retrieval_reference_number + + # A unique reference for the transfer. + sig { returns(String) } + attr_accessor :sender_reference + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was submitted to card network. + sig { returns(Time) } + attr_accessor :submitted_at + + # A 6-digit trace number that identifies the transfer within a small window of + # time. + sig { returns(String) } + attr_accessor :trace_number + + # After the transfer is submitted to the card network, this will contain + # supplemental details. + sig do + params( + retrieval_reference_number: String, + sender_reference: String, + submitted_at: Time, + trace_number: String + ).returns(T.attached_class) + end + def self.new( + # A 12-digit retrieval reference number that identifies the transfer. Usually a + # combination of a timestamp and the trace number. + retrieval_reference_number:, + # A unique reference for the transfer. + sender_reference:, + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was submitted to card network. + submitted_at:, + # A 6-digit trace number that identifies the transfer within a small window of + # time. + trace_number: + ) + end + + sig do + override.returns( + { + retrieval_reference_number: String, + sender_reference: String, + submitted_at: Time, + trace_number: String + } + ) + end + def to_hash + end + end + + # A constant representing the object's type. For this resource it will always be + # `card_push_transfer`. + module Type + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Increase::CardPushTransfer::Type) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD_PUSH_TRANSFER = + T.let( + :card_push_transfer, + Increase::CardPushTransfer::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Increase::CardPushTransfer::Type::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/increase/models/card_push_transfer_approve_params.rbi b/rbi/increase/models/card_push_transfer_approve_params.rbi new file mode 100644 index 000000000..3924fe7eb --- /dev/null +++ b/rbi/increase/models/card_push_transfer_approve_params.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module Increase + module Models + class CardPushTransferApproveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransferApproveParams, + Increase::Internal::AnyHash + ) + end + + sig do + params(request_options: Increase::RequestOptions::OrHash).returns( + T.attached_class + ) + end + def self.new(request_options: {}) + end + + sig { override.returns({ request_options: Increase::RequestOptions }) } + def to_hash + end + end + end +end diff --git a/rbi/increase/models/card_push_transfer_cancel_params.rbi b/rbi/increase/models/card_push_transfer_cancel_params.rbi new file mode 100644 index 000000000..0fa5239cb --- /dev/null +++ b/rbi/increase/models/card_push_transfer_cancel_params.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module Increase + module Models + class CardPushTransferCancelParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransferCancelParams, + Increase::Internal::AnyHash + ) + end + + sig do + params(request_options: Increase::RequestOptions::OrHash).returns( + T.attached_class + ) + end + def self.new(request_options: {}) + end + + sig { override.returns({ request_options: Increase::RequestOptions }) } + def to_hash + end + end + end +end diff --git a/rbi/increase/models/card_push_transfer_create_params.rbi b/rbi/increase/models/card_push_transfer_create_params.rbi new file mode 100644 index 000000000..49bc1610e --- /dev/null +++ b/rbi/increase/models/card_push_transfer_create_params.rbi @@ -0,0 +1,325 @@ +# typed: strong + +module Increase + module Models + class CardPushTransferCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransferCreateParams, + Increase::Internal::AnyHash + ) + end + + # The transfer amount in USD cents. For Card Push transfers, must be positive. + sig { returns(Integer) } + attr_accessor :amount + + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + sig do + returns( + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::OrSymbol + ) + end + attr_accessor :business_application_identifier + + # The Increase identifier for the Card Token that represents the card number + # you're pushing funds to. + sig { returns(String) } + attr_accessor :card_token_id + + # The merchant category code (MCC) of the merchant (generally your business) + # sending the transfer. This is a four-digit code that describes the type of + # business or service provided by the merchant. Your program must be approved for + # the specified MCC in order to use it. + sig { returns(String) } + attr_accessor :merchant_category_code + + # The city name of the merchant (generally your business) sending the transfer. + sig { returns(String) } + attr_accessor :merchant_city_name + + # The merchant name shows up as the statement descriptor for the transfer. This is + # typically the name of your business or organization. + sig { returns(String) } + attr_accessor :merchant_name + + # For certain Business Application Identifiers, the statement descriptor is + # `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + # four character prefix that identifies the merchant. + sig { returns(String) } + attr_accessor :merchant_name_prefix + + # The postal code of the merchant (generally your business) sending the transfer. + sig { returns(String) } + attr_accessor :merchant_postal_code + + # The state of the merchant (generally your business) sending the transfer. + sig { returns(String) } + attr_accessor :merchant_state + + # The name of the funds recipient. + sig { returns(String) } + attr_accessor :recipient_name + + # The city of the sender. + sig { returns(String) } + attr_accessor :sender_address_city + + # The address line 1 of the sender. + sig { returns(String) } + attr_accessor :sender_address_line1 + + # The postal code of the sender. + sig { returns(String) } + attr_accessor :sender_address_postal_code + + # The state of the sender. + sig { returns(String) } + attr_accessor :sender_address_state + + # The name of the funds originator. + sig { returns(String) } + attr_accessor :sender_name + + # The identifier of the Account Number from which to send the transfer. + sig { returns(String) } + attr_accessor :source_account_number_id + + # Whether the transfer requires explicit approval via the dashboard or API. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :require_approval + + sig { params(require_approval: T::Boolean).void } + attr_writer :require_approval + + sig do + params( + amount: Integer, + business_application_identifier: + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::OrSymbol, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + require_approval: T::Boolean, + request_options: Increase::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The transfer amount in USD cents. For Card Push transfers, must be positive. + amount:, + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + business_application_identifier:, + # The Increase identifier for the Card Token that represents the card number + # you're pushing funds to. + card_token_id:, + # The merchant category code (MCC) of the merchant (generally your business) + # sending the transfer. This is a four-digit code that describes the type of + # business or service provided by the merchant. Your program must be approved for + # the specified MCC in order to use it. + merchant_category_code:, + # The city name of the merchant (generally your business) sending the transfer. + merchant_city_name:, + # The merchant name shows up as the statement descriptor for the transfer. This is + # typically the name of your business or organization. + merchant_name:, + # For certain Business Application Identifiers, the statement descriptor is + # `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + # four character prefix that identifies the merchant. + merchant_name_prefix:, + # The postal code of the merchant (generally your business) sending the transfer. + merchant_postal_code:, + # The state of the merchant (generally your business) sending the transfer. + merchant_state:, + # The name of the funds recipient. + recipient_name:, + # The city of the sender. + sender_address_city:, + # The address line 1 of the sender. + sender_address_line1:, + # The postal code of the sender. + sender_address_postal_code:, + # The state of the sender. + sender_address_state:, + # The name of the funds originator. + sender_name:, + # The identifier of the Account Number from which to send the transfer. + source_account_number_id:, + # Whether the transfer requires explicit approval via the dashboard or API. + require_approval: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + amount: Integer, + business_application_identifier: + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::OrSymbol, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + require_approval: T::Boolean, + request_options: Increase::RequestOptions + } + ) + end + def to_hash + end + + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + module BusinessApplicationIdentifier + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Account to Account + ACCOUNT_TO_ACCOUNT = + T.let( + :account_to_account, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Business to Business + BUSINESS_TO_BUSINESS = + T.let( + :business_to_business, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Money Transfer Bank Initiated + MONEY_TRANSFER_BANK_INITIATED = + T.let( + :money_transfer_bank_initiated, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Non-Card Bill Payment + NON_CARD_BILL_PAYMENT = + T.let( + :non_card_bill_payment, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Consumer Bill Payment + CONSUMER_BILL_PAYMENT = + T.let( + :consumer_bill_payment, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Card Bill Payment + CARD_BILL_PAYMENT = + T.let( + :card_bill_payment, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Funds Disbursement + FUNDS_DISBURSEMENT = + T.let( + :funds_disbursement, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Funds Transfer + FUNDS_TRANSFER = + T.let( + :funds_transfer, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Loyalty and Offers + LOYALTY_AND_OFFERS = + T.let( + :loyalty_and_offers, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Merchant Disbursement + MERCHANT_DISBURSEMENT = + T.let( + :merchant_disbursement, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Merchant Payment + MERCHANT_PAYMENT = + T.let( + :merchant_payment, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Person to Person + PERSON_TO_PERSON = + T.let( + :person_to_person, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Top Up + TOP_UP = + T.let( + :top_up, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + # Wallet Transfer + WALLET_TRANSFER = + T.let( + :wallet_transfer, + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/increase/models/card_push_transfer_list_params.rbi b/rbi/increase/models/card_push_transfer_list_params.rbi new file mode 100644 index 000000000..fb88237e2 --- /dev/null +++ b/rbi/increase/models/card_push_transfer_list_params.rbi @@ -0,0 +1,329 @@ +# typed: strong + +module Increase + module Models + class CardPushTransferListParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransferListParams, + Increase::Internal::AnyHash + ) + end + + # Filter Card Push Transfers to ones belonging to the specified Account. + sig { returns(T.nilable(String)) } + attr_reader :account_id + + sig { params(account_id: String).void } + attr_writer :account_id + + sig do + returns(T.nilable(Increase::CardPushTransferListParams::CreatedAt)) + end + attr_reader :created_at + + sig do + params( + created_at: Increase::CardPushTransferListParams::CreatedAt::OrHash + ).void + end + attr_writer :created_at + + # Return the page of entries after this one. + sig { returns(T.nilable(String)) } + attr_reader :cursor + + sig { params(cursor: String).void } + attr_writer :cursor + + # Filter records to the one with the specified `idempotency_key` you chose for + # that object. This value is unique across Increase and is used to ensure that a + # request is only processed once. Learn more about + # [idempotency](https://increase.com/documentation/idempotency-keys). + sig { returns(T.nilable(String)) } + attr_reader :idempotency_key + + sig { params(idempotency_key: String).void } + attr_writer :idempotency_key + + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + sig { returns(T.nilable(Integer)) } + attr_reader :limit + + sig { params(limit: Integer).void } + attr_writer :limit + + sig { returns(T.nilable(Increase::CardPushTransferListParams::Status)) } + attr_reader :status + + sig do + params( + status: Increase::CardPushTransferListParams::Status::OrHash + ).void + end + attr_writer :status + + sig do + params( + account_id: String, + created_at: Increase::CardPushTransferListParams::CreatedAt::OrHash, + cursor: String, + idempotency_key: String, + limit: Integer, + status: Increase::CardPushTransferListParams::Status::OrHash, + request_options: Increase::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Filter Card Push Transfers to ones belonging to the specified Account. + account_id: nil, + created_at: nil, + # Return the page of entries after this one. + cursor: nil, + # Filter records to the one with the specified `idempotency_key` you chose for + # that object. This value is unique across Increase and is used to ensure that a + # request is only processed once. Learn more about + # [idempotency](https://increase.com/documentation/idempotency-keys). + idempotency_key: nil, + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + limit: nil, + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + account_id: String, + created_at: Increase::CardPushTransferListParams::CreatedAt, + cursor: String, + idempotency_key: String, + limit: Integer, + status: Increase::CardPushTransferListParams::Status, + request_options: Increase::RequestOptions + } + ) + end + def to_hash + end + + class CreatedAt < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransferListParams::CreatedAt, + Increase::Internal::AnyHash + ) + end + + # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :after + + sig { params(after: Time).void } + attr_writer :after + + # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :before + + sig { params(before: Time).void } + attr_writer :before + + # Return results on or after this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :on_or_after + + sig { params(on_or_after: Time).void } + attr_writer :on_or_after + + # Return results on or before this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :on_or_before + + sig { params(on_or_before: Time).void } + attr_writer :on_or_before + + sig do + params( + after: Time, + before: Time, + on_or_after: Time, + on_or_before: Time + ).returns(T.attached_class) + end + def self.new( + # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + after: nil, + # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + before: nil, + # Return results on or after this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + on_or_after: nil, + # Return results on or before this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + on_or_before: nil + ) + end + + sig do + override.returns( + { after: Time, before: Time, on_or_after: Time, on_or_before: Time } + ) + end + def to_hash + end + end + + class Status < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransferListParams::Status, + Increase::Internal::AnyHash + ) + end + + # Filter Card Push Transfers by status. For GET requests, this should be encoded + # as a comma-delimited string, such as `?in=one,two,three`. + sig do + returns( + T.nilable( + T::Array[ + Increase::CardPushTransferListParams::Status::In::OrSymbol + ] + ) + ) + end + attr_reader :in_ + + sig do + params( + in_: + T::Array[ + Increase::CardPushTransferListParams::Status::In::OrSymbol + ] + ).void + end + attr_writer :in_ + + sig do + params( + in_: + T::Array[ + Increase::CardPushTransferListParams::Status::In::OrSymbol + ] + ).returns(T.attached_class) + end + def self.new( + # Filter Card Push Transfers by status. For GET requests, this should be encoded + # as a comma-delimited string, such as `?in=one,two,three`. + in_: nil + ) + end + + sig do + override.returns( + { + in_: + T::Array[ + Increase::CardPushTransferListParams::Status::In::OrSymbol + ] + } + ) + end + def to_hash + end + + module In + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Increase::CardPushTransferListParams::Status::In) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The transfer is pending approval. + PENDING_APPROVAL = + T.let( + :pending_approval, + Increase::CardPushTransferListParams::Status::In::TaggedSymbol + ) + + # The transfer has been canceled. + CANCELED = + T.let( + :canceled, + Increase::CardPushTransferListParams::Status::In::TaggedSymbol + ) + + # The transfer is pending review by Increase. + PENDING_REVIEWING = + T.let( + :pending_reviewing, + Increase::CardPushTransferListParams::Status::In::TaggedSymbol + ) + + # The transfer requires attention from an Increase operator. + REQUIRES_ATTENTION = + T.let( + :requires_attention, + Increase::CardPushTransferListParams::Status::In::TaggedSymbol + ) + + # The transfer is queued to be submitted to the card network. + PENDING_SUBMISSION = + T.let( + :pending_submission, + Increase::CardPushTransferListParams::Status::In::TaggedSymbol + ) + + # The transfer has been submitted and is pending a response from the card network. + SUBMITTED = + T.let( + :submitted, + Increase::CardPushTransferListParams::Status::In::TaggedSymbol + ) + + # The transfer has been sent successfully and is complete. + COMPLETE = + T.let( + :complete, + Increase::CardPushTransferListParams::Status::In::TaggedSymbol + ) + + # The transfer was declined by the network or the recipient's bank. + DECLINED = + T.let( + :declined, + Increase::CardPushTransferListParams::Status::In::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPushTransferListParams::Status::In::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/increase/models/card_push_transfer_retrieve_params.rbi b/rbi/increase/models/card_push_transfer_retrieve_params.rbi new file mode 100644 index 000000000..195f378e4 --- /dev/null +++ b/rbi/increase/models/card_push_transfer_retrieve_params.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module Increase + module Models + class CardPushTransferRetrieveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::CardPushTransferRetrieveParams, + Increase::Internal::AnyHash + ) + end + + sig do + params(request_options: Increase::RequestOptions::OrHash).returns( + T.attached_class + ) + end + def self.new(request_options: {}) + end + + sig { override.returns({ request_options: Increase::RequestOptions }) } + def to_hash + end + end + end +end diff --git a/rbi/increase/models/card_token.rbi b/rbi/increase/models/card_token.rbi new file mode 100644 index 000000000..735a48bf1 --- /dev/null +++ b/rbi/increase/models/card_token.rbi @@ -0,0 +1,108 @@ +# typed: strong + +module Increase + module Models + class CardToken < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias { T.any(Increase::CardToken, Increase::Internal::AnyHash) } + + # The Card Token's identifier. + sig { returns(String) } + attr_accessor :id + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the card token was created. + sig { returns(Time) } + attr_accessor :created_at + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the card + # expires. + sig { returns(Date) } + attr_accessor :expiration_date + + # The last 4 digits of the card number. + sig { returns(String) } + attr_accessor :last4 + + # The length of the card number. + sig { returns(Integer) } + attr_accessor :length + + # The prefix of the card number, usually 8 digits. + sig { returns(String) } + attr_accessor :prefix + + # A constant representing the object's type. For this resource it will always be + # `card_token`. + sig { returns(Increase::CardToken::Type::TaggedSymbol) } + attr_accessor :type + + # Card Tokens represent a tokenized card number that can be used for Card Push + # Transfers and Card Validations. + sig do + params( + id: String, + created_at: Time, + expiration_date: Date, + last4: String, + length: Integer, + prefix: String, + type: Increase::CardToken::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The Card Token's identifier. + id:, + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the card token was created. + created_at:, + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the card + # expires. + expiration_date:, + # The last 4 digits of the card number. + last4:, + # The length of the card number. + length:, + # The prefix of the card number, usually 8 digits. + prefix:, + # A constant representing the object's type. For this resource it will always be + # `card_token`. + type: + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + expiration_date: Date, + last4: String, + length: Integer, + prefix: String, + type: Increase::CardToken::Type::TaggedSymbol + } + ) + end + def to_hash + end + + # A constant representing the object's type. For this resource it will always be + # `card_token`. + module Type + extend Increase::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, Increase::CardToken::Type) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD_TOKEN = T.let(:card_token, Increase::CardToken::Type::TaggedSymbol) + + sig do + override.returns(T::Array[Increase::CardToken::Type::TaggedSymbol]) + end + def self.values + end + end + end + end +end diff --git a/rbi/increase/models/card_token_capabilities.rbi b/rbi/increase/models/card_token_capabilities.rbi new file mode 100644 index 000000000..33c2c4a8e --- /dev/null +++ b/rbi/increase/models/card_token_capabilities.rbi @@ -0,0 +1,250 @@ +# typed: strong + +module Increase + module Models + class CardTokenCapabilities < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Increase::CardTokenCapabilities, Increase::Internal::AnyHash) + end + + # Each route represent a path e.g., a push transfer can take. + sig { returns(T::Array[Increase::CardTokenCapabilities::Route]) } + attr_accessor :routes + + # A constant representing the object's type. For this resource it will always be + # `card_token_capabilities`. + sig { returns(Increase::CardTokenCapabilities::Type::TaggedSymbol) } + attr_accessor :type + + # The capabilities of a Card Token describe whether the card can be used for + # specific operations, such as Card Push Transfers. The capabilities can change + # over time based on the issuing bank's configuration of the card range. + sig do + params( + routes: T::Array[Increase::CardTokenCapabilities::Route::OrHash], + type: Increase::CardTokenCapabilities::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Each route represent a path e.g., a push transfer can take. + routes:, + # A constant representing the object's type. For this resource it will always be + # `card_token_capabilities`. + type: + ) + end + + sig do + override.returns( + { + routes: T::Array[Increase::CardTokenCapabilities::Route], + type: Increase::CardTokenCapabilities::Type::TaggedSymbol + } + ) + end + def to_hash + end + + class Route < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardTokenCapabilities::Route, + Increase::Internal::AnyHash + ) + end + + # Whether you can push funds to the card using cross-border Card Push Transfers. + sig do + returns( + Increase::CardTokenCapabilities::Route::CrossBorderPushTransfers::TaggedSymbol + ) + end + attr_accessor :cross_border_push_transfers + + # Whether you can push funds to the card using domestic Card Push Transfers. + sig do + returns( + Increase::CardTokenCapabilities::Route::DomesticPushTransfers::TaggedSymbol + ) + end + attr_accessor :domestic_push_transfers + + # The card network route the capabilities apply to. + sig do + returns(Increase::CardTokenCapabilities::Route::Route::TaggedSymbol) + end + attr_accessor :route + + sig do + params( + cross_border_push_transfers: + Increase::CardTokenCapabilities::Route::CrossBorderPushTransfers::OrSymbol, + domestic_push_transfers: + Increase::CardTokenCapabilities::Route::DomesticPushTransfers::OrSymbol, + route: Increase::CardTokenCapabilities::Route::Route::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Whether you can push funds to the card using cross-border Card Push Transfers. + cross_border_push_transfers:, + # Whether you can push funds to the card using domestic Card Push Transfers. + domestic_push_transfers:, + # The card network route the capabilities apply to. + route: + ) + end + + sig do + override.returns( + { + cross_border_push_transfers: + Increase::CardTokenCapabilities::Route::CrossBorderPushTransfers::TaggedSymbol, + domestic_push_transfers: + Increase::CardTokenCapabilities::Route::DomesticPushTransfers::TaggedSymbol, + route: Increase::CardTokenCapabilities::Route::Route::TaggedSymbol + } + ) + end + def to_hash + end + + # Whether you can push funds to the card using cross-border Card Push Transfers. + module CrossBorderPushTransfers + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardTokenCapabilities::Route::CrossBorderPushTransfers + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The capability is supported. + SUPPORTED = + T.let( + :supported, + Increase::CardTokenCapabilities::Route::CrossBorderPushTransfers::TaggedSymbol + ) + + # The capability is not supported. + NOT_SUPPORTED = + T.let( + :not_supported, + Increase::CardTokenCapabilities::Route::CrossBorderPushTransfers::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardTokenCapabilities::Route::CrossBorderPushTransfers::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Whether you can push funds to the card using domestic Card Push Transfers. + module DomesticPushTransfers + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardTokenCapabilities::Route::DomesticPushTransfers + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The capability is supported. + SUPPORTED = + T.let( + :supported, + Increase::CardTokenCapabilities::Route::DomesticPushTransfers::TaggedSymbol + ) + + # The capability is not supported. + NOT_SUPPORTED = + T.let( + :not_supported, + Increase::CardTokenCapabilities::Route::DomesticPushTransfers::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardTokenCapabilities::Route::DomesticPushTransfers::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The card network route the capabilities apply to. + module Route + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Increase::CardTokenCapabilities::Route::Route) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Visa and Interlink + VISA = + T.let( + :visa, + Increase::CardTokenCapabilities::Route::Route::TaggedSymbol + ) + + # Mastercard and Maestro + MASTERCARD = + T.let( + :mastercard, + Increase::CardTokenCapabilities::Route::Route::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardTokenCapabilities::Route::Route::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # A constant representing the object's type. For this resource it will always be + # `card_token_capabilities`. + module Type + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Increase::CardTokenCapabilities::Type) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD_TOKEN_CAPABILITIES = + T.let( + :card_token_capabilities, + Increase::CardTokenCapabilities::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Increase::CardTokenCapabilities::Type::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/increase/models/card_token_capabilities_params.rbi b/rbi/increase/models/card_token_capabilities_params.rbi new file mode 100644 index 000000000..6cc8dab53 --- /dev/null +++ b/rbi/increase/models/card_token_capabilities_params.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module Increase + module Models + class CardTokenCapabilitiesParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::CardTokenCapabilitiesParams, + Increase::Internal::AnyHash + ) + end + + sig do + params(request_options: Increase::RequestOptions::OrHash).returns( + T.attached_class + ) + end + def self.new(request_options: {}) + end + + sig { override.returns({ request_options: Increase::RequestOptions }) } + def to_hash + end + end + end +end diff --git a/rbi/increase/models/card_token_list_params.rbi b/rbi/increase/models/card_token_list_params.rbi new file mode 100644 index 000000000..4e5101460 --- /dev/null +++ b/rbi/increase/models/card_token_list_params.rbi @@ -0,0 +1,146 @@ +# typed: strong + +module Increase + module Models + class CardTokenListParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(Increase::CardTokenListParams, Increase::Internal::AnyHash) + end + + sig { returns(T.nilable(Increase::CardTokenListParams::CreatedAt)) } + attr_reader :created_at + + sig do + params( + created_at: Increase::CardTokenListParams::CreatedAt::OrHash + ).void + end + attr_writer :created_at + + # Return the page of entries after this one. + sig { returns(T.nilable(String)) } + attr_reader :cursor + + sig { params(cursor: String).void } + attr_writer :cursor + + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + sig { returns(T.nilable(Integer)) } + attr_reader :limit + + sig { params(limit: Integer).void } + attr_writer :limit + + sig do + params( + created_at: Increase::CardTokenListParams::CreatedAt::OrHash, + cursor: String, + limit: Integer, + request_options: Increase::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + created_at: nil, + # Return the page of entries after this one. + cursor: nil, + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + limit: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + created_at: Increase::CardTokenListParams::CreatedAt, + cursor: String, + limit: Integer, + request_options: Increase::RequestOptions + } + ) + end + def to_hash + end + + class CreatedAt < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardTokenListParams::CreatedAt, + Increase::Internal::AnyHash + ) + end + + # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :after + + sig { params(after: Time).void } + attr_writer :after + + # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :before + + sig { params(before: Time).void } + attr_writer :before + + # Return results on or after this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :on_or_after + + sig { params(on_or_after: Time).void } + attr_writer :on_or_after + + # Return results on or before this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :on_or_before + + sig { params(on_or_before: Time).void } + attr_writer :on_or_before + + sig do + params( + after: Time, + before: Time, + on_or_after: Time, + on_or_before: Time + ).returns(T.attached_class) + end + def self.new( + # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + after: nil, + # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + before: nil, + # Return results on or after this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + on_or_after: nil, + # Return results on or before this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + on_or_before: nil + ) + end + + sig do + override.returns( + { after: Time, before: Time, on_or_after: Time, on_or_before: Time } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/increase/models/card_token_retrieve_params.rbi b/rbi/increase/models/card_token_retrieve_params.rbi new file mode 100644 index 000000000..4e323d41f --- /dev/null +++ b/rbi/increase/models/card_token_retrieve_params.rbi @@ -0,0 +1,27 @@ +# typed: strong + +module Increase + module Models + class CardTokenRetrieveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(Increase::CardTokenRetrieveParams, Increase::Internal::AnyHash) + end + + sig do + params(request_options: Increase::RequestOptions::OrHash).returns( + T.attached_class + ) + end + def self.new(request_options: {}) + end + + sig { override.returns({ request_options: Increase::RequestOptions }) } + def to_hash + end + end + end +end diff --git a/rbi/increase/models/card_validation.rbi b/rbi/increase/models/card_validation.rbi new file mode 100644 index 000000000..b75a44316 --- /dev/null +++ b/rbi/increase/models/card_validation.rbi @@ -0,0 +1,1438 @@ +# typed: strong + +module Increase + module Models + class CardValidation < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Increase::CardValidation, Increase::Internal::AnyHash) + end + + # The Card Validation's identifier. + sig { returns(String) } + attr_accessor :id + + # If the validation is accepted by the recipient bank, this will contain + # supplemental details. + sig { returns(T.nilable(Increase::CardValidation::Acceptance)) } + attr_reader :acceptance + + sig do + params( + acceptance: T.nilable(Increase::CardValidation::Acceptance::OrHash) + ).void + end + attr_writer :acceptance + + # The identifier of the Account from which to send the validation. + sig { returns(String) } + attr_accessor :account_id + + # The cardholder's first name. + sig { returns(T.nilable(String)) } + attr_accessor :cardholder_first_name + + # The cardholder's last name. + sig { returns(T.nilable(String)) } + attr_accessor :cardholder_last_name + + # The cardholder's middle name. + sig { returns(T.nilable(String)) } + attr_accessor :cardholder_middle_name + + # The postal code of the cardholder's address. + sig { returns(T.nilable(String)) } + attr_accessor :cardholder_postal_code + + # The cardholder's street address. + sig { returns(T.nilable(String)) } + attr_accessor :cardholder_street_address + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was created. + sig { returns(Time) } + attr_accessor :created_at + + # What object created the validation, either via the API or the dashboard. + sig { returns(T.nilable(Increase::CardValidation::CreatedBy)) } + attr_reader :created_by + + sig do + params( + created_by: T.nilable(Increase::CardValidation::CreatedBy::OrHash) + ).void + end + attr_writer :created_by + + # If the validation is rejected by the card network or the destination financial + # institution, this will contain supplemental details. + sig { returns(T.nilable(Increase::CardValidation::Decline)) } + attr_reader :decline + + sig do + params( + decline: T.nilable(Increase::CardValidation::Decline::OrHash) + ).void + end + attr_writer :decline + + # The idempotency key you chose for this object. This value is unique across + # Increase and is used to ensure that a request is only processed once. Learn more + # about [idempotency](https://increase.com/documentation/idempotency-keys). + sig { returns(T.nilable(String)) } + attr_accessor :idempotency_key + + # A four-digit code (MCC) identifying the type of business or service provided by + # the merchant. + sig { returns(String) } + attr_accessor :merchant_category_code + + # The city where the merchant (typically your business) is located. + sig { returns(String) } + attr_accessor :merchant_city_name + + # The merchant name that will appear in the cardholder’s statement descriptor. + # Typically your business name. + sig { returns(String) } + attr_accessor :merchant_name + + # The postal code for the merchant’s (typically your business’s) location. + sig { returns(String) } + attr_accessor :merchant_postal_code + + # The U.S. state where the merchant (typically your business) is located. + sig { returns(String) } + attr_accessor :merchant_state + + # The lifecycle status of the validation. + sig { returns(Increase::CardValidation::Status::TaggedSymbol) } + attr_accessor :status + + # After the validation is submitted to the card network, this will contain + # supplemental details. + sig { returns(T.nilable(Increase::CardValidation::Submission)) } + attr_reader :submission + + sig do + params( + submission: T.nilable(Increase::CardValidation::Submission::OrHash) + ).void + end + attr_writer :submission + + # A constant representing the object's type. For this resource it will always be + # `card_validation`. + sig { returns(Increase::CardValidation::Type::TaggedSymbol) } + attr_accessor :type + + # Card Validations are used to validate a card and its cardholder before sending + # funds to or pulling funds from a card. + sig do + params( + id: String, + acceptance: T.nilable(Increase::CardValidation::Acceptance::OrHash), + account_id: String, + cardholder_first_name: T.nilable(String), + cardholder_last_name: T.nilable(String), + cardholder_middle_name: T.nilable(String), + cardholder_postal_code: T.nilable(String), + cardholder_street_address: T.nilable(String), + created_at: Time, + created_by: T.nilable(Increase::CardValidation::CreatedBy::OrHash), + decline: T.nilable(Increase::CardValidation::Decline::OrHash), + idempotency_key: T.nilable(String), + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + status: Increase::CardValidation::Status::OrSymbol, + submission: T.nilable(Increase::CardValidation::Submission::OrHash), + type: Increase::CardValidation::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The Card Validation's identifier. + id:, + # If the validation is accepted by the recipient bank, this will contain + # supplemental details. + acceptance:, + # The identifier of the Account from which to send the validation. + account_id:, + # The cardholder's first name. + cardholder_first_name:, + # The cardholder's last name. + cardholder_last_name:, + # The cardholder's middle name. + cardholder_middle_name:, + # The postal code of the cardholder's address. + cardholder_postal_code:, + # The cardholder's street address. + cardholder_street_address:, + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was created. + created_at:, + # What object created the validation, either via the API or the dashboard. + created_by:, + # If the validation is rejected by the card network or the destination financial + # institution, this will contain supplemental details. + decline:, + # The idempotency key you chose for this object. This value is unique across + # Increase and is used to ensure that a request is only processed once. Learn more + # about [idempotency](https://increase.com/documentation/idempotency-keys). + idempotency_key:, + # A four-digit code (MCC) identifying the type of business or service provided by + # the merchant. + merchant_category_code:, + # The city where the merchant (typically your business) is located. + merchant_city_name:, + # The merchant name that will appear in the cardholder’s statement descriptor. + # Typically your business name. + merchant_name:, + # The postal code for the merchant’s (typically your business’s) location. + merchant_postal_code:, + # The U.S. state where the merchant (typically your business) is located. + merchant_state:, + # The lifecycle status of the validation. + status:, + # After the validation is submitted to the card network, this will contain + # supplemental details. + submission:, + # A constant representing the object's type. For this resource it will always be + # `card_validation`. + type: + ) + end + + sig do + override.returns( + { + id: String, + acceptance: T.nilable(Increase::CardValidation::Acceptance), + account_id: String, + cardholder_first_name: T.nilable(String), + cardholder_last_name: T.nilable(String), + cardholder_middle_name: T.nilable(String), + cardholder_postal_code: T.nilable(String), + cardholder_street_address: T.nilable(String), + created_at: Time, + created_by: T.nilable(Increase::CardValidation::CreatedBy), + decline: T.nilable(Increase::CardValidation::Decline), + idempotency_key: T.nilable(String), + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + status: Increase::CardValidation::Status::TaggedSymbol, + submission: T.nilable(Increase::CardValidation::Submission), + type: Increase::CardValidation::Type::TaggedSymbol + } + ) + end + def to_hash + end + + class Acceptance < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardValidation::Acceptance, + Increase::Internal::AnyHash + ) + end + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was accepted by the issuing bank. + sig { returns(Time) } + attr_accessor :accepted_at + + # The authorization identification response from the issuing bank. + sig { returns(String) } + attr_accessor :authorization_identification_response + + # The result of the Card Verification Value 2 match. + sig do + returns( + T.nilable( + Increase::CardValidation::Acceptance::CardVerificationValue2Result::TaggedSymbol + ) + ) + end + attr_accessor :card_verification_value2_result + + # The result of the cardholder first name match. + sig do + returns( + T.nilable( + Increase::CardValidation::Acceptance::CardholderFirstNameResult::TaggedSymbol + ) + ) + end + attr_accessor :cardholder_first_name_result + + # The result of the cardholder full name match. + sig do + returns( + T.nilable( + Increase::CardValidation::Acceptance::CardholderFullNameResult::TaggedSymbol + ) + ) + end + attr_accessor :cardholder_full_name_result + + # The result of the cardholder last name match. + sig do + returns( + T.nilable( + Increase::CardValidation::Acceptance::CardholderLastNameResult::TaggedSymbol + ) + ) + end + attr_accessor :cardholder_last_name_result + + # The result of the cardholder middle name match. + sig do + returns( + T.nilable( + Increase::CardValidation::Acceptance::CardholderMiddleNameResult::TaggedSymbol + ) + ) + end + attr_accessor :cardholder_middle_name_result + + # The result of the cardholder postal code match. + sig do + returns( + T.nilable( + Increase::CardValidation::Acceptance::CardholderPostalCodeResult::TaggedSymbol + ) + ) + end + attr_accessor :cardholder_postal_code_result + + # The result of the cardholder street address match. + sig do + returns( + T.nilable( + Increase::CardValidation::Acceptance::CardholderStreetAddressResult::TaggedSymbol + ) + ) + end + attr_accessor :cardholder_street_address_result + + # A unique identifier for the transaction on the card network. + sig { returns(T.nilable(String)) } + attr_accessor :network_transaction_identifier + + # If the validation is accepted by the recipient bank, this will contain + # supplemental details. + sig do + params( + accepted_at: Time, + authorization_identification_response: String, + card_verification_value2_result: + T.nilable( + Increase::CardValidation::Acceptance::CardVerificationValue2Result::OrSymbol + ), + cardholder_first_name_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderFirstNameResult::OrSymbol + ), + cardholder_full_name_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderFullNameResult::OrSymbol + ), + cardholder_last_name_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderLastNameResult::OrSymbol + ), + cardholder_middle_name_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderMiddleNameResult::OrSymbol + ), + cardholder_postal_code_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderPostalCodeResult::OrSymbol + ), + cardholder_street_address_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderStreetAddressResult::OrSymbol + ), + network_transaction_identifier: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was accepted by the issuing bank. + accepted_at:, + # The authorization identification response from the issuing bank. + authorization_identification_response:, + # The result of the Card Verification Value 2 match. + card_verification_value2_result:, + # The result of the cardholder first name match. + cardholder_first_name_result:, + # The result of the cardholder full name match. + cardholder_full_name_result:, + # The result of the cardholder last name match. + cardholder_last_name_result:, + # The result of the cardholder middle name match. + cardholder_middle_name_result:, + # The result of the cardholder postal code match. + cardholder_postal_code_result:, + # The result of the cardholder street address match. + cardholder_street_address_result:, + # A unique identifier for the transaction on the card network. + network_transaction_identifier: + ) + end + + sig do + override.returns( + { + accepted_at: Time, + authorization_identification_response: String, + card_verification_value2_result: + T.nilable( + Increase::CardValidation::Acceptance::CardVerificationValue2Result::TaggedSymbol + ), + cardholder_first_name_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderFirstNameResult::TaggedSymbol + ), + cardholder_full_name_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderFullNameResult::TaggedSymbol + ), + cardholder_last_name_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderLastNameResult::TaggedSymbol + ), + cardholder_middle_name_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderMiddleNameResult::TaggedSymbol + ), + cardholder_postal_code_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderPostalCodeResult::TaggedSymbol + ), + cardholder_street_address_result: + T.nilable( + Increase::CardValidation::Acceptance::CardholderStreetAddressResult::TaggedSymbol + ), + network_transaction_identifier: T.nilable(String) + } + ) + end + def to_hash + end + + # The result of the Card Verification Value 2 match. + module CardVerificationValue2Result + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardValidation::Acceptance::CardVerificationValue2Result + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The Card Verification Value 2 (CVV2) matches the expected value. + MATCH = + T.let( + :match, + Increase::CardValidation::Acceptance::CardVerificationValue2Result::TaggedSymbol + ) + + # The Card Verification Value 2 (CVV2) does not match the expected value. + NO_MATCH = + T.let( + :no_match, + Increase::CardValidation::Acceptance::CardVerificationValue2Result::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardValidation::Acceptance::CardVerificationValue2Result::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The result of the cardholder first name match. + module CardholderFirstNameResult + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardValidation::Acceptance::CardholderFirstNameResult + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The cardholder name component matches the expected value. + MATCH = + T.let( + :match, + Increase::CardValidation::Acceptance::CardholderFirstNameResult::TaggedSymbol + ) + + # The cardholder name component does not match the expected value. + NO_MATCH = + T.let( + :no_match, + Increase::CardValidation::Acceptance::CardholderFirstNameResult::TaggedSymbol + ) + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH = + T.let( + :partial_match, + Increase::CardValidation::Acceptance::CardholderFirstNameResult::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardValidation::Acceptance::CardholderFirstNameResult::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The result of the cardholder full name match. + module CardholderFullNameResult + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardValidation::Acceptance::CardholderFullNameResult + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The cardholder name component matches the expected value. + MATCH = + T.let( + :match, + Increase::CardValidation::Acceptance::CardholderFullNameResult::TaggedSymbol + ) + + # The cardholder name component does not match the expected value. + NO_MATCH = + T.let( + :no_match, + Increase::CardValidation::Acceptance::CardholderFullNameResult::TaggedSymbol + ) + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH = + T.let( + :partial_match, + Increase::CardValidation::Acceptance::CardholderFullNameResult::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardValidation::Acceptance::CardholderFullNameResult::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The result of the cardholder last name match. + module CardholderLastNameResult + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardValidation::Acceptance::CardholderLastNameResult + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The cardholder name component matches the expected value. + MATCH = + T.let( + :match, + Increase::CardValidation::Acceptance::CardholderLastNameResult::TaggedSymbol + ) + + # The cardholder name component does not match the expected value. + NO_MATCH = + T.let( + :no_match, + Increase::CardValidation::Acceptance::CardholderLastNameResult::TaggedSymbol + ) + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH = + T.let( + :partial_match, + Increase::CardValidation::Acceptance::CardholderLastNameResult::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardValidation::Acceptance::CardholderLastNameResult::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The result of the cardholder middle name match. + module CardholderMiddleNameResult + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardValidation::Acceptance::CardholderMiddleNameResult + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The cardholder name component matches the expected value. + MATCH = + T.let( + :match, + Increase::CardValidation::Acceptance::CardholderMiddleNameResult::TaggedSymbol + ) + + # The cardholder name component does not match the expected value. + NO_MATCH = + T.let( + :no_match, + Increase::CardValidation::Acceptance::CardholderMiddleNameResult::TaggedSymbol + ) + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH = + T.let( + :partial_match, + Increase::CardValidation::Acceptance::CardholderMiddleNameResult::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardValidation::Acceptance::CardholderMiddleNameResult::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The result of the cardholder postal code match. + module CardholderPostalCodeResult + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardValidation::Acceptance::CardholderPostalCodeResult + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The cardholder address component matches the expected value. + MATCH = + T.let( + :match, + Increase::CardValidation::Acceptance::CardholderPostalCodeResult::TaggedSymbol + ) + + # The cardholder address component does not match the expected value. + NO_MATCH = + T.let( + :no_match, + Increase::CardValidation::Acceptance::CardholderPostalCodeResult::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardValidation::Acceptance::CardholderPostalCodeResult::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The result of the cardholder street address match. + module CardholderStreetAddressResult + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardValidation::Acceptance::CardholderStreetAddressResult + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The cardholder address component matches the expected value. + MATCH = + T.let( + :match, + Increase::CardValidation::Acceptance::CardholderStreetAddressResult::TaggedSymbol + ) + + # The cardholder address component does not match the expected value. + NO_MATCH = + T.let( + :no_match, + Increase::CardValidation::Acceptance::CardholderStreetAddressResult::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardValidation::Acceptance::CardholderStreetAddressResult::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CreatedBy < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardValidation::CreatedBy, + Increase::Internal::AnyHash + ) + end + + # If present, details about the API key that created the transfer. + sig { returns(T.nilable(Increase::CardValidation::CreatedBy::APIKey)) } + attr_reader :api_key + + sig do + params( + api_key: + T.nilable(Increase::CardValidation::CreatedBy::APIKey::OrHash) + ).void + end + attr_writer :api_key + + # The type of object that created this transfer. + sig do + returns(Increase::CardValidation::CreatedBy::Category::TaggedSymbol) + end + attr_accessor :category + + # If present, details about the OAuth Application that created the transfer. + sig do + returns( + T.nilable(Increase::CardValidation::CreatedBy::OAuthApplication) + ) + end + attr_reader :oauth_application + + sig do + params( + oauth_application: + T.nilable( + Increase::CardValidation::CreatedBy::OAuthApplication::OrHash + ) + ).void + end + attr_writer :oauth_application + + # If present, details about the User that created the transfer. + sig { returns(T.nilable(Increase::CardValidation::CreatedBy::User)) } + attr_reader :user + + sig do + params( + user: T.nilable(Increase::CardValidation::CreatedBy::User::OrHash) + ).void + end + attr_writer :user + + # What object created the validation, either via the API or the dashboard. + sig do + params( + api_key: + T.nilable(Increase::CardValidation::CreatedBy::APIKey::OrHash), + category: Increase::CardValidation::CreatedBy::Category::OrSymbol, + oauth_application: + T.nilable( + Increase::CardValidation::CreatedBy::OAuthApplication::OrHash + ), + user: T.nilable(Increase::CardValidation::CreatedBy::User::OrHash) + ).returns(T.attached_class) + end + def self.new( + # If present, details about the API key that created the transfer. + api_key:, + # The type of object that created this transfer. + category:, + # If present, details about the OAuth Application that created the transfer. + oauth_application:, + # If present, details about the User that created the transfer. + user: + ) + end + + sig do + override.returns( + { + api_key: T.nilable(Increase::CardValidation::CreatedBy::APIKey), + category: + Increase::CardValidation::CreatedBy::Category::TaggedSymbol, + oauth_application: + T.nilable( + Increase::CardValidation::CreatedBy::OAuthApplication + ), + user: T.nilable(Increase::CardValidation::CreatedBy::User) + } + ) + end + def to_hash + end + + class APIKey < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardValidation::CreatedBy::APIKey, + Increase::Internal::AnyHash + ) + end + + # The description set for the API key when it was created. + sig { returns(T.nilable(String)) } + attr_accessor :description + + # If present, details about the API key that created the transfer. + sig do + params(description: T.nilable(String)).returns(T.attached_class) + end + def self.new( + # The description set for the API key when it was created. + description: + ) + end + + sig { override.returns({ description: T.nilable(String) }) } + def to_hash + end + end + + # The type of object that created this transfer. + module Category + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Increase::CardValidation::CreatedBy::Category) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # An API key. Details will be under the `api_key` object. + API_KEY = + T.let( + :api_key, + Increase::CardValidation::CreatedBy::Category::TaggedSymbol + ) + + # An OAuth application you connected to Increase. Details will be under the `oauth_application` object. + OAUTH_APPLICATION = + T.let( + :oauth_application, + Increase::CardValidation::CreatedBy::Category::TaggedSymbol + ) + + # A User in the Increase dashboard. Details will be under the `user` object. + USER = + T.let( + :user, + Increase::CardValidation::CreatedBy::Category::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardValidation::CreatedBy::Category::TaggedSymbol + ] + ) + end + def self.values + end + end + + class OAuthApplication < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardValidation::CreatedBy::OAuthApplication, + Increase::Internal::AnyHash + ) + end + + # The name of the OAuth Application. + sig { returns(String) } + attr_accessor :name + + # If present, details about the OAuth Application that created the transfer. + sig { params(name: String).returns(T.attached_class) } + def self.new( + # The name of the OAuth Application. + name: + ) + end + + sig { override.returns({ name: String }) } + def to_hash + end + end + + class User < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardValidation::CreatedBy::User, + Increase::Internal::AnyHash + ) + end + + # The email address of the User. + sig { returns(String) } + attr_accessor :email + + # If present, details about the User that created the transfer. + sig { params(email: String).returns(T.attached_class) } + def self.new( + # The email address of the User. + email: + ) + end + + sig { override.returns({ email: String }) } + def to_hash + end + end + end + + class Decline < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardValidation::Decline, + Increase::Internal::AnyHash + ) + end + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was declined. + sig { returns(Time) } + attr_accessor :declined_at + + # A unique identifier for the transaction on the card network. + sig { returns(T.nilable(String)) } + attr_accessor :network_transaction_identifier + + # The reason why the validation was declined. + sig { returns(Increase::CardValidation::Decline::Reason::TaggedSymbol) } + attr_accessor :reason + + # If the validation is rejected by the card network or the destination financial + # institution, this will contain supplemental details. + sig do + params( + declined_at: Time, + network_transaction_identifier: T.nilable(String), + reason: Increase::CardValidation::Decline::Reason::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was declined. + declined_at:, + # A unique identifier for the transaction on the card network. + network_transaction_identifier:, + # The reason why the validation was declined. + reason: + ) + end + + sig do + override.returns( + { + declined_at: Time, + network_transaction_identifier: T.nilable(String), + reason: Increase::CardValidation::Decline::Reason::TaggedSymbol + } + ) + end + def to_hash + end + + # The reason why the validation was declined. + module Reason + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Increase::CardValidation::Decline::Reason) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The card issuer has declined the transaction without providing a specific reason. + DO_NOT_HONOR = + T.let( + :do_not_honor, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The number of transactions for the card has exceeded the limit set by the issuer. + ACTIVITY_COUNT_LIMIT_EXCEEDED = + T.let( + :activity_count_limit_exceeded, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The card issuer requires the cardholder to contact them for further information regarding the transaction. + REFER_TO_CARD_ISSUER = + T.let( + :refer_to_card_issuer, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The card issuer requires the cardholder to contact them due to a special condition related to the transaction. + REFER_TO_CARD_ISSUER_SPECIAL_CONDITION = + T.let( + :refer_to_card_issuer_special_condition, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The merchant is not valid for this transaction. + INVALID_MERCHANT = + T.let( + :invalid_merchant, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The card should be retained by the terminal. + PICK_UP_CARD = + T.let( + :pick_up_card, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # An error occurred during processing of the transaction. + ERROR = + T.let( + :error, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The card should be retained by the terminal due to a special condition. + PICK_UP_CARD_SPECIAL = + T.let( + :pick_up_card_special, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The transaction is invalid and cannot be processed. + INVALID_TRANSACTION = + T.let( + :invalid_transaction, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The amount of the transaction is invalid. + INVALID_AMOUNT = + T.let( + :invalid_amount, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The account number provided is invalid. + INVALID_ACCOUNT_NUMBER = + T.let( + :invalid_account_number, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The issuer of the card could not be found. + NO_SUCH_ISSUER = + T.let( + :no_such_issuer, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The transaction should be re-entered for processing. + RE_ENTER_TRANSACTION = + T.let( + :re_enter_transaction, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # There is no credit account associated with the card. + NO_CREDIT_ACCOUNT = + T.let( + :no_credit_account, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The card should be retained by the terminal because it has been reported lost. + PICK_UP_CARD_LOST = + T.let( + :pick_up_card_lost, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The card should be retained by the terminal because it has been reported stolen. + PICK_UP_CARD_STOLEN = + T.let( + :pick_up_card_stolen, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The account associated with the card has been closed. + CLOSED_ACCOUNT = + T.let( + :closed_account, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # There are insufficient funds in the account to complete the transaction. + INSUFFICIENT_FUNDS = + T.let( + :insufficient_funds, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # There is no checking account associated with the card. + NO_CHECKING_ACCOUNT = + T.let( + :no_checking_account, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # There is no savings account associated with the card. + NO_SAVINGS_ACCOUNT = + T.let( + :no_savings_account, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The card has expired and cannot be used for transactions. + EXPIRED_CARD = + T.let( + :expired_card, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The transaction is not permitted for this cardholder. + TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER = + T.let( + :transaction_not_permitted_to_cardholder, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The transaction is not allowed at this terminal. + TRANSACTION_NOT_ALLOWED_AT_TERMINAL = + T.let( + :transaction_not_allowed_at_terminal, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The transaction has been flagged as suspected fraud and cannot be processed. + SUSPECTED_FRAUD = + T.let( + :suspected_fraud, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The amount of activity on the card has exceeded the limit set by the issuer. + ACTIVITY_AMOUNT_LIMIT_EXCEEDED = + T.let( + :activity_amount_limit_exceeded, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The card has restrictions that prevent it from being used for this transaction. + RESTRICTED_CARD = + T.let( + :restricted_card, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # A security violation has occurred, preventing the transaction from being processed. + SECURITY_VIOLATION = + T.let( + :security_violation, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The transaction does not meet the anti-money laundering requirements set by the issuer. + TRANSACTION_DOES_NOT_FULFILL_ANTI_MONEY_LAUNDERING_REQUIREMENT = + T.let( + :transaction_does_not_fulfill_anti_money_laundering_requirement, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The first use of the card has been blocked by the issuer. + BLOCKED_FIRST_USE = + T.let( + :blocked_first_use, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The credit issuer is currently unavailable to process the transaction. + CREDIT_ISSUER_UNAVAILABLE = + T.let( + :credit_issuer_unavailable, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The card verification value (CVV) results were negative, indicating a potential issue with the card. + NEGATIVE_CARD_VERIFICATION_VALUE_RESULTS = + T.let( + :negative_card_verification_value_results, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The issuer of the card is currently unavailable to process the transaction. + ISSUER_UNAVAILABLE = + T.let( + :issuer_unavailable, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The financial institution associated with the card could not be found. + FINANCIAL_INSTITUTION_CANNOT_BE_FOUND = + T.let( + :financial_institution_cannot_be_found, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The transaction cannot be completed due to an unspecified reason. + TRANSACTION_CANNOT_BE_COMPLETED = + T.let( + :transaction_cannot_be_completed, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The transaction is a duplicate of a previous transaction and cannot be processed again. + DUPLICATE_TRANSACTION = + T.let( + :duplicate_transaction, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # A system malfunction occurred, preventing the transaction from being processed. + SYSTEM_MALFUNCTION = + T.let( + :system_malfunction, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # Additional customer authentication is required to complete the transaction. + ADDITIONAL_CUSTOMER_AUTHENTICATION_REQUIRED = + T.let( + :additional_customer_authentication_required, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The surcharge amount applied to the transaction is not permitted by the issuer. + SURCHARGE_AMOUNT_NOT_PERMITTED = + T.let( + :surcharge_amount_not_permitted, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # The transaction was declined due to a failure in verifying the CVV2 code. + DECLINE_FOR_CVV2_FAILURE = + T.let( + :decline_for_cvv2_failure, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # A stop payment order has been placed on this transaction. + STOP_PAYMENT_ORDER = + T.let( + :stop_payment_order, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # An order has been placed to revoke authorization for this transaction. + REVOCATION_OF_AUTHORIZATION_ORDER = + T.let( + :revocation_of_authorization_order, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + # An order has been placed to revoke all authorizations for this cardholder. + REVOCATION_OF_ALL_AUTHORIZATIONS_ORDER = + T.let( + :revocation_of_all_authorizations_order, + Increase::CardValidation::Decline::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Increase::CardValidation::Decline::Reason::TaggedSymbol] + ) + end + def self.values + end + end + end + + # The lifecycle status of the validation. + module Status + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Increase::CardValidation::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The validation requires attention from an Increase operator. + REQUIRES_ATTENTION = + T.let( + :requires_attention, + Increase::CardValidation::Status::TaggedSymbol + ) + + # The validation is queued to be submitted to the card network. + PENDING_SUBMISSION = + T.let( + :pending_submission, + Increase::CardValidation::Status::TaggedSymbol + ) + + # The validation has been submitted and is pending a response from the card network. + SUBMITTED = + T.let(:submitted, Increase::CardValidation::Status::TaggedSymbol) + + # The validation has been sent successfully and is complete. + COMPLETE = + T.let(:complete, Increase::CardValidation::Status::TaggedSymbol) + + # The validation was declined by the network or the recipient's bank. + DECLINED = + T.let(:declined, Increase::CardValidation::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[Increase::CardValidation::Status::TaggedSymbol] + ) + end + def self.values + end + end + + class Submission < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardValidation::Submission, + Increase::Internal::AnyHash + ) + end + + # A 12-digit retrieval reference number that identifies the validation. Usually a + # combination of a timestamp and the trace number. + sig { returns(String) } + attr_accessor :retrieval_reference_number + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was submitted to the card network. + sig { returns(Time) } + attr_accessor :submitted_at + + # A 6-digit trace number that identifies the validation within a short time + # window. + sig { returns(String) } + attr_accessor :trace_number + + # After the validation is submitted to the card network, this will contain + # supplemental details. + sig do + params( + retrieval_reference_number: String, + submitted_at: Time, + trace_number: String + ).returns(T.attached_class) + end + def self.new( + # A 12-digit retrieval reference number that identifies the validation. Usually a + # combination of a timestamp and the trace number. + retrieval_reference_number:, + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the validation was submitted to the card network. + submitted_at:, + # A 6-digit trace number that identifies the validation within a short time + # window. + trace_number: + ) + end + + sig do + override.returns( + { + retrieval_reference_number: String, + submitted_at: Time, + trace_number: String + } + ) + end + def to_hash + end + end + + # A constant representing the object's type. For this resource it will always be + # `card_validation`. + module Type + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Increase::CardValidation::Type) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD_VALIDATION = + T.let(:card_validation, Increase::CardValidation::Type::TaggedSymbol) + + sig do + override.returns( + T::Array[Increase::CardValidation::Type::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/increase/models/card_validation_create_params.rbi b/rbi/increase/models/card_validation_create_params.rbi new file mode 100644 index 000000000..448226b7d --- /dev/null +++ b/rbi/increase/models/card_validation_create_params.rbi @@ -0,0 +1,155 @@ +# typed: strong + +module Increase + module Models + class CardValidationCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::CardValidationCreateParams, + Increase::Internal::AnyHash + ) + end + + # The identifier of the Account from which to send the validation. + sig { returns(String) } + attr_accessor :account_id + + # The Increase identifier for the Card Token that represents the card number + # you're validating. + sig { returns(String) } + attr_accessor :card_token_id + + # A four-digit code (MCC) identifying the type of business or service provided by + # the merchant. + sig { returns(String) } + attr_accessor :merchant_category_code + + # The city where the merchant (typically your business) is located. + sig { returns(String) } + attr_accessor :merchant_city_name + + # The merchant name that will appear in the cardholder’s statement descriptor. + # Typically your business name. + sig { returns(String) } + attr_accessor :merchant_name + + # The postal code for the merchant’s (typically your business’s) location. + sig { returns(String) } + attr_accessor :merchant_postal_code + + # The U.S. state where the merchant (typically your business) is located. + sig { returns(String) } + attr_accessor :merchant_state + + # The cardholder's first name. + sig { returns(T.nilable(String)) } + attr_reader :cardholder_first_name + + sig { params(cardholder_first_name: String).void } + attr_writer :cardholder_first_name + + # The cardholder's last name. + sig { returns(T.nilable(String)) } + attr_reader :cardholder_last_name + + sig { params(cardholder_last_name: String).void } + attr_writer :cardholder_last_name + + # The cardholder's middle name. + sig { returns(T.nilable(String)) } + attr_reader :cardholder_middle_name + + sig { params(cardholder_middle_name: String).void } + attr_writer :cardholder_middle_name + + # The postal code of the cardholder's address. + sig { returns(T.nilable(String)) } + attr_reader :cardholder_postal_code + + sig { params(cardholder_postal_code: String).void } + attr_writer :cardholder_postal_code + + # The cardholder's street address. + sig { returns(T.nilable(String)) } + attr_reader :cardholder_street_address + + sig { params(cardholder_street_address: String).void } + attr_writer :cardholder_street_address + + sig do + params( + account_id: String, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + cardholder_first_name: String, + cardholder_last_name: String, + cardholder_middle_name: String, + cardholder_postal_code: String, + cardholder_street_address: String, + request_options: Increase::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The identifier of the Account from which to send the validation. + account_id:, + # The Increase identifier for the Card Token that represents the card number + # you're validating. + card_token_id:, + # A four-digit code (MCC) identifying the type of business or service provided by + # the merchant. + merchant_category_code:, + # The city where the merchant (typically your business) is located. + merchant_city_name:, + # The merchant name that will appear in the cardholder’s statement descriptor. + # Typically your business name. + merchant_name:, + # The postal code for the merchant’s (typically your business’s) location. + merchant_postal_code:, + # The U.S. state where the merchant (typically your business) is located. + merchant_state:, + # The cardholder's first name. + cardholder_first_name: nil, + # The cardholder's last name. + cardholder_last_name: nil, + # The cardholder's middle name. + cardholder_middle_name: nil, + # The postal code of the cardholder's address. + cardholder_postal_code: nil, + # The cardholder's street address. + cardholder_street_address: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + account_id: String, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + cardholder_first_name: String, + cardholder_last_name: String, + cardholder_middle_name: String, + cardholder_postal_code: String, + cardholder_street_address: String, + request_options: Increase::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/increase/models/card_validation_list_params.rbi b/rbi/increase/models/card_validation_list_params.rbi new file mode 100644 index 000000000..cbf3f792b --- /dev/null +++ b/rbi/increase/models/card_validation_list_params.rbi @@ -0,0 +1,295 @@ +# typed: strong + +module Increase + module Models + class CardValidationListParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(Increase::CardValidationListParams, Increase::Internal::AnyHash) + end + + # Filter Card Validations to ones belonging to the specified Account. + sig { returns(T.nilable(String)) } + attr_reader :account_id + + sig { params(account_id: String).void } + attr_writer :account_id + + sig { returns(T.nilable(Increase::CardValidationListParams::CreatedAt)) } + attr_reader :created_at + + sig do + params( + created_at: Increase::CardValidationListParams::CreatedAt::OrHash + ).void + end + attr_writer :created_at + + # Return the page of entries after this one. + sig { returns(T.nilable(String)) } + attr_reader :cursor + + sig { params(cursor: String).void } + attr_writer :cursor + + # Filter records to the one with the specified `idempotency_key` you chose for + # that object. This value is unique across Increase and is used to ensure that a + # request is only processed once. Learn more about + # [idempotency](https://increase.com/documentation/idempotency-keys). + sig { returns(T.nilable(String)) } + attr_reader :idempotency_key + + sig { params(idempotency_key: String).void } + attr_writer :idempotency_key + + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + sig { returns(T.nilable(Integer)) } + attr_reader :limit + + sig { params(limit: Integer).void } + attr_writer :limit + + sig { returns(T.nilable(Increase::CardValidationListParams::Status)) } + attr_reader :status + + sig do + params(status: Increase::CardValidationListParams::Status::OrHash).void + end + attr_writer :status + + sig do + params( + account_id: String, + created_at: Increase::CardValidationListParams::CreatedAt::OrHash, + cursor: String, + idempotency_key: String, + limit: Integer, + status: Increase::CardValidationListParams::Status::OrHash, + request_options: Increase::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Filter Card Validations to ones belonging to the specified Account. + account_id: nil, + created_at: nil, + # Return the page of entries after this one. + cursor: nil, + # Filter records to the one with the specified `idempotency_key` you chose for + # that object. This value is unique across Increase and is used to ensure that a + # request is only processed once. Learn more about + # [idempotency](https://increase.com/documentation/idempotency-keys). + idempotency_key: nil, + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + limit: nil, + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + account_id: String, + created_at: Increase::CardValidationListParams::CreatedAt, + cursor: String, + idempotency_key: String, + limit: Integer, + status: Increase::CardValidationListParams::Status, + request_options: Increase::RequestOptions + } + ) + end + def to_hash + end + + class CreatedAt < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardValidationListParams::CreatedAt, + Increase::Internal::AnyHash + ) + end + + # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :after + + sig { params(after: Time).void } + attr_writer :after + + # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :before + + sig { params(before: Time).void } + attr_writer :before + + # Return results on or after this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :on_or_after + + sig { params(on_or_after: Time).void } + attr_writer :on_or_after + + # Return results on or before this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + sig { returns(T.nilable(Time)) } + attr_reader :on_or_before + + sig { params(on_or_before: Time).void } + attr_writer :on_or_before + + sig do + params( + after: Time, + before: Time, + on_or_after: Time, + on_or_before: Time + ).returns(T.attached_class) + end + def self.new( + # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + after: nil, + # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + # timestamp. + before: nil, + # Return results on or after this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + on_or_after: nil, + # Return results on or before this + # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + on_or_before: nil + ) + end + + sig do + override.returns( + { after: Time, before: Time, on_or_after: Time, on_or_before: Time } + ) + end + def to_hash + end + end + + class Status < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardValidationListParams::Status, + Increase::Internal::AnyHash + ) + end + + # Filter Card Validations by status. For GET requests, this should be encoded as a + # comma-delimited string, such as `?in=one,two,three`. + sig do + returns( + T.nilable( + T::Array[Increase::CardValidationListParams::Status::In::OrSymbol] + ) + ) + end + attr_reader :in_ + + sig do + params( + in_: + T::Array[Increase::CardValidationListParams::Status::In::OrSymbol] + ).void + end + attr_writer :in_ + + sig do + params( + in_: + T::Array[Increase::CardValidationListParams::Status::In::OrSymbol] + ).returns(T.attached_class) + end + def self.new( + # Filter Card Validations by status. For GET requests, this should be encoded as a + # comma-delimited string, such as `?in=one,two,three`. + in_: nil + ) + end + + sig do + override.returns( + { + in_: + T::Array[ + Increase::CardValidationListParams::Status::In::OrSymbol + ] + } + ) + end + def to_hash + end + + module In + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Increase::CardValidationListParams::Status::In) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The validation requires attention from an Increase operator. + REQUIRES_ATTENTION = + T.let( + :requires_attention, + Increase::CardValidationListParams::Status::In::TaggedSymbol + ) + + # The validation is queued to be submitted to the card network. + PENDING_SUBMISSION = + T.let( + :pending_submission, + Increase::CardValidationListParams::Status::In::TaggedSymbol + ) + + # The validation has been submitted and is pending a response from the card network. + SUBMITTED = + T.let( + :submitted, + Increase::CardValidationListParams::Status::In::TaggedSymbol + ) + + # The validation has been sent successfully and is complete. + COMPLETE = + T.let( + :complete, + Increase::CardValidationListParams::Status::In::TaggedSymbol + ) + + # The validation was declined by the network or the recipient's bank. + DECLINED = + T.let( + :declined, + Increase::CardValidationListParams::Status::In::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardValidationListParams::Status::In::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/increase/models/card_validation_retrieve_params.rbi b/rbi/increase/models/card_validation_retrieve_params.rbi new file mode 100644 index 000000000..2e6cb3730 --- /dev/null +++ b/rbi/increase/models/card_validation_retrieve_params.rbi @@ -0,0 +1,30 @@ +# typed: strong + +module Increase + module Models + class CardValidationRetrieveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::CardValidationRetrieveParams, + Increase::Internal::AnyHash + ) + end + + sig do + params(request_options: Increase::RequestOptions::OrHash).returns( + T.attached_class + ) + end + def self.new(request_options: {}) + end + + sig { override.returns({ request_options: Increase::RequestOptions }) } + def to_hash + end + end + end +end diff --git a/rbi/increase/models/simulations/card_token_create_params.rbi b/rbi/increase/models/simulations/card_token_create_params.rbi new file mode 100644 index 000000000..5abdea89a --- /dev/null +++ b/rbi/increase/models/simulations/card_token_create_params.rbi @@ -0,0 +1,297 @@ +# typed: strong + +module Increase + module Models + module Simulations + class CardTokenCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::Simulations::CardTokenCreateParams, + Increase::Internal::AnyHash + ) + end + + # The capabilities of the outbound card token. + sig do + returns( + T.nilable( + T::Array[Increase::Simulations::CardTokenCreateParams::Capability] + ) + ) + end + attr_reader :capabilities + + sig do + params( + capabilities: + T::Array[ + Increase::Simulations::CardTokenCreateParams::Capability::OrHash + ] + ).void + end + attr_writer :capabilities + + # The expiration date of the card. + sig { returns(T.nilable(Date)) } + attr_reader :expiration + + sig { params(expiration: Date).void } + attr_writer :expiration + + # The last 4 digits of the card number. + sig { returns(T.nilable(String)) } + attr_reader :last4 + + sig { params(last4: String).void } + attr_writer :last4 + + # The prefix of the card number, usually the first 8 digits. + sig { returns(T.nilable(String)) } + attr_reader :prefix + + sig { params(prefix: String).void } + attr_writer :prefix + + # The total length of the card number, including prefix and last4. + sig { returns(T.nilable(Integer)) } + attr_reader :primary_account_number_length + + sig { params(primary_account_number_length: Integer).void } + attr_writer :primary_account_number_length + + sig do + params( + capabilities: + T::Array[ + Increase::Simulations::CardTokenCreateParams::Capability::OrHash + ], + expiration: Date, + last4: String, + prefix: String, + primary_account_number_length: Integer, + request_options: Increase::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The capabilities of the outbound card token. + capabilities: nil, + # The expiration date of the card. + expiration: nil, + # The last 4 digits of the card number. + last4: nil, + # The prefix of the card number, usually the first 8 digits. + prefix: nil, + # The total length of the card number, including prefix and last4. + primary_account_number_length: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + capabilities: + T::Array[ + Increase::Simulations::CardTokenCreateParams::Capability + ], + expiration: Date, + last4: String, + prefix: String, + primary_account_number_length: Integer, + request_options: Increase::RequestOptions + } + ) + end + def to_hash + end + + class Capability < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Simulations::CardTokenCreateParams::Capability, + Increase::Internal::AnyHash + ) + end + + # The cross-border push transfers capability. + sig do + returns( + Increase::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers::OrSymbol + ) + end + attr_accessor :cross_border_push_transfers + + # The domestic push transfers capability. + sig do + returns( + Increase::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers::OrSymbol + ) + end + attr_accessor :domestic_push_transfers + + # The route of the capability. + sig do + returns( + Increase::Simulations::CardTokenCreateParams::Capability::Route::OrSymbol + ) + end + attr_accessor :route + + sig do + params( + cross_border_push_transfers: + Increase::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers::OrSymbol, + domestic_push_transfers: + Increase::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers::OrSymbol, + route: + Increase::Simulations::CardTokenCreateParams::Capability::Route::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The cross-border push transfers capability. + cross_border_push_transfers:, + # The domestic push transfers capability. + domestic_push_transfers:, + # The route of the capability. + route: + ) + end + + sig do + override.returns( + { + cross_border_push_transfers: + Increase::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers::OrSymbol, + domestic_push_transfers: + Increase::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers::OrSymbol, + route: + Increase::Simulations::CardTokenCreateParams::Capability::Route::OrSymbol + } + ) + end + def to_hash + end + + # The cross-border push transfers capability. + module CrossBorderPushTransfers + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The capability is supported. + SUPPORTED = + T.let( + :supported, + Increase::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers::TaggedSymbol + ) + + # The capability is not supported. + NOT_SUPPORTED = + T.let( + :not_supported, + Increase::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The domestic push transfers capability. + module DomesticPushTransfers + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The capability is supported. + SUPPORTED = + T.let( + :supported, + Increase::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers::TaggedSymbol + ) + + # The capability is not supported. + NOT_SUPPORTED = + T.let( + :not_supported, + Increase::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The route of the capability. + module Route + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Simulations::CardTokenCreateParams::Capability::Route + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Visa and Interlink + VISA = + T.let( + :visa, + Increase::Simulations::CardTokenCreateParams::Capability::Route::TaggedSymbol + ) + + # Mastercard and Maestro + MASTERCARD = + T.let( + :mastercard, + Increase::Simulations::CardTokenCreateParams::Capability::Route::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Simulations::CardTokenCreateParams::Capability::Route::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end +end diff --git a/rbi/increase/resources/card_push_transfers.rbi b/rbi/increase/resources/card_push_transfers.rbi new file mode 100644 index 000000000..64108e7f9 --- /dev/null +++ b/rbi/increase/resources/card_push_transfers.rbi @@ -0,0 +1,157 @@ +# typed: strong + +module Increase + module Resources + class CardPushTransfers + # Create a Card Push Transfer + sig do + params( + amount: Integer, + business_application_identifier: + Increase::CardPushTransferCreateParams::BusinessApplicationIdentifier::OrSymbol, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + require_approval: T::Boolean, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::CardPushTransfer) + end + def create( + # The transfer amount in USD cents. For Card Push transfers, must be positive. + amount:, + # The Business Application Identifier describes the type of transaction being + # performed. Your program must be approved for the specified Business Application + # Identifier in order to use it. + business_application_identifier:, + # The Increase identifier for the Card Token that represents the card number + # you're pushing funds to. + card_token_id:, + # The merchant category code (MCC) of the merchant (generally your business) + # sending the transfer. This is a four-digit code that describes the type of + # business or service provided by the merchant. Your program must be approved for + # the specified MCC in order to use it. + merchant_category_code:, + # The city name of the merchant (generally your business) sending the transfer. + merchant_city_name:, + # The merchant name shows up as the statement descriptor for the transfer. This is + # typically the name of your business or organization. + merchant_name:, + # For certain Business Application Identifiers, the statement descriptor is + # `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + # four character prefix that identifies the merchant. + merchant_name_prefix:, + # The postal code of the merchant (generally your business) sending the transfer. + merchant_postal_code:, + # The state of the merchant (generally your business) sending the transfer. + merchant_state:, + # The name of the funds recipient. + recipient_name:, + # The city of the sender. + sender_address_city:, + # The address line 1 of the sender. + sender_address_line1:, + # The postal code of the sender. + sender_address_postal_code:, + # The state of the sender. + sender_address_state:, + # The name of the funds originator. + sender_name:, + # The identifier of the Account Number from which to send the transfer. + source_account_number_id:, + # Whether the transfer requires explicit approval via the dashboard or API. + require_approval: nil, + request_options: {} + ) + end + + # Retrieve a Card Push Transfer + sig do + params( + card_push_transfer_id: String, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::CardPushTransfer) + end + def retrieve( + # The identifier of the Card Push Transfer. + card_push_transfer_id, + request_options: {} + ) + end + + # List Card Push Transfers + sig do + params( + account_id: String, + created_at: Increase::CardPushTransferListParams::CreatedAt::OrHash, + cursor: String, + idempotency_key: String, + limit: Integer, + status: Increase::CardPushTransferListParams::Status::OrHash, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::Internal::Page[Increase::CardPushTransfer]) + end + def list( + # Filter Card Push Transfers to ones belonging to the specified Account. + account_id: nil, + created_at: nil, + # Return the page of entries after this one. + cursor: nil, + # Filter records to the one with the specified `idempotency_key` you chose for + # that object. This value is unique across Increase and is used to ensure that a + # request is only processed once. Learn more about + # [idempotency](https://increase.com/documentation/idempotency-keys). + idempotency_key: nil, + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + limit: nil, + status: nil, + request_options: {} + ) + end + + # Approves a Card Push Transfer in a pending_approval state. + sig do + params( + card_push_transfer_id: String, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::CardPushTransfer) + end + def approve( + # The identifier of the Card Push Transfer to approve. + card_push_transfer_id, + request_options: {} + ) + end + + # Cancels a Card Push Transfer in a pending_approval state. + sig do + params( + card_push_transfer_id: String, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::CardPushTransfer) + end + def cancel( + # The identifier of the pending Card Push Transfer to cancel. + card_push_transfer_id, + request_options: {} + ) + end + + # @api private + sig { params(client: Increase::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/increase/resources/card_tokens.rbi b/rbi/increase/resources/card_tokens.rbi new file mode 100644 index 000000000..985fdd235 --- /dev/null +++ b/rbi/increase/resources/card_tokens.rbi @@ -0,0 +1,62 @@ +# typed: strong + +module Increase + module Resources + class CardTokens + # Retrieve a Card Token + sig do + params( + card_token_id: String, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::CardToken) + end + def retrieve( + # The identifier of the Card Token. + card_token_id, + request_options: {} + ) + end + + # List Card Tokens + sig do + params( + created_at: Increase::CardTokenListParams::CreatedAt::OrHash, + cursor: String, + limit: Integer, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::Internal::Page[Increase::CardToken]) + end + def list( + created_at: nil, + # Return the page of entries after this one. + cursor: nil, + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + limit: nil, + request_options: {} + ) + end + + # The capabilities of a Card Token describe whether the card can be used for + # specific operations, such as Card Push Transfers. The capabilities can change + # over time based on the issuing bank's configuration of the card range. + sig do + params( + card_token_id: String, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::CardTokenCapabilities) + end + def capabilities( + # The identifier of the Card Token. + card_token_id, + request_options: {} + ) + end + + # @api private + sig { params(client: Increase::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/increase/resources/card_validations.rbi b/rbi/increase/resources/card_validations.rbi new file mode 100644 index 000000000..36952cc7e --- /dev/null +++ b/rbi/increase/resources/card_validations.rbi @@ -0,0 +1,107 @@ +# typed: strong + +module Increase + module Resources + class CardValidations + # Create a Card Validation + sig do + params( + account_id: String, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + cardholder_first_name: String, + cardholder_last_name: String, + cardholder_middle_name: String, + cardholder_postal_code: String, + cardholder_street_address: String, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::CardValidation) + end + def create( + # The identifier of the Account from which to send the validation. + account_id:, + # The Increase identifier for the Card Token that represents the card number + # you're validating. + card_token_id:, + # A four-digit code (MCC) identifying the type of business or service provided by + # the merchant. + merchant_category_code:, + # The city where the merchant (typically your business) is located. + merchant_city_name:, + # The merchant name that will appear in the cardholder’s statement descriptor. + # Typically your business name. + merchant_name:, + # The postal code for the merchant’s (typically your business’s) location. + merchant_postal_code:, + # The U.S. state where the merchant (typically your business) is located. + merchant_state:, + # The cardholder's first name. + cardholder_first_name: nil, + # The cardholder's last name. + cardholder_last_name: nil, + # The cardholder's middle name. + cardholder_middle_name: nil, + # The postal code of the cardholder's address. + cardholder_postal_code: nil, + # The cardholder's street address. + cardholder_street_address: nil, + request_options: {} + ) + end + + # Retrieve a Card Validation + sig do + params( + card_validation_id: String, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::CardValidation) + end + def retrieve( + # The identifier of the Card Validation. + card_validation_id, + request_options: {} + ) + end + + # List Card Validations + sig do + params( + account_id: String, + created_at: Increase::CardValidationListParams::CreatedAt::OrHash, + cursor: String, + idempotency_key: String, + limit: Integer, + status: Increase::CardValidationListParams::Status::OrHash, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::Internal::Page[Increase::CardValidation]) + end + def list( + # Filter Card Validations to ones belonging to the specified Account. + account_id: nil, + created_at: nil, + # Return the page of entries after this one. + cursor: nil, + # Filter records to the one with the specified `idempotency_key` you chose for + # that object. This value is unique across Increase and is used to ensure that a + # request is only processed once. Learn more about + # [idempotency](https://increase.com/documentation/idempotency-keys). + idempotency_key: nil, + # Limit the size of the list that is returned. The default (and maximum) is 100 + # objects. + limit: nil, + status: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: Increase::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/increase/resources/simulations.rbi b/rbi/increase/resources/simulations.rbi index d76c60a0c..e974b7dc5 100644 --- a/rbi/increase/resources/simulations.rbi +++ b/rbi/increase/resources/simulations.rbi @@ -99,6 +99,9 @@ module Increase sig { returns(Increase::Resources::Simulations::Documents) } attr_reader :documents + sig { returns(Increase::Resources::Simulations::CardTokens) } + attr_reader :card_tokens + # @api private sig { params(client: Increase::Client).returns(T.attached_class) } def self.new(client:) diff --git a/rbi/increase/resources/simulations/card_tokens.rbi b/rbi/increase/resources/simulations/card_tokens.rbi new file mode 100644 index 000000000..758b1a965 --- /dev/null +++ b/rbi/increase/resources/simulations/card_tokens.rbi @@ -0,0 +1,43 @@ +# typed: strong + +module Increase + module Resources + class Simulations + class CardTokens + # Simulates tokenizing a card in the sandbox environment. + sig do + params( + capabilities: + T::Array[ + Increase::Simulations::CardTokenCreateParams::Capability::OrHash + ], + expiration: Date, + last4: String, + prefix: String, + primary_account_number_length: Integer, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::CardToken) + end + def create( + # The capabilities of the outbound card token. + capabilities: nil, + # The expiration date of the card. + expiration: nil, + # The last 4 digits of the card number. + last4: nil, + # The prefix of the card number, usually the first 8 digits. + prefix: nil, + # The total length of the card number, including prefix and last4. + primary_account_number_length: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: Increase::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end + end +end diff --git a/sig/increase/client.rbs b/sig/increase/client.rbs index f4139593f..b2e04f415 100644 --- a/sig/increase/client.rbs +++ b/sig/increase/client.rbs @@ -117,6 +117,12 @@ module Increase attr_reader intrafi_exclusions: Increase::Resources::IntrafiExclusions + attr_reader card_tokens: Increase::Resources::CardTokens + + attr_reader card_push_transfers: Increase::Resources::CardPushTransfers + + attr_reader card_validations: Increase::Resources::CardValidations + attr_reader simulations: Increase::Resources::Simulations private def auth_headers: -> ::Hash[String, String] diff --git a/sig/increase/models.rbs b/sig/increase/models.rbs index e1e47c9c2..2c6c3365c 100644 --- a/sig/increase/models.rbs +++ b/sig/increase/models.rbs @@ -119,10 +119,40 @@ module Increase class CardPurchaseSupplementRetrieveParams = Increase::Models::CardPurchaseSupplementRetrieveParams + class CardPushTransfer = Increase::Models::CardPushTransfer + + class CardPushTransferApproveParams = Increase::Models::CardPushTransferApproveParams + + class CardPushTransferCancelParams = Increase::Models::CardPushTransferCancelParams + + class CardPushTransferCreateParams = Increase::Models::CardPushTransferCreateParams + + class CardPushTransferListParams = Increase::Models::CardPushTransferListParams + + class CardPushTransferRetrieveParams = Increase::Models::CardPushTransferRetrieveParams + class CardRetrieveParams = Increase::Models::CardRetrieveParams + class CardToken = Increase::Models::CardToken + + class CardTokenCapabilities = Increase::Models::CardTokenCapabilities + + class CardTokenCapabilitiesParams = Increase::Models::CardTokenCapabilitiesParams + + class CardTokenListParams = Increase::Models::CardTokenListParams + + class CardTokenRetrieveParams = Increase::Models::CardTokenRetrieveParams + class CardUpdateParams = Increase::Models::CardUpdateParams + class CardValidation = Increase::Models::CardValidation + + class CardValidationCreateParams = Increase::Models::CardValidationCreateParams + + class CardValidationListParams = Increase::Models::CardValidationListParams + + class CardValidationRetrieveParams = Increase::Models::CardValidationRetrieveParams + class CheckDeposit = Increase::Models::CheckDeposit class CheckDepositCreateParams = Increase::Models::CheckDepositCreateParams diff --git a/sig/increase/models/card_push_transfer.rbs b/sig/increase/models/card_push_transfer.rbs new file mode 100644 index 000000000..aaf2b1622 --- /dev/null +++ b/sig/increase/models/card_push_transfer.rbs @@ -0,0 +1,679 @@ +module Increase + module Models + type card_push_transfer = + { + id: String, + acceptance: Increase::CardPushTransfer::Acceptance?, + account_id: String, + amount: Integer, + approval: Increase::CardPushTransfer::Approval?, + business_application_identifier: Increase::Models::CardPushTransfer::business_application_identifier, + cancellation: Increase::CardPushTransfer::Cancellation?, + created_at: Time, + created_by: Increase::CardPushTransfer::CreatedBy?, + currency: Increase::Models::CardPushTransfer::currency, + decline: Increase::CardPushTransfer::Decline?, + idempotency_key: String?, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + :sender_address_line1 => String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + status: Increase::Models::CardPushTransfer::status, + submission: Increase::CardPushTransfer::Submission?, + type: Increase::Models::CardPushTransfer::type_ + } + + class CardPushTransfer < Increase::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor acceptance: Increase::CardPushTransfer::Acceptance? + + attr_accessor account_id: String + + attr_accessor amount: Integer + + attr_accessor approval: Increase::CardPushTransfer::Approval? + + attr_accessor business_application_identifier: Increase::Models::CardPushTransfer::business_application_identifier + + attr_accessor cancellation: Increase::CardPushTransfer::Cancellation? + + attr_accessor created_at: Time + + attr_accessor created_by: Increase::CardPushTransfer::CreatedBy? + + attr_accessor currency: Increase::Models::CardPushTransfer::currency + + attr_accessor decline: Increase::CardPushTransfer::Decline? + + attr_accessor idempotency_key: String? + + attr_accessor merchant_category_code: String + + attr_accessor merchant_city_name: String + + attr_accessor merchant_name: String + + attr_accessor merchant_name_prefix: String + + attr_accessor merchant_postal_code: String + + attr_accessor merchant_state: String + + attr_accessor recipient_name: String + + attr_accessor sender_address_city: String + + attr_accessor sender_address_line1: String + + attr_accessor sender_address_postal_code: String + + attr_accessor sender_address_state: String + + attr_accessor sender_name: String + + attr_accessor source_account_number_id: String + + attr_accessor status: Increase::Models::CardPushTransfer::status + + attr_accessor submission: Increase::CardPushTransfer::Submission? + + attr_accessor type: Increase::Models::CardPushTransfer::type_ + + def initialize: ( + id: String, + acceptance: Increase::CardPushTransfer::Acceptance?, + account_id: String, + amount: Integer, + approval: Increase::CardPushTransfer::Approval?, + business_application_identifier: Increase::Models::CardPushTransfer::business_application_identifier, + cancellation: Increase::CardPushTransfer::Cancellation?, + created_at: Time, + created_by: Increase::CardPushTransfer::CreatedBy?, + currency: Increase::Models::CardPushTransfer::currency, + decline: Increase::CardPushTransfer::Decline?, + idempotency_key: String?, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + status: Increase::Models::CardPushTransfer::status, + submission: Increase::CardPushTransfer::Submission?, + type: Increase::Models::CardPushTransfer::type_ + ) -> void + + def to_hash: -> { + id: String, + acceptance: Increase::CardPushTransfer::Acceptance?, + account_id: String, + amount: Integer, + approval: Increase::CardPushTransfer::Approval?, + business_application_identifier: Increase::Models::CardPushTransfer::business_application_identifier, + cancellation: Increase::CardPushTransfer::Cancellation?, + created_at: Time, + created_by: Increase::CardPushTransfer::CreatedBy?, + currency: Increase::Models::CardPushTransfer::currency, + decline: Increase::CardPushTransfer::Decline?, + idempotency_key: String?, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + :sender_address_line1 => String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + status: Increase::Models::CardPushTransfer::status, + submission: Increase::CardPushTransfer::Submission?, + type: Increase::Models::CardPushTransfer::type_ + } + + type acceptance = + { + accepted_at: Time, + authorization_identification_response: String, + :card_verification_value2_result => Increase::Models::CardPushTransfer::Acceptance::card_verification_value2_result?, + network_transaction_identifier: String? + } + + class Acceptance < Increase::Internal::Type::BaseModel + attr_accessor accepted_at: Time + + attr_accessor authorization_identification_response: String + + attr_accessor card_verification_value2_result: Increase::Models::CardPushTransfer::Acceptance::card_verification_value2_result? + + attr_accessor network_transaction_identifier: String? + + def initialize: ( + accepted_at: Time, + authorization_identification_response: String, + card_verification_value2_result: Increase::Models::CardPushTransfer::Acceptance::card_verification_value2_result?, + network_transaction_identifier: String? + ) -> void + + def to_hash: -> { + accepted_at: Time, + authorization_identification_response: String, + :card_verification_value2_result => Increase::Models::CardPushTransfer::Acceptance::card_verification_value2_result?, + network_transaction_identifier: String? + } + + type card_verification_value2_result = :match | :no_match + + module CardVerificationValue2Result + extend Increase::Internal::Type::Enum + + # The Card Verification Value 2 (CVV2) matches the expected value. + MATCH: :match + + # The Card Verification Value 2 (CVV2) does not match the expected value. + NO_MATCH: :no_match + + def self?.values: -> ::Array[Increase::Models::CardPushTransfer::Acceptance::card_verification_value2_result] + end + end + + type approval = { approved_at: Time, approved_by: String? } + + class Approval < Increase::Internal::Type::BaseModel + attr_accessor approved_at: Time + + attr_accessor approved_by: String? + + def initialize: (approved_at: Time, approved_by: String?) -> void + + def to_hash: -> { approved_at: Time, approved_by: String? } + end + + type business_application_identifier = + :account_to_account + | :business_to_business + | :money_transfer_bank_initiated + | :non_card_bill_payment + | :consumer_bill_payment + | :card_bill_payment + | :funds_disbursement + | :funds_transfer + | :loyalty_and_offers + | :merchant_disbursement + | :merchant_payment + | :person_to_person + | :top_up + | :wallet_transfer + + module BusinessApplicationIdentifier + extend Increase::Internal::Type::Enum + + # Account to Account + ACCOUNT_TO_ACCOUNT: :account_to_account + + # Business to Business + BUSINESS_TO_BUSINESS: :business_to_business + + # Money Transfer Bank Initiated + MONEY_TRANSFER_BANK_INITIATED: :money_transfer_bank_initiated + + # Non-Card Bill Payment + NON_CARD_BILL_PAYMENT: :non_card_bill_payment + + # Consumer Bill Payment + CONSUMER_BILL_PAYMENT: :consumer_bill_payment + + # Card Bill Payment + CARD_BILL_PAYMENT: :card_bill_payment + + # Funds Disbursement + FUNDS_DISBURSEMENT: :funds_disbursement + + # Funds Transfer + FUNDS_TRANSFER: :funds_transfer + + # Loyalty and Offers + LOYALTY_AND_OFFERS: :loyalty_and_offers + + # Merchant Disbursement + MERCHANT_DISBURSEMENT: :merchant_disbursement + + # Merchant Payment + MERCHANT_PAYMENT: :merchant_payment + + # Person to Person + PERSON_TO_PERSON: :person_to_person + + # Top Up + TOP_UP: :top_up + + # Wallet Transfer + WALLET_TRANSFER: :wallet_transfer + + def self?.values: -> ::Array[Increase::Models::CardPushTransfer::business_application_identifier] + end + + type cancellation = { canceled_at: Time, canceled_by: String? } + + class Cancellation < Increase::Internal::Type::BaseModel + attr_accessor canceled_at: Time + + attr_accessor canceled_by: String? + + def initialize: (canceled_at: Time, canceled_by: String?) -> void + + def to_hash: -> { canceled_at: Time, canceled_by: String? } + end + + type created_by = + { + api_key: Increase::CardPushTransfer::CreatedBy::APIKey?, + category: Increase::Models::CardPushTransfer::CreatedBy::category, + oauth_application: Increase::CardPushTransfer::CreatedBy::OAuthApplication?, + user: Increase::CardPushTransfer::CreatedBy::User? + } + + class CreatedBy < Increase::Internal::Type::BaseModel + attr_accessor api_key: Increase::CardPushTransfer::CreatedBy::APIKey? + + attr_accessor category: Increase::Models::CardPushTransfer::CreatedBy::category + + attr_accessor oauth_application: Increase::CardPushTransfer::CreatedBy::OAuthApplication? + + attr_accessor user: Increase::CardPushTransfer::CreatedBy::User? + + def initialize: ( + api_key: Increase::CardPushTransfer::CreatedBy::APIKey?, + category: Increase::Models::CardPushTransfer::CreatedBy::category, + oauth_application: Increase::CardPushTransfer::CreatedBy::OAuthApplication?, + user: Increase::CardPushTransfer::CreatedBy::User? + ) -> void + + def to_hash: -> { + api_key: Increase::CardPushTransfer::CreatedBy::APIKey?, + category: Increase::Models::CardPushTransfer::CreatedBy::category, + oauth_application: Increase::CardPushTransfer::CreatedBy::OAuthApplication?, + user: Increase::CardPushTransfer::CreatedBy::User? + } + + type api_key = { description: String? } + + class APIKey < Increase::Internal::Type::BaseModel + attr_accessor description: String? + + def initialize: (description: String?) -> void + + def to_hash: -> { description: String? } + end + + type category = :api_key | :oauth_application | :user + + module Category + extend Increase::Internal::Type::Enum + + # An API key. Details will be under the `api_key` object. + API_KEY: :api_key + + # An OAuth application you connected to Increase. Details will be under the `oauth_application` object. + OAUTH_APPLICATION: :oauth_application + + # A User in the Increase dashboard. Details will be under the `user` object. + USER: :user + + def self?.values: -> ::Array[Increase::Models::CardPushTransfer::CreatedBy::category] + end + + type oauth_application = { name: String } + + class OAuthApplication < Increase::Internal::Type::BaseModel + attr_accessor name: String + + def initialize: (name: String) -> void + + def to_hash: -> { name: String } + end + + type user = { email: String } + + class User < Increase::Internal::Type::BaseModel + attr_accessor email: String + + def initialize: (email: String) -> void + + def to_hash: -> { email: String } + end + end + + type currency = :CAD | :CHF | :EUR | :GBP | :JPY | :USD + + module Currency + extend Increase::Internal::Type::Enum + + # Canadian Dollar (CAD) + CAD: :CAD + + # Swiss Franc (CHF) + CHF: :CHF + + # Euro (EUR) + EUR: :EUR + + # British Pound (GBP) + GBP: :GBP + + # Japanese Yen (JPY) + JPY: :JPY + + # US Dollar (USD) + USD: :USD + + def self?.values: -> ::Array[Increase::Models::CardPushTransfer::currency] + end + + type decline = + { + declined_at: Time, + network_transaction_identifier: String?, + reason: Increase::Models::CardPushTransfer::Decline::reason + } + + class Decline < Increase::Internal::Type::BaseModel + attr_accessor declined_at: Time + + attr_accessor network_transaction_identifier: String? + + attr_accessor reason: Increase::Models::CardPushTransfer::Decline::reason + + def initialize: ( + declined_at: Time, + network_transaction_identifier: String?, + reason: Increase::Models::CardPushTransfer::Decline::reason + ) -> void + + def to_hash: -> { + declined_at: Time, + network_transaction_identifier: String?, + reason: Increase::Models::CardPushTransfer::Decline::reason + } + + type reason = + :do_not_honor + | :activity_count_limit_exceeded + | :refer_to_card_issuer + | :refer_to_card_issuer_special_condition + | :invalid_merchant + | :pick_up_card + | :error + | :pick_up_card_special + | :invalid_transaction + | :invalid_amount + | :invalid_account_number + | :no_such_issuer + | :re_enter_transaction + | :no_credit_account + | :pick_up_card_lost + | :pick_up_card_stolen + | :closed_account + | :insufficient_funds + | :no_checking_account + | :no_savings_account + | :expired_card + | :transaction_not_permitted_to_cardholder + | :transaction_not_allowed_at_terminal + | :suspected_fraud + | :activity_amount_limit_exceeded + | :restricted_card + | :security_violation + | :transaction_does_not_fulfill_anti_money_laundering_requirement + | :blocked_first_use + | :credit_issuer_unavailable + | :negative_card_verification_value_results + | :issuer_unavailable + | :financial_institution_cannot_be_found + | :transaction_cannot_be_completed + | :duplicate_transaction + | :system_malfunction + | :additional_customer_authentication_required + | :surcharge_amount_not_permitted + | :decline_for_cvv2_failure + | :stop_payment_order + | :revocation_of_authorization_order + | :revocation_of_all_authorizations_order + + module Reason + extend Increase::Internal::Type::Enum + + # The card issuer has declined the transaction without providing a specific reason. + DO_NOT_HONOR: :do_not_honor + + # The number of transactions for the card has exceeded the limit set by the issuer. + ACTIVITY_COUNT_LIMIT_EXCEEDED: :activity_count_limit_exceeded + + # The card issuer requires the cardholder to contact them for further information regarding the transaction. + REFER_TO_CARD_ISSUER: :refer_to_card_issuer + + # The card issuer requires the cardholder to contact them due to a special condition related to the transaction. + REFER_TO_CARD_ISSUER_SPECIAL_CONDITION: :refer_to_card_issuer_special_condition + + # The merchant is not valid for this transaction. + INVALID_MERCHANT: :invalid_merchant + + # The card should be retained by the terminal. + PICK_UP_CARD: :pick_up_card + + # An error occurred during processing of the transaction. + ERROR: :error + + # The card should be retained by the terminal due to a special condition. + PICK_UP_CARD_SPECIAL: :pick_up_card_special + + # The transaction is invalid and cannot be processed. + INVALID_TRANSACTION: :invalid_transaction + + # The amount of the transaction is invalid. + INVALID_AMOUNT: :invalid_amount + + # The account number provided is invalid. + INVALID_ACCOUNT_NUMBER: :invalid_account_number + + # The issuer of the card could not be found. + NO_SUCH_ISSUER: :no_such_issuer + + # The transaction should be re-entered for processing. + RE_ENTER_TRANSACTION: :re_enter_transaction + + # There is no credit account associated with the card. + NO_CREDIT_ACCOUNT: :no_credit_account + + # The card should be retained by the terminal because it has been reported lost. + PICK_UP_CARD_LOST: :pick_up_card_lost + + # The card should be retained by the terminal because it has been reported stolen. + PICK_UP_CARD_STOLEN: :pick_up_card_stolen + + # The account associated with the card has been closed. + CLOSED_ACCOUNT: :closed_account + + # There are insufficient funds in the account to complete the transaction. + INSUFFICIENT_FUNDS: :insufficient_funds + + # There is no checking account associated with the card. + NO_CHECKING_ACCOUNT: :no_checking_account + + # There is no savings account associated with the card. + NO_SAVINGS_ACCOUNT: :no_savings_account + + # The card has expired and cannot be used for transactions. + EXPIRED_CARD: :expired_card + + # The transaction is not permitted for this cardholder. + TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER: :transaction_not_permitted_to_cardholder + + # The transaction is not allowed at this terminal. + TRANSACTION_NOT_ALLOWED_AT_TERMINAL: :transaction_not_allowed_at_terminal + + # The transaction has been flagged as suspected fraud and cannot be processed. + SUSPECTED_FRAUD: :suspected_fraud + + # The amount of activity on the card has exceeded the limit set by the issuer. + ACTIVITY_AMOUNT_LIMIT_EXCEEDED: :activity_amount_limit_exceeded + + # The card has restrictions that prevent it from being used for this transaction. + RESTRICTED_CARD: :restricted_card + + # A security violation has occurred, preventing the transaction from being processed. + SECURITY_VIOLATION: :security_violation + + # The transaction does not meet the anti-money laundering requirements set by the issuer. + TRANSACTION_DOES_NOT_FULFILL_ANTI_MONEY_LAUNDERING_REQUIREMENT: :transaction_does_not_fulfill_anti_money_laundering_requirement + + # The first use of the card has been blocked by the issuer. + BLOCKED_FIRST_USE: :blocked_first_use + + # The credit issuer is currently unavailable to process the transaction. + CREDIT_ISSUER_UNAVAILABLE: :credit_issuer_unavailable + + # The card verification value (CVV) results were negative, indicating a potential issue with the card. + NEGATIVE_CARD_VERIFICATION_VALUE_RESULTS: :negative_card_verification_value_results + + # The issuer of the card is currently unavailable to process the transaction. + ISSUER_UNAVAILABLE: :issuer_unavailable + + # The financial institution associated with the card could not be found. + FINANCIAL_INSTITUTION_CANNOT_BE_FOUND: :financial_institution_cannot_be_found + + # The transaction cannot be completed due to an unspecified reason. + TRANSACTION_CANNOT_BE_COMPLETED: :transaction_cannot_be_completed + + # The transaction is a duplicate of a previous transaction and cannot be processed again. + DUPLICATE_TRANSACTION: :duplicate_transaction + + # A system malfunction occurred, preventing the transaction from being processed. + SYSTEM_MALFUNCTION: :system_malfunction + + # Additional customer authentication is required to complete the transaction. + ADDITIONAL_CUSTOMER_AUTHENTICATION_REQUIRED: :additional_customer_authentication_required + + # The surcharge amount applied to the transaction is not permitted by the issuer. + SURCHARGE_AMOUNT_NOT_PERMITTED: :surcharge_amount_not_permitted + + # The transaction was declined due to a failure in verifying the CVV2 code. + DECLINE_FOR_CVV2_FAILURE: :decline_for_cvv2_failure + + # A stop payment order has been placed on this transaction. + STOP_PAYMENT_ORDER: :stop_payment_order + + # An order has been placed to revoke authorization for this transaction. + REVOCATION_OF_AUTHORIZATION_ORDER: :revocation_of_authorization_order + + # An order has been placed to revoke all authorizations for this cardholder. + REVOCATION_OF_ALL_AUTHORIZATIONS_ORDER: :revocation_of_all_authorizations_order + + def self?.values: -> ::Array[Increase::Models::CardPushTransfer::Decline::reason] + end + end + + type status = + :pending_approval + | :canceled + | :pending_reviewing + | :requires_attention + | :pending_submission + | :submitted + | :complete + | :declined + + module Status + extend Increase::Internal::Type::Enum + + # The transfer is pending approval. + PENDING_APPROVAL: :pending_approval + + # The transfer has been canceled. + CANCELED: :canceled + + # The transfer is pending review by Increase. + PENDING_REVIEWING: :pending_reviewing + + # The transfer requires attention from an Increase operator. + REQUIRES_ATTENTION: :requires_attention + + # The transfer is queued to be submitted to the card network. + PENDING_SUBMISSION: :pending_submission + + # The transfer has been submitted and is pending a response from the card network. + SUBMITTED: :submitted + + # The transfer has been sent successfully and is complete. + COMPLETE: :complete + + # The transfer was declined by the network or the recipient's bank. + DECLINED: :declined + + def self?.values: -> ::Array[Increase::Models::CardPushTransfer::status] + end + + type submission = + { + retrieval_reference_number: String, + sender_reference: String, + submitted_at: Time, + trace_number: String + } + + class Submission < Increase::Internal::Type::BaseModel + attr_accessor retrieval_reference_number: String + + attr_accessor sender_reference: String + + attr_accessor submitted_at: Time + + attr_accessor trace_number: String + + def initialize: ( + retrieval_reference_number: String, + sender_reference: String, + submitted_at: Time, + trace_number: String + ) -> void + + def to_hash: -> { + retrieval_reference_number: String, + sender_reference: String, + submitted_at: Time, + trace_number: String + } + end + + type type_ = :card_push_transfer + + module Type + extend Increase::Internal::Type::Enum + + CARD_PUSH_TRANSFER: :card_push_transfer + + def self?.values: -> ::Array[Increase::Models::CardPushTransfer::type_] + end + end + end +end diff --git a/sig/increase/models/card_push_transfer_approve_params.rbs b/sig/increase/models/card_push_transfer_approve_params.rbs new file mode 100644 index 000000000..5abf3d3ec --- /dev/null +++ b/sig/increase/models/card_push_transfer_approve_params.rbs @@ -0,0 +1,15 @@ +module Increase + module Models + type card_push_transfer_approve_params = + { } & Increase::Internal::Type::request_parameters + + class CardPushTransferApproveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + def initialize: (?request_options: Increase::request_opts) -> void + + def to_hash: -> { request_options: Increase::RequestOptions } + end + end +end diff --git a/sig/increase/models/card_push_transfer_cancel_params.rbs b/sig/increase/models/card_push_transfer_cancel_params.rbs new file mode 100644 index 000000000..70dc1bc54 --- /dev/null +++ b/sig/increase/models/card_push_transfer_cancel_params.rbs @@ -0,0 +1,15 @@ +module Increase + module Models + type card_push_transfer_cancel_params = + { } & Increase::Internal::Type::request_parameters + + class CardPushTransferCancelParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + def initialize: (?request_options: Increase::request_opts) -> void + + def to_hash: -> { request_options: Increase::RequestOptions } + end + end +end diff --git a/sig/increase/models/card_push_transfer_create_params.rbs b/sig/increase/models/card_push_transfer_create_params.rbs new file mode 100644 index 000000000..baedb4cee --- /dev/null +++ b/sig/increase/models/card_push_transfer_create_params.rbs @@ -0,0 +1,172 @@ +module Increase + module Models + type card_push_transfer_create_params = + { + amount: Integer, + business_application_identifier: Increase::Models::CardPushTransferCreateParams::business_application_identifier, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + :sender_address_line1 => String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + require_approval: bool + } + & Increase::Internal::Type::request_parameters + + class CardPushTransferCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + attr_accessor amount: Integer + + attr_accessor business_application_identifier: Increase::Models::CardPushTransferCreateParams::business_application_identifier + + attr_accessor card_token_id: String + + attr_accessor merchant_category_code: String + + attr_accessor merchant_city_name: String + + attr_accessor merchant_name: String + + attr_accessor merchant_name_prefix: String + + attr_accessor merchant_postal_code: String + + attr_accessor merchant_state: String + + attr_accessor recipient_name: String + + attr_accessor sender_address_city: String + + attr_accessor sender_address_line1: String + + attr_accessor sender_address_postal_code: String + + attr_accessor sender_address_state: String + + attr_accessor sender_name: String + + attr_accessor source_account_number_id: String + + attr_reader require_approval: bool? + + def require_approval=: (bool) -> bool + + def initialize: ( + amount: Integer, + business_application_identifier: Increase::Models::CardPushTransferCreateParams::business_application_identifier, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + ?require_approval: bool, + ?request_options: Increase::request_opts + ) -> void + + def to_hash: -> { + amount: Integer, + business_application_identifier: Increase::Models::CardPushTransferCreateParams::business_application_identifier, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + :sender_address_line1 => String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + require_approval: bool, + request_options: Increase::RequestOptions + } + + type business_application_identifier = + :account_to_account + | :business_to_business + | :money_transfer_bank_initiated + | :non_card_bill_payment + | :consumer_bill_payment + | :card_bill_payment + | :funds_disbursement + | :funds_transfer + | :loyalty_and_offers + | :merchant_disbursement + | :merchant_payment + | :person_to_person + | :top_up + | :wallet_transfer + + module BusinessApplicationIdentifier + extend Increase::Internal::Type::Enum + + # Account to Account + ACCOUNT_TO_ACCOUNT: :account_to_account + + # Business to Business + BUSINESS_TO_BUSINESS: :business_to_business + + # Money Transfer Bank Initiated + MONEY_TRANSFER_BANK_INITIATED: :money_transfer_bank_initiated + + # Non-Card Bill Payment + NON_CARD_BILL_PAYMENT: :non_card_bill_payment + + # Consumer Bill Payment + CONSUMER_BILL_PAYMENT: :consumer_bill_payment + + # Card Bill Payment + CARD_BILL_PAYMENT: :card_bill_payment + + # Funds Disbursement + FUNDS_DISBURSEMENT: :funds_disbursement + + # Funds Transfer + FUNDS_TRANSFER: :funds_transfer + + # Loyalty and Offers + LOYALTY_AND_OFFERS: :loyalty_and_offers + + # Merchant Disbursement + MERCHANT_DISBURSEMENT: :merchant_disbursement + + # Merchant Payment + MERCHANT_PAYMENT: :merchant_payment + + # Person to Person + PERSON_TO_PERSON: :person_to_person + + # Top Up + TOP_UP: :top_up + + # Wallet Transfer + WALLET_TRANSFER: :wallet_transfer + + def self?.values: -> ::Array[Increase::Models::CardPushTransferCreateParams::business_application_identifier] + end + end + end +end diff --git a/sig/increase/models/card_push_transfer_list_params.rbs b/sig/increase/models/card_push_transfer_list_params.rbs new file mode 100644 index 000000000..b875d7c10 --- /dev/null +++ b/sig/increase/models/card_push_transfer_list_params.rbs @@ -0,0 +1,163 @@ +module Increase + module Models + type card_push_transfer_list_params = + { + account_id: String, + created_at: Increase::CardPushTransferListParams::CreatedAt, + cursor: String, + idempotency_key: String, + limit: Integer, + status: Increase::CardPushTransferListParams::Status + } + & Increase::Internal::Type::request_parameters + + class CardPushTransferListParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + attr_reader account_id: String? + + def account_id=: (String) -> String + + attr_reader created_at: Increase::CardPushTransferListParams::CreatedAt? + + def created_at=: ( + Increase::CardPushTransferListParams::CreatedAt + ) -> Increase::CardPushTransferListParams::CreatedAt + + attr_reader cursor: String? + + def cursor=: (String) -> String + + attr_reader idempotency_key: String? + + def idempotency_key=: (String) -> String + + attr_reader limit: Integer? + + def limit=: (Integer) -> Integer + + attr_reader status: Increase::CardPushTransferListParams::Status? + + def status=: ( + Increase::CardPushTransferListParams::Status + ) -> Increase::CardPushTransferListParams::Status + + def initialize: ( + ?account_id: String, + ?created_at: Increase::CardPushTransferListParams::CreatedAt, + ?cursor: String, + ?idempotency_key: String, + ?limit: Integer, + ?status: Increase::CardPushTransferListParams::Status, + ?request_options: Increase::request_opts + ) -> void + + def to_hash: -> { + account_id: String, + created_at: Increase::CardPushTransferListParams::CreatedAt, + cursor: String, + idempotency_key: String, + limit: Integer, + status: Increase::CardPushTransferListParams::Status, + request_options: Increase::RequestOptions + } + + type created_at = + { after: Time, before: Time, on_or_after: Time, on_or_before: Time } + + class CreatedAt < Increase::Internal::Type::BaseModel + attr_reader after: Time? + + def after=: (Time) -> Time + + attr_reader before: Time? + + def before=: (Time) -> Time + + attr_reader on_or_after: Time? + + def on_or_after=: (Time) -> Time + + attr_reader on_or_before: Time? + + def on_or_before=: (Time) -> Time + + def initialize: ( + ?after: Time, + ?before: Time, + ?on_or_after: Time, + ?on_or_before: Time + ) -> void + + def to_hash: -> { + after: Time, + before: Time, + on_or_after: Time, + on_or_before: Time + } + end + + type status = + { + in_: ::Array[Increase::Models::CardPushTransferListParams::Status::in_] + } + + class Status < Increase::Internal::Type::BaseModel + attr_reader in_: ::Array[Increase::Models::CardPushTransferListParams::Status::in_]? + + def in_=: ( + ::Array[Increase::Models::CardPushTransferListParams::Status::in_] + ) -> ::Array[Increase::Models::CardPushTransferListParams::Status::in_] + + def initialize: ( + ?in_: ::Array[Increase::Models::CardPushTransferListParams::Status::in_] + ) -> void + + def to_hash: -> { + in_: ::Array[Increase::Models::CardPushTransferListParams::Status::in_] + } + + type in_ = + :pending_approval + | :canceled + | :pending_reviewing + | :requires_attention + | :pending_submission + | :submitted + | :complete + | :declined + + module In + extend Increase::Internal::Type::Enum + + # The transfer is pending approval. + PENDING_APPROVAL: :pending_approval + + # The transfer has been canceled. + CANCELED: :canceled + + # The transfer is pending review by Increase. + PENDING_REVIEWING: :pending_reviewing + + # The transfer requires attention from an Increase operator. + REQUIRES_ATTENTION: :requires_attention + + # The transfer is queued to be submitted to the card network. + PENDING_SUBMISSION: :pending_submission + + # The transfer has been submitted and is pending a response from the card network. + SUBMITTED: :submitted + + # The transfer has been sent successfully and is complete. + COMPLETE: :complete + + # The transfer was declined by the network or the recipient's bank. + DECLINED: :declined + + def self?.values: -> ::Array[Increase::Models::CardPushTransferListParams::Status::in_] + end + end + end + end +end diff --git a/sig/increase/models/card_push_transfer_retrieve_params.rbs b/sig/increase/models/card_push_transfer_retrieve_params.rbs new file mode 100644 index 000000000..61adb069c --- /dev/null +++ b/sig/increase/models/card_push_transfer_retrieve_params.rbs @@ -0,0 +1,15 @@ +module Increase + module Models + type card_push_transfer_retrieve_params = + { } & Increase::Internal::Type::request_parameters + + class CardPushTransferRetrieveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + def initialize: (?request_options: Increase::request_opts) -> void + + def to_hash: -> { request_options: Increase::RequestOptions } + end + end +end diff --git a/sig/increase/models/card_token.rbs b/sig/increase/models/card_token.rbs new file mode 100644 index 000000000..11cdbdb2d --- /dev/null +++ b/sig/increase/models/card_token.rbs @@ -0,0 +1,60 @@ +module Increase + module Models + type card_token = + { + id: String, + created_at: Time, + expiration_date: Date, + :last4 => String, + length: Integer, + prefix: String, + type: Increase::Models::CardToken::type_ + } + + class CardToken < Increase::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor expiration_date: Date + + attr_accessor last4: String + + attr_accessor length: Integer + + attr_accessor prefix: String + + attr_accessor type: Increase::Models::CardToken::type_ + + def initialize: ( + id: String, + created_at: Time, + expiration_date: Date, + last4: String, + length: Integer, + prefix: String, + type: Increase::Models::CardToken::type_ + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + expiration_date: Date, + :last4 => String, + length: Integer, + prefix: String, + type: Increase::Models::CardToken::type_ + } + + type type_ = :card_token + + module Type + extend Increase::Internal::Type::Enum + + CARD_TOKEN: :card_token + + def self?.values: -> ::Array[Increase::Models::CardToken::type_] + end + end + end +end diff --git a/sig/increase/models/card_token_capabilities.rbs b/sig/increase/models/card_token_capabilities.rbs new file mode 100644 index 000000000..c7a18520c --- /dev/null +++ b/sig/increase/models/card_token_capabilities.rbs @@ -0,0 +1,104 @@ +module Increase + module Models + type card_token_capabilities = + { + routes: ::Array[Increase::CardTokenCapabilities::Route], + type: Increase::Models::CardTokenCapabilities::type_ + } + + class CardTokenCapabilities < Increase::Internal::Type::BaseModel + attr_accessor routes: ::Array[Increase::CardTokenCapabilities::Route] + + attr_accessor type: Increase::Models::CardTokenCapabilities::type_ + + def initialize: ( + routes: ::Array[Increase::CardTokenCapabilities::Route], + type: Increase::Models::CardTokenCapabilities::type_ + ) -> void + + def to_hash: -> { + routes: ::Array[Increase::CardTokenCapabilities::Route], + type: Increase::Models::CardTokenCapabilities::type_ + } + + type route = + { + cross_border_push_transfers: Increase::Models::CardTokenCapabilities::Route::cross_border_push_transfers, + domestic_push_transfers: Increase::Models::CardTokenCapabilities::Route::domestic_push_transfers, + route: Increase::Models::CardTokenCapabilities::Route::route + } + + class Route < Increase::Internal::Type::BaseModel + attr_accessor cross_border_push_transfers: Increase::Models::CardTokenCapabilities::Route::cross_border_push_transfers + + attr_accessor domestic_push_transfers: Increase::Models::CardTokenCapabilities::Route::domestic_push_transfers + + attr_accessor route: Increase::Models::CardTokenCapabilities::Route::route + + def initialize: ( + cross_border_push_transfers: Increase::Models::CardTokenCapabilities::Route::cross_border_push_transfers, + domestic_push_transfers: Increase::Models::CardTokenCapabilities::Route::domestic_push_transfers, + route: Increase::Models::CardTokenCapabilities::Route::route + ) -> void + + def to_hash: -> { + cross_border_push_transfers: Increase::Models::CardTokenCapabilities::Route::cross_border_push_transfers, + domestic_push_transfers: Increase::Models::CardTokenCapabilities::Route::domestic_push_transfers, + route: Increase::Models::CardTokenCapabilities::Route::route + } + + type cross_border_push_transfers = :supported | :not_supported + + module CrossBorderPushTransfers + extend Increase::Internal::Type::Enum + + # The capability is supported. + SUPPORTED: :supported + + # The capability is not supported. + NOT_SUPPORTED: :not_supported + + def self?.values: -> ::Array[Increase::Models::CardTokenCapabilities::Route::cross_border_push_transfers] + end + + type domestic_push_transfers = :supported | :not_supported + + module DomesticPushTransfers + extend Increase::Internal::Type::Enum + + # The capability is supported. + SUPPORTED: :supported + + # The capability is not supported. + NOT_SUPPORTED: :not_supported + + def self?.values: -> ::Array[Increase::Models::CardTokenCapabilities::Route::domestic_push_transfers] + end + + type route = :visa | :mastercard + + module Route + extend Increase::Internal::Type::Enum + + # Visa and Interlink + VISA: :visa + + # Mastercard and Maestro + MASTERCARD: :mastercard + + def self?.values: -> ::Array[Increase::Models::CardTokenCapabilities::Route::route] + end + end + + type type_ = :card_token_capabilities + + module Type + extend Increase::Internal::Type::Enum + + CARD_TOKEN_CAPABILITIES: :card_token_capabilities + + def self?.values: -> ::Array[Increase::Models::CardTokenCapabilities::type_] + end + end + end +end diff --git a/sig/increase/models/card_token_capabilities_params.rbs b/sig/increase/models/card_token_capabilities_params.rbs new file mode 100644 index 000000000..33694211f --- /dev/null +++ b/sig/increase/models/card_token_capabilities_params.rbs @@ -0,0 +1,15 @@ +module Increase + module Models + type card_token_capabilities_params = + { } & Increase::Internal::Type::request_parameters + + class CardTokenCapabilitiesParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + def initialize: (?request_options: Increase::request_opts) -> void + + def to_hash: -> { request_options: Increase::RequestOptions } + end + end +end diff --git a/sig/increase/models/card_token_list_params.rbs b/sig/increase/models/card_token_list_params.rbs new file mode 100644 index 000000000..f57bce68d --- /dev/null +++ b/sig/increase/models/card_token_list_params.rbs @@ -0,0 +1,79 @@ +module Increase + module Models + type card_token_list_params = + { + created_at: Increase::CardTokenListParams::CreatedAt, + cursor: String, + limit: Integer + } + & Increase::Internal::Type::request_parameters + + class CardTokenListParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + attr_reader created_at: Increase::CardTokenListParams::CreatedAt? + + def created_at=: ( + Increase::CardTokenListParams::CreatedAt + ) -> Increase::CardTokenListParams::CreatedAt + + attr_reader cursor: String? + + def cursor=: (String) -> String + + attr_reader limit: Integer? + + def limit=: (Integer) -> Integer + + def initialize: ( + ?created_at: Increase::CardTokenListParams::CreatedAt, + ?cursor: String, + ?limit: Integer, + ?request_options: Increase::request_opts + ) -> void + + def to_hash: -> { + created_at: Increase::CardTokenListParams::CreatedAt, + cursor: String, + limit: Integer, + request_options: Increase::RequestOptions + } + + type created_at = + { after: Time, before: Time, on_or_after: Time, on_or_before: Time } + + class CreatedAt < Increase::Internal::Type::BaseModel + attr_reader after: Time? + + def after=: (Time) -> Time + + attr_reader before: Time? + + def before=: (Time) -> Time + + attr_reader on_or_after: Time? + + def on_or_after=: (Time) -> Time + + attr_reader on_or_before: Time? + + def on_or_before=: (Time) -> Time + + def initialize: ( + ?after: Time, + ?before: Time, + ?on_or_after: Time, + ?on_or_before: Time + ) -> void + + def to_hash: -> { + after: Time, + before: Time, + on_or_after: Time, + on_or_before: Time + } + end + end + end +end diff --git a/sig/increase/models/card_token_retrieve_params.rbs b/sig/increase/models/card_token_retrieve_params.rbs new file mode 100644 index 000000000..942c4ecd7 --- /dev/null +++ b/sig/increase/models/card_token_retrieve_params.rbs @@ -0,0 +1,15 @@ +module Increase + module Models + type card_token_retrieve_params = + { } & Increase::Internal::Type::request_parameters + + class CardTokenRetrieveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + def initialize: (?request_options: Increase::request_opts) -> void + + def to_hash: -> { request_options: Increase::RequestOptions } + end + end +end diff --git a/sig/increase/models/card_validation.rbs b/sig/increase/models/card_validation.rbs new file mode 100644 index 000000000..cebbb1197 --- /dev/null +++ b/sig/increase/models/card_validation.rbs @@ -0,0 +1,634 @@ +module Increase + module Models + type card_validation = + { + id: String, + acceptance: Increase::CardValidation::Acceptance?, + account_id: String, + cardholder_first_name: String?, + cardholder_last_name: String?, + cardholder_middle_name: String?, + cardholder_postal_code: String?, + cardholder_street_address: String?, + created_at: Time, + created_by: Increase::CardValidation::CreatedBy?, + decline: Increase::CardValidation::Decline?, + idempotency_key: String?, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + status: Increase::Models::CardValidation::status, + submission: Increase::CardValidation::Submission?, + type: Increase::Models::CardValidation::type_ + } + + class CardValidation < Increase::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor acceptance: Increase::CardValidation::Acceptance? + + attr_accessor account_id: String + + attr_accessor cardholder_first_name: String? + + attr_accessor cardholder_last_name: String? + + attr_accessor cardholder_middle_name: String? + + attr_accessor cardholder_postal_code: String? + + attr_accessor cardholder_street_address: String? + + attr_accessor created_at: Time + + attr_accessor created_by: Increase::CardValidation::CreatedBy? + + attr_accessor decline: Increase::CardValidation::Decline? + + attr_accessor idempotency_key: String? + + attr_accessor merchant_category_code: String + + attr_accessor merchant_city_name: String + + attr_accessor merchant_name: String + + attr_accessor merchant_postal_code: String + + attr_accessor merchant_state: String + + attr_accessor status: Increase::Models::CardValidation::status + + attr_accessor submission: Increase::CardValidation::Submission? + + attr_accessor type: Increase::Models::CardValidation::type_ + + def initialize: ( + id: String, + acceptance: Increase::CardValidation::Acceptance?, + account_id: String, + cardholder_first_name: String?, + cardholder_last_name: String?, + cardholder_middle_name: String?, + cardholder_postal_code: String?, + cardholder_street_address: String?, + created_at: Time, + created_by: Increase::CardValidation::CreatedBy?, + decline: Increase::CardValidation::Decline?, + idempotency_key: String?, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + status: Increase::Models::CardValidation::status, + submission: Increase::CardValidation::Submission?, + type: Increase::Models::CardValidation::type_ + ) -> void + + def to_hash: -> { + id: String, + acceptance: Increase::CardValidation::Acceptance?, + account_id: String, + cardholder_first_name: String?, + cardholder_last_name: String?, + cardholder_middle_name: String?, + cardholder_postal_code: String?, + cardholder_street_address: String?, + created_at: Time, + created_by: Increase::CardValidation::CreatedBy?, + decline: Increase::CardValidation::Decline?, + idempotency_key: String?, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + status: Increase::Models::CardValidation::status, + submission: Increase::CardValidation::Submission?, + type: Increase::Models::CardValidation::type_ + } + + type acceptance = + { + accepted_at: Time, + authorization_identification_response: String, + :card_verification_value2_result => Increase::Models::CardValidation::Acceptance::card_verification_value2_result?, + cardholder_first_name_result: Increase::Models::CardValidation::Acceptance::cardholder_first_name_result?, + cardholder_full_name_result: Increase::Models::CardValidation::Acceptance::cardholder_full_name_result?, + cardholder_last_name_result: Increase::Models::CardValidation::Acceptance::cardholder_last_name_result?, + cardholder_middle_name_result: Increase::Models::CardValidation::Acceptance::cardholder_middle_name_result?, + cardholder_postal_code_result: Increase::Models::CardValidation::Acceptance::cardholder_postal_code_result?, + cardholder_street_address_result: Increase::Models::CardValidation::Acceptance::cardholder_street_address_result?, + network_transaction_identifier: String? + } + + class Acceptance < Increase::Internal::Type::BaseModel + attr_accessor accepted_at: Time + + attr_accessor authorization_identification_response: String + + attr_accessor card_verification_value2_result: Increase::Models::CardValidation::Acceptance::card_verification_value2_result? + + attr_accessor cardholder_first_name_result: Increase::Models::CardValidation::Acceptance::cardholder_first_name_result? + + attr_accessor cardholder_full_name_result: Increase::Models::CardValidation::Acceptance::cardholder_full_name_result? + + attr_accessor cardholder_last_name_result: Increase::Models::CardValidation::Acceptance::cardholder_last_name_result? + + attr_accessor cardholder_middle_name_result: Increase::Models::CardValidation::Acceptance::cardholder_middle_name_result? + + attr_accessor cardholder_postal_code_result: Increase::Models::CardValidation::Acceptance::cardholder_postal_code_result? + + attr_accessor cardholder_street_address_result: Increase::Models::CardValidation::Acceptance::cardholder_street_address_result? + + attr_accessor network_transaction_identifier: String? + + def initialize: ( + accepted_at: Time, + authorization_identification_response: String, + card_verification_value2_result: Increase::Models::CardValidation::Acceptance::card_verification_value2_result?, + cardholder_first_name_result: Increase::Models::CardValidation::Acceptance::cardholder_first_name_result?, + cardholder_full_name_result: Increase::Models::CardValidation::Acceptance::cardholder_full_name_result?, + cardholder_last_name_result: Increase::Models::CardValidation::Acceptance::cardholder_last_name_result?, + cardholder_middle_name_result: Increase::Models::CardValidation::Acceptance::cardholder_middle_name_result?, + cardholder_postal_code_result: Increase::Models::CardValidation::Acceptance::cardholder_postal_code_result?, + cardholder_street_address_result: Increase::Models::CardValidation::Acceptance::cardholder_street_address_result?, + network_transaction_identifier: String? + ) -> void + + def to_hash: -> { + accepted_at: Time, + authorization_identification_response: String, + :card_verification_value2_result => Increase::Models::CardValidation::Acceptance::card_verification_value2_result?, + cardholder_first_name_result: Increase::Models::CardValidation::Acceptance::cardholder_first_name_result?, + cardholder_full_name_result: Increase::Models::CardValidation::Acceptance::cardholder_full_name_result?, + cardholder_last_name_result: Increase::Models::CardValidation::Acceptance::cardholder_last_name_result?, + cardholder_middle_name_result: Increase::Models::CardValidation::Acceptance::cardholder_middle_name_result?, + cardholder_postal_code_result: Increase::Models::CardValidation::Acceptance::cardholder_postal_code_result?, + cardholder_street_address_result: Increase::Models::CardValidation::Acceptance::cardholder_street_address_result?, + network_transaction_identifier: String? + } + + type card_verification_value2_result = :match | :no_match + + module CardVerificationValue2Result + extend Increase::Internal::Type::Enum + + # The Card Verification Value 2 (CVV2) matches the expected value. + MATCH: :match + + # The Card Verification Value 2 (CVV2) does not match the expected value. + NO_MATCH: :no_match + + def self?.values: -> ::Array[Increase::Models::CardValidation::Acceptance::card_verification_value2_result] + end + + type cardholder_first_name_result = :match | :no_match | :partial_match + + module CardholderFirstNameResult + extend Increase::Internal::Type::Enum + + # The cardholder name component matches the expected value. + MATCH: :match + + # The cardholder name component does not match the expected value. + NO_MATCH: :no_match + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH: :partial_match + + def self?.values: -> ::Array[Increase::Models::CardValidation::Acceptance::cardholder_first_name_result] + end + + type cardholder_full_name_result = :match | :no_match | :partial_match + + module CardholderFullNameResult + extend Increase::Internal::Type::Enum + + # The cardholder name component matches the expected value. + MATCH: :match + + # The cardholder name component does not match the expected value. + NO_MATCH: :no_match + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH: :partial_match + + def self?.values: -> ::Array[Increase::Models::CardValidation::Acceptance::cardholder_full_name_result] + end + + type cardholder_last_name_result = :match | :no_match | :partial_match + + module CardholderLastNameResult + extend Increase::Internal::Type::Enum + + # The cardholder name component matches the expected value. + MATCH: :match + + # The cardholder name component does not match the expected value. + NO_MATCH: :no_match + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH: :partial_match + + def self?.values: -> ::Array[Increase::Models::CardValidation::Acceptance::cardholder_last_name_result] + end + + type cardholder_middle_name_result = :match | :no_match | :partial_match + + module CardholderMiddleNameResult + extend Increase::Internal::Type::Enum + + # The cardholder name component matches the expected value. + MATCH: :match + + # The cardholder name component does not match the expected value. + NO_MATCH: :no_match + + # The cardholder name component partially matches the expected value. + PARTIAL_MATCH: :partial_match + + def self?.values: -> ::Array[Increase::Models::CardValidation::Acceptance::cardholder_middle_name_result] + end + + type cardholder_postal_code_result = :match | :no_match + + module CardholderPostalCodeResult + extend Increase::Internal::Type::Enum + + # The cardholder address component matches the expected value. + MATCH: :match + + # The cardholder address component does not match the expected value. + NO_MATCH: :no_match + + def self?.values: -> ::Array[Increase::Models::CardValidation::Acceptance::cardholder_postal_code_result] + end + + type cardholder_street_address_result = :match | :no_match + + module CardholderStreetAddressResult + extend Increase::Internal::Type::Enum + + # The cardholder address component matches the expected value. + MATCH: :match + + # The cardholder address component does not match the expected value. + NO_MATCH: :no_match + + def self?.values: -> ::Array[Increase::Models::CardValidation::Acceptance::cardholder_street_address_result] + end + end + + type created_by = + { + api_key: Increase::CardValidation::CreatedBy::APIKey?, + category: Increase::Models::CardValidation::CreatedBy::category, + oauth_application: Increase::CardValidation::CreatedBy::OAuthApplication?, + user: Increase::CardValidation::CreatedBy::User? + } + + class CreatedBy < Increase::Internal::Type::BaseModel + attr_accessor api_key: Increase::CardValidation::CreatedBy::APIKey? + + attr_accessor category: Increase::Models::CardValidation::CreatedBy::category + + attr_accessor oauth_application: Increase::CardValidation::CreatedBy::OAuthApplication? + + attr_accessor user: Increase::CardValidation::CreatedBy::User? + + def initialize: ( + api_key: Increase::CardValidation::CreatedBy::APIKey?, + category: Increase::Models::CardValidation::CreatedBy::category, + oauth_application: Increase::CardValidation::CreatedBy::OAuthApplication?, + user: Increase::CardValidation::CreatedBy::User? + ) -> void + + def to_hash: -> { + api_key: Increase::CardValidation::CreatedBy::APIKey?, + category: Increase::Models::CardValidation::CreatedBy::category, + oauth_application: Increase::CardValidation::CreatedBy::OAuthApplication?, + user: Increase::CardValidation::CreatedBy::User? + } + + type api_key = { description: String? } + + class APIKey < Increase::Internal::Type::BaseModel + attr_accessor description: String? + + def initialize: (description: String?) -> void + + def to_hash: -> { description: String? } + end + + type category = :api_key | :oauth_application | :user + + module Category + extend Increase::Internal::Type::Enum + + # An API key. Details will be under the `api_key` object. + API_KEY: :api_key + + # An OAuth application you connected to Increase. Details will be under the `oauth_application` object. + OAUTH_APPLICATION: :oauth_application + + # A User in the Increase dashboard. Details will be under the `user` object. + USER: :user + + def self?.values: -> ::Array[Increase::Models::CardValidation::CreatedBy::category] + end + + type oauth_application = { name: String } + + class OAuthApplication < Increase::Internal::Type::BaseModel + attr_accessor name: String + + def initialize: (name: String) -> void + + def to_hash: -> { name: String } + end + + type user = { email: String } + + class User < Increase::Internal::Type::BaseModel + attr_accessor email: String + + def initialize: (email: String) -> void + + def to_hash: -> { email: String } + end + end + + type decline = + { + declined_at: Time, + network_transaction_identifier: String?, + reason: Increase::Models::CardValidation::Decline::reason + } + + class Decline < Increase::Internal::Type::BaseModel + attr_accessor declined_at: Time + + attr_accessor network_transaction_identifier: String? + + attr_accessor reason: Increase::Models::CardValidation::Decline::reason + + def initialize: ( + declined_at: Time, + network_transaction_identifier: String?, + reason: Increase::Models::CardValidation::Decline::reason + ) -> void + + def to_hash: -> { + declined_at: Time, + network_transaction_identifier: String?, + reason: Increase::Models::CardValidation::Decline::reason + } + + type reason = + :do_not_honor + | :activity_count_limit_exceeded + | :refer_to_card_issuer + | :refer_to_card_issuer_special_condition + | :invalid_merchant + | :pick_up_card + | :error + | :pick_up_card_special + | :invalid_transaction + | :invalid_amount + | :invalid_account_number + | :no_such_issuer + | :re_enter_transaction + | :no_credit_account + | :pick_up_card_lost + | :pick_up_card_stolen + | :closed_account + | :insufficient_funds + | :no_checking_account + | :no_savings_account + | :expired_card + | :transaction_not_permitted_to_cardholder + | :transaction_not_allowed_at_terminal + | :suspected_fraud + | :activity_amount_limit_exceeded + | :restricted_card + | :security_violation + | :transaction_does_not_fulfill_anti_money_laundering_requirement + | :blocked_first_use + | :credit_issuer_unavailable + | :negative_card_verification_value_results + | :issuer_unavailable + | :financial_institution_cannot_be_found + | :transaction_cannot_be_completed + | :duplicate_transaction + | :system_malfunction + | :additional_customer_authentication_required + | :surcharge_amount_not_permitted + | :decline_for_cvv2_failure + | :stop_payment_order + | :revocation_of_authorization_order + | :revocation_of_all_authorizations_order + + module Reason + extend Increase::Internal::Type::Enum + + # The card issuer has declined the transaction without providing a specific reason. + DO_NOT_HONOR: :do_not_honor + + # The number of transactions for the card has exceeded the limit set by the issuer. + ACTIVITY_COUNT_LIMIT_EXCEEDED: :activity_count_limit_exceeded + + # The card issuer requires the cardholder to contact them for further information regarding the transaction. + REFER_TO_CARD_ISSUER: :refer_to_card_issuer + + # The card issuer requires the cardholder to contact them due to a special condition related to the transaction. + REFER_TO_CARD_ISSUER_SPECIAL_CONDITION: :refer_to_card_issuer_special_condition + + # The merchant is not valid for this transaction. + INVALID_MERCHANT: :invalid_merchant + + # The card should be retained by the terminal. + PICK_UP_CARD: :pick_up_card + + # An error occurred during processing of the transaction. + ERROR: :error + + # The card should be retained by the terminal due to a special condition. + PICK_UP_CARD_SPECIAL: :pick_up_card_special + + # The transaction is invalid and cannot be processed. + INVALID_TRANSACTION: :invalid_transaction + + # The amount of the transaction is invalid. + INVALID_AMOUNT: :invalid_amount + + # The account number provided is invalid. + INVALID_ACCOUNT_NUMBER: :invalid_account_number + + # The issuer of the card could not be found. + NO_SUCH_ISSUER: :no_such_issuer + + # The transaction should be re-entered for processing. + RE_ENTER_TRANSACTION: :re_enter_transaction + + # There is no credit account associated with the card. + NO_CREDIT_ACCOUNT: :no_credit_account + + # The card should be retained by the terminal because it has been reported lost. + PICK_UP_CARD_LOST: :pick_up_card_lost + + # The card should be retained by the terminal because it has been reported stolen. + PICK_UP_CARD_STOLEN: :pick_up_card_stolen + + # The account associated with the card has been closed. + CLOSED_ACCOUNT: :closed_account + + # There are insufficient funds in the account to complete the transaction. + INSUFFICIENT_FUNDS: :insufficient_funds + + # There is no checking account associated with the card. + NO_CHECKING_ACCOUNT: :no_checking_account + + # There is no savings account associated with the card. + NO_SAVINGS_ACCOUNT: :no_savings_account + + # The card has expired and cannot be used for transactions. + EXPIRED_CARD: :expired_card + + # The transaction is not permitted for this cardholder. + TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER: :transaction_not_permitted_to_cardholder + + # The transaction is not allowed at this terminal. + TRANSACTION_NOT_ALLOWED_AT_TERMINAL: :transaction_not_allowed_at_terminal + + # The transaction has been flagged as suspected fraud and cannot be processed. + SUSPECTED_FRAUD: :suspected_fraud + + # The amount of activity on the card has exceeded the limit set by the issuer. + ACTIVITY_AMOUNT_LIMIT_EXCEEDED: :activity_amount_limit_exceeded + + # The card has restrictions that prevent it from being used for this transaction. + RESTRICTED_CARD: :restricted_card + + # A security violation has occurred, preventing the transaction from being processed. + SECURITY_VIOLATION: :security_violation + + # The transaction does not meet the anti-money laundering requirements set by the issuer. + TRANSACTION_DOES_NOT_FULFILL_ANTI_MONEY_LAUNDERING_REQUIREMENT: :transaction_does_not_fulfill_anti_money_laundering_requirement + + # The first use of the card has been blocked by the issuer. + BLOCKED_FIRST_USE: :blocked_first_use + + # The credit issuer is currently unavailable to process the transaction. + CREDIT_ISSUER_UNAVAILABLE: :credit_issuer_unavailable + + # The card verification value (CVV) results were negative, indicating a potential issue with the card. + NEGATIVE_CARD_VERIFICATION_VALUE_RESULTS: :negative_card_verification_value_results + + # The issuer of the card is currently unavailable to process the transaction. + ISSUER_UNAVAILABLE: :issuer_unavailable + + # The financial institution associated with the card could not be found. + FINANCIAL_INSTITUTION_CANNOT_BE_FOUND: :financial_institution_cannot_be_found + + # The transaction cannot be completed due to an unspecified reason. + TRANSACTION_CANNOT_BE_COMPLETED: :transaction_cannot_be_completed + + # The transaction is a duplicate of a previous transaction and cannot be processed again. + DUPLICATE_TRANSACTION: :duplicate_transaction + + # A system malfunction occurred, preventing the transaction from being processed. + SYSTEM_MALFUNCTION: :system_malfunction + + # Additional customer authentication is required to complete the transaction. + ADDITIONAL_CUSTOMER_AUTHENTICATION_REQUIRED: :additional_customer_authentication_required + + # The surcharge amount applied to the transaction is not permitted by the issuer. + SURCHARGE_AMOUNT_NOT_PERMITTED: :surcharge_amount_not_permitted + + # The transaction was declined due to a failure in verifying the CVV2 code. + DECLINE_FOR_CVV2_FAILURE: :decline_for_cvv2_failure + + # A stop payment order has been placed on this transaction. + STOP_PAYMENT_ORDER: :stop_payment_order + + # An order has been placed to revoke authorization for this transaction. + REVOCATION_OF_AUTHORIZATION_ORDER: :revocation_of_authorization_order + + # An order has been placed to revoke all authorizations for this cardholder. + REVOCATION_OF_ALL_AUTHORIZATIONS_ORDER: :revocation_of_all_authorizations_order + + def self?.values: -> ::Array[Increase::Models::CardValidation::Decline::reason] + end + end + + type status = + :requires_attention + | :pending_submission + | :submitted + | :complete + | :declined + + module Status + extend Increase::Internal::Type::Enum + + # The validation requires attention from an Increase operator. + REQUIRES_ATTENTION: :requires_attention + + # The validation is queued to be submitted to the card network. + PENDING_SUBMISSION: :pending_submission + + # The validation has been submitted and is pending a response from the card network. + SUBMITTED: :submitted + + # The validation has been sent successfully and is complete. + COMPLETE: :complete + + # The validation was declined by the network or the recipient's bank. + DECLINED: :declined + + def self?.values: -> ::Array[Increase::Models::CardValidation::status] + end + + type submission = + { + retrieval_reference_number: String, + submitted_at: Time, + trace_number: String + } + + class Submission < Increase::Internal::Type::BaseModel + attr_accessor retrieval_reference_number: String + + attr_accessor submitted_at: Time + + attr_accessor trace_number: String + + def initialize: ( + retrieval_reference_number: String, + submitted_at: Time, + trace_number: String + ) -> void + + def to_hash: -> { + retrieval_reference_number: String, + submitted_at: Time, + trace_number: String + } + end + + type type_ = :card_validation + + module Type + extend Increase::Internal::Type::Enum + + CARD_VALIDATION: :card_validation + + def self?.values: -> ::Array[Increase::Models::CardValidation::type_] + end + end + end +end diff --git a/sig/increase/models/card_validation_create_params.rbs b/sig/increase/models/card_validation_create_params.rbs new file mode 100644 index 000000000..a301ac0aa --- /dev/null +++ b/sig/increase/models/card_validation_create_params.rbs @@ -0,0 +1,91 @@ +module Increase + module Models + type card_validation_create_params = + { + account_id: String, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + cardholder_first_name: String, + cardholder_last_name: String, + cardholder_middle_name: String, + cardholder_postal_code: String, + cardholder_street_address: String + } + & Increase::Internal::Type::request_parameters + + class CardValidationCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + attr_accessor account_id: String + + attr_accessor card_token_id: String + + attr_accessor merchant_category_code: String + + attr_accessor merchant_city_name: String + + attr_accessor merchant_name: String + + attr_accessor merchant_postal_code: String + + attr_accessor merchant_state: String + + attr_reader cardholder_first_name: String? + + def cardholder_first_name=: (String) -> String + + attr_reader cardholder_last_name: String? + + def cardholder_last_name=: (String) -> String + + attr_reader cardholder_middle_name: String? + + def cardholder_middle_name=: (String) -> String + + attr_reader cardholder_postal_code: String? + + def cardholder_postal_code=: (String) -> String + + attr_reader cardholder_street_address: String? + + def cardholder_street_address=: (String) -> String + + def initialize: ( + account_id: String, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + ?cardholder_first_name: String, + ?cardholder_last_name: String, + ?cardholder_middle_name: String, + ?cardholder_postal_code: String, + ?cardholder_street_address: String, + ?request_options: Increase::request_opts + ) -> void + + def to_hash: -> { + account_id: String, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + cardholder_first_name: String, + cardholder_last_name: String, + cardholder_middle_name: String, + cardholder_postal_code: String, + cardholder_street_address: String, + request_options: Increase::RequestOptions + } + end + end +end diff --git a/sig/increase/models/card_validation_list_params.rbs b/sig/increase/models/card_validation_list_params.rbs new file mode 100644 index 000000000..e03d15ccc --- /dev/null +++ b/sig/increase/models/card_validation_list_params.rbs @@ -0,0 +1,151 @@ +module Increase + module Models + type card_validation_list_params = + { + account_id: String, + created_at: Increase::CardValidationListParams::CreatedAt, + cursor: String, + idempotency_key: String, + limit: Integer, + status: Increase::CardValidationListParams::Status + } + & Increase::Internal::Type::request_parameters + + class CardValidationListParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + attr_reader account_id: String? + + def account_id=: (String) -> String + + attr_reader created_at: Increase::CardValidationListParams::CreatedAt? + + def created_at=: ( + Increase::CardValidationListParams::CreatedAt + ) -> Increase::CardValidationListParams::CreatedAt + + attr_reader cursor: String? + + def cursor=: (String) -> String + + attr_reader idempotency_key: String? + + def idempotency_key=: (String) -> String + + attr_reader limit: Integer? + + def limit=: (Integer) -> Integer + + attr_reader status: Increase::CardValidationListParams::Status? + + def status=: ( + Increase::CardValidationListParams::Status + ) -> Increase::CardValidationListParams::Status + + def initialize: ( + ?account_id: String, + ?created_at: Increase::CardValidationListParams::CreatedAt, + ?cursor: String, + ?idempotency_key: String, + ?limit: Integer, + ?status: Increase::CardValidationListParams::Status, + ?request_options: Increase::request_opts + ) -> void + + def to_hash: -> { + account_id: String, + created_at: Increase::CardValidationListParams::CreatedAt, + cursor: String, + idempotency_key: String, + limit: Integer, + status: Increase::CardValidationListParams::Status, + request_options: Increase::RequestOptions + } + + type created_at = + { after: Time, before: Time, on_or_after: Time, on_or_before: Time } + + class CreatedAt < Increase::Internal::Type::BaseModel + attr_reader after: Time? + + def after=: (Time) -> Time + + attr_reader before: Time? + + def before=: (Time) -> Time + + attr_reader on_or_after: Time? + + def on_or_after=: (Time) -> Time + + attr_reader on_or_before: Time? + + def on_or_before=: (Time) -> Time + + def initialize: ( + ?after: Time, + ?before: Time, + ?on_or_after: Time, + ?on_or_before: Time + ) -> void + + def to_hash: -> { + after: Time, + before: Time, + on_or_after: Time, + on_or_before: Time + } + end + + type status = + { + in_: ::Array[Increase::Models::CardValidationListParams::Status::in_] + } + + class Status < Increase::Internal::Type::BaseModel + attr_reader in_: ::Array[Increase::Models::CardValidationListParams::Status::in_]? + + def in_=: ( + ::Array[Increase::Models::CardValidationListParams::Status::in_] + ) -> ::Array[Increase::Models::CardValidationListParams::Status::in_] + + def initialize: ( + ?in_: ::Array[Increase::Models::CardValidationListParams::Status::in_] + ) -> void + + def to_hash: -> { + in_: ::Array[Increase::Models::CardValidationListParams::Status::in_] + } + + type in_ = + :requires_attention + | :pending_submission + | :submitted + | :complete + | :declined + + module In + extend Increase::Internal::Type::Enum + + # The validation requires attention from an Increase operator. + REQUIRES_ATTENTION: :requires_attention + + # The validation is queued to be submitted to the card network. + PENDING_SUBMISSION: :pending_submission + + # The validation has been submitted and is pending a response from the card network. + SUBMITTED: :submitted + + # The validation has been sent successfully and is complete. + COMPLETE: :complete + + # The validation was declined by the network or the recipient's bank. + DECLINED: :declined + + def self?.values: -> ::Array[Increase::Models::CardValidationListParams::Status::in_] + end + end + end + end +end diff --git a/sig/increase/models/card_validation_retrieve_params.rbs b/sig/increase/models/card_validation_retrieve_params.rbs new file mode 100644 index 000000000..54895426a --- /dev/null +++ b/sig/increase/models/card_validation_retrieve_params.rbs @@ -0,0 +1,15 @@ +module Increase + module Models + type card_validation_retrieve_params = + { } & Increase::Internal::Type::request_parameters + + class CardValidationRetrieveParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + def initialize: (?request_options: Increase::request_opts) -> void + + def to_hash: -> { request_options: Increase::RequestOptions } + end + end +end diff --git a/sig/increase/models/simulations/card_token_create_params.rbs b/sig/increase/models/simulations/card_token_create_params.rbs new file mode 100644 index 000000000..6b06eea13 --- /dev/null +++ b/sig/increase/models/simulations/card_token_create_params.rbs @@ -0,0 +1,129 @@ +module Increase + module Models + module Simulations + type card_token_create_params = + { + capabilities: ::Array[Increase::Simulations::CardTokenCreateParams::Capability], + expiration: Date, + :last4 => String, + prefix: String, + primary_account_number_length: Integer + } + & Increase::Internal::Type::request_parameters + + class CardTokenCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + attr_reader capabilities: ::Array[Increase::Simulations::CardTokenCreateParams::Capability]? + + def capabilities=: ( + ::Array[Increase::Simulations::CardTokenCreateParams::Capability] + ) -> ::Array[Increase::Simulations::CardTokenCreateParams::Capability] + + attr_reader expiration: Date? + + def expiration=: (Date) -> Date + + attr_reader last4: String? + + def last4=: (String) -> String + + attr_reader prefix: String? + + def prefix=: (String) -> String + + attr_reader primary_account_number_length: Integer? + + def primary_account_number_length=: (Integer) -> Integer + + def initialize: ( + ?capabilities: ::Array[Increase::Simulations::CardTokenCreateParams::Capability], + ?expiration: Date, + ?last4: String, + ?prefix: String, + ?primary_account_number_length: Integer, + ?request_options: Increase::request_opts + ) -> void + + def to_hash: -> { + capabilities: ::Array[Increase::Simulations::CardTokenCreateParams::Capability], + expiration: Date, + :last4 => String, + prefix: String, + primary_account_number_length: Integer, + request_options: Increase::RequestOptions + } + + type capability = + { + cross_border_push_transfers: Increase::Models::Simulations::CardTokenCreateParams::Capability::cross_border_push_transfers, + domestic_push_transfers: Increase::Models::Simulations::CardTokenCreateParams::Capability::domestic_push_transfers, + route: Increase::Models::Simulations::CardTokenCreateParams::Capability::route + } + + class Capability < Increase::Internal::Type::BaseModel + attr_accessor cross_border_push_transfers: Increase::Models::Simulations::CardTokenCreateParams::Capability::cross_border_push_transfers + + attr_accessor domestic_push_transfers: Increase::Models::Simulations::CardTokenCreateParams::Capability::domestic_push_transfers + + attr_accessor route: Increase::Models::Simulations::CardTokenCreateParams::Capability::route + + def initialize: ( + cross_border_push_transfers: Increase::Models::Simulations::CardTokenCreateParams::Capability::cross_border_push_transfers, + domestic_push_transfers: Increase::Models::Simulations::CardTokenCreateParams::Capability::domestic_push_transfers, + route: Increase::Models::Simulations::CardTokenCreateParams::Capability::route + ) -> void + + def to_hash: -> { + cross_border_push_transfers: Increase::Models::Simulations::CardTokenCreateParams::Capability::cross_border_push_transfers, + domestic_push_transfers: Increase::Models::Simulations::CardTokenCreateParams::Capability::domestic_push_transfers, + route: Increase::Models::Simulations::CardTokenCreateParams::Capability::route + } + + type cross_border_push_transfers = :supported | :not_supported + + module CrossBorderPushTransfers + extend Increase::Internal::Type::Enum + + # The capability is supported. + SUPPORTED: :supported + + # The capability is not supported. + NOT_SUPPORTED: :not_supported + + def self?.values: -> ::Array[Increase::Models::Simulations::CardTokenCreateParams::Capability::cross_border_push_transfers] + end + + type domestic_push_transfers = :supported | :not_supported + + module DomesticPushTransfers + extend Increase::Internal::Type::Enum + + # The capability is supported. + SUPPORTED: :supported + + # The capability is not supported. + NOT_SUPPORTED: :not_supported + + def self?.values: -> ::Array[Increase::Models::Simulations::CardTokenCreateParams::Capability::domestic_push_transfers] + end + + type route = :visa | :mastercard + + module Route + extend Increase::Internal::Type::Enum + + # Visa and Interlink + VISA: :visa + + # Mastercard and Maestro + MASTERCARD: :mastercard + + def self?.values: -> ::Array[Increase::Models::Simulations::CardTokenCreateParams::Capability::route] + end + end + end + end + end +end diff --git a/sig/increase/resources/card_push_transfers.rbs b/sig/increase/resources/card_push_transfers.rbs new file mode 100644 index 000000000..9ac7ce96c --- /dev/null +++ b/sig/increase/resources/card_push_transfers.rbs @@ -0,0 +1,53 @@ +module Increase + module Resources + class CardPushTransfers + def create: ( + amount: Integer, + business_application_identifier: Increase::Models::CardPushTransferCreateParams::business_application_identifier, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + ?require_approval: bool, + ?request_options: Increase::request_opts + ) -> Increase::CardPushTransfer + + def retrieve: ( + String card_push_transfer_id, + ?request_options: Increase::request_opts + ) -> Increase::CardPushTransfer + + def list: ( + ?account_id: String, + ?created_at: Increase::CardPushTransferListParams::CreatedAt, + ?cursor: String, + ?idempotency_key: String, + ?limit: Integer, + ?status: Increase::CardPushTransferListParams::Status, + ?request_options: Increase::request_opts + ) -> Increase::Internal::Page[Increase::CardPushTransfer] + + def approve: ( + String card_push_transfer_id, + ?request_options: Increase::request_opts + ) -> Increase::CardPushTransfer + + def cancel: ( + String card_push_transfer_id, + ?request_options: Increase::request_opts + ) -> Increase::CardPushTransfer + + def initialize: (client: Increase::Client) -> void + end + end +end diff --git a/sig/increase/resources/card_tokens.rbs b/sig/increase/resources/card_tokens.rbs new file mode 100644 index 000000000..fda07498f --- /dev/null +++ b/sig/increase/resources/card_tokens.rbs @@ -0,0 +1,24 @@ +module Increase + module Resources + class CardTokens + def retrieve: ( + String card_token_id, + ?request_options: Increase::request_opts + ) -> Increase::CardToken + + def list: ( + ?created_at: Increase::CardTokenListParams::CreatedAt, + ?cursor: String, + ?limit: Integer, + ?request_options: Increase::request_opts + ) -> Increase::Internal::Page[Increase::CardToken] + + def capabilities: ( + String card_token_id, + ?request_options: Increase::request_opts + ) -> Increase::CardTokenCapabilities + + def initialize: (client: Increase::Client) -> void + end + end +end diff --git a/sig/increase/resources/card_validations.rbs b/sig/increase/resources/card_validations.rbs new file mode 100644 index 000000000..65dfd86f2 --- /dev/null +++ b/sig/increase/resources/card_validations.rbs @@ -0,0 +1,38 @@ +module Increase + module Resources + class CardValidations + def create: ( + account_id: String, + card_token_id: String, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + ?cardholder_first_name: String, + ?cardholder_last_name: String, + ?cardholder_middle_name: String, + ?cardholder_postal_code: String, + ?cardholder_street_address: String, + ?request_options: Increase::request_opts + ) -> Increase::CardValidation + + def retrieve: ( + String card_validation_id, + ?request_options: Increase::request_opts + ) -> Increase::CardValidation + + def list: ( + ?account_id: String, + ?created_at: Increase::CardValidationListParams::CreatedAt, + ?cursor: String, + ?idempotency_key: String, + ?limit: Integer, + ?status: Increase::CardValidationListParams::Status, + ?request_options: Increase::request_opts + ) -> Increase::Internal::Page[Increase::CardValidation] + + def initialize: (client: Increase::Client) -> void + end + end +end diff --git a/sig/increase/resources/simulations.rbs b/sig/increase/resources/simulations.rbs index c8bea63c3..d3a12d9d0 100644 --- a/sig/increase/resources/simulations.rbs +++ b/sig/increase/resources/simulations.rbs @@ -57,6 +57,8 @@ module Increase attr_reader documents: Increase::Resources::Simulations::Documents + attr_reader card_tokens: Increase::Resources::Simulations::CardTokens + def initialize: (client: Increase::Client) -> void end end diff --git a/sig/increase/resources/simulations/card_tokens.rbs b/sig/increase/resources/simulations/card_tokens.rbs new file mode 100644 index 000000000..9b4296f63 --- /dev/null +++ b/sig/increase/resources/simulations/card_tokens.rbs @@ -0,0 +1,18 @@ +module Increase + module Resources + class Simulations + class CardTokens + def create: ( + ?capabilities: ::Array[Increase::Simulations::CardTokenCreateParams::Capability], + ?expiration: Date, + ?last4: String, + ?prefix: String, + ?primary_account_number_length: Integer, + ?request_options: Increase::request_opts + ) -> Increase::CardToken + + def initialize: (client: Increase::Client) -> void + end + end + end +end diff --git a/test/increase/resources/card_push_transfers_test.rb b/test/increase/resources/card_push_transfers_test.rb new file mode 100644 index 000000000..0607718dd --- /dev/null +++ b/test/increase/resources/card_push_transfers_test.rb @@ -0,0 +1,235 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class Increase::Test::Resources::CardPushTransfersTest < Increase::Test::ResourceTest + def test_create_required_params + response = + @increase.card_push_transfers.create( + amount: 100, + business_application_identifier: :funds_disbursement, + card_token_id: "outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code: "1234", + merchant_city_name: "New York", + merchant_name: "Acme Corp", + merchant_name_prefix: "Acme", + merchant_postal_code: "10045", + merchant_state: "NY", + recipient_name: "Ian Crease", + sender_address_city: "New York", + sender_address_line1: "33 Liberty Street", + sender_address_postal_code: "10045", + sender_address_state: "NY", + sender_name: "Ian Crease", + source_account_number_id: "account_number_v18nkfqm6afpsrvy82b2" + ) + + assert_pattern do + response => Increase::CardPushTransfer + end + + assert_pattern do + response => { + id: String, + acceptance: Increase::CardPushTransfer::Acceptance | nil, + account_id: String, + amount: Integer, + approval: Increase::CardPushTransfer::Approval | nil, + business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier, + cancellation: Increase::CardPushTransfer::Cancellation | nil, + created_at: Time, + created_by: Increase::CardPushTransfer::CreatedBy | nil, + currency: Increase::CardPushTransfer::Currency, + decline: Increase::CardPushTransfer::Decline | nil, + idempotency_key: String | nil, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + status: Increase::CardPushTransfer::Status, + submission: Increase::CardPushTransfer::Submission | nil, + type: Increase::CardPushTransfer::Type + } + end + end + + def test_retrieve + response = @increase.card_push_transfers.retrieve("card_push_transfer_id") + + assert_pattern do + response => Increase::CardPushTransfer + end + + assert_pattern do + response => { + id: String, + acceptance: Increase::CardPushTransfer::Acceptance | nil, + account_id: String, + amount: Integer, + approval: Increase::CardPushTransfer::Approval | nil, + business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier, + cancellation: Increase::CardPushTransfer::Cancellation | nil, + created_at: Time, + created_by: Increase::CardPushTransfer::CreatedBy | nil, + currency: Increase::CardPushTransfer::Currency, + decline: Increase::CardPushTransfer::Decline | nil, + idempotency_key: String | nil, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + status: Increase::CardPushTransfer::Status, + submission: Increase::CardPushTransfer::Submission | nil, + type: Increase::CardPushTransfer::Type + } + end + end + + def test_list + response = @increase.card_push_transfers.list + + assert_pattern do + response => Increase::Internal::Page + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => Increase::CardPushTransfer + end + + assert_pattern do + row => { + id: String, + acceptance: Increase::CardPushTransfer::Acceptance | nil, + account_id: String, + amount: Integer, + approval: Increase::CardPushTransfer::Approval | nil, + business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier, + cancellation: Increase::CardPushTransfer::Cancellation | nil, + created_at: Time, + created_by: Increase::CardPushTransfer::CreatedBy | nil, + currency: Increase::CardPushTransfer::Currency, + decline: Increase::CardPushTransfer::Decline | nil, + idempotency_key: String | nil, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + status: Increase::CardPushTransfer::Status, + submission: Increase::CardPushTransfer::Submission | nil, + type: Increase::CardPushTransfer::Type + } + end + end + + def test_approve + response = @increase.card_push_transfers.approve("card_push_transfer_id") + + assert_pattern do + response => Increase::CardPushTransfer + end + + assert_pattern do + response => { + id: String, + acceptance: Increase::CardPushTransfer::Acceptance | nil, + account_id: String, + amount: Integer, + approval: Increase::CardPushTransfer::Approval | nil, + business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier, + cancellation: Increase::CardPushTransfer::Cancellation | nil, + created_at: Time, + created_by: Increase::CardPushTransfer::CreatedBy | nil, + currency: Increase::CardPushTransfer::Currency, + decline: Increase::CardPushTransfer::Decline | nil, + idempotency_key: String | nil, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + status: Increase::CardPushTransfer::Status, + submission: Increase::CardPushTransfer::Submission | nil, + type: Increase::CardPushTransfer::Type + } + end + end + + def test_cancel + response = @increase.card_push_transfers.cancel("card_push_transfer_id") + + assert_pattern do + response => Increase::CardPushTransfer + end + + assert_pattern do + response => { + id: String, + acceptance: Increase::CardPushTransfer::Acceptance | nil, + account_id: String, + amount: Integer, + approval: Increase::CardPushTransfer::Approval | nil, + business_application_identifier: Increase::CardPushTransfer::BusinessApplicationIdentifier, + cancellation: Increase::CardPushTransfer::Cancellation | nil, + created_at: Time, + created_by: Increase::CardPushTransfer::CreatedBy | nil, + currency: Increase::CardPushTransfer::Currency, + decline: Increase::CardPushTransfer::Decline | nil, + idempotency_key: String | nil, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_name_prefix: String, + merchant_postal_code: String, + merchant_state: String, + recipient_name: String, + sender_address_city: String, + sender_address_line1: String, + sender_address_postal_code: String, + sender_address_state: String, + sender_name: String, + source_account_number_id: String, + status: Increase::CardPushTransfer::Status, + submission: Increase::CardPushTransfer::Submission | nil, + type: Increase::CardPushTransfer::Type + } + end + end +end diff --git a/test/increase/resources/card_tokens_test.rb b/test/increase/resources/card_tokens_test.rb new file mode 100644 index 000000000..79f887c0b --- /dev/null +++ b/test/increase/resources/card_tokens_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class Increase::Test::Resources::CardTokensTest < Increase::Test::ResourceTest + def test_retrieve + response = @increase.card_tokens.retrieve("card_token_id") + + assert_pattern do + response => Increase::CardToken + end + + assert_pattern do + response => { + id: String, + created_at: Time, + expiration_date: Date, + last4: String, + length: Integer, + prefix: String, + type: Increase::CardToken::Type + } + end + end + + def test_list + response = @increase.card_tokens.list + + assert_pattern do + response => Increase::Internal::Page + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => Increase::CardToken + end + + assert_pattern do + row => { + id: String, + created_at: Time, + expiration_date: Date, + last4: String, + length: Integer, + prefix: String, + type: Increase::CardToken::Type + } + end + end + + def test_capabilities + response = @increase.card_tokens.capabilities("card_token_id") + + assert_pattern do + response => Increase::CardTokenCapabilities + end + + assert_pattern do + response => { + routes: ^(Increase::Internal::Type::ArrayOf[Increase::CardTokenCapabilities::Route]), + type: Increase::CardTokenCapabilities::Type + } + end + end +end diff --git a/test/increase/resources/card_validations_test.rb b/test/increase/resources/card_validations_test.rb new file mode 100644 index 000000000..5c4bd4856 --- /dev/null +++ b/test/increase/resources/card_validations_test.rb @@ -0,0 +1,120 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class Increase::Test::Resources::CardValidationsTest < Increase::Test::ResourceTest + def test_create_required_params + response = + @increase.card_validations.create( + account_id: "account_in71c4amph0vgo2qllky", + card_token_id: "outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code: "1234", + merchant_city_name: "New York", + merchant_name: "Acme Corp", + merchant_postal_code: "10045", + merchant_state: "NY" + ) + + assert_pattern do + response => Increase::CardValidation + end + + assert_pattern do + response => { + id: String, + acceptance: Increase::CardValidation::Acceptance | nil, + account_id: String, + cardholder_first_name: String | nil, + cardholder_last_name: String | nil, + cardholder_middle_name: String | nil, + cardholder_postal_code: String | nil, + cardholder_street_address: String | nil, + created_at: Time, + created_by: Increase::CardValidation::CreatedBy | nil, + decline: Increase::CardValidation::Decline | nil, + idempotency_key: String | nil, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + status: Increase::CardValidation::Status, + submission: Increase::CardValidation::Submission | nil, + type: Increase::CardValidation::Type + } + end + end + + def test_retrieve + response = @increase.card_validations.retrieve("card_validation_id") + + assert_pattern do + response => Increase::CardValidation + end + + assert_pattern do + response => { + id: String, + acceptance: Increase::CardValidation::Acceptance | nil, + account_id: String, + cardholder_first_name: String | nil, + cardholder_last_name: String | nil, + cardholder_middle_name: String | nil, + cardholder_postal_code: String | nil, + cardholder_street_address: String | nil, + created_at: Time, + created_by: Increase::CardValidation::CreatedBy | nil, + decline: Increase::CardValidation::Decline | nil, + idempotency_key: String | nil, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + status: Increase::CardValidation::Status, + submission: Increase::CardValidation::Submission | nil, + type: Increase::CardValidation::Type + } + end + end + + def test_list + response = @increase.card_validations.list + + assert_pattern do + response => Increase::Internal::Page + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => Increase::CardValidation + end + + assert_pattern do + row => { + id: String, + acceptance: Increase::CardValidation::Acceptance | nil, + account_id: String, + cardholder_first_name: String | nil, + cardholder_last_name: String | nil, + cardholder_middle_name: String | nil, + cardholder_postal_code: String | nil, + cardholder_street_address: String | nil, + created_at: Time, + created_by: Increase::CardValidation::CreatedBy | nil, + decline: Increase::CardValidation::Decline | nil, + idempotency_key: String | nil, + merchant_category_code: String, + merchant_city_name: String, + merchant_name: String, + merchant_postal_code: String, + merchant_state: String, + status: Increase::CardValidation::Status, + submission: Increase::CardValidation::Submission | nil, + type: Increase::CardValidation::Type + } + end + end +end diff --git a/test/increase/resources/simulations/card_tokens_test.rb b/test/increase/resources/simulations/card_tokens_test.rb new file mode 100644 index 000000000..f8bff2af6 --- /dev/null +++ b/test/increase/resources/simulations/card_tokens_test.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require_relative "../../test_helper" + +class Increase::Test::Resources::Simulations::CardTokensTest < Increase::Test::ResourceTest + def test_create + response = @increase.simulations.card_tokens.create + + assert_pattern do + response => Increase::CardToken + end + + assert_pattern do + response => { + id: String, + created_at: Time, + expiration_date: Date, + last4: String, + length: Integer, + prefix: String, + type: Increase::CardToken::Type + } + end + end +end From bca467f78b316814f8ba3e85525b65ec2f14eb81 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:58:12 +0000 Subject: [PATCH 2/2] release: 1.34.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/increase/version.rb | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5334cb411..257e308d6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.33.0" + ".": "1.34.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e47241841..0f6c22ede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.34.0 (2025-08-14) + +Full Changelog: [v1.33.0...v1.34.0](https://github.com/Increase/increase-ruby/compare/v1.33.0...v1.34.0) + +### Features + +* **api:** api update ([d93934a](https://github.com/Increase/increase-ruby/commit/d93934aa75ab7bc1b15240f5727f41fc6a0ef110)) + ## 1.33.0 (2025-08-14) Full Changelog: [v1.32.0...v1.33.0](https://github.com/Increase/increase-ruby/compare/v1.32.0...v1.33.0) diff --git a/Gemfile.lock b/Gemfile.lock index 1194dd2bf..8a35890d8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.33.0) + increase (1.34.0) connection_pool GEM diff --git a/README.md b/README.md index 48a310189..200664033 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "increase", "~> 1.33.0" +gem "increase", "~> 1.34.0" ``` diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 60387332f..8a7339860 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.33.0" + VERSION = "1.34.0" end