mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* 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
145 lines
3.1 KiB
Go
145 lines
3.1 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"
|
|
)
|
|
|
|
// checks if the Balance type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Balance{}
|
|
|
|
// Balance struct for Balance
|
|
type Balance struct {
|
|
Amount string `json:"amount"`
|
|
Currency string `json:"currency"`
|
|
}
|
|
|
|
// NewBalance instantiates a new Balance 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 NewBalance(amount string, currency string) *Balance {
|
|
this := Balance{}
|
|
this.Amount = amount
|
|
this.Currency = currency
|
|
return &this
|
|
}
|
|
|
|
// NewBalanceWithDefaults instantiates a new Balance 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 NewBalanceWithDefaults() *Balance {
|
|
this := Balance{}
|
|
return &this
|
|
}
|
|
|
|
// GetAmount returns the Amount field value
|
|
func (o *Balance) 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 *Balance) GetAmountOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Amount, true
|
|
}
|
|
|
|
// SetAmount sets field value
|
|
func (o *Balance) SetAmount(v string) {
|
|
o.Amount = v
|
|
}
|
|
|
|
// GetCurrency returns the Currency field value
|
|
func (o *Balance) 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 *Balance) GetCurrencyOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Currency, true
|
|
}
|
|
|
|
// SetCurrency sets field value
|
|
func (o *Balance) SetCurrency(v string) {
|
|
o.Currency = v
|
|
}
|
|
|
|
func (o Balance) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Balance) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["amount"] = o.Amount
|
|
toSerialize["currency"] = o.Currency
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableBalance struct {
|
|
value *Balance
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBalance) Get() *Balance {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBalance) Set(val *Balance) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBalance) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBalance) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBalance(val *Balance) *NullableBalance {
|
|
return &NullableBalance{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBalance) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBalance) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|