model

package
v0.0.0-...-37c696c Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CardStatement

type CardStatement struct {
	Status       CardStatus `json:"status"`
	Transactions []TxStatus `json:"tx"`
}

CardStatement contains info about a prepaid card along with all transactions with it.

type CardStatus

type CardStatus struct {
	ID      string  `json:"id" dynamo:"id"`
	Balance float64 `json:"balance" dynamo:"balance"`
	Blocked float64 `json:"blocked" dynamo:"blocked,omitempty"`
}

CardStatus contains info about a prepaid card.

type NullTime

type NullTime struct {
	Time  time.Time
	Valid bool // Valid is true if Time is not NULL
}

NullTime represents an time.Time value that may be null, represented as an empty string in text, and null in JSON.

func (NullTime) MarshalDynamoDBAttributeValue

func (n NullTime) MarshalDynamoDBAttributeValue(av *dynamodb.AttributeValue) error

MarshalDynamoDBAttributeValue implements the dynamodbattribute.Marshaler interface.

func (NullTime) MarshalJSON

func (n NullTime) MarshalJSON() ([]byte, error)

MarshalJSON implements the encoding/json.MarshalJSON interface.

func (NullTime) MarshalText

func (n NullTime) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (*NullTime) UnmarshalDynamoDBAttributeValue

func (n *NullTime) UnmarshalDynamoDBAttributeValue(av *dynamodb.AttributeValue) error

UnmarshalDynamoDBAttributeValue implements the dynamodbattribute.Unmarshaler interface.

func (*NullTime) UnmarshalText

func (n *NullTime) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

type TxStatus

type TxStatus struct {
	ID         string   `json:"id" dynamo:"id"`
	CardID     string   `json:"-" dynamo:"card_id"`
	Merchant   string   `json:"merchant" dynamo:"merchant"`
	Blocked    float64  `json:"blocked" dynamo:"blocked"`
	Captured   float64  `json:"captured" dynamo:"captured"`
	Refunded   float64  `json:"refunded" dynamo:"refunded"`
	CreatedAt  NullTime `json:"created_at" dynamo:"created_at"`
	ExpiresAt  NullTime `json:"expires_at" dynamo:"expires_at"`
	CapturedAt NullTime `json:"captured_at" dynamo:"captured_at"`
	RefundedAt NullTime `json:"refunded_at" dynamo:"refunded_at"`
}

TxStatus contains info about a transaction.Null

Jump to

Keyboard shortcuts

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