pub use crate::{Amount, DateTime, Uuid};
pub type AccountingDimensions = Vec<AccountingDimension>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AccountingDimension {
pub creditor_public_id: Uuid,
pub name: Option<String>,
pub dimension: i32,
pub code: Option<String>,
pub description: Option<String>,
pub comments: Option<String>,
pub active: bool,
}
impl AccountingDimension {
pub fn new(creditor_public_id: Uuid, dimension: i32, active: bool) -> Self {
Self {
creditor_public_id,
dimension,
active,
name: None,
code: None,
description: None,
comments: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AccountingExportCreation {
pub creditor_public_id: Uuid,
pub from: DateTime,
pub to: DateTime,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub book_keeping_types_filter: Vec<AccountingRecordType>,
pub date_selection_type: AccountingExportDateSelectionType,
pub format: AccountingExportFormatType,
pub summarize_accounts_by_date: bool,
pub append_trans_description: bool,
}
impl AccountingExportCreation {
pub fn new(
creditor_public_id: Uuid,
from: DateTime,
to: DateTime,
date_selection_type: AccountingExportDateSelectionType,
format: AccountingExportFormatType,
summarize_accounts_by_date: bool,
append_trans_description: bool,
) -> Self {
Self {
creditor_public_id,
from,
to,
date_selection_type,
format,
summarize_accounts_by_date,
append_trans_description,
book_keeping_types_filter: Vec::new(),
}
}
}
pub type AccountingExports = Vec<AccountingExport>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AccountingExport {
pub creditor_public_id: Uuid,
pub start: DateTime,
pub end: DateTime,
pub created: Option<DateTime>,
pub created_by: Option<String>,
pub format: AccountingExportFormatType,
pub date_selection_type: AccountingExportDateSelectionType,
pub file: Option<File>,
}
impl AccountingExport {
pub fn new(
creditor_public_id: Uuid,
start: DateTime,
end: DateTime,
format: AccountingExportFormatType,
date_selection_type: AccountingExportDateSelectionType,
) -> Self {
Self {
creditor_public_id,
start,
end,
format,
date_selection_type,
created: None,
created_by: None,
file: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct File {
pub file_public_id: Uuid,
pub content_type: Option<String>,
pub data: Option<Vec<u8>>,
pub file_name: Option<String>,
}
impl File {
pub fn new(file_public_id: Uuid) -> Self {
Self {
file_public_id,
content_type: None,
data: None,
file_name: None,
}
}
}
pub type AccountingPaymentMeans = Vec<AccountingPaymentMean>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AccountingPaymentMean {
pub creditor_public_id: Uuid,
pub payment_code: Option<String>,
pub description: Option<String>,
pub bookkeeping_account: Option<String>,
}
impl AccountingPaymentMean {
pub fn new(creditor_public_id: Uuid) -> Self {
Self {
creditor_public_id,
payment_code: None,
description: None,
bookkeeping_account: None,
}
}
}
pub type AccountingRecords = Vec<AccountingRecord>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AccountingRecord {
pub transaction_date: DateTime,
pub amount: Option<Amount>,
pub project: Option<String>,
pub cost_center: Option<String>,
pub product_public_id: Option<Uuid>,
pub period_end: Option<DateTime>,
pub period_start: Option<DateTime>,
pub r_type: AccountingRecordType,
pub created: DateTime,
#[serde(rename = "VAT")]
pub vat: f64,
pub invoice_number: Option<String>,
pub action_public_id: Option<String>,
pub reference_id: Option<String>,
pub override_trade_debt_account: Option<String>,
pub override_account: Option<String>,
}
impl AccountingRecord {
pub fn new(
transaction_date: DateTime,
r_type: AccountingRecordType,
created: DateTime,
vat: f64,
) -> Self {
Self {
transaction_date,
r_type,
created,
vat,
amount: None,
project: None,
cost_center: None,
product_public_id: None,
period_end: None,
period_start: None,
invoice_number: None,
action_public_id: None,
reference_id: None,
override_trade_debt_account: None,
override_account: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AccountingSettingsAccount {
pub account: Option<String>,
#[serde(rename = "VAT")]
pub vat: Option<f64>,
pub account_type: AccountingSettingsAccountType,
}
impl AccountingSettingsAccount {
pub fn new(account_type: AccountingSettingsAccountType) -> Self {
Self {
account_type,
account: None,
vat: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AccountingSettings {
pub creditor_public_id: Uuid,
pub voucher_series: Option<String>,
pub cost_center_is_required: bool,
pub project_is_required: bool,
pub accrual_is_enabled: bool,
pub disable_bookkeeping_over_payments: bool,
pub disable_bookkeeping_unmatched_payments: bool,
pub usage_of_unmatched_payment_is_booked_on_incoming_payment_date: bool,
pub resting_vat_is_enabled: bool,
pub fractionary_revenue_period_is_enabled: bool,
#[serde(rename = "SieKPTYP")]
pub sie_kptyp: Option<SieKPTYPType>,
pub fiscal_year: FiscalYearType,
pub extended_first_fiscal_year_start_date: Option<DateTime>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub accounts: Vec<AccountingSettingsAccount>,
pub default_sales_account: Option<String>,
pub default_bankgiro_payment_code: Option<String>,
pub default_financial_payment_code: Option<String>,
pub default_autogiro_payment_code: Option<String>,
pub default_swish_payment_code: Option<String>,
pub default_credit_card_payment_code: Option<String>,
pub default_iban_payment_code: Option<String>,
pub default_bank_account_payment_code: Option<String>,
pub default_plusgiro_payment_code: Option<String>,
pub default_camt_payment_code: Option<String>,
pub default_settling_overpayment_payment_code: Option<String>,
pub default_crediting_payment_code: Option<String>,
pub book_keeping_method: BookKeepingMethod,
pub lock_previous_periods_at_day: Option<i32>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub exclude_cost_center_and_project_for_accounts: Vec<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AccountingVoucherExportCreation {
pub creditor_public_id: Uuid,
pub from: DateTime,
pub to: DateTime,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub book_keeping_types_filter: Vec<AccountingRecordType>,
pub date_selection_type: AccountingExportDateSelectionType,
}
impl AccountingVoucherExportCreation {
pub fn new(
creditor_public_id: Uuid,
from: DateTime,
to: DateTime,
date_selection_type: AccountingExportDateSelectionType,
) -> Self {
Self {
creditor_public_id,
from,
to,
date_selection_type,
book_keeping_types_filter: Vec::new(),
}
}
}
pub type AccountingVoucherRecords = Vec<AccountingVoucherRecord>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AccountingVoucherRecord {
pub description: Option<String>,
pub invoice_number: Option<String>,
pub transaction_date: DateTime,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub transactions: Vec<AccountingVoucherTransaction>,
}
impl AccountingVoucherRecord {
pub fn new(transaction_date: DateTime) -> Self {
Self {
transaction_date,
description: None,
invoice_number: None,
transactions: Vec::new(),
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct AccountingVoucherTransaction {
pub debet_amount: Option<Amount>,
pub credit_amount: Option<Amount>,
pub account: Option<String>,
pub cost_center: Option<String>,
pub project: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub dimensions: Vec<DimensionCode>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DimensionCode {
pub dimension: i32,
pub code: Option<String>,
}
impl DimensionCode {
pub fn new(dimension: i32) -> Self {
Self {
dimension,
code: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct ActionPublicIds {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub action_public_ids: Vec<String>,
}
pub type ActionReferences = Vec<ActionReference>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct ActionReference {
pub action_public_id: Option<String>,
pub reference_public_id: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AddMultipleDebtorsToCategoryRequest {
pub category_public_id: Uuid,
pub creditor_public_id: Uuid,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub debtor_public_ids: Vec<Uuid>,
}
impl AddMultipleDebtorsToCategoryRequest {
pub fn new(category_public_id: Uuid, creditor_public_id: Uuid) -> Self {
Self {
category_public_id,
creditor_public_id,
debtor_public_ids: Vec::new(),
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct AttestMultipleInvoicesRequest {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub creditor_public_ids: Vec<Uuid>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct BillectaDocsAdditionalInfo {
pub text: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct BillectaDocsHidden {}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct BillectaDocsRequired {}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct EnumCompabilityDefault {
pub default_value: i32,
}
impl EnumCompabilityDefault {
pub fn new(default_value: i32) -> Self {
Self { default_value }
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct UtcDateTimeConverter {}
pub type AutogiroPaymentStatuses = Vec<AutogiroPaymentStatus>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AutogiroPaymentStatus {
pub payment_public_id: Option<Uuid>,
pub creditor_public_id: Uuid,
pub debtor_name: Option<String>,
pub status: AutogiroPaymentStatusType,
pub amount: Option<Amount>,
pub payment_date: DateTime,
pub action_public_id: Option<String>,
pub comment: Option<String>,
pub created: DateTime,
}
impl AutogiroPaymentStatus {
pub fn new(
creditor_public_id: Uuid,
status: AutogiroPaymentStatusType,
payment_date: DateTime,
created: DateTime,
) -> Self {
Self {
creditor_public_id,
status,
payment_date,
created,
payment_public_id: None,
debtor_name: None,
amount: None,
action_public_id: None,
comment: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct AutogiroWithdrawal {
pub autogiro_withdrawal_enabled: bool,
}
impl AutogiroWithdrawal {
pub fn new(autogiro_withdrawal_enabled: bool) -> Self {
Self {
autogiro_withdrawal_enabled,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BankAccountRequest {
pub public_id: Option<String>,
pub bank: BankAccountBankType,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
#[serde(rename = "QR")]
pub qr: Option<String>,
pub status: BankAccountStatusType,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub account_numbers: Vec<BankAccount>,
pub bank_id_autostart_token: Option<String>,
pub failure_message: Option<String>,
pub failure_code: Option<String>,
}
impl BankAccountRequest {
pub fn new(bank: BankAccountBankType, status: BankAccountStatusType) -> Self {
Self {
bank,
status,
public_id: None,
ssn: None,
qr: None,
account_numbers: Vec::new(),
bank_id_autostart_token: None,
failure_message: None,
failure_code: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct BankAccount {
pub number: Option<String>,
pub clearing_no: Option<String>,
pub account_no: Option<String>,
pub name: Option<String>,
pub r_type: Option<String>,
pub balance: Option<Amount>,
pub iban: Option<String>,
pub holder_name: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BankIdAthentication {
pub personal_identity_number: Option<String>,
pub two_factor_bank_id_auth: bool,
}
impl BankIdAthentication {
pub fn new(two_factor_bank_id_auth: bool) -> Self {
Self {
two_factor_bank_id_auth,
personal_identity_number: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BankIdAuthenticationRequest {
pub creditor_public_id: Uuid,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
}
impl BankIdAuthenticationRequest {
pub fn new(creditor_public_id: Uuid) -> Self {
Self {
creditor_public_id,
ssn: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BankIdAuthenticationStatus {
pub status: BankIdStatusType,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub reference_token: Option<String>,
pub auto_start_token: Option<String>,
pub given_name: Option<String>,
pub surname: Option<String>,
pub ip_address: Option<String>,
pub name: Option<String>,
#[serde(rename = "QR")]
pub qr: Option<String>,
pub not_after: Option<DateTime>,
pub not_before: Option<DateTime>,
pub ocsp_response: Option<String>,
pub signature: Option<String>,
pub created: DateTime,
pub hint_code: Option<BankIdHintCodeType>,
pub details: Option<String>,
}
impl BankIdAuthenticationStatus {
pub fn new(status: BankIdStatusType, created: DateTime) -> Self {
Self {
status,
created,
ssn: None,
reference_token: None,
auto_start_token: None,
given_name: None,
surname: None,
ip_address: None,
name: None,
qr: None,
not_after: None,
not_before: None,
ocsp_response: None,
signature: None,
hint_code: None,
details: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BankIdPhoneAuthenticationRequest {
pub creditor_public_id: Uuid,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub user_visible_data: Option<String>,
pub user_non_visible_data: Option<String>,
pub user_made_the_call: bool,
}
impl BankIdPhoneAuthenticationRequest {
pub fn new(creditor_public_id: Uuid, user_made_the_call: bool) -> Self {
Self {
creditor_public_id,
user_made_the_call,
ssn: None,
user_visible_data: None,
user_non_visible_data: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BankIdSignRequest {
pub creditor_public_id: Uuid,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub user_message: Option<String>,
pub user_non_visible_data: Option<String>,
}
impl BankIdSignRequest {
pub fn new(creditor_public_id: Uuid) -> Self {
Self {
creditor_public_id,
ssn: None,
user_message: None,
user_non_visible_data: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BankIdSignStatus {
pub status: BankIdStatusType,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub reference_token: Option<String>,
pub auto_start_token: Option<String>,
pub given_name: Option<String>,
pub surname: Option<String>,
pub ip_address: Option<String>,
pub name: Option<String>,
#[serde(rename = "QR")]
pub qr: Option<String>,
pub not_after: Option<DateTime>,
pub not_before: Option<DateTime>,
pub ocsp_response: Option<String>,
pub signature: Option<String>,
pub created: DateTime,
pub hint_code: Option<BankIdHintCodeType>,
}
impl BankIdSignStatus {
pub fn new(status: BankIdStatusType, created: DateTime) -> Self {
Self {
status,
created,
ssn: None,
reference_token: None,
auto_start_token: None,
given_name: None,
surname: None,
ip_address: None,
name: None,
qr: None,
not_after: None,
not_before: None,
ocsp_response: None,
signature: None,
hint_code: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CardRefundPayment {
pub payment_public_id: Uuid,
pub amount: Option<Amount>,
}
impl CardRefundPayment {
pub fn new(payment_public_id: Uuid) -> Self {
Self {
payment_public_id,
amount: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CheckoutSettings {
pub creditor_public_id: Uuid,
#[serde(rename = "CreditCardIBAN")]
pub credit_card_iban: Option<String>,
#[serde(rename = "CreditCardBIC")]
pub credit_card_bic: Option<String>,
pub agreement_file: Option<File>,
}
impl CheckoutSettings {
pub fn new(creditor_public_id: Uuid) -> Self {
Self {
creditor_public_id,
credit_card_iban: None,
credit_card_bic: None,
agreement_file: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ClientConfig {
pub setup_completed: bool,
pub bankgiro_contract_url: Option<String>,
pub autogiro_contract_url: Option<String>,
pub country_code: Option<String>,
pub free_user_licences: i32,
pub user_licence_price: Option<Amount>,
pub lookup_price: Option<Amount>,
pub integration_module_price: Option<Amount>,
pub autogiro_service_price: Option<Amount>,
pub swish_service_price: Option<Amount>,
pub bank_id_service_fee: Option<Amount>,
pub checkout_service_fee: Option<Amount>,
pub credit_card_service_price: Option<Amount>,
pub accounting_source_price: Option<Amount>,
pub claim_long_term_surveilance_price: Option<Amount>,
pub eviction_handling_fee: Option<Amount>,
pub branding: Option<ExternalBranding>,
#[serde(rename = "PEAccountingServicePrice")]
pub pe_accounting_service_price: Option<Amount>,
}
impl ClientConfig {
pub fn new(setup_completed: bool, free_user_licences: i32) -> Self {
Self {
setup_completed,
free_user_licences,
bankgiro_contract_url: None,
autogiro_contract_url: None,
country_code: None,
user_licence_price: None,
lookup_price: None,
integration_module_price: None,
autogiro_service_price: None,
swish_service_price: None,
bank_id_service_fee: None,
checkout_service_fee: None,
credit_card_service_price: None,
accounting_source_price: None,
claim_long_term_surveilance_price: None,
eviction_handling_fee: None,
branding: None,
pe_accounting_service_price: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ExternalBranding {
#[serde(rename = "HeaderLogoURL")]
pub header_logo_url: Option<String>,
pub css_branded: bool,
#[serde(rename = "SecondLogoURL")]
pub second_logo_url: Option<String>,
pub base_background_color: Option<String>,
pub active_menu_background_color: Option<String>,
pub primary_text_color: Option<String>,
pub primary_color: Option<String>,
pub primary_hoover_color: Option<String>,
pub help_color: Option<String>,
pub help_hoover_color: Option<String>,
pub font: Option<String>,
pub customer_service_phone: Option<String>,
pub technical_support_email: Option<String>,
pub customer_service_email: Option<String>,
pub address: Option<String>,
pub system_name: Option<String>,
pub provider_name: Option<String>,
pub signout_landing_url: Option<String>,
pub favicon_url: Option<String>,
pub provider_url: Option<String>,
pub api_url: Option<String>,
pub portal_url: Option<String>,
pub my_pages_url: Option<String>,
pub kyc_url: Option<String>,
pub checkbox_background_image_name: Option<String>,
pub hide_faq: bool,
}
impl ExternalBranding {
pub fn new(css_branded: bool, hide_faq: bool) -> Self {
Self {
css_branded,
hide_faq,
header_logo_url: None,
second_logo_url: None,
base_background_color: None,
active_menu_background_color: None,
primary_text_color: None,
primary_color: None,
primary_hoover_color: None,
help_color: None,
help_hoover_color: None,
font: None,
customer_service_phone: None,
technical_support_email: None,
customer_service_email: None,
address: None,
system_name: None,
provider_name: None,
signout_landing_url: None,
favicon_url: None,
provider_url: None,
api_url: None,
portal_url: None,
my_pages_url: None,
kyc_url: None,
checkbox_background_image_name: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CommentAction {
pub action_public_id: Option<String>,
pub comment: Option<String>,
pub attachment: Option<File>,
pub target: CommentTargetType,
}
impl CommentAction {
pub fn new(target: CommentTargetType) -> Self {
Self {
target,
action_public_id: None,
comment: None,
attachment: None,
}
}
}
pub type CommonActionEvents = Vec<CommonActionEvent>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CommonActionEvent {
pub title: Option<String>,
pub content: Option<String>,
pub event_date: DateTime,
pub event_by: Option<String>,
pub reference: Option<String>,
pub event_type: EventType,
pub is_public: bool,
pub has_occured: bool,
pub event_public_id: Uuid,
pub creditor_public_id: Uuid,
pub action_public_id: Option<String>,
pub action_type: ActionType,
}
impl CommonActionEvent {
pub fn new(
event_date: DateTime,
event_type: EventType,
is_public: bool,
has_occured: bool,
event_public_id: Uuid,
creditor_public_id: Uuid,
action_type: ActionType,
) -> Self {
Self {
event_date,
event_type,
is_public,
has_occured,
event_public_id,
creditor_public_id,
action_type,
title: None,
content: None,
event_by: None,
reference: None,
action_public_id: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ConfigurationDebtCollection {
pub send_to_debt_collection: bool,
pub send_to_debt_collection_days_after_due_date: i32,
pub number_of_debt_collection_reminders: i32,
pub debt_collection_payment_terms_in_days: i32,
pub start_debt_collection_action_level: DebtCollectionActionLevelType,
pub eviction: bool,
pub inform_social_welfare: bool,
}
impl ConfigurationDebtCollection {
pub fn new(
send_to_debt_collection: bool,
send_to_debt_collection_days_after_due_date: i32,
number_of_debt_collection_reminders: i32,
debt_collection_payment_terms_in_days: i32,
start_debt_collection_action_level: DebtCollectionActionLevelType,
eviction: bool,
inform_social_welfare: bool,
) -> Self {
Self {
send_to_debt_collection,
send_to_debt_collection_days_after_due_date,
number_of_debt_collection_reminders,
debt_collection_payment_terms_in_days,
start_debt_collection_action_level,
eviction,
inform_social_welfare,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ConfigurationDeviationAnalysis {
pub deviation_analysis_enabled: bool,
pub deviation_threshold_percentage: f64,
pub deviation_period_length: i32,
pub deviation_period_is_rolling: bool,
pub deviation_expected_invoices_per_period: i32,
pub deviation_expected_invoice_amount_per_period: f64,
}
impl ConfigurationDeviationAnalysis {
pub fn new(
deviation_analysis_enabled: bool,
deviation_threshold_percentage: f64,
deviation_period_length: i32,
deviation_period_is_rolling: bool,
deviation_expected_invoices_per_period: i32,
deviation_expected_invoice_amount_per_period: f64,
) -> Self {
Self {
deviation_analysis_enabled,
deviation_threshold_percentage,
deviation_period_length,
deviation_period_is_rolling,
deviation_expected_invoices_per_period,
deviation_expected_invoice_amount_per_period,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ConfigurationReminder {
pub send_reminder_invoice: bool,
pub send_reminder_invoice_days_after_due_date: i32,
}
impl ConfigurationReminder {
pub fn new(
send_reminder_invoice: bool,
send_reminder_invoice_days_after_due_date: i32,
) -> Self {
Self {
send_reminder_invoice,
send_reminder_invoice_days_after_due_date,
}
}
}
pub type Configurations = Vec<Configuration>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Configuration {
pub creditor_public_id: Uuid,
pub code: Option<String>,
pub description: Option<String>,
pub priority: i32,
pub reminder_configuration: Option<ConfigurationReminder>,
pub debt_collection_configuration: Option<ConfigurationDebtCollection>,
pub deviation_analysis_configuration: Option<ConfigurationDeviationAnalysis>,
}
impl Configuration {
pub fn new(creditor_public_id: Uuid, priority: i32) -> Self {
Self {
creditor_public_id,
priority,
code: None,
description: None,
reminder_configuration: None,
debt_collection_configuration: None,
deviation_analysis_configuration: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ContractInvoiceActionAttachment {
pub file: Option<File>,
pub is_cover_sheet: bool,
pub sort_number: i32,
}
impl ContractInvoiceActionAttachment {
pub fn new(is_cover_sheet: bool, sort_number: i32) -> Self {
Self {
is_cover_sheet,
sort_number,
file: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ContractInvoiceActionEvent {
pub title: Option<String>,
pub content: Option<String>,
pub event_date: DateTime,
pub event_by: Option<String>,
pub reference: Option<String>,
pub event_type: EventType,
pub is_public: bool,
pub has_occured: bool,
pub event_public_id: Uuid,
}
impl ContractInvoiceActionEvent {
pub fn new(
event_date: DateTime,
event_type: EventType,
is_public: bool,
has_occured: bool,
event_public_id: Uuid,
) -> Self {
Self {
event_date,
event_type,
is_public,
has_occured,
event_public_id,
title: None,
content: None,
event_by: None,
reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ContractInvoiceActionRecord {
pub product_public_id: Option<Uuid>,
pub sequence_no: i32,
pub units: Option<String>,
pub article_description: Option<String>,
pub article_number: Option<String>,
pub quantity: Option<f64>,
pub unit_price: Option<Amount>,
pub discount_amount: Option<Amount>,
pub discount_percentage: f64,
pub discount_type: DiscountType,
#[serde(rename = "VAT")]
pub vat: f64,
pub cost_center: Option<String>,
pub project: Option<String>,
pub rot_rut_activated: bool,
pub rot_rut_amount: Option<Amount>,
pub rot_rut_material_cost_amount: Option<Amount>,
pub rot_rut_hours: i32,
pub rot_rut_type: RotRutType,
pub record_type: RecordType,
pub vat_is_included: bool,
pub hidden: bool,
pub external_reference: Option<String>,
pub invoiced_from: Option<DateTime>,
pub invoiced_to: Option<DateTime>,
pub post_invoice: bool,
pub advance_invoice: bool,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub dimensions: Vec<DimensionCode>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ContractInvoiceActionState {
pub stage: ContractInvoiceActionStageType,
pub last_run_date: Option<DateTime>,
pub next_run_date: Option<DateTime>,
pub is_paused: bool,
pub use_debtor_balance: bool,
}
impl ContractInvoiceActionState {
pub fn new(
stage: ContractInvoiceActionStageType,
is_paused: bool,
use_debtor_balance: bool,
) -> Self {
Self {
stage,
is_paused,
use_debtor_balance,
last_run_date: None,
next_run_date: None,
}
}
}
pub type ContractInvoiceActionSubs = Vec<ContractInvoiceActionSub>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ContractInvoiceActionSub {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub cost_center: Option<String>,
pub creditor_org_no: Option<String>,
pub creditor_name: Option<String>,
pub amount: Option<Amount>,
pub created: DateTime,
pub debtor_org_no: Option<String>,
pub debtor_name: Option<String>,
pub last_run_date: Option<DateTime>,
pub next_run_date: Option<DateTime>,
pub is_paused: bool,
pub delivery_method: DeliveryMethodType,
pub recurrence_interval: RecurrenceIntervalType,
pub contract_number: Option<String>,
pub start: Option<DateTime>,
pub end: Option<DateTime>,
pub our_reference: Option<String>,
pub autogiro_withdrawal_enabled: bool,
pub your_reference: Option<String>,
}
impl ContractInvoiceActionSub {
pub fn new(
creditor_public_id: Uuid,
debtor_public_id: Uuid,
created: DateTime,
is_paused: bool,
delivery_method: DeliveryMethodType,
recurrence_interval: RecurrenceIntervalType,
autogiro_withdrawal_enabled: bool,
) -> Self {
Self {
creditor_public_id,
debtor_public_id,
created,
is_paused,
delivery_method,
recurrence_interval,
autogiro_withdrawal_enabled,
action_public_id: None,
cost_center: None,
creditor_org_no: None,
creditor_name: None,
amount: None,
debtor_org_no: None,
debtor_name: None,
last_run_date: None,
next_run_date: None,
contract_number: None,
start: None,
end: None,
our_reference: None,
your_reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ContractInvoiceAction {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub payment_terms_in_days: i32,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub records: Vec<ContractInvoiceActionRecord>,
pub interest_terms_in_days: i32,
pub reason_for_higher_interest: Option<String>,
pub interest_percentage: f64,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub interest_type: Option<InterestType>,
pub interest_start_in_days_after_due_date: i32,
pub message: Option<String>,
pub external_reference: Option<String>,
pub auto_attest: bool,
pub auto_merge: bool,
pub pay_last_day_of_month: bool,
pub delivery_address_override: Option<DeliveryAddressOverride>,
pub debt_collection_details: Option<DebtCollectionDetails>,
#[serde(rename = "ReverseVATDetails")]
pub reverse_vat_details: Option<ReverseVATDetails>,
pub recurrence_details: Option<RecurrenceDetails>,
pub rot_rut_details: Option<RotRutDetails>,
pub payment_override: Option<PaymentOverride>,
pub state: Option<ContractInvoiceActionState>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub appendixes: Vec<File>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub attachments: Vec<ContractInvoiceActionAttachment>,
pub contract_number: Option<String>,
pub invoice_period: ContractInvoicePeriodRuleType,
pub invoice_period_months_offset: i32,
pub invoice_fee: Option<Amount>,
pub freight_fee: Option<Amount>,
pub hide_date_on_periodised_records: bool,
pub autogiro_withdrawal_enabled: bool,
pub credit_card_withdrawal_enabled: bool,
pub send_by_mail_if_email_not_viewed_in_days: Option<i32>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub events: Vec<ContractInvoiceActionEvent>,
pub reminder_invoice_details: Option<ReminderInvoiceDetails>,
pub generate_invoices_of_action_type: ActionType,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct DeliveryAddressOverride {
pub name: Option<String>,
pub attention: Option<String>,
pub care_of: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
pub org_no: Option<String>,
#[serde(rename = "GLN")]
pub gln: Option<String>,
pub intermediator: Option<IntermediatorType>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionDetails {
pub send_to_debt_collection: bool,
pub start_debt_collection_action_level: DebtCollectionActionLevelType,
pub end_debt_collection_action_level: DebtCollectionActionLevelType,
pub number_of_reminders: i32,
pub days_delay_after_due_date: i32,
pub payment_terms_in_days: i32,
pub eviction: bool,
pub inform_social_welfare: bool,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReverseVATDetails {
#[serde(rename = "ReverseVATActivated")]
pub reverse_vat_activated: bool,
#[serde(rename = "ReceiverVATNumber")]
pub receiver_vat_number: Option<String>,
}
impl ReverseVATDetails {
pub fn new(reverse_vat_activated: bool) -> Self {
Self {
reverse_vat_activated,
receiver_vat_number: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RecurrenceDetails {
pub recurrence_interval: RecurrenceIntervalType,
pub monthly_recurrence: Option<MonthlyRecurrence>,
pub yearly_recurrence: Option<YearlyRecurrence>,
pub quarterly_recurrence: Option<QuarterlyRecurrence>,
pub start: DateTime,
pub no_end_date: bool,
pub end: Option<DateTime>,
}
impl RecurrenceDetails {
pub fn new(
recurrence_interval: RecurrenceIntervalType,
start: DateTime,
no_end_date: bool,
) -> Self {
Self {
recurrence_interval,
start,
no_end_date,
monthly_recurrence: None,
yearly_recurrence: None,
quarterly_recurrence: None,
end: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct MonthlyRecurrence {
pub recur_on_day_in_month: i32,
pub recur_month_interval: i32,
}
impl MonthlyRecurrence {
pub fn new(recur_on_day_in_month: i32, recur_month_interval: i32) -> Self {
Self {
recur_on_day_in_month,
recur_month_interval,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct YearlyRecurrence {
pub recur_on_day_in_month: i32,
pub recur_on_month: i32,
pub recur_year_interval: i32,
}
impl YearlyRecurrence {
pub fn new(recur_on_day_in_month: i32, recur_on_month: i32, recur_year_interval: i32) -> Self {
Self {
recur_on_day_in_month,
recur_on_month,
recur_year_interval,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct QuarterlyRecurrence {
pub recur_on_day_in_month: i32,
pub recur_on_month: i32,
pub recur_quarter_interval: i32,
}
impl QuarterlyRecurrence {
pub fn new(
recur_on_day_in_month: i32,
recur_on_month: i32,
recur_quarter_interval: i32,
) -> Self {
Self {
recur_on_day_in_month,
recur_on_month,
recur_quarter_interval,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct RotRutDetails {
pub residence_association_org_no: Option<String>,
pub property_designation: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub persons: Vec<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub customers: Vec<RotRutCustomer>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct RotRutCustomer {
pub name: Option<String>,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub asked_amount: Option<Amount>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PaymentOverride {
pub bank_giro: Option<String>,
pub plus_giro: Option<String>,
pub clearing_no: Option<String>,
pub account_no: Option<String>,
pub iban: Option<String>,
pub bic: Option<String>,
pub bank_name: Option<String>,
pub payment_receiver: Option<String>,
pub reference: Option<String>,
pub reference_type: ReferenceType,
pub receiving_account_type: ReceivingAccountType,
}
impl PaymentOverride {
pub fn new(
reference_type: ReferenceType,
receiving_account_type: ReceivingAccountType,
) -> Self {
Self {
reference_type,
receiving_account_type,
bank_giro: None,
plus_giro: None,
clearing_no: None,
account_no: None,
iban: None,
bic: None,
bank_name: None,
payment_receiver: None,
reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReminderInvoiceDetails {
pub send_reminder_invoice: bool,
pub days_delay_after_due_date: i32,
}
impl ReminderInvoiceDetails {
pub fn new(send_reminder_invoice: bool, days_delay_after_due_date: i32) -> Self {
Self {
send_reminder_invoice,
days_delay_after_due_date,
}
}
}
pub type CostCenters = Vec<CostCenter>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CostCenter {
pub creditor_public_id: Uuid,
pub code: Option<String>,
pub description: Option<String>,
pub comments: Option<String>,
pub active: bool,
}
impl CostCenter {
pub fn new(creditor_public_id: Uuid, active: bool) -> Self {
Self {
creditor_public_id,
active,
code: None,
description: None,
comments: None,
}
}
}
pub type Countries = Vec<Country>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct Country {
pub country_code: Option<String>,
pub swedish_country_name: Option<String>,
pub english_country_name: Option<String>,
pub phone_code: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreatedMultiple {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub public_ids: Vec<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreatedUrl {
pub url: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct Created {
pub public_id: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditAction {
pub action_public_id: Option<String>,
pub value: Option<Amount>,
pub invoice_interest: bool,
pub comment: Option<String>,
pub is_payment_creditation: bool,
pub payment_mean_code: Option<String>,
pub payment_date: Option<DateTime>,
}
impl CreditAction {
pub fn new(invoice_interest: bool, is_payment_creditation: bool) -> Self {
Self {
invoice_interest,
is_payment_creditation,
action_public_id: None,
value: None,
comment: None,
payment_mean_code: None,
payment_date: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditCardAddIntent {
pub debtor_public_id: Uuid,
pub success_url: Option<String>,
pub failure_url: Option<String>,
pub language: LanguageType,
}
impl CreditCardAddIntent {
pub fn new(debtor_public_id: Uuid, language: LanguageType) -> Self {
Self {
debtor_public_id,
language,
success_url: None,
failure_url: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditCardAdd {
pub public_id: Uuid,
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub status: CreditCardAddStatusType,
pub add_window_url: Option<String>,
pub success_url: Option<String>,
pub failure_url: Option<String>,
pub created: DateTime,
pub language: LanguageType,
}
impl CreditCardAdd {
pub fn new(
public_id: Uuid,
creditor_public_id: Uuid,
debtor_public_id: Uuid,
status: CreditCardAddStatusType,
created: DateTime,
language: LanguageType,
) -> Self {
Self {
public_id,
creditor_public_id,
debtor_public_id,
status,
created,
language,
add_window_url: None,
success_url: None,
failure_url: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditCardPaymentIntent {
pub action_public_id: Option<String>,
pub success_url: Option<String>,
pub failure_url: Option<String>,
pub language: LanguageType,
}
impl CreditCardPaymentIntent {
pub fn new(language: LanguageType) -> Self {
Self {
language,
action_public_id: None,
success_url: None,
failure_url: None,
}
}
}
pub type CreditCardPayments = Vec<CreditCardPayment>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditCardPayment {
pub payment_public_id: Uuid,
pub creditor_public_id: Uuid,
pub status: CreditCardPaymentStatusType,
pub amount: Option<Amount>,
pub refunded_amount: Option<Amount>,
pub payment_date: DateTime,
pub action_public_id: Option<String>,
pub action_type: ActionType,
pub comment: Option<String>,
pub payment_window_url: Option<String>,
pub success_url: Option<String>,
pub failure_url: Option<String>,
pub created: DateTime,
pub language: LanguageType,
pub funding: Option<String>,
pub brand: Option<String>,
}
impl CreditCardPayment {
pub fn new(
payment_public_id: Uuid,
creditor_public_id: Uuid,
status: CreditCardPaymentStatusType,
payment_date: DateTime,
action_type: ActionType,
created: DateTime,
language: LanguageType,
) -> Self {
Self {
payment_public_id,
creditor_public_id,
status,
payment_date,
action_type,
created,
language,
amount: None,
refunded_amount: None,
action_public_id: None,
comment: None,
payment_window_url: None,
success_url: None,
failure_url: None,
funding: None,
brand: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditCardWithdrawal {
pub credit_card_withdrawal_enabled: bool,
}
impl CreditCardWithdrawal {
pub fn new(credit_card_withdrawal_enabled: bool) -> Self {
Self {
credit_card_withdrawal_enabled,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditingInvoice {
pub source_public_id: Option<String>,
pub source_invoice_id: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorAccessRight {
pub module: CreditorModuleAccessType,
pub has_access: bool,
}
impl CreditorAccessRight {
pub fn new(module: CreditorModuleAccessType, has_access: bool) -> Self {
Self { module, has_access }
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorAddonCategory {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub addon_categories: Vec<CreditorAddonCategoryType>,
}
pub type CreditorAddons = Vec<CreditorAddon>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorAddon {
pub creditor_addon_name: CreditorAddonType,
pub exists: bool,
pub description: CreditorAddonDescriptionType,
}
impl CreditorAddon {
pub fn new(
creditor_addon_name: CreditorAddonType,
exists: bool,
description: CreditorAddonDescriptionType,
) -> Self {
Self {
creditor_addon_name,
exists,
description,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorBankInfo {
pub uses_client_fund: bool,
pub payment_method: CreditorPaymentMethodType,
pub bankgiro_no: Option<String>,
pub plusgiro_no: Option<String>,
pub account_no: Option<String>,
pub clearing_no: Option<String>,
#[serde(rename = "EInvoiceFUI")]
pub e_invoice_fui: Option<String>,
#[serde(rename = "EInvoiceCUI")]
pub e_invoice_cui: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub foreign_accounts: Vec<CreditorForeignAccount>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub creditor_outgoing_bankgiroes: Vec<CreditorOutgoingBankgiro>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub payment_methods: Vec<CreditorPaymentMethod>,
}
impl CreditorBankInfo {
pub fn new(uses_client_fund: bool, payment_method: CreditorPaymentMethodType) -> Self {
Self {
uses_client_fund,
payment_method,
bankgiro_no: None,
plusgiro_no: None,
account_no: None,
clearing_no: None,
e_invoice_fui: None,
e_invoice_cui: None,
foreign_accounts: Vec::new(),
creditor_outgoing_bankgiroes: Vec::new(),
payment_methods: Vec::new(),
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorForeignAccount {
pub currency_code: Option<String>,
pub bank_name: Option<String>,
pub iban: Option<String>,
pub bic: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorOutgoingBankgiro {
pub bankgiro_no: Option<String>,
pub is_active: bool,
pub bankgiro_approved: bool,
pub description: Option<String>,
pub bookkeeping_payment_mean_code: Option<String>,
}
impl CreditorOutgoingBankgiro {
pub fn new(is_active: bool, bankgiro_approved: bool) -> Self {
Self {
is_active,
bankgiro_approved,
bankgiro_no: None,
description: None,
bookkeeping_payment_mean_code: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorPaymentMethod {
pub priority: CreditorPaymentMethodPriorityType,
pub payment_method: CreditorPaymentMethodType,
pub bankgiro_no: Option<String>,
pub plusgiro_no: Option<String>,
pub clearing_no: Option<String>,
pub account_no: Option<String>,
#[serde(rename = "IBAN")]
pub iban: Option<String>,
#[serde(rename = "BIC")]
pub bic: Option<String>,
pub verified: bool,
}
impl CreditorPaymentMethod {
pub fn new(
priority: CreditorPaymentMethodPriorityType,
payment_method: CreditorPaymentMethodType,
verified: bool,
) -> Self {
Self {
priority,
payment_method,
verified,
bankgiro_no: None,
plusgiro_no: None,
clearing_no: None,
account_no: None,
iban: None,
bic: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorClaimsContact {
pub first_name: Option<String>,
pub last_name: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorClaims {
pub creditor_public_id: Uuid,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub access_rights: Vec<CreditorAccessRight>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub settings: Vec<CreditorSetting>,
pub account_verified: bool,
pub show_get_started_message: bool,
pub is_enabled: bool,
}
impl CreditorClaims {
pub fn new(
creditor_public_id: Uuid,
account_verified: bool,
show_get_started_message: bool,
is_enabled: bool,
) -> Self {
Self {
creditor_public_id,
account_verified,
show_get_started_message,
is_enabled,
access_rights: Vec::new(),
settings: Vec::new(),
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorSetting {
pub key: Option<String>,
pub value: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorContact {
pub first_name: Option<String>,
pub last_name: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorInvoiceAddress {
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub country_code: Option<String>,
pub email: Option<String>,
pub delivery_method: DeliveryMethodType,
}
impl CreditorInvoiceAddress {
pub fn new(delivery_method: DeliveryMethodType) -> Self {
Self {
delivery_method,
address: None,
address2: None,
zip_code: None,
city: None,
country_code: None,
email: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorKycFormBeneficialOwner {
pub name: Option<String>,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub address: Option<String>,
pub country_name: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorKycFormBusinessCategory {
pub is_real_estate_sales_category: bool,
pub is_real_estate_construction_category: bool,
pub is_restaurant_category: bool,
pub is_cafe_category: bool,
pub is_broker_category: bool,
pub is_night_club_category: bool,
pub is_kiosk_category: bool,
pub is_online_gambiling_category: bool,
pub is_cleaning_category: bool,
pub is_taxi_category: bool,
pub is_barber_category: bool,
pub is_betting_shop_category: bool,
pub other_category: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorKycFormCompany {
pub name: Option<String>,
pub org_no: Option<String>,
pub address: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub country_name: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorKycFormContact {
pub name: Option<String>,
pub citizenship_country_name: Option<String>,
pub tax_country_name: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorKycFormOwner {
pub name: Option<String>,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub holding_shares_in_percent: f64,
pub holding_votes_in_percent: f64,
pub address: Option<String>,
pub country_name: Option<String>,
pub is_non_legal_entity: bool,
pub has_us_citizenship: bool,
pub non_legal_entity_is_direct_o_wner: bool,
}
impl CreditorKycFormOwner {
pub fn new(
holding_shares_in_percent: f64,
holding_votes_in_percent: f64,
is_non_legal_entity: bool,
has_us_citizenship: bool,
non_legal_entity_is_direct_o_wner: bool,
) -> Self {
Self {
holding_shares_in_percent,
holding_votes_in_percent,
is_non_legal_entity,
has_us_citizenship,
non_legal_entity_is_direct_o_wner,
name: None,
ssn: None,
address: None,
country_name: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorKycFormUsPerson {
pub name: Option<String>,
pub address: Option<String>,
#[serde(rename = "TIN")]
pub tin: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorKycForm {
pub company: Option<CreditorKycFormCompany>,
pub contact: Option<CreditorKycFormContact>,
#[serde(rename = "IsTaxableInUS")]
pub is_taxable_in_us: bool,
pub is_financial_institute: bool,
pub is_active_non_financial_institute: bool,
pub is_any_owner_us_persons: bool,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub us_persons: Vec<CreditorKycFormUsPerson>,
pub is_managing_cash: bool,
pub managing_cash_purpose: Option<String>,
pub managing_cash_yearly_revenue: Option<String>,
pub is_managing_curreny_exchanges: bool,
pub managing_curreny_exchanges_purpose: Option<String>,
pub business_category: Option<CreditorKycFormBusinessCategory>,
pub has_no_owners_with_more_than25_percent: bool,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub owners_with_more_than25_percent: Vec<CreditorKycFormOwner>,
pub has_no_beneficial_owners: bool,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub beneficial_owners: Vec<CreditorKycFormBeneficialOwner>,
#[serde(rename = "IsAnyonePEP")]
pub is_anyone_pep: bool,
#[serde(rename = "HasAnyoneBusinessRelationWithOtherPEP")]
pub has_anyone_business_relation_with_other_pep: bool,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorKyc {
pub creditor_public_id: Uuid,
pub creditor_kyc_form: Option<CreditorKycForm>,
pub state: CreditorKycStateType,
pub signed_by_name: Option<String>,
#[serde(rename = "SignedBySSN")]
pub signed_by_ssn: Option<String>,
pub signed_date: Option<DateTime>,
pub mobile_bank_id_token_used_for_sign: Option<Uuid>,
}
impl CreditorKyc {
pub fn new(creditor_public_id: Uuid, state: CreditorKycStateType) -> Self {
Self {
creditor_public_id,
state,
creditor_kyc_form: None,
signed_by_name: None,
signed_by_ssn: None,
signed_date: None,
mobile_bank_id_token_used_for_sign: None,
}
}
}
pub type CreditorSettings = Vec<CreditorSetting>;
pub type CreditorShares = Vec<CreditorShare>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorShare {
pub shared_with_user_name: Option<String>,
pub share_public_id: Uuid,
pub creditor_public_id: Uuid,
pub can_attest_invoice: bool,
pub can_manage_invoice_payments: bool,
pub can_write_creditor: bool,
pub can_attest_supplier_invoice: bool,
pub can_manage_self_invoice_debtor_infoes: bool,
pub can_pay_supplier_invoice: bool,
pub can_read_settings: bool,
pub can_read_bookkeeping: bool,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorSignatoryContact {
pub first_name: Option<String>,
pub last_name: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
}
pub type CreditorSubs = Vec<CreditorSub>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorSub {
pub creditor_public_id: Uuid,
pub name: Option<String>,
pub is_enabled: bool,
pub org_no: Option<String>,
#[serde(rename = "LogoURL")]
pub logo_url: Option<String>,
}
impl CreditorSub {
pub fn new(creditor_public_id: Uuid, is_enabled: bool) -> Self {
Self {
creditor_public_id,
is_enabled,
name: None,
org_no: None,
logo_url: None,
}
}
}
pub type Creditors = Vec<Creditor>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Creditor {
pub creditor_public_id: Uuid,
pub org_no: Option<String>,
pub name: Option<String>,
pub creditor_bank_info: Option<CreditorBankInfo>,
pub attention: Option<String>,
pub care_of: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub country_code: Option<String>,
pub phone: Option<String>,
pub vat_number: Option<String>,
pub residence: Option<String>,
pub approved_company_tax: Option<bool>,
pub give_all_users_full_rights_on_creditor: Option<bool>,
#[serde(rename = "GLN")]
pub gln: Option<String>,
pub creditor_contact: Option<CreditorContact>,
pub creditor_claims_contact: Option<CreditorClaimsContact>,
pub creditor_signatory_contact: Option<CreditorSignatoryContact>,
pub creditor_invoice_address: Option<CreditorInvoiceAddress>,
pub is_enabled: bool,
pub next_invoice_number: Option<String>,
#[serde(rename = "LogoURL")]
pub logo_url: Option<String>,
pub use_cent_rounding: bool,
pub uses_client_fund_for_invoicing: bool,
}
impl Creditor {
pub fn new(
creditor_public_id: Uuid,
is_enabled: bool,
use_cent_rounding: bool,
uses_client_fund_for_invoicing: bool,
) -> Self {
Self {
creditor_public_id,
is_enabled,
use_cent_rounding,
uses_client_fund_for_invoicing,
org_no: None,
name: None,
creditor_bank_info: None,
attention: None,
care_of: None,
address: None,
address2: None,
zip_code: None,
city: None,
country_code: None,
phone: None,
vat_number: None,
residence: None,
approved_company_tax: None,
give_all_users_full_rights_on_creditor: None,
gln: None,
creditor_contact: None,
creditor_claims_contact: None,
creditor_signatory_contact: None,
creditor_invoice_address: None,
next_invoice_number: None,
logo_url: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct CreditorToken {
pub token: Uuid,
#[serde(rename = "PortalURL")]
pub portal_url: Option<String>,
}
impl CreditorToken {
pub fn new(token: Uuid) -> Self {
Self {
token,
portal_url: None,
}
}
}
pub type Currencies = Vec<Currency>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Currency {
pub decimals: i32,
pub currency_code: Option<String>,
pub iso4217: Option<String>,
pub description: Option<String>,
}
impl Currency {
pub fn new(decimals: i32) -> Self {
Self {
decimals,
currency_code: None,
iso4217: None,
description: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebentureActionEntry {
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub invoice_date: DateTime,
pub due_date: DateTime,
pub delivery_date: Option<DateTime>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub records: Vec<InvoiceActionRecord>,
pub interest_percentage: f64,
pub reason_for_higher_interest: Option<String>,
pub interest_start_in_days_after_due_date: i32,
pub interest_type: Option<InterestType>,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub message: Option<String>,
pub invoice_number: Option<String>,
pub invoice_fee: Option<Amount>,
pub freight_fee: Option<Amount>,
pub send_by_mail_if_email_not_viewed_in_days: Option<i32>,
pub delivery_address_override: Option<DeliveryAddressOverride>,
pub debt_collection_details: Option<DebtCollectionDetails>,
pub reminder_invoice_details: Option<ReminderInvoiceDetails>,
#[serde(rename = "ReverseVATDetails")]
pub reverse_vat_details: Option<ReverseVATDetails>,
pub rot_rut_details: Option<RotRutDetails>,
pub payment_override: Option<PaymentOverride>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub appendixes: Vec<File>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub attachments: Vec<InvoiceActionAttachment>,
pub autogiro: Option<AutogiroWithdrawal>,
pub credit_card: Option<CreditCardWithdrawal>,
#[serde(rename = "InvoicePDF")]
pub invoice_pdf: Option<InvoiceFile>,
pub crediting_invoice_public_id: Option<String>,
pub external_reference: Option<String>,
pub is_locked: bool,
pub use_debtor_balance: bool,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceActionRecord {
pub product_public_id: Option<Uuid>,
pub sequence_no: i32,
pub units: Option<String>,
pub article_description: Option<String>,
pub article_number: Option<String>,
pub quantity: Option<f64>,
pub unit_price: Option<Amount>,
pub discount_amount: Option<Amount>,
pub discount_percentage: f64,
pub discount_type: DiscountType,
#[serde(rename = "VAT")]
pub vat: f64,
pub cost_center: Option<String>,
pub period_start: Option<DateTime>,
pub period_end: Option<DateTime>,
pub project: Option<String>,
pub rot_rut_activated: bool,
pub rot_rut_amount: Option<Amount>,
pub rot_rut_material_cost_amount: Option<Amount>,
pub rot_rut_hours: i32,
pub rot_rut_type: RotRutType,
pub record_type: RecordType,
pub vat_is_included: bool,
pub hidden: bool,
pub external_reference: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub dimensions: Vec<DimensionCode>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceActionAttachment {
pub file: Option<File>,
pub is_cover_sheet: bool,
pub sort_number: i32,
}
impl InvoiceActionAttachment {
pub fn new(is_cover_sheet: bool, sort_number: i32) -> Self {
Self {
is_cover_sheet,
sort_number,
file: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceFile {
#[serde(rename = "OCR")]
pub ocr: Option<String>,
pub stream: Option<Vec<u8>>,
pub url: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionActionEvent {
pub title: Option<String>,
pub content: Option<String>,
pub event_date: DateTime,
pub event_by: Option<String>,
pub reference: Option<String>,
pub event_type: EventType,
pub is_public: bool,
pub has_occured: bool,
pub event_public_id: Uuid,
}
impl DebtCollectionActionEvent {
pub fn new(
event_date: DateTime,
event_type: EventType,
is_public: bool,
has_occured: bool,
event_public_id: Uuid,
) -> Self {
Self {
event_date,
event_type,
is_public,
has_occured,
event_public_id,
title: None,
content: None,
event_by: None,
reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionInvoice {
pub invoice_date: DateTime,
pub due_date: DateTime,
pub invoice_number: Option<String>,
pub invoice_decription: Option<String>,
pub payment_terms_in_days: i32,
pub interest_terms_in_days: i32,
pub interest_percentage: f64,
pub interest_type: InterestType,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub name: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub country_code: Option<String>,
pub invoiced_amount: Option<Amount>,
pub invoice_file: Option<File>,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
}
impl DebtCollectionInvoice {
pub fn new(
invoice_date: DateTime,
due_date: DateTime,
payment_terms_in_days: i32,
interest_terms_in_days: i32,
interest_percentage: f64,
interest_type: InterestType,
) -> Self {
Self {
invoice_date,
due_date,
payment_terms_in_days,
interest_terms_in_days,
interest_percentage,
interest_type,
invoice_number: None,
invoice_decription: None,
our_reference: None,
your_reference: None,
name: None,
address: None,
address2: None,
zip_code: None,
city: None,
country_code: None,
invoiced_amount: None,
invoice_file: None,
ocr: None,
}
}
}
pub type DebtCollectionActionLogs = Vec<DebtCollectionActionLog>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionActionLog {
pub event: Option<String>,
pub created: DateTime,
pub created_by: Option<String>,
pub file: Option<File>,
}
impl DebtCollectionActionLog {
pub fn new(created: DateTime) -> Self {
Self {
created,
event: None,
created_by: None,
file: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionActionState {
pub stage: DebtCollectionActionStageType,
pub number_of_sent_invoice_reminders: i32,
pub debt_collection_invoice_sent_date: Option<DateTime>,
pub late_payment_invoice_sent_date: Option<DateTime>,
pub sent_to_bailiff_date: Option<DateTime>,
pub sent_to_bailiff_enforcement_date: Option<DateTime>,
pub next_event_date: Option<DateTime>,
pub closed_date: Option<DateTime>,
pub next_event: Option<String>,
pub is_paused: bool,
pub disputed_date: Option<DateTime>,
pub attested_date: Option<DateTime>,
pub has_previously_been_sent_to_installment_plan: bool,
}
impl DebtCollectionActionState {
pub fn new(
stage: DebtCollectionActionStageType,
number_of_sent_invoice_reminders: i32,
is_paused: bool,
has_previously_been_sent_to_installment_plan: bool,
) -> Self {
Self {
stage,
number_of_sent_invoice_reminders,
is_paused,
has_previously_been_sent_to_installment_plan,
debt_collection_invoice_sent_date: None,
late_payment_invoice_sent_date: None,
sent_to_bailiff_date: None,
sent_to_bailiff_enforcement_date: None,
next_event_date: None,
closed_date: None,
next_event: None,
disputed_date: None,
attested_date: None,
}
}
}
pub type DebtCollectionActionSubs = Vec<DebtCollectionActionSub>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionActionSub {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub creditor_org_no: Option<String>,
pub creditor_name: Option<String>,
pub debtor_org_no: Option<String>,
pub debtor_name: Option<String>,
pub current_amount: Option<Amount>,
pub invoiced_amount: Option<Amount>,
pub stage: DebtCollectionActionStageType,
pub action_type: ActionType,
pub delivery_method: DeliveryMethodType,
pub created: DateTime,
pub closed_date: Option<DateTime>,
pub attested_date: Option<DateTime>,
pub next_event_date: Option<DateTime>,
pub next_event: Option<String>,
pub original_due_date: DateTime,
pub original_invoice_date: DateTime,
pub original_invoice_number: Option<String>,
pub is_paused: bool,
pub is_commented: bool,
pub is_disputed: bool,
pub delivery_status: DeliveryStatusType,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub files: Vec<File>,
#[serde(rename = "OCRs", default, skip_serializing_if = "Vec::is_empty")]
pub oc_rs: Vec<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub invoice_numbers: Vec<String>,
pub invoice_source_public_id: Option<String>,
pub debt_collection_action_source: ActionSourceType,
pub installment_plan_public_id: Option<String>,
pub communication_language: LanguageType,
pub payment_terms_in_days: i32,
pub interest_percentage: f64,
pub your_reference: Option<String>,
}
pub type DebtCollectionActions = Vec<DebtCollectionAction>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionAction {
pub action_public_id: Option<String>,
pub created: DateTime,
pub creditor_public_id: Uuid,
pub debtor: Option<Debtor>,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub reason_description: Option<String>,
pub number_of_reminders: i32,
pub start_debt_collection_action_level: DebtCollectionActionLevelType,
pub end_debt_collection_action_level: DebtCollectionActionLevelType,
pub original_invoice_date: DateTime,
pub original_due_date: DateTime,
pub original_invoice_number: Option<String>,
pub original_amount: Option<Amount>,
pub original_invoice_file: Option<File>,
pub payment_terms_in_days: i32,
pub interest_terms_in_days: i32,
pub interest_percentage: f64,
pub interest_type: InterestType,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub interest_start_in_days_after_due_date: i32,
pub reason_for_higher_interest: Option<String>,
pub fee_amount: Option<Amount>,
pub interest_amount: Option<Amount>,
pub current_amount: Option<Amount>,
pub state: Option<DebtCollectionActionState>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub invoices: Vec<DebtCollectionInvoice>,
pub installment_plan_public_id: Option<String>,
pub invoice_source_public_id: Option<String>,
pub debt_collection_action_source: ActionSourceType,
pub delivery_address_override: Option<DeliveryAddressOverride>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub events: Vec<DebtCollectionActionEvent>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Debtor {
pub debtor_public_id: Uuid,
pub creditor_public_id: Uuid,
pub debtor_external_id: Option<String>,
pub org_no: Option<String>,
pub name: Option<String>,
pub attention: Option<String>,
pub care_of: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub country_code: Option<String>,
pub citizenship_country_code: Option<String>,
pub phone: Option<String>,
pub email: Option<String>,
pub contact_name: Option<String>,
pub contact_email: Option<String>,
pub vat_number: Option<String>,
pub debtor_no: Option<String>,
#[serde(rename = "GLN")]
pub gln: Option<String>,
pub is_active: Option<bool>,
pub protected_identity: bool,
pub use_protected_mail_delivery: bool,
pub debtor_type: Option<DebtorType>,
pub intermediator: Option<IntermediatorType>,
pub e_invoice_bank: Option<EInvoiceBankType>,
pub notes: Option<String>,
pub debtor_self_invoice_info: Option<DebtorSelfInvoiceInfo>,
pub default_action_config: Option<DebtorDefaultActionConfig>,
pub autogiro: Option<DebtorAutogiro>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub credit_cards: Vec<DebtorCreditCard>,
pub created: DateTime,
}
impl Debtor {
pub fn new(
debtor_public_id: Uuid,
creditor_public_id: Uuid,
protected_identity: bool,
use_protected_mail_delivery: bool,
created: DateTime,
) -> Self {
Self {
debtor_public_id,
creditor_public_id,
protected_identity,
use_protected_mail_delivery,
created,
debtor_external_id: None,
org_no: None,
name: None,
attention: None,
care_of: None,
address: None,
address2: None,
zip_code: None,
city: None,
country_code: None,
citizenship_country_code: None,
phone: None,
email: None,
contact_name: None,
contact_email: None,
vat_number: None,
debtor_no: None,
gln: None,
is_active: None,
debtor_type: None,
intermediator: None,
e_invoice_bank: None,
notes: None,
debtor_self_invoice_info: None,
default_action_config: None,
autogiro: None,
credit_cards: Vec::new(),
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorSelfInvoiceInfo {
pub next_self_invoice_number: Option<String>,
pub payment_method: DebtorPaymentMethod,
pub bankgiro_no: Option<String>,
pub plusgiro_no: Option<String>,
pub account_no: Option<String>,
pub clearing_no: Option<String>,
#[serde(rename = "IBAN")]
pub iban: Option<String>,
#[serde(rename = "BIC")]
pub bic: Option<String>,
pub fedwire_account_number: Option<String>,
pub routing_number: Option<String>,
pub approved_company_tax: bool,
}
impl DebtorSelfInvoiceInfo {
pub fn new(payment_method: DebtorPaymentMethod, approved_company_tax: bool) -> Self {
Self {
payment_method,
approved_company_tax,
next_self_invoice_number: None,
bankgiro_no: None,
plusgiro_no: None,
account_no: None,
clearing_no: None,
iban: None,
bic: None,
fedwire_account_number: None,
routing_number: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorDefaultActionConfig {
pub activate_default_action_config_override: bool,
pub start_debt_collection_action_level: DebtCollectionActionLevelType,
pub end_debt_collection_action_level: DebtCollectionActionLevelType,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub payment_terms_in_days: i32,
pub debt_collection_payment_terms_in_days: i32,
pub interest_terms_in_days: i32,
pub interest_percentage: f64,
pub invoice_payment_terms_in_days: i32,
pub interest_type: InterestType,
pub interest_start_in_days_after_due_date: i32,
pub reason_for_higher_interest: Option<String>,
pub our_reference: Option<String>,
pub number_of_reminders: i32,
pub currency_code: Option<String>,
pub send_invoice_to_debt_collection_after_days: i32,
pub send_invoice_to_debt_collection: bool,
pub include_pdf_in_email: Option<bool>,
pub send_reminder_invoice: bool,
pub send_reminder_invoice_days_after_due_date: i32,
pub invoice_fee: f64,
pub reminder_invoice_fee: f64,
pub send_by_mail_if_email_not_viewed_in_days: i32,
pub send_by_mail_if_email_not_viewed_in_days_enabled: bool,
pub reminder_invoice_payment_terms_in_days: i32,
pub invoice_comment: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorAutogiro {
pub active: bool,
pub account_no: Option<String>,
pub clearing_no: Option<String>,
pub stage: AutogiroStageType,
pub payer_number: Option<String>,
pub payment_service_supplier: Option<String>,
pub autogiro_first_withdrawal_date: Option<DateTime>,
}
impl DebtorAutogiro {
pub fn new(active: bool, stage: AutogiroStageType) -> Self {
Self {
active,
stage,
account_no: None,
clearing_no: None,
payer_number: None,
payment_service_supplier: None,
autogiro_first_withdrawal_date: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorCreditCard {
pub credit_card_public_id: Uuid,
pub created: DateTime,
pub expires: DateTime,
pub masked_card_number: Option<String>,
pub brand: Option<String>,
}
impl DebtorCreditCard {
pub fn new(credit_card_public_id: Uuid, created: DateTime, expires: DateTime) -> Self {
Self {
credit_card_public_id,
created,
expires,
masked_card_number: None,
brand: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionEntry {
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub reason_description: Option<String>,
pub number_of_reminders: i32,
pub start_debt_collection_action_level: DebtCollectionActionLevelType,
pub end_debt_collection_action_level: DebtCollectionActionLevelType,
pub value: Option<Amount>,
pub original_invoice_date: DateTime,
pub original_due_date: DateTime,
pub original_invoice_number: Option<String>,
pub payment_terms_in_days: i32,
pub interest_percentage: f64,
pub interest_type: Option<InterestType>,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub original_invoice_file: Option<File>,
pub interest_start_in_days_after_due_date: i32,
pub reason_for_higher_interest: Option<String>,
pub delivery_address_override: Option<DeliveryAddressOverride>,
pub payment_override: Option<PaymentOverride>,
pub eviction: bool,
pub inform_social_welfare: bool,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionFromInvoiceEntry {
pub source_public_id: Option<String>,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub reason_description: Option<String>,
pub number_of_reminders: i32,
pub start_debt_collection_action_level: DebtCollectionActionLevelType,
pub end_debt_collection_action_level: DebtCollectionActionLevelType,
pub payment_terms_in_days: i32,
pub interest_percentage: f64,
pub interest_type: Option<InterestType>,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub interest_start_in_days_after_due_date: i32,
pub reason_for_higher_interest: Option<String>,
pub delivery_address_override: Option<DeliveryAddressOverride>,
pub payment_override: Option<PaymentOverride>,
pub eviction: bool,
pub inform_social_welfare: bool,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionFromReconciliationInvoiceEntry {
pub source_public_id: Option<String>,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub reason_description: Option<String>,
pub number_of_reminders: i32,
pub start_debt_collection_action_level: DebtCollectionActionLevelType,
pub payment_terms_in_days: i32,
pub interest_percentage: f64,
pub interest_type: Option<InterestType>,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub original_invoice_date: DateTime,
pub original_due_date: DateTime,
pub interest_start_in_days_after_due_date: i32,
pub reason_for_higher_interest: Option<String>,
pub attention: Option<String>,
pub care_of: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub country_code: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
pub org_no: Option<String>,
pub eviction: bool,
pub inform_social_welfare: bool,
}
pub type DebtCollectionMessages = Vec<DebtCollectionMessage>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtCollectionMessage {
pub public_id: Uuid,
pub message: Option<String>,
pub is_active: bool,
}
impl DebtCollectionMessage {
pub fn new(public_id: Uuid, is_active: bool) -> Self {
Self {
public_id,
is_active,
message: None,
}
}
}
pub type DebtorAutogiroApprovals = Vec<DebtorAutogiroApproval>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorAutogiroApproval {
pub created: DateTime,
pub active: bool,
#[serde(rename = "AutoGiroApprovalXML")]
pub auto_giro_approval_xml: Option<String>,
}
impl DebtorAutogiroApproval {
pub fn new(created: DateTime, active: bool) -> Self {
Self {
created,
active,
auto_giro_approval_xml: None,
}
}
}
pub type DebtorBalances = Vec<DebtorBalance>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorBalance {
pub debtor_public_id: Uuid,
pub transaction_date: DateTime,
pub amount: Option<Amount>,
pub balance_type: DebtorBalanceType,
pub description: Option<String>,
}
impl DebtorBalance {
pub fn new(
debtor_public_id: Uuid,
transaction_date: DateTime,
balance_type: DebtorBalanceType,
) -> Self {
Self {
debtor_public_id,
transaction_date,
balance_type,
amount: None,
description: None,
}
}
}
pub type DebtorCategories = Vec<DebtorCategory>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorCategory {
pub creditor_public_id: Uuid,
pub category_public_id: Uuid,
pub category_name: Option<String>,
}
impl DebtorCategory {
pub fn new(creditor_public_id: Uuid, category_public_id: Uuid) -> Self {
Self {
creditor_public_id,
category_public_id,
category_name: None,
}
}
}
pub type DebtorEvents = Vec<DebtorEvent>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorEvent {
pub title: Option<String>,
pub content: Option<String>,
pub event_date: DateTime,
pub event_by: Option<String>,
pub reference: Option<String>,
pub event_type: EventType,
pub is_public: bool,
pub has_occured: bool,
pub event_public_id: Uuid,
}
impl DebtorEvent {
pub fn new(
event_date: DateTime,
event_type: EventType,
is_public: bool,
has_occured: bool,
event_public_id: Uuid,
) -> Self {
Self {
event_date,
event_type,
is_public,
has_occured,
event_public_id,
title: None,
content: None,
event_by: None,
reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorInformationCorrectionRequest {
pub debtor_public_id: Uuid,
pub comment: Option<String>,
}
impl DebtorInformationCorrectionRequest {
pub fn new(debtor_public_id: Uuid) -> Self {
Self {
debtor_public_id,
comment: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorKivraStatus {
pub debtor_public_id: Uuid,
pub kivra_status: KivraStatusType,
}
impl DebtorKivraStatus {
pub fn new(debtor_public_id: Uuid, kivra_status: KivraStatusType) -> Self {
Self {
debtor_public_id,
kivra_status,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorsToMatchWithKivra {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub debtor_public_ids: Vec<Uuid>,
}
pub type Debtors = Vec<Debtor>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct DebtorUnhandledExternalPayment {
pub amount: Option<Amount>,
pub unhandled_external_payment_type: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct DefaultActionConfig {
pub creditor_public_id: Uuid,
pub start_debt_collection_action_level: DebtCollectionActionLevelType,
pub end_debt_collection_action_level: DebtCollectionActionLevelType,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub payment_terms_in_days: i32,
pub debt_collection_payment_terms_in_days: i32,
pub interest_terms_in_days: i32,
pub interest_percentage: f64,
pub invoice_payment_terms_in_days: i32,
pub interest_type: InterestType,
pub interest_start_in_days_after_due_date: i32,
pub reason_for_higher_interest: Option<String>,
pub our_reference: Option<String>,
pub number_of_reminders: i32,
pub currency_code: Option<String>,
pub reason_description: Option<String>,
pub send_invoice_to_debt_collection_after_days: i32,
pub send_invoice_to_debt_collection: bool,
pub include_pdf_in_email: Option<bool>,
pub send_reminder_invoice: bool,
pub send_reminder_invoice_days_after_due_date: i32,
pub reminder_invoice_fee: f64,
pub invoice_fee: f64,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub automatic_invoice_write_off_thresholds: Vec<Amount>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub invoice_fee_only_on_delivery_methods: Vec<DeliveryMethodType>,
pub send_by_mail_if_email_not_viewed_in_days: i32,
pub send_by_mail_if_email_not_viewed_in_days_enabled: bool,
pub send_as_priority_mail: bool,
pub send_with_color: bool,
pub send_debt_collections_with_mail: bool,
pub reminder_invoice_payment_terms_in_days: i32,
pub invoice_comment: Option<String>,
pub reminder_grace_days: Option<i32>,
pub min_amount_for_sending_reminder: Option<f64>,
pub min_amount_for_sending_debt_collection_action: Option<f64>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub incoming_payment_notification_methods: Vec<IncomingPaymentNotificationMethodType>,
pub debt_collection_message_public_id: Option<Uuid>,
pub do_not_automatically_send_foreign_invoices_to_debt_collection: bool,
pub show_unpaid_invoices_on_next_invoice: bool,
pub usage_of_debtor_balance_is_applied_by_default: bool,
pub dont_request_due_claim_response: bool,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct EInvoiceRegistration {
#[serde(rename = "CustomerID")]
pub customer_id: i32,
pub sender_name: Option<String>,
pub customer_number: Option<String>,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub bank_code: EInvoiceBankType,
pub customer_name: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
pub status: Option<String>,
pub creditor_public_id: Uuid,
}
impl EInvoiceRegistration {
pub fn new(customer_id: i32, bank_code: EInvoiceBankType, creditor_public_id: Uuid) -> Self {
Self {
customer_id,
bank_code,
creditor_public_id,
sender_name: None,
customer_number: None,
ssn: None,
customer_name: None,
email: None,
phone: None,
status: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ExportFilesRequest {
pub file_name: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub file_public_ids: Vec<Uuid>,
pub receiver: Option<String>,
pub creditor_public_id: Uuid,
}
impl ExportFilesRequest {
pub fn new(creditor_public_id: Uuid) -> Self {
Self {
creditor_public_id,
file_name: None,
file_public_ids: Vec::new(),
receiver: None,
}
}
}
pub type Files = Vec<File>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct GenericAction {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub creditor_org_no: Option<String>,
pub creditor_name: Option<String>,
pub amount: Option<Amount>,
pub original_amount: Option<Amount>,
pub stage: GenericActionStageType,
pub action_type: ActionType,
pub created: DateTime,
pub closed_date: Option<DateTime>,
pub debtor_org_no: Option<String>,
pub debtor_name: Option<String>,
pub attested_date: Option<DateTime>,
pub invoice_sent_date: Option<DateTime>,
pub reminder_invoice_sent_date: Option<DateTime>,
pub next_event: Option<String>,
pub next_event_date: Option<DateTime>,
pub original_due_date: DateTime,
pub original_invoice_date: DateTime,
pub original_invoice_number: Option<String>,
pub is_paused: bool,
pub is_disputed: bool,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
pub debt_collection_action_public_id: Option<String>,
pub reminder_invoice_action_public_id: Option<String>,
pub delivery_method: DeliveryMethodType,
pub delivery_status: DeliveryStatusType,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub files: Vec<File>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct HalfYearlyAutogiroContractInvoice {
pub creditor_public_id: Uuid,
pub name: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
pub debtor_external_id: Option<String>,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub clearing_number: Option<String>,
pub account_number: Option<String>,
pub bank: Option<String>,
pub amount: f64,
pub withdrawal_day: i32,
pub withdrawal_month: i32,
pub end_date: Option<DateTime>,
pub start_date: Option<DateTime>,
pub enable_automatic_reminder: bool,
pub enable_automatic_debt_collection: bool,
}
impl HalfYearlyAutogiroContractInvoice {
pub fn new(
creditor_public_id: Uuid,
amount: f64,
withdrawal_day: i32,
withdrawal_month: i32,
enable_automatic_reminder: bool,
enable_automatic_debt_collection: bool,
) -> Self {
Self {
creditor_public_id,
amount,
withdrawal_day,
withdrawal_month,
enable_automatic_reminder,
enable_automatic_debt_collection,
name: None,
address: None,
address2: None,
zip_code: None,
city: None,
email: None,
phone: None,
debtor_external_id: None,
ssn: None,
clearing_number: None,
account_number: None,
bank: None,
end_date: None,
start_date: None,
}
}
}
pub type ImportInvoiceFileJobs = Vec<InvoiceImportFileJob>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceImportFileJob {
pub import_public_id: Uuid,
pub creditor_public_id: Uuid,
pub file: Option<File>,
pub created: DateTime,
pub processed: Option<DateTime>,
pub state: ImportFileStateType,
pub information: Option<String>,
}
impl InvoiceImportFileJob {
pub fn new(
import_public_id: Uuid,
creditor_public_id: Uuid,
created: DateTime,
state: ImportFileStateType,
) -> Self {
Self {
import_public_id,
creditor_public_id,
created,
state,
file: None,
processed: None,
information: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ImportInvoiceFile {
pub creditor_public_id: Uuid,
pub file: Option<File>,
}
impl ImportInvoiceFile {
pub fn new(creditor_public_id: Uuid) -> Self {
Self {
creditor_public_id,
file: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ImportPaymentFile {
pub creditor_public_id: Uuid,
pub file: Option<File>,
}
impl ImportPaymentFile {
pub fn new(creditor_public_id: Uuid) -> Self {
Self {
creditor_public_id,
file: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct IncomingPaymentRequest {
pub creditor_public_id: Uuid,
pub from: DateTime,
pub to: DateTime,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub payment_mean_code_filter: Vec<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub project_number_filter: Vec<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub action_public_id_filter: Vec<String>,
}
impl IncomingPaymentRequest {
pub fn new(creditor_public_id: Uuid, from: DateTime, to: DateTime) -> Self {
Self {
creditor_public_id,
from,
to,
payment_mean_code_filter: Vec::new(),
project_number_filter: Vec::new(),
action_public_id_filter: Vec::new(),
}
}
}
pub type IncomingPayments = Vec<IncomingPayment>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct IncomingPayment {
pub creditor_public_id: Uuid,
pub invoice_number: Option<String>,
pub action_public_id: Option<String>,
pub action_type: ActionType,
pub debtor_public_id: Uuid,
pub debtor_name: Option<String>,
pub amount: Option<Amount>,
pub created_date: DateTime,
pub payment_date: DateTime,
pub payment_mean_code: Option<String>,
pub file: Option<File>,
pub payment_reference_id: Uuid,
pub external_reference: Option<String>,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
pub created_by: Option<String>,
pub is_reminder_payment: bool,
}
impl IncomingPayment {
pub fn new(
creditor_public_id: Uuid,
action_type: ActionType,
debtor_public_id: Uuid,
created_date: DateTime,
payment_date: DateTime,
payment_reference_id: Uuid,
is_reminder_payment: bool,
) -> Self {
Self {
creditor_public_id,
action_type,
debtor_public_id,
created_date,
payment_date,
payment_reference_id,
is_reminder_payment,
invoice_number: None,
action_public_id: None,
debtor_name: None,
amount: None,
payment_mean_code: None,
file: None,
external_reference: None,
ocr: None,
created_by: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InstallmentPlanActionEvent {
pub title: Option<String>,
pub content: Option<String>,
pub event_date: DateTime,
pub event_by: Option<String>,
pub reference: Option<String>,
pub event_type: EventType,
pub is_public: bool,
pub has_occured: bool,
pub event_public_id: Uuid,
}
impl InstallmentPlanActionEvent {
pub fn new(
event_date: DateTime,
event_type: EventType,
is_public: bool,
has_occured: bool,
event_public_id: Uuid,
) -> Self {
Self {
event_date,
event_type,
is_public,
has_occured,
event_public_id,
title: None,
content: None,
event_by: None,
reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InstallmentPlanActionFromDebtCollectionInvoice {
pub invoice_date: DateTime,
pub due_date: DateTime,
pub invoice_number: Option<String>,
pub invoice_decription: Option<String>,
pub invoiced_amount: Option<Amount>,
pub remaining_amount: Option<Amount>,
pub invoice_file: Option<File>,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
}
impl InstallmentPlanActionFromDebtCollectionInvoice {
pub fn new(invoice_date: DateTime, due_date: DateTime) -> Self {
Self {
invoice_date,
due_date,
invoice_number: None,
invoice_decription: None,
invoiced_amount: None,
remaining_amount: None,
invoice_file: None,
ocr: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InstallmentPlanActionFromDebtCollectionState {
pub stage: InstallmentPlanActionStageType,
pub number_of_sent_invoices: i32,
pub next_event_date: Option<DateTime>,
pub closed_date: Option<DateTime>,
pub next_event: Option<String>,
pub is_paused: bool,
pub disputed_date: Option<DateTime>,
}
impl InstallmentPlanActionFromDebtCollectionState {
pub fn new(
stage: InstallmentPlanActionStageType,
number_of_sent_invoices: i32,
is_paused: bool,
) -> Self {
Self {
stage,
number_of_sent_invoices,
is_paused,
next_event_date: None,
closed_date: None,
next_event: None,
disputed_date: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InstallmentPlanActionFromDebtCollection {
pub action_public_id: Option<String>,
pub created: DateTime,
pub debtor: Option<Debtor>,
pub creditor_public_id: Uuid,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub current_amount: Option<Amount>,
pub fee_amount: Option<Amount>,
pub interest_amount: Option<Amount>,
pub debt_amount: Option<Amount>,
pub original_amount: Option<Amount>,
pub state: Option<InstallmentPlanActionFromDebtCollectionState>,
pub original_invoice_date: DateTime,
pub original_due_date: DateTime,
pub original_invoice_number: Option<String>,
pub payment_terms_in_days: i32,
pub interest_percentage: f64,
pub interest_type: InterestType,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub original_invoice_file: Option<File>,
pub interest_start_in_days_after_due_date: i32,
pub periods: i32,
pub next_invoice_date: DateTime,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub invoices: Vec<InstallmentPlanActionFromDebtCollectionInvoice>,
pub installment_plan_source: InstallmentPlanSourceType,
pub invoice_source_public_id: Option<String>,
pub debt_collection_source_public_id: Option<String>,
pub delivery_address_override: Option<DeliveryAddressOverride>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub events: Vec<InstallmentPlanActionEvent>,
}
pub type InstallmentPlanActionsFromDebtCollection = Vec<InstallmentPlanActionFromDebtCollection>;
pub type InstallmentPlanActionSubs = Vec<InstallmentPlanActionSub>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InstallmentPlanActionSub {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub creditor_org_no: Option<String>,
pub creditor_name: Option<String>,
pub debtor_org_no: Option<String>,
pub debtor_name: Option<String>,
pub current_amount: Option<Amount>,
pub invoiced_amount: Option<Amount>,
pub stage: InstallmentPlanActionStageType,
pub action_type: ActionType,
pub delivery_method: DeliveryMethodType,
pub created: DateTime,
pub closed_date: Option<DateTime>,
pub attested_date: Option<DateTime>,
pub next_event_date: Option<DateTime>,
pub next_event: Option<String>,
pub original_due_date: DateTime,
pub original_invoice_date: DateTime,
pub original_invoice_number: Option<String>,
pub is_paused: bool,
pub is_commented: bool,
pub is_disputed: bool,
pub delivery_status: DeliveryStatusType,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub files: Vec<File>,
#[serde(rename = "OCRs", default, skip_serializing_if = "Vec::is_empty")]
pub oc_rs: Vec<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub invoice_numbers: Vec<String>,
pub communication_language: LanguageType,
pub payment_terms_in_days: i32,
pub interest_percentage: f64,
pub your_reference: Option<String>,
}
pub type InvoiceAccountReceivables = Vec<InvoiceAccountReceivable>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceAccountReceivable {
pub action_public_id: Option<String>,
pub invoice_number: Option<String>,
pub debtor: Option<Debtor>,
pub invoice_date: DateTime,
pub due_date: DateTime,
pub invoiced_amount_including_tax: Option<Amount>,
pub remaining_amount_including_tax: Option<Amount>,
pub period_start: Option<DateTime>,
pub period_end: Option<DateTime>,
pub your_reference: Option<String>,
}
impl InvoiceAccountReceivable {
pub fn new(invoice_date: DateTime, due_date: DateTime) -> Self {
Self {
invoice_date,
due_date,
action_public_id: None,
invoice_number: None,
debtor: None,
invoiced_amount_including_tax: None,
remaining_amount_including_tax: None,
period_start: None,
period_end: None,
your_reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceActionCommented {
pub event: Option<InvoiceActionEvent>,
pub invoice_action: Option<InvoiceAction>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceActionEvent {
pub title: Option<String>,
pub content: Option<String>,
pub event_date: DateTime,
pub event_by: Option<String>,
pub reference: Option<String>,
pub event_type: EventType,
pub is_public: bool,
pub has_occured: bool,
pub event_public_id: Uuid,
}
impl InvoiceActionEvent {
pub fn new(
event_date: DateTime,
event_type: EventType,
is_public: bool,
has_occured: bool,
event_public_id: Uuid,
) -> Self {
Self {
event_date,
event_type,
is_public,
has_occured,
event_public_id,
title: None,
content: None,
event_by: None,
reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceAction {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub communication_language: LanguageType,
pub created: DateTime,
pub delivery_method: DeliveryMethodType,
pub debtor: Option<Debtor>,
pub state: Option<InvoiceActionState>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub invoices: Vec<InvoiceActionInvoice>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub records: Vec<InvoiceActionRecord>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub events: Vec<InvoiceActionEvent>,
pub invoice_date: DateTime,
pub due_date: DateTime,
pub delivery_date: Option<DateTime>,
pub payment_terms_in_days: i32,
pub interest_terms_in_days: i32,
pub interest_percentage: f64,
pub interest_type: InterestType,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub interest_start_in_days_after_due_date: i32,
pub invoiced_amount: Option<Amount>,
pub interest_amount: Option<Amount>,
pub rot_rut_deduction_amount: Option<Amount>,
pub current_amount: Option<Amount>,
pub credited_amount: Option<Amount>,
pub paid_amount: Option<Amount>,
pub write_off_amount: Option<Amount>,
pub awaiting_payment_transfer_amount: Option<Amount>,
#[serde(rename = "TotalVATAmount")]
pub total_vat_amount: Option<Amount>,
pub cent_rounding_amount: Option<Amount>,
pub debt_collection_action_public_id: Option<String>,
pub reminder_invoice_action_public_id: Option<String>,
pub delivery_address_override: Option<DeliveryAddressOverride>,
pub crediting_invoice: Option<CreditingInvoice>,
pub autogiro: Option<AutogiroWithdrawal>,
pub credit_card: Option<CreditCardWithdrawal>,
pub message: Option<String>,
pub invoice_number: Option<String>,
pub payment_override: Option<PaymentOverride>,
pub debt_collection_details: Option<DebtCollectionDetails>,
pub reminder_invoice_details: Option<ReminderInvoiceDetails>,
#[serde(rename = "ReverseVATDetails")]
pub reverse_vat_details: Option<ReverseVATDetails>,
pub rot_rut_details: Option<RotRutDetails>,
pub reason_for_higher_interest: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub appendixes: Vec<File>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub attachments: Vec<InvoiceActionAttachment>,
pub action_type: ActionType,
pub invoice_fee: Option<Amount>,
pub freight_fee: Option<Amount>,
pub send_by_mail_if_email_not_viewed_in_days: Option<i32>,
pub external_reference: Option<String>,
pub contract_invoice_action_public_id: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceActionState {
pub stage: InvoiceActionStageType,
pub invoice_sent_date: Option<DateTime>,
pub next_event_date: Option<DateTime>,
pub closed_date: Option<DateTime>,
pub next_event: Option<String>,
pub is_paused: bool,
pub is_locked: bool,
pub attested_date: Option<DateTime>,
pub disputed_date: Option<DateTime>,
pub sms_sent_date: Option<DateTime>,
pub sent_to_debt_collection_date: Option<DateTime>,
pub sales_requested_date: Option<DateTime>,
pub credit_card_payment_public_id: Option<Uuid>,
pub swish_payment_public_id: Option<String>,
pub use_debtor_balance: bool,
}
impl InvoiceActionState {
pub fn new(
stage: InvoiceActionStageType,
is_paused: bool,
is_locked: bool,
use_debtor_balance: bool,
) -> Self {
Self {
stage,
is_paused,
is_locked,
use_debtor_balance,
invoice_sent_date: None,
next_event_date: None,
closed_date: None,
next_event: None,
attested_date: None,
disputed_date: None,
sms_sent_date: None,
sent_to_debt_collection_date: None,
sales_requested_date: None,
credit_card_payment_public_id: None,
swish_payment_public_id: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceActionInvoice {
pub invoice_date: DateTime,
pub due_date: DateTime,
pub invoice_number: Option<String>,
pub invoice_decription: Option<String>,
pub payment_terms_in_days: i32,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub name: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub country_code: Option<String>,
pub email: Option<String>,
pub invoiced_amount: Option<Amount>,
pub invoice_file: Option<File>,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
}
impl InvoiceActionInvoice {
pub fn new(invoice_date: DateTime, due_date: DateTime, payment_terms_in_days: i32) -> Self {
Self {
invoice_date,
due_date,
payment_terms_in_days,
invoice_number: None,
invoice_decription: None,
our_reference: None,
your_reference: None,
name: None,
address: None,
address2: None,
zip_code: None,
city: None,
country_code: None,
email: None,
invoiced_amount: None,
invoice_file: None,
ocr: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceActionEntry {
pub action_type: ActionType,
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub invoice_date: DateTime,
pub due_date: DateTime,
pub delivery_date: Option<DateTime>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub records: Vec<InvoiceActionRecord>,
pub interest_percentage: f64,
pub reason_for_higher_interest: Option<String>,
pub interest_start_in_days_after_due_date: i32,
pub interest_type: Option<InterestType>,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub message: Option<String>,
pub invoice_number: Option<String>,
pub invoice_fee: Option<Amount>,
pub freight_fee: Option<Amount>,
pub send_by_mail_if_email_not_viewed_in_days: Option<i32>,
pub delivery_address_override: Option<DeliveryAddressOverride>,
pub debt_collection_details: Option<DebtCollectionDetails>,
pub reminder_invoice_details: Option<ReminderInvoiceDetails>,
#[serde(rename = "ReverseVATDetails")]
pub reverse_vat_details: Option<ReverseVATDetails>,
pub rot_rut_details: Option<RotRutDetails>,
pub payment_override: Option<PaymentOverride>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub appendixes: Vec<File>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub attachments: Vec<InvoiceActionAttachment>,
pub autogiro: Option<AutogiroWithdrawal>,
pub credit_card: Option<CreditCardWithdrawal>,
#[serde(rename = "InvoicePDF")]
pub invoice_pdf: Option<InvoiceFile>,
pub crediting_invoice_public_id: Option<String>,
pub external_reference: Option<String>,
pub is_locked: bool,
pub use_debtor_balance: bool,
pub invoice_send_date_override: Option<DateTime>,
}
pub type InvoiceActionRotRutProcesseds = Vec<InvoiceActionRotRutProcessed>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceActionRotRutProcessed {
pub action_public_id: Option<String>,
pub processed: DateTime,
pub processed_by: Option<String>,
}
impl InvoiceActionRotRutProcessed {
pub fn new(processed: DateTime) -> Self {
Self {
processed,
action_public_id: None,
processed_by: None,
}
}
}
pub type InvoiceActionSubs = Vec<InvoiceActionSub>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceActionSub {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub creditor_org_no: Option<String>,
pub creditor_name: Option<String>,
pub debtor_org_no: Option<String>,
pub debtor_name: Option<String>,
pub current_amount: Option<Amount>,
pub invoiced_amount: Option<Amount>,
pub stage: InvoiceActionStageType,
pub action_type: ActionType,
pub delivery_method: DeliveryMethodType,
pub delivery_status: DeliveryStatusType,
pub closed_date: Option<DateTime>,
pub created: DateTime,
pub invoice_sent_date: Option<DateTime>,
pub reminder_invoice_sent_date: Option<DateTime>,
pub attested_date: Option<DateTime>,
pub next_event_date: Option<DateTime>,
pub due_date: DateTime,
pub invoice_date: DateTime,
pub invoice_number: Option<String>,
pub is_commented: bool,
pub is_locked: bool,
pub is_paused: bool,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
pub contract_invoice_action_public_id: Option<String>,
pub file: Option<File>,
pub next_event: Option<String>,
pub awaiting_payment_transfer_amount: Option<Amount>,
#[serde(rename = "TotalVATAmount")]
pub total_vat_amount: Option<Amount>,
pub is_disputed: bool,
pub debt_collection_action_public_id: Option<String>,
pub reminder_invoice_action_public_id: Option<String>,
pub autogiro_withdrawal_enabled: bool,
pub your_reference: Option<String>,
}
pub type InvoiceActions = Vec<InvoiceAction>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceBookkeepingOverride {
pub debit_account: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoiceDeliveryStatus {
pub action_type: ActionType,
pub action_public_id: Option<String>,
pub delivered: bool,
pub reason: Option<String>,
}
impl InvoiceDeliveryStatus {
pub fn new(action_type: ActionType, delivered: bool) -> Self {
Self {
action_type,
delivered,
action_public_id: None,
reason: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct InvoicePlan {
pub periods: i32,
pub payment_terms_in_days: i32,
pub next_invoice_date: DateTime,
}
impl InvoicePlan {
pub fn new(periods: i32, payment_terms_in_days: i32, next_invoice_date: DateTime) -> Self {
Self {
periods,
payment_terms_in_days,
next_invoice_date,
}
}
}
pub type TextRows = Vec<TextTemplate>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct TextTemplate {
pub invoice_text_template_public_id: Uuid,
pub creditor_public_id: Uuid,
pub description: Option<String>,
}
impl TextTemplate {
pub fn new(invoice_text_template_public_id: Uuid, creditor_public_id: Uuid) -> Self {
Self {
invoice_text_template_public_id,
creditor_public_id,
description: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct LockedPeriod {
pub creditor_public_id: Uuid,
pub to: DateTime,
}
impl LockedPeriod {
pub fn new(creditor_public_id: Uuid, to: DateTime) -> Self {
Self {
creditor_public_id,
to,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct MailDelivery {
pub creditor_public_id: Uuid,
pub file: Option<File>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub appendixes: Vec<Vec<u8>>,
pub send_as_priority_mail: Option<bool>,
pub send_with_color: Option<bool>,
pub is_simplex: Option<bool>,
pub postage_type: PostageType,
}
impl MailDelivery {
pub fn new(creditor_public_id: Uuid, postage_type: PostageType) -> Self {
Self {
creditor_public_id,
postage_type,
file: None,
appendixes: Vec::new(),
send_as_priority_mail: None,
send_with_color: None,
is_simplex: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct MonthlyAutogiroContractInvoice {
pub creditor_public_id: Uuid,
pub name: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
pub debtor_external_id: Option<String>,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub clearing_number: Option<String>,
pub account_number: Option<String>,
pub bank: Option<String>,
pub amount: f64,
pub withdrawal_day: i32,
pub end_date: Option<DateTime>,
pub start_date: Option<DateTime>,
pub enable_automatic_reminder: bool,
pub enable_automatic_debt_collection: bool,
}
impl MonthlyAutogiroContractInvoice {
pub fn new(
creditor_public_id: Uuid,
amount: f64,
withdrawal_day: i32,
enable_automatic_reminder: bool,
enable_automatic_debt_collection: bool,
) -> Self {
Self {
creditor_public_id,
amount,
withdrawal_day,
enable_automatic_reminder,
enable_automatic_debt_collection,
name: None,
address: None,
address2: None,
zip_code: None,
city: None,
email: None,
phone: None,
debtor_external_id: None,
ssn: None,
clearing_number: None,
account_number: None,
bank: None,
end_date: None,
start_date: None,
}
}
}
pub type NotificationEvents = Vec<NotificationEvent>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct NotificationEvent {
pub title: Option<String>,
pub content: Option<String>,
pub event_date: DateTime,
pub event_by: Option<String>,
pub event_type: EventType,
pub creditor_public_id: Uuid,
pub reference_public_id: Option<String>,
pub action_type: Option<ActionType>,
}
impl NotificationEvent {
pub fn new(event_date: DateTime, event_type: EventType, creditor_public_id: Uuid) -> Self {
Self {
event_date,
event_type,
creditor_public_id,
title: None,
content: None,
event_by: None,
reference_public_id: None,
action_type: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct NotificationReceiverSetting {
pub creditor_public_id: Uuid,
pub notification: bool,
pub undelivered: bool,
pub payment: bool,
pub comment: bool,
pub finance: bool,
pub import: bool,
pub technical: bool,
}
pub type NotificationReceivers = Vec<NotificationReceiver>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct NotificationReceiver {
pub email: Option<String>,
pub notification_receiver_public_id: Uuid,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub notifications: Vec<NotificationReceiverSetting>,
}
impl NotificationReceiver {
pub fn new(notification_receiver_public_id: Uuid) -> Self {
Self {
notification_receiver_public_id,
email: None,
notifications: Vec::new(),
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct OpenActionRequest {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub creditor_public_ids: Vec<Uuid>,
pub offset: Option<i32>,
pub limit: Option<i32>,
pub sorting_field: Option<String>,
pub asc: Option<bool>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct OrderActionAddress {
pub first_name: Option<String>,
pub last_name: Option<String>,
pub care_of: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub country_code: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct OrderActionDebtor {
#[serde(rename = "SSN")]
pub ssn: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct OrderActionEntry {
pub creditor_public_id: Uuid,
pub communication_language: LanguageType,
pub debtor: Option<OrderActionDebtor>,
pub billing_address: Option<OrderActionAddress>,
pub order_total_amount: Option<Amount>,
pub order_total_vat_amount: Option<Amount>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub records: Vec<OrderActionRecord>,
pub order_number: Option<String>,
pub external_reference: Option<String>,
}
impl OrderActionEntry {
pub fn new(creditor_public_id: Uuid, communication_language: LanguageType) -> Self {
Self {
creditor_public_id,
communication_language,
debtor: None,
billing_address: None,
order_total_amount: None,
order_total_vat_amount: None,
records: Vec::new(),
order_number: None,
external_reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct OrderActionRecord {
pub product_public_id: Option<Uuid>,
pub article_number: Option<String>,
pub article_description: Option<String>,
pub quantity: i64,
pub units: Option<String>,
#[serde(rename = "VAT")]
pub vat: f64,
pub unit_price: Option<Amount>,
pub discount_amount: Option<Amount>,
pub record_type: OrderRecordType,
pub total_vat_amount: Option<Amount>,
pub total_amount: Option<Amount>,
}
impl OrderActionRecord {
pub fn new(quantity: i64, vat: f64, record_type: OrderRecordType) -> Self {
Self {
quantity,
vat,
record_type,
product_public_id: None,
article_number: None,
article_description: None,
units: None,
unit_price: None,
discount_amount: None,
total_vat_amount: None,
total_amount: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct OrderActionState {
pub stage: OrderStageType,
pub created: DateTime,
pub updated: DateTime,
pub closed_date: Option<DateTime>,
pub paid_date: Option<DateTime>,
pub paid_by_payment_method: Option<OrderPaymentMethodType>,
pub invoice_action_public_id: Option<String>,
}
impl OrderActionState {
pub fn new(stage: OrderStageType, created: DateTime, updated: DateTime) -> Self {
Self {
stage,
created,
updated,
closed_date: None,
paid_date: None,
paid_by_payment_method: None,
invoice_action_public_id: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct OrderAction {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub communication_language: LanguageType,
pub debtor: Option<OrderActionDebtor>,
pub billing_address: Option<OrderActionAddress>,
pub order_total_amount: Option<Amount>,
pub order_total_vat_amount: Option<Amount>,
pub external_reference: Option<String>,
pub order_number: Option<String>,
pub state: Option<OrderActionState>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub records: Vec<OrderActionRecord>,
}
impl OrderAction {
pub fn new(creditor_public_id: Uuid, communication_language: LanguageType) -> Self {
Self {
creditor_public_id,
communication_language,
action_public_id: None,
debtor: None,
billing_address: None,
order_total_amount: None,
order_total_vat_amount: None,
external_reference: None,
order_number: None,
state: None,
records: Vec::new(),
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct OrderCheckoutIntent {
pub action_public_id: Option<String>,
pub success_url: Option<String>,
pub failure_url: Option<String>,
pub css_url: Option<String>,
pub language: LanguageType,
}
impl OrderCheckoutIntent {
pub fn new(language: LanguageType) -> Self {
Self {
language,
action_public_id: None,
success_url: None,
failure_url: None,
css_url: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct OrderCheckout {
pub creditor_public_id: Uuid,
pub checkout_public_id: Uuid,
pub action_public_id: Option<String>,
pub checkout_window_url: Option<String>,
pub success_url: Option<String>,
pub failure_url: Option<String>,
pub css_url: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub allowed_payment_methods: Vec<OrderPaymentMethodType>,
pub status: OrderCheckoutStatusType,
pub created: DateTime,
pub language: LanguageType,
}
impl OrderCheckout {
pub fn new(
creditor_public_id: Uuid,
checkout_public_id: Uuid,
status: OrderCheckoutStatusType,
created: DateTime,
language: LanguageType,
) -> Self {
Self {
creditor_public_id,
checkout_public_id,
status,
created,
language,
action_public_id: None,
checkout_window_url: None,
success_url: None,
failure_url: None,
css_url: None,
allowed_payment_methods: Vec::new(),
}
}
}
pub type OutgoingPaymentStatuses = Vec<OutgoingPaymentStatus>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct OutgoingPaymentStatus {
pub payment_public_id: Uuid,
pub creditor_public_id: Uuid,
pub sending_bankgiro_no: Option<String>,
pub receiving_bankgiro_no: Option<String>,
pub receiving_plusgiro_no: Option<String>,
pub receiving_clearing_no: Option<String>,
pub receiving_account_no: Option<String>,
pub receiver_name: Option<String>,
pub amount: Option<Amount>,
pub is_salary_payment: bool,
pub payment_date: DateTime,
pub verification_date: Option<DateTime>,
pub status: OutgoingPaymentStatusType,
pub reference: Option<String>,
pub file: Option<File>,
pub comment: Option<String>,
}
impl OutgoingPaymentStatus {
pub fn new(
payment_public_id: Uuid,
creditor_public_id: Uuid,
is_salary_payment: bool,
payment_date: DateTime,
status: OutgoingPaymentStatusType,
) -> Self {
Self {
payment_public_id,
creditor_public_id,
is_salary_payment,
payment_date,
status,
sending_bankgiro_no: None,
receiving_bankgiro_no: None,
receiving_plusgiro_no: None,
receiving_clearing_no: None,
receiving_account_no: None,
receiver_name: None,
amount: None,
verification_date: None,
reference: None,
file: None,
comment: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct OutgoingPayment {
pub creditor_public_id: Uuid,
pub receiving_payment_method: ReceivingPaymentMethodType,
pub sender_payment_method: Option<SupplierPaymentMethodType>,
pub sending_bankgiro_no: Option<String>,
pub receiving_bankgiro_no: Option<String>,
pub receiving_plusgiro_no: Option<String>,
pub receiving_clearing_no: Option<String>,
pub receiving_account_no: Option<String>,
pub receiver_name: Option<String>,
pub payment_date: Option<DateTime>,
pub amount: Option<Amount>,
pub reference: Option<String>,
pub is_salary_payment: bool,
pub bank_id_reference_token: Option<Uuid>,
pub payment_public_id: Uuid,
pub sender_plusgiro: Option<i32>,
pub outgoing_payment_type: Option<OutgoingPaymentType>,
pub receiver_address: Option<String>,
pub receiver_co_address: Option<String>,
pub receiver_zip_code: Option<String>,
pub receiver_city: Option<String>,
pub transaction_file_public_id: Option<Uuid>,
pub receiver_iban: Option<String>,
pub receiver_bic: Option<String>,
pub comment: Option<String>,
pub category: P27CategoryPurposeType,
pub charge_bearer: P27ChargeBearerType,
pub payment_code_type: P27CodeType,
pub pain_payment_method_type: P27MethodType,
pub receiver_country_code: Option<String>,
pub receiver_org_no: Option<String>,
pub sender_org_no: Option<String>,
pub sender_name: Option<String>,
pub sender_bic: Option<String>,
pub sender_iban: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct OverpaymentDetails {
pub action_type: ActionType,
pub action_public_id: Option<String>,
pub invoice_number: Option<String>,
pub used_on_action_public_id: Option<String>,
}
impl OverpaymentDetails {
pub fn new(action_type: ActionType) -> Self {
Self {
action_type,
action_public_id: None,
invoice_number: None,
used_on_action_public_id: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct Password {
pub password: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PaymentAdviceActionEntry {
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub invoice_date: DateTime,
pub due_date: DateTime,
pub delivery_date: Option<DateTime>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub records: Vec<InvoiceActionRecord>,
pub interest_percentage: f64,
pub reason_for_higher_interest: Option<String>,
pub interest_start_in_days_after_due_date: i32,
pub interest_type: Option<InterestType>,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub message: Option<String>,
pub invoice_number: Option<String>,
pub invoice_fee: Option<Amount>,
pub freight_fee: Option<Amount>,
pub send_by_mail_if_email_not_viewed_in_days: Option<i32>,
pub delivery_address_override: Option<DeliveryAddressOverride>,
pub debt_collection_details: Option<DebtCollectionDetails>,
pub reminder_invoice_details: Option<ReminderInvoiceDetails>,
#[serde(rename = "ReverseVATDetails")]
pub reverse_vat_details: Option<ReverseVATDetails>,
pub rot_rut_details: Option<RotRutDetails>,
pub payment_override: Option<PaymentOverride>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub attachments: Vec<InvoiceActionAttachment>,
pub autogiro: Option<AutogiroWithdrawal>,
pub credit_card: Option<CreditCardWithdrawal>,
#[serde(rename = "InvoicePDF")]
pub invoice_pdf: Option<InvoiceFile>,
pub crediting_invoice_public_id: Option<String>,
pub external_reference: Option<String>,
pub is_locked: bool,
pub use_debtor_balance: bool,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PaymentMatch {
pub unhandled_payment_public_id: Uuid,
pub action_public_id: Option<String>,
pub payment_date: Option<DateTime>,
}
impl PaymentMatch {
pub fn new(unhandled_payment_public_id: Uuid) -> Self {
Self {
unhandled_payment_public_id,
action_public_id: None,
payment_date: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct PaymentMatchResult {
pub unhandled_payment_public_id: Uuid,
pub successfull: bool,
pub response_message: Option<String>,
}
impl PaymentMatchResult {
pub fn new(unhandled_payment_public_id: Uuid, successfull: bool) -> Self {
Self {
unhandled_payment_public_id,
successfull,
response_message: None,
}
}
}
pub type PeppolParticipants = Vec<PeppolParticipant>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct PeppolParticipant {
#[serde(rename = "ParticipantID")]
pub participant_id: Option<String>,
pub name: Option<String>,
pub country_code: Option<String>,
pub geo_info: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ProductPrice {
pub product_public_id: Uuid,
pub creditor_public_id: Uuid,
pub amount: Option<Amount>,
pub description: Option<String>,
}
impl ProductPrice {
pub fn new(product_public_id: Uuid, creditor_public_id: Uuid) -> Self {
Self {
product_public_id,
creditor_public_id,
amount: None,
description: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ProductsTemplate {
pub creditor_public_id: Uuid,
pub default_sales_account: Option<i32>,
#[serde(rename = "DefaultSalesEUAccount")]
pub default_sales_eu_account: Option<i32>,
#[serde(rename = "DefaultSalesEUVATAccount")]
pub default_sales_euvat_account: Option<i32>,
#[serde(rename = "DefaultSalesNonEUAccount")]
pub default_sales_non_eu_account: Option<i32>,
#[serde(rename = "DefaultPurchaseEUAccount")]
pub default_purchase_eu_account: Option<i32>,
#[serde(rename = "DefaultPurchaseEUVATAccount")]
pub default_purchase_euvat_account: Option<i32>,
#[serde(rename = "DefaultPurchaseNonEUAccount")]
pub default_purchase_non_eu_account: Option<i32>,
#[serde(rename = "DefaultSalesVAT")]
pub default_sales_vat: f64,
pub default_sales_units: Option<String>,
pub default_purchase_account: Option<i32>,
#[serde(rename = "DefaultVATAccount")]
pub default_vat_account: Option<i32>,
#[serde(rename = "DefaultPurchaseVATAccount")]
pub default_purchase_vat_account: Option<i32>,
pub default_product_type: ProductType,
}
impl ProductsTemplate {
pub fn new(
creditor_public_id: Uuid,
default_sales_vat: f64,
default_product_type: ProductType,
) -> Self {
Self {
creditor_public_id,
default_sales_vat,
default_product_type,
default_sales_account: None,
default_sales_eu_account: None,
default_sales_euvat_account: None,
default_sales_non_eu_account: None,
default_purchase_eu_account: None,
default_purchase_euvat_account: None,
default_purchase_non_eu_account: None,
default_sales_units: None,
default_purchase_account: None,
default_vat_account: None,
default_purchase_vat_account: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Product {
pub product_public_id: Uuid,
pub creditor_public_id: Uuid,
pub article_number: Option<String>,
pub product_external_id: Option<String>,
pub description: Option<String>,
pub units: Option<String>,
pub is_active: bool,
pub unit_price: f64,
#[serde(rename = "VAT")]
pub vat: f64,
pub book_keeping_account: Option<i32>,
#[serde(rename = "BookKeepingSalesEUAccount")]
pub book_keeping_sales_eu_account: Option<i32>,
#[serde(rename = "BookKeepingSalesEUVATAccount")]
pub book_keeping_sales_euvat_account: Option<i32>,
#[serde(rename = "BookKeepingSalesNonEUAccount")]
pub book_keeping_sales_non_eu_account: Option<i32>,
pub book_keeping_purchase_account: Option<i32>,
#[serde(rename = "BookKeepingVATAccount")]
pub book_keeping_vat_account: Option<i32>,
#[serde(rename = "BookKeepingPurchaseVATAccount")]
pub book_keeping_purchase_vat_account: Option<i32>,
pub product_type: ProductType,
pub configuration_code: Option<String>,
}
impl Product {
pub fn new(
product_public_id: Uuid,
creditor_public_id: Uuid,
is_active: bool,
unit_price: f64,
vat: f64,
product_type: ProductType,
) -> Self {
Self {
product_public_id,
creditor_public_id,
is_active,
unit_price,
vat,
product_type,
article_number: None,
product_external_id: None,
description: None,
units: None,
book_keeping_account: None,
book_keeping_sales_eu_account: None,
book_keeping_sales_euvat_account: None,
book_keeping_sales_non_eu_account: None,
book_keeping_purchase_account: None,
book_keeping_vat_account: None,
book_keeping_purchase_vat_account: None,
configuration_code: None,
}
}
}
pub type Projects = Vec<Project>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Project {
pub creditor_public_id: Uuid,
pub project_number: Option<String>,
pub description: Option<String>,
pub project_leader: Option<String>,
pub contact_person: Option<String>,
pub comments: Option<String>,
pub start_date: Option<DateTime>,
pub end_date: Option<DateTime>,
pub status: ProjectStatusType,
}
impl Project {
pub fn new(creditor_public_id: Uuid, status: ProjectStatusType) -> Self {
Self {
creditor_public_id,
status,
project_number: None,
description: None,
project_leader: None,
contact_person: None,
comments: None,
start_date: None,
end_date: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct ReconciliationDebtor {
pub debtor_no: Option<String>,
pub org_no: Option<String>,
pub country_code: Option<String>,
pub name: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReconciliationInvoiceActionEntry {
pub creditor_public_id: Uuid,
pub debtor: Option<ReconciliationDebtor>,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub external_url: Option<String>,
pub invoice_number: Option<String>,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
pub invoice_file: Option<File>,
pub external_reference: Option<String>,
pub current_amount: Option<Amount>,
pub current_reminder_fees: Option<Amount>,
pub send_with_color: Option<bool>,
pub send_as_priority_mail: Option<bool>,
pub autogiro_withdrawal_date: Option<DateTime>,
pub credit_card_withdrawal_date: Option<DateTime>,
}
impl ReconciliationInvoiceActionEntry {
pub fn new(
creditor_public_id: Uuid,
delivery_method: DeliveryMethodType,
communication_language: LanguageType,
) -> Self {
Self {
creditor_public_id,
delivery_method,
communication_language,
debtor: None,
external_url: None,
invoice_number: None,
ocr: None,
invoice_file: None,
external_reference: None,
current_amount: None,
current_reminder_fees: None,
send_with_color: None,
send_as_priority_mail: None,
autogiro_withdrawal_date: None,
credit_card_withdrawal_date: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReconciiationInvoiceActionEvent {
pub title: Option<String>,
pub content: Option<String>,
pub event_date: DateTime,
pub event_by: Option<String>,
pub reference: Option<String>,
pub event_type: EventType,
pub is_public: bool,
pub has_occured: bool,
pub event_public_id: Uuid,
}
impl ReconciiationInvoiceActionEvent {
pub fn new(
event_date: DateTime,
event_type: EventType,
is_public: bool,
has_occured: bool,
event_public_id: Uuid,
) -> Self {
Self {
event_date,
event_type,
is_public,
has_occured,
event_public_id,
title: None,
content: None,
event_by: None,
reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReconciliationInvoiceActionReminder {
pub file: Option<File>,
pub created: DateTime,
}
impl ReconciliationInvoiceActionReminder {
pub fn new(created: DateTime) -> Self {
Self {
created,
file: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReconciliationInvoiceActionState {
pub stage: ReconciliationInvoiceActionStageType,
pub is_payed: bool,
pub closed_date: Option<DateTime>,
pub invoice_sent_date: Option<DateTime>,
pub invoice_was_included_in_email: bool,
pub credit_card_payment_public_id: Option<Uuid>,
pub swish_payment_public_id: Option<String>,
}
impl ReconciliationInvoiceActionState {
pub fn new(
stage: ReconciliationInvoiceActionStageType,
is_payed: bool,
invoice_was_included_in_email: bool,
) -> Self {
Self {
stage,
is_payed,
invoice_was_included_in_email,
closed_date: None,
invoice_sent_date: None,
credit_card_payment_public_id: None,
swish_payment_public_id: None,
}
}
}
pub type ReconciliationInvoiceActionSubs = Vec<ReconciliationInvoiceActionSub>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReconciliationInvoiceActionSub {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub creditor_org_no: Option<String>,
pub creditor_name: Option<String>,
pub debtor_org_no: Option<String>,
pub debtor_name: Option<String>,
pub debtor_phone: Option<String>,
pub debtor_debtor_no: Option<String>,
pub debtor_email: Option<String>,
pub current_amount: Option<Amount>,
pub invoiced_amount: Option<Amount>,
pub stage: ReconciliationInvoiceActionStageType,
pub delivery_method: DeliveryMethodType,
pub action_type: ActionType,
pub closed_date: Option<DateTime>,
pub created: DateTime,
pub invoice_sent_date: Option<DateTime>,
pub reminder_invoice_sent_date: Option<DateTime>,
pub invoice_number: Option<String>,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
pub invoice_file: Option<File>,
pub debt_collection_action_public_id: Option<String>,
}
impl ReconciliationInvoiceActionSub {
pub fn new(
creditor_public_id: Uuid,
stage: ReconciliationInvoiceActionStageType,
delivery_method: DeliveryMethodType,
action_type: ActionType,
created: DateTime,
) -> Self {
Self {
creditor_public_id,
stage,
delivery_method,
action_type,
created,
action_public_id: None,
creditor_org_no: None,
creditor_name: None,
debtor_org_no: None,
debtor_name: None,
debtor_phone: None,
debtor_debtor_no: None,
debtor_email: None,
current_amount: None,
invoiced_amount: None,
closed_date: None,
invoice_sent_date: None,
reminder_invoice_sent_date: None,
invoice_number: None,
ocr: None,
invoice_file: None,
debt_collection_action_public_id: None,
}
}
}
pub type ReconciliationInvoiceActions = Vec<ReconciliationInvoiceAction>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReconciliationInvoiceAction {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub debtor: Option<ReconciliationDebtor>,
pub state: Option<ReconciliationInvoiceActionState>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub reminder_invoices: Vec<ReconciliationInvoiceActionReminder>,
pub delivery_method: DeliveryMethodType,
pub communication_language: LanguageType,
pub invoice_number: Option<String>,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
pub invoiced_amount: Option<Amount>,
pub current_amount: Option<Amount>,
pub current_reminder_fees: Option<Amount>,
pub external_reference: Option<String>,
pub invoice_file: Option<File>,
pub external_url: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub events: Vec<ReconciiationInvoiceActionEvent>,
pub created: DateTime,
pub send_with_color: Option<bool>,
pub send_as_priority_mail: Option<bool>,
pub debt_collection_action_public_id: Option<String>,
pub autogiro_withdrawal_date: Option<DateTime>,
pub credit_card_withdrawal_date: Option<DateTime>,
}
impl ReconciliationInvoiceAction {
pub fn new(
creditor_public_id: Uuid,
delivery_method: DeliveryMethodType,
communication_language: LanguageType,
created: DateTime,
) -> Self {
Self {
creditor_public_id,
delivery_method,
communication_language,
created,
action_public_id: None,
debtor: None,
state: None,
reminder_invoices: Vec::new(),
invoice_number: None,
ocr: None,
invoiced_amount: None,
current_amount: None,
current_reminder_fees: None,
external_reference: None,
invoice_file: None,
external_url: None,
events: Vec::new(),
send_with_color: None,
send_as_priority_mail: None,
debt_collection_action_public_id: None,
autogiro_withdrawal_date: None,
credit_card_withdrawal_date: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegisterPayment {
pub action_public_id: Option<String>,
pub amount: Option<Amount>,
pub write_off: Option<Amount>,
pub comment: Option<String>,
pub date: DateTime,
pub write_off_vat: f64,
pub override_write_off_account: Option<String>,
pub payment_mean_code: Option<String>,
pub overshooting_amount_handling: RegisterPaymentOverShootingAmountHandlingType,
pub payment_reference_text: Option<String>,
}
impl RegisterPayment {
pub fn new(
date: DateTime,
write_off_vat: f64,
overshooting_amount_handling: RegisterPaymentOverShootingAmountHandlingType,
) -> Self {
Self {
date,
write_off_vat,
overshooting_amount_handling,
action_public_id: None,
amount: None,
write_off: None,
comment: None,
override_write_off_account: None,
payment_mean_code: None,
payment_reference_text: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegisterReconciliationPayment {
pub action_public_id: Option<String>,
pub amount: Option<Amount>,
pub write_off: Option<Amount>,
pub comment: Option<String>,
pub date: DateTime,
pub write_off_vat: f64,
pub payment_mean_code: Option<String>,
pub amount_is_credit: bool,
}
impl RegisterReconciliationPayment {
pub fn new(date: DateTime, write_off_vat: f64, amount_is_credit: bool) -> Self {
Self {
date,
write_off_vat,
amount_is_credit,
action_public_id: None,
amount: None,
write_off: None,
comment: None,
payment_mean_code: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegisterSelfInvoicePayment {
pub action_public_id: Option<String>,
pub amount: Option<Amount>,
pub comment: Option<String>,
pub date: DateTime,
pub payment_mean_code: Option<String>,
}
impl RegisterSelfInvoicePayment {
pub fn new(date: DateTime) -> Self {
Self {
date,
action_public_id: None,
amount: None,
comment: None,
payment_mean_code: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RegisterSupplierInvoicePayment {
pub action_public_id: Option<String>,
pub amount: Option<Amount>,
pub comment: Option<String>,
pub date: DateTime,
pub payment_mean_code: Option<String>,
}
impl RegisterSupplierInvoicePayment {
pub fn new(date: DateTime) -> Self {
Self {
date,
action_public_id: None,
amount: None,
comment: None,
payment_mean_code: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReminderInvoiceActionInvoice {
pub invoice_date: DateTime,
pub due_date: DateTime,
pub invoice_number: Option<String>,
pub invoice_decription: Option<String>,
pub payment_terms_in_days: i32,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub name: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub country_code: Option<String>,
pub invoiced_amount: Option<Amount>,
pub invoice_file: Option<File>,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
}
impl ReminderInvoiceActionInvoice {
pub fn new(invoice_date: DateTime, due_date: DateTime, payment_terms_in_days: i32) -> Self {
Self {
invoice_date,
due_date,
payment_terms_in_days,
invoice_number: None,
invoice_decription: None,
our_reference: None,
your_reference: None,
name: None,
address: None,
address2: None,
zip_code: None,
city: None,
country_code: None,
invoiced_amount: None,
invoice_file: None,
ocr: None,
}
}
}
pub type ReminderInvoiceActionSubs = Vec<ReminderInvoiceActionSub>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReminderInvoiceActionSub {
pub action_public_id: Option<String>,
pub source_action_public_id: Option<String>,
pub current_fee_amount: Option<Amount>,
pub source_current_amount: Option<Amount>,
pub source_original_amount: Option<Amount>,
pub last_reminder_date: DateTime,
pub last_reminder_due_date: DateTime,
}
impl ReminderInvoiceActionSub {
pub fn new(last_reminder_date: DateTime, last_reminder_due_date: DateTime) -> Self {
Self {
last_reminder_date,
last_reminder_due_date,
action_public_id: None,
source_action_public_id: None,
current_fee_amount: None,
source_current_amount: None,
source_original_amount: None,
}
}
}
pub type ReminderInvoiceActions = Vec<ReminderInvoiceAction>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ReminderInvoiceAction {
pub action_public_id: Option<String>,
pub source_action_public_id: Option<String>,
pub created: DateTime,
pub closed_date: Option<DateTime>,
pub stage: InvoiceActionStageType,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub reminder_invoices: Vec<ReminderInvoiceActionInvoice>,
pub current_value: Option<Amount>,
pub reminder_fee: Option<Amount>,
}
impl ReminderInvoiceAction {
pub fn new(created: DateTime, stage: InvoiceActionStageType) -> Self {
Self {
created,
stage,
action_public_id: None,
source_action_public_id: None,
closed_date: None,
reminder_invoices: Vec::new(),
current_value: None,
reminder_fee: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct RepayUnhandledPayment {
pub unhandled_payment_public_id: Uuid,
pub reference: Option<String>,
pub receiving_account_no: Option<String>,
pub receiving_clearing_no: Option<String>,
pub receiver_name: Option<String>,
pub receiving_bankgiro_no: Option<String>,
pub receiving_plusgiro_no: Option<String>,
pub receiving_iban: Option<String>,
pub receiving_bic: Option<String>,
pub receiving_payment_method: ReceivingPaymentMethodType,
pub sender_payment_info: Option<SenderPaymentInfo>,
pub sending_bankgiro_no: Option<String>,
pub receiver_country_code: Option<String>,
}
impl RepayUnhandledPayment {
pub fn new(
unhandled_payment_public_id: Uuid,
receiving_payment_method: ReceivingPaymentMethodType,
) -> Self {
Self {
unhandled_payment_public_id,
receiving_payment_method,
reference: None,
receiving_account_no: None,
receiving_clearing_no: None,
receiver_name: None,
receiving_bankgiro_no: None,
receiving_plusgiro_no: None,
receiving_iban: None,
receiving_bic: None,
sender_payment_info: None,
sending_bankgiro_no: None,
receiver_country_code: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SenderPaymentInfo {
pub sender_payment_method: SupplierPaymentMethodType,
pub sender_bankgiro: Option<String>,
pub sender_iban: Option<String>,
pub sender_plusgiro: Option<String>,
}
impl SenderPaymentInfo {
pub fn new(sender_payment_method: SupplierPaymentMethodType) -> Self {
Self {
sender_payment_method,
sender_bankgiro: None,
sender_iban: None,
sender_plusgiro: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct SearchResult {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub invoice_actions: Vec<InvoiceActionSub>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub reconciliation_invoice_actions: Vec<ReconciliationInvoiceActionSub>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub self_invoice_actions: Vec<SelfInvoiceActionSub>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub debt_collection_actions: Vec<DebtCollectionActionSub>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub installment_plan_actions: Vec<InstallmentPlanActionSub>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub contract_invoice_actions: Vec<ContractInvoiceActionSub>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub supplier_invoice_actions: Vec<SupplierInvoiceActionSub>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SelfInvoiceActionSub {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub creditor_org_no: Option<String>,
pub creditor_name: Option<String>,
pub current_amount: Option<Amount>,
pub invoiced_amount: Option<Amount>,
pub stage: SelfInvoiceActionStageType,
pub created: DateTime,
pub closed_date: Option<DateTime>,
pub debtor_org_no: Option<String>,
pub debtor_name: Option<String>,
pub debtor_account: Option<String>,
pub action_type: ActionType,
pub attested_date: Option<DateTime>,
pub invoice_sent_date: Option<DateTime>,
pub next_event: Option<String>,
pub next_event_date: Option<DateTime>,
pub due_date: DateTime,
pub invoice_date: DateTime,
pub invoice_number: Option<String>,
pub bankgiro_no: Option<String>,
pub is_commented: bool,
pub is_paused: bool,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
pub delivery_method: DeliveryMethodType,
pub delivery_status: DeliveryStatusType,
pub next_payment_date: Option<DateTime>,
pub next_payment_amount: Option<Amount>,
#[serde(rename = "TotalVATAmount")]
pub total_vat_amount: Option<Amount>,
pub file: Option<File>,
pub your_reference: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SupplierInvoiceActionSub {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub supplier_public_id: Uuid,
pub creditor_org_no: Option<String>,
pub creditor_name: Option<String>,
pub current_amount: Option<Amount>,
pub invoiced_amount: Option<Amount>,
pub stage: SupplierInvoiceActionStageType,
pub action_type: ActionType,
pub created: DateTime,
pub closed_date: Option<DateTime>,
pub supplier_org_no: Option<String>,
pub supplier_name: Option<String>,
pub attested_date: Option<DateTime>,
pub next_event: Option<String>,
pub next_event_date: Option<DateTime>,
pub next_payment_date: Option<DateTime>,
pub next_payment_amount: Option<Amount>,
pub due_date: DateTime,
pub invoice_date: DateTime,
pub invoice_number: Option<String>,
pub is_paused: bool,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
pub invoice_file: Option<File>,
pub origin: OriginType,
pub external_source_id: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Search {
pub search_value: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub debtor_public_ids: Vec<Uuid>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub product_public_ids: Vec<Uuid>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub status: Vec<ActionSearchStatusType>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub types: Vec<ActionType>,
pub rot_rut: RotRutSearchFilterType,
pub creditor_public_id: Uuid,
pub invoice_date_from: Option<DateTime>,
pub invoice_date_to: Option<DateTime>,
pub due_date_from: Option<DateTime>,
pub due_date_to: Option<DateTime>,
pub created_date_from: Option<DateTime>,
pub created_date_to: Option<DateTime>,
pub attested_date_from: Option<DateTime>,
pub attested_date_to: Option<DateTime>,
pub closed_date_from: Option<DateTime>,
pub closed_date_to: Option<DateTime>,
pub period_date_from: Option<DateTime>,
pub period_date_to: Option<DateTime>,
pub project: Option<String>,
pub cost_center: Option<String>,
pub debtor_name: Option<String>,
pub debtor_external_id: Option<String>,
pub org_no: Option<String>,
pub product_name: Option<String>,
pub product_external_id: Option<String>,
pub article_number: Option<String>,
pub search_on_all_creditors: Option<bool>,
}
impl Search {
pub fn new(rot_rut: RotRutSearchFilterType, creditor_public_id: Uuid) -> Self {
Self {
rot_rut,
creditor_public_id,
search_value: None,
debtor_public_ids: Vec::new(),
product_public_ids: Vec::new(),
status: Vec::new(),
types: Vec::new(),
invoice_date_from: None,
invoice_date_to: None,
due_date_from: None,
due_date_to: None,
created_date_from: None,
created_date_to: None,
attested_date_from: None,
attested_date_to: None,
closed_date_from: None,
closed_date_to: None,
period_date_from: None,
period_date_to: None,
project: None,
cost_center: None,
debtor_name: None,
debtor_external_id: None,
org_no: None,
product_name: None,
product_external_id: None,
article_number: None,
search_on_all_creditors: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SecureToken {
pub value: Option<String>,
pub expires: DateTime,
}
impl SecureToken {
pub fn new(expires: DateTime) -> Self {
Self {
expires,
value: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SelfInvoiceActionAttachment {
pub file: Option<File>,
pub is_cover_sheet: bool,
pub sort_number: i32,
}
impl SelfInvoiceActionAttachment {
pub fn new(is_cover_sheet: bool, sort_number: i32) -> Self {
Self {
is_cover_sheet,
sort_number,
file: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SelfInvoiceActionEntry {
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub invoice_date: DateTime,
pub due_date: DateTime,
pub delivery_date: Option<DateTime>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub records: Vec<SelfInvoiceActionRecord>,
pub our_reference: Option<String>,
pub transfer_reference: Option<String>,
pub transfer_reference_type: Option<ReferenceType>,
pub your_reference: Option<String>,
pub external_id: Option<String>,
pub delivery_method: DeliveryMethodType,
pub sender_payment_info: Option<SenderPaymentInfo>,
pub communication_language: LanguageType,
pub message: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub attachments: Vec<SelfInvoiceActionAttachment>,
pub crediting_self_invoice_public_id: Option<String>,
}
impl SelfInvoiceActionEntry {
pub fn new(
creditor_public_id: Uuid,
debtor_public_id: Uuid,
invoice_date: DateTime,
due_date: DateTime,
delivery_method: DeliveryMethodType,
communication_language: LanguageType,
) -> Self {
Self {
creditor_public_id,
debtor_public_id,
invoice_date,
due_date,
delivery_method,
communication_language,
delivery_date: None,
records: Vec::new(),
our_reference: None,
transfer_reference: None,
transfer_reference_type: None,
your_reference: None,
external_id: None,
sender_payment_info: None,
message: None,
attachments: Vec::new(),
crediting_self_invoice_public_id: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SelfInvoiceActionRecord {
pub product_public_id: Option<Uuid>,
pub sequence_no: i32,
pub units: Option<String>,
pub article_description: Option<String>,
pub article_number: Option<String>,
pub quantity: Option<f64>,
pub unit_price: Option<Amount>,
pub discount_amount: Option<Amount>,
pub discount_percentage: f64,
pub discount_type: DiscountType,
#[serde(rename = "VAT")]
pub vat: f64,
pub record_type: RecordType,
pub cost_center: Option<String>,
pub project: Option<String>,
pub hidden: bool,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub dimensions: Vec<DimensionCode>,
}
impl SelfInvoiceActionRecord {
pub fn new(
sequence_no: i32,
discount_percentage: f64,
discount_type: DiscountType,
vat: f64,
record_type: RecordType,
hidden: bool,
) -> Self {
Self {
sequence_no,
discount_percentage,
discount_type,
vat,
record_type,
hidden,
product_public_id: None,
units: None,
article_description: None,
article_number: None,
quantity: None,
unit_price: None,
discount_amount: None,
cost_center: None,
project: None,
dimensions: Vec::new(),
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SelfInvoiceActionEvent {
pub title: Option<String>,
pub content: Option<String>,
pub event_date: DateTime,
pub event_by: Option<String>,
pub reference: Option<String>,
pub event_type: EventType,
pub is_public: bool,
pub has_occured: bool,
pub event_public_id: Uuid,
}
impl SelfInvoiceActionEvent {
pub fn new(
event_date: DateTime,
event_type: EventType,
is_public: bool,
has_occured: bool,
event_public_id: Uuid,
) -> Self {
Self {
event_date,
event_type,
is_public,
has_occured,
event_public_id,
title: None,
content: None,
event_by: None,
reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SelfInvoiceActionInvoice {
pub invoice_date: DateTime,
pub due_date: DateTime,
pub invoice_number: Option<String>,
pub invoice_decription: Option<String>,
pub payment_terms_in_days: i32,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub name: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub country_code: Option<String>,
pub invoiced_amount: Option<Amount>,
pub invoice_file: Option<File>,
#[serde(rename = "OCR")]
pub ocr: Option<String>,
}
impl SelfInvoiceActionInvoice {
pub fn new(invoice_date: DateTime, due_date: DateTime, payment_terms_in_days: i32) -> Self {
Self {
invoice_date,
due_date,
payment_terms_in_days,
invoice_number: None,
invoice_decription: None,
our_reference: None,
your_reference: None,
name: None,
address: None,
address2: None,
zip_code: None,
city: None,
country_code: None,
invoiced_amount: None,
invoice_file: None,
ocr: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SelfInvoiceActionState {
pub stage: SelfInvoiceActionStageType,
pub invoice_sent_date: Option<DateTime>,
pub next_event_date: Option<DateTime>,
pub closed_date: Option<DateTime>,
pub next_event: Option<String>,
pub is_paused: bool,
pub attested_date: Option<DateTime>,
pub paid_date: Option<DateTime>,
pub next_payment_date: Option<DateTime>,
pub next_payment_amount: Option<Amount>,
}
impl SelfInvoiceActionState {
pub fn new(stage: SelfInvoiceActionStageType, is_paused: bool) -> Self {
Self {
stage,
is_paused,
invoice_sent_date: None,
next_event_date: None,
closed_date: None,
next_event: None,
attested_date: None,
paid_date: None,
next_payment_date: None,
next_payment_amount: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SelfInvoiceAction {
pub action_public_id: Option<String>,
pub creditor_public_id: Uuid,
pub communication_language: LanguageType,
pub created: DateTime,
pub delivery_method: DeliveryMethodType,
pub debtor: Option<Debtor>,
pub state: Option<SelfInvoiceActionState>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub invoices: Vec<SelfInvoiceActionInvoice>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub records: Vec<SelfInvoiceActionRecord>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub events: Vec<SelfInvoiceActionEvent>,
pub invoice_date: DateTime,
pub due_date: DateTime,
pub delivery_date: Option<DateTime>,
pub payment_terms_in_days: i32,
pub our_reference: Option<String>,
pub crediting_self_invoice_public_id: Option<String>,
pub your_reference: Option<String>,
pub external_id: Option<String>,
pub transfer_reference: Option<String>,
pub transfer_reference_type: Option<ReferenceType>,
pub invoiced_amount: Option<Amount>,
pub interest_amount: Option<Amount>,
pub current_amount: Option<Amount>,
pub credited_amount: Option<Amount>,
pub paid_amount: Option<Amount>,
#[serde(rename = "TotalVATAmount")]
pub total_vat_amount: Option<Amount>,
pub message: Option<String>,
pub sender_payment_info: Option<SenderPaymentInfo>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub appendixes: Vec<File>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub attachments: Vec<SelfInvoiceActionAttachment>,
pub action_type: ActionType,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct SelfInvoicePayment {
pub action_public_id: Option<String>,
pub payment_date: Option<DateTime>,
pub amount: Option<Amount>,
pub outgoing_payment_method_type: Option<SupplierPaymentMethodType>,
pub outgoing_payment_account_no: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct SendReconciliationInvoiceReminder {
pub reconciliation_invoice_action_public_id: Option<String>,
pub delivery_method: Option<DeliveryMethodType>,
pub reminder_fee: Option<Amount>,
pub reminder_file: Option<File>,
pub send_with_color: Option<bool>,
pub send_as_priority_mail: Option<bool>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct SendReminderInvoice {
pub invoice_action_public_id: Option<String>,
pub delivery_method: Option<DeliveryMethodType>,
pub reminder_fee: Option<Amount>,
pub stream: Option<Vec<u8>>,
pub url: Option<String>,
pub payment_terms_in_days: Option<i32>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SmsDelivery {
pub creditor_public_id: Uuid,
pub receiver_phone: Option<String>,
pub message: Option<String>,
pub country_code: Option<String>,
}
impl SmsDelivery {
pub fn new(creditor_public_id: Uuid) -> Self {
Self {
creditor_public_id,
receiver_phone: None,
message: None,
country_code: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct Stream {
pub data: Option<Vec<u8>>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct SwishPaymentIntent {
pub action_public_id: Option<String>,
pub success_url: Option<String>,
pub failure_url: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SwishPaymentStatus {
pub payment_request_token: Option<String>,
pub status: SwishStatusType,
pub paid_date: Option<DateTime>,
pub created: DateTime,
pub amount: Option<Amount>,
pub refunded_amount: Option<Amount>,
pub error_message: Option<String>,
pub error_code: Option<String>,
}
impl SwishPaymentStatus {
pub fn new(status: SwishStatusType, created: DateTime) -> Self {
Self {
status,
created,
payment_request_token: None,
paid_date: None,
amount: None,
refunded_amount: None,
error_message: None,
error_code: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct SwishRefundPayment {
pub payment_public_id: Option<String>,
pub amount: Option<Amount>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct SwishSettings {
pub creditor_public_id: Uuid,
pub certificate: Option<File>,
pub password: Option<String>,
pub phone_number: Option<String>,
pub activation_policy: ActivationPolicyType,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub activation_exceptions: Vec<String>,
pub bookkeep_payments_next_bank_day_on_non_bank_day: bool,
pub not_before: DateTime,
pub not_after: DateTime,
}
impl SwishSettings {
pub fn new(
creditor_public_id: Uuid,
activation_policy: ActivationPolicyType,
bookkeep_payments_next_bank_day_on_non_bank_day: bool,
not_before: DateTime,
not_after: DateTime,
) -> Self {
Self {
creditor_public_id,
activation_policy,
bookkeep_payments_next_bank_day_on_non_bank_day,
not_before,
not_after,
certificate: None,
password: None,
phone_number: None,
activation_exceptions: Vec::new(),
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct TwoFactorBankId {
pub user_claims: Option<UserClaims>,
pub bank_id_authentication_status: Option<BankIdAuthenticationStatus>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct UserClaims {
pub user: Option<User>,
pub client_config: Option<ClientConfig>,
pub secure_token: Option<SecureToken>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct User {
pub username: Option<String>,
pub email: Option<String>,
pub user_public_id: Uuid,
pub full_name: Option<String>,
pub org_no: Option<String>,
pub language: LanguageType,
pub password_expired: bool,
pub password_never_expires: bool,
pub password: Option<String>,
pub is_enabled: bool,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub rights: Vec<UserRight>,
pub is_administrator: bool,
pub is_api_user: bool,
pub can_manage_creditors: bool,
pub hide_select_creditor_dialog: bool,
pub hide_system_updates: bool,
pub hide_lookup_dialog: bool,
pub active_creditor_public_id: Option<Uuid>,
pub last_login: Option<DateTime>,
pub created: DateTime,
pub has_accepted_agreements: bool,
pub receive_system_update_notification: bool,
pub two_factor_bank_id_auth_enabled: bool,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct UserRight {
pub creditor_public_id: Uuid,
pub can_read_creditor: bool,
pub include_creditor_on_start_page: bool,
pub can_write_creditor: bool,
pub can_attest_invoice: bool,
pub can_manage_invoice_payments: bool,
pub can_sell_invoice: bool,
pub can_sales_finance: bool,
pub can_attest_supplier_invoice: bool,
pub can_pay_supplier_invoice: bool,
pub can_manage_invoices: bool,
pub can_manage_debt_collections: bool,
pub can_manage_self_invoices: bool,
pub can_manage_self_invoice_debtor_infoes: bool,
pub can_manage_supplier_invoices: bool,
pub can_manage_finances: bool,
pub can_read_settings: bool,
pub can_read_bookkeeping: bool,
}
pub type UnhandledPayments = Vec<UnhandledPayment>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct UnhandledPayment {
pub creditor_public_id: Uuid,
pub unhandled_payment_public_id: Uuid,
pub creditor_name: Option<String>,
pub sender_name: Option<String>,
pub sender_address: Option<String>,
pub sender_zip_code: Option<String>,
pub sender_city: Option<String>,
pub sender_country_code: Option<String>,
pub sender_org_no: Option<String>,
pub sender_bankgiro_no: Option<String>,
pub debtor_public_id: Option<Uuid>,
pub amount: Option<Amount>,
pub payment_date: DateTime,
pub reference: Option<String>,
pub created_by: Option<String>,
pub unhandled_payment_type: UnhandledPaymentType,
pub overpayment_details: Option<OverpaymentDetails>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub additional_informations: Vec<String>,
pub state: UnhandledPaymentStateType,
}
impl UnhandledPayment {
pub fn new(
creditor_public_id: Uuid,
unhandled_payment_public_id: Uuid,
payment_date: DateTime,
unhandled_payment_type: UnhandledPaymentType,
state: UnhandledPaymentStateType,
) -> Self {
Self {
creditor_public_id,
unhandled_payment_public_id,
payment_date,
unhandled_payment_type,
state,
creditor_name: None,
sender_name: None,
sender_address: None,
sender_zip_code: None,
sender_city: None,
sender_country_code: None,
sender_org_no: None,
sender_bankgiro_no: None,
debtor_public_id: None,
amount: None,
reference: None,
created_by: None,
overpayment_details: None,
additional_informations: Vec::new(),
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct UpdateAddressAction {
pub action_public_id: Option<String>,
pub name: Option<String>,
pub attention: Option<String>,
pub care_of: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub email: Option<String>,
pub city: Option<String>,
pub phone: Option<String>,
pub org_no: Option<String>,
#[serde(rename = "GLN")]
pub gln: Option<String>,
pub intermediator: Option<IntermediatorType>,
}
pub type UserSubscribedInvoices = Vec<UserSubscribedInvoice>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct UserSubscribedInvoice {
pub user_public_id: Uuid,
pub action_public_id: Option<String>,
}
impl UserSubscribedInvoice {
pub fn new(user_public_id: Uuid) -> Self {
Self {
user_public_id,
action_public_id: None,
}
}
}
pub type Users = Vec<User>;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct VerificationInvoiceActionEntry {
pub creditor_public_id: Uuid,
pub debtor_public_id: Uuid,
pub invoice_date: DateTime,
pub due_date: DateTime,
pub delivery_date: Option<DateTime>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub records: Vec<InvoiceActionRecord>,
pub our_reference: Option<String>,
pub your_reference: Option<String>,
pub communication_language: LanguageType,
pub message: Option<String>,
pub invoice_number: Option<String>,
pub bookkeeping_override: Option<InvoiceBookkeepingOverride>,
pub payment_override: Option<PaymentOverride>,
pub external_reference: Option<String>,
}
impl VerificationInvoiceActionEntry {
pub fn new(
creditor_public_id: Uuid,
debtor_public_id: Uuid,
invoice_date: DateTime,
due_date: DateTime,
communication_language: LanguageType,
) -> Self {
Self {
creditor_public_id,
debtor_public_id,
invoice_date,
due_date,
communication_language,
delivery_date: None,
records: Vec::new(),
our_reference: None,
your_reference: None,
message: None,
invoice_number: None,
bookkeeping_override: None,
payment_override: None,
external_reference: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct WebhookCreditorShare {
pub shared_by_user_name: Option<String>,
pub creditor_public_id: Uuid,
pub target: CreditorShareTargetType,
pub can_attest_invoice: bool,
pub can_manage_invoice_payments: bool,
pub can_write_creditor: bool,
pub can_attest_supplier_invoice: bool,
pub can_pay_supplier_invoice: bool,
}
impl WebhookCreditorShare {
pub fn new(
creditor_public_id: Uuid,
target: CreditorShareTargetType,
can_attest_invoice: bool,
can_manage_invoice_payments: bool,
can_write_creditor: bool,
can_attest_supplier_invoice: bool,
can_pay_supplier_invoice: bool,
) -> Self {
Self {
creditor_public_id,
target,
can_attest_invoice,
can_manage_invoice_payments,
can_write_creditor,
can_attest_supplier_invoice,
can_pay_supplier_invoice,
shared_by_user_name: None,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct WebhookHeader {
pub name: Option<String>,
pub value: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Default)]
#[serde(rename_all = "PascalCase")]
pub struct WebhookSetting {
#[serde(rename = "URL")]
pub url: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub webhook_triggers: Vec<WebhookTrigger>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub headers: Vec<WebhookHeader>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct WebhookTrigger {
pub webhook_trigger_type: WebhookTriggerType,
}
impl WebhookTrigger {
pub fn new(webhook_trigger_type: WebhookTriggerType) -> Self {
Self {
webhook_trigger_type,
}
}
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct YearlyAutogiroContractInvoice {
pub creditor_public_id: Uuid,
pub name: Option<String>,
pub address: Option<String>,
pub address2: Option<String>,
pub zip_code: Option<String>,
pub city: Option<String>,
pub email: Option<String>,
pub phone: Option<String>,
pub debtor_external_id: Option<String>,
#[serde(rename = "SSN")]
pub ssn: Option<String>,
pub clearing_number: Option<String>,
pub account_number: Option<String>,
pub bank: Option<String>,
pub amount: f64,
pub withdrawal_day: i32,
pub withdrawal_month: i32,
pub end_date: Option<DateTime>,
pub start_date: Option<DateTime>,
pub enable_automatic_reminder: bool,
pub enable_automatic_debt_collection: bool,
}
impl YearlyAutogiroContractInvoice {
pub fn new(
creditor_public_id: Uuid,
amount: f64,
withdrawal_day: i32,
withdrawal_month: i32,
enable_automatic_reminder: bool,
enable_automatic_debt_collection: bool,
) -> Self {
Self {
creditor_public_id,
amount,
withdrawal_day,
withdrawal_month,
enable_automatic_reminder,
enable_automatic_debt_collection,
name: None,
address: None,
address2: None,
zip_code: None,
city: None,
email: None,
phone: None,
debtor_external_id: None,
ssn: None,
clearing_number: None,
account_number: None,
bank: None,
end_date: None,
start_date: None,
}
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum AccountingRecordType {
ProductSales,
#[serde(rename = "ProductSalesWithReverseVAT")]
ProductSalesWithReverseVat,
RotRutDiscount,
PaymentToBankAccount,
OverPaymentToBankAccount,
CentRounding,
Interest,
#[serde(rename = "ProductSalesEU")]
ProductSalesEu,
#[serde(rename = "ProductSalesEUVAT")]
ProductSalesEuvat,
#[serde(rename = "ProductSalesNonEU")]
ProductSalesNonEu,
SupplierPaymentFromBankAccount,
SupplierPurchaseDebt,
#[serde(rename = "SupplierPurchaseEU")]
SupplierPurchaseEu,
#[serde(rename = "SupplierPurchaseEUVAT")]
SupplierPurchaseEuvat,
#[serde(rename = "SupplierPurchaseNonEU")]
SupplierPurchaseNonEu,
CurrencyDifference,
FinanceCostNoRecourse,
SelfInvoiceDebt,
#[serde(rename = "SelfInvoiceDebtVAT")]
SelfInvoiceDebtVat,
SelfInvoicePaymentFromBankAccount,
SelfInvoiceCreditation,
InvoiceSalesDebtRemoved,
WriteOff,
ReminderCostPayment,
Accrual,
AdminsitrationCost,
InvoiceSalesDebtAdded,
#[serde(rename = "RestingVAT")]
RestingVat,
FreightCost,
OverPaymentDeleted,
UnmatchedPaymentToBankAccount,
UnmatchedPaymentDeleted,
FinanceCostWithRecourse,
ClientFundDebt,
NonPerformingLoanPurchase,
PurchasedNonPerformingLoanPayment,
ManualBalanceDeleted,
BalanceFromInvoiceDeleted,
DebtCollectionPaymentFee,
ProductSalesWithAdviceMethod,
BankAndTransactionCost,
RevenueBalance,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl AccountingRecordType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::ProductSales => "ProductSales",
Self::ProductSalesWithReverseVat => "ProductSalesWithReverseVAT",
Self::RotRutDiscount => "RotRutDiscount",
Self::PaymentToBankAccount => "PaymentToBankAccount",
Self::OverPaymentToBankAccount => "OverPaymentToBankAccount",
Self::CentRounding => "CentRounding",
Self::Interest => "Interest",
Self::ProductSalesEu => "ProductSalesEU",
Self::ProductSalesEuvat => "ProductSalesEUVAT",
Self::ProductSalesNonEu => "ProductSalesNonEU",
Self::SupplierPaymentFromBankAccount => "SupplierPaymentFromBankAccount",
Self::SupplierPurchaseDebt => "SupplierPurchaseDebt",
Self::SupplierPurchaseEu => "SupplierPurchaseEU",
Self::SupplierPurchaseEuvat => "SupplierPurchaseEUVAT",
Self::SupplierPurchaseNonEu => "SupplierPurchaseNonEU",
Self::CurrencyDifference => "CurrencyDifference",
Self::FinanceCostNoRecourse => "FinanceCostNoRecourse",
Self::SelfInvoiceDebt => "SelfInvoiceDebt",
Self::SelfInvoiceDebtVat => "SelfInvoiceDebtVAT",
Self::SelfInvoicePaymentFromBankAccount => "SelfInvoicePaymentFromBankAccount",
Self::SelfInvoiceCreditation => "SelfInvoiceCreditation",
Self::InvoiceSalesDebtRemoved => "InvoiceSalesDebtRemoved",
Self::WriteOff => "WriteOff",
Self::ReminderCostPayment => "ReminderCostPayment",
Self::Accrual => "Accrual",
Self::AdminsitrationCost => "AdminsitrationCost",
Self::InvoiceSalesDebtAdded => "InvoiceSalesDebtAdded",
Self::RestingVat => "RestingVAT",
Self::FreightCost => "FreightCost",
Self::OverPaymentDeleted => "OverPaymentDeleted",
Self::UnmatchedPaymentToBankAccount => "UnmatchedPaymentToBankAccount",
Self::UnmatchedPaymentDeleted => "UnmatchedPaymentDeleted",
Self::FinanceCostWithRecourse => "FinanceCostWithRecourse",
Self::ClientFundDebt => "ClientFundDebt",
Self::NonPerformingLoanPurchase => "NonPerformingLoanPurchase",
Self::PurchasedNonPerformingLoanPayment => "PurchasedNonPerformingLoanPayment",
Self::ManualBalanceDeleted => "ManualBalanceDeleted",
Self::BalanceFromInvoiceDeleted => "BalanceFromInvoiceDeleted",
Self::DebtCollectionPaymentFee => "DebtCollectionPaymentFee",
Self::ProductSalesWithAdviceMethod => "ProductSalesWithAdviceMethod",
Self::BankAndTransactionCost => "BankAndTransactionCost",
Self::RevenueBalance => "RevenueBalance",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for AccountingRecordType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum AccountingExportDateSelectionType {
EventDate,
TransactionDate,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl AccountingExportDateSelectionType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::EventDate => "EventDate",
Self::TransactionDate => "TransactionDate",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for AccountingExportDateSelectionType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum AccountingExportFormatType {
#[serde(rename = "SIE4")]
Sie4,
#[serde(rename = "CSV")]
Csv,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl AccountingExportFormatType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Sie4 => "SIE4",
Self::Csv => "CSV",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for AccountingExportFormatType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum AccountingSettingsAccountType {
AdministrationCostAccount,
FreightCostAccount,
TradeDebtsAccount,
TradeDebtsTaxReductionAccount,
ShortTermDebtsAccount,
CustomerAdvancedPaymentsAccount,
UnmatchedPaymentsAccount,
#[serde(rename = "VATAccount")]
VatAccount,
RoundingAccount,
InterestAccount,
FinancialCostsAccount,
FinancialInstituteDebtAccount,
SalesWithRotRutAccount,
#[serde(rename = "SalesWithReverseVATAccount")]
SalesWithReverseVatAccount,
AccrualAccount,
RevenueCorrectionAccount,
AccountPayablesAccount,
#[serde(rename = "IncomingVATAccount")]
IncomingVatAccount,
#[serde(rename = "RestingVATAccount")]
RestingVatAccount,
CurrencyDifferenceLossesAccount,
CurrencyDifferenceGainsAccount,
WriteOffAccount,
OtherOperatingIncomeAccount,
BankAndTransactionCostAccount,
RevenueBalanceDebitBookingAccount,
RevenueBalanceCreditBookingAccount,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl AccountingSettingsAccountType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::AdministrationCostAccount => "AdministrationCostAccount",
Self::FreightCostAccount => "FreightCostAccount",
Self::TradeDebtsAccount => "TradeDebtsAccount",
Self::TradeDebtsTaxReductionAccount => "TradeDebtsTaxReductionAccount",
Self::ShortTermDebtsAccount => "ShortTermDebtsAccount",
Self::CustomerAdvancedPaymentsAccount => "CustomerAdvancedPaymentsAccount",
Self::UnmatchedPaymentsAccount => "UnmatchedPaymentsAccount",
Self::VatAccount => "VATAccount",
Self::RoundingAccount => "RoundingAccount",
Self::InterestAccount => "InterestAccount",
Self::FinancialCostsAccount => "FinancialCostsAccount",
Self::FinancialInstituteDebtAccount => "FinancialInstituteDebtAccount",
Self::SalesWithRotRutAccount => "SalesWithRotRutAccount",
Self::SalesWithReverseVatAccount => "SalesWithReverseVATAccount",
Self::AccrualAccount => "AccrualAccount",
Self::RevenueCorrectionAccount => "RevenueCorrectionAccount",
Self::AccountPayablesAccount => "AccountPayablesAccount",
Self::IncomingVatAccount => "IncomingVATAccount",
Self::RestingVatAccount => "RestingVATAccount",
Self::CurrencyDifferenceLossesAccount => "CurrencyDifferenceLossesAccount",
Self::CurrencyDifferenceGainsAccount => "CurrencyDifferenceGainsAccount",
Self::WriteOffAccount => "WriteOffAccount",
Self::OtherOperatingIncomeAccount => "OtherOperatingIncomeAccount",
Self::BankAndTransactionCostAccount => "BankAndTransactionCostAccount",
Self::RevenueBalanceDebitBookingAccount => "RevenueBalanceDebitBookingAccount",
Self::RevenueBalanceCreditBookingAccount => "RevenueBalanceCreditBookingAccount",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for AccountingSettingsAccountType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum SieKPTYPType {
#[serde(rename = "BAS95")]
Bas95,
#[serde(rename = "BAS96")]
Bas96,
#[serde(rename = "EUBAS97")]
Eubas97,
#[serde(rename = "NE2007")]
Ne2007,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl SieKPTYPType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Bas95 => "BAS95",
Self::Bas96 => "BAS96",
Self::Eubas97 => "EUBAS97",
Self::Ne2007 => "NE2007",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for SieKPTYPType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum FiscalYearType {
CalendarYear,
FebToJan,
MarToFeb,
AprToMar,
MayToApr,
JunToMay,
JulToJun,
AugToJul,
SepToAug,
OctToSep,
NovToOct,
DecToNov,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl FiscalYearType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::CalendarYear => "CalendarYear",
Self::FebToJan => "FebToJan",
Self::MarToFeb => "MarToFeb",
Self::AprToMar => "AprToMar",
Self::MayToApr => "MayToApr",
Self::JunToMay => "JunToMay",
Self::JulToJun => "JulToJun",
Self::AugToJul => "AugToJul",
Self::SepToAug => "SepToAug",
Self::OctToSep => "OctToSep",
Self::NovToOct => "NovToOct",
Self::DecToNov => "DecToNov",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for FiscalYearType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum BookKeepingMethod {
InvoiceMethod,
CashMethod,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl BookKeepingMethod {
pub fn as_str(&self) -> &'static str {
match *self {
Self::InvoiceMethod => "InvoiceMethod",
Self::CashMethod => "CashMethod",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for BookKeepingMethod {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum AutogiroPaymentStatusType {
Pending,
Succeeded,
Failed,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl AutogiroPaymentStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Pending => "Pending",
Self::Succeeded => "Succeeded",
Self::Failed => "Failed",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for AutogiroPaymentStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum BankAccountBankType {
#[serde(rename = "OEB")]
Oeb,
#[serde(rename = "SHB")]
Shb,
#[serde(rename = "ICA")]
Ica,
#[serde(rename = "LFB")]
Lfb,
#[serde(rename = "NB")]
Nb,
#[serde(rename = "SBAB")]
Sbab,
#[serde(rename = "SEB")]
Seb,
#[serde(rename = "SKB")]
Skb,
#[serde(rename = "SYD")]
Syd,
#[serde(rename = "FSPA")]
Fspa,
#[serde(rename = "FSPASB")]
Fspasb,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl BankAccountBankType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Oeb => "OEB",
Self::Shb => "SHB",
Self::Ica => "ICA",
Self::Lfb => "LFB",
Self::Nb => "NB",
Self::Sbab => "SBAB",
Self::Seb => "SEB",
Self::Skb => "SKB",
Self::Syd => "SYD",
Self::Fspa => "FSPA",
Self::Fspasb => "FSPASB",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for BankAccountBankType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum BankAccountStatusType {
Waiting,
Success,
Failed,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl BankAccountStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Waiting => "Waiting",
Self::Success => "Success",
Self::Failed => "Failed",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for BankAccountStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum BankIdStatusType {
OutstandingTransaction,
NoClient,
Started,
UserSign,
UserReq,
Complete,
Error,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl BankIdStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::OutstandingTransaction => "OutstandingTransaction",
Self::NoClient => "NoClient",
Self::Started => "Started",
Self::UserSign => "UserSign",
Self::UserReq => "UserReq",
Self::Complete => "Complete",
Self::Error => "Error",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for BankIdStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum BankIdHintCodeType {
#[serde(rename = "outstandingTransaction")]
OutstandingTransaction,
#[serde(rename = "noClient")]
NoClient,
#[serde(rename = "started")]
Started,
#[serde(rename = "userSign")]
UserSign,
#[serde(rename = "expiredTransaction")]
ExpiredTransaction,
#[serde(rename = "certificateErr")]
CertificateErr,
#[serde(rename = "userCancel")]
UserCancel,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "startFailed")]
StartFailed,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl BankIdHintCodeType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::OutstandingTransaction => "outstandingTransaction",
Self::NoClient => "noClient",
Self::Started => "started",
Self::UserSign => "userSign",
Self::ExpiredTransaction => "expiredTransaction",
Self::CertificateErr => "certificateErr",
Self::UserCancel => "userCancel",
Self::Cancelled => "cancelled",
Self::StartFailed => "startFailed",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for BankIdHintCodeType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CommentTargetType {
Private,
ToDebtor,
ToBillecta,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CommentTargetType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Private => "Private",
Self::ToDebtor => "ToDebtor",
Self::ToBillecta => "ToBillecta",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CommentTargetType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum EventType {
Created,
Attested,
InvoiceSent,
Paid,
Credited,
InvoiceDue,
WillBeSentToDebtCollection,
SentToDebtCollection,
Cancelled,
CommentedByDebtor,
CommentedByCreditor,
ReadByUser,
Paused,
Resumed,
Disputed,
UnDisputed,
SmsSent,
SmsWillBeSent,
DebtCollectionSent,
ManagedForBailiffRegistration,
WillBeManagedForBailiffRegistration,
WillSendDebtCollectionInvoice,
WillSendReminderInvoice,
OriginalInvoiceDue,
ReminderDue,
DebtCollectionDue,
WillSendPartialInvoice,
InstallmentPlanPartialInvoiceSent,
Completed,
PartialInvoiceDue,
ManagedForReturnToDebtCollection,
Updated,
PaymentWillBeMade,
MadeManual,
PaymentCancelled,
PaymentSent,
AwatingPaymentAcknowledgment,
ReminderInvoiceSent,
WillSendInvoice,
Moved,
EmailEvent,
UnAttested,
InvoiceSold,
InvoiceSaleRequestDenied,
AwaitingInvoiceSaleRequestResponse,
InvoiceSaleRequestCancelled,
InvoiceSaleRequested,
AutogiroPaymentPostponed,
AutogiroCancelledWithdrawal,
AutogiroApprovalAdded,
AutogiroApprovalChanged,
AutogiroApprovalRemoved,
AutogiroWithdrawal,
WillSendLatePaymentInvoice,
OverPayment,
FuturePayment,
EInvoiceRegistered,
EInvoiceUnregistered,
EInvoiceWasRejected,
WrittenOff,
LongTermSurveilance,
AppendixAdded,
AppendixCleared,
SmsEvent,
InstallmentPlanRequested,
SentToBailiff,
SentToBailiffExecution,
CreditCardAdded,
CreditCardRemoved,
CreditCardWithdrawal,
CreditCardCancelledWithdrawal,
VerdictNumberObtained,
ManagedForBailiffEnforcementRegistration,
PaymentRefunded,
MessageSendToSocialWelfare,
ForeignSentToLocalRepresentative,
ChangedOwner,
CreditorCommentByAdmin,
ForeignMakeReadyForLocalRepresentative,
#[serde(rename = "SupplementSentToKFM")]
SupplementSentToKfm,
EInvoiceEvent,
DebtorContractSigned,
DebtorContractSent,
DebtorContractArchived,
DebtorContractFinanced,
FinancierRequested,
BalanceFromInvoice,
EvictionMessageSentToDebtor,
PaymentInitiated,
PaymentAcknowledged,
ExcludedFromSync,
SupplierPaymentFileCreated,
PaymentCompleted,
PublicCommentByAdmin,
Archived,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl EventType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Created => "Created",
Self::Attested => "Attested",
Self::InvoiceSent => "InvoiceSent",
Self::Paid => "Paid",
Self::Credited => "Credited",
Self::InvoiceDue => "InvoiceDue",
Self::WillBeSentToDebtCollection => "WillBeSentToDebtCollection",
Self::SentToDebtCollection => "SentToDebtCollection",
Self::Cancelled => "Cancelled",
Self::CommentedByDebtor => "CommentedByDebtor",
Self::CommentedByCreditor => "CommentedByCreditor",
Self::ReadByUser => "ReadByUser",
Self::Paused => "Paused",
Self::Resumed => "Resumed",
Self::Disputed => "Disputed",
Self::UnDisputed => "UnDisputed",
Self::SmsSent => "SmsSent",
Self::SmsWillBeSent => "SmsWillBeSent",
Self::DebtCollectionSent => "DebtCollectionSent",
Self::ManagedForBailiffRegistration => "ManagedForBailiffRegistration",
Self::WillBeManagedForBailiffRegistration => "WillBeManagedForBailiffRegistration",
Self::WillSendDebtCollectionInvoice => "WillSendDebtCollectionInvoice",
Self::WillSendReminderInvoice => "WillSendReminderInvoice",
Self::OriginalInvoiceDue => "OriginalInvoiceDue",
Self::ReminderDue => "ReminderDue",
Self::DebtCollectionDue => "DebtCollectionDue",
Self::WillSendPartialInvoice => "WillSendPartialInvoice",
Self::InstallmentPlanPartialInvoiceSent => "InstallmentPlanPartialInvoiceSent",
Self::Completed => "Completed",
Self::PartialInvoiceDue => "PartialInvoiceDue",
Self::ManagedForReturnToDebtCollection => "ManagedForReturnToDebtCollection",
Self::Updated => "Updated",
Self::PaymentWillBeMade => "PaymentWillBeMade",
Self::MadeManual => "MadeManual",
Self::PaymentCancelled => "PaymentCancelled",
Self::PaymentSent => "PaymentSent",
Self::AwatingPaymentAcknowledgment => "AwatingPaymentAcknowledgment",
Self::ReminderInvoiceSent => "ReminderInvoiceSent",
Self::WillSendInvoice => "WillSendInvoice",
Self::Moved => "Moved",
Self::EmailEvent => "EmailEvent",
Self::UnAttested => "UnAttested",
Self::InvoiceSold => "InvoiceSold",
Self::InvoiceSaleRequestDenied => "InvoiceSaleRequestDenied",
Self::AwaitingInvoiceSaleRequestResponse => "AwaitingInvoiceSaleRequestResponse",
Self::InvoiceSaleRequestCancelled => "InvoiceSaleRequestCancelled",
Self::InvoiceSaleRequested => "InvoiceSaleRequested",
Self::AutogiroPaymentPostponed => "AutogiroPaymentPostponed",
Self::AutogiroCancelledWithdrawal => "AutogiroCancelledWithdrawal",
Self::AutogiroApprovalAdded => "AutogiroApprovalAdded",
Self::AutogiroApprovalChanged => "AutogiroApprovalChanged",
Self::AutogiroApprovalRemoved => "AutogiroApprovalRemoved",
Self::AutogiroWithdrawal => "AutogiroWithdrawal",
Self::WillSendLatePaymentInvoice => "WillSendLatePaymentInvoice",
Self::OverPayment => "OverPayment",
Self::FuturePayment => "FuturePayment",
Self::EInvoiceRegistered => "EInvoiceRegistered",
Self::EInvoiceUnregistered => "EInvoiceUnregistered",
Self::EInvoiceWasRejected => "EInvoiceWasRejected",
Self::WrittenOff => "WrittenOff",
Self::LongTermSurveilance => "LongTermSurveilance",
Self::AppendixAdded => "AppendixAdded",
Self::AppendixCleared => "AppendixCleared",
Self::SmsEvent => "SmsEvent",
Self::InstallmentPlanRequested => "InstallmentPlanRequested",
Self::SentToBailiff => "SentToBailiff",
Self::SentToBailiffExecution => "SentToBailiffExecution",
Self::CreditCardAdded => "CreditCardAdded",
Self::CreditCardRemoved => "CreditCardRemoved",
Self::CreditCardWithdrawal => "CreditCardWithdrawal",
Self::CreditCardCancelledWithdrawal => "CreditCardCancelledWithdrawal",
Self::VerdictNumberObtained => "VerdictNumberObtained",
Self::ManagedForBailiffEnforcementRegistration => {
"ManagedForBailiffEnforcementRegistration"
}
Self::PaymentRefunded => "PaymentRefunded",
Self::MessageSendToSocialWelfare => "MessageSendToSocialWelfare",
Self::ForeignSentToLocalRepresentative => "ForeignSentToLocalRepresentative",
Self::ChangedOwner => "ChangedOwner",
Self::CreditorCommentByAdmin => "CreditorCommentByAdmin",
Self::ForeignMakeReadyForLocalRepresentative => {
"ForeignMakeReadyForLocalRepresentative"
}
Self::SupplementSentToKfm => "SupplementSentToKFM",
Self::EInvoiceEvent => "EInvoiceEvent",
Self::DebtorContractSigned => "DebtorContractSigned",
Self::DebtorContractSent => "DebtorContractSent",
Self::DebtorContractArchived => "DebtorContractArchived",
Self::DebtorContractFinanced => "DebtorContractFinanced",
Self::FinancierRequested => "FinancierRequested",
Self::BalanceFromInvoice => "BalanceFromInvoice",
Self::EvictionMessageSentToDebtor => "EvictionMessageSentToDebtor",
Self::PaymentInitiated => "PaymentInitiated",
Self::PaymentAcknowledged => "PaymentAcknowledged",
Self::ExcludedFromSync => "ExcludedFromSync",
Self::SupplierPaymentFileCreated => "SupplierPaymentFileCreated",
Self::PaymentCompleted => "PaymentCompleted",
Self::PublicCommentByAdmin => "PublicCommentByAdmin",
Self::Archived => "Archived",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for EventType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ActionType {
DebtCollectionAction,
InstallmentPlanAction,
InvoiceAction,
CreditInvoiceAction,
ContractInvoiceAction,
SelfInvoiceAction,
VerificationInvoiceAction,
DebentureAction,
InterestInvoiceAction,
SupplierInvoiceAction,
ReconciliationInvoiceAction,
OrderAction,
OrderInvoiceAction,
PaymentAdviceAction,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ActionType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::DebtCollectionAction => "DebtCollectionAction",
Self::InstallmentPlanAction => "InstallmentPlanAction",
Self::InvoiceAction => "InvoiceAction",
Self::CreditInvoiceAction => "CreditInvoiceAction",
Self::ContractInvoiceAction => "ContractInvoiceAction",
Self::SelfInvoiceAction => "SelfInvoiceAction",
Self::VerificationInvoiceAction => "VerificationInvoiceAction",
Self::DebentureAction => "DebentureAction",
Self::InterestInvoiceAction => "InterestInvoiceAction",
Self::SupplierInvoiceAction => "SupplierInvoiceAction",
Self::ReconciliationInvoiceAction => "ReconciliationInvoiceAction",
Self::OrderAction => "OrderAction",
Self::OrderInvoiceAction => "OrderInvoiceAction",
Self::PaymentAdviceAction => "PaymentAdviceAction",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ActionType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum DebtCollectionActionLevelType {
LatePaymentFee,
Reminders,
DebtCollection,
Bailiff,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl DebtCollectionActionLevelType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::LatePaymentFee => "LatePaymentFee",
Self::Reminders => "Reminders",
Self::DebtCollection => "DebtCollection",
Self::Bailiff => "Bailiff",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for DebtCollectionActionLevelType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum DiscountType {
Amount,
Percentage,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl DiscountType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Amount => "Amount",
Self::Percentage => "Percentage",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for DiscountType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum RotRutType {
Construction,
Electricity,
GlassMetalWork,
GroundDrainageWork,
Masonry,
PaintingWallpapering,
Hvac,
BabySitting,
Moving,
#[serde(rename = "ITServices")]
ItServices,
TextileClothing,
PersonalCare,
SnowPlowing,
Cleaning,
Gardening,
WhiteGoods,
Furnituring,
HouseSupervision,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl RotRutType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Construction => "Construction",
Self::Electricity => "Electricity",
Self::GlassMetalWork => "GlassMetalWork",
Self::GroundDrainageWork => "GroundDrainageWork",
Self::Masonry => "Masonry",
Self::PaintingWallpapering => "PaintingWallpapering",
Self::Hvac => "Hvac",
Self::BabySitting => "BabySitting",
Self::Moving => "Moving",
Self::ItServices => "ITServices",
Self::TextileClothing => "TextileClothing",
Self::PersonalCare => "PersonalCare",
Self::SnowPlowing => "SnowPlowing",
Self::Cleaning => "Cleaning",
Self::Gardening => "Gardening",
Self::WhiteGoods => "WhiteGoods",
Self::Furnituring => "Furnituring",
Self::HouseSupervision => "HouseSupervision",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for RotRutType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum RecordType {
Standard,
Message,
Package,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl RecordType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Standard => "Standard",
Self::Message => "Message",
Self::Package => "Package",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for RecordType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ContractInvoiceActionStageType {
None,
Created,
InvoiceCreated,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ContractInvoiceActionStageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Created => "Created",
Self::InvoiceCreated => "InvoiceCreated",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ContractInvoiceActionStageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum DeliveryMethodType {
Email,
Mail,
Manually,
#[serde(rename = "SMS")]
Sms,
EInvoice,
Kivra,
Avy,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl DeliveryMethodType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Email => "Email",
Self::Mail => "Mail",
Self::Manually => "Manually",
Self::Sms => "SMS",
Self::EInvoice => "EInvoice",
Self::Kivra => "Kivra",
Self::Avy => "Avy",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for DeliveryMethodType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum RecurrenceIntervalType {
Monthly,
Yearly,
Quarterly,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl RecurrenceIntervalType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Monthly => "Monthly",
Self::Yearly => "Yearly",
Self::Quarterly => "Quarterly",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for RecurrenceIntervalType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum LanguageType {
#[serde(rename = "SV")]
Sv,
#[serde(rename = "EN")]
En,
#[serde(rename = "FI")]
Fi,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl LanguageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Sv => "SV",
Self::En => "EN",
Self::Fi => "FI",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for LanguageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum InterestType {
Fixed,
AboveEffectiveReference,
NoInterest,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl InterestType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Fixed => "Fixed",
Self::AboveEffectiveReference => "AboveEffectiveReference",
Self::NoInterest => "NoInterest",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for InterestType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum IntermediatorType {
#[serde(rename = "ITELLA")]
Itella,
#[serde(rename = "TIETOSE")]
Tietose,
#[serde(rename = "LOGICA")]
Logica,
#[serde(rename = "PROCEEDO")]
Proceedo,
#[serde(rename = "HUSERA")]
Husera,
#[serde(rename = "BASWARE")]
Basware,
#[serde(rename = "EDB")]
Edb,
#[serde(rename = "STRALFORS1")]
Stralfors1,
#[serde(rename = "LIAISON_FI")]
LiaisonFi,
#[serde(rename = "EXPERT")]
Expert,
#[serde(rename = "ESSESESS")]
Essesess,
#[serde(rename = "HANDSESS")]
Handsess,
#[serde(rename = "DABASESS")]
Dabasess,
#[serde(rename = "SWEDSESS")]
Swedsess,
#[serde(rename = "NDEASESS")]
Ndeasess,
#[serde(rename = "INEXCHANGE")]
Inexchange,
#[serde(rename = "SCANCLOUD")]
Scancloud,
#[serde(rename = "PAGERO")]
Pagero,
#[serde(rename = "CREDIFLOW")]
Crediflow,
#[serde(rename = "PEPPOL")]
Peppol,
#[serde(rename = "COMPELLO")]
Compello,
#[serde(rename = "LOGIQ")]
Logiq,
#[serde(rename = "APIX")]
Apix,
#[serde(rename = "AKSESSPUNKT")]
Aksesspunkt,
#[serde(rename = "FININVOICE")]
Fininvoice,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl IntermediatorType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Itella => "ITELLA",
Self::Tietose => "TIETOSE",
Self::Logica => "LOGICA",
Self::Proceedo => "PROCEEDO",
Self::Husera => "HUSERA",
Self::Basware => "BASWARE",
Self::Edb => "EDB",
Self::Stralfors1 => "STRALFORS1",
Self::LiaisonFi => "LIAISON_FI",
Self::Expert => "EXPERT",
Self::Essesess => "ESSESESS",
Self::Handsess => "HANDSESS",
Self::Dabasess => "DABASESS",
Self::Swedsess => "SWEDSESS",
Self::Ndeasess => "NDEASESS",
Self::Inexchange => "INEXCHANGE",
Self::Scancloud => "SCANCLOUD",
Self::Pagero => "PAGERO",
Self::Crediflow => "CREDIFLOW",
Self::Peppol => "PEPPOL",
Self::Compello => "COMPELLO",
Self::Logiq => "LOGIQ",
Self::Apix => "APIX",
Self::Aksesspunkt => "AKSESSPUNKT",
Self::Fininvoice => "FININVOICE",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for IntermediatorType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ReferenceType {
None,
#[serde(rename = "OCR")]
Ocr,
Message,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ReferenceType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Ocr => "OCR",
Self::Message => "Message",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ReferenceType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ReceivingAccountType {
BankGiro,
PlusGiro,
BankAccount,
#[serde(rename = "IBAN")]
Iban,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ReceivingAccountType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::BankGiro => "BankGiro",
Self::PlusGiro => "PlusGiro",
Self::BankAccount => "BankAccount",
Self::Iban => "IBAN",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ReceivingAccountType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ContractInvoicePeriodRuleType {
None,
Previous,
Current,
Next,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ContractInvoicePeriodRuleType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Previous => "Previous",
Self::Current => "Current",
Self::Next => "Next",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ContractInvoicePeriodRuleType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CreditCardAddStatusType {
Pending,
Succeeded,
Failed,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CreditCardAddStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Pending => "Pending",
Self::Succeeded => "Succeeded",
Self::Failed => "Failed",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CreditCardAddStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CreditCardPaymentStatusType {
Pending,
Succeeded,
Failed,
Refunded,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CreditCardPaymentStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Pending => "Pending",
Self::Succeeded => "Succeeded",
Self::Failed => "Failed",
Self::Refunded => "Refunded",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CreditCardPaymentStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CreditorModuleAccessType {
InvoiceModule,
DebtCollectionModule,
SupplierInvoice,
SelfInvoiceModule,
DebentureModule,
FinanceModule,
OutgoingPaymentsModule,
ReconciliationModule,
CheckoutModule,
PaymentAdviceModule,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CreditorModuleAccessType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::InvoiceModule => "InvoiceModule",
Self::DebtCollectionModule => "DebtCollectionModule",
Self::SupplierInvoice => "SupplierInvoice",
Self::SelfInvoiceModule => "SelfInvoiceModule",
Self::DebentureModule => "DebentureModule",
Self::FinanceModule => "FinanceModule",
Self::OutgoingPaymentsModule => "OutgoingPaymentsModule",
Self::ReconciliationModule => "ReconciliationModule",
Self::CheckoutModule => "CheckoutModule",
Self::PaymentAdviceModule => "PaymentAdviceModule",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CreditorModuleAccessType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CreditorAddonCategoryType {
All,
Payment,
Accounting,
Delivery,
Factoring,
Authentication,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CreditorAddonCategoryType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::All => "All",
Self::Payment => "Payment",
Self::Accounting => "Accounting",
Self::Delivery => "Delivery",
Self::Factoring => "Factoring",
Self::Authentication => "Authentication",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CreditorAddonCategoryType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CreditorAddonType {
None,
Swish,
AutoGiro,
BillectaCheckOut,
StripeConnectedAccount,
Stripe,
EInvoice,
Kivra,
WebHooks,
Fortnox,
FortnoxVoucher,
VismaEekonomi,
#[serde(rename = "CSVAccounting")]
CsvAccounting,
PeAccounting,
#[serde(rename = "FTPaccounting")]
FtPaccounting,
BankId,
PeAccountingSales,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CreditorAddonType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Swish => "Swish",
Self::AutoGiro => "AutoGiro",
Self::BillectaCheckOut => "BillectaCheckOut",
Self::StripeConnectedAccount => "StripeConnectedAccount",
Self::Stripe => "Stripe",
Self::EInvoice => "EInvoice",
Self::Kivra => "Kivra",
Self::WebHooks => "WebHooks",
Self::Fortnox => "Fortnox",
Self::FortnoxVoucher => "FortnoxVoucher",
Self::VismaEekonomi => "VismaEekonomi",
Self::CsvAccounting => "CSVAccounting",
Self::PeAccounting => "PeAccounting",
Self::FtPaccounting => "FTPaccounting",
Self::BankId => "BankId",
Self::PeAccountingSales => "PeAccountingSales",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CreditorAddonType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CreditorAddonDescriptionType {
None,
Active,
ConnectedAccountExist,
ConnectionIsPaused,
ConnectionExistButIsNotActivated,
CustomerNumberReserved,
CertificateHasExpired,
CertificateHasNotYetBeenActivated,
PhoneNumberIsMissing,
ConnectionIsNotActivated,
ApiCodeIsMissing,
AccessCodeIsMissing,
AccessError,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CreditorAddonDescriptionType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Active => "Active",
Self::ConnectedAccountExist => "ConnectedAccountExist",
Self::ConnectionIsPaused => "ConnectionIsPaused",
Self::ConnectionExistButIsNotActivated => "ConnectionExistButIsNotActivated",
Self::CustomerNumberReserved => "CustomerNumberReserved",
Self::CertificateHasExpired => "CertificateHasExpired",
Self::CertificateHasNotYetBeenActivated => "CertificateHasNotYetBeenActivated",
Self::PhoneNumberIsMissing => "PhoneNumberIsMissing",
Self::ConnectionIsNotActivated => "ConnectionIsNotActivated",
Self::ApiCodeIsMissing => "ApiCodeIsMissing",
Self::AccessCodeIsMissing => "AccessCodeIsMissing",
Self::AccessError => "AccessError",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CreditorAddonDescriptionType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CreditorPaymentMethodType {
BankGiro,
PlusGiro,
BankAccount,
#[serde(rename = "IBAN")]
Iban,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CreditorPaymentMethodType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::BankGiro => "BankGiro",
Self::PlusGiro => "PlusGiro",
Self::BankAccount => "BankAccount",
Self::Iban => "IBAN",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CreditorPaymentMethodType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CreditorPaymentMethodPriorityType {
Primary,
Alternative,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CreditorPaymentMethodPriorityType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Primary => "Primary",
Self::Alternative => "Alternative",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CreditorPaymentMethodPriorityType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CreditorKycStateType {
Pending,
Approved,
Rejected,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CreditorKycStateType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Pending => "Pending",
Self::Approved => "Approved",
Self::Rejected => "Rejected",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CreditorKycStateType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum DebtCollectionActionStageType {
None,
Created,
ReminderInvoiceSent,
DebtCollectionInvoiceSent,
SentToBailiff,
Manual,
Completed,
Cancelled,
ForeignManual,
AwaitingFeePayment,
Attested,
DebtCollectionClaimDue,
LatePaymentInvoiceSent,
DebtCollectionClaimResponseRequested,
ReadyForBailiff,
LongTermSurveilance,
VerdictObtained,
SentToBailiffEnforcement,
ForeignDebtorLetterSent,
ForeignCreditorLetterSent,
EnforcementResponseRequested,
ReadyForEnforcement,
ForeignSentToLocalRepresentative,
ForeignMakeReadyForLocalRepresentative,
ReadyForAttest,
ReadyForAssistance,
ReadyForAssistanceWithBailiff,
Assisted,
AssistedWithBailiff,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl DebtCollectionActionStageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Created => "Created",
Self::ReminderInvoiceSent => "ReminderInvoiceSent",
Self::DebtCollectionInvoiceSent => "DebtCollectionInvoiceSent",
Self::SentToBailiff => "SentToBailiff",
Self::Manual => "Manual",
Self::Completed => "Completed",
Self::Cancelled => "Cancelled",
Self::ForeignManual => "ForeignManual",
Self::AwaitingFeePayment => "AwaitingFeePayment",
Self::Attested => "Attested",
Self::DebtCollectionClaimDue => "DebtCollectionClaimDue",
Self::LatePaymentInvoiceSent => "LatePaymentInvoiceSent",
Self::DebtCollectionClaimResponseRequested => "DebtCollectionClaimResponseRequested",
Self::ReadyForBailiff => "ReadyForBailiff",
Self::LongTermSurveilance => "LongTermSurveilance",
Self::VerdictObtained => "VerdictObtained",
Self::SentToBailiffEnforcement => "SentToBailiffEnforcement",
Self::ForeignDebtorLetterSent => "ForeignDebtorLetterSent",
Self::ForeignCreditorLetterSent => "ForeignCreditorLetterSent",
Self::EnforcementResponseRequested => "EnforcementResponseRequested",
Self::ReadyForEnforcement => "ReadyForEnforcement",
Self::ForeignSentToLocalRepresentative => "ForeignSentToLocalRepresentative",
Self::ForeignMakeReadyForLocalRepresentative => {
"ForeignMakeReadyForLocalRepresentative"
}
Self::ReadyForAttest => "ReadyForAttest",
Self::ReadyForAssistance => "ReadyForAssistance",
Self::ReadyForAssistanceWithBailiff => "ReadyForAssistanceWithBailiff",
Self::Assisted => "Assisted",
Self::AssistedWithBailiff => "AssistedWithBailiff",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for DebtCollectionActionStageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum DeliveryStatusType {
Received,
Opened,
Viewed,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl DeliveryStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Received => "Received",
Self::Opened => "Opened",
Self::Viewed => "Viewed",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for DeliveryStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ActionSourceType {
None,
DebtCollectionAction,
InvoiceAction,
ReconciliationInvoiceAction,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ActionSourceType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::DebtCollectionAction => "DebtCollectionAction",
Self::InvoiceAction => "InvoiceAction",
Self::ReconciliationInvoiceAction => "ReconciliationInvoiceAction",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ActionSourceType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum DebtorType {
Undefined,
Private,
Company,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl DebtorType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Undefined => "Undefined",
Self::Private => "Private",
Self::Company => "Company",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for DebtorType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum EInvoiceBankType {
#[serde(rename = "OEB")]
Oeb,
#[serde(rename = "SEB")]
Seb,
#[serde(rename = "SHB")]
Shb,
#[serde(rename = "SKB")]
Skb,
#[serde(rename = "FSPA")]
Fspa,
#[serde(rename = "NB")]
Nb,
#[serde(rename = "LFB")]
Lfb,
#[serde(rename = "FINN")]
Finn,
#[serde(rename = "ICA")]
Ica,
#[serde(rename = "SYD")]
Syd,
#[serde(rename = "DNB")]
Dnb,
#[serde(rename = "SBF")]
Sbf,
#[serde(rename = "AAB")]
Aab,
#[serde(rename = "DBF")]
Dbf,
#[serde(rename = "SEBF")]
Sebf,
#[serde(rename = "SHBF")]
Shbf,
#[serde(rename = "NBF")]
Nbf,
#[serde(rename = "FRX")]
Frx,
#[serde(rename = "MARG")]
Marg,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl EInvoiceBankType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Oeb => "OEB",
Self::Seb => "SEB",
Self::Shb => "SHB",
Self::Skb => "SKB",
Self::Fspa => "FSPA",
Self::Nb => "NB",
Self::Lfb => "LFB",
Self::Finn => "FINN",
Self::Ica => "ICA",
Self::Syd => "SYD",
Self::Dnb => "DNB",
Self::Sbf => "SBF",
Self::Aab => "AAB",
Self::Dbf => "DBF",
Self::Sebf => "SEBF",
Self::Shbf => "SHBF",
Self::Nbf => "NBF",
Self::Frx => "FRX",
Self::Marg => "MARG",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for EInvoiceBankType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum DebtorPaymentMethod {
BankGiro,
PlusGiro,
BankAccount,
#[serde(rename = "IBAN")]
Iban,
Fedwire,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl DebtorPaymentMethod {
pub fn as_str(&self) -> &'static str {
match *self {
Self::BankGiro => "BankGiro",
Self::PlusGiro => "PlusGiro",
Self::BankAccount => "BankAccount",
Self::Iban => "IBAN",
Self::Fedwire => "Fedwire",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for DebtorPaymentMethod {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum AutogiroStageType {
Pending,
Approved,
Failed,
Removed,
Migration,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl AutogiroStageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Pending => "Pending",
Self::Approved => "Approved",
Self::Failed => "Failed",
Self::Removed => "Removed",
Self::Migration => "Migration",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for AutogiroStageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum DebtorBalanceType {
OpeningBalance,
Invoice,
SelfInvoice,
OverPayment,
BalanceFromInvoice,
ManualBalance,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl DebtorBalanceType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::OpeningBalance => "OpeningBalance",
Self::Invoice => "Invoice",
Self::SelfInvoice => "SelfInvoice",
Self::OverPayment => "OverPayment",
Self::BalanceFromInvoice => "BalanceFromInvoice",
Self::ManualBalance => "ManualBalance",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for DebtorBalanceType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum KivraStatusType {
None,
DebtorHasKivra,
DebtorNotFoundInKivra,
#[serde(rename = "DebtorMissingSSN")]
DebtorMissingSsn,
DebtorNotFound,
#[serde(rename = "DebtorDontHaveSwedishSSN")]
DebtorDontHaveSwedishSsn,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl KivraStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::DebtorHasKivra => "DebtorHasKivra",
Self::DebtorNotFoundInKivra => "DebtorNotFoundInKivra",
Self::DebtorMissingSsn => "DebtorMissingSSN",
Self::DebtorNotFound => "DebtorNotFound",
Self::DebtorDontHaveSwedishSsn => "DebtorDontHaveSwedishSSN",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for KivraStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum IncomingPaymentNotificationMethodType {
Email,
#[serde(rename = "SMS")]
Sms,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl IncomingPaymentNotificationMethodType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Email => "Email",
Self::Sms => "SMS",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for IncomingPaymentNotificationMethodType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum GenericActionStageType {
None,
Created,
ReminderInvoiceSent,
DebtCollectionInvoiceSent,
SentToBailiff,
Manual,
Completed,
Cancelled,
ForeignManual,
AwaitingFeePayment,
FeeInvoiceSent,
InstallmentPlanInvoiceSent,
InvoiceSent,
Attested,
DebtCollectionClaimDue,
ReturnToSourceRequested,
SentToDebtCollection,
InvoiceCreated,
PaymentSent,
PaymentCancelled,
SalesRequested,
SaleRequestAccepted,
SalesRequestedCancelled,
SalesRequestedDenied,
LatePaymentInvoiceSent,
DebtCollectionClaimResponseRequested,
ReadyForBailiff,
LongTermSurveilance,
VerdictObtained,
SentToBailiffEnforcement,
ForeignDebtorLetterSent,
ForeignCreditorLetterSent,
EnforcementResponseRequested,
ReadyForEnforcement,
ForeignSentToLocalRepresentative,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl GenericActionStageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Created => "Created",
Self::ReminderInvoiceSent => "ReminderInvoiceSent",
Self::DebtCollectionInvoiceSent => "DebtCollectionInvoiceSent",
Self::SentToBailiff => "SentToBailiff",
Self::Manual => "Manual",
Self::Completed => "Completed",
Self::Cancelled => "Cancelled",
Self::ForeignManual => "ForeignManual",
Self::AwaitingFeePayment => "AwaitingFeePayment",
Self::FeeInvoiceSent => "FeeInvoiceSent",
Self::InstallmentPlanInvoiceSent => "InstallmentPlanInvoiceSent",
Self::InvoiceSent => "InvoiceSent",
Self::Attested => "Attested",
Self::DebtCollectionClaimDue => "DebtCollectionClaimDue",
Self::ReturnToSourceRequested => "ReturnToSourceRequested",
Self::SentToDebtCollection => "SentToDebtCollection",
Self::InvoiceCreated => "InvoiceCreated",
Self::PaymentSent => "PaymentSent",
Self::PaymentCancelled => "PaymentCancelled",
Self::SalesRequested => "SalesRequested",
Self::SaleRequestAccepted => "SaleRequestAccepted",
Self::SalesRequestedCancelled => "SalesRequestedCancelled",
Self::SalesRequestedDenied => "SalesRequestedDenied",
Self::LatePaymentInvoiceSent => "LatePaymentInvoiceSent",
Self::DebtCollectionClaimResponseRequested => "DebtCollectionClaimResponseRequested",
Self::ReadyForBailiff => "ReadyForBailiff",
Self::LongTermSurveilance => "LongTermSurveilance",
Self::VerdictObtained => "VerdictObtained",
Self::SentToBailiffEnforcement => "SentToBailiffEnforcement",
Self::ForeignDebtorLetterSent => "ForeignDebtorLetterSent",
Self::ForeignCreditorLetterSent => "ForeignCreditorLetterSent",
Self::EnforcementResponseRequested => "EnforcementResponseRequested",
Self::ReadyForEnforcement => "ReadyForEnforcement",
Self::ForeignSentToLocalRepresentative => "ForeignSentToLocalRepresentative",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for GenericActionStageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ImportFileStateType {
Queued,
Succeded,
Failed,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ImportFileStateType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Queued => "Queued",
Self::Succeded => "Succeded",
Self::Failed => "Failed",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ImportFileStateType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum InstallmentPlanActionStageType {
None,
Created,
Manual,
Completed,
Cancelled,
AwaitingFeePayment,
InstallmentPlanInvoiceSent,
Attested,
ReturnToSourceRequested,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl InstallmentPlanActionStageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Created => "Created",
Self::Manual => "Manual",
Self::Completed => "Completed",
Self::Cancelled => "Cancelled",
Self::AwaitingFeePayment => "AwaitingFeePayment",
Self::InstallmentPlanInvoiceSent => "InstallmentPlanInvoiceSent",
Self::Attested => "Attested",
Self::ReturnToSourceRequested => "ReturnToSourceRequested",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for InstallmentPlanActionStageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum InstallmentPlanSourceType {
None,
DebtCollectionAction,
InvoiceAction,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl InstallmentPlanSourceType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::DebtCollectionAction => "DebtCollectionAction",
Self::InvoiceAction => "InvoiceAction",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for InstallmentPlanSourceType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum InvoiceActionStageType {
None,
Created,
ReminderInvoiceSent,
Manual,
Completed,
Cancelled,
InvoiceSent,
Attested,
SentToDebtCollection,
SalesRequested,
SaleRequestAccepted,
SalesRequestedCancelled,
SalesRequestedDenied,
Attesting,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl InvoiceActionStageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Created => "Created",
Self::ReminderInvoiceSent => "ReminderInvoiceSent",
Self::Manual => "Manual",
Self::Completed => "Completed",
Self::Cancelled => "Cancelled",
Self::InvoiceSent => "InvoiceSent",
Self::Attested => "Attested",
Self::SentToDebtCollection => "SentToDebtCollection",
Self::SalesRequested => "SalesRequested",
Self::SaleRequestAccepted => "SaleRequestAccepted",
Self::SalesRequestedCancelled => "SalesRequestedCancelled",
Self::SalesRequestedDenied => "SalesRequestedDenied",
Self::Attesting => "Attesting",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for InvoiceActionStageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum PostageType {
Priority,
Economy,
Protected,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl PostageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Priority => "Priority",
Self::Economy => "Economy",
Self::Protected => "Protected",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for PostageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum OrderRecordType {
Service,
Commodity,
ShippingFee,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl OrderRecordType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Service => "Service",
Self::Commodity => "Commodity",
Self::ShippingFee => "ShippingFee",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for OrderRecordType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum OrderStageType {
Created,
Completed,
Cancelled,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl OrderStageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Created => "Created",
Self::Completed => "Completed",
Self::Cancelled => "Cancelled",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for OrderStageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum OrderPaymentMethodType {
None,
InvoiceFinancing,
CreditCard,
Swish,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl OrderPaymentMethodType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::InvoiceFinancing => "InvoiceFinancing",
Self::CreditCard => "CreditCard",
Self::Swish => "Swish",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for OrderPaymentMethodType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum OrderCheckoutStatusType {
Pending,
Succeeded,
Failed,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl OrderCheckoutStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Pending => "Pending",
Self::Succeeded => "Succeeded",
Self::Failed => "Failed",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for OrderCheckoutStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum OutgoingPaymentStatusType {
Queued,
Processing,
Succeded,
Failed,
Aborted,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl OutgoingPaymentStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Queued => "Queued",
Self::Processing => "Processing",
Self::Succeded => "Succeded",
Self::Failed => "Failed",
Self::Aborted => "Aborted",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for OutgoingPaymentStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ReceivingPaymentMethodType {
BankGiro,
PlusGiro,
BankAccount,
Iban,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ReceivingPaymentMethodType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::BankGiro => "BankGiro",
Self::PlusGiro => "PlusGiro",
Self::BankAccount => "BankAccount",
Self::Iban => "Iban",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ReceivingPaymentMethodType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum SupplierPaymentMethodType {
BankGiro,
PlusGiro,
BankAccount,
#[serde(rename = "IBAN")]
Iban,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl SupplierPaymentMethodType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::BankGiro => "BankGiro",
Self::PlusGiro => "PlusGiro",
Self::BankAccount => "BankAccount",
Self::Iban => "IBAN",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for SupplierPaymentMethodType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum OutgoingPaymentType {
Bankgiro,
P27,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl OutgoingPaymentType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Bankgiro => "Bankgiro",
Self::P27 => "P27",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for OutgoingPaymentType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum P27CategoryPurposeType {
#[serde(rename = "SUPP")]
Supp,
#[serde(rename = "CORT")]
Cort,
#[serde(rename = "INTC")]
Intc,
#[serde(rename = "TREA")]
Trea,
#[serde(rename = "SALA")]
Sala,
#[serde(rename = "TAXS")]
Taxs,
#[serde(rename = "PENS")]
Pens,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl P27CategoryPurposeType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Supp => "SUPP",
Self::Cort => "CORT",
Self::Intc => "INTC",
Self::Trea => "TREA",
Self::Sala => "SALA",
Self::Taxs => "TAXS",
Self::Pens => "PENS",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for P27CategoryPurposeType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum P27ChargeBearerType {
#[serde(rename = "SHAR")]
Shar,
#[serde(rename = "CRED")]
Cred,
#[serde(rename = "DEBT")]
Debt,
#[serde(rename = "SLEV")]
Slev,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl P27ChargeBearerType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Shar => "SHAR",
Self::Cred => "CRED",
Self::Debt => "DEBT",
Self::Slev => "SLEV",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for P27ChargeBearerType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum P27CodeType {
#[serde(rename = "NURG")]
Nurg,
#[serde(rename = "URGP")]
Urgp,
#[serde(rename = "SEPA")]
Sepa,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl P27CodeType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Nurg => "NURG",
Self::Urgp => "URGP",
Self::Sepa => "SEPA",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for P27CodeType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum P27MethodType {
#[serde(rename = "TRF")]
Trf,
#[serde(rename = "CHK")]
Chk,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl P27MethodType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Trf => "TRF",
Self::Chk => "CHK",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for P27MethodType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ProductType {
Service,
Commodity,
Package,
#[serde(rename = "VAT")]
Vat,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ProductType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Service => "Service",
Self::Commodity => "Commodity",
Self::Package => "Package",
Self::Vat => "VAT",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ProductType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ProjectStatusType {
NotStarted,
Ongoing,
Compelted,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ProjectStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::NotStarted => "NotStarted",
Self::Ongoing => "Ongoing",
Self::Compelted => "Compelted",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ProjectStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ReconciliationInvoiceActionStageType {
None,
Created,
Completed,
InvoiceSent,
SentToDebtCollection,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ReconciliationInvoiceActionStageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Created => "Created",
Self::Completed => "Completed",
Self::InvoiceSent => "InvoiceSent",
Self::SentToDebtCollection => "SentToDebtCollection",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ReconciliationInvoiceActionStageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum RegisterPaymentOverShootingAmountHandlingType {
None,
AsCurrencyDifference,
AsOverPayments,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl RegisterPaymentOverShootingAmountHandlingType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::AsCurrencyDifference => "AsCurrencyDifference",
Self::AsOverPayments => "AsOverPayments",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for RegisterPaymentOverShootingAmountHandlingType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum SelfInvoiceActionStageType {
None,
Created,
Manual,
Completed,
Cancelled,
InvoiceSent,
Attested,
PaymentSent,
PaymentCancelled,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl SelfInvoiceActionStageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Created => "Created",
Self::Manual => "Manual",
Self::Completed => "Completed",
Self::Cancelled => "Cancelled",
Self::InvoiceSent => "InvoiceSent",
Self::Attested => "Attested",
Self::PaymentSent => "PaymentSent",
Self::PaymentCancelled => "PaymentCancelled",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for SelfInvoiceActionStageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum SupplierInvoiceActionStageType {
None,
Created,
Manual,
Completed,
Cancelled,
Attested,
PaymentSent,
PaymentCancelled,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl SupplierInvoiceActionStageType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::Created => "Created",
Self::Manual => "Manual",
Self::Completed => "Completed",
Self::Cancelled => "Cancelled",
Self::Attested => "Attested",
Self::PaymentSent => "PaymentSent",
Self::PaymentCancelled => "PaymentCancelled",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for SupplierInvoiceActionStageType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum OriginType {
InternalApi,
FortnoxOrder,
InternalSystem,
Fortnox,
PeAccountingInvoice,
Kommed,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl OriginType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::InternalApi => "InternalApi",
Self::FortnoxOrder => "FortnoxOrder",
Self::InternalSystem => "InternalSystem",
Self::Fortnox => "Fortnox",
Self::PeAccountingInvoice => "PeAccountingInvoice",
Self::Kommed => "Kommed",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for OriginType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ActionSearchStatusType {
All,
Open,
Closed,
WithInvoiceReminder,
WithoutInvoiceReminder,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ActionSearchStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::All => "All",
Self::Open => "Open",
Self::Closed => "Closed",
Self::WithInvoiceReminder => "WithInvoiceReminder",
Self::WithoutInvoiceReminder => "WithoutInvoiceReminder",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ActionSearchStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum RotRutSearchFilterType {
NoFilter,
#[serde(rename = "ROT")]
Rot,
#[serde(rename = "RUT")]
Rut,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl RotRutSearchFilterType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::NoFilter => "NoFilter",
Self::Rot => "ROT",
Self::Rut => "RUT",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for RotRutSearchFilterType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum SwishStatusType {
Created,
Declined,
Error,
Paid,
Cancelled,
Refunded,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl SwishStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Created => "Created",
Self::Declined => "Declined",
Self::Error => "Error",
Self::Paid => "Paid",
Self::Cancelled => "Cancelled",
Self::Refunded => "Refunded",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for SwishStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum ActivationPolicyType {
DisabledForExceptionList,
AllowedForExceptionList,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl ActivationPolicyType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::DisabledForExceptionList => "DisabledForExceptionList",
Self::AllowedForExceptionList => "AllowedForExceptionList",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for ActivationPolicyType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum AutogiroApprovalCommentCode {
CancelledByPayerOrBank,
AccountTypeNotApprovedForAutogiro,
ApprovalIsMissingAtBankgirot,
WrongBankOrPersonDetails,
MakulatedDueToUnrespondedAccountRequest,
PayerBankgiroMissing,
ApprovalAlreadyExists,
WrongOrgnoOrContract,
WrongPayerNumber,
WrongBankAccount,
WrongReceiverBankgiro,
ReceiverBankgiroIsUnregistered,
NewApproval,
Makulated,
ApprovalIsMakulatedDueToMakulatedPayerBankgiroNumber,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl AutogiroApprovalCommentCode {
pub fn as_str(&self) -> &'static str {
match *self {
Self::CancelledByPayerOrBank => "CancelledByPayerOrBank",
Self::AccountTypeNotApprovedForAutogiro => "AccountTypeNotApprovedForAutogiro",
Self::ApprovalIsMissingAtBankgirot => "ApprovalIsMissingAtBankgirot",
Self::WrongBankOrPersonDetails => "WrongBankOrPersonDetails",
Self::MakulatedDueToUnrespondedAccountRequest => {
"MakulatedDueToUnrespondedAccountRequest"
}
Self::PayerBankgiroMissing => "PayerBankgiroMissing",
Self::ApprovalAlreadyExists => "ApprovalAlreadyExists",
Self::WrongOrgnoOrContract => "WrongOrgnoOrContract",
Self::WrongPayerNumber => "WrongPayerNumber",
Self::WrongBankAccount => "WrongBankAccount",
Self::WrongReceiverBankgiro => "WrongReceiverBankgiro",
Self::ReceiverBankgiroIsUnregistered => "ReceiverBankgiroIsUnregistered",
Self::NewApproval => "NewApproval",
Self::Makulated => "Makulated",
Self::ApprovalIsMakulatedDueToMakulatedPayerBankgiroNumber => {
"ApprovalIsMakulatedDueToMakulatedPayerBankgiroNumber"
}
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for AutogiroApprovalCommentCode {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum AutogiroCompatibleType {
Approved,
Unapproved,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl AutogiroCompatibleType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Approved => "Approved",
Self::Unapproved => "Unapproved",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for AutogiroCompatibleType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum AutogiroWithdrawalCommentCode {
NoCoverage,
PaymentFailed,
WrongPaymentDate,
WrongPayerNumber,
WrongDebitingCode,
WrongAmount,
WrongNewPaymentDate,
WrongReceiverBankgiroNumber,
ReceiverBankgironumberIsMissing,
Cancelled,
PaymentIsMissing,
ChangedPaymentDate,
NotChangedRenewingJob,
ExpiresApprovalMissing,
ExpiresAccountNotApprovedOrClosed,
WrongPeriodCode,
WrongAmountSelfRenewedAssignments,
AmountNotNumeric,
ForbiddenForWithdraws,
#[serde(rename = "BankgiroNoMissingAtBGC")]
BankgiroNoMissingAtBgc,
PassedPaymentDate,
ReceiverBgNoIsNotSameOnOpeningPostAsTransactionPost,
AmountExceedsMaximunAmount,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl AutogiroWithdrawalCommentCode {
pub fn as_str(&self) -> &'static str {
match *self {
Self::NoCoverage => "NoCoverage",
Self::PaymentFailed => "PaymentFailed",
Self::WrongPaymentDate => "WrongPaymentDate",
Self::WrongPayerNumber => "WrongPayerNumber",
Self::WrongDebitingCode => "WrongDebitingCode",
Self::WrongAmount => "WrongAmount",
Self::WrongNewPaymentDate => "WrongNewPaymentDate",
Self::WrongReceiverBankgiroNumber => "WrongReceiverBankgiroNumber",
Self::ReceiverBankgironumberIsMissing => "ReceiverBankgironumberIsMissing",
Self::Cancelled => "Cancelled",
Self::PaymentIsMissing => "PaymentIsMissing",
Self::ChangedPaymentDate => "ChangedPaymentDate",
Self::NotChangedRenewingJob => "NotChangedRenewingJob",
Self::ExpiresApprovalMissing => "ExpiresApprovalMissing",
Self::ExpiresAccountNotApprovedOrClosed => "ExpiresAccountNotApprovedOrClosed",
Self::WrongPeriodCode => "WrongPeriodCode",
Self::WrongAmountSelfRenewedAssignments => "WrongAmountSelfRenewedAssignments",
Self::AmountNotNumeric => "AmountNotNumeric",
Self::ForbiddenForWithdraws => "ForbiddenForWithdraws",
Self::BankgiroNoMissingAtBgc => "BankgiroNoMissingAtBGC",
Self::PassedPaymentDate => "PassedPaymentDate",
Self::ReceiverBgNoIsNotSameOnOpeningPostAsTransactionPost => {
"ReceiverBgNoIsNotSameOnOpeningPostAsTransactionPost"
}
Self::AmountExceedsMaximunAmount => "AmountExceedsMaximunAmount",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for AutogiroWithdrawalCommentCode {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum CreditorShareTargetType {
Owner,
Contributor,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl CreditorShareTargetType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Owner => "Owner",
Self::Contributor => "Contributor",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for CreditorShareTargetType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum DebtorContractPeriodType {
Undefined,
Months,
Quarters,
Years,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl DebtorContractPeriodType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Undefined => "Undefined",
Self::Months => "Months",
Self::Quarters => "Quarters",
Self::Years => "Years",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for DebtorContractPeriodType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum DebtorContractStateType {
Undefined,
Draft,
Unsigned,
Signed,
Financed,
Cancelled,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl DebtorContractStateType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Undefined => "Undefined",
Self::Draft => "Draft",
Self::Unsigned => "Unsigned",
Self::Signed => "Signed",
Self::Financed => "Financed",
Self::Cancelled => "Cancelled",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for DebtorContractStateType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum KycOwnershipLevelType {
None,
MoreThan0ButNoteMoreThan25,
MoreThan25ButNoteMoreThan50,
MoreThan50ButNoteMoreThan75,
MoreThan75ButNoteMoreThan100,
All100,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl KycOwnershipLevelType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::None => "None",
Self::MoreThan0ButNoteMoreThan25 => "MoreThan0ButNoteMoreThan25",
Self::MoreThan25ButNoteMoreThan50 => "MoreThan25ButNoteMoreThan50",
Self::MoreThan50ButNoteMoreThan75 => "MoreThan50ButNoteMoreThan75",
Self::MoreThan75ButNoteMoreThan100 => "MoreThan75ButNoteMoreThan100",
Self::All100 => "All100",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for KycOwnershipLevelType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum PaymentFrequencyType {
Monthly,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl PaymentFrequencyType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Monthly => "Monthly",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for PaymentFrequencyType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum StripeAccountType {
Account,
ConnectedAccount,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl StripeAccountType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Account => "Account",
Self::ConnectedAccount => "ConnectedAccount",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for StripeAccountType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum SwishPaymentStatusType {
Created,
Declined,
Error,
Paid,
Cancelled,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl SwishPaymentStatusType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Created => "Created",
Self::Declined => "Declined",
Self::Error => "Error",
Self::Paid => "Paid",
Self::Cancelled => "Cancelled",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for SwishPaymentStatusType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum UnhandledPaymentStateType {
Unhandled,
UsedOnInvoice,
UsedOnInvoiceInOtherCreditor,
Deleted,
RepaymentPending,
Repaid,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl UnhandledPaymentStateType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::Unhandled => "Unhandled",
Self::UsedOnInvoice => "UsedOnInvoice",
Self::UsedOnInvoiceInOtherCreditor => "UsedOnInvoiceInOtherCreditor",
Self::Deleted => "Deleted",
Self::RepaymentPending => "RepaymentPending",
Self::Repaid => "Repaid",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for UnhandledPaymentStateType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum UnhandledPaymentType {
UnmatchedPayment,
OverPayment,
ManualBalance,
BalanceFromInvoice,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl UnhandledPaymentType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::UnmatchedPayment => "UnmatchedPayment",
Self::OverPayment => "OverPayment",
Self::ManualBalance => "ManualBalance",
Self::BalanceFromInvoice => "BalanceFromInvoice",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for UnhandledPaymentType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}
#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash)]
pub enum WebhookTriggerType {
InvoiceActionCreated,
ReconciliationInvoiceActionCreated,
InvoiceActionAttested,
InvoicePaymentReceived,
SelfInvoiceOutgoingPaymentSucceeded,
SupplierInvoiceOutgoingPaymentSucceeded,
OutgoingPaymentSucceeded,
SelfInvoiceOutgoingPaymentFailed,
SupplierInvoiceOutgoingPaymentFailed,
OutgoingPaymentFailed,
UnmatchedPayment,
Overpayment,
CreditorShared,
CreditorUnshared,
DebtorCreated,
DebtorUpdated,
DebtorDeleted,
UnknownEInvoiceRegistration,
CreditorCreated,
CreditorUpdated,
CreditorDeleted,
InvoiceActionPaid,
InvoiceActionStateChanged,
DebtorInformationCorrectionRequested,
InvoiceActionViewed,
InvoiceActionOpened,
InvoiceActionReceived,
UndeliveredInvoice,
AutogiroApprovalFailed,
AutogiroWithdrawalFailedOnInvoice,
AutogiroWithdrawalFailedOnReconciliationInvoice,
InvoiceSaleWasAccepted,
InvoiceSaleWasDenied,
AutogiroApprovalChanged,
AutogiroWithdrawalRenewedOnInvoice,
AutogiroWithdrawalRenewedOnReconciliationInvoice,
InvoiceCommented,
AmountCreditedOnInvoice,
AmountWrittenOffOnInvoice,
ProductCreated,
ProductUpdated,
ContractInvoiceActionCreated,
ContractInvoiceActionUpdated,
CreditCardWithdrawalFailedOnInvoice,
CreditCardWithdrawalFailedOnReconciliationInvoice,
DebtCollectionActionStateChanged,
#[serde(rename = "CreditorKYCUpdated")]
CreditorKycUpdated,
InvoiceActionDeleted,
DebtorContractCancelled,
DebtorContractSigned,
DebtorContractCreated,
DebtorContractArchived,
DailyNotification,
PaymentReceivedToBillectaClientFunds,
InvoiceActionUpdated,
SelfInvoiceActionCreated,
SelfInvoiceActionAttested,
SelfInvoiceActionPaid,
SelfInvoiceActionUpdated,
SelfInvoiceActionDeleted,
ReminderInvoiceActionCreated,
EInvoiceInfoOnDebtorChanged,
#[serde(other)]
#[serde(rename = "unknown")]
Unknown,
}
impl WebhookTriggerType {
pub fn as_str(&self) -> &'static str {
match *self {
Self::InvoiceActionCreated => "InvoiceActionCreated",
Self::ReconciliationInvoiceActionCreated => "ReconciliationInvoiceActionCreated",
Self::InvoiceActionAttested => "InvoiceActionAttested",
Self::InvoicePaymentReceived => "InvoicePaymentReceived",
Self::SelfInvoiceOutgoingPaymentSucceeded => "SelfInvoiceOutgoingPaymentSucceeded",
Self::SupplierInvoiceOutgoingPaymentSucceeded => {
"SupplierInvoiceOutgoingPaymentSucceeded"
}
Self::OutgoingPaymentSucceeded => "OutgoingPaymentSucceeded",
Self::SelfInvoiceOutgoingPaymentFailed => "SelfInvoiceOutgoingPaymentFailed",
Self::SupplierInvoiceOutgoingPaymentFailed => "SupplierInvoiceOutgoingPaymentFailed",
Self::OutgoingPaymentFailed => "OutgoingPaymentFailed",
Self::UnmatchedPayment => "UnmatchedPayment",
Self::Overpayment => "Overpayment",
Self::CreditorShared => "CreditorShared",
Self::CreditorUnshared => "CreditorUnshared",
Self::DebtorCreated => "DebtorCreated",
Self::DebtorUpdated => "DebtorUpdated",
Self::DebtorDeleted => "DebtorDeleted",
Self::UnknownEInvoiceRegistration => "UnknownEInvoiceRegistration",
Self::CreditorCreated => "CreditorCreated",
Self::CreditorUpdated => "CreditorUpdated",
Self::CreditorDeleted => "CreditorDeleted",
Self::InvoiceActionPaid => "InvoiceActionPaid",
Self::InvoiceActionStateChanged => "InvoiceActionStateChanged",
Self::DebtorInformationCorrectionRequested => "DebtorInformationCorrectionRequested",
Self::InvoiceActionViewed => "InvoiceActionViewed",
Self::InvoiceActionOpened => "InvoiceActionOpened",
Self::InvoiceActionReceived => "InvoiceActionReceived",
Self::UndeliveredInvoice => "UndeliveredInvoice",
Self::AutogiroApprovalFailed => "AutogiroApprovalFailed",
Self::AutogiroWithdrawalFailedOnInvoice => "AutogiroWithdrawalFailedOnInvoice",
Self::AutogiroWithdrawalFailedOnReconciliationInvoice => {
"AutogiroWithdrawalFailedOnReconciliationInvoice"
}
Self::InvoiceSaleWasAccepted => "InvoiceSaleWasAccepted",
Self::InvoiceSaleWasDenied => "InvoiceSaleWasDenied",
Self::AutogiroApprovalChanged => "AutogiroApprovalChanged",
Self::AutogiroWithdrawalRenewedOnInvoice => "AutogiroWithdrawalRenewedOnInvoice",
Self::AutogiroWithdrawalRenewedOnReconciliationInvoice => {
"AutogiroWithdrawalRenewedOnReconciliationInvoice"
}
Self::InvoiceCommented => "InvoiceCommented",
Self::AmountCreditedOnInvoice => "AmountCreditedOnInvoice",
Self::AmountWrittenOffOnInvoice => "AmountWrittenOffOnInvoice",
Self::ProductCreated => "ProductCreated",
Self::ProductUpdated => "ProductUpdated",
Self::ContractInvoiceActionCreated => "ContractInvoiceActionCreated",
Self::ContractInvoiceActionUpdated => "ContractInvoiceActionUpdated",
Self::CreditCardWithdrawalFailedOnInvoice => "CreditCardWithdrawalFailedOnInvoice",
Self::CreditCardWithdrawalFailedOnReconciliationInvoice => {
"CreditCardWithdrawalFailedOnReconciliationInvoice"
}
Self::DebtCollectionActionStateChanged => "DebtCollectionActionStateChanged",
Self::CreditorKycUpdated => "CreditorKYCUpdated",
Self::InvoiceActionDeleted => "InvoiceActionDeleted",
Self::DebtorContractCancelled => "DebtorContractCancelled",
Self::DebtorContractSigned => "DebtorContractSigned",
Self::DebtorContractCreated => "DebtorContractCreated",
Self::DebtorContractArchived => "DebtorContractArchived",
Self::DailyNotification => "DailyNotification",
Self::PaymentReceivedToBillectaClientFunds => "PaymentReceivedToBillectaClientFunds",
Self::InvoiceActionUpdated => "InvoiceActionUpdated",
Self::SelfInvoiceActionCreated => "SelfInvoiceActionCreated",
Self::SelfInvoiceActionAttested => "SelfInvoiceActionAttested",
Self::SelfInvoiceActionPaid => "SelfInvoiceActionPaid",
Self::SelfInvoiceActionUpdated => "SelfInvoiceActionUpdated",
Self::SelfInvoiceActionDeleted => "SelfInvoiceActionDeleted",
Self::ReminderInvoiceActionCreated => "ReminderInvoiceActionCreated",
Self::EInvoiceInfoOnDebtorChanged => "EInvoiceInfoOnDebtorChanged",
Self::Unknown => "unknown",
}
}
}
impl crate::AsPathParam for WebhookTriggerType {
fn push_to(&self, buf: &mut String) {
buf.push_str(self.as_str());
}
}