diff --git a/stellar_rust_sdk/src/ledgers/response.rs b/stellar_rust_sdk/src/ledgers/response.rs index 51502bf..a9ac8f1 100644 --- a/stellar_rust_sdk/src/ledgers/response.rs +++ b/stellar_rust_sdk/src/ledgers/response.rs @@ -4,6 +4,11 @@ use stellar_xdr::curr::{LedgerHeader, Limits, ReadXdr}; use crate::models::prelude::*; +/// Represents the navigational links in a single ledger response from the Horizon API. +/// +/// This struct includes various hyperlinks such as links to the ledger itself, +/// transactions, operations, payments and effects +/// #[derive(Debug, Deserialize, Clone, Getters)] pub struct LedgerLinks { #[serde(rename = "self")] @@ -14,6 +19,12 @@ pub struct LedgerLinks { pub effects: TemplateLink, } +/// Represents the response for a single ledger query in the Horizon API. +/// +/// This struct defines the overall structure of the response for a ledger offer query. +/// It includes navigational links, offer identifiers, the ID, the hash, the sequence number, +/// and additional data +/// #[derive(Debug, Deserialize, Clone, Getters)] pub struct Ledger { /// Navigational links related to the ledger. diff --git a/stellar_rust_sdk/src/offers/mod.rs b/stellar_rust_sdk/src/offers/mod.rs index ff85897..e752283 100644 --- a/stellar_rust_sdk/src/offers/mod.rs +++ b/stellar_rust_sdk/src/offers/mod.rs @@ -190,12 +190,12 @@ pub mod test { const BUYING_ASSET_TYPE: &str = "credit_alphanum12"; const BUYING_ASSET_CODE: &str = "EURCAllow"; const BUYING_ASSET_ISSUER: &str = "GA6HVGLFUF3BHHGR5CMYXIVZ3RYVUH5EUYAOAY4T3OKI5OQVIWVRK24R"; - const AMOUNT: &str = "922278138224.9775807"; + const AMOUNT: &str = "922274722883.0675807"; const PRICE_R_N: &u32 = &1; const PRICE_R_D: &u32 = &1; const PRICE: &str = "1.0000000"; - const LAST_MODIFIED_LEDGER: &u32 = &1762248; - const LAST_MODIFIED_TIME: &str = "2024-05-23T22:12:07Z"; + const LAST_MODIFIED_LEDGER: &u32 = &1938375; + const LAST_MODIFIED_TIME: &str = "2024-06-03T15:21:13Z"; let horizon_client = HorizonClient::new("https://horizon-testnet.stellar.org"