pub struct Payments { /* fields omitted */ }Represents the payments for account endpoint on the stellar horizon server.
The endpoint will return all the Payment operations where a specific account
is either the sender or receiver.
https://www.stellar.org/developers/horizon/reference/endpoints/payments-for-account.html
use stellar_client::sync::Client;
use stellar_client::endpoint::{account, payment, Limit};
use stellar_client::resources::operation::OperationKind;
let client = Client::horizon_test().unwrap();
let all_payments = client.request(payment::All::default().with_limit(1)).unwrap();
let payment = &all_payments.records()[0];
let account_id = match payment.kind() {
&OperationKind::Payment(ref payment) => payment.from(),
&OperationKind::CreateAccount(ref payment) => payment.account(),
_ => panic!("Expected payment type")
};
let endpoint = account::Payments::new(account_id);
let acct_payments = client.request(endpoint).unwrap();
assert!(acct_payments.records().len() > 0);
Creates a new account::Payments endpoint struct. Hand this to the client in order to
request payment operations for a specific account.
use stellar_client::endpoint::account;
let payments = account::Payments::new("abc123");
Formats the value using the given formatter. Read more
Performs copy-assignment from source. Read more
Sets a cursor on the struct and returns an owned version.
Returns the cursor that has been set, if it has been set.
Sets a limit on the struct and returns an owned version.
Returns the limit or None.
Sets the order on the struct and returns an owned version.
Returns the order that has been set, if it has been set.
The deserializable type that is expected to come back from the stellar server.
The request body to be sent to stellar. Generally this is just a () unit. Converts the implementing struct into an http request. Read more