From 5b18abb844061c1d92f4f19c135b8434a895d584 Mon Sep 17 00:00:00 2001 From: fireblocks_dx_team Date: Tue, 18 Aug 2026 08:20:05 +0000 Subject: [PATCH] Generated SDK #2768393570 --- .github/workflows/python-publish.yml | 2 +- .openapi-generator/FILES | 18 ++ CHANGELOG.md | 290 ------------------ README.md | 6 + docs/DelegationBlockchainPositionInfo.md | 3 + docs/EthereumBlockchainData.md | 3 + docs/GaslessInfo.md | 33 ++ docs/GetFindingsExternalResponse.md | 32 ++ docs/ReasonForPaymentEnum.md | 6 + docs/SecurityFinding.md | 36 +++ docs/SecurityPostureManagementApi.md | 98 ++++++ docs/StakingApi.md | 6 +- docs/TransactionResponse.md | 1 + docs/TravelRuleLegalNameIdentifier.md | 30 ++ docs/TravelRuleLegalPersonNameIdentifier.md | 5 +- docs/TravelRuleValidateLegalNameIdentifier.md | 30 ++ docs/TravelRuleValidateLegalPerson.md | 2 +- ...elRuleValidateLegalPersonNameIdentifier.md | 5 +- fireblocks/__init__.py | 12 +- fireblocks/api/__init__.py | 1 + .../api/security_posture_management_api.py | 213 +++++++++++++ fireblocks/api/staking_api.py | 6 +- fireblocks/client.py | 10 + fireblocks/configuration.py | 2 +- fireblocks/models/__init__.py | 5 + fireblocks/models/ethereum_blockchain_data.py | 11 +- fireblocks/models/gasless_info.py | 94 ++++++ .../models/get_findings_external_response.py | 100 ++++++ fireblocks/models/reason_for_payment_enum.py | 3 + fireblocks/models/security_finding.py | 141 +++++++++ fireblocks/models/transaction_response.py | 8 +- .../travel_rule_legal_name_identifier.py | 90 ++++++ ...ravel_rule_legal_person_name_identifier.py | 36 ++- ...vel_rule_validate_legal_name_identifier.py | 98 ++++++ .../travel_rule_validate_legal_person.py | 2 +- ...e_validate_legal_person_name_identifier.py | 46 ++- pyproject.toml | 2 +- setup.py | 2 +- test/fireblocks/test_client.py | 4 + test/test_add_connected_account_request.py | 4 +- ...est_delegation_blockchain_position_info.py | 3 + test/test_ethereum_blockchain_data.py | 5 +- test/test_gasless_info.py | 56 ++++ test/test_get_findings_external_response.py | 57 ++++ test/test_security_finding.py | 59 ++++ test/test_security_posture_management_api.py | 38 +++ test/test_transaction_response.py | 5 + .../test_travel_rule_legal_name_identifier.py | 58 ++++ test/test_travel_rule_legal_person.py | 5 +- ...ravel_rule_legal_person_name_identifier.py | 5 +- test/test_travel_rule_person.py | 5 +- ..._rule_validate_full_transaction_request.py | 8 + ...vel_rule_validate_legal_name_identifier.py | 58 ++++ .../test_travel_rule_validate_legal_person.py | 9 +- ...e_validate_legal_person_name_identifier.py | 6 +- test/test_travel_rule_validate_person.py | 5 +- test/test_travel_rule_validate_pii_ivms.py | 4 + 57 files changed, 1535 insertions(+), 347 deletions(-) delete mode 100644 CHANGELOG.md create mode 100644 docs/GaslessInfo.md create mode 100644 docs/GetFindingsExternalResponse.md create mode 100644 docs/SecurityFinding.md create mode 100644 docs/SecurityPostureManagementApi.md create mode 100644 docs/TravelRuleLegalNameIdentifier.md create mode 100644 docs/TravelRuleValidateLegalNameIdentifier.md create mode 100644 fireblocks/api/security_posture_management_api.py create mode 100644 fireblocks/models/gasless_info.py create mode 100644 fireblocks/models/get_findings_external_response.py create mode 100644 fireblocks/models/security_finding.py create mode 100644 fireblocks/models/travel_rule_legal_name_identifier.py create mode 100644 fireblocks/models/travel_rule_validate_legal_name_identifier.py create mode 100644 test/test_gasless_info.py create mode 100644 test/test_get_findings_external_response.py create mode 100644 test/test_security_finding.py create mode 100644 test/test_security_posture_management_api.py create mode 100644 test/test_travel_rule_legal_name_identifier.py create mode 100644 test/test_travel_rule_validate_legal_name_identifier.py diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 8ad568dd..982d596d 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -72,7 +72,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 with: - ref: master + ref: ${{ github.event.release.tag_name }} fetch-depth: 0 - name: Set up Python diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 2cfc59fb..abed79de 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -472,6 +472,7 @@ docs/GasStationConfiguration.md docs/GasStationConfigurationResponse.md docs/GasStationPropertiesResponse.md docs/GasStationsApi.md +docs/GaslessInfo.md docs/GasslessStandardConfigurations.md docs/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.md docs/GenieBetaApi.md @@ -492,6 +493,7 @@ docs/GetConsoleUsersResponse.md docs/GetDeployableAddressRequest.md docs/GetExchangeAccountsCredentialsPublicKeyResponse.md docs/GetFilterParameter.md +docs/GetFindingsExternalResponse.md docs/GetLayerZeroDvnConfigResponse.md docs/GetLayerZeroPeersResponse.md docs/GetLinkedCollectionsPaginatedResponse.md @@ -847,6 +849,8 @@ docs/ScreeningVerdict.md docs/ScreeningVerdictEnum.md docs/ScreeningVerdictMatchedRule.md docs/SearchNetworkIdsResponse.md +docs/SecurityFinding.md +docs/SecurityPostureManagementApi.md docs/SepaPaymentInfo.md docs/SessionDTO.md docs/SessionMetadata.md @@ -1116,6 +1120,7 @@ docs/TravelRuleGeographicAddress.md docs/TravelRuleGetAllVASPsResponse.md docs/TravelRuleIssuer.md docs/TravelRuleIssuers.md +docs/TravelRuleLegalNameIdentifier.md docs/TravelRuleLegalPerson.md docs/TravelRuleLegalPersonNameIdentifier.md docs/TravelRuleMatchedRule.md @@ -1140,6 +1145,7 @@ docs/TravelRuleVASPExternalEntityRegistration.md docs/TravelRuleValidateDateAndPlaceOfBirth.md docs/TravelRuleValidateFullTransactionRequest.md docs/TravelRuleValidateGeographicAddress.md +docs/TravelRuleValidateLegalNameIdentifier.md docs/TravelRuleValidateLegalPerson.md docs/TravelRuleValidateLegalPersonNameIdentifier.md docs/TravelRuleValidateNationalIdentification.md @@ -1281,6 +1287,7 @@ fireblocks/api/policy_editor_v2_api.py fireblocks/api/policy_editor_v2_beta_api.py fireblocks/api/reports_beta_api.py fireblocks/api/reset_device_api.py +fireblocks/api/security_posture_management_api.py fireblocks/api/smart_transfer_api.py fireblocks/api/staking_api.py fireblocks/api/tags_api.py @@ -1759,6 +1766,7 @@ fireblocks/models/funds.py fireblocks/models/gas_station_configuration.py fireblocks/models/gas_station_configuration_response.py fireblocks/models/gas_station_properties_response.py +fireblocks/models/gasless_info.py fireblocks/models/gassless_standard_configurations.py fireblocks/models/gassless_standard_configurations_gasless_standard_configurations_value.py fireblocks/models/genie_chat_message.py @@ -1778,6 +1786,7 @@ fireblocks/models/get_console_users_response.py fireblocks/models/get_deployable_address_request.py fireblocks/models/get_exchange_accounts_credentials_public_key_response.py fireblocks/models/get_filter_parameter.py +fireblocks/models/get_findings_external_response.py fireblocks/models/get_layer_zero_dvn_config_response.py fireblocks/models/get_layer_zero_peers_response.py fireblocks/models/get_linked_collections_paginated_response.py @@ -2115,6 +2124,7 @@ fireblocks/models/screening_verdict.py fireblocks/models/screening_verdict_enum.py fireblocks/models/screening_verdict_matched_rule.py fireblocks/models/search_network_ids_response.py +fireblocks/models/security_finding.py fireblocks/models/sepa_address.py fireblocks/models/sepa_destination.py fireblocks/models/sepa_payment_info.py @@ -2380,6 +2390,7 @@ fireblocks/models/travel_rule_geographic_address.py fireblocks/models/travel_rule_get_all_vasps_response.py fireblocks/models/travel_rule_issuer.py fireblocks/models/travel_rule_issuers.py +fireblocks/models/travel_rule_legal_name_identifier.py fireblocks/models/travel_rule_legal_person.py fireblocks/models/travel_rule_legal_person_name_identifier.py fireblocks/models/travel_rule_matched_rule.py @@ -2400,6 +2411,7 @@ fireblocks/models/travel_rule_update_vasp_details.py fireblocks/models/travel_rule_validate_date_and_place_of_birth.py fireblocks/models/travel_rule_validate_full_transaction_request.py fireblocks/models/travel_rule_validate_geographic_address.py +fireblocks/models/travel_rule_validate_legal_name_identifier.py fireblocks/models/travel_rule_validate_legal_person.py fireblocks/models/travel_rule_validate_legal_person_name_identifier.py fireblocks/models/travel_rule_validate_national_identification.py @@ -2991,6 +3003,7 @@ test/test_gas_station_configuration.py test/test_gas_station_configuration_response.py test/test_gas_station_properties_response.py test/test_gas_stations_api.py +test/test_gasless_info.py test/test_gassless_standard_configurations.py test/test_gassless_standard_configurations_gasless_standard_configurations_value.py test/test_genie_beta_api.py @@ -3011,6 +3024,7 @@ test/test_get_console_users_response.py test/test_get_deployable_address_request.py test/test_get_exchange_accounts_credentials_public_key_response.py test/test_get_filter_parameter.py +test/test_get_findings_external_response.py test/test_get_layer_zero_dvn_config_response.py test/test_get_layer_zero_peers_response.py test/test_get_linked_collections_paginated_response.py @@ -3362,6 +3376,8 @@ test/test_screening_verdict.py test/test_screening_verdict_enum.py test/test_screening_verdict_matched_rule.py test/test_search_network_ids_response.py +test/test_security_finding.py +test/test_security_posture_management_api.py test/test_sepa_address.py test/test_sepa_destination.py test/test_sepa_payment_info.py @@ -3635,6 +3651,7 @@ test/test_travel_rule_geographic_address.py test/test_travel_rule_get_all_vasps_response.py test/test_travel_rule_issuer.py test/test_travel_rule_issuers.py +test/test_travel_rule_legal_name_identifier.py test/test_travel_rule_legal_person.py test/test_travel_rule_legal_person_name_identifier.py test/test_travel_rule_matched_rule.py @@ -3655,6 +3672,7 @@ test/test_travel_rule_update_vasp_details.py test/test_travel_rule_validate_date_and_place_of_birth.py test/test_travel_rule_validate_full_transaction_request.py test/test_travel_rule_validate_geographic_address.py +test/test_travel_rule_validate_legal_name_identifier.py test/test_travel_rule_validate_legal_person.py test/test_travel_rule_validate_legal_person_name_identifier.py test/test_travel_rule_validate_national_identification.py diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 9abcbe94..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,290 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v26.0.0](https://github.com/fireblocks/py-sdk/compare/v24.0.0...v26.0.0) - 2026-08-10 - -### Merged - -- Generated SDK #2747190960 [`#155`](https://github.com/fireblocks/py-sdk/pull/155) - -## [v24.0.0](https://github.com/fireblocks/py-sdk/compare/v23.0.0...v24.0.0) - 2026-07-23 - -### Merged - -- Generated SDK #2700459745 (major) [`#146`](https://github.com/fireblocks/py-sdk/pull/146) - -## [v23.0.0](https://github.com/fireblocks/py-sdk/compare/v22.0.0...v23.0.0) - 2026-07-01 - -### Merged - -- Generated SDK #1180 [`#145`](https://github.com/fireblocks/py-sdk/pull/145) - -## [v22.0.0](https://github.com/fireblocks/py-sdk/compare/v21.0.0...v22.0.0) - 2026-06-28 - -### Merged - -- Generated SDK #5347 [`#144`](https://github.com/fireblocks/py-sdk/pull/144) - -## [v21.0.0](https://github.com/fireblocks/py-sdk/compare/v20.0.0...v21.0.0) - 2026-06-11 - -### Merged - -- Generated SDK #5364 [`#142`](https://github.com/fireblocks/py-sdk/pull/142) - -## [v20.0.0](https://github.com/fireblocks/py-sdk/compare/v19.1.0...v20.0.0) - 2026-06-02 - -### Merged - -- Generated SDK #2839 (major) [`#141`](https://github.com/fireblocks/py-sdk/pull/141) - -## [v19.1.0](https://github.com/fireblocks/py-sdk/compare/v19.0.0...v19.1.0) - 2026-05-27 - -### Merged - -- Generated SDK #2710 (minor) [`#140`](https://github.com/fireblocks/py-sdk/pull/140) - -## [v19.0.0](https://github.com/fireblocks/py-sdk/compare/v18.0.0...v19.0.0) - 2026-05-17 - -### Merged - -- Generated SDK #7742 (major) [`#139`](https://github.com/fireblocks/py-sdk/pull/139) - -## [v18.0.0](https://github.com/fireblocks/py-sdk/compare/v17.0.0...v18.0.0) - 2026-05-07 - -### Merged - -- Generated SDK #3222 (major) [`#138`](https://github.com/fireblocks/py-sdk/pull/138) - -## [v17.0.0](https://github.com/fireblocks/py-sdk/compare/v16.0.0...v17.0.0) - 2026-04-20 - -### Merged - -- Generated SDK #9605 (major) [`#137`](https://github.com/fireblocks/py-sdk/pull/137) - -## [v16.0.0](https://github.com/fireblocks/py-sdk/compare/v15.0.0...v16.0.0) - 2026-04-06 - -### Merged - -- Generated SDK #3331 [`#135`](https://github.com/fireblocks/py-sdk/pull/135) - -## [v15.0.0](https://github.com/fireblocks/py-sdk/compare/v14.1.0...v15.0.0) - 2026-03-15 - -### Merged - -- Generated SDK #3733 (major) [`#129`](https://github.com/fireblocks/py-sdk/pull/129) - -## [v14.1.0](https://github.com/fireblocks/py-sdk/compare/v14.0.0...v14.1.0) - 2026-02-26 - -### Merged - -- Generated SDK #2167 [`#127`](https://github.com/fireblocks/py-sdk/pull/127) - -## [v14.0.0](https://github.com/fireblocks/py-sdk/compare/v13.0.0...v14.0.0) - 2026-02-03 - -### Merged - -- Generated SDK #4746 [`#123`](https://github.com/fireblocks/py-sdk/pull/123) - -## [v13.0.0](https://github.com/fireblocks/py-sdk/compare/v12.1.2...v13.0.0) - 2025-11-13 - -### Merged - -- Generated SDK #5834 [`#121`](https://github.com/fireblocks/py-sdk/pull/121) - -## [v12.1.2](https://github.com/fireblocks/py-sdk/compare/v12.1.1...v12.1.2) - 2025-10-22 - -### Merged - -- Generated SDK #8293 [`#120`](https://github.com/fireblocks/py-sdk/pull/120) - -## [v12.1.1](https://github.com/fireblocks/py-sdk/compare/v12.1.0...v12.1.1) - 2025-09-29 - -### Merged - -- Generated SDK #6061 [`#119`](https://github.com/fireblocks/py-sdk/pull/119) - -## [v12.1.0](https://github.com/fireblocks/py-sdk/compare/v12.0.0...v12.1.0) - 2025-09-09 - -### Merged - -- Generated SDK #4521 [`#118`](https://github.com/fireblocks/py-sdk/pull/118) - -## [v12.0.0](https://github.com/fireblocks/py-sdk/compare/v11.2.0...v12.0.0) - 2025-09-01 - -### Merged - -- Generated SDK #7741 [`#117`](https://github.com/fireblocks/py-sdk/pull/117) - -## [v11.2.0](https://github.com/fireblocks/py-sdk/compare/v11.1.0...v11.2.0) - 2025-08-18 - -### Merged - -- Generated SDK #3302 [`#116`](https://github.com/fireblocks/py-sdk/pull/116) - -## [v11.1.0](https://github.com/fireblocks/py-sdk/compare/v11.0.0...v11.1.0) - 2025-08-11 - -### Merged - -- Generated SDK #1782 [`#115`](https://github.com/fireblocks/py-sdk/pull/115) - -## [v11.0.0](https://github.com/fireblocks/py-sdk/compare/v10.4.0...v11.0.0) - 2025-07-15 - -### Merged - -- Generated SDK #5610 [`#114`](https://github.com/fireblocks/py-sdk/pull/114) - -## [v10.4.0](https://github.com/fireblocks/py-sdk/compare/v10.3.0...v10.4.0) - 2025-06-29 - -### Merged - -- Generated SDK #1492 [`#113`](https://github.com/fireblocks/py-sdk/pull/113) - -## [v10.3.0](https://github.com/fireblocks/py-sdk/compare/v10.2.0...v10.3.0) - 2025-06-18 - -### Merged - -- Generated SDK #4009 [`#112`](https://github.com/fireblocks/py-sdk/pull/112) - -## [v10.2.0](https://github.com/fireblocks/py-sdk/compare/v10.1.1...v10.2.0) - 2025-06-04 - -### Merged - -- Generated SDK #8912 [`#111`](https://github.com/fireblocks/py-sdk/pull/111) - -## [v10.1.1](https://github.com/fireblocks/py-sdk/compare/v10.1.0...v10.1.1) - 2025-05-18 - -### Merged - -- Generated SDK #5019 [`#110`](https://github.com/fireblocks/py-sdk/pull/110) - -## [v10.1.0](https://github.com/fireblocks/py-sdk/compare/v10.0.0...v10.1.0) - 2025-05-07 - -### Merged - -- Generated SDK #7076 [`#107`](https://github.com/fireblocks/py-sdk/pull/107) - -## [v10.0.0](https://github.com/fireblocks/py-sdk/compare/v9.0.1...v10.0.0) - 2025-04-20 - -### Merged - -- Generated SDK #4794 [`#105`](https://github.com/fireblocks/py-sdk/pull/105) - -## [v9.0.1](https://github.com/fireblocks/py-sdk/compare/v9.0.0...v9.0.1) - 2025-04-07 - -### Merged - -- Generated SDK #3065 [`#104`](https://github.com/fireblocks/py-sdk/pull/104) - -## [v9.0.0](https://github.com/fireblocks/py-sdk/compare/v8.0.0...v9.0.0) - 2025-03-27 - -### Merged - -- Generated SDK #619 [`#102`](https://github.com/fireblocks/py-sdk/pull/102) - -## [v8.0.0](https://github.com/fireblocks/py-sdk/compare/v7.1.0...v8.0.0) - 2025-03-17 - -### Merged - -- Generated SDK #645 [`#101`](https://github.com/fireblocks/py-sdk/pull/101) -- Generated SDK #726 [`#99`](https://github.com/fireblocks/py-sdk/pull/99) - -## [v7.1.0](https://github.com/fireblocks/py-sdk/compare/v7.0.1...v7.1.0) - 2025-02-25 - -### Merged - -- Generated SDK #9833 [`#96`](https://github.com/fireblocks/py-sdk/pull/96) - -## [v7.0.1](https://github.com/fireblocks/py-sdk/compare/v7.0.0...v7.0.1) - 2025-02-12 - -### Merged - -- Generated SDK #4262 [`#95`](https://github.com/fireblocks/py-sdk/pull/95) - -## [v7.0.0](https://github.com/fireblocks/py-sdk/compare/v6.0.0...v7.0.0) - 2025-02-02 - -### Merged - -- Generated SDK #538 [`#92`](https://github.com/fireblocks/py-sdk/pull/92) - -## [v6.0.0](https://github.com/fireblocks/py-sdk/compare/v5.0.0...v6.0.0) - 2025-01-08 - -### Merged - -- Generated SDK #8699 [`#89`](https://github.com/fireblocks/py-sdk/pull/89) - -## [v5.0.0](https://github.com/fireblocks/py-sdk/compare/v4.0.0...v5.0.0) - 2024-12-05 - -### Merged - -- Generated SDK #1430 [`#85`](https://github.com/fireblocks/py-sdk/pull/85) -- Update python-package.yml, deprecate macos-12 [`#86`](https://github.com/fireblocks/py-sdk/pull/86) - -## [v4.0.0](https://github.com/fireblocks/py-sdk/compare/v3.0.0...v4.0.0) - 2024-10-31 - -### Merged - -- Generated SDK #5184 [`#82`](https://github.com/fireblocks/py-sdk/pull/82) - -## [v3.0.0](https://github.com/fireblocks/py-sdk/compare/v2.1.0...v3.0.0) - 2024-09-17 - -### Merged - -- Generated SDK #237 [`#81`](https://github.com/fireblocks/py-sdk/pull/81) - -## [v2.1.0](https://github.com/fireblocks/py-sdk/compare/v2.0.0...v2.1.0) - 2024-07-25 - -### Merged - -- Generated SDK #6749 [`#78`](https://github.com/fireblocks/py-sdk/pull/78) - -## [v2.0.0](https://github.com/fireblocks/py-sdk/compare/v1.0.4...v2.0.0) - 2024-07-17 - -### Merged - -- Generated SDK #6152 [`#76`](https://github.com/fireblocks/py-sdk/pull/76) -- Generated SDK #7647 [`#73`](https://github.com/fireblocks/py-sdk/pull/73) -- Generated SDK #7984 [`#70`](https://github.com/fireblocks/py-sdk/pull/70) - -## [v1.0.4](https://github.com/fireblocks/py-sdk/compare/v1.0.3...v1.0.4) - 2024-06-26 - -### Merged - -- Generated SDK #5779 [`#69`](https://github.com/fireblocks/py-sdk/pull/69) -- Generated SDK #913 [`#68`](https://github.com/fireblocks/py-sdk/pull/68) -- Generated SDK #1353 [`#67`](https://github.com/fireblocks/py-sdk/pull/67) -- Generated SDK #9982 [`#66`](https://github.com/fireblocks/py-sdk/pull/66) -- Generated SDK #1362 [`#65`](https://github.com/fireblocks/py-sdk/pull/65) -- Generated SDK #3652 [`#64`](https://github.com/fireblocks/py-sdk/pull/64) - -## [v1.0.3](https://github.com/fireblocks/py-sdk/compare/v1.0.2...v1.0.3) - 2024-06-06 - -### Merged - -- Generated SDK #2648 [`#30`](https://github.com/fireblocks/py-sdk/pull/30) - -## [v1.0.2](https://github.com/fireblocks/py-sdk/compare/v0.0.2-beta...v1.0.2) - 2024-06-04 - -### Merged - -- version 1.0.2 [`#25`](https://github.com/fireblocks/py-sdk/pull/25) -- version 1.0.0 [`#24`](https://github.com/fireblocks/py-sdk/pull/24) - -## v0.0.2-beta - 2024-05-30 - -### Merged - -- version 0.0.2-beta [`#23`](https://github.com/fireblocks/py-sdk/pull/23) -- Update .bumpversion.cfg [`#14`](https://github.com/fireblocks/py-sdk/pull/14) -- Update setup.py [`#13`](https://github.com/fireblocks/py-sdk/pull/13) -- Bug Fixes [`#12`](https://github.com/fireblocks/py-sdk/pull/12) -- update support for beta in bumpversion [`#11`](https://github.com/fireblocks/py-sdk/pull/11) -- Update setup.py [`#10`](https://github.com/fireblocks/py-sdk/pull/10) -- Update setup.py [`#9`](https://github.com/fireblocks/py-sdk/pull/9) -- Added Idempotency & NCW headers support [`#7`](https://github.com/fireblocks/py-sdk/pull/7) -- Added Idempotency & NCW headers support [`#8`](https://github.com/fireblocks/py-sdk/pull/8) -- Update setup.py [`#5`](https://github.com/fireblocks/py-sdk/pull/5) -- API Support Updates [`#4`](https://github.com/fireblocks/py-sdk/pull/4) diff --git a/README.md b/README.md index 556e4960..e0bc4091 100644 --- a/README.md +++ b/README.md @@ -477,6 +477,7 @@ Class | Method | HTTP request | Description *ReportsBetaApi* | [**get_report**](docs/ReportsBetaApi.md#get_report) | **GET** /reports/{reportId} | Get report status *ReportsBetaApi* | [**list_reports**](docs/ReportsBetaApi.md#list_reports) | **GET** /reports | List reports *ResetDeviceApi* | [**reset_device**](docs/ResetDeviceApi.md#reset_device) | **POST** /management/users/{id}/reset_device | Resets device +*SecurityPostureManagementApi* | [**get_security_findings**](docs/SecurityPostureManagementApi.md#get_security_findings) | **GET** /security/fspm/findings | Get FSPM security findings *SmartTransferApi* | [**approve_dv_p_ticket_term**](docs/SmartTransferApi.md#approve_dv_p_ticket_term) | **PUT** /smart_transfers/{ticketId}/terms/{termId}/dvp/approve | Set funding source and approval *SmartTransferApi* | [**cancel_ticket**](docs/SmartTransferApi.md#cancel_ticket) | **PUT** /smart-transfers/{ticketId}/cancel | Cancel Ticket *SmartTransferApi* | [**create_ticket**](docs/SmartTransferApi.md#create_ticket) | **POST** /smart-transfers | Create Ticket @@ -1139,6 +1140,7 @@ Class | Method | HTTP request | Description - [GasStationConfiguration](docs/GasStationConfiguration.md) - [GasStationConfigurationResponse](docs/GasStationConfigurationResponse.md) - [GasStationPropertiesResponse](docs/GasStationPropertiesResponse.md) + - [GaslessInfo](docs/GaslessInfo.md) - [GasslessStandardConfigurations](docs/GasslessStandardConfigurations.md) - [GasslessStandardConfigurationsGaslessStandardConfigurationsValue](docs/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.md) - [GenieChatMessage](docs/GenieChatMessage.md) @@ -1158,6 +1160,7 @@ Class | Method | HTTP request | Description - [GetDeployableAddressRequest](docs/GetDeployableAddressRequest.md) - [GetExchangeAccountsCredentialsPublicKeyResponse](docs/GetExchangeAccountsCredentialsPublicKeyResponse.md) - [GetFilterParameter](docs/GetFilterParameter.md) + - [GetFindingsExternalResponse](docs/GetFindingsExternalResponse.md) - [GetLayerZeroDvnConfigResponse](docs/GetLayerZeroDvnConfigResponse.md) - [GetLayerZeroPeersResponse](docs/GetLayerZeroPeersResponse.md) - [GetLinkedCollectionsPaginatedResponse](docs/GetLinkedCollectionsPaginatedResponse.md) @@ -1499,6 +1502,7 @@ Class | Method | HTTP request | Description - [ScreeningVerdictEnum](docs/ScreeningVerdictEnum.md) - [ScreeningVerdictMatchedRule](docs/ScreeningVerdictMatchedRule.md) - [SearchNetworkIdsResponse](docs/SearchNetworkIdsResponse.md) + - [SecurityFinding](docs/SecurityFinding.md) - [SepaPaymentInfo](docs/SepaPaymentInfo.md) - [SessionDTO](docs/SessionDTO.md) - [SessionMetadata](docs/SessionMetadata.md) @@ -1760,6 +1764,7 @@ Class | Method | HTTP request | Description - [TravelRuleGetAllVASPsResponse](docs/TravelRuleGetAllVASPsResponse.md) - [TravelRuleIssuer](docs/TravelRuleIssuer.md) - [TravelRuleIssuers](docs/TravelRuleIssuers.md) + - [TravelRuleLegalNameIdentifier](docs/TravelRuleLegalNameIdentifier.md) - [TravelRuleLegalPerson](docs/TravelRuleLegalPerson.md) - [TravelRuleLegalPersonNameIdentifier](docs/TravelRuleLegalPersonNameIdentifier.md) - [TravelRuleMatchedRule](docs/TravelRuleMatchedRule.md) @@ -1784,6 +1789,7 @@ Class | Method | HTTP request | Description - [TravelRuleValidateDateAndPlaceOfBirth](docs/TravelRuleValidateDateAndPlaceOfBirth.md) - [TravelRuleValidateFullTransactionRequest](docs/TravelRuleValidateFullTransactionRequest.md) - [TravelRuleValidateGeographicAddress](docs/TravelRuleValidateGeographicAddress.md) + - [TravelRuleValidateLegalNameIdentifier](docs/TravelRuleValidateLegalNameIdentifier.md) - [TravelRuleValidateLegalPerson](docs/TravelRuleValidateLegalPerson.md) - [TravelRuleValidateLegalPersonNameIdentifier](docs/TravelRuleValidateLegalPersonNameIdentifier.md) - [TravelRuleValidateNationalIdentification](docs/TravelRuleValidateNationalIdentification.md) diff --git a/docs/DelegationBlockchainPositionInfo.md b/docs/DelegationBlockchainPositionInfo.md index 29bfab05..06d42cd2 100644 --- a/docs/DelegationBlockchainPositionInfo.md +++ b/docs/DelegationBlockchainPositionInfo.md @@ -11,6 +11,9 @@ Name | Type | Description | Notes **rewards_breakdown** | [**SolanaRewardsBreakdown**](SolanaRewardsBreakdown.md) | | [optional] **is_compounding_validator** | **bool** | Is the validator compounding (i.e it was created with compounding validator type). | **estimated_activation_time** | **str** | Estimated time the staked ETH will activate, derived from the beacon-chain deposit queue. Present only while the position is pending/activating; omitted once active. | [optional] +**estimated_source_exit_time** | **datetime** | Estimated time the source validator will exit the active set and stop earning rewards, derived from the beacon-chain consolidation queue. Present only while a consolidation is in progress. | [optional] +**estimated_consolidation_time** | **datetime** | Estimated time the consolidation will complete, i.e. when the source balance is swept to the destination validator, derived from the beacon-chain consolidation queue. Present only while a consolidation is in progress. | [optional] +**estimated_withdrawal_time** | **datetime** | Estimated time the in-flight withdrawal will complete, derived from the beacon-chain exit queue for a full exit or the manual withdrawal queue for a partial one. Present only while a withdrawal is in progress. | [optional] **total_withdrawable_amount** | **str** | The total amount available for withdrawal. | **total_inactive_amount** | **str** | The total inactive amount. | diff --git a/docs/EthereumBlockchainData.md b/docs/EthereumBlockchainData.md index 58d9c6af..f0e36845 100644 --- a/docs/EthereumBlockchainData.md +++ b/docs/EthereumBlockchainData.md @@ -8,6 +8,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **is_compounding_validator** | **bool** | Is the validator compounding (i.e it was created with compounding validator type). | **estimated_activation_time** | **str** | Estimated time the staked ETH will activate, derived from the beacon-chain deposit queue. Present only while the position is pending/activating; omitted once active. | [optional] +**estimated_source_exit_time** | **datetime** | Estimated time the source validator will exit the active set and stop earning rewards, derived from the beacon-chain consolidation queue. Present only while a consolidation is in progress. | [optional] +**estimated_consolidation_time** | **datetime** | Estimated time the consolidation will complete, i.e. when the source balance is swept to the destination validator, derived from the beacon-chain consolidation queue. Present only while a consolidation is in progress. | [optional] +**estimated_withdrawal_time** | **datetime** | Estimated time the in-flight withdrawal will complete, derived from the beacon-chain exit queue for a full exit or the manual withdrawal queue for a partial one. Present only while a withdrawal is in progress. | [optional] ## Example diff --git a/docs/GaslessInfo.md b/docs/GaslessInfo.md new file mode 100644 index 00000000..2e7f062c --- /dev/null +++ b/docs/GaslessInfo.md @@ -0,0 +1,33 @@ +# GaslessInfo + +Relay (meta-transaction) details. Returned only for meta-transactions (`isMetaTx` is `true`). For meta-transactions the deprecated top-level `fee` field is omitted; use `feeInfo` instead. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_meta_tx** | **bool** | Indicates the transaction is a meta-transaction (gas paid by a relay tenant). | [optional] +**relay_tenant_id** | **str** | The tenant ID of the relay that sponsors the gas for the meta-transaction. | [optional] +**relay_tenant_name** | **str** | The tenant name of the relay that sponsors the gas for the meta-transaction. | [optional] +**relay_vault_account_id** | **str** | The vault account ID of the relay that sponsors the gas for the meta-transaction. | [optional] + +## Example + +```python +from fireblocks.models.gasless_info import GaslessInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of GaslessInfo from a JSON string +gasless_info_instance = GaslessInfo.from_json(json) +# print the JSON string representation of the object +print(GaslessInfo.to_json()) + +# convert the object into a dict +gasless_info_dict = gasless_info_instance.to_dict() +# create an instance of GaslessInfo from a dict +gasless_info_from_dict = GaslessInfo.from_dict(gasless_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetFindingsExternalResponse.md b/docs/GetFindingsExternalResponse.md new file mode 100644 index 00000000..ed0cd060 --- /dev/null +++ b/docs/GetFindingsExternalResponse.md @@ -0,0 +1,32 @@ +# GetFindingsExternalResponse + +A paginated list of FSPM findings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[SecurityFinding]**](SecurityFinding.md) | List of FSPM findings for the current page. | +**total** | **int** | Total number of findings matching the query. | +**next** | **str** | Cursor for the next page of results, omitted when there are no more results. | [optional] + +## Example + +```python +from fireblocks.models.get_findings_external_response import GetFindingsExternalResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetFindingsExternalResponse from a JSON string +get_findings_external_response_instance = GetFindingsExternalResponse.from_json(json) +# print the JSON string representation of the object +print(GetFindingsExternalResponse.to_json()) + +# convert the object into a dict +get_findings_external_response_dict = get_findings_external_response_instance.to_dict() +# create an instance of GetFindingsExternalResponse from a dict +get_findings_external_response_from_dict = GetFindingsExternalResponse.from_dict(get_findings_external_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReasonForPaymentEnum.md b/docs/ReasonForPaymentEnum.md index 73d5d990..a4bb7691 100644 --- a/docs/ReasonForPaymentEnum.md +++ b/docs/ReasonForPaymentEnum.md @@ -64,6 +64,12 @@ The reason or purpose of the payment. Used by providers (e.g. CPN) that require * `REPATRIATION_FUND_SETTLEMENT` (value: `'REPATRIATION_FUND_SETTLEMENT'`) +* `CORPORATE_INVESTMENT` (value: `'CORPORATE_INVESTMENT'`) + +* `INTER_COMPANY_TRANSFER` (value: `'INTER_COMPANY_TRANSFER'`) + +* `OFFICE_OPERATING_EXPENSES` (value: `'OFFICE_OPERATING_EXPENSES'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SecurityFinding.md b/docs/SecurityFinding.md new file mode 100644 index 00000000..9155b31f --- /dev/null +++ b/docs/SecurityFinding.md @@ -0,0 +1,36 @@ +# SecurityFinding + +A single FSPM finding + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier of the finding | [optional] +**type** | **str** | The finding type identifier | [optional] +**status** | **str** | Current status of the finding | [optional] +**severity** | **str** | Severity level of the finding | [optional] +**category** | **str** | Category of the finding | [optional] +**created_at** | **datetime** | When the finding was first detected | [optional] +**title** | **str** | Human-readable title of the finding | [optional] + +## Example + +```python +from fireblocks.models.security_finding import SecurityFinding + +# TODO update the JSON string below +json = "{}" +# create an instance of SecurityFinding from a JSON string +security_finding_instance = SecurityFinding.from_json(json) +# print the JSON string representation of the object +print(SecurityFinding.to_json()) + +# convert the object into a dict +security_finding_dict = security_finding_instance.to_dict() +# create an instance of SecurityFinding from a dict +security_finding_from_dict = SecurityFinding.from_dict(security_finding_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SecurityPostureManagementApi.md b/docs/SecurityPostureManagementApi.md new file mode 100644 index 00000000..9da3f1ea --- /dev/null +++ b/docs/SecurityPostureManagementApi.md @@ -0,0 +1,98 @@ +# fireblocks.SecurityPostureManagementApi + +All URIs are relative to *https://api.fireblocks.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_security_findings**](SecurityPostureManagementApi.md#get_security_findings) | **GET** /security/fspm/findings | Get FSPM security findings + + +# **get_security_findings** +> GetFindingsExternalResponse get_security_findings(page_cursor=page_cursor, page_size=page_size, severity=severity, category=category, status=status) + +Get FSPM security findings + +Returns a paginated list of FSPM security findings for the workspace. +Endpoint Permissions: Security Admin, Security Auditor. + + +### Example + + +```python +from fireblocks.models.get_findings_external_response import GetFindingsExternalResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + page_cursor = 'page_cursor_example' # str | Cursor indicating the page position. Omit to fetch the first page. (optional) + page_size = 10 # int | Number of results per page (optional) (default to 10) + severity = 'HIGH' # str | Filter by severity level (optional) + category = 'USER_MANAGEMENT' # str | Filter by finding category (optional) + status = 'OPEN' # str | Filter by finding status (optional) + + try: + # Get FSPM security findings + api_response = fireblocks.security_posture_management.get_security_findings(page_cursor=page_cursor, page_size=page_size, severity=severity, category=category, status=status).result() + print("The response of SecurityPostureManagementApi->get_security_findings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SecurityPostureManagementApi->get_security_findings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_cursor** | **str**| Cursor indicating the page position. Omit to fetch the first page. | [optional] + **page_size** | **int**| Number of results per page | [optional] [default to 10] + **severity** | **str**| Filter by severity level | [optional] + **category** | **str**| Filter by finding category | [optional] + **status** | **str**| Filter by finding status | [optional] + +### Return type + +[**GetFindingsExternalResponse**](GetFindingsExternalResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A paginated list of FSPM findings | * X-Request-ID -
| +**400** | Bad request — invalid or malformed query parameters. | * X-Request-ID -
| +**401** | Unauthorized — missing or invalid authentication token. | * X-Request-ID -
| +**403** | Forbidden — insufficient permissions or feature is disabled. | * X-Request-ID -
| +**429** | Too many requests — rate limit exceeded, slow down and retry later. | * X-Request-ID -
| +**5XX** | Internal error. | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/StakingApi.md b/docs/StakingApi.md index c74cf0e3..f85171f7 100644 --- a/docs/StakingApi.md +++ b/docs/StakingApi.md @@ -273,7 +273,7 @@ No authorization required List staking positions Returns all staking positions with core details: amounts, rewards, status, chain, and vault. -Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. +Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -675,7 +675,7 @@ No authorization required List staking positions (Paginated) Returns staking positions with core details: amounts, rewards, status, chain, and vault. It supports cursor-based pagination for efficient data retrieval. This endpoint always returns a paginated response with {data, next} structure. -Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. +Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -764,7 +764,7 @@ No authorization required List staking providers Returns all available staking providers with metadata such as name, ID, and supported chains. -Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. +Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example diff --git a/docs/TransactionResponse.md b/docs/TransactionResponse.md index 8ebcdb47..ea591a36 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -53,6 +53,7 @@ Name | Type | Description | Notes **index** | **float** | For UTXO based assets this is the vOut, for Ethereum based, this is the index of the event of the contract call. **Note:** This field is not returned if a transaction uses the `destinations` object with more than one value. | [optional] **reward_info** | [**RewardInfo**](RewardInfo.md) | | [optional] **fee_payer_info** | [**FeePayerInfo**](FeePayerInfo.md) | | [optional] +**gasless_info** | [**GaslessInfo**](GaslessInfo.md) | | [optional] **system_messages** | [**List[SystemMessageInfo]**](SystemMessageInfo.md) | | [optional] **address_type** | **str** | | [optional] **requested_amount** | **float** | The amount requested by the user. Deprecated - please use the `amountInfo` field for accuracy. | [optional] diff --git a/docs/TravelRuleLegalNameIdentifier.md b/docs/TravelRuleLegalNameIdentifier.md new file mode 100644 index 00000000..d400d258 --- /dev/null +++ b/docs/TravelRuleLegalNameIdentifier.md @@ -0,0 +1,30 @@ +# TravelRuleLegalNameIdentifier + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**legal_person_name** | **str** | Name by which the legal person is known. The value must be encrypted. | +**legal_person_name_identifier_type** | **str** | Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode). Acceptable values are: - 'LEGL': Legal name - official name under which the organisation is registered. - 'SHRT': Short name of the organisation. - 'TRAD': Trading name - name used by the business for commercial purposes. The value must be encrypted. | + +## Example + +```python +from fireblocks.models.travel_rule_legal_name_identifier import TravelRuleLegalNameIdentifier + +# TODO update the JSON string below +json = "{}" +# create an instance of TravelRuleLegalNameIdentifier from a JSON string +travel_rule_legal_name_identifier_instance = TravelRuleLegalNameIdentifier.from_json(json) +# print the JSON string representation of the object +print(TravelRuleLegalNameIdentifier.to_json()) + +# convert the object into a dict +travel_rule_legal_name_identifier_dict = travel_rule_legal_name_identifier_instance.to_dict() +# create an instance of TravelRuleLegalNameIdentifier from a dict +travel_rule_legal_name_identifier_from_dict = TravelRuleLegalNameIdentifier.from_dict(travel_rule_legal_name_identifier_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TravelRuleLegalPersonNameIdentifier.md b/docs/TravelRuleLegalPersonNameIdentifier.md index cdeabd27..5294a7a6 100644 --- a/docs/TravelRuleLegalPersonNameIdentifier.md +++ b/docs/TravelRuleLegalPersonNameIdentifier.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**legal_person_name** | **str** | Name by which the legal person is known. The value must be encrypted. | [optional] -**legal_person_name_identifier_type** | **str** | Specifies the type of name for a legal person. Acceptable values are: - 'REGISTERED': The official registered name. - 'TRADE': A trading name or DBA (Doing Business As) name. - 'OTHER': Any other type of name. The value must be encrypted. | [optional] +**name_identifier** | [**List[TravelRuleLegalNameIdentifier]**](TravelRuleLegalNameIdentifier.md) | An array of name identifiers of the legal person. | [optional] +**local_name_identifier** | [**List[TravelRuleLegalNameIdentifier]**](TravelRuleLegalNameIdentifier.md) | An array of local name identifiers of the legal person. | [optional] +**phonetic_name_identifier** | [**List[TravelRuleLegalNameIdentifier]**](TravelRuleLegalNameIdentifier.md) | An array of phonetic name identifiers of the legal person. | [optional] ## Example diff --git a/docs/TravelRuleValidateLegalNameIdentifier.md b/docs/TravelRuleValidateLegalNameIdentifier.md new file mode 100644 index 00000000..82b58f87 --- /dev/null +++ b/docs/TravelRuleValidateLegalNameIdentifier.md @@ -0,0 +1,30 @@ +# TravelRuleValidateLegalNameIdentifier + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**legal_person_name** | **str** | Name by which the legal person is known. | +**legal_person_name_identifier_type** | **str** | Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode). Acceptable values are: - 'LEGL': Legal name - official name under which the organisation is registered. - 'SHRT': Short name of the organisation. - 'TRAD': Trading name - name used by the business for commercial purposes. | + +## Example + +```python +from fireblocks.models.travel_rule_validate_legal_name_identifier import TravelRuleValidateLegalNameIdentifier + +# TODO update the JSON string below +json = "{}" +# create an instance of TravelRuleValidateLegalNameIdentifier from a JSON string +travel_rule_validate_legal_name_identifier_instance = TravelRuleValidateLegalNameIdentifier.from_json(json) +# print the JSON string representation of the object +print(TravelRuleValidateLegalNameIdentifier.to_json()) + +# convert the object into a dict +travel_rule_validate_legal_name_identifier_dict = travel_rule_validate_legal_name_identifier_instance.to_dict() +# create an instance of TravelRuleValidateLegalNameIdentifier from a dict +travel_rule_validate_legal_name_identifier_from_dict = TravelRuleValidateLegalNameIdentifier.from_dict(travel_rule_validate_legal_name_identifier_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TravelRuleValidateLegalPerson.md b/docs/TravelRuleValidateLegalPerson.md index 134a9c0f..56c58954 100644 --- a/docs/TravelRuleValidateLegalPerson.md +++ b/docs/TravelRuleValidateLegalPerson.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | [**TravelRuleValidateLegalPersonNameIdentifier**](TravelRuleValidateLegalPersonNameIdentifier.md) | | [optional] +**name** | [**TravelRuleValidateLegalPersonNameIdentifier**](TravelRuleValidateLegalPersonNameIdentifier.md) | | **geographic_address** | [**List[TravelRuleValidateGeographicAddress]**](TravelRuleValidateGeographicAddress.md) | The array of geographic addresses associated with the legal person. | [optional] **national_identification** | [**TravelRuleValidateNationalIdentification**](TravelRuleValidateNationalIdentification.md) | | [optional] **customer_identification** | **str** | A unique identifier that identifies the customer in the organization's context. | [optional] diff --git a/docs/TravelRuleValidateLegalPersonNameIdentifier.md b/docs/TravelRuleValidateLegalPersonNameIdentifier.md index 20d54d0b..5e403dd7 100644 --- a/docs/TravelRuleValidateLegalPersonNameIdentifier.md +++ b/docs/TravelRuleValidateLegalPersonNameIdentifier.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**legal_person_name** | **str** | Name by which the legal person is known. | [optional] -**legal_person_name_identifier_type** | **str** | Specifies the type of name for a legal person. Acceptable values are: - 'REGISTERED': The official registered name. - 'TRADE': A trading name or DBA (Doing Business As) name. - 'OTHER': Any other type of name. | [optional] +**name_identifier** | [**List[TravelRuleValidateLegalNameIdentifier]**](TravelRuleValidateLegalNameIdentifier.md) | An array of name identifiers of the legal person. | +**local_name_identifier** | [**List[TravelRuleValidateLegalNameIdentifier]**](TravelRuleValidateLegalNameIdentifier.md) | An array of local name identifiers of the legal person. | [optional] +**phonetic_name_identifier** | [**List[TravelRuleValidateLegalNameIdentifier]**](TravelRuleValidateLegalNameIdentifier.md) | An array of phonetic name identifiers of the legal person. | [optional] ## Example diff --git a/fireblocks/__init__.py b/fireblocks/__init__.py index 43f77192..2bec9ef0 100644 --- a/fireblocks/__init__.py +++ b/fireblocks/__init__.py @@ -14,7 +14,7 @@ Do not edit the class manually. """ # noqa: E501 -__version__ = "26.0.0" +__version__ = "0.0.0" # import apis into sdk package from fireblocks.api.api_user_api import ApiUserApi @@ -53,6 +53,7 @@ from fireblocks.api.policy_editor_beta_api import PolicyEditorBetaApi from fireblocks.api.reports_beta_api import ReportsBetaApi from fireblocks.api.reset_device_api import ResetDeviceApi +from fireblocks.api.security_posture_management_api import SecurityPostureManagementApi from fireblocks.api.smart_transfer_api import SmartTransferApi from fireblocks.api.staking_api import StakingApi from fireblocks.api.tr_link_api import TRLinkApi @@ -783,6 +784,7 @@ from fireblocks.models.gas_station_properties_response import ( GasStationPropertiesResponse, ) +from fireblocks.models.gasless_info import GaslessInfo from fireblocks.models.gassless_standard_configurations import ( GasslessStandardConfigurations, ) @@ -812,6 +814,7 @@ GetExchangeAccountsCredentialsPublicKeyResponse, ) from fireblocks.models.get_filter_parameter import GetFilterParameter +from fireblocks.models.get_findings_external_response import GetFindingsExternalResponse from fireblocks.models.get_layer_zero_dvn_config_response import ( GetLayerZeroDvnConfigResponse, ) @@ -1307,6 +1310,7 @@ from fireblocks.models.screening_verdict_enum import ScreeningVerdictEnum from fireblocks.models.screening_verdict_matched_rule import ScreeningVerdictMatchedRule from fireblocks.models.search_network_ids_response import SearchNetworkIdsResponse +from fireblocks.models.security_finding import SecurityFinding from fireblocks.models.sepa_payment_info import SepaPaymentInfo from fireblocks.models.session_dto import SessionDTO from fireblocks.models.session_metadata import SessionMetadata @@ -1724,6 +1728,9 @@ ) from fireblocks.models.travel_rule_issuer import TravelRuleIssuer from fireblocks.models.travel_rule_issuers import TravelRuleIssuers +from fireblocks.models.travel_rule_legal_name_identifier import ( + TravelRuleLegalNameIdentifier, +) from fireblocks.models.travel_rule_legal_person import TravelRuleLegalPerson from fireblocks.models.travel_rule_legal_person_name_identifier import ( TravelRuleLegalPersonNameIdentifier, @@ -1774,6 +1781,9 @@ from fireblocks.models.travel_rule_validate_geographic_address import ( TravelRuleValidateGeographicAddress, ) +from fireblocks.models.travel_rule_validate_legal_name_identifier import ( + TravelRuleValidateLegalNameIdentifier, +) from fireblocks.models.travel_rule_validate_legal_person import ( TravelRuleValidateLegalPerson, ) diff --git a/fireblocks/api/__init__.py b/fireblocks/api/__init__.py index 9d748fda..9b756c60 100644 --- a/fireblocks/api/__init__.py +++ b/fireblocks/api/__init__.py @@ -35,6 +35,7 @@ from fireblocks.api.policy_editor_beta_api import PolicyEditorBetaApi from fireblocks.api.reports_beta_api import ReportsBetaApi from fireblocks.api.reset_device_api import ResetDeviceApi +from fireblocks.api.security_posture_management_api import SecurityPostureManagementApi from fireblocks.api.smart_transfer_api import SmartTransferApi from fireblocks.api.staking_api import StakingApi from fireblocks.api.tr_link_api import TRLinkApi diff --git a/fireblocks/api/security_posture_management_api.py b/fireblocks/api/security_posture_management_api.py new file mode 100644 index 00000000..1d81f43f --- /dev/null +++ b/fireblocks/api/security_posture_management_api.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from concurrent.futures import Future +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from fireblocks.models.get_findings_external_response import GetFindingsExternalResponse + +from fireblocks.api_client import ApiClient, RequestSerialized +from fireblocks.api_response import ApiResponse +from fireblocks.rest import RESTResponseType +from fireblocks.validation_utils import validate_not_empty_string + + +class SecurityPostureManagementApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_security_findings( + self, + page_cursor: Annotated[Optional[StrictStr], Field(description="Cursor indicating the page position. Omit to fetch the first page.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of results per page")] = None, + severity: Annotated[Optional[StrictStr], Field(description="Filter by severity level")] = None, + category: Annotated[Optional[StrictStr], Field(description="Filter by finding category")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by finding status")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[GetFindingsExternalResponse]]: + """Get FSPM security findings + + Returns a paginated list of FSPM security findings for the workspace. Endpoint Permissions: Security Admin, Security Auditor. + + :param page_cursor: Cursor indicating the page position. Omit to fetch the first page. + :type page_cursor: str + :param page_size: Number of results per page + :type page_size: int + :param severity: Filter by severity level + :type severity: str + :param category: Filter by finding category + :type category: str + :param status: Filter by finding status + :type status: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._get_security_findings_serialize( + page_cursor=page_cursor, + page_size=page_size, + severity=severity, + category=category, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetFindingsExternalResponse", + '400': "ErrorSchema", + '401': "ErrorSchema", + '403': "ErrorSchema", + '429': "ErrorSchema", + '5XX': "ErrorSchema", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_security_findings_serialize( + self, + page_cursor, + page_size, + severity, + category, + status, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page_cursor is not None: + + _query_params.append(('pageCursor', page_cursor)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if severity is not None: + + _query_params.append(('severity', severity)) + + if category is not None: + + _query_params.append(('category', category)) + + if status is not None: + + _query_params.append(('status', status)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/security/fspm/findings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/fireblocks/api/staking_api.py b/fireblocks/api/staking_api.py index c2102f22..edfba094 100644 --- a/fireblocks/api/staking_api.py +++ b/fireblocks/api/staking_api.py @@ -540,7 +540,7 @@ def get_all_delegations( ) -> Future[ApiResponse[List[Delegation]]]: """List staking positions - Returns all staking positions with core details: amounts, rewards, status, chain, and vault. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + Returns all staking positions with core details: amounts, rewards, status, chain, and vault. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. :param chain_descriptor: Protocol identifier to filter positions (e.g., ATOM_COS/AXL/CELESTIA). If omitted, positions across all supported chains are returned. :type chain_descriptor: ChainDescriptor @@ -1240,7 +1240,7 @@ def get_positions( ) -> Future[ApiResponse[StakingPositionsPaginatedResponse]]: """List staking positions (Paginated) - Returns staking positions with core details: amounts, rewards, status, chain, and vault. It supports cursor-based pagination for efficient data retrieval. This endpoint always returns a paginated response with {data, next} structure. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + Returns staking positions with core details: amounts, rewards, status, chain, and vault. It supports cursor-based pagination for efficient data retrieval. This endpoint always returns a paginated response with {data, next} structure. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. :param page_size: Number of results per page. When provided, the response returns a paginated object with {data, next}. If omitted, all results are returned as an array. (required) :type page_size: int @@ -1406,7 +1406,7 @@ def get_providers( ) -> Future[ApiResponse[List[Provider]]]: """List staking providers - Returns all available staking providers with metadata such as name, ID, and supported chains. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + Returns all available staking providers with metadata such as name, ID, and supported chains. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/fireblocks/client.py b/fireblocks/client.py index 43f094d2..3a45c7ae 100644 --- a/fireblocks/client.py +++ b/fireblocks/client.py @@ -50,6 +50,7 @@ from fireblocks.api.policy_editor_beta_api import PolicyEditorBetaApi from fireblocks.api.reports_beta_api import ReportsBetaApi from fireblocks.api.reset_device_api import ResetDeviceApi +from fireblocks.api.security_posture_management_api import SecurityPostureManagementApi from fireblocks.api.smart_transfer_api import SmartTransferApi from fireblocks.api.staking_api import StakingApi from fireblocks.api.tr_link_api import TRLinkApi @@ -113,6 +114,7 @@ def __init__(self, configuration: ClientConfiguration = None): self._policy_editor_beta = None self._reports_beta = None self._reset_device = None + self._security_posture_management = None self._smart_transfer = None self._staking = None self._tr_link = None @@ -347,6 +349,14 @@ def reset_device(self) -> ResetDeviceApi: self._reset_device = ResetDeviceApi(self._api_client) return self._reset_device + @property + def security_posture_management(self) -> SecurityPostureManagementApi: + if self._security_posture_management is None: + self._security_posture_management = SecurityPostureManagementApi( + self._api_client + ) + return self._security_posture_management + @property def smart_transfer(self) -> SmartTransferApi: if self._smart_transfer is None: diff --git a/fireblocks/configuration.py b/fireblocks/configuration.py index 70462e62..c1a025c0 100644 --- a/fireblocks/configuration.py +++ b/fireblocks/configuration.py @@ -550,7 +550,7 @@ def to_debug_report(self) -> str: "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.6.2\n" - "SDK Package Version: 26.0.0".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 0.0.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self) -> List[HostSetting]: diff --git a/fireblocks/models/__init__.py b/fireblocks/models/__init__.py index 98cb6597..89e8e734 100644 --- a/fireblocks/models/__init__.py +++ b/fireblocks/models/__init__.py @@ -466,6 +466,7 @@ from fireblocks.models.gas_station_configuration import GasStationConfiguration from fireblocks.models.gas_station_configuration_response import GasStationConfigurationResponse from fireblocks.models.gas_station_properties_response import GasStationPropertiesResponse +from fireblocks.models.gasless_info import GaslessInfo from fireblocks.models.gassless_standard_configurations import GasslessStandardConfigurations from fireblocks.models.gassless_standard_configurations_gasless_standard_configurations_value import GasslessStandardConfigurationsGaslessStandardConfigurationsValue from fireblocks.models.genie_chat_message import GenieChatMessage @@ -485,6 +486,7 @@ from fireblocks.models.get_deployable_address_request import GetDeployableAddressRequest from fireblocks.models.get_exchange_accounts_credentials_public_key_response import GetExchangeAccountsCredentialsPublicKeyResponse from fireblocks.models.get_filter_parameter import GetFilterParameter +from fireblocks.models.get_findings_external_response import GetFindingsExternalResponse from fireblocks.models.get_layer_zero_dvn_config_response import GetLayerZeroDvnConfigResponse from fireblocks.models.get_layer_zero_peers_response import GetLayerZeroPeersResponse from fireblocks.models.get_linked_collections_paginated_response import GetLinkedCollectionsPaginatedResponse @@ -826,6 +828,7 @@ from fireblocks.models.screening_verdict_enum import ScreeningVerdictEnum from fireblocks.models.screening_verdict_matched_rule import ScreeningVerdictMatchedRule from fireblocks.models.search_network_ids_response import SearchNetworkIdsResponse +from fireblocks.models.security_finding import SecurityFinding from fireblocks.models.sepa_payment_info import SepaPaymentInfo from fireblocks.models.session_dto import SessionDTO from fireblocks.models.session_metadata import SessionMetadata @@ -1087,6 +1090,7 @@ from fireblocks.models.travel_rule_get_all_vasps_response import TravelRuleGetAllVASPsResponse from fireblocks.models.travel_rule_issuer import TravelRuleIssuer from fireblocks.models.travel_rule_issuers import TravelRuleIssuers +from fireblocks.models.travel_rule_legal_name_identifier import TravelRuleLegalNameIdentifier from fireblocks.models.travel_rule_legal_person import TravelRuleLegalPerson from fireblocks.models.travel_rule_legal_person_name_identifier import TravelRuleLegalPersonNameIdentifier from fireblocks.models.travel_rule_matched_rule import TravelRuleMatchedRule @@ -1111,6 +1115,7 @@ from fireblocks.models.travel_rule_validate_date_and_place_of_birth import TravelRuleValidateDateAndPlaceOfBirth from fireblocks.models.travel_rule_validate_full_transaction_request import TravelRuleValidateFullTransactionRequest from fireblocks.models.travel_rule_validate_geographic_address import TravelRuleValidateGeographicAddress +from fireblocks.models.travel_rule_validate_legal_name_identifier import TravelRuleValidateLegalNameIdentifier from fireblocks.models.travel_rule_validate_legal_person import TravelRuleValidateLegalPerson from fireblocks.models.travel_rule_validate_legal_person_name_identifier import TravelRuleValidateLegalPersonNameIdentifier from fireblocks.models.travel_rule_validate_national_identification import TravelRuleValidateNationalIdentification diff --git a/fireblocks/models/ethereum_blockchain_data.py b/fireblocks/models/ethereum_blockchain_data.py index 0b7c858c..15790cbd 100644 --- a/fireblocks/models/ethereum_blockchain_data.py +++ b/fireblocks/models/ethereum_blockchain_data.py @@ -18,6 +18,7 @@ import re # noqa: F401 import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set @@ -29,7 +30,10 @@ class EthereumBlockchainData(BaseModel): """ # noqa: E501 is_compounding_validator: StrictBool = Field(description="Is the validator compounding (i.e it was created with compounding validator type).", alias="isCompoundingValidator") estimated_activation_time: Optional[StrictStr] = Field(default=None, description="Estimated time the staked ETH will activate, derived from the beacon-chain deposit queue. Present only while the position is pending/activating; omitted once active.", alias="estimatedActivationTime") - __properties: ClassVar[List[str]] = ["isCompoundingValidator", "estimatedActivationTime"] + estimated_source_exit_time: Optional[datetime] = Field(default=None, description="Estimated time the source validator will exit the active set and stop earning rewards, derived from the beacon-chain consolidation queue. Present only while a consolidation is in progress.", alias="estimatedSourceExitTime") + estimated_consolidation_time: Optional[datetime] = Field(default=None, description="Estimated time the consolidation will complete, i.e. when the source balance is swept to the destination validator, derived from the beacon-chain consolidation queue. Present only while a consolidation is in progress.", alias="estimatedConsolidationTime") + estimated_withdrawal_time: Optional[datetime] = Field(default=None, description="Estimated time the in-flight withdrawal will complete, derived from the beacon-chain exit queue for a full exit or the manual withdrawal queue for a partial one. Present only while a withdrawal is in progress.", alias="estimatedWithdrawalTime") + __properties: ClassVar[List[str]] = ["isCompoundingValidator", "estimatedActivationTime", "estimatedSourceExitTime", "estimatedConsolidationTime", "estimatedWithdrawalTime"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +87,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "isCompoundingValidator": obj.get("isCompoundingValidator"), - "estimatedActivationTime": obj.get("estimatedActivationTime") + "estimatedActivationTime": obj.get("estimatedActivationTime"), + "estimatedSourceExitTime": obj.get("estimatedSourceExitTime"), + "estimatedConsolidationTime": obj.get("estimatedConsolidationTime"), + "estimatedWithdrawalTime": obj.get("estimatedWithdrawalTime") }) return _obj diff --git a/fireblocks/models/gasless_info.py b/fireblocks/models/gasless_info.py new file mode 100644 index 00000000..ddee3032 --- /dev/null +++ b/fireblocks/models/gasless_info.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GaslessInfo(BaseModel): + """ + Relay (meta-transaction) details. Returned only for meta-transactions (`isMetaTx` is `true`). For meta-transactions the deprecated top-level `fee` field is omitted; use `feeInfo` instead. + """ # noqa: E501 + is_meta_tx: Optional[StrictBool] = Field(default=None, description="Indicates the transaction is a meta-transaction (gas paid by a relay tenant).", alias="isMetaTx") + relay_tenant_id: Optional[StrictStr] = Field(default=None, description="The tenant ID of the relay that sponsors the gas for the meta-transaction.", alias="relayTenantId") + relay_tenant_name: Optional[StrictStr] = Field(default=None, description="The tenant name of the relay that sponsors the gas for the meta-transaction.", alias="relayTenantName") + relay_vault_account_id: Optional[StrictStr] = Field(default=None, description="The vault account ID of the relay that sponsors the gas for the meta-transaction.", alias="relayVaultAccountId") + __properties: ClassVar[List[str]] = ["isMetaTx", "relayTenantId", "relayTenantName", "relayVaultAccountId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GaslessInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GaslessInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "isMetaTx": obj.get("isMetaTx"), + "relayTenantId": obj.get("relayTenantId"), + "relayTenantName": obj.get("relayTenantName"), + "relayVaultAccountId": obj.get("relayVaultAccountId") + }) + return _obj + + diff --git a/fireblocks/models/get_findings_external_response.py b/fireblocks/models/get_findings_external_response.py new file mode 100644 index 00000000..0d87d1a4 --- /dev/null +++ b/fireblocks/models/get_findings_external_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.security_finding import SecurityFinding +from typing import Optional, Set +from typing_extensions import Self + +class GetFindingsExternalResponse(BaseModel): + """ + A paginated list of FSPM findings + """ # noqa: E501 + data: List[SecurityFinding] = Field(description="List of FSPM findings for the current page.") + total: StrictInt = Field(description="Total number of findings matching the query.") + next: Optional[StrictStr] = Field(default=None, description="Cursor for the next page of results, omitted when there are no more results.") + __properties: ClassVar[List[str]] = ["data", "total", "next"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetFindingsExternalResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetFindingsExternalResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [SecurityFinding.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "total": obj.get("total"), + "next": obj.get("next") + }) + return _obj + + diff --git a/fireblocks/models/reason_for_payment_enum.py b/fireblocks/models/reason_for_payment_enum.py index f846591e..e8c2584b 100644 --- a/fireblocks/models/reason_for_payment_enum.py +++ b/fireblocks/models/reason_for_payment_enum.py @@ -57,6 +57,9 @@ class ReasonForPaymentEnum(str, Enum): ADVANCE_GOODS_PAYMENT = 'ADVANCE_GOODS_PAYMENT' MERCHANT_SETTLEMENT = 'MERCHANT_SETTLEMENT' REPATRIATION_FUND_SETTLEMENT = 'REPATRIATION_FUND_SETTLEMENT' + CORPORATE_INVESTMENT = 'CORPORATE_INVESTMENT' + INTER_COMPANY_TRANSFER = 'INTER_COMPANY_TRANSFER' + OFFICE_OPERATING_EXPENSES = 'OFFICE_OPERATING_EXPENSES' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/fireblocks/models/security_finding.py b/fireblocks/models/security_finding.py new file mode 100644 index 00000000..ab08fab7 --- /dev/null +++ b/fireblocks/models/security_finding.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SecurityFinding(BaseModel): + """ + A single FSPM finding + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the finding") + type: Optional[StrictStr] = Field(default=None, description="The finding type identifier") + status: Optional[StrictStr] = Field(default=None, description="Current status of the finding") + severity: Optional[StrictStr] = Field(default=None, description="Severity level of the finding") + category: Optional[StrictStr] = Field(default=None, description="Category of the finding") + created_at: Optional[datetime] = Field(default=None, description="When the finding was first detected", alias="createdAt") + title: Optional[StrictStr] = Field(default=None, description="Human-readable title of the finding") + __properties: ClassVar[List[str]] = ["id", "type", "status", "severity", "category", "createdAt", "title"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['API_USER_NOT_WHITELISTED', 'CONSOLE_IP_ALLOWLIST_DEACTIVATED', 'ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS', 'API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY', 'API_COSIGNER_WITH_NO_CALLBACK', 'API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS', 'NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS', 'TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS', 'ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS', 'NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED', 'OTA_ENABLED_BUT_UNUSED', 'POLICY_NOT_UPDATED_RECENTLY', 'RAW_SIGNING_ENABLED_BUT_UNUSED', 'API_USER_UNUSED_FOR_90_DAYS', 'UNUSED_UNLIMITED_TOKEN_ALLOWANCES', 'UNUSED_WHITELISTED_ADDRESS', 'TRANSACTION_REPETITION_ATTACK', 'USER_EMAIL_DOMAIN_NON_BUSINESS', 'OUTDATED_MOBILE_APP_VERSION', 'SINGLE_HOP_DRAIN_ATTACK', 'LATERAL_MOVEMENT_DRAIN_ATTACK', 'WORKSPACE_USER_DORMANT_FOR_X_DAYS']): + raise ValueError("must be one of enum values ('API_USER_NOT_WHITELISTED', 'CONSOLE_IP_ALLOWLIST_DEACTIVATED', 'ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS', 'API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY', 'API_COSIGNER_WITH_NO_CALLBACK', 'API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS', 'NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS', 'TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS', 'ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS', 'NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED', 'OTA_ENABLED_BUT_UNUSED', 'POLICY_NOT_UPDATED_RECENTLY', 'RAW_SIGNING_ENABLED_BUT_UNUSED', 'API_USER_UNUSED_FOR_90_DAYS', 'UNUSED_UNLIMITED_TOKEN_ALLOWANCES', 'UNUSED_WHITELISTED_ADDRESS', 'TRANSACTION_REPETITION_ATTACK', 'USER_EMAIL_DOMAIN_NON_BUSINESS', 'OUTDATED_MOBILE_APP_VERSION', 'SINGLE_HOP_DRAIN_ATTACK', 'LATERAL_MOVEMENT_DRAIN_ATTACK', 'WORKSPACE_USER_DORMANT_FOR_X_DAYS')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['OPEN', 'ACCEPTED', 'RESOLVED']): + raise ValueError("must be one of enum values ('OPEN', 'ACCEPTED', 'RESOLVED')") + return value + + @field_validator('severity') + def severity_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INFO', 'LOW', 'MEDIUM', 'HIGH']): + raise ValueError("must be one of enum values ('INFO', 'LOW', 'MEDIUM', 'HIGH')") + return value + + @field_validator('category') + def category_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['USER_MANAGEMENT', 'ACCESS_CONTROL', 'ADMIN_MANAGEMENT', 'SECURITY', 'CONFIGURATION', 'APPROVAL_GROUP_MANAGEMENT', 'POLICY_ENGINE_UTILIZATION', 'WORKSPACE_CONFIGURATION', 'DEFI_ACCESS', 'FLEET_MANAGEMENT']): + raise ValueError("must be one of enum values ('USER_MANAGEMENT', 'ACCESS_CONTROL', 'ADMIN_MANAGEMENT', 'SECURITY', 'CONFIGURATION', 'APPROVAL_GROUP_MANAGEMENT', 'POLICY_ENGINE_UTILIZATION', 'WORKSPACE_CONFIGURATION', 'DEFI_ACCESS', 'FLEET_MANAGEMENT')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SecurityFinding from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SecurityFinding from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "status": obj.get("status"), + "severity": obj.get("severity"), + "category": obj.get("category"), + "createdAt": obj.get("createdAt"), + "title": obj.get("title") + }) + return _obj + + diff --git a/fireblocks/models/transaction_response.py b/fireblocks/models/transaction_response.py index 6dfeddb6..8856bcff 100644 --- a/fireblocks/models/transaction_response.py +++ b/fireblocks/models/transaction_response.py @@ -29,6 +29,7 @@ from fireblocks.models.extra_parameters import ExtraParameters from fireblocks.models.fee_info import FeeInfo from fireblocks.models.fee_payer_info import FeePayerInfo +from fireblocks.models.gasless_info import GaslessInfo from fireblocks.models.get_transaction_operation import GetTransactionOperation from fireblocks.models.network_record import NetworkRecord from fireblocks.models.program_call_decoded_data_item import ProgramCallDecodedDataItem @@ -93,6 +94,7 @@ class TransactionResponse(BaseModel): index: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="For UTXO based assets this is the vOut, for Ethereum based, this is the index of the event of the contract call. **Note:** This field is not returned if a transaction uses the `destinations` object with more than one value.") reward_info: Optional[RewardInfo] = Field(default=None, alias="rewardInfo") fee_payer_info: Optional[FeePayerInfo] = Field(default=None, alias="feePayerInfo") + gasless_info: Optional[GaslessInfo] = Field(default=None, alias="gaslessInfo") system_messages: Optional[List[SystemMessageInfo]] = Field(default=None, alias="systemMessages") address_type: Optional[StrictStr] = Field(default=None, alias="addressType") requested_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The amount requested by the user. Deprecated - please use the `amountInfo` field for accuracy.", alias="requestedAmount") @@ -106,7 +108,7 @@ class TransactionResponse(BaseModel): replaced_tx_hash: Optional[StrictStr] = Field(default=None, description="if the transaction is a replace by fee (RBF) transaction, this is the hash of the transsaction that was replaced", alias="replacedTxHash") nonce: Optional[StrictStr] = Field(default=None, description="blockchain nonce for the transaction") blockchain_info: Optional[Dict[str, Any]] = Field(default=None, description="A JSON used to store additional data that is blockchain-specific.", alias="blockchainInfo") - __properties: ClassVar[List[str]] = ["id", "externalTxId", "status", "subStatus", "txHash", "operation", "note", "assetId", "assetType", "source", "sourceAddress", "tag", "destination", "destinations", "destinationAddress", "destinationAddressDescription", "destinationTag", "contractCallDecodedData", "programCallDecodedData", "amountInfo", "treatAsGrossAmount", "feeInfo", "feeCurrency", "networkRecords", "createdAt", "lastUpdated", "expiresAt", "createdBy", "signedBy", "rejectedBy", "authorizationInfo", "exchangeTxId", "customerRefId", "travelRuleMessageId", "amlScreeningResult", "complianceResults", "notBroadcastByFireblocks", "dappUrl", "gasLimit", "blockchainIndex", "paidRent", "extraParameters", "signedMessages", "numOfConfirmations", "blockInfo", "index", "rewardInfo", "feePayerInfo", "systemMessages", "addressType", "requestedAmount", "amount", "netAmount", "amountUSD", "serviceFee", "fee", "networkFee", "errorDescription", "replacedTxHash", "nonce", "blockchainInfo"] + __properties: ClassVar[List[str]] = ["id", "externalTxId", "status", "subStatus", "txHash", "operation", "note", "assetId", "assetType", "source", "sourceAddress", "tag", "destination", "destinations", "destinationAddress", "destinationAddressDescription", "destinationTag", "contractCallDecodedData", "programCallDecodedData", "amountInfo", "treatAsGrossAmount", "feeInfo", "feeCurrency", "networkRecords", "createdAt", "lastUpdated", "expiresAt", "createdBy", "signedBy", "rejectedBy", "authorizationInfo", "exchangeTxId", "customerRefId", "travelRuleMessageId", "amlScreeningResult", "complianceResults", "notBroadcastByFireblocks", "dappUrl", "gasLimit", "blockchainIndex", "paidRent", "extraParameters", "signedMessages", "numOfConfirmations", "blockInfo", "index", "rewardInfo", "feePayerInfo", "gaslessInfo", "systemMessages", "addressType", "requestedAmount", "amount", "netAmount", "amountUSD", "serviceFee", "fee", "networkFee", "errorDescription", "replacedTxHash", "nonce", "blockchainInfo"] @field_validator('address_type') def address_type_validate_enum(cls, value): @@ -221,6 +223,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of fee_payer_info if self.fee_payer_info: _dict['feePayerInfo'] = self.fee_payer_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of gasless_info + if self.gasless_info: + _dict['gaslessInfo'] = self.gasless_info.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in system_messages (list) _items = [] if self.system_messages: @@ -293,6 +298,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "index": obj.get("index"), "rewardInfo": RewardInfo.from_dict(obj["rewardInfo"]) if obj.get("rewardInfo") is not None else None, "feePayerInfo": FeePayerInfo.from_dict(obj["feePayerInfo"]) if obj.get("feePayerInfo") is not None else None, + "gaslessInfo": GaslessInfo.from_dict(obj["gaslessInfo"]) if obj.get("gaslessInfo") is not None else None, "systemMessages": [SystemMessageInfo.from_dict(_item) for _item in obj["systemMessages"]] if obj.get("systemMessages") is not None else None, "addressType": obj.get("addressType"), "requestedAmount": obj.get("requestedAmount"), diff --git a/fireblocks/models/travel_rule_legal_name_identifier.py b/fireblocks/models/travel_rule_legal_name_identifier.py new file mode 100644 index 00000000..d02746f8 --- /dev/null +++ b/fireblocks/models/travel_rule_legal_name_identifier.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TravelRuleLegalNameIdentifier(BaseModel): + """ + TravelRuleLegalNameIdentifier + """ # noqa: E501 + legal_person_name: StrictStr = Field(description="Name by which the legal person is known. The value must be encrypted.", alias="legalPersonName") + legal_person_name_identifier_type: StrictStr = Field(description="Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode). Acceptable values are: - 'LEGL': Legal name - official name under which the organisation is registered. - 'SHRT': Short name of the organisation. - 'TRAD': Trading name - name used by the business for commercial purposes. The value must be encrypted.", alias="legalPersonNameIdentifierType") + __properties: ClassVar[List[str]] = ["legalPersonName", "legalPersonNameIdentifierType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TravelRuleLegalNameIdentifier from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TravelRuleLegalNameIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "legalPersonName": obj.get("legalPersonName"), + "legalPersonNameIdentifierType": obj.get("legalPersonNameIdentifierType") + }) + return _obj + + diff --git a/fireblocks/models/travel_rule_legal_person_name_identifier.py b/fireblocks/models/travel_rule_legal_person_name_identifier.py index d1bfb12d..abc26815 100644 --- a/fireblocks/models/travel_rule_legal_person_name_identifier.py +++ b/fireblocks/models/travel_rule_legal_person_name_identifier.py @@ -18,8 +18,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.travel_rule_legal_name_identifier import TravelRuleLegalNameIdentifier from typing import Optional, Set from typing_extensions import Self @@ -27,9 +28,10 @@ class TravelRuleLegalPersonNameIdentifier(BaseModel): """ TravelRuleLegalPersonNameIdentifier """ # noqa: E501 - legal_person_name: Optional[StrictStr] = Field(default=None, description="Name by which the legal person is known. The value must be encrypted.", alias="legalPersonName") - legal_person_name_identifier_type: Optional[StrictStr] = Field(default=None, description="Specifies the type of name for a legal person. Acceptable values are: - 'REGISTERED': The official registered name. - 'TRADE': A trading name or DBA (Doing Business As) name. - 'OTHER': Any other type of name. The value must be encrypted.", alias="legalPersonNameIdentifierType") - __properties: ClassVar[List[str]] = ["legalPersonName", "legalPersonNameIdentifierType"] + name_identifier: Optional[List[TravelRuleLegalNameIdentifier]] = Field(default=None, description="An array of name identifiers of the legal person.", alias="nameIdentifier") + local_name_identifier: Optional[List[TravelRuleLegalNameIdentifier]] = Field(default=None, description="An array of local name identifiers of the legal person.", alias="localNameIdentifier") + phonetic_name_identifier: Optional[List[TravelRuleLegalNameIdentifier]] = Field(default=None, description="An array of phonetic name identifiers of the legal person.", alias="phoneticNameIdentifier") + __properties: ClassVar[List[str]] = ["nameIdentifier", "localNameIdentifier", "phoneticNameIdentifier"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +72,27 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in name_identifier (list) + _items = [] + if self.name_identifier: + for _item_name_identifier in self.name_identifier: + if _item_name_identifier: + _items.append(_item_name_identifier.to_dict()) + _dict['nameIdentifier'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in local_name_identifier (list) + _items = [] + if self.local_name_identifier: + for _item_local_name_identifier in self.local_name_identifier: + if _item_local_name_identifier: + _items.append(_item_local_name_identifier.to_dict()) + _dict['localNameIdentifier'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in phonetic_name_identifier (list) + _items = [] + if self.phonetic_name_identifier: + for _item_phonetic_name_identifier in self.phonetic_name_identifier: + if _item_phonetic_name_identifier: + _items.append(_item_phonetic_name_identifier.to_dict()) + _dict['phoneticNameIdentifier'] = _items return _dict @classmethod @@ -82,8 +105,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "legalPersonName": obj.get("legalPersonName"), - "legalPersonNameIdentifierType": obj.get("legalPersonNameIdentifierType") + "nameIdentifier": [TravelRuleLegalNameIdentifier.from_dict(_item) for _item in obj["nameIdentifier"]] if obj.get("nameIdentifier") is not None else None, + "localNameIdentifier": [TravelRuleLegalNameIdentifier.from_dict(_item) for _item in obj["localNameIdentifier"]] if obj.get("localNameIdentifier") is not None else None, + "phoneticNameIdentifier": [TravelRuleLegalNameIdentifier.from_dict(_item) for _item in obj["phoneticNameIdentifier"]] if obj.get("phoneticNameIdentifier") is not None else None }) return _obj diff --git a/fireblocks/models/travel_rule_validate_legal_name_identifier.py b/fireblocks/models/travel_rule_validate_legal_name_identifier.py new file mode 100644 index 00000000..45c8791e --- /dev/null +++ b/fireblocks/models/travel_rule_validate_legal_name_identifier.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Fireblocks API + + Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + + The version of the OpenAPI document: 1.6.2 + Contact: developers@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TravelRuleValidateLegalNameIdentifier(BaseModel): + """ + TravelRuleValidateLegalNameIdentifier + """ # noqa: E501 + legal_person_name: Annotated[str, Field(strict=True, max_length=100)] = Field(description="Name by which the legal person is known.", alias="legalPersonName") + legal_person_name_identifier_type: StrictStr = Field(description="Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode). Acceptable values are: - 'LEGL': Legal name - official name under which the organisation is registered. - 'SHRT': Short name of the organisation. - 'TRAD': Trading name - name used by the business for commercial purposes.", alias="legalPersonNameIdentifierType") + __properties: ClassVar[List[str]] = ["legalPersonName", "legalPersonNameIdentifierType"] + + @field_validator('legal_person_name_identifier_type') + def legal_person_name_identifier_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['LEGL', 'SHRT', 'TRAD']): + raise ValueError("must be one of enum values ('LEGL', 'SHRT', 'TRAD')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TravelRuleValidateLegalNameIdentifier from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TravelRuleValidateLegalNameIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "legalPersonName": obj.get("legalPersonName"), + "legalPersonNameIdentifierType": obj.get("legalPersonNameIdentifierType") + }) + return _obj + + diff --git a/fireblocks/models/travel_rule_validate_legal_person.py b/fireblocks/models/travel_rule_validate_legal_person.py index a2816461..8bdd54fa 100644 --- a/fireblocks/models/travel_rule_validate_legal_person.py +++ b/fireblocks/models/travel_rule_validate_legal_person.py @@ -30,7 +30,7 @@ class TravelRuleValidateLegalPerson(BaseModel): """ TravelRuleValidateLegalPerson """ # noqa: E501 - name: Optional[TravelRuleValidateLegalPersonNameIdentifier] = None + name: TravelRuleValidateLegalPersonNameIdentifier geographic_address: Optional[List[TravelRuleValidateGeographicAddress]] = Field(default=None, description="The array of geographic addresses associated with the legal person.", alias="geographicAddress") national_identification: Optional[TravelRuleValidateNationalIdentification] = Field(default=None, alias="nationalIdentification") customer_identification: Optional[StrictStr] = Field(default=None, description="A unique identifier that identifies the customer in the organization's context.", alias="customerIdentification") diff --git a/fireblocks/models/travel_rule_validate_legal_person_name_identifier.py b/fireblocks/models/travel_rule_validate_legal_person_name_identifier.py index f282547e..c1c8d961 100644 --- a/fireblocks/models/travel_rule_validate_legal_person_name_identifier.py +++ b/fireblocks/models/travel_rule_validate_legal_person_name_identifier.py @@ -18,9 +18,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated +from fireblocks.models.travel_rule_validate_legal_name_identifier import TravelRuleValidateLegalNameIdentifier from typing import Optional, Set from typing_extensions import Self @@ -28,19 +29,10 @@ class TravelRuleValidateLegalPersonNameIdentifier(BaseModel): """ TravelRuleValidateLegalPersonNameIdentifier """ # noqa: E501 - legal_person_name: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field(default=None, description="Name by which the legal person is known.", alias="legalPersonName") - legal_person_name_identifier_type: Optional[StrictStr] = Field(default=None, description="Specifies the type of name for a legal person. Acceptable values are: - 'REGISTERED': The official registered name. - 'TRADE': A trading name or DBA (Doing Business As) name. - 'OTHER': Any other type of name.", alias="legalPersonNameIdentifierType") - __properties: ClassVar[List[str]] = ["legalPersonName", "legalPersonNameIdentifierType"] - - @field_validator('legal_person_name_identifier_type') - def legal_person_name_identifier_type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['REGISTERED', 'TRADE', 'OTHER']): - raise ValueError("must be one of enum values ('REGISTERED', 'TRADE', 'OTHER')") - return value + name_identifier: Annotated[List[TravelRuleValidateLegalNameIdentifier], Field(min_length=1)] = Field(description="An array of name identifiers of the legal person.", alias="nameIdentifier") + local_name_identifier: Optional[List[TravelRuleValidateLegalNameIdentifier]] = Field(default=None, description="An array of local name identifiers of the legal person.", alias="localNameIdentifier") + phonetic_name_identifier: Optional[List[TravelRuleValidateLegalNameIdentifier]] = Field(default=None, description="An array of phonetic name identifiers of the legal person.", alias="phoneticNameIdentifier") + __properties: ClassVar[List[str]] = ["nameIdentifier", "localNameIdentifier", "phoneticNameIdentifier"] model_config = ConfigDict( populate_by_name=True, @@ -81,6 +73,27 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in name_identifier (list) + _items = [] + if self.name_identifier: + for _item_name_identifier in self.name_identifier: + if _item_name_identifier: + _items.append(_item_name_identifier.to_dict()) + _dict['nameIdentifier'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in local_name_identifier (list) + _items = [] + if self.local_name_identifier: + for _item_local_name_identifier in self.local_name_identifier: + if _item_local_name_identifier: + _items.append(_item_local_name_identifier.to_dict()) + _dict['localNameIdentifier'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in phonetic_name_identifier (list) + _items = [] + if self.phonetic_name_identifier: + for _item_phonetic_name_identifier in self.phonetic_name_identifier: + if _item_phonetic_name_identifier: + _items.append(_item_phonetic_name_identifier.to_dict()) + _dict['phoneticNameIdentifier'] = _items return _dict @classmethod @@ -93,8 +106,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "legalPersonName": obj.get("legalPersonName"), - "legalPersonNameIdentifierType": obj.get("legalPersonNameIdentifierType") + "nameIdentifier": [TravelRuleValidateLegalNameIdentifier.from_dict(_item) for _item in obj["nameIdentifier"]] if obj.get("nameIdentifier") is not None else None, + "localNameIdentifier": [TravelRuleValidateLegalNameIdentifier.from_dict(_item) for _item in obj["localNameIdentifier"]] if obj.get("localNameIdentifier") is not None else None, + "phoneticNameIdentifier": [TravelRuleValidateLegalNameIdentifier.from_dict(_item) for _item in obj["phoneticNameIdentifier"]] if obj.get("phoneticNameIdentifier") is not None else None }) return _obj diff --git a/pyproject.toml b/pyproject.toml index 9d979923..08a27f53 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireblocks" -version = "26.0.0" +version = "0.0.0" description = "Fireblocks API" authors = ["Fireblocks "] license = "MIT License" diff --git a/setup.py b/setup.py index 33060a00..8e55f57b 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "fireblocks" -VERSION = "26.0.0" +VERSION = "0.0.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 2.1.0, < 3.0.0", diff --git a/test/fireblocks/test_client.py b/test/fireblocks/test_client.py index beb4a010..188f78a5 100644 --- a/test/fireblocks/test_client.py +++ b/test/fireblocks/test_client.py @@ -50,6 +50,7 @@ from fireblocks.api.policy_editor_beta_api import PolicyEditorBetaApi from fireblocks.api.reports_beta_api import ReportsBetaApi from fireblocks.api.reset_device_api import ResetDeviceApi +from fireblocks.api.security_posture_management_api import SecurityPostureManagementApi from fireblocks.api.smart_transfer_api import SmartTransferApi from fireblocks.api.staking_api import StakingApi from fireblocks.api.tr_link_api import TRLinkApi @@ -184,6 +185,9 @@ def test_get_reports_beta(fireblocks_instance): def test_get_reset_device(fireblocks_instance): assert isinstance(fireblocks_instance.reset_device, ResetDeviceApi) +def test_get_security_posture_management(fireblocks_instance): + assert isinstance(fireblocks_instance.security_posture_management, SecurityPostureManagementApi) + def test_get_smart_transfer(fireblocks_instance): assert isinstance(fireblocks_instance.smart_transfer, SmartTransferApi) diff --git a/test/test_add_connected_account_request.py b/test/test_add_connected_account_request.py index c8b39f05..ed19c232 100644 --- a/test/test_add_connected_account_request.py +++ b/test/test_add_connected_account_request.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> AddConnectedAccountRequest: return AddConnectedAccountRequest( provider_id = 'BINANCE', display_name = 'My Binance Account', - creds = '[B@d6e195f', + creds = '[B@7f57df26', api_key = 'api_key_abc123', main_account_id = 'acc-parent-001', account_id = 'provider-acc-001', @@ -47,7 +47,7 @@ def make_instance(self, include_optional) -> AddConnectedAccountRequest: else: return AddConnectedAccountRequest( provider_id = 'BINANCE', - creds = '[B@d6e195f', + creds = '[B@7f57df26', api_key = 'api_key_abc123', ) """ diff --git a/test/test_delegation_blockchain_position_info.py b/test/test_delegation_blockchain_position_info.py index 57986f62..68ba3a48 100644 --- a/test/test_delegation_blockchain_position_info.py +++ b/test/test_delegation_blockchain_position_info.py @@ -43,6 +43,9 @@ def make_instance(self, include_optional) -> DelegationBlockchainPositionInfo: rewards_breakdown = {"inflation":"0.000856038","mev":"0.000123456","lastRewardSyncedAt":"2023-07-13T15:55:34.256Z"}, is_compounding_validator = True, estimated_activation_time = '2024-01-15T14:30:00.000Z', + estimated_source_exit_time = '2024-01-15T14:30Z', + estimated_consolidation_time = '2024-01-15T17:45Z', + estimated_withdrawal_time = '2024-01-15T14:30Z', total_withdrawable_amount = '1.5', total_inactive_amount = '2.0' ) diff --git a/test/test_ethereum_blockchain_data.py b/test/test_ethereum_blockchain_data.py index e51ae09b..ce56240e 100644 --- a/test/test_ethereum_blockchain_data.py +++ b/test/test_ethereum_blockchain_data.py @@ -37,7 +37,10 @@ def make_instance(self, include_optional) -> EthereumBlockchainData: if include_optional: return EthereumBlockchainData( is_compounding_validator = True, - estimated_activation_time = '2024-01-15T14:30:00.000Z' + estimated_activation_time = '2024-01-15T14:30:00.000Z', + estimated_source_exit_time = '2024-01-15T14:30Z', + estimated_consolidation_time = '2024-01-15T17:45Z', + estimated_withdrawal_time = '2024-01-15T14:30Z' ) else: return EthereumBlockchainData( diff --git a/test/test_gasless_info.py b/test/test_gasless_info.py new file mode 100644 index 00000000..81821256 --- /dev/null +++ b/test/test_gasless_info.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.gasless_info import GaslessInfo + + +class TestGaslessInfo(unittest.TestCase): + """GaslessInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GaslessInfo: + """Test GaslessInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `GaslessInfo` + """ + model = GaslessInfo() + if include_optional: + return GaslessInfo( + is_meta_tx = True, + relay_tenant_id = '97cc731c-f920-5e82-bb56-ba76f292c874', + relay_tenant_name = 'Or Manzur - Crypto Journey', + relay_vault_account_id = '19' + ) + else: + return GaslessInfo( + ) + """ + + def testGaslessInfo(self): + """Test GaslessInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_get_findings_external_response.py b/test/test_get_findings_external_response.py new file mode 100644 index 00000000..3a65cff4 --- /dev/null +++ b/test/test_get_findings_external_response.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.get_findings_external_response import GetFindingsExternalResponse + + +class TestGetFindingsExternalResponse(unittest.TestCase): + """GetFindingsExternalResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetFindingsExternalResponse: + """Test GetFindingsExternalResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `GetFindingsExternalResponse` + """ + model = GetFindingsExternalResponse() + if include_optional: + return GetFindingsExternalResponse( + data = [], + total = 42, + next = 'eyJzZXZlcml0eVJhbmsiOjMsImNyZWF0ZWRBdCI6IjIwMjYtMDctMTRUMTA6MDU6NTYuMDAwWiIsImlkIjoiYjJmZTkwYjItMWZlMy00ZTczLTg1YTItNjZlMTlmN2RhYzY2In0=' + ) + else: + return GetFindingsExternalResponse( + data = [], + total = 42, + ) + """ + + def testGetFindingsExternalResponse(self): + """Test GetFindingsExternalResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_security_finding.py b/test/test_security_finding.py new file mode 100644 index 00000000..2e0af1c2 --- /dev/null +++ b/test/test_security_finding.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.security_finding import SecurityFinding + + +class TestSecurityFinding(unittest.TestCase): + """SecurityFinding unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SecurityFinding: + """Test SecurityFinding + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `SecurityFinding` + """ + model = SecurityFinding() + if include_optional: + return SecurityFinding( + id = 'd7ca6101-a65e-4a9c-b6c1-b8bd697e0cd2', + type = 'API_COSIGNER_WITH_NO_CALLBACK', + status = 'OPEN', + severity = 'HIGH', + category = 'USER_MANAGEMENT', + created_at = '2026-07-28T11:37:05Z', + title = 'API co-signer configured without a callback URL' + ) + else: + return SecurityFinding( + ) + """ + + def testSecurityFinding(self): + """Test SecurityFinding""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_security_posture_management_api.py b/test/test_security_posture_management_api.py new file mode 100644 index 00000000..d96a13f4 --- /dev/null +++ b/test/test_security_posture_management_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.api.security_posture_management_api import SecurityPostureManagementApi + + +class TestSecurityPostureManagementApi(unittest.TestCase): + """SecurityPostureManagementApi unit test stubs""" + + def setUp(self) -> None: + self.api = SecurityPostureManagementApi() + + def tearDown(self) -> None: + pass + + def test_get_security_findings(self) -> None: + """Test case for get_security_findings + + Get FSPM security findings + """ + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_transaction_response.py b/test/test_transaction_response.py index d7706073..f0c0d1a8 100644 --- a/test/test_transaction_response.py +++ b/test/test_transaction_response.py @@ -387,6 +387,11 @@ def make_instance(self, include_optional) -> TransactionResponse: dest_rewards = '', ), fee_payer_info = fireblocks.models.fee_payer_info.FeePayerInfo( fee_payer_account_id = '123', ), + gasless_info = fireblocks.models.gasless_info.GaslessInfo( + is_meta_tx = True, + relay_tenant_id = '97cc731c-f920-5e82-bb56-ba76f292c874', + relay_tenant_name = 'Or Manzur - Crypto Journey', + relay_vault_account_id = '19', ), system_messages = [ fireblocks.models.system_message_info.SystemMessageInfo( type = 'WARN', diff --git a/test/test_travel_rule_legal_name_identifier.py b/test/test_travel_rule_legal_name_identifier.py new file mode 100644 index 00000000..054f968f --- /dev/null +++ b/test/test_travel_rule_legal_name_identifier.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.travel_rule_legal_name_identifier import ( + TravelRuleLegalNameIdentifier, +) + + +class TestTravelRuleLegalNameIdentifier(unittest.TestCase): + """TravelRuleLegalNameIdentifier unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TravelRuleLegalNameIdentifier: + """Test TravelRuleLegalNameIdentifier + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `TravelRuleLegalNameIdentifier` + """ + model = TravelRuleLegalNameIdentifier() + if include_optional: + return TravelRuleLegalNameIdentifier( + legal_person_name = 'QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q', + legal_person_name_identifier_type = 'QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e' + ) + else: + return TravelRuleLegalNameIdentifier( + legal_person_name = 'QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q', + legal_person_name_identifier_type = 'QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e', + ) + """ + + def testTravelRuleLegalNameIdentifier(self): + """Test TravelRuleLegalNameIdentifier""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_travel_rule_legal_person.py b/test/test_travel_rule_legal_person.py index 72a0a719..4b5fd3a3 100644 --- a/test/test_travel_rule_legal_person.py +++ b/test/test_travel_rule_legal_person.py @@ -37,8 +37,9 @@ def make_instance(self, include_optional) -> TravelRuleLegalPerson: if include_optional: return TravelRuleLegalPerson( name = fireblocks.models.travel_rule_legal_person_name_identifier.TravelRuleLegalPersonNameIdentifier( - legal_person_name = 'QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q', - legal_person_name_identifier_type = 'QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e', ), + name_identifier = [{"legalPersonName":"QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q","legalPersonNameIdentifierType":"QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e"}], + local_name_identifier = [{"legalPersonName":"QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q","legalPersonNameIdentifierType":"QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e"}], + phonetic_name_identifier = [{"legalPersonName":"QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q","legalPersonNameIdentifierType":"QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e"}], ), geographic_address = [ fireblocks.models.travel_rule_geographic_address.TravelRuleGeographicAddress( street_name = 'QmZGXXsKPk5iPS97LLjXB5e8Qs555ocdzcpbPMXvt84Ji9', diff --git a/test/test_travel_rule_legal_person_name_identifier.py b/test/test_travel_rule_legal_person_name_identifier.py index 577f0dd7..aab613f2 100644 --- a/test/test_travel_rule_legal_person_name_identifier.py +++ b/test/test_travel_rule_legal_person_name_identifier.py @@ -38,8 +38,9 @@ def make_instance(self, include_optional) -> TravelRuleLegalPersonNameIdentifier model = TravelRuleLegalPersonNameIdentifier() if include_optional: return TravelRuleLegalPersonNameIdentifier( - legal_person_name = 'QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q', - legal_person_name_identifier_type = 'QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e' + name_identifier = [{"legalPersonName":"QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q","legalPersonNameIdentifierType":"QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e"}], + local_name_identifier = [{"legalPersonName":"QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q","legalPersonNameIdentifierType":"QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e"}], + phonetic_name_identifier = [{"legalPersonName":"QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q","legalPersonNameIdentifierType":"QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e"}] ) else: return TravelRuleLegalPersonNameIdentifier( diff --git a/test/test_travel_rule_person.py b/test/test_travel_rule_person.py index ccd2dedf..b64acd0c 100644 --- a/test/test_travel_rule_person.py +++ b/test/test_travel_rule_person.py @@ -87,8 +87,9 @@ def make_instance(self, include_optional) -> TravelRulePerson: customer_number = 'QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj', ), legal_person = fireblocks.models.travel_rule_legal_person.TravelRuleLegalPerson( name = fireblocks.models.travel_rule_legal_person_name_identifier.TravelRuleLegalPersonNameIdentifier( - legal_person_name = 'QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q', - legal_person_name_identifier_type = 'QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e', ), + name_identifier = [{"legalPersonName":"QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q","legalPersonNameIdentifierType":"QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e"}], + local_name_identifier = [{"legalPersonName":"QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q","legalPersonNameIdentifierType":"QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e"}], + phonetic_name_identifier = [{"legalPersonName":"QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q","legalPersonNameIdentifierType":"QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e"}], ), geographic_address = [ fireblocks.models.travel_rule_geographic_address.TravelRuleGeographicAddress( street_name = 'QmZGXXsKPk5iPS97LLjXB5e8Qs555ocdzcpbPMXvt84Ji9', diff --git a/test/test_travel_rule_validate_full_transaction_request.py b/test/test_travel_rule_validate_full_transaction_request.py index 93e41f1c..5013e2ba 100644 --- a/test/test_travel_rule_validate_full_transaction_request.py +++ b/test/test_travel_rule_validate_full_transaction_request.py @@ -103,6 +103,8 @@ def make_instance( country_of_residence = 'US', customer_number = '123456789', ), legal_person = fireblocks.models.travel_rule_validate_legal_person.TravelRuleValidateLegalPerson( + name = fireblocks.models.travel_rule_validate_legal_person_name_identifier.TravelRuleValidateLegalPersonNameIdentifier( + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], ), customer_identification = 'CUST987654', customer_number = '123456789', country_of_registration = 'US', ), ) @@ -166,6 +168,8 @@ def make_instance( country_of_residence = 'US', customer_number = '123456789', ), legal_person = fireblocks.models.travel_rule_validate_legal_person.TravelRuleValidateLegalPerson( + name = fireblocks.models.travel_rule_validate_legal_person_name_identifier.TravelRuleValidateLegalPersonNameIdentifier( + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], ), customer_identification = 'CUST987654', customer_number = '123456789', country_of_registration = 'US', ), ) @@ -327,6 +331,8 @@ def make_instance( country_of_residence = 'US', customer_number = '123456789', ), legal_person = fireblocks.models.travel_rule_validate_legal_person.TravelRuleValidateLegalPerson( + name = fireblocks.models.travel_rule_validate_legal_person_name_identifier.TravelRuleValidateLegalPersonNameIdentifier( + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], ), customer_identification = 'CUST987654', customer_number = '123456789', country_of_registration = 'US', ), ) @@ -390,6 +396,8 @@ def make_instance( country_of_residence = 'US', customer_number = '123456789', ), legal_person = fireblocks.models.travel_rule_validate_legal_person.TravelRuleValidateLegalPerson( + name = fireblocks.models.travel_rule_validate_legal_person_name_identifier.TravelRuleValidateLegalPersonNameIdentifier( + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], ), customer_identification = 'CUST987654', customer_number = '123456789', country_of_registration = 'US', ), ) diff --git a/test/test_travel_rule_validate_legal_name_identifier.py b/test/test_travel_rule_validate_legal_name_identifier.py new file mode 100644 index 00000000..44866742 --- /dev/null +++ b/test/test_travel_rule_validate_legal_name_identifier.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" +Fireblocks API + +Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + +The version of the OpenAPI document: 1.6.2 +Contact: developers@fireblocks.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +import unittest + +from fireblocks.models.travel_rule_validate_legal_name_identifier import ( + TravelRuleValidateLegalNameIdentifier, +) + + +class TestTravelRuleValidateLegalNameIdentifier(unittest.TestCase): + """TravelRuleValidateLegalNameIdentifier unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TravelRuleValidateLegalNameIdentifier: + """Test TravelRuleValidateLegalNameIdentifier + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `TravelRuleValidateLegalNameIdentifier` + """ + model = TravelRuleValidateLegalNameIdentifier() + if include_optional: + return TravelRuleValidateLegalNameIdentifier( + legal_person_name = 'Acme Corporation', + legal_person_name_identifier_type = 'LEGL' + ) + else: + return TravelRuleValidateLegalNameIdentifier( + legal_person_name = 'Acme Corporation', + legal_person_name_identifier_type = 'LEGL', + ) + """ + + def testTravelRuleValidateLegalNameIdentifier(self): + """Test TravelRuleValidateLegalNameIdentifier""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_travel_rule_validate_legal_person.py b/test/test_travel_rule_validate_legal_person.py index e7474de2..4c9ce0df 100644 --- a/test/test_travel_rule_validate_legal_person.py +++ b/test/test_travel_rule_validate_legal_person.py @@ -39,8 +39,9 @@ def make_instance(self, include_optional) -> TravelRuleValidateLegalPerson: if include_optional: return TravelRuleValidateLegalPerson( name = fireblocks.models.travel_rule_validate_legal_person_name_identifier.TravelRuleValidateLegalPersonNameIdentifier( - legal_person_name = 'Acme Corporation', - legal_person_name_identifier_type = 'REGISTERED', ), + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], + local_name_identifier = [{"legalPersonName":"アクメ株式会社","legalPersonNameIdentifierType":"LEGL"}], + phonetic_name_identifier = [{"legalPersonName":"Akume Kabushiki Gaisha","legalPersonNameIdentifierType":"LEGL"}], ), geographic_address = [ fireblocks.models.travel_rule_validate_geographic_address.TravelRuleValidateGeographicAddress( street_name = '123 Main St', @@ -71,6 +72,10 @@ def make_instance(self, include_optional) -> TravelRuleValidateLegalPerson: ) else: return TravelRuleValidateLegalPerson( + name = fireblocks.models.travel_rule_validate_legal_person_name_identifier.TravelRuleValidateLegalPersonNameIdentifier( + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], + local_name_identifier = [{"legalPersonName":"アクメ株式会社","legalPersonNameIdentifierType":"LEGL"}], + phonetic_name_identifier = [{"legalPersonName":"Akume Kabushiki Gaisha","legalPersonNameIdentifierType":"LEGL"}], ), ) """ diff --git a/test/test_travel_rule_validate_legal_person_name_identifier.py b/test/test_travel_rule_validate_legal_person_name_identifier.py index fa37c641..500ca2b4 100644 --- a/test/test_travel_rule_validate_legal_person_name_identifier.py +++ b/test/test_travel_rule_validate_legal_person_name_identifier.py @@ -40,11 +40,13 @@ def make_instance( model = TravelRuleValidateLegalPersonNameIdentifier() if include_optional: return TravelRuleValidateLegalPersonNameIdentifier( - legal_person_name = 'Acme Corporation', - legal_person_name_identifier_type = 'REGISTERED' + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], + local_name_identifier = [{"legalPersonName":"アクメ株式会社","legalPersonNameIdentifierType":"LEGL"}], + phonetic_name_identifier = [{"legalPersonName":"Akume Kabushiki Gaisha","legalPersonNameIdentifierType":"LEGL"}] ) else: return TravelRuleValidateLegalPersonNameIdentifier( + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], ) """ diff --git a/test/test_travel_rule_validate_person.py b/test/test_travel_rule_validate_person.py index 4abc7e0b..16b77161 100644 --- a/test/test_travel_rule_validate_person.py +++ b/test/test_travel_rule_validate_person.py @@ -87,8 +87,9 @@ def make_instance(self, include_optional) -> TravelRuleValidatePerson: customer_number = '123456789', ), legal_person = fireblocks.models.travel_rule_validate_legal_person.TravelRuleValidateLegalPerson( name = fireblocks.models.travel_rule_validate_legal_person_name_identifier.TravelRuleValidateLegalPersonNameIdentifier( - legal_person_name = 'Acme Corporation', - legal_person_name_identifier_type = 'REGISTERED', ), + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], + local_name_identifier = [{"legalPersonName":"アクメ株式会社","legalPersonNameIdentifierType":"LEGL"}], + phonetic_name_identifier = [{"legalPersonName":"Akume Kabushiki Gaisha","legalPersonNameIdentifierType":"LEGL"}], ), geographic_address = [ fireblocks.models.travel_rule_validate_geographic_address.TravelRuleValidateGeographicAddress( street_name = '123 Main St', diff --git a/test/test_travel_rule_validate_pii_ivms.py b/test/test_travel_rule_validate_pii_ivms.py index 409e50dc..ad07043b 100644 --- a/test/test_travel_rule_validate_pii_ivms.py +++ b/test/test_travel_rule_validate_pii_ivms.py @@ -88,6 +88,8 @@ def make_instance(self, include_optional) -> TravelRuleValidatePiiIVMS: country_of_residence = 'US', customer_number = '123456789', ), legal_person = fireblocks.models.travel_rule_validate_legal_person.TravelRuleValidateLegalPerson( + name = fireblocks.models.travel_rule_validate_legal_person_name_identifier.TravelRuleValidateLegalPersonNameIdentifier( + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], ), customer_identification = 'CUST987654', customer_number = '123456789', country_of_registration = 'US', ), ) @@ -144,6 +146,8 @@ def make_instance(self, include_optional) -> TravelRuleValidatePiiIVMS: country_of_residence = 'US', customer_number = '123456789', ), legal_person = fireblocks.models.travel_rule_validate_legal_person.TravelRuleValidateLegalPerson( + name = fireblocks.models.travel_rule_validate_legal_person_name_identifier.TravelRuleValidateLegalPersonNameIdentifier( + name_identifier = [{"legalPersonName":"Acme Corporation","legalPersonNameIdentifierType":"LEGL"}], ), customer_identification = 'CUST987654', customer_number = '123456789', country_of_registration = 'US', ), )