models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 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 EqReceipt

type EqReceipt struct {
	TimeCreated *time.Time        `json:"timeCreated" validate:"required"`
	Metadata    EqReceiptMetadata `json:"metadata" validate:"required"`
}

func (EqReceipt) GetTransactionId

func (e EqReceipt) GetTransactionId() string

func (EqReceipt) Validate

func (e EqReceipt) Validate() error

type EqReceiptMetadata

type EqReceiptMetadata struct {
	TransactionId   string `json:"tx_id" validate:"required"`
	QuestionnaireId string `json:"questionnaire_id" validate:"required"`
	CaseID          string `json:"caseId,omitempty"`
}

type FulfilmentConfirmed added in v0.2.0

type FulfilmentConfirmed struct {
	TimeCreated     *HazyUtcTime `json:"dateTime" validate:"required"`
	TransactionId   string       `json:"transactionId" validate:"required"`
	ProductCode     string       `json:"productCode" validate:"required"`
	Channel         string       `json:"channel" validate:"required"`
	QuestionnaireId string       `json:"questionnaireId"`
	CaseRef         string       `json:"caseRef"`
}

func (FulfilmentConfirmed) GetTransactionId added in v0.2.0

func (o FulfilmentConfirmed) GetTransactionId() string

func (FulfilmentConfirmed) Validate added in v0.2.0

func (o FulfilmentConfirmed) Validate() error

type FulfilmentInformation

type FulfilmentInformation struct {
	CaseRef         string `json:"caseRef,omitempty"`
	FulfilmentCode  string `json:"fulfilmentCode,omitempty"`
	QuestionnaireId string `json:"questionnaireId,omitempty"`
}

type HazyUtcTime

type HazyUtcTime struct {
	// For use in JSON models where the time may or may not include the timezone
	time.Time
}

func (*HazyUtcTime) UnmarshalJSON

func (t *HazyUtcTime) UnmarshalJSON(buf []byte) error

type OfflineReceipt

type OfflineReceipt struct {
	TimeCreated     *HazyUtcTime `json:"dateTime" validate:"required"`
	TransactionId   string       `json:"transactionId" validate:"required"`
	QuestionnaireId string       `json:"questionnaireId" validate:"required"`
	Unreceipt       bool         `json:"unreceipt"`
	Channel         string       `json:"channel"`
}

func (OfflineReceipt) GetTransactionId

func (o OfflineReceipt) GetTransactionId() string

func (OfflineReceipt) Validate

func (o OfflineReceipt) Validate() error

type PpoUndelivered

type PpoUndelivered struct {
	TransactionId string       `json:"transactionId" validate:"required"`
	DateTime      *HazyUtcTime `json:"dateTime" validate:"required"`
	CaseRef       string       `json:"caseRef" validate:"required"`
	ProductCode   string       `json:"productCode"`
}

func (PpoUndelivered) GetTransactionId

func (p PpoUndelivered) GetTransactionId() string

func (PpoUndelivered) Validate

func (p PpoUndelivered) Validate() error

type PubSubMessage

type PubSubMessage interface {
	GetTransactionId() string
	Validate() error
}

type QmUndelivered

type QmUndelivered struct {
	TransactionId   string       `json:"transactionId" validate:"required"`
	DateTime        *HazyUtcTime `json:"dateTime" validate:"required"`
	QuestionnaireId string       `json:"questionnaireId" validate:"required"`
}

func (QmUndelivered) GetTransactionId

func (q QmUndelivered) GetTransactionId() string

func (QmUndelivered) Validate

func (q QmUndelivered) Validate() error

type RmEvent

type RmEvent struct {
	Type          string     `json:"type"`
	Source        string     `json:"source"`
	Channel       string     `json:"channel"`
	DateTime      *time.Time `json:"dateTime"`
	TransactionID string     `json:"transactionId"`
}

type RmMessage

type RmMessage struct {
	Event   RmEvent   `json:"event"`
	Payload RmPayload `json:"payload"`
}

type RmPayload

type RmPayload struct {
	Response              *RmResponse            `json:"response,omitempty"`
	FulfilmentInformation *FulfilmentInformation `json:"fulfilmentInformation,omitempty"`
}

type RmResponse

type RmResponse struct {
	CaseID          string `json:"caseId,omitempty"`
	QuestionnaireID string `json:"questionnaireId"`
	Unreceipt       bool   `json:"unreceipt"`
}

Jump to

Keyboard shortcuts

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