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

757 lines
24 KiB
Go
Raw 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 StatementItemsInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StatementItemsInner{}
// StatementItemsInner struct for StatementItemsInner
type StatementItemsInner struct {
// Унікальний id транзакції
Id *string `json:"id,omitempty"`
// Час транзакції в секундах в форматі Unix time
Time *float32 `json:"time,omitempty"`
// Опис транзакцій
Description *string `json:"description,omitempty"`
// Код типу транзакції (Merchant Category Code), відповідно ISO 18245
Mcc *float32 `json:"mcc,omitempty"`
// Оригінальний код типу транзакції (Merchant Category Code), відповідно ISO 18245
OriginalMcc *float32 `json:"originalMcc,omitempty"`
// Статус блокування суми (детальніше у [wiki](https://en.wikipedia.org/wiki/Authorization_hold))
Hold *bool `json:"hold,omitempty"`
// Сума у валюті рахунку в мінімальних одиницях валюти (копійках, центах)
Amount *float32 `json:"amount,omitempty"`
// Сума у валюті транзакції в мінімальних одиницях валюти (копійках, центах)
OperationAmount *float32 `json:"operationAmount,omitempty"`
// Код валюти рахунку відповідно ISO 4217
CurrencyCode *float32 `json:"currencyCode,omitempty"`
// Розмір комісії в мінімальних одиницях валюти (копійках, центах)
CommissionRate *float32 `json:"commissionRate,omitempty"`
// Розмір кешбеку в мінімальних одиницях валюти (копійках, центах)
CashbackAmount *float32 `json:"cashbackAmount,omitempty"`
// Баланс рахунку в мінімальних одиницях валюти (копійках, центах)
Balance *float32 `json:"balance,omitempty"`
// Коментар до переказу, уведений користувачем. Якщо не вказаний, поле буде відсутнім
Comment *string `json:"comment,omitempty"`
// Номер квитанції для check.gov.ua. Поле може бути відсутнім
ReceiptId *string `json:"receiptId,omitempty"`
// Номер квитанції ФОПа, приходить у випадку якщо це операція із зарахуванням коштів
InvoiceId *string `json:"invoiceId,omitempty"`
// ЄДРПОУ контрагента, присутній лише для елементів виписки рахунків ФОП
CounterEdrpou *string `json:"counterEdrpou,omitempty"`
// IBAN контрагента, присутній лише для елементів виписки рахунків ФОП
CounterIban *string `json:"counterIban,omitempty"`
// Найменування контрагента
CounterName *string `json:"counterName,omitempty"`
}
// NewStatementItemsInner instantiates a new StatementItemsInner 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 NewStatementItemsInner() *StatementItemsInner {
this := StatementItemsInner{}
return &this
}
// NewStatementItemsInnerWithDefaults instantiates a new StatementItemsInner 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 NewStatementItemsInnerWithDefaults() *StatementItemsInner {
this := StatementItemsInner{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *StatementItemsInner) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *StatementItemsInner) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *StatementItemsInner) SetId(v string) {
o.Id = &v
}
// GetTime returns the Time field value if set, zero value otherwise.
func (o *StatementItemsInner) GetTime() float32 {
if o == nil || IsNil(o.Time) {
var ret float32
return ret
}
return *o.Time
}
// GetTimeOk returns a tuple with the Time field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetTimeOk() (*float32, bool) {
if o == nil || IsNil(o.Time) {
return nil, false
}
return o.Time, true
}
// HasTime returns a boolean if a field has been set.
func (o *StatementItemsInner) HasTime() bool {
if o != nil && !IsNil(o.Time) {
return true
}
return false
}
// SetTime gets a reference to the given float32 and assigns it to the Time field.
func (o *StatementItemsInner) SetTime(v float32) {
o.Time = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *StatementItemsInner) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *StatementItemsInner) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *StatementItemsInner) SetDescription(v string) {
o.Description = &v
}
// GetMcc returns the Mcc field value if set, zero value otherwise.
func (o *StatementItemsInner) GetMcc() float32 {
if o == nil || IsNil(o.Mcc) {
var ret float32
return ret
}
return *o.Mcc
}
// GetMccOk returns a tuple with the Mcc field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetMccOk() (*float32, bool) {
if o == nil || IsNil(o.Mcc) {
return nil, false
}
return o.Mcc, true
}
// HasMcc returns a boolean if a field has been set.
func (o *StatementItemsInner) HasMcc() bool {
if o != nil && !IsNil(o.Mcc) {
return true
}
return false
}
// SetMcc gets a reference to the given float32 and assigns it to the Mcc field.
func (o *StatementItemsInner) SetMcc(v float32) {
o.Mcc = &v
}
// GetOriginalMcc returns the OriginalMcc field value if set, zero value otherwise.
func (o *StatementItemsInner) GetOriginalMcc() float32 {
if o == nil || IsNil(o.OriginalMcc) {
var ret float32
return ret
}
return *o.OriginalMcc
}
// GetOriginalMccOk returns a tuple with the OriginalMcc field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetOriginalMccOk() (*float32, bool) {
if o == nil || IsNil(o.OriginalMcc) {
return nil, false
}
return o.OriginalMcc, true
}
// HasOriginalMcc returns a boolean if a field has been set.
func (o *StatementItemsInner) HasOriginalMcc() bool {
if o != nil && !IsNil(o.OriginalMcc) {
return true
}
return false
}
// SetOriginalMcc gets a reference to the given float32 and assigns it to the OriginalMcc field.
func (o *StatementItemsInner) SetOriginalMcc(v float32) {
o.OriginalMcc = &v
}
// GetHold returns the Hold field value if set, zero value otherwise.
func (o *StatementItemsInner) GetHold() bool {
if o == nil || IsNil(o.Hold) {
var ret bool
return ret
}
return *o.Hold
}
// GetHoldOk returns a tuple with the Hold field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetHoldOk() (*bool, bool) {
if o == nil || IsNil(o.Hold) {
return nil, false
}
return o.Hold, true
}
// HasHold returns a boolean if a field has been set.
func (o *StatementItemsInner) HasHold() bool {
if o != nil && !IsNil(o.Hold) {
return true
}
return false
}
// SetHold gets a reference to the given bool and assigns it to the Hold field.
func (o *StatementItemsInner) SetHold(v bool) {
o.Hold = &v
}
// GetAmount returns the Amount field value if set, zero value otherwise.
func (o *StatementItemsInner) GetAmount() float32 {
if o == nil || IsNil(o.Amount) {
var ret float32
return ret
}
return *o.Amount
}
// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetAmountOk() (*float32, bool) {
if o == nil || IsNil(o.Amount) {
return nil, false
}
return o.Amount, true
}
// HasAmount returns a boolean if a field has been set.
func (o *StatementItemsInner) HasAmount() bool {
if o != nil && !IsNil(o.Amount) {
return true
}
return false
}
// SetAmount gets a reference to the given float32 and assigns it to the Amount field.
func (o *StatementItemsInner) SetAmount(v float32) {
o.Amount = &v
}
// GetOperationAmount returns the OperationAmount field value if set, zero value otherwise.
func (o *StatementItemsInner) GetOperationAmount() float32 {
if o == nil || IsNil(o.OperationAmount) {
var ret float32
return ret
}
return *o.OperationAmount
}
// GetOperationAmountOk returns a tuple with the OperationAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetOperationAmountOk() (*float32, bool) {
if o == nil || IsNil(o.OperationAmount) {
return nil, false
}
return o.OperationAmount, true
}
// HasOperationAmount returns a boolean if a field has been set.
func (o *StatementItemsInner) HasOperationAmount() bool {
if o != nil && !IsNil(o.OperationAmount) {
return true
}
return false
}
// SetOperationAmount gets a reference to the given float32 and assigns it to the OperationAmount field.
func (o *StatementItemsInner) SetOperationAmount(v float32) {
o.OperationAmount = &v
}
// GetCurrencyCode returns the CurrencyCode field value if set, zero value otherwise.
func (o *StatementItemsInner) GetCurrencyCode() float32 {
if o == nil || IsNil(o.CurrencyCode) {
var ret float32
return ret
}
return *o.CurrencyCode
}
// GetCurrencyCodeOk returns a tuple with the CurrencyCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetCurrencyCodeOk() (*float32, bool) {
if o == nil || IsNil(o.CurrencyCode) {
return nil, false
}
return o.CurrencyCode, true
}
// HasCurrencyCode returns a boolean if a field has been set.
func (o *StatementItemsInner) HasCurrencyCode() bool {
if o != nil && !IsNil(o.CurrencyCode) {
return true
}
return false
}
// SetCurrencyCode gets a reference to the given float32 and assigns it to the CurrencyCode field.
func (o *StatementItemsInner) SetCurrencyCode(v float32) {
o.CurrencyCode = &v
}
// GetCommissionRate returns the CommissionRate field value if set, zero value otherwise.
func (o *StatementItemsInner) GetCommissionRate() float32 {
if o == nil || IsNil(o.CommissionRate) {
var ret float32
return ret
}
return *o.CommissionRate
}
// GetCommissionRateOk returns a tuple with the CommissionRate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetCommissionRateOk() (*float32, bool) {
if o == nil || IsNil(o.CommissionRate) {
return nil, false
}
return o.CommissionRate, true
}
// HasCommissionRate returns a boolean if a field has been set.
func (o *StatementItemsInner) HasCommissionRate() bool {
if o != nil && !IsNil(o.CommissionRate) {
return true
}
return false
}
// SetCommissionRate gets a reference to the given float32 and assigns it to the CommissionRate field.
func (o *StatementItemsInner) SetCommissionRate(v float32) {
o.CommissionRate = &v
}
// GetCashbackAmount returns the CashbackAmount field value if set, zero value otherwise.
func (o *StatementItemsInner) GetCashbackAmount() float32 {
if o == nil || IsNil(o.CashbackAmount) {
var ret float32
return ret
}
return *o.CashbackAmount
}
// GetCashbackAmountOk returns a tuple with the CashbackAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetCashbackAmountOk() (*float32, bool) {
if o == nil || IsNil(o.CashbackAmount) {
return nil, false
}
return o.CashbackAmount, true
}
// HasCashbackAmount returns a boolean if a field has been set.
func (o *StatementItemsInner) HasCashbackAmount() bool {
if o != nil && !IsNil(o.CashbackAmount) {
return true
}
return false
}
// SetCashbackAmount gets a reference to the given float32 and assigns it to the CashbackAmount field.
func (o *StatementItemsInner) SetCashbackAmount(v float32) {
o.CashbackAmount = &v
}
// GetBalance returns the Balance field value if set, zero value otherwise.
func (o *StatementItemsInner) GetBalance() float32 {
if o == nil || IsNil(o.Balance) {
var ret float32
return ret
}
return *o.Balance
}
// GetBalanceOk returns a tuple with the Balance field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetBalanceOk() (*float32, bool) {
if o == nil || IsNil(o.Balance) {
return nil, false
}
return o.Balance, true
}
// HasBalance returns a boolean if a field has been set.
func (o *StatementItemsInner) HasBalance() bool {
if o != nil && !IsNil(o.Balance) {
return true
}
return false
}
// SetBalance gets a reference to the given float32 and assigns it to the Balance field.
func (o *StatementItemsInner) SetBalance(v float32) {
o.Balance = &v
}
// GetComment returns the Comment field value if set, zero value otherwise.
func (o *StatementItemsInner) GetComment() string {
if o == nil || IsNil(o.Comment) {
var ret string
return ret
}
return *o.Comment
}
// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetCommentOk() (*string, bool) {
if o == nil || IsNil(o.Comment) {
return nil, false
}
return o.Comment, true
}
// HasComment returns a boolean if a field has been set.
func (o *StatementItemsInner) HasComment() bool {
if o != nil && !IsNil(o.Comment) {
return true
}
return false
}
// SetComment gets a reference to the given string and assigns it to the Comment field.
func (o *StatementItemsInner) SetComment(v string) {
o.Comment = &v
}
// GetReceiptId returns the ReceiptId field value if set, zero value otherwise.
func (o *StatementItemsInner) GetReceiptId() string {
if o == nil || IsNil(o.ReceiptId) {
var ret string
return ret
}
return *o.ReceiptId
}
// GetReceiptIdOk returns a tuple with the ReceiptId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetReceiptIdOk() (*string, bool) {
if o == nil || IsNil(o.ReceiptId) {
return nil, false
}
return o.ReceiptId, true
}
// HasReceiptId returns a boolean if a field has been set.
func (o *StatementItemsInner) HasReceiptId() bool {
if o != nil && !IsNil(o.ReceiptId) {
return true
}
return false
}
// SetReceiptId gets a reference to the given string and assigns it to the ReceiptId field.
func (o *StatementItemsInner) SetReceiptId(v string) {
o.ReceiptId = &v
}
// GetInvoiceId returns the InvoiceId field value if set, zero value otherwise.
func (o *StatementItemsInner) GetInvoiceId() string {
if o == nil || IsNil(o.InvoiceId) {
var ret string
return ret
}
return *o.InvoiceId
}
// GetInvoiceIdOk returns a tuple with the InvoiceId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetInvoiceIdOk() (*string, bool) {
if o == nil || IsNil(o.InvoiceId) {
return nil, false
}
return o.InvoiceId, true
}
// HasInvoiceId returns a boolean if a field has been set.
func (o *StatementItemsInner) HasInvoiceId() bool {
if o != nil && !IsNil(o.InvoiceId) {
return true
}
return false
}
// SetInvoiceId gets a reference to the given string and assigns it to the InvoiceId field.
func (o *StatementItemsInner) SetInvoiceId(v string) {
o.InvoiceId = &v
}
// GetCounterEdrpou returns the CounterEdrpou field value if set, zero value otherwise.
func (o *StatementItemsInner) GetCounterEdrpou() string {
if o == nil || IsNil(o.CounterEdrpou) {
var ret string
return ret
}
return *o.CounterEdrpou
}
// GetCounterEdrpouOk returns a tuple with the CounterEdrpou field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetCounterEdrpouOk() (*string, bool) {
if o == nil || IsNil(o.CounterEdrpou) {
return nil, false
}
return o.CounterEdrpou, true
}
// HasCounterEdrpou returns a boolean if a field has been set.
func (o *StatementItemsInner) HasCounterEdrpou() bool {
if o != nil && !IsNil(o.CounterEdrpou) {
return true
}
return false
}
// SetCounterEdrpou gets a reference to the given string and assigns it to the CounterEdrpou field.
func (o *StatementItemsInner) SetCounterEdrpou(v string) {
o.CounterEdrpou = &v
}
// GetCounterIban returns the CounterIban field value if set, zero value otherwise.
func (o *StatementItemsInner) GetCounterIban() string {
if o == nil || IsNil(o.CounterIban) {
var ret string
return ret
}
return *o.CounterIban
}
// GetCounterIbanOk returns a tuple with the CounterIban field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetCounterIbanOk() (*string, bool) {
if o == nil || IsNil(o.CounterIban) {
return nil, false
}
return o.CounterIban, true
}
// HasCounterIban returns a boolean if a field has been set.
func (o *StatementItemsInner) HasCounterIban() bool {
if o != nil && !IsNil(o.CounterIban) {
return true
}
return false
}
// SetCounterIban gets a reference to the given string and assigns it to the CounterIban field.
func (o *StatementItemsInner) SetCounterIban(v string) {
o.CounterIban = &v
}
// GetCounterName returns the CounterName field value if set, zero value otherwise.
func (o *StatementItemsInner) GetCounterName() string {
if o == nil || IsNil(o.CounterName) {
var ret string
return ret
}
return *o.CounterName
}
// GetCounterNameOk returns a tuple with the CounterName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StatementItemsInner) GetCounterNameOk() (*string, bool) {
if o == nil || IsNil(o.CounterName) {
return nil, false
}
return o.CounterName, true
}
// HasCounterName returns a boolean if a field has been set.
func (o *StatementItemsInner) HasCounterName() bool {
if o != nil && !IsNil(o.CounterName) {
return true
}
return false
}
// SetCounterName gets a reference to the given string and assigns it to the CounterName field.
func (o *StatementItemsInner) SetCounterName(v string) {
o.CounterName = &v
}
func (o StatementItemsInner) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StatementItemsInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Time) {
toSerialize["time"] = o.Time
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.Mcc) {
toSerialize["mcc"] = o.Mcc
}
if !IsNil(o.OriginalMcc) {
toSerialize["originalMcc"] = o.OriginalMcc
}
if !IsNil(o.Hold) {
toSerialize["hold"] = o.Hold
}
if !IsNil(o.Amount) {
toSerialize["amount"] = o.Amount
}
if !IsNil(o.OperationAmount) {
toSerialize["operationAmount"] = o.OperationAmount
}
if !IsNil(o.CurrencyCode) {
toSerialize["currencyCode"] = o.CurrencyCode
}
if !IsNil(o.CommissionRate) {
toSerialize["commissionRate"] = o.CommissionRate
}
if !IsNil(o.CashbackAmount) {
toSerialize["cashbackAmount"] = o.CashbackAmount
}
if !IsNil(o.Balance) {
toSerialize["balance"] = o.Balance
}
if !IsNil(o.Comment) {
toSerialize["comment"] = o.Comment
}
if !IsNil(o.ReceiptId) {
toSerialize["receiptId"] = o.ReceiptId
}
if !IsNil(o.InvoiceId) {
toSerialize["invoiceId"] = o.InvoiceId
}
if !IsNil(o.CounterEdrpou) {
toSerialize["counterEdrpou"] = o.CounterEdrpou
}
if !IsNil(o.CounterIban) {
toSerialize["counterIban"] = o.CounterIban
}
if !IsNil(o.CounterName) {
toSerialize["counterName"] = o.CounterName
}
return toSerialize, nil
}
type NullableStatementItemsInner struct {
value *StatementItemsInner
isSet bool
}
func (v NullableStatementItemsInner) Get() *StatementItemsInner {
return v.value
}
func (v *NullableStatementItemsInner) Set(val *StatementItemsInner) {
v.value = val
v.isSet = true
}
func (v NullableStatementItemsInner) IsSet() bool {
return v.isSet
}
func (v *NullableStatementItemsInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStatementItemsInner(val *StatementItemsInner) *NullableStatementItemsInner {
return &NullableStatementItemsInner{value: val, isSet: true}
}
func (v NullableStatementItemsInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStatementItemsInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}