Skip to content

Commit

Permalink
Merge pull request #78 from fireblocks/fireblocks-api-spec/generated/…
Browse files Browse the repository at this point in the history
…6749

Generated SDK #6749
  • Loading branch information
asafs932 authored Jul 25, 2024
2 parents 1a7545e + 1e92120 commit 5ba97b5
Show file tree
Hide file tree
Showing 38 changed files with 1,227 additions and 49 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/auto-reply-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Auto Reply On New Issues
on:
issues:
types: [opened]

jobs:
auto-reply:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Choose random reply message
id: choose_message
run: |
reply_messages=(
"Thank you for raising this issue! We will look into it shortly."
"We appreciate your feedback. Our team will investigate this issue shortly."
"Your issue has been noted. We'll get back to you soon."
"Thanks for raising this issue. We'll review it and provide updates soon."
"Thank you for letting us know about this issue. We'll investigate and get back to you soon."
"Acknowledged. We'll review the issue and respond soon."
"Thanks for bringing this to our attention. We'll review it and provide updates soon."
"We've received your issue. Thanks for your patience."
"Noted. Expect updates on your issue shortly."
"Your issue is important to us. We will look into it shortly."
)
random_index=$((RANDOM % ${#reply_messages[@]}))
echo "::set-output name=message::${reply_messages[$random_index]}"
- name: Reply to issue
run: |
gh issue comment ${{ github.event.issue.number }} --body "${{ steps.choose_message.outputs.message }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/auto-reply-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Auto Reply On New Pull Requests
on:
pull_request:
types: [opened]

jobs:
auto-reply:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Choose random reply message
id: choose_message
run: |
reply_messages=(
"Thank you for raising this! We will review it shortly. (Note that this SDK code is auto generated)"
"We appreciate your contribution. Our team will investigate this request shortly. (Note that this SDK code is auto generated)"
"Your request has been noted. We'll get back to you soon. (Note that this SDK code is auto generated)"
"Thanks for submitting this request. We'll review it and provide updates soon. (Note that this SDK code is auto generated)"
"Thank you for letting us know about this request. We'll investigate and get back to you soon. (Note that this SDK code is auto generated)"
"Acknowledged. We'll review and respond soon. (Note that this SDK code is auto generated)"
"Thanks for bringing this request to our attention. We'll review and provide updates soon. (Note that this SDK code is auto generated)"
"We've received your request. Thanks for your patience. (Note that this SDK code is auto generated)"
"Noted. Expect updates shortly. (Note that this SDK code is auto generated)"
"Your request is important to us. We will look into it shortly. (Note that this SDK code is auto generated)"
)
random_index=$((RANDOM % ${#reply_messages[@]}))
echo "::set-output name=message::${reply_messages[$random_index]}"
- name: Reply to pull request
if: (!contains(fromJSON('["github-actions"]'), github.event.pull_request.user.login))
run: |
gh pr comment ${{ github.event.number }} --body "${{ steps.choose_message.outputs.message }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ docs/AssetForbiddenErrorResponse.md
docs/AssetInternalServerErrorResponse.md
docs/AssetMetadataDto.md
docs/AssetNotFoundErrorResponse.md
docs/AssetPriceForbiddenErrorResponse.md
docs/AssetPriceNotFoundErrorResponse.md
docs/AssetPriceResponse.md
docs/AssetResponse.md
docs/AssetResponseMetadata.md
docs/AssetResponseOnchain.md
Expand Down Expand Up @@ -322,6 +325,7 @@ docs/SessionDTO.md
docs/SessionMetadata.md
docs/SetAdminQuorumThresholdRequest.md
docs/SetAdminQuorumThresholdResponse.md
docs/SetAssetPriceRequest.md
docs/SetAutoFuelRequest.md
docs/SetConfirmationsThresholdRequest.md
docs/SetConfirmationsThresholdResponse.md
Expand Down Expand Up @@ -556,6 +560,9 @@ fireblocks/models/asset_forbidden_error_response.py
fireblocks/models/asset_internal_server_error_response.py
fireblocks/models/asset_metadata_dto.py
fireblocks/models/asset_not_found_error_response.py
fireblocks/models/asset_price_forbidden_error_response.py
fireblocks/models/asset_price_not_found_error_response.py
fireblocks/models/asset_price_response.py
fireblocks/models/asset_response.py
fireblocks/models/asset_response_metadata.py
fireblocks/models/asset_response_onchain.py
Expand Down Expand Up @@ -820,6 +827,7 @@ fireblocks/models/session_dto.py
fireblocks/models/session_metadata.py
fireblocks/models/set_admin_quorum_threshold_request.py
fireblocks/models/set_admin_quorum_threshold_response.py
fireblocks/models/set_asset_price_request.py
fireblocks/models/set_auto_fuel_request.py
fireblocks/models/set_confirmations_threshold_request.py
fireblocks/models/set_confirmations_threshold_response.py
Expand Down Expand Up @@ -1016,6 +1024,9 @@ test/test_asset_forbidden_error_response.py
test/test_asset_internal_server_error_response.py
test/test_asset_metadata_dto.py
test/test_asset_not_found_error_response.py
test/test_asset_price_forbidden_error_response.py
test/test_asset_price_not_found_error_response.py
test/test_asset_price_response.py
test/test_asset_response.py
test/test_asset_response_metadata.py
test/test_asset_response_onchain.py
Expand Down Expand Up @@ -1305,6 +1316,7 @@ test/test_session_dto.py
test/test_session_metadata.py
test/test_set_admin_quorum_threshold_request.py
test/test_set_admin_quorum_threshold_response.py
test/test_set_asset_price_request.py
test/test_set_auto_fuel_request.py
test/test_set_confirmations_threshold_request.py
test/test_set_confirmations_threshold_response.py
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ Class | Method | HTTP request | Description
*AuditLogsApi* | [**get_audits**](docs/AuditLogsApi.md#get_audits) | **GET** /audits | Get audit logs
*BlockchainsAssetsApi* | [**get_supported_assets**](docs/BlockchainsAssetsApi.md#get_supported_assets) | **GET** /supported_assets | List all asset types supported by Fireblocks
*BlockchainsAssetsApi* | [**register_new_asset**](docs/BlockchainsAssetsApi.md#register_new_asset) | **POST** /assets | Register an asset
*BlockchainsAssetsApi* | [**set_asset_price**](docs/BlockchainsAssetsApi.md#set_asset_price) | **POST** /assets/prices/{id} | Set asset price
*ComplianceApi* | [**get_aml_post_screening_policy**](docs/ComplianceApi.md#get_aml_post_screening_policy) | **GET** /screening/aml/post_screening_policy | AML - View Post-Screening Policy
*ComplianceApi* | [**get_aml_screening_policy**](docs/ComplianceApi.md#get_aml_screening_policy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy
*ComplianceApi* | [**get_post_screening_policy**](docs/ComplianceApi.md#get_post_screening_policy) | **GET** /screening/travel_rule/post_screening_policy | Travel Rule - View Post-Screening Policy
Expand Down Expand Up @@ -481,6 +482,9 @@ Class | Method | HTTP request | Description
- [AssetInternalServerErrorResponse](docs/AssetInternalServerErrorResponse.md)
- [AssetMetadataDto](docs/AssetMetadataDto.md)
- [AssetNotFoundErrorResponse](docs/AssetNotFoundErrorResponse.md)
- [AssetPriceForbiddenErrorResponse](docs/AssetPriceForbiddenErrorResponse.md)
- [AssetPriceNotFoundErrorResponse](docs/AssetPriceNotFoundErrorResponse.md)
- [AssetPriceResponse](docs/AssetPriceResponse.md)
- [AssetResponse](docs/AssetResponse.md)
- [AssetResponseMetadata](docs/AssetResponseMetadata.md)
- [AssetResponseOnchain](docs/AssetResponseOnchain.md)
Expand Down Expand Up @@ -745,6 +749,7 @@ Class | Method | HTTP request | Description
- [SessionMetadata](docs/SessionMetadata.md)
- [SetAdminQuorumThresholdRequest](docs/SetAdminQuorumThresholdRequest.md)
- [SetAdminQuorumThresholdResponse](docs/SetAdminQuorumThresholdResponse.md)
- [SetAssetPriceRequest](docs/SetAssetPriceRequest.md)
- [SetAutoFuelRequest](docs/SetAutoFuelRequest.md)
- [SetConfirmationsThresholdRequest](docs/SetConfirmationsThresholdRequest.md)
- [SetConfirmationsThresholdResponse](docs/SetConfirmationsThresholdResponse.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/AbiFunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | The name of the contract function as it appears in the ABI | [optional]
**state_mutability** | **str** | The state mutability of the contract function as it appears in the ABI | [optional]
**type** | **str** | The type if the function |
**type** | **str** | The type of the function |
**inputs** | [**List[Parameter]**](Parameter.md) | The parameters that this function/constructor posses |
**outputs** | [**List[Parameter]**](Parameter.md) | The parameters that this 'read' function returns | [optional]
**description** | **str** | The documentation of this function (if has any) | [optional]
Expand Down
30 changes: 30 additions & 0 deletions docs/AssetPriceForbiddenErrorResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# AssetPriceForbiddenErrorResponse


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **str** | Forbidden error message |
**code** | **str** | Error code |

## Example

```python
from fireblocks.models.asset_price_forbidden_error_response import AssetPriceForbiddenErrorResponse

# TODO update the JSON string below
json = "{}"
# create an instance of AssetPriceForbiddenErrorResponse from a JSON string
asset_price_forbidden_error_response_instance = AssetPriceForbiddenErrorResponse.from_json(json)
# print the JSON string representation of the object
print(AssetPriceForbiddenErrorResponse.to_json())

# convert the object into a dict
asset_price_forbidden_error_response_dict = asset_price_forbidden_error_response_instance.to_dict()
# create an instance of AssetPriceForbiddenErrorResponse from a dict
asset_price_forbidden_error_response_from_dict = AssetPriceForbiddenErrorResponse.from_dict(asset_price_forbidden_error_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)


30 changes: 30 additions & 0 deletions docs/AssetPriceNotFoundErrorResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# AssetPriceNotFoundErrorResponse


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **str** | Not found error message |
**code** | **str** | Error code |

## Example

```python
from fireblocks.models.asset_price_not_found_error_response import AssetPriceNotFoundErrorResponse

# TODO update the JSON string below
json = "{}"
# create an instance of AssetPriceNotFoundErrorResponse from a JSON string
asset_price_not_found_error_response_instance = AssetPriceNotFoundErrorResponse.from_json(json)
# print the JSON string representation of the object
print(AssetPriceNotFoundErrorResponse.to_json())

# convert the object into a dict
asset_price_not_found_error_response_dict = asset_price_not_found_error_response_instance.to_dict()
# create an instance of AssetPriceNotFoundErrorResponse from a dict
asset_price_not_found_error_response_from_dict = AssetPriceNotFoundErrorResponse.from_dict(asset_price_not_found_error_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)


33 changes: 33 additions & 0 deletions docs/AssetPriceResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# AssetPriceResponse


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**legacy_id** | **str** | The ID of the asset |
**last_update_at** | **float** | Time of last price update |
**currency** | **str** | Currency (according to ISO 4217 currency codes) |
**price** | **float** | Price in currency |
**source** | **str** | Source of the price data |

## Example

```python
from fireblocks.models.asset_price_response import AssetPriceResponse

# TODO update the JSON string below
json = "{}"
# create an instance of AssetPriceResponse from a JSON string
asset_price_response_instance = AssetPriceResponse.from_json(json)
# print the JSON string representation of the object
print(AssetPriceResponse.to_json())

# convert the object into a dict
asset_price_response_dict = asset_price_response_instance.to_dict()
# create an instance of AssetPriceResponse from a dict
asset_price_response_from_dict = AssetPriceResponse.from_dict(asset_price_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)


82 changes: 82 additions & 0 deletions docs/BlockchainsAssetsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**get_supported_assets**](BlockchainsAssetsApi.md#get_supported_assets) | **GET** /supported_assets | List all asset types supported by Fireblocks
[**register_new_asset**](BlockchainsAssetsApi.md#register_new_asset) | **POST** /assets | Register an asset
[**set_asset_price**](BlockchainsAssetsApi.md#set_asset_price) | **POST** /assets/prices/{id} | Set asset price


# **get_supported_assets**
Expand Down Expand Up @@ -159,3 +160,84 @@ No authorization required

[[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)

# **set_asset_price**
> AssetPriceResponse set_asset_price(id, idempotency_key=idempotency_key, set_asset_price_request=set_asset_price_request)
Set asset price

Set asset price for the given asset id. Returns the asset price response.

### Example


```python
from fireblocks.models.asset_price_response import AssetPriceResponse
from fireblocks.models.set_asset_price_request import SetAssetPriceRequest
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:
id = 'ETH' # str | The ID of the asset
idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
set_asset_price_request = fireblocks.SetAssetPriceRequest() # SetAssetPriceRequest | (optional)

try:
# Set asset price
api_response = fireblocks.blockchains_assets.set_asset_price(id, idempotency_key=idempotency_key, set_asset_price_request=set_asset_price_request).result()
print("The response of BlockchainsAssetsApi->set_asset_price:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BlockchainsAssetsApi->set_asset_price: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The ID of the asset |
**idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional]
**set_asset_price_request** | [**SetAssetPriceRequest**](SetAssetPriceRequest.md)| | [optional]

### Return type

[**AssetPriceResponse**](AssetPriceResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Asset price has been set successfully. | - |
**403** | - Tenant is not allowed to set rate. Error code: 1002. | - |
**404** | - Currency not found. Error code 1001 | - |
**0** | Error Response | * X-Request-ID - <br> |

[[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)

4 changes: 2 additions & 2 deletions docs/NetworkIdResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | |
**name** | **str** | |
**routing_policy** | [**Dict[str, NetworkIdRoutingPolicyValue]**](NetworkIdRoutingPolicyValue.md) | | [optional]
**is_discoverable** | **bool** | The specific network is discoverable. | [optional]
**id** | **str** | The specific network id | [optional]
**name** | **str** | The specific network name | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/ReadCallFunctionDto.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**abi_function** | [**List[ReadAbiFunction]**](ReadAbiFunction.md) | The abi of the read function you wish to call |
**abi_function** | [**ReadAbiFunction**](ReadAbiFunction.md) | |

## Example

Expand Down
Loading

0 comments on commit 5ba97b5

Please sign in to comment.