Documentation ¶
Index ¶
- Constants
- Variables
- func DecimalStringToInt(s string) int
- func IntToDecimalString(i int) string
- type AccountInformation
- type AccountsReceivableType
- func (a AccountsReceivableType) Key() string
- func (a AccountsReceivableType) MarshalJSON() ([]byte, error)
- func (a AccountsReceivableType) String() string
- func (a AccountsReceivableType) Translation() string
- func (a *AccountsReceivableType) UnmarshalJSON(data []byte) (err error)
- func (a AccountsReceivableType) Valid() bool
- type AddFeeReduction
- type AddInvoiceAdjustmentRequest
- type AddManualInvoice
- type AdjustmentStatus
- type AdjustmentType
- func (i AdjustmentType) AmountRequired() bool
- func (i AdjustmentType) Key() string
- func (i AdjustmentType) MarshalJSON() ([]byte, error)
- func (i AdjustmentType) String() string
- func (i AdjustmentType) Translation() string
- func (i *AdjustmentType) UnmarshalJSON(data []byte) (err error)
- func (i AdjustmentType) Valid() bool
- type Assignee
- type BaseBillingEvent
- type BillingEvent
- type BillingEventType
- type BillingHistory
- type CancelFeeReduction
- type ClientCreatedEvent
- type Date
- type DebtPositionChangedEvent
- type DebtType
- type DownloadRequest
- type Enum
- type Event
- type FeeReduction
- type FeeReductionApplied
- type FeeReductionAwarded
- type FeeReductionCancelled
- type FeeReductionType
- type FeeReductions
- type FinanceAdminUploadEvent
- type Invoice
- type InvoiceAdjustment
- type InvoiceAdjustmentApplied
- type InvoiceAdjustmentPending
- type InvoiceAdjustments
- type InvoiceEvent
- type InvoiceGenerated
- type InvoiceReference
- type InvoiceType
- func (i InvoiceType) Key() string
- func (i InvoiceType) MarshalJSON() ([]byte, error)
- func (i InvoiceType) RequiresDateValidation() bool
- func (i InvoiceType) RequiresSameFinancialYearValidation() bool
- func (i InvoiceType) String() string
- func (i InvoiceType) Translation() string
- func (i *InvoiceType) UnmarshalJSON(data []byte) (err error)
- func (i InvoiceType) Valid() bool
- type Invoices
- type JournalType
- type Ledger
- type Nillable
- type PaymentBreakdown
- type PaymentDetails
- type PaymentProcessed
- type Person
- type ReappliedCredit
- type ReportRequest
- type ReportsType
- func (r ReportsType) Key() string
- func (r ReportsType) MarshalJSON() ([]byte, error)
- func (r ReportsType) RequiresDateValidation() bool
- func (r ReportsType) String() string
- func (r ReportsType) Translation() string
- func (r *ReportsType) UnmarshalJSON(data []byte) (err error)
- func (r ReportsType) Valid() bool
- type ScheduleType
- type SupervisionLevel
- type Task
- type TransactionEvent
- type TransactionType
- type UnknownEvent
- type UpdateInvoiceAdjustment
Constants ¶
View Source
const ( EventSourceSirius = "opg.supervision.sirius" EventSourceFinanceAdmin = "opg.supervision.finance.admin" DetailTypeDebtPositionChanged = "debt-position-changed" DetailTypeClientCreated = "client-created" DetailTypeFinanceAdminUpload = "finance-admin-upload" )
View Source
const StatusActive string = "Active"
View Source
const StatusCancelled string = "Cancelled"
View Source
const StatusExpired string = "Expired"
View Source
const StatusPending string = "Pending"
Variables ¶
View Source
var AccountsReceivableTypeMap = map[string]AccountsReceivableType{ "AgedDebt": AccountsReceivableTypeAgedDebt, "AgedDebtByCustomer": AccountsReceivableTypeAgedDebtByCustomer, "UnappliedReceipts": AccountsReceivableTypeUnappliedReceipts, "ARPaidInvoice": AccountsReceivableTypeARPaidInvoice, "TotalReceipts": AccountsReceivableTypeTotalReceipts, "BadDebtWriteOff": AccountsReceivableTypeBadDebtWriteOff, "FeeAccrual": AccountsReceivableTypeFeeAccrual, "InvoiceAdjustments": AccountsReceivableTypeInvoiceAdjustments, }
View Source
var InvoiceTypes = []InvoiceType{ InvoiceTypeAD, InvoiceTypeS2, InvoiceTypeS3, InvoiceTypeB2, InvoiceTypeB3, InvoiceTypeSF, InvoiceTypeSE, InvoiceTypeSO, InvoiceTypeGA, InvoiceTypeGS, InvoiceTypeGT, }
View Source
var TransactionTypeMap = map[string]TransactionType{ "CREDIT WRITE OFF": TransactionTypeWriteOff, "CREDIT MEMO": TransactionTypeCreditMemo, "DEBIT MEMO": TransactionTypeDebitMemo, "WRITE OFF REVERSAL": TransactionTypeWriteOffReversal, "EXEMPTION": TransactionTypeExemption, "HARDSHIP": TransactionTypeHardship, "REMISSION": TransactionTypeRemission, "CREDIT REAPPLY": TransactionTypeReapply, "MOTO CARD PAYMENT": TransactionTypeMotoCardPayment, "ONLINE CARD PAYMENT": TransactionTypeOnlineCardPayment, "SUPERVISION BACS PAYMENT": TransactionTypeSupervisionBACSPayment, "OPG BACS PAYMENT": TransactionTypeOPGBACSPayment, "DIRECT DEBIT PAYMENT": TransactionTypeDirectDebitPayment, }
Functions ¶
func DecimalStringToInt ¶
func IntToDecimalString ¶
Types ¶
type AccountInformation ¶
type AccountsReceivableType ¶
type AccountsReceivableType int
const ( AccountsReceivableTypeUnknown AccountsReceivableType = iota AccountsReceivableTypeAgedDebt AccountsReceivableTypeAgedDebtByCustomer AccountsReceivableTypeUnappliedReceipts AccountsReceivableTypeARPaidInvoice AccountsReceivableTypeTotalReceipts AccountsReceivableTypeBadDebtWriteOff AccountsReceivableTypeFeeAccrual AccountsReceivableTypeInvoiceAdjustments )
func ParseAccountsReceivableType ¶
func ParseAccountsReceivableType(s string) AccountsReceivableType
func (AccountsReceivableType) Key ¶
func (a AccountsReceivableType) Key() string
func (AccountsReceivableType) MarshalJSON ¶
func (a AccountsReceivableType) MarshalJSON() ([]byte, error)
func (AccountsReceivableType) String ¶
func (a AccountsReceivableType) String() string
func (AccountsReceivableType) Translation ¶
func (a AccountsReceivableType) Translation() string
func (*AccountsReceivableType) UnmarshalJSON ¶
func (a *AccountsReceivableType) UnmarshalJSON(data []byte) (err error)
func (AccountsReceivableType) Valid ¶
func (a AccountsReceivableType) Valid() bool
type AddFeeReduction ¶
type AddFeeReduction struct { FeeType FeeReductionType `json:"feeType" validate:"required,valid-enum"` StartYear string `json:"startYear" validate:"required"` LengthOfAward int `json:"lengthOfAward" validate:"required,gte=1,lte=3"` DateReceived *Date `json:"dateReceived,omitempty" validate:"required,date-in-the-past"` Notes string `json:"notes" validate:"required,thousand-character-limit"` }
type AddInvoiceAdjustmentRequest ¶
type AddInvoiceAdjustmentRequest struct { AdjustmentType AdjustmentType `json:"adjustmentType" validate:"valid-enum"` AdjustmentNotes string `json:"notes" validate:"required,thousand-character-limit"` Amount int `json:"amount,omitempty" validate:"required_if=AdjustmentType 2,required_if=AdjustmentType 3,omitempty,gt=0"` }
type AddManualInvoice ¶
type AddManualInvoice struct { InvoiceType InvoiceType `json:"invoiceType" validate:"required,valid-enum"` Amount Nillable[int] `json:"amount" validate:"nillable-int-gt=50,nillable-int-lte=32000"` RaisedDate Nillable[Date] `json:"raisedDate" validate:"nillable-date-required"` StartDate Nillable[Date] `json:"startDate" validate:"nillable-date-required"` EndDate Nillable[Date] `json:"endDate" validate:"nillable-date-required"` SupervisionLevel Nillable[string] `json:"supervisionLevel" validate:"nillable-string-oneof=GENERAL MINIMAL"` }
type AdjustmentStatus ¶
type AdjustmentStatus int
const ( AdjustmentStatusUnknown AdjustmentStatus = iota AdjustmentStatusPending AdjustmentStatusApproved AdjustmentStatusRejected )
func ParseAdjustmentStatus ¶
func ParseAdjustmentStatus(s string) AdjustmentStatus
func (AdjustmentStatus) Key ¶
func (i AdjustmentStatus) Key() string
func (AdjustmentStatus) MarshalJSON ¶
func (i AdjustmentStatus) MarshalJSON() ([]byte, error)
func (AdjustmentStatus) String ¶
func (i AdjustmentStatus) String() string
func (*AdjustmentStatus) UnmarshalJSON ¶
func (i *AdjustmentStatus) UnmarshalJSON(data []byte) (err error)
func (AdjustmentStatus) Valid ¶
func (i AdjustmentStatus) Valid() bool
type AdjustmentType ¶
type AdjustmentType int
const ( AdjustmentTypeUnknown AdjustmentType = iota AdjustmentTypeWriteOff AdjustmentTypeCreditMemo AdjustmentTypeDebitMemo AdjustmentTypeWriteOffReversal )
func ParseAdjustmentType ¶
func ParseAdjustmentType(s string) AdjustmentType
func (AdjustmentType) AmountRequired ¶
func (i AdjustmentType) AmountRequired() bool
func (AdjustmentType) Key ¶
func (i AdjustmentType) Key() string
func (AdjustmentType) MarshalJSON ¶
func (i AdjustmentType) MarshalJSON() ([]byte, error)
func (AdjustmentType) String ¶
func (i AdjustmentType) String() string
func (AdjustmentType) Translation ¶
func (i AdjustmentType) Translation() string
func (*AdjustmentType) UnmarshalJSON ¶
func (i *AdjustmentType) UnmarshalJSON(data []byte) (err error)
func (AdjustmentType) Valid ¶
func (i AdjustmentType) Valid() bool
type Assignee ¶
type BaseBillingEvent ¶
type BaseBillingEvent struct {
Type BillingEventType `json:"type"`
}
func (BaseBillingEvent) GetType ¶
func (d BaseBillingEvent) GetType() BillingEventType
type BillingEvent ¶
type BillingEvent interface {
GetType() BillingEventType
}
type BillingEventType ¶
type BillingEventType int
const ( EventTypeUnknown BillingEventType = iota EventTypeInvoiceGenerated EventTypeFeeReductionAwarded EventTypeFeeReductionCancelled EventTypeFeeReductionApplied EventTypeInvoiceAdjustmentApplied EventTypePaymentProcessed EventTypeInvoiceAdjustmentPending EventTypeReappliedCredit )
func (BillingEventType) MarshalJSON ¶
func (b BillingEventType) MarshalJSON() ([]byte, error)
func (BillingEventType) String ¶
func (b BillingEventType) String() string
func (*BillingEventType) UnmarshalJSON ¶
func (b *BillingEventType) UnmarshalJSON(data []byte) (err error)
type BillingHistory ¶
type BillingHistory struct { User int `json:"user"` Date Date `json:"date"` Event BillingEvent `json:"event"` OutstandingBalance int `json:"outstanding_balance"` CreditBalance int `json:"credit_balance"` }
func (*BillingHistory) UnmarshalJSON ¶
func (b *BillingHistory) UnmarshalJSON(data []byte) (err error)
type CancelFeeReduction ¶
type CancelFeeReduction struct {
CancellationReason string `json:"cancellationReason" validate:"required,thousand-character-limit"`
}
type ClientCreatedEvent ¶
type Date ¶
func (Date) IsSameFinancialYear ¶
func (Date) MarshalJSON ¶
func (*Date) UnmarshalJSON ¶
type DebtPositionChangedEvent ¶
type DebtPositionChangedEvent struct {
ClientID int `json:"clientId"`
}
type DebtType ¶
type DebtType int
func ParseReportDebtType ¶
func (DebtType) MarshalJSON ¶
func (DebtType) Translation ¶
func (*DebtType) UnmarshalJSON ¶
type DownloadRequest ¶ added in v1.120.0
func (*DownloadRequest) Decode ¶ added in v1.120.0
func (d *DownloadRequest) Decode(data string) error
func (*DownloadRequest) Encode ¶ added in v1.120.0
func (d *DownloadRequest) Encode() (string, error)
type Event ¶
type Event struct { Source string `json:"source"` EventBusName string `json:"event-bus-name"` DetailType string `json:"detail-type"` Detail interface{} `json:"detail"` }
func (*Event) UnmarshalJSON ¶
type FeeReduction ¶
type FeeReductionApplied ¶
type FeeReductionApplied struct {
TransactionEvent
}
type FeeReductionAwarded ¶
type FeeReductionAwarded struct { ReductionType FeeReductionType `json:"reduction_type"` StartDate Date `json:"start_date"` EndDate Date `json:"end_date"` DateReceived Date `json:"date_received"` Notes string `json:"notes"` BaseBillingEvent }
type FeeReductionCancelled ¶
type FeeReductionCancelled struct { ReductionType FeeReductionType `json:"reduction_type"` CancellationReason string `json:"cancellation_reason"` BaseBillingEvent }
type FeeReductionType ¶
type FeeReductionType int
const ( FeeReductionTypeUnknown FeeReductionType = iota FeeReductionTypeExemption FeeReductionTypeHardship FeeReductionTypeRemission )
func ParseFeeReductionType ¶
func ParseFeeReductionType(s string) FeeReductionType
func (FeeReductionType) Key ¶
func (f FeeReductionType) Key() string
func (FeeReductionType) MarshalJSON ¶
func (f FeeReductionType) MarshalJSON() ([]byte, error)
func (FeeReductionType) String ¶
func (f FeeReductionType) String() string
func (*FeeReductionType) UnmarshalJSON ¶
func (f *FeeReductionType) UnmarshalJSON(data []byte) (err error)
func (FeeReductionType) Valid ¶
func (f FeeReductionType) Valid() bool
type FeeReductions ¶
type FeeReductions []FeeReduction
type FinanceAdminUploadEvent ¶
type Invoice ¶
type Invoice struct { Id int `json:"id"` Ref string `json:"ref"` Status string `json:"status"` Amount int `json:"amount"` RaisedDate Date `json:"raisedDate"` Received int `json:"received"` OutstandingBalance int `json:"outstandingBalance"` Ledgers []Ledger `json:"ledgers"` SupervisionLevels []SupervisionLevel `json:"supervisionLevels"` }
type InvoiceAdjustment ¶
type InvoiceAdjustmentApplied ¶
type InvoiceAdjustmentApplied struct {
TransactionEvent
}
type InvoiceAdjustmentPending ¶
type InvoiceAdjustmentPending struct { AdjustmentType AdjustmentType `json:"adjustment_type"` ClientId int `json:"client_id"` Notes string `json:"notes"` PaymentBreakdown `json:"payment_breakdown"` BaseBillingEvent }
type InvoiceAdjustments ¶
type InvoiceAdjustments []InvoiceAdjustment
type InvoiceEvent ¶
type InvoiceGenerated ¶
type InvoiceGenerated struct { ClientId int `json:"client_id"` InvoiceReference InvoiceEvent `json:"invoice_reference"` InvoiceType InvoiceType `json:"invoice_type"` Amount int `json:"amount"` BaseBillingEvent }
type InvoiceReference ¶
type InvoiceReference struct {
InvoiceRef string
}
type InvoiceType ¶
type InvoiceType int
const ( InvoiceTypeUnknown InvoiceType = iota InvoiceTypeAD InvoiceTypeS2 InvoiceTypeS3 InvoiceTypeB2 InvoiceTypeB3 InvoiceTypeSF InvoiceTypeSE InvoiceTypeSO InvoiceTypeGA InvoiceTypeGS InvoiceTypeGT )
func ParseInvoiceType ¶
func ParseInvoiceType(s string) InvoiceType
func (InvoiceType) Key ¶
func (i InvoiceType) Key() string
func (InvoiceType) MarshalJSON ¶
func (i InvoiceType) MarshalJSON() ([]byte, error)
func (InvoiceType) RequiresDateValidation ¶
func (i InvoiceType) RequiresDateValidation() bool
func (InvoiceType) RequiresSameFinancialYearValidation ¶ added in v1.112.0
func (i InvoiceType) RequiresSameFinancialYearValidation() bool
func (InvoiceType) String ¶
func (i InvoiceType) String() string
func (InvoiceType) Translation ¶
func (i InvoiceType) Translation() string
func (*InvoiceType) UnmarshalJSON ¶
func (i *InvoiceType) UnmarshalJSON(data []byte) (err error)
func (InvoiceType) Valid ¶
func (i InvoiceType) Valid() bool
type JournalType ¶
type JournalType int
const ( JournalTypeUnknown JournalType = iota JournalTypeReceiptTransactions JournalTypeNonReceiptTransactions )
func ParseJournalType ¶
func ParseJournalType(s string) JournalType
func (JournalType) Key ¶
func (j JournalType) Key() string
func (JournalType) MarshalJSON ¶
func (j JournalType) MarshalJSON() ([]byte, error)
func (JournalType) String ¶
func (j JournalType) String() string
func (JournalType) Translation ¶
func (j JournalType) Translation() string
func (*JournalType) UnmarshalJSON ¶
func (j *JournalType) UnmarshalJSON(data []byte) (err error)
func (JournalType) Valid ¶
func (j JournalType) Valid() bool
type Nillable ¶
func TransformNillableDate ¶
func TransformNillableInt ¶
func TransformNillableString ¶
type PaymentBreakdown ¶
type PaymentBreakdown struct { InvoiceReference InvoiceEvent `json:"invoice_reference"` Amount int `json:"amount"` Status string `json:"status"` }
type PaymentDetails ¶ added in v1.135.0
type PaymentProcessed ¶
type PaymentProcessed struct {
TransactionEvent
}
type ReappliedCredit ¶
type ReappliedCredit struct {
TransactionEvent
}
type ReportRequest ¶ added in v1.135.0
type ReportRequest struct { ReportType ReportsType `json:"reportType"` JournalType *JournalType `json:"journalType,omitempty"` ScheduleType *ScheduleType `json:"scheduleType,omitempty"` AccountsReceivableType *AccountsReceivableType `json:"AccountsReceivableType,omitempty"` DebtType *DebtType `json:"debtType,omitempty"` TransactionDate *Date `json:"transactionDate,omitempty"` ToDate *Date `json:"toDate,omitempty"` FromDate *Date `json:"fromDate,omitempty"` Email string `json:"email"` }
type ReportsType ¶
type ReportsType int
const ( ReportsTypeUnknown ReportsType = iota ReportsTypeJournal ReportsTypeSchedule ReportsTypeAccountsReceivable ReportsTypeDebt )
func ParseReportsType ¶
func ParseReportsType(s string) ReportsType
func (ReportsType) Key ¶
func (r ReportsType) Key() string
func (ReportsType) MarshalJSON ¶
func (r ReportsType) MarshalJSON() ([]byte, error)
func (ReportsType) RequiresDateValidation ¶
func (r ReportsType) RequiresDateValidation() bool
func (ReportsType) String ¶
func (r ReportsType) String() string
func (ReportsType) Translation ¶
func (r ReportsType) Translation() string
func (*ReportsType) UnmarshalJSON ¶
func (r *ReportsType) UnmarshalJSON(data []byte) (err error)
func (ReportsType) Valid ¶
func (r ReportsType) Valid() bool
type ScheduleType ¶
type ScheduleType int
const ( ScheduleTypeUnknown ScheduleType = iota ScheduleTypeMOTOCardPayments ScheduleTypeOnlineCardPayments ScheduleTypeOPGBACSTransfer ScheduleTypeSupervisionBACSTransfer ScheduleTypeDirectDebitPayments ScheduleTypeAdFeeInvoices ScheduleTypeS2FeeInvoices ScheduleTypeS3FeeInvoices ScheduleTypeB2FeeInvoices ScheduleTypeB3FeeInvoices ScheduleTypeSFFeeInvoicesGeneral ScheduleTypeSFFeeInvoicesMinimal ScheduleTypeSEFeeInvoicesGeneral ScheduleTypeSEFeeInvoicesMinimal ScheduleTypeSOFeeInvoicesGeneral ScheduleTypeSOFeeInvoicesMinimal ScheduleTypeADFeeReductions ScheduleTypeGeneralFeeReductions ScheduleTypeMinimalFeeReductions ScheduleTypeADManualCredits ScheduleTypeGeneralManualCredits ScheduleTypeMinimalManualCredits ScheduleTypeADManualDebits ScheduleTypeGeneralManualDebits ScheduleTypeMinimalManualDebits ScheduleTypeADWriteOffs ScheduleTypeGeneralWriteOffs ScheduleTypeMinimalWriteOffs ScheduleTypeADWriteOffReversals ScheduleTypeGeneralWriteOffReversals ScheduleTypeMinimalWriteOffReversals )
func ParseScheduleType ¶
func ParseScheduleType(s string) ScheduleType
func (ScheduleType) Key ¶
func (s ScheduleType) Key() string
func (ScheduleType) MarshalJSON ¶
func (s ScheduleType) MarshalJSON() ([]byte, error)
func (ScheduleType) String ¶
func (s ScheduleType) String() string
func (ScheduleType) Translation ¶
func (s ScheduleType) Translation() string
func (*ScheduleType) UnmarshalJSON ¶
func (s *ScheduleType) UnmarshalJSON(data []byte) (err error)
func (ScheduleType) Valid ¶
func (s ScheduleType) Valid() bool
type SupervisionLevel ¶
type TransactionEvent ¶
type TransactionEvent struct { ClientId int `json:"client_id"` TransactionType TransactionType `json:"transaction_type"` Amount int `json:"amount"` // the amount that triggered the transaction, excluding unapplies Breakdown []PaymentBreakdown `json:"breakdown"` BaseBillingEvent }
type TransactionType ¶
type TransactionType int
const ( TransactionTypeUnknown TransactionType = iota TransactionTypeWriteOff TransactionTypeCreditMemo TransactionTypeDebitMemo TransactionTypeWriteOffReversal TransactionTypeExemption TransactionTypeHardship TransactionTypeRemission TransactionTypeReapply TransactionTypeMotoCardPayment TransactionTypeOnlineCardPayment TransactionTypeSupervisionBACSPayment TransactionTypeOPGBACSPayment TransactionTypeDirectDebitPayment )
func ParseTransactionType ¶
func ParseTransactionType(s string) TransactionType
func (TransactionType) Key ¶
func (t TransactionType) Key() string
func (TransactionType) MarshalJSON ¶
func (t TransactionType) MarshalJSON() ([]byte, error)
func (TransactionType) String ¶
func (t TransactionType) String() string
func (*TransactionType) UnmarshalJSON ¶
func (t *TransactionType) UnmarshalJSON(data []byte) (err error)
func (TransactionType) Valid ¶
func (t TransactionType) Valid() bool
type UnknownEvent ¶
type UnknownEvent struct {
BaseBillingEvent
}
type UpdateInvoiceAdjustment ¶
type UpdateInvoiceAdjustment struct {
Status AdjustmentStatus `json:"status" validate:"valid-enum,oneof=2 3"` // APPROVED, REJECTED
}
Source Files ¶
- account_information.go
- accounts_receivable_type.go
- add_fee_reduction.go
- add_manual_invoice.go
- adjustment_status.go
- adjustment_type.go
- assignee.go
- billing_history.go
- cancel_fee_reduction.go
- date.go
- debt_type.go
- download.go
- event.go
- fee_reduction.go
- fee_reduction_type.go
- invoice.go
- invoice_adjustment.go
- invoice_reference.go
- invoice_type.go
- journal_type.go
- ledger_entry.go
- nillable.go
- payment_details.go
- person.go
- report_request.go
- reports_type.go
- schedule_type.go
- task.go
- transaction_type.go
- transform.go
- update_invoice_adjustment.go
Click to show internal directories.
Click to hide internal directories.