Files
CrimsonandGitHub 61cae8af0a chore: Move all CE plugins to own go modules (#780)
* Move all public connectors to ce/plugins

* Update tooling to account for new go modules under ce

* Ensure we test all CE plugins in CI

* Move Dummypay to ce/plugins for simplicity's sake in the generation scripts

* Use versioned pkg/domain in plugins

* Ensure that renovate updates all CE plugins in a single PR when pkg/domain tags are pushed to github

* Ensure Justfile commands work over all CE plugins

* Copy ce plugin go.mods in dev.Dockerfile

* Only add a go.mod for new plugins if they are ce

* Ensure generated generic client structs are named correctly for submodule

* Add coverprofile for each ce plugin

* Add set -e for Justfile for loops over plugins

* Infer go version from flake.nix in connector template tool
2026-07-01 14:53:02 +00:00

462 lines
12 KiB
Go

/*
GENERIC connector API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: v0.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package genericclient
import (
"encoding/json"
"time"
)
// checks if the Transaction type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Transaction{}
// Transaction struct for Transaction
type Transaction struct {
Id string `json:"id"`
RelatedTransactionID *string `json:"relatedTransactionID,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Currency string `json:"currency"`
Scheme *string `json:"scheme,omitempty"`
Type TransactionType `json:"type"`
Status TransactionStatus `json:"status"`
Amount string `json:"amount"`
SourceAccountID *string `json:"sourceAccountID,omitempty"`
DestinationAccountID *string `json:"destinationAccountID,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
// NewTransaction instantiates a new Transaction object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewTransaction(id string, createdAt time.Time, updatedAt time.Time, currency string, type_ TransactionType, status TransactionStatus, amount string) *Transaction {
this := Transaction{}
this.Id = id
this.CreatedAt = createdAt
this.UpdatedAt = updatedAt
this.Currency = currency
this.Type = type_
this.Status = status
this.Amount = amount
return &this
}
// NewTransactionWithDefaults instantiates a new Transaction object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewTransactionWithDefaults() *Transaction {
this := Transaction{}
return &this
}
// GetId returns the Id field value
func (o *Transaction) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *Transaction) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *Transaction) SetId(v string) {
o.Id = v
}
// GetRelatedTransactionID returns the RelatedTransactionID field value if set, zero value otherwise.
func (o *Transaction) GetRelatedTransactionID() string {
if o == nil || IsNil(o.RelatedTransactionID) {
var ret string
return ret
}
return *o.RelatedTransactionID
}
// GetRelatedTransactionIDOk returns a tuple with the RelatedTransactionID field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Transaction) GetRelatedTransactionIDOk() (*string, bool) {
if o == nil || IsNil(o.RelatedTransactionID) {
return nil, false
}
return o.RelatedTransactionID, true
}
// HasRelatedTransactionID returns a boolean if a field has been set.
func (o *Transaction) HasRelatedTransactionID() bool {
if o != nil && !IsNil(o.RelatedTransactionID) {
return true
}
return false
}
// SetRelatedTransactionID gets a reference to the given string and assigns it to the RelatedTransactionID field.
func (o *Transaction) SetRelatedTransactionID(v string) {
o.RelatedTransactionID = &v
}
// GetCreatedAt returns the CreatedAt field value
func (o *Transaction) GetCreatedAt() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value
// and a boolean to check if the value has been set.
func (o *Transaction) GetCreatedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.CreatedAt, true
}
// SetCreatedAt sets field value
func (o *Transaction) SetCreatedAt(v time.Time) {
o.CreatedAt = v
}
// GetUpdatedAt returns the UpdatedAt field value
func (o *Transaction) GetUpdatedAt() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value
// and a boolean to check if the value has been set.
func (o *Transaction) GetUpdatedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.UpdatedAt, true
}
// SetUpdatedAt sets field value
func (o *Transaction) SetUpdatedAt(v time.Time) {
o.UpdatedAt = v
}
// GetCurrency returns the Currency field value
func (o *Transaction) GetCurrency() string {
if o == nil {
var ret string
return ret
}
return o.Currency
}
// GetCurrencyOk returns a tuple with the Currency field value
// and a boolean to check if the value has been set.
func (o *Transaction) GetCurrencyOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Currency, true
}
// SetCurrency sets field value
func (o *Transaction) SetCurrency(v string) {
o.Currency = v
}
// GetScheme returns the Scheme field value if set, zero value otherwise.
func (o *Transaction) GetScheme() string {
if o == nil || IsNil(o.Scheme) {
var ret string
return ret
}
return *o.Scheme
}
// GetSchemeOk returns a tuple with the Scheme field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Transaction) GetSchemeOk() (*string, bool) {
if o == nil || IsNil(o.Scheme) {
return nil, false
}
return o.Scheme, true
}
// HasScheme returns a boolean if a field has been set.
func (o *Transaction) HasScheme() bool {
if o != nil && !IsNil(o.Scheme) {
return true
}
return false
}
// SetScheme gets a reference to the given string and assigns it to the Scheme field.
func (o *Transaction) SetScheme(v string) {
o.Scheme = &v
}
// GetType returns the Type field value
func (o *Transaction) GetType() TransactionType {
if o == nil {
var ret TransactionType
return ret
}
return o.Type
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *Transaction) GetTypeOk() (*TransactionType, bool) {
if o == nil {
return nil, false
}
return &o.Type, true
}
// SetType sets field value
func (o *Transaction) SetType(v TransactionType) {
o.Type = v
}
// GetStatus returns the Status field value
func (o *Transaction) GetStatus() TransactionStatus {
if o == nil {
var ret TransactionStatus
return ret
}
return o.Status
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *Transaction) GetStatusOk() (*TransactionStatus, bool) {
if o == nil {
return nil, false
}
return &o.Status, true
}
// SetStatus sets field value
func (o *Transaction) SetStatus(v TransactionStatus) {
o.Status = v
}
// GetAmount returns the Amount field value
func (o *Transaction) GetAmount() string {
if o == nil {
var ret string
return ret
}
return o.Amount
}
// GetAmountOk returns a tuple with the Amount field value
// and a boolean to check if the value has been set.
func (o *Transaction) GetAmountOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Amount, true
}
// SetAmount sets field value
func (o *Transaction) SetAmount(v string) {
o.Amount = v
}
// GetSourceAccountID returns the SourceAccountID field value if set, zero value otherwise.
func (o *Transaction) GetSourceAccountID() string {
if o == nil || IsNil(o.SourceAccountID) {
var ret string
return ret
}
return *o.SourceAccountID
}
// GetSourceAccountIDOk returns a tuple with the SourceAccountID field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Transaction) GetSourceAccountIDOk() (*string, bool) {
if o == nil || IsNil(o.SourceAccountID) {
return nil, false
}
return o.SourceAccountID, true
}
// HasSourceAccountID returns a boolean if a field has been set.
func (o *Transaction) HasSourceAccountID() bool {
if o != nil && !IsNil(o.SourceAccountID) {
return true
}
return false
}
// SetSourceAccountID gets a reference to the given string and assigns it to the SourceAccountID field.
func (o *Transaction) SetSourceAccountID(v string) {
o.SourceAccountID = &v
}
// GetDestinationAccountID returns the DestinationAccountID field value if set, zero value otherwise.
func (o *Transaction) GetDestinationAccountID() string {
if o == nil || IsNil(o.DestinationAccountID) {
var ret string
return ret
}
return *o.DestinationAccountID
}
// GetDestinationAccountIDOk returns a tuple with the DestinationAccountID field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Transaction) GetDestinationAccountIDOk() (*string, bool) {
if o == nil || IsNil(o.DestinationAccountID) {
return nil, false
}
return o.DestinationAccountID, true
}
// HasDestinationAccountID returns a boolean if a field has been set.
func (o *Transaction) HasDestinationAccountID() bool {
if o != nil && !IsNil(o.DestinationAccountID) {
return true
}
return false
}
// SetDestinationAccountID gets a reference to the given string and assigns it to the DestinationAccountID field.
func (o *Transaction) SetDestinationAccountID(v string) {
o.DestinationAccountID = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Transaction) GetMetadata() map[string]string {
if o == nil {
var ret map[string]string
return ret
}
return o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Transaction) GetMetadataOk() (*map[string]string, bool) {
if o == nil || IsNil(o.Metadata) {
return nil, false
}
return &o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *Transaction) HasMetadata() bool {
if o != nil && IsNil(o.Metadata) {
return true
}
return false
}
// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field.
func (o *Transaction) SetMetadata(v map[string]string) {
o.Metadata = v
}
func (o Transaction) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Transaction) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["id"] = o.Id
if !IsNil(o.RelatedTransactionID) {
toSerialize["relatedTransactionID"] = o.RelatedTransactionID
}
toSerialize["createdAt"] = o.CreatedAt
toSerialize["updatedAt"] = o.UpdatedAt
toSerialize["currency"] = o.Currency
if !IsNil(o.Scheme) {
toSerialize["scheme"] = o.Scheme
}
toSerialize["type"] = o.Type
toSerialize["status"] = o.Status
toSerialize["amount"] = o.Amount
if !IsNil(o.SourceAccountID) {
toSerialize["sourceAccountID"] = o.SourceAccountID
}
if !IsNil(o.DestinationAccountID) {
toSerialize["destinationAccountID"] = o.DestinationAccountID
}
if o.Metadata != nil {
toSerialize["metadata"] = o.Metadata
}
return toSerialize, nil
}
type NullableTransaction struct {
value *Transaction
isSet bool
}
func (v NullableTransaction) Get() *Transaction {
return v.value
}
func (v *NullableTransaction) Set(val *Transaction) {
v.value = val
v.isSet = true
}
func (v NullableTransaction) IsSet() bool {
return v.isSet
}
func (v *NullableTransaction) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTransaction(val *Transaction) *NullableTransaction {
return &NullableTransaction{value: val, isSet: true}
}
func (v NullableTransaction) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTransaction) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}