func (a *AccountApiService) Put_12(ctx context.Context, body AccountSubCreate) (MyAccount, *http.Response, error) {
	var (
		localVarHttpMethod  = strings.ToUpper("Put")
		localVarPostBody    interface{}
		localVarFileName    string
		localVarFileBytes   []byte
		localVarReturnValue MyAccount
	)

	// create path and map variables
	localVarPath := a.client.cfg.BasePath + "/account/sub"

	localVarHeaderParams := make(map[string]string)
	localVarQueryParams := url.Values{}
	localVarFormParams := url.Values{}

	// to determine the Content-Type header
	localVarHttpContentTypes := []string{}

	// set Content-Type header
	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
	if localVarHttpContentType != "" {
		localVarHeaderParams["Content-Type"] = localVarHttpContentType
	}

	// to determine the Accept header
	localVarHttpHeaderAccepts := []string{}

	// set Accept header
	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
	if localVarHttpHeaderAccept != "" {
		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
	}
	// body params
	localVarPostBody = &body
	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
	if err != nil {
		return localVarReturnValue, nil, err
	}

	localVarHttpResponse, err := a.client.callAPI(r)
	if err != nil || localVarHttpResponse == nil {
		return localVarReturnValue, localVarHttpResponse, err
	}

	localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
	localVarHttpResponse.Body.Close()
	if err != nil {
		return localVarReturnValue, localVarHttpResponse, err
	}

	if localVarHttpResponse.StatusCode < 300 {
		// If we succeed, return the data, otherwise pass on to decode error.
		err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
		if err == nil {
			return localVarReturnValue, localVarHttpResponse, err
		}
	}

	if localVarHttpResponse.StatusCode >= 300 {
		newErr := GenericSwaggerError{
			body:  localVarBody,
			error: localVarHttpResponse.Status,
		}

		if localVarHttpResponse.StatusCode == 200 {
			var v MyAccount
			err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
			if err != nil {
				newErr.error = err.Error()
				return localVarReturnValue, localVarHttpResponse, newErr
			}
			newErr.model = v
			return localVarReturnValue, localVarHttpResponse, newErr
		}

		return localVarReturnValue, localVarHttpResponse, newErr
	}

	return localVarReturnValue, localVarHttpResponse, nil
}
/*
AccountApiService Create an sub account

 * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
 * @param body Account sub create representation

@return MyAccount
*/
AccountApiService Create an sub account

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param body Account sub create representation

@return MyAccount
/ * AccountApiService Create an sub account * @param ctx context . Context - for authentication logging cancellation deadlines tracing etc . Passed from http . Request or context . Background () . * @param body Account sub create representation @return MyAccount * /
func (a *AccountApiService) Put_12(ctx context.Context, body AccountSubCreate) (MyAccount, *http.Response, error) {
	var (
		localVarHttpMethod  = strings.ToUpper("Put")
		localVarPostBody    interface{}
		localVarFileName    string
		localVarFileBytes   []byte
		localVarReturnValue MyAccount
	)
	localVarPath := a.client.cfg.BasePath + "/account/sub"
	localVarHeaderParams := make(map[string]string)
	localVarQueryParams := url.Values{}
	localVarFormParams := url.Values{}
	localVarHttpContentTypes := []string{}
	localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
	if localVarHttpContentType != "" {
		localVarHeaderParams["Content-Type"] = localVarHttpContentType
	}
	localVarHttpHeaderAccepts := []string{}
	localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
	if localVarHttpHeaderAccept != "" {
		localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
	}
	localVarPostBody = &body
	r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
	if err != nil {
		return localVarReturnValue, nil, err
	}
	localVarHttpResponse, err := a.client.callAPI(r)
	if err != nil || localVarHttpResponse == nil {
		return localVarReturnValue, localVarHttpResponse, err
	}
	localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
	localVarHttpResponse.Body.Close()
	if err != nil {
		return localVarReturnValue, localVarHttpResponse, err
	}
	if localVarHttpResponse.StatusCode < 300 {
		err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
		if err == nil {
			return localVarReturnValue, localVarHttpResponse, err
		}
	}
	if localVarHttpResponse.StatusCode >= 300 {
		newErr := GenericSwaggerError{
			body:  localVarBody,
			error: localVarHttpResponse.Status,
		}
		if localVarHttpResponse.StatusCode == 200 {
			var v MyAccount
			err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
			if err != nil {
				newErr.error = err.Error()
				return localVarReturnValue, localVarHttpResponse, newErr
			}
			newErr.model = v
			return localVarReturnValue, localVarHttpResponse, newErr
		}
		return localVarReturnValue, localVarHttpResponse, newErr
	}
	return localVarReturnValue, localVarHttpResponse, nil
}
func ( a * AccountApiService ) Put_12 ( ctx context . Context , body AccountSubCreate ) ( MyAccount , * http . Response , error ) { var ( localVarHttpMethod = strings . ToUpper ( " " ) localVarPostBody interface { } localVarFileName string localVarFileBytes [ ] byte localVarReturnValue MyAccount ) localVarPath := a . client . cfg . BasePath + " " localVarHeaderParams := make ( map [ string ] string ) localVarQueryParams := url . Values { } localVarFormParams := url . Values { } localVarHttpContentTypes := [ ] string { } localVarHttpContentType := selectHeaderContentType ( localVarHttpContentTypes ) if localVarHttpContentType != " " { localVarHeaderParams [ " " ] = localVarHttpContentType } localVarHttpHeaderAccepts := [ ] string { } localVarHttpHeaderAccept := selectHeaderAccept ( localVarHttpHeaderAccepts ) if localVarHttpHeaderAccept != " " { localVarHeaderParams [ " " ] = localVarHttpHeaderAccept } localVarPostBody = & body r , err := a . client . prepareRequest ( ctx , localVarPath , localVarHttpMethod , localVarPostBody , localVarHeaderParams , localVarQueryParams , localVarFormParams , localVarFileName , localVarFileBytes ) if err != nil { return localVarReturnValue , nil , err } localVarHttpResponse , err := a . client . callAPI ( r ) if err != nil || localVarHttpResponse == nil { return localVarReturnValue , localVarHttpResponse , err } localVarBody , err := ioutil . ReadAll ( localVarHttpResponse . Body ) localVarHttpResponse . Body . Close ( ) if err != nil { return localVarReturnValue , localVarHttpResponse , err } if localVarHttpResponse . StatusCode < 300 { err = a . client . decode ( & localVarReturnValue , localVarBody , localVarHttpResponse . Header . Get ( " " ) ) if err == nil { return localVarReturnValue , localVarHttpResponse , err } } if localVarHttpResponse . StatusCode >= 300 { newErr := GenericSwaggerError { body : localVarBody , error : localVarHttpResponse . Status , } if localVarHttpResponse . StatusCode == 200 { var v MyAccount err = a . client . decode ( & v , localVarBody , localVarHttpResponse . Header . Get ( " " ) ) if err != nil { newErr . error = err . Error ( ) return localVarReturnValue , localVarHttpResponse , newErr } newErr . model = v return localVarReturnValue , localVarHttpResponse , newErr } return localVarReturnValue , localVarHttpResponse , newErr } return localVarReturnValue , localVarHttpResponse , nil }
AccountApiService Create an sub account
AccountApiService Create an sub account
// create path and map variables // to determine the Content-Type header // set Content-Type header // to determine the Accept header // set Accept header // body params // If we succeed, return the data, otherwise pass on to decode error.