mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* chore(CONN-122): Rename bank bridge to open banking * Fix some renamings * Regenerate openApi and sdk * Fixing linting * Revert unexpected linting changes * More renaming * More renaming * More renaming * Fix test * Rename open api attempt status * More renaming * More renaming
38 lines
1.0 KiB
Go
38 lines
1.0 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package components
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
)
|
|
|
|
type V3OpenBankingConnectionAttemptStatusEnum string
|
|
|
|
const (
|
|
V3OpenBankingConnectionAttemptStatusEnumPending V3OpenBankingConnectionAttemptStatusEnum = "pending"
|
|
V3OpenBankingConnectionAttemptStatusEnumCompleted V3OpenBankingConnectionAttemptStatusEnum = "completed"
|
|
V3OpenBankingConnectionAttemptStatusEnumExited V3OpenBankingConnectionAttemptStatusEnum = "exited"
|
|
)
|
|
|
|
func (e V3OpenBankingConnectionAttemptStatusEnum) ToPointer() *V3OpenBankingConnectionAttemptStatusEnum {
|
|
return &e
|
|
}
|
|
func (e *V3OpenBankingConnectionAttemptStatusEnum) UnmarshalJSON(data []byte) error {
|
|
var v string
|
|
if err := json.Unmarshal(data, &v); err != nil {
|
|
return err
|
|
}
|
|
switch v {
|
|
case "pending":
|
|
fallthrough
|
|
case "completed":
|
|
fallthrough
|
|
case "exited":
|
|
*e = V3OpenBankingConnectionAttemptStatusEnum(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for V3OpenBankingConnectionAttemptStatusEnum: %v", v)
|
|
}
|
|
}
|