models

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportRequest

type ExportRequest struct {
	Environment         string   `json:"environment"`           // Environment used for testing
	Implementer         string   `json:"implementer"`           // Implementer/Brand Name
	AuthorisedBy        string   `json:"authorised_by"`         // Authorised by
	JobTitle            string   `json:"job_title"`             // Job Title
	Products            []string `json:"products"`              // Products tested, e.g., "Business, Personal, Cards"
	HasAgreed           bool     `json:"has_agreed"`            // I agree
	AddDigitalSignature bool     `json:"add_digital_signature"` // Sign this report
}

ExportRequest - Request to `/api/export`.

func (ExportRequest) Validate

func (e ExportRequest) Validate() error

type ExportResults

type ExportResults struct {
	ExportRequest    ExportRequest                             `json:"export_request"`
	HasPassed        bool                                      `json:"has_passed"`
	Results          map[results.ResultKey][]results.TestCase  `json:"results"`
	Tokens           []events.AcquiredAccessToken              `json:"tokens"`
	DiscoveryModel   discovery.Model                           `json:"discovery_model"`
	ResponseFields   string                                    `json:"-"`
	TLSVersionResult map[string]*discovery.TLSValidationResult `json:"-"`
	JWSStatus        string                                    `json:"jws_status"`
}

ExportResults - Contains `ExportRequest` and results of test run.

type ImportRequest

type ImportRequest struct {
	Report string `json:"report" form:"report"` // The exported report ZIP archive.
}

ImportRequest - Request to `/api/import/review` or `/api/import/rerun` POST. TODO(mbana): Needs more work.

func (ImportRequest) Validate

func (r ImportRequest) Validate() error

Validate - used by github.com/go-ozzo/ozzo-validation to validate struct.

type ImportRerunResponse

type ImportRerunResponse struct {
}

ImportRerunResponse - Response to `/api/import/rerun` POST.

type ImportReviewResponse

type ImportReviewResponse struct {
}

ImportReviewResponse - Response to `/api/import/review` POST.

type InstructedAmount added in v1.1.7

type InstructedAmount struct {
	Currency string `json:"currency"`
	Value    string `json:"value"`
}

InstructedAmount - Represents global details for the payment test cases As in the Payment struct, structure was deduced from this specification: https://raw.githubusercontent.com/OpenBankingUK/read-write-api-specs/v3.1.0/dist/account-info-swagger.json

`Value` is of the format specified below:

"OBActiveCurrencyAndAmount_SimpleType": {
    "description": "A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.",
    "type": "string",
    "pattern": "^\\d{1,13}\\.\\d{1,5}$"
},

See: https://github.com/OpenBankingUK/read-write-api-specs/blob/master/dist/account-info-swagger.json#L2964.

func (InstructedAmount) Validate added in v1.1.7

func (a InstructedAmount) Validate() error

Validate - validates value and currency of the instructed amount provided in input

type OBCashAccount5

type OBCashAccount5 = Payment

Just an an alternate spelling to match the Account and Transaction API Specification.

type Payment

type Payment struct {
	// Name of the identification scheme, in a coded form as published in an external list
	SchemeName string `json:"scheme_name" form:"scheme_name"`
	// Beneficiary account identification.
	Identification string `json:"identification" form:"identification"`
	// Name of the account, as assigned by the account servicing institution.
	// Usage: The account name is the name or names of the account owner(s) represented at an account level. The account name is not the product name or the nickname of the account.
	Name string `json:"name" form:"name"`
}

Payment - Provides the details to identify the beneficiary account. This is referred to `OBCashAccount5` (line 9488) in the specification linked to below.

Structure was deduced from this specification: https://raw.githubusercontent.com/OpenBankingUK/read-write-api-specs/v3.1.0/dist/account-info-swagger.json

Example value:

{
    "SchemeName": "UK.OBIE.SortCodeAccountNumber",
    "Identification": "20202010981789",
    "Name": "Dr Foo"
}

func (Payment) Validate

func (p Payment) Validate() error

Validate - used by https://github.com/go-ozzo/ozzo-validation to validate struct.

type PaymentFrequency added in v1.1.16

type PaymentFrequency string

func (PaymentFrequency) Validate added in v1.1.16

func (p PaymentFrequency) Validate() error

Validate - ensures

Jump to

Keyboard shortcuts

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