go-monobank/model_currency_info_inner.go
2024-04-10 22:18:44 +03:00

310 lines
10 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Monobank open API
API для отримання інформації про виписки та стан особистого рахунку та рахунків ФОП. Для надання доступу потрібно пройти авторизацію у особистому кабінеті https://api.monobank.ua/ та отримати токен для персонального використання. Якщо у вас є запитання щодо роботи API, запрошуємо до ком'юніті у [Telegram-групі](https://t.me/joinchat/FiAEWhDf-QzTqM4wzEtffw). API недоступне для клієнтів до 16 років, дані за дитячими рахунками доступні з батьківського акаунту. Якщо у вас є сервіс і ви хочете централізовано приєднатися до API для надання послуг клієнтам, потрібно підключитися до [API для провайдерів послуг](/docs/corporate.html), що має більше можливостей. Якщо дані клієнтів не будуть надходити на ваші сервери або ви робите сервіс для своєї родини, використання корпоративного API необов'язкове. Розробка бібліотек або програм, які будуть використовувати клієнти особисто (дані клієнта не будуть проходити черeз вузли розробника), також не потребують використання корпоративного API. Це надасть змогу клієнтам monobank авторизуватись у вашому сервісі (наприклад, у фінансовому менеджері) для надання інформації про стан рахунку або виписки. У разі виявлення експлуатації цього API в якості корпоративного, банк залишає за собою право накласти санкції на компанію.
API version: v2303
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package monobank
import (
"encoding/json"
)
// checks if the CurrencyInfoInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CurrencyInfoInner{}
// CurrencyInfoInner struct for CurrencyInfoInner
type CurrencyInfoInner struct {
// Код валюти рахунку відповідно ISO 4217
CurrencyCodeA *float32 `json:"currencyCodeA,omitempty"`
// Код валюти рахунку відповідно ISO 4217
CurrencyCodeB *float32 `json:"currencyCodeB,omitempty"`
// Час курсу в секундах в форматі Unix time
Date *float32 `json:"date,omitempty"`
RateSell *float32 `json:"rateSell,omitempty"`
RateBuy *float32 `json:"rateBuy,omitempty"`
RateCross *float32 `json:"rateCross,omitempty"`
}
// NewCurrencyInfoInner instantiates a new CurrencyInfoInner 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 NewCurrencyInfoInner() *CurrencyInfoInner {
this := CurrencyInfoInner{}
return &this
}
// NewCurrencyInfoInnerWithDefaults instantiates a new CurrencyInfoInner 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 NewCurrencyInfoInnerWithDefaults() *CurrencyInfoInner {
this := CurrencyInfoInner{}
return &this
}
// GetCurrencyCodeA returns the CurrencyCodeA field value if set, zero value otherwise.
func (o *CurrencyInfoInner) GetCurrencyCodeA() float32 {
if o == nil || IsNil(o.CurrencyCodeA) {
var ret float32
return ret
}
return *o.CurrencyCodeA
}
// GetCurrencyCodeAOk returns a tuple with the CurrencyCodeA field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CurrencyInfoInner) GetCurrencyCodeAOk() (*float32, bool) {
if o == nil || IsNil(o.CurrencyCodeA) {
return nil, false
}
return o.CurrencyCodeA, true
}
// HasCurrencyCodeA returns a boolean if a field has been set.
func (o *CurrencyInfoInner) HasCurrencyCodeA() bool {
if o != nil && !IsNil(o.CurrencyCodeA) {
return true
}
return false
}
// SetCurrencyCodeA gets a reference to the given float32 and assigns it to the CurrencyCodeA field.
func (o *CurrencyInfoInner) SetCurrencyCodeA(v float32) {
o.CurrencyCodeA = &v
}
// GetCurrencyCodeB returns the CurrencyCodeB field value if set, zero value otherwise.
func (o *CurrencyInfoInner) GetCurrencyCodeB() float32 {
if o == nil || IsNil(o.CurrencyCodeB) {
var ret float32
return ret
}
return *o.CurrencyCodeB
}
// GetCurrencyCodeBOk returns a tuple with the CurrencyCodeB field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CurrencyInfoInner) GetCurrencyCodeBOk() (*float32, bool) {
if o == nil || IsNil(o.CurrencyCodeB) {
return nil, false
}
return o.CurrencyCodeB, true
}
// HasCurrencyCodeB returns a boolean if a field has been set.
func (o *CurrencyInfoInner) HasCurrencyCodeB() bool {
if o != nil && !IsNil(o.CurrencyCodeB) {
return true
}
return false
}
// SetCurrencyCodeB gets a reference to the given float32 and assigns it to the CurrencyCodeB field.
func (o *CurrencyInfoInner) SetCurrencyCodeB(v float32) {
o.CurrencyCodeB = &v
}
// GetDate returns the Date field value if set, zero value otherwise.
func (o *CurrencyInfoInner) GetDate() float32 {
if o == nil || IsNil(o.Date) {
var ret float32
return ret
}
return *o.Date
}
// GetDateOk returns a tuple with the Date field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CurrencyInfoInner) GetDateOk() (*float32, bool) {
if o == nil || IsNil(o.Date) {
return nil, false
}
return o.Date, true
}
// HasDate returns a boolean if a field has been set.
func (o *CurrencyInfoInner) HasDate() bool {
if o != nil && !IsNil(o.Date) {
return true
}
return false
}
// SetDate gets a reference to the given float32 and assigns it to the Date field.
func (o *CurrencyInfoInner) SetDate(v float32) {
o.Date = &v
}
// GetRateSell returns the RateSell field value if set, zero value otherwise.
func (o *CurrencyInfoInner) GetRateSell() float32 {
if o == nil || IsNil(o.RateSell) {
var ret float32
return ret
}
return *o.RateSell
}
// GetRateSellOk returns a tuple with the RateSell field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CurrencyInfoInner) GetRateSellOk() (*float32, bool) {
if o == nil || IsNil(o.RateSell) {
return nil, false
}
return o.RateSell, true
}
// HasRateSell returns a boolean if a field has been set.
func (o *CurrencyInfoInner) HasRateSell() bool {
if o != nil && !IsNil(o.RateSell) {
return true
}
return false
}
// SetRateSell gets a reference to the given float32 and assigns it to the RateSell field.
func (o *CurrencyInfoInner) SetRateSell(v float32) {
o.RateSell = &v
}
// GetRateBuy returns the RateBuy field value if set, zero value otherwise.
func (o *CurrencyInfoInner) GetRateBuy() float32 {
if o == nil || IsNil(o.RateBuy) {
var ret float32
return ret
}
return *o.RateBuy
}
// GetRateBuyOk returns a tuple with the RateBuy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CurrencyInfoInner) GetRateBuyOk() (*float32, bool) {
if o == nil || IsNil(o.RateBuy) {
return nil, false
}
return o.RateBuy, true
}
// HasRateBuy returns a boolean if a field has been set.
func (o *CurrencyInfoInner) HasRateBuy() bool {
if o != nil && !IsNil(o.RateBuy) {
return true
}
return false
}
// SetRateBuy gets a reference to the given float32 and assigns it to the RateBuy field.
func (o *CurrencyInfoInner) SetRateBuy(v float32) {
o.RateBuy = &v
}
// GetRateCross returns the RateCross field value if set, zero value otherwise.
func (o *CurrencyInfoInner) GetRateCross() float32 {
if o == nil || IsNil(o.RateCross) {
var ret float32
return ret
}
return *o.RateCross
}
// GetRateCrossOk returns a tuple with the RateCross field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CurrencyInfoInner) GetRateCrossOk() (*float32, bool) {
if o == nil || IsNil(o.RateCross) {
return nil, false
}
return o.RateCross, true
}
// HasRateCross returns a boolean if a field has been set.
func (o *CurrencyInfoInner) HasRateCross() bool {
if o != nil && !IsNil(o.RateCross) {
return true
}
return false
}
// SetRateCross gets a reference to the given float32 and assigns it to the RateCross field.
func (o *CurrencyInfoInner) SetRateCross(v float32) {
o.RateCross = &v
}
func (o CurrencyInfoInner) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CurrencyInfoInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CurrencyCodeA) {
toSerialize["currencyCodeA"] = o.CurrencyCodeA
}
if !IsNil(o.CurrencyCodeB) {
toSerialize["currencyCodeB"] = o.CurrencyCodeB
}
if !IsNil(o.Date) {
toSerialize["date"] = o.Date
}
if !IsNil(o.RateSell) {
toSerialize["rateSell"] = o.RateSell
}
if !IsNil(o.RateBuy) {
toSerialize["rateBuy"] = o.RateBuy
}
if !IsNil(o.RateCross) {
toSerialize["rateCross"] = o.RateCross
}
return toSerialize, nil
}
type NullableCurrencyInfoInner struct {
value *CurrencyInfoInner
isSet bool
}
func (v NullableCurrencyInfoInner) Get() *CurrencyInfoInner {
return v.value
}
func (v *NullableCurrencyInfoInner) Set(val *CurrencyInfoInner) {
v.value = val
v.isSet = true
}
func (v NullableCurrencyInfoInner) IsSet() bool {
return v.isSet
}
func (v *NullableCurrencyInfoInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCurrencyInfoInner(val *CurrencyInfoInner) *NullableCurrencyInfoInner {
return &NullableCurrencyInfoInner{value: val, isSet: true}
}
func (v NullableCurrencyInfoInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCurrencyInfoInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}