Skip to content

Commit

Permalink
Add payment union types to .payments() call
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Nov 28, 2023
1 parent f2366e3 commit 608bda9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/horizon/payment_call_builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ import { ServerApi } from "./server_api";
* Creates a new {@link PaymentCallBuilder} pointed to server defined by serverUrl.
*
* Do not create this object directly, use {@link Server#payments}.
* @see [All Payments](https://developers.stellar.org/api/resources/payments/)
* @see [All Payments](https://developers.stellar.org/api/horizon/resources/list-all-payments/)
* @constructor
* @extends CallBuilder
* @param {string} serverUrl Horizon server URL.
*/
export class PaymentCallBuilder extends CallBuilder<
ServerApi.CollectionPage<ServerApi.PaymentOperationRecord>
ServerApi.CollectionPage<
| ServerApi.PaymentOperationRecord
| ServerApi.CreateAccountOperationRecord
| ServerApi.AccountMergeOperationRecord
| ServerApi.PathPaymentOperationRecord
| ServerApi.PathPaymentStrictSendOperationRecord
>
> {
constructor(serverUrl: URI) {
super(serverUrl, "payments");
Expand All @@ -20,7 +26,7 @@ export class PaymentCallBuilder extends CallBuilder<

/**
* This endpoint responds with a collection of Payment operations where the given account was either the sender or receiver.
* @see [Payments for Account](https://developers.stellar.org/api/resources/accounts/payments/)
* @see [Payments for Account](https://developers.stellar.org/api/horizon/resources/get-payments-by-account-id)
* @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {PaymentCallBuilder} this PaymentCallBuilder instance
*/
Expand All @@ -30,7 +36,7 @@ export class PaymentCallBuilder extends CallBuilder<

/**
* This endpoint represents all payment operations that are part of a valid transactions in a given ledger.
* @see [Payments for Ledger](https://developers.stellar.org/api/resources/ledgers/payments/)
* @see [Payments for Ledger](https://developers.stellar.org/api/horizon/resources/retrieve-a-ledgers-payments)
* @param {number|string} sequence Ledger sequence
* @returns {PaymentCallBuilder} this PaymentCallBuilder instance
*/
Expand Down

0 comments on commit 608bda9

Please sign in to comment.