Skip to content

Commit

Permalink
chore: Release 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tikhop authored Jan 23, 2024
2 parents 027baf1 + 65df7ff commit 2679298
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "app-store-server-library"
description = "The Rust server library for the App Store Server API and App Store Server Notifications"
version = "0.6.0"
version = "0.7.0"
repository = "https://github.com/namecare/app-store-server-library-rust"
homepage = "https://github.com/namecare/app-store-server-library-rust"
authors = ["tkhp", "namecare"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Specify `app-store-server-library` in your project's `Cargo.toml` file, under th

```rust
[dependencies]
app-store-server-library = "0.6.0"
app-store-server-library = "0.7.0"
```
Check
[crates.io](https://crates.io/crates/app-store-server-library) for the latest version number.
Expand Down
19 changes: 18 additions & 1 deletion src/primitives/jws_transaction_decoded_payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use chrono::{DateTime, Utc};
use serde_with::formats::Flexible;
use serde_with::TimestampMilliSeconds;
use uuid::Uuid;
use crate::primitives::offer_discount_type::OfferDiscountType;

/// A decoded payload containing transaction information.
///
Expand Down Expand Up @@ -155,4 +156,20 @@ pub struct JWSTransactionDecodedPayload {
/// [transactionReason](https://developer.apple.com/documentation/appstoreserverapi/transactionreason)
#[serde(rename = "transactionReason")]
pub transaction_reason: Option<TransactionReason>,
}

/// The three-letter ISO 4217 currency code for the price of the product.
///
/// [currency](https://developer.apple.com/documentation/appstoreserverapi/currency)
pub currency: Option<String>,

/// The price of the in-app purchase or subscription offer that you configured in App Store Connect, as an integer.
///
/// [price](https://developer.apple.com/documentation/appstoreserverapi/price)
pub price: Option<i32>,

/// The payment mode you configure for an introductory offer, promotional offer, or offer code on an auto-renewable subscription.
///
/// [offerDiscountType](https://developer.apple.com/documentation/appstoreserverapi/offerdiscounttype)
#[serde(rename = "offerDiscountType")]
pub offer_discount_type: Option<OfferDiscountType>
}
1 change: 1 addition & 0 deletions src/primitives/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ pub mod transaction_history_request;
pub mod transaction_info_response;
pub mod transaction_reason;
pub mod user_status;
pub mod offer_discount_type;
14 changes: 14 additions & 0 deletions src/primitives/offer_discount_type.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
use serde::{Deserialize, Serialize};

/// The payment mode you configure for an introductory offer, promotional offer, or offer code on an auto-renewable subscription.
///
/// [offerDiscountType](https://developer.apple.com/documentation/appstoreserverapi/offerdiscounttype)
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum OfferDiscountType {
#[serde(rename = "FREE_TRIAL")]
FreeTrial,
#[serde(rename = "PAY_AS_YOU_GO")]
PayAsYouGo,
#[serde(rename = "PAY_UP_FRONT")]
PayUpFront,
}

0 comments on commit 2679298

Please sign in to comment.