diff --git a/README.md b/README.md index 992ee9e..121119f 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ async fn main() { let client = AppStoreServerApiClient::new(encoded_key, key_id, issuer_id, bundle_id, environment); match client.request_test_notification().await { - Ok(res) => { + Ok(response) => { println!("{}", response.test_notification_token); } Err(err) => { diff --git a/src/api_client.rs b/src/api_client.rs index 2d3c59d..054da4e 100644 --- a/src/api_client.rs +++ b/src/api_client.rs @@ -25,10 +25,10 @@ use crate::primitives::transaction_info_response::TransactionInfoResponse; #[derive(Debug, Serialize, Deserialize)] pub struct APIException { - http_status_code: u16, - api_error: Option, - raw_api_error: Option, - error_message: Option, + pub http_status_code: u16, + pub api_error: Option, + pub raw_api_error: Option, + pub error_message: Option, } impl fmt::Display for APIException { @@ -1087,4 +1087,4 @@ mod tests { AppStoreServerAPIClient::new(key, "keyId", "issuerId", "com.example", Environment::LocalTesting, Box::new(request_overrider)) } -} \ No newline at end of file +} diff --git a/src/primitives/notification_type_v2.rs b/src/primitives/notification_type_v2.rs index 3901580..cde481e 100644 --- a/src/primitives/notification_type_v2.rs +++ b/src/primitives/notification_type_v2.rs @@ -41,4 +41,6 @@ pub enum NotificationTypeV2 { RefundReversed, #[serde(rename = "EXTERNAL_PURCHASE_TOKEN")] ExternalPurchaseToken, + #[serde(rename = "ONE_TIME_CHARGE")] + OneTimeCharge, }