From c6ac354110d3791e055e915d4e0f9335250817ef Mon Sep 17 00:00:00 2001 From: ingrammicro-xvantage Date: Fri, 3 Jan 2025 17:13:55 +0000 Subject: [PATCH] Update from https://github.com/ingrammicro-xvantage/xi-sdk-openapispec/commit/80993156b14791796b6e10412f0b7f25b0f1f165 --- api/openapi.yaml | 2 + docs/PriceAndAvailabilityRequest.md | 24 +++++++++- model_price_and_availability_request.go | 64 ++++++++++++++++--------- 3 files changed, 66 insertions(+), 24 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index 9b9cd2d..69746dc 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -9417,10 +9417,12 @@ components: showAvailableDiscounts: description: Boolean value that will display Discount details in the response when true. + nullable: true type: boolean showReserveInventoryDetails: description: Boolean value that will display reserve inventory details in the response when true. + nullable: true type: boolean specialBidNumber: description: Pre-approved special pricing/bid number provided to the reseller diff --git a/docs/PriceAndAvailabilityRequest.md b/docs/PriceAndAvailabilityRequest.md index 4b9c5c7..1518198 100644 --- a/docs/PriceAndAvailabilityRequest.md +++ b/docs/PriceAndAvailabilityRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ShowAvailableDiscounts** | Pointer to **bool** | Boolean value that will display Discount details in the response when true. | [optional] -**ShowReserveInventoryDetails** | Pointer to **bool** | Boolean value that will display reserve inventory details in the response when true. | [optional] +**ShowAvailableDiscounts** | Pointer to **NullableBool** | Boolean value that will display Discount details in the response when true. | [optional] +**ShowReserveInventoryDetails** | Pointer to **NullableBool** | Boolean value that will display reserve inventory details in the response when true. | [optional] **SpecialBidNumber** | Pointer to **NullableString** | Pre-approved special pricing/bid number provided to the reseller by the vendor for special pricing and discounts. Used to track the bid number where different line items have different bid numbers. | [optional] **AvailabilityByWarehouse** | Pointer to [**[]PriceAndAvailabilityRequestAvailabilityByWarehouseInner**](PriceAndAvailabilityRequestAvailabilityByWarehouseInner.md) | | [optional] **Products** | Pointer to [**[]PriceAndAvailabilityRequestProductsInner**](PriceAndAvailabilityRequestProductsInner.md) | | [optional] @@ -55,6 +55,16 @@ SetShowAvailableDiscounts sets ShowAvailableDiscounts field to given value. HasShowAvailableDiscounts returns a boolean if a field has been set. +### SetShowAvailableDiscountsNil + +`func (o *PriceAndAvailabilityRequest) SetShowAvailableDiscountsNil(b bool)` + + SetShowAvailableDiscountsNil sets the value for ShowAvailableDiscounts to be an explicit nil + +### UnsetShowAvailableDiscounts +`func (o *PriceAndAvailabilityRequest) UnsetShowAvailableDiscounts()` + +UnsetShowAvailableDiscounts ensures that no value is present for ShowAvailableDiscounts, not even an explicit nil ### GetShowReserveInventoryDetails `func (o *PriceAndAvailabilityRequest) GetShowReserveInventoryDetails() bool` @@ -80,6 +90,16 @@ SetShowReserveInventoryDetails sets ShowReserveInventoryDetails field to given v HasShowReserveInventoryDetails returns a boolean if a field has been set. +### SetShowReserveInventoryDetailsNil + +`func (o *PriceAndAvailabilityRequest) SetShowReserveInventoryDetailsNil(b bool)` + + SetShowReserveInventoryDetailsNil sets the value for ShowReserveInventoryDetails to be an explicit nil + +### UnsetShowReserveInventoryDetails +`func (o *PriceAndAvailabilityRequest) UnsetShowReserveInventoryDetails()` + +UnsetShowReserveInventoryDetails ensures that no value is present for ShowReserveInventoryDetails, not even an explicit nil ### GetSpecialBidNumber `func (o *PriceAndAvailabilityRequest) GetSpecialBidNumber() string` diff --git a/model_price_and_availability_request.go b/model_price_and_availability_request.go index 4f0b230..c3cdef0 100644 --- a/model_price_and_availability_request.go +++ b/model_price_and_availability_request.go @@ -20,9 +20,9 @@ var _ MappedNullable = &PriceAndAvailabilityRequest{} // PriceAndAvailabilityRequest struct for PriceAndAvailabilityRequest type PriceAndAvailabilityRequest struct { // Boolean value that will display Discount details in the response when true. - ShowAvailableDiscounts *bool `json:"showAvailableDiscounts,omitempty"` + ShowAvailableDiscounts NullableBool `json:"showAvailableDiscounts,omitempty"` // Boolean value that will display reserve inventory details in the response when true. - ShowReserveInventoryDetails *bool `json:"showReserveInventoryDetails,omitempty"` + ShowReserveInventoryDetails NullableBool `json:"showReserveInventoryDetails,omitempty"` // Pre-approved special pricing/bid number provided to the reseller by the vendor for special pricing and discounts. Used to track the bid number where different line items have different bid numbers. SpecialBidNumber NullableString `json:"specialBidNumber,omitempty"` AvailabilityByWarehouse []PriceAndAvailabilityRequestAvailabilityByWarehouseInner `json:"availabilityByWarehouse,omitempty"` @@ -47,68 +47,88 @@ func NewPriceAndAvailabilityRequestWithDefaults() *PriceAndAvailabilityRequest { return &this } -// GetShowAvailableDiscounts returns the ShowAvailableDiscounts field value if set, zero value otherwise. +// GetShowAvailableDiscounts returns the ShowAvailableDiscounts field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PriceAndAvailabilityRequest) GetShowAvailableDiscounts() bool { - if o == nil || IsNil(o.ShowAvailableDiscounts) { + if o == nil || IsNil(o.ShowAvailableDiscounts.Get()) { var ret bool return ret } - return *o.ShowAvailableDiscounts + return *o.ShowAvailableDiscounts.Get() } // GetShowAvailableDiscountsOk returns a tuple with the ShowAvailableDiscounts field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PriceAndAvailabilityRequest) GetShowAvailableDiscountsOk() (*bool, bool) { - if o == nil || IsNil(o.ShowAvailableDiscounts) { + if o == nil { return nil, false } - return o.ShowAvailableDiscounts, true + return o.ShowAvailableDiscounts.Get(), o.ShowAvailableDiscounts.IsSet() } // HasShowAvailableDiscounts returns a boolean if a field has been set. func (o *PriceAndAvailabilityRequest) HasShowAvailableDiscounts() bool { - if o != nil && !IsNil(o.ShowAvailableDiscounts) { + if o != nil && o.ShowAvailableDiscounts.IsSet() { return true } return false } -// SetShowAvailableDiscounts gets a reference to the given bool and assigns it to the ShowAvailableDiscounts field. +// SetShowAvailableDiscounts gets a reference to the given NullableBool and assigns it to the ShowAvailableDiscounts field. func (o *PriceAndAvailabilityRequest) SetShowAvailableDiscounts(v bool) { - o.ShowAvailableDiscounts = &v + o.ShowAvailableDiscounts.Set(&v) +} +// SetShowAvailableDiscountsNil sets the value for ShowAvailableDiscounts to be an explicit nil +func (o *PriceAndAvailabilityRequest) SetShowAvailableDiscountsNil() { + o.ShowAvailableDiscounts.Set(nil) +} + +// UnsetShowAvailableDiscounts ensures that no value is present for ShowAvailableDiscounts, not even an explicit nil +func (o *PriceAndAvailabilityRequest) UnsetShowAvailableDiscounts() { + o.ShowAvailableDiscounts.Unset() } -// GetShowReserveInventoryDetails returns the ShowReserveInventoryDetails field value if set, zero value otherwise. +// GetShowReserveInventoryDetails returns the ShowReserveInventoryDetails field value if set, zero value otherwise (both if not set or set to explicit null). func (o *PriceAndAvailabilityRequest) GetShowReserveInventoryDetails() bool { - if o == nil || IsNil(o.ShowReserveInventoryDetails) { + if o == nil || IsNil(o.ShowReserveInventoryDetails.Get()) { var ret bool return ret } - return *o.ShowReserveInventoryDetails + return *o.ShowReserveInventoryDetails.Get() } // GetShowReserveInventoryDetailsOk returns a tuple with the ShowReserveInventoryDetails field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *PriceAndAvailabilityRequest) GetShowReserveInventoryDetailsOk() (*bool, bool) { - if o == nil || IsNil(o.ShowReserveInventoryDetails) { + if o == nil { return nil, false } - return o.ShowReserveInventoryDetails, true + return o.ShowReserveInventoryDetails.Get(), o.ShowReserveInventoryDetails.IsSet() } // HasShowReserveInventoryDetails returns a boolean if a field has been set. func (o *PriceAndAvailabilityRequest) HasShowReserveInventoryDetails() bool { - if o != nil && !IsNil(o.ShowReserveInventoryDetails) { + if o != nil && o.ShowReserveInventoryDetails.IsSet() { return true } return false } -// SetShowReserveInventoryDetails gets a reference to the given bool and assigns it to the ShowReserveInventoryDetails field. +// SetShowReserveInventoryDetails gets a reference to the given NullableBool and assigns it to the ShowReserveInventoryDetails field. func (o *PriceAndAvailabilityRequest) SetShowReserveInventoryDetails(v bool) { - o.ShowReserveInventoryDetails = &v + o.ShowReserveInventoryDetails.Set(&v) +} +// SetShowReserveInventoryDetailsNil sets the value for ShowReserveInventoryDetails to be an explicit nil +func (o *PriceAndAvailabilityRequest) SetShowReserveInventoryDetailsNil() { + o.ShowReserveInventoryDetails.Set(nil) +} + +// UnsetShowReserveInventoryDetails ensures that no value is present for ShowReserveInventoryDetails, not even an explicit nil +func (o *PriceAndAvailabilityRequest) UnsetShowReserveInventoryDetails() { + o.ShowReserveInventoryDetails.Unset() } // GetSpecialBidNumber returns the SpecialBidNumber field value if set, zero value otherwise (both if not set or set to explicit null). @@ -261,11 +281,11 @@ func (o PriceAndAvailabilityRequest) MarshalJSON() ([]byte, error) { func (o PriceAndAvailabilityRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.ShowAvailableDiscounts) { - toSerialize["showAvailableDiscounts"] = o.ShowAvailableDiscounts + if o.ShowAvailableDiscounts.IsSet() { + toSerialize["showAvailableDiscounts"] = o.ShowAvailableDiscounts.Get() } - if !IsNil(o.ShowReserveInventoryDetails) { - toSerialize["showReserveInventoryDetails"] = o.ShowReserveInventoryDetails + if o.ShowReserveInventoryDetails.IsSet() { + toSerialize["showReserveInventoryDetails"] = o.ShowReserveInventoryDetails.Get() } if o.SpecialBidNumber.IsSet() { toSerialize["specialBidNumber"] = o.SpecialBidNumber.Get()