-
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.
Regenerate Rust SDK and bump version (#46)
- Loading branch information
Showing
71 changed files
with
1,151 additions
and
199 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
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# Changelog | ||
|
||
# v0.9.0 | ||
- Update API objects. | ||
|
||
# v0.8.1 | ||
- Remove openssl dependency from reqwest. | ||
|
||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name = "lightspark" | ||
description = "Lightspark Rust SDK" | ||
authors = ["Lightspark Group, Inc. <[email protected]>"] | ||
version = "0.8.2" | ||
version = "0.9.0" | ||
edition = "2021" | ||
documentation = "https://docs.lightspark.com/lightspark-sdk/getting-started?language=Rust" | ||
homepage = "https://www.lightspark.com/" | ||
|
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
4 changes: 2 additions & 2 deletions
4
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved | ||
use super::api_token::ApiToken; | ||
use crate::objects::entity::Entity; | ||
use serde::{Deserialize, Deserializer, Serialize}; | ||
use serde_json::Value; | ||
|
||
pub trait AuditLogActor: Entity { | ||
fn type_name(&self) -> &'static str; | ||
} | ||
|
||
#[allow(clippy::large_enum_variant)] | ||
#[derive(Debug, Clone, Serialize)] | ||
pub enum AuditLogActorEnum { | ||
ApiToken(ApiToken), | ||
} | ||
|
||
impl<'de> Deserialize<'de> for AuditLogActorEnum { | ||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> | ||
where | ||
D: Deserializer<'de>, | ||
{ | ||
let value = Value::deserialize(deserializer)?; | ||
if let Some(typename) = value.get("__typename").and_then(Value::as_str) { | ||
match typename { | ||
"ApiToken" => { | ||
let obj = ApiToken::deserialize(value).map_err(|err| { | ||
serde::de::Error::custom(format!("Serde JSON Error {}", err)) | ||
})?; | ||
Ok(AuditLogActorEnum::ApiToken(obj)) | ||
} | ||
|
||
_ => Err(serde::de::Error::custom("unknown typename")), | ||
} | ||
} else { | ||
Err(serde::de::Error::custom( | ||
"missing __typename field on AuditLogActor", | ||
)) | ||
} | ||
} | ||
} |
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.