-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates for routes
- Loading branch information
Showing
46 changed files
with
343 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.0.2 | ||
4.0.2-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* | ||
* WIRE API | ||
* | ||
* Moov WIRE () implements an HTTP API for creating, parsing and validating WIRE files. | ||
* | ||
* API version: v1 | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
import ( | ||
"context" | ||
"io/ioutil" | ||
"net/http" | ||
"net/url" | ||
"fmt" | ||
"strings" | ||
"github.com/antihax/optional" | ||
) | ||
|
||
// Linger please | ||
var ( | ||
_ context.Context | ||
) | ||
|
||
type FEDWireMessageFileApiService service | ||
|
||
/* | ||
FEDWireMessageFileApiService Add FEDWireMessage to File | ||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). | ||
* @param fileId File ID | ||
* @param fedWireMessage | ||
* @param optional nil or *AddFEDWireMessageToFileOpts - Optional Parameters: | ||
* @param "XRequestId" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs | ||
* @param "XIdempotencyKey" (optional.String) - Idempotent key in the header which expires after 24 hours. These strings should contain enough entropy for to not collide with each other in your requests. | ||
*/ | ||
|
||
type AddFEDWireMessageToFileOpts struct { | ||
XRequestId optional.String | ||
XIdempotencyKey optional.String | ||
} | ||
|
||
func (a *FEDWireMessageFileApiService) AddFEDWireMessageToFile(ctx context.Context, fileId string, fedWireMessage FedWireMessage, localVarOptionals *AddFEDWireMessageToFileOpts) (*http.Response, error) { | ||
var ( | ||
localVarHttpMethod = http.MethodPost | ||
localVarPostBody interface{} | ||
localVarFormFileName string | ||
localVarFileName string | ||
localVarFileBytes []byte | ||
) | ||
|
||
// create path and map variables | ||
localVarPath := a.client.cfg.BasePath + "/files/{file_id}/FEDWireMessage" | ||
localVarPath = strings.Replace(localVarPath, "{"+"file_id"+"}", fmt.Sprintf("%v", fileId), -1) | ||
|
||
localVarHeaderParams := make(map[string]string) | ||
localVarQueryParams := url.Values{} | ||
localVarFormParams := url.Values{} | ||
|
||
// to determine the Content-Type header | ||
localVarHttpContentTypes := []string{"application/json"} | ||
|
||
// 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 | ||
} | ||
if localVarOptionals != nil && localVarOptionals.XRequestId.IsSet() { | ||
localVarHeaderParams["X-Request-Id"] = parameterToString(localVarOptionals.XRequestId.Value(), "") | ||
} | ||
if localVarOptionals != nil && localVarOptionals.XIdempotencyKey.IsSet() { | ||
localVarHeaderParams["X-Idempotency-Key"] = parameterToString(localVarOptionals.XIdempotencyKey.Value(), "") | ||
} | ||
// body params | ||
localVarPostBody = &fedWireMessage | ||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
localVarHttpResponse, err := a.client.callAPI(r) | ||
if err != nil || localVarHttpResponse == nil { | ||
return localVarHttpResponse, err | ||
} | ||
|
||
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) | ||
localVarHttpResponse.Body.Close() | ||
if err != nil { | ||
return localVarHttpResponse, err | ||
} | ||
|
||
if localVarHttpResponse.StatusCode >= 300 { | ||
newErr := GenericOpenAPIError{ | ||
body: localVarBody, | ||
error: localVarHttpResponse.Status, | ||
} | ||
return localVarHttpResponse, newErr | ||
} | ||
|
||
return localVarHttpResponse, nil | ||
} |
Oops, something went wrong.