1 unstable release

0.1.0 Nov 10, 2022

#38 in #rest-client

MIT license

655KB
9K SLoC

Rust API client for openapi

A full API to use your BTCPay Server

For more information, please visit https://btcpayserver.org

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

Note from AE

In order to get openapi working We had to A) slightly change the swagger.json definiton (basically adding a few path variables and one unspecified definition), see the added swagger.json B) deal with some unparsedable oneOfEntries C) redefine the timespan structs to type redefentions. So it was not completly autogenerated.

  • API version: v1
  • Package version: v1
  • Build package: org.openapitools.codegen.languages.RustClientCodegen

Installation

Put the package under your project folder in a directory named openapi and add the following to Cargo.toml under [dependencies]:

openapi = { path = "./openapi" }

Documentation for API Endpoints

All URIs are relative to https://btcpay.example.com/api/v1

Class Method HTTP request Description
APIKeysApi api_keys_create_api_key POST /api/v1/api-keys Create a new API Key
APIKeysApi api_keys_delete_api_key DELETE /api/v1/api-keys/{apikey} Revoke an API Key
APIKeysApi api_keys_delete_current_api_key DELETE /api/v1/api-keys/current Revoke the current API Key
APIKeysApi api_keys_get_current_api_key GET /api/v1/api-keys/current Get the current API Key information
AppsApi apps_create_point_of_sale_app POST /api/v1/stores/{storeId}/apps/pos Create a new Point of Sale app
AppsApi apps_delete_point_of_sale_app DELETE /api/v1/apps/{appId} Delete app
AppsApi apps_get_point_of_sale_app GET /api/v1/apps/{appId} Get basic app data
AuthorizationApi api_keys_authorize GET /api-keys/authorize Authorize User
CustodiansApi custodians_add_store_custodian_account POST /api/v1/stores/{storeId}/custodian-accounts Add a custodial account to a store.
CustodiansApi custodians_delete_store_custodian_account DELETE /api/v1/stores/{storeId}/custodian-accounts/{accountId} Delete store custodian account
CustodiansApi custodians_get_store_custodian_account GET /api/v1/stores/{storeId}/custodian-accounts/{accountId} Get store custodian account
CustodiansApi custodians_get_store_custodian_account_deposit_address GET /api/v1/stores/{storeId}/custodian-accounts/{accountId}/addresses/{paymentMethod} Get a deposit address for custodian
CustodiansApi custodians_get_store_custodian_account_trade_quote GET /api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/quote Get quote for trading one asset for another
CustodiansApi custodians_get_store_custodian_account_withdrawal_info POST /api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals/{withdrawalId} Get withdrawal info
CustodiansApi custodians_get_store_custodian_accounts GET /api/v1/stores/{storeId}/custodian-accounts List store custodian accounts
CustodiansApi custodians_get_supported_custodians GET /api/v1/custodians List supported custodians
CustodiansApi custodians_store_custodian_account_trade_market POST /api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/market Trade one asset for another
CustodiansApi custodians_update_store_custodian_account PUT /api/v1/stores/{storeId}/custodian-accounts/{accountId} Update custodial account
CustodiansApi custodians_withdraw_from_store_custodian_account POST /api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals Withdraw to store wallet
HealthApi health_get_health GET /api/v1/health Get health status
InvoicesApi invoices_activate_payment_method POST /api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods/{paymentMethod}/activate Activate Payment Method
InvoicesApi invoices_archive_invoice DELETE /api/v1/stores/{storeId}/invoices/{invoiceId} Archive invoice
InvoicesApi invoices_create_invoice POST /api/v1/stores/{storeId}/invoices Create a new invoice
InvoicesApi invoices_get_invoice GET /api/v1/stores/{storeId}/invoices/{invoiceId} Get invoice
InvoicesApi invoices_get_invoice_payment_methods GET /api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods Get invoice payment methods
InvoicesApi invoices_get_invoices GET /api/v1/stores/{storeId}/invoices Get invoices
InvoicesApi invoices_mark_invoice_status POST /api/v1/stores/{storeId}/invoices/{invoiceId}/status Mark invoice status
InvoicesApi invoices_unarchive_invoice POST /api/v1/stores/{storeId}/invoices/{invoiceId}/unarchive Unarchive invoice
InvoicesApi invoices_update_invoice PUT /api/v1/stores/{storeId}/invoices/{invoiceId} Update invoice
LightningInternalNodeApi internal_lightning_node_api_connect_to_node POST /api/v1/server/lightning/{cryptoCode}/connect Connect to lightning node
LightningInternalNodeApi internal_lightning_node_api_create_invoice POST /api/v1/server/lightning/{cryptoCode}/invoices Create lightning invoice
LightningInternalNodeApi internal_lightning_node_api_get_balance GET /api/v1/server/lightning/{cryptoCode}/balance Get node balance
LightningInternalNodeApi internal_lightning_node_api_get_channels GET /api/v1/server/lightning/{cryptoCode}/channels Get channels
LightningInternalNodeApi internal_lightning_node_api_get_deposit_address POST /api/v1/server/lightning/{cryptoCode}/address Get deposit address
LightningInternalNodeApi internal_lightning_node_api_get_info GET /api/v1/server/lightning/{cryptoCode}/info Get node information
LightningInternalNodeApi internal_lightning_node_api_get_invoice GET /api/v1/server/lightning/{cryptoCode}/invoices/{id} Get invoice
LightningInternalNodeApi internal_lightning_node_api_get_payment GET /api/v1/server/lightning/{cryptoCode}/payments/{paymentHash} Get payment
LightningInternalNodeApi internal_lightning_node_api_open_channel POST /api/v1/server/lightning/{cryptoCode}/channels Open channel
LightningInternalNodeApi internal_lightning_node_api_pay_invoice POST /api/v1/server/lightning/{cryptoCode}/invoices/pay Pay Lightning Invoice
LightningStoreApi store_lightning_node_api_connect_to_node POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/connect Connect to lightning node
LightningStoreApi store_lightning_node_api_create_invoice POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices Create lightning invoice
LightningStoreApi store_lightning_node_api_get_balance GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/balance Get node balance
LightningStoreApi store_lightning_node_api_get_channels GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/channels Get channels
LightningStoreApi store_lightning_node_api_get_deposit_address POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/address Get deposit address
LightningStoreApi store_lightning_node_api_get_info GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/info Get node information
LightningStoreApi store_lightning_node_api_get_invoice GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/{id} Get invoice
LightningStoreApi store_lightning_node_api_get_payment GET /api/v1/stores/{storeId}/lightning/{cryptoCode}/payments/{paymentHash} Get payment
LightningStoreApi store_lightning_node_api_open_channel POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/channels Open channel
LightningStoreApi store_lightning_node_api_pay_invoice POST /api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/pay Pay Lightning Invoice
MiscelleneousApi invoice_checkout GET /i/{invoiceId} Invoice checkout
MiscelleneousApi lang_codes GET /misc/lang Language codes
MiscelleneousApi permissions_metadata GET /misc/permissions Permissions metadata
NotificationsCurrentUserApi notifications_delete_notification DELETE /api/v1/users/me/notifications/{id} Remove Notification
NotificationsCurrentUserApi notifications_get_notification GET /api/v1/users/me/notifications/{id} Get notification
NotificationsCurrentUserApi notifications_get_notifications GET /api/v1/users/me/notifications Get notifications
NotificationsCurrentUserApi notifications_update_notification PUT /api/v1/users/me/notifications/{id} Update notification
PaymentRequestsApi payment_requests_archive_payment_request DELETE /api/v1/stores/{storeId}/payment-requests/{paymentRequestId} Archive payment request
PaymentRequestsApi payment_requests_create_payment_request POST /api/v1/stores/{storeId}/payment-requests Create a new payment request
PaymentRequestsApi payment_requests_get_payment_request GET /api/v1/stores/{storeId}/payment-requests/{paymentRequestId} Get payment request
PaymentRequestsApi payment_requests_get_payment_requests GET /api/v1/stores/{storeId}/payment-requests Get payment requests
PaymentRequestsApi payment_requests_update_payment_request PUT /api/v1/stores/{storeId}/payment-requests/{paymentRequestId} Update payment request
PayoutProcessorsApi payout_processors_get_payout_processors GET /api/v1/payout-processors Get payout processors
PullPaymentsManagementApi pull_payments_archive_pull_payment DELETE /api/v1/stores/{storeId}/pull-payments/{pullPaymentId} Archive a pull payment
PullPaymentsManagementApi pull_payments_create_pull_payment POST /api/v1/stores/{storeId}/pull-payments Create a new pull payment
PullPaymentsManagementApi pull_payments_get_pull_payments GET /api/v1/stores/{storeId}/pull-payments Get store's pull payments
PullPaymentsPayoutPublicApi pull_payments_get_payout GET /api/v1/pull-payments/{pullPaymentId}/payouts/{payoutId} Get Payout
PullPaymentsPublicApi pull_payments_create_payout POST /api/v1/pull-payments/{pullPaymentId}/payouts Create Payout
PullPaymentsPublicApi pull_payments_get_payout GET /api/v1/pull-payments/{pullPaymentId}/payouts/{payoutId} Get Payout
PullPaymentsPublicApi pull_payments_get_payouts GET /api/v1/pull-payments/{pullPaymentId}/payouts Get Payouts
PullPaymentsPublicApi pull_payments_get_pull_payment GET /api/v1/pull-payments/{pullPaymentId} Get Pull Payment
ServerInfoApi server_info_get_server_info GET /api/v1/server/info Get server info
StorePaymentMethodsApi store_payment_methods_get_store_payment_methods GET /api/v1/stores/{storeId}/payment-methods Get store payment methods
StorePaymentMethodsLNURLPayApi store_lnurl_pay_payment_methods_delete_lnurl_pay_payment_method DELETE /api/v1/stores/{storeId}/payment-methods/LNURL/{cryptoCode} Remove store LNURL Pay payment method
StorePaymentMethodsLNURLPayApi store_lnurl_pay_payment_methods_get_lnurl_pay_payment_method GET /api/v1/stores/{storeId}/payment-methods/LNURL/{cryptoCode} Get store LNURL Pay payment method
StorePaymentMethodsLNURLPayApi store_lnurl_pay_payment_methods_get_lnurl_pay_payment_methods GET /api/v1/stores/{storeId}/payment-methods/LNURL Get store LNURL payment methods
StorePaymentMethodsLNURLPayApi store_lnurl_pay_payment_methods_update_lnurl_pay_payment_method PUT /api/v1/stores/{storeId}/payment-methods/LNURL/{cryptoCode} Update store LNURL Pay payment method
StorePaymentMethodsLightningNetworkApi store_lightning_network_payment_methods_delete_lightning_network_payment_method DELETE /api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode} Remove store Lightning Network payment method
StorePaymentMethodsLightningNetworkApi store_lightning_network_payment_methods_get_lightning_network_payment_method GET /api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode} Get store Lightning Network payment method
StorePaymentMethodsLightningNetworkApi store_lightning_network_payment_methods_get_lightning_network_payment_methods GET /api/v1/stores/{storeId}/payment-methods/LightningNetwork Get store Lightning Network payment methods
StorePaymentMethodsLightningNetworkApi store_lightning_network_payment_methods_update_lightning_network_payment_method PUT /api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode} Update store Lightning Network payment method
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_delete_on_chain_payment_method DELETE /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode} Remove store on-chain payment method
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_generate_on_chain_wallet POST /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/generate Generate store on-chain wallet
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_get_on_chain_payment_method GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode} Get store on-chain payment method
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_get_on_chain_payment_method_preview GET /api/v1/stores/{storeId}/payment-methods/OnChain/{cryptoCode}/preview Preview store on-chain payment method addresses
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_get_on_chain_payment_methods GET /api/v1/stores/{storeId}/payment-methods/OnChain Get store on-chain payment methods
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_poston_chain_payment_method_preview POST /api/v1/stores/{storeId}/payment-methods/OnChain/{cryptoCode}/preview Preview proposed store on-chain payment method addresses
StorePaymentMethodsOnChainApi store_on_chain_payment_methods_update_on_chain_payment_method PUT /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode} Update store on-chain payment method
StoreWalletOnChainApi store_on_chain_wallets_create_on_chain_transaction POST /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions Create store on-chain wallet transaction
StoreWalletOnChainApi store_on_chain_wallets_get_on_chain_fee_rate GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/feerate Get store on-chain wallet fee rate
StoreWalletOnChainApi store_on_chain_wallets_get_on_chain_wallet_receive_address GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/address Get store on-chain wallet address
StoreWalletOnChainApi store_on_chain_wallets_get_on_chain_wallet_transaction GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions/{transactionId} Get store on-chain wallet transaction
StoreWalletOnChainApi store_on_chain_wallets_get_on_chain_wallet_utxos GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/utxos Get store on-chain wallet UTXOS
StoreWalletOnChainApi store_on_chain_wallets_patch_on_chain_wallet_transaction PATCH /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions/{transactionId} Patch store on-chain wallet transaction info
StoreWalletOnChainApi store_on_chain_wallets_show_on_chain_wallet_overview GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet Get store on-chain wallet overview
StoreWalletOnChainApi store_on_chain_wallets_show_on_chain_wallet_transactions GET /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/transactions Get store on-chain wallet transactions
StoreWalletOnChainApi store_on_chain_wallets_un_reserve_on_chain_wallet_receive_address DELETE /api/v1/stores/{storeId}/payment-methods/onchain/{cryptoCode}/wallet/address UnReserve last store on-chain wallet address
StoresApi stores_create_store POST /api/v1/stores Create a new store
StoresApi stores_delete_store DELETE /api/v1/stores/{storeId} Remove Store
StoresApi stores_get_store GET /api/v1/stores/{storeId} Get store
StoresApi stores_get_stores GET /api/v1/stores Get stores
StoresApi stores_update_store PUT /api/v1/stores/{storeId} Update store
StoresEmailApi stores_get_store_email_settings GET /api/v1/stores/{storeId}/email Get store email settings
StoresEmailApi stores_send_store_email POST /api/v1/stores/{storeId}/email/send Send an email for a store
StoresEmailApi stores_update_store_email_settings PUT /api/v1/stores/{storeId}/email Update store email settings
StoresPayoutProcessorsApi greenfield_store_automated_lightning_payout_processors_controller_get_store_lightning_automated_payout_processors_for_payment_method GET /api/v1/stores/{storeId}/payout-processors/LightningAutomatedTransferSenderFactory/{paymentMethod} Get configured store Lightning automated payout processors
StoresPayoutProcessorsApi greenfield_store_automated_lightning_payout_processors_controller_get_store_lightning_automated_transfer_sender_factory GET /api/v1/stores/{storeId}/payout-processors/LightningAutomatedTransferSenderFactory Get configured store Lightning automated payout processors
StoresPayoutProcessorsApi greenfield_store_automated_lightning_payout_processors_controller_update_store_lightning_automated_payout_processor PUT /api/v1/stores/{storeId}/payout-processors/LightningAutomatedTransferSenderFactory/{paymentMethod} Update configured store Lightning automated payout processors
StoresPayoutProcessorsApi greenfield_store_automated_on_chain_payout_processors_controller_get_store_on_chain_automated_payout_processors_for_payment_method GET /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory/{paymentMethod} Get configured store onchain automated payout processors
StoresPayoutProcessorsApi greenfield_store_automated_on_chain_payout_processors_controller_get_store_on_chain_automated_transfer_sender_factory GET /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory Get configured store onchain automated payout processors
StoresPayoutProcessorsApi greenfield_store_automated_on_chain_payout_processors_controller_update_store_on_chain_automated_payout_processor_for_payment_method PUT /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory/{paymentMethod} Update configured store onchain automated payout processors
StoresPayoutProcessorsApi greenfield_store_automated_on_chain_payout_processors_controller_update_store_on_chain_automated_transfer_sender_factory PUT /api/v1/stores/{storeId}/payout-processors/OnChainAutomatedTransferSenderFactory Update configured store onchain automated payout processors
StoresPayoutProcessorsApi store_payout_processors_get_store_payout_processors GET /api/v1/stores/{storeId}/payout-processors Get store configured payout processors
StoresPayoutProcessorsApi store_payout_processors_remove_store_payout_processor DELETE /api/v1/stores/{storeId}/payout-processors/{processor}/{paymentMethod} Remove store configured payout processor
StoresPayoutsApi payouts_create_payout_through_store POST /api/v1/stores/{storeId}/payouts Create Payout
StoresPayoutsApi pull_payments_approve_payout POST /api/v1/stores/{storeId}/payouts/{payoutId} Approve Payout
StoresPayoutsApi pull_payments_cancel_payout DELETE /api/v1/stores/{storeId}/payouts/{payoutId} Cancel Payout
StoresPayoutsApi pull_payments_get_store_payouts GET /api/v1/stores/{storeId}/payouts Get Store Payouts
StoresPayoutsApi pull_payments_mark_payout_paid POST /api/v1/stores/{storeId}/payouts/{payoutId}/mark-paid Mark Payout as Paid
StoresUsersApi stores_add_store_user POST /api/v1/stores/{storeId}/users Add a store user
StoresUsersApi stores_get_store_users GET /api/v1/stores/{storeId}/users Get store users
StoresUsersApi stores_remove_store_user DELETE /api/v1/stores/{storeId}/users/{userId} Remove Store User
UsersApi users_create_user POST /api/v1/users Create user
UsersApi users_delete_current_user DELETE /api/v1/users/me Deletes user profile
UsersApi users_delete_user DELETE /api/v1/users/{idOrEmail} Delete user
UsersApi users_get_current_user GET /api/v1/users/me Get current user information
UsersApi users_get_user GET /api/v1/users/{idOrEmail} Get user by ID or Email
UsersApi users_get_users GET /api/v1/users Get all users
UsersApi users_toggle_user_lock DELETE /api/v1/users/{idOrEmail}/lock Toggle user
WebhooksApi webhooks_create_webhook POST /api/v1/stores/{storeId}/webhooks Create a new webhook
WebhooksApi webhooks_delete_webhook DELETE /api/v1/stores/{storeId}/webhooks/{webhookId} Delete a webhook
WebhooksApi webhooks_get_webhook GET /api/v1/stores/{storeId}/webhooks/{webhookId} Get a webhook of a store
WebhooksApi webhooks_get_webhook_deliveries GET /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries Get latest deliveries
WebhooksApi webhooks_get_webhook_delivery GET /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId} Get a webhook delivery
WebhooksApi webhooks_get_webhook_delivery_requests GET /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/request Get the delivery's request
WebhooksApi webhooks_get_webhooks GET /api/v1/stores/{storeId}/webhooks Get webhooks of a store
WebhooksApi webhooks_redeliver_webhook_delivery POST /api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver Redeliver the delivery
WebhooksApi webhooks_update_webhook PUT /api/v1/stores/{storeId}/webhooks/{webhookId} Update a webhook

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

Dependencies

~4–20MB
~225K SLoC