1pub use crate::{Amount, DateTime, Uuid};
2pub type AccountingDimensions = Vec<AccountingDimension>;
3
4#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5#[serde(rename_all = "PascalCase")]
6pub struct AccountingDimension {
7 pub creditor_public_id: Uuid,
8 pub name: Option<String>,
9 pub dimension: i32,
10 pub code: Option<String>,
11 pub description: Option<String>,
12 pub comments: Option<String>,
13 pub active: bool,
14}
15impl AccountingDimension {
16 pub fn new(creditor_public_id: Uuid, dimension: i32, active: bool) -> Self {
17 Self {
18 creditor_public_id,
19 dimension,
20 active,
21 name: None,
22 code: None,
23 description: None,
24 comments: None,
25 }
26 }
27}
28
29#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
30#[serde(rename_all = "PascalCase")]
31pub struct AccountingExportCreation {
32 pub creditor_public_id: Uuid,
33 pub from: DateTime,
34 pub to: DateTime,
35
36 #[serde(default, skip_serializing_if = "Vec::is_empty")]
37 pub book_keeping_types_filter: Vec<AccountingRecordType>,
38 pub date_selection_type: AccountingExportDateSelectionType,
39 pub format: AccountingExportFormatType,
40 pub summarize_accounts_by_date: bool,
41 pub append_trans_description: bool,
42}
43impl AccountingExportCreation {
44 pub fn new(
45 creditor_public_id: Uuid,
46 from: DateTime,
47 to: DateTime,
48 date_selection_type: AccountingExportDateSelectionType,
49 format: AccountingExportFormatType,
50 summarize_accounts_by_date: bool,
51 append_trans_description: bool,
52 ) -> Self {
53 Self {
54 creditor_public_id,
55 from,
56 to,
57 date_selection_type,
58 format,
59 summarize_accounts_by_date,
60 append_trans_description,
61 book_keeping_types_filter: Vec::new(),
62 }
63 }
64}
65
66pub type AccountingExports = Vec<AccountingExport>;
67
68#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
69#[serde(rename_all = "PascalCase")]
70pub struct AccountingExport {
71 pub creditor_public_id: Uuid,
72 pub start: DateTime,
73 pub end: DateTime,
74 pub created: Option<DateTime>,
75 pub created_by: Option<String>,
76 pub format: AccountingExportFormatType,
77 pub date_selection_type: AccountingExportDateSelectionType,
78 pub file: Option<File>,
79}
80impl AccountingExport {
81 pub fn new(
82 creditor_public_id: Uuid,
83 start: DateTime,
84 end: DateTime,
85 format: AccountingExportFormatType,
86 date_selection_type: AccountingExportDateSelectionType,
87 ) -> Self {
88 Self {
89 creditor_public_id,
90 start,
91 end,
92 format,
93 date_selection_type,
94 created: None,
95 created_by: None,
96 file: None,
97 }
98 }
99}
100
101#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
102#[serde(rename_all = "PascalCase")]
103pub struct File {
104 pub file_public_id: Uuid,
105 pub content_type: Option<String>,
106 pub data: Option<Vec<u8>>,
107 pub file_name: Option<String>,
108}
109impl File {
110 pub fn new(file_public_id: Uuid) -> Self {
111 Self {
112 file_public_id,
113 content_type: None,
114 data: None,
115 file_name: None,
116 }
117 }
118}
119
120pub type AccountingPaymentMeans = Vec<AccountingPaymentMean>;
121
122#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
123#[serde(rename_all = "PascalCase")]
124pub struct AccountingPaymentMean {
125 pub creditor_public_id: Uuid,
126 pub payment_code: Option<String>,
127 pub description: Option<String>,
128 pub bookkeeping_account: Option<String>,
129}
130impl AccountingPaymentMean {
131 pub fn new(creditor_public_id: Uuid) -> Self {
132 Self {
133 creditor_public_id,
134 payment_code: None,
135 description: None,
136 bookkeeping_account: None,
137 }
138 }
139}
140
141pub type AccountingRecords = Vec<AccountingRecord>;
142
143#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
144#[serde(rename_all = "PascalCase")]
145pub struct AccountingRecord {
146 pub transaction_date: DateTime,
147 pub amount: Option<Amount>,
148 pub project: Option<String>,
149 pub cost_center: Option<String>,
150 pub product_public_id: Option<Uuid>,
151 pub period_end: Option<DateTime>,
152 pub period_start: Option<DateTime>,
153 pub r_type: AccountingRecordType,
154 pub created: DateTime,
155
156 #[serde(rename = "VAT")]
157 pub vat: f64,
158 pub invoice_number: Option<String>,
159 pub action_public_id: Option<String>,
160 pub reference_id: Option<String>,
161 pub override_trade_debt_account: Option<String>,
162 pub override_account: Option<String>,
163}
164impl AccountingRecord {
165 pub fn new(
166 transaction_date: DateTime,
167 r_type: AccountingRecordType,
168 created: DateTime,
169 vat: f64,
170 ) -> Self {
171 Self {
172 transaction_date,
173 r_type,
174 created,
175 vat,
176 amount: None,
177 project: None,
178 cost_center: None,
179 product_public_id: None,
180 period_end: None,
181 period_start: None,
182 invoice_number: None,
183 action_public_id: None,
184 reference_id: None,
185 override_trade_debt_account: None,
186 override_account: None,
187 }
188 }
189}
190
191#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
192#[serde(rename_all = "PascalCase")]
193pub struct AccountingSettingsAccount {
194 pub account: Option<String>,
195
196 #[serde(rename = "VAT")]
197 pub vat: Option<f64>,
198 pub account_type: AccountingSettingsAccountType,
199}
200impl AccountingSettingsAccount {
201 pub fn new(account_type: AccountingSettingsAccountType) -> Self {
202 Self {
203 account_type,
204 account: None,
205 vat: None,
206 }
207 }
208}
209
210#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
211#[serde(rename_all = "PascalCase")]
212pub struct AccountingSettings {
213 pub creditor_public_id: Uuid,
214 pub voucher_series: Option<String>,
215 pub cost_center_is_required: bool,
216 pub project_is_required: bool,
217 pub accrual_is_enabled: bool,
218 pub disable_bookkeeping_over_payments: bool,
219 pub disable_bookkeeping_unmatched_payments: bool,
220 pub usage_of_unmatched_payment_is_booked_on_incoming_payment_date: bool,
221 pub resting_vat_is_enabled: bool,
222 pub fractionary_revenue_period_is_enabled: bool,
223
224 #[serde(rename = "SieKPTYP")]
225 pub sie_kptyp: Option<SieKPTYPType>,
226 pub fiscal_year: FiscalYearType,
227 pub extended_first_fiscal_year_start_date: Option<DateTime>,
228
229 #[serde(default, skip_serializing_if = "Vec::is_empty")]
230 pub accounts: Vec<AccountingSettingsAccount>,
231 pub default_sales_account: Option<String>,
232 pub default_bankgiro_payment_code: Option<String>,
233 pub default_financial_payment_code: Option<String>,
234 pub default_autogiro_payment_code: Option<String>,
235 pub default_swish_payment_code: Option<String>,
236 pub default_credit_card_payment_code: Option<String>,
237 pub default_iban_payment_code: Option<String>,
238 pub default_bank_account_payment_code: Option<String>,
239 pub default_plusgiro_payment_code: Option<String>,
240 pub default_camt_payment_code: Option<String>,
241 pub default_settling_overpayment_payment_code: Option<String>,
242 pub default_crediting_payment_code: Option<String>,
243 pub book_keeping_method: BookKeepingMethod,
244 pub lock_previous_periods_at_day: Option<i32>,
245
246 #[serde(default, skip_serializing_if = "Vec::is_empty")]
247 pub exclude_cost_center_and_project_for_accounts: Vec<String>,
248}
249
250#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
251#[serde(rename_all = "PascalCase")]
252pub struct AccountingVoucherExportCreation {
253 pub creditor_public_id: Uuid,
254 pub from: DateTime,
255 pub to: DateTime,
256
257 #[serde(default, skip_serializing_if = "Vec::is_empty")]
258 pub book_keeping_types_filter: Vec<AccountingRecordType>,
259 pub date_selection_type: AccountingExportDateSelectionType,
260}
261impl AccountingVoucherExportCreation {
262 pub fn new(
263 creditor_public_id: Uuid,
264 from: DateTime,
265 to: DateTime,
266 date_selection_type: AccountingExportDateSelectionType,
267 ) -> Self {
268 Self {
269 creditor_public_id,
270 from,
271 to,
272 date_selection_type,
273 book_keeping_types_filter: Vec::new(),
274 }
275 }
276}
277
278pub type AccountingVoucherRecords = Vec<AccountingVoucherRecord>;
279
280#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
281#[serde(rename_all = "PascalCase")]
282pub struct AccountingVoucherRecord {
283 pub description: Option<String>,
284 pub invoice_number: Option<String>,
285 pub transaction_date: DateTime,
286
287 #[serde(default, skip_serializing_if = "Vec::is_empty")]
288 pub transactions: Vec<AccountingVoucherTransaction>,
289}
290impl AccountingVoucherRecord {
291 pub fn new(transaction_date: DateTime) -> Self {
292 Self {
293 transaction_date,
294 description: None,
295 invoice_number: None,
296 transactions: Vec::new(),
297 }
298 }
299}
300
301#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
302#[serde(rename_all = "PascalCase")]
303pub struct AccountingVoucherTransaction {
304 pub debet_amount: Option<Amount>,
305 pub credit_amount: Option<Amount>,
306 pub account: Option<String>,
307 pub cost_center: Option<String>,
308 pub project: Option<String>,
309
310 #[serde(default, skip_serializing_if = "Vec::is_empty")]
311 pub dimensions: Vec<DimensionCode>,
312}
313
314#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
315#[serde(rename_all = "PascalCase")]
316pub struct DimensionCode {
317 pub dimension: i32,
318 pub code: Option<String>,
319}
320impl DimensionCode {
321 pub fn new(dimension: i32) -> Self {
322 Self {
323 dimension,
324 code: None,
325 }
326 }
327}
328
329#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
330#[serde(rename_all = "PascalCase")]
331pub struct ActionPublicIds {
332 #[serde(default, skip_serializing_if = "Vec::is_empty")]
333 pub action_public_ids: Vec<String>,
334}
335
336pub type ActionReferences = Vec<ActionReference>;
337
338#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
339#[serde(rename_all = "PascalCase")]
340pub struct ActionReference {
341 pub action_public_id: Option<String>,
342 pub reference_public_id: Option<String>,
343}
344
345#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
346#[serde(rename_all = "PascalCase")]
347pub struct AddMultipleDebtorsToCategoryRequest {
348 pub category_public_id: Uuid,
349 pub creditor_public_id: Uuid,
350
351 #[serde(default, skip_serializing_if = "Vec::is_empty")]
352 pub debtor_public_ids: Vec<Uuid>,
353}
354impl AddMultipleDebtorsToCategoryRequest {
355 pub fn new(category_public_id: Uuid, creditor_public_id: Uuid) -> Self {
356 Self {
357 category_public_id,
358 creditor_public_id,
359 debtor_public_ids: Vec::new(),
360 }
361 }
362}
363
364#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
365#[serde(rename_all = "PascalCase")]
366pub struct AttestMultipleInvoicesRequest {
367 #[serde(default, skip_serializing_if = "Vec::is_empty")]
368 pub creditor_public_ids: Vec<Uuid>,
369}
370
371#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
372#[serde(rename_all = "PascalCase")]
373pub struct BillectaDocsAdditionalInfo {
374 pub text: Option<String>,
375}
376
377#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
378#[serde(rename_all = "PascalCase")]
379pub struct BillectaDocsHidden {}
380
381#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
382#[serde(rename_all = "PascalCase")]
383pub struct BillectaDocsRequired {}
384
385#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
386#[serde(rename_all = "PascalCase")]
387pub struct EnumCompabilityDefault {
388 pub default_value: i32,
389}
390impl EnumCompabilityDefault {
391 pub fn new(default_value: i32) -> Self {
392 Self { default_value }
393 }
394}
395
396#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
397#[serde(rename_all = "PascalCase")]
398pub struct UtcDateTimeConverter {}
399
400pub type AutogiroPaymentStatuses = Vec<AutogiroPaymentStatus>;
401
402#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
403#[serde(rename_all = "PascalCase")]
404pub struct AutogiroPaymentStatus {
405 pub payment_public_id: Option<Uuid>,
406 pub creditor_public_id: Uuid,
407 pub debtor_name: Option<String>,
408 pub status: AutogiroPaymentStatusType,
409 pub amount: Option<Amount>,
410 pub payment_date: DateTime,
411 pub action_public_id: Option<String>,
412 pub comment: Option<String>,
413 pub created: DateTime,
414}
415impl AutogiroPaymentStatus {
416 pub fn new(
417 creditor_public_id: Uuid,
418 status: AutogiroPaymentStatusType,
419 payment_date: DateTime,
420 created: DateTime,
421 ) -> Self {
422 Self {
423 creditor_public_id,
424 status,
425 payment_date,
426 created,
427 payment_public_id: None,
428 debtor_name: None,
429 amount: None,
430 action_public_id: None,
431 comment: None,
432 }
433 }
434}
435
436#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
437#[serde(rename_all = "PascalCase")]
438pub struct AutogiroWithdrawal {
439 pub autogiro_withdrawal_enabled: bool,
440}
441impl AutogiroWithdrawal {
442 pub fn new(autogiro_withdrawal_enabled: bool) -> Self {
443 Self {
444 autogiro_withdrawal_enabled,
445 }
446 }
447}
448
449#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
450#[serde(rename_all = "PascalCase")]
451pub struct BankAccountRequest {
452 pub public_id: Option<String>,
453 pub bank: BankAccountBankType,
454
455 #[serde(rename = "SSN")]
456 pub ssn: Option<String>,
457
458 #[serde(rename = "QR")]
459 pub qr: Option<String>,
460 pub status: BankAccountStatusType,
461
462 #[serde(default, skip_serializing_if = "Vec::is_empty")]
463 pub account_numbers: Vec<BankAccount>,
464 pub bank_id_autostart_token: Option<String>,
465 pub failure_message: Option<String>,
466 pub failure_code: Option<String>,
467}
468impl BankAccountRequest {
469 pub fn new(bank: BankAccountBankType, status: BankAccountStatusType) -> Self {
470 Self {
471 bank,
472 status,
473 public_id: None,
474 ssn: None,
475 qr: None,
476 account_numbers: Vec::new(),
477 bank_id_autostart_token: None,
478 failure_message: None,
479 failure_code: None,
480 }
481 }
482}
483
484#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
485#[serde(rename_all = "PascalCase")]
486pub struct BankAccount {
487 pub number: Option<String>,
488 pub clearing_no: Option<String>,
489 pub account_no: Option<String>,
490 pub name: Option<String>,
491 pub r_type: Option<String>,
492 pub balance: Option<Amount>,
493 pub iban: Option<String>,
494 pub holder_name: Option<String>,
495}
496
497#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
498#[serde(rename_all = "PascalCase")]
499pub struct BankIdAthentication {
500 pub personal_identity_number: Option<String>,
501 pub two_factor_bank_id_auth: bool,
502}
503impl BankIdAthentication {
504 pub fn new(two_factor_bank_id_auth: bool) -> Self {
505 Self {
506 two_factor_bank_id_auth,
507 personal_identity_number: None,
508 }
509 }
510}
511
512#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
513#[serde(rename_all = "PascalCase")]
514pub struct BankIdAuthenticationRequest {
515 pub creditor_public_id: Uuid,
516
517 #[serde(rename = "SSN")]
518 pub ssn: Option<String>,
519}
520impl BankIdAuthenticationRequest {
521 pub fn new(creditor_public_id: Uuid) -> Self {
522 Self {
523 creditor_public_id,
524 ssn: None,
525 }
526 }
527}
528
529#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
530#[serde(rename_all = "PascalCase")]
531pub struct BankIdAuthenticationStatus {
532 pub status: BankIdStatusType,
533
534 #[serde(rename = "SSN")]
535 pub ssn: Option<String>,
536 pub reference_token: Option<String>,
537 pub auto_start_token: Option<String>,
538 pub given_name: Option<String>,
539 pub surname: Option<String>,
540 pub ip_address: Option<String>,
541 pub name: Option<String>,
542
543 #[serde(rename = "QR")]
544 pub qr: Option<String>,
545 pub not_after: Option<DateTime>,
546 pub not_before: Option<DateTime>,
547 pub ocsp_response: Option<String>,
548 pub signature: Option<String>,
549 pub created: DateTime,
550 pub hint_code: Option<BankIdHintCodeType>,
551 pub details: Option<String>,
552}
553impl BankIdAuthenticationStatus {
554 pub fn new(status: BankIdStatusType, created: DateTime) -> Self {
555 Self {
556 status,
557 created,
558 ssn: None,
559 reference_token: None,
560 auto_start_token: None,
561 given_name: None,
562 surname: None,
563 ip_address: None,
564 name: None,
565 qr: None,
566 not_after: None,
567 not_before: None,
568 ocsp_response: None,
569 signature: None,
570 hint_code: None,
571 details: None,
572 }
573 }
574}
575
576#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
577#[serde(rename_all = "PascalCase")]
578pub struct BankIdPhoneAuthenticationRequest {
579 pub creditor_public_id: Uuid,
580
581 #[serde(rename = "SSN")]
582 pub ssn: Option<String>,
583 pub user_visible_data: Option<String>,
584 pub user_non_visible_data: Option<String>,
585 pub user_made_the_call: bool,
586}
587impl BankIdPhoneAuthenticationRequest {
588 pub fn new(creditor_public_id: Uuid, user_made_the_call: bool) -> Self {
589 Self {
590 creditor_public_id,
591 user_made_the_call,
592 ssn: None,
593 user_visible_data: None,
594 user_non_visible_data: None,
595 }
596 }
597}
598
599#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
600#[serde(rename_all = "PascalCase")]
601pub struct BankIdSignRequest {
602 pub creditor_public_id: Uuid,
603
604 #[serde(rename = "SSN")]
605 pub ssn: Option<String>,
606 pub user_message: Option<String>,
607 pub user_non_visible_data: Option<String>,
608}
609impl BankIdSignRequest {
610 pub fn new(creditor_public_id: Uuid) -> Self {
611 Self {
612 creditor_public_id,
613 ssn: None,
614 user_message: None,
615 user_non_visible_data: None,
616 }
617 }
618}
619
620#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
621#[serde(rename_all = "PascalCase")]
622pub struct BankIdSignStatus {
623 pub status: BankIdStatusType,
624
625 #[serde(rename = "SSN")]
626 pub ssn: Option<String>,
627 pub reference_token: Option<String>,
628 pub auto_start_token: Option<String>,
629 pub given_name: Option<String>,
630 pub surname: Option<String>,
631 pub ip_address: Option<String>,
632 pub name: Option<String>,
633
634 #[serde(rename = "QR")]
635 pub qr: Option<String>,
636 pub not_after: Option<DateTime>,
637 pub not_before: Option<DateTime>,
638 pub ocsp_response: Option<String>,
639 pub signature: Option<String>,
640 pub created: DateTime,
641 pub hint_code: Option<BankIdHintCodeType>,
642}
643impl BankIdSignStatus {
644 pub fn new(status: BankIdStatusType, created: DateTime) -> Self {
645 Self {
646 status,
647 created,
648 ssn: None,
649 reference_token: None,
650 auto_start_token: None,
651 given_name: None,
652 surname: None,
653 ip_address: None,
654 name: None,
655 qr: None,
656 not_after: None,
657 not_before: None,
658 ocsp_response: None,
659 signature: None,
660 hint_code: None,
661 }
662 }
663}
664
665#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
666#[serde(rename_all = "PascalCase")]
667pub struct CardRefundPayment {
668 pub payment_public_id: Uuid,
669 pub amount: Option<Amount>,
670}
671impl CardRefundPayment {
672 pub fn new(payment_public_id: Uuid) -> Self {
673 Self {
674 payment_public_id,
675 amount: None,
676 }
677 }
678}
679
680#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
681#[serde(rename_all = "PascalCase")]
682pub struct CheckoutSettings {
683 pub creditor_public_id: Uuid,
684
685 #[serde(rename = "CreditCardIBAN")]
686 pub credit_card_iban: Option<String>,
687
688 #[serde(rename = "CreditCardBIC")]
689 pub credit_card_bic: Option<String>,
690 pub agreement_file: Option<File>,
691}
692impl CheckoutSettings {
693 pub fn new(creditor_public_id: Uuid) -> Self {
694 Self {
695 creditor_public_id,
696 credit_card_iban: None,
697 credit_card_bic: None,
698 agreement_file: None,
699 }
700 }
701}
702
703#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
704#[serde(rename_all = "PascalCase")]
705pub struct ClientConfig {
706 pub setup_completed: bool,
707 pub bankgiro_contract_url: Option<String>,
708 pub autogiro_contract_url: Option<String>,
709 pub country_code: Option<String>,
710 pub free_user_licences: i32,
711 pub user_licence_price: Option<Amount>,
712 pub lookup_price: Option<Amount>,
713 pub integration_module_price: Option<Amount>,
714 pub autogiro_service_price: Option<Amount>,
715 pub swish_service_price: Option<Amount>,
716 pub bank_id_service_fee: Option<Amount>,
717 pub checkout_service_fee: Option<Amount>,
718 pub credit_card_service_price: Option<Amount>,
719 pub accounting_source_price: Option<Amount>,
720 pub claim_long_term_surveilance_price: Option<Amount>,
721 pub eviction_handling_fee: Option<Amount>,
722 pub branding: Option<ExternalBranding>,
723
724 #[serde(rename = "PEAccountingServicePrice")]
725 pub pe_accounting_service_price: Option<Amount>,
726}
727impl ClientConfig {
728 pub fn new(setup_completed: bool, free_user_licences: i32) -> Self {
729 Self {
730 setup_completed,
731 free_user_licences,
732 bankgiro_contract_url: None,
733 autogiro_contract_url: None,
734 country_code: None,
735 user_licence_price: None,
736 lookup_price: None,
737 integration_module_price: None,
738 autogiro_service_price: None,
739 swish_service_price: None,
740 bank_id_service_fee: None,
741 checkout_service_fee: None,
742 credit_card_service_price: None,
743 accounting_source_price: None,
744 claim_long_term_surveilance_price: None,
745 eviction_handling_fee: None,
746 branding: None,
747 pe_accounting_service_price: None,
748 }
749 }
750}
751
752#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
753#[serde(rename_all = "PascalCase")]
754pub struct ExternalBranding {
755 #[serde(rename = "HeaderLogoURL")]
756 pub header_logo_url: Option<String>,
757 pub css_branded: bool,
758
759 #[serde(rename = "SecondLogoURL")]
760 pub second_logo_url: Option<String>,
761 pub base_background_color: Option<String>,
762 pub active_menu_background_color: Option<String>,
763 pub primary_text_color: Option<String>,
764 pub primary_color: Option<String>,
765 pub primary_hoover_color: Option<String>,
766 pub help_color: Option<String>,
767 pub help_hoover_color: Option<String>,
768 pub font: Option<String>,
769 pub customer_service_phone: Option<String>,
770 pub technical_support_email: Option<String>,
771 pub customer_service_email: Option<String>,
772 pub address: Option<String>,
773 pub system_name: Option<String>,
774 pub provider_name: Option<String>,
775 pub signout_landing_url: Option<String>,
776 pub favicon_url: Option<String>,
777 pub provider_url: Option<String>,
778 pub api_url: Option<String>,
779 pub portal_url: Option<String>,
780 pub my_pages_url: Option<String>,
781 pub kyc_url: Option<String>,
782 pub checkbox_background_image_name: Option<String>,
783 pub hide_faq: bool,
784}
785impl ExternalBranding {
786 pub fn new(css_branded: bool, hide_faq: bool) -> Self {
787 Self {
788 css_branded,
789 hide_faq,
790 header_logo_url: None,
791 second_logo_url: None,
792 base_background_color: None,
793 active_menu_background_color: None,
794 primary_text_color: None,
795 primary_color: None,
796 primary_hoover_color: None,
797 help_color: None,
798 help_hoover_color: None,
799 font: None,
800 customer_service_phone: None,
801 technical_support_email: None,
802 customer_service_email: None,
803 address: None,
804 system_name: None,
805 provider_name: None,
806 signout_landing_url: None,
807 favicon_url: None,
808 provider_url: None,
809 api_url: None,
810 portal_url: None,
811 my_pages_url: None,
812 kyc_url: None,
813 checkbox_background_image_name: None,
814 }
815 }
816}
817
818#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
819#[serde(rename_all = "PascalCase")]
820pub struct CommentAction {
821 pub action_public_id: Option<String>,
822 pub comment: Option<String>,
823 pub attachment: Option<File>,
824 pub target: CommentTargetType,
825}
826impl CommentAction {
827 pub fn new(target: CommentTargetType) -> Self {
828 Self {
829 target,
830 action_public_id: None,
831 comment: None,
832 attachment: None,
833 }
834 }
835}
836
837pub type CommonActionEvents = Vec<CommonActionEvent>;
838
839#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
840#[serde(rename_all = "PascalCase")]
841pub struct CommonActionEvent {
842 pub title: Option<String>,
843 pub content: Option<String>,
844 pub event_date: DateTime,
845 pub event_by: Option<String>,
846 pub reference: Option<String>,
847 pub event_type: EventType,
848 pub is_public: bool,
849 pub has_occured: bool,
850 pub event_public_id: Uuid,
851 pub creditor_public_id: Uuid,
852 pub action_public_id: Option<String>,
853 pub action_type: ActionType,
854}
855impl CommonActionEvent {
856 pub fn new(
857 event_date: DateTime,
858 event_type: EventType,
859 is_public: bool,
860 has_occured: bool,
861 event_public_id: Uuid,
862 creditor_public_id: Uuid,
863 action_type: ActionType,
864 ) -> Self {
865 Self {
866 event_date,
867 event_type,
868 is_public,
869 has_occured,
870 event_public_id,
871 creditor_public_id,
872 action_type,
873 title: None,
874 content: None,
875 event_by: None,
876 reference: None,
877 action_public_id: None,
878 }
879 }
880}
881
882#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
883#[serde(rename_all = "PascalCase")]
884pub struct ConfigurationDebtCollection {
885 pub send_to_debt_collection: bool,
886 pub send_to_debt_collection_days_after_due_date: i32,
887 pub number_of_debt_collection_reminders: i32,
888 pub debt_collection_payment_terms_in_days: i32,
889 pub start_debt_collection_action_level: DebtCollectionActionLevelType,
890 pub eviction: bool,
891 pub inform_social_welfare: bool,
892}
893impl ConfigurationDebtCollection {
894 pub fn new(
895 send_to_debt_collection: bool,
896 send_to_debt_collection_days_after_due_date: i32,
897 number_of_debt_collection_reminders: i32,
898 debt_collection_payment_terms_in_days: i32,
899 start_debt_collection_action_level: DebtCollectionActionLevelType,
900 eviction: bool,
901 inform_social_welfare: bool,
902 ) -> Self {
903 Self {
904 send_to_debt_collection,
905 send_to_debt_collection_days_after_due_date,
906 number_of_debt_collection_reminders,
907 debt_collection_payment_terms_in_days,
908 start_debt_collection_action_level,
909 eviction,
910 inform_social_welfare,
911 }
912 }
913}
914
915#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
916#[serde(rename_all = "PascalCase")]
917pub struct ConfigurationDeviationAnalysis {
918 pub deviation_analysis_enabled: bool,
919 pub deviation_threshold_percentage: f64,
920 pub deviation_period_length: i32,
921 pub deviation_period_is_rolling: bool,
922 pub deviation_expected_invoices_per_period: i32,
923 pub deviation_expected_invoice_amount_per_period: f64,
924}
925impl ConfigurationDeviationAnalysis {
926 pub fn new(
927 deviation_analysis_enabled: bool,
928 deviation_threshold_percentage: f64,
929 deviation_period_length: i32,
930 deviation_period_is_rolling: bool,
931 deviation_expected_invoices_per_period: i32,
932 deviation_expected_invoice_amount_per_period: f64,
933 ) -> Self {
934 Self {
935 deviation_analysis_enabled,
936 deviation_threshold_percentage,
937 deviation_period_length,
938 deviation_period_is_rolling,
939 deviation_expected_invoices_per_period,
940 deviation_expected_invoice_amount_per_period,
941 }
942 }
943}
944
945#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
946#[serde(rename_all = "PascalCase")]
947pub struct ConfigurationReminder {
948 pub send_reminder_invoice: bool,
949 pub send_reminder_invoice_days_after_due_date: i32,
950}
951impl ConfigurationReminder {
952 pub fn new(
953 send_reminder_invoice: bool,
954 send_reminder_invoice_days_after_due_date: i32,
955 ) -> Self {
956 Self {
957 send_reminder_invoice,
958 send_reminder_invoice_days_after_due_date,
959 }
960 }
961}
962
963pub type Configurations = Vec<Configuration>;
964
965#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
966#[serde(rename_all = "PascalCase")]
967pub struct Configuration {
968 pub creditor_public_id: Uuid,
969 pub code: Option<String>,
970 pub description: Option<String>,
971 pub priority: i32,
972 pub reminder_configuration: Option<ConfigurationReminder>,
973 pub debt_collection_configuration: Option<ConfigurationDebtCollection>,
974 pub deviation_analysis_configuration: Option<ConfigurationDeviationAnalysis>,
975}
976impl Configuration {
977 pub fn new(creditor_public_id: Uuid, priority: i32) -> Self {
978 Self {
979 creditor_public_id,
980 priority,
981 code: None,
982 description: None,
983 reminder_configuration: None,
984 debt_collection_configuration: None,
985 deviation_analysis_configuration: None,
986 }
987 }
988}
989
990#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
991#[serde(rename_all = "PascalCase")]
992pub struct ContractInvoiceActionAttachment {
993 pub file: Option<File>,
994 pub is_cover_sheet: bool,
995 pub sort_number: i32,
996}
997impl ContractInvoiceActionAttachment {
998 pub fn new(is_cover_sheet: bool, sort_number: i32) -> Self {
999 Self {
1000 is_cover_sheet,
1001 sort_number,
1002 file: None,
1003 }
1004 }
1005}
1006
1007#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1008#[serde(rename_all = "PascalCase")]
1009pub struct ContractInvoiceActionEvent {
1010 pub title: Option<String>,
1011 pub content: Option<String>,
1012 pub event_date: DateTime,
1013 pub event_by: Option<String>,
1014 pub reference: Option<String>,
1015 pub event_type: EventType,
1016 pub is_public: bool,
1017 pub has_occured: bool,
1018 pub event_public_id: Uuid,
1019}
1020impl ContractInvoiceActionEvent {
1021 pub fn new(
1022 event_date: DateTime,
1023 event_type: EventType,
1024 is_public: bool,
1025 has_occured: bool,
1026 event_public_id: Uuid,
1027 ) -> Self {
1028 Self {
1029 event_date,
1030 event_type,
1031 is_public,
1032 has_occured,
1033 event_public_id,
1034 title: None,
1035 content: None,
1036 event_by: None,
1037 reference: None,
1038 }
1039 }
1040}
1041
1042#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1043#[serde(rename_all = "PascalCase")]
1044pub struct ContractInvoiceActionRecord {
1045 pub product_public_id: Option<Uuid>,
1046 pub sequence_no: i32,
1047 pub units: Option<String>,
1048 pub article_description: Option<String>,
1049 pub article_number: Option<String>,
1050 pub quantity: Option<f64>,
1051 pub unit_price: Option<Amount>,
1052 pub discount_amount: Option<Amount>,
1053 pub discount_percentage: f64,
1054 pub discount_type: DiscountType,
1055
1056 #[serde(rename = "VAT")]
1057 pub vat: f64,
1058 pub cost_center: Option<String>,
1059 pub project: Option<String>,
1060 pub rot_rut_activated: bool,
1061 pub rot_rut_amount: Option<Amount>,
1062 pub rot_rut_material_cost_amount: Option<Amount>,
1063 pub rot_rut_hours: i32,
1064 pub rot_rut_type: RotRutType,
1065 pub record_type: RecordType,
1066 pub vat_is_included: bool,
1067 pub hidden: bool,
1068 pub external_reference: Option<String>,
1069 pub invoiced_from: Option<DateTime>,
1070 pub invoiced_to: Option<DateTime>,
1071 pub post_invoice: bool,
1072 pub advance_invoice: bool,
1073
1074 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1075 pub dimensions: Vec<DimensionCode>,
1076}
1077
1078#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1079#[serde(rename_all = "PascalCase")]
1080pub struct ContractInvoiceActionState {
1081 pub stage: ContractInvoiceActionStageType,
1082 pub last_run_date: Option<DateTime>,
1083 pub next_run_date: Option<DateTime>,
1084 pub is_paused: bool,
1085 pub use_debtor_balance: bool,
1086}
1087impl ContractInvoiceActionState {
1088 pub fn new(
1089 stage: ContractInvoiceActionStageType,
1090 is_paused: bool,
1091 use_debtor_balance: bool,
1092 ) -> Self {
1093 Self {
1094 stage,
1095 is_paused,
1096 use_debtor_balance,
1097 last_run_date: None,
1098 next_run_date: None,
1099 }
1100 }
1101}
1102
1103pub type ContractInvoiceActionSubs = Vec<ContractInvoiceActionSub>;
1104
1105#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1106#[serde(rename_all = "PascalCase")]
1107pub struct ContractInvoiceActionSub {
1108 pub action_public_id: Option<String>,
1109 pub creditor_public_id: Uuid,
1110 pub debtor_public_id: Uuid,
1111 pub cost_center: Option<String>,
1112 pub creditor_org_no: Option<String>,
1113 pub creditor_name: Option<String>,
1114 pub amount: Option<Amount>,
1115 pub created: DateTime,
1116 pub debtor_org_no: Option<String>,
1117 pub debtor_name: Option<String>,
1118 pub last_run_date: Option<DateTime>,
1119 pub next_run_date: Option<DateTime>,
1120 pub is_paused: bool,
1121 pub delivery_method: DeliveryMethodType,
1122 pub recurrence_interval: RecurrenceIntervalType,
1123 pub contract_number: Option<String>,
1124 pub start: Option<DateTime>,
1125 pub end: Option<DateTime>,
1126 pub our_reference: Option<String>,
1127 pub autogiro_withdrawal_enabled: bool,
1128 pub your_reference: Option<String>,
1129}
1130impl ContractInvoiceActionSub {
1131 pub fn new(
1132 creditor_public_id: Uuid,
1133 debtor_public_id: Uuid,
1134 created: DateTime,
1135 is_paused: bool,
1136 delivery_method: DeliveryMethodType,
1137 recurrence_interval: RecurrenceIntervalType,
1138 autogiro_withdrawal_enabled: bool,
1139 ) -> Self {
1140 Self {
1141 creditor_public_id,
1142 debtor_public_id,
1143 created,
1144 is_paused,
1145 delivery_method,
1146 recurrence_interval,
1147 autogiro_withdrawal_enabled,
1148 action_public_id: None,
1149 cost_center: None,
1150 creditor_org_no: None,
1151 creditor_name: None,
1152 amount: None,
1153 debtor_org_no: None,
1154 debtor_name: None,
1155 last_run_date: None,
1156 next_run_date: None,
1157 contract_number: None,
1158 start: None,
1159 end: None,
1160 our_reference: None,
1161 your_reference: None,
1162 }
1163 }
1164}
1165
1166#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1167#[serde(rename_all = "PascalCase")]
1168pub struct ContractInvoiceAction {
1169 pub action_public_id: Option<String>,
1170 pub creditor_public_id: Uuid,
1171 pub debtor_public_id: Uuid,
1172 pub payment_terms_in_days: i32,
1173
1174 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1175 pub records: Vec<ContractInvoiceActionRecord>,
1176 pub interest_terms_in_days: i32,
1177 pub reason_for_higher_interest: Option<String>,
1178 pub interest_percentage: f64,
1179 pub our_reference: Option<String>,
1180 pub your_reference: Option<String>,
1181 pub delivery_method: DeliveryMethodType,
1182 pub communication_language: LanguageType,
1183 pub interest_type: Option<InterestType>,
1184 pub interest_start_in_days_after_due_date: i32,
1185 pub message: Option<String>,
1186 pub external_reference: Option<String>,
1187 pub auto_attest: bool,
1188 pub auto_merge: bool,
1189 pub pay_last_day_of_month: bool,
1190 pub delivery_address_override: Option<DeliveryAddressOverride>,
1191 pub debt_collection_details: Option<DebtCollectionDetails>,
1192
1193 #[serde(rename = "ReverseVATDetails")]
1194 pub reverse_vat_details: Option<ReverseVATDetails>,
1195 pub recurrence_details: Option<RecurrenceDetails>,
1196 pub rot_rut_details: Option<RotRutDetails>,
1197 pub payment_override: Option<PaymentOverride>,
1198 pub state: Option<ContractInvoiceActionState>,
1199
1200 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1201 pub appendixes: Vec<File>,
1202
1203 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1204 pub attachments: Vec<ContractInvoiceActionAttachment>,
1205 pub contract_number: Option<String>,
1206 pub invoice_period: ContractInvoicePeriodRuleType,
1207 pub invoice_period_months_offset: i32,
1208 pub invoice_fee: Option<Amount>,
1209 pub freight_fee: Option<Amount>,
1210 pub hide_date_on_periodised_records: bool,
1211 pub autogiro_withdrawal_enabled: bool,
1212 pub credit_card_withdrawal_enabled: bool,
1213 pub send_by_mail_if_email_not_viewed_in_days: Option<i32>,
1214
1215 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1216 pub events: Vec<ContractInvoiceActionEvent>,
1217 pub reminder_invoice_details: Option<ReminderInvoiceDetails>,
1218 pub generate_invoices_of_action_type: ActionType,
1219}
1220
1221#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1222#[serde(rename_all = "PascalCase")]
1223pub struct DeliveryAddressOverride {
1224 pub name: Option<String>,
1225 pub attention: Option<String>,
1226 pub care_of: Option<String>,
1227 pub address: Option<String>,
1228 pub address2: Option<String>,
1229 pub zip_code: Option<String>,
1230 pub city: Option<String>,
1231 pub email: Option<String>,
1232 pub phone: Option<String>,
1233 pub org_no: Option<String>,
1234
1235 #[serde(rename = "GLN")]
1236 pub gln: Option<String>,
1237 pub intermediator: Option<IntermediatorType>,
1238}
1239
1240#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1241#[serde(rename_all = "PascalCase")]
1242pub struct DebtCollectionDetails {
1243 pub send_to_debt_collection: bool,
1244 pub start_debt_collection_action_level: DebtCollectionActionLevelType,
1245 pub end_debt_collection_action_level: DebtCollectionActionLevelType,
1246 pub number_of_reminders: i32,
1247 pub days_delay_after_due_date: i32,
1248 pub payment_terms_in_days: i32,
1249 pub eviction: bool,
1250 pub inform_social_welfare: bool,
1251}
1252
1253#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1254#[serde(rename_all = "PascalCase")]
1255pub struct ReverseVATDetails {
1256 #[serde(rename = "ReverseVATActivated")]
1257 pub reverse_vat_activated: bool,
1258
1259 #[serde(rename = "ReceiverVATNumber")]
1260 pub receiver_vat_number: Option<String>,
1261}
1262impl ReverseVATDetails {
1263 pub fn new(reverse_vat_activated: bool) -> Self {
1264 Self {
1265 reverse_vat_activated,
1266 receiver_vat_number: None,
1267 }
1268 }
1269}
1270
1271#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1272#[serde(rename_all = "PascalCase")]
1273pub struct RecurrenceDetails {
1274 pub recurrence_interval: RecurrenceIntervalType,
1275 pub monthly_recurrence: Option<MonthlyRecurrence>,
1276 pub yearly_recurrence: Option<YearlyRecurrence>,
1277 pub quarterly_recurrence: Option<QuarterlyRecurrence>,
1278 pub start: DateTime,
1279 pub no_end_date: bool,
1280 pub end: Option<DateTime>,
1281}
1282impl RecurrenceDetails {
1283 pub fn new(
1284 recurrence_interval: RecurrenceIntervalType,
1285 start: DateTime,
1286 no_end_date: bool,
1287 ) -> Self {
1288 Self {
1289 recurrence_interval,
1290 start,
1291 no_end_date,
1292 monthly_recurrence: None,
1293 yearly_recurrence: None,
1294 quarterly_recurrence: None,
1295 end: None,
1296 }
1297 }
1298}
1299
1300#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1301#[serde(rename_all = "PascalCase")]
1302pub struct MonthlyRecurrence {
1303 pub recur_on_day_in_month: i32,
1304 pub recur_month_interval: i32,
1305}
1306impl MonthlyRecurrence {
1307 pub fn new(recur_on_day_in_month: i32, recur_month_interval: i32) -> Self {
1308 Self {
1309 recur_on_day_in_month,
1310 recur_month_interval,
1311 }
1312 }
1313}
1314
1315#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1316#[serde(rename_all = "PascalCase")]
1317pub struct YearlyRecurrence {
1318 pub recur_on_day_in_month: i32,
1319 pub recur_on_month: i32,
1320 pub recur_year_interval: i32,
1321}
1322impl YearlyRecurrence {
1323 pub fn new(recur_on_day_in_month: i32, recur_on_month: i32, recur_year_interval: i32) -> Self {
1324 Self {
1325 recur_on_day_in_month,
1326 recur_on_month,
1327 recur_year_interval,
1328 }
1329 }
1330}
1331
1332#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1333#[serde(rename_all = "PascalCase")]
1334pub struct QuarterlyRecurrence {
1335 pub recur_on_day_in_month: i32,
1336 pub recur_on_month: i32,
1337 pub recur_quarter_interval: i32,
1338}
1339impl QuarterlyRecurrence {
1340 pub fn new(
1341 recur_on_day_in_month: i32,
1342 recur_on_month: i32,
1343 recur_quarter_interval: i32,
1344 ) -> Self {
1345 Self {
1346 recur_on_day_in_month,
1347 recur_on_month,
1348 recur_quarter_interval,
1349 }
1350 }
1351}
1352
1353#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1354#[serde(rename_all = "PascalCase")]
1355pub struct RotRutDetails {
1356 pub residence_association_org_no: Option<String>,
1357 pub property_designation: Option<String>,
1358
1359 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1360 pub persons: Vec<String>,
1361
1362 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1363 pub customers: Vec<RotRutCustomer>,
1364}
1365
1366#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1367#[serde(rename_all = "PascalCase")]
1368pub struct RotRutCustomer {
1369 pub name: Option<String>,
1370
1371 #[serde(rename = "SSN")]
1372 pub ssn: Option<String>,
1373 pub asked_amount: Option<Amount>,
1374}
1375
1376#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1377#[serde(rename_all = "PascalCase")]
1378pub struct PaymentOverride {
1379 pub bank_giro: Option<String>,
1380 pub plus_giro: Option<String>,
1381 pub clearing_no: Option<String>,
1382 pub account_no: Option<String>,
1383 pub iban: Option<String>,
1384 pub bic: Option<String>,
1385 pub bank_name: Option<String>,
1386 pub payment_receiver: Option<String>,
1387 pub reference: Option<String>,
1388 pub reference_type: ReferenceType,
1389 pub receiving_account_type: ReceivingAccountType,
1390}
1391impl PaymentOverride {
1392 pub fn new(
1393 reference_type: ReferenceType,
1394 receiving_account_type: ReceivingAccountType,
1395 ) -> Self {
1396 Self {
1397 reference_type,
1398 receiving_account_type,
1399 bank_giro: None,
1400 plus_giro: None,
1401 clearing_no: None,
1402 account_no: None,
1403 iban: None,
1404 bic: None,
1405 bank_name: None,
1406 payment_receiver: None,
1407 reference: None,
1408 }
1409 }
1410}
1411
1412#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1413#[serde(rename_all = "PascalCase")]
1414pub struct ReminderInvoiceDetails {
1415 pub send_reminder_invoice: bool,
1416 pub days_delay_after_due_date: i32,
1417}
1418impl ReminderInvoiceDetails {
1419 pub fn new(send_reminder_invoice: bool, days_delay_after_due_date: i32) -> Self {
1420 Self {
1421 send_reminder_invoice,
1422 days_delay_after_due_date,
1423 }
1424 }
1425}
1426
1427pub type CostCenters = Vec<CostCenter>;
1428
1429#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1430#[serde(rename_all = "PascalCase")]
1431pub struct CostCenter {
1432 pub creditor_public_id: Uuid,
1433 pub code: Option<String>,
1434 pub description: Option<String>,
1435 pub comments: Option<String>,
1436 pub active: bool,
1437}
1438impl CostCenter {
1439 pub fn new(creditor_public_id: Uuid, active: bool) -> Self {
1440 Self {
1441 creditor_public_id,
1442 active,
1443 code: None,
1444 description: None,
1445 comments: None,
1446 }
1447 }
1448}
1449
1450pub type Countries = Vec<Country>;
1451
1452#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1453#[serde(rename_all = "PascalCase")]
1454pub struct Country {
1455 pub country_code: Option<String>,
1456 pub swedish_country_name: Option<String>,
1457 pub english_country_name: Option<String>,
1458 pub phone_code: Option<String>,
1459}
1460
1461#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1462#[serde(rename_all = "PascalCase")]
1463pub struct CreatedMultiple {
1464 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1465 pub public_ids: Vec<String>,
1466}
1467
1468#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1469#[serde(rename_all = "PascalCase")]
1470pub struct CreatedUrl {
1471 pub url: Option<String>,
1472}
1473
1474#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1475#[serde(rename_all = "PascalCase")]
1476pub struct Created {
1477 pub public_id: Option<String>,
1478}
1479
1480#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1481#[serde(rename_all = "PascalCase")]
1482pub struct CreditAction {
1483 pub action_public_id: Option<String>,
1484 pub value: Option<Amount>,
1485 pub invoice_interest: bool,
1486 pub comment: Option<String>,
1487 pub is_payment_creditation: bool,
1488 pub payment_mean_code: Option<String>,
1489 pub payment_date: Option<DateTime>,
1490}
1491impl CreditAction {
1492 pub fn new(invoice_interest: bool, is_payment_creditation: bool) -> Self {
1493 Self {
1494 invoice_interest,
1495 is_payment_creditation,
1496 action_public_id: None,
1497 value: None,
1498 comment: None,
1499 payment_mean_code: None,
1500 payment_date: None,
1501 }
1502 }
1503}
1504
1505#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1506#[serde(rename_all = "PascalCase")]
1507pub struct CreditCardAddIntent {
1508 pub debtor_public_id: Uuid,
1509 pub success_url: Option<String>,
1510 pub failure_url: Option<String>,
1511 pub language: LanguageType,
1512}
1513impl CreditCardAddIntent {
1514 pub fn new(debtor_public_id: Uuid, language: LanguageType) -> Self {
1515 Self {
1516 debtor_public_id,
1517 language,
1518 success_url: None,
1519 failure_url: None,
1520 }
1521 }
1522}
1523
1524#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1525#[serde(rename_all = "PascalCase")]
1526pub struct CreditCardAdd {
1527 pub public_id: Uuid,
1528 pub creditor_public_id: Uuid,
1529 pub debtor_public_id: Uuid,
1530 pub status: CreditCardAddStatusType,
1531 pub add_window_url: Option<String>,
1532 pub success_url: Option<String>,
1533 pub failure_url: Option<String>,
1534 pub created: DateTime,
1535 pub language: LanguageType,
1536}
1537impl CreditCardAdd {
1538 pub fn new(
1539 public_id: Uuid,
1540 creditor_public_id: Uuid,
1541 debtor_public_id: Uuid,
1542 status: CreditCardAddStatusType,
1543 created: DateTime,
1544 language: LanguageType,
1545 ) -> Self {
1546 Self {
1547 public_id,
1548 creditor_public_id,
1549 debtor_public_id,
1550 status,
1551 created,
1552 language,
1553 add_window_url: None,
1554 success_url: None,
1555 failure_url: None,
1556 }
1557 }
1558}
1559
1560#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1561#[serde(rename_all = "PascalCase")]
1562pub struct CreditCardPaymentIntent {
1563 pub action_public_id: Option<String>,
1564 pub success_url: Option<String>,
1565 pub failure_url: Option<String>,
1566 pub language: LanguageType,
1567}
1568impl CreditCardPaymentIntent {
1569 pub fn new(language: LanguageType) -> Self {
1570 Self {
1571 language,
1572 action_public_id: None,
1573 success_url: None,
1574 failure_url: None,
1575 }
1576 }
1577}
1578
1579pub type CreditCardPayments = Vec<CreditCardPayment>;
1580
1581#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1582#[serde(rename_all = "PascalCase")]
1583pub struct CreditCardPayment {
1584 pub payment_public_id: Uuid,
1585 pub creditor_public_id: Uuid,
1586 pub status: CreditCardPaymentStatusType,
1587 pub amount: Option<Amount>,
1588 pub refunded_amount: Option<Amount>,
1589 pub payment_date: DateTime,
1590 pub action_public_id: Option<String>,
1591 pub action_type: ActionType,
1592 pub comment: Option<String>,
1593 pub payment_window_url: Option<String>,
1594 pub success_url: Option<String>,
1595 pub failure_url: Option<String>,
1596 pub created: DateTime,
1597 pub language: LanguageType,
1598 pub funding: Option<String>,
1599 pub brand: Option<String>,
1600}
1601impl CreditCardPayment {
1602 pub fn new(
1603 payment_public_id: Uuid,
1604 creditor_public_id: Uuid,
1605 status: CreditCardPaymentStatusType,
1606 payment_date: DateTime,
1607 action_type: ActionType,
1608 created: DateTime,
1609 language: LanguageType,
1610 ) -> Self {
1611 Self {
1612 payment_public_id,
1613 creditor_public_id,
1614 status,
1615 payment_date,
1616 action_type,
1617 created,
1618 language,
1619 amount: None,
1620 refunded_amount: None,
1621 action_public_id: None,
1622 comment: None,
1623 payment_window_url: None,
1624 success_url: None,
1625 failure_url: None,
1626 funding: None,
1627 brand: None,
1628 }
1629 }
1630}
1631
1632#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1633#[serde(rename_all = "PascalCase")]
1634pub struct CreditCardWithdrawal {
1635 pub credit_card_withdrawal_enabled: bool,
1636}
1637impl CreditCardWithdrawal {
1638 pub fn new(credit_card_withdrawal_enabled: bool) -> Self {
1639 Self {
1640 credit_card_withdrawal_enabled,
1641 }
1642 }
1643}
1644
1645#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1646#[serde(rename_all = "PascalCase")]
1647pub struct CreditingInvoice {
1648 pub source_public_id: Option<String>,
1649 pub source_invoice_id: Option<String>,
1650}
1651
1652#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1653#[serde(rename_all = "PascalCase")]
1654pub struct CreditorAccessRight {
1655 pub module: CreditorModuleAccessType,
1656 pub has_access: bool,
1657}
1658impl CreditorAccessRight {
1659 pub fn new(module: CreditorModuleAccessType, has_access: bool) -> Self {
1660 Self { module, has_access }
1661 }
1662}
1663
1664#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1665#[serde(rename_all = "PascalCase")]
1666pub struct CreditorAddonCategory {
1667 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1668 pub addon_categories: Vec<CreditorAddonCategoryType>,
1669}
1670
1671pub type CreditorAddons = Vec<CreditorAddon>;
1672
1673#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1674#[serde(rename_all = "PascalCase")]
1675pub struct CreditorAddon {
1676 pub creditor_addon_name: CreditorAddonType,
1677 pub exists: bool,
1678 pub description: CreditorAddonDescriptionType,
1679}
1680impl CreditorAddon {
1681 pub fn new(
1682 creditor_addon_name: CreditorAddonType,
1683 exists: bool,
1684 description: CreditorAddonDescriptionType,
1685 ) -> Self {
1686 Self {
1687 creditor_addon_name,
1688 exists,
1689 description,
1690 }
1691 }
1692}
1693
1694#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1695#[serde(rename_all = "PascalCase")]
1696pub struct CreditorBankInfo {
1697 pub uses_client_fund: bool,
1698 pub payment_method: CreditorPaymentMethodType,
1699 pub bankgiro_no: Option<String>,
1700 pub plusgiro_no: Option<String>,
1701 pub account_no: Option<String>,
1702 pub clearing_no: Option<String>,
1703
1704 #[serde(rename = "EInvoiceFUI")]
1705 pub e_invoice_fui: Option<String>,
1706
1707 #[serde(rename = "EInvoiceCUI")]
1708 pub e_invoice_cui: Option<String>,
1709
1710 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1711 pub foreign_accounts: Vec<CreditorForeignAccount>,
1712
1713 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1714 pub creditor_outgoing_bankgiroes: Vec<CreditorOutgoingBankgiro>,
1715
1716 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1717 pub payment_methods: Vec<CreditorPaymentMethod>,
1718}
1719impl CreditorBankInfo {
1720 pub fn new(uses_client_fund: bool, payment_method: CreditorPaymentMethodType) -> Self {
1721 Self {
1722 uses_client_fund,
1723 payment_method,
1724 bankgiro_no: None,
1725 plusgiro_no: None,
1726 account_no: None,
1727 clearing_no: None,
1728 e_invoice_fui: None,
1729 e_invoice_cui: None,
1730 foreign_accounts: Vec::new(),
1731 creditor_outgoing_bankgiroes: Vec::new(),
1732 payment_methods: Vec::new(),
1733 }
1734 }
1735}
1736
1737#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1738#[serde(rename_all = "PascalCase")]
1739pub struct CreditorForeignAccount {
1740 pub currency_code: Option<String>,
1741 pub bank_name: Option<String>,
1742 pub iban: Option<String>,
1743 pub bic: Option<String>,
1744}
1745
1746#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1747#[serde(rename_all = "PascalCase")]
1748pub struct CreditorOutgoingBankgiro {
1749 pub bankgiro_no: Option<String>,
1750 pub is_active: bool,
1751 pub bankgiro_approved: bool,
1752 pub description: Option<String>,
1753 pub bookkeeping_payment_mean_code: Option<String>,
1754}
1755impl CreditorOutgoingBankgiro {
1756 pub fn new(is_active: bool, bankgiro_approved: bool) -> Self {
1757 Self {
1758 is_active,
1759 bankgiro_approved,
1760 bankgiro_no: None,
1761 description: None,
1762 bookkeeping_payment_mean_code: None,
1763 }
1764 }
1765}
1766
1767#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1768#[serde(rename_all = "PascalCase")]
1769pub struct CreditorPaymentMethod {
1770 pub priority: CreditorPaymentMethodPriorityType,
1771 pub payment_method: CreditorPaymentMethodType,
1772 pub bankgiro_no: Option<String>,
1773 pub plusgiro_no: Option<String>,
1774 pub clearing_no: Option<String>,
1775 pub account_no: Option<String>,
1776
1777 #[serde(rename = "IBAN")]
1778 pub iban: Option<String>,
1779
1780 #[serde(rename = "BIC")]
1781 pub bic: Option<String>,
1782 pub verified: bool,
1783}
1784impl CreditorPaymentMethod {
1785 pub fn new(
1786 priority: CreditorPaymentMethodPriorityType,
1787 payment_method: CreditorPaymentMethodType,
1788 verified: bool,
1789 ) -> Self {
1790 Self {
1791 priority,
1792 payment_method,
1793 verified,
1794 bankgiro_no: None,
1795 plusgiro_no: None,
1796 clearing_no: None,
1797 account_no: None,
1798 iban: None,
1799 bic: None,
1800 }
1801 }
1802}
1803
1804#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1805#[serde(rename_all = "PascalCase")]
1806pub struct CreditorClaimsContact {
1807 pub first_name: Option<String>,
1808 pub last_name: Option<String>,
1809 pub email: Option<String>,
1810 pub phone: Option<String>,
1811}
1812
1813#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1814#[serde(rename_all = "PascalCase")]
1815pub struct CreditorClaims {
1816 pub creditor_public_id: Uuid,
1817
1818 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1819 pub access_rights: Vec<CreditorAccessRight>,
1820
1821 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1822 pub settings: Vec<CreditorSetting>,
1823 pub account_verified: bool,
1824 pub show_get_started_message: bool,
1825 pub is_enabled: bool,
1826}
1827impl CreditorClaims {
1828 pub fn new(
1829 creditor_public_id: Uuid,
1830 account_verified: bool,
1831 show_get_started_message: bool,
1832 is_enabled: bool,
1833 ) -> Self {
1834 Self {
1835 creditor_public_id,
1836 account_verified,
1837 show_get_started_message,
1838 is_enabled,
1839 access_rights: Vec::new(),
1840 settings: Vec::new(),
1841 }
1842 }
1843}
1844
1845#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1846#[serde(rename_all = "PascalCase")]
1847pub struct CreditorSetting {
1848 pub key: Option<String>,
1849 pub value: Option<String>,
1850}
1851
1852#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1853#[serde(rename_all = "PascalCase")]
1854pub struct CreditorContact {
1855 pub first_name: Option<String>,
1856 pub last_name: Option<String>,
1857 pub email: Option<String>,
1858 pub phone: Option<String>,
1859}
1860
1861#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1862#[serde(rename_all = "PascalCase")]
1863pub struct CreditorInvoiceAddress {
1864 pub address: Option<String>,
1865 pub address2: Option<String>,
1866 pub zip_code: Option<String>,
1867 pub city: Option<String>,
1868 pub country_code: Option<String>,
1869 pub email: Option<String>,
1870 pub delivery_method: DeliveryMethodType,
1871}
1872impl CreditorInvoiceAddress {
1873 pub fn new(delivery_method: DeliveryMethodType) -> Self {
1874 Self {
1875 delivery_method,
1876 address: None,
1877 address2: None,
1878 zip_code: None,
1879 city: None,
1880 country_code: None,
1881 email: None,
1882 }
1883 }
1884}
1885
1886#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1887#[serde(rename_all = "PascalCase")]
1888pub struct CreditorKycFormBeneficialOwner {
1889 pub name: Option<String>,
1890
1891 #[serde(rename = "SSN")]
1892 pub ssn: Option<String>,
1893 pub address: Option<String>,
1894 pub country_name: Option<String>,
1895}
1896
1897#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1898#[serde(rename_all = "PascalCase")]
1899pub struct CreditorKycFormBusinessCategory {
1900 pub is_real_estate_sales_category: bool,
1901 pub is_real_estate_construction_category: bool,
1902 pub is_restaurant_category: bool,
1903 pub is_cafe_category: bool,
1904 pub is_broker_category: bool,
1905 pub is_night_club_category: bool,
1906 pub is_kiosk_category: bool,
1907 pub is_online_gambiling_category: bool,
1908 pub is_cleaning_category: bool,
1909 pub is_taxi_category: bool,
1910 pub is_barber_category: bool,
1911 pub is_betting_shop_category: bool,
1912 pub other_category: Option<String>,
1913}
1914
1915#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1916#[serde(rename_all = "PascalCase")]
1917pub struct CreditorKycFormCompany {
1918 pub name: Option<String>,
1919 pub org_no: Option<String>,
1920 pub address: Option<String>,
1921 pub zip_code: Option<String>,
1922 pub city: Option<String>,
1923 pub country_name: Option<String>,
1924}
1925
1926#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1927#[serde(rename_all = "PascalCase")]
1928pub struct CreditorKycFormContact {
1929 pub name: Option<String>,
1930 pub citizenship_country_name: Option<String>,
1931 pub tax_country_name: Option<String>,
1932 pub email: Option<String>,
1933 pub phone: Option<String>,
1934}
1935
1936#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1937#[serde(rename_all = "PascalCase")]
1938pub struct CreditorKycFormOwner {
1939 pub name: Option<String>,
1940
1941 #[serde(rename = "SSN")]
1942 pub ssn: Option<String>,
1943 pub holding_shares_in_percent: f64,
1944 pub holding_votes_in_percent: f64,
1945 pub address: Option<String>,
1946 pub country_name: Option<String>,
1947 pub is_non_legal_entity: bool,
1948 pub has_us_citizenship: bool,
1949 pub non_legal_entity_is_direct_o_wner: bool,
1950}
1951impl CreditorKycFormOwner {
1952 pub fn new(
1953 holding_shares_in_percent: f64,
1954 holding_votes_in_percent: f64,
1955 is_non_legal_entity: bool,
1956 has_us_citizenship: bool,
1957 non_legal_entity_is_direct_o_wner: bool,
1958 ) -> Self {
1959 Self {
1960 holding_shares_in_percent,
1961 holding_votes_in_percent,
1962 is_non_legal_entity,
1963 has_us_citizenship,
1964 non_legal_entity_is_direct_o_wner,
1965 name: None,
1966 ssn: None,
1967 address: None,
1968 country_name: None,
1969 }
1970 }
1971}
1972
1973#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
1974#[serde(rename_all = "PascalCase")]
1975pub struct CreditorKycFormUsPerson {
1976 pub name: Option<String>,
1977 pub address: Option<String>,
1978
1979 #[serde(rename = "TIN")]
1980 pub tin: Option<String>,
1981}
1982
1983#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1984#[serde(rename_all = "PascalCase")]
1985pub struct CreditorKycForm {
1986 pub company: Option<CreditorKycFormCompany>,
1987 pub contact: Option<CreditorKycFormContact>,
1988
1989 #[serde(rename = "IsTaxableInUS")]
1990 pub is_taxable_in_us: bool,
1991 pub is_financial_institute: bool,
1992 pub is_active_non_financial_institute: bool,
1993 pub is_any_owner_us_persons: bool,
1994
1995 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1996 pub us_persons: Vec<CreditorKycFormUsPerson>,
1997 pub is_managing_cash: bool,
1998 pub managing_cash_purpose: Option<String>,
1999 pub managing_cash_yearly_revenue: Option<String>,
2000 pub is_managing_curreny_exchanges: bool,
2001 pub managing_curreny_exchanges_purpose: Option<String>,
2002 pub business_category: Option<CreditorKycFormBusinessCategory>,
2003 pub has_no_owners_with_more_than25_percent: bool,
2004
2005 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2006 pub owners_with_more_than25_percent: Vec<CreditorKycFormOwner>,
2007 pub has_no_beneficial_owners: bool,
2008
2009 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2010 pub beneficial_owners: Vec<CreditorKycFormBeneficialOwner>,
2011
2012 #[serde(rename = "IsAnyonePEP")]
2013 pub is_anyone_pep: bool,
2014
2015 #[serde(rename = "HasAnyoneBusinessRelationWithOtherPEP")]
2016 pub has_anyone_business_relation_with_other_pep: bool,
2017}
2018
2019#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2020#[serde(rename_all = "PascalCase")]
2021pub struct CreditorKyc {
2022 pub creditor_public_id: Uuid,
2023 pub creditor_kyc_form: Option<CreditorKycForm>,
2024 pub state: CreditorKycStateType,
2025 pub signed_by_name: Option<String>,
2026
2027 #[serde(rename = "SignedBySSN")]
2028 pub signed_by_ssn: Option<String>,
2029 pub signed_date: Option<DateTime>,
2030 pub mobile_bank_id_token_used_for_sign: Option<Uuid>,
2031}
2032impl CreditorKyc {
2033 pub fn new(creditor_public_id: Uuid, state: CreditorKycStateType) -> Self {
2034 Self {
2035 creditor_public_id,
2036 state,
2037 creditor_kyc_form: None,
2038 signed_by_name: None,
2039 signed_by_ssn: None,
2040 signed_date: None,
2041 mobile_bank_id_token_used_for_sign: None,
2042 }
2043 }
2044}
2045
2046pub type CreditorSettings = Vec<CreditorSetting>;
2047pub type CreditorShares = Vec<CreditorShare>;
2048
2049#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2050#[serde(rename_all = "PascalCase")]
2051pub struct CreditorShare {
2052 pub shared_with_user_name: Option<String>,
2053 pub share_public_id: Uuid,
2054 pub creditor_public_id: Uuid,
2055 pub can_attest_invoice: bool,
2056 pub can_manage_invoice_payments: bool,
2057 pub can_write_creditor: bool,
2058 pub can_attest_supplier_invoice: bool,
2059 pub can_manage_self_invoice_debtor_infoes: bool,
2060 pub can_pay_supplier_invoice: bool,
2061 pub can_read_settings: bool,
2062 pub can_read_bookkeeping: bool,
2063}
2064
2065#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
2066#[serde(rename_all = "PascalCase")]
2067pub struct CreditorSignatoryContact {
2068 pub first_name: Option<String>,
2069 pub last_name: Option<String>,
2070 pub email: Option<String>,
2071 pub phone: Option<String>,
2072}
2073
2074pub type CreditorSubs = Vec<CreditorSub>;
2075
2076#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2077#[serde(rename_all = "PascalCase")]
2078pub struct CreditorSub {
2079 pub creditor_public_id: Uuid,
2080 pub name: Option<String>,
2081 pub is_enabled: bool,
2082 pub org_no: Option<String>,
2083
2084 #[serde(rename = "LogoURL")]
2085 pub logo_url: Option<String>,
2086}
2087impl CreditorSub {
2088 pub fn new(creditor_public_id: Uuid, is_enabled: bool) -> Self {
2089 Self {
2090 creditor_public_id,
2091 is_enabled,
2092 name: None,
2093 org_no: None,
2094 logo_url: None,
2095 }
2096 }
2097}
2098
2099pub type Creditors = Vec<Creditor>;
2100
2101#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2102#[serde(rename_all = "PascalCase")]
2103pub struct Creditor {
2104 pub creditor_public_id: Uuid,
2105 pub org_no: Option<String>,
2106 pub name: Option<String>,
2107 pub creditor_bank_info: Option<CreditorBankInfo>,
2108 pub attention: Option<String>,
2109 pub care_of: Option<String>,
2110 pub address: Option<String>,
2111 pub address2: Option<String>,
2112 pub zip_code: Option<String>,
2113 pub city: Option<String>,
2114 pub country_code: Option<String>,
2115 pub phone: Option<String>,
2116 pub vat_number: Option<String>,
2117 pub residence: Option<String>,
2118 pub approved_company_tax: Option<bool>,
2119 pub give_all_users_full_rights_on_creditor: Option<bool>,
2120
2121 #[serde(rename = "GLN")]
2122 pub gln: Option<String>,
2123 pub creditor_contact: Option<CreditorContact>,
2124 pub creditor_claims_contact: Option<CreditorClaimsContact>,
2125 pub creditor_signatory_contact: Option<CreditorSignatoryContact>,
2126 pub creditor_invoice_address: Option<CreditorInvoiceAddress>,
2127 pub is_enabled: bool,
2128 pub next_invoice_number: Option<String>,
2129
2130 #[serde(rename = "LogoURL")]
2131 pub logo_url: Option<String>,
2132 pub use_cent_rounding: bool,
2133 pub uses_client_fund_for_invoicing: bool,
2134}
2135impl Creditor {
2136 pub fn new(
2137 creditor_public_id: Uuid,
2138 is_enabled: bool,
2139 use_cent_rounding: bool,
2140 uses_client_fund_for_invoicing: bool,
2141 ) -> Self {
2142 Self {
2143 creditor_public_id,
2144 is_enabled,
2145 use_cent_rounding,
2146 uses_client_fund_for_invoicing,
2147 org_no: None,
2148 name: None,
2149 creditor_bank_info: None,
2150 attention: None,
2151 care_of: None,
2152 address: None,
2153 address2: None,
2154 zip_code: None,
2155 city: None,
2156 country_code: None,
2157 phone: None,
2158 vat_number: None,
2159 residence: None,
2160 approved_company_tax: None,
2161 give_all_users_full_rights_on_creditor: None,
2162 gln: None,
2163 creditor_contact: None,
2164 creditor_claims_contact: None,
2165 creditor_signatory_contact: None,
2166 creditor_invoice_address: None,
2167 next_invoice_number: None,
2168 logo_url: None,
2169 }
2170 }
2171}
2172
2173#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2174#[serde(rename_all = "PascalCase")]
2175pub struct CreditorToken {
2176 pub token: Uuid,
2177
2178 #[serde(rename = "PortalURL")]
2179 pub portal_url: Option<String>,
2180}
2181impl CreditorToken {
2182 pub fn new(token: Uuid) -> Self {
2183 Self {
2184 token,
2185 portal_url: None,
2186 }
2187 }
2188}
2189
2190pub type Currencies = Vec<Currency>;
2191
2192#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2193#[serde(rename_all = "PascalCase")]
2194pub struct Currency {
2195 pub decimals: i32,
2196 pub currency_code: Option<String>,
2197 pub iso4217: Option<String>,
2198 pub description: Option<String>,
2199}
2200impl Currency {
2201 pub fn new(decimals: i32) -> Self {
2202 Self {
2203 decimals,
2204 currency_code: None,
2205 iso4217: None,
2206 description: None,
2207 }
2208 }
2209}
2210
2211#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2212#[serde(rename_all = "PascalCase")]
2213pub struct DebentureActionEntry {
2214 pub creditor_public_id: Uuid,
2215 pub debtor_public_id: Uuid,
2216 pub invoice_date: DateTime,
2217 pub due_date: DateTime,
2218 pub delivery_date: Option<DateTime>,
2219
2220 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2221 pub records: Vec<InvoiceActionRecord>,
2222 pub interest_percentage: f64,
2223 pub reason_for_higher_interest: Option<String>,
2224 pub interest_start_in_days_after_due_date: i32,
2225 pub interest_type: Option<InterestType>,
2226 pub our_reference: Option<String>,
2227 pub your_reference: Option<String>,
2228 pub delivery_method: DeliveryMethodType,
2229 pub communication_language: LanguageType,
2230 pub message: Option<String>,
2231 pub invoice_number: Option<String>,
2232 pub invoice_fee: Option<Amount>,
2233 pub freight_fee: Option<Amount>,
2234 pub send_by_mail_if_email_not_viewed_in_days: Option<i32>,
2235 pub delivery_address_override: Option<DeliveryAddressOverride>,
2236 pub debt_collection_details: Option<DebtCollectionDetails>,
2237 pub reminder_invoice_details: Option<ReminderInvoiceDetails>,
2238
2239 #[serde(rename = "ReverseVATDetails")]
2240 pub reverse_vat_details: Option<ReverseVATDetails>,
2241 pub rot_rut_details: Option<RotRutDetails>,
2242 pub payment_override: Option<PaymentOverride>,
2243
2244 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2245 pub appendixes: Vec<File>,
2246
2247 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2248 pub attachments: Vec<InvoiceActionAttachment>,
2249 pub autogiro: Option<AutogiroWithdrawal>,
2250 pub credit_card: Option<CreditCardWithdrawal>,
2251
2252 #[serde(rename = "InvoicePDF")]
2253 pub invoice_pdf: Option<InvoiceFile>,
2254 pub crediting_invoice_public_id: Option<String>,
2255 pub external_reference: Option<String>,
2256 pub is_locked: bool,
2257 pub use_debtor_balance: bool,
2258}
2259
2260#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2261#[serde(rename_all = "PascalCase")]
2262pub struct InvoiceActionRecord {
2263 pub product_public_id: Option<Uuid>,
2264 pub sequence_no: i32,
2265 pub units: Option<String>,
2266 pub article_description: Option<String>,
2267 pub article_number: Option<String>,
2268 pub quantity: Option<f64>,
2269 pub unit_price: Option<Amount>,
2270 pub discount_amount: Option<Amount>,
2271 pub discount_percentage: f64,
2272 pub discount_type: DiscountType,
2273
2274 #[serde(rename = "VAT")]
2275 pub vat: f64,
2276 pub cost_center: Option<String>,
2277 pub period_start: Option<DateTime>,
2278 pub period_end: Option<DateTime>,
2279 pub project: Option<String>,
2280 pub rot_rut_activated: bool,
2281 pub rot_rut_amount: Option<Amount>,
2282 pub rot_rut_material_cost_amount: Option<Amount>,
2283 pub rot_rut_hours: i32,
2284 pub rot_rut_type: RotRutType,
2285 pub record_type: RecordType,
2286 pub vat_is_included: bool,
2287 pub hidden: bool,
2288 pub external_reference: Option<String>,
2289
2290 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2291 pub dimensions: Vec<DimensionCode>,
2292}
2293
2294#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2295#[serde(rename_all = "PascalCase")]
2296pub struct InvoiceActionAttachment {
2297 pub file: Option<File>,
2298 pub is_cover_sheet: bool,
2299 pub sort_number: i32,
2300}
2301impl InvoiceActionAttachment {
2302 pub fn new(is_cover_sheet: bool, sort_number: i32) -> Self {
2303 Self {
2304 is_cover_sheet,
2305 sort_number,
2306 file: None,
2307 }
2308 }
2309}
2310
2311#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
2312#[serde(rename_all = "PascalCase")]
2313pub struct InvoiceFile {
2314 #[serde(rename = "OCR")]
2315 pub ocr: Option<String>,
2316 pub stream: Option<Vec<u8>>,
2317 pub url: Option<String>,
2318}
2319
2320#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2321#[serde(rename_all = "PascalCase")]
2322pub struct DebtCollectionActionEvent {
2323 pub title: Option<String>,
2324 pub content: Option<String>,
2325 pub event_date: DateTime,
2326 pub event_by: Option<String>,
2327 pub reference: Option<String>,
2328 pub event_type: EventType,
2329 pub is_public: bool,
2330 pub has_occured: bool,
2331 pub event_public_id: Uuid,
2332}
2333impl DebtCollectionActionEvent {
2334 pub fn new(
2335 event_date: DateTime,
2336 event_type: EventType,
2337 is_public: bool,
2338 has_occured: bool,
2339 event_public_id: Uuid,
2340 ) -> Self {
2341 Self {
2342 event_date,
2343 event_type,
2344 is_public,
2345 has_occured,
2346 event_public_id,
2347 title: None,
2348 content: None,
2349 event_by: None,
2350 reference: None,
2351 }
2352 }
2353}
2354
2355#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2356#[serde(rename_all = "PascalCase")]
2357pub struct DebtCollectionInvoice {
2358 pub invoice_date: DateTime,
2359 pub due_date: DateTime,
2360 pub invoice_number: Option<String>,
2361 pub invoice_decription: Option<String>,
2362 pub payment_terms_in_days: i32,
2363 pub interest_terms_in_days: i32,
2364 pub interest_percentage: f64,
2365 pub interest_type: InterestType,
2366 pub our_reference: Option<String>,
2367 pub your_reference: Option<String>,
2368 pub name: Option<String>,
2369 pub address: Option<String>,
2370 pub address2: Option<String>,
2371 pub zip_code: Option<String>,
2372 pub city: Option<String>,
2373 pub country_code: Option<String>,
2374 pub invoiced_amount: Option<Amount>,
2375 pub invoice_file: Option<File>,
2376
2377 #[serde(rename = "OCR")]
2378 pub ocr: Option<String>,
2379}
2380impl DebtCollectionInvoice {
2381 pub fn new(
2382 invoice_date: DateTime,
2383 due_date: DateTime,
2384 payment_terms_in_days: i32,
2385 interest_terms_in_days: i32,
2386 interest_percentage: f64,
2387 interest_type: InterestType,
2388 ) -> Self {
2389 Self {
2390 invoice_date,
2391 due_date,
2392 payment_terms_in_days,
2393 interest_terms_in_days,
2394 interest_percentage,
2395 interest_type,
2396 invoice_number: None,
2397 invoice_decription: None,
2398 our_reference: None,
2399 your_reference: None,
2400 name: None,
2401 address: None,
2402 address2: None,
2403 zip_code: None,
2404 city: None,
2405 country_code: None,
2406 invoiced_amount: None,
2407 invoice_file: None,
2408 ocr: None,
2409 }
2410 }
2411}
2412
2413pub type DebtCollectionActionLogs = Vec<DebtCollectionActionLog>;
2414
2415#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2416#[serde(rename_all = "PascalCase")]
2417pub struct DebtCollectionActionLog {
2418 pub event: Option<String>,
2419 pub created: DateTime,
2420 pub created_by: Option<String>,
2421 pub file: Option<File>,
2422}
2423impl DebtCollectionActionLog {
2424 pub fn new(created: DateTime) -> Self {
2425 Self {
2426 created,
2427 event: None,
2428 created_by: None,
2429 file: None,
2430 }
2431 }
2432}
2433
2434#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2435#[serde(rename_all = "PascalCase")]
2436pub struct DebtCollectionActionState {
2437 pub stage: DebtCollectionActionStageType,
2438 pub number_of_sent_invoice_reminders: i32,
2439 pub debt_collection_invoice_sent_date: Option<DateTime>,
2440 pub late_payment_invoice_sent_date: Option<DateTime>,
2441 pub sent_to_bailiff_date: Option<DateTime>,
2442 pub sent_to_bailiff_enforcement_date: Option<DateTime>,
2443 pub next_event_date: Option<DateTime>,
2444 pub closed_date: Option<DateTime>,
2445 pub next_event: Option<String>,
2446 pub is_paused: bool,
2447 pub disputed_date: Option<DateTime>,
2448 pub attested_date: Option<DateTime>,
2449 pub has_previously_been_sent_to_installment_plan: bool,
2450}
2451impl DebtCollectionActionState {
2452 pub fn new(
2453 stage: DebtCollectionActionStageType,
2454 number_of_sent_invoice_reminders: i32,
2455 is_paused: bool,
2456 has_previously_been_sent_to_installment_plan: bool,
2457 ) -> Self {
2458 Self {
2459 stage,
2460 number_of_sent_invoice_reminders,
2461 is_paused,
2462 has_previously_been_sent_to_installment_plan,
2463 debt_collection_invoice_sent_date: None,
2464 late_payment_invoice_sent_date: None,
2465 sent_to_bailiff_date: None,
2466 sent_to_bailiff_enforcement_date: None,
2467 next_event_date: None,
2468 closed_date: None,
2469 next_event: None,
2470 disputed_date: None,
2471 attested_date: None,
2472 }
2473 }
2474}
2475
2476pub type DebtCollectionActionSubs = Vec<DebtCollectionActionSub>;
2477
2478#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2479#[serde(rename_all = "PascalCase")]
2480pub struct DebtCollectionActionSub {
2481 pub action_public_id: Option<String>,
2482 pub creditor_public_id: Uuid,
2483 pub debtor_public_id: Uuid,
2484 pub creditor_org_no: Option<String>,
2485 pub creditor_name: Option<String>,
2486 pub debtor_org_no: Option<String>,
2487 pub debtor_name: Option<String>,
2488 pub current_amount: Option<Amount>,
2489 pub invoiced_amount: Option<Amount>,
2490 pub stage: DebtCollectionActionStageType,
2491 pub action_type: ActionType,
2492 pub delivery_method: DeliveryMethodType,
2493 pub created: DateTime,
2494 pub closed_date: Option<DateTime>,
2495 pub attested_date: Option<DateTime>,
2496 pub next_event_date: Option<DateTime>,
2497 pub next_event: Option<String>,
2498 pub original_due_date: DateTime,
2499 pub original_invoice_date: DateTime,
2500 pub original_invoice_number: Option<String>,
2501 pub is_paused: bool,
2502 pub is_commented: bool,
2503 pub is_disputed: bool,
2504 pub delivery_status: DeliveryStatusType,
2505
2506 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2507 pub files: Vec<File>,
2508
2509 #[serde(rename = "OCRs", default, skip_serializing_if = "Vec::is_empty")]
2510 pub oc_rs: Vec<String>,
2511
2512 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2513 pub invoice_numbers: Vec<String>,
2514 pub invoice_source_public_id: Option<String>,
2515 pub debt_collection_action_source: ActionSourceType,
2516 pub installment_plan_public_id: Option<String>,
2517 pub communication_language: LanguageType,
2518 pub payment_terms_in_days: i32,
2519 pub interest_percentage: f64,
2520 pub your_reference: Option<String>,
2521}
2522
2523pub type DebtCollectionActions = Vec<DebtCollectionAction>;
2524
2525#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2526#[serde(rename_all = "PascalCase")]
2527pub struct DebtCollectionAction {
2528 pub action_public_id: Option<String>,
2529 pub created: DateTime,
2530 pub creditor_public_id: Uuid,
2531 pub debtor: Option<Debtor>,
2532 pub delivery_method: DeliveryMethodType,
2533 pub communication_language: LanguageType,
2534 pub reason_description: Option<String>,
2535 pub number_of_reminders: i32,
2536 pub start_debt_collection_action_level: DebtCollectionActionLevelType,
2537 pub end_debt_collection_action_level: DebtCollectionActionLevelType,
2538 pub original_invoice_date: DateTime,
2539 pub original_due_date: DateTime,
2540 pub original_invoice_number: Option<String>,
2541 pub original_amount: Option<Amount>,
2542 pub original_invoice_file: Option<File>,
2543 pub payment_terms_in_days: i32,
2544 pub interest_terms_in_days: i32,
2545 pub interest_percentage: f64,
2546 pub interest_type: InterestType,
2547 pub our_reference: Option<String>,
2548 pub your_reference: Option<String>,
2549 pub interest_start_in_days_after_due_date: i32,
2550 pub reason_for_higher_interest: Option<String>,
2551 pub fee_amount: Option<Amount>,
2552 pub interest_amount: Option<Amount>,
2553 pub current_amount: Option<Amount>,
2554 pub state: Option<DebtCollectionActionState>,
2555
2556 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2557 pub invoices: Vec<DebtCollectionInvoice>,
2558 pub installment_plan_public_id: Option<String>,
2559 pub invoice_source_public_id: Option<String>,
2560 pub debt_collection_action_source: ActionSourceType,
2561 pub delivery_address_override: Option<DeliveryAddressOverride>,
2562
2563 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2564 pub events: Vec<DebtCollectionActionEvent>,
2565}
2566
2567#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2568#[serde(rename_all = "PascalCase")]
2569pub struct Debtor {
2570 pub debtor_public_id: Uuid,
2571 pub creditor_public_id: Uuid,
2572 pub debtor_external_id: Option<String>,
2573 pub org_no: Option<String>,
2574 pub name: Option<String>,
2575 pub attention: Option<String>,
2576 pub care_of: Option<String>,
2577 pub address: Option<String>,
2578 pub address2: Option<String>,
2579 pub zip_code: Option<String>,
2580 pub city: Option<String>,
2581 pub country_code: Option<String>,
2582 pub citizenship_country_code: Option<String>,
2583 pub phone: Option<String>,
2584 pub email: Option<String>,
2585 pub contact_name: Option<String>,
2586 pub contact_email: Option<String>,
2587 pub vat_number: Option<String>,
2588 pub debtor_no: Option<String>,
2589
2590 #[serde(rename = "GLN")]
2591 pub gln: Option<String>,
2592 pub is_active: Option<bool>,
2593 pub protected_identity: bool,
2594 pub use_protected_mail_delivery: bool,
2595 pub debtor_type: Option<DebtorType>,
2596 pub intermediator: Option<IntermediatorType>,
2597 pub e_invoice_bank: Option<EInvoiceBankType>,
2598 pub notes: Option<String>,
2599 pub debtor_self_invoice_info: Option<DebtorSelfInvoiceInfo>,
2600 pub default_action_config: Option<DebtorDefaultActionConfig>,
2601 pub autogiro: Option<DebtorAutogiro>,
2602
2603 #[serde(default, skip_serializing_if = "Vec::is_empty")]
2604 pub credit_cards: Vec<DebtorCreditCard>,
2605 pub created: DateTime,
2606}
2607impl Debtor {
2608 pub fn new(
2609 debtor_public_id: Uuid,
2610 creditor_public_id: Uuid,
2611 protected_identity: bool,
2612 use_protected_mail_delivery: bool,
2613 created: DateTime,
2614 ) -> Self {
2615 Self {
2616 debtor_public_id,
2617 creditor_public_id,
2618 protected_identity,
2619 use_protected_mail_delivery,
2620 created,
2621 debtor_external_id: None,
2622 org_no: None,
2623 name: None,
2624 attention: None,
2625 care_of: None,
2626 address: None,
2627 address2: None,
2628 zip_code: None,
2629 city: None,
2630 country_code: None,
2631 citizenship_country_code: None,
2632 phone: None,
2633 email: None,
2634 contact_name: None,
2635 contact_email: None,
2636 vat_number: None,
2637 debtor_no: None,
2638 gln: None,
2639 is_active: None,
2640 debtor_type: None,
2641 intermediator: None,
2642 e_invoice_bank: None,
2643 notes: None,
2644 debtor_self_invoice_info: None,
2645 default_action_config: None,
2646 autogiro: None,
2647 credit_cards: Vec::new(),
2648 }
2649 }
2650}
2651
2652#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2653#[serde(rename_all = "PascalCase")]
2654pub struct DebtorSelfInvoiceInfo {
2655 pub next_self_invoice_number: Option<String>,
2656 pub payment_method: DebtorPaymentMethod,
2657 pub bankgiro_no: Option<String>,
2658 pub plusgiro_no: Option<String>,
2659 pub account_no: Option<String>,
2660 pub clearing_no: Option<String>,
2661
2662 #[serde(rename = "IBAN")]
2663 pub iban: Option<String>,
2664
2665 #[serde(rename = "BIC")]
2666 pub bic: Option<String>,
2667 pub fedwire_account_number: Option<String>,
2668 pub routing_number: Option<String>,
2669 pub approved_company_tax: bool,
2670}
2671impl DebtorSelfInvoiceInfo {
2672 pub fn new(payment_method: DebtorPaymentMethod, approved_company_tax: bool) -> Self {
2673 Self {
2674 payment_method,
2675 approved_company_tax,
2676 next_self_invoice_number: None,
2677 bankgiro_no: None,
2678 plusgiro_no: None,
2679 account_no: None,
2680 clearing_no: None,
2681 iban: None,
2682 bic: None,
2683 fedwire_account_number: None,
2684 routing_number: None,
2685 }
2686 }
2687}
2688
2689#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2690#[serde(rename_all = "PascalCase")]
2691pub struct DebtorDefaultActionConfig {
2692 pub activate_default_action_config_override: bool,
2693 pub start_debt_collection_action_level: DebtCollectionActionLevelType,
2694 pub end_debt_collection_action_level: DebtCollectionActionLevelType,
2695 pub delivery_method: DeliveryMethodType,
2696 pub communication_language: LanguageType,
2697 pub payment_terms_in_days: i32,
2698 pub debt_collection_payment_terms_in_days: i32,
2699 pub interest_terms_in_days: i32,
2700 pub interest_percentage: f64,
2701 pub invoice_payment_terms_in_days: i32,
2702 pub interest_type: InterestType,
2703 pub interest_start_in_days_after_due_date: i32,
2704 pub reason_for_higher_interest: Option<String>,
2705 pub our_reference: Option<String>,
2706 pub number_of_reminders: i32,
2707 pub currency_code: Option<String>,
2708 pub send_invoice_to_debt_collection_after_days: i32,
2709 pub send_invoice_to_debt_collection: bool,
2710 pub include_pdf_in_email: Option<bool>,
2711 pub send_reminder_invoice: bool,
2712 pub send_reminder_invoice_days_after_due_date: i32,
2713 pub invoice_fee: f64,
2714 pub reminder_invoice_fee: f64,
2715 pub send_by_mail_if_email_not_viewed_in_days: i32,
2716 pub send_by_mail_if_email_not_viewed_in_days_enabled: bool,
2717 pub reminder_invoice_payment_terms_in_days: i32,
2718 pub invoice_comment: Option<String>,
2719}
2720
2721#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2722#[serde(rename_all = "PascalCase")]
2723pub struct DebtorAutogiro {
2724 pub active: bool,
2725 pub account_no: Option<String>,
2726 pub clearing_no: Option<String>,
2727 pub stage: AutogiroStageType,
2728 pub payer_number: Option<String>,
2729 pub payment_service_supplier: Option<String>,
2730 pub autogiro_first_withdrawal_date: Option<DateTime>,
2731}
2732impl DebtorAutogiro {
2733 pub fn new(active: bool, stage: AutogiroStageType) -> Self {
2734 Self {
2735 active,
2736 stage,
2737 account_no: None,
2738 clearing_no: None,
2739 payer_number: None,
2740 payment_service_supplier: None,
2741 autogiro_first_withdrawal_date: None,
2742 }
2743 }
2744}
2745
2746#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2747#[serde(rename_all = "PascalCase")]
2748pub struct DebtorCreditCard {
2749 pub credit_card_public_id: Uuid,
2750 pub created: DateTime,
2751 pub expires: DateTime,
2752 pub masked_card_number: Option<String>,
2753 pub brand: Option<String>,
2754}
2755impl DebtorCreditCard {
2756 pub fn new(credit_card_public_id: Uuid, created: DateTime, expires: DateTime) -> Self {
2757 Self {
2758 credit_card_public_id,
2759 created,
2760 expires,
2761 masked_card_number: None,
2762 brand: None,
2763 }
2764 }
2765}
2766
2767#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2768#[serde(rename_all = "PascalCase")]
2769pub struct DebtCollectionEntry {
2770 pub creditor_public_id: Uuid,
2771 pub debtor_public_id: Uuid,
2772 pub delivery_method: DeliveryMethodType,
2773 pub communication_language: LanguageType,
2774 pub reason_description: Option<String>,
2775 pub number_of_reminders: i32,
2776 pub start_debt_collection_action_level: DebtCollectionActionLevelType,
2777 pub end_debt_collection_action_level: DebtCollectionActionLevelType,
2778 pub value: Option<Amount>,
2779 pub original_invoice_date: DateTime,
2780 pub original_due_date: DateTime,
2781 pub original_invoice_number: Option<String>,
2782 pub payment_terms_in_days: i32,
2783 pub interest_percentage: f64,
2784 pub interest_type: Option<InterestType>,
2785 pub our_reference: Option<String>,
2786 pub your_reference: Option<String>,
2787 pub original_invoice_file: Option<File>,
2788 pub interest_start_in_days_after_due_date: i32,
2789 pub reason_for_higher_interest: Option<String>,
2790 pub delivery_address_override: Option<DeliveryAddressOverride>,
2791 pub payment_override: Option<PaymentOverride>,
2792 pub eviction: bool,
2793 pub inform_social_welfare: bool,
2794}
2795
2796#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2797#[serde(rename_all = "PascalCase")]
2798pub struct DebtCollectionFromInvoiceEntry {
2799 pub source_public_id: Option<String>,
2800 pub delivery_method: DeliveryMethodType,
2801 pub communication_language: LanguageType,
2802 pub reason_description: Option<String>,
2803 pub number_of_reminders: i32,
2804 pub start_debt_collection_action_level: DebtCollectionActionLevelType,
2805 pub end_debt_collection_action_level: DebtCollectionActionLevelType,
2806 pub payment_terms_in_days: i32,
2807 pub interest_percentage: f64,
2808 pub interest_type: Option<InterestType>,
2809 pub our_reference: Option<String>,
2810 pub your_reference: Option<String>,
2811 pub interest_start_in_days_after_due_date: i32,
2812 pub reason_for_higher_interest: Option<String>,
2813 pub delivery_address_override: Option<DeliveryAddressOverride>,
2814 pub payment_override: Option<PaymentOverride>,
2815 pub eviction: bool,
2816 pub inform_social_welfare: bool,
2817}
2818
2819#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2820#[serde(rename_all = "PascalCase")]
2821pub struct DebtCollectionFromReconciliationInvoiceEntry {
2822 pub source_public_id: Option<String>,
2823 pub delivery_method: DeliveryMethodType,
2824 pub communication_language: LanguageType,
2825 pub reason_description: Option<String>,
2826 pub number_of_reminders: i32,
2827 pub start_debt_collection_action_level: DebtCollectionActionLevelType,
2828 pub payment_terms_in_days: i32,
2829 pub interest_percentage: f64,
2830 pub interest_type: Option<InterestType>,
2831 pub our_reference: Option<String>,
2832 pub your_reference: Option<String>,
2833 pub original_invoice_date: DateTime,
2834 pub original_due_date: DateTime,
2835 pub interest_start_in_days_after_due_date: i32,
2836 pub reason_for_higher_interest: Option<String>,
2837 pub attention: Option<String>,
2838 pub care_of: Option<String>,
2839 pub address: Option<String>,
2840 pub address2: Option<String>,
2841 pub zip_code: Option<String>,
2842 pub city: Option<String>,
2843 pub country_code: Option<String>,
2844 pub email: Option<String>,
2845 pub phone: Option<String>,
2846 pub org_no: Option<String>,
2847 pub eviction: bool,
2848 pub inform_social_welfare: bool,
2849}
2850
2851pub type DebtCollectionMessages = Vec<DebtCollectionMessage>;
2852
2853#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2854#[serde(rename_all = "PascalCase")]
2855pub struct DebtCollectionMessage {
2856 pub public_id: Uuid,
2857 pub message: Option<String>,
2858 pub is_active: bool,
2859}
2860impl DebtCollectionMessage {
2861 pub fn new(public_id: Uuid, is_active: bool) -> Self {
2862 Self {
2863 public_id,
2864 is_active,
2865 message: None,
2866 }
2867 }
2868}
2869
2870pub type DebtorAutogiroApprovals = Vec<DebtorAutogiroApproval>;
2871
2872#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2873#[serde(rename_all = "PascalCase")]
2874pub struct DebtorAutogiroApproval {
2875 pub created: DateTime,
2876 pub active: bool,
2877
2878 #[serde(rename = "AutoGiroApprovalXML")]
2879 pub auto_giro_approval_xml: Option<String>,
2880}
2881impl DebtorAutogiroApproval {
2882 pub fn new(created: DateTime, active: bool) -> Self {
2883 Self {
2884 created,
2885 active,
2886 auto_giro_approval_xml: None,
2887 }
2888 }
2889}
2890
2891pub type DebtorBalances = Vec<DebtorBalance>;
2892
2893#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2894#[serde(rename_all = "PascalCase")]
2895pub struct DebtorBalance {
2896 pub debtor_public_id: Uuid,
2897 pub transaction_date: DateTime,
2898 pub amount: Option<Amount>,
2899 pub balance_type: DebtorBalanceType,
2900 pub description: Option<String>,
2901}
2902impl DebtorBalance {
2903 pub fn new(
2904 debtor_public_id: Uuid,
2905 transaction_date: DateTime,
2906 balance_type: DebtorBalanceType,
2907 ) -> Self {
2908 Self {
2909 debtor_public_id,
2910 transaction_date,
2911 balance_type,
2912 amount: None,
2913 description: None,
2914 }
2915 }
2916}
2917
2918pub type DebtorCategories = Vec<DebtorCategory>;
2919
2920#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2921#[serde(rename_all = "PascalCase")]
2922pub struct DebtorCategory {
2923 pub creditor_public_id: Uuid,
2924 pub category_public_id: Uuid,
2925 pub category_name: Option<String>,
2926}
2927impl DebtorCategory {
2928 pub fn new(creditor_public_id: Uuid, category_public_id: Uuid) -> Self {
2929 Self {
2930 creditor_public_id,
2931 category_public_id,
2932 category_name: None,
2933 }
2934 }
2935}
2936
2937pub type DebtorEvents = Vec<DebtorEvent>;
2938
2939#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2940#[serde(rename_all = "PascalCase")]
2941pub struct DebtorEvent {
2942 pub title: Option<String>,
2943 pub content: Option<String>,
2944 pub event_date: DateTime,
2945 pub event_by: Option<String>,
2946 pub reference: Option<String>,
2947 pub event_type: EventType,
2948 pub is_public: bool,
2949 pub has_occured: bool,
2950 pub event_public_id: Uuid,
2951}
2952impl DebtorEvent {
2953 pub fn new(
2954 event_date: DateTime,
2955 event_type: EventType,
2956 is_public: bool,
2957 has_occured: bool,
2958 event_public_id: Uuid,
2959 ) -> Self {
2960 Self {
2961 event_date,
2962 event_type,
2963 is_public,
2964 has_occured,
2965 event_public_id,
2966 title: None,
2967 content: None,
2968 event_by: None,
2969 reference: None,
2970 }
2971 }
2972}
2973
2974#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2975#[serde(rename_all = "PascalCase")]
2976pub struct DebtorInformationCorrectionRequest {
2977 pub debtor_public_id: Uuid,
2978 pub comment: Option<String>,
2979}
2980impl DebtorInformationCorrectionRequest {
2981 pub fn new(debtor_public_id: Uuid) -> Self {
2982 Self {
2983 debtor_public_id,
2984 comment: None,
2985 }
2986 }
2987}
2988
2989#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
2990#[serde(rename_all = "PascalCase")]
2991pub struct DebtorKivraStatus {
2992 pub debtor_public_id: Uuid,
2993 pub kivra_status: KivraStatusType,
2994}
2995impl DebtorKivraStatus {
2996 pub fn new(debtor_public_id: Uuid, kivra_status: KivraStatusType) -> Self {
2997 Self {
2998 debtor_public_id,
2999 kivra_status,
3000 }
3001 }
3002}
3003
3004#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
3005#[serde(rename_all = "PascalCase")]
3006pub struct DebtorsToMatchWithKivra {
3007 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3008 pub debtor_public_ids: Vec<Uuid>,
3009}
3010
3011pub type Debtors = Vec<Debtor>;
3012
3013#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
3014#[serde(rename_all = "PascalCase")]
3015pub struct DebtorUnhandledExternalPayment {
3016 pub amount: Option<Amount>,
3017 pub unhandled_external_payment_type: Option<String>,
3018}
3019
3020#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3021#[serde(rename_all = "PascalCase")]
3022pub struct DefaultActionConfig {
3023 pub creditor_public_id: Uuid,
3024 pub start_debt_collection_action_level: DebtCollectionActionLevelType,
3025 pub end_debt_collection_action_level: DebtCollectionActionLevelType,
3026 pub delivery_method: DeliveryMethodType,
3027 pub communication_language: LanguageType,
3028 pub payment_terms_in_days: i32,
3029 pub debt_collection_payment_terms_in_days: i32,
3030 pub interest_terms_in_days: i32,
3031 pub interest_percentage: f64,
3032 pub invoice_payment_terms_in_days: i32,
3033 pub interest_type: InterestType,
3034 pub interest_start_in_days_after_due_date: i32,
3035 pub reason_for_higher_interest: Option<String>,
3036 pub our_reference: Option<String>,
3037 pub number_of_reminders: i32,
3038 pub currency_code: Option<String>,
3039 pub reason_description: Option<String>,
3040 pub send_invoice_to_debt_collection_after_days: i32,
3041 pub send_invoice_to_debt_collection: bool,
3042 pub include_pdf_in_email: Option<bool>,
3043 pub send_reminder_invoice: bool,
3044 pub send_reminder_invoice_days_after_due_date: i32,
3045 pub reminder_invoice_fee: f64,
3046 pub invoice_fee: f64,
3047
3048 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3049 pub automatic_invoice_write_off_thresholds: Vec<Amount>,
3050
3051 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3052 pub invoice_fee_only_on_delivery_methods: Vec<DeliveryMethodType>,
3053 pub send_by_mail_if_email_not_viewed_in_days: i32,
3054 pub send_by_mail_if_email_not_viewed_in_days_enabled: bool,
3055 pub send_as_priority_mail: bool,
3056 pub send_with_color: bool,
3057 pub send_debt_collections_with_mail: bool,
3058 pub reminder_invoice_payment_terms_in_days: i32,
3059 pub invoice_comment: Option<String>,
3060 pub reminder_grace_days: Option<i32>,
3061 pub min_amount_for_sending_reminder: Option<f64>,
3062 pub min_amount_for_sending_debt_collection_action: Option<f64>,
3063
3064 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3065 pub incoming_payment_notification_methods: Vec<IncomingPaymentNotificationMethodType>,
3066 pub debt_collection_message_public_id: Option<Uuid>,
3067 pub do_not_automatically_send_foreign_invoices_to_debt_collection: bool,
3068 pub show_unpaid_invoices_on_next_invoice: bool,
3069 pub usage_of_debtor_balance_is_applied_by_default: bool,
3070 pub dont_request_due_claim_response: bool,
3071}
3072
3073#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3074#[serde(rename_all = "PascalCase")]
3075pub struct EInvoiceRegistration {
3076 #[serde(rename = "CustomerID")]
3077 pub customer_id: i32,
3078 pub sender_name: Option<String>,
3079 pub customer_number: Option<String>,
3080
3081 #[serde(rename = "SSN")]
3082 pub ssn: Option<String>,
3083 pub bank_code: EInvoiceBankType,
3084 pub customer_name: Option<String>,
3085 pub email: Option<String>,
3086 pub phone: Option<String>,
3087 pub status: Option<String>,
3088 pub creditor_public_id: Uuid,
3089}
3090impl EInvoiceRegistration {
3091 pub fn new(customer_id: i32, bank_code: EInvoiceBankType, creditor_public_id: Uuid) -> Self {
3092 Self {
3093 customer_id,
3094 bank_code,
3095 creditor_public_id,
3096 sender_name: None,
3097 customer_number: None,
3098 ssn: None,
3099 customer_name: None,
3100 email: None,
3101 phone: None,
3102 status: None,
3103 }
3104 }
3105}
3106
3107#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3108#[serde(rename_all = "PascalCase")]
3109pub struct ExportFilesRequest {
3110 pub file_name: Option<String>,
3111
3112 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3113 pub file_public_ids: Vec<Uuid>,
3114 pub receiver: Option<String>,
3115 pub creditor_public_id: Uuid,
3116}
3117impl ExportFilesRequest {
3118 pub fn new(creditor_public_id: Uuid) -> Self {
3119 Self {
3120 creditor_public_id,
3121 file_name: None,
3122 file_public_ids: Vec::new(),
3123 receiver: None,
3124 }
3125 }
3126}
3127
3128pub type Files = Vec<File>;
3129
3130#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3131#[serde(rename_all = "PascalCase")]
3132pub struct GenericAction {
3133 pub action_public_id: Option<String>,
3134 pub creditor_public_id: Uuid,
3135 pub debtor_public_id: Uuid,
3136 pub creditor_org_no: Option<String>,
3137 pub creditor_name: Option<String>,
3138 pub amount: Option<Amount>,
3139 pub original_amount: Option<Amount>,
3140 pub stage: GenericActionStageType,
3141 pub action_type: ActionType,
3142 pub created: DateTime,
3143 pub closed_date: Option<DateTime>,
3144 pub debtor_org_no: Option<String>,
3145 pub debtor_name: Option<String>,
3146 pub attested_date: Option<DateTime>,
3147 pub invoice_sent_date: Option<DateTime>,
3148 pub reminder_invoice_sent_date: Option<DateTime>,
3149 pub next_event: Option<String>,
3150 pub next_event_date: Option<DateTime>,
3151 pub original_due_date: DateTime,
3152 pub original_invoice_date: DateTime,
3153 pub original_invoice_number: Option<String>,
3154 pub is_paused: bool,
3155 pub is_disputed: bool,
3156
3157 #[serde(rename = "OCR")]
3158 pub ocr: Option<String>,
3159 pub debt_collection_action_public_id: Option<String>,
3160 pub reminder_invoice_action_public_id: Option<String>,
3161 pub delivery_method: DeliveryMethodType,
3162 pub delivery_status: DeliveryStatusType,
3163
3164 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3165 pub files: Vec<File>,
3166}
3167
3168#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3169#[serde(rename_all = "PascalCase")]
3170pub struct HalfYearlyAutogiroContractInvoice {
3171 pub creditor_public_id: Uuid,
3172 pub name: Option<String>,
3173 pub address: Option<String>,
3174 pub address2: Option<String>,
3175 pub zip_code: Option<String>,
3176 pub city: Option<String>,
3177 pub email: Option<String>,
3178 pub phone: Option<String>,
3179 pub debtor_external_id: Option<String>,
3180
3181 #[serde(rename = "SSN")]
3182 pub ssn: Option<String>,
3183 pub clearing_number: Option<String>,
3184 pub account_number: Option<String>,
3185 pub bank: Option<String>,
3186 pub amount: f64,
3187 pub withdrawal_day: i32,
3188 pub withdrawal_month: i32,
3189 pub end_date: Option<DateTime>,
3190 pub start_date: Option<DateTime>,
3191 pub enable_automatic_reminder: bool,
3192 pub enable_automatic_debt_collection: bool,
3193}
3194impl HalfYearlyAutogiroContractInvoice {
3195 pub fn new(
3196 creditor_public_id: Uuid,
3197 amount: f64,
3198 withdrawal_day: i32,
3199 withdrawal_month: i32,
3200 enable_automatic_reminder: bool,
3201 enable_automatic_debt_collection: bool,
3202 ) -> Self {
3203 Self {
3204 creditor_public_id,
3205 amount,
3206 withdrawal_day,
3207 withdrawal_month,
3208 enable_automatic_reminder,
3209 enable_automatic_debt_collection,
3210 name: None,
3211 address: None,
3212 address2: None,
3213 zip_code: None,
3214 city: None,
3215 email: None,
3216 phone: None,
3217 debtor_external_id: None,
3218 ssn: None,
3219 clearing_number: None,
3220 account_number: None,
3221 bank: None,
3222 end_date: None,
3223 start_date: None,
3224 }
3225 }
3226}
3227
3228pub type ImportInvoiceFileJobs = Vec<InvoiceImportFileJob>;
3229
3230#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3231#[serde(rename_all = "PascalCase")]
3232pub struct InvoiceImportFileJob {
3233 pub import_public_id: Uuid,
3234 pub creditor_public_id: Uuid,
3235 pub file: Option<File>,
3236 pub created: DateTime,
3237 pub processed: Option<DateTime>,
3238 pub state: ImportFileStateType,
3239 pub information: Option<String>,
3240}
3241impl InvoiceImportFileJob {
3242 pub fn new(
3243 import_public_id: Uuid,
3244 creditor_public_id: Uuid,
3245 created: DateTime,
3246 state: ImportFileStateType,
3247 ) -> Self {
3248 Self {
3249 import_public_id,
3250 creditor_public_id,
3251 created,
3252 state,
3253 file: None,
3254 processed: None,
3255 information: None,
3256 }
3257 }
3258}
3259
3260#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3261#[serde(rename_all = "PascalCase")]
3262pub struct ImportInvoiceFile {
3263 pub creditor_public_id: Uuid,
3264 pub file: Option<File>,
3265}
3266impl ImportInvoiceFile {
3267 pub fn new(creditor_public_id: Uuid) -> Self {
3268 Self {
3269 creditor_public_id,
3270 file: None,
3271 }
3272 }
3273}
3274
3275#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3276#[serde(rename_all = "PascalCase")]
3277pub struct ImportPaymentFile {
3278 pub creditor_public_id: Uuid,
3279 pub file: Option<File>,
3280}
3281impl ImportPaymentFile {
3282 pub fn new(creditor_public_id: Uuid) -> Self {
3283 Self {
3284 creditor_public_id,
3285 file: None,
3286 }
3287 }
3288}
3289
3290#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3291#[serde(rename_all = "PascalCase")]
3292pub struct IncomingPaymentRequest {
3293 pub creditor_public_id: Uuid,
3294 pub from: DateTime,
3295 pub to: DateTime,
3296
3297 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3298 pub payment_mean_code_filter: Vec<String>,
3299
3300 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3301 pub project_number_filter: Vec<String>,
3302
3303 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3304 pub action_public_id_filter: Vec<String>,
3305}
3306impl IncomingPaymentRequest {
3307 pub fn new(creditor_public_id: Uuid, from: DateTime, to: DateTime) -> Self {
3308 Self {
3309 creditor_public_id,
3310 from,
3311 to,
3312 payment_mean_code_filter: Vec::new(),
3313 project_number_filter: Vec::new(),
3314 action_public_id_filter: Vec::new(),
3315 }
3316 }
3317}
3318
3319pub type IncomingPayments = Vec<IncomingPayment>;
3320
3321#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3322#[serde(rename_all = "PascalCase")]
3323pub struct IncomingPayment {
3324 pub creditor_public_id: Uuid,
3325 pub invoice_number: Option<String>,
3326 pub action_public_id: Option<String>,
3327 pub action_type: ActionType,
3328 pub debtor_public_id: Uuid,
3329 pub debtor_name: Option<String>,
3330 pub amount: Option<Amount>,
3331 pub created_date: DateTime,
3332 pub payment_date: DateTime,
3333 pub payment_mean_code: Option<String>,
3334 pub file: Option<File>,
3335 pub payment_reference_id: Uuid,
3336 pub external_reference: Option<String>,
3337
3338 #[serde(rename = "OCR")]
3339 pub ocr: Option<String>,
3340 pub created_by: Option<String>,
3341 pub is_reminder_payment: bool,
3342}
3343impl IncomingPayment {
3344 pub fn new(
3345 creditor_public_id: Uuid,
3346 action_type: ActionType,
3347 debtor_public_id: Uuid,
3348 created_date: DateTime,
3349 payment_date: DateTime,
3350 payment_reference_id: Uuid,
3351 is_reminder_payment: bool,
3352 ) -> Self {
3353 Self {
3354 creditor_public_id,
3355 action_type,
3356 debtor_public_id,
3357 created_date,
3358 payment_date,
3359 payment_reference_id,
3360 is_reminder_payment,
3361 invoice_number: None,
3362 action_public_id: None,
3363 debtor_name: None,
3364 amount: None,
3365 payment_mean_code: None,
3366 file: None,
3367 external_reference: None,
3368 ocr: None,
3369 created_by: None,
3370 }
3371 }
3372}
3373
3374#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3375#[serde(rename_all = "PascalCase")]
3376pub struct InstallmentPlanActionEvent {
3377 pub title: Option<String>,
3378 pub content: Option<String>,
3379 pub event_date: DateTime,
3380 pub event_by: Option<String>,
3381 pub reference: Option<String>,
3382 pub event_type: EventType,
3383 pub is_public: bool,
3384 pub has_occured: bool,
3385 pub event_public_id: Uuid,
3386}
3387impl InstallmentPlanActionEvent {
3388 pub fn new(
3389 event_date: DateTime,
3390 event_type: EventType,
3391 is_public: bool,
3392 has_occured: bool,
3393 event_public_id: Uuid,
3394 ) -> Self {
3395 Self {
3396 event_date,
3397 event_type,
3398 is_public,
3399 has_occured,
3400 event_public_id,
3401 title: None,
3402 content: None,
3403 event_by: None,
3404 reference: None,
3405 }
3406 }
3407}
3408
3409#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3410#[serde(rename_all = "PascalCase")]
3411pub struct InstallmentPlanActionFromDebtCollectionInvoice {
3412 pub invoice_date: DateTime,
3413 pub due_date: DateTime,
3414 pub invoice_number: Option<String>,
3415 pub invoice_decription: Option<String>,
3416 pub invoiced_amount: Option<Amount>,
3417 pub remaining_amount: Option<Amount>,
3418 pub invoice_file: Option<File>,
3419
3420 #[serde(rename = "OCR")]
3421 pub ocr: Option<String>,
3422}
3423impl InstallmentPlanActionFromDebtCollectionInvoice {
3424 pub fn new(invoice_date: DateTime, due_date: DateTime) -> Self {
3425 Self {
3426 invoice_date,
3427 due_date,
3428 invoice_number: None,
3429 invoice_decription: None,
3430 invoiced_amount: None,
3431 remaining_amount: None,
3432 invoice_file: None,
3433 ocr: None,
3434 }
3435 }
3436}
3437
3438#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3439#[serde(rename_all = "PascalCase")]
3440pub struct InstallmentPlanActionFromDebtCollectionState {
3441 pub stage: InstallmentPlanActionStageType,
3442 pub number_of_sent_invoices: i32,
3443 pub next_event_date: Option<DateTime>,
3444 pub closed_date: Option<DateTime>,
3445 pub next_event: Option<String>,
3446 pub is_paused: bool,
3447 pub disputed_date: Option<DateTime>,
3448}
3449impl InstallmentPlanActionFromDebtCollectionState {
3450 pub fn new(
3451 stage: InstallmentPlanActionStageType,
3452 number_of_sent_invoices: i32,
3453 is_paused: bool,
3454 ) -> Self {
3455 Self {
3456 stage,
3457 number_of_sent_invoices,
3458 is_paused,
3459 next_event_date: None,
3460 closed_date: None,
3461 next_event: None,
3462 disputed_date: None,
3463 }
3464 }
3465}
3466
3467#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3468#[serde(rename_all = "PascalCase")]
3469pub struct InstallmentPlanActionFromDebtCollection {
3470 pub action_public_id: Option<String>,
3471 pub created: DateTime,
3472 pub debtor: Option<Debtor>,
3473 pub creditor_public_id: Uuid,
3474 pub delivery_method: DeliveryMethodType,
3475 pub communication_language: LanguageType,
3476 pub current_amount: Option<Amount>,
3477 pub fee_amount: Option<Amount>,
3478 pub interest_amount: Option<Amount>,
3479 pub debt_amount: Option<Amount>,
3480 pub original_amount: Option<Amount>,
3481 pub state: Option<InstallmentPlanActionFromDebtCollectionState>,
3482 pub original_invoice_date: DateTime,
3483 pub original_due_date: DateTime,
3484 pub original_invoice_number: Option<String>,
3485 pub payment_terms_in_days: i32,
3486 pub interest_percentage: f64,
3487 pub interest_type: InterestType,
3488 pub our_reference: Option<String>,
3489 pub your_reference: Option<String>,
3490 pub original_invoice_file: Option<File>,
3491 pub interest_start_in_days_after_due_date: i32,
3492 pub periods: i32,
3493 pub next_invoice_date: DateTime,
3494
3495 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3496 pub invoices: Vec<InstallmentPlanActionFromDebtCollectionInvoice>,
3497 pub installment_plan_source: InstallmentPlanSourceType,
3498 pub invoice_source_public_id: Option<String>,
3499 pub debt_collection_source_public_id: Option<String>,
3500 pub delivery_address_override: Option<DeliveryAddressOverride>,
3501
3502 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3503 pub events: Vec<InstallmentPlanActionEvent>,
3504}
3505
3506pub type InstallmentPlanActionsFromDebtCollection = Vec<InstallmentPlanActionFromDebtCollection>;
3507pub type InstallmentPlanActionSubs = Vec<InstallmentPlanActionSub>;
3508
3509#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3510#[serde(rename_all = "PascalCase")]
3511pub struct InstallmentPlanActionSub {
3512 pub action_public_id: Option<String>,
3513 pub creditor_public_id: Uuid,
3514 pub debtor_public_id: Uuid,
3515 pub creditor_org_no: Option<String>,
3516 pub creditor_name: Option<String>,
3517 pub debtor_org_no: Option<String>,
3518 pub debtor_name: Option<String>,
3519 pub current_amount: Option<Amount>,
3520 pub invoiced_amount: Option<Amount>,
3521 pub stage: InstallmentPlanActionStageType,
3522 pub action_type: ActionType,
3523 pub delivery_method: DeliveryMethodType,
3524 pub created: DateTime,
3525 pub closed_date: Option<DateTime>,
3526 pub attested_date: Option<DateTime>,
3527 pub next_event_date: Option<DateTime>,
3528 pub next_event: Option<String>,
3529 pub original_due_date: DateTime,
3530 pub original_invoice_date: DateTime,
3531 pub original_invoice_number: Option<String>,
3532 pub is_paused: bool,
3533 pub is_commented: bool,
3534 pub is_disputed: bool,
3535 pub delivery_status: DeliveryStatusType,
3536
3537 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3538 pub files: Vec<File>,
3539
3540 #[serde(rename = "OCRs", default, skip_serializing_if = "Vec::is_empty")]
3541 pub oc_rs: Vec<String>,
3542
3543 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3544 pub invoice_numbers: Vec<String>,
3545 pub communication_language: LanguageType,
3546 pub payment_terms_in_days: i32,
3547 pub interest_percentage: f64,
3548 pub your_reference: Option<String>,
3549}
3550
3551pub type InvoiceAccountReceivables = Vec<InvoiceAccountReceivable>;
3552
3553#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3554#[serde(rename_all = "PascalCase")]
3555pub struct InvoiceAccountReceivable {
3556 pub action_public_id: Option<String>,
3557 pub invoice_number: Option<String>,
3558 pub debtor: Option<Debtor>,
3559 pub invoice_date: DateTime,
3560 pub due_date: DateTime,
3561 pub invoiced_amount_including_tax: Option<Amount>,
3562 pub remaining_amount_including_tax: Option<Amount>,
3563 pub period_start: Option<DateTime>,
3564 pub period_end: Option<DateTime>,
3565 pub your_reference: Option<String>,
3566}
3567impl InvoiceAccountReceivable {
3568 pub fn new(invoice_date: DateTime, due_date: DateTime) -> Self {
3569 Self {
3570 invoice_date,
3571 due_date,
3572 action_public_id: None,
3573 invoice_number: None,
3574 debtor: None,
3575 invoiced_amount_including_tax: None,
3576 remaining_amount_including_tax: None,
3577 period_start: None,
3578 period_end: None,
3579 your_reference: None,
3580 }
3581 }
3582}
3583
3584#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
3585#[serde(rename_all = "PascalCase")]
3586pub struct InvoiceActionCommented {
3587 pub event: Option<InvoiceActionEvent>,
3588 pub invoice_action: Option<InvoiceAction>,
3589}
3590
3591#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3592#[serde(rename_all = "PascalCase")]
3593pub struct InvoiceActionEvent {
3594 pub title: Option<String>,
3595 pub content: Option<String>,
3596 pub event_date: DateTime,
3597 pub event_by: Option<String>,
3598 pub reference: Option<String>,
3599 pub event_type: EventType,
3600 pub is_public: bool,
3601 pub has_occured: bool,
3602 pub event_public_id: Uuid,
3603}
3604impl InvoiceActionEvent {
3605 pub fn new(
3606 event_date: DateTime,
3607 event_type: EventType,
3608 is_public: bool,
3609 has_occured: bool,
3610 event_public_id: Uuid,
3611 ) -> Self {
3612 Self {
3613 event_date,
3614 event_type,
3615 is_public,
3616 has_occured,
3617 event_public_id,
3618 title: None,
3619 content: None,
3620 event_by: None,
3621 reference: None,
3622 }
3623 }
3624}
3625
3626#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3627#[serde(rename_all = "PascalCase")]
3628pub struct InvoiceAction {
3629 pub action_public_id: Option<String>,
3630 pub creditor_public_id: Uuid,
3631 pub communication_language: LanguageType,
3632 pub created: DateTime,
3633 pub delivery_method: DeliveryMethodType,
3634 pub debtor: Option<Debtor>,
3635 pub state: Option<InvoiceActionState>,
3636
3637 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3638 pub invoices: Vec<InvoiceActionInvoice>,
3639
3640 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3641 pub records: Vec<InvoiceActionRecord>,
3642
3643 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3644 pub events: Vec<InvoiceActionEvent>,
3645 pub invoice_date: DateTime,
3646 pub due_date: DateTime,
3647 pub delivery_date: Option<DateTime>,
3648 pub payment_terms_in_days: i32,
3649 pub interest_terms_in_days: i32,
3650 pub interest_percentage: f64,
3651 pub interest_type: InterestType,
3652 pub our_reference: Option<String>,
3653 pub your_reference: Option<String>,
3654 pub interest_start_in_days_after_due_date: i32,
3655 pub invoiced_amount: Option<Amount>,
3656 pub interest_amount: Option<Amount>,
3657 pub rot_rut_deduction_amount: Option<Amount>,
3658 pub current_amount: Option<Amount>,
3659 pub credited_amount: Option<Amount>,
3660 pub paid_amount: Option<Amount>,
3661 pub write_off_amount: Option<Amount>,
3662 pub awaiting_payment_transfer_amount: Option<Amount>,
3663
3664 #[serde(rename = "TotalVATAmount")]
3665 pub total_vat_amount: Option<Amount>,
3666 pub cent_rounding_amount: Option<Amount>,
3667 pub debt_collection_action_public_id: Option<String>,
3668 pub reminder_invoice_action_public_id: Option<String>,
3669 pub delivery_address_override: Option<DeliveryAddressOverride>,
3670 pub crediting_invoice: Option<CreditingInvoice>,
3671 pub autogiro: Option<AutogiroWithdrawal>,
3672 pub credit_card: Option<CreditCardWithdrawal>,
3673 pub message: Option<String>,
3674 pub invoice_number: Option<String>,
3675 pub payment_override: Option<PaymentOverride>,
3676 pub debt_collection_details: Option<DebtCollectionDetails>,
3677 pub reminder_invoice_details: Option<ReminderInvoiceDetails>,
3678
3679 #[serde(rename = "ReverseVATDetails")]
3680 pub reverse_vat_details: Option<ReverseVATDetails>,
3681 pub rot_rut_details: Option<RotRutDetails>,
3682 pub reason_for_higher_interest: Option<String>,
3683
3684 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3685 pub appendixes: Vec<File>,
3686
3687 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3688 pub attachments: Vec<InvoiceActionAttachment>,
3689 pub action_type: ActionType,
3690 pub invoice_fee: Option<Amount>,
3691 pub freight_fee: Option<Amount>,
3692 pub send_by_mail_if_email_not_viewed_in_days: Option<i32>,
3693 pub external_reference: Option<String>,
3694 pub contract_invoice_action_public_id: Option<String>,
3695}
3696
3697#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3698#[serde(rename_all = "PascalCase")]
3699pub struct InvoiceActionState {
3700 pub stage: InvoiceActionStageType,
3701 pub invoice_sent_date: Option<DateTime>,
3702 pub next_event_date: Option<DateTime>,
3703 pub closed_date: Option<DateTime>,
3704 pub next_event: Option<String>,
3705 pub is_paused: bool,
3706 pub is_locked: bool,
3707 pub attested_date: Option<DateTime>,
3708 pub disputed_date: Option<DateTime>,
3709 pub sms_sent_date: Option<DateTime>,
3710 pub sent_to_debt_collection_date: Option<DateTime>,
3711 pub sales_requested_date: Option<DateTime>,
3712 pub credit_card_payment_public_id: Option<Uuid>,
3713 pub swish_payment_public_id: Option<String>,
3714 pub use_debtor_balance: bool,
3715}
3716impl InvoiceActionState {
3717 pub fn new(
3718 stage: InvoiceActionStageType,
3719 is_paused: bool,
3720 is_locked: bool,
3721 use_debtor_balance: bool,
3722 ) -> Self {
3723 Self {
3724 stage,
3725 is_paused,
3726 is_locked,
3727 use_debtor_balance,
3728 invoice_sent_date: None,
3729 next_event_date: None,
3730 closed_date: None,
3731 next_event: None,
3732 attested_date: None,
3733 disputed_date: None,
3734 sms_sent_date: None,
3735 sent_to_debt_collection_date: None,
3736 sales_requested_date: None,
3737 credit_card_payment_public_id: None,
3738 swish_payment_public_id: None,
3739 }
3740 }
3741}
3742
3743#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3744#[serde(rename_all = "PascalCase")]
3745pub struct InvoiceActionInvoice {
3746 pub invoice_date: DateTime,
3747 pub due_date: DateTime,
3748 pub invoice_number: Option<String>,
3749 pub invoice_decription: Option<String>,
3750 pub payment_terms_in_days: i32,
3751 pub our_reference: Option<String>,
3752 pub your_reference: Option<String>,
3753 pub name: Option<String>,
3754 pub address: Option<String>,
3755 pub address2: Option<String>,
3756 pub zip_code: Option<String>,
3757 pub city: Option<String>,
3758 pub country_code: Option<String>,
3759 pub email: Option<String>,
3760 pub invoiced_amount: Option<Amount>,
3761 pub invoice_file: Option<File>,
3762
3763 #[serde(rename = "OCR")]
3764 pub ocr: Option<String>,
3765}
3766impl InvoiceActionInvoice {
3767 pub fn new(invoice_date: DateTime, due_date: DateTime, payment_terms_in_days: i32) -> Self {
3768 Self {
3769 invoice_date,
3770 due_date,
3771 payment_terms_in_days,
3772 invoice_number: None,
3773 invoice_decription: None,
3774 our_reference: None,
3775 your_reference: None,
3776 name: None,
3777 address: None,
3778 address2: None,
3779 zip_code: None,
3780 city: None,
3781 country_code: None,
3782 email: None,
3783 invoiced_amount: None,
3784 invoice_file: None,
3785 ocr: None,
3786 }
3787 }
3788}
3789
3790#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3791#[serde(rename_all = "PascalCase")]
3792pub struct InvoiceActionEntry {
3793 pub action_type: ActionType,
3794 pub creditor_public_id: Uuid,
3795 pub debtor_public_id: Uuid,
3796 pub invoice_date: DateTime,
3797 pub due_date: DateTime,
3798 pub delivery_date: Option<DateTime>,
3799
3800 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3801 pub records: Vec<InvoiceActionRecord>,
3802 pub interest_percentage: f64,
3803 pub reason_for_higher_interest: Option<String>,
3804 pub interest_start_in_days_after_due_date: i32,
3805 pub interest_type: Option<InterestType>,
3806 pub our_reference: Option<String>,
3807 pub your_reference: Option<String>,
3808 pub delivery_method: DeliveryMethodType,
3809 pub communication_language: LanguageType,
3810 pub message: Option<String>,
3811 pub invoice_number: Option<String>,
3812 pub invoice_fee: Option<Amount>,
3813 pub freight_fee: Option<Amount>,
3814 pub send_by_mail_if_email_not_viewed_in_days: Option<i32>,
3815 pub delivery_address_override: Option<DeliveryAddressOverride>,
3816 pub debt_collection_details: Option<DebtCollectionDetails>,
3817 pub reminder_invoice_details: Option<ReminderInvoiceDetails>,
3818
3819 #[serde(rename = "ReverseVATDetails")]
3820 pub reverse_vat_details: Option<ReverseVATDetails>,
3821 pub rot_rut_details: Option<RotRutDetails>,
3822 pub payment_override: Option<PaymentOverride>,
3823
3824 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3825 pub appendixes: Vec<File>,
3826
3827 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3828 pub attachments: Vec<InvoiceActionAttachment>,
3829 pub autogiro: Option<AutogiroWithdrawal>,
3830 pub credit_card: Option<CreditCardWithdrawal>,
3831
3832 #[serde(rename = "InvoicePDF")]
3833 pub invoice_pdf: Option<InvoiceFile>,
3834 pub crediting_invoice_public_id: Option<String>,
3835 pub external_reference: Option<String>,
3836 pub is_locked: bool,
3837 pub use_debtor_balance: bool,
3838 pub invoice_send_date_override: Option<DateTime>,
3839}
3840
3841pub type InvoiceActionRotRutProcesseds = Vec<InvoiceActionRotRutProcessed>;
3842
3843#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3844#[serde(rename_all = "PascalCase")]
3845pub struct InvoiceActionRotRutProcessed {
3846 pub action_public_id: Option<String>,
3847 pub processed: DateTime,
3848 pub processed_by: Option<String>,
3849}
3850impl InvoiceActionRotRutProcessed {
3851 pub fn new(processed: DateTime) -> Self {
3852 Self {
3853 processed,
3854 action_public_id: None,
3855 processed_by: None,
3856 }
3857 }
3858}
3859
3860pub type InvoiceActionSubs = Vec<InvoiceActionSub>;
3861
3862#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3863#[serde(rename_all = "PascalCase")]
3864pub struct InvoiceActionSub {
3865 pub action_public_id: Option<String>,
3866 pub creditor_public_id: Uuid,
3867 pub debtor_public_id: Uuid,
3868 pub creditor_org_no: Option<String>,
3869 pub creditor_name: Option<String>,
3870 pub debtor_org_no: Option<String>,
3871 pub debtor_name: Option<String>,
3872 pub current_amount: Option<Amount>,
3873 pub invoiced_amount: Option<Amount>,
3874 pub stage: InvoiceActionStageType,
3875 pub action_type: ActionType,
3876 pub delivery_method: DeliveryMethodType,
3877 pub delivery_status: DeliveryStatusType,
3878 pub closed_date: Option<DateTime>,
3879 pub created: DateTime,
3880 pub invoice_sent_date: Option<DateTime>,
3881 pub reminder_invoice_sent_date: Option<DateTime>,
3882 pub attested_date: Option<DateTime>,
3883 pub next_event_date: Option<DateTime>,
3884 pub due_date: DateTime,
3885 pub invoice_date: DateTime,
3886 pub invoice_number: Option<String>,
3887 pub is_commented: bool,
3888 pub is_locked: bool,
3889 pub is_paused: bool,
3890
3891 #[serde(rename = "OCR")]
3892 pub ocr: Option<String>,
3893 pub contract_invoice_action_public_id: Option<String>,
3894 pub file: Option<File>,
3895 pub next_event: Option<String>,
3896 pub awaiting_payment_transfer_amount: Option<Amount>,
3897
3898 #[serde(rename = "TotalVATAmount")]
3899 pub total_vat_amount: Option<Amount>,
3900 pub is_disputed: bool,
3901 pub debt_collection_action_public_id: Option<String>,
3902 pub reminder_invoice_action_public_id: Option<String>,
3903 pub autogiro_withdrawal_enabled: bool,
3904 pub your_reference: Option<String>,
3905}
3906
3907pub type InvoiceActions = Vec<InvoiceAction>;
3908
3909#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
3910#[serde(rename_all = "PascalCase")]
3911pub struct InvoiceBookkeepingOverride {
3912 pub debit_account: Option<String>,
3913}
3914
3915#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3916#[serde(rename_all = "PascalCase")]
3917pub struct InvoiceDeliveryStatus {
3918 pub action_type: ActionType,
3919 pub action_public_id: Option<String>,
3920 pub delivered: bool,
3921 pub reason: Option<String>,
3922}
3923impl InvoiceDeliveryStatus {
3924 pub fn new(action_type: ActionType, delivered: bool) -> Self {
3925 Self {
3926 action_type,
3927 delivered,
3928 action_public_id: None,
3929 reason: None,
3930 }
3931 }
3932}
3933
3934#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3935#[serde(rename_all = "PascalCase")]
3936pub struct InvoicePlan {
3937 pub periods: i32,
3938 pub payment_terms_in_days: i32,
3939 pub next_invoice_date: DateTime,
3940}
3941impl InvoicePlan {
3942 pub fn new(periods: i32, payment_terms_in_days: i32, next_invoice_date: DateTime) -> Self {
3943 Self {
3944 periods,
3945 payment_terms_in_days,
3946 next_invoice_date,
3947 }
3948 }
3949}
3950
3951pub type TextRows = Vec<TextTemplate>;
3952
3953#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3954#[serde(rename_all = "PascalCase")]
3955pub struct TextTemplate {
3956 pub invoice_text_template_public_id: Uuid,
3957 pub creditor_public_id: Uuid,
3958 pub description: Option<String>,
3959}
3960impl TextTemplate {
3961 pub fn new(invoice_text_template_public_id: Uuid, creditor_public_id: Uuid) -> Self {
3962 Self {
3963 invoice_text_template_public_id,
3964 creditor_public_id,
3965 description: None,
3966 }
3967 }
3968}
3969
3970#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3971#[serde(rename_all = "PascalCase")]
3972pub struct LockedPeriod {
3973 pub creditor_public_id: Uuid,
3974 pub to: DateTime,
3975}
3976impl LockedPeriod {
3977 pub fn new(creditor_public_id: Uuid, to: DateTime) -> Self {
3978 Self {
3979 creditor_public_id,
3980 to,
3981 }
3982 }
3983}
3984
3985#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
3986#[serde(rename_all = "PascalCase")]
3987pub struct MailDelivery {
3988 pub creditor_public_id: Uuid,
3989 pub file: Option<File>,
3990
3991 #[serde(default, skip_serializing_if = "Vec::is_empty")]
3992 pub appendixes: Vec<Vec<u8>>,
3993 pub send_as_priority_mail: Option<bool>,
3994 pub send_with_color: Option<bool>,
3995 pub is_simplex: Option<bool>,
3996 pub postage_type: PostageType,
3997}
3998impl MailDelivery {
3999 pub fn new(creditor_public_id: Uuid, postage_type: PostageType) -> Self {
4000 Self {
4001 creditor_public_id,
4002 postage_type,
4003 file: None,
4004 appendixes: Vec::new(),
4005 send_as_priority_mail: None,
4006 send_with_color: None,
4007 is_simplex: None,
4008 }
4009 }
4010}
4011
4012#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4013#[serde(rename_all = "PascalCase")]
4014pub struct MonthlyAutogiroContractInvoice {
4015 pub creditor_public_id: Uuid,
4016 pub name: Option<String>,
4017 pub address: Option<String>,
4018 pub address2: Option<String>,
4019 pub zip_code: Option<String>,
4020 pub city: Option<String>,
4021 pub email: Option<String>,
4022 pub phone: Option<String>,
4023 pub debtor_external_id: Option<String>,
4024
4025 #[serde(rename = "SSN")]
4026 pub ssn: Option<String>,
4027 pub clearing_number: Option<String>,
4028 pub account_number: Option<String>,
4029 pub bank: Option<String>,
4030 pub amount: f64,
4031 pub withdrawal_day: i32,
4032 pub end_date: Option<DateTime>,
4033 pub start_date: Option<DateTime>,
4034 pub enable_automatic_reminder: bool,
4035 pub enable_automatic_debt_collection: bool,
4036}
4037impl MonthlyAutogiroContractInvoice {
4038 pub fn new(
4039 creditor_public_id: Uuid,
4040 amount: f64,
4041 withdrawal_day: i32,
4042 enable_automatic_reminder: bool,
4043 enable_automatic_debt_collection: bool,
4044 ) -> Self {
4045 Self {
4046 creditor_public_id,
4047 amount,
4048 withdrawal_day,
4049 enable_automatic_reminder,
4050 enable_automatic_debt_collection,
4051 name: None,
4052 address: None,
4053 address2: None,
4054 zip_code: None,
4055 city: None,
4056 email: None,
4057 phone: None,
4058 debtor_external_id: None,
4059 ssn: None,
4060 clearing_number: None,
4061 account_number: None,
4062 bank: None,
4063 end_date: None,
4064 start_date: None,
4065 }
4066 }
4067}
4068
4069pub type NotificationEvents = Vec<NotificationEvent>;
4070
4071#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4072#[serde(rename_all = "PascalCase")]
4073pub struct NotificationEvent {
4074 pub title: Option<String>,
4075 pub content: Option<String>,
4076 pub event_date: DateTime,
4077 pub event_by: Option<String>,
4078 pub event_type: EventType,
4079 pub creditor_public_id: Uuid,
4080 pub reference_public_id: Option<String>,
4081 pub action_type: Option<ActionType>,
4082}
4083impl NotificationEvent {
4084 pub fn new(event_date: DateTime, event_type: EventType, creditor_public_id: Uuid) -> Self {
4085 Self {
4086 event_date,
4087 event_type,
4088 creditor_public_id,
4089 title: None,
4090 content: None,
4091 event_by: None,
4092 reference_public_id: None,
4093 action_type: None,
4094 }
4095 }
4096}
4097
4098#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4099#[serde(rename_all = "PascalCase")]
4100pub struct NotificationReceiverSetting {
4101 pub creditor_public_id: Uuid,
4102 pub notification: bool,
4103 pub undelivered: bool,
4104 pub payment: bool,
4105 pub comment: bool,
4106 pub finance: bool,
4107 pub import: bool,
4108 pub technical: bool,
4109}
4110
4111pub type NotificationReceivers = Vec<NotificationReceiver>;
4112
4113#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4114#[serde(rename_all = "PascalCase")]
4115pub struct NotificationReceiver {
4116 pub email: Option<String>,
4117 pub notification_receiver_public_id: Uuid,
4118
4119 #[serde(default, skip_serializing_if = "Vec::is_empty")]
4120 pub notifications: Vec<NotificationReceiverSetting>,
4121}
4122impl NotificationReceiver {
4123 pub fn new(notification_receiver_public_id: Uuid) -> Self {
4124 Self {
4125 notification_receiver_public_id,
4126 email: None,
4127 notifications: Vec::new(),
4128 }
4129 }
4130}
4131
4132#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
4133#[serde(rename_all = "PascalCase")]
4134pub struct OpenActionRequest {
4135 #[serde(default, skip_serializing_if = "Vec::is_empty")]
4136 pub creditor_public_ids: Vec<Uuid>,
4137 pub offset: Option<i32>,
4138 pub limit: Option<i32>,
4139 pub sorting_field: Option<String>,
4140 pub asc: Option<bool>,
4141}
4142
4143#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
4144#[serde(rename_all = "PascalCase")]
4145pub struct OrderActionAddress {
4146 pub first_name: Option<String>,
4147 pub last_name: Option<String>,
4148 pub care_of: Option<String>,
4149 pub address: Option<String>,
4150 pub address2: Option<String>,
4151 pub zip_code: Option<String>,
4152 pub city: Option<String>,
4153 pub country_code: Option<String>,
4154 pub email: Option<String>,
4155 pub phone: Option<String>,
4156}
4157
4158#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
4159#[serde(rename_all = "PascalCase")]
4160pub struct OrderActionDebtor {
4161 #[serde(rename = "SSN")]
4162 pub ssn: Option<String>,
4163}
4164
4165#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4166#[serde(rename_all = "PascalCase")]
4167pub struct OrderActionEntry {
4168 pub creditor_public_id: Uuid,
4169 pub communication_language: LanguageType,
4170 pub debtor: Option<OrderActionDebtor>,
4171 pub billing_address: Option<OrderActionAddress>,
4172 pub order_total_amount: Option<Amount>,
4173 pub order_total_vat_amount: Option<Amount>,
4174
4175 #[serde(default, skip_serializing_if = "Vec::is_empty")]
4176 pub records: Vec<OrderActionRecord>,
4177 pub order_number: Option<String>,
4178 pub external_reference: Option<String>,
4179}
4180impl OrderActionEntry {
4181 pub fn new(creditor_public_id: Uuid, communication_language: LanguageType) -> Self {
4182 Self {
4183 creditor_public_id,
4184 communication_language,
4185 debtor: None,
4186 billing_address: None,
4187 order_total_amount: None,
4188 order_total_vat_amount: None,
4189 records: Vec::new(),
4190 order_number: None,
4191 external_reference: None,
4192 }
4193 }
4194}
4195
4196#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4197#[serde(rename_all = "PascalCase")]
4198pub struct OrderActionRecord {
4199 pub product_public_id: Option<Uuid>,
4200 pub article_number: Option<String>,
4201 pub article_description: Option<String>,
4202 pub quantity: i64,
4203 pub units: Option<String>,
4204
4205 #[serde(rename = "VAT")]
4206 pub vat: f64,
4207 pub unit_price: Option<Amount>,
4208 pub discount_amount: Option<Amount>,
4209 pub record_type: OrderRecordType,
4210 pub total_vat_amount: Option<Amount>,
4211 pub total_amount: Option<Amount>,
4212}
4213impl OrderActionRecord {
4214 pub fn new(quantity: i64, vat: f64, record_type: OrderRecordType) -> Self {
4215 Self {
4216 quantity,
4217 vat,
4218 record_type,
4219 product_public_id: None,
4220 article_number: None,
4221 article_description: None,
4222 units: None,
4223 unit_price: None,
4224 discount_amount: None,
4225 total_vat_amount: None,
4226 total_amount: None,
4227 }
4228 }
4229}
4230
4231#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4232#[serde(rename_all = "PascalCase")]
4233pub struct OrderActionState {
4234 pub stage: OrderStageType,
4235 pub created: DateTime,
4236 pub updated: DateTime,
4237 pub closed_date: Option<DateTime>,
4238 pub paid_date: Option<DateTime>,
4239 pub paid_by_payment_method: Option<OrderPaymentMethodType>,
4240 pub invoice_action_public_id: Option<String>,
4241}
4242impl OrderActionState {
4243 pub fn new(stage: OrderStageType, created: DateTime, updated: DateTime) -> Self {
4244 Self {
4245 stage,
4246 created,
4247 updated,
4248 closed_date: None,
4249 paid_date: None,
4250 paid_by_payment_method: None,
4251 invoice_action_public_id: None,
4252 }
4253 }
4254}
4255
4256#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4257#[serde(rename_all = "PascalCase")]
4258pub struct OrderAction {
4259 pub action_public_id: Option<String>,
4260 pub creditor_public_id: Uuid,
4261 pub communication_language: LanguageType,
4262 pub debtor: Option<OrderActionDebtor>,
4263 pub billing_address: Option<OrderActionAddress>,
4264 pub order_total_amount: Option<Amount>,
4265 pub order_total_vat_amount: Option<Amount>,
4266 pub external_reference: Option<String>,
4267 pub order_number: Option<String>,
4268 pub state: Option<OrderActionState>,
4269
4270 #[serde(default, skip_serializing_if = "Vec::is_empty")]
4271 pub records: Vec<OrderActionRecord>,
4272}
4273impl OrderAction {
4274 pub fn new(creditor_public_id: Uuid, communication_language: LanguageType) -> Self {
4275 Self {
4276 creditor_public_id,
4277 communication_language,
4278 action_public_id: None,
4279 debtor: None,
4280 billing_address: None,
4281 order_total_amount: None,
4282 order_total_vat_amount: None,
4283 external_reference: None,
4284 order_number: None,
4285 state: None,
4286 records: Vec::new(),
4287 }
4288 }
4289}
4290
4291#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4292#[serde(rename_all = "PascalCase")]
4293pub struct OrderCheckoutIntent {
4294 pub action_public_id: Option<String>,
4295 pub success_url: Option<String>,
4296 pub failure_url: Option<String>,
4297 pub css_url: Option<String>,
4298 pub language: LanguageType,
4299}
4300impl OrderCheckoutIntent {
4301 pub fn new(language: LanguageType) -> Self {
4302 Self {
4303 language,
4304 action_public_id: None,
4305 success_url: None,
4306 failure_url: None,
4307 css_url: None,
4308 }
4309 }
4310}
4311
4312#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4313#[serde(rename_all = "PascalCase")]
4314pub struct OrderCheckout {
4315 pub creditor_public_id: Uuid,
4316 pub checkout_public_id: Uuid,
4317 pub action_public_id: Option<String>,
4318 pub checkout_window_url: Option<String>,
4319 pub success_url: Option<String>,
4320 pub failure_url: Option<String>,
4321 pub css_url: Option<String>,
4322
4323 #[serde(default, skip_serializing_if = "Vec::is_empty")]
4324 pub allowed_payment_methods: Vec<OrderPaymentMethodType>,
4325 pub status: OrderCheckoutStatusType,
4326 pub created: DateTime,
4327 pub language: LanguageType,
4328}
4329impl OrderCheckout {
4330 pub fn new(
4331 creditor_public_id: Uuid,
4332 checkout_public_id: Uuid,
4333 status: OrderCheckoutStatusType,
4334 created: DateTime,
4335 language: LanguageType,
4336 ) -> Self {
4337 Self {
4338 creditor_public_id,
4339 checkout_public_id,
4340 status,
4341 created,
4342 language,
4343 action_public_id: None,
4344 checkout_window_url: None,
4345 success_url: None,
4346 failure_url: None,
4347 css_url: None,
4348 allowed_payment_methods: Vec::new(),
4349 }
4350 }
4351}
4352
4353pub type OutgoingPaymentStatuses = Vec<OutgoingPaymentStatus>;
4354
4355#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4356#[serde(rename_all = "PascalCase")]
4357pub struct OutgoingPaymentStatus {
4358 pub payment_public_id: Uuid,
4359 pub creditor_public_id: Uuid,
4360 pub sending_bankgiro_no: Option<String>,
4361 pub receiving_bankgiro_no: Option<String>,
4362 pub receiving_plusgiro_no: Option<String>,
4363 pub receiving_clearing_no: Option<String>,
4364 pub receiving_account_no: Option<String>,
4365 pub receiver_name: Option<String>,
4366 pub amount: Option<Amount>,
4367 pub is_salary_payment: bool,
4368 pub payment_date: DateTime,
4369 pub verification_date: Option<DateTime>,
4370 pub status: OutgoingPaymentStatusType,
4371 pub reference: Option<String>,
4372 pub file: Option<File>,
4373 pub comment: Option<String>,
4374}
4375impl OutgoingPaymentStatus {
4376 pub fn new(
4377 payment_public_id: Uuid,
4378 creditor_public_id: Uuid,
4379 is_salary_payment: bool,
4380 payment_date: DateTime,
4381 status: OutgoingPaymentStatusType,
4382 ) -> Self {
4383 Self {
4384 payment_public_id,
4385 creditor_public_id,
4386 is_salary_payment,
4387 payment_date,
4388 status,
4389 sending_bankgiro_no: None,
4390 receiving_bankgiro_no: None,
4391 receiving_plusgiro_no: None,
4392 receiving_clearing_no: None,
4393 receiving_account_no: None,
4394 receiver_name: None,
4395 amount: None,
4396 verification_date: None,
4397 reference: None,
4398 file: None,
4399 comment: None,
4400 }
4401 }
4402}
4403
4404#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4405#[serde(rename_all = "PascalCase")]
4406pub struct OutgoingPayment {
4407 pub creditor_public_id: Uuid,
4408 pub receiving_payment_method: ReceivingPaymentMethodType,
4409 pub sender_payment_method: Option<SupplierPaymentMethodType>,
4410 pub sending_bankgiro_no: Option<String>,
4411 pub receiving_bankgiro_no: Option<String>,
4412 pub receiving_plusgiro_no: Option<String>,
4413 pub receiving_clearing_no: Option<String>,
4414 pub receiving_account_no: Option<String>,
4415 pub receiver_name: Option<String>,
4416 pub payment_date: Option<DateTime>,
4417 pub amount: Option<Amount>,
4418 pub reference: Option<String>,
4419 pub is_salary_payment: bool,
4420 pub bank_id_reference_token: Option<Uuid>,
4421 pub payment_public_id: Uuid,
4422 pub sender_plusgiro: Option<i32>,
4423 pub outgoing_payment_type: Option<OutgoingPaymentType>,
4424 pub receiver_address: Option<String>,
4425 pub receiver_co_address: Option<String>,
4426 pub receiver_zip_code: Option<String>,
4427 pub receiver_city: Option<String>,
4428 pub transaction_file_public_id: Option<Uuid>,
4429 pub receiver_iban: Option<String>,
4430 pub receiver_bic: Option<String>,
4431 pub comment: Option<String>,
4432 pub category: P27CategoryPurposeType,
4433 pub charge_bearer: P27ChargeBearerType,
4434 pub payment_code_type: P27CodeType,
4435 pub pain_payment_method_type: P27MethodType,
4436 pub receiver_country_code: Option<String>,
4437 pub receiver_org_no: Option<String>,
4438 pub sender_org_no: Option<String>,
4439 pub sender_name: Option<String>,
4440 pub sender_bic: Option<String>,
4441 pub sender_iban: Option<String>,
4442}
4443
4444#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4445#[serde(rename_all = "PascalCase")]
4446pub struct OverpaymentDetails {
4447 pub action_type: ActionType,
4448 pub action_public_id: Option<String>,
4449 pub invoice_number: Option<String>,
4450 pub used_on_action_public_id: Option<String>,
4451}
4452impl OverpaymentDetails {
4453 pub fn new(action_type: ActionType) -> Self {
4454 Self {
4455 action_type,
4456 action_public_id: None,
4457 invoice_number: None,
4458 used_on_action_public_id: None,
4459 }
4460 }
4461}
4462
4463#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
4464#[serde(rename_all = "PascalCase")]
4465pub struct Password {
4466 pub password: Option<String>,
4467}
4468
4469#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4470#[serde(rename_all = "PascalCase")]
4471pub struct PaymentAdviceActionEntry {
4472 pub creditor_public_id: Uuid,
4473 pub debtor_public_id: Uuid,
4474 pub invoice_date: DateTime,
4475 pub due_date: DateTime,
4476 pub delivery_date: Option<DateTime>,
4477
4478 #[serde(default, skip_serializing_if = "Vec::is_empty")]
4479 pub records: Vec<InvoiceActionRecord>,
4480 pub interest_percentage: f64,
4481 pub reason_for_higher_interest: Option<String>,
4482 pub interest_start_in_days_after_due_date: i32,
4483 pub interest_type: Option<InterestType>,
4484 pub our_reference: Option<String>,
4485 pub your_reference: Option<String>,
4486 pub delivery_method: DeliveryMethodType,
4487 pub communication_language: LanguageType,
4488 pub message: Option<String>,
4489 pub invoice_number: Option<String>,
4490 pub invoice_fee: Option<Amount>,
4491 pub freight_fee: Option<Amount>,
4492 pub send_by_mail_if_email_not_viewed_in_days: Option<i32>,
4493 pub delivery_address_override: Option<DeliveryAddressOverride>,
4494 pub debt_collection_details: Option<DebtCollectionDetails>,
4495 pub reminder_invoice_details: Option<ReminderInvoiceDetails>,
4496
4497 #[serde(rename = "ReverseVATDetails")]
4498 pub reverse_vat_details: Option<ReverseVATDetails>,
4499 pub rot_rut_details: Option<RotRutDetails>,
4500 pub payment_override: Option<PaymentOverride>,
4501
4502 #[serde(default, skip_serializing_if = "Vec::is_empty")]
4503 pub attachments: Vec<InvoiceActionAttachment>,
4504 pub autogiro: Option<AutogiroWithdrawal>,
4505 pub credit_card: Option<CreditCardWithdrawal>,
4506
4507 #[serde(rename = "InvoicePDF")]
4508 pub invoice_pdf: Option<InvoiceFile>,
4509 pub crediting_invoice_public_id: Option<String>,
4510 pub external_reference: Option<String>,
4511 pub is_locked: bool,
4512 pub use_debtor_balance: bool,
4513}
4514
4515#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4516#[serde(rename_all = "PascalCase")]
4517pub struct PaymentMatch {
4518 pub unhandled_payment_public_id: Uuid,
4519 pub action_public_id: Option<String>,
4520 pub payment_date: Option<DateTime>,
4521}
4522impl PaymentMatch {
4523 pub fn new(unhandled_payment_public_id: Uuid) -> Self {
4524 Self {
4525 unhandled_payment_public_id,
4526 action_public_id: None,
4527 payment_date: None,
4528 }
4529 }
4530}
4531
4532#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4533#[serde(rename_all = "PascalCase")]
4534pub struct PaymentMatchResult {
4535 pub unhandled_payment_public_id: Uuid,
4536 pub successfull: bool,
4537 pub response_message: Option<String>,
4538}
4539impl PaymentMatchResult {
4540 pub fn new(unhandled_payment_public_id: Uuid, successfull: bool) -> Self {
4541 Self {
4542 unhandled_payment_public_id,
4543 successfull,
4544 response_message: None,
4545 }
4546 }
4547}
4548
4549pub type PeppolParticipants = Vec<PeppolParticipant>;
4550
4551#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
4552#[serde(rename_all = "PascalCase")]
4553pub struct PeppolParticipant {
4554 #[serde(rename = "ParticipantID")]
4555 pub participant_id: Option<String>,
4556 pub name: Option<String>,
4557 pub country_code: Option<String>,
4558 pub geo_info: Option<String>,
4559}
4560
4561#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4562#[serde(rename_all = "PascalCase")]
4563pub struct ProductPrice {
4564 pub product_public_id: Uuid,
4565 pub creditor_public_id: Uuid,
4566 pub amount: Option<Amount>,
4567 pub description: Option<String>,
4568}
4569impl ProductPrice {
4570 pub fn new(product_public_id: Uuid, creditor_public_id: Uuid) -> Self {
4571 Self {
4572 product_public_id,
4573 creditor_public_id,
4574 amount: None,
4575 description: None,
4576 }
4577 }
4578}
4579
4580#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4581#[serde(rename_all = "PascalCase")]
4582pub struct ProductsTemplate {
4583 pub creditor_public_id: Uuid,
4584 pub default_sales_account: Option<i32>,
4585
4586 #[serde(rename = "DefaultSalesEUAccount")]
4587 pub default_sales_eu_account: Option<i32>,
4588
4589 #[serde(rename = "DefaultSalesEUVATAccount")]
4590 pub default_sales_euvat_account: Option<i32>,
4591
4592 #[serde(rename = "DefaultSalesNonEUAccount")]
4593 pub default_sales_non_eu_account: Option<i32>,
4594
4595 #[serde(rename = "DefaultPurchaseEUAccount")]
4596 pub default_purchase_eu_account: Option<i32>,
4597
4598 #[serde(rename = "DefaultPurchaseEUVATAccount")]
4599 pub default_purchase_euvat_account: Option<i32>,
4600
4601 #[serde(rename = "DefaultPurchaseNonEUAccount")]
4602 pub default_purchase_non_eu_account: Option<i32>,
4603
4604 #[serde(rename = "DefaultSalesVAT")]
4605 pub default_sales_vat: f64,
4606 pub default_sales_units: Option<String>,
4607 pub default_purchase_account: Option<i32>,
4608
4609 #[serde(rename = "DefaultVATAccount")]
4610 pub default_vat_account: Option<i32>,
4611
4612 #[serde(rename = "DefaultPurchaseVATAccount")]
4613 pub default_purchase_vat_account: Option<i32>,
4614 pub default_product_type: ProductType,
4615}
4616impl ProductsTemplate {
4617 pub fn new(
4618 creditor_public_id: Uuid,
4619 default_sales_vat: f64,
4620 default_product_type: ProductType,
4621 ) -> Self {
4622 Self {
4623 creditor_public_id,
4624 default_sales_vat,
4625 default_product_type,
4626 default_sales_account: None,
4627 default_sales_eu_account: None,
4628 default_sales_euvat_account: None,
4629 default_sales_non_eu_account: None,
4630 default_purchase_eu_account: None,
4631 default_purchase_euvat_account: None,
4632 default_purchase_non_eu_account: None,
4633 default_sales_units: None,
4634 default_purchase_account: None,
4635 default_vat_account: None,
4636 default_purchase_vat_account: None,
4637 }
4638 }
4639}
4640
4641#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4642#[serde(rename_all = "PascalCase")]
4643pub struct Product {
4644 pub product_public_id: Uuid,
4645 pub creditor_public_id: Uuid,
4646 pub article_number: Option<String>,
4647 pub product_external_id: Option<String>,
4648 pub description: Option<String>,
4649 pub units: Option<String>,
4650 pub is_active: bool,
4651 pub unit_price: f64,
4652
4653 #[serde(rename = "VAT")]
4654 pub vat: f64,
4655 pub book_keeping_account: Option<i32>,
4656
4657 #[serde(rename = "BookKeepingSalesEUAccount")]
4658 pub book_keeping_sales_eu_account: Option<i32>,
4659
4660 #[serde(rename = "BookKeepingSalesEUVATAccount")]
4661 pub book_keeping_sales_euvat_account: Option<i32>,
4662
4663 #[serde(rename = "BookKeepingSalesNonEUAccount")]
4664 pub book_keeping_sales_non_eu_account: Option<i32>,
4665 pub book_keeping_purchase_account: Option<i32>,
4666
4667 #[serde(rename = "BookKeepingVATAccount")]
4668 pub book_keeping_vat_account: Option<i32>,
4669
4670 #[serde(rename = "BookKeepingPurchaseVATAccount")]
4671 pub book_keeping_purchase_vat_account: Option<i32>,
4672 pub product_type: ProductType,
4673 pub configuration_code: Option<String>,
4674}
4675impl Product {
4676 pub fn new(
4677 product_public_id: Uuid,
4678 creditor_public_id: Uuid,
4679 is_active: bool,
4680 unit_price: f64,
4681 vat: f64,
4682 product_type: ProductType,
4683 ) -> Self {
4684 Self {
4685 product_public_id,
4686 creditor_public_id,
4687 is_active,
4688 unit_price,
4689 vat,
4690 product_type,
4691 article_number: None,
4692 product_external_id: None,
4693 description: None,
4694 units: None,
4695 book_keeping_account: None,
4696 book_keeping_sales_eu_account: None,
4697 book_keeping_sales_euvat_account: None,
4698 book_keeping_sales_non_eu_account: None,
4699 book_keeping_purchase_account: None,
4700 book_keeping_vat_account: None,
4701 book_keeping_purchase_vat_account: None,
4702 configuration_code: None,
4703 }
4704 }
4705}
4706
4707pub type Projects = Vec<Project>;
4708
4709#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4710#[serde(rename_all = "PascalCase")]
4711pub struct Project {
4712 pub creditor_public_id: Uuid,
4713 pub project_number: Option<String>,
4714 pub description: Option<String>,
4715 pub project_leader: Option<String>,
4716 pub contact_person: Option<String>,
4717 pub comments: Option<String>,
4718 pub start_date: Option<DateTime>,
4719 pub end_date: Option<DateTime>,
4720 pub status: ProjectStatusType,
4721}
4722impl Project {
4723 pub fn new(creditor_public_id: Uuid, status: ProjectStatusType) -> Self {
4724 Self {
4725 creditor_public_id,
4726 status,
4727 project_number: None,
4728 description: None,
4729 project_leader: None,
4730 contact_person: None,
4731 comments: None,
4732 start_date: None,
4733 end_date: None,
4734 }
4735 }
4736}
4737
4738#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
4739#[serde(rename_all = "PascalCase")]
4740pub struct ReconciliationDebtor {
4741 pub debtor_no: Option<String>,
4742 pub org_no: Option<String>,
4743 pub country_code: Option<String>,
4744 pub name: Option<String>,
4745 pub email: Option<String>,
4746 pub phone: Option<String>,
4747}
4748
4749#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4750#[serde(rename_all = "PascalCase")]
4751pub struct ReconciliationInvoiceActionEntry {
4752 pub creditor_public_id: Uuid,
4753 pub debtor: Option<ReconciliationDebtor>,
4754 pub delivery_method: DeliveryMethodType,
4755 pub communication_language: LanguageType,
4756 pub external_url: Option<String>,
4757 pub invoice_number: Option<String>,
4758
4759 #[serde(rename = "OCR")]
4760 pub ocr: Option<String>,
4761 pub invoice_file: Option<File>,
4762 pub external_reference: Option<String>,
4763 pub current_amount: Option<Amount>,
4764 pub current_reminder_fees: Option<Amount>,
4765 pub send_with_color: Option<bool>,
4766 pub send_as_priority_mail: Option<bool>,
4767 pub autogiro_withdrawal_date: Option<DateTime>,
4768 pub credit_card_withdrawal_date: Option<DateTime>,
4769}
4770impl ReconciliationInvoiceActionEntry {
4771 pub fn new(
4772 creditor_public_id: Uuid,
4773 delivery_method: DeliveryMethodType,
4774 communication_language: LanguageType,
4775 ) -> Self {
4776 Self {
4777 creditor_public_id,
4778 delivery_method,
4779 communication_language,
4780 debtor: None,
4781 external_url: None,
4782 invoice_number: None,
4783 ocr: None,
4784 invoice_file: None,
4785 external_reference: None,
4786 current_amount: None,
4787 current_reminder_fees: None,
4788 send_with_color: None,
4789 send_as_priority_mail: None,
4790 autogiro_withdrawal_date: None,
4791 credit_card_withdrawal_date: None,
4792 }
4793 }
4794}
4795
4796#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4797#[serde(rename_all = "PascalCase")]
4798pub struct ReconciiationInvoiceActionEvent {
4799 pub title: Option<String>,
4800 pub content: Option<String>,
4801 pub event_date: DateTime,
4802 pub event_by: Option<String>,
4803 pub reference: Option<String>,
4804 pub event_type: EventType,
4805 pub is_public: bool,
4806 pub has_occured: bool,
4807 pub event_public_id: Uuid,
4808}
4809impl ReconciiationInvoiceActionEvent {
4810 pub fn new(
4811 event_date: DateTime,
4812 event_type: EventType,
4813 is_public: bool,
4814 has_occured: bool,
4815 event_public_id: Uuid,
4816 ) -> Self {
4817 Self {
4818 event_date,
4819 event_type,
4820 is_public,
4821 has_occured,
4822 event_public_id,
4823 title: None,
4824 content: None,
4825 event_by: None,
4826 reference: None,
4827 }
4828 }
4829}
4830
4831#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4832#[serde(rename_all = "PascalCase")]
4833pub struct ReconciliationInvoiceActionReminder {
4834 pub file: Option<File>,
4835 pub created: DateTime,
4836}
4837impl ReconciliationInvoiceActionReminder {
4838 pub fn new(created: DateTime) -> Self {
4839 Self {
4840 created,
4841 file: None,
4842 }
4843 }
4844}
4845
4846#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4847#[serde(rename_all = "PascalCase")]
4848pub struct ReconciliationInvoiceActionState {
4849 pub stage: ReconciliationInvoiceActionStageType,
4850 pub is_payed: bool,
4851 pub closed_date: Option<DateTime>,
4852 pub invoice_sent_date: Option<DateTime>,
4853 pub invoice_was_included_in_email: bool,
4854 pub credit_card_payment_public_id: Option<Uuid>,
4855 pub swish_payment_public_id: Option<String>,
4856}
4857impl ReconciliationInvoiceActionState {
4858 pub fn new(
4859 stage: ReconciliationInvoiceActionStageType,
4860 is_payed: bool,
4861 invoice_was_included_in_email: bool,
4862 ) -> Self {
4863 Self {
4864 stage,
4865 is_payed,
4866 invoice_was_included_in_email,
4867 closed_date: None,
4868 invoice_sent_date: None,
4869 credit_card_payment_public_id: None,
4870 swish_payment_public_id: None,
4871 }
4872 }
4873}
4874
4875pub type ReconciliationInvoiceActionSubs = Vec<ReconciliationInvoiceActionSub>;
4876
4877#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4878#[serde(rename_all = "PascalCase")]
4879pub struct ReconciliationInvoiceActionSub {
4880 pub action_public_id: Option<String>,
4881 pub creditor_public_id: Uuid,
4882 pub creditor_org_no: Option<String>,
4883 pub creditor_name: Option<String>,
4884 pub debtor_org_no: Option<String>,
4885 pub debtor_name: Option<String>,
4886 pub debtor_phone: Option<String>,
4887 pub debtor_debtor_no: Option<String>,
4888 pub debtor_email: Option<String>,
4889 pub current_amount: Option<Amount>,
4890 pub invoiced_amount: Option<Amount>,
4891 pub stage: ReconciliationInvoiceActionStageType,
4892 pub delivery_method: DeliveryMethodType,
4893 pub action_type: ActionType,
4894 pub closed_date: Option<DateTime>,
4895 pub created: DateTime,
4896 pub invoice_sent_date: Option<DateTime>,
4897 pub reminder_invoice_sent_date: Option<DateTime>,
4898 pub invoice_number: Option<String>,
4899
4900 #[serde(rename = "OCR")]
4901 pub ocr: Option<String>,
4902 pub invoice_file: Option<File>,
4903 pub debt_collection_action_public_id: Option<String>,
4904}
4905impl ReconciliationInvoiceActionSub {
4906 pub fn new(
4907 creditor_public_id: Uuid,
4908 stage: ReconciliationInvoiceActionStageType,
4909 delivery_method: DeliveryMethodType,
4910 action_type: ActionType,
4911 created: DateTime,
4912 ) -> Self {
4913 Self {
4914 creditor_public_id,
4915 stage,
4916 delivery_method,
4917 action_type,
4918 created,
4919 action_public_id: None,
4920 creditor_org_no: None,
4921 creditor_name: None,
4922 debtor_org_no: None,
4923 debtor_name: None,
4924 debtor_phone: None,
4925 debtor_debtor_no: None,
4926 debtor_email: None,
4927 current_amount: None,
4928 invoiced_amount: None,
4929 closed_date: None,
4930 invoice_sent_date: None,
4931 reminder_invoice_sent_date: None,
4932 invoice_number: None,
4933 ocr: None,
4934 invoice_file: None,
4935 debt_collection_action_public_id: None,
4936 }
4937 }
4938}
4939
4940pub type ReconciliationInvoiceActions = Vec<ReconciliationInvoiceAction>;
4941
4942#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
4943#[serde(rename_all = "PascalCase")]
4944pub struct ReconciliationInvoiceAction {
4945 pub action_public_id: Option<String>,
4946 pub creditor_public_id: Uuid,
4947 pub debtor: Option<ReconciliationDebtor>,
4948 pub state: Option<ReconciliationInvoiceActionState>,
4949
4950 #[serde(default, skip_serializing_if = "Vec::is_empty")]
4951 pub reminder_invoices: Vec<ReconciliationInvoiceActionReminder>,
4952 pub delivery_method: DeliveryMethodType,
4953 pub communication_language: LanguageType,
4954 pub invoice_number: Option<String>,
4955
4956 #[serde(rename = "OCR")]
4957 pub ocr: Option<String>,
4958 pub invoiced_amount: Option<Amount>,
4959 pub current_amount: Option<Amount>,
4960 pub current_reminder_fees: Option<Amount>,
4961 pub external_reference: Option<String>,
4962 pub invoice_file: Option<File>,
4963 pub external_url: Option<String>,
4964
4965 #[serde(default, skip_serializing_if = "Vec::is_empty")]
4966 pub events: Vec<ReconciiationInvoiceActionEvent>,
4967 pub created: DateTime,
4968 pub send_with_color: Option<bool>,
4969 pub send_as_priority_mail: Option<bool>,
4970 pub debt_collection_action_public_id: Option<String>,
4971 pub autogiro_withdrawal_date: Option<DateTime>,
4972 pub credit_card_withdrawal_date: Option<DateTime>,
4973}
4974impl ReconciliationInvoiceAction {
4975 pub fn new(
4976 creditor_public_id: Uuid,
4977 delivery_method: DeliveryMethodType,
4978 communication_language: LanguageType,
4979 created: DateTime,
4980 ) -> Self {
4981 Self {
4982 creditor_public_id,
4983 delivery_method,
4984 communication_language,
4985 created,
4986 action_public_id: None,
4987 debtor: None,
4988 state: None,
4989 reminder_invoices: Vec::new(),
4990 invoice_number: None,
4991 ocr: None,
4992 invoiced_amount: None,
4993 current_amount: None,
4994 current_reminder_fees: None,
4995 external_reference: None,
4996 invoice_file: None,
4997 external_url: None,
4998 events: Vec::new(),
4999 send_with_color: None,
5000 send_as_priority_mail: None,
5001 debt_collection_action_public_id: None,
5002 autogiro_withdrawal_date: None,
5003 credit_card_withdrawal_date: None,
5004 }
5005 }
5006}
5007
5008#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5009#[serde(rename_all = "PascalCase")]
5010pub struct RegisterPayment {
5011 pub action_public_id: Option<String>,
5012 pub amount: Option<Amount>,
5013 pub write_off: Option<Amount>,
5014 pub comment: Option<String>,
5015 pub date: DateTime,
5016 pub write_off_vat: f64,
5017 pub override_write_off_account: Option<String>,
5018 pub payment_mean_code: Option<String>,
5019 pub overshooting_amount_handling: RegisterPaymentOverShootingAmountHandlingType,
5020 pub payment_reference_text: Option<String>,
5021}
5022impl RegisterPayment {
5023 pub fn new(
5024 date: DateTime,
5025 write_off_vat: f64,
5026 overshooting_amount_handling: RegisterPaymentOverShootingAmountHandlingType,
5027 ) -> Self {
5028 Self {
5029 date,
5030 write_off_vat,
5031 overshooting_amount_handling,
5032 action_public_id: None,
5033 amount: None,
5034 write_off: None,
5035 comment: None,
5036 override_write_off_account: None,
5037 payment_mean_code: None,
5038 payment_reference_text: None,
5039 }
5040 }
5041}
5042
5043#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5044#[serde(rename_all = "PascalCase")]
5045pub struct RegisterReconciliationPayment {
5046 pub action_public_id: Option<String>,
5047 pub amount: Option<Amount>,
5048 pub write_off: Option<Amount>,
5049 pub comment: Option<String>,
5050 pub date: DateTime,
5051 pub write_off_vat: f64,
5052 pub payment_mean_code: Option<String>,
5053 pub amount_is_credit: bool,
5054}
5055impl RegisterReconciliationPayment {
5056 pub fn new(date: DateTime, write_off_vat: f64, amount_is_credit: bool) -> Self {
5057 Self {
5058 date,
5059 write_off_vat,
5060 amount_is_credit,
5061 action_public_id: None,
5062 amount: None,
5063 write_off: None,
5064 comment: None,
5065 payment_mean_code: None,
5066 }
5067 }
5068}
5069
5070#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5071#[serde(rename_all = "PascalCase")]
5072pub struct RegisterSelfInvoicePayment {
5073 pub action_public_id: Option<String>,
5074 pub amount: Option<Amount>,
5075 pub comment: Option<String>,
5076 pub date: DateTime,
5077 pub payment_mean_code: Option<String>,
5078}
5079impl RegisterSelfInvoicePayment {
5080 pub fn new(date: DateTime) -> Self {
5081 Self {
5082 date,
5083 action_public_id: None,
5084 amount: None,
5085 comment: None,
5086 payment_mean_code: None,
5087 }
5088 }
5089}
5090
5091#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5092#[serde(rename_all = "PascalCase")]
5093pub struct RegisterSupplierInvoicePayment {
5094 pub action_public_id: Option<String>,
5095 pub amount: Option<Amount>,
5096 pub comment: Option<String>,
5097 pub date: DateTime,
5098 pub payment_mean_code: Option<String>,
5099}
5100impl RegisterSupplierInvoicePayment {
5101 pub fn new(date: DateTime) -> Self {
5102 Self {
5103 date,
5104 action_public_id: None,
5105 amount: None,
5106 comment: None,
5107 payment_mean_code: None,
5108 }
5109 }
5110}
5111
5112#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5113#[serde(rename_all = "PascalCase")]
5114pub struct ReminderInvoiceActionInvoice {
5115 pub invoice_date: DateTime,
5116 pub due_date: DateTime,
5117 pub invoice_number: Option<String>,
5118 pub invoice_decription: Option<String>,
5119 pub payment_terms_in_days: i32,
5120 pub our_reference: Option<String>,
5121 pub your_reference: Option<String>,
5122 pub name: Option<String>,
5123 pub address: Option<String>,
5124 pub address2: Option<String>,
5125 pub zip_code: Option<String>,
5126 pub city: Option<String>,
5127 pub country_code: Option<String>,
5128 pub invoiced_amount: Option<Amount>,
5129 pub invoice_file: Option<File>,
5130
5131 #[serde(rename = "OCR")]
5132 pub ocr: Option<String>,
5133}
5134impl ReminderInvoiceActionInvoice {
5135 pub fn new(invoice_date: DateTime, due_date: DateTime, payment_terms_in_days: i32) -> Self {
5136 Self {
5137 invoice_date,
5138 due_date,
5139 payment_terms_in_days,
5140 invoice_number: None,
5141 invoice_decription: None,
5142 our_reference: None,
5143 your_reference: None,
5144 name: None,
5145 address: None,
5146 address2: None,
5147 zip_code: None,
5148 city: None,
5149 country_code: None,
5150 invoiced_amount: None,
5151 invoice_file: None,
5152 ocr: None,
5153 }
5154 }
5155}
5156
5157pub type ReminderInvoiceActionSubs = Vec<ReminderInvoiceActionSub>;
5158
5159#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5160#[serde(rename_all = "PascalCase")]
5161pub struct ReminderInvoiceActionSub {
5162 pub action_public_id: Option<String>,
5163 pub source_action_public_id: Option<String>,
5164 pub current_fee_amount: Option<Amount>,
5165 pub source_current_amount: Option<Amount>,
5166 pub source_original_amount: Option<Amount>,
5167 pub last_reminder_date: DateTime,
5168 pub last_reminder_due_date: DateTime,
5169}
5170impl ReminderInvoiceActionSub {
5171 pub fn new(last_reminder_date: DateTime, last_reminder_due_date: DateTime) -> Self {
5172 Self {
5173 last_reminder_date,
5174 last_reminder_due_date,
5175 action_public_id: None,
5176 source_action_public_id: None,
5177 current_fee_amount: None,
5178 source_current_amount: None,
5179 source_original_amount: None,
5180 }
5181 }
5182}
5183
5184pub type ReminderInvoiceActions = Vec<ReminderInvoiceAction>;
5185
5186#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5187#[serde(rename_all = "PascalCase")]
5188pub struct ReminderInvoiceAction {
5189 pub action_public_id: Option<String>,
5190 pub source_action_public_id: Option<String>,
5191 pub created: DateTime,
5192 pub closed_date: Option<DateTime>,
5193 pub stage: InvoiceActionStageType,
5194
5195 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5196 pub reminder_invoices: Vec<ReminderInvoiceActionInvoice>,
5197 pub current_value: Option<Amount>,
5198 pub reminder_fee: Option<Amount>,
5199}
5200impl ReminderInvoiceAction {
5201 pub fn new(created: DateTime, stage: InvoiceActionStageType) -> Self {
5202 Self {
5203 created,
5204 stage,
5205 action_public_id: None,
5206 source_action_public_id: None,
5207 closed_date: None,
5208 reminder_invoices: Vec::new(),
5209 current_value: None,
5210 reminder_fee: None,
5211 }
5212 }
5213}
5214
5215#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5216#[serde(rename_all = "PascalCase")]
5217pub struct RepayUnhandledPayment {
5218 pub unhandled_payment_public_id: Uuid,
5219 pub reference: Option<String>,
5220 pub receiving_account_no: Option<String>,
5221 pub receiving_clearing_no: Option<String>,
5222 pub receiver_name: Option<String>,
5223 pub receiving_bankgiro_no: Option<String>,
5224 pub receiving_plusgiro_no: Option<String>,
5225 pub receiving_iban: Option<String>,
5226 pub receiving_bic: Option<String>,
5227 pub receiving_payment_method: ReceivingPaymentMethodType,
5228 pub sender_payment_info: Option<SenderPaymentInfo>,
5229 pub sending_bankgiro_no: Option<String>,
5230 pub receiver_country_code: Option<String>,
5231}
5232impl RepayUnhandledPayment {
5233 pub fn new(
5234 unhandled_payment_public_id: Uuid,
5235 receiving_payment_method: ReceivingPaymentMethodType,
5236 ) -> Self {
5237 Self {
5238 unhandled_payment_public_id,
5239 receiving_payment_method,
5240 reference: None,
5241 receiving_account_no: None,
5242 receiving_clearing_no: None,
5243 receiver_name: None,
5244 receiving_bankgiro_no: None,
5245 receiving_plusgiro_no: None,
5246 receiving_iban: None,
5247 receiving_bic: None,
5248 sender_payment_info: None,
5249 sending_bankgiro_no: None,
5250 receiver_country_code: None,
5251 }
5252 }
5253}
5254
5255#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5256#[serde(rename_all = "PascalCase")]
5257pub struct SenderPaymentInfo {
5258 pub sender_payment_method: SupplierPaymentMethodType,
5259 pub sender_bankgiro: Option<String>,
5260 pub sender_iban: Option<String>,
5261 pub sender_plusgiro: Option<String>,
5262}
5263impl SenderPaymentInfo {
5264 pub fn new(sender_payment_method: SupplierPaymentMethodType) -> Self {
5265 Self {
5266 sender_payment_method,
5267 sender_bankgiro: None,
5268 sender_iban: None,
5269 sender_plusgiro: None,
5270 }
5271 }
5272}
5273
5274#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
5275#[serde(rename_all = "PascalCase")]
5276pub struct SearchResult {
5277 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5278 pub invoice_actions: Vec<InvoiceActionSub>,
5279
5280 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5281 pub reconciliation_invoice_actions: Vec<ReconciliationInvoiceActionSub>,
5282
5283 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5284 pub self_invoice_actions: Vec<SelfInvoiceActionSub>,
5285
5286 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5287 pub debt_collection_actions: Vec<DebtCollectionActionSub>,
5288
5289 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5290 pub installment_plan_actions: Vec<InstallmentPlanActionSub>,
5291
5292 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5293 pub contract_invoice_actions: Vec<ContractInvoiceActionSub>,
5294
5295 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5296 pub supplier_invoice_actions: Vec<SupplierInvoiceActionSub>,
5297}
5298
5299#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5300#[serde(rename_all = "PascalCase")]
5301pub struct SelfInvoiceActionSub {
5302 pub action_public_id: Option<String>,
5303 pub creditor_public_id: Uuid,
5304 pub debtor_public_id: Uuid,
5305 pub creditor_org_no: Option<String>,
5306 pub creditor_name: Option<String>,
5307 pub current_amount: Option<Amount>,
5308 pub invoiced_amount: Option<Amount>,
5309 pub stage: SelfInvoiceActionStageType,
5310 pub created: DateTime,
5311 pub closed_date: Option<DateTime>,
5312 pub debtor_org_no: Option<String>,
5313 pub debtor_name: Option<String>,
5314 pub debtor_account: Option<String>,
5315 pub action_type: ActionType,
5316 pub attested_date: Option<DateTime>,
5317 pub invoice_sent_date: Option<DateTime>,
5318 pub next_event: Option<String>,
5319 pub next_event_date: Option<DateTime>,
5320 pub due_date: DateTime,
5321 pub invoice_date: DateTime,
5322 pub invoice_number: Option<String>,
5323 pub bankgiro_no: Option<String>,
5324 pub is_commented: bool,
5325 pub is_paused: bool,
5326
5327 #[serde(rename = "OCR")]
5328 pub ocr: Option<String>,
5329 pub delivery_method: DeliveryMethodType,
5330 pub delivery_status: DeliveryStatusType,
5331 pub next_payment_date: Option<DateTime>,
5332 pub next_payment_amount: Option<Amount>,
5333
5334 #[serde(rename = "TotalVATAmount")]
5335 pub total_vat_amount: Option<Amount>,
5336 pub file: Option<File>,
5337 pub your_reference: Option<String>,
5338}
5339
5340#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5341#[serde(rename_all = "PascalCase")]
5342pub struct SupplierInvoiceActionSub {
5343 pub action_public_id: Option<String>,
5344 pub creditor_public_id: Uuid,
5345 pub supplier_public_id: Uuid,
5346 pub creditor_org_no: Option<String>,
5347 pub creditor_name: Option<String>,
5348 pub current_amount: Option<Amount>,
5349 pub invoiced_amount: Option<Amount>,
5350 pub stage: SupplierInvoiceActionStageType,
5351 pub action_type: ActionType,
5352 pub created: DateTime,
5353 pub closed_date: Option<DateTime>,
5354 pub supplier_org_no: Option<String>,
5355 pub supplier_name: Option<String>,
5356 pub attested_date: Option<DateTime>,
5357 pub next_event: Option<String>,
5358 pub next_event_date: Option<DateTime>,
5359 pub next_payment_date: Option<DateTime>,
5360 pub next_payment_amount: Option<Amount>,
5361 pub due_date: DateTime,
5362 pub invoice_date: DateTime,
5363 pub invoice_number: Option<String>,
5364 pub is_paused: bool,
5365
5366 #[serde(rename = "OCR")]
5367 pub ocr: Option<String>,
5368 pub invoice_file: Option<File>,
5369 pub origin: OriginType,
5370 pub external_source_id: Option<String>,
5371}
5372
5373#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5374#[serde(rename_all = "PascalCase")]
5375pub struct Search {
5376 pub search_value: Option<String>,
5377
5378 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5379 pub debtor_public_ids: Vec<Uuid>,
5380
5381 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5382 pub product_public_ids: Vec<Uuid>,
5383
5384 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5385 pub status: Vec<ActionSearchStatusType>,
5386
5387 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5388 pub types: Vec<ActionType>,
5389 pub rot_rut: RotRutSearchFilterType,
5390 pub creditor_public_id: Uuid,
5391 pub invoice_date_from: Option<DateTime>,
5392 pub invoice_date_to: Option<DateTime>,
5393 pub due_date_from: Option<DateTime>,
5394 pub due_date_to: Option<DateTime>,
5395 pub created_date_from: Option<DateTime>,
5396 pub created_date_to: Option<DateTime>,
5397 pub attested_date_from: Option<DateTime>,
5398 pub attested_date_to: Option<DateTime>,
5399 pub closed_date_from: Option<DateTime>,
5400 pub closed_date_to: Option<DateTime>,
5401 pub period_date_from: Option<DateTime>,
5402 pub period_date_to: Option<DateTime>,
5403 pub project: Option<String>,
5404 pub cost_center: Option<String>,
5405 pub debtor_name: Option<String>,
5406 pub debtor_external_id: Option<String>,
5407 pub org_no: Option<String>,
5408 pub product_name: Option<String>,
5409 pub product_external_id: Option<String>,
5410 pub article_number: Option<String>,
5411 pub search_on_all_creditors: Option<bool>,
5412}
5413impl Search {
5414 pub fn new(rot_rut: RotRutSearchFilterType, creditor_public_id: Uuid) -> Self {
5415 Self {
5416 rot_rut,
5417 creditor_public_id,
5418 search_value: None,
5419 debtor_public_ids: Vec::new(),
5420 product_public_ids: Vec::new(),
5421 status: Vec::new(),
5422 types: Vec::new(),
5423 invoice_date_from: None,
5424 invoice_date_to: None,
5425 due_date_from: None,
5426 due_date_to: None,
5427 created_date_from: None,
5428 created_date_to: None,
5429 attested_date_from: None,
5430 attested_date_to: None,
5431 closed_date_from: None,
5432 closed_date_to: None,
5433 period_date_from: None,
5434 period_date_to: None,
5435 project: None,
5436 cost_center: None,
5437 debtor_name: None,
5438 debtor_external_id: None,
5439 org_no: None,
5440 product_name: None,
5441 product_external_id: None,
5442 article_number: None,
5443 search_on_all_creditors: None,
5444 }
5445 }
5446}
5447
5448#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5449#[serde(rename_all = "PascalCase")]
5450pub struct SecureToken {
5451 pub value: Option<String>,
5452 pub expires: DateTime,
5453}
5454impl SecureToken {
5455 pub fn new(expires: DateTime) -> Self {
5456 Self {
5457 expires,
5458 value: None,
5459 }
5460 }
5461}
5462
5463#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5464#[serde(rename_all = "PascalCase")]
5465pub struct SelfInvoiceActionAttachment {
5466 pub file: Option<File>,
5467 pub is_cover_sheet: bool,
5468 pub sort_number: i32,
5469}
5470impl SelfInvoiceActionAttachment {
5471 pub fn new(is_cover_sheet: bool, sort_number: i32) -> Self {
5472 Self {
5473 is_cover_sheet,
5474 sort_number,
5475 file: None,
5476 }
5477 }
5478}
5479
5480#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5481#[serde(rename_all = "PascalCase")]
5482pub struct SelfInvoiceActionEntry {
5483 pub creditor_public_id: Uuid,
5484 pub debtor_public_id: Uuid,
5485 pub invoice_date: DateTime,
5486 pub due_date: DateTime,
5487 pub delivery_date: Option<DateTime>,
5488
5489 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5490 pub records: Vec<SelfInvoiceActionRecord>,
5491 pub our_reference: Option<String>,
5492 pub transfer_reference: Option<String>,
5493 pub transfer_reference_type: Option<ReferenceType>,
5494 pub your_reference: Option<String>,
5495 pub external_id: Option<String>,
5496 pub delivery_method: DeliveryMethodType,
5497 pub sender_payment_info: Option<SenderPaymentInfo>,
5498 pub communication_language: LanguageType,
5499 pub message: Option<String>,
5500
5501 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5502 pub attachments: Vec<SelfInvoiceActionAttachment>,
5503 pub crediting_self_invoice_public_id: Option<String>,
5504}
5505impl SelfInvoiceActionEntry {
5506 pub fn new(
5507 creditor_public_id: Uuid,
5508 debtor_public_id: Uuid,
5509 invoice_date: DateTime,
5510 due_date: DateTime,
5511 delivery_method: DeliveryMethodType,
5512 communication_language: LanguageType,
5513 ) -> Self {
5514 Self {
5515 creditor_public_id,
5516 debtor_public_id,
5517 invoice_date,
5518 due_date,
5519 delivery_method,
5520 communication_language,
5521 delivery_date: None,
5522 records: Vec::new(),
5523 our_reference: None,
5524 transfer_reference: None,
5525 transfer_reference_type: None,
5526 your_reference: None,
5527 external_id: None,
5528 sender_payment_info: None,
5529 message: None,
5530 attachments: Vec::new(),
5531 crediting_self_invoice_public_id: None,
5532 }
5533 }
5534}
5535
5536#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5537#[serde(rename_all = "PascalCase")]
5538pub struct SelfInvoiceActionRecord {
5539 pub product_public_id: Option<Uuid>,
5540 pub sequence_no: i32,
5541 pub units: Option<String>,
5542 pub article_description: Option<String>,
5543 pub article_number: Option<String>,
5544 pub quantity: Option<f64>,
5545 pub unit_price: Option<Amount>,
5546 pub discount_amount: Option<Amount>,
5547 pub discount_percentage: f64,
5548 pub discount_type: DiscountType,
5549
5550 #[serde(rename = "VAT")]
5551 pub vat: f64,
5552 pub record_type: RecordType,
5553 pub cost_center: Option<String>,
5554 pub project: Option<String>,
5555 pub hidden: bool,
5556
5557 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5558 pub dimensions: Vec<DimensionCode>,
5559}
5560impl SelfInvoiceActionRecord {
5561 pub fn new(
5562 sequence_no: i32,
5563 discount_percentage: f64,
5564 discount_type: DiscountType,
5565 vat: f64,
5566 record_type: RecordType,
5567 hidden: bool,
5568 ) -> Self {
5569 Self {
5570 sequence_no,
5571 discount_percentage,
5572 discount_type,
5573 vat,
5574 record_type,
5575 hidden,
5576 product_public_id: None,
5577 units: None,
5578 article_description: None,
5579 article_number: None,
5580 quantity: None,
5581 unit_price: None,
5582 discount_amount: None,
5583 cost_center: None,
5584 project: None,
5585 dimensions: Vec::new(),
5586 }
5587 }
5588}
5589
5590#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5591#[serde(rename_all = "PascalCase")]
5592pub struct SelfInvoiceActionEvent {
5593 pub title: Option<String>,
5594 pub content: Option<String>,
5595 pub event_date: DateTime,
5596 pub event_by: Option<String>,
5597 pub reference: Option<String>,
5598 pub event_type: EventType,
5599 pub is_public: bool,
5600 pub has_occured: bool,
5601 pub event_public_id: Uuid,
5602}
5603impl SelfInvoiceActionEvent {
5604 pub fn new(
5605 event_date: DateTime,
5606 event_type: EventType,
5607 is_public: bool,
5608 has_occured: bool,
5609 event_public_id: Uuid,
5610 ) -> Self {
5611 Self {
5612 event_date,
5613 event_type,
5614 is_public,
5615 has_occured,
5616 event_public_id,
5617 title: None,
5618 content: None,
5619 event_by: None,
5620 reference: None,
5621 }
5622 }
5623}
5624
5625#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5626#[serde(rename_all = "PascalCase")]
5627pub struct SelfInvoiceActionInvoice {
5628 pub invoice_date: DateTime,
5629 pub due_date: DateTime,
5630 pub invoice_number: Option<String>,
5631 pub invoice_decription: Option<String>,
5632 pub payment_terms_in_days: i32,
5633 pub our_reference: Option<String>,
5634 pub your_reference: Option<String>,
5635 pub name: Option<String>,
5636 pub address: Option<String>,
5637 pub address2: Option<String>,
5638 pub zip_code: Option<String>,
5639 pub city: Option<String>,
5640 pub country_code: Option<String>,
5641 pub invoiced_amount: Option<Amount>,
5642 pub invoice_file: Option<File>,
5643
5644 #[serde(rename = "OCR")]
5645 pub ocr: Option<String>,
5646}
5647impl SelfInvoiceActionInvoice {
5648 pub fn new(invoice_date: DateTime, due_date: DateTime, payment_terms_in_days: i32) -> Self {
5649 Self {
5650 invoice_date,
5651 due_date,
5652 payment_terms_in_days,
5653 invoice_number: None,
5654 invoice_decription: None,
5655 our_reference: None,
5656 your_reference: None,
5657 name: None,
5658 address: None,
5659 address2: None,
5660 zip_code: None,
5661 city: None,
5662 country_code: None,
5663 invoiced_amount: None,
5664 invoice_file: None,
5665 ocr: None,
5666 }
5667 }
5668}
5669
5670#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5671#[serde(rename_all = "PascalCase")]
5672pub struct SelfInvoiceActionState {
5673 pub stage: SelfInvoiceActionStageType,
5674 pub invoice_sent_date: Option<DateTime>,
5675 pub next_event_date: Option<DateTime>,
5676 pub closed_date: Option<DateTime>,
5677 pub next_event: Option<String>,
5678 pub is_paused: bool,
5679 pub attested_date: Option<DateTime>,
5680 pub paid_date: Option<DateTime>,
5681 pub next_payment_date: Option<DateTime>,
5682 pub next_payment_amount: Option<Amount>,
5683}
5684impl SelfInvoiceActionState {
5685 pub fn new(stage: SelfInvoiceActionStageType, is_paused: bool) -> Self {
5686 Self {
5687 stage,
5688 is_paused,
5689 invoice_sent_date: None,
5690 next_event_date: None,
5691 closed_date: None,
5692 next_event: None,
5693 attested_date: None,
5694 paid_date: None,
5695 next_payment_date: None,
5696 next_payment_amount: None,
5697 }
5698 }
5699}
5700
5701#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5702#[serde(rename_all = "PascalCase")]
5703pub struct SelfInvoiceAction {
5704 pub action_public_id: Option<String>,
5705 pub creditor_public_id: Uuid,
5706 pub communication_language: LanguageType,
5707 pub created: DateTime,
5708 pub delivery_method: DeliveryMethodType,
5709 pub debtor: Option<Debtor>,
5710 pub state: Option<SelfInvoiceActionState>,
5711
5712 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5713 pub invoices: Vec<SelfInvoiceActionInvoice>,
5714
5715 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5716 pub records: Vec<SelfInvoiceActionRecord>,
5717
5718 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5719 pub events: Vec<SelfInvoiceActionEvent>,
5720 pub invoice_date: DateTime,
5721 pub due_date: DateTime,
5722 pub delivery_date: Option<DateTime>,
5723 pub payment_terms_in_days: i32,
5724 pub our_reference: Option<String>,
5725 pub crediting_self_invoice_public_id: Option<String>,
5726 pub your_reference: Option<String>,
5727 pub external_id: Option<String>,
5728 pub transfer_reference: Option<String>,
5729 pub transfer_reference_type: Option<ReferenceType>,
5730 pub invoiced_amount: Option<Amount>,
5731 pub interest_amount: Option<Amount>,
5732 pub current_amount: Option<Amount>,
5733 pub credited_amount: Option<Amount>,
5734 pub paid_amount: Option<Amount>,
5735
5736 #[serde(rename = "TotalVATAmount")]
5737 pub total_vat_amount: Option<Amount>,
5738 pub message: Option<String>,
5739 pub sender_payment_info: Option<SenderPaymentInfo>,
5740
5741 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5742 pub appendixes: Vec<File>,
5743
5744 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5745 pub attachments: Vec<SelfInvoiceActionAttachment>,
5746 pub action_type: ActionType,
5747}
5748
5749#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
5750#[serde(rename_all = "PascalCase")]
5751pub struct SelfInvoicePayment {
5752 pub action_public_id: Option<String>,
5753 pub payment_date: Option<DateTime>,
5754 pub amount: Option<Amount>,
5755 pub outgoing_payment_method_type: Option<SupplierPaymentMethodType>,
5756 pub outgoing_payment_account_no: Option<String>,
5757}
5758
5759#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
5760#[serde(rename_all = "PascalCase")]
5761pub struct SendReconciliationInvoiceReminder {
5762 pub reconciliation_invoice_action_public_id: Option<String>,
5763 pub delivery_method: Option<DeliveryMethodType>,
5764 pub reminder_fee: Option<Amount>,
5765 pub reminder_file: Option<File>,
5766 pub send_with_color: Option<bool>,
5767 pub send_as_priority_mail: Option<bool>,
5768}
5769
5770#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
5771#[serde(rename_all = "PascalCase")]
5772pub struct SendReminderInvoice {
5773 pub invoice_action_public_id: Option<String>,
5774 pub delivery_method: Option<DeliveryMethodType>,
5775 pub reminder_fee: Option<Amount>,
5776 pub stream: Option<Vec<u8>>,
5777 pub url: Option<String>,
5778 pub payment_terms_in_days: Option<i32>,
5779}
5780
5781#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5782#[serde(rename_all = "PascalCase")]
5783pub struct SmsDelivery {
5784 pub creditor_public_id: Uuid,
5785 pub receiver_phone: Option<String>,
5786 pub message: Option<String>,
5787 pub country_code: Option<String>,
5788}
5789impl SmsDelivery {
5790 pub fn new(creditor_public_id: Uuid) -> Self {
5791 Self {
5792 creditor_public_id,
5793 receiver_phone: None,
5794 message: None,
5795 country_code: None,
5796 }
5797 }
5798}
5799
5800#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
5801#[serde(rename_all = "PascalCase")]
5802pub struct Stream {
5803 pub data: Option<Vec<u8>>,
5804}
5805
5806#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
5807#[serde(rename_all = "PascalCase")]
5808pub struct SwishPaymentIntent {
5809 pub action_public_id: Option<String>,
5810 pub success_url: Option<String>,
5811 pub failure_url: Option<String>,
5812}
5813
5814#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5815#[serde(rename_all = "PascalCase")]
5816pub struct SwishPaymentStatus {
5817 pub payment_request_token: Option<String>,
5818 pub status: SwishStatusType,
5819 pub paid_date: Option<DateTime>,
5820 pub created: DateTime,
5821 pub amount: Option<Amount>,
5822 pub refunded_amount: Option<Amount>,
5823 pub error_message: Option<String>,
5824 pub error_code: Option<String>,
5825}
5826impl SwishPaymentStatus {
5827 pub fn new(status: SwishStatusType, created: DateTime) -> Self {
5828 Self {
5829 status,
5830 created,
5831 payment_request_token: None,
5832 paid_date: None,
5833 amount: None,
5834 refunded_amount: None,
5835 error_message: None,
5836 error_code: None,
5837 }
5838 }
5839}
5840
5841#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
5842#[serde(rename_all = "PascalCase")]
5843pub struct SwishRefundPayment {
5844 pub payment_public_id: Option<String>,
5845 pub amount: Option<Amount>,
5846}
5847
5848#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5849#[serde(rename_all = "PascalCase")]
5850pub struct SwishSettings {
5851 pub creditor_public_id: Uuid,
5852 pub certificate: Option<File>,
5853 pub password: Option<String>,
5854 pub phone_number: Option<String>,
5855 pub activation_policy: ActivationPolicyType,
5856
5857 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5858 pub activation_exceptions: Vec<String>,
5859 pub bookkeep_payments_next_bank_day_on_non_bank_day: bool,
5860 pub not_before: DateTime,
5861 pub not_after: DateTime,
5862}
5863impl SwishSettings {
5864 pub fn new(
5865 creditor_public_id: Uuid,
5866 activation_policy: ActivationPolicyType,
5867 bookkeep_payments_next_bank_day_on_non_bank_day: bool,
5868 not_before: DateTime,
5869 not_after: DateTime,
5870 ) -> Self {
5871 Self {
5872 creditor_public_id,
5873 activation_policy,
5874 bookkeep_payments_next_bank_day_on_non_bank_day,
5875 not_before,
5876 not_after,
5877 certificate: None,
5878 password: None,
5879 phone_number: None,
5880 activation_exceptions: Vec::new(),
5881 }
5882 }
5883}
5884
5885#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
5886#[serde(rename_all = "PascalCase")]
5887pub struct TwoFactorBankId {
5888 pub user_claims: Option<UserClaims>,
5889 pub bank_id_authentication_status: Option<BankIdAuthenticationStatus>,
5890}
5891
5892#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
5893#[serde(rename_all = "PascalCase")]
5894pub struct UserClaims {
5895 pub user: Option<User>,
5896 pub client_config: Option<ClientConfig>,
5897 pub secure_token: Option<SecureToken>,
5898}
5899
5900#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5901#[serde(rename_all = "PascalCase")]
5902pub struct User {
5903 pub username: Option<String>,
5904 pub email: Option<String>,
5905 pub user_public_id: Uuid,
5906 pub full_name: Option<String>,
5907 pub org_no: Option<String>,
5908 pub language: LanguageType,
5909 pub password_expired: bool,
5910 pub password_never_expires: bool,
5911 pub password: Option<String>,
5912 pub is_enabled: bool,
5913
5914 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5915 pub rights: Vec<UserRight>,
5916 pub is_administrator: bool,
5917 pub is_api_user: bool,
5918 pub can_manage_creditors: bool,
5919 pub hide_select_creditor_dialog: bool,
5920 pub hide_system_updates: bool,
5921 pub hide_lookup_dialog: bool,
5922 pub active_creditor_public_id: Option<Uuid>,
5923 pub last_login: Option<DateTime>,
5924 pub created: DateTime,
5925 pub has_accepted_agreements: bool,
5926 pub receive_system_update_notification: bool,
5927 pub two_factor_bank_id_auth_enabled: bool,
5928}
5929
5930#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5931#[serde(rename_all = "PascalCase")]
5932pub struct UserRight {
5933 pub creditor_public_id: Uuid,
5934 pub can_read_creditor: bool,
5935 pub include_creditor_on_start_page: bool,
5936 pub can_write_creditor: bool,
5937 pub can_attest_invoice: bool,
5938 pub can_manage_invoice_payments: bool,
5939 pub can_sell_invoice: bool,
5940 pub can_sales_finance: bool,
5941 pub can_attest_supplier_invoice: bool,
5942 pub can_pay_supplier_invoice: bool,
5943 pub can_manage_invoices: bool,
5944 pub can_manage_debt_collections: bool,
5945 pub can_manage_self_invoices: bool,
5946 pub can_manage_self_invoice_debtor_infoes: bool,
5947 pub can_manage_supplier_invoices: bool,
5948 pub can_manage_finances: bool,
5949 pub can_read_settings: bool,
5950 pub can_read_bookkeeping: bool,
5951}
5952
5953pub type UnhandledPayments = Vec<UnhandledPayment>;
5954
5955#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
5956#[serde(rename_all = "PascalCase")]
5957pub struct UnhandledPayment {
5958 pub creditor_public_id: Uuid,
5959 pub unhandled_payment_public_id: Uuid,
5960 pub creditor_name: Option<String>,
5961 pub sender_name: Option<String>,
5962 pub sender_address: Option<String>,
5963 pub sender_zip_code: Option<String>,
5964 pub sender_city: Option<String>,
5965 pub sender_country_code: Option<String>,
5966 pub sender_org_no: Option<String>,
5967 pub sender_bankgiro_no: Option<String>,
5968 pub debtor_public_id: Option<Uuid>,
5969 pub amount: Option<Amount>,
5970 pub payment_date: DateTime,
5971 pub reference: Option<String>,
5972 pub created_by: Option<String>,
5973 pub unhandled_payment_type: UnhandledPaymentType,
5974 pub overpayment_details: Option<OverpaymentDetails>,
5975
5976 #[serde(default, skip_serializing_if = "Vec::is_empty")]
5977 pub additional_informations: Vec<String>,
5978 pub state: UnhandledPaymentStateType,
5979}
5980impl UnhandledPayment {
5981 pub fn new(
5982 creditor_public_id: Uuid,
5983 unhandled_payment_public_id: Uuid,
5984 payment_date: DateTime,
5985 unhandled_payment_type: UnhandledPaymentType,
5986 state: UnhandledPaymentStateType,
5987 ) -> Self {
5988 Self {
5989 creditor_public_id,
5990 unhandled_payment_public_id,
5991 payment_date,
5992 unhandled_payment_type,
5993 state,
5994 creditor_name: None,
5995 sender_name: None,
5996 sender_address: None,
5997 sender_zip_code: None,
5998 sender_city: None,
5999 sender_country_code: None,
6000 sender_org_no: None,
6001 sender_bankgiro_no: None,
6002 debtor_public_id: None,
6003 amount: None,
6004 reference: None,
6005 created_by: None,
6006 overpayment_details: None,
6007 additional_informations: Vec::new(),
6008 }
6009 }
6010}
6011
6012#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
6013#[serde(rename_all = "PascalCase")]
6014pub struct UpdateAddressAction {
6015 pub action_public_id: Option<String>,
6016 pub name: Option<String>,
6017 pub attention: Option<String>,
6018 pub care_of: Option<String>,
6019 pub address: Option<String>,
6020 pub address2: Option<String>,
6021 pub zip_code: Option<String>,
6022 pub email: Option<String>,
6023 pub city: Option<String>,
6024 pub phone: Option<String>,
6025 pub org_no: Option<String>,
6026
6027 #[serde(rename = "GLN")]
6028 pub gln: Option<String>,
6029 pub intermediator: Option<IntermediatorType>,
6030}
6031
6032pub type UserSubscribedInvoices = Vec<UserSubscribedInvoice>;
6033
6034#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
6035#[serde(rename_all = "PascalCase")]
6036pub struct UserSubscribedInvoice {
6037 pub user_public_id: Uuid,
6038 pub action_public_id: Option<String>,
6039}
6040impl UserSubscribedInvoice {
6041 pub fn new(user_public_id: Uuid) -> Self {
6042 Self {
6043 user_public_id,
6044 action_public_id: None,
6045 }
6046 }
6047}
6048
6049pub type Users = Vec<User>;
6050
6051#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
6052#[serde(rename_all = "PascalCase")]
6053pub struct VerificationInvoiceActionEntry {
6054 pub creditor_public_id: Uuid,
6055 pub debtor_public_id: Uuid,
6056 pub invoice_date: DateTime,
6057 pub due_date: DateTime,
6058 pub delivery_date: Option<DateTime>,
6059
6060 #[serde(default, skip_serializing_if = "Vec::is_empty")]
6061 pub records: Vec<InvoiceActionRecord>,
6062 pub our_reference: Option<String>,
6063 pub your_reference: Option<String>,
6064 pub communication_language: LanguageType,
6065 pub message: Option<String>,
6066 pub invoice_number: Option<String>,
6067 pub bookkeeping_override: Option<InvoiceBookkeepingOverride>,
6068 pub payment_override: Option<PaymentOverride>,
6069 pub external_reference: Option<String>,
6070}
6071impl VerificationInvoiceActionEntry {
6072 pub fn new(
6073 creditor_public_id: Uuid,
6074 debtor_public_id: Uuid,
6075 invoice_date: DateTime,
6076 due_date: DateTime,
6077 communication_language: LanguageType,
6078 ) -> Self {
6079 Self {
6080 creditor_public_id,
6081 debtor_public_id,
6082 invoice_date,
6083 due_date,
6084 communication_language,
6085 delivery_date: None,
6086 records: Vec::new(),
6087 our_reference: None,
6088 your_reference: None,
6089 message: None,
6090 invoice_number: None,
6091 bookkeeping_override: None,
6092 payment_override: None,
6093 external_reference: None,
6094 }
6095 }
6096}
6097
6098#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
6099#[serde(rename_all = "PascalCase")]
6100pub struct WebhookCreditorShare {
6101 pub shared_by_user_name: Option<String>,
6102 pub creditor_public_id: Uuid,
6103 pub target: CreditorShareTargetType,
6104 pub can_attest_invoice: bool,
6105 pub can_manage_invoice_payments: bool,
6106 pub can_write_creditor: bool,
6107 pub can_attest_supplier_invoice: bool,
6108 pub can_pay_supplier_invoice: bool,
6109}
6110impl WebhookCreditorShare {
6111 pub fn new(
6112 creditor_public_id: Uuid,
6113 target: CreditorShareTargetType,
6114 can_attest_invoice: bool,
6115 can_manage_invoice_payments: bool,
6116 can_write_creditor: bool,
6117 can_attest_supplier_invoice: bool,
6118 can_pay_supplier_invoice: bool,
6119 ) -> Self {
6120 Self {
6121 creditor_public_id,
6122 target,
6123 can_attest_invoice,
6124 can_manage_invoice_payments,
6125 can_write_creditor,
6126 can_attest_supplier_invoice,
6127 can_pay_supplier_invoice,
6128 shared_by_user_name: None,
6129 }
6130 }
6131}
6132
6133#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
6134#[serde(rename_all = "PascalCase")]
6135pub struct WebhookHeader {
6136 pub name: Option<String>,
6137 pub value: Option<String>,
6138}
6139
6140#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
6141#[serde(rename_all = "PascalCase")]
6142pub struct WebhookSetting {
6143 #[serde(rename = "URL")]
6144 pub url: Option<String>,
6145
6146 #[serde(default, skip_serializing_if = "Vec::is_empty")]
6147 pub webhook_triggers: Vec<WebhookTrigger>,
6148
6149 #[serde(default, skip_serializing_if = "Vec::is_empty")]
6150 pub headers: Vec<WebhookHeader>,
6151}
6152
6153#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
6154#[serde(rename_all = "PascalCase")]
6155pub struct WebhookTrigger {
6156 pub webhook_trigger_type: WebhookTriggerType,
6157}
6158impl WebhookTrigger {
6159 pub fn new(webhook_trigger_type: WebhookTriggerType) -> Self {
6160 Self {
6161 webhook_trigger_type,
6162 }
6163 }
6164}
6165
6166#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
6167#[serde(rename_all = "PascalCase")]
6168pub struct YearlyAutogiroContractInvoice {
6169 pub creditor_public_id: Uuid,
6170 pub name: Option<String>,
6171 pub address: Option<String>,
6172 pub address2: Option<String>,
6173 pub zip_code: Option<String>,
6174 pub city: Option<String>,
6175 pub email: Option<String>,
6176 pub phone: Option<String>,
6177 pub debtor_external_id: Option<String>,
6178
6179 #[serde(rename = "SSN")]
6180 pub ssn: Option<String>,
6181 pub clearing_number: Option<String>,
6182 pub account_number: Option<String>,
6183 pub bank: Option<String>,
6184 pub amount: f64,
6185 pub withdrawal_day: i32,
6186 pub withdrawal_month: i32,
6187 pub end_date: Option<DateTime>,
6188 pub start_date: Option<DateTime>,
6189 pub enable_automatic_reminder: bool,
6190 pub enable_automatic_debt_collection: bool,
6191}
6192impl YearlyAutogiroContractInvoice {
6193 pub fn new(
6194 creditor_public_id: Uuid,
6195 amount: f64,
6196 withdrawal_day: i32,
6197 withdrawal_month: i32,
6198 enable_automatic_reminder: bool,
6199 enable_automatic_debt_collection: bool,
6200 ) -> Self {
6201 Self {
6202 creditor_public_id,
6203 amount,
6204 withdrawal_day,
6205 withdrawal_month,
6206 enable_automatic_reminder,
6207 enable_automatic_debt_collection,
6208 name: None,
6209 address: None,
6210 address2: None,
6211 zip_code: None,
6212 city: None,
6213 email: None,
6214 phone: None,
6215 debtor_external_id: None,
6216 ssn: None,
6217 clearing_number: None,
6218 account_number: None,
6219 bank: None,
6220 end_date: None,
6221 start_date: None,
6222 }
6223 }
6224}
6225
6226#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6227pub enum AccountingRecordType {
6228 ProductSales,
6229 #[serde(rename = "ProductSalesWithReverseVAT")]
6230 ProductSalesWithReverseVat,
6231 RotRutDiscount,
6232 PaymentToBankAccount,
6233 OverPaymentToBankAccount,
6234 CentRounding,
6235 Interest,
6236 #[serde(rename = "ProductSalesEU")]
6237 ProductSalesEu,
6238 #[serde(rename = "ProductSalesEUVAT")]
6239 ProductSalesEuvat,
6240 #[serde(rename = "ProductSalesNonEU")]
6241 ProductSalesNonEu,
6242 SupplierPaymentFromBankAccount,
6243 SupplierPurchaseDebt,
6244 #[serde(rename = "SupplierPurchaseEU")]
6245 SupplierPurchaseEu,
6246 #[serde(rename = "SupplierPurchaseEUVAT")]
6247 SupplierPurchaseEuvat,
6248 #[serde(rename = "SupplierPurchaseNonEU")]
6249 SupplierPurchaseNonEu,
6250 CurrencyDifference,
6251 FinanceCostNoRecourse,
6252 SelfInvoiceDebt,
6253 #[serde(rename = "SelfInvoiceDebtVAT")]
6254 SelfInvoiceDebtVat,
6255 SelfInvoicePaymentFromBankAccount,
6256 SelfInvoiceCreditation,
6257 InvoiceSalesDebtRemoved,
6258 WriteOff,
6259 ReminderCostPayment,
6260 Accrual,
6261 AdminsitrationCost,
6262 InvoiceSalesDebtAdded,
6263 #[serde(rename = "RestingVAT")]
6264 RestingVat,
6265 FreightCost,
6266 OverPaymentDeleted,
6267 UnmatchedPaymentToBankAccount,
6268 UnmatchedPaymentDeleted,
6269 FinanceCostWithRecourse,
6270 ClientFundDebt,
6271 NonPerformingLoanPurchase,
6272 PurchasedNonPerformingLoanPayment,
6273 ManualBalanceDeleted,
6274 BalanceFromInvoiceDeleted,
6275 DebtCollectionPaymentFee,
6276 ProductSalesWithAdviceMethod,
6277 BankAndTransactionCost,
6278 RevenueBalance,
6279 #[serde(other)]
6280 #[serde(rename = "unknown")]
6281 Unknown,
6282}
6283impl AccountingRecordType {
6284 pub fn as_str(&self) -> &'static str {
6285 match *self {
6286 Self::ProductSales => "ProductSales",
6287 Self::ProductSalesWithReverseVat => "ProductSalesWithReverseVAT",
6288 Self::RotRutDiscount => "RotRutDiscount",
6289 Self::PaymentToBankAccount => "PaymentToBankAccount",
6290 Self::OverPaymentToBankAccount => "OverPaymentToBankAccount",
6291 Self::CentRounding => "CentRounding",
6292 Self::Interest => "Interest",
6293 Self::ProductSalesEu => "ProductSalesEU",
6294 Self::ProductSalesEuvat => "ProductSalesEUVAT",
6295 Self::ProductSalesNonEu => "ProductSalesNonEU",
6296 Self::SupplierPaymentFromBankAccount => "SupplierPaymentFromBankAccount",
6297 Self::SupplierPurchaseDebt => "SupplierPurchaseDebt",
6298 Self::SupplierPurchaseEu => "SupplierPurchaseEU",
6299 Self::SupplierPurchaseEuvat => "SupplierPurchaseEUVAT",
6300 Self::SupplierPurchaseNonEu => "SupplierPurchaseNonEU",
6301 Self::CurrencyDifference => "CurrencyDifference",
6302 Self::FinanceCostNoRecourse => "FinanceCostNoRecourse",
6303 Self::SelfInvoiceDebt => "SelfInvoiceDebt",
6304 Self::SelfInvoiceDebtVat => "SelfInvoiceDebtVAT",
6305 Self::SelfInvoicePaymentFromBankAccount => "SelfInvoicePaymentFromBankAccount",
6306 Self::SelfInvoiceCreditation => "SelfInvoiceCreditation",
6307 Self::InvoiceSalesDebtRemoved => "InvoiceSalesDebtRemoved",
6308 Self::WriteOff => "WriteOff",
6309 Self::ReminderCostPayment => "ReminderCostPayment",
6310 Self::Accrual => "Accrual",
6311 Self::AdminsitrationCost => "AdminsitrationCost",
6312 Self::InvoiceSalesDebtAdded => "InvoiceSalesDebtAdded",
6313 Self::RestingVat => "RestingVAT",
6314 Self::FreightCost => "FreightCost",
6315 Self::OverPaymentDeleted => "OverPaymentDeleted",
6316 Self::UnmatchedPaymentToBankAccount => "UnmatchedPaymentToBankAccount",
6317 Self::UnmatchedPaymentDeleted => "UnmatchedPaymentDeleted",
6318 Self::FinanceCostWithRecourse => "FinanceCostWithRecourse",
6319 Self::ClientFundDebt => "ClientFundDebt",
6320 Self::NonPerformingLoanPurchase => "NonPerformingLoanPurchase",
6321 Self::PurchasedNonPerformingLoanPayment => "PurchasedNonPerformingLoanPayment",
6322 Self::ManualBalanceDeleted => "ManualBalanceDeleted",
6323 Self::BalanceFromInvoiceDeleted => "BalanceFromInvoiceDeleted",
6324 Self::DebtCollectionPaymentFee => "DebtCollectionPaymentFee",
6325 Self::ProductSalesWithAdviceMethod => "ProductSalesWithAdviceMethod",
6326 Self::BankAndTransactionCost => "BankAndTransactionCost",
6327 Self::RevenueBalance => "RevenueBalance",
6328 Self::Unknown => "unknown",
6329 }
6330 }
6331}
6332impl crate::AsPathParam for AccountingRecordType {
6333 fn push_to(&self, buf: &mut String) {
6334 buf.push_str(self.as_str());
6335 }
6336}
6337
6338#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6339pub enum AccountingExportDateSelectionType {
6340 EventDate,
6341 TransactionDate,
6342 #[serde(other)]
6343 #[serde(rename = "unknown")]
6344 Unknown,
6345}
6346impl AccountingExportDateSelectionType {
6347 pub fn as_str(&self) -> &'static str {
6348 match *self {
6349 Self::EventDate => "EventDate",
6350 Self::TransactionDate => "TransactionDate",
6351 Self::Unknown => "unknown",
6352 }
6353 }
6354}
6355impl crate::AsPathParam for AccountingExportDateSelectionType {
6356 fn push_to(&self, buf: &mut String) {
6357 buf.push_str(self.as_str());
6358 }
6359}
6360
6361#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6362pub enum AccountingExportFormatType {
6363 #[serde(rename = "SIE4")]
6364 Sie4,
6365 #[serde(rename = "CSV")]
6366 Csv,
6367 #[serde(other)]
6368 #[serde(rename = "unknown")]
6369 Unknown,
6370}
6371impl AccountingExportFormatType {
6372 pub fn as_str(&self) -> &'static str {
6373 match *self {
6374 Self::Sie4 => "SIE4",
6375 Self::Csv => "CSV",
6376 Self::Unknown => "unknown",
6377 }
6378 }
6379}
6380impl crate::AsPathParam for AccountingExportFormatType {
6381 fn push_to(&self, buf: &mut String) {
6382 buf.push_str(self.as_str());
6383 }
6384}
6385
6386#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6387pub enum AccountingSettingsAccountType {
6388 AdministrationCostAccount,
6389 FreightCostAccount,
6390 TradeDebtsAccount,
6391 TradeDebtsTaxReductionAccount,
6392 ShortTermDebtsAccount,
6393 CustomerAdvancedPaymentsAccount,
6394 UnmatchedPaymentsAccount,
6395 #[serde(rename = "VATAccount")]
6396 VatAccount,
6397 RoundingAccount,
6398 InterestAccount,
6399 FinancialCostsAccount,
6400 FinancialInstituteDebtAccount,
6401 SalesWithRotRutAccount,
6402 #[serde(rename = "SalesWithReverseVATAccount")]
6403 SalesWithReverseVatAccount,
6404 AccrualAccount,
6405 RevenueCorrectionAccount,
6406 AccountPayablesAccount,
6407 #[serde(rename = "IncomingVATAccount")]
6408 IncomingVatAccount,
6409 #[serde(rename = "RestingVATAccount")]
6410 RestingVatAccount,
6411 CurrencyDifferenceLossesAccount,
6412 CurrencyDifferenceGainsAccount,
6413 WriteOffAccount,
6414 OtherOperatingIncomeAccount,
6415 BankAndTransactionCostAccount,
6416 RevenueBalanceDebitBookingAccount,
6417 RevenueBalanceCreditBookingAccount,
6418 #[serde(other)]
6419 #[serde(rename = "unknown")]
6420 Unknown,
6421}
6422impl AccountingSettingsAccountType {
6423 pub fn as_str(&self) -> &'static str {
6424 match *self {
6425 Self::AdministrationCostAccount => "AdministrationCostAccount",
6426 Self::FreightCostAccount => "FreightCostAccount",
6427 Self::TradeDebtsAccount => "TradeDebtsAccount",
6428 Self::TradeDebtsTaxReductionAccount => "TradeDebtsTaxReductionAccount",
6429 Self::ShortTermDebtsAccount => "ShortTermDebtsAccount",
6430 Self::CustomerAdvancedPaymentsAccount => "CustomerAdvancedPaymentsAccount",
6431 Self::UnmatchedPaymentsAccount => "UnmatchedPaymentsAccount",
6432 Self::VatAccount => "VATAccount",
6433 Self::RoundingAccount => "RoundingAccount",
6434 Self::InterestAccount => "InterestAccount",
6435 Self::FinancialCostsAccount => "FinancialCostsAccount",
6436 Self::FinancialInstituteDebtAccount => "FinancialInstituteDebtAccount",
6437 Self::SalesWithRotRutAccount => "SalesWithRotRutAccount",
6438 Self::SalesWithReverseVatAccount => "SalesWithReverseVATAccount",
6439 Self::AccrualAccount => "AccrualAccount",
6440 Self::RevenueCorrectionAccount => "RevenueCorrectionAccount",
6441 Self::AccountPayablesAccount => "AccountPayablesAccount",
6442 Self::IncomingVatAccount => "IncomingVATAccount",
6443 Self::RestingVatAccount => "RestingVATAccount",
6444 Self::CurrencyDifferenceLossesAccount => "CurrencyDifferenceLossesAccount",
6445 Self::CurrencyDifferenceGainsAccount => "CurrencyDifferenceGainsAccount",
6446 Self::WriteOffAccount => "WriteOffAccount",
6447 Self::OtherOperatingIncomeAccount => "OtherOperatingIncomeAccount",
6448 Self::BankAndTransactionCostAccount => "BankAndTransactionCostAccount",
6449 Self::RevenueBalanceDebitBookingAccount => "RevenueBalanceDebitBookingAccount",
6450 Self::RevenueBalanceCreditBookingAccount => "RevenueBalanceCreditBookingAccount",
6451 Self::Unknown => "unknown",
6452 }
6453 }
6454}
6455impl crate::AsPathParam for AccountingSettingsAccountType {
6456 fn push_to(&self, buf: &mut String) {
6457 buf.push_str(self.as_str());
6458 }
6459}
6460
6461#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6462pub enum SieKPTYPType {
6463 #[serde(rename = "BAS95")]
6464 Bas95,
6465 #[serde(rename = "BAS96")]
6466 Bas96,
6467 #[serde(rename = "EUBAS97")]
6468 Eubas97,
6469 #[serde(rename = "NE2007")]
6470 Ne2007,
6471 #[serde(other)]
6472 #[serde(rename = "unknown")]
6473 Unknown,
6474}
6475impl SieKPTYPType {
6476 pub fn as_str(&self) -> &'static str {
6477 match *self {
6478 Self::Bas95 => "BAS95",
6479 Self::Bas96 => "BAS96",
6480 Self::Eubas97 => "EUBAS97",
6481 Self::Ne2007 => "NE2007",
6482 Self::Unknown => "unknown",
6483 }
6484 }
6485}
6486impl crate::AsPathParam for SieKPTYPType {
6487 fn push_to(&self, buf: &mut String) {
6488 buf.push_str(self.as_str());
6489 }
6490}
6491
6492#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6493pub enum FiscalYearType {
6494 CalendarYear,
6495 FebToJan,
6496 MarToFeb,
6497 AprToMar,
6498 MayToApr,
6499 JunToMay,
6500 JulToJun,
6501 AugToJul,
6502 SepToAug,
6503 OctToSep,
6504 NovToOct,
6505 DecToNov,
6506 #[serde(other)]
6507 #[serde(rename = "unknown")]
6508 Unknown,
6509}
6510impl FiscalYearType {
6511 pub fn as_str(&self) -> &'static str {
6512 match *self {
6513 Self::CalendarYear => "CalendarYear",
6514 Self::FebToJan => "FebToJan",
6515 Self::MarToFeb => "MarToFeb",
6516 Self::AprToMar => "AprToMar",
6517 Self::MayToApr => "MayToApr",
6518 Self::JunToMay => "JunToMay",
6519 Self::JulToJun => "JulToJun",
6520 Self::AugToJul => "AugToJul",
6521 Self::SepToAug => "SepToAug",
6522 Self::OctToSep => "OctToSep",
6523 Self::NovToOct => "NovToOct",
6524 Self::DecToNov => "DecToNov",
6525 Self::Unknown => "unknown",
6526 }
6527 }
6528}
6529impl crate::AsPathParam for FiscalYearType {
6530 fn push_to(&self, buf: &mut String) {
6531 buf.push_str(self.as_str());
6532 }
6533}
6534
6535#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6536pub enum BookKeepingMethod {
6537 InvoiceMethod,
6538 CashMethod,
6539 #[serde(other)]
6540 #[serde(rename = "unknown")]
6541 Unknown,
6542}
6543impl BookKeepingMethod {
6544 pub fn as_str(&self) -> &'static str {
6545 match *self {
6546 Self::InvoiceMethod => "InvoiceMethod",
6547 Self::CashMethod => "CashMethod",
6548 Self::Unknown => "unknown",
6549 }
6550 }
6551}
6552impl crate::AsPathParam for BookKeepingMethod {
6553 fn push_to(&self, buf: &mut String) {
6554 buf.push_str(self.as_str());
6555 }
6556}
6557
6558#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6559pub enum AutogiroPaymentStatusType {
6560 Pending,
6561 Succeeded,
6562 Failed,
6563 #[serde(other)]
6564 #[serde(rename = "unknown")]
6565 Unknown,
6566}
6567impl AutogiroPaymentStatusType {
6568 pub fn as_str(&self) -> &'static str {
6569 match *self {
6570 Self::Pending => "Pending",
6571 Self::Succeeded => "Succeeded",
6572 Self::Failed => "Failed",
6573 Self::Unknown => "unknown",
6574 }
6575 }
6576}
6577impl crate::AsPathParam for AutogiroPaymentStatusType {
6578 fn push_to(&self, buf: &mut String) {
6579 buf.push_str(self.as_str());
6580 }
6581}
6582
6583#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6584pub enum BankAccountBankType {
6585 #[serde(rename = "OEB")]
6586 Oeb,
6587 #[serde(rename = "SHB")]
6588 Shb,
6589 #[serde(rename = "ICA")]
6590 Ica,
6591 #[serde(rename = "LFB")]
6592 Lfb,
6593 #[serde(rename = "NB")]
6594 Nb,
6595 #[serde(rename = "SBAB")]
6596 Sbab,
6597 #[serde(rename = "SEB")]
6598 Seb,
6599 #[serde(rename = "SKB")]
6600 Skb,
6601 #[serde(rename = "SYD")]
6602 Syd,
6603 #[serde(rename = "FSPA")]
6604 Fspa,
6605 #[serde(rename = "FSPASB")]
6606 Fspasb,
6607 #[serde(other)]
6608 #[serde(rename = "unknown")]
6609 Unknown,
6610}
6611impl BankAccountBankType {
6612 pub fn as_str(&self) -> &'static str {
6613 match *self {
6614 Self::Oeb => "OEB",
6615 Self::Shb => "SHB",
6616 Self::Ica => "ICA",
6617 Self::Lfb => "LFB",
6618 Self::Nb => "NB",
6619 Self::Sbab => "SBAB",
6620 Self::Seb => "SEB",
6621 Self::Skb => "SKB",
6622 Self::Syd => "SYD",
6623 Self::Fspa => "FSPA",
6624 Self::Fspasb => "FSPASB",
6625 Self::Unknown => "unknown",
6626 }
6627 }
6628}
6629impl crate::AsPathParam for BankAccountBankType {
6630 fn push_to(&self, buf: &mut String) {
6631 buf.push_str(self.as_str());
6632 }
6633}
6634
6635#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6636pub enum BankAccountStatusType {
6637 Waiting,
6638 Success,
6639 Failed,
6640 #[serde(other)]
6641 #[serde(rename = "unknown")]
6642 Unknown,
6643}
6644impl BankAccountStatusType {
6645 pub fn as_str(&self) -> &'static str {
6646 match *self {
6647 Self::Waiting => "Waiting",
6648 Self::Success => "Success",
6649 Self::Failed => "Failed",
6650 Self::Unknown => "unknown",
6651 }
6652 }
6653}
6654impl crate::AsPathParam for BankAccountStatusType {
6655 fn push_to(&self, buf: &mut String) {
6656 buf.push_str(self.as_str());
6657 }
6658}
6659
6660#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6661pub enum BankIdStatusType {
6662 OutstandingTransaction,
6663 NoClient,
6664 Started,
6665 UserSign,
6666 UserReq,
6667 Complete,
6668 Error,
6669 #[serde(other)]
6670 #[serde(rename = "unknown")]
6671 Unknown,
6672}
6673impl BankIdStatusType {
6674 pub fn as_str(&self) -> &'static str {
6675 match *self {
6676 Self::OutstandingTransaction => "OutstandingTransaction",
6677 Self::NoClient => "NoClient",
6678 Self::Started => "Started",
6679 Self::UserSign => "UserSign",
6680 Self::UserReq => "UserReq",
6681 Self::Complete => "Complete",
6682 Self::Error => "Error",
6683 Self::Unknown => "unknown",
6684 }
6685 }
6686}
6687impl crate::AsPathParam for BankIdStatusType {
6688 fn push_to(&self, buf: &mut String) {
6689 buf.push_str(self.as_str());
6690 }
6691}
6692
6693#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6694pub enum BankIdHintCodeType {
6695 #[serde(rename = "outstandingTransaction")]
6696 OutstandingTransaction,
6697 #[serde(rename = "noClient")]
6698 NoClient,
6699 #[serde(rename = "started")]
6700 Started,
6701 #[serde(rename = "userSign")]
6702 UserSign,
6703 #[serde(rename = "expiredTransaction")]
6704 ExpiredTransaction,
6705 #[serde(rename = "certificateErr")]
6706 CertificateErr,
6707 #[serde(rename = "userCancel")]
6708 UserCancel,
6709 #[serde(rename = "cancelled")]
6710 Cancelled,
6711 #[serde(rename = "startFailed")]
6712 StartFailed,
6713 #[serde(other)]
6714 #[serde(rename = "unknown")]
6715 Unknown,
6716}
6717impl BankIdHintCodeType {
6718 pub fn as_str(&self) -> &'static str {
6719 match *self {
6720 Self::OutstandingTransaction => "outstandingTransaction",
6721 Self::NoClient => "noClient",
6722 Self::Started => "started",
6723 Self::UserSign => "userSign",
6724 Self::ExpiredTransaction => "expiredTransaction",
6725 Self::CertificateErr => "certificateErr",
6726 Self::UserCancel => "userCancel",
6727 Self::Cancelled => "cancelled",
6728 Self::StartFailed => "startFailed",
6729 Self::Unknown => "unknown",
6730 }
6731 }
6732}
6733impl crate::AsPathParam for BankIdHintCodeType {
6734 fn push_to(&self, buf: &mut String) {
6735 buf.push_str(self.as_str());
6736 }
6737}
6738
6739#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6740pub enum CommentTargetType {
6741 Private,
6742 ToDebtor,
6743 ToBillecta,
6744 #[serde(other)]
6745 #[serde(rename = "unknown")]
6746 Unknown,
6747}
6748impl CommentTargetType {
6749 pub fn as_str(&self) -> &'static str {
6750 match *self {
6751 Self::Private => "Private",
6752 Self::ToDebtor => "ToDebtor",
6753 Self::ToBillecta => "ToBillecta",
6754 Self::Unknown => "unknown",
6755 }
6756 }
6757}
6758impl crate::AsPathParam for CommentTargetType {
6759 fn push_to(&self, buf: &mut String) {
6760 buf.push_str(self.as_str());
6761 }
6762}
6763
6764#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6765pub enum EventType {
6766 Created,
6767 Attested,
6768 InvoiceSent,
6769 Paid,
6770 Credited,
6771 InvoiceDue,
6772 WillBeSentToDebtCollection,
6773 SentToDebtCollection,
6774 Cancelled,
6775 CommentedByDebtor,
6776 CommentedByCreditor,
6777 ReadByUser,
6778 Paused,
6779 Resumed,
6780 Disputed,
6781 UnDisputed,
6782 SmsSent,
6783 SmsWillBeSent,
6784 DebtCollectionSent,
6785 ManagedForBailiffRegistration,
6786 WillBeManagedForBailiffRegistration,
6787 WillSendDebtCollectionInvoice,
6788 WillSendReminderInvoice,
6789 OriginalInvoiceDue,
6790 ReminderDue,
6791 DebtCollectionDue,
6792 WillSendPartialInvoice,
6793 InstallmentPlanPartialInvoiceSent,
6794 Completed,
6795 PartialInvoiceDue,
6796 ManagedForReturnToDebtCollection,
6797 Updated,
6798 PaymentWillBeMade,
6799 MadeManual,
6800 PaymentCancelled,
6801 PaymentSent,
6802 AwatingPaymentAcknowledgment,
6803 ReminderInvoiceSent,
6804 WillSendInvoice,
6805 Moved,
6806 EmailEvent,
6807 UnAttested,
6808 InvoiceSold,
6809 InvoiceSaleRequestDenied,
6810 AwaitingInvoiceSaleRequestResponse,
6811 InvoiceSaleRequestCancelled,
6812 InvoiceSaleRequested,
6813 AutogiroPaymentPostponed,
6814 AutogiroCancelledWithdrawal,
6815 AutogiroApprovalAdded,
6816 AutogiroApprovalChanged,
6817 AutogiroApprovalRemoved,
6818 AutogiroWithdrawal,
6819 WillSendLatePaymentInvoice,
6820 OverPayment,
6821 FuturePayment,
6822 EInvoiceRegistered,
6823 EInvoiceUnregistered,
6824 EInvoiceWasRejected,
6825 WrittenOff,
6826 LongTermSurveilance,
6827 AppendixAdded,
6828 AppendixCleared,
6829 SmsEvent,
6830 InstallmentPlanRequested,
6831 SentToBailiff,
6832 SentToBailiffExecution,
6833 CreditCardAdded,
6834 CreditCardRemoved,
6835 CreditCardWithdrawal,
6836 CreditCardCancelledWithdrawal,
6837 VerdictNumberObtained,
6838 ManagedForBailiffEnforcementRegistration,
6839 PaymentRefunded,
6840 MessageSendToSocialWelfare,
6841 ForeignSentToLocalRepresentative,
6842 ChangedOwner,
6843 CreditorCommentByAdmin,
6844 ForeignMakeReadyForLocalRepresentative,
6845 #[serde(rename = "SupplementSentToKFM")]
6846 SupplementSentToKfm,
6847 EInvoiceEvent,
6848 DebtorContractSigned,
6849 DebtorContractSent,
6850 DebtorContractArchived,
6851 DebtorContractFinanced,
6852 FinancierRequested,
6853 BalanceFromInvoice,
6854 EvictionMessageSentToDebtor,
6855 PaymentInitiated,
6856 PaymentAcknowledged,
6857 ExcludedFromSync,
6858 SupplierPaymentFileCreated,
6859 PaymentCompleted,
6860 PublicCommentByAdmin,
6861 Archived,
6862 #[serde(other)]
6863 #[serde(rename = "unknown")]
6864 Unknown,
6865}
6866impl EventType {
6867 pub fn as_str(&self) -> &'static str {
6868 match *self {
6869 Self::Created => "Created",
6870 Self::Attested => "Attested",
6871 Self::InvoiceSent => "InvoiceSent",
6872 Self::Paid => "Paid",
6873 Self::Credited => "Credited",
6874 Self::InvoiceDue => "InvoiceDue",
6875 Self::WillBeSentToDebtCollection => "WillBeSentToDebtCollection",
6876 Self::SentToDebtCollection => "SentToDebtCollection",
6877 Self::Cancelled => "Cancelled",
6878 Self::CommentedByDebtor => "CommentedByDebtor",
6879 Self::CommentedByCreditor => "CommentedByCreditor",
6880 Self::ReadByUser => "ReadByUser",
6881 Self::Paused => "Paused",
6882 Self::Resumed => "Resumed",
6883 Self::Disputed => "Disputed",
6884 Self::UnDisputed => "UnDisputed",
6885 Self::SmsSent => "SmsSent",
6886 Self::SmsWillBeSent => "SmsWillBeSent",
6887 Self::DebtCollectionSent => "DebtCollectionSent",
6888 Self::ManagedForBailiffRegistration => "ManagedForBailiffRegistration",
6889 Self::WillBeManagedForBailiffRegistration => "WillBeManagedForBailiffRegistration",
6890 Self::WillSendDebtCollectionInvoice => "WillSendDebtCollectionInvoice",
6891 Self::WillSendReminderInvoice => "WillSendReminderInvoice",
6892 Self::OriginalInvoiceDue => "OriginalInvoiceDue",
6893 Self::ReminderDue => "ReminderDue",
6894 Self::DebtCollectionDue => "DebtCollectionDue",
6895 Self::WillSendPartialInvoice => "WillSendPartialInvoice",
6896 Self::InstallmentPlanPartialInvoiceSent => "InstallmentPlanPartialInvoiceSent",
6897 Self::Completed => "Completed",
6898 Self::PartialInvoiceDue => "PartialInvoiceDue",
6899 Self::ManagedForReturnToDebtCollection => "ManagedForReturnToDebtCollection",
6900 Self::Updated => "Updated",
6901 Self::PaymentWillBeMade => "PaymentWillBeMade",
6902 Self::MadeManual => "MadeManual",
6903 Self::PaymentCancelled => "PaymentCancelled",
6904 Self::PaymentSent => "PaymentSent",
6905 Self::AwatingPaymentAcknowledgment => "AwatingPaymentAcknowledgment",
6906 Self::ReminderInvoiceSent => "ReminderInvoiceSent",
6907 Self::WillSendInvoice => "WillSendInvoice",
6908 Self::Moved => "Moved",
6909 Self::EmailEvent => "EmailEvent",
6910 Self::UnAttested => "UnAttested",
6911 Self::InvoiceSold => "InvoiceSold",
6912 Self::InvoiceSaleRequestDenied => "InvoiceSaleRequestDenied",
6913 Self::AwaitingInvoiceSaleRequestResponse => "AwaitingInvoiceSaleRequestResponse",
6914 Self::InvoiceSaleRequestCancelled => "InvoiceSaleRequestCancelled",
6915 Self::InvoiceSaleRequested => "InvoiceSaleRequested",
6916 Self::AutogiroPaymentPostponed => "AutogiroPaymentPostponed",
6917 Self::AutogiroCancelledWithdrawal => "AutogiroCancelledWithdrawal",
6918 Self::AutogiroApprovalAdded => "AutogiroApprovalAdded",
6919 Self::AutogiroApprovalChanged => "AutogiroApprovalChanged",
6920 Self::AutogiroApprovalRemoved => "AutogiroApprovalRemoved",
6921 Self::AutogiroWithdrawal => "AutogiroWithdrawal",
6922 Self::WillSendLatePaymentInvoice => "WillSendLatePaymentInvoice",
6923 Self::OverPayment => "OverPayment",
6924 Self::FuturePayment => "FuturePayment",
6925 Self::EInvoiceRegistered => "EInvoiceRegistered",
6926 Self::EInvoiceUnregistered => "EInvoiceUnregistered",
6927 Self::EInvoiceWasRejected => "EInvoiceWasRejected",
6928 Self::WrittenOff => "WrittenOff",
6929 Self::LongTermSurveilance => "LongTermSurveilance",
6930 Self::AppendixAdded => "AppendixAdded",
6931 Self::AppendixCleared => "AppendixCleared",
6932 Self::SmsEvent => "SmsEvent",
6933 Self::InstallmentPlanRequested => "InstallmentPlanRequested",
6934 Self::SentToBailiff => "SentToBailiff",
6935 Self::SentToBailiffExecution => "SentToBailiffExecution",
6936 Self::CreditCardAdded => "CreditCardAdded",
6937 Self::CreditCardRemoved => "CreditCardRemoved",
6938 Self::CreditCardWithdrawal => "CreditCardWithdrawal",
6939 Self::CreditCardCancelledWithdrawal => "CreditCardCancelledWithdrawal",
6940 Self::VerdictNumberObtained => "VerdictNumberObtained",
6941 Self::ManagedForBailiffEnforcementRegistration => {
6942 "ManagedForBailiffEnforcementRegistration"
6943 }
6944 Self::PaymentRefunded => "PaymentRefunded",
6945 Self::MessageSendToSocialWelfare => "MessageSendToSocialWelfare",
6946 Self::ForeignSentToLocalRepresentative => "ForeignSentToLocalRepresentative",
6947 Self::ChangedOwner => "ChangedOwner",
6948 Self::CreditorCommentByAdmin => "CreditorCommentByAdmin",
6949 Self::ForeignMakeReadyForLocalRepresentative => {
6950 "ForeignMakeReadyForLocalRepresentative"
6951 }
6952 Self::SupplementSentToKfm => "SupplementSentToKFM",
6953 Self::EInvoiceEvent => "EInvoiceEvent",
6954 Self::DebtorContractSigned => "DebtorContractSigned",
6955 Self::DebtorContractSent => "DebtorContractSent",
6956 Self::DebtorContractArchived => "DebtorContractArchived",
6957 Self::DebtorContractFinanced => "DebtorContractFinanced",
6958 Self::FinancierRequested => "FinancierRequested",
6959 Self::BalanceFromInvoice => "BalanceFromInvoice",
6960 Self::EvictionMessageSentToDebtor => "EvictionMessageSentToDebtor",
6961 Self::PaymentInitiated => "PaymentInitiated",
6962 Self::PaymentAcknowledged => "PaymentAcknowledged",
6963 Self::ExcludedFromSync => "ExcludedFromSync",
6964 Self::SupplierPaymentFileCreated => "SupplierPaymentFileCreated",
6965 Self::PaymentCompleted => "PaymentCompleted",
6966 Self::PublicCommentByAdmin => "PublicCommentByAdmin",
6967 Self::Archived => "Archived",
6968 Self::Unknown => "unknown",
6969 }
6970 }
6971}
6972impl crate::AsPathParam for EventType {
6973 fn push_to(&self, buf: &mut String) {
6974 buf.push_str(self.as_str());
6975 }
6976}
6977
6978#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
6979pub enum ActionType {
6980 DebtCollectionAction,
6981 InstallmentPlanAction,
6982 InvoiceAction,
6983 CreditInvoiceAction,
6984 ContractInvoiceAction,
6985 SelfInvoiceAction,
6986 VerificationInvoiceAction,
6987 DebentureAction,
6988 InterestInvoiceAction,
6989 SupplierInvoiceAction,
6990 ReconciliationInvoiceAction,
6991 OrderAction,
6992 OrderInvoiceAction,
6993 PaymentAdviceAction,
6994 #[serde(other)]
6995 #[serde(rename = "unknown")]
6996 Unknown,
6997}
6998impl ActionType {
6999 pub fn as_str(&self) -> &'static str {
7000 match *self {
7001 Self::DebtCollectionAction => "DebtCollectionAction",
7002 Self::InstallmentPlanAction => "InstallmentPlanAction",
7003 Self::InvoiceAction => "InvoiceAction",
7004 Self::CreditInvoiceAction => "CreditInvoiceAction",
7005 Self::ContractInvoiceAction => "ContractInvoiceAction",
7006 Self::SelfInvoiceAction => "SelfInvoiceAction",
7007 Self::VerificationInvoiceAction => "VerificationInvoiceAction",
7008 Self::DebentureAction => "DebentureAction",
7009 Self::InterestInvoiceAction => "InterestInvoiceAction",
7010 Self::SupplierInvoiceAction => "SupplierInvoiceAction",
7011 Self::ReconciliationInvoiceAction => "ReconciliationInvoiceAction",
7012 Self::OrderAction => "OrderAction",
7013 Self::OrderInvoiceAction => "OrderInvoiceAction",
7014 Self::PaymentAdviceAction => "PaymentAdviceAction",
7015 Self::Unknown => "unknown",
7016 }
7017 }
7018}
7019impl crate::AsPathParam for ActionType {
7020 fn push_to(&self, buf: &mut String) {
7021 buf.push_str(self.as_str());
7022 }
7023}
7024
7025#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7026pub enum DebtCollectionActionLevelType {
7027 LatePaymentFee,
7028 Reminders,
7029 DebtCollection,
7030 Bailiff,
7031 #[serde(other)]
7032 #[serde(rename = "unknown")]
7033 Unknown,
7034}
7035impl DebtCollectionActionLevelType {
7036 pub fn as_str(&self) -> &'static str {
7037 match *self {
7038 Self::LatePaymentFee => "LatePaymentFee",
7039 Self::Reminders => "Reminders",
7040 Self::DebtCollection => "DebtCollection",
7041 Self::Bailiff => "Bailiff",
7042 Self::Unknown => "unknown",
7043 }
7044 }
7045}
7046impl crate::AsPathParam for DebtCollectionActionLevelType {
7047 fn push_to(&self, buf: &mut String) {
7048 buf.push_str(self.as_str());
7049 }
7050}
7051
7052#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7053pub enum DiscountType {
7054 Amount,
7055 Percentage,
7056 #[serde(other)]
7057 #[serde(rename = "unknown")]
7058 Unknown,
7059}
7060impl DiscountType {
7061 pub fn as_str(&self) -> &'static str {
7062 match *self {
7063 Self::Amount => "Amount",
7064 Self::Percentage => "Percentage",
7065 Self::Unknown => "unknown",
7066 }
7067 }
7068}
7069impl crate::AsPathParam for DiscountType {
7070 fn push_to(&self, buf: &mut String) {
7071 buf.push_str(self.as_str());
7072 }
7073}
7074
7075#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7076pub enum RotRutType {
7077 Construction,
7078 Electricity,
7079 GlassMetalWork,
7080 GroundDrainageWork,
7081 Masonry,
7082 PaintingWallpapering,
7083 Hvac,
7084 BabySitting,
7085 Moving,
7086 #[serde(rename = "ITServices")]
7087 ItServices,
7088 TextileClothing,
7089 PersonalCare,
7090 SnowPlowing,
7091 Cleaning,
7092 Gardening,
7093 WhiteGoods,
7094 Furnituring,
7095 HouseSupervision,
7096 #[serde(other)]
7097 #[serde(rename = "unknown")]
7098 Unknown,
7099}
7100impl RotRutType {
7101 pub fn as_str(&self) -> &'static str {
7102 match *self {
7103 Self::Construction => "Construction",
7104 Self::Electricity => "Electricity",
7105 Self::GlassMetalWork => "GlassMetalWork",
7106 Self::GroundDrainageWork => "GroundDrainageWork",
7107 Self::Masonry => "Masonry",
7108 Self::PaintingWallpapering => "PaintingWallpapering",
7109 Self::Hvac => "Hvac",
7110 Self::BabySitting => "BabySitting",
7111 Self::Moving => "Moving",
7112 Self::ItServices => "ITServices",
7113 Self::TextileClothing => "TextileClothing",
7114 Self::PersonalCare => "PersonalCare",
7115 Self::SnowPlowing => "SnowPlowing",
7116 Self::Cleaning => "Cleaning",
7117 Self::Gardening => "Gardening",
7118 Self::WhiteGoods => "WhiteGoods",
7119 Self::Furnituring => "Furnituring",
7120 Self::HouseSupervision => "HouseSupervision",
7121 Self::Unknown => "unknown",
7122 }
7123 }
7124}
7125impl crate::AsPathParam for RotRutType {
7126 fn push_to(&self, buf: &mut String) {
7127 buf.push_str(self.as_str());
7128 }
7129}
7130
7131#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7132pub enum RecordType {
7133 Standard,
7134 Message,
7135 Package,
7136 #[serde(other)]
7137 #[serde(rename = "unknown")]
7138 Unknown,
7139}
7140impl RecordType {
7141 pub fn as_str(&self) -> &'static str {
7142 match *self {
7143 Self::Standard => "Standard",
7144 Self::Message => "Message",
7145 Self::Package => "Package",
7146 Self::Unknown => "unknown",
7147 }
7148 }
7149}
7150impl crate::AsPathParam for RecordType {
7151 fn push_to(&self, buf: &mut String) {
7152 buf.push_str(self.as_str());
7153 }
7154}
7155
7156#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7157pub enum ContractInvoiceActionStageType {
7158 None,
7159 Created,
7160 InvoiceCreated,
7161 #[serde(other)]
7162 #[serde(rename = "unknown")]
7163 Unknown,
7164}
7165impl ContractInvoiceActionStageType {
7166 pub fn as_str(&self) -> &'static str {
7167 match *self {
7168 Self::None => "None",
7169 Self::Created => "Created",
7170 Self::InvoiceCreated => "InvoiceCreated",
7171 Self::Unknown => "unknown",
7172 }
7173 }
7174}
7175impl crate::AsPathParam for ContractInvoiceActionStageType {
7176 fn push_to(&self, buf: &mut String) {
7177 buf.push_str(self.as_str());
7178 }
7179}
7180
7181#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7182pub enum DeliveryMethodType {
7183 Email,
7184 Mail,
7185 Manually,
7186 #[serde(rename = "SMS")]
7187 Sms,
7188 EInvoice,
7189 Kivra,
7190 Avy,
7191 #[serde(other)]
7192 #[serde(rename = "unknown")]
7193 Unknown,
7194}
7195impl DeliveryMethodType {
7196 pub fn as_str(&self) -> &'static str {
7197 match *self {
7198 Self::Email => "Email",
7199 Self::Mail => "Mail",
7200 Self::Manually => "Manually",
7201 Self::Sms => "SMS",
7202 Self::EInvoice => "EInvoice",
7203 Self::Kivra => "Kivra",
7204 Self::Avy => "Avy",
7205 Self::Unknown => "unknown",
7206 }
7207 }
7208}
7209impl crate::AsPathParam for DeliveryMethodType {
7210 fn push_to(&self, buf: &mut String) {
7211 buf.push_str(self.as_str());
7212 }
7213}
7214
7215#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7216pub enum RecurrenceIntervalType {
7217 Monthly,
7218 Yearly,
7219 Quarterly,
7220 #[serde(other)]
7221 #[serde(rename = "unknown")]
7222 Unknown,
7223}
7224impl RecurrenceIntervalType {
7225 pub fn as_str(&self) -> &'static str {
7226 match *self {
7227 Self::Monthly => "Monthly",
7228 Self::Yearly => "Yearly",
7229 Self::Quarterly => "Quarterly",
7230 Self::Unknown => "unknown",
7231 }
7232 }
7233}
7234impl crate::AsPathParam for RecurrenceIntervalType {
7235 fn push_to(&self, buf: &mut String) {
7236 buf.push_str(self.as_str());
7237 }
7238}
7239
7240#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7241pub enum LanguageType {
7242 #[serde(rename = "SV")]
7243 Sv,
7244 #[serde(rename = "EN")]
7245 En,
7246 #[serde(rename = "FI")]
7247 Fi,
7248 #[serde(other)]
7249 #[serde(rename = "unknown")]
7250 Unknown,
7251}
7252impl LanguageType {
7253 pub fn as_str(&self) -> &'static str {
7254 match *self {
7255 Self::Sv => "SV",
7256 Self::En => "EN",
7257 Self::Fi => "FI",
7258 Self::Unknown => "unknown",
7259 }
7260 }
7261}
7262impl crate::AsPathParam for LanguageType {
7263 fn push_to(&self, buf: &mut String) {
7264 buf.push_str(self.as_str());
7265 }
7266}
7267
7268#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7269pub enum InterestType {
7270 Fixed,
7271 AboveEffectiveReference,
7272 NoInterest,
7273 #[serde(other)]
7274 #[serde(rename = "unknown")]
7275 Unknown,
7276}
7277impl InterestType {
7278 pub fn as_str(&self) -> &'static str {
7279 match *self {
7280 Self::Fixed => "Fixed",
7281 Self::AboveEffectiveReference => "AboveEffectiveReference",
7282 Self::NoInterest => "NoInterest",
7283 Self::Unknown => "unknown",
7284 }
7285 }
7286}
7287impl crate::AsPathParam for InterestType {
7288 fn push_to(&self, buf: &mut String) {
7289 buf.push_str(self.as_str());
7290 }
7291}
7292
7293#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7294pub enum IntermediatorType {
7295 #[serde(rename = "ITELLA")]
7296 Itella,
7297 #[serde(rename = "TIETOSE")]
7298 Tietose,
7299 #[serde(rename = "LOGICA")]
7300 Logica,
7301 #[serde(rename = "PROCEEDO")]
7302 Proceedo,
7303 #[serde(rename = "HUSERA")]
7304 Husera,
7305 #[serde(rename = "BASWARE")]
7306 Basware,
7307 #[serde(rename = "EDB")]
7308 Edb,
7309 #[serde(rename = "STRALFORS1")]
7310 Stralfors1,
7311 #[serde(rename = "LIAISON_FI")]
7312 LiaisonFi,
7313 #[serde(rename = "EXPERT")]
7314 Expert,
7315 #[serde(rename = "ESSESESS")]
7316 Essesess,
7317 #[serde(rename = "HANDSESS")]
7318 Handsess,
7319 #[serde(rename = "DABASESS")]
7320 Dabasess,
7321 #[serde(rename = "SWEDSESS")]
7322 Swedsess,
7323 #[serde(rename = "NDEASESS")]
7324 Ndeasess,
7325 #[serde(rename = "INEXCHANGE")]
7326 Inexchange,
7327 #[serde(rename = "SCANCLOUD")]
7328 Scancloud,
7329 #[serde(rename = "PAGERO")]
7330 Pagero,
7331 #[serde(rename = "CREDIFLOW")]
7332 Crediflow,
7333 #[serde(rename = "PEPPOL")]
7334 Peppol,
7335 #[serde(rename = "COMPELLO")]
7336 Compello,
7337 #[serde(rename = "LOGIQ")]
7338 Logiq,
7339 #[serde(rename = "APIX")]
7340 Apix,
7341 #[serde(rename = "AKSESSPUNKT")]
7342 Aksesspunkt,
7343 #[serde(rename = "FININVOICE")]
7344 Fininvoice,
7345 #[serde(other)]
7346 #[serde(rename = "unknown")]
7347 Unknown,
7348}
7349impl IntermediatorType {
7350 pub fn as_str(&self) -> &'static str {
7351 match *self {
7352 Self::Itella => "ITELLA",
7353 Self::Tietose => "TIETOSE",
7354 Self::Logica => "LOGICA",
7355 Self::Proceedo => "PROCEEDO",
7356 Self::Husera => "HUSERA",
7357 Self::Basware => "BASWARE",
7358 Self::Edb => "EDB",
7359 Self::Stralfors1 => "STRALFORS1",
7360 Self::LiaisonFi => "LIAISON_FI",
7361 Self::Expert => "EXPERT",
7362 Self::Essesess => "ESSESESS",
7363 Self::Handsess => "HANDSESS",
7364 Self::Dabasess => "DABASESS",
7365 Self::Swedsess => "SWEDSESS",
7366 Self::Ndeasess => "NDEASESS",
7367 Self::Inexchange => "INEXCHANGE",
7368 Self::Scancloud => "SCANCLOUD",
7369 Self::Pagero => "PAGERO",
7370 Self::Crediflow => "CREDIFLOW",
7371 Self::Peppol => "PEPPOL",
7372 Self::Compello => "COMPELLO",
7373 Self::Logiq => "LOGIQ",
7374 Self::Apix => "APIX",
7375 Self::Aksesspunkt => "AKSESSPUNKT",
7376 Self::Fininvoice => "FININVOICE",
7377 Self::Unknown => "unknown",
7378 }
7379 }
7380}
7381impl crate::AsPathParam for IntermediatorType {
7382 fn push_to(&self, buf: &mut String) {
7383 buf.push_str(self.as_str());
7384 }
7385}
7386
7387#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7388pub enum ReferenceType {
7389 None,
7390 #[serde(rename = "OCR")]
7391 Ocr,
7392 Message,
7393 #[serde(other)]
7394 #[serde(rename = "unknown")]
7395 Unknown,
7396}
7397impl ReferenceType {
7398 pub fn as_str(&self) -> &'static str {
7399 match *self {
7400 Self::None => "None",
7401 Self::Ocr => "OCR",
7402 Self::Message => "Message",
7403 Self::Unknown => "unknown",
7404 }
7405 }
7406}
7407impl crate::AsPathParam for ReferenceType {
7408 fn push_to(&self, buf: &mut String) {
7409 buf.push_str(self.as_str());
7410 }
7411}
7412
7413#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7414pub enum ReceivingAccountType {
7415 BankGiro,
7416 PlusGiro,
7417 BankAccount,
7418 #[serde(rename = "IBAN")]
7419 Iban,
7420 #[serde(other)]
7421 #[serde(rename = "unknown")]
7422 Unknown,
7423}
7424impl ReceivingAccountType {
7425 pub fn as_str(&self) -> &'static str {
7426 match *self {
7427 Self::BankGiro => "BankGiro",
7428 Self::PlusGiro => "PlusGiro",
7429 Self::BankAccount => "BankAccount",
7430 Self::Iban => "IBAN",
7431 Self::Unknown => "unknown",
7432 }
7433 }
7434}
7435impl crate::AsPathParam for ReceivingAccountType {
7436 fn push_to(&self, buf: &mut String) {
7437 buf.push_str(self.as_str());
7438 }
7439}
7440
7441#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7442pub enum ContractInvoicePeriodRuleType {
7443 None,
7444 Previous,
7445 Current,
7446 Next,
7447 #[serde(other)]
7448 #[serde(rename = "unknown")]
7449 Unknown,
7450}
7451impl ContractInvoicePeriodRuleType {
7452 pub fn as_str(&self) -> &'static str {
7453 match *self {
7454 Self::None => "None",
7455 Self::Previous => "Previous",
7456 Self::Current => "Current",
7457 Self::Next => "Next",
7458 Self::Unknown => "unknown",
7459 }
7460 }
7461}
7462impl crate::AsPathParam for ContractInvoicePeriodRuleType {
7463 fn push_to(&self, buf: &mut String) {
7464 buf.push_str(self.as_str());
7465 }
7466}
7467
7468#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7469pub enum CreditCardAddStatusType {
7470 Pending,
7471 Succeeded,
7472 Failed,
7473 #[serde(other)]
7474 #[serde(rename = "unknown")]
7475 Unknown,
7476}
7477impl CreditCardAddStatusType {
7478 pub fn as_str(&self) -> &'static str {
7479 match *self {
7480 Self::Pending => "Pending",
7481 Self::Succeeded => "Succeeded",
7482 Self::Failed => "Failed",
7483 Self::Unknown => "unknown",
7484 }
7485 }
7486}
7487impl crate::AsPathParam for CreditCardAddStatusType {
7488 fn push_to(&self, buf: &mut String) {
7489 buf.push_str(self.as_str());
7490 }
7491}
7492
7493#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7494pub enum CreditCardPaymentStatusType {
7495 Pending,
7496 Succeeded,
7497 Failed,
7498 Refunded,
7499 #[serde(other)]
7500 #[serde(rename = "unknown")]
7501 Unknown,
7502}
7503impl CreditCardPaymentStatusType {
7504 pub fn as_str(&self) -> &'static str {
7505 match *self {
7506 Self::Pending => "Pending",
7507 Self::Succeeded => "Succeeded",
7508 Self::Failed => "Failed",
7509 Self::Refunded => "Refunded",
7510 Self::Unknown => "unknown",
7511 }
7512 }
7513}
7514impl crate::AsPathParam for CreditCardPaymentStatusType {
7515 fn push_to(&self, buf: &mut String) {
7516 buf.push_str(self.as_str());
7517 }
7518}
7519
7520#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7521pub enum CreditorModuleAccessType {
7522 InvoiceModule,
7523 DebtCollectionModule,
7524 SupplierInvoice,
7525 SelfInvoiceModule,
7526 DebentureModule,
7527 FinanceModule,
7528 OutgoingPaymentsModule,
7529 ReconciliationModule,
7530 CheckoutModule,
7531 PaymentAdviceModule,
7532 #[serde(other)]
7533 #[serde(rename = "unknown")]
7534 Unknown,
7535}
7536impl CreditorModuleAccessType {
7537 pub fn as_str(&self) -> &'static str {
7538 match *self {
7539 Self::InvoiceModule => "InvoiceModule",
7540 Self::DebtCollectionModule => "DebtCollectionModule",
7541 Self::SupplierInvoice => "SupplierInvoice",
7542 Self::SelfInvoiceModule => "SelfInvoiceModule",
7543 Self::DebentureModule => "DebentureModule",
7544 Self::FinanceModule => "FinanceModule",
7545 Self::OutgoingPaymentsModule => "OutgoingPaymentsModule",
7546 Self::ReconciliationModule => "ReconciliationModule",
7547 Self::CheckoutModule => "CheckoutModule",
7548 Self::PaymentAdviceModule => "PaymentAdviceModule",
7549 Self::Unknown => "unknown",
7550 }
7551 }
7552}
7553impl crate::AsPathParam for CreditorModuleAccessType {
7554 fn push_to(&self, buf: &mut String) {
7555 buf.push_str(self.as_str());
7556 }
7557}
7558
7559#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7560pub enum CreditorAddonCategoryType {
7561 All,
7562 Payment,
7563 Accounting,
7564 Delivery,
7565 Factoring,
7566 Authentication,
7567 #[serde(other)]
7568 #[serde(rename = "unknown")]
7569 Unknown,
7570}
7571impl CreditorAddonCategoryType {
7572 pub fn as_str(&self) -> &'static str {
7573 match *self {
7574 Self::All => "All",
7575 Self::Payment => "Payment",
7576 Self::Accounting => "Accounting",
7577 Self::Delivery => "Delivery",
7578 Self::Factoring => "Factoring",
7579 Self::Authentication => "Authentication",
7580 Self::Unknown => "unknown",
7581 }
7582 }
7583}
7584impl crate::AsPathParam for CreditorAddonCategoryType {
7585 fn push_to(&self, buf: &mut String) {
7586 buf.push_str(self.as_str());
7587 }
7588}
7589
7590#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7591pub enum CreditorAddonType {
7592 None,
7593 Swish,
7594 AutoGiro,
7595 BillectaCheckOut,
7596 StripeConnectedAccount,
7597 Stripe,
7598 EInvoice,
7599 Kivra,
7600 WebHooks,
7601 Fortnox,
7602 FortnoxVoucher,
7603 VismaEekonomi,
7604 #[serde(rename = "CSVAccounting")]
7605 CsvAccounting,
7606 PeAccounting,
7607 #[serde(rename = "FTPaccounting")]
7608 FtPaccounting,
7609 BankId,
7610 PeAccountingSales,
7611 #[serde(other)]
7612 #[serde(rename = "unknown")]
7613 Unknown,
7614}
7615impl CreditorAddonType {
7616 pub fn as_str(&self) -> &'static str {
7617 match *self {
7618 Self::None => "None",
7619 Self::Swish => "Swish",
7620 Self::AutoGiro => "AutoGiro",
7621 Self::BillectaCheckOut => "BillectaCheckOut",
7622 Self::StripeConnectedAccount => "StripeConnectedAccount",
7623 Self::Stripe => "Stripe",
7624 Self::EInvoice => "EInvoice",
7625 Self::Kivra => "Kivra",
7626 Self::WebHooks => "WebHooks",
7627 Self::Fortnox => "Fortnox",
7628 Self::FortnoxVoucher => "FortnoxVoucher",
7629 Self::VismaEekonomi => "VismaEekonomi",
7630 Self::CsvAccounting => "CSVAccounting",
7631 Self::PeAccounting => "PeAccounting",
7632 Self::FtPaccounting => "FTPaccounting",
7633 Self::BankId => "BankId",
7634 Self::PeAccountingSales => "PeAccountingSales",
7635 Self::Unknown => "unknown",
7636 }
7637 }
7638}
7639impl crate::AsPathParam for CreditorAddonType {
7640 fn push_to(&self, buf: &mut String) {
7641 buf.push_str(self.as_str());
7642 }
7643}
7644
7645#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7646pub enum CreditorAddonDescriptionType {
7647 None,
7648 Active,
7649 ConnectedAccountExist,
7650 ConnectionIsPaused,
7651 ConnectionExistButIsNotActivated,
7652 CustomerNumberReserved,
7653 CertificateHasExpired,
7654 CertificateHasNotYetBeenActivated,
7655 PhoneNumberIsMissing,
7656 ConnectionIsNotActivated,
7657 ApiCodeIsMissing,
7658 AccessCodeIsMissing,
7659 AccessError,
7660 #[serde(other)]
7661 #[serde(rename = "unknown")]
7662 Unknown,
7663}
7664impl CreditorAddonDescriptionType {
7665 pub fn as_str(&self) -> &'static str {
7666 match *self {
7667 Self::None => "None",
7668 Self::Active => "Active",
7669 Self::ConnectedAccountExist => "ConnectedAccountExist",
7670 Self::ConnectionIsPaused => "ConnectionIsPaused",
7671 Self::ConnectionExistButIsNotActivated => "ConnectionExistButIsNotActivated",
7672 Self::CustomerNumberReserved => "CustomerNumberReserved",
7673 Self::CertificateHasExpired => "CertificateHasExpired",
7674 Self::CertificateHasNotYetBeenActivated => "CertificateHasNotYetBeenActivated",
7675 Self::PhoneNumberIsMissing => "PhoneNumberIsMissing",
7676 Self::ConnectionIsNotActivated => "ConnectionIsNotActivated",
7677 Self::ApiCodeIsMissing => "ApiCodeIsMissing",
7678 Self::AccessCodeIsMissing => "AccessCodeIsMissing",
7679 Self::AccessError => "AccessError",
7680 Self::Unknown => "unknown",
7681 }
7682 }
7683}
7684impl crate::AsPathParam for CreditorAddonDescriptionType {
7685 fn push_to(&self, buf: &mut String) {
7686 buf.push_str(self.as_str());
7687 }
7688}
7689
7690#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7691pub enum CreditorPaymentMethodType {
7692 BankGiro,
7693 PlusGiro,
7694 BankAccount,
7695 #[serde(rename = "IBAN")]
7696 Iban,
7697 #[serde(other)]
7698 #[serde(rename = "unknown")]
7699 Unknown,
7700}
7701impl CreditorPaymentMethodType {
7702 pub fn as_str(&self) -> &'static str {
7703 match *self {
7704 Self::BankGiro => "BankGiro",
7705 Self::PlusGiro => "PlusGiro",
7706 Self::BankAccount => "BankAccount",
7707 Self::Iban => "IBAN",
7708 Self::Unknown => "unknown",
7709 }
7710 }
7711}
7712impl crate::AsPathParam for CreditorPaymentMethodType {
7713 fn push_to(&self, buf: &mut String) {
7714 buf.push_str(self.as_str());
7715 }
7716}
7717
7718#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7719pub enum CreditorPaymentMethodPriorityType {
7720 Primary,
7721 Alternative,
7722 #[serde(other)]
7723 #[serde(rename = "unknown")]
7724 Unknown,
7725}
7726impl CreditorPaymentMethodPriorityType {
7727 pub fn as_str(&self) -> &'static str {
7728 match *self {
7729 Self::Primary => "Primary",
7730 Self::Alternative => "Alternative",
7731 Self::Unknown => "unknown",
7732 }
7733 }
7734}
7735impl crate::AsPathParam for CreditorPaymentMethodPriorityType {
7736 fn push_to(&self, buf: &mut String) {
7737 buf.push_str(self.as_str());
7738 }
7739}
7740
7741#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7742pub enum CreditorKycStateType {
7743 Pending,
7744 Approved,
7745 Rejected,
7746 #[serde(other)]
7747 #[serde(rename = "unknown")]
7748 Unknown,
7749}
7750impl CreditorKycStateType {
7751 pub fn as_str(&self) -> &'static str {
7752 match *self {
7753 Self::Pending => "Pending",
7754 Self::Approved => "Approved",
7755 Self::Rejected => "Rejected",
7756 Self::Unknown => "unknown",
7757 }
7758 }
7759}
7760impl crate::AsPathParam for CreditorKycStateType {
7761 fn push_to(&self, buf: &mut String) {
7762 buf.push_str(self.as_str());
7763 }
7764}
7765
7766#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7767pub enum DebtCollectionActionStageType {
7768 None,
7769 Created,
7770 ReminderInvoiceSent,
7771 DebtCollectionInvoiceSent,
7772 SentToBailiff,
7773 Manual,
7774 Completed,
7775 Cancelled,
7776 ForeignManual,
7777 AwaitingFeePayment,
7778 Attested,
7779 DebtCollectionClaimDue,
7780 LatePaymentInvoiceSent,
7781 DebtCollectionClaimResponseRequested,
7782 ReadyForBailiff,
7783 LongTermSurveilance,
7784 VerdictObtained,
7785 SentToBailiffEnforcement,
7786 ForeignDebtorLetterSent,
7787 ForeignCreditorLetterSent,
7788 EnforcementResponseRequested,
7789 ReadyForEnforcement,
7790 ForeignSentToLocalRepresentative,
7791 ForeignMakeReadyForLocalRepresentative,
7792 ReadyForAttest,
7793 ReadyForAssistance,
7794 ReadyForAssistanceWithBailiff,
7795 Assisted,
7796 AssistedWithBailiff,
7797 #[serde(other)]
7798 #[serde(rename = "unknown")]
7799 Unknown,
7800}
7801impl DebtCollectionActionStageType {
7802 pub fn as_str(&self) -> &'static str {
7803 match *self {
7804 Self::None => "None",
7805 Self::Created => "Created",
7806 Self::ReminderInvoiceSent => "ReminderInvoiceSent",
7807 Self::DebtCollectionInvoiceSent => "DebtCollectionInvoiceSent",
7808 Self::SentToBailiff => "SentToBailiff",
7809 Self::Manual => "Manual",
7810 Self::Completed => "Completed",
7811 Self::Cancelled => "Cancelled",
7812 Self::ForeignManual => "ForeignManual",
7813 Self::AwaitingFeePayment => "AwaitingFeePayment",
7814 Self::Attested => "Attested",
7815 Self::DebtCollectionClaimDue => "DebtCollectionClaimDue",
7816 Self::LatePaymentInvoiceSent => "LatePaymentInvoiceSent",
7817 Self::DebtCollectionClaimResponseRequested => "DebtCollectionClaimResponseRequested",
7818 Self::ReadyForBailiff => "ReadyForBailiff",
7819 Self::LongTermSurveilance => "LongTermSurveilance",
7820 Self::VerdictObtained => "VerdictObtained",
7821 Self::SentToBailiffEnforcement => "SentToBailiffEnforcement",
7822 Self::ForeignDebtorLetterSent => "ForeignDebtorLetterSent",
7823 Self::ForeignCreditorLetterSent => "ForeignCreditorLetterSent",
7824 Self::EnforcementResponseRequested => "EnforcementResponseRequested",
7825 Self::ReadyForEnforcement => "ReadyForEnforcement",
7826 Self::ForeignSentToLocalRepresentative => "ForeignSentToLocalRepresentative",
7827 Self::ForeignMakeReadyForLocalRepresentative => {
7828 "ForeignMakeReadyForLocalRepresentative"
7829 }
7830 Self::ReadyForAttest => "ReadyForAttest",
7831 Self::ReadyForAssistance => "ReadyForAssistance",
7832 Self::ReadyForAssistanceWithBailiff => "ReadyForAssistanceWithBailiff",
7833 Self::Assisted => "Assisted",
7834 Self::AssistedWithBailiff => "AssistedWithBailiff",
7835 Self::Unknown => "unknown",
7836 }
7837 }
7838}
7839impl crate::AsPathParam for DebtCollectionActionStageType {
7840 fn push_to(&self, buf: &mut String) {
7841 buf.push_str(self.as_str());
7842 }
7843}
7844
7845#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7846pub enum DeliveryStatusType {
7847 Received,
7848 Opened,
7849 Viewed,
7850 #[serde(other)]
7851 #[serde(rename = "unknown")]
7852 Unknown,
7853}
7854impl DeliveryStatusType {
7855 pub fn as_str(&self) -> &'static str {
7856 match *self {
7857 Self::Received => "Received",
7858 Self::Opened => "Opened",
7859 Self::Viewed => "Viewed",
7860 Self::Unknown => "unknown",
7861 }
7862 }
7863}
7864impl crate::AsPathParam for DeliveryStatusType {
7865 fn push_to(&self, buf: &mut String) {
7866 buf.push_str(self.as_str());
7867 }
7868}
7869
7870#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7871pub enum ActionSourceType {
7872 None,
7873 DebtCollectionAction,
7874 InvoiceAction,
7875 ReconciliationInvoiceAction,
7876 #[serde(other)]
7877 #[serde(rename = "unknown")]
7878 Unknown,
7879}
7880impl ActionSourceType {
7881 pub fn as_str(&self) -> &'static str {
7882 match *self {
7883 Self::None => "None",
7884 Self::DebtCollectionAction => "DebtCollectionAction",
7885 Self::InvoiceAction => "InvoiceAction",
7886 Self::ReconciliationInvoiceAction => "ReconciliationInvoiceAction",
7887 Self::Unknown => "unknown",
7888 }
7889 }
7890}
7891impl crate::AsPathParam for ActionSourceType {
7892 fn push_to(&self, buf: &mut String) {
7893 buf.push_str(self.as_str());
7894 }
7895}
7896
7897#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7898pub enum DebtorType {
7899 Undefined,
7900 Private,
7901 Company,
7902 #[serde(other)]
7903 #[serde(rename = "unknown")]
7904 Unknown,
7905}
7906impl DebtorType {
7907 pub fn as_str(&self) -> &'static str {
7908 match *self {
7909 Self::Undefined => "Undefined",
7910 Self::Private => "Private",
7911 Self::Company => "Company",
7912 Self::Unknown => "unknown",
7913 }
7914 }
7915}
7916impl crate::AsPathParam for DebtorType {
7917 fn push_to(&self, buf: &mut String) {
7918 buf.push_str(self.as_str());
7919 }
7920}
7921
7922#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7923pub enum EInvoiceBankType {
7924 #[serde(rename = "OEB")]
7925 Oeb,
7926 #[serde(rename = "SEB")]
7927 Seb,
7928 #[serde(rename = "SHB")]
7929 Shb,
7930 #[serde(rename = "SKB")]
7931 Skb,
7932 #[serde(rename = "FSPA")]
7933 Fspa,
7934 #[serde(rename = "NB")]
7935 Nb,
7936 #[serde(rename = "LFB")]
7937 Lfb,
7938 #[serde(rename = "FINN")]
7939 Finn,
7940 #[serde(rename = "ICA")]
7941 Ica,
7942 #[serde(rename = "SYD")]
7943 Syd,
7944 #[serde(rename = "DNB")]
7945 Dnb,
7946 #[serde(rename = "SBF")]
7947 Sbf,
7948 #[serde(rename = "AAB")]
7949 Aab,
7950 #[serde(rename = "DBF")]
7951 Dbf,
7952 #[serde(rename = "SEBF")]
7953 Sebf,
7954 #[serde(rename = "SHBF")]
7955 Shbf,
7956 #[serde(rename = "NBF")]
7957 Nbf,
7958 #[serde(rename = "FRX")]
7959 Frx,
7960 #[serde(rename = "MARG")]
7961 Marg,
7962 #[serde(other)]
7963 #[serde(rename = "unknown")]
7964 Unknown,
7965}
7966impl EInvoiceBankType {
7967 pub fn as_str(&self) -> &'static str {
7968 match *self {
7969 Self::Oeb => "OEB",
7970 Self::Seb => "SEB",
7971 Self::Shb => "SHB",
7972 Self::Skb => "SKB",
7973 Self::Fspa => "FSPA",
7974 Self::Nb => "NB",
7975 Self::Lfb => "LFB",
7976 Self::Finn => "FINN",
7977 Self::Ica => "ICA",
7978 Self::Syd => "SYD",
7979 Self::Dnb => "DNB",
7980 Self::Sbf => "SBF",
7981 Self::Aab => "AAB",
7982 Self::Dbf => "DBF",
7983 Self::Sebf => "SEBF",
7984 Self::Shbf => "SHBF",
7985 Self::Nbf => "NBF",
7986 Self::Frx => "FRX",
7987 Self::Marg => "MARG",
7988 Self::Unknown => "unknown",
7989 }
7990 }
7991}
7992impl crate::AsPathParam for EInvoiceBankType {
7993 fn push_to(&self, buf: &mut String) {
7994 buf.push_str(self.as_str());
7995 }
7996}
7997
7998#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
7999pub enum DebtorPaymentMethod {
8000 BankGiro,
8001 PlusGiro,
8002 BankAccount,
8003 #[serde(rename = "IBAN")]
8004 Iban,
8005 Fedwire,
8006 #[serde(other)]
8007 #[serde(rename = "unknown")]
8008 Unknown,
8009}
8010impl DebtorPaymentMethod {
8011 pub fn as_str(&self) -> &'static str {
8012 match *self {
8013 Self::BankGiro => "BankGiro",
8014 Self::PlusGiro => "PlusGiro",
8015 Self::BankAccount => "BankAccount",
8016 Self::Iban => "IBAN",
8017 Self::Fedwire => "Fedwire",
8018 Self::Unknown => "unknown",
8019 }
8020 }
8021}
8022impl crate::AsPathParam for DebtorPaymentMethod {
8023 fn push_to(&self, buf: &mut String) {
8024 buf.push_str(self.as_str());
8025 }
8026}
8027
8028#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8029pub enum AutogiroStageType {
8030 Pending,
8031 Approved,
8032 Failed,
8033 Removed,
8034 Migration,
8035 #[serde(other)]
8036 #[serde(rename = "unknown")]
8037 Unknown,
8038}
8039impl AutogiroStageType {
8040 pub fn as_str(&self) -> &'static str {
8041 match *self {
8042 Self::Pending => "Pending",
8043 Self::Approved => "Approved",
8044 Self::Failed => "Failed",
8045 Self::Removed => "Removed",
8046 Self::Migration => "Migration",
8047 Self::Unknown => "unknown",
8048 }
8049 }
8050}
8051impl crate::AsPathParam for AutogiroStageType {
8052 fn push_to(&self, buf: &mut String) {
8053 buf.push_str(self.as_str());
8054 }
8055}
8056
8057#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8058pub enum DebtorBalanceType {
8059 OpeningBalance,
8060 Invoice,
8061 SelfInvoice,
8062 OverPayment,
8063 BalanceFromInvoice,
8064 ManualBalance,
8065 #[serde(other)]
8066 #[serde(rename = "unknown")]
8067 Unknown,
8068}
8069impl DebtorBalanceType {
8070 pub fn as_str(&self) -> &'static str {
8071 match *self {
8072 Self::OpeningBalance => "OpeningBalance",
8073 Self::Invoice => "Invoice",
8074 Self::SelfInvoice => "SelfInvoice",
8075 Self::OverPayment => "OverPayment",
8076 Self::BalanceFromInvoice => "BalanceFromInvoice",
8077 Self::ManualBalance => "ManualBalance",
8078 Self::Unknown => "unknown",
8079 }
8080 }
8081}
8082impl crate::AsPathParam for DebtorBalanceType {
8083 fn push_to(&self, buf: &mut String) {
8084 buf.push_str(self.as_str());
8085 }
8086}
8087
8088#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8089pub enum KivraStatusType {
8090 None,
8091 DebtorHasKivra,
8092 DebtorNotFoundInKivra,
8093 #[serde(rename = "DebtorMissingSSN")]
8094 DebtorMissingSsn,
8095 DebtorNotFound,
8096 #[serde(rename = "DebtorDontHaveSwedishSSN")]
8097 DebtorDontHaveSwedishSsn,
8098 #[serde(other)]
8099 #[serde(rename = "unknown")]
8100 Unknown,
8101}
8102impl KivraStatusType {
8103 pub fn as_str(&self) -> &'static str {
8104 match *self {
8105 Self::None => "None",
8106 Self::DebtorHasKivra => "DebtorHasKivra",
8107 Self::DebtorNotFoundInKivra => "DebtorNotFoundInKivra",
8108 Self::DebtorMissingSsn => "DebtorMissingSSN",
8109 Self::DebtorNotFound => "DebtorNotFound",
8110 Self::DebtorDontHaveSwedishSsn => "DebtorDontHaveSwedishSSN",
8111 Self::Unknown => "unknown",
8112 }
8113 }
8114}
8115impl crate::AsPathParam for KivraStatusType {
8116 fn push_to(&self, buf: &mut String) {
8117 buf.push_str(self.as_str());
8118 }
8119}
8120
8121#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8122pub enum IncomingPaymentNotificationMethodType {
8123 Email,
8124 #[serde(rename = "SMS")]
8125 Sms,
8126 #[serde(other)]
8127 #[serde(rename = "unknown")]
8128 Unknown,
8129}
8130impl IncomingPaymentNotificationMethodType {
8131 pub fn as_str(&self) -> &'static str {
8132 match *self {
8133 Self::Email => "Email",
8134 Self::Sms => "SMS",
8135 Self::Unknown => "unknown",
8136 }
8137 }
8138}
8139impl crate::AsPathParam for IncomingPaymentNotificationMethodType {
8140 fn push_to(&self, buf: &mut String) {
8141 buf.push_str(self.as_str());
8142 }
8143}
8144
8145#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8146pub enum GenericActionStageType {
8147 None,
8148 Created,
8149 ReminderInvoiceSent,
8150 DebtCollectionInvoiceSent,
8151 SentToBailiff,
8152 Manual,
8153 Completed,
8154 Cancelled,
8155 ForeignManual,
8156 AwaitingFeePayment,
8157 FeeInvoiceSent,
8158 InstallmentPlanInvoiceSent,
8159 InvoiceSent,
8160 Attested,
8161 DebtCollectionClaimDue,
8162 ReturnToSourceRequested,
8163 SentToDebtCollection,
8164 InvoiceCreated,
8165 PaymentSent,
8166 PaymentCancelled,
8167 SalesRequested,
8168 SaleRequestAccepted,
8169 SalesRequestedCancelled,
8170 SalesRequestedDenied,
8171 LatePaymentInvoiceSent,
8172 DebtCollectionClaimResponseRequested,
8173 ReadyForBailiff,
8174 LongTermSurveilance,
8175 VerdictObtained,
8176 SentToBailiffEnforcement,
8177 ForeignDebtorLetterSent,
8178 ForeignCreditorLetterSent,
8179 EnforcementResponseRequested,
8180 ReadyForEnforcement,
8181 ForeignSentToLocalRepresentative,
8182 #[serde(other)]
8183 #[serde(rename = "unknown")]
8184 Unknown,
8185}
8186impl GenericActionStageType {
8187 pub fn as_str(&self) -> &'static str {
8188 match *self {
8189 Self::None => "None",
8190 Self::Created => "Created",
8191 Self::ReminderInvoiceSent => "ReminderInvoiceSent",
8192 Self::DebtCollectionInvoiceSent => "DebtCollectionInvoiceSent",
8193 Self::SentToBailiff => "SentToBailiff",
8194 Self::Manual => "Manual",
8195 Self::Completed => "Completed",
8196 Self::Cancelled => "Cancelled",
8197 Self::ForeignManual => "ForeignManual",
8198 Self::AwaitingFeePayment => "AwaitingFeePayment",
8199 Self::FeeInvoiceSent => "FeeInvoiceSent",
8200 Self::InstallmentPlanInvoiceSent => "InstallmentPlanInvoiceSent",
8201 Self::InvoiceSent => "InvoiceSent",
8202 Self::Attested => "Attested",
8203 Self::DebtCollectionClaimDue => "DebtCollectionClaimDue",
8204 Self::ReturnToSourceRequested => "ReturnToSourceRequested",
8205 Self::SentToDebtCollection => "SentToDebtCollection",
8206 Self::InvoiceCreated => "InvoiceCreated",
8207 Self::PaymentSent => "PaymentSent",
8208 Self::PaymentCancelled => "PaymentCancelled",
8209 Self::SalesRequested => "SalesRequested",
8210 Self::SaleRequestAccepted => "SaleRequestAccepted",
8211 Self::SalesRequestedCancelled => "SalesRequestedCancelled",
8212 Self::SalesRequestedDenied => "SalesRequestedDenied",
8213 Self::LatePaymentInvoiceSent => "LatePaymentInvoiceSent",
8214 Self::DebtCollectionClaimResponseRequested => "DebtCollectionClaimResponseRequested",
8215 Self::ReadyForBailiff => "ReadyForBailiff",
8216 Self::LongTermSurveilance => "LongTermSurveilance",
8217 Self::VerdictObtained => "VerdictObtained",
8218 Self::SentToBailiffEnforcement => "SentToBailiffEnforcement",
8219 Self::ForeignDebtorLetterSent => "ForeignDebtorLetterSent",
8220 Self::ForeignCreditorLetterSent => "ForeignCreditorLetterSent",
8221 Self::EnforcementResponseRequested => "EnforcementResponseRequested",
8222 Self::ReadyForEnforcement => "ReadyForEnforcement",
8223 Self::ForeignSentToLocalRepresentative => "ForeignSentToLocalRepresentative",
8224 Self::Unknown => "unknown",
8225 }
8226 }
8227}
8228impl crate::AsPathParam for GenericActionStageType {
8229 fn push_to(&self, buf: &mut String) {
8230 buf.push_str(self.as_str());
8231 }
8232}
8233
8234#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8235pub enum ImportFileStateType {
8236 Queued,
8237 Succeded,
8238 Failed,
8239 #[serde(other)]
8240 #[serde(rename = "unknown")]
8241 Unknown,
8242}
8243impl ImportFileStateType {
8244 pub fn as_str(&self) -> &'static str {
8245 match *self {
8246 Self::Queued => "Queued",
8247 Self::Succeded => "Succeded",
8248 Self::Failed => "Failed",
8249 Self::Unknown => "unknown",
8250 }
8251 }
8252}
8253impl crate::AsPathParam for ImportFileStateType {
8254 fn push_to(&self, buf: &mut String) {
8255 buf.push_str(self.as_str());
8256 }
8257}
8258
8259#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8260pub enum InstallmentPlanActionStageType {
8261 None,
8262 Created,
8263 Manual,
8264 Completed,
8265 Cancelled,
8266 AwaitingFeePayment,
8267 InstallmentPlanInvoiceSent,
8268 Attested,
8269 ReturnToSourceRequested,
8270 #[serde(other)]
8271 #[serde(rename = "unknown")]
8272 Unknown,
8273}
8274impl InstallmentPlanActionStageType {
8275 pub fn as_str(&self) -> &'static str {
8276 match *self {
8277 Self::None => "None",
8278 Self::Created => "Created",
8279 Self::Manual => "Manual",
8280 Self::Completed => "Completed",
8281 Self::Cancelled => "Cancelled",
8282 Self::AwaitingFeePayment => "AwaitingFeePayment",
8283 Self::InstallmentPlanInvoiceSent => "InstallmentPlanInvoiceSent",
8284 Self::Attested => "Attested",
8285 Self::ReturnToSourceRequested => "ReturnToSourceRequested",
8286 Self::Unknown => "unknown",
8287 }
8288 }
8289}
8290impl crate::AsPathParam for InstallmentPlanActionStageType {
8291 fn push_to(&self, buf: &mut String) {
8292 buf.push_str(self.as_str());
8293 }
8294}
8295
8296#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8297pub enum InstallmentPlanSourceType {
8298 None,
8299 DebtCollectionAction,
8300 InvoiceAction,
8301 #[serde(other)]
8302 #[serde(rename = "unknown")]
8303 Unknown,
8304}
8305impl InstallmentPlanSourceType {
8306 pub fn as_str(&self) -> &'static str {
8307 match *self {
8308 Self::None => "None",
8309 Self::DebtCollectionAction => "DebtCollectionAction",
8310 Self::InvoiceAction => "InvoiceAction",
8311 Self::Unknown => "unknown",
8312 }
8313 }
8314}
8315impl crate::AsPathParam for InstallmentPlanSourceType {
8316 fn push_to(&self, buf: &mut String) {
8317 buf.push_str(self.as_str());
8318 }
8319}
8320
8321#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8322pub enum InvoiceActionStageType {
8323 None,
8324 Created,
8325 ReminderInvoiceSent,
8326 Manual,
8327 Completed,
8328 Cancelled,
8329 InvoiceSent,
8330 Attested,
8331 SentToDebtCollection,
8332 SalesRequested,
8333 SaleRequestAccepted,
8334 SalesRequestedCancelled,
8335 SalesRequestedDenied,
8336 Attesting,
8337 #[serde(other)]
8338 #[serde(rename = "unknown")]
8339 Unknown,
8340}
8341impl InvoiceActionStageType {
8342 pub fn as_str(&self) -> &'static str {
8343 match *self {
8344 Self::None => "None",
8345 Self::Created => "Created",
8346 Self::ReminderInvoiceSent => "ReminderInvoiceSent",
8347 Self::Manual => "Manual",
8348 Self::Completed => "Completed",
8349 Self::Cancelled => "Cancelled",
8350 Self::InvoiceSent => "InvoiceSent",
8351 Self::Attested => "Attested",
8352 Self::SentToDebtCollection => "SentToDebtCollection",
8353 Self::SalesRequested => "SalesRequested",
8354 Self::SaleRequestAccepted => "SaleRequestAccepted",
8355 Self::SalesRequestedCancelled => "SalesRequestedCancelled",
8356 Self::SalesRequestedDenied => "SalesRequestedDenied",
8357 Self::Attesting => "Attesting",
8358 Self::Unknown => "unknown",
8359 }
8360 }
8361}
8362impl crate::AsPathParam for InvoiceActionStageType {
8363 fn push_to(&self, buf: &mut String) {
8364 buf.push_str(self.as_str());
8365 }
8366}
8367
8368#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8369pub enum PostageType {
8370 Priority,
8371 Economy,
8372 Protected,
8373 #[serde(other)]
8374 #[serde(rename = "unknown")]
8375 Unknown,
8376}
8377impl PostageType {
8378 pub fn as_str(&self) -> &'static str {
8379 match *self {
8380 Self::Priority => "Priority",
8381 Self::Economy => "Economy",
8382 Self::Protected => "Protected",
8383 Self::Unknown => "unknown",
8384 }
8385 }
8386}
8387impl crate::AsPathParam for PostageType {
8388 fn push_to(&self, buf: &mut String) {
8389 buf.push_str(self.as_str());
8390 }
8391}
8392
8393#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8394pub enum OrderRecordType {
8395 Service,
8396 Commodity,
8397 ShippingFee,
8398 #[serde(other)]
8399 #[serde(rename = "unknown")]
8400 Unknown,
8401}
8402impl OrderRecordType {
8403 pub fn as_str(&self) -> &'static str {
8404 match *self {
8405 Self::Service => "Service",
8406 Self::Commodity => "Commodity",
8407 Self::ShippingFee => "ShippingFee",
8408 Self::Unknown => "unknown",
8409 }
8410 }
8411}
8412impl crate::AsPathParam for OrderRecordType {
8413 fn push_to(&self, buf: &mut String) {
8414 buf.push_str(self.as_str());
8415 }
8416}
8417
8418#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8419pub enum OrderStageType {
8420 Created,
8421 Completed,
8422 Cancelled,
8423 #[serde(other)]
8424 #[serde(rename = "unknown")]
8425 Unknown,
8426}
8427impl OrderStageType {
8428 pub fn as_str(&self) -> &'static str {
8429 match *self {
8430 Self::Created => "Created",
8431 Self::Completed => "Completed",
8432 Self::Cancelled => "Cancelled",
8433 Self::Unknown => "unknown",
8434 }
8435 }
8436}
8437impl crate::AsPathParam for OrderStageType {
8438 fn push_to(&self, buf: &mut String) {
8439 buf.push_str(self.as_str());
8440 }
8441}
8442
8443#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8444pub enum OrderPaymentMethodType {
8445 None,
8446 InvoiceFinancing,
8447 CreditCard,
8448 Swish,
8449 #[serde(other)]
8450 #[serde(rename = "unknown")]
8451 Unknown,
8452}
8453impl OrderPaymentMethodType {
8454 pub fn as_str(&self) -> &'static str {
8455 match *self {
8456 Self::None => "None",
8457 Self::InvoiceFinancing => "InvoiceFinancing",
8458 Self::CreditCard => "CreditCard",
8459 Self::Swish => "Swish",
8460 Self::Unknown => "unknown",
8461 }
8462 }
8463}
8464impl crate::AsPathParam for OrderPaymentMethodType {
8465 fn push_to(&self, buf: &mut String) {
8466 buf.push_str(self.as_str());
8467 }
8468}
8469
8470#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8471pub enum OrderCheckoutStatusType {
8472 Pending,
8473 Succeeded,
8474 Failed,
8475 #[serde(other)]
8476 #[serde(rename = "unknown")]
8477 Unknown,
8478}
8479impl OrderCheckoutStatusType {
8480 pub fn as_str(&self) -> &'static str {
8481 match *self {
8482 Self::Pending => "Pending",
8483 Self::Succeeded => "Succeeded",
8484 Self::Failed => "Failed",
8485 Self::Unknown => "unknown",
8486 }
8487 }
8488}
8489impl crate::AsPathParam for OrderCheckoutStatusType {
8490 fn push_to(&self, buf: &mut String) {
8491 buf.push_str(self.as_str());
8492 }
8493}
8494
8495#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8496pub enum OutgoingPaymentStatusType {
8497 Queued,
8498 Processing,
8499 Succeded,
8500 Failed,
8501 Aborted,
8502 #[serde(other)]
8503 #[serde(rename = "unknown")]
8504 Unknown,
8505}
8506impl OutgoingPaymentStatusType {
8507 pub fn as_str(&self) -> &'static str {
8508 match *self {
8509 Self::Queued => "Queued",
8510 Self::Processing => "Processing",
8511 Self::Succeded => "Succeded",
8512 Self::Failed => "Failed",
8513 Self::Aborted => "Aborted",
8514 Self::Unknown => "unknown",
8515 }
8516 }
8517}
8518impl crate::AsPathParam for OutgoingPaymentStatusType {
8519 fn push_to(&self, buf: &mut String) {
8520 buf.push_str(self.as_str());
8521 }
8522}
8523
8524#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8525pub enum ReceivingPaymentMethodType {
8526 BankGiro,
8527 PlusGiro,
8528 BankAccount,
8529 Iban,
8530 #[serde(other)]
8531 #[serde(rename = "unknown")]
8532 Unknown,
8533}
8534impl ReceivingPaymentMethodType {
8535 pub fn as_str(&self) -> &'static str {
8536 match *self {
8537 Self::BankGiro => "BankGiro",
8538 Self::PlusGiro => "PlusGiro",
8539 Self::BankAccount => "BankAccount",
8540 Self::Iban => "Iban",
8541 Self::Unknown => "unknown",
8542 }
8543 }
8544}
8545impl crate::AsPathParam for ReceivingPaymentMethodType {
8546 fn push_to(&self, buf: &mut String) {
8547 buf.push_str(self.as_str());
8548 }
8549}
8550
8551#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8552pub enum SupplierPaymentMethodType {
8553 BankGiro,
8554 PlusGiro,
8555 BankAccount,
8556 #[serde(rename = "IBAN")]
8557 Iban,
8558 #[serde(other)]
8559 #[serde(rename = "unknown")]
8560 Unknown,
8561}
8562impl SupplierPaymentMethodType {
8563 pub fn as_str(&self) -> &'static str {
8564 match *self {
8565 Self::BankGiro => "BankGiro",
8566 Self::PlusGiro => "PlusGiro",
8567 Self::BankAccount => "BankAccount",
8568 Self::Iban => "IBAN",
8569 Self::Unknown => "unknown",
8570 }
8571 }
8572}
8573impl crate::AsPathParam for SupplierPaymentMethodType {
8574 fn push_to(&self, buf: &mut String) {
8575 buf.push_str(self.as_str());
8576 }
8577}
8578
8579#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8580pub enum OutgoingPaymentType {
8581 Bankgiro,
8582 P27,
8583 #[serde(other)]
8584 #[serde(rename = "unknown")]
8585 Unknown,
8586}
8587impl OutgoingPaymentType {
8588 pub fn as_str(&self) -> &'static str {
8589 match *self {
8590 Self::Bankgiro => "Bankgiro",
8591 Self::P27 => "P27",
8592 Self::Unknown => "unknown",
8593 }
8594 }
8595}
8596impl crate::AsPathParam for OutgoingPaymentType {
8597 fn push_to(&self, buf: &mut String) {
8598 buf.push_str(self.as_str());
8599 }
8600}
8601
8602#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8603pub enum P27CategoryPurposeType {
8604 #[serde(rename = "SUPP")]
8605 Supp,
8606 #[serde(rename = "CORT")]
8607 Cort,
8608 #[serde(rename = "INTC")]
8609 Intc,
8610 #[serde(rename = "TREA")]
8611 Trea,
8612 #[serde(rename = "SALA")]
8613 Sala,
8614 #[serde(rename = "TAXS")]
8615 Taxs,
8616 #[serde(rename = "PENS")]
8617 Pens,
8618 #[serde(other)]
8619 #[serde(rename = "unknown")]
8620 Unknown,
8621}
8622impl P27CategoryPurposeType {
8623 pub fn as_str(&self) -> &'static str {
8624 match *self {
8625 Self::Supp => "SUPP",
8626 Self::Cort => "CORT",
8627 Self::Intc => "INTC",
8628 Self::Trea => "TREA",
8629 Self::Sala => "SALA",
8630 Self::Taxs => "TAXS",
8631 Self::Pens => "PENS",
8632 Self::Unknown => "unknown",
8633 }
8634 }
8635}
8636impl crate::AsPathParam for P27CategoryPurposeType {
8637 fn push_to(&self, buf: &mut String) {
8638 buf.push_str(self.as_str());
8639 }
8640}
8641
8642#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8643pub enum P27ChargeBearerType {
8644 #[serde(rename = "SHAR")]
8645 Shar,
8646 #[serde(rename = "CRED")]
8647 Cred,
8648 #[serde(rename = "DEBT")]
8649 Debt,
8650 #[serde(rename = "SLEV")]
8651 Slev,
8652 #[serde(other)]
8653 #[serde(rename = "unknown")]
8654 Unknown,
8655}
8656impl P27ChargeBearerType {
8657 pub fn as_str(&self) -> &'static str {
8658 match *self {
8659 Self::Shar => "SHAR",
8660 Self::Cred => "CRED",
8661 Self::Debt => "DEBT",
8662 Self::Slev => "SLEV",
8663 Self::Unknown => "unknown",
8664 }
8665 }
8666}
8667impl crate::AsPathParam for P27ChargeBearerType {
8668 fn push_to(&self, buf: &mut String) {
8669 buf.push_str(self.as_str());
8670 }
8671}
8672
8673#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8674pub enum P27CodeType {
8675 #[serde(rename = "NURG")]
8676 Nurg,
8677 #[serde(rename = "URGP")]
8678 Urgp,
8679 #[serde(rename = "SEPA")]
8680 Sepa,
8681 #[serde(other)]
8682 #[serde(rename = "unknown")]
8683 Unknown,
8684}
8685impl P27CodeType {
8686 pub fn as_str(&self) -> &'static str {
8687 match *self {
8688 Self::Nurg => "NURG",
8689 Self::Urgp => "URGP",
8690 Self::Sepa => "SEPA",
8691 Self::Unknown => "unknown",
8692 }
8693 }
8694}
8695impl crate::AsPathParam for P27CodeType {
8696 fn push_to(&self, buf: &mut String) {
8697 buf.push_str(self.as_str());
8698 }
8699}
8700
8701#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8702pub enum P27MethodType {
8703 #[serde(rename = "TRF")]
8704 Trf,
8705 #[serde(rename = "CHK")]
8706 Chk,
8707 #[serde(other)]
8708 #[serde(rename = "unknown")]
8709 Unknown,
8710}
8711impl P27MethodType {
8712 pub fn as_str(&self) -> &'static str {
8713 match *self {
8714 Self::Trf => "TRF",
8715 Self::Chk => "CHK",
8716 Self::Unknown => "unknown",
8717 }
8718 }
8719}
8720impl crate::AsPathParam for P27MethodType {
8721 fn push_to(&self, buf: &mut String) {
8722 buf.push_str(self.as_str());
8723 }
8724}
8725
8726#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8727pub enum ProductType {
8728 Service,
8729 Commodity,
8730 Package,
8731 #[serde(rename = "VAT")]
8732 Vat,
8733 #[serde(other)]
8734 #[serde(rename = "unknown")]
8735 Unknown,
8736}
8737impl ProductType {
8738 pub fn as_str(&self) -> &'static str {
8739 match *self {
8740 Self::Service => "Service",
8741 Self::Commodity => "Commodity",
8742 Self::Package => "Package",
8743 Self::Vat => "VAT",
8744 Self::Unknown => "unknown",
8745 }
8746 }
8747}
8748impl crate::AsPathParam for ProductType {
8749 fn push_to(&self, buf: &mut String) {
8750 buf.push_str(self.as_str());
8751 }
8752}
8753
8754#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8755pub enum ProjectStatusType {
8756 NotStarted,
8757 Ongoing,
8758 Compelted,
8759 #[serde(other)]
8760 #[serde(rename = "unknown")]
8761 Unknown,
8762}
8763impl ProjectStatusType {
8764 pub fn as_str(&self) -> &'static str {
8765 match *self {
8766 Self::NotStarted => "NotStarted",
8767 Self::Ongoing => "Ongoing",
8768 Self::Compelted => "Compelted",
8769 Self::Unknown => "unknown",
8770 }
8771 }
8772}
8773impl crate::AsPathParam for ProjectStatusType {
8774 fn push_to(&self, buf: &mut String) {
8775 buf.push_str(self.as_str());
8776 }
8777}
8778
8779#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8780pub enum ReconciliationInvoiceActionStageType {
8781 None,
8782 Created,
8783 Completed,
8784 InvoiceSent,
8785 SentToDebtCollection,
8786 #[serde(other)]
8787 #[serde(rename = "unknown")]
8788 Unknown,
8789}
8790impl ReconciliationInvoiceActionStageType {
8791 pub fn as_str(&self) -> &'static str {
8792 match *self {
8793 Self::None => "None",
8794 Self::Created => "Created",
8795 Self::Completed => "Completed",
8796 Self::InvoiceSent => "InvoiceSent",
8797 Self::SentToDebtCollection => "SentToDebtCollection",
8798 Self::Unknown => "unknown",
8799 }
8800 }
8801}
8802impl crate::AsPathParam for ReconciliationInvoiceActionStageType {
8803 fn push_to(&self, buf: &mut String) {
8804 buf.push_str(self.as_str());
8805 }
8806}
8807
8808#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8809pub enum RegisterPaymentOverShootingAmountHandlingType {
8810 None,
8811 AsCurrencyDifference,
8812 AsOverPayments,
8813 #[serde(other)]
8814 #[serde(rename = "unknown")]
8815 Unknown,
8816}
8817impl RegisterPaymentOverShootingAmountHandlingType {
8818 pub fn as_str(&self) -> &'static str {
8819 match *self {
8820 Self::None => "None",
8821 Self::AsCurrencyDifference => "AsCurrencyDifference",
8822 Self::AsOverPayments => "AsOverPayments",
8823 Self::Unknown => "unknown",
8824 }
8825 }
8826}
8827impl crate::AsPathParam for RegisterPaymentOverShootingAmountHandlingType {
8828 fn push_to(&self, buf: &mut String) {
8829 buf.push_str(self.as_str());
8830 }
8831}
8832
8833#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8834pub enum SelfInvoiceActionStageType {
8835 None,
8836 Created,
8837 Manual,
8838 Completed,
8839 Cancelled,
8840 InvoiceSent,
8841 Attested,
8842 PaymentSent,
8843 PaymentCancelled,
8844 #[serde(other)]
8845 #[serde(rename = "unknown")]
8846 Unknown,
8847}
8848impl SelfInvoiceActionStageType {
8849 pub fn as_str(&self) -> &'static str {
8850 match *self {
8851 Self::None => "None",
8852 Self::Created => "Created",
8853 Self::Manual => "Manual",
8854 Self::Completed => "Completed",
8855 Self::Cancelled => "Cancelled",
8856 Self::InvoiceSent => "InvoiceSent",
8857 Self::Attested => "Attested",
8858 Self::PaymentSent => "PaymentSent",
8859 Self::PaymentCancelled => "PaymentCancelled",
8860 Self::Unknown => "unknown",
8861 }
8862 }
8863}
8864impl crate::AsPathParam for SelfInvoiceActionStageType {
8865 fn push_to(&self, buf: &mut String) {
8866 buf.push_str(self.as_str());
8867 }
8868}
8869
8870#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8871pub enum SupplierInvoiceActionStageType {
8872 None,
8873 Created,
8874 Manual,
8875 Completed,
8876 Cancelled,
8877 Attested,
8878 PaymentSent,
8879 PaymentCancelled,
8880 #[serde(other)]
8881 #[serde(rename = "unknown")]
8882 Unknown,
8883}
8884impl SupplierInvoiceActionStageType {
8885 pub fn as_str(&self) -> &'static str {
8886 match *self {
8887 Self::None => "None",
8888 Self::Created => "Created",
8889 Self::Manual => "Manual",
8890 Self::Completed => "Completed",
8891 Self::Cancelled => "Cancelled",
8892 Self::Attested => "Attested",
8893 Self::PaymentSent => "PaymentSent",
8894 Self::PaymentCancelled => "PaymentCancelled",
8895 Self::Unknown => "unknown",
8896 }
8897 }
8898}
8899impl crate::AsPathParam for SupplierInvoiceActionStageType {
8900 fn push_to(&self, buf: &mut String) {
8901 buf.push_str(self.as_str());
8902 }
8903}
8904
8905#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8906pub enum OriginType {
8907 InternalApi,
8908 FortnoxOrder,
8909 InternalSystem,
8910 Fortnox,
8911 PeAccountingInvoice,
8912 Kommed,
8913 #[serde(other)]
8914 #[serde(rename = "unknown")]
8915 Unknown,
8916}
8917impl OriginType {
8918 pub fn as_str(&self) -> &'static str {
8919 match *self {
8920 Self::InternalApi => "InternalApi",
8921 Self::FortnoxOrder => "FortnoxOrder",
8922 Self::InternalSystem => "InternalSystem",
8923 Self::Fortnox => "Fortnox",
8924 Self::PeAccountingInvoice => "PeAccountingInvoice",
8925 Self::Kommed => "Kommed",
8926 Self::Unknown => "unknown",
8927 }
8928 }
8929}
8930impl crate::AsPathParam for OriginType {
8931 fn push_to(&self, buf: &mut String) {
8932 buf.push_str(self.as_str());
8933 }
8934}
8935
8936#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8937pub enum ActionSearchStatusType {
8938 All,
8939 Open,
8940 Closed,
8941 WithInvoiceReminder,
8942 WithoutInvoiceReminder,
8943 #[serde(other)]
8944 #[serde(rename = "unknown")]
8945 Unknown,
8946}
8947impl ActionSearchStatusType {
8948 pub fn as_str(&self) -> &'static str {
8949 match *self {
8950 Self::All => "All",
8951 Self::Open => "Open",
8952 Self::Closed => "Closed",
8953 Self::WithInvoiceReminder => "WithInvoiceReminder",
8954 Self::WithoutInvoiceReminder => "WithoutInvoiceReminder",
8955 Self::Unknown => "unknown",
8956 }
8957 }
8958}
8959impl crate::AsPathParam for ActionSearchStatusType {
8960 fn push_to(&self, buf: &mut String) {
8961 buf.push_str(self.as_str());
8962 }
8963}
8964
8965#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8966pub enum RotRutSearchFilterType {
8967 NoFilter,
8968 #[serde(rename = "ROT")]
8969 Rot,
8970 #[serde(rename = "RUT")]
8971 Rut,
8972 #[serde(other)]
8973 #[serde(rename = "unknown")]
8974 Unknown,
8975}
8976impl RotRutSearchFilterType {
8977 pub fn as_str(&self) -> &'static str {
8978 match *self {
8979 Self::NoFilter => "NoFilter",
8980 Self::Rot => "ROT",
8981 Self::Rut => "RUT",
8982 Self::Unknown => "unknown",
8983 }
8984 }
8985}
8986impl crate::AsPathParam for RotRutSearchFilterType {
8987 fn push_to(&self, buf: &mut String) {
8988 buf.push_str(self.as_str());
8989 }
8990}
8991
8992#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
8993pub enum SwishStatusType {
8994 Created,
8995 Declined,
8996 Error,
8997 Paid,
8998 Cancelled,
8999 Refunded,
9000 #[serde(other)]
9001 #[serde(rename = "unknown")]
9002 Unknown,
9003}
9004impl SwishStatusType {
9005 pub fn as_str(&self) -> &'static str {
9006 match *self {
9007 Self::Created => "Created",
9008 Self::Declined => "Declined",
9009 Self::Error => "Error",
9010 Self::Paid => "Paid",
9011 Self::Cancelled => "Cancelled",
9012 Self::Refunded => "Refunded",
9013 Self::Unknown => "unknown",
9014 }
9015 }
9016}
9017impl crate::AsPathParam for SwishStatusType {
9018 fn push_to(&self, buf: &mut String) {
9019 buf.push_str(self.as_str());
9020 }
9021}
9022
9023#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9024pub enum ActivationPolicyType {
9025 DisabledForExceptionList,
9026 AllowedForExceptionList,
9027 #[serde(other)]
9028 #[serde(rename = "unknown")]
9029 Unknown,
9030}
9031impl ActivationPolicyType {
9032 pub fn as_str(&self) -> &'static str {
9033 match *self {
9034 Self::DisabledForExceptionList => "DisabledForExceptionList",
9035 Self::AllowedForExceptionList => "AllowedForExceptionList",
9036 Self::Unknown => "unknown",
9037 }
9038 }
9039}
9040impl crate::AsPathParam for ActivationPolicyType {
9041 fn push_to(&self, buf: &mut String) {
9042 buf.push_str(self.as_str());
9043 }
9044}
9045
9046#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9047pub enum AutogiroApprovalCommentCode {
9048 CancelledByPayerOrBank,
9049 AccountTypeNotApprovedForAutogiro,
9050 ApprovalIsMissingAtBankgirot,
9051 WrongBankOrPersonDetails,
9052 MakulatedDueToUnrespondedAccountRequest,
9053 PayerBankgiroMissing,
9054 ApprovalAlreadyExists,
9055 WrongOrgnoOrContract,
9056 WrongPayerNumber,
9057 WrongBankAccount,
9058 WrongReceiverBankgiro,
9059 ReceiverBankgiroIsUnregistered,
9060 NewApproval,
9061 Makulated,
9062 ApprovalIsMakulatedDueToMakulatedPayerBankgiroNumber,
9063 #[serde(other)]
9064 #[serde(rename = "unknown")]
9065 Unknown,
9066}
9067impl AutogiroApprovalCommentCode {
9068 pub fn as_str(&self) -> &'static str {
9069 match *self {
9070 Self::CancelledByPayerOrBank => "CancelledByPayerOrBank",
9071 Self::AccountTypeNotApprovedForAutogiro => "AccountTypeNotApprovedForAutogiro",
9072 Self::ApprovalIsMissingAtBankgirot => "ApprovalIsMissingAtBankgirot",
9073 Self::WrongBankOrPersonDetails => "WrongBankOrPersonDetails",
9074 Self::MakulatedDueToUnrespondedAccountRequest => {
9075 "MakulatedDueToUnrespondedAccountRequest"
9076 }
9077 Self::PayerBankgiroMissing => "PayerBankgiroMissing",
9078 Self::ApprovalAlreadyExists => "ApprovalAlreadyExists",
9079 Self::WrongOrgnoOrContract => "WrongOrgnoOrContract",
9080 Self::WrongPayerNumber => "WrongPayerNumber",
9081 Self::WrongBankAccount => "WrongBankAccount",
9082 Self::WrongReceiverBankgiro => "WrongReceiverBankgiro",
9083 Self::ReceiverBankgiroIsUnregistered => "ReceiverBankgiroIsUnregistered",
9084 Self::NewApproval => "NewApproval",
9085 Self::Makulated => "Makulated",
9086 Self::ApprovalIsMakulatedDueToMakulatedPayerBankgiroNumber => {
9087 "ApprovalIsMakulatedDueToMakulatedPayerBankgiroNumber"
9088 }
9089 Self::Unknown => "unknown",
9090 }
9091 }
9092}
9093impl crate::AsPathParam for AutogiroApprovalCommentCode {
9094 fn push_to(&self, buf: &mut String) {
9095 buf.push_str(self.as_str());
9096 }
9097}
9098
9099#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9100pub enum AutogiroCompatibleType {
9101 Approved,
9102 Unapproved,
9103 #[serde(other)]
9104 #[serde(rename = "unknown")]
9105 Unknown,
9106}
9107impl AutogiroCompatibleType {
9108 pub fn as_str(&self) -> &'static str {
9109 match *self {
9110 Self::Approved => "Approved",
9111 Self::Unapproved => "Unapproved",
9112 Self::Unknown => "unknown",
9113 }
9114 }
9115}
9116impl crate::AsPathParam for AutogiroCompatibleType {
9117 fn push_to(&self, buf: &mut String) {
9118 buf.push_str(self.as_str());
9119 }
9120}
9121
9122#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9123pub enum AutogiroWithdrawalCommentCode {
9124 NoCoverage,
9125 PaymentFailed,
9126 WrongPaymentDate,
9127 WrongPayerNumber,
9128 WrongDebitingCode,
9129 WrongAmount,
9130 WrongNewPaymentDate,
9131 WrongReceiverBankgiroNumber,
9132 ReceiverBankgironumberIsMissing,
9133 Cancelled,
9134 PaymentIsMissing,
9135 ChangedPaymentDate,
9136 NotChangedRenewingJob,
9137 ExpiresApprovalMissing,
9138 ExpiresAccountNotApprovedOrClosed,
9139 WrongPeriodCode,
9140 WrongAmountSelfRenewedAssignments,
9141 AmountNotNumeric,
9142 ForbiddenForWithdraws,
9143 #[serde(rename = "BankgiroNoMissingAtBGC")]
9144 BankgiroNoMissingAtBgc,
9145 PassedPaymentDate,
9146 ReceiverBgNoIsNotSameOnOpeningPostAsTransactionPost,
9147 AmountExceedsMaximunAmount,
9148 #[serde(other)]
9149 #[serde(rename = "unknown")]
9150 Unknown,
9151}
9152impl AutogiroWithdrawalCommentCode {
9153 pub fn as_str(&self) -> &'static str {
9154 match *self {
9155 Self::NoCoverage => "NoCoverage",
9156 Self::PaymentFailed => "PaymentFailed",
9157 Self::WrongPaymentDate => "WrongPaymentDate",
9158 Self::WrongPayerNumber => "WrongPayerNumber",
9159 Self::WrongDebitingCode => "WrongDebitingCode",
9160 Self::WrongAmount => "WrongAmount",
9161 Self::WrongNewPaymentDate => "WrongNewPaymentDate",
9162 Self::WrongReceiverBankgiroNumber => "WrongReceiverBankgiroNumber",
9163 Self::ReceiverBankgironumberIsMissing => "ReceiverBankgironumberIsMissing",
9164 Self::Cancelled => "Cancelled",
9165 Self::PaymentIsMissing => "PaymentIsMissing",
9166 Self::ChangedPaymentDate => "ChangedPaymentDate",
9167 Self::NotChangedRenewingJob => "NotChangedRenewingJob",
9168 Self::ExpiresApprovalMissing => "ExpiresApprovalMissing",
9169 Self::ExpiresAccountNotApprovedOrClosed => "ExpiresAccountNotApprovedOrClosed",
9170 Self::WrongPeriodCode => "WrongPeriodCode",
9171 Self::WrongAmountSelfRenewedAssignments => "WrongAmountSelfRenewedAssignments",
9172 Self::AmountNotNumeric => "AmountNotNumeric",
9173 Self::ForbiddenForWithdraws => "ForbiddenForWithdraws",
9174 Self::BankgiroNoMissingAtBgc => "BankgiroNoMissingAtBGC",
9175 Self::PassedPaymentDate => "PassedPaymentDate",
9176 Self::ReceiverBgNoIsNotSameOnOpeningPostAsTransactionPost => {
9177 "ReceiverBgNoIsNotSameOnOpeningPostAsTransactionPost"
9178 }
9179 Self::AmountExceedsMaximunAmount => "AmountExceedsMaximunAmount",
9180 Self::Unknown => "unknown",
9181 }
9182 }
9183}
9184impl crate::AsPathParam for AutogiroWithdrawalCommentCode {
9185 fn push_to(&self, buf: &mut String) {
9186 buf.push_str(self.as_str());
9187 }
9188}
9189
9190#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9191pub enum CreditorShareTargetType {
9192 Owner,
9193 Contributor,
9194 #[serde(other)]
9195 #[serde(rename = "unknown")]
9196 Unknown,
9197}
9198impl CreditorShareTargetType {
9199 pub fn as_str(&self) -> &'static str {
9200 match *self {
9201 Self::Owner => "Owner",
9202 Self::Contributor => "Contributor",
9203 Self::Unknown => "unknown",
9204 }
9205 }
9206}
9207impl crate::AsPathParam for CreditorShareTargetType {
9208 fn push_to(&self, buf: &mut String) {
9209 buf.push_str(self.as_str());
9210 }
9211}
9212
9213#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9214pub enum DebtorContractPeriodType {
9215 Undefined,
9216 Months,
9217 Quarters,
9218 Years,
9219 #[serde(other)]
9220 #[serde(rename = "unknown")]
9221 Unknown,
9222}
9223impl DebtorContractPeriodType {
9224 pub fn as_str(&self) -> &'static str {
9225 match *self {
9226 Self::Undefined => "Undefined",
9227 Self::Months => "Months",
9228 Self::Quarters => "Quarters",
9229 Self::Years => "Years",
9230 Self::Unknown => "unknown",
9231 }
9232 }
9233}
9234impl crate::AsPathParam for DebtorContractPeriodType {
9235 fn push_to(&self, buf: &mut String) {
9236 buf.push_str(self.as_str());
9237 }
9238}
9239
9240#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9241pub enum DebtorContractStateType {
9242 Undefined,
9243 Draft,
9244 Unsigned,
9245 Signed,
9246 Financed,
9247 Cancelled,
9248 #[serde(other)]
9249 #[serde(rename = "unknown")]
9250 Unknown,
9251}
9252impl DebtorContractStateType {
9253 pub fn as_str(&self) -> &'static str {
9254 match *self {
9255 Self::Undefined => "Undefined",
9256 Self::Draft => "Draft",
9257 Self::Unsigned => "Unsigned",
9258 Self::Signed => "Signed",
9259 Self::Financed => "Financed",
9260 Self::Cancelled => "Cancelled",
9261 Self::Unknown => "unknown",
9262 }
9263 }
9264}
9265impl crate::AsPathParam for DebtorContractStateType {
9266 fn push_to(&self, buf: &mut String) {
9267 buf.push_str(self.as_str());
9268 }
9269}
9270
9271#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9272pub enum KycOwnershipLevelType {
9273 None,
9274 MoreThan0ButNoteMoreThan25,
9275 MoreThan25ButNoteMoreThan50,
9276 MoreThan50ButNoteMoreThan75,
9277 MoreThan75ButNoteMoreThan100,
9278 All100,
9279 #[serde(other)]
9280 #[serde(rename = "unknown")]
9281 Unknown,
9282}
9283impl KycOwnershipLevelType {
9284 pub fn as_str(&self) -> &'static str {
9285 match *self {
9286 Self::None => "None",
9287 Self::MoreThan0ButNoteMoreThan25 => "MoreThan0ButNoteMoreThan25",
9288 Self::MoreThan25ButNoteMoreThan50 => "MoreThan25ButNoteMoreThan50",
9289 Self::MoreThan50ButNoteMoreThan75 => "MoreThan50ButNoteMoreThan75",
9290 Self::MoreThan75ButNoteMoreThan100 => "MoreThan75ButNoteMoreThan100",
9291 Self::All100 => "All100",
9292 Self::Unknown => "unknown",
9293 }
9294 }
9295}
9296impl crate::AsPathParam for KycOwnershipLevelType {
9297 fn push_to(&self, buf: &mut String) {
9298 buf.push_str(self.as_str());
9299 }
9300}
9301
9302#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9303pub enum PaymentFrequencyType {
9304 Monthly,
9305 #[serde(other)]
9306 #[serde(rename = "unknown")]
9307 Unknown,
9308}
9309impl PaymentFrequencyType {
9310 pub fn as_str(&self) -> &'static str {
9311 match *self {
9312 Self::Monthly => "Monthly",
9313 Self::Unknown => "unknown",
9314 }
9315 }
9316}
9317impl crate::AsPathParam for PaymentFrequencyType {
9318 fn push_to(&self, buf: &mut String) {
9319 buf.push_str(self.as_str());
9320 }
9321}
9322
9323#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9324pub enum StripeAccountType {
9325 Account,
9326 ConnectedAccount,
9327 #[serde(other)]
9328 #[serde(rename = "unknown")]
9329 Unknown,
9330}
9331impl StripeAccountType {
9332 pub fn as_str(&self) -> &'static str {
9333 match *self {
9334 Self::Account => "Account",
9335 Self::ConnectedAccount => "ConnectedAccount",
9336 Self::Unknown => "unknown",
9337 }
9338 }
9339}
9340impl crate::AsPathParam for StripeAccountType {
9341 fn push_to(&self, buf: &mut String) {
9342 buf.push_str(self.as_str());
9343 }
9344}
9345
9346#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9347pub enum SwishPaymentStatusType {
9348 Created,
9349 Declined,
9350 Error,
9351 Paid,
9352 Cancelled,
9353 #[serde(other)]
9354 #[serde(rename = "unknown")]
9355 Unknown,
9356}
9357impl SwishPaymentStatusType {
9358 pub fn as_str(&self) -> &'static str {
9359 match *self {
9360 Self::Created => "Created",
9361 Self::Declined => "Declined",
9362 Self::Error => "Error",
9363 Self::Paid => "Paid",
9364 Self::Cancelled => "Cancelled",
9365 Self::Unknown => "unknown",
9366 }
9367 }
9368}
9369impl crate::AsPathParam for SwishPaymentStatusType {
9370 fn push_to(&self, buf: &mut String) {
9371 buf.push_str(self.as_str());
9372 }
9373}
9374
9375#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9376pub enum UnhandledPaymentStateType {
9377 Unhandled,
9378 UsedOnInvoice,
9379 UsedOnInvoiceInOtherCreditor,
9380 Deleted,
9381 RepaymentPending,
9382 Repaid,
9383 #[serde(other)]
9384 #[serde(rename = "unknown")]
9385 Unknown,
9386}
9387impl UnhandledPaymentStateType {
9388 pub fn as_str(&self) -> &'static str {
9389 match *self {
9390 Self::Unhandled => "Unhandled",
9391 Self::UsedOnInvoice => "UsedOnInvoice",
9392 Self::UsedOnInvoiceInOtherCreditor => "UsedOnInvoiceInOtherCreditor",
9393 Self::Deleted => "Deleted",
9394 Self::RepaymentPending => "RepaymentPending",
9395 Self::Repaid => "Repaid",
9396 Self::Unknown => "unknown",
9397 }
9398 }
9399}
9400impl crate::AsPathParam for UnhandledPaymentStateType {
9401 fn push_to(&self, buf: &mut String) {
9402 buf.push_str(self.as_str());
9403 }
9404}
9405
9406#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9407pub enum UnhandledPaymentType {
9408 UnmatchedPayment,
9409 OverPayment,
9410 ManualBalance,
9411 BalanceFromInvoice,
9412 #[serde(other)]
9413 #[serde(rename = "unknown")]
9414 Unknown,
9415}
9416impl UnhandledPaymentType {
9417 pub fn as_str(&self) -> &'static str {
9418 match *self {
9419 Self::UnmatchedPayment => "UnmatchedPayment",
9420 Self::OverPayment => "OverPayment",
9421 Self::ManualBalance => "ManualBalance",
9422 Self::BalanceFromInvoice => "BalanceFromInvoice",
9423 Self::Unknown => "unknown",
9424 }
9425 }
9426}
9427impl crate::AsPathParam for UnhandledPaymentType {
9428 fn push_to(&self, buf: &mut String) {
9429 buf.push_str(self.as_str());
9430 }
9431}
9432
9433#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
9434pub enum WebhookTriggerType {
9435 InvoiceActionCreated,
9436 ReconciliationInvoiceActionCreated,
9437 InvoiceActionAttested,
9438 InvoicePaymentReceived,
9439 SelfInvoiceOutgoingPaymentSucceeded,
9440 SupplierInvoiceOutgoingPaymentSucceeded,
9441 OutgoingPaymentSucceeded,
9442 SelfInvoiceOutgoingPaymentFailed,
9443 SupplierInvoiceOutgoingPaymentFailed,
9444 OutgoingPaymentFailed,
9445 UnmatchedPayment,
9446 Overpayment,
9447 CreditorShared,
9448 CreditorUnshared,
9449 DebtorCreated,
9450 DebtorUpdated,
9451 DebtorDeleted,
9452 UnknownEInvoiceRegistration,
9453 CreditorCreated,
9454 CreditorUpdated,
9455 CreditorDeleted,
9456 InvoiceActionPaid,
9457 InvoiceActionStateChanged,
9458 DebtorInformationCorrectionRequested,
9459 InvoiceActionViewed,
9460 InvoiceActionOpened,
9461 InvoiceActionReceived,
9462 UndeliveredInvoice,
9463 AutogiroApprovalFailed,
9464 AutogiroWithdrawalFailedOnInvoice,
9465 AutogiroWithdrawalFailedOnReconciliationInvoice,
9466 InvoiceSaleWasAccepted,
9467 InvoiceSaleWasDenied,
9468 AutogiroApprovalChanged,
9469 AutogiroWithdrawalRenewedOnInvoice,
9470 AutogiroWithdrawalRenewedOnReconciliationInvoice,
9471 InvoiceCommented,
9472 AmountCreditedOnInvoice,
9473 AmountWrittenOffOnInvoice,
9474 ProductCreated,
9475 ProductUpdated,
9476 ContractInvoiceActionCreated,
9477 ContractInvoiceActionUpdated,
9478 CreditCardWithdrawalFailedOnInvoice,
9479 CreditCardWithdrawalFailedOnReconciliationInvoice,
9480 DebtCollectionActionStateChanged,
9481 #[serde(rename = "CreditorKYCUpdated")]
9482 CreditorKycUpdated,
9483 InvoiceActionDeleted,
9484 DebtorContractCancelled,
9485 DebtorContractSigned,
9486 DebtorContractCreated,
9487 DebtorContractArchived,
9488 DailyNotification,
9489 PaymentReceivedToBillectaClientFunds,
9490 InvoiceActionUpdated,
9491 SelfInvoiceActionCreated,
9492 SelfInvoiceActionAttested,
9493 SelfInvoiceActionPaid,
9494 SelfInvoiceActionUpdated,
9495 SelfInvoiceActionDeleted,
9496 ReminderInvoiceActionCreated,
9497 EInvoiceInfoOnDebtorChanged,
9498 #[serde(other)]
9499 #[serde(rename = "unknown")]
9500 Unknown,
9501}
9502impl WebhookTriggerType {
9503 pub fn as_str(&self) -> &'static str {
9504 match *self {
9505 Self::InvoiceActionCreated => "InvoiceActionCreated",
9506 Self::ReconciliationInvoiceActionCreated => "ReconciliationInvoiceActionCreated",
9507 Self::InvoiceActionAttested => "InvoiceActionAttested",
9508 Self::InvoicePaymentReceived => "InvoicePaymentReceived",
9509 Self::SelfInvoiceOutgoingPaymentSucceeded => "SelfInvoiceOutgoingPaymentSucceeded",
9510 Self::SupplierInvoiceOutgoingPaymentSucceeded => {
9511 "SupplierInvoiceOutgoingPaymentSucceeded"
9512 }
9513 Self::OutgoingPaymentSucceeded => "OutgoingPaymentSucceeded",
9514 Self::SelfInvoiceOutgoingPaymentFailed => "SelfInvoiceOutgoingPaymentFailed",
9515 Self::SupplierInvoiceOutgoingPaymentFailed => "SupplierInvoiceOutgoingPaymentFailed",
9516 Self::OutgoingPaymentFailed => "OutgoingPaymentFailed",
9517 Self::UnmatchedPayment => "UnmatchedPayment",
9518 Self::Overpayment => "Overpayment",
9519 Self::CreditorShared => "CreditorShared",
9520 Self::CreditorUnshared => "CreditorUnshared",
9521 Self::DebtorCreated => "DebtorCreated",
9522 Self::DebtorUpdated => "DebtorUpdated",
9523 Self::DebtorDeleted => "DebtorDeleted",
9524 Self::UnknownEInvoiceRegistration => "UnknownEInvoiceRegistration",
9525 Self::CreditorCreated => "CreditorCreated",
9526 Self::CreditorUpdated => "CreditorUpdated",
9527 Self::CreditorDeleted => "CreditorDeleted",
9528 Self::InvoiceActionPaid => "InvoiceActionPaid",
9529 Self::InvoiceActionStateChanged => "InvoiceActionStateChanged",
9530 Self::DebtorInformationCorrectionRequested => "DebtorInformationCorrectionRequested",
9531 Self::InvoiceActionViewed => "InvoiceActionViewed",
9532 Self::InvoiceActionOpened => "InvoiceActionOpened",
9533 Self::InvoiceActionReceived => "InvoiceActionReceived",
9534 Self::UndeliveredInvoice => "UndeliveredInvoice",
9535 Self::AutogiroApprovalFailed => "AutogiroApprovalFailed",
9536 Self::AutogiroWithdrawalFailedOnInvoice => "AutogiroWithdrawalFailedOnInvoice",
9537 Self::AutogiroWithdrawalFailedOnReconciliationInvoice => {
9538 "AutogiroWithdrawalFailedOnReconciliationInvoice"
9539 }
9540 Self::InvoiceSaleWasAccepted => "InvoiceSaleWasAccepted",
9541 Self::InvoiceSaleWasDenied => "InvoiceSaleWasDenied",
9542 Self::AutogiroApprovalChanged => "AutogiroApprovalChanged",
9543 Self::AutogiroWithdrawalRenewedOnInvoice => "AutogiroWithdrawalRenewedOnInvoice",
9544 Self::AutogiroWithdrawalRenewedOnReconciliationInvoice => {
9545 "AutogiroWithdrawalRenewedOnReconciliationInvoice"
9546 }
9547 Self::InvoiceCommented => "InvoiceCommented",
9548 Self::AmountCreditedOnInvoice => "AmountCreditedOnInvoice",
9549 Self::AmountWrittenOffOnInvoice => "AmountWrittenOffOnInvoice",
9550 Self::ProductCreated => "ProductCreated",
9551 Self::ProductUpdated => "ProductUpdated",
9552 Self::ContractInvoiceActionCreated => "ContractInvoiceActionCreated",
9553 Self::ContractInvoiceActionUpdated => "ContractInvoiceActionUpdated",
9554 Self::CreditCardWithdrawalFailedOnInvoice => "CreditCardWithdrawalFailedOnInvoice",
9555 Self::CreditCardWithdrawalFailedOnReconciliationInvoice => {
9556 "CreditCardWithdrawalFailedOnReconciliationInvoice"
9557 }
9558 Self::DebtCollectionActionStateChanged => "DebtCollectionActionStateChanged",
9559 Self::CreditorKycUpdated => "CreditorKYCUpdated",
9560 Self::InvoiceActionDeleted => "InvoiceActionDeleted",
9561 Self::DebtorContractCancelled => "DebtorContractCancelled",
9562 Self::DebtorContractSigned => "DebtorContractSigned",
9563 Self::DebtorContractCreated => "DebtorContractCreated",
9564 Self::DebtorContractArchived => "DebtorContractArchived",
9565 Self::DailyNotification => "DailyNotification",
9566 Self::PaymentReceivedToBillectaClientFunds => "PaymentReceivedToBillectaClientFunds",
9567 Self::InvoiceActionUpdated => "InvoiceActionUpdated",
9568 Self::SelfInvoiceActionCreated => "SelfInvoiceActionCreated",
9569 Self::SelfInvoiceActionAttested => "SelfInvoiceActionAttested",
9570 Self::SelfInvoiceActionPaid => "SelfInvoiceActionPaid",
9571 Self::SelfInvoiceActionUpdated => "SelfInvoiceActionUpdated",
9572 Self::SelfInvoiceActionDeleted => "SelfInvoiceActionDeleted",
9573 Self::ReminderInvoiceActionCreated => "ReminderInvoiceActionCreated",
9574 Self::EInvoiceInfoOnDebtorChanged => "EInvoiceInfoOnDebtorChanged",
9575 Self::Unknown => "unknown",
9576 }
9577 }
9578}
9579impl crate::AsPathParam for WebhookTriggerType {
9580 fn push_to(&self, buf: &mut String) {
9581 buf.push_str(self.as_str());
9582 }
9583}