#![allow(clippy::upper_case_acronyms, clippy::enum_variant_names)]
use serde::{Deserialize, Serialize};
#[cfg(feature = "strum")]
use strum::{Display, EnumString};
use crate::reports::ReportType;
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum CountryCodeSupported {
AD,
AE,
AG,
AI,
AL,
AM,
AO,
AR,
AS,
AT,
AU,
AW,
AX,
AZ,
BA,
BB,
BD,
BE,
BF,
BG,
BH,
BI,
BJ,
BL,
BM,
BN,
BO,
BQ,
BR,
BS,
BT,
BV,
BW,
BZ,
CA,
CC,
CG,
CH,
CI,
CK,
CL,
CM,
CN,
CO,
CR,
CV,
CW,
CX,
CY,
CZ,
DE,
DJ,
DK,
DM,
DO,
DZ,
EC,
EE,
EG,
EH,
ER,
ES,
ET,
FI,
FJ,
FK,
FM,
FO,
FR,
GA,
GB,
GD,
GE,
GF,
GG,
GH,
GI,
GL,
GM,
GN,
GP,
GQ,
GR,
GS,
GT,
GU,
GW,
GY,
HK,
HM,
HN,
HR,
HU,
ID,
IE,
IL,
IM,
IN,
IO,
IQ,
IS,
IT,
JE,
JM,
JO,
JP,
KE,
KG,
KH,
KI,
KM,
KN,
KR,
KW,
KY,
KZ,
LA,
LB,
LC,
LI,
LK,
LR,
LS,
LT,
LU,
LV,
MA,
MC,
MD,
ME,
MF,
MG,
MH,
MK,
MN,
MO,
MP,
MQ,
MR,
MS,
MT,
MU,
MV,
MW,
MX,
MY,
MZ,
NA,
NC,
NE,
NF,
NG,
NL,
NO,
NP,
NR,
NU,
NZ,
OM,
PA,
PE,
PF,
PG,
PH,
PK,
PL,
PM,
PN,
PR,
PS,
PT,
PW,
PY,
QA,
RE,
RO,
RS,
RW,
SA,
SB,
SC,
SE,
SG,
SH,
SI,
SJ,
SK,
SL,
SM,
SN,
SR,
ST,
SV,
SX,
SZ,
TC,
TD,
TF,
TG,
TH,
TJ,
TK,
TL,
TM,
TN,
TO,
TR,
TT,
TV,
TW,
TZ,
UA,
UG,
UM,
US,
UY,
UZ,
VA,
VC,
VG,
VI,
VN,
VU,
WF,
WS,
XK,
YT,
ZA,
ZM,
#[serde(untagged)]
#[cfg_attr(feature = "strum", strum(default))]
Other(String),
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "kebab-case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
#[non_exhaustive]
pub enum Status {
Active,
Archived,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum AdjustmentAction {
Credit,
Refund,
Chargeback,
ChargebackReverse,
ChargebackWarning,
CreditReverse,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
#[non_exhaustive]
pub enum AdjustmentType {
Full,
Partial,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum CurrencyCode {
USD,
EUR,
GBP,
JPY,
AUD,
CAD,
CHF,
HKD,
SGD,
SEK,
ARS,
BRL,
CNY,
COP,
CZK,
DKK,
HUF,
ILS,
INR,
KRW,
MXN,
NOK,
NZD,
PLN,
RUB,
THB,
TRY,
TWD,
UAH,
VND,
ZAR,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum AdjustmentStatus {
PendingApproval,
Approved,
Rejected,
Reversed,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum CurrencyCodeChargebacks {
AUD,
CAD,
EUR,
GBP,
USD,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum CurrencyCodePayouts {
AUD,
CAD,
CHF,
CNY,
CZK,
DKK,
EUR,
GBP,
HUF,
PLN,
SEK,
USD,
ZAR,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
#[non_exhaustive]
pub enum AdjustmentItemType {
Full,
Partial,
Tax,
Proration,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "kebab-case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
#[non_exhaustive]
pub enum Interval {
Day,
Week,
Month,
Year,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum CardType {
AmericanExpress,
DinersClub,
Discover,
Jcb,
Mada,
Maestro,
Mastercard,
UnionPay,
Unknown,
Visa,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "kebab-case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
#[non_exhaustive]
pub enum CatalogType {
Custom,
Standard,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum CollectionMode {
Automatic,
Manual,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum SavedPaymentMethodType {
Alipay,
ApplePay,
Card,
GooglePay,
Paypal,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum PaymentMethodOrigin {
SavedDuringPurchase,
Subscription,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "kebab-case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
#[non_exhaustive]
pub enum DiscountStatus {
Active,
Archived,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum DiscountType {
Flat,
FlatPerSeat,
Percentage,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum EffectiveFrom {
NextBillingPeriod,
Immediately,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum Type {
RequestError,
ApiError,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum ErrorCode {
AlreadyCanceled,
AlreadyRefunded,
AuthenticationFailed,
BlockedCard,
Canceled,
Declined,
DeclinedNotRetryable,
ExpiredCard,
Fraud,
InvalidAmount,
InvalidPaymentDetails,
IssuerUnavailable,
NotEnoughBalance,
PreferredNetworkNotSupported,
PspError,
RedactedPaymentMethod,
SystemError,
TransactionNotPermitted,
Unknown,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum EventTypeName {
AddressCreated,
AddressImported,
AddressUpdated,
AdjustmentCreated,
AdjustmentUpdated,
BusinessCreated,
BusinessImported,
BusinessUpdated,
CustomerCreated,
CustomerImported,
CustomerUpdated,
DiscountCreated,
DiscountImported,
DiscountUpdated,
PayoutCreated,
PayoutPaid,
PriceCreated,
PriceImported,
PriceUpdated,
ProductCreated,
ProductImported,
ProductUpdated,
ReportCreated,
ReportUpdated,
SubscriptionActivated,
SubscriptionCanceled,
SubscriptionCreated,
SubscriptionImported,
SubscriptionPastDue,
SubscriptionPaused,
SubscriptionResumed,
SubscriptionTrialing,
SubscriptionUpdated,
TransactionBilled,
TransactionCanceled,
TransactionCompleted,
TransactionCreated,
TransactionPaid,
TransactionPastDue,
TransactionPaymentFailed,
TransactionReady,
TransactionUpdated,
}
#[allow(clippy::large_enum_variant)]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(tag = "event_type", content = "data")]
pub enum EventData {
#[serde(rename = "address.created")]
AddressCreated(crate::entities::Address),
#[serde(rename = "address.imported")]
AddressImported(crate::entities::Address),
#[serde(rename = "address.updated")]
AddressUpdated(crate::entities::Address),
#[serde(rename = "adjustment.created")]
AdjustmentCreated(crate::entities::Adjustment),
#[serde(rename = "adjustment.updated")]
AdjustmentUpdated(crate::entities::Adjustment),
#[serde(rename = "api_key.created")]
ApiKeyCreated(crate::entities::ApiKey),
#[serde(rename = "api_key.updated")]
ApiKeyUpdated(crate::entities::ApiKey),
#[serde(rename = "api_key.expiring")]
ApiKeyExpiring(crate::entities::ApiKey),
#[serde(rename = "api_key.expired")]
ApiKeyExpired(crate::entities::ApiKey),
#[serde(rename = "api_key.revoked")]
ApiKeyRevoked(crate::entities::ApiKey),
#[serde(rename = "business.created")]
BusinessCreated(crate::entities::Business),
#[serde(rename = "business.imported")]
BusinessImported(crate::entities::Business),
#[serde(rename = "business.updated")]
BusinessUpdated(crate::entities::Business),
#[serde(rename = "customer.created")]
CustomerCreated(crate::entities::Customer),
#[serde(rename = "customer.imported")]
CustomerImported(crate::entities::Customer),
#[serde(rename = "customer.updated")]
CustomerUpdated(crate::entities::Customer),
#[serde(rename = "discount.created")]
DiscountCreated(crate::entities::Discount),
#[serde(rename = "discount.imported")]
DiscountImported(crate::entities::Discount),
#[serde(rename = "discount.updated")]
DiscountUpdated(crate::entities::Discount),
#[serde(rename = "payment_method.saved")]
PaymentMethodSaved(crate::entities::PaymentMethod),
#[serde(rename = "payment_method.deleted")]
PaymentMethodDeleted(crate::entities::PaymentMethod),
#[serde(rename = "payout.created")]
PayoutCreated(crate::entities::Payout),
#[serde(rename = "payout.paid")]
PayoutPaid(crate::entities::Payout),
#[serde(rename = "price.created")]
PriceCreated(crate::entities::Price),
#[serde(rename = "price.imported")]
PriceImported(crate::entities::Price),
#[serde(rename = "price.updated")]
PriceUpdated(crate::entities::Price),
#[serde(rename = "product.created")]
ProductCreated(crate::entities::Product),
#[serde(rename = "product.imported")]
ProductImported(crate::entities::Product),
#[serde(rename = "product.updated")]
ProductUpdated(crate::entities::Product),
#[serde(rename = "report.created")]
ReportCreated(crate::entities::ReportBase),
#[serde(rename = "report.updated")]
ReportUpdated(crate::entities::ReportBase),
#[serde(rename = "subscription.activated")]
SubscriptionActivated(crate::entities::Subscription),
#[serde(rename = "subscription.canceled")]
SubscriptionCanceled(crate::entities::Subscription),
#[serde(rename = "subscription.created")]
SubscriptionCreated(crate::entities::Subscription),
#[serde(rename = "subscription.imported")]
SubscriptionImported(crate::entities::Subscription),
#[serde(rename = "subscription.past_due")]
SubscriptionPastDue(crate::entities::Subscription),
#[serde(rename = "subscription.paused")]
SubscriptionPaused(crate::entities::Subscription),
#[serde(rename = "subscription.resumed")]
SubscriptionResumed(crate::entities::Subscription),
#[serde(rename = "subscription.trialing")]
SubscriptionTrialing(crate::entities::Subscription),
#[serde(rename = "subscription.updated")]
SubscriptionUpdated(crate::entities::Subscription),
#[serde(rename = "transaction.billed")]
TransactionBilled(crate::entities::Transaction),
#[serde(rename = "transaction.canceled")]
TransactionCanceled(crate::entities::Transaction),
#[serde(rename = "transaction.completed")]
TransactionCompleted(crate::entities::Transaction),
#[serde(rename = "transaction.created")]
TransactionCreated(crate::entities::Transaction),
#[serde(rename = "transaction.paid")]
TransactionPaid(crate::entities::Transaction),
#[serde(rename = "transaction.past_due")]
TransactionPastDue(crate::entities::Transaction),
#[serde(rename = "transaction.payment_failed")]
TransactionPaymentFailed(crate::entities::Transaction),
#[serde(rename = "transaction.ready")]
TransactionReady(crate::entities::Transaction),
#[serde(rename = "transaction.revised")]
TransactionRevised(crate::entities::Transaction),
#[serde(rename = "transaction.updated")]
TransactionUpdated(crate::entities::Transaction),
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
#[non_exhaustive]
pub enum SubscriptionItemStatus {
Active,
Inactive,
Trialing,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum TaxMode {
AccountSetting,
External,
Internal,
Location,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "kebab-case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
#[non_exhaustive]
pub enum TaxCategory {
DigitalGoods,
Ebooks,
ImplementationServices,
ProfessionalServices,
Saas,
SoftwareProgrammingServices,
Standard,
TrainingServices,
WebsiteHosting,
}
impl AsRef<str> for TaxCategory {
fn as_ref(&self) -> &str {
match self {
Self::DigitalGoods => "digital-goods",
Self::Ebooks => "ebooks",
Self::ImplementationServices => "implementation-services",
Self::ProfessionalServices => "professional-services",
Self::Saas => "saas",
Self::SoftwareProgrammingServices => "software-programming-services",
Self::Standard => "standard",
Self::TrainingServices => "training-services",
Self::WebsiteHosting => "website-hosting",
}
}
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum PaymentMethodType {
Alipay,
ApplePay,
Bancontact,
Card,
GooglePay,
Ideal,
Offline,
Paypal,
Unknown,
WireTransfer,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum NotificationStatus {
NotAttempted,
NeedsRetry,
Delivered,
Failed,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum NotificationOrigin {
Event,
Replay,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum NotificationSettingType {
Email,
Url,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum TrafficSource {
Platform,
Simulation,
All,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
#[non_exhaustive]
pub enum FilterOperator {
Lt,
Gte,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum TransactionOrigin {
Api,
SubscriptionCharge,
SubscriptionPaymentMethodChange,
SubscriptionRecurring,
SubscriptionUpdate,
Web,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum ReportStatus {
Pending,
Ready,
Failed,
Expired,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum AdjustmentsReportFilterName {
Action,
CurrencyCode,
Status,
UpdatedAt,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum DiscountsReportFilterName {
Type,
Status,
UpdatedAt,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum BalanceReportFilterName {
UpdatedAt,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum ProductPricesReportFilterName {
ProductStatus,
PriceStatus,
ProductType,
PriceType,
ProductUpdatedAt,
PriceUpdatedAt,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum TransactionsReportFilterName {
CollectionMode,
CurrencyCode,
Origin,
Status,
UpdatedAt,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum AdjustmentsReportType {
Adjustments,
AdjustmentLineItems,
}
impl ReportType for AdjustmentsReportType {
type FilterName = AdjustmentsReportFilterName;
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum TransactionsReportType {
Transactions,
TransactionLineItems,
}
impl ReportType for TransactionsReportType {
type FilterName = TransactionsReportFilterName;
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum ProductsAndPricesReportType {
ProductsPrices,
}
impl ReportType for ProductsAndPricesReportType {
type FilterName = ProductPricesReportFilterName;
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum DiscountsReportType {
Discounts,
}
impl ReportType for DiscountsReportType {
type FilterName = DiscountsReportFilterName;
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum BalanceReportType {
Balance,
}
impl ReportType for BalanceReportType {
type FilterName = BalanceReportFilterName;
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum SimulationEventStatus {
Pending,
Success,
Failed,
Aborted,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum SimulationRunStatus {
Pending,
Completed,
Canceled,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum SimulationScenarioType {
SubscriptionCreation,
SubscriptionRenewal,
SubscriptionPause,
SubscriptionResume,
SubscriptionCancellation,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[non_exhaustive]
pub enum SimulationKind {
SingleEvent,
Scenario,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum PaymentAttemptStatus {
Authorized,
AuthorizedFlagged,
Canceled,
Captured,
Error,
ActionRequired,
PendingNoActionRequired,
Created,
Unknown,
Dropped,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum SubscriptionStatus {
Active,
Canceled,
PastDue,
Paused,
Trialing,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum TransactionStatus {
Draft,
Ready,
Billed,
Paid,
Completed,
Canceled,
PastDue,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
#[non_exhaustive]
pub enum ScheduledChangeAction {
Cancel,
Pause,
Resume,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum SubscriptionOnPaymentFailure {
PreventChange,
ApplyChange,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
#[non_exhaustive]
pub enum UpdateSummaryResultAction {
Credit,
Charge,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum ProrationBillingMode {
ProratedImmediately,
ProratedNextBillingPeriod,
FullImmediately,
FullNextBillingPeriod,
DoNotBill,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum SubscriptionOnResume {
ContinueExistingBillingPeriod,
StartNewBillingPeriod,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
#[non_exhaustive]
pub enum Disposition {
Attachment,
Inline,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
#[non_exhaustive]
pub enum PayoutStatus {
Paid,
Unpaid,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
#[non_exhaustive]
pub enum ApiKeyStatus {
Active,
Expired,
Revoked,
}
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "strum", derive(EnumString, Display))]
#[serde(rename_all = "snake_case")]
#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
#[non_exhaustive]
pub enum SubscriptionInclude {
NextTransaction,
RecurringTransactionDetails,
}