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, Copy, 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}
474
475/// Whether this entity can be used in Paddle.
476#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
477#[cfg_attr(feature = "strum", derive(EnumString, Display))]
478#[serde(rename_all = "kebab-case")]
479#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
480#[non_exhaustive]
481pub enum Status {
482 /// Entity is active and can be used.
483 Active,
484 /// Entity is archived, so can't be used.
485 Archived,
486}
487
488/// How this adjustment impacts the related transaction.
489#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
490#[cfg_attr(feature = "strum", derive(EnumString, Display))]
491#[serde(rename_all = "snake_case")]
492#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
493#[non_exhaustive]
494pub enum AdjustmentAction {
495 /// Credits some or all the related transaction.
496 Credit,
497 /// Refunds some or all the related transaction. Must be approved by Paddle in most cases.
498 Refund,
499 /// Chargeback for the related transaction. Automatically created by Paddle when a customer successfully disputes a charge.
500 Chargeback,
501 /// Reversal of a chargeback for the related transaction. Automatically created by Paddle when Paddle contests a chargeback successfully.
502 ChargebackReverse,
503 /// Warning of an upcoming chargeback for the related transaction. Automatically created by Paddle.
504 ChargebackWarning,
505 /// Reversal of a credit for the related transaction. Automatically created by Paddle.
506 CreditReverse,
507}
508
509/// 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`.
510#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
511#[cfg_attr(feature = "strum", derive(EnumString, Display))]
512#[serde(rename_all = "lowercase")]
513#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
514#[non_exhaustive]
515pub enum AdjustmentType {
516 /// The grand total for the related transaction is adjusted.
517 Full,
518 /// Some line items for the related transaction are adjusted. Requires `items`.
519 Partial,
520}
521
522/// Supported three-letter ISO 4217 currency code.
523#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
524#[cfg_attr(feature = "strum", derive(EnumString, Display))]
525#[non_exhaustive]
526pub enum CurrencyCode {
527 /// United States Dollar
528 USD,
529 /// Euro
530 EUR,
531 /// Pound Sterling
532 GBP,
533 /// Japanese Yen
534 JPY,
535 /// Australian Dollar
536 AUD,
537 /// Canadian Dollar
538 CAD,
539 /// Swiss Franc
540 CHF,
541 /// Hong Kong Dollar
542 HKD,
543 /// Singapore Dollar
544 SGD,
545 /// Swedish Krona
546 SEK,
547 /// Argentine Peso
548 ARS,
549 /// Brazilian Real
550 BRL,
551 /// Chinese Yuan
552 CNY,
553 /// Colombian Peso
554 COP,
555 /// Czech Koruna
556 CZK,
557 /// Danish Krone
558 DKK,
559 /// Hungarian Forint
560 HUF,
561 /// Israeli Shekel
562 ILS,
563 /// Indian Rupee
564 INR,
565 /// South Korean Won
566 KRW,
567 /// Mexican Peso
568 MXN,
569 /// Norwegian Krone
570 NOK,
571 /// New Zealand Dollar
572 NZD,
573 /// Polish Zloty
574 PLN,
575 /// Russian Ruble
576 RUB,
577 /// Thai Baht
578 THB,
579 /// Turkish Lira
580 TRY,
581 /// New Taiwan Dollar
582 TWD,
583 /// Ukrainian Hryvnia
584 UAH,
585 /// Vietnamese Dong
586 VND,
587 /// South African Rand
588 ZAR,
589}
590
591/// Status of this adjustment. Set automatically by Paddle.
592///
593/// 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.
594///
595/// Credit adjustments don't require approval from Paddle, so they're created as `approved`.
596#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
597#[cfg_attr(feature = "strum", derive(EnumString, Display))]
598#[serde(rename_all = "snake_case")]
599#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
600#[non_exhaustive]
601pub enum AdjustmentStatus {
602 /// Adjustment is pending approval by Paddle. Most refunds for live accounts must be approved by Paddle.
603 PendingApproval,
604 /// Adjustment is approved. Default for credits. Set when Paddle approves a refund that was `pending_approval`.
605 Approved,
606 /// Adjustment has been rejected. Set when Paddle rejects a refund that was `pending_approval`.
607 Rejected,
608 /// Adjustment has been reversed. Set by Paddle when a `chargeback_reversal` or `credit_reversal` adjustment is created for this adjustment.
609 Reversed,
610}
611
612/// Three-letter ISO 4217 currency code for chargeback fees.
613#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
614#[cfg_attr(feature = "strum", derive(EnumString, Display))]
615#[non_exhaustive]
616pub enum CurrencyCodeChargebacks {
617 /// Australian Dollar
618 AUD,
619 /// Canadian Dollar
620 CAD,
621 /// Euro
622 EUR,
623 /// Pound Sterling
624 GBP,
625 /// United States Dollar
626 USD,
627}
628
629/// Supported three-letter ISO 4217 currency code for payouts from Paddle.
630#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
631#[cfg_attr(feature = "strum", derive(EnumString, Display))]
632#[non_exhaustive]
633pub enum CurrencyCodePayouts {
634 /// Australian Dollar
635 AUD,
636 /// Canadian Dollar
637 CAD,
638 /// Swiss Franc
639 CHF,
640 /// Chinese Yuan
641 CNY,
642 /// Czech Koruna
643 CZK,
644 /// Danish Krone
645 DKK,
646 /// Euro
647 EUR,
648 /// Pound Sterling
649 GBP,
650 /// Hungarian Forint
651 HUF,
652 /// Polish Zloty
653 PLN,
654 /// Swedish Krona
655 SEK,
656 /// United States Dollar
657 USD,
658 /// South African Rand
659 ZAR,
660}
661
662/// Type of adjustment for this transaction item. `tax` adjustments are automatically created by Paddle.
663/// Include `amount` when creating a `partial` adjustment.
664#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
665#[cfg_attr(feature = "strum", derive(EnumString, Display))]
666#[serde(rename_all = "lowercase")]
667#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
668#[non_exhaustive]
669pub enum AdjustmentItemType {
670 /// Full total for this transaction item is adjusted.
671 Full,
672 /// Part of this transaction item is adjusted. Include `amount` to specify the partial amount adjusted.
673 Partial,
674 /// Tax for this transaction item is adjusted. Created automatically by Paddle.
675 Tax,
676 /// A prorated amount for this transaction item is adjusted. Created automatically by Paddle in some cases when making changes to a subscription.
677 Proration,
678}
679
680/// Unit of time.
681#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
682#[cfg_attr(feature = "strum", derive(EnumString, Display))]
683#[serde(rename_all = "kebab-case")]
684#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
685#[non_exhaustive]
686pub enum Interval {
687 Day,
688 Week,
689 Month,
690 Year,
691}
692
693/// Type of credit or debit card used to pay.
694#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
695#[cfg_attr(feature = "strum", derive(EnumString, Display))]
696#[serde(rename_all = "snake_case")]
697#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
698#[non_exhaustive]
699pub enum CardType {
700 /// American Express
701 AmericanExpress,
702 /// Diners Club
703 DinersClub,
704 /// Discover Card
705 Discover,
706 /// JCB Card, popular in Japan
707 Jcb,
708 /// Mada Card, popular in Saudi Arabia
709 Mada,
710 /// Maestro (debit card)
711 Maestro,
712 /// Mastercard
713 Mastercard,
714 /// UnionPay, popular in China
715 UnionPay,
716 /// Card type unknown
717 Unknown,
718 /// Visa
719 Visa,
720}
721
722/// Type of item. Standard items are considered part of your catalog and are shown on the Paddle dashboard.
723#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
724#[cfg_attr(feature = "strum", derive(EnumString, Display))]
725#[serde(rename_all = "kebab-case")]
726#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
727#[non_exhaustive]
728pub enum CatalogType {
729 /// Non-catalog item. Typically created for a specific transaction or subscription. Not returned when listing or shown in the Paddle dashboard.
730 Custom,
731 /// Standard item. Can be considered part of your catalog and reused across transactions and subscriptions easily.
732 Standard,
733}
734
735/// How payment is collected. `automatic` for checkout, `manual` for invoices.
736#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
737#[cfg_attr(feature = "strum", derive(EnumString, Display))]
738#[serde(rename_all = "snake_case")]
739#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
740#[non_exhaustive]
741pub enum CollectionMode {
742 /// Payment is collected automatically using a checkout initially, then using a payment method on file.
743 Automatic,
744 /// 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`.
745 Manual,
746}
747
748/// Type of payment method saved.
749#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
750#[cfg_attr(feature = "strum", derive(EnumString, Display))]
751#[serde(rename_all = "snake_case")]
752#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
753#[non_exhaustive]
754pub enum SavedPaymentMethodType {
755 /// Alipay, popular in China.
756 Alipay,
757 /// Apple Pay on a supported Apple device.
758 ApplePay,
759 /// Credit or debit card.
760 Card,
761 /// Google Pay on a supported Android device, Chromebook, or Google Chrome browser.
762 GooglePay,
763 /// PayPal.
764 Paypal,
765}
766
767/// Describes how this payment method was saved.
768#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
769#[cfg_attr(feature = "strum", derive(EnumString, Display))]
770#[serde(rename_all = "snake_case")]
771#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
772#[non_exhaustive]
773pub enum PaymentMethodOrigin {
774 /// The customer chose to save this payment method while purchasing a one-time item.
775 SavedDuringPurchase,
776 /// The customer purchased a subscription, so this payment method was saved for future purchases.
777 Subscription,
778}
779
780/// Whether this entity can be used in Paddle.
781#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
782#[cfg_attr(feature = "strum", derive(EnumString, Display))]
783#[serde(rename_all = "kebab-case")]
784#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
785#[non_exhaustive]
786pub enum DiscountStatus {
787 /// Entity is active and can be used.
788 Active,
789 /// Entity is archived, so can't be used.
790 Archived,
791}
792
793/// Type of discount. Determines how this discount impacts the checkout or transaction total.
794#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
795#[cfg_attr(feature = "strum", derive(EnumString, Display))]
796#[serde(rename_all = "snake_case")]
797#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
798#[non_exhaustive]
799pub enum DiscountType {
800 /// Discounts a checkout or transaction by a flat amount, for example -$100. Requires `currency_code`.
801 Flat,
802 /// Discounts a checkout or transaction by a flat amount per unit, for example -$100 per user. Requires `currency_code`.
803 FlatPerSeat,
804 /// Discounts a checkout or transaction by a percentage of the total, for example -10%. Maximum 100%.
805 Percentage,
806}
807
808/// When this subscription change should take effect from. Defaults to `next_billing_period`, which creates a
809/// `scheduled_change` to apply the subscription change at the end of the billing period.
810#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
811#[cfg_attr(feature = "strum", derive(EnumString, Display))]
812#[serde(rename_all = "snake_case")]
813#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
814#[non_exhaustive]
815pub enum EffectiveFrom {
816 /// Takes effect on the next billing period.
817 NextBillingPeriod,
818 /// Takes effect immediately.
819 Immediately,
820}
821
822/// Type of error encountered.
823#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
824#[cfg_attr(feature = "strum", derive(EnumString, Display))]
825#[non_exhaustive]
826pub enum Type {
827 /// Typically means there's a problem with the request that you made.
828 RequestError,
829 /// Typically means there's a problem with the Paddle API.
830 ApiError,
831}
832
833/// Reason why a payment attempt failed. Returns `null` if payment captured successfully.
834#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
835#[cfg_attr(feature = "strum", derive(EnumString, Display))]
836#[serde(rename_all = "snake_case")]
837#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
838#[non_exhaustive]
839pub enum ErrorCode {
840 /// Cancellation not possible because the amount has already been canceled. Not typically returned for payments.
841 AlreadyCanceled,
842 /// Refund is not possible because the amount has already been refunded. Not typically returned for payments.
843 AlreadyRefunded,
844 /// Payment required a 3DS2 authentication challenge. The customer completed the challenge but was not successful.
845 AuthenticationFailed,
846 /// Payment method issuer has indicated that the card cannot be used as it is frozen, lost, damaged, or stolen.
847 BlockedCard,
848 /// Customer has requested that the mandate for recurring payments be canceled.
849 Canceled,
850 /// Payment method has been declined, with no other information returned.
851 Declined,
852 /// 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.
853 DeclinedNotRetryable,
854 /// 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.
855 ExpiredCard,
856 /// Payment method issuer or payment service provider flagged this payment as potentially fraudulent.
857 Fraud,
858 /// Payment method issuer or payment service provider cannot process a payment that is this high or low.
859 InvalidAmount,
860 /// 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.
861 InvalidPaymentDetails,
862 /// Payment service provider couldn't reach the payment method issuer.
863 IssuerUnavailable,
864 /// Payment method declined because of insufficient funds, or fund limits being reached.
865 NotEnoughBalance,
866 /// Payment method has been declined because the network scheme that the customer selected isn't supported by the payment service provider.
867 PreferredNetworkNotSupported,
868 /// Something went wrong with the payment service provider, with no other information returned.
869 PspError,
870 /// Payment service provider didn't receive payment method information as they've been redacted.
871 RedactedPaymentMethod,
872 /// Something went wrong with the Paddle platform. Try again later, or check status.paddle.com.
873 SystemError,
874 /// Payment method issuer doesn't allow this kind of payment because of limits on the account, or legal or compliance reasons.
875 TransactionNotPermitted,
876 /// Payment attempt unsuccessful, with no other information returned.
877 Unknown,
878}
879
880/// Type of event sent by Paddle, in the format `entity.event_type`.
881#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
882#[cfg_attr(feature = "strum", derive(EnumString, Display))]
883#[non_exhaustive]
884pub enum EventTypeName {
885 /// An [`address.created`](https://developer.paddle.com/webhooks/addresses/address-created) event.
886 AddressCreated,
887 /// An [`address.imported`](https://developer.paddle.com/webhooks/addresses/address-imported) event.
888 AddressImported,
889 /// An [`address.updated`](https://developer.paddle.com/webhooks/addresses/address-updated) event.
890 AddressUpdated,
891 /// An [`adjustment.created`](https://developer.paddle.com/webhooks/adjustments/adjustment-created) event.
892 AdjustmentCreated,
893 /// An [`adjustment.updated`](https://developer.paddle.com/webhooks/adjustments/adjustment-updated) event.
894 AdjustmentUpdated,
895 /// A [`business.created`](https://developer.paddle.com/webhooks/businesses/business-created) event.
896 BusinessCreated,
897 /// A [`business.imported`](https://developer.paddle.com/webhooks/businesses/business-imported) event.
898 BusinessImported,
899 /// A [`business.updated`](https://developer.paddle.com/webhooks/businesses/business-updated) event.
900 BusinessUpdated,
901 /// A [`customer.created`](https://developer.paddle.com/webhooks/customers/customer-created) event.
902 CustomerCreated,
903 /// A [`customer.imported`](https://developer.paddle.com/webhooks/customers/customer-imported) event.
904 CustomerImported,
905 /// A [`customer.updated`](https://developer.paddle.com/webhooks/customers/customer-updated) event.
906 CustomerUpdated,
907 /// A [`discount.created`](https://developer.paddle.com/webhooks/discounts/discount-created) event.
908 DiscountCreated,
909 /// A [`discount.imported`](https://developer.paddle.com/webhooks/discounts/discount-imported) event.
910 DiscountImported,
911 /// A [`discount.updated`](https://developer.paddle.com/webhooks/discounts/discount-updated) event.
912 DiscountUpdated,
913 /// A [`payout.created`](https://developer.paddle.com/webhooks/payouts/payout-created) event.
914 PayoutCreated,
915 /// A [`payout.paid`](https://developer.paddle.com/webhooks/payouts/payout-paid) event.
916 PayoutPaid,
917 /// A [`price.created`](https://developer.paddle.com/webhooks/prices/price-created) event.
918 PriceCreated,
919 /// A [`price.imported`](https://developer.paddle.com/webhooks/prices/price-imported) event.
920 PriceImported,
921 /// A [`price.updated`](https://developer.paddle.com/webhooks/prices/price-updated) event.
922 PriceUpdated,
923 /// A [`product.created`](https://developer.paddle.com/webhooks/products/product-created) event.
924 ProductCreated,
925 /// A [`product.imported`](https://developer.paddle.com/webhooks/products/product-imported) event.
926 ProductImported,
927 /// A [`product.created`](https://developer.paddle.com/webhooks/products/product-updated) event.
928 ProductUpdated,
929 /// A [`report.created`](https://developer.paddle.com/webhooks/reports/report-created) event.
930 ReportCreated,
931 /// A [`report.updated`](https://developer.paddle.com/webhooks/reports/report-updated) event.
932 ReportUpdated,
933 /// A [`subscription.activated`](https://developer.paddle.com/webhooks/subscriptions/subscription-activated) event.
934 SubscriptionActivated,
935 /// A [`subscription.canceled`](https://developer.paddle.com/webhooks/subscriptions/subscription-canceled) event.
936 SubscriptionCanceled,
937 /// A [`subscription.created`](https://developer.paddle.com/webhooks/subscriptions/subscription-created) event.
938 SubscriptionCreated,
939 /// A [`subscription.imported`](https://developer.paddle.com/webhooks/subscriptions/subscription-imported) event.
940 SubscriptionImported,
941 /// A [`subscription.past_due`](https://developer.paddle.com/webhooks/subscriptions/subscription-past-due) event.
942 SubscriptionPastDue,
943 /// A [`subscription.paused`](https://developer.paddle.com/webhooks/subscriptions/subscription-paused) event.
944 SubscriptionPaused,
945 /// A [`subscription.resumed`](https://developer.paddle.com/webhooks/subscriptions/subscription-resumed) event.
946 SubscriptionResumed,
947 /// A [`subscription.trialing`](https://developer.paddle.com/webhooks/subscriptions/subscription-trialing) event.
948 SubscriptionTrialing,
949 /// A [`subscription.updated`](https://developer.paddle.com/webhooks/subscriptions/subscription-updated) event.
950 SubscriptionUpdated,
951 /// A [`transaction.billed`](https://developer.paddle.com/webhooks/transactions/transaction-billed) event.
952 TransactionBilled,
953 /// A [`transaction.canceled`](https://developer.paddle.com/webhooks/transactions/transaction-canceled) event.
954 TransactionCanceled,
955 /// A [`transaction.completed`](https://developer.paddle.com/webhooks/transactions/transaction-completed) event.
956 TransactionCompleted,
957 /// A [`transaction.created`](https://developer.paddle.com/webhooks/transactions/transaction-created) event.
958 TransactionCreated,
959 /// A [`transaction.paid`](https://developer.paddle.com/webhooks/transactions/transaction-paid) event.
960 TransactionPaid,
961 /// A [`transaction.past_due`](https://developer.paddle.com/webhooks/transactions/transaction-past-due) event.
962 TransactionPastDue,
963 /// A [`transaction.payment_failed`](https://developer.paddle.com/webhooks/transactions/transaction-payment-failed) event.
964 TransactionPaymentFailed,
965 /// A [`transaction.ready`](https://developer.paddle.com/webhooks/transactions/transaction-ready) event.
966 TransactionReady,
967 /// A [`transaction.updated`](https://developer.paddle.com/webhooks/transactions/transaction-updated) event.
968 TransactionUpdated,
969}
970
971/// Type of event sent by Paddle along with it's corresponding entity data
972#[allow(clippy::large_enum_variant)]
973#[derive(Clone, Debug, Serialize, Deserialize)]
974#[serde(tag = "event_type", content = "data")]
975pub enum EventData {
976 /// An [`address.created`](https://developer.paddle.com/webhooks/addresses/address-created) event.
977 #[serde(rename = "address.created")]
978 AddressCreated(crate::entities::Address),
979 /// An [`address.imported`](https://developer.paddle.com/webhooks/addresses/address-imported) event.
980 #[serde(rename = "address.imported")]
981 AddressImported(crate::entities::Address),
982 /// An [`address.updated`](https://developer.paddle.com/webhooks/addresses/address-updated) event.
983 #[serde(rename = "address.updated")]
984 AddressUpdated(crate::entities::Address),
985 /// An [`adjustment.created`](https://developer.paddle.com/webhooks/adjustments/adjustment-created) event.
986 #[serde(rename = "adjustment.created")]
987 AdjustmentCreated(crate::entities::Adjustment),
988 /// An [`adjustment.updated`](https://developer.paddle.com/webhooks/adjustments/adjustment-updated) event.
989 #[serde(rename = "adjustment.updated")]
990 AdjustmentUpdated(crate::entities::Adjustment),
991 /// A [`api_key.created`](https://developer.paddle.com/webhooks/api-keys/api-key-created) event.
992 #[serde(rename = "api_key.created")]
993 ApiKeyCreated(crate::entities::ApiKey),
994 /// A [`api_key.updated`](https://developer.paddle.com/webhooks/api-keys/api-key-updated) event.
995 #[serde(rename = "api_key.updated")]
996 ApiKeyUpdated(crate::entities::ApiKey),
997 /// A [`api_key.expiring`](https://developer.paddle.com/webhooks/api-keys/api-key-expiring) event.
998 #[serde(rename = "api_key.expiring")]
999 ApiKeyExpiring(crate::entities::ApiKey),
1000 /// A [`api_key.expired`](https://developer.paddle.com/webhooks/api-keys/api-key-expired) event.
1001 #[serde(rename = "api_key.expired")]
1002 ApiKeyExpired(crate::entities::ApiKey),
1003 /// A [`api_key.revoked`](https://developer.paddle.com/webhooks/api-keys/api-key-revoked) event.
1004 #[serde(rename = "api_key.revoked")]
1005 ApiKeyRevoked(crate::entities::ApiKey),
1006 /// A [`business.created`](https://developer.paddle.com/webhooks/businesses/business-created) event.
1007 #[serde(rename = "business.created")]
1008 BusinessCreated(crate::entities::Business),
1009 /// A [`business.imported`](https://developer.paddle.com/webhooks/businesses/business-imported) event.
1010 #[serde(rename = "business.imported")]
1011 BusinessImported(crate::entities::Business),
1012 /// A [`business.updated`](https://developer.paddle.com/webhooks/businesses/business-updated) event.
1013 #[serde(rename = "business.updated")]
1014 BusinessUpdated(crate::entities::Business),
1015 /// A [`customer.created`](https://developer.paddle.com/webhooks/customers/customer-created) event.
1016 #[serde(rename = "customer.created")]
1017 CustomerCreated(crate::entities::Customer),
1018 /// A [`customer.imported`](https://developer.paddle.com/webhooks/customers/customer-imported) event.
1019 #[serde(rename = "customer.imported")]
1020 CustomerImported(crate::entities::Customer),
1021 /// A [`customer.updated`](https://developer.paddle.com/webhooks/customers/customer-updated) event.
1022 #[serde(rename = "customer.updated")]
1023 CustomerUpdated(crate::entities::Customer),
1024 /// A [`discount.created`](https://developer.paddle.com/webhooks/discounts/discount-created) event.
1025 #[serde(rename = "discount.created")]
1026 DiscountCreated(crate::entities::Discount),
1027 /// A [`discount.imported`](https://developer.paddle.com/webhooks/discounts/discount-imported) event.
1028 #[serde(rename = "discount.imported")]
1029 DiscountImported(crate::entities::Discount),
1030 /// A [`discount.updated`](https://developer.paddle.com/webhooks/discounts/discount-updated) event.
1031 #[serde(rename = "discount.updated")]
1032 DiscountUpdated(crate::entities::Discount),
1033 /// A [`payment_method.saved`](https://developer.paddle.com/webhooks/payment-methods/payment-method-saved) event.
1034 #[serde(rename = "payment_method.saved")]
1035 PaymentMethodSaved(crate::entities::PaymentMethod),
1036 /// A [`payment_method.deleted`](https://developer.paddle.com/webhooks/payment-methods/payment-method-deleted) event.
1037 #[serde(rename = "payment_method.deleted")]
1038 PaymentMethodDeleted(crate::entities::PaymentMethod),
1039 /// A [`payout.created`](https://developer.paddle.com/webhooks/payouts/payout-created) event.
1040 #[serde(rename = "payout.created")]
1041 PayoutCreated(crate::entities::Payout),
1042 /// A [`payout.paid`](https://developer.paddle.com/webhooks/payouts/payout-paid) event.
1043 #[serde(rename = "payout.paid")]
1044 PayoutPaid(crate::entities::Payout),
1045 /// A [`price.created`](https://developer.paddle.com/webhooks/prices/price-created) event.
1046 #[serde(rename = "price.created")]
1047 PriceCreated(crate::entities::Price),
1048 /// A [`price.imported`](https://developer.paddle.com/webhooks/prices/price-imported) event.
1049 #[serde(rename = "price.imported")]
1050 PriceImported(crate::entities::Price),
1051 /// A [`price.updated`](https://developer.paddle.com/webhooks/prices/price-updated) event.
1052 #[serde(rename = "price.updated")]
1053 PriceUpdated(crate::entities::Price),
1054 /// A [`product.created`](https://developer.paddle.com/webhooks/products/product-created) event.
1055 #[serde(rename = "product.created")]
1056 ProductCreated(crate::entities::Product),
1057 /// A [`product.imported`](https://developer.paddle.com/webhooks/products/product-imported) event.
1058 #[serde(rename = "product.imported")]
1059 ProductImported(crate::entities::Product),
1060 /// A [`product.updated`](https://developer.paddle.com/webhooks/products/product-updated) event.
1061 #[serde(rename = "product.updated")]
1062 ProductUpdated(crate::entities::Product),
1063 /// A [`report.created`](https://developer.paddle.com/webhooks/reports/report-created) event.
1064 #[serde(rename = "report.created")]
1065 ReportCreated(crate::entities::ReportBase),
1066 /// A [`report.updated`](https://developer.paddle.com/webhooks/reports/report-updated) event.
1067 #[serde(rename = "report.updated")]
1068 ReportUpdated(crate::entities::ReportBase),
1069 /// A [`subscription.activated`](https://developer.paddle.com/webhooks/subscriptions/subscription-activated) event.
1070 #[serde(rename = "subscription.activated")]
1071 SubscriptionActivated(crate::entities::Subscription),
1072 /// A [`subscription.canceled`](https://developer.paddle.com/webhooks/subscriptions/subscription-canceled) event.
1073 #[serde(rename = "subscription.canceled")]
1074 SubscriptionCanceled(crate::entities::Subscription),
1075 /// A [`subscription.created`](https://developer.paddle.com/webhooks/subscriptions/subscription-created) event.
1076 #[serde(rename = "subscription.created")]
1077 SubscriptionCreated(crate::entities::Subscription),
1078 /// A [`subscription.imported`](https://developer.paddle.com/webhooks/subscriptions/subscription-imported) event.
1079 #[serde(rename = "subscription.imported")]
1080 SubscriptionImported(crate::entities::Subscription),
1081 /// A [`subscription.past_due`](https://developer.paddle.com/webhooks/subscriptions/subscription-past-due) event.
1082 #[serde(rename = "subscription.past_due")]
1083 SubscriptionPastDue(crate::entities::Subscription),
1084 /// A [`subscription.paused`](https://developer.paddle.com/webhooks/subscriptions/subscription-paused) event.
1085 #[serde(rename = "subscription.paused")]
1086 SubscriptionPaused(crate::entities::Subscription),
1087 /// A [`subscription.resumed`](https://developer.paddle.com/webhooks/subscriptions/subscription-resumed) event.
1088 #[serde(rename = "subscription.resumed")]
1089 SubscriptionResumed(crate::entities::Subscription),
1090 /// A [`subscription.trialing`](https://developer.paddle.com/webhooks/subscriptions/subscription-trialing) event.
1091 #[serde(rename = "subscription.trialing")]
1092 SubscriptionTrialing(crate::entities::Subscription),
1093 /// A [`subscription.updated`](https://developer.paddle.com/webhooks/subscriptions/subscription-updated) event.
1094 #[serde(rename = "subscription.updated")]
1095 SubscriptionUpdated(crate::entities::Subscription),
1096 /// A [`transaction.billed`](https://developer.paddle.com/webhooks/transactions/transaction-billed) event.
1097 #[serde(rename = "transaction.billed")]
1098 TransactionBilled(crate::entities::Transaction),
1099 /// A [`transaction.canceled`](https://developer.paddle.com/webhooks/transactions/transaction-canceled) event.
1100 #[serde(rename = "transaction.canceled")]
1101 TransactionCanceled(crate::entities::Transaction),
1102 /// A [`transaction.completed`](https://developer.paddle.com/webhooks/transactions/transaction-completed) event.
1103 #[serde(rename = "transaction.completed")]
1104 TransactionCompleted(crate::entities::Transaction),
1105 /// A [`transaction.created`](https://developer.paddle.com/webhooks/transactions/transaction-created) event.
1106 #[serde(rename = "transaction.created")]
1107 TransactionCreated(crate::entities::Transaction),
1108 /// A [`transaction.paid`](https://developer.paddle.com/webhooks/transactions/transaction-paid) event.
1109 #[serde(rename = "transaction.paid")]
1110 TransactionPaid(crate::entities::Transaction),
1111 /// A [`transaction.past_due`](https://developer.paddle.com/webhooks/transactions/transaction-past-due) event.
1112 #[serde(rename = "transaction.past_due")]
1113 TransactionPastDue(crate::entities::Transaction),
1114 /// A [`transaction.payment_failed`](https://developer.paddle.com/webhooks/transactions/transaction-payment-failed) event.
1115 #[serde(rename = "transaction.payment_failed")]
1116 TransactionPaymentFailed(crate::entities::Transaction),
1117 /// A [`transaction.ready`](https://developer.paddle.com/webhooks/transactions/transaction-ready) event.
1118 #[serde(rename = "transaction.ready")]
1119 TransactionReady(crate::entities::Transaction),
1120 /// A [`transaction.revised`](https://developer.paddle.com/webhooks/transactions/transaction-revised) event.
1121 #[serde(rename = "transaction.revised")]
1122 TransactionRevised(crate::entities::Transaction),
1123 /// A [`transaction.updated`](https://developer.paddle.com/webhooks/transactions/transaction-updated) event.
1124 #[serde(rename = "transaction.updated")]
1125 TransactionUpdated(crate::entities::Transaction),
1126}
1127
1128/// Status of this subscription item. Set automatically by Paddle.
1129#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1130#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1131#[serde(rename_all = "lowercase")]
1132#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1133#[non_exhaustive]
1134pub enum SubscriptionItemStatus {
1135 /// This item is active. It is not in trial and Paddle bills for it.
1136 Active,
1137 /// This item is not active. Set when the related subscription is paused.
1138 Inactive,
1139 /// This item is in trial. Paddle has not billed for it.
1140 Trialing,
1141}
1142
1143/// How tax is calculated for this price.
1144#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1145#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1146#[serde(rename_all = "snake_case")]
1147#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1148#[non_exhaustive]
1149pub enum TaxMode {
1150 /// Prices use the setting from your account.
1151 AccountSetting,
1152 /// Prices are exclusive of tax.
1153 External,
1154 /// Prices are inclusive of tax.
1155 Internal,
1156}
1157
1158/// Tax category for this product. Used for charging the correct rate of tax. Selected tax category must be enabled on your Paddle account.
1159#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1160#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1161#[serde(rename_all = "kebab-case")]
1162#[cfg_attr(feature = "strum", strum(serialize_all = "kebab-case"))]
1163#[non_exhaustive]
1164pub enum TaxCategory {
1165 /// Non-customizable digital files or media (not software) acquired with an up front payment that can be accessed without any physical product being delivered.
1166 DigitalGoods,
1167 /// Digital books and educational material which is sold with permanent rights for use by the customer.
1168 Ebooks,
1169 /// Remote configuration, set-up, and integrating software on behalf of a customer.
1170 ImplementationServices,
1171 /// Services that involve the application of your expertise and specialized knowledge of a software product.
1172 ProfessionalServices,
1173 /// Products that allow users to connect to and use online or cloud-based applications over the Internet.
1174 Saas,
1175 /// Services that can be used to customize and white label software products.
1176 SoftwareProgrammingServices,
1177 /// Software products that are pre-written and can be downloaded and installed onto a local device.
1178 Standard,
1179 /// Training and education services related to software products.
1180 TrainingServices,
1181 /// Cloud storage service for personal or corporate information, assets, or intellectual property.
1182 WebsiteHosting,
1183}
1184
1185impl AsRef<str> for TaxCategory {
1186 fn as_ref(&self) -> &str {
1187 match self {
1188 Self::DigitalGoods => "digital-goods",
1189 Self::Ebooks => "ebooks",
1190 Self::ImplementationServices => "implementation-services",
1191 Self::ProfessionalServices => "professional-services",
1192 Self::Saas => "saas",
1193 Self::SoftwareProgrammingServices => "software-programming-services",
1194 Self::Standard => "standard",
1195 Self::TrainingServices => "training-services",
1196 Self::WebsiteHosting => "website-hosting",
1197 }
1198 }
1199}
1200
1201/// Type of payment method used for this payment attempt.
1202#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1203#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1204#[serde(rename_all = "snake_case")]
1205#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1206#[non_exhaustive]
1207pub enum PaymentMethodType {
1208 /// Alipay, popular in China.
1209 Alipay,
1210 /// Apple Pay on a supported Apple device.
1211 ApplePay,
1212 /// Bancontact, popular in Belgium.
1213 Bancontact,
1214 /// Credit or debit card.
1215 Card,
1216 /// Google Pay on a supported Android device, Chromebook, or Google Chrome browser.
1217 GooglePay,
1218 /// iDEAL, popular in the Netherlands.
1219 Ideal,
1220 /// Payment recorded offline.
1221 Offline,
1222 /// PayPal.
1223 Paypal,
1224 /// Payment method not known.
1225 Unknown,
1226 /// Wire transfer, sometimes called bank transfer.
1227 WireTransfer,
1228}
1229
1230/// Status of this notification.
1231#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1232#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1233#[non_exhaustive]
1234pub enum NotificationStatus {
1235 /// Paddle hasn't yet tried to deliver this notification.
1236 NotAttempted,
1237 /// Paddle tried to deliver this notification, but it failed. It's scheduled to be retried.
1238 NeedsRetry,
1239 /// Paddle delivered this notification successfully.
1240 Delivered,
1241 /// Paddle tried to deliver this notification, but all attempts failed. It's not scheduled to be retried.
1242 Failed,
1243}
1244
1245/// Describes how this notification was created.
1246#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1247#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1248#[non_exhaustive]
1249pub enum NotificationOrigin {
1250 /// Notification created when a subscribed event occurred.
1251 Event,
1252 /// Notification created when a notification with the origin `event` was replayed.
1253 Replay,
1254}
1255
1256/// Where notifications should be sent for this destination.
1257#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1258#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1259#[non_exhaustive]
1260pub enum NotificationSettingType {
1261 /// Deliver to an email address.
1262 Email,
1263 /// Deliver to a webhook endpoint.
1264 Url,
1265}
1266
1267/// Whether Paddle should deliver real platform events, simulation events or both to this notification destination.
1268#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1269#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1270#[non_exhaustive]
1271pub enum TrafficSource {
1272 /// Deliver real platform events to this notification destination.
1273 Platform,
1274 /// Deliver simulation events to this notification destination.
1275 Simulation,
1276 /// Deliver platform and simulation events to this notification destination.
1277 All,
1278}
1279
1280/// Operator to use when filtering.
1281#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1282#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1283#[serde(rename_all = "lowercase")]
1284#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1285#[non_exhaustive]
1286pub enum FilterOperator {
1287 /// Less than.
1288 Lt,
1289 /// Greater than or equal to.
1290 Gte,
1291}
1292
1293#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1294#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1295#[serde(rename_all = "snake_case")]
1296#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1297#[non_exhaustive]
1298pub enum TransactionOrigin {
1299 /// Transaction created via the Paddle API.
1300 Api,
1301 /// Transaction created automatically by Paddle as a result of a one-time charge for a subscription.
1302 SubscriptionCharge,
1303 /// Transaction created automatically as part of updating a payment method. May be a zero value transaction.
1304 SubscriptionPaymentMethodChange,
1305 /// Transaction created automatically by Paddle as a result of a subscription renewal.
1306 SubscriptionRecurring,
1307 /// Transaction created automatically by Paddle as a result of an update to a subscription.
1308 SubscriptionUpdate,
1309 /// Transaction created automatically by Paddle.js for a checkout.
1310 Web,
1311}
1312
1313/// Status of this report. Set automatically by Paddle.
1314///
1315/// Reports are created as `pending` initially, then move to `ready` when they're available to download.
1316#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1317#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1318#[serde(rename_all = "snake_case")]
1319#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1320#[non_exhaustive]
1321pub enum ReportStatus {
1322 /// Report created, but Paddle is processing it. It's not yet ready for download.
1323 Pending,
1324 /// Report fully processed by Paddle and ready for download.
1325 Ready,
1326 /// There was a problem processing this report.
1327 Failed,
1328 /// Report has expired and is no longer accessible.
1329 Expired,
1330}
1331
1332/// Field name to filter by.
1333#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1334#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1335#[serde(rename_all = "snake_case")]
1336#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1337#[non_exhaustive]
1338pub enum AdjustmentsReportFilterName {
1339 /// Filter by adjustment action. Pass an array of strings containing any valid value for the `action` field against an adjustment.
1340 Action,
1341 /// Filter by transaction or adjustment currency. Pass an array of strings containing any valid supported three-letter ISO 4217 currency code.
1342 CurrencyCode,
1343 /// 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.
1344 Status,
1345 /// Filter by transaction or adjustment updated date. Pass an RFC 3339 datetime string.
1346 UpdatedAt,
1347}
1348
1349/// Field name to filter by.
1350#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1351#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1352#[serde(rename_all = "snake_case")]
1353#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1354#[non_exhaustive]
1355pub enum DiscountsReportFilterName {
1356 /// Filter by discount type. Pass an array of strings containing any valid value for the `type` field against a discount.
1357 Type,
1358 /// Filter by discount status. Pass an array of strings containing any valid value for the `status` field against a discount.
1359 Status,
1360 /// Filter by discount updated date. Pass an RFC 3339 datetime string.
1361 UpdatedAt,
1362}
1363
1364/// Field name to filter by.
1365#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1366#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1367#[serde(rename_all = "snake_case")]
1368#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1369#[non_exhaustive]
1370pub enum BalanceReportFilterName {
1371 /// Filter by discount updated date. Pass an RFC 3339 datetime string.
1372 UpdatedAt,
1373}
1374
1375/// Field name to filter by.
1376#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1377#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1378#[serde(rename_all = "snake_case")]
1379#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1380#[non_exhaustive]
1381pub enum ProductPricesReportFilterName {
1382 /// Filter by product status. Pass an array of strings containing any valid value for the `status` field against a product.
1383 ProductStatus,
1384 /// Filter by price status. Pass an array of strings containing any valid value for the `status` field against a price.
1385 PriceStatus,
1386 /// Filter by product type. Pass an array of strings containing any valid value for the `type` field against a product.
1387 ProductType,
1388 /// Filter by price type. Pass an array of strings containing any valid value for the `type` field against a price.
1389 PriceType,
1390 /// Filter by product `updated_at` date. Pass an RFC 3339 datetime string.
1391 ProductUpdatedAt,
1392 /// Filter by price `updated_at` date. Pass an RFC 3339 datetime string.
1393 PriceUpdatedAt,
1394}
1395
1396/// Field name to filter by.
1397#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1398#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1399#[serde(rename_all = "snake_case")]
1400#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1401#[non_exhaustive]
1402pub enum TransactionsReportFilterName {
1403 /// Filter by collection mode. Pass an array of strings containing any valid value for the `collection_mode` field against a transaction.
1404 CollectionMode,
1405 /// Filter by transaction or adjustment currency. Pass an array of strings containing any valid supported three-letter ISO 4217 currency code.
1406 CurrencyCode,
1407 /// Filter by transaction origin. Pass an array of strings containing any valid value for the origin field against a transaction.
1408 Origin,
1409 /// 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.
1410 Status,
1411 /// Filter by transaction or adjustment updated date. Pass an RFC 3339 datetime string.
1412 UpdatedAt,
1413}
1414
1415/// Type of report.
1416#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1417#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1418#[serde(rename_all = "snake_case")]
1419#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1420#[non_exhaustive]
1421pub enum AdjustmentsReportType {
1422 /// Adjustments reports contain information about refunds, credits, and chargebacks.
1423 Adjustments,
1424 /// Adjustments reports contain information about refunds, credits, and chargebacks. The report is broken down by line item level.
1425 AdjustmentLineItems,
1426}
1427
1428impl ReportType for AdjustmentsReportType {
1429 type FilterName = AdjustmentsReportFilterName;
1430}
1431
1432/// Type of report.
1433#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1434#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1435#[serde(rename_all = "snake_case")]
1436#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1437#[non_exhaustive]
1438pub enum TransactionsReportType {
1439 /// Transactions reports contain information about revenue received, past due invoices, draft and issued invoices, and canceled transactions.
1440 Transactions,
1441 /// 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.
1442 TransactionLineItems,
1443}
1444
1445impl ReportType for TransactionsReportType {
1446 type FilterName = TransactionsReportFilterName;
1447}
1448
1449/// Type of report.
1450#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1451#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1452#[serde(rename_all = "snake_case")]
1453#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1454#[non_exhaustive]
1455pub enum ProductsAndPricesReportType {
1456 /// Products and prices reports contain information about your products and prices. May include non-catalog products and prices.
1457 ProductsPrices,
1458}
1459
1460impl ReportType for ProductsAndPricesReportType {
1461 type FilterName = ProductPricesReportFilterName;
1462}
1463
1464/// Type of report.
1465#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1466#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1467#[serde(rename_all = "snake_case")]
1468#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1469#[non_exhaustive]
1470pub enum DiscountsReportType {
1471 /// Discounts reports contain information about your product and checkout discounts.
1472 Discounts,
1473}
1474
1475impl ReportType for DiscountsReportType {
1476 type FilterName = DiscountsReportFilterName;
1477}
1478
1479/// Type of report.
1480#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1481#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1482#[serde(rename_all = "snake_case")]
1483#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1484#[non_exhaustive]
1485pub enum BalanceReportType {
1486 /// Balance reports contain information about your account balance activity, including all movements of funds in and out of your balance.
1487 Balance,
1488}
1489
1490impl ReportType for BalanceReportType {
1491 type FilterName = BalanceReportFilterName;
1492}
1493
1494/// Status of this simulation run log.
1495#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1496#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1497#[non_exhaustive]
1498pub enum SimulationEventStatus {
1499 /// Simulation run log is pending. Paddle hasn't yet tried to deliver the simulated event.
1500 Pending,
1501 /// Simulation run log was successful. Paddle delivered the simulated event successfully.
1502 Success,
1503 /// 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.
1504 Failed,
1505 /// Simulation run log aborted. Paddle could not attempt delivery of the simulated event.
1506 Aborted,
1507}
1508
1509/// Status of this simulation run.
1510#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1511#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1512#[non_exhaustive]
1513pub enum SimulationRunStatus {
1514 /// Simulation run is pending. Paddle is sending events that are part of this simulation.
1515 Pending,
1516 /// Simulation run is completed. Paddle attempted to send events that are part of this simulation.
1517 Completed,
1518 /// Simulation run is canceled. Simulation run was canceled before all events were sent.
1519 Canceled,
1520}
1521
1522/// Scenario for a simulation.
1523#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1524#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1525#[non_exhaustive]
1526pub enum SimulationScenarioType {
1527 /// Simulates all events sent when a subscription is created.
1528 SubscriptionCreation,
1529 /// Simulates all events sent when a subscription is renewed.
1530 SubscriptionRenewal,
1531 /// Simulates all events sent when a subscription is paused.
1532 SubscriptionPause,
1533 /// Simulates all events sent when a subscription is resumed.
1534 SubscriptionResume,
1535 /// Simulates all events sent when a subscription is canceled.
1536 SubscriptionCancellation,
1537}
1538
1539/// Type of simulation.
1540#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1541#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1542#[non_exhaustive]
1543pub enum SimulationKind {
1544 /// Paddle simulates a single event.
1545 SingleEvent,
1546 /// Paddle simulates a predefined series of events for a scenario, like all events created when a subscription renews.
1547 Scenario,
1548}
1549
1550/// Status of this payment attempt.
1551#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1552#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1553#[serde(rename_all = "snake_case")]
1554#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1555#[non_exhaustive]
1556pub enum PaymentAttemptStatus {
1557 /// Authorized but not captured. Payment attempt is incomplete.
1558 Authorized,
1559 /// Authorized but not captured because it has been flagged as potentially fraudulent. Payment attempt is incomplete.
1560 AuthorizedFlagged,
1561 /// Previously authorized payment attempt has been canceled. Typically when `authorized_flagged` payment attempts are rejected.
1562 Canceled,
1563 /// Payment captured successfully. Payment attempt is complete.
1564 Captured,
1565 /// Something went wrong and the payment attempt was unsuccessful. Check the `error_code` for more information.
1566 Error,
1567 /// Customer must complete an action for this payment attempt to proceed. Typically means that the payment attempt requires 3DS.
1568 ActionRequired,
1569 /// Response required from the bank or payment provider. Transaction is pending.
1570 PendingNoActionRequired,
1571 /// New payment attempt created.
1572 Created,
1573 /// Payment attempt status not known.
1574 Unknown,
1575 /// Payment attempt dropped by Paddle.
1576 Dropped,
1577}
1578
1579/// Status of this subscription. Set automatically by Paddle. Use the pause subscription or cancel subscription operations to change.
1580#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1581#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1582#[serde(rename_all = "snake_case")]
1583#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1584#[non_exhaustive]
1585pub enum SubscriptionStatus {
1586 /// Subscription is active. Paddle is billing for this subscription and related transactions aren't past due.
1587 Active,
1588 /// 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.
1589 Canceled,
1590 /// 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).
1591 PastDue,
1592 /// 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.
1593 Paused,
1594 /// Subscription is in trial.
1595 Trialing,
1596}
1597
1598/// 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.
1599#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1600#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1601#[serde(rename_all = "snake_case")]
1602#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1603#[non_exhaustive]
1604pub enum TransactionStatus {
1605 /// Transaction is missing required fields. Typically the first stage of a checkout before customer details are captured.
1606 Draft,
1607 /// Transaction has all of the required fields to be marked as `billed` or `completed`.
1608 Ready,
1609 /// 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.
1610 Billed,
1611 /// Transaction is fully paid, but has not yet been processed internally.
1612 Paid,
1613 /// Transaction is fully paid and processed.
1614 Completed,
1615 /// Transaction has been updated to `canceled`. If an invoice, it's no longer due.
1616 Canceled,
1617 /// 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.
1618 PastDue,
1619}
1620
1621/// Kind of change that's scheduled to be applied to this subscription.
1622#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1623#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1624#[serde(rename_all = "lowercase")]
1625#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1626#[non_exhaustive]
1627pub enum ScheduledChangeAction {
1628 /// Subscription is scheduled to cancel. Its status changes to `canceled` on the `effective_at` date.
1629 Cancel,
1630 /// Subscription is scheduled to pause. Its status changes to `pause` on the `effective_at` date.
1631 Pause,
1632 /// Subscription is scheduled to resume. Its status changes to `active` on the `resume_at` date.
1633 Resume,
1634}
1635
1636/// How Paddle should handle changes made to a subscription or its items if the payment fails during update. If omitted, defaults to `prevent_change`.
1637#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1638#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1639#[serde(rename_all = "snake_case")]
1640#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1641#[non_exhaustive]
1642pub enum SubscriptionOnPaymentFailure {
1643 /// In case of payment failure, prevent the change to the subscription from applying.
1644 PreventChange,
1645 /// In case of payment failure, apply the change and update the subscription.
1646 ApplyChange,
1647}
1648
1649/// Whether the subscription change results in a prorated credit or a charge.
1650#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1651#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1652#[serde(rename_all = "lowercase")]
1653#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1654#[non_exhaustive]
1655pub enum UpdateSummaryResultAction {
1656 /// Changes to the subscription results in a prorated credit.
1657 Credit,
1658 /// Changes to the subscription results in a prorated charge.
1659 Charge,
1660}
1661
1662/// How Paddle should handle proration calculation for changes made to a subscription or its items. Required when making
1663/// changes that impact billing.
1664///
1665/// For automatically-collected subscriptions, responses may take longer than usual if a proration billing mode that
1666/// collects for payment immediately is used.
1667#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1668#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1669#[serde(rename_all = "snake_case")]
1670#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1671#[non_exhaustive]
1672pub enum ProrationBillingMode {
1673 /// Paddle calculates the prorated amount for the subscription changes based on the current billing cycle, then
1674 /// creates a transaction to collect immediately.
1675 ProratedImmediately,
1676 /// Paddle calculates the prorated amount for the subscription changes based on the current billing cycle, then
1677 /// schedules them to be billed on the next renewal.
1678 ProratedNextBillingPeriod,
1679 /// Paddle does not calculate proration for the subscription changes, creating a transaction to collect for the full
1680 /// amount immediately.
1681 FullImmediately,
1682 /// Paddle does not calculate proration for the subscription changes, scheduling for the full amount for the changes
1683 /// to be billed on the next renewal.
1684 FullNextBillingPeriod,
1685 /// Paddle does not bill for the subscription changes.
1686 DoNotBill,
1687}
1688
1689/// How Paddle should set the billing period for the subscription when resuming. If omitted, defaults to `start_new_billing_period`.
1690#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1691#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1692#[serde(rename_all = "snake_case")]
1693#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1694#[non_exhaustive]
1695pub enum SubscriptionOnResume {
1696 /// 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.
1697 ContinueExistingBillingPeriod,
1698 /// 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.
1699 StartNewBillingPeriod,
1700}
1701
1702/// Determine whether the generated URL should download the PDF as an attachment saved locally, or open it inline in the browser.
1703#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1704#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1705#[serde(rename_all = "lowercase")]
1706#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1707#[non_exhaustive]
1708pub enum Disposition {
1709 /// Generated URL downloads the PDF as an attachment. Browsers typically automatically save the PDF.
1710 Attachment,
1711 /// Generated URL displays the PDF inline in the browser. Browsers typically open the PDF in the current tab.
1712 Inline,
1713}
1714
1715#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1716#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1717#[serde(rename_all = "lowercase")]
1718#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1719#[non_exhaustive]
1720pub enum PayoutStatus {
1721 /// Payout is paid.
1722 Paid,
1723 /// Payout is unpaid. Typically means it has been created, but is not yet completed.
1724 Unpaid,
1725}
1726
1727#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1728#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1729#[serde(rename_all = "lowercase")]
1730#[cfg_attr(feature = "strum", strum(serialize_all = "lowercase"))]
1731#[non_exhaustive]
1732pub enum ApiKeyStatus {
1733 Active,
1734 Expired,
1735 Revoked,
1736}
1737
1738/// Include related entities in the response.
1739#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
1740#[cfg_attr(feature = "strum", derive(EnumString, Display))]
1741#[serde(rename_all = "snake_case")]
1742#[cfg_attr(feature = "strum", strum(serialize_all = "snake_case"))]
1743#[non_exhaustive]
1744pub enum SubscriptionInclude {
1745 /// 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.
1746 NextTransaction,
1747 /// 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.
1748 RecurringTransactionDetails,
1749}