/*
Management API

API version: 3
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package management

import (
	"encoding/json"

	"github.com/adyen/adyen-go-api-library/v21/src/common"
)

// checks if the Merchant type satisfies the MappedNullable interface at compile time
var _ common.MappedNullable = &Merchant{}

// Merchant struct for Merchant
type Merchant struct {
	Links *MerchantLinks `json:"_links,omitempty"`
	// The [capture delay](https://docs.adyen.com/online-payments/capture#capture-delay) set for the merchant account.  Possible values: * **Immediate** * **Manual** * Number of days from **1** to **29**
	CaptureDelay *string `json:"captureDelay,omitempty"`
	// The unique identifier of the company account this merchant belongs to
	CompanyId *string `json:"companyId,omitempty"`
	// List of available data centers.  Adyen has several data centers around the world.In the URL that you use for making API requests, we recommend you use the live URL prefix from the data center closest to your shoppers.
	DataCenters []DataCenter `json:"dataCenters,omitempty"`
	// The default [`shopperInteraction`](https://docs.adyen.com/api-explorer/#/CheckoutService/v68/post/payments__reqParam_shopperInteraction) value used when processing payments through this merchant account.
	DefaultShopperInteraction *string `json:"defaultShopperInteraction,omitempty"`
	// Your description for the merchant account, maximum 300 characters
	Description *string `json:"description,omitempty"`
	// The unique identifier of the merchant account.
	Id *string `json:"id,omitempty"`
	// The city where the legal entity of this merchant account is registered.
	MerchantCity *string `json:"merchantCity,omitempty"`
	// The name of the legal entity associated with the merchant account.
	Name *string `json:"name,omitempty"`
	// Only applies to merchant accounts managed by Adyen's partners. The name of the pricing plan assigned to the merchant account.
	PricingPlan *string `json:"pricingPlan,omitempty"`
	// The currency of the country where the legal entity of this merchant account is registered. Format: [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, a legal entity based in the United States has USD as the primary settlement currency.
	PrimarySettlementCurrency *string `json:"primarySettlementCurrency,omitempty"`
	// Reference of the merchant account.
	Reference *string `json:"reference,omitempty"`
	// The URL for the ecommerce website used with this merchant account.
	ShopWebAddress *string `json:"shopWebAddress,omitempty"`
	// The status of the merchant account.  Possible values:  * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. You cannot process new payments but you can still modify payments, for example issue refunds. You can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled.
	Status *string `json:"status,omitempty"`
}

// NewMerchant instantiates a new Merchant 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 NewMerchant() *Merchant {
	this := Merchant{}
	return &this
}

// NewMerchantWithDefaults instantiates a new Merchant 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 NewMerchantWithDefaults() *Merchant {
	this := Merchant{}
	return &this
}

// GetLinks returns the Links field value if set, zero value otherwise.
func (o *Merchant) GetLinks() MerchantLinks {
	if o == nil || common.IsNil(o.Links) {
		var ret MerchantLinks
		return ret
	}
	return *o.Links
}

// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetLinksOk() (*MerchantLinks, bool) {
	if o == nil || common.IsNil(o.Links) {
		return nil, false
	}
	return o.Links, true
}

// HasLinks returns a boolean if a field has been set.
func (o *Merchant) HasLinks() bool {
	if o != nil && !common.IsNil(o.Links) {
		return true
	}

	return false
}

// SetLinks gets a reference to the given MerchantLinks and assigns it to the Links field.
func (o *Merchant) SetLinks(v MerchantLinks) {
	o.Links = &v
}

// GetCaptureDelay returns the CaptureDelay field value if set, zero value otherwise.
func (o *Merchant) GetCaptureDelay() string {
	if o == nil || common.IsNil(o.CaptureDelay) {
		var ret string
		return ret
	}
	return *o.CaptureDelay
}

// GetCaptureDelayOk returns a tuple with the CaptureDelay field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetCaptureDelayOk() (*string, bool) {
	if o == nil || common.IsNil(o.CaptureDelay) {
		return nil, false
	}
	return o.CaptureDelay, true
}

// HasCaptureDelay returns a boolean if a field has been set.
func (o *Merchant) HasCaptureDelay() bool {
	if o != nil && !common.IsNil(o.CaptureDelay) {
		return true
	}

	return false
}

// SetCaptureDelay gets a reference to the given string and assigns it to the CaptureDelay field.
func (o *Merchant) SetCaptureDelay(v string) {
	o.CaptureDelay = &v
}

// GetCompanyId returns the CompanyId field value if set, zero value otherwise.
func (o *Merchant) GetCompanyId() string {
	if o == nil || common.IsNil(o.CompanyId) {
		var ret string
		return ret
	}
	return *o.CompanyId
}

// GetCompanyIdOk returns a tuple with the CompanyId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetCompanyIdOk() (*string, bool) {
	if o == nil || common.IsNil(o.CompanyId) {
		return nil, false
	}
	return o.CompanyId, true
}

// HasCompanyId returns a boolean if a field has been set.
func (o *Merchant) HasCompanyId() bool {
	if o != nil && !common.IsNil(o.CompanyId) {
		return true
	}

	return false
}

// SetCompanyId gets a reference to the given string and assigns it to the CompanyId field.
func (o *Merchant) SetCompanyId(v string) {
	o.CompanyId = &v
}

// GetDataCenters returns the DataCenters field value if set, zero value otherwise.
func (o *Merchant) GetDataCenters() []DataCenter {
	if o == nil || common.IsNil(o.DataCenters) {
		var ret []DataCenter
		return ret
	}
	return o.DataCenters
}

// GetDataCentersOk returns a tuple with the DataCenters field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetDataCentersOk() ([]DataCenter, bool) {
	if o == nil || common.IsNil(o.DataCenters) {
		return nil, false
	}
	return o.DataCenters, true
}

// HasDataCenters returns a boolean if a field has been set.
func (o *Merchant) HasDataCenters() bool {
	if o != nil && !common.IsNil(o.DataCenters) {
		return true
	}

	return false
}

// SetDataCenters gets a reference to the given []DataCenter and assigns it to the DataCenters field.
func (o *Merchant) SetDataCenters(v []DataCenter) {
	o.DataCenters = v
}

// GetDefaultShopperInteraction returns the DefaultShopperInteraction field value if set, zero value otherwise.
func (o *Merchant) GetDefaultShopperInteraction() string {
	if o == nil || common.IsNil(o.DefaultShopperInteraction) {
		var ret string
		return ret
	}
	return *o.DefaultShopperInteraction
}

// GetDefaultShopperInteractionOk returns a tuple with the DefaultShopperInteraction field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetDefaultShopperInteractionOk() (*string, bool) {
	if o == nil || common.IsNil(o.DefaultShopperInteraction) {
		return nil, false
	}
	return o.DefaultShopperInteraction, true
}

// HasDefaultShopperInteraction returns a boolean if a field has been set.
func (o *Merchant) HasDefaultShopperInteraction() bool {
	if o != nil && !common.IsNil(o.DefaultShopperInteraction) {
		return true
	}

	return false
}

// SetDefaultShopperInteraction gets a reference to the given string and assigns it to the DefaultShopperInteraction field.
func (o *Merchant) SetDefaultShopperInteraction(v string) {
	o.DefaultShopperInteraction = &v
}

// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Merchant) GetDescription() string {
	if o == nil || common.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 *Merchant) GetDescriptionOk() (*string, bool) {
	if o == nil || common.IsNil(o.Description) {
		return nil, false
	}
	return o.Description, true
}

// HasDescription returns a boolean if a field has been set.
func (o *Merchant) HasDescription() bool {
	if o != nil && !common.IsNil(o.Description) {
		return true
	}

	return false
}

// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Merchant) SetDescription(v string) {
	o.Description = &v
}

// GetId returns the Id field value if set, zero value otherwise.
func (o *Merchant) GetId() string {
	if o == nil || common.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 *Merchant) GetIdOk() (*string, bool) {
	if o == nil || common.IsNil(o.Id) {
		return nil, false
	}
	return o.Id, true
}

// HasId returns a boolean if a field has been set.
func (o *Merchant) HasId() bool {
	if o != nil && !common.IsNil(o.Id) {
		return true
	}

	return false
}

// SetId gets a reference to the given string and assigns it to the Id field.
func (o *Merchant) SetId(v string) {
	o.Id = &v
}

// GetMerchantCity returns the MerchantCity field value if set, zero value otherwise.
func (o *Merchant) GetMerchantCity() string {
	if o == nil || common.IsNil(o.MerchantCity) {
		var ret string
		return ret
	}
	return *o.MerchantCity
}

// GetMerchantCityOk returns a tuple with the MerchantCity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetMerchantCityOk() (*string, bool) {
	if o == nil || common.IsNil(o.MerchantCity) {
		return nil, false
	}
	return o.MerchantCity, true
}

// HasMerchantCity returns a boolean if a field has been set.
func (o *Merchant) HasMerchantCity() bool {
	if o != nil && !common.IsNil(o.MerchantCity) {
		return true
	}

	return false
}

// SetMerchantCity gets a reference to the given string and assigns it to the MerchantCity field.
func (o *Merchant) SetMerchantCity(v string) {
	o.MerchantCity = &v
}

// GetName returns the Name field value if set, zero value otherwise.
func (o *Merchant) GetName() string {
	if o == nil || common.IsNil(o.Name) {
		var ret string
		return ret
	}
	return *o.Name
}

// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetNameOk() (*string, bool) {
	if o == nil || common.IsNil(o.Name) {
		return nil, false
	}
	return o.Name, true
}

// HasName returns a boolean if a field has been set.
func (o *Merchant) HasName() bool {
	if o != nil && !common.IsNil(o.Name) {
		return true
	}

	return false
}

// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Merchant) SetName(v string) {
	o.Name = &v
}

// GetPricingPlan returns the PricingPlan field value if set, zero value otherwise.
func (o *Merchant) GetPricingPlan() string {
	if o == nil || common.IsNil(o.PricingPlan) {
		var ret string
		return ret
	}
	return *o.PricingPlan
}

// GetPricingPlanOk returns a tuple with the PricingPlan field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetPricingPlanOk() (*string, bool) {
	if o == nil || common.IsNil(o.PricingPlan) {
		return nil, false
	}
	return o.PricingPlan, true
}

// HasPricingPlan returns a boolean if a field has been set.
func (o *Merchant) HasPricingPlan() bool {
	if o != nil && !common.IsNil(o.PricingPlan) {
		return true
	}

	return false
}

// SetPricingPlan gets a reference to the given string and assigns it to the PricingPlan field.
func (o *Merchant) SetPricingPlan(v string) {
	o.PricingPlan = &v
}

// GetPrimarySettlementCurrency returns the PrimarySettlementCurrency field value if set, zero value otherwise.
func (o *Merchant) GetPrimarySettlementCurrency() string {
	if o == nil || common.IsNil(o.PrimarySettlementCurrency) {
		var ret string
		return ret
	}
	return *o.PrimarySettlementCurrency
}

// GetPrimarySettlementCurrencyOk returns a tuple with the PrimarySettlementCurrency field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetPrimarySettlementCurrencyOk() (*string, bool) {
	if o == nil || common.IsNil(o.PrimarySettlementCurrency) {
		return nil, false
	}
	return o.PrimarySettlementCurrency, true
}

// HasPrimarySettlementCurrency returns a boolean if a field has been set.
func (o *Merchant) HasPrimarySettlementCurrency() bool {
	if o != nil && !common.IsNil(o.PrimarySettlementCurrency) {
		return true
	}

	return false
}

// SetPrimarySettlementCurrency gets a reference to the given string and assigns it to the PrimarySettlementCurrency field.
func (o *Merchant) SetPrimarySettlementCurrency(v string) {
	o.PrimarySettlementCurrency = &v
}

// GetReference returns the Reference field value if set, zero value otherwise.
func (o *Merchant) GetReference() string {
	if o == nil || common.IsNil(o.Reference) {
		var ret string
		return ret
	}
	return *o.Reference
}

// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetReferenceOk() (*string, bool) {
	if o == nil || common.IsNil(o.Reference) {
		return nil, false
	}
	return o.Reference, true
}

// HasReference returns a boolean if a field has been set.
func (o *Merchant) HasReference() bool {
	if o != nil && !common.IsNil(o.Reference) {
		return true
	}

	return false
}

// SetReference gets a reference to the given string and assigns it to the Reference field.
func (o *Merchant) SetReference(v string) {
	o.Reference = &v
}

// GetShopWebAddress returns the ShopWebAddress field value if set, zero value otherwise.
func (o *Merchant) GetShopWebAddress() string {
	if o == nil || common.IsNil(o.ShopWebAddress) {
		var ret string
		return ret
	}
	return *o.ShopWebAddress
}

// GetShopWebAddressOk returns a tuple with the ShopWebAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetShopWebAddressOk() (*string, bool) {
	if o == nil || common.IsNil(o.ShopWebAddress) {
		return nil, false
	}
	return o.ShopWebAddress, true
}

// HasShopWebAddress returns a boolean if a field has been set.
func (o *Merchant) HasShopWebAddress() bool {
	if o != nil && !common.IsNil(o.ShopWebAddress) {
		return true
	}

	return false
}

// SetShopWebAddress gets a reference to the given string and assigns it to the ShopWebAddress field.
func (o *Merchant) SetShopWebAddress(v string) {
	o.ShopWebAddress = &v
}

// GetStatus returns the Status field value if set, zero value otherwise.
func (o *Merchant) GetStatus() string {
	if o == nil || common.IsNil(o.Status) {
		var ret string
		return ret
	}
	return *o.Status
}

// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Merchant) GetStatusOk() (*string, bool) {
	if o == nil || common.IsNil(o.Status) {
		return nil, false
	}
	return o.Status, true
}

// HasStatus returns a boolean if a field has been set.
func (o *Merchant) HasStatus() bool {
	if o != nil && !common.IsNil(o.Status) {
		return true
	}

	return false
}

// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *Merchant) SetStatus(v string) {
	o.Status = &v
}

func (o Merchant) MarshalJSON() ([]byte, error) {
	toSerialize, err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o Merchant) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !common.IsNil(o.Links) {
		toSerialize["_links"] = o.Links
	}
	if !common.IsNil(o.CaptureDelay) {
		toSerialize["captureDelay"] = o.CaptureDelay
	}
	if !common.IsNil(o.CompanyId) {
		toSerialize["companyId"] = o.CompanyId
	}
	if !common.IsNil(o.DataCenters) {
		toSerialize["dataCenters"] = o.DataCenters
	}
	if !common.IsNil(o.DefaultShopperInteraction) {
		toSerialize["defaultShopperInteraction"] = o.DefaultShopperInteraction
	}
	if !common.IsNil(o.Description) {
		toSerialize["description"] = o.Description
	}
	if !common.IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !common.IsNil(o.MerchantCity) {
		toSerialize["merchantCity"] = o.MerchantCity
	}
	if !common.IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !common.IsNil(o.PricingPlan) {
		toSerialize["pricingPlan"] = o.PricingPlan
	}
	if !common.IsNil(o.PrimarySettlementCurrency) {
		toSerialize["primarySettlementCurrency"] = o.PrimarySettlementCurrency
	}
	if !common.IsNil(o.Reference) {
		toSerialize["reference"] = o.Reference
	}
	if !common.IsNil(o.ShopWebAddress) {
		toSerialize["shopWebAddress"] = o.ShopWebAddress
	}
	if !common.IsNil(o.Status) {
		toSerialize["status"] = o.Status
	}
	return toSerialize, nil
}

type NullableMerchant struct {
	value *Merchant
	isSet bool
}

func (v NullableMerchant) Get() *Merchant {
	return v.value
}

func (v *NullableMerchant) Set(val *Merchant) {
	v.value = val
	v.isSet = true
}

func (v NullableMerchant) IsSet() bool {
	return v.isSet
}

func (v *NullableMerchant) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableMerchant(val *Merchant) *NullableMerchant {
	return &NullableMerchant{value: val, isSet: true}
}

func (v NullableMerchant) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableMerchant) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}
