Crate billecta

Source
Expand description

§Billecta-rs

Wrapper around the Billecta API.

§Creating a new client

Create a client using a URL and a token. See section Authentication in Getting Started

§Using environment variables

A client can be created using the environment variables:

  • BILLECTA_URL
  • BILLECTA_TOKEN

let client = billecta::Client::from_env();

§Creating a SecureToken

§1. Retreive SecureToken

To begin, encode your username and password as follows:

$ echo -n "<username>:<password>" | base64

$ base64 <<< "<username>:<password>" cannot be used since it adds a newline.

§2. Retreive your SecureToken

Send the encoded b64-string to Billecta with the b64-string you just created in the Authorization Header as such: Authorization: Basic <b64string>

curl -X "POST" https://api.billecta.com/v1/authentication/apiauthenticate -H "Content-Length:0" -H "Authorization: Basic <b64 string>" -H "Accept: application/json"

§3. Encode the SecureToken

Snatch the SecureToken from the returned data and encode it as b64 once more:

$ base64 <<< <SecureTokenString>

§4. Do API things

To try it out try to fetch all Creditor with the b64 encode SecureToken in the Authorization header

curl -X "POST" https://api.billecta.com/v1/creditors/creditors -H "Authorization: SecureToken <SecureTokenB64>"

Re-exports§

pub use crate::Amount;
pub use crate::DateTime;

Modules§

accounting
Accounting
accounting_dimensions
Accounting dimensions
bank
Bank
common
Common
contract_invoice
Contract invoice
cost_centers
Cost Centers
creditors
Creditors
debt_collection
Debt collection
debtors
Debtors
delivery
Delivery
files
Files
invoice
Invoice
notifications
Notifications
payments
Payments
products
Products
projects
Projects
reconciliation_invoice
Reconciliation invoice
search
Search
self_invoice
Self invoice
unstable
users
Users

Structs§

AccountingDimension
AccountingExport
AccountingExportCreation
AccountingPaymentMean
AccountingRecord
AccountingSettings
AccountingSettingsAccount
AccountingVoucherExportCreation
AccountingVoucherRecord
AccountingVoucherTransaction
ActionPublicIds
ActionReference
AddMultipleDebtorsToCategoryRequest
Amount
AttestMultipleInvoicesRequest
AutogiroPaymentStatus
AutogiroWithdrawal
BankAccount
BankAccountRequest
BankIdAthentication
BankIdAuthenticationRequest
BankIdAuthenticationStatus
BankIdPhoneAuthenticationRequest
BankIdSignRequest
BankIdSignStatus
BillectaDocsAdditionalInfo
BillectaDocsHidden
BillectaDocsRequired
CardRefundPayment
CheckoutSettings
Client
ClientConfig
CommentAction
CommonActionEvent
Configuration
ConfigurationDebtCollection
ConfigurationDeviationAnalysis
ConfigurationReminder
ContractInvoiceAction
ContractInvoiceActionAttachment
ContractInvoiceActionEvent
ContractInvoiceActionRecord
ContractInvoiceActionState
ContractInvoiceActionSub
CostCenter
Country
Created
CreatedMultiple
CreatedUrl
CreditAction
CreditCardAdd
CreditCardAddIntent
CreditCardPayment
CreditCardPaymentIntent
CreditCardWithdrawal
CreditingInvoice
Creditor
CreditorAccessRight
CreditorAddon
CreditorAddonCategory
CreditorBankInfo
CreditorClaims
CreditorClaimsContact
CreditorContact
CreditorForeignAccount
CreditorInvoiceAddress
CreditorKyc
CreditorKycForm
CreditorKycFormBeneficialOwner
CreditorKycFormBusinessCategory
CreditorKycFormCompany
CreditorKycFormContact
CreditorKycFormOwner
CreditorKycFormUsPerson
CreditorOutgoingBankgiro
CreditorPaymentMethod
CreditorSetting
CreditorShare
CreditorSignatoryContact
CreditorSub
CreditorToken
Currency
DataStream
Date
DateTime
A Datetime using Stockholm as TZ. Either CET or CEST.
DebentureActionEntry
DebtCollectionAction
DebtCollectionActionEvent
DebtCollectionActionLog
DebtCollectionActionState
DebtCollectionActionSub
DebtCollectionDetails
DebtCollectionEntry
DebtCollectionFromInvoiceEntry
DebtCollectionFromReconciliationInvoiceEntry
DebtCollectionInvoice
DebtCollectionMessage
Debtor
DebtorAutogiro
DebtorAutogiroApproval
DebtorBalance
DebtorCategory
DebtorCreditCard
DebtorDefaultActionConfig
DebtorEvent
DebtorInformationCorrectionRequest
DebtorKivraStatus
DebtorSelfInvoiceInfo
DebtorUnhandledExternalPayment
DebtorsToMatchWithKivra
DefaultActionConfig
DeliveryAddressOverride
DimensionCode
EInvoiceRegistration
EmptyResponse
EnumCompabilityDefault
ExportFilesRequest
ExternalBranding
File
GenericAction
HalfYearlyAutogiroContractInvoice
ImportInvoiceFile
ImportPaymentFile
IncomingPayment
IncomingPaymentRequest
InstallmentPlanActionEvent
InstallmentPlanActionFromDebtCollection
InstallmentPlanActionFromDebtCollectionInvoice
InstallmentPlanActionFromDebtCollectionState
InstallmentPlanActionSub
InvoiceAccountReceivable
InvoiceAction
InvoiceActionAttachment
InvoiceActionCommented
InvoiceActionEntry
InvoiceActionEvent
InvoiceActionInvoice
InvoiceActionRecord
InvoiceActionRotRutProcessed
InvoiceActionState
InvoiceActionSub
InvoiceBookkeepingOverride
InvoiceDeliveryStatus
InvoiceFile
InvoiceImportFileJob
InvoicePlan
LockedPeriod
MailDelivery
MonthlyAutogiroContractInvoice
MonthlyRecurrence
NotificationEvent
NotificationReceiver
NotificationReceiverSetting
OpenActionRequest
OrderAction
OrderActionAddress
OrderActionDebtor
OrderActionEntry
OrderActionRecord
OrderActionState
OrderCheckout
OrderCheckoutIntent
OutgoingPayment
OutgoingPaymentStatus
OverpaymentDetails
Password
PaymentAdviceActionEntry
PaymentMatch
PaymentMatchResult
PaymentOverride
PeppolParticipant
Product
ProductPrice
ProductsTemplate
Project
QuarterlyRecurrence
ReconciiationInvoiceActionEvent
ReconciliationDebtor
ReconciliationInvoiceAction
ReconciliationInvoiceActionEntry
ReconciliationInvoiceActionReminder
ReconciliationInvoiceActionState
ReconciliationInvoiceActionSub
RecurrenceDetails
RegisterPayment
RegisterReconciliationPayment
RegisterSelfInvoicePayment
RegisterSupplierInvoicePayment
ReminderInvoiceAction
ReminderInvoiceActionInvoice
ReminderInvoiceActionSub
ReminderInvoiceDetails
RepayUnhandledPayment
Request
ReverseVATDetails
RotRutCustomer
RotRutDetails
Search
SearchResult
SecureToken
SelfInvoiceAction
SelfInvoiceActionAttachment
SelfInvoiceActionEntry
SelfInvoiceActionEvent
SelfInvoiceActionInvoice
SelfInvoiceActionRecord
SelfInvoiceActionState
SelfInvoiceActionSub
SelfInvoicePayment
SendReconciliationInvoiceReminder
SendReminderInvoice
SenderPaymentInfo
SmsDelivery
Stream
SupplierInvoiceActionSub
SwishPaymentIntent
SwishPaymentStatus
SwishRefundPayment
SwishSettings
TextTemplate
TwoFactorBankId
UnhandledPayment
UpdateAddressAction
User
UserClaims
UserRight
UserSubscribedInvoice
UtcDateTimeConverter
Uuid
A Universally Unique Identifier (UUID).
VerificationInvoiceActionEntry
WebhookCreditorShare
WebhookHeader
WebhookSetting
WebhookTrigger
YearlyAutogiroContractInvoice
YearlyRecurrence

Enums§

AccountingExportDateSelectionType
AccountingExportFormatType
AccountingRecordType
AccountingSettingsAccountType
ActionSearchStatusType
ActionSourceType
ActionType
ActivationPolicyType
AutogiroApprovalCommentCode
AutogiroCompatibleType
AutogiroPaymentStatusType
AutogiroStageType
AutogiroWithdrawalCommentCode
BankAccountBankType
BankAccountStatusType
BankIdHintCodeType
BankIdStatusType
BookKeepingMethod
CommentTargetType
ContractInvoiceActionStageType
ContractInvoicePeriodRuleType
CreditCardAddStatusType
CreditCardPaymentStatusType
CreditorAddonCategoryType
CreditorAddonDescriptionType
CreditorAddonType
CreditorKycStateType
CreditorModuleAccessType
CreditorPaymentMethodPriorityType
CreditorPaymentMethodType
CreditorShareTargetType
CurrencyCode
DebtCollectionActionLevelType
DebtCollectionActionStageType
DebtorBalanceType
DebtorContractPeriodType
DebtorContractStateType
DebtorPaymentMethod
DebtorType
DeliveryMethodType
DeliveryStatusType
DiscountType
EInvoiceBankType
Error
EventType
FiscalYearType
GenericActionStageType
ImportFileStateType
IncomingPaymentNotificationMethodType
InstallmentPlanActionStageType
InstallmentPlanSourceType
InterestType
IntermediatorType
InvoiceActionStageType
KivraStatusType
KycOwnershipLevelType
LanguageType
OrderCheckoutStatusType
OrderPaymentMethodType
OrderRecordType
OrderStageType
OriginType
OutgoingPaymentStatusType
OutgoingPaymentType
P27CategoryPurposeType
P27ChargeBearerType
P27CodeType
P27MethodType
PaymentFrequencyType
PostageType
ProductType
ProjectStatusType
ReceivingAccountType
ReceivingPaymentMethodType
ReconciliationInvoiceActionStageType
RecordType
RecurrenceIntervalType
ReferenceType
RegisterPaymentOverShootingAmountHandlingType
RotRutSearchFilterType
RotRutType
SelfInvoiceActionStageType
SieKPTYPType
StripeAccountType
SupplierInvoiceActionStageType
SupplierPaymentMethodType
SwishPaymentStatusType
SwishStatusType
UnhandledPaymentStateType
UnhandledPaymentType
WebhookTriggerType

Traits§

AsPathParam
ToStockholmTz

Type Aliases§

AccountingDimensions
AccountingExports
AccountingPaymentMeans
AccountingRecords
AccountingVoucherRecords
ActionReferences
AutogiroPaymentStatuses
CommonActionEvents
Configurations
ContractInvoiceActionSubs
CostCenters
Countries
CreditCardPayments
CreditorAddons
CreditorSettings
CreditorShares
CreditorSubs
Creditors
Currencies
DebtCollectionActionLogs
DebtCollectionActionSubs
DebtCollectionActions
DebtCollectionMessages
DebtorAutogiroApprovals
DebtorBalances
DebtorCategories
DebtorEvents
Debtors
Files
ImportInvoiceFileJobs
IncomingPayments
InstallmentPlanActionSubs
InstallmentPlanActionsFromDebtCollection
InvoiceAccountReceivables
InvoiceActionRotRutProcesseds
InvoiceActionSubs
InvoiceActions
NotificationEvents
NotificationReceivers
OutgoingPaymentStatuses
PeppolParticipants
Projects
ReconciliationInvoiceActionSubs
ReconciliationInvoiceActions
ReminderInvoiceActionSubs
ReminderInvoiceActions
Result
TextRows
UnhandledPayments
UserSubscribedInvoices
Users