use crate::{
AccountingExport, AccountingExportCreation, AccountingExportFormatType, AccountingExports,
AccountingPaymentMean, AccountingPaymentMeans, AccountingSettings,
AccountingVoucherExportCreation, AccountingVoucherRecords, Date, EmptyResponse, LockedPeriod,
Request, RequestBuilder, Uuid,
};
pub fn get_accounting_bookkeeping_export_files_sie4_etc(id: Uuid) -> Request<AccountingExports> {
RequestBuilder::new(http::Method::GET, "/v1/accounting/accountingexports/")
.path_param(id)
.build()
}
pub fn create_accounting_bookkeeping_file_for_a_specific_month_with_parameters(
id: Uuid,
period: Date,
format: &AccountingExportFormatType,
) -> Request<AccountingExport> {
RequestBuilder::new(http::Method::PUT, "/v1/accounting/accountingexports/")
.path_param(id)
.query_param("period", period)
.query_param("format", *format)
.build()
}
pub fn create_accounting_bookkeeping_file_for_a_specific_month_with_content(
body: &AccountingExportCreation,
) -> Request<AccountingExport> {
RequestBuilder::new(http::Method::PUT, "/v1/accounting/accountingexports")
.body(body)
.build()
}
pub fn get_accounting_bookkeeping_settings(id: Uuid) -> Request<AccountingSettings> {
RequestBuilder::new(http::Method::GET, "/v1/accounting/accountingsettings/")
.path_param(id)
.build()
}
pub fn update_accounting_bookkeeping_settings(body: &AccountingSettings) -> Request<EmptyResponse> {
RequestBuilder::new(http::Method::PUT, "/v1/accounting/accountingsettings")
.body(body)
.build()
}
pub fn get_accounting_bookkeeping_vouchers_for_a_specific_period_beta_and_are_possibly_up_for_changes(
body: &AccountingVoucherExportCreation,
) -> Request<AccountingVoucherRecords> {
RequestBuilder::new(http::Method::PUT, "/v1/accounting/accountingvouchers")
.body(body)
.build()
}
pub fn get_locked_bookeeping_period(id: Uuid) -> Request<LockedPeriod> {
RequestBuilder::new(http::Method::GET, "/v1/accounting/lockedperiod/")
.path_param(id)
.build()
}
pub fn update_the_locked_bookeeping_period(id: Uuid, to: Date) -> Request<EmptyResponse> {
RequestBuilder::new(http::Method::POST, "/v1/accounting/lockedperiod/")
.path_param(id)
.query_param("to", to)
.build()
}
pub fn delete_locked_bookeeping_period(id: Uuid) -> Request<EmptyResponse> {
RequestBuilder::new(http::Method::DELETE, "/v1/accounting/lockedperiod/")
.path_param(id)
.build()
}
pub fn get_payment_means(id: Uuid) -> Request<AccountingPaymentMeans> {
RequestBuilder::new(http::Method::GET, "/v1/accounting/paymentmeans/")
.path_param(id)
.build()
}
pub fn get_a_single_payment_mean(
id: Uuid,
paymentmeancode: &str,
) -> Request<AccountingPaymentMean> {
RequestBuilder::new(http::Method::GET, "/v1/accounting/paymentmeans/")
.path_param(id)
.query_param("paymentmeancode", paymentmeancode)
.build()
}
pub fn update_a_payment_mean(body: &AccountingPaymentMean) -> Request<EmptyResponse> {
RequestBuilder::new(http::Method::PUT, "/v1/accounting/paymentmeans")
.body(body)
.build()
}
pub fn create_a_payment_mean(body: &AccountingPaymentMean) -> Request<EmptyResponse> {
RequestBuilder::new(http::Method::POST, "/v1/accounting/paymentmeans")
.body(body)
.build()
}
pub fn delete_a_payment_mean(id: Uuid, paymentmeancode: &str) -> Request<EmptyResponse> {
RequestBuilder::new(http::Method::DELETE, "/v1/accounting/paymentmeans/")
.path_param(id)
.query_param("paymentmeancode", paymentmeancode)
.build()
}