lithic 0.1.0.pre.alpha.3 → 0.1.0.pre.alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/lithic/client.rb +8 -6
- data/lib/lithic/errors.rb +195 -158
- data/lib/lithic/models/account.rb +7 -0
- data/lib/lithic/models/account_holder.rb +13 -0
- data/lib/lithic/models/account_holder_create_params.rb +1 -0
- data/lib/lithic/models/account_holder_create_response.rb +3 -0
- data/lib/lithic/models/account_holder_list_documents_params.rb +1 -0
- data/lib/lithic/models/account_holder_list_documents_response.rb +1 -0
- data/lib/lithic/models/account_holder_list_params.rb +1 -0
- data/lib/lithic/models/account_holder_retrieve_document_params.rb +1 -0
- data/lib/lithic/models/account_holder_retrieve_params.rb +1 -0
- data/lib/lithic/models/account_holder_simulate_enrollment_document_review_params.rb +1 -0
- data/lib/lithic/models/account_holder_simulate_enrollment_review_params.rb +1 -0
- data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +15 -0
- data/lib/lithic/models/account_holder_update_params.rb +1 -0
- data/lib/lithic/models/account_holder_update_response.rb +16 -0
- data/lib/lithic/models/account_holder_upload_document_params.rb +1 -0
- data/lib/lithic/models/account_list_params.rb +1 -0
- data/lib/lithic/models/account_retrieve_params.rb +1 -0
- data/lib/lithic/models/account_retrieve_spend_limits_params.rb +1 -0
- data/lib/lithic/models/account_spend_limits.rb +4 -0
- data/lib/lithic/models/account_update_params.rb +1 -0
- data/lib/lithic/models/aggregate_balance.rb +3 -0
- data/lib/lithic/models/aggregate_balance_list_params.rb +1 -0
- data/lib/lithic/models/api_status.rb +1 -0
- data/lib/lithic/models/auth_rules/auth_rule.rb +2 -0
- data/lib/lithic/models/auth_rules/auth_rule_condition.rb +4 -0
- data/lib/lithic/models/auth_rules/v2/backtest_create_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2/backtest_create_response.rb +1 -0
- data/lib/lithic/models/auth_rules/v2/backtest_results.rb +5 -0
- data/lib/lithic/models/auth_rules/v2/backtest_retrieve_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_apply_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_apply_response.rb +11 -0
- data/lib/lithic/models/auth_rules/v2_create_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_create_response.rb +11 -0
- data/lib/lithic/models/auth_rules/v2_delete_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_draft_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_draft_response.rb +11 -0
- data/lib/lithic/models/auth_rules/v2_list_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_list_response.rb +11 -0
- data/lib/lithic/models/auth_rules/v2_promote_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_promote_response.rb +11 -0
- data/lib/lithic/models/auth_rules/v2_report_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_report_response.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_retrieve_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +11 -0
- data/lib/lithic/models/auth_rules/v2_update_params.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_update_response.rb +11 -0
- data/lib/lithic/models/auth_rules/velocity_limit_params.rb +4 -0
- data/lib/lithic/models/auth_stream_enrollment_retrieve_secret_params.rb +1 -0
- data/lib/lithic/models/auth_stream_enrollment_rotate_secret_params.rb +1 -0
- data/lib/lithic/models/auth_stream_secret.rb +1 -0
- data/lib/lithic/models/balance.rb +3 -0
- data/lib/lithic/models/balance_list_params.rb +1 -0
- data/lib/lithic/models/book_transfer_create_params.rb +1 -0
- data/lib/lithic/models/book_transfer_list_params.rb +1 -0
- data/lib/lithic/models/book_transfer_response.rb +9 -0
- data/lib/lithic/models/book_transfer_retrieve_params.rb +1 -0
- data/lib/lithic/models/book_transfer_reverse_params.rb +1 -0
- data/lib/lithic/models/card.rb +12 -0
- data/lib/lithic/models/card_convert_physical_params.rb +2 -1
- data/lib/lithic/models/card_create_params.rb +2 -1
- data/lib/lithic/models/card_embed_params.rb +1 -0
- data/lib/lithic/models/card_list_params.rb +1 -0
- data/lib/lithic/models/card_program.rb +1 -0
- data/lib/lithic/models/card_program_list_params.rb +1 -0
- data/lib/lithic/models/card_program_retrieve_params.rb +1 -0
- data/lib/lithic/models/card_provision_params.rb +1 -0
- data/lib/lithic/models/card_provision_response.rb +1 -0
- data/lib/lithic/models/card_reissue_params.rb +2 -1
- data/lib/lithic/models/card_renew_params.rb +2 -1
- data/lib/lithic/models/card_retrieve_params.rb +1 -0
- data/lib/lithic/models/card_retrieve_spend_limits_params.rb +1 -0
- data/lib/lithic/models/card_search_by_pan_params.rb +1 -0
- data/lib/lithic/models/card_spend_limits.rb +4 -0
- data/lib/lithic/models/card_update_params.rb +1 -0
- data/lib/lithic/models/cards/aggregate_balance_list_params.rb +1 -0
- data/lib/lithic/models/cards/aggregate_balance_list_response.rb +1 -0
- data/lib/lithic/models/cards/balance_list_params.rb +1 -0
- data/lib/lithic/models/cards/balance_list_response.rb +3 -0
- data/lib/lithic/models/cards/financial_transaction_list_params.rb +1 -0
- data/lib/lithic/models/cards/financial_transaction_retrieve_params.rb +1 -0
- data/lib/lithic/models/client_api_status_params.rb +1 -0
- data/lib/lithic/models/credit_products/extended_credit.rb +1 -0
- data/lib/lithic/models/credit_products/extended_credit_retrieve_params.rb +1 -0
- data/lib/lithic/models/credit_products/prime_rate_create_params.rb +1 -0
- data/lib/lithic/models/credit_products/prime_rate_retrieve_params.rb +1 -0
- data/lib/lithic/models/credit_products/prime_rate_retrieve_response.rb +1 -0
- data/lib/lithic/models/digital_card_art.rb +3 -0
- data/lib/lithic/models/digital_card_art_list_params.rb +1 -0
- data/lib/lithic/models/digital_card_art_retrieve_params.rb +1 -0
- data/lib/lithic/models/dispute.rb +7 -0
- data/lib/lithic/models/dispute_create_params.rb +1 -0
- data/lib/lithic/models/dispute_delete_evidence_params.rb +1 -0
- data/lib/lithic/models/dispute_delete_params.rb +1 -0
- data/lib/lithic/models/dispute_evidence.rb +3 -0
- data/lib/lithic/models/dispute_initiate_evidence_upload_params.rb +1 -0
- data/lib/lithic/models/dispute_list_evidences_params.rb +1 -0
- data/lib/lithic/models/dispute_list_params.rb +1 -0
- data/lib/lithic/models/dispute_retrieve_evidence_params.rb +1 -0
- data/lib/lithic/models/dispute_retrieve_params.rb +1 -0
- data/lib/lithic/models/dispute_update_params.rb +1 -0
- data/lib/lithic/models/document.rb +6 -0
- data/lib/lithic/models/event.rb +3 -0
- data/lib/lithic/models/event_list_attempts_params.rb +1 -0
- data/lib/lithic/models/event_list_params.rb +1 -0
- data/lib/lithic/models/event_retrieve_params.rb +1 -0
- data/lib/lithic/models/events/subscription_create_params.rb +1 -0
- data/lib/lithic/models/events/subscription_delete_params.rb +1 -0
- data/lib/lithic/models/events/subscription_list_attempts_params.rb +1 -0
- data/lib/lithic/models/events/subscription_list_params.rb +1 -0
- data/lib/lithic/models/events/subscription_recover_params.rb +1 -0
- data/lib/lithic/models/events/subscription_replay_missing_params.rb +1 -0
- data/lib/lithic/models/events/subscription_retrieve_params.rb +1 -0
- data/lib/lithic/models/events/subscription_retrieve_secret_params.rb +1 -0
- data/lib/lithic/models/events/subscription_retrieve_secret_response.rb +1 -0
- data/lib/lithic/models/events/subscription_rotate_secret_params.rb +1 -0
- data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
- data/lib/lithic/models/events/subscription_update_params.rb +1 -0
- data/lib/lithic/models/external_bank_account_create_params.rb +1 -0
- data/lib/lithic/models/external_bank_account_create_response.rb +11 -0
- data/lib/lithic/models/external_bank_account_list_params.rb +1 -0
- data/lib/lithic/models/external_bank_account_list_response.rb +11 -0
- data/lib/lithic/models/external_bank_account_retrieve_params.rb +1 -0
- data/lib/lithic/models/external_bank_account_retrieve_response.rb +11 -0
- data/lib/lithic/models/external_bank_account_retry_micro_deposits_params.rb +1 -0
- data/lib/lithic/models/external_bank_account_retry_micro_deposits_response.rb +11 -0
- data/lib/lithic/models/external_bank_account_retry_prenote_params.rb +1 -0
- data/lib/lithic/models/external_bank_account_retry_prenote_response.rb +7 -0
- data/lib/lithic/models/external_bank_account_update_params.rb +1 -0
- data/lib/lithic/models/external_bank_account_update_response.rb +11 -0
- data/lib/lithic/models/external_bank_accounts/micro_deposit_create_params.rb +1 -0
- data/lib/lithic/models/external_bank_accounts/micro_deposit_create_response.rb +11 -0
- data/lib/lithic/models/external_payment.rb +7 -0
- data/lib/lithic/models/external_payment_cancel_params.rb +1 -0
- data/lib/lithic/models/external_payment_create_params.rb +1 -0
- data/lib/lithic/models/external_payment_list_params.rb +1 -0
- data/lib/lithic/models/external_payment_release_params.rb +1 -0
- data/lib/lithic/models/external_payment_retrieve_params.rb +1 -0
- data/lib/lithic/models/external_payment_reverse_params.rb +1 -0
- data/lib/lithic/models/external_payment_settle_params.rb +1 -0
- data/lib/lithic/models/financial_account.rb +11 -0
- data/lib/lithic/models/financial_account_create_params.rb +1 -0
- data/lib/lithic/models/financial_account_list_params.rb +1 -0
- data/lib/lithic/models/financial_account_retrieve_params.rb +1 -0
- data/lib/lithic/models/financial_account_update_params.rb +1 -0
- data/lib/lithic/models/financial_account_update_status_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/balance_list_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/balance_list_response.rb +3 -0
- data/lib/lithic/models/financial_accounts/credit_configuration_retrieve_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/credit_configuration_update_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/financial_account_credit_config.rb +5 -0
- data/lib/lithic/models/financial_accounts/financial_transaction_list_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/financial_transaction_retrieve_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/loan_tape.rb +24 -0
- data/lib/lithic/models/financial_accounts/loan_tape_list_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/loan_tape_retrieve_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/statement.rb +17 -0
- data/lib/lithic/models/financial_accounts/statement_list_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/statement_retrieve_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/statements/line_item_list_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +2 -0
- data/lib/lithic/models/financial_transaction.rb +9 -0
- data/lib/lithic/models/kyb.rb +4 -0
- data/lib/lithic/models/kyb_business_entity.rb +1 -0
- data/lib/lithic/models/kyc.rb +3 -0
- data/lib/lithic/models/kyc_exempt.rb +4 -0
- data/lib/lithic/models/management_operation_create_params.rb +1 -0
- data/lib/lithic/models/management_operation_list_params.rb +1 -0
- data/lib/lithic/models/management_operation_retrieve_params.rb +1 -0
- data/lib/lithic/models/management_operation_reverse_params.rb +1 -0
- data/lib/lithic/models/management_operation_transaction.rb +7 -0
- data/lib/lithic/models/message_attempt.rb +3 -0
- data/lib/lithic/models/payment.rb +16 -0
- data/lib/lithic/models/payment_create_params.rb +2 -0
- data/lib/lithic/models/payment_create_response.rb +1 -0
- data/lib/lithic/models/payment_list_params.rb +1 -0
- data/lib/lithic/models/payment_retrieve_params.rb +1 -0
- data/lib/lithic/models/payment_retry_params.rb +1 -0
- data/lib/lithic/models/payment_retry_response.rb +1 -0
- data/lib/lithic/models/payment_simulate_action_params.rb +1 -0
- data/lib/lithic/models/payment_simulate_action_response.rb +3 -0
- data/lib/lithic/models/payment_simulate_receipt_params.rb +1 -0
- data/lib/lithic/models/payment_simulate_receipt_response.rb +3 -0
- data/lib/lithic/models/payment_simulate_release_params.rb +1 -0
- data/lib/lithic/models/payment_simulate_release_response.rb +3 -0
- data/lib/lithic/models/payment_simulate_return_params.rb +1 -0
- data/lib/lithic/models/payment_simulate_return_response.rb +3 -0
- data/lib/lithic/models/reports/settlement/network_total_list_params.rb +1 -0
- data/lib/lithic/models/reports/settlement/network_total_list_response.rb +4 -0
- data/lib/lithic/models/reports/settlement/network_total_retrieve_params.rb +1 -0
- data/lib/lithic/models/reports/settlement/network_total_retrieve_response.rb +4 -0
- data/lib/lithic/models/reports/settlement_list_details_params.rb +1 -0
- data/lib/lithic/models/reports/settlement_summary_params.rb +1 -0
- data/lib/lithic/models/responder_endpoint_check_status_params.rb +1 -0
- data/lib/lithic/models/responder_endpoint_create_params.rb +1 -0
- data/lib/lithic/models/responder_endpoint_create_response.rb +1 -0
- data/lib/lithic/models/responder_endpoint_delete_params.rb +1 -0
- data/lib/lithic/models/responder_endpoint_status.rb +1 -0
- data/lib/lithic/models/settlement_detail.rb +5 -0
- data/lib/lithic/models/settlement_summary_details.rb +2 -0
- data/lib/lithic/models/three_ds/authentication_retrieve_params.rb +1 -0
- data/lib/lithic/models/three_ds/authentication_retrieve_response.rb +45 -0
- data/lib/lithic/models/three_ds/authentication_simulate_otp_entry_params.rb +1 -0
- data/lib/lithic/models/three_ds/authentication_simulate_params.rb +1 -0
- data/lib/lithic/models/three_ds/authentication_simulate_response.rb +1 -0
- data/lib/lithic/models/three_ds/decisioning_challenge_response_params.rb +1 -0
- data/lib/lithic/models/three_ds/decisioning_retrieve_secret_params.rb +1 -0
- data/lib/lithic/models/three_ds/decisioning_retrieve_secret_response.rb +1 -0
- data/lib/lithic/models/three_ds/decisioning_rotate_secret_params.rb +1 -0
- data/lib/lithic/models/tokenization.rb +11 -0
- data/lib/lithic/models/tokenization_activate_params.rb +1 -0
- data/lib/lithic/models/tokenization_deactivate_params.rb +1 -0
- data/lib/lithic/models/tokenization_decisioning_retrieve_secret_params.rb +1 -0
- data/lib/lithic/models/tokenization_decisioning_rotate_secret_params.rb +1 -0
- data/lib/lithic/models/tokenization_decisioning_rotate_secret_response.rb +1 -0
- data/lib/lithic/models/tokenization_list_params.rb +1 -0
- data/lib/lithic/models/tokenization_pause_params.rb +1 -0
- data/lib/lithic/models/tokenization_resend_activation_code_params.rb +1 -0
- data/lib/lithic/models/tokenization_retrieve_params.rb +1 -0
- data/lib/lithic/models/tokenization_retrieve_response.rb +1 -0
- data/lib/lithic/models/tokenization_secret.rb +1 -0
- data/lib/lithic/models/tokenization_simulate_params.rb +1 -0
- data/lib/lithic/models/tokenization_simulate_response.rb +1 -0
- data/lib/lithic/models/tokenization_unpause_params.rb +1 -0
- data/lib/lithic/models/tokenization_update_digital_card_art_params.rb +1 -0
- data/lib/lithic/models/tokenization_update_digital_card_art_response.rb +1 -0
- data/lib/lithic/models/transaction.rb +60 -1
- data/lib/lithic/models/transaction_expire_authorization_params.rb +1 -0
- data/lib/lithic/models/transaction_list_params.rb +1 -0
- data/lib/lithic/models/transaction_retrieve_params.rb +1 -0
- data/lib/lithic/models/transaction_simulate_authorization_advice_params.rb +1 -0
- data/lib/lithic/models/transaction_simulate_authorization_advice_response.rb +1 -0
- data/lib/lithic/models/transaction_simulate_authorization_params.rb +1 -0
- data/lib/lithic/models/transaction_simulate_authorization_response.rb +1 -0
- data/lib/lithic/models/transaction_simulate_clearing_params.rb +1 -0
- data/lib/lithic/models/transaction_simulate_clearing_response.rb +1 -0
- data/lib/lithic/models/transaction_simulate_credit_authorization_params.rb +1 -0
- data/lib/lithic/models/transaction_simulate_credit_authorization_response.rb +1 -0
- data/lib/lithic/models/transaction_simulate_return_params.rb +1 -0
- data/lib/lithic/models/transaction_simulate_return_response.rb +1 -0
- data/lib/lithic/models/transaction_simulate_return_reversal_params.rb +1 -0
- data/lib/lithic/models/transaction_simulate_return_reversal_response.rb +1 -0
- data/lib/lithic/models/transaction_simulate_void_params.rb +1 -0
- data/lib/lithic/models/transaction_simulate_void_response.rb +1 -0
- data/lib/lithic/models/transactions/enhanced_commercial_data_retrieve_params.rb +1 -0
- data/lib/lithic/models/transactions/enhanced_commercial_data_retrieve_response.rb +1 -0
- data/lib/lithic/models/transactions/events/enhanced_commercial_data_retrieve_params.rb +1 -0
- data/lib/lithic/models/transactions/events/enhanced_data.rb +13 -0
- data/lib/lithic/models/transfer.rb +10 -0
- data/lib/lithic/models/transfer_create_params.rb +1 -0
- data/lib/lithic/resources/account_holders.rb +101 -213
- data/lib/lithic/resources/accounts.rb +31 -49
- data/lib/lithic/resources/aggregate_balances.rb +7 -4
- data/lib/lithic/resources/auth_rules/v2/backtests.rb +15 -14
- data/lib/lithic/resources/auth_rules/v2.rb +68 -84
- data/lib/lithic/resources/auth_rules.rb +2 -0
- data/lib/lithic/resources/auth_stream_enrollment.rb +10 -4
- data/lib/lithic/resources/balances.rb +10 -11
- data/lib/lithic/resources/book_transfers.rb +42 -63
- data/lib/lithic/resources/card_programs.rb +14 -14
- data/lib/lithic/resources/cards/aggregate_balances.rb +8 -6
- data/lib/lithic/resources/cards/balances.rb +9 -10
- data/lib/lithic/resources/cards/financial_transactions.rb +20 -28
- data/lib/lithic/resources/cards.rb +108 -298
- data/lib/lithic/resources/credit_products/extended_credit.rb +7 -4
- data/lib/lithic/resources/credit_products/prime_rates.rb +16 -16
- data/lib/lithic/resources/credit_products.rb +2 -0
- data/lib/lithic/resources/digital_card_art.rb +14 -17
- data/lib/lithic/resources/disputes.rb +69 -88
- data/lib/lithic/resources/events/subscriptions.rb +77 -96
- data/lib/lithic/resources/events.rb +29 -44
- data/lib/lithic/resources/external_bank_accounts/micro_deposits.rb +8 -6
- data/lib/lithic/resources/external_bank_accounts.rb +69 -104
- data/lib/lithic/resources/external_payments.rb +64 -86
- data/lib/lithic/resources/financial_accounts/balances.rb +9 -10
- data/lib/lithic/resources/financial_accounts/credit_configuration.rb +16 -16
- data/lib/lithic/resources/financial_accounts/financial_transactions.rb +20 -28
- data/lib/lithic/resources/financial_accounts/loan_tapes.rb +18 -24
- data/lib/lithic/resources/financial_accounts/statements/line_items.rb +11 -15
- data/lib/lithic/resources/financial_accounts/statements.rb +19 -26
- data/lib/lithic/resources/financial_accounts.rb +36 -38
- data/lib/lithic/resources/management_operations.rb +42 -60
- data/lib/lithic/resources/payments.rb +70 -91
- data/lib/lithic/resources/reports/settlement/network_totals.rb +23 -34
- data/lib/lithic/resources/reports/settlement.rb +15 -16
- data/lib/lithic/resources/reports.rb +2 -0
- data/lib/lithic/resources/responder_endpoints.rb +18 -14
- data/lib/lithic/resources/three_ds/authentication.rb +21 -22
- data/lib/lithic/resources/three_ds/decisioning.rb +16 -13
- data/lib/lithic/resources/three_ds.rb +2 -0
- data/lib/lithic/resources/tokenization_decisioning.rb +10 -4
- data/lib/lithic/resources/tokenizations.rb +63 -79
- data/lib/lithic/resources/transactions/enhanced_commercial_data.rb +7 -4
- data/lib/lithic/resources/transactions/events/enhanced_commercial_data.rb +7 -4
- data/lib/lithic/resources/transactions/events.rb +2 -0
- data/lib/lithic/resources/transactions.rb +79 -142
- data/lib/lithic/resources/transfers.rb +11 -16
- data/lib/lithic/transport/base_client.rb +9 -9
- data/lib/lithic/transport/pooled_net_requester.rb +1 -1
- data/lib/lithic/type/base_model.rb +10 -0
- data/lib/lithic/type/base_page.rb +1 -1
- data/lib/lithic/util.rb +6 -10
- data/lib/lithic/version.rb +1 -1
- data/rbi/lib/lithic/client.rbi +3 -3
- data/rbi/lib/lithic/errors.rbi +145 -115
- data/rbi/lib/lithic/models/account.rbi +1 -1
- data/rbi/lib/lithic/models/account_financial_account_type.rbi +2 -1
- data/rbi/lib/lithic/models/account_holder.rbi +8 -6
- data/rbi/lib/lithic/models/account_holder_create_params.rbi +2 -2
- data/rbi/lib/lithic/models/account_holder_create_response.rbi +2 -2
- data/rbi/lib/lithic/models/account_holder_simulate_enrollment_document_review_params.rbi +8 -1
- data/rbi/lib/lithic/models/account_holder_simulate_enrollment_review_params.rbi +8 -2
- data/rbi/lib/lithic/models/account_holder_simulate_enrollment_review_response.rbi +24 -4
- data/rbi/lib/lithic/models/account_holder_update_response.rbi +18 -2
- data/rbi/lib/lithic/models/account_holder_upload_document_params.rbi +1 -1
- data/rbi/lib/lithic/models/account_update_params.rbi +2 -1
- data/rbi/lib/lithic/models/aggregate_balance.rbi +1 -1
- data/rbi/lib/lithic/models/aggregate_balance_list_params.rbi +1 -1
- data/rbi/lib/lithic/models/auth_rules/auth_rule.rbi +2 -1
- data/rbi/lib/lithic/models/auth_rules/auth_rule_condition.rbi +1 -1
- data/rbi/lib/lithic/models/auth_rules/conditional_attribute.rbi +2 -1
- data/rbi/lib/lithic/models/auth_rules/v2_apply_response.rbi +3 -2
- data/rbi/lib/lithic/models/auth_rules/v2_create_params.rbi +2 -1
- data/rbi/lib/lithic/models/auth_rules/v2_create_response.rbi +2 -2
- data/rbi/lib/lithic/models/auth_rules/v2_draft_response.rbi +3 -2
- data/rbi/lib/lithic/models/auth_rules/v2_list_response.rbi +4 -2
- data/rbi/lib/lithic/models/auth_rules/v2_promote_response.rbi +2 -2
- data/rbi/lib/lithic/models/auth_rules/v2_retrieve_response.rbi +2 -2
- data/rbi/lib/lithic/models/auth_rules/v2_update_params.rbi +2 -1
- data/rbi/lib/lithic/models/auth_rules/v2_update_response.rbi +2 -2
- data/rbi/lib/lithic/models/auth_rules/velocity_limit_params.rbi +1 -1
- data/rbi/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rbi +1 -1
- data/rbi/lib/lithic/models/balance.rbi +2 -1
- data/rbi/lib/lithic/models/balance_list_params.rbi +1 -1
- data/rbi/lib/lithic/models/book_transfer_create_params.rbi +3 -2
- data/rbi/lib/lithic/models/book_transfer_list_params.rbi +6 -3
- data/rbi/lib/lithic/models/book_transfer_response.rbi +8 -5
- data/rbi/lib/lithic/models/card.rbi +5 -5
- data/rbi/lib/lithic/models/card_convert_physical_params.rbi +3 -2
- data/rbi/lib/lithic/models/card_create_params.rbi +5 -4
- data/rbi/lib/lithic/models/card_list_params.rbi +1 -1
- data/rbi/lib/lithic/models/card_provision_params.rbi +1 -1
- data/rbi/lib/lithic/models/card_reissue_params.rbi +2 -2
- data/rbi/lib/lithic/models/card_renew_params.rbi +3 -2
- data/rbi/lib/lithic/models/card_update_params.rbi +3 -2
- data/rbi/lib/lithic/models/cards/balance_list_response.rbi +2 -1
- data/rbi/lib/lithic/models/cards/financial_transaction_list_params.rbi +3 -3
- data/rbi/lib/lithic/models/digital_card_art.rbi +2 -1
- data/rbi/lib/lithic/models/dispute.rbi +4 -3
- data/rbi/lib/lithic/models/dispute_create_params.rbi +2 -1
- data/rbi/lib/lithic/models/dispute_evidence.rbi +2 -1
- data/rbi/lib/lithic/models/dispute_list_params.rbi +2 -1
- data/rbi/lib/lithic/models/dispute_update_params.rbi +2 -1
- data/rbi/lib/lithic/models/document.rbi +4 -4
- data/rbi/lib/lithic/models/event.rbi +1 -1
- data/rbi/lib/lithic/models/event_list_attempts_params.rbi +2 -1
- data/rbi/lib/lithic/models/event_list_params.rbi +2 -1
- data/rbi/lib/lithic/models/event_subscription.rbi +2 -1
- data/rbi/lib/lithic/models/events/subscription_create_params.rbi +1 -1
- data/rbi/lib/lithic/models/events/subscription_list_attempts_params.rbi +1 -1
- data/rbi/lib/lithic/models/events/subscription_send_simulated_example_params.rbi +7 -1
- data/rbi/lib/lithic/models/events/subscription_update_params.rbi +1 -1
- data/rbi/lib/lithic/models/external_bank_account_create_params.rbi +2 -2
- data/rbi/lib/lithic/models/external_bank_account_create_response.rbi +5 -5
- data/rbi/lib/lithic/models/external_bank_account_list_params.rbi +3 -3
- data/rbi/lib/lithic/models/external_bank_account_list_response.rbi +5 -5
- data/rbi/lib/lithic/models/external_bank_account_retrieve_response.rbi +17 -5
- data/rbi/lib/lithic/models/external_bank_account_retry_micro_deposits_response.rbi +11 -3
- data/rbi/lib/lithic/models/external_bank_account_retry_prenote_response.rbi +9 -3
- data/rbi/lib/lithic/models/external_bank_account_update_params.rbi +1 -1
- data/rbi/lib/lithic/models/external_bank_account_update_response.rbi +5 -5
- data/rbi/lib/lithic/models/external_bank_accounts/micro_deposit_create_response.rbi +23 -3
- data/rbi/lib/lithic/models/external_payment.rbi +11 -7
- data/rbi/lib/lithic/models/external_payment_create_params.rbi +3 -3
- data/rbi/lib/lithic/models/external_payment_list_params.rbi +3 -3
- data/rbi/lib/lithic/models/external_payment_settle_params.rbi +1 -1
- data/rbi/lib/lithic/models/financial_account.rbi +17 -5
- data/rbi/lib/lithic/models/financial_account_create_params.rbi +1 -1
- data/rbi/lib/lithic/models/financial_account_list_params.rbi +2 -1
- data/rbi/lib/lithic/models/financial_account_update_status_params.rbi +8 -2
- data/rbi/lib/lithic/models/financial_accounts/balance_list_response.rbi +1 -1
- data/rbi/lib/lithic/models/financial_accounts/financial_account_credit_config.rbi +2 -0
- data/rbi/lib/lithic/models/financial_accounts/financial_transaction_list_params.rbi +21 -3
- data/rbi/lib/lithic/models/financial_accounts/loan_tape.rbi +10 -1
- data/rbi/lib/lithic/models/financial_accounts/statement.rbi +11 -2
- data/rbi/lib/lithic/models/financial_accounts/statements/statement_line_items.rbi +2 -0
- data/rbi/lib/lithic/models/financial_transaction.rbi +8 -5
- data/rbi/lib/lithic/models/instance_financial_account_type.rbi +2 -1
- data/rbi/lib/lithic/models/kyb.rbi +1 -1
- data/rbi/lib/lithic/models/kyc.rbi +1 -1
- data/rbi/lib/lithic/models/kyc_exempt.rbi +3 -2
- data/rbi/lib/lithic/models/management_operation_create_params.rbi +3 -3
- data/rbi/lib/lithic/models/management_operation_list_params.rbi +2 -2
- data/rbi/lib/lithic/models/management_operation_transaction.rbi +7 -7
- data/rbi/lib/lithic/models/message_attempt.rbi +1 -1
- data/rbi/lib/lithic/models/owner_type.rbi +1 -1
- data/rbi/lib/lithic/models/payment.rbi +11 -10
- data/rbi/lib/lithic/models/payment_create_params.rbi +5 -3
- data/rbi/lib/lithic/models/payment_list_params.rbi +6 -3
- data/rbi/lib/lithic/models/payment_simulate_action_params.rbi +2 -2
- data/rbi/lib/lithic/models/payment_simulate_action_response.rbi +1 -1
- data/rbi/lib/lithic/models/payment_simulate_receipt_params.rbi +1 -1
- data/rbi/lib/lithic/models/payment_simulate_receipt_response.rbi +1 -1
- data/rbi/lib/lithic/models/payment_simulate_release_response.rbi +1 -1
- data/rbi/lib/lithic/models/payment_simulate_return_response.rbi +1 -1
- data/rbi/lib/lithic/models/reports/settlement/network_total_list_params.rbi +1 -1
- data/rbi/lib/lithic/models/reports/settlement/network_total_list_response.rbi +7 -1
- data/rbi/lib/lithic/models/reports/settlement/network_total_retrieve_response.rbi +7 -1
- data/rbi/lib/lithic/models/responder_endpoint_check_status_params.rbi +1 -1
- data/rbi/lib/lithic/models/responder_endpoint_create_params.rbi +1 -1
- data/rbi/lib/lithic/models/responder_endpoint_delete_params.rbi +1 -1
- data/rbi/lib/lithic/models/settlement_detail.rbi +3 -2
- data/rbi/lib/lithic/models/settlement_summary_details.rbi +1 -1
- data/rbi/lib/lithic/models/spend_limit_duration.rbi +1 -1
- data/rbi/lib/lithic/models/three_ds/authentication_retrieve_response.rbi +53 -8
- data/rbi/lib/lithic/models/three_ds/authentication_simulate_params.rbi +7 -1
- data/rbi/lib/lithic/models/three_ds/challenge_result.rbi +1 -1
- data/rbi/lib/lithic/models/tokenization.rbi +8 -5
- data/rbi/lib/lithic/models/tokenization_list_params.rbi +1 -1
- data/rbi/lib/lithic/models/tokenization_resend_activation_code_params.rbi +7 -1
- data/rbi/lib/lithic/models/tokenization_simulate_params.rbi +2 -2
- data/rbi/lib/lithic/models/transaction.rbi +49 -22
- data/rbi/lib/lithic/models/transaction_list_params.rbi +4 -2
- data/rbi/lib/lithic/models/transaction_simulate_authorization_params.rbi +1 -1
- data/rbi/lib/lithic/models/transaction_simulate_void_params.rbi +1 -1
- data/rbi/lib/lithic/models/transactions/events/enhanced_data.rbi +16 -3
- data/rbi/lib/lithic/models/transfer.rbi +5 -5
- data/rbi/lib/lithic/models/verification_method.rbi +1 -1
- data/rbi/lib/lithic/resources/account_holders.rbi +1 -0
- data/rbi/lib/lithic/resources/accounts.rbi +1 -0
- data/rbi/lib/lithic/resources/aggregate_balances.rbi +1 -0
- data/rbi/lib/lithic/resources/auth_rules/v2/backtests.rbi +1 -0
- data/rbi/lib/lithic/resources/auth_rules/v2.rbi +1 -0
- data/rbi/lib/lithic/resources/auth_rules.rbi +1 -0
- data/rbi/lib/lithic/resources/auth_stream_enrollment.rbi +1 -0
- data/rbi/lib/lithic/resources/balances.rbi +1 -0
- data/rbi/lib/lithic/resources/book_transfers.rbi +1 -0
- data/rbi/lib/lithic/resources/card_programs.rbi +1 -0
- data/rbi/lib/lithic/resources/cards/aggregate_balances.rbi +1 -0
- data/rbi/lib/lithic/resources/cards/balances.rbi +1 -0
- data/rbi/lib/lithic/resources/cards/financial_transactions.rbi +1 -0
- data/rbi/lib/lithic/resources/cards.rbi +1 -0
- data/rbi/lib/lithic/resources/credit_products/extended_credit.rbi +1 -0
- data/rbi/lib/lithic/resources/credit_products/prime_rates.rbi +1 -0
- data/rbi/lib/lithic/resources/credit_products.rbi +1 -0
- data/rbi/lib/lithic/resources/digital_card_art.rbi +1 -0
- data/rbi/lib/lithic/resources/disputes.rbi +1 -0
- data/rbi/lib/lithic/resources/events/subscriptions.rbi +1 -0
- data/rbi/lib/lithic/resources/events.rbi +1 -0
- data/rbi/lib/lithic/resources/external_bank_accounts/micro_deposits.rbi +1 -0
- data/rbi/lib/lithic/resources/external_bank_accounts.rbi +1 -0
- data/rbi/lib/lithic/resources/external_payments.rbi +1 -0
- data/rbi/lib/lithic/resources/financial_accounts/balances.rbi +1 -0
- data/rbi/lib/lithic/resources/financial_accounts/credit_configuration.rbi +1 -0
- data/rbi/lib/lithic/resources/financial_accounts/financial_transactions.rbi +1 -0
- data/rbi/lib/lithic/resources/financial_accounts/loan_tapes.rbi +1 -0
- data/rbi/lib/lithic/resources/financial_accounts/statements/line_items.rbi +1 -0
- data/rbi/lib/lithic/resources/financial_accounts/statements.rbi +1 -0
- data/rbi/lib/lithic/resources/financial_accounts.rbi +1 -0
- data/rbi/lib/lithic/resources/management_operations.rbi +1 -0
- data/rbi/lib/lithic/resources/payments.rbi +1 -0
- data/rbi/lib/lithic/resources/reports/settlement/network_totals.rbi +1 -0
- data/rbi/lib/lithic/resources/reports/settlement.rbi +1 -0
- data/rbi/lib/lithic/resources/reports.rbi +1 -0
- data/rbi/lib/lithic/resources/responder_endpoints.rbi +1 -0
- data/rbi/lib/lithic/resources/three_ds/authentication.rbi +1 -0
- data/rbi/lib/lithic/resources/three_ds/decisioning.rbi +1 -0
- data/rbi/lib/lithic/resources/three_ds.rbi +1 -0
- data/rbi/lib/lithic/resources/tokenization_decisioning.rbi +1 -0
- data/rbi/lib/lithic/resources/tokenizations.rbi +1 -0
- data/rbi/lib/lithic/resources/transactions/enhanced_commercial_data.rbi +1 -0
- data/rbi/lib/lithic/resources/transactions/events/enhanced_commercial_data.rbi +1 -0
- data/rbi/lib/lithic/resources/transactions/events.rbi +1 -0
- data/rbi/lib/lithic/resources/transactions.rbi +1 -0
- data/rbi/lib/lithic/resources/transfers.rbi +1 -0
- data/rbi/lib/lithic/transport/base_client.rbi +3 -2
- data/rbi/lib/lithic/type/base_model.rbi +8 -0
- data/rbi/lib/lithic/util.rbi +2 -2
- data/rbi/lib/lithic/version.rbi +1 -1
- data/sig/lithic/client.rbs +1 -1
- data/sig/lithic/errors.rbs +112 -82
- data/sig/lithic/models/card_convert_physical_params.rbs +1 -1
- data/sig/lithic/models/card_create_params.rbs +1 -1
- data/sig/lithic/models/card_reissue_params.rbs +1 -1
- data/sig/lithic/models/card_renew_params.rbs +1 -1
- data/sig/lithic/models/transaction.rbs +1 -1
- data/sig/lithic/transport/base_client.rbs +1 -1
- data/sig/lithic/type/base_model.rbs +4 -0
- data/sig/lithic/util.rbs +2 -2
- data/sig/lithic/version.rbs +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 18e62e72ed7b543b02b1b27f8b6fa01e5d103ade169f16821584c7f25bf795c4
|
|
4
|
+
data.tar.gz: '059128319fd80fce301facf7fe31a78bb1e7dc285bcf087cbbb865699fa5d799'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 59726459104a1e320267baff1fbc631a240c873933213fb240cd3a3f952a36e50b105298890e508bbd3dc38ee004c87f2f3e5c908a717dafdd7d3b31f4986362
|
|
7
|
+
data.tar.gz: b4e731358d20edad987d145a1fff6f2adc6416fa7fbf0384ff3296e72eb511a30cde488f9451d137547b075dcad602c40540d247bddcd2fee325bf37e6a37a50
|
data/README.md
CHANGED
|
@@ -13,7 +13,7 @@ The underlying REST API documentation can be found on [docs.lithic.com](https://
|
|
|
13
13
|
To use this gem, install via Bundler by adding the following to your application's `Gemfile`:
|
|
14
14
|
|
|
15
15
|
```ruby
|
|
16
|
-
gem "lithic", "~> 0.1.0.pre.alpha.
|
|
16
|
+
gem "lithic", "~> 0.1.0.pre.alpha.3"
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
To fetch an initial copy of the gem:
|
|
@@ -64,7 +64,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
|
|
|
64
64
|
```ruby
|
|
65
65
|
begin
|
|
66
66
|
card = lithic.cards.create(type: "an_incorrect_type")
|
|
67
|
-
rescue Lithic::
|
|
67
|
+
rescue Lithic::Errors::APIError => e
|
|
68
68
|
puts(e.status) # 400
|
|
69
69
|
end
|
|
70
70
|
```
|
|
@@ -80,7 +80,7 @@ Error codes are as followed:
|
|
|
80
80
|
| HTTP 409 | `ConflictError` |
|
|
81
81
|
| HTTP 422 | `UnprocessableEntityError` |
|
|
82
82
|
| HTTP 429 | `RateLimitError` |
|
|
83
|
-
| HTTP >=500
|
|
83
|
+
| HTTP >= 500 | `InternalServerError` |
|
|
84
84
|
| Other HTTP error | `APIStatusError` |
|
|
85
85
|
| Timeout | `APITimeoutError` |
|
|
86
86
|
| Network error | `APIConnectionError` |
|
data/lib/lithic/client.rb
CHANGED
|
@@ -100,11 +100,13 @@ module Lithic
|
|
|
100
100
|
|
|
101
101
|
# Status of api
|
|
102
102
|
#
|
|
103
|
-
# @
|
|
103
|
+
# @overload api_status(request_options: {})
|
|
104
104
|
#
|
|
105
|
-
#
|
|
105
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
106
106
|
#
|
|
107
107
|
# @return [Lithic::Models::APIStatus]
|
|
108
|
+
#
|
|
109
|
+
# @see Lithic::Models::ClientAPIStatusParams
|
|
108
110
|
def api_status(params = {})
|
|
109
111
|
request(
|
|
110
112
|
method: :get,
|
|
@@ -123,6 +125,8 @@ module Lithic
|
|
|
123
125
|
|
|
124
126
|
# Creates and returns a new client for interacting with the API.
|
|
125
127
|
#
|
|
128
|
+
# @param api_key [String, nil] Defaults to `ENV["LITHIC_API_KEY"]`
|
|
129
|
+
#
|
|
126
130
|
# @param environment [:production, :sandbox, nil] Specifies the environment to use for the API.
|
|
127
131
|
#
|
|
128
132
|
# Each environment maps to a different base URL:
|
|
@@ -132,8 +136,6 @@ module Lithic
|
|
|
132
136
|
#
|
|
133
137
|
# @param base_url [String, nil] Override the default base URL for the API, e.g., `"https://api.example.com/v2/"`
|
|
134
138
|
#
|
|
135
|
-
# @param api_key [String, nil] Defaults to `ENV["LITHIC_API_KEY"]`
|
|
136
|
-
#
|
|
137
139
|
# @param max_retries [Integer] Max number of retries to attempt after a failed retryable request.
|
|
138
140
|
#
|
|
139
141
|
# @param timeout [Float]
|
|
@@ -142,9 +144,9 @@ module Lithic
|
|
|
142
144
|
#
|
|
143
145
|
# @param max_retry_delay [Float]
|
|
144
146
|
def initialize(
|
|
147
|
+
api_key: ENV["LITHIC_API_KEY"],
|
|
145
148
|
environment: nil,
|
|
146
149
|
base_url: nil,
|
|
147
|
-
api_key: ENV["LITHIC_API_KEY"],
|
|
148
150
|
max_retries: DEFAULT_MAX_RETRIES,
|
|
149
151
|
timeout: DEFAULT_TIMEOUT_IN_SECONDS,
|
|
150
152
|
initial_retry_delay: DEFAULT_INITIAL_RETRY_DELAY,
|
|
@@ -162,7 +164,7 @@ module Lithic
|
|
|
162
164
|
end
|
|
163
165
|
|
|
164
166
|
if api_key.nil?
|
|
165
|
-
raise ArgumentError.new("api_key is required")
|
|
167
|
+
raise ArgumentError.new("api_key is required, and can be set via environ: \"LITHIC_API_KEY\"")
|
|
166
168
|
end
|
|
167
169
|
|
|
168
170
|
headers = {
|
data/lib/lithic/errors.rb
CHANGED
|
@@ -1,183 +1,220 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Lithic
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
module Errors
|
|
5
|
+
class Error < StandardError
|
|
6
|
+
# @!parse
|
|
7
|
+
# # @return [StandardError, nil]
|
|
8
|
+
# attr_accessor :cause
|
|
9
|
+
end
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
class ConversionError < Lithic::Errors::Error
|
|
12
|
+
end
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
class APIError < Lithic::Errors::Error
|
|
15
|
+
# @return [URI::Generic]
|
|
16
|
+
attr_accessor :url
|
|
17
|
+
|
|
18
|
+
# @return [Integer, nil]
|
|
19
|
+
attr_accessor :status
|
|
20
|
+
|
|
21
|
+
# @return [Object, nil]
|
|
22
|
+
attr_accessor :body
|
|
23
|
+
|
|
24
|
+
# @api private
|
|
25
|
+
#
|
|
26
|
+
# @param url [URI::Generic]
|
|
27
|
+
# @param status [Integer, nil]
|
|
28
|
+
# @param body [Object, nil]
|
|
29
|
+
# @param request [nil]
|
|
30
|
+
# @param response [nil]
|
|
31
|
+
# @param message [String, nil]
|
|
32
|
+
def initialize(url:, status: nil, body: nil, request: nil, response: nil, message: nil)
|
|
33
|
+
@url = url
|
|
34
|
+
@status = status
|
|
35
|
+
@body = body
|
|
36
|
+
@request = request
|
|
37
|
+
@response = response
|
|
38
|
+
super(message)
|
|
39
|
+
end
|
|
38
40
|
end
|
|
39
|
-
end
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
42
|
+
class APIConnectionError < Lithic::Errors::APIError
|
|
43
|
+
# @!parse
|
|
44
|
+
# # @return [nil]
|
|
45
|
+
# attr_accessor :status
|
|
46
|
+
|
|
47
|
+
# @!parse
|
|
48
|
+
# # @return [nil]
|
|
49
|
+
# attr_accessor :body
|
|
50
|
+
|
|
51
|
+
# @api private
|
|
52
|
+
#
|
|
53
|
+
# @param url [URI::Generic]
|
|
54
|
+
# @param status [nil]
|
|
55
|
+
# @param body [nil]
|
|
56
|
+
# @param request [nil]
|
|
57
|
+
# @param response [nil]
|
|
58
|
+
# @param message [String, nil]
|
|
59
|
+
def initialize(
|
|
60
|
+
url:,
|
|
61
|
+
status: nil,
|
|
62
|
+
body: nil,
|
|
63
|
+
request: nil,
|
|
64
|
+
response: nil,
|
|
65
|
+
message: "Connection error."
|
|
66
|
+
)
|
|
67
|
+
super
|
|
68
|
+
end
|
|
67
69
|
end
|
|
68
|
-
end
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
71
|
+
class APITimeoutError < Lithic::Errors::APIConnectionError
|
|
72
|
+
# @api private
|
|
73
|
+
#
|
|
74
|
+
# @param url [URI::Generic]
|
|
75
|
+
# @param status [nil]
|
|
76
|
+
# @param body [nil]
|
|
77
|
+
# @param request [nil]
|
|
78
|
+
# @param response [nil]
|
|
79
|
+
# @param message [String, nil]
|
|
80
|
+
def initialize(
|
|
81
|
+
url:,
|
|
82
|
+
status: nil,
|
|
83
|
+
body: nil,
|
|
84
|
+
request: nil,
|
|
85
|
+
response: nil,
|
|
86
|
+
message: "Request timed out."
|
|
87
|
+
)
|
|
88
|
+
super
|
|
89
|
+
end
|
|
88
90
|
end
|
|
89
|
-
end
|
|
90
91
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
92
|
+
class APIStatusError < Lithic::Errors::APIError
|
|
93
|
+
# @api private
|
|
94
|
+
#
|
|
95
|
+
# @param url [URI::Generic]
|
|
96
|
+
# @param status [Integer]
|
|
97
|
+
# @param body [Object, nil]
|
|
98
|
+
# @param request [nil]
|
|
99
|
+
# @param response [nil]
|
|
100
|
+
# @param message [String, nil]
|
|
101
|
+
#
|
|
102
|
+
# @return [Lithic::Errors::APIStatusError]
|
|
103
|
+
def self.for(url:, status:, body:, request:, response:, message: nil)
|
|
104
|
+
kwargs = {
|
|
105
|
+
url: url,
|
|
106
|
+
status: status,
|
|
107
|
+
body: body,
|
|
108
|
+
request: request,
|
|
109
|
+
response: response,
|
|
110
|
+
message: message
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
case status
|
|
114
|
+
in 400
|
|
115
|
+
Lithic::Errors::BadRequestError.new(**kwargs)
|
|
116
|
+
in 401
|
|
117
|
+
Lithic::Errors::AuthenticationError.new(**kwargs)
|
|
118
|
+
in 403
|
|
119
|
+
Lithic::Errors::PermissionDeniedError.new(**kwargs)
|
|
120
|
+
in 404
|
|
121
|
+
Lithic::Errors::NotFoundError.new(**kwargs)
|
|
122
|
+
in 409
|
|
123
|
+
Lithic::Errors::ConflictError.new(**kwargs)
|
|
124
|
+
in 422
|
|
125
|
+
Lithic::Errors::UnprocessableEntityError.new(**kwargs)
|
|
126
|
+
in 429
|
|
127
|
+
Lithic::Errors::RateLimitError.new(**kwargs)
|
|
128
|
+
in (500..)
|
|
129
|
+
Lithic::Errors::InternalServerError.new(**kwargs)
|
|
130
|
+
else
|
|
131
|
+
Lithic::Errors::APIStatusError.new(**kwargs)
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# @!parse
|
|
136
|
+
# # @return [Integer]
|
|
137
|
+
# attr_accessor :status
|
|
138
|
+
|
|
139
|
+
# @api private
|
|
140
|
+
#
|
|
141
|
+
# @param url [URI::Generic]
|
|
142
|
+
# @param status [Integer]
|
|
143
|
+
# @param body [Object, nil]
|
|
144
|
+
# @param request [nil]
|
|
145
|
+
# @param response [nil]
|
|
146
|
+
# @param message [String, nil]
|
|
147
|
+
def initialize(url:, status:, body:, request:, response:, message: nil)
|
|
148
|
+
message ||= {url: url.to_s, status: status, body: body}
|
|
149
|
+
super(
|
|
150
|
+
url: url,
|
|
151
|
+
status: status,
|
|
152
|
+
body: body,
|
|
153
|
+
request: request,
|
|
154
|
+
response: response,
|
|
155
|
+
message: message&.to_s
|
|
156
|
+
)
|
|
124
157
|
end
|
|
125
158
|
end
|
|
126
159
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
# attr_accessor :status
|
|
130
|
-
|
|
131
|
-
# @api private
|
|
132
|
-
#
|
|
133
|
-
# @param url [URI::Generic]
|
|
134
|
-
# @param status [Integer]
|
|
135
|
-
# @param body [Object, nil]
|
|
136
|
-
# @param request [nil]
|
|
137
|
-
# @param response [nil]
|
|
138
|
-
# @param message [String, nil]
|
|
139
|
-
def initialize(url:, status:, body:, request:, response:, message: nil)
|
|
140
|
-
message ||= {url: url.to_s, status: status, body: body}
|
|
141
|
-
super(
|
|
142
|
-
url: url,
|
|
143
|
-
status: status,
|
|
144
|
-
body: body,
|
|
145
|
-
request: request,
|
|
146
|
-
response: response,
|
|
147
|
-
message: message&.to_s
|
|
148
|
-
)
|
|
160
|
+
class BadRequestError < Lithic::Errors::APIStatusError
|
|
161
|
+
HTTP_STATUS = 400
|
|
149
162
|
end
|
|
150
|
-
end
|
|
151
163
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
164
|
+
class AuthenticationError < Lithic::Errors::APIStatusError
|
|
165
|
+
HTTP_STATUS = 401
|
|
166
|
+
end
|
|
155
167
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
168
|
+
class PermissionDeniedError < Lithic::Errors::APIStatusError
|
|
169
|
+
HTTP_STATUS = 403
|
|
170
|
+
end
|
|
159
171
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
172
|
+
class NotFoundError < Lithic::Errors::APIStatusError
|
|
173
|
+
HTTP_STATUS = 404
|
|
174
|
+
end
|
|
163
175
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
176
|
+
class ConflictError < Lithic::Errors::APIStatusError
|
|
177
|
+
HTTP_STATUS = 409
|
|
178
|
+
end
|
|
167
179
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
180
|
+
class UnprocessableEntityError < Lithic::Errors::APIStatusError
|
|
181
|
+
HTTP_STATUS = 422
|
|
182
|
+
end
|
|
171
183
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
184
|
+
class RateLimitError < Lithic::Errors::APIStatusError
|
|
185
|
+
HTTP_STATUS = 429
|
|
186
|
+
end
|
|
175
187
|
|
|
176
|
-
|
|
177
|
-
|
|
188
|
+
class InternalServerError < Lithic::Errors::APIStatusError
|
|
189
|
+
HTTP_STATUS = (500..)
|
|
190
|
+
end
|
|
178
191
|
end
|
|
179
192
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
193
|
+
Error = Lithic::Errors::Error
|
|
194
|
+
|
|
195
|
+
ConversionError = Lithic::Errors::ConversionError
|
|
196
|
+
|
|
197
|
+
APIError = Lithic::Errors::APIError
|
|
198
|
+
|
|
199
|
+
APIStatusError = Lithic::Errors::APIStatusError
|
|
200
|
+
|
|
201
|
+
APIConnectionError = Lithic::Errors::APIConnectionError
|
|
202
|
+
|
|
203
|
+
APITimeoutError = Lithic::Errors::APITimeoutError
|
|
204
|
+
|
|
205
|
+
BadRequestError = Lithic::Errors::BadRequestError
|
|
206
|
+
|
|
207
|
+
AuthenticationError = Lithic::Errors::AuthenticationError
|
|
208
|
+
|
|
209
|
+
PermissionDeniedError = Lithic::Errors::PermissionDeniedError
|
|
210
|
+
|
|
211
|
+
NotFoundError = Lithic::Errors::NotFoundError
|
|
212
|
+
|
|
213
|
+
ConflictError = Lithic::Errors::ConflictError
|
|
214
|
+
|
|
215
|
+
UnprocessableEntityError = Lithic::Errors::UnprocessableEntityError
|
|
216
|
+
|
|
217
|
+
RateLimitError = Lithic::Errors::RateLimitError
|
|
218
|
+
|
|
219
|
+
InternalServerError = Lithic::Errors::InternalServerError
|
|
183
220
|
end
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Lithic
|
|
4
4
|
module Models
|
|
5
|
+
# @see Lithic::Resources::Accounts#retrieve
|
|
5
6
|
class Account < Lithic::BaseModel
|
|
6
7
|
# @!attribute token
|
|
7
8
|
# Globally unique identifier for the account. This is the same as the
|
|
@@ -111,6 +112,7 @@ module Lithic
|
|
|
111
112
|
|
|
112
113
|
# def initialize: (Hash | Lithic::BaseModel) -> void
|
|
113
114
|
|
|
115
|
+
# @see Lithic::Models::Account#spend_limit
|
|
114
116
|
class SpendLimit < Lithic::BaseModel
|
|
115
117
|
# @!attribute daily
|
|
116
118
|
# Daily spend limit (in cents).
|
|
@@ -157,6 +159,8 @@ module Lithic
|
|
|
157
159
|
# risk/compliance reasons. Please contact
|
|
158
160
|
# [support@lithic.com](mailto:support@lithic.com) if you believe this was in
|
|
159
161
|
# error.
|
|
162
|
+
#
|
|
163
|
+
# @see Lithic::Models::Account#state
|
|
160
164
|
module State
|
|
161
165
|
extend Lithic::Enum
|
|
162
166
|
|
|
@@ -171,6 +175,7 @@ module Lithic
|
|
|
171
175
|
# def self.values; end
|
|
172
176
|
end
|
|
173
177
|
|
|
178
|
+
# @see Lithic::Models::Account#account_holder
|
|
174
179
|
class AccountHolder < Lithic::BaseModel
|
|
175
180
|
# @!attribute token
|
|
176
181
|
# Globally unique identifier for the account holder.
|
|
@@ -210,6 +215,8 @@ module Lithic
|
|
|
210
215
|
end
|
|
211
216
|
|
|
212
217
|
# @deprecated
|
|
218
|
+
#
|
|
219
|
+
# @see Lithic::Models::Account#verification_address
|
|
213
220
|
class VerificationAddress < Lithic::BaseModel
|
|
214
221
|
# @!attribute address1
|
|
215
222
|
# Valid deliverable address (no PO boxes).
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Lithic
|
|
4
4
|
module Models
|
|
5
|
+
# @see Lithic::Resources::AccountHolders#retrieve
|
|
5
6
|
class AccountHolder < Lithic::BaseModel
|
|
6
7
|
# @!attribute token
|
|
7
8
|
# Globally unique identifier for the account holder.
|
|
@@ -415,6 +416,7 @@ module Lithic
|
|
|
415
416
|
# def initialize: (Hash | Lithic::BaseModel) -> void
|
|
416
417
|
end
|
|
417
418
|
|
|
419
|
+
# @see Lithic::Models::AccountHolder#business_entity
|
|
418
420
|
class BusinessEntity < Lithic::BaseModel
|
|
419
421
|
# @!attribute address
|
|
420
422
|
# Business's physical address - PO boxes, UPS drops, and FedEx drops are not
|
|
@@ -495,6 +497,7 @@ module Lithic
|
|
|
495
497
|
# def initialize: (Hash | Lithic::BaseModel) -> void
|
|
496
498
|
end
|
|
497
499
|
|
|
500
|
+
# @see Lithic::Models::AccountHolder#control_person
|
|
498
501
|
class ControlPerson < Lithic::BaseModel
|
|
499
502
|
# @!attribute address
|
|
500
503
|
# Individual's current address
|
|
@@ -560,6 +563,8 @@ module Lithic
|
|
|
560
563
|
end
|
|
561
564
|
|
|
562
565
|
# The type of KYC exemption for a KYC-Exempt Account Holder.
|
|
566
|
+
#
|
|
567
|
+
# @see Lithic::Models::AccountHolder#exemption_type
|
|
563
568
|
module ExemptionType
|
|
564
569
|
extend Lithic::Enum
|
|
565
570
|
|
|
@@ -573,6 +578,7 @@ module Lithic
|
|
|
573
578
|
# def self.values; end
|
|
574
579
|
end
|
|
575
580
|
|
|
581
|
+
# @see Lithic::Models::AccountHolder#individual
|
|
576
582
|
class Individual < Lithic::BaseModel
|
|
577
583
|
# @!attribute address
|
|
578
584
|
# Individual's current address
|
|
@@ -640,6 +646,8 @@ module Lithic
|
|
|
640
646
|
# Note:
|
|
641
647
|
#
|
|
642
648
|
# - `PENDING_REVIEW` is only applicable for the `KYB_BASIC` workflow.
|
|
649
|
+
#
|
|
650
|
+
# @see Lithic::Models::AccountHolder#status
|
|
643
651
|
module Status
|
|
644
652
|
extend Lithic::Enum
|
|
645
653
|
|
|
@@ -682,6 +690,8 @@ module Lithic
|
|
|
682
690
|
# attribute will be present. If the type is "BUSINESS" then the "business_entity",
|
|
683
691
|
# "control_person", "beneficial_owner_individuals", "beneficial_owner_entities",
|
|
684
692
|
# "nature_of_business", and "website_url" attributes will be present.
|
|
693
|
+
#
|
|
694
|
+
# @see Lithic::Models::AccountHolder#user_type
|
|
685
695
|
module UserType
|
|
686
696
|
extend Lithic::Enum
|
|
687
697
|
|
|
@@ -695,6 +705,7 @@ module Lithic
|
|
|
695
705
|
# def self.values; end
|
|
696
706
|
end
|
|
697
707
|
|
|
708
|
+
# @see Lithic::Models::AccountHolder#verification_application
|
|
698
709
|
class VerificationApplication < Lithic::BaseModel
|
|
699
710
|
# @!attribute [r] created
|
|
700
711
|
# Timestamp of when the application was created.
|
|
@@ -758,6 +769,8 @@ module Lithic
|
|
|
758
769
|
# Note:
|
|
759
770
|
#
|
|
760
771
|
# - `PENDING_REVIEW` is only applicable for the `KYB_BASIC` workflow.
|
|
772
|
+
#
|
|
773
|
+
# @see Lithic::Models::AccountHolder::VerificationApplication#status
|
|
761
774
|
module Status
|
|
762
775
|
extend Lithic::Enum
|
|
763
776
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Lithic
|
|
4
4
|
module Models
|
|
5
|
+
# @see Lithic::Resources::AccountHolders#create
|
|
5
6
|
class AccountHolderCreateResponse < Lithic::BaseModel
|
|
6
7
|
# @!attribute token
|
|
7
8
|
# Globally unique identifier for the account holder.
|
|
@@ -93,6 +94,8 @@ module Lithic
|
|
|
93
94
|
# Note:
|
|
94
95
|
#
|
|
95
96
|
# - `PENDING_REVIEW` is only applicable for the `KYB_BASIC` workflow.
|
|
97
|
+
#
|
|
98
|
+
# @see Lithic::Models::AccountHolderCreateResponse#status
|
|
96
99
|
module Status
|
|
97
100
|
extend Lithic::Enum
|
|
98
101
|
|