/
swiftref.go
140 lines (116 loc) · 6.82 KB
/
swiftref.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
package swift
import (
"context"
"github.com/alifcapital/swift/swagger/swift/swiftref"
"github.com/antihax/optional"
)
func (api *API) GetBicDetails(ctx context.Context, BIC string) (*swiftref.InlineResponse2005, error) {
r, httpResponse, err := api.Reference.BicsApi.
GetBicDetailsV2(api.WithContext(ctx, swiftref.ContextOAuth2), BIC, &swiftref.BicsApiGetBicDetailsV2Opts{APIStatus: optional.NewString("APIStatus")})
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetBicValidity(ctx context.Context, BIC string) (*swiftref.InlineResponse2006, error) {
r, httpResponse, err := api.Reference.BicsApi.
GetBicValidityV2(api.WithContext(ctx, swiftref.ContextOAuth2), BIC, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetLeiFromBic(ctx context.Context, BIC string) (*swiftref.InlineResponse2007, error) {
r, httpResponse, err := api.Reference.BicsApi.
GetLeiFromBicV2(api.WithContext(ctx, swiftref.ContextOAuth2), BIC, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetNationalIdsFromBic(ctx context.Context, BIC string) (*swiftref.InlineResponse2009, error) {
r, httpResponse, err := api.Reference.BicsApi.
GetNationalIdsFromBicV2(api.WithContext(ctx, swiftref.ContextOAuth2), BIC, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetSepaReachabilityFromBic(ctx context.Context, BIC, sepaScheme string) (*swiftref.InlineResponse20010, error) {
r, httpResponse, err := api.Reference.BicsApi.
GetSepaReachabilityFromBicV2(api.WithContext(ctx, swiftref.ContextOAuth2), BIC, sepaScheme, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetSsisFromBic(ctx context.Context, BIC, currencyCode string) (*swiftref.InlineResponse20011, error) {
r, httpResponse, err := api.Reference.BicsApi.
GetSsisFromBicV2(api.WithContext(ctx, swiftref.ContextOAuth2), BIC, currencyCode, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetAccountNumberValidity(ctx context.Context, accountNumber string) (*swiftref.InlineResponse20021, error) {
r, httpResponse, err := api.Reference.AccountNumbersApi.
GetAccountNumberValidityV2(api.WithContext(ctx, swiftref.ContextOAuth2), accountNumber, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetIbanFromBban(ctx context.Context, BBAN, countryCode string) (*swiftref.InlineResponse2004, error) {
r, httpResponse, err := api.Reference.BbansApi.
GetIbanFromBbanV2(api.WithContext(ctx, swiftref.ContextOAuth2), BBAN, countryCode, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetCountryCodeDetails(ctx context.Context, countryCode string) (*swiftref.InlineResponse20016, error) {
r, httpResponse, err := api.Reference.CountryCodesApi.
GetCountryCodeDetailsV2(api.WithContext(ctx, swiftref.ContextOAuth2), countryCode, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetCountryCodeValidity(ctx context.Context, countryCode string) (*swiftref.InlineResponse20015, error) {
r, httpResponse, err := api.Reference.CountryCodesApi.
GetCountryCodeValidityV2(api.WithContext(ctx, swiftref.ContextOAuth2), countryCode, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetCurrencyCodeDetails(ctx context.Context, countryCode string) (*swiftref.InlineResponse20018, error) {
r, httpResponse, err := api.Reference.CurrencyCodesApi.
GetCurrencyCodeDetailsV2(api.WithContext(ctx, swiftref.ContextOAuth2), countryCode, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetCurrencyCodeValidity(ctx context.Context, currencyCode string) (*swiftref.InlineResponse20017, error) {
r, httpResponse, err := api.Reference.CurrencyCodesApi.
GetCurrencyCodeValidityV2(api.WithContext(ctx, swiftref.ContextOAuth2), currencyCode, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetBicFromIbanNationalId(ctx context.Context, ibanNationalID, countryCode string) (*swiftref.InlineResponse2003, error) {
r, httpResponse, err := api.Reference.IbanNationalIdsApi.
GetBicFromIbanNationalIdV2(api.WithContext(ctx, swiftref.ContextOAuth2), ibanNationalID, countryCode, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetBicFromIban(ctx context.Context, iban string) (*swiftref.InlineResponse2001, error) {
r, httpResponse, err := api.Reference.IbansApi.
GetBicFromIbanV2(api.WithContext(ctx, swiftref.ContextOAuth2), iban, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetIbanDetails(ctx context.Context, iban string) (*swiftref.InlineResponse2002, error) {
r, httpResponse, err := api.Reference.IbansApi.
GetIbanDetailsV2(api.WithContext(ctx, swiftref.ContextOAuth2), iban, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetIbanValidity(ctx context.Context, iban string) (*swiftref.InlineResponse200, error) {
r, httpResponse, err := api.Reference.IbansApi.
GetIbanValidityV2(api.WithContext(ctx, swiftref.ContextOAuth2), iban, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetBicFromLei(ctx context.Context, lei string) (*swiftref.InlineResponse2008, error) {
r, httpResponse, err := api.Reference.LeisApi.
GetBicFromLeiV2(api.WithContext(ctx, swiftref.ContextOAuth2), lei, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetLeiDetails(ctx context.Context, lei string) (*swiftref.InlineResponse20020, error) {
r, httpResponse, err := api.Reference.LeisApi.
GetLeiDetailsV2(api.WithContext(ctx, swiftref.ContextOAuth2), lei, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetLeiValidity(ctx context.Context, lei string) (*swiftref.InlineResponse20019, error) {
r, httpResponse, err := api.Reference.LeisApi.
GetLeiValidityV2(api.WithContext(ctx, swiftref.ContextOAuth2), lei, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetBicsFromNationalId(ctx context.Context, nationalID string) (*swiftref.InlineResponse20014, error) {
r, httpResponse, err := api.Reference.NationalIdsApi.
GetBicsFromNationalIdV2(api.WithContext(ctx, swiftref.ContextOAuth2), nationalID, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetNationalIdDetails(ctx context.Context, nationalID string) (*swiftref.InlineResponse20012, error) {
r, httpResponse, err := api.Reference.NationalIdsApi.
GetNationalIdDetailsV2(api.WithContext(ctx, swiftref.ContextOAuth2), nationalID, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}
func (api *API) GetNationalIdValidity(ctx context.Context, nationalID string) (*swiftref.InlineResponse20013, error) {
r, httpResponse, err := api.Reference.NationalIdsApi.
GetNationalIdValidityV2(api.WithContext(ctx, swiftref.ContextOAuth2), nationalID, nil)
return &r, NewErrWithHTTPResponse(httpResponse, err)
}