paddle_rust_sdk/enums.rs
1//! This module contains enums used in the Paddle API.
2
3#![allow(clippy::upper_case_acronyms, clippy::enum_variant_names)]
4
5use serde::{Deserialize, Serialize};
6#[cfg(feature = "strum")]
7use strum::{Display, EnumString};
8
9use crate::reports::ReportType;
10
11#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
12#[cfg_attr(feature = "strum", derive(EnumString, Display))]
13#[non_exhaustive]
14pub enum CountryCodeSupported {
15 /// Andorra
16 AD,
17 /// United Arab Emirates
18 AE,
19 /// Antigua and Barbuda
20 AG,
21 /// Anguilla
22 AI,
23 /// Albania
24 AL,
25 /// Armenia
26 AM,
27 /// Angola
28 AO,
29 /// Argentina
30 AR,
31 /// American Samoa
32 AS,
33 /// Austria
34 AT,
35 /// Australia
36 AU,
37 /// Aruba
38 AW,
39 /// Åland Islands
40 AX,
41 /// Azerbaijan
42 AZ,
43 /// Bosnia and Herzegovina
44 BA,
45 /// Barbados
46 BB,
47 /// Bangladesh
48 BD,
49 /// Belgium
50 BE,
51 /// Burkina Faso
52 BF,
53 /// Bulgaria
54 BG,
55 /// Bahrain
56 BH,
57 /// Burundi
58 BI,
59 /// Benin
60 BJ,
61 /// Saint Barthélemy
62 BL,
63 /// Bermuda
64 BM,
65 /// Brunei
66 BN,
67 /// Bolivia
68 BO,
69 /// Caribbean Netherlands (Bonaire, Sint Eustatius, and Saba)
70 BQ,
71 /// Brazil
72 BR,
73 /// Bahamas
74 BS,
75 /// Bhutan
76 BT,
77 /// Bouvet Island
78 BV,
79 /// Botswana
80 BW,
81 /// Belize
82 BZ,
83 /// Canada
84 CA,
85 /// Cocos Islands
86 CC,
87 /// Republic of Congo
88 CG,
89 /// Switzerland
90 CH,
91 /// Côte d'Ivoire (Ivory Coast)
92 CI,
93 /// Cook Islands
94 CK,
95 /// Chile
96 CL,
97 /// Cameroon
98 CM,
99 /// China
100 CN,
101 /// Colombia
102 CO,
103 /// Costa Rica
104 CR,
105 /// Cape Verde
106 CV,
107 /// Curaçao
108 CW,
109 /// Christmas Island
110 CX,
111 /// Cyprus
112 CY,
113 /// Czechia (Czech Republic)
114 CZ,
115 /// Germany
116 DE,
117 /// Djibouti
118 DJ,
119 /// Denmark
120 DK,
121 /// Dominica
122 DM,
123 /// Dominican Republic
124 DO,
125 /// Algeria
126 DZ,
127 /// Ecuador
128 EC,
129 /// Estonia
130 EE,
131 /// Egypt
132 EG,
133 /// Western Sahara
134 EH,
135 /// Eritrea
136 ER,
137 /// Spain
138 ES,
139 /// Ethiopia
140 ET,
141 /// Finland
142 FI,
143 /// Fiji
144 FJ,
145 /// Falkland Islands
146 FK,
147 /// Micronesia
148 FM,
149 /// Faroe Islands
150 FO,
151 /// France
152 FR,
153 /// Gabon
154 GA,
155 /// United Kingdom
156 GB,
157 /// Grenada
158 GD,
159 /// Georgia
160 GE,
161 /// French Guiana
162 GF,
163 /// Guernsey
164 GG,
165 /// Ghana
166 GH,
167 /// Gibraltar
168 GI,
169 /// Greenland
170 GL,
171 /// Gambia
172 GM,
173 /// Guinea
174 GN,
175 /// Guadeloupe
176 GP,
177 /// Equatorial Guinea
178 GQ,
179 /// Greece
180 GR,
181 /// South Georgia and the South Sandwich Islands
182 GS,
183 /// Guatemala
184 GT,
185 /// Guam
186 GU,
187 /// Guinea-Bissau
188 GW,
189 /// Guyana
190 GY,
191 /// Hong Kong
192 HK,
193 /// Heard Island and McDonald Islands
194 HM,
195 /// Honduras
196 HN,
197 /// Croatia
198 HR,
199 /// Hungary
200 HU,
201 /// Indonesia
202 ID,
203 /// Ireland
204 IE,
205 /// Israel
206 IL,
207 /// Isle of Man
208 IM,
209 /// India
210 IN,
211 /// British Indian Ocean Territory
212 IO,
213 /// Iraq
214 IQ,
215 /// Iceland
216 IS,
217 /// Italy
218 IT,
219 /// Jersey
220 JE,
221 /// Jamaica
222 JM,
223 /// Jordan
224 JO,
225 /// Japan
226 JP,
227 /// Kenya
228 KE,
229 /// Kyrgyzstan
230 KG,
231 /// Cambodia
232 KH,
233 /// Kiribati
234 KI,
235 /// Comoros
236 KM,
237 /// Saint Kitts and Nevis
238 KN,
239 /// South Korea
240 KR,
241 /// Kuwait
242 KW,
243 /// Cayman Islands
244 KY,
245 /// Kazakhstan
246 KZ,
247 /// Lao People's Democratic Republic (Laos)
248 LA,
249 /// Lebanon
250 LB,
251 /// Saint Lucia
252 LC,
253 /// Liechtenstein
254 LI,
255 /// Sri Lanka
256 LK,
257 /// Liberia
258 LR,
259 /// Lesotho
260 LS,
261 /// Lithuania
262 LT,
263 /// Luxembourg
264 LU,
265 /// Latvia
266 LV,
267 /// Morocco
268 MA,
269 /// Monaco
270 MC,
271 /// Moldova
272 MD,
273 /// Montenegro
274 ME,
275 /// Saint Martin
276 MF,
277 /// Madagascar
278 MG,
279 /// Marshall Islands
280 MH,
281 /// Macedonia
282 MK,
283 /// Mongolia
284 MN,
285 /// Macao
286 MO,
287 /// Northern Mariana Islands
288 MP,
289 /// Martinique
290 MQ,
291 /// Mauritania
292 MR,
293 /// Montserrat
294 MS,
295 /// Malta
296 MT,
297 /// Mauritius
298 MU,
299 /// Maldives
300 MV,
301 /// Malawi
302 MW,
303 /// Mexico
304 MX,
305 /// Malaysia
306 MY,
307 /// Mozambique
308 MZ,
309 /// Namibia
310 NA,
311 /// New Caledonia
312 NC,
313 /// Niger
314 NE,
315 /// Norfolk Island
316 NF,
317 /// Nigeria
318 NG,
319 /// Netherlands
320 NL,
321 /// Norway
322 NO,
323 /// Nepal
324 NP,
325 /// Nauru
326 NR,
327 /// Niue
328 NU,
329 /// New Zealand
330 NZ,
331 /// Oman
332 OM,
333 /// Panama
334 PA,
335 /// Peru
336 PE,
337 /// French Polynesia
338 PF,
339 /// Papua New Guinea
340 PG,
341 /// Philippines
342 PH,
343 /// Pakistan
344 PK,
345 /// Poland
346 PL,
347 /// Saint Pierre and Miquelon
348 PM,
349 /// Pitcairn
350 PN,
351 /// Puerto Rico
352 PR,
353 /// Palestinian territories
354 PS,
355 /// Portugal
356 PT,
357 /// Palau
358 PW,
359 /// Paraguay
360 PY,
361 /// Qatar
362 QA,
363 /// Reunion
364 RE,
365 /// Romania
366 RO,
367 /// Republic of Serbia
368 RS,
369 /// Rwanda
370 RW,
371 /// Saudi Arabia
372 SA,
373 /// Solomon Islands
374 SB,
375 /// Seychelles
376 SC,
377 /// Sweden
378 SE,
379 /// Singapore
380 SG,
381 /// Saint Helena
382 SH,
383 /// Slovenia
384 SI,
385 /// Svalbard and Jan Mayen
386 SJ,
387 /// Slovakia
388 SK,
389 /// Sierra Leone
390 SL,
391 /// San Marino
392 SM,
393 /// Senegal
394 SN,
395 /// Suriname
396 SR,
397 /// São Tomé and Príncipe
398 ST,
399 /// El Salvador
400 SV,
401 /// Sint Maarten
402 SX,
403 /// Swaziland
404 SZ,
405 /// Turks and Caicos Islands
406 TC,
407 /// Chad
408 TD,
409 /// French Southern and Antarctic Lands
410 TF,
411 /// Togo
412 TG,
413 /// Thailand
414 TH,
415 /// Tajikistan
416 TJ,
417 /// Tokelau
418 TK,
419 /// Timor-Leste
420 TL,
421 /// Turkmenistan
422 TM,
423 /// Tunisia
424 TN,
425 /// Tonga
426 TO,
427 /// Turkey
428 TR,
429 /// Trinidad and Tobago
430 TT,
431 /// Tuvalu
432 TV,
433 /// Taiwan
434 TW,
435 /// Tanzania
436 TZ,
437 /// Ukraine
438 UA,
439 /// Uganda
440 UG,
441 /// United States Minor Outlying Islands
442 UM,
443 /// United States
444 US,
445 /// Uruguay
446 UY,
447 /// Uzbekistan
448 UZ,
449 /// Holy See (Vatican City)
450 VA,
451 /// Saint Vincent and the Grenadines
452 VC,
453 /// British Virgin Islands
454 VG,
455 /// U.S. Virgin Islands
456 VI,
457 /// Vietnam
458 VN,
459 /// Vanuatu
460 VU,
461 /// Wallis and Futuna
462 WF,
463 /// Samoa
464 WS,
465 /// Kosovo
466 XK,
467 /// Mayotte
468 YT,
469 /// South Africa
470 ZA,
471 /// Zambia
472 ZM,
473 /// Other country code
474 #[serde(untagged)]
475 #[cfg_attr(feature = "strum", strum(default))]
476 Other(String),
477}
478
479/// Whether this entity can be used in Paddle.
480#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
481#[cfg_attr(feature = "strum", derive(EnumString, Display))]
482#[serde(rename_all = "kebab-case")]
483#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
484#[non_exhaustive]
485pub enum Status {
486 /// Entity is active and can be used.
487 Active,
488 /// Entity is archived, so can't be used.
489 Archived,
490}
491
492/// How this adjustment impacts the related transaction.
493#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
494#[cfg_attr(feature = "strum", derive(EnumString, Display))]
495#[serde(rename_all = "snake_case")]
496#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
497#[non_exhaustive]
498pub enum AdjustmentAction {
499 /// Credits some or all the related transaction.
500 Credit,
501 /// Refunds some or all the related transaction. Must be approved by Paddle in most cases.
502 Refund,
503 /// Chargeback for the related transaction. Automatically created by Paddle when a customer successfully disputes a charge.
504 Chargeback,
505 /// Reversal of a chargeback for the related transaction. Automatically created by Paddle when Paddle contests a chargeback successfully.
506 ChargebackReverse,
507 /// Warning of an upcoming chargeback for the related transaction. Automatically created by Paddle.
508 ChargebackWarning,
509 /// Reversal of a credit for the related transaction. Automatically created by Paddle.
510 CreditReverse,
511}
512
513/// Type of adjustment. Use `full` to adjust the grand total for the related transaction. Include an `items` array when creating a `partial` adjustment. If omitted, defaults to `partial`.
514#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
515#[cfg_attr(feature = "strum", derive(EnumString, Display))]
516#[serde(rename_all = "lowercase")]
517#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
518#[non_exhaustive]
519pub enum AdjustmentType {
520 /// The grand total for the related transaction is adjusted.
521 Full,
522 /// Some line items for the related transaction are adjusted. Requires `items`.
523 Partial,
524}
525
526/// Supported three-letter ISO 4217 currency code.
527#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
528#[cfg_attr(feature = "strum", derive(EnumString, Display))]
529#[non_exhaustive]
530pub enum CurrencyCode {
531 /// United States Dollar
532 USD,
533 /// Euro
534 EUR,
535 /// Pound Sterling
536 GBP,
537 /// Japanese Yen
538 JPY,
539 /// Australian Dollar
540 AUD,
541 /// Canadian Dollar
542 CAD,
543 /// Swiss Franc
544 CHF,
545 /// Hong Kong Dollar
546 HKD,
547 /// Singapore Dollar
548 SGD,
549 /// Swedish Krona
550 SEK,
551 /// Argentine Peso
552 ARS,
553 /// Brazilian Real
554 BRL,
555 /// Chinese Yuan
556 CNY,
557 /// Colombian Peso
558 COP,
559 /// Czech Koruna
560 CZK,
561 /// Danish Krone
562 DKK,
563 /// Hungarian Forint
564 HUF,
565 /// Israeli Shekel
566 ILS,
567 /// Indian Rupee
568 INR,
569 /// South Korean Won
570 KRW,
571 /// Mexican Peso
572 MXN,
573 /// Norwegian Krone
574 NOK,
575 /// New Zealand Dollar
576 NZD,
577 /// Polish Zloty
578 PLN,
579 /// Russian Ruble
580 RUB,
581 /// Thai Baht
582 THB,
583 /// Turkish Lira
584 TRY,
585 /// New Taiwan Dollar
586 TWD,
587 /// Ukrainian Hryvnia
588 UAH,
589 /// Vietnamese Dong
590 VND,
591 /// South African Rand
592 ZAR,
593}
594
595/// Status of this adjustment. Set automatically by Paddle.
596///
597/// Most refunds for live accounts are created with the status of `pending_approval` until reviewed by Paddle, but some are automatically approved. For sandbox accounts, Paddle automatically approves refunds every ten minutes.
598///
599/// Credit adjustments don't require approval from Paddle, so they're created as `approved`.
600#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
601#[cfg_attr(feature = "strum", derive(EnumString, Display))]
602#[serde(rename_all = "snake_case")]
603#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
604#[non_exhaustive]
605pub enum AdjustmentStatus {
606 /// Adjustment is pending approval by Paddle. Most refunds for live accounts must be approved by Paddle.
607 PendingApproval,
608 /// Adjustment is approved. Default for credits. Set when Paddle approves a refund that was `pending_approval`.
609 Approved,
610 /// Adjustment has been rejected. Set when Paddle rejects a refund that was `pending_approval`.
611 Rejected,
612 /// Adjustment has been reversed. Set by Paddle when a `chargeback_reversal` or `credit_reversal` adjustment is created for this adjustment.
613 Reversed,
614}
615
616/// Three-letter ISO 4217 currency code for chargeback fees.
617#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
618#[cfg_attr(feature = "strum", derive(EnumString, Display))]
619#[non_exhaustive]
620pub enum CurrencyCodeChargebacks {
621 /// Australian Dollar
622 AUD,
623 /// Canadian Dollar
624 CAD,
625 /// Euro
626 EUR,
627 /// Pound Sterling
628 GBP,
629 /// United States Dollar
630 USD,
631}
632
633/// Supported three-letter ISO 4217 currency code for payouts from Paddle.
634#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
635#[cfg_attr(feature = "strum", derive(EnumString, Display))]
636#[non_exhaustive]
637pub enum CurrencyCodePayouts {
638 /// Australian Dollar
639 AUD,
640 /// Canadian Dollar
641 CAD,
642 /// Swiss Franc
643 CHF,
644 /// Chinese Yuan
645 CNY,
646 /// Czech Koruna
647 CZK,
648 /// Danish Krone
649 DKK,
650 /// Euro
651 EUR,
652 /// Pound Sterling
653 GBP,
654 /// Hungarian Forint
655 HUF,
656 /// Polish Zloty
657 PLN,
658 /// Swedish Krona
659 SEK,
660 /// United States Dollar
661 USD,
662 /// South African Rand
663 ZAR,
664}
665
666/// Type of adjustment for this transaction item. `tax` adjustments are automatically created by Paddle.
667/// Include `amount` when creating a `partial` adjustment.
668#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
669#[cfg_attr(feature = "strum", derive(EnumString, Display))]
670#[serde(rename_all = "lowercase")]
671#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
672#[non_exhaustive]
673pub enum AdjustmentItemType {
674 /// Full total for this transaction item is adjusted.
675 Full,
676 /// Part of this transaction item is adjusted. Include `amount` to specify the partial amount adjusted.
677 Partial,
678 /// Tax for this transaction item is adjusted. Created automatically by Paddle.
679 Tax,
680 /// A prorated amount for this transaction item is adjusted. Created automatically by Paddle in some cases when making changes to a subscription.
681 Proration,
682}
683
684/// Unit of time.
685#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
686#[cfg_attr(feature = "strum", derive(EnumString, Display))]
687#[serde(rename_all = "kebab-case")]
688#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
689#[non_exhaustive]
690pub enum Interval {
691 Day,
692 Week,
693 Month,
694 Year,
695}
696
697/// Type of credit or debit card used to pay.
698#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
699#[cfg_attr(feature = "strum", derive(EnumString, Display))]
700#[serde(rename_all = "snake_case")]
701#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
702#[non_exhaustive]
703pub enum CardType {
704 /// American Express
705 AmericanExpress,
706 /// Diners Club
707 DinersClub,
708 /// Discover Card
709 Discover,
710 /// JCB Card, popular in Japan
711 Jcb,
712 /// Mada Card, popular in Saudi Arabia
713 Mada,
714 /// Maestro (debit card)
715 Maestro,
716 /// Mastercard
717 Mastercard,
718 /// UnionPay, popular in China
719 UnionPay,
720 /// Card type unknown
721 Unknown,
722 /// Visa
723 Visa,
724}
725
726/// Type of item. Standard items are considered part of your catalog and are shown on the Paddle dashboard.
727#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
728#[cfg_attr(feature = "strum", derive(EnumString, Display))]
729#[serde(rename_all = "kebab-case")]
730#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
731#[non_exhaustive]
732pub enum CatalogType {
733 /// Non-catalog item. Typically created for a specific transaction or subscription. Not returned when listing or shown in the Paddle dashboard.
734 Custom,
735 /// Standard item. Can be considered part of your catalog and reused across transactions and subscriptions easily.
736 Standard,
737}
738
739/// How payment is collected. `automatic` for checkout, `manual` for invoices.
740#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
741#[cfg_attr(feature = "strum", derive(EnumString, Display))]
742#[serde(rename_all = "snake_case")]
743#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
744#[non_exhaustive]
745pub enum CollectionMode {
746 /// Payment is collected automatically using a checkout initially, then using a payment method on file.
747 Automatic,
748 /// Payment is collected manually. Customers are sent an invoice with payment terms and can make a payment offline or using a checkout. Requires `billing_details`.
749 Manual,
750}
751
752/// Type of payment method saved.
753#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
754#[cfg_attr(feature = "strum", derive(EnumString, Display))]
755#[serde(rename_all = "snake_case")]
756#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
757#[non_exhaustive]
758pub enum SavedPaymentMethodType {
759 /// Alipay, popular in China.
760 Alipay,
761 /// Apple Pay on a supported Apple device.
762 ApplePay,
763 /// Credit or debit card.
764 Card,
765 /// Google Pay on a supported Android device, Chromebook, or Google Chrome browser.
766 GooglePay,
767 /// PayPal.
768 Paypal,
769}
770
771/// Describes how this payment method was saved.
772#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
773#[cfg_attr(feature = "strum", derive(EnumString, Display))]
774#[serde(rename_all = "snake_case")]
775#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
776#[non_exhaustive]
777pub enum PaymentMethodOrigin {
778 /// The customer chose to save this payment method while purchasing a one-time item.
779 SavedDuringPurchase,
780 /// The customer purchased a subscription, so this payment method was saved for future purchases.
781 Subscription,
782}
783
784/// Whether this entity can be used in Paddle.
785#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
786#[cfg_attr(feature = "strum", derive(EnumString, Display))]
787#[serde(rename_all = "kebab-case")]
788#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
789#[non_exhaustive]
790pub enum DiscountStatus {
791 /// Entity is active and can be used.
792 Active,
793 /// Entity is archived, so can't be used.
794 Archived,
795}
796
797/// Type of discount. Determines how this discount impacts the checkout or transaction total.
798#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
799#[cfg_attr(feature = "strum", derive(EnumString, Display))]
800#[serde(rename_all = "snake_case")]
801#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
802#[non_exhaustive]
803pub enum DiscountType {
804 /// Discounts a checkout or transaction by a flat amount, for example -$100. Requires `currency_code`.
805 Flat,
806 /// Discounts a checkout or transaction by a flat amount per unit, for example -$100 per user. Requires `currency_code`.
807 FlatPerSeat,
808 /// Discounts a checkout or transaction by a percentage of the total, for example -10%. Maximum 100%.
809 Percentage,
810}
811
812/// When this subscription change should take effect from. Defaults to `next_billing_period`, which creates a
813/// `scheduled_change` to apply the subscription change at the end of the billing period.
814#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
815#[cfg_attr(feature = "strum", derive(EnumString, Display))]
816#[serde(rename_all = "snake_case")]
817#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
818#[non_exhaustive]
819pub enum EffectiveFrom {
820 /// Takes effect on the next billing period.
821 NextBillingPeriod,
822 /// Takes effect immediately.
823 Immediately,
824}
825
826/// Type of error encountered.
827#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
828#[cfg_attr(feature = "strum", derive(EnumString, Display))]
829#[non_exhaustive]
830pub enum Type {
831 /// Typically means there's a problem with the request that you made.
832 RequestError,
833 /// Typically means there's a problem with the Paddle API.
834 ApiError,
835}
836
837/// Reason why a payment attempt failed. Returns `null` if payment captured successfully.
838#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
839#[cfg_attr(feature = "strum", derive(EnumString, Display))]
840#[serde(rename_all = "snake_case")]
841#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
842#[non_exhaustive]
843pub enum ErrorCode {
844 /// Cancellation not possible because the amount has already been canceled. Not typically returned for payments.
845 AlreadyCanceled,
846 /// Refund is not possible because the amount has already been refunded. Not typically returned for payments.
847 AlreadyRefunded,
848 /// Payment required a 3DS2 authentication challenge. The customer completed the challenge but was not successful.
849 AuthenticationFailed,
850 /// Payment method issuer has indicated that the card cannot be used as it is frozen, lost, damaged, or stolen.
851 BlockedCard,
852 /// Customer has requested that the mandate for recurring payments be canceled.
853 Canceled,
854 /// Payment method has been declined, with no other information returned.
855 Declined,
856 /// Payment method has been declined, and the issuer has indicated that it should not be retried. This could mean the account is closed or the customer revoked authorization to charge the payment method.
857 DeclinedNotRetryable,
858 /// Payment method issuer has indicated that this card is expired. Expired cards may also return `invalid_payment_details`, depending on how a payment is routed.
859 ExpiredCard,
860 /// Payment method issuer or payment service provider flagged this payment as potentially fraudulent.
861 Fraud,
862 /// Payment method issuer or payment service provider cannot process a payment that is this high or low.
863 InvalidAmount,
864 /// Payment service provider has indicated the payment method isn't valid. This typically means that it's expired. `expired_card` is returned by the payment method issuer, rather than the payment service provider.
865 InvalidPaymentDetails,
866 /// Payment service provider couldn't reach the payment method issuer.
867 IssuerUnavailable,
868 /// Payment method declined because of insufficient funds, or fund limits being reached.
869 NotEnoughBalance,
870 /// Payment method has been declined because the network scheme that the customer selected isn't supported by the payment service provider.
871 PreferredNetworkNotSupported,
872 /// Something went wrong with the payment service provider, with no other information returned.
873 PspError,
874 /// Payment service provider didn't receive payment method information as they've been redacted.
875 RedactedPaymentMethod,
876 /// Something went wrong with the Paddle platform. Try again later, or check status.paddle.com.
877 SystemError,
878 /// Payment method issuer doesn't allow this kind of payment because of limits on the account, or legal or compliance reasons.
879 TransactionNotPermitted,
880 /// Payment attempt unsuccessful, with no other information returned.
881 Unknown,
882}
883
884/// Type of event sent by Paddle, in the format `entity.event_type`.
885#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
886#[cfg_attr(feature = "strum", derive(EnumString, Display))]
887#[non_exhaustive]
888pub enum EventTypeName {
889 /// An [`address.created`](https://developer.paddle.com/webhooks/addresses/address-created) event.
890 AddressCreated,
891 /// An [`address.imported`](https://developer.paddle.com/webhooks/addresses/address-imported) event.
892 AddressImported,
893 /// An [`address.updated`](https://developer.paddle.com/webhooks/addresses/address-updated) event.
894 AddressUpdated,
895 /// An [`adjustment.created`](https://developer.paddle.com/webhooks/adjustments/adjustment-created) event.
896 AdjustmentCreated,
897 /// An [`adjustment.updated`](https://developer.paddle.com/webhooks/adjustments/adjustment-updated) event.
898 AdjustmentUpdated,
899 /// A [`business.created`](https://developer.paddle.com/webhooks/businesses/business-created) event.
900 BusinessCreated,
901 /// A [`business.imported`](https://developer.paddle.com/webhooks/businesses/business-imported) event.
902 BusinessImported,
903 /// A [`business.updated`](https://developer.paddle.com/webhooks/businesses/business-updated) event.
904 BusinessUpdated,
905 /// A [`customer.created`](https://developer.paddle.com/webhooks/customers/customer-created) event.
906 CustomerCreated,
907 /// A [`customer.imported`](https://developer.paddle.com/webhooks/customers/customer-imported) event.
908 CustomerImported,
909 /// A [`customer.updated`](https://developer.paddle.com/webhooks/customers/customer-updated) event.
910 CustomerUpdated,
911 /// A [`discount.created`](https://developer.paddle.com/webhooks/discounts/discount-created) event.
912 DiscountCreated,
913 /// A [`discount.imported`](https://developer.paddle.com/webhooks/discounts/discount-imported) event.
914 DiscountImported,
915 /// A [`discount.updated`](https://developer.paddle.com/webhooks/discounts/discount-updated) event.
916 DiscountUpdated,
917 /// A [`payout.created`](https://developer.paddle.com/webhooks/payouts/payout-created) event.
918 PayoutCreated,
919 /// A [`payout.paid`](https://developer.paddle.com/webhooks/payouts/payout-paid) event.
920 PayoutPaid,
921 /// A [`price.created`](https://developer.paddle.com/webhooks/prices/price-created) event.
922 PriceCreated,
923 /// A [`price.imported`](https://developer.paddle.com/webhooks/prices/price-imported) event.
924 PriceImported,
925 /// A [`price.updated`](https://developer.paddle.com/webhooks/prices/price-updated) event.
926 PriceUpdated,
927 /// A [`product.created`](https://developer.paddle.com/webhooks/products/product-created) event.
928 ProductCreated,
929 /// A [`product.imported`](https://developer.paddle.com/webhooks/products/product-imported) event.
930 ProductImported,
931 /// A [`product.created`](https://developer.paddle.com/webhooks/products/product-updated) event.
932 ProductUpdated,
933 /// A [`report.created`](https://developer.paddle.com/webhooks/reports/report-created) event.
934 ReportCreated,
935 /// A [`report.updated`](https://developer.paddle.com/webhooks/reports/report-updated) event.
936 ReportUpdated,
937 /// A [`subscription.activated`](https://developer.paddle.com/webhooks/subscriptions/subscription-activated) event.
938 SubscriptionActivated,
939 /// A [`subscription.canceled`](https://developer.paddle.com/webhooks/subscriptions/subscription-canceled) event.
940 SubscriptionCanceled,
941 /// A [`subscription.created`](https://developer.paddle.com/webhooks/subscriptions/subscription-created) event.
942 SubscriptionCreated,
943 /// A [`subscription.imported`](https://developer.paddle.com/webhooks/subscriptions/subscription-imported) event.
944 SubscriptionImported,
945 /// A [`subscription.past_due`](https://developer.paddle.com/webhooks/subscriptions/subscription-past-due) event.
946 SubscriptionPastDue,
947 /// A [`subscription.paused`](https://developer.paddle.com/webhooks/subscriptions/subscription-paused) event.
948 SubscriptionPaused,
949 /// A [`subscription.resumed`](https://developer.paddle.com/webhooks/subscriptions/subscription-resumed) event.
950 SubscriptionResumed,
951 /// A [`subscription.trialing`](https://developer.paddle.com/webhooks/subscriptions/subscription-trialing) event.
952 SubscriptionTrialing,
953 /// A [`subscription.updated`](https://developer.paddle.com/webhooks/subscriptions/subscription-updated) event.
954 SubscriptionUpdated,
955 /// A [`transaction.billed`](https://developer.paddle.com/webhooks/transactions/transaction-billed) event.
956 TransactionBilled,
957 /// A [`transaction.canceled`](https://developer.paddle.com/webhooks/transactions/transaction-canceled) event.
958 TransactionCanceled,
959 /// A [`transaction.completed`](https://developer.paddle.com/webhooks/transactions/transaction-completed) event.
960 TransactionCompleted,
961 /// A [`transaction.created`](https://developer.paddle.com/webhooks/transactions/transaction-created) event.
962 TransactionCreated,
963 /// A [`transaction.paid`](https://developer.paddle.com/webhooks/transactions/transaction-paid) event.
964 TransactionPaid,
965 /// A [`transaction.past_due`](https://developer.paddle.com/webhooks/transactions/transaction-past-due) event.
966 TransactionPastDue,
967 /// A [`transaction.payment_failed`](https://developer.paddle.com/webhooks/transactions/transaction-payment-failed) event.
968 TransactionPaymentFailed,
969 /// A [`transaction.ready`](https://developer.paddle.com/webhooks/transactions/transaction-ready) event.
970 TransactionReady,
971 /// A [`transaction.updated`](https://developer.paddle.com/webhooks/transactions/transaction-updated) event.
972 TransactionUpdated,
973}
974
975/// Type of event sent by Paddle along with it's corresponding entity data
976#[allow(clippy::large_enum_variant)]
977#[derive(Clone, Debug, Serialize, Deserialize)]
978#[serde(tag = "event_type", content = "data")]
979pub enum EventData {
980 /// An [`address.created`](https://developer.paddle.com/webhooks/addresses/address-created) event.
981 #[serde(rename = "address.created")]
982 AddressCreated(crate::entities::Address),
983 /// An [`address.imported`](https://developer.paddle.com/webhooks/addresses/address-imported) event.
984 #[serde(rename = "address.imported")]
985 AddressImported(crate::entities::Address),
986 /// An [`address.updated`](https://developer.paddle.com/webhooks/addresses/address-updated) event.
987 #[serde(rename = "address.updated")]
988 AddressUpdated(crate::entities::Address),
989 /// An [`adjustment.created`](https://developer.paddle.com/webhooks/adjustments/adjustment-created) event.
990 #[serde(rename = "adjustment.created")]
991 AdjustmentCreated(crate::entities::Adjustment),
992 /// An [`adjustment.updated`](https://developer.paddle.com/webhooks/adjustments/adjustment-updated) event.
993 #[serde(rename = "adjustment.updated")]
994 AdjustmentUpdated(crate::entities::Adjustment),
995 /// A [`api_key.created`](https://developer.paddle.com/webhooks/api-keys/api-key-created) event.
996 #[serde(rename = "api_key.created")]
997 ApiKeyCreated(crate::entities::ApiKey),
998 /// A [`api_key.updated`](https://developer.paddle.com/webhooks/api-keys/api-key-updated) event.
999 #[serde(rename = "api_key.updated")]
1000 ApiKeyUpdated(crate::entities::ApiKey),
1001 /// A [`api_key.expiring`](https://developer.paddle.com/webhooks/api-keys/api-key-expiring) event.
1002 #[serde(rename = "api_key.expiring")]
1003 ApiKeyExpiring(crate::entities::ApiKey),
1004 /// A [`api_key.expired`](https://developer.paddle.com/webhooks/api-keys/api-key-expired) event.
1005 #[serde(rename = "api_key.expired")]
1006 ApiKeyExpired(crate::entities::ApiKey),
1007 /// A [`api_key.revoked`](https://developer.paddle.com/webhooks/api-keys/api-key-revoked) event.
1008 #[serde(rename = "api_key.revoked")]
1009 ApiKeyRevoked(crate::entities::ApiKey),
1010 /// A [`business.created`](https://developer.paddle.com/webhooks/businesses/business-created) event.
1011 #[serde(rename = "business.created")]
1012 BusinessCreated(crate::entities::Business),
1013 /// A [`business.imported`](https://developer.paddle.com/webhooks/businesses/business-imported) event.
1014 #[serde(rename = "business.imported")]
1015 BusinessImported(crate::entities::Business),
1016 /// A [`business.updated`](https://developer.paddle.com/webhooks/businesses/business-updated) event.
1017 #[serde(rename = "business.updated")]
1018 BusinessUpdated(crate::entities::Business),
1019 /// A [`customer.created`](https://developer.paddle.com/webhooks/customers/customer-created) event.
1020 #[serde(rename = "customer.created")]
1021 CustomerCreated(crate::entities::Customer),
1022 /// A [`customer.imported`](https://developer.paddle.com/webhooks/customers/customer-imported) event.
1023 #[serde(rename = "customer.imported")]
1024 CustomerImported(crate::entities::Customer),
1025 /// A [`customer.updated`](https://developer.paddle.com/webhooks/customers/customer-updated) event.
1026 #[serde(rename = "customer.updated")]
1027 CustomerUpdated(crate::entities::Customer),
1028 /// A [`discount.created`](https://developer.paddle.com/webhooks/discounts/discount-created) event.
1029 #[serde(rename = "discount.created")]
1030 DiscountCreated(crate::entities::Discount),
1031 /// A [`discount.imported`](https://developer.paddle.com/webhooks/discounts/discount-imported) event.
1032 #[serde(rename = "discount.imported")]
1033 DiscountImported(crate::entities::Discount),
1034 /// A [`discount.updated`](https://developer.paddle.com/webhooks/discounts/discount-updated) event.
1035 #[serde(rename = "discount.updated")]
1036 DiscountUpdated(crate::entities::Discount),
1037 /// A [`payment_method.saved`](https://developer.paddle.com/webhooks/payment-methods/payment-method-saved) event.
1038 #[serde(rename = "payment_method.saved")]
1039 PaymentMethodSaved(crate::entities::PaymentMethod),
1040 /// A [`payment_method.deleted`](https://developer.paddle.com/webhooks/payment-methods/payment-method-deleted) event.
1041 #[serde(rename = "payment_method.deleted")]
1042 PaymentMethodDeleted(crate::entities::PaymentMethod),
1043 /// A [`payout.created`](https://developer.paddle.com/webhooks/payouts/payout-created) event.
1044 #[serde(rename = "payout.created")]
1045 PayoutCreated(crate::entities::Payout),
1046 /// A [`payout.paid`](https://developer.paddle.com/webhooks/payouts/payout-paid) event.
1047 #[serde(rename = "payout.paid")]
1048 PayoutPaid(crate::entities::Payout),
1049 /// A [`price.created`](https://developer.paddle.com/webhooks/prices/price-created) event.
1050 #[serde(rename = "price.created")]
1051 PriceCreated(crate::entities::Price),
1052 /// A [`price.imported`](https://developer.paddle.com/webhooks/prices/price-imported) event.
1053 #[serde(rename = "price.imported")]
1054 PriceImported(crate::entities::Price),
1055 /// A [`price.updated`](https://developer.paddle.com/webhooks/prices/price-updated) event.
1056 #[serde(rename = "price.updated")]
1057 PriceUpdated(crate::entities::Price),
1058 /// A [`product.created`](https://developer.paddle.com/webhooks/products/product-created) event.
1059 #[serde(rename = "product.created")]
1060 ProductCreated(crate::entities::Product),
1061 /// A [`product.imported`](https://developer.paddle.com/webhooks/products/product-imported) event.
1062 #[serde(rename = "product.imported")]
1063 ProductImported(crate::entities::Product),
1064 /// A [`product.updated`](https://developer.paddle.com/webhooks/products/product-updated) event.
1065 #[serde(rename = "product.updated")]
1066 ProductUpdated(crate::entities::Product),
1067 /// A [`report.created`](https://developer.paddle.com/webhooks/reports/report-created) event.
1068 #[serde(rename = "report.created")]
1069 ReportCreated(crate::entities::ReportBase),
1070 /// A [`report.updated`](https://developer.paddle.com/webhooks/reports/report-updated) event.
1071 #[serde(rename = "report.updated")]
1072 ReportUpdated(crate::entities::ReportBase),
1073 /// A [`subscription.activated`](https://developer.paddle.com/webhooks/subscriptions/subscription-activated) event.
1074 #[serde(rename = "subscription.activated")]
1075 SubscriptionActivated(crate::entities::Subscription),
1076 /// A [`subscription.canceled`](https://developer.paddle.com/webhooks/subscriptions/subscription-canceled) event.
1077 #[serde(rename = "subscription.canceled")]
1078 SubscriptionCanceled(crate::entities::Subscription),
1079 /// A [`subscription.created`](https://developer.paddle.com/webhooks/subscriptions/subscription-created) event.
1080 #[serde(rename = "subscription.created")]
1081 SubscriptionCreated(crate::entities::Subscription),
1082 /// A [`subscription.imported`](https://developer.paddle.com/webhooks/subscriptions/subscription-imported) event.
1083 #[serde(rename = "subscription.imported")]
1084 SubscriptionImported(crate::entities::Subscription),
1085 /// A [`subscription.past_due`](https://developer.paddle.com/webhooks/subscriptions/subscription-past-due) event.
1086 #[serde(rename = "subscription.past_due")]
1087 SubscriptionPastDue(crate::entities::Subscription),
1088 /// A [`subscription.paused`](https://developer.paddle.com/webhooks/subscriptions/subscription-paused) event.
1089 #[serde(rename = "subscription.paused")]
1090 SubscriptionPaused(crate::entities::Subscription),
1091 /// A [`subscription.resumed`](https://developer.paddle.com/webhooks/subscriptions/subscription-resumed) event.
1092 #[serde(rename = "subscription.resumed")]
1093 SubscriptionResumed(crate::entities::Subscription),
1094 /// A [`subscription.trialing`](https://developer.paddle.com/webhooks/subscriptions/subscription-trialing) event.
1095 #[serde(rename = "subscription.trialing")]
1096 SubscriptionTrialing(crate::entities::Subscription),
1097 /// A [`subscription.updated`](https://developer.paddle.com/webhooks/subscriptions/subscription-updated) event.
1098 #[serde(rename = "subscription.updated")]
1099 SubscriptionUpdated(crate::entities::Subscription),
1100 /// A [`transaction.billed`](https://developer.paddle.com/webhooks/transactions/transaction-billed) event.
1101 #[serde(rename = "transaction.billed")]
1102 TransactionBilled(crate::entities::Transaction),
1103 /// A [`transaction.canceled`](https://developer.paddle.com/webhooks/transactions/transaction-canceled) event.
1104 #[serde(rename = "transaction.canceled")]
1105 TransactionCanceled(crate::entities::Transaction),
1106 /// A [`transaction.completed`](https://developer.paddle.com/webhooks/transactions/transaction-completed) event.
1107 #[serde(rename = "transaction.completed")]
1108 TransactionCompleted(crate::entities::Transaction),
1109 /// A [`transaction.created`](https://developer.paddle.com/webhooks/transactions/transaction-created) event.
1110 #[serde(rename = "transaction.created")]
1111 TransactionCreated(crate::entities::Transaction),
1112 /// A [`transaction.paid`](https://developer.paddle.com/webhooks/transactions/transaction-paid) event.
1113 #[serde(rename = "transaction.paid")]
1114 TransactionPaid(crate::entities::Transaction),
1115 /// A [`transaction.past_due`](https://developer.paddle.com/webhooks/transactions/transaction-past-due) event.
1116 #[serde(rename = "transaction.past_due")]
1117 TransactionPastDue(crate::entities::Transaction),
1118 /// A [`transaction.payment_failed`](https://developer.paddle.com/webhooks/transactions/transaction-payment-failed) event.
1119 #[serde(rename = "transaction.payment_failed")]
1120 TransactionPaymentFailed(crate::entities::Transaction),
1121 /// A [`transaction.ready`](https://developer.paddle.com/webhooks/transactions/transaction-ready) event.
1122 #[serde(rename = "transaction.ready")]
1123 TransactionReady(crate::entities::Transaction),
1124 /// A [`transaction.revised`](https://developer.paddle.com/webhooks/transactions/transaction-revised) event.
1125 #[serde(rename = "transaction.revised")]
1126 TransactionRevised(crate::entities::Transaction),
1127 /// A [`transaction.updated`](https://developer.paddle.com/webhooks/transactions/transaction-updated) event.
1128 #[serde(rename = "transaction.updated")]
1129 TransactionUpdated(crate::entities::Transaction),
1130}
1131
1132/// Status of this subscription item. Set automatically by Paddle.
1133#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1134#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1135#[serde(rename_all = "lowercase")]
1136#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1137#[non_exhaustive]
1138pub enum SubscriptionItemStatus {
1139 /// This item is active. It is not in trial and Paddle bills for it.
1140 Active,
1141 /// This item is not active. Set when the related subscription is paused.
1142 Inactive,
1143 /// This item is in trial. Paddle has not billed for it.
1144 Trialing,
1145}
1146
1147/// How tax is calculated for this price.
1148#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1149#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1150#[serde(rename_all = "snake_case")]
1151#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1152#[non_exhaustive]
1153pub enum TaxMode {
1154 /// Prices use the setting from your account.
1155 AccountSetting,
1156 /// Prices are exclusive of tax.
1157 External,
1158 /// Prices are inclusive of tax.
1159 Internal,
1160 /// Prices are inclusive or exclusive of tax, depending on the country of the transaction.
1161 Location,
1162}
1163
1164/// Tax category for this product. Used for charging the correct rate of tax. Selected tax category must be enabled on your Paddle account.
1165#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1166#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1167#[serde(rename_all = "kebab-case")]
1168#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
1169#[non_exhaustive]
1170pub enum TaxCategory {
1171 /// Non-customizable digital files or media (not software) acquired with an up front payment that can be accessed without any physical product being delivered.
1172 DigitalGoods,
1173 /// Digital books and educational material which is sold with permanent rights for use by the customer.
1174 Ebooks,
1175 /// Remote configuration, set-up, and integrating software on behalf of a customer.
1176 ImplementationServices,
1177 /// Services that involve the application of your expertise and specialized knowledge of a software product.
1178 ProfessionalServices,
1179 /// Products that allow users to connect to and use online or cloud-based applications over the Internet.
1180 Saas,
1181 /// Services that can be used to customize and white label software products.
1182 SoftwareProgrammingServices,
1183 /// Software products that are pre-written and can be downloaded and installed onto a local device.
1184 Standard,
1185 /// Training and education services related to software products.
1186 TrainingServices,
1187 /// Cloud storage service for personal or corporate information, assets, or intellectual property.
1188 WebsiteHosting,
1189}
1190
1191impl AsRef<str> for TaxCategory {
1192 fn as_ref(&self) -> &str {
1193 match self {
1194 Self::DigitalGoods => "digital-goods",
1195 Self::Ebooks => "ebooks",
1196 Self::ImplementationServices => "implementation-services",
1197 Self::ProfessionalServices => "professional-services",
1198 Self::Saas => "saas",
1199 Self::SoftwareProgrammingServices => "software-programming-services",
1200 Self::Standard => "standard",
1201 Self::TrainingServices => "training-services",
1202 Self::WebsiteHosting => "website-hosting",
1203 }
1204 }
1205}
1206
1207/// Type of payment method used for this payment attempt.
1208#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1209#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1210#[serde(rename_all = "snake_case")]
1211#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1212#[non_exhaustive]
1213pub enum PaymentMethodType {
1214 /// Alipay, popular in China.
1215 Alipay,
1216 /// Apple Pay on a supported Apple device.
1217 ApplePay,
1218 /// Bancontact, popular in Belgium.
1219 Bancontact,
1220 /// Credit or debit card.
1221 Card,
1222 /// Google Pay on a supported Android device, Chromebook, or Google Chrome browser.
1223 GooglePay,
1224 /// iDEAL, popular in the Netherlands.
1225 Ideal,
1226 /// Payment recorded offline.
1227 Offline,
1228 /// PayPal.
1229 Paypal,
1230 /// Payment method not known.
1231 Unknown,
1232 /// Wire transfer, sometimes called bank transfer.
1233 WireTransfer,
1234}
1235
1236/// Status of this notification.
1237#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1238#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1239#[non_exhaustive]
1240pub enum NotificationStatus {
1241 /// Paddle hasn't yet tried to deliver this notification.
1242 NotAttempted,
1243 /// Paddle tried to deliver this notification, but it failed. It's scheduled to be retried.
1244 NeedsRetry,
1245 /// Paddle delivered this notification successfully.
1246 Delivered,
1247 /// Paddle tried to deliver this notification, but all attempts failed. It's not scheduled to be retried.
1248 Failed,
1249}
1250
1251/// Describes how this notification was created.
1252#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1253#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1254#[non_exhaustive]
1255pub enum NotificationOrigin {
1256 /// Notification created when a subscribed event occurred.
1257 Event,
1258 /// Notification created when a notification with the origin `event` was replayed.
1259 Replay,
1260}
1261
1262/// Where notifications should be sent for this destination.
1263#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1264#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1265#[non_exhaustive]
1266pub enum NotificationSettingType {
1267 /// Deliver to an email address.
1268 Email,
1269 /// Deliver to a webhook endpoint.
1270 Url,
1271}
1272
1273/// Whether Paddle should deliver real platform events, simulation events or both to this notification destination.
1274#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1275#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1276#[non_exhaustive]
1277pub enum TrafficSource {
1278 /// Deliver real platform events to this notification destination.
1279 Platform,
1280 /// Deliver simulation events to this notification destination.
1281 Simulation,
1282 /// Deliver platform and simulation events to this notification destination.
1283 All,
1284}
1285
1286/// Operator to use when filtering.
1287#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1288#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1289#[serde(rename_all = "lowercase")]
1290#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1291#[non_exhaustive]
1292pub enum FilterOperator {
1293 /// Less than.
1294 Lt,
1295 /// Greater than or equal to.
1296 Gte,
1297}
1298
1299#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1300#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1301#[serde(rename_all = "snake_case")]
1302#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1303#[non_exhaustive]
1304pub enum TransactionOrigin {
1305 /// Transaction created via the Paddle API.
1306 Api,
1307 /// Transaction created automatically by Paddle as a result of a one-time charge for a subscription.
1308 SubscriptionCharge,
1309 /// Transaction created automatically as part of updating a payment method. May be a zero value transaction.
1310 SubscriptionPaymentMethodChange,
1311 /// Transaction created automatically by Paddle as a result of a subscription renewal.
1312 SubscriptionRecurring,
1313 /// Transaction created automatically by Paddle as a result of an update to a subscription.
1314 SubscriptionUpdate,
1315 /// Transaction created automatically by Paddle.js for a checkout.
1316 Web,
1317}
1318
1319/// Status of this report. Set automatically by Paddle.
1320///
1321/// Reports are created as `pending` initially, then move to `ready` when they're available to download.
1322#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1323#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1324#[serde(rename_all = "snake_case")]
1325#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1326#[non_exhaustive]
1327pub enum ReportStatus {
1328 /// Report created, but Paddle is processing it. It's not yet ready for download.
1329 Pending,
1330 /// Report fully processed by Paddle and ready for download.
1331 Ready,
1332 /// There was a problem processing this report.
1333 Failed,
1334 /// Report has expired and is no longer accessible.
1335 Expired,
1336}
1337
1338/// Field name to filter by.
1339#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1340#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1341#[serde(rename_all = "snake_case")]
1342#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1343#[non_exhaustive]
1344pub enum AdjustmentsReportFilterName {
1345 /// Filter by adjustment action. Pass an array of strings containing any valid value for the `action` field against an adjustment.
1346 Action,
1347 /// Filter by transaction or adjustment currency. Pass an array of strings containing any valid supported three-letter ISO 4217 currency code.
1348 CurrencyCode,
1349 /// Filter by transaction or adjustment status. Pass an array of strings containing any valid value for the `status` field against a transaction or an adjustment.
1350 Status,
1351 /// Filter by transaction or adjustment updated date. Pass an RFC 3339 datetime string.
1352 UpdatedAt,
1353}
1354
1355/// Field name to filter by.
1356#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1357#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1358#[serde(rename_all = "snake_case")]
1359#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1360#[non_exhaustive]
1361pub enum DiscountsReportFilterName {
1362 /// Filter by discount type. Pass an array of strings containing any valid value for the `type` field against a discount.
1363 Type,
1364 /// Filter by discount status. Pass an array of strings containing any valid value for the `status` field against a discount.
1365 Status,
1366 /// Filter by discount updated date. Pass an RFC 3339 datetime string.
1367 UpdatedAt,
1368}
1369
1370/// Field name to filter by.
1371#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1372#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1373#[serde(rename_all = "snake_case")]
1374#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1375#[non_exhaustive]
1376pub enum BalanceReportFilterName {
1377 /// Filter by discount updated date. Pass an RFC 3339 datetime string.
1378 UpdatedAt,
1379}
1380
1381/// Field name to filter by.
1382#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1383#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1384#[serde(rename_all = "snake_case")]
1385#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1386#[non_exhaustive]
1387pub enum ProductPricesReportFilterName {
1388 /// Filter by product status. Pass an array of strings containing any valid value for the `status` field against a product.
1389 ProductStatus,
1390 /// Filter by price status. Pass an array of strings containing any valid value for the `status` field against a price.
1391 PriceStatus,
1392 /// Filter by product type. Pass an array of strings containing any valid value for the `type` field against a product.
1393 ProductType,
1394 /// Filter by price type. Pass an array of strings containing any valid value for the `type` field against a price.
1395 PriceType,
1396 /// Filter by product `updated_at` date. Pass an RFC 3339 datetime string.
1397 ProductUpdatedAt,
1398 /// Filter by price `updated_at` date. Pass an RFC 3339 datetime string.
1399 PriceUpdatedAt,
1400}
1401
1402/// Field name to filter by.
1403#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1404#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1405#[serde(rename_all = "snake_case")]
1406#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1407#[non_exhaustive]
1408pub enum TransactionsReportFilterName {
1409 /// Filter by collection mode. Pass an array of strings containing any valid value for the `collection_mode` field against a transaction.
1410 CollectionMode,
1411 /// Filter by transaction or adjustment currency. Pass an array of strings containing any valid supported three-letter ISO 4217 currency code.
1412 CurrencyCode,
1413 /// Filter by transaction origin. Pass an array of strings containing any valid value for the origin field against a transaction.
1414 Origin,
1415 /// Filter by transaction or adjustment status. Pass an array of strings containing any valid value for the `status` field against a transaction or an adjustment.
1416 Status,
1417 /// Filter by transaction or adjustment updated date. Pass an RFC 3339 datetime string.
1418 UpdatedAt,
1419}
1420
1421/// Type of report.
1422#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1423#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1424#[serde(rename_all = "snake_case")]
1425#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1426#[non_exhaustive]
1427pub enum AdjustmentsReportType {
1428 /// Adjustments reports contain information about refunds, credits, and chargebacks.
1429 Adjustments,
1430 /// Adjustments reports contain information about refunds, credits, and chargebacks. The report is broken down by line item level.
1431 AdjustmentLineItems,
1432}
1433
1434impl ReportType for AdjustmentsReportType {
1435 type FilterName = AdjustmentsReportFilterName;
1436}
1437
1438/// Type of report.
1439#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1440#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1441#[serde(rename_all = "snake_case")]
1442#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1443#[non_exhaustive]
1444pub enum TransactionsReportType {
1445 /// Transactions reports contain information about revenue received, past due invoices, draft and issued invoices, and canceled transactions.
1446 Transactions,
1447 /// Transactions reports contain information about revenue received, past due invoices, draft and issued invoices, and canceled transactions. The report is broken down by line item level.
1448 TransactionLineItems,
1449}
1450
1451impl ReportType for TransactionsReportType {
1452 type FilterName = TransactionsReportFilterName;
1453}
1454
1455/// Type of report.
1456#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1457#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1458#[serde(rename_all = "snake_case")]
1459#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1460#[non_exhaustive]
1461pub enum ProductsAndPricesReportType {
1462 /// Products and prices reports contain information about your products and prices. May include non-catalog products and prices.
1463 ProductsPrices,
1464}
1465
1466impl ReportType for ProductsAndPricesReportType {
1467 type FilterName = ProductPricesReportFilterName;
1468}
1469
1470/// Type of report.
1471#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1472#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1473#[serde(rename_all = "snake_case")]
1474#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1475#[non_exhaustive]
1476pub enum DiscountsReportType {
1477 /// Discounts reports contain information about your product and checkout discounts.
1478 Discounts,
1479}
1480
1481impl ReportType for DiscountsReportType {
1482 type FilterName = DiscountsReportFilterName;
1483}
1484
1485/// Type of report.
1486#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1487#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1488#[serde(rename_all = "snake_case")]
1489#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1490#[non_exhaustive]
1491pub enum BalanceReportType {
1492 /// Balance reports contain information about your account balance activity, including all movements of funds in and out of your balance.
1493 Balance,
1494}
1495
1496impl ReportType for BalanceReportType {
1497 type FilterName = BalanceReportFilterName;
1498}
1499
1500/// Status of this simulation run log.
1501#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1502#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1503#[non_exhaustive]
1504pub enum SimulationEventStatus {
1505 /// Simulation run log is pending. Paddle hasn't yet tried to deliver the simulated event.
1506 Pending,
1507 /// Simulation run log was successful. Paddle delivered the simulated event successfully.
1508 Success,
1509 /// Simulation run log failed. Paddle tried to deliver the simulated event, but it failed. If `response` object is `null`, no response received from your server. Check your notification setting endpoint configuration.
1510 Failed,
1511 /// Simulation run log aborted. Paddle could not attempt delivery of the simulated event.
1512 Aborted,
1513}
1514
1515/// Status of this simulation run.
1516#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1517#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1518#[non_exhaustive]
1519pub enum SimulationRunStatus {
1520 /// Simulation run is pending. Paddle is sending events that are part of this simulation.
1521 Pending,
1522 /// Simulation run is completed. Paddle attempted to send events that are part of this simulation.
1523 Completed,
1524 /// Simulation run is canceled. Simulation run was canceled before all events were sent.
1525 Canceled,
1526}
1527
1528/// Scenario for a simulation.
1529#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1530#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1531#[non_exhaustive]
1532pub enum SimulationScenarioType {
1533 /// Simulates all events sent when a subscription is created.
1534 SubscriptionCreation,
1535 /// Simulates all events sent when a subscription is renewed.
1536 SubscriptionRenewal,
1537 /// Simulates all events sent when a subscription is paused.
1538 SubscriptionPause,
1539 /// Simulates all events sent when a subscription is resumed.
1540 SubscriptionResume,
1541 /// Simulates all events sent when a subscription is canceled.
1542 SubscriptionCancellation,
1543}
1544
1545/// Type of simulation.
1546#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1547#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1548#[non_exhaustive]
1549pub enum SimulationKind {
1550 /// Paddle simulates a single event.
1551 SingleEvent,
1552 /// Paddle simulates a predefined series of events for a scenario, like all events created when a subscription renews.
1553 Scenario,
1554}
1555
1556/// Status of this payment attempt.
1557#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1558#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1559#[serde(rename_all = "snake_case")]
1560#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1561#[non_exhaustive]
1562pub enum PaymentAttemptStatus {
1563 /// Authorized but not captured. Payment attempt is incomplete.
1564 Authorized,
1565 /// Authorized but not captured because it has been flagged as potentially fraudulent. Payment attempt is incomplete.
1566 AuthorizedFlagged,
1567 /// Previously authorized payment attempt has been canceled. Typically when `authorized_flagged` payment attempts are rejected.
1568 Canceled,
1569 /// Payment captured successfully. Payment attempt is complete.
1570 Captured,
1571 /// Something went wrong and the payment attempt was unsuccessful. Check the `error_code` for more information.
1572 Error,
1573 /// Customer must complete an action for this payment attempt to proceed. Typically means that the payment attempt requires 3DS.
1574 ActionRequired,
1575 /// Response required from the bank or payment provider. Transaction is pending.
1576 PendingNoActionRequired,
1577 /// New payment attempt created.
1578 Created,
1579 /// Payment attempt status not known.
1580 Unknown,
1581 /// Payment attempt dropped by Paddle.
1582 Dropped,
1583}
1584
1585/// Status of this subscription. Set automatically by Paddle. Use the pause subscription or cancel subscription operations to change.
1586#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1587#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1588#[serde(rename_all = "snake_case")]
1589#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1590#[non_exhaustive]
1591pub enum SubscriptionStatus {
1592 /// Subscription is active. Paddle is billing for this subscription and related transactions aren't past due.
1593 Active,
1594 /// Subscription is canceled. Automatically set by Paddle when a subscription is canceled. When a subscription is set to cancel on the next billing period, a scheduled change for the cancellation is created. The subscription status moves to canceled when the scheduled change takes effect.
1595 Canceled,
1596 /// Subscription has an overdue payment. Automatically set by Paddle when payment fails for an automatically-collected transaction, or when payment terms have elapsed for a manually-collected transaction (an invoice).
1597 PastDue,
1598 /// Subscription is paused. Automatically set by Paddle when a subscription is paused. When a subscription is set to pause on the next billing period, a scheduled change for the pause is created. The subscription status moves to `paused` when the scheduled change takes effect.
1599 Paused,
1600 /// Subscription is in trial.
1601 Trialing,
1602}
1603
1604/// Status of this transaction. You may set a transaction to `billed` or `canceled`, other statuses are set automatically by Paddle. Automatically-collected transactions may return `completed` if payment is captured successfully, or `past_due` if payment failed.
1605#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1606#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1607#[serde(rename_all = "snake_case")]
1608#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1609#[non_exhaustive]
1610pub enum TransactionStatus {
1611 /// Transaction is missing required fields. Typically the first stage of a checkout before customer details are captured.
1612 Draft,
1613 /// Transaction has all of the required fields to be marked as `billed` or `completed`.
1614 Ready,
1615 /// Transaction has been updated to `billed`. Billed transactions get an invoice number and are considered a legal record. They cannot be changed. Typically used as part of an invoice workflow.
1616 Billed,
1617 /// Transaction is fully paid, but has not yet been processed internally.
1618 Paid,
1619 /// Transaction is fully paid and processed.
1620 Completed,
1621 /// Transaction has been updated to `canceled`. If an invoice, it's no longer due.
1622 Canceled,
1623 /// Transaction is past due. Occurs for automatically-collected transactions when the related subscription is in dunning, and for manually-collected transactions when payment terms have elapsed.
1624 PastDue,
1625}
1626
1627/// Kind of change that's scheduled to be applied to this subscription.
1628#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1629#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1630#[serde(rename_all = "lowercase")]
1631#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1632#[non_exhaustive]
1633pub enum ScheduledChangeAction {
1634 /// Subscription is scheduled to cancel. Its status changes to `canceled` on the `effective_at` date.
1635 Cancel,
1636 /// Subscription is scheduled to pause. Its status changes to `pause` on the `effective_at` date.
1637 Pause,
1638 /// Subscription is scheduled to resume. Its status changes to `active` on the `resume_at` date.
1639 Resume,
1640}
1641
1642/// How Paddle should handle changes made to a subscription or its items if the payment fails during update. If omitted, defaults to `prevent_change`.
1643#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1644#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1645#[serde(rename_all = "snake_case")]
1646#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1647#[non_exhaustive]
1648pub enum SubscriptionOnPaymentFailure {
1649 /// In case of payment failure, prevent the change to the subscription from applying.
1650 PreventChange,
1651 /// In case of payment failure, apply the change and update the subscription.
1652 ApplyChange,
1653}
1654
1655/// Whether the subscription change results in a prorated credit or a charge.
1656#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1657#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1658#[serde(rename_all = "lowercase")]
1659#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1660#[non_exhaustive]
1661pub enum UpdateSummaryResultAction {
1662 /// Changes to the subscription results in a prorated credit.
1663 Credit,
1664 /// Changes to the subscription results in a prorated charge.
1665 Charge,
1666}
1667
1668/// How Paddle should handle proration calculation for changes made to a subscription or its items. Required when making
1669/// changes that impact billing.
1670///
1671/// For automatically-collected subscriptions, responses may take longer than usual if a proration billing mode that
1672/// collects for payment immediately is used.
1673#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1674#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1675#[serde(rename_all = "snake_case")]
1676#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1677#[non_exhaustive]
1678pub enum ProrationBillingMode {
1679 /// Paddle calculates the prorated amount for the subscription changes based on the current billing cycle, then
1680 /// creates a transaction to collect immediately.
1681 ProratedImmediately,
1682 /// Paddle calculates the prorated amount for the subscription changes based on the current billing cycle, then
1683 /// schedules them to be billed on the next renewal.
1684 ProratedNextBillingPeriod,
1685 /// Paddle does not calculate proration for the subscription changes, creating a transaction to collect for the full
1686 /// amount immediately.
1687 FullImmediately,
1688 /// Paddle does not calculate proration for the subscription changes, scheduling for the full amount for the changes
1689 /// to be billed on the next renewal.
1690 FullNextBillingPeriod,
1691 /// Paddle does not bill for the subscription changes.
1692 DoNotBill,
1693}
1694
1695/// How Paddle should set the billing period for the subscription when resuming. If omitted, defaults to `start_new_billing_period`.
1696#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1697#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1698#[serde(rename_all = "snake_case")]
1699#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1700#[non_exhaustive]
1701pub enum SubscriptionOnResume {
1702 /// When resuming, continue the existing billing period. If the customer resumes before the end date of the existing billing period, there's no immediate charge. If after, an error is returned.
1703 ContinueExistingBillingPeriod,
1704 /// When resuming, start a new billing period. The `current_billing_period.starts_at` date is set to the resume date, and Paddle immediately charges the full amount for the new billing period.
1705 StartNewBillingPeriod,
1706}
1707
1708/// Determine whether the generated URL should download the PDF as an attachment saved locally, or open it inline in the browser.
1709#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1710#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1711#[serde(rename_all = "lowercase")]
1712#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1713#[non_exhaustive]
1714pub enum Disposition {
1715 /// Generated URL downloads the PDF as an attachment. Browsers typically automatically save the PDF.
1716 Attachment,
1717 /// Generated URL displays the PDF inline in the browser. Browsers typically open the PDF in the current tab.
1718 Inline,
1719}
1720
1721#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1722#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1723#[serde(rename_all = "lowercase")]
1724#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1725#[non_exhaustive]
1726pub enum PayoutStatus {
1727 /// Payout is paid.
1728 Paid,
1729 /// Payout is unpaid. Typically means it has been created, but is not yet completed.
1730 Unpaid,
1731}
1732
1733#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1734#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1735#[serde(rename_all = "lowercase")]
1736#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1737#[non_exhaustive]
1738pub enum ApiKeyStatus {
1739 Active,
1740 Expired,
1741 Revoked,
1742}
1743
1744/// Include related entities in the response.
1745#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1746#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1747#[serde(rename_all = "snake_case")]
1748#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1749#[non_exhaustive]
1750pub enum SubscriptionInclude {
1751 /// Include an object with a preview of the next transaction for this subscription. May include prorated charges that aren't yet billed and one-time charges.
1752 NextTransaction,
1753 /// Include an object with a preview of the recurring transaction for this subscription. This is what the customer can expect to be billed when there are no prorated or one-time charges.
1754 RecurringTransactionDetails,
1755}