/// <summary>
        /// Update Addresses This operation allows to update a Shopify subscription addresses.
        /// </summary>
        /// <exception cref="Wallee.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="spaceId"></param>
        /// <param name="updateRequest"></param>
        /// <returns>ApiResponse of ShopifySubscriptionVersion</returns>
        public ApiResponse <ShopifySubscriptionVersion> UpdateAddressesWithHttpInfo(long?spaceId, ShopifySubscriptionUpdateAddressesRequest updateRequest)
        {
            // verify the required parameter 'spaceId' is set
            if (spaceId == null)
            {
                throw new ApiException(400, "Missing required parameter 'spaceId' when calling ShopifySubscriptionService->UpdateAddresses");
            }
            // verify the required parameter 'updateRequest' is set
            if (updateRequest == null)
            {
                throw new ApiException(400, "Missing required parameter 'updateRequest' when calling ShopifySubscriptionService->UpdateAddresses");
            }

            var    localVarPath         = "/shopify-subscription/update-addresses";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json;charset=utf-8"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json;charset=utf-8"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (spaceId != null)
            {
                localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "spaceId", spaceId));                  // query parameter
            }
            if (updateRequest != null && updateRequest.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(updateRequest); // http body (model) parameter
            }
            else
            {
                localVarPostBody = updateRequest; // byte array
            }


            this.Configuration.ApiClient.ResetTimeout();
            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath,
                                                                                                 Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                 localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("UpdateAddresses", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <ShopifySubscriptionVersion>(localVarStatusCode,
                                                                localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                                (ShopifySubscriptionVersion)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ShopifySubscriptionVersion))));
        }
        /// <summary>
        /// Update Addresses This operation allows to update a Shopify subscription addresses.
        /// </summary>
        /// <exception cref="Wallee.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="spaceId"></param>
        /// <param name="updateRequest"></param>
        /// <returns>ShopifySubscriptionVersion</returns>
        public ShopifySubscriptionVersion UpdateAddresses(long?spaceId, ShopifySubscriptionUpdateAddressesRequest updateRequest)
        {
            ApiResponse <ShopifySubscriptionVersion> localVarResponse = UpdateAddressesWithHttpInfo(spaceId, updateRequest);

            return(localVarResponse.Data);
        }