mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* chore(storage): remove errors.Wrap deprecated * feat: add psu models * feat(storage): add psu migrations and functions * feat(*): add payment service users entity * feat(tests): update sdks and add psu integration tests * feat(validation): add validation on email and phone number
79 lines
1.6 KiB
Go
79 lines
1.6 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package components
|
|
|
|
import (
|
|
"github.com/formancehq/payments/pkg/client/internal/utils"
|
|
"time"
|
|
)
|
|
|
|
type V3PaymentServiceUser struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
ContactDetails *V3ContactDetails `json:"contactDetails,omitempty"`
|
|
Address *V3Address `json:"address,omitempty"`
|
|
BankAccountIDs []string `json:"bankAccountIDs,omitempty"`
|
|
Metadata map[string]string `json:"metadata,omitempty"`
|
|
}
|
|
|
|
func (v V3PaymentServiceUser) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(v, "", false)
|
|
}
|
|
|
|
func (v *V3PaymentServiceUser) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3PaymentServiceUser) GetID() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ID
|
|
}
|
|
|
|
func (o *V3PaymentServiceUser) GetName() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Name
|
|
}
|
|
|
|
func (o *V3PaymentServiceUser) GetCreatedAt() time.Time {
|
|
if o == nil {
|
|
return time.Time{}
|
|
}
|
|
return o.CreatedAt
|
|
}
|
|
|
|
func (o *V3PaymentServiceUser) GetContactDetails() *V3ContactDetails {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ContactDetails
|
|
}
|
|
|
|
func (o *V3PaymentServiceUser) GetAddress() *V3Address {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Address
|
|
}
|
|
|
|
func (o *V3PaymentServiceUser) GetBankAccountIDs() []string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.BankAccountIDs
|
|
}
|
|
|
|
func (o *V3PaymentServiceUser) GetMetadata() map[string]string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Metadata
|
|
}
|