entities

package
v0.0.0-...-456c6e9 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountDetails

type AccountDetails struct {
	Name     string
	IBAN     string
	BIC      string
	Currency string
}

type CardDetails

type CardDetails struct {
	Name           string
	Number         string
	SecurityCode   int
	ExpirationDate string
}

type Customer

type Customer struct {
	ID          string
	CardDetails CardDetails
}

type Merchant

type Merchant struct {
	ID             string
	AccountDetails AccountDetails
}

type Money

type Money struct {
	Amount   int64 // storing as int to avoid floating point precision issues
	Currency string
}

type Payment

type Payment struct {
	ID                string
	Merchant          Merchant
	Customer          Customer
	Price             Money
	BankTransactionID string
	Timestamp         int64
	Refunded          bool
	RefundTimestamp   int64
}

type PaymentDetails

type PaymentDetails struct {
	ID              string
	MerchantID      string
	CustomerID      string
	Price           Money
	Timestamp       int64
	Refunded        bool
	RefundTimestamp int64
}

PaymentDetails without sensitive information

func NewPaymentDetailsFromPayment

func NewPaymentDetailsFromPayment(payment Payment) PaymentDetails

Jump to

Keyboard shortcuts

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