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}
1161
1162/// Tax category for this product. Used for charging the correct rate of tax. Selected tax category must be enabled on your Paddle account.
1163#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1164#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1165#[serde(rename_all = "kebab-case")]
1166#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
1167#[non_exhaustive]
1168pub enum TaxCategory {
1169 /// Non-customizable digital files or media (not software) acquired with an up front payment that can be accessed without any physical product being delivered.
1170 DigitalGoods,
1171 /// Digital books and educational material which is sold with permanent rights for use by the customer.
1172 Ebooks,
1173 /// Remote configuration, set-up, and integrating software on behalf of a customer.
1174 ImplementationServices,
1175 /// Services that involve the application of your expertise and specialized knowledge of a software product.
1176 ProfessionalServices,
1177 /// Products that allow users to connect to and use online or cloud-based applications over the Internet.
1178 Saas,
1179 /// Services that can be used to customize and white label software products.
1180 SoftwareProgrammingServices,
1181 /// Software products that are pre-written and can be downloaded and installed onto a local device.
1182 Standard,
1183 /// Training and education services related to software products.
1184 TrainingServices,
1185 /// Cloud storage service for personal or corporate information, assets, or intellectual property.
1186 WebsiteHosting,
1187}
1188
1189impl AsRef<str> for TaxCategory {
1190 fn as_ref(&self) -> &str {
1191 match self {
1192 Self::DigitalGoods => "digital-goods",
1193 Self::Ebooks => "ebooks",
1194 Self::ImplementationServices => "implementation-services",
1195 Self::ProfessionalServices => "professional-services",
1196 Self::Saas => "saas",
1197 Self::SoftwareProgrammingServices => "software-programming-services",
1198 Self::Standard => "standard",
1199 Self::TrainingServices => "training-services",
1200 Self::WebsiteHosting => "website-hosting",
1201 }
1202 }
1203}
1204
1205/// Type of payment method used for this payment attempt.
1206#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1207#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1208#[serde(rename_all = "snake_case")]
1209#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1210#[non_exhaustive]
1211pub enum PaymentMethodType {
1212 /// Alipay, popular in China.
1213 Alipay,
1214 /// Apple Pay on a supported Apple device.
1215 ApplePay,
1216 /// Bancontact, popular in Belgium.
1217 Bancontact,
1218 /// Credit or debit card.
1219 Card,
1220 /// Google Pay on a supported Android device, Chromebook, or Google Chrome browser.
1221 GooglePay,
1222 /// iDEAL, popular in the Netherlands.
1223 Ideal,
1224 /// Payment recorded offline.
1225 Offline,
1226 /// PayPal.
1227 Paypal,
1228 /// Payment method not known.
1229 Unknown,
1230 /// Wire transfer, sometimes called bank transfer.
1231 WireTransfer,
1232}
1233
1234/// Status of this notification.
1235#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1236#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1237#[non_exhaustive]
1238pub enum NotificationStatus {
1239 /// Paddle hasn't yet tried to deliver this notification.
1240 NotAttempted,
1241 /// Paddle tried to deliver this notification, but it failed. It's scheduled to be retried.
1242 NeedsRetry,
1243 /// Paddle delivered this notification successfully.
1244 Delivered,
1245 /// Paddle tried to deliver this notification, but all attempts failed. It's not scheduled to be retried.
1246 Failed,
1247}
1248
1249/// Describes how this notification was created.
1250#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1251#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1252#[non_exhaustive]
1253pub enum NotificationOrigin {
1254 /// Notification created when a subscribed event occurred.
1255 Event,
1256 /// Notification created when a notification with the origin `event` was replayed.
1257 Replay,
1258}
1259
1260/// Where notifications should be sent for this destination.
1261#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1262#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1263#[non_exhaustive]
1264pub enum NotificationSettingType {
1265 /// Deliver to an email address.
1266 Email,
1267 /// Deliver to a webhook endpoint.
1268 Url,
1269}
1270
1271/// Whether Paddle should deliver real platform events, simulation events or both to this notification destination.
1272#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1273#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1274#[non_exhaustive]
1275pub enum TrafficSource {
1276 /// Deliver real platform events to this notification destination.
1277 Platform,
1278 /// Deliver simulation events to this notification destination.
1279 Simulation,
1280 /// Deliver platform and simulation events to this notification destination.
1281 All,
1282}
1283
1284/// Operator to use when filtering.
1285#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1286#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1287#[serde(rename_all = "lowercase")]
1288#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1289#[non_exhaustive]
1290pub enum FilterOperator {
1291 /// Less than.
1292 Lt,
1293 /// Greater than or equal to.
1294 Gte,
1295}
1296
1297#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1298#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1299#[serde(rename_all = "snake_case")]
1300#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1301#[non_exhaustive]
1302pub enum TransactionOrigin {
1303 /// Transaction created via the Paddle API.
1304 Api,
1305 /// Transaction created automatically by Paddle as a result of a one-time charge for a subscription.
1306 SubscriptionCharge,
1307 /// Transaction created automatically as part of updating a payment method. May be a zero value transaction.
1308 SubscriptionPaymentMethodChange,
1309 /// Transaction created automatically by Paddle as a result of a subscription renewal.
1310 SubscriptionRecurring,
1311 /// Transaction created automatically by Paddle as a result of an update to a subscription.
1312 SubscriptionUpdate,
1313 /// Transaction created automatically by Paddle.js for a checkout.
1314 Web,
1315}
1316
1317/// Status of this report. Set automatically by Paddle.
1318///
1319/// Reports are created as `pending` initially, then move to `ready` when they're available to download.
1320#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1321#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1322#[serde(rename_all = "snake_case")]
1323#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1324#[non_exhaustive]
1325pub enum ReportStatus {
1326 /// Report created, but Paddle is processing it. It's not yet ready for download.
1327 Pending,
1328 /// Report fully processed by Paddle and ready for download.
1329 Ready,
1330 /// There was a problem processing this report.
1331 Failed,
1332 /// Report has expired and is no longer accessible.
1333 Expired,
1334}
1335
1336/// Field name to filter by.
1337#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1338#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1339#[serde(rename_all = "snake_case")]
1340#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1341#[non_exhaustive]
1342pub enum AdjustmentsReportFilterName {
1343 /// Filter by adjustment action. Pass an array of strings containing any valid value for the `action` field against an adjustment.
1344 Action,
1345 /// Filter by transaction or adjustment currency. Pass an array of strings containing any valid supported three-letter ISO 4217 currency code.
1346 CurrencyCode,
1347 /// 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.
1348 Status,
1349 /// Filter by transaction or adjustment updated date. Pass an RFC 3339 datetime string.
1350 UpdatedAt,
1351}
1352
1353/// Field name to filter by.
1354#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1355#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1356#[serde(rename_all = "snake_case")]
1357#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1358#[non_exhaustive]
1359pub enum DiscountsReportFilterName {
1360 /// Filter by discount type. Pass an array of strings containing any valid value for the `type` field against a discount.
1361 Type,
1362 /// Filter by discount status. Pass an array of strings containing any valid value for the `status` field against a discount.
1363 Status,
1364 /// Filter by discount updated date. Pass an RFC 3339 datetime string.
1365 UpdatedAt,
1366}
1367
1368/// Field name to filter by.
1369#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1370#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1371#[serde(rename_all = "snake_case")]
1372#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1373#[non_exhaustive]
1374pub enum BalanceReportFilterName {
1375 /// Filter by discount updated date. Pass an RFC 3339 datetime string.
1376 UpdatedAt,
1377}
1378
1379/// Field name to filter by.
1380#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1381#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1382#[serde(rename_all = "snake_case")]
1383#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1384#[non_exhaustive]
1385pub enum ProductPricesReportFilterName {
1386 /// Filter by product status. Pass an array of strings containing any valid value for the `status` field against a product.
1387 ProductStatus,
1388 /// Filter by price status. Pass an array of strings containing any valid value for the `status` field against a price.
1389 PriceStatus,
1390 /// Filter by product type. Pass an array of strings containing any valid value for the `type` field against a product.
1391 ProductType,
1392 /// Filter by price type. Pass an array of strings containing any valid value for the `type` field against a price.
1393 PriceType,
1394 /// Filter by product `updated_at` date. Pass an RFC 3339 datetime string.
1395 ProductUpdatedAt,
1396 /// Filter by price `updated_at` date. Pass an RFC 3339 datetime string.
1397 PriceUpdatedAt,
1398}
1399
1400/// Field name to filter by.
1401#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1402#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1403#[serde(rename_all = "snake_case")]
1404#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1405#[non_exhaustive]
1406pub enum TransactionsReportFilterName {
1407 /// Filter by collection mode. Pass an array of strings containing any valid value for the `collection_mode` field against a transaction.
1408 CollectionMode,
1409 /// Filter by transaction or adjustment currency. Pass an array of strings containing any valid supported three-letter ISO 4217 currency code.
1410 CurrencyCode,
1411 /// Filter by transaction origin. Pass an array of strings containing any valid value for the origin field against a transaction.
1412 Origin,
1413 /// 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.
1414 Status,
1415 /// Filter by transaction or adjustment updated date. Pass an RFC 3339 datetime string.
1416 UpdatedAt,
1417}
1418
1419/// Type of report.
1420#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1421#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1422#[serde(rename_all = "snake_case")]
1423#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1424#[non_exhaustive]
1425pub enum AdjustmentsReportType {
1426 /// Adjustments reports contain information about refunds, credits, and chargebacks.
1427 Adjustments,
1428 /// Adjustments reports contain information about refunds, credits, and chargebacks. The report is broken down by line item level.
1429 AdjustmentLineItems,
1430}
1431
1432impl ReportType for AdjustmentsReportType {
1433 type FilterName = AdjustmentsReportFilterName;
1434}
1435
1436/// Type of report.
1437#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1438#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1439#[serde(rename_all = "snake_case")]
1440#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1441#[non_exhaustive]
1442pub enum TransactionsReportType {
1443 /// Transactions reports contain information about revenue received, past due invoices, draft and issued invoices, and canceled transactions.
1444 Transactions,
1445 /// 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.
1446 TransactionLineItems,
1447}
1448
1449impl ReportType for TransactionsReportType {
1450 type FilterName = TransactionsReportFilterName;
1451}
1452
1453/// Type of report.
1454#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1455#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1456#[serde(rename_all = "snake_case")]
1457#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1458#[non_exhaustive]
1459pub enum ProductsAndPricesReportType {
1460 /// Products and prices reports contain information about your products and prices. May include non-catalog products and prices.
1461 ProductsPrices,
1462}
1463
1464impl ReportType for ProductsAndPricesReportType {
1465 type FilterName = ProductPricesReportFilterName;
1466}
1467
1468/// Type of report.
1469#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1470#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1471#[serde(rename_all = "snake_case")]
1472#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1473#[non_exhaustive]
1474pub enum DiscountsReportType {
1475 /// Discounts reports contain information about your product and checkout discounts.
1476 Discounts,
1477}
1478
1479impl ReportType for DiscountsReportType {
1480 type FilterName = DiscountsReportFilterName;
1481}
1482
1483/// Type of report.
1484#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1485#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1486#[serde(rename_all = "snake_case")]
1487#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1488#[non_exhaustive]
1489pub enum BalanceReportType {
1490 /// Balance reports contain information about your account balance activity, including all movements of funds in and out of your balance.
1491 Balance,
1492}
1493
1494impl ReportType for BalanceReportType {
1495 type FilterName = BalanceReportFilterName;
1496}
1497
1498/// Status of this simulation run log.
1499#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1500#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1501#[non_exhaustive]
1502pub enum SimulationEventStatus {
1503 /// Simulation run log is pending. Paddle hasn't yet tried to deliver the simulated event.
1504 Pending,
1505 /// Simulation run log was successful. Paddle delivered the simulated event successfully.
1506 Success,
1507 /// 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.
1508 Failed,
1509 /// Simulation run log aborted. Paddle could not attempt delivery of the simulated event.
1510 Aborted,
1511}
1512
1513/// Status of this simulation run.
1514#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1515#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1516#[non_exhaustive]
1517pub enum SimulationRunStatus {
1518 /// Simulation run is pending. Paddle is sending events that are part of this simulation.
1519 Pending,
1520 /// Simulation run is completed. Paddle attempted to send events that are part of this simulation.
1521 Completed,
1522 /// Simulation run is canceled. Simulation run was canceled before all events were sent.
1523 Canceled,
1524}
1525
1526/// Scenario for a simulation.
1527#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1528#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1529#[non_exhaustive]
1530pub enum SimulationScenarioType {
1531 /// Simulates all events sent when a subscription is created.
1532 SubscriptionCreation,
1533 /// Simulates all events sent when a subscription is renewed.
1534 SubscriptionRenewal,
1535 /// Simulates all events sent when a subscription is paused.
1536 SubscriptionPause,
1537 /// Simulates all events sent when a subscription is resumed.
1538 SubscriptionResume,
1539 /// Simulates all events sent when a subscription is canceled.
1540 SubscriptionCancellation,
1541}
1542
1543/// Type of simulation.
1544#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1545#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1546#[non_exhaustive]
1547pub enum SimulationKind {
1548 /// Paddle simulates a single event.
1549 SingleEvent,
1550 /// Paddle simulates a predefined series of events for a scenario, like all events created when a subscription renews.
1551 Scenario,
1552}
1553
1554/// Status of this payment attempt.
1555#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1556#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1557#[serde(rename_all = "snake_case")]
1558#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1559#[non_exhaustive]
1560pub enum PaymentAttemptStatus {
1561 /// Authorized but not captured. Payment attempt is incomplete.
1562 Authorized,
1563 /// Authorized but not captured because it has been flagged as potentially fraudulent. Payment attempt is incomplete.
1564 AuthorizedFlagged,
1565 /// Previously authorized payment attempt has been canceled. Typically when `authorized_flagged` payment attempts are rejected.
1566 Canceled,
1567 /// Payment captured successfully. Payment attempt is complete.
1568 Captured,
1569 /// Something went wrong and the payment attempt was unsuccessful. Check the `error_code` for more information.
1570 Error,
1571 /// Customer must complete an action for this payment attempt to proceed. Typically means that the payment attempt requires 3DS.
1572 ActionRequired,
1573 /// Response required from the bank or payment provider. Transaction is pending.
1574 PendingNoActionRequired,
1575 /// New payment attempt created.
1576 Created,
1577 /// Payment attempt status not known.
1578 Unknown,
1579 /// Payment attempt dropped by Paddle.
1580 Dropped,
1581}
1582
1583/// Status of this subscription. Set automatically by Paddle. Use the pause subscription or cancel subscription operations to change.
1584#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1585#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1586#[serde(rename_all = "snake_case")]
1587#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1588#[non_exhaustive]
1589pub enum SubscriptionStatus {
1590 /// Subscription is active. Paddle is billing for this subscription and related transactions aren't past due.
1591 Active,
1592 /// 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.
1593 Canceled,
1594 /// 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).
1595 PastDue,
1596 /// 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.
1597 Paused,
1598 /// Subscription is in trial.
1599 Trialing,
1600}
1601
1602/// 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.
1603#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1604#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1605#[serde(rename_all = "snake_case")]
1606#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1607#[non_exhaustive]
1608pub enum TransactionStatus {
1609 /// Transaction is missing required fields. Typically the first stage of a checkout before customer details are captured.
1610 Draft,
1611 /// Transaction has all of the required fields to be marked as `billed` or `completed`.
1612 Ready,
1613 /// 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.
1614 Billed,
1615 /// Transaction is fully paid, but has not yet been processed internally.
1616 Paid,
1617 /// Transaction is fully paid and processed.
1618 Completed,
1619 /// Transaction has been updated to `canceled`. If an invoice, it's no longer due.
1620 Canceled,
1621 /// 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.
1622 PastDue,
1623}
1624
1625/// Kind of change that's scheduled to be applied to this subscription.
1626#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1627#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1628#[serde(rename_all = "lowercase")]
1629#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1630#[non_exhaustive]
1631pub enum ScheduledChangeAction {
1632 /// Subscription is scheduled to cancel. Its status changes to `canceled` on the `effective_at` date.
1633 Cancel,
1634 /// Subscription is scheduled to pause. Its status changes to `pause` on the `effective_at` date.
1635 Pause,
1636 /// Subscription is scheduled to resume. Its status changes to `active` on the `resume_at` date.
1637 Resume,
1638}
1639
1640/// How Paddle should handle changes made to a subscription or its items if the payment fails during update. If omitted, defaults to `prevent_change`.
1641#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1642#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1643#[serde(rename_all = "snake_case")]
1644#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1645#[non_exhaustive]
1646pub enum SubscriptionOnPaymentFailure {
1647 /// In case of payment failure, prevent the change to the subscription from applying.
1648 PreventChange,
1649 /// In case of payment failure, apply the change and update the subscription.
1650 ApplyChange,
1651}
1652
1653/// Whether the subscription change results in a prorated credit or a charge.
1654#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1655#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1656#[serde(rename_all = "lowercase")]
1657#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1658#[non_exhaustive]
1659pub enum UpdateSummaryResultAction {
1660 /// Changes to the subscription results in a prorated credit.
1661 Credit,
1662 /// Changes to the subscription results in a prorated charge.
1663 Charge,
1664}
1665
1666/// How Paddle should handle proration calculation for changes made to a subscription or its items. Required when making
1667/// changes that impact billing.
1668///
1669/// For automatically-collected subscriptions, responses may take longer than usual if a proration billing mode that
1670/// collects for payment immediately is used.
1671#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1672#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1673#[serde(rename_all = "snake_case")]
1674#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1675#[non_exhaustive]
1676pub enum ProrationBillingMode {
1677 /// Paddle calculates the prorated amount for the subscription changes based on the current billing cycle, then
1678 /// creates a transaction to collect immediately.
1679 ProratedImmediately,
1680 /// Paddle calculates the prorated amount for the subscription changes based on the current billing cycle, then
1681 /// schedules them to be billed on the next renewal.
1682 ProratedNextBillingPeriod,
1683 /// Paddle does not calculate proration for the subscription changes, creating a transaction to collect for the full
1684 /// amount immediately.
1685 FullImmediately,
1686 /// Paddle does not calculate proration for the subscription changes, scheduling for the full amount for the changes
1687 /// to be billed on the next renewal.
1688 FullNextBillingPeriod,
1689 /// Paddle does not bill for the subscription changes.
1690 DoNotBill,
1691}
1692
1693/// How Paddle should set the billing period for the subscription when resuming. If omitted, defaults to `start_new_billing_period`.
1694#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1695#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1696#[serde(rename_all = "snake_case")]
1697#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1698#[non_exhaustive]
1699pub enum SubscriptionOnResume {
1700 /// 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.
1701 ContinueExistingBillingPeriod,
1702 /// 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.
1703 StartNewBillingPeriod,
1704}
1705
1706/// Determine whether the generated URL should download the PDF as an attachment saved locally, or open it inline in the browser.
1707#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1708#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1709#[serde(rename_all = "lowercase")]
1710#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1711#[non_exhaustive]
1712pub enum Disposition {
1713 /// Generated URL downloads the PDF as an attachment. Browsers typically automatically save the PDF.
1714 Attachment,
1715 /// Generated URL displays the PDF inline in the browser. Browsers typically open the PDF in the current tab.
1716 Inline,
1717}
1718
1719#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1720#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1721#[serde(rename_all = "lowercase")]
1722#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1723#[non_exhaustive]
1724pub enum PayoutStatus {
1725 /// Payout is paid.
1726 Paid,
1727 /// Payout is unpaid. Typically means it has been created, but is not yet completed.
1728 Unpaid,
1729}
1730
1731#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1732#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1733#[serde(rename_all = "lowercase")]
1734#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1735#[non_exhaustive]
1736pub enum ApiKeyStatus {
1737 Active,
1738 Expired,
1739 Revoked,
1740}
1741
1742/// Include related entities in the response.
1743#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1744#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1745#[serde(rename_all = "snake_case")]
1746#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1747#[non_exhaustive]
1748pub enum SubscriptionInclude {
1749 /// 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.
1750 NextTransaction,
1751 /// 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.
1752 RecurringTransactionDetails,
1753}