-
Notifications
You must be signed in to change notification settings - Fork 2
/
o_b_write_domestic_standing_order_consent_response6_data_s_c_a_support_data.go
197 lines (154 loc) · 8.51 KB
/
o_b_write_domestic_standing_order_consent_response6_data_s_c_a_support_data.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
// 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"
"encoding/json"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData Supporting Data provided by TPP, when requesting SCA Exemption.
//
// swagger:model OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData
type OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData struct {
// Specifies a character string with a maximum length of 40 characters.
// Usage: This field indicates whether the PSU was subject to SCA performed by the TPP
// Enum: [CA SCA]
AppliedAuthenticationApproach string `json:"AppliedAuthenticationApproach,omitempty" yaml:"AppliedAuthenticationApproach,omitempty"`
// Specifies a character string with a maximum length of 140 characters.
// Usage: If the payment is recurring then the transaction identifier of the previous payment occurrence so that the ASPSP can verify that the PISP, amount and the payee are the same as the previous occurrence.
// Max Length: 128
// Min Length: 1
ReferencePaymentOrderID string `json:"ReferencePaymentOrderId,omitempty" yaml:"ReferencePaymentOrderId,omitempty"`
// This field allows a PISP to request specific SCA Exemption for a Payment Initiation
// Enum: [BillPayment ContactlessTravel EcommerceGoods EcommerceServices Kiosk Parking PartyToParty]
RequestedSCAExemptionType string `json:"RequestedSCAExemptionType,omitempty" yaml:"RequestedSCAExemptionType,omitempty"`
}
// Validate validates this o b write domestic standing order consent response6 data s c a support data
func (m *OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAppliedAuthenticationApproach(formats); err != nil {
res = append(res, err)
}
if err := m.validateReferencePaymentOrderID(formats); err != nil {
res = append(res, err)
}
if err := m.validateRequestedSCAExemptionType(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
var oBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataTypeAppliedAuthenticationApproachPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["CA","SCA"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
oBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataTypeAppliedAuthenticationApproachPropEnum = append(oBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataTypeAppliedAuthenticationApproachPropEnum, v)
}
}
const (
// OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataAppliedAuthenticationApproachCA captures enum value "CA"
OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataAppliedAuthenticationApproachCA string = "CA"
// OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataAppliedAuthenticationApproachSCA captures enum value "SCA"
OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataAppliedAuthenticationApproachSCA string = "SCA"
)
// prop value enum
func (m *OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData) validateAppliedAuthenticationApproachEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, oBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataTypeAppliedAuthenticationApproachPropEnum, true); err != nil {
return err
}
return nil
}
func (m *OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData) validateAppliedAuthenticationApproach(formats strfmt.Registry) error {
if swag.IsZero(m.AppliedAuthenticationApproach) { // not required
return nil
}
// value enum
if err := m.validateAppliedAuthenticationApproachEnum("AppliedAuthenticationApproach", "body", m.AppliedAuthenticationApproach); err != nil {
return err
}
return nil
}
func (m *OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData) validateReferencePaymentOrderID(formats strfmt.Registry) error {
if swag.IsZero(m.ReferencePaymentOrderID) { // not required
return nil
}
if err := validate.MinLength("ReferencePaymentOrderId", "body", m.ReferencePaymentOrderID, 1); err != nil {
return err
}
if err := validate.MaxLength("ReferencePaymentOrderId", "body", m.ReferencePaymentOrderID, 128); err != nil {
return err
}
return nil
}
var oBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataTypeRequestedSCAExemptionTypePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["BillPayment","ContactlessTravel","EcommerceGoods","EcommerceServices","Kiosk","Parking","PartyToParty"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
oBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataTypeRequestedSCAExemptionTypePropEnum = append(oBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataTypeRequestedSCAExemptionTypePropEnum, v)
}
}
const (
// OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeBillPayment captures enum value "BillPayment"
OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeBillPayment string = "BillPayment"
// OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeContactlessTravel captures enum value "ContactlessTravel"
OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeContactlessTravel string = "ContactlessTravel"
// OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeEcommerceGoods captures enum value "EcommerceGoods"
OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeEcommerceGoods string = "EcommerceGoods"
// OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeEcommerceServices captures enum value "EcommerceServices"
OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeEcommerceServices string = "EcommerceServices"
// OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeKiosk captures enum value "Kiosk"
OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeKiosk string = "Kiosk"
// OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeParking captures enum value "Parking"
OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypeParking string = "Parking"
// OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypePartyToParty captures enum value "PartyToParty"
OBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataRequestedSCAExemptionTypePartyToParty string = "PartyToParty"
)
// prop value enum
func (m *OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData) validateRequestedSCAExemptionTypeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, oBWriteDomesticStandingOrderConsentResponse6DataSCASupportDataTypeRequestedSCAExemptionTypePropEnum, true); err != nil {
return err
}
return nil
}
func (m *OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData) validateRequestedSCAExemptionType(formats strfmt.Registry) error {
if swag.IsZero(m.RequestedSCAExemptionType) { // not required
return nil
}
// value enum
if err := m.validateRequestedSCAExemptionTypeEnum("RequestedSCAExemptionType", "body", m.RequestedSCAExemptionType); err != nil {
return err
}
return nil
}
// ContextValidate validates this o b write domestic standing order consent response6 data s c a support data based on context it is used
func (m *OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData) UnmarshalBinary(b []byte) error {
var res OBWriteDomesticStandingOrderConsentResponse6DataSCASupportData
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}