diff --git a/api/openapi.yaml b/api/openapi.yaml index 54e673f..d1b54e2 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -226,7 +226,6 @@ paths: - availabilityByWarehouseId: "40" schema: $ref: '#/components/schemas/PriceAndAvailabilityRequest' - required: true responses: "200": content: diff --git a/api_product_catalog.go b/api_product_catalog.go index 38975f3..764dfe4 100644 --- a/api_product_catalog.go +++ b/api_product_catalog.go @@ -791,9 +791,9 @@ type ApiPostPriceandavailabilityRequest struct { iMCustomerNumber *string iMCountryCode *string iMCorrelationID *string - priceAndAvailabilityRequest *PriceAndAvailabilityRequest includeProductAttributes *bool iMSenderID *string + priceAndAvailabilityRequest *PriceAndAvailabilityRequest } // Pass boolean value as input, if true the response will contain warehouse availability details, if false the response will not hold warehouse availability details @@ -826,11 +826,6 @@ func (r ApiPostPriceandavailabilityRequest) IMCorrelationID(iMCorrelationID stri return r } -func (r ApiPostPriceandavailabilityRequest) PriceAndAvailabilityRequest(priceAndAvailabilityRequest PriceAndAvailabilityRequest) ApiPostPriceandavailabilityRequest { - r.priceAndAvailabilityRequest = &priceAndAvailabilityRequest - return r -} - // Pass boolean value as input, if true the response will contain detailed attributes related to the Product, if false or not sent the response will contain very few Product details. func (r ApiPostPriceandavailabilityRequest) IncludeProductAttributes(includeProductAttributes bool) ApiPostPriceandavailabilityRequest { r.includeProductAttributes = &includeProductAttributes @@ -843,6 +838,11 @@ func (r ApiPostPriceandavailabilityRequest) IMSenderID(iMSenderID string) ApiPos return r } +func (r ApiPostPriceandavailabilityRequest) PriceAndAvailabilityRequest(priceAndAvailabilityRequest PriceAndAvailabilityRequest) ApiPostPriceandavailabilityRequest { + r.priceAndAvailabilityRequest = &priceAndAvailabilityRequest + return r +} + func (r ApiPostPriceandavailabilityRequest) Execute() ([]PriceAndAvailabilityResponseInner, *http.Response, error) { return r.ApiService.PostPriceandavailabilityExecute(r) } @@ -909,9 +909,6 @@ func (a *ProductCatalogAPIService) PostPriceandavailabilityExecute(r ApiPostPric if strlen(*r.iMCorrelationID) > 32 { return localVarReturnValue, nil, reportError("iMCorrelationID must have less than 32 elements") } - if r.priceAndAvailabilityRequest == nil { - return localVarReturnValue, nil, reportError("priceAndAvailabilityRequest is required and must be specified") - } parameterAddToHeaderOrQuery(localVarQueryParams, "includeAvailability", r.includeAvailability, "form", "") parameterAddToHeaderOrQuery(localVarQueryParams, "includePricing", r.includePricing, "form", "") diff --git a/docs/ProductCatalogAPI.md b/docs/ProductCatalogAPI.md index d78db26..9491462 100644 --- a/docs/ProductCatalogAPI.md +++ b/docs/ProductCatalogAPI.md @@ -269,7 +269,7 @@ Name | Type | Description | Notes ## PostPriceandavailability -> []PriceAndAvailabilityResponseInner PostPriceandavailability(ctx).IncludeAvailability(includeAvailability).IncludePricing(includePricing).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).PriceAndAvailabilityRequest(priceAndAvailabilityRequest).IncludeProductAttributes(includeProductAttributes).IMSenderID(iMSenderID).Execute() +> []PriceAndAvailabilityResponseInner PostPriceandavailability(ctx).IncludeAvailability(includeAvailability).IncludePricing(includePricing).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IncludeProductAttributes(includeProductAttributes).IMSenderID(iMSenderID).PriceAndAvailabilityRequest(priceAndAvailabilityRequest).Execute() Price and Availability @@ -293,13 +293,13 @@ func main() { iMCustomerNumber := "20-222222" // string | Your unique Ingram Micro customer number. iMCountryCode := "US" // string | Two-character ISO country code. iMCorrelationID := "fbac82ba-cf0a-4bcf-fc03-0c5084" // string | Unique transaction number to identify each transaction across all the systems. - priceAndAvailabilityRequest := *openapiclient.NewPriceAndAvailabilityRequest() // PriceAndAvailabilityRequest | includeProductAttributes := true // bool | Pass boolean value as input, if true the response will contain detailed attributes related to the Product, if false or not sent the response will contain very few Product details. (optional) iMSenderID := "MyCompany" // string | Unique value used to identify the sender of the transaction. Example: MyCompany (optional) + priceAndAvailabilityRequest := *openapiclient.NewPriceAndAvailabilityRequest() // PriceAndAvailabilityRequest | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProductCatalogAPI.PostPriceandavailability(context.Background()).IncludeAvailability(includeAvailability).IncludePricing(includePricing).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).PriceAndAvailabilityRequest(priceAndAvailabilityRequest).IncludeProductAttributes(includeProductAttributes).IMSenderID(iMSenderID).Execute() + resp, r, err := apiClient.ProductCatalogAPI.PostPriceandavailability(context.Background()).IncludeAvailability(includeAvailability).IncludePricing(includePricing).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IncludeProductAttributes(includeProductAttributes).IMSenderID(iMSenderID).PriceAndAvailabilityRequest(priceAndAvailabilityRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ProductCatalogAPI.PostPriceandavailability``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -325,9 +325,9 @@ Name | Type | Description | Notes **iMCustomerNumber** | **string** | Your unique Ingram Micro customer number. | **iMCountryCode** | **string** | Two-character ISO country code. | **iMCorrelationID** | **string** | Unique transaction number to identify each transaction across all the systems. | - **priceAndAvailabilityRequest** | [**PriceAndAvailabilityRequest**](PriceAndAvailabilityRequest.md) | | **includeProductAttributes** | **bool** | Pass boolean value as input, if true the response will contain detailed attributes related to the Product, if false or not sent the response will contain very few Product details. | **iMSenderID** | **string** | Unique value used to identify the sender of the transaction. Example: MyCompany | + **priceAndAvailabilityRequest** | [**PriceAndAvailabilityRequest**](PriceAndAvailabilityRequest.md) | | ### Return type