Files
sdk/model_billing_payment_config.go

340 lines
9.5 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the BillingPaymentConfig type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BillingPaymentConfig{}
// BillingPaymentConfig struct for BillingPaymentConfig
type BillingPaymentConfig struct {
ApplicationId *string `json:"applicationId,omitempty"`
Environment *string `json:"environment,omitempty"`
Live *bool `json:"live,omitempty"`
LocationId *string `json:"locationId,omitempty"`
// PayPal is the public PayPal REST v2 posture alongside Square (or in place of Square in countries Square does not serve). Appended last for ZAP wire.
Paypal *BillingPayPalPublicConfig `json:"paypal,omitempty"`
Provider *string `json:"provider,omitempty"`
AdditionalProperties map[string]interface{}
}
type _BillingPaymentConfig BillingPaymentConfig
// NewBillingPaymentConfig instantiates a new BillingPaymentConfig 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 NewBillingPaymentConfig() *BillingPaymentConfig {
this := BillingPaymentConfig{}
return &this
}
// NewBillingPaymentConfigWithDefaults instantiates a new BillingPaymentConfig 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 NewBillingPaymentConfigWithDefaults() *BillingPaymentConfig {
this := BillingPaymentConfig{}
return &this
}
// GetApplicationId returns the ApplicationId field value if set, zero value otherwise.
func (o *BillingPaymentConfig) GetApplicationId() string {
if o == nil || IsNil(o.ApplicationId) {
var ret string
return ret
}
return *o.ApplicationId
}
// GetApplicationIdOk returns a tuple with the ApplicationId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPaymentConfig) GetApplicationIdOk() (*string, bool) {
if o == nil || IsNil(o.ApplicationId) {
return nil, false
}
return o.ApplicationId, true
}
// HasApplicationId returns a boolean if a field has been set.
func (o *BillingPaymentConfig) HasApplicationId() bool {
if o != nil && !IsNil(o.ApplicationId) {
return true
}
return false
}
// SetApplicationId gets a reference to the given string and assigns it to the ApplicationId field.
func (o *BillingPaymentConfig) SetApplicationId(v string) {
o.ApplicationId = &v
}
// GetEnvironment returns the Environment field value if set, zero value otherwise.
func (o *BillingPaymentConfig) GetEnvironment() string {
if o == nil || IsNil(o.Environment) {
var ret string
return ret
}
return *o.Environment
}
// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPaymentConfig) GetEnvironmentOk() (*string, bool) {
if o == nil || IsNil(o.Environment) {
return nil, false
}
return o.Environment, true
}
// HasEnvironment returns a boolean if a field has been set.
func (o *BillingPaymentConfig) HasEnvironment() bool {
if o != nil && !IsNil(o.Environment) {
return true
}
return false
}
// SetEnvironment gets a reference to the given string and assigns it to the Environment field.
func (o *BillingPaymentConfig) SetEnvironment(v string) {
o.Environment = &v
}
// GetLive returns the Live field value if set, zero value otherwise.
func (o *BillingPaymentConfig) GetLive() bool {
if o == nil || IsNil(o.Live) {
var ret bool
return ret
}
return *o.Live
}
// GetLiveOk returns a tuple with the Live field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPaymentConfig) GetLiveOk() (*bool, bool) {
if o == nil || IsNil(o.Live) {
return nil, false
}
return o.Live, true
}
// HasLive returns a boolean if a field has been set.
func (o *BillingPaymentConfig) HasLive() bool {
if o != nil && !IsNil(o.Live) {
return true
}
return false
}
// SetLive gets a reference to the given bool and assigns it to the Live field.
func (o *BillingPaymentConfig) SetLive(v bool) {
o.Live = &v
}
// GetLocationId returns the LocationId field value if set, zero value otherwise.
func (o *BillingPaymentConfig) GetLocationId() string {
if o == nil || IsNil(o.LocationId) {
var ret string
return ret
}
return *o.LocationId
}
// GetLocationIdOk returns a tuple with the LocationId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPaymentConfig) GetLocationIdOk() (*string, bool) {
if o == nil || IsNil(o.LocationId) {
return nil, false
}
return o.LocationId, true
}
// HasLocationId returns a boolean if a field has been set.
func (o *BillingPaymentConfig) HasLocationId() bool {
if o != nil && !IsNil(o.LocationId) {
return true
}
return false
}
// SetLocationId gets a reference to the given string and assigns it to the LocationId field.
func (o *BillingPaymentConfig) SetLocationId(v string) {
o.LocationId = &v
}
// GetPaypal returns the Paypal field value if set, zero value otherwise.
func (o *BillingPaymentConfig) GetPaypal() BillingPayPalPublicConfig {
if o == nil || IsNil(o.Paypal) {
var ret BillingPayPalPublicConfig
return ret
}
return *o.Paypal
}
// GetPaypalOk returns a tuple with the Paypal field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPaymentConfig) GetPaypalOk() (*BillingPayPalPublicConfig, bool) {
if o == nil || IsNil(o.Paypal) {
return nil, false
}
return o.Paypal, true
}
// HasPaypal returns a boolean if a field has been set.
func (o *BillingPaymentConfig) HasPaypal() bool {
if o != nil && !IsNil(o.Paypal) {
return true
}
return false
}
// SetPaypal gets a reference to the given BillingPayPalPublicConfig and assigns it to the Paypal field.
func (o *BillingPaymentConfig) SetPaypal(v BillingPayPalPublicConfig) {
o.Paypal = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *BillingPaymentConfig) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPaymentConfig) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *BillingPaymentConfig) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *BillingPaymentConfig) SetProvider(v string) {
o.Provider = &v
}
func (o BillingPaymentConfig) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BillingPaymentConfig) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ApplicationId) {
toSerialize["applicationId"] = o.ApplicationId
}
if !IsNil(o.Environment) {
toSerialize["environment"] = o.Environment
}
if !IsNil(o.Live) {
toSerialize["live"] = o.Live
}
if !IsNil(o.LocationId) {
toSerialize["locationId"] = o.LocationId
}
if !IsNil(o.Paypal) {
toSerialize["paypal"] = o.Paypal
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *BillingPaymentConfig) UnmarshalJSON(data []byte) (err error) {
varBillingPaymentConfig := _BillingPaymentConfig{}
err = json.Unmarshal(data, &varBillingPaymentConfig)
if err != nil {
return err
}
*o = BillingPaymentConfig(varBillingPaymentConfig)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "applicationId")
delete(additionalProperties, "environment")
delete(additionalProperties, "live")
delete(additionalProperties, "locationId")
delete(additionalProperties, "paypal")
delete(additionalProperties, "provider")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableBillingPaymentConfig struct {
value *BillingPaymentConfig
isSet bool
}
func (v NullableBillingPaymentConfig) Get() *BillingPaymentConfig {
return v.value
}
func (v *NullableBillingPaymentConfig) Set(val *BillingPaymentConfig) {
v.value = val
v.isSet = true
}
func (v NullableBillingPaymentConfig) IsSet() bool {
return v.isSet
}
func (v *NullableBillingPaymentConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBillingPaymentConfig(val *BillingPaymentConfig) *NullableBillingPaymentConfig {
return &NullableBillingPaymentConfig{value: val, isSet: true}
}
func (v NullableBillingPaymentConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBillingPaymentConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}