-
Notifications
You must be signed in to change notification settings - Fork 2
/
o_b_write_international_consent5_data_initiation_remittance_information.go
107 lines (85 loc) · 4.05 KB
/
o_b_write_international_consent5_data_initiation_remittance_information.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// OBWriteInternationalConsent5DataInitiationRemittanceInformation OBWriteInternationalConsent5DataInitiationRemittanceInformation Information supplied to enable the matching of an entry with the items that the transfer is intended to settle, such as commercial invoices in an accounts' receivable system.
//
// swagger:model OBWriteInternationalConsent5DataInitiationRemittanceInformation
type OBWriteInternationalConsent5DataInitiationRemittanceInformation struct {
// Unique reference, as assigned by the creditor, to unambiguously refer to the payment transaction.
// Usage: If available, the initiating party should provide this reference in the structured remittance information, to enable reconciliation by the creditor upon receipt of the amount of money.
// If the business context requires the use of a creditor reference or a payment remit identification, and only one identifier can be passed through the end-to-end chain, the creditor's reference or payment remittance identification should be quoted in the end-to-end transaction identification.
// OB: The Faster Payments Scheme can only accept 18 characters for the ReferenceInformation field - which is where this ISO field will be mapped.
// Max Length: 35
// Min Length: 1
Reference string `json:"Reference,omitempty" yaml:"Reference,omitempty"`
// Information supplied to enable the matching/reconciliation of an entry with the items that the payment is intended to settle, such as commercial invoices in an accounts' receivable system, in an unstructured form.
// Max Length: 140
// Min Length: 1
Unstructured string `json:"Unstructured,omitempty" yaml:"Unstructured,omitempty"`
}
// Validate validates this o b write international consent5 data initiation remittance information
func (m *OBWriteInternationalConsent5DataInitiationRemittanceInformation) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateReference(formats); err != nil {
res = append(res, err)
}
if err := m.validateUnstructured(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *OBWriteInternationalConsent5DataInitiationRemittanceInformation) validateReference(formats strfmt.Registry) error {
if swag.IsZero(m.Reference) { // not required
return nil
}
if err := validate.MinLength("Reference", "body", m.Reference, 1); err != nil {
return err
}
if err := validate.MaxLength("Reference", "body", m.Reference, 35); err != nil {
return err
}
return nil
}
func (m *OBWriteInternationalConsent5DataInitiationRemittanceInformation) validateUnstructured(formats strfmt.Registry) error {
if swag.IsZero(m.Unstructured) { // not required
return nil
}
if err := validate.MinLength("Unstructured", "body", m.Unstructured, 1); err != nil {
return err
}
if err := validate.MaxLength("Unstructured", "body", m.Unstructured, 140); err != nil {
return err
}
return nil
}
// ContextValidate validates this o b write international consent5 data initiation remittance information based on context it is used
func (m *OBWriteInternationalConsent5DataInitiationRemittanceInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *OBWriteInternationalConsent5DataInitiationRemittanceInformation) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *OBWriteInternationalConsent5DataInitiationRemittanceInformation) UnmarshalBinary(b []byte) error {
var res OBWriteInternationalConsent5DataInitiationRemittanceInformation
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}