models

package
v0.0.0-...-84b52ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSV

type CSV struct {
	Data     CSVable
	FileName string
}

CSV holds CSV-able data, accompanied by a file name

type CSVable

type CSVable interface {
	ToCSV() [][]string
}

CSVable provides functionality to convert a struct type to CSV-writable data

type Product

type Product struct {
	PaymentRef    string `bson:"payment_reference"`
	ProductCode   int    `bson:"product_code"`
	CompanyNumber string `bson:"company_number"`
	FilingDate    string `bson:"filing_date"`
	MadeUpDate    string `bson:"made_up_date"`
}

Product contains data of a payment product

type ProductsList

type ProductsList struct {
	Products []Product
}

ProductsList holds an array of payment products

func (ProductsList) ToCSV

func (products ProductsList) ToCSV() [][]string

ToCSV converts ProductsList into CSV-writable data

type ReconciliationMetaData

type ReconciliationMetaData struct {
	ReconciliationDate string `json:"reconciliation_date"`
	StartTime          time.Time
	EndTime            time.Time
}

ReconciliationMetaData holds meta data regarding the date for which to reconcile payments

type Refund

type Refund struct {
	TransactionID     string    `bson:"transaction_id"`
	TransactionDate   time.Time `bson:"transaction_date"`
	Email             string    `bson:"email"`
	PaymentMethod     string    `bson:"payment_method"`
	Amount            string    `bson:"amount"`
	CompanyNumber     string    `bson:"company_number"`
	TransactionType   string    `bson:"transaction_type"`
	OrderReference    string    `bson:"order_reference"`
	Status            string    `bson:"status"`
	UserID            string    `bson:"user_id"`
	OriginalReference string    `bson:"original_reference"`
	DisputeDetails    string    `bson:"dispute_details"`
	ProductCode       int       `bson:"product_code"`
	RefundID          string    `bson:"refund_id,omitempty"`
	RefundedAt        time.Time `bson:"refunded_at,omitempty"`
}

Refund contains data of a refund

type RefundsList

type RefundsList struct {
	Refunds []Refund
}

RefundsList holds an array of refund products

func (RefundsList) ToCSV

func (refunds RefundsList) ToCSV() [][]string

ToCSV converts RefundsList into CSV-writable data

type Transaction

type Transaction struct {
	TransactionID     string    `bson:"transaction_id"`
	TransactionDate   time.Time `bson:"transaction_date"`
	Email             string    `bson:"email"`
	PaymentMethod     string    `bson:"payment_method"`
	Amount            string    `bson:"amount"`
	CompanyNumber     string    `bson:"company_number"`
	TransactionType   string    `bson:"transaction_type"`
	OrderReference    string    `bson:"order_reference"`
	Status            string    `bson:"status"`
	UserID            string    `bson:"user_id"`
	OriginalReference string    `bson:"original_reference"`
	DisputeDetails    string    `bson:"dispute_details"`
}

Transaction contains data of a payment transaction

type TransactionsList

type TransactionsList struct {
	Transactions []Transaction
}

TransactionsList holds an array of payment transactions

func (TransactionsList) ToCSV

func (transactions TransactionsList) ToCSV() [][]string

ToCSV converts TransactionsList into CSV-writable data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL