-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add withdrawalRequests info for wallets and accounts.
- Loading branch information
Showing
16 changed files
with
403 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
lightspark/src/objects/account_to_payment_requests_connection.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
lightspark/src/objects/account_to_withdrawal_requests_connection.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved | ||
use crate::objects::connection::Connection; | ||
use crate::objects::page_info::PageInfo; | ||
use crate::objects::withdrawal_request::WithdrawalRequest; | ||
use serde::{Deserialize, Serialize}; | ||
use std::vec::Vec; | ||
|
||
/// A connection between an account and its past and present withdrawal requests. | ||
#[derive(Debug, Clone, Deserialize, Serialize)] | ||
pub struct AccountToWithdrawalRequestsConnection { | ||
/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field). | ||
#[serde(rename = "account_to_withdrawal_requests_connection_count")] | ||
pub count: i64, | ||
|
||
/// An object that holds pagination information about the objects in this connection. | ||
#[serde(rename = "account_to_withdrawal_requests_connection_page_info")] | ||
pub page_info: PageInfo, | ||
|
||
/// The withdrawal requests for the current page of this connection. | ||
#[serde(rename = "account_to_withdrawal_requests_connection_entities")] | ||
pub entities: Vec<WithdrawalRequest>, | ||
|
||
/// The typename of the object | ||
#[serde(rename = "__typename")] | ||
pub typename: String, | ||
} | ||
|
||
impl Connection for AccountToWithdrawalRequestsConnection { | ||
/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field). | ||
fn get_count(&self) -> i64 { | ||
self.count | ||
} | ||
|
||
/// An object that holds pagination information about the objects in this connection. | ||
fn get_page_info(&self) -> PageInfo { | ||
self.page_info.clone() | ||
} | ||
|
||
fn type_name(&self) -> &'static str { | ||
"AccountToWithdrawalRequestsConnection" | ||
} | ||
} | ||
|
||
pub const FRAGMENT: &str = " | ||
fragment AccountToWithdrawalRequestsConnectionFragment on AccountToWithdrawalRequestsConnection { | ||
__typename | ||
account_to_withdrawal_requests_connection_count: count | ||
account_to_withdrawal_requests_connection_page_info: page_info { | ||
__typename | ||
page_info_has_next_page: has_next_page | ||
page_info_has_previous_page: has_previous_page | ||
page_info_start_cursor: start_cursor | ||
page_info_end_cursor: end_cursor | ||
} | ||
account_to_withdrawal_requests_connection_entities: entities { | ||
id | ||
} | ||
} | ||
"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.