From e2428c8b458ad11180d475479f56a68986f8faae Mon Sep 17 00:00:00 2001 From: Ellington Steanes <19161310+ESteanes@users.noreply.github.com> Date: Tue, 1 Oct 2024 20:25:03 +1000 Subject: [PATCH] gofmt --- datafetcher/upclient/api_accounts.go | 61 ++++--- datafetcher/upclient/api_attachments.go | 49 +++--- datafetcher/upclient/api_categories.go | 76 +++++---- datafetcher/upclient/api_tags.go | 73 ++++----- datafetcher/upclient/api_transactions.go | 139 ++++++++-------- datafetcher/upclient/api_utility_endpoints.go | 27 ++-- datafetcher/upclient/api_webhooks.go | 152 +++++++++--------- datafetcher/upclient/client.go | 147 +++++++++-------- datafetcher/upclient/configuration.go | 19 ++- .../upclient/model_account_resource.go | 22 ++- .../model_account_resource_attributes.go | 24 ++- .../upclient/model_account_resource_links.go | 14 +- .../model_account_resource_relationships.go | 12 +- ...unt_resource_relationships_transactions.go | 6 +- ...source_relationships_transactions_links.go | 14 +- .../upclient/model_account_type_enum.go | 9 +- .../upclient/model_attachment_resource.go | 20 ++- .../model_attachment_resource_attributes.go | 24 ++- ...model_attachment_resource_relationships.go | 12 +- ...ment_resource_relationships_transaction.go | 14 +- ...resource_relationships_transaction_data.go | 14 +- .../model_card_purchase_method_enum.go | 19 ++- .../model_card_purchase_method_object.go | 18 +-- datafetcher/upclient/model_cashback_object.go | 18 +-- ...odel_category_input_resource_identifier.go | 16 +- .../upclient/model_category_resource.go | 22 ++- .../model_category_resource_attributes.go | 14 +- .../model_category_resource_relationships.go | 14 +- ...ategory_resource_relationships_children.go | 16 +- ...ource_relationships_children_data_inner.go | 14 +- ..._category_resource_relationships_parent.go | 16 +- ...gory_resource_relationships_parent_data.go | 14 +- .../upclient/model_create_webhook_request.go | 16 +- .../upclient/model_create_webhook_response.go | 16 +- datafetcher/upclient/model_customer_object.go | 16 +- datafetcher/upclient/model_error_object.go | 22 ++- .../upclient/model_error_object_source.go | 12 +- datafetcher/upclient/model_error_response.go | 16 +- .../upclient/model_get_account_response.go | 16 +- .../upclient/model_get_attachment_response.go | 16 +- .../upclient/model_get_category_response.go | 16 +- .../model_get_transaction_response.go | 16 +- .../upclient/model_get_webhook_response.go | 16 +- .../upclient/model_hold_info_object.go | 18 +-- .../upclient/model_list_accounts_response.go | 18 +-- .../model_list_accounts_response_links.go | 16 +- .../model_list_attachments_response.go | 18 +-- .../model_list_categories_response.go | 16 +- .../upclient/model_list_tags_response.go | 18 +-- .../model_list_transactions_response.go | 18 +-- ...del_list_webhook_delivery_logs_response.go | 20 ++- .../upclient/model_list_webhooks_response.go | 18 +-- datafetcher/upclient/model_money_object.go | 20 ++- datafetcher/upclient/model_note_object.go | 16 +- .../upclient/model_ownership_type_enum.go | 7 +- datafetcher/upclient/model_ping_response.go | 14 +- .../upclient/model_ping_response_meta.go | 16 +- datafetcher/upclient/model_round_up_object.go | 18 +-- .../model_tag_input_resource_identifier.go | 16 +- datafetcher/upclient/model_tag_resource.go | 18 +-- .../upclient/model_transaction_resource.go | 20 ++- .../model_transaction_resource_attributes.go | 46 +++--- ...odel_transaction_resource_relationships.go | 22 ++- ...nsaction_resource_relationships_account.go | 14 +- ...ion_resource_relationships_account_data.go | 14 +- ...ction_resource_relationships_attachment.go | 16 +- ..._resource_relationships_attachment_data.go | 14 +- ...saction_resource_relationships_category.go | 16 +- ...n_resource_relationships_category_links.go | 16 +- ...transaction_resource_relationships_tags.go | 16 +- ..._resource_relationships_tags_data_inner.go | 14 +- ...ction_resource_relationships_tags_links.go | 14 +- ...resource_relationships_transfer_account.go | 18 +-- ...rce_relationships_transfer_account_data.go | 14 +- .../upclient/model_transaction_status_enum.go | 7 +- ...del_update_transaction_category_request.go | 16 +- .../model_update_transaction_tags_request.go | 16 +- .../model_webhook_delivery_log_resource.go | 20 ++- ...ebhook_delivery_log_resource_attributes.go | 20 ++- ...elivery_log_resource_attributes_request.go | 16 +- ...livery_log_resource_attributes_response.go | 18 +-- ...ook_delivery_log_resource_relationships.go | 12 +- ...og_resource_relationships_webhook_event.go | 12 +- ...source_relationships_webhook_event_data.go | 14 +- .../model_webhook_delivery_status_enum.go | 9 +- .../upclient/model_webhook_event_callback.go | 16 +- .../upclient/model_webhook_event_resource.go | 20 ++- ...model_webhook_event_resource_attributes.go | 18 +-- ...el_webhook_event_resource_relationships.go | 14 +- ...ok_event_resource_relationships_webhook.go | 14 +- ...ent_resource_relationships_webhook_data.go | 14 +- .../upclient/model_webhook_event_type_enum.go | 7 +- .../upclient/model_webhook_input_resource.go | 14 +- ...model_webhook_input_resource_attributes.go | 17 +- .../upclient/model_webhook_resource.go | 22 ++- .../model_webhook_resource_attributes.go | 22 ++- .../model_webhook_resource_relationships.go | 12 +- datafetcher/upclient/response.go | 2 +- datafetcher/upclient/utils.go | 4 +- 99 files changed, 1000 insertions(+), 1182 deletions(-) diff --git a/datafetcher/upclient/api_accounts.go b/datafetcher/upclient/api_accounts.go index 02a34c9..3b4944a 100644 --- a/datafetcher/upclient/api_accounts.go +++ b/datafetcher/upclient/api_accounts.go @@ -1,7 +1,7 @@ /* Up API -The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. +The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. API version: v1 */ @@ -19,31 +19,30 @@ import ( "strings" ) - // AccountsAPIService AccountsAPI service type AccountsAPIService service type ApiAccountsGetRequest struct { - ctx context.Context - ApiService *AccountsAPIService - pageSize *int32 - filterAccountType *AccountTypeEnum + ctx context.Context + ApiService *AccountsAPIService + pageSize *int32 + filterAccountType *AccountTypeEnum filterOwnershipType *OwnershipTypeEnum } -// The number of records to return in each page. +// The number of records to return in each page. func (r ApiAccountsGetRequest) PageSize(pageSize int32) ApiAccountsGetRequest { r.pageSize = &pageSize return r } -// The type of account for which to return records. This can be used to filter Savers from spending accounts. +// The type of account for which to return records. This can be used to filter Savers from spending accounts. func (r ApiAccountsGetRequest) FilterAccountType(filterAccountType AccountTypeEnum) ApiAccountsGetRequest { r.filterAccountType = &filterAccountType return r } -// The account ownership structure for which to return records. This can be used to filter 2Up accounts from Up accounts. +// The account ownership structure for which to return records. This can be used to filter 2Up accounts from Up accounts. func (r ApiAccountsGetRequest) FilterOwnershipType(filterOwnershipType OwnershipTypeEnum) ApiAccountsGetRequest { r.filterOwnershipType = &filterOwnershipType return r @@ -60,25 +59,25 @@ Retrieve a paginated list of all accounts for the currently authenticated user. The returned list is paginated and can be scrolled by following the `prev` and `next` links where present. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAccountsGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAccountsGetRequest */ func (a *AccountsAPIService) AccountsGet(ctx context.Context) ApiAccountsGetRequest { return ApiAccountsGetRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ListAccountsResponse +// +// @return ListAccountsResponse func (a *AccountsAPIService) AccountsGetExecute(r ApiAccountsGetRequest) (*ListAccountsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListAccountsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListAccountsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsAPIService.AccountsGet") @@ -156,9 +155,9 @@ func (a *AccountsAPIService) AccountsGetExecute(r ApiAccountsGetRequest) (*ListA } type ApiAccountsIdGetRequest struct { - ctx context.Context + ctx context.Context ApiService *AccountsAPIService - id string + id string } func (r ApiAccountsIdGetRequest) Execute() (*GetAccountResponse, *http.Response, error) { @@ -170,27 +169,27 @@ AccountsIdGet Retrieve account Retrieve a specific account by providing its unique identifier. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id The unique identifier for the account. - @return ApiAccountsIdGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The unique identifier for the account. + @return ApiAccountsIdGetRequest */ func (a *AccountsAPIService) AccountsIdGet(ctx context.Context, id string) ApiAccountsIdGetRequest { return ApiAccountsIdGetRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return GetAccountResponse +// +// @return GetAccountResponse func (a *AccountsAPIService) AccountsIdGetExecute(r ApiAccountsIdGetRequest) (*GetAccountResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetAccountResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetAccountResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsAPIService.AccountsIdGet") diff --git a/datafetcher/upclient/api_attachments.go b/datafetcher/upclient/api_attachments.go index 87fac21..8c35703 100644 --- a/datafetcher/upclient/api_attachments.go +++ b/datafetcher/upclient/api_attachments.go @@ -1,7 +1,7 @@ /* Up API -The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. +The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. API version: v1 */ @@ -19,12 +19,11 @@ import ( "strings" ) - // AttachmentsAPIService AttachmentsAPI service type AttachmentsAPIService service type ApiAttachmentsGetRequest struct { - ctx context.Context + ctx context.Context ApiService *AttachmentsAPIService } @@ -38,25 +37,25 @@ AttachmentsGet List attachments Retrieve a list of all attachments. The returned list is [paginated](#pagination) and can be scrolled by following the `next` and `prev` links where present. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAttachmentsGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAttachmentsGetRequest */ func (a *AttachmentsAPIService) AttachmentsGet(ctx context.Context) ApiAttachmentsGetRequest { return ApiAttachmentsGetRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ListAttachmentsResponse +// +// @return ListAttachmentsResponse func (a *AttachmentsAPIService) AttachmentsGetExecute(r ApiAttachmentsGetRequest) (*ListAttachmentsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListAttachmentsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListAttachmentsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AttachmentsAPIService.AttachmentsGet") @@ -125,9 +124,9 @@ func (a *AttachmentsAPIService) AttachmentsGetExecute(r ApiAttachmentsGetRequest } type ApiAttachmentsIdGetRequest struct { - ctx context.Context + ctx context.Context ApiService *AttachmentsAPIService - id string + id string } func (r ApiAttachmentsIdGetRequest) Execute() (*GetAttachmentResponse, *http.Response, error) { @@ -139,27 +138,27 @@ AttachmentsIdGet Retrieve attachment Retrieve a specific attachment by providing its unique identifier. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id The unique identifier for the attachment. - @return ApiAttachmentsIdGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The unique identifier for the attachment. + @return ApiAttachmentsIdGetRequest */ func (a *AttachmentsAPIService) AttachmentsIdGet(ctx context.Context, id string) ApiAttachmentsIdGetRequest { return ApiAttachmentsIdGetRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return GetAttachmentResponse +// +// @return GetAttachmentResponse func (a *AttachmentsAPIService) AttachmentsIdGetExecute(r ApiAttachmentsIdGetRequest) (*GetAttachmentResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetAttachmentResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetAttachmentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AttachmentsAPIService.AttachmentsIdGet") diff --git a/datafetcher/upclient/api_categories.go b/datafetcher/upclient/api_categories.go index 4153f43..cf1bd4f 100644 --- a/datafetcher/upclient/api_categories.go +++ b/datafetcher/upclient/api_categories.go @@ -1,7 +1,7 @@ /* Up API -The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. +The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. API version: v1 */ @@ -19,17 +19,16 @@ import ( "strings" ) - // CategoriesAPIService CategoriesAPI service type CategoriesAPIService service type ApiCategoriesGetRequest struct { - ctx context.Context - ApiService *CategoriesAPIService + ctx context.Context + ApiService *CategoriesAPIService filterParent *string } -// The unique identifier of a parent category for which to return only its children. Providing an invalid category identifier results in a `404` response. +// The unique identifier of a parent category for which to return only its children. Providing an invalid category identifier results in a `404` response. func (r ApiCategoriesGetRequest) FilterParent(filterParent string) ApiCategoriesGetRequest { r.filterParent = &filterParent return r @@ -45,25 +44,25 @@ CategoriesGet List categories Retrieve a list of all categories and their ancestry. The returned list is not paginated. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCategoriesGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCategoriesGetRequest */ func (a *CategoriesAPIService) CategoriesGet(ctx context.Context) ApiCategoriesGetRequest { return ApiCategoriesGetRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ListCategoriesResponse +// +// @return ListCategoriesResponse func (a *CategoriesAPIService) CategoriesGetExecute(r ApiCategoriesGetRequest) (*ListCategoriesResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListCategoriesResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListCategoriesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CategoriesAPIService.CategoriesGet") @@ -135,9 +134,9 @@ func (a *CategoriesAPIService) CategoriesGetExecute(r ApiCategoriesGetRequest) ( } type ApiCategoriesIdGetRequest struct { - ctx context.Context + ctx context.Context ApiService *CategoriesAPIService - id string + id string } func (r ApiCategoriesIdGetRequest) Execute() (*GetCategoryResponse, *http.Response, error) { @@ -149,27 +148,27 @@ CategoriesIdGet Retrieve category Retrieve a specific category by providing its unique identifier. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id The unique identifier for the category. - @return ApiCategoriesIdGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The unique identifier for the category. + @return ApiCategoriesIdGetRequest */ func (a *CategoriesAPIService) CategoriesIdGet(ctx context.Context, id string) ApiCategoriesIdGetRequest { return ApiCategoriesIdGetRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return GetCategoryResponse +// +// @return GetCategoryResponse func (a *CategoriesAPIService) CategoriesIdGetExecute(r ApiCategoriesIdGetRequest) (*GetCategoryResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetCategoryResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetCategoryResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CategoriesAPIService.CategoriesIdGet") @@ -239,9 +238,9 @@ func (a *CategoriesAPIService) CategoriesIdGetExecute(r ApiCategoriesIdGetReques } type ApiTransactionsTransactionIdRelationshipsCategoryPatchRequest struct { - ctx context.Context - ApiService *CategoriesAPIService - transactionId string + ctx context.Context + ApiService *CategoriesAPIService + transactionId string updateTransactionCategoryRequest *UpdateTransactionCategoryRequest } @@ -266,15 +265,14 @@ The associated category, along with its request URL is also exposed via the `category` relationship on the transaction resource returned from `/transactions/{id}`. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param transactionId The unique identifier for the transaction. - @return ApiTransactionsTransactionIdRelationshipsCategoryPatchRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param transactionId The unique identifier for the transaction. + @return ApiTransactionsTransactionIdRelationshipsCategoryPatchRequest */ func (a *CategoriesAPIService) TransactionsTransactionIdRelationshipsCategoryPatch(ctx context.Context, transactionId string) ApiTransactionsTransactionIdRelationshipsCategoryPatchRequest { return ApiTransactionsTransactionIdRelationshipsCategoryPatchRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, transactionId: transactionId, } } @@ -282,9 +280,9 @@ func (a *CategoriesAPIService) TransactionsTransactionIdRelationshipsCategoryPat // Execute executes the request func (a *CategoriesAPIService) TransactionsTransactionIdRelationshipsCategoryPatchExecute(r ApiTransactionsTransactionIdRelationshipsCategoryPatchRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CategoriesAPIService.TransactionsTransactionIdRelationshipsCategoryPatch") diff --git a/datafetcher/upclient/api_tags.go b/datafetcher/upclient/api_tags.go index 14686c8..5e25aa7 100644 --- a/datafetcher/upclient/api_tags.go +++ b/datafetcher/upclient/api_tags.go @@ -1,7 +1,7 @@ /* Up API -The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. +The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. API version: v1 */ @@ -19,17 +19,16 @@ import ( "strings" ) - // TagsAPIService TagsAPI service type TagsAPIService service type ApiTagsGetRequest struct { - ctx context.Context + ctx context.Context ApiService *TagsAPIService - pageSize *int32 + pageSize *int32 } -// The number of records to return in each page. +// The number of records to return in each page. func (r ApiTagsGetRequest) PageSize(pageSize int32) ApiTagsGetRequest { r.pageSize = &pageSize return r @@ -48,25 +47,25 @@ and `prev` links where present. Results are ordered lexicographically. The `transactions` relationship for each tag exposes a link to get the transactions with the given tag. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTagsGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTagsGetRequest */ func (a *TagsAPIService) TagsGet(ctx context.Context) ApiTagsGetRequest { return ApiTagsGetRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ListTagsResponse +// +// @return ListTagsResponse func (a *TagsAPIService) TagsGetExecute(r ApiTagsGetRequest) (*ListTagsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListTagsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListTagsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagsAPIService.TagsGet") @@ -138,9 +137,9 @@ func (a *TagsAPIService) TagsGetExecute(r ApiTagsGetRequest) (*ListTagsResponse, } type ApiTransactionsTransactionIdRelationshipsTagsDeleteRequest struct { - ctx context.Context - ApiService *TagsAPIService - transactionId string + ctx context.Context + ApiService *TagsAPIService + transactionId string updateTransactionTagsRequest *UpdateTransactionTagsRequest } @@ -162,15 +161,14 @@ success. The associated tags, along with this request URL, are also exposed via the `tags` relationship on the transaction resource returned from `/transactions/{id}`. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param transactionId The unique identifier for the transaction. - @return ApiTransactionsTransactionIdRelationshipsTagsDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param transactionId The unique identifier for the transaction. + @return ApiTransactionsTransactionIdRelationshipsTagsDeleteRequest */ func (a *TagsAPIService) TransactionsTransactionIdRelationshipsTagsDelete(ctx context.Context, transactionId string) ApiTransactionsTransactionIdRelationshipsTagsDeleteRequest { return ApiTransactionsTransactionIdRelationshipsTagsDeleteRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, transactionId: transactionId, } } @@ -178,9 +176,9 @@ func (a *TagsAPIService) TransactionsTransactionIdRelationshipsTagsDelete(ctx co // Execute executes the request func (a *TagsAPIService) TransactionsTransactionIdRelationshipsTagsDeleteExecute(r ApiTransactionsTransactionIdRelationshipsTagsDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagsAPIService.TransactionsTransactionIdRelationshipsTagsDelete") @@ -243,9 +241,9 @@ func (a *TagsAPIService) TransactionsTransactionIdRelationshipsTagsDeleteExecute } type ApiTransactionsTransactionIdRelationshipsTagsPostRequest struct { - ctx context.Context - ApiService *TagsAPIService - transactionId string + ctx context.Context + ApiService *TagsAPIService + transactionId string updateTransactionTagsRequest *UpdateTransactionTagsRequest } @@ -268,15 +266,14 @@ tags, along with this request URL, are also exposed via the `tags` relationship on the transaction resource returned from `/transactions/{id}`. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param transactionId The unique identifier for the transaction. - @return ApiTransactionsTransactionIdRelationshipsTagsPostRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param transactionId The unique identifier for the transaction. + @return ApiTransactionsTransactionIdRelationshipsTagsPostRequest */ func (a *TagsAPIService) TransactionsTransactionIdRelationshipsTagsPost(ctx context.Context, transactionId string) ApiTransactionsTransactionIdRelationshipsTagsPostRequest { return ApiTransactionsTransactionIdRelationshipsTagsPostRequest{ - ApiService: a, - ctx: ctx, + ApiService: a, + ctx: ctx, transactionId: transactionId, } } @@ -284,9 +281,9 @@ func (a *TagsAPIService) TransactionsTransactionIdRelationshipsTagsPost(ctx cont // Execute executes the request func (a *TagsAPIService) TransactionsTransactionIdRelationshipsTagsPostExecute(r ApiTransactionsTransactionIdRelationshipsTagsPostRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagsAPIService.TransactionsTransactionIdRelationshipsTagsPost") diff --git a/datafetcher/upclient/api_transactions.go b/datafetcher/upclient/api_transactions.go index 1cca03f..a06ffc6 100644 --- a/datafetcher/upclient/api_transactions.go +++ b/datafetcher/upclient/api_transactions.go @@ -1,7 +1,7 @@ /* Up API -The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. +The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. API version: v1 */ @@ -20,67 +20,66 @@ import ( "time" ) - // TransactionsAPIService TransactionsAPI service type TransactionsAPIService service type ApiAccountsAccountIdTransactionsGetRequest struct { - ctx context.Context - ApiService *TransactionsAPIService - accountId string - pageSize *int32 - pageBefore *string - pageAfter *string - filterStatus *TransactionStatusEnum - filterSince *time.Time - filterUntil *time.Time + ctx context.Context + ApiService *TransactionsAPIService + accountId string + pageSize *int32 + pageBefore *string + pageAfter *string + filterStatus *TransactionStatusEnum + filterSince *time.Time + filterUntil *time.Time filterCategory *string - filterTag *string + filterTag *string } -// The number of records to return in each page. +// The number of records to return in each page. func (r ApiAccountsAccountIdTransactionsGetRequest) PageSize(pageSize int32) ApiAccountsAccountIdTransactionsGetRequest { r.pageSize = &pageSize return r } -// To view a page before a specific transaction. +// To view a page before a specific transaction. func (r ApiAccountsAccountIdTransactionsGetRequest) PageBefore(pageBefore string) ApiAccountsAccountIdTransactionsGetRequest { r.pageBefore = &pageBefore return r } -// Where to continue paginating across +// Where to continue paginating across func (r ApiAccountsAccountIdTransactionsGetRequest) PageAfter(pageAfter string) ApiAccountsAccountIdTransactionsGetRequest { r.pageAfter = &pageAfter return r } -// The transaction status for which to return records. This can be used to filter `HELD` transactions from those that are `SETTLED`. +// The transaction status for which to return records. This can be used to filter `HELD` transactions from those that are `SETTLED`. func (r ApiAccountsAccountIdTransactionsGetRequest) FilterStatus(filterStatus TransactionStatusEnum) ApiAccountsAccountIdTransactionsGetRequest { r.filterStatus = &filterStatus return r } -// The start date-time from which to return records, formatted according to rfc-3339. Not to be used for pagination purposes. +// The start date-time from which to return records, formatted according to rfc-3339. Not to be used for pagination purposes. func (r ApiAccountsAccountIdTransactionsGetRequest) FilterSince(filterSince time.Time) ApiAccountsAccountIdTransactionsGetRequest { r.filterSince = &filterSince return r } -// The end date-time up to which to return records, formatted according to rfc-3339. Not to be used for pagination purposes. +// The end date-time up to which to return records, formatted according to rfc-3339. Not to be used for pagination purposes. func (r ApiAccountsAccountIdTransactionsGetRequest) FilterUntil(filterUntil time.Time) ApiAccountsAccountIdTransactionsGetRequest { r.filterUntil = &filterUntil return r } -// The category identifier for which to filter transactions. Both parent and child categories can be filtered through this parameter. Providing an invalid category identifier results in a `404` response. +// The category identifier for which to filter transactions. Both parent and child categories can be filtered through this parameter. Providing an invalid category identifier results in a `404` response. func (r ApiAccountsAccountIdTransactionsGetRequest) FilterCategory(filterCategory string) ApiAccountsAccountIdTransactionsGetRequest { r.filterCategory = &filterCategory return r } -// A transaction tag to filter for which to return records. If the tag does not exist, zero records are returned and a success response is given. +// A transaction tag to filter for which to return records. If the tag does not exist, zero records are returned and a success response is given. func (r ApiAccountsAccountIdTransactionsGetRequest) FilterTag(filterTag string) ApiAccountsAccountIdTransactionsGetRequest { r.filterTag = &filterTag return r @@ -101,27 +100,27 @@ specific date range pass one or both of `filter[since]` and **should not** be used for pagination. Results are ordered newest first to oldest last. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param accountId The unique identifier for the account. - @return ApiAccountsAccountIdTransactionsGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param accountId The unique identifier for the account. + @return ApiAccountsAccountIdTransactionsGetRequest */ func (a *TransactionsAPIService) AccountsAccountIdTransactionsGet(ctx context.Context, accountId string) ApiAccountsAccountIdTransactionsGetRequest { return ApiAccountsAccountIdTransactionsGetRequest{ ApiService: a, - ctx: ctx, - accountId: accountId, + ctx: ctx, + accountId: accountId, } } // Execute executes the request -// @return ListTransactionsResponse +// +// @return ListTransactionsResponse func (a *TransactionsAPIService) AccountsAccountIdTransactionsGetExecute(r ApiAccountsAccountIdTransactionsGetRequest) (*ListTransactionsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListTransactionsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListTransactionsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionsAPIService.AccountsAccountIdTransactionsGet") @@ -215,61 +214,61 @@ func (a *TransactionsAPIService) AccountsAccountIdTransactionsGetExecute(r ApiAc } type ApiTransactionsGetRequest struct { - ctx context.Context - ApiService *TransactionsAPIService - pageSize *int32 - pageBefore *string - pageAfter *string - filterStatus *TransactionStatusEnum - filterSince *time.Time - filterUntil *time.Time + ctx context.Context + ApiService *TransactionsAPIService + pageSize *int32 + pageBefore *string + pageAfter *string + filterStatus *TransactionStatusEnum + filterSince *time.Time + filterUntil *time.Time filterCategory *string - filterTag *string + filterTag *string } -// The number of records to return in each page. +// The number of records to return in each page. func (r ApiTransactionsGetRequest) PageSize(pageSize int32) ApiTransactionsGetRequest { r.pageSize = &pageSize return r } -// To view a page before a specific transaction. +// To view a page before a specific transaction. func (r ApiTransactionsGetRequest) PageBefore(pageBefore string) ApiTransactionsGetRequest { r.pageBefore = &pageBefore return r } -// Where to continue paginating across +// Where to continue paginating across func (r ApiTransactionsGetRequest) PageAfter(pageAfter string) ApiTransactionsGetRequest { r.pageAfter = &pageAfter return r } -// The transaction status for which to return records. This can be used to filter `HELD` transactions from those that are `SETTLED`. +// The transaction status for which to return records. This can be used to filter `HELD` transactions from those that are `SETTLED`. func (r ApiTransactionsGetRequest) FilterStatus(filterStatus TransactionStatusEnum) ApiTransactionsGetRequest { r.filterStatus = &filterStatus return r } -// The start date-time from which to return records, formatted according to rfc-3339. Not to be used for pagination purposes. +// The start date-time from which to return records, formatted according to rfc-3339. Not to be used for pagination purposes. func (r ApiTransactionsGetRequest) FilterSince(filterSince time.Time) ApiTransactionsGetRequest { r.filterSince = &filterSince return r } -// The end date-time up to which to return records, formatted according to rfc-3339. Not to be used for pagination purposes. +// The end date-time up to which to return records, formatted according to rfc-3339. Not to be used for pagination purposes. func (r ApiTransactionsGetRequest) FilterUntil(filterUntil time.Time) ApiTransactionsGetRequest { r.filterUntil = &filterUntil return r } -// The category identifier for which to filter transactions. Both parent and child categories can be filtered through this parameter. Providing an invalid category identifier results in a `404` response. +// The category identifier for which to filter transactions. Both parent and child categories can be filtered through this parameter. Providing an invalid category identifier results in a `404` response. func (r ApiTransactionsGetRequest) FilterCategory(filterCategory string) ApiTransactionsGetRequest { r.filterCategory = &filterCategory return r } -// A transaction tag to filter for which to return records. If the tag does not exist, zero records are returned and a success response is given. +// A transaction tag to filter for which to return records. If the tag does not exist, zero records are returned and a success response is given. func (r ApiTransactionsGetRequest) FilterTag(filterTag string) ApiTransactionsGetRequest { r.filterTag = &filterTag return r @@ -290,25 +289,25 @@ narrow the results to a specific date range pass one or both of parameters **should not** be used for pagination. Results are ordered newest first to oldest last. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTransactionsGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTransactionsGetRequest */ func (a *TransactionsAPIService) TransactionsGet(ctx context.Context) ApiTransactionsGetRequest { return ApiTransactionsGetRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ListTransactionsResponse +// +// @return ListTransactionsResponse func (a *TransactionsAPIService) TransactionsGetExecute(r ApiTransactionsGetRequest) (*ListTransactionsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListTransactionsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListTransactionsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionsAPIService.TransactionsGet") @@ -401,9 +400,9 @@ func (a *TransactionsAPIService) TransactionsGetExecute(r ApiTransactionsGetRequ } type ApiTransactionsIdGetRequest struct { - ctx context.Context + ctx context.Context ApiService *TransactionsAPIService - id string + id string } func (r ApiTransactionsIdGetRequest) Execute() (*GetTransactionResponse, *http.Response, error) { @@ -415,27 +414,27 @@ TransactionsIdGet Retrieve transaction Retrieve a specific transaction by providing its unique identifier. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id The unique identifier for the transaction. - @return ApiTransactionsIdGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The unique identifier for the transaction. + @return ApiTransactionsIdGetRequest */ func (a *TransactionsAPIService) TransactionsIdGet(ctx context.Context, id string) ApiTransactionsIdGetRequest { return ApiTransactionsIdGetRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return GetTransactionResponse +// +// @return GetTransactionResponse func (a *TransactionsAPIService) TransactionsIdGetExecute(r ApiTransactionsIdGetRequest) (*GetTransactionResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetTransactionResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetTransactionResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionsAPIService.TransactionsIdGet") diff --git a/datafetcher/upclient/api_utility_endpoints.go b/datafetcher/upclient/api_utility_endpoints.go index b293016..0a3da54 100644 --- a/datafetcher/upclient/api_utility_endpoints.go +++ b/datafetcher/upclient/api_utility_endpoints.go @@ -1,7 +1,7 @@ /* Up API -The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. +The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. API version: v1 */ @@ -18,12 +18,11 @@ import ( "net/url" ) - // UtilityEndpointsAPIService UtilityEndpointsAPI service type UtilityEndpointsAPIService service type ApiUtilPingGetRequest struct { - ctx context.Context + ctx context.Context ApiService *UtilityEndpointsAPIService } @@ -39,25 +38,25 @@ authentication is functioning correctly. On authentication success an HTTP `200` status is returned. On failure an HTTP `401` error response is returned. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUtilPingGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUtilPingGetRequest */ func (a *UtilityEndpointsAPIService) UtilPingGet(ctx context.Context) ApiUtilPingGetRequest { return ApiUtilPingGetRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return PingResponse +// +// @return PingResponse func (a *UtilityEndpointsAPIService) UtilPingGetExecute(r ApiUtilPingGetRequest) (*PingResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *PingResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PingResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UtilityEndpointsAPIService.UtilPingGet") @@ -117,8 +116,8 @@ func (a *UtilityEndpointsAPIService) UtilPingGetExecute(r ApiUtilPingGetRequest) newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/datafetcher/upclient/api_webhooks.go b/datafetcher/upclient/api_webhooks.go index 46f2afd..32f10a3 100644 --- a/datafetcher/upclient/api_webhooks.go +++ b/datafetcher/upclient/api_webhooks.go @@ -1,7 +1,7 @@ /* Up API -The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. +The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. API version: v1 */ @@ -19,17 +19,16 @@ import ( "strings" ) - // WebhooksAPIService WebhooksAPI service type WebhooksAPIService service type ApiWebhooksGetRequest struct { - ctx context.Context + ctx context.Context ApiService *WebhooksAPIService - pageSize *int32 + pageSize *int32 } -// The number of records to return in each page. +// The number of records to return in each page. func (r ApiWebhooksGetRequest) PageSize(pageSize int32) ApiWebhooksGetRequest { r.pageSize = &pageSize return r @@ -47,25 +46,25 @@ Retrieve a list of configured webhooks. The returned list is and `prev` links where present. Results are ordered oldest first to newest last. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiWebhooksGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiWebhooksGetRequest */ func (a *WebhooksAPIService) WebhooksGet(ctx context.Context) ApiWebhooksGetRequest { return ApiWebhooksGetRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return ListWebhooksResponse +// +// @return ListWebhooksResponse func (a *WebhooksAPIService) WebhooksGetExecute(r ApiWebhooksGetRequest) (*ListWebhooksResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListWebhooksResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListWebhooksResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.WebhooksGet") @@ -137,9 +136,9 @@ func (a *WebhooksAPIService) WebhooksGetExecute(r ApiWebhooksGetRequest) (*ListW } type ApiWebhooksIdDeleteRequest struct { - ctx context.Context + ctx context.Context ApiService *WebhooksAPIService - id string + id string } func (r ApiWebhooksIdDeleteRequest) Execute() (*http.Response, error) { @@ -152,25 +151,24 @@ WebhooksIdDelete Delete webhook Delete a specific webhook by providing its unique identifier. Once deleted, webhook events will no longer be sent to the configured URL. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id The unique identifier for the webhook. - @return ApiWebhooksIdDeleteRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The unique identifier for the webhook. + @return ApiWebhooksIdDeleteRequest */ func (a *WebhooksAPIService) WebhooksIdDelete(ctx context.Context, id string) ApiWebhooksIdDeleteRequest { return ApiWebhooksIdDeleteRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request func (a *WebhooksAPIService) WebhooksIdDeleteExecute(r ApiWebhooksIdDeleteRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.WebhooksIdDelete") @@ -231,9 +229,9 @@ func (a *WebhooksAPIService) WebhooksIdDeleteExecute(r ApiWebhooksIdDeleteReques } type ApiWebhooksIdGetRequest struct { - ctx context.Context + ctx context.Context ApiService *WebhooksAPIService - id string + id string } func (r ApiWebhooksIdGetRequest) Execute() (*GetWebhookResponse, *http.Response, error) { @@ -245,27 +243,27 @@ WebhooksIdGet Retrieve webhook Retrieve a specific webhook by providing its unique identifier. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id The unique identifier for the webhook. - @return ApiWebhooksIdGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The unique identifier for the webhook. + @return ApiWebhooksIdGetRequest */ func (a *WebhooksAPIService) WebhooksIdGet(ctx context.Context, id string) ApiWebhooksIdGetRequest { return ApiWebhooksIdGetRequest{ ApiService: a, - ctx: ctx, - id: id, + ctx: ctx, + id: id, } } // Execute executes the request -// @return GetWebhookResponse +// +// @return GetWebhookResponse func (a *WebhooksAPIService) WebhooksIdGetExecute(r ApiWebhooksIdGetRequest) (*GetWebhookResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetWebhookResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetWebhookResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.WebhooksIdGet") @@ -335,8 +333,8 @@ func (a *WebhooksAPIService) WebhooksIdGetExecute(r ApiWebhooksIdGetRequest) (*G } type ApiWebhooksPostRequest struct { - ctx context.Context - ApiService *WebhooksAPIService + ctx context.Context + ApiService *WebhooksAPIService createWebhookRequest *CreateWebhookRequest } @@ -373,25 +371,25 @@ It is probably a good idea to test the webhook by [sending it a `PING` event](#post_webhooks_webhookId_ping) after creating it. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiWebhooksPostRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiWebhooksPostRequest */ func (a *WebhooksAPIService) WebhooksPost(ctx context.Context) ApiWebhooksPostRequest { return ApiWebhooksPostRequest{ ApiService: a, - ctx: ctx, + ctx: ctx, } } // Execute executes the request -// @return CreateWebhookResponse +// +// @return CreateWebhookResponse func (a *WebhooksAPIService) WebhooksPostExecute(r ApiWebhooksPostRequest) (*CreateWebhookResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateWebhookResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateWebhookResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.WebhooksPost") @@ -462,13 +460,13 @@ func (a *WebhooksAPIService) WebhooksPostExecute(r ApiWebhooksPostRequest) (*Cre } type ApiWebhooksWebhookIdLogsGetRequest struct { - ctx context.Context + ctx context.Context ApiService *WebhooksAPIService - webhookId string - pageSize *int32 + webhookId string + pageSize *int32 } -// The number of records to return in each page. +// The number of records to return in each page. func (r ApiWebhooksWebhookIdLogsGetRequest) PageSize(pageSize int32) ApiWebhooksWebhookIdLogsGetRequest { r.pageSize = &pageSize return r @@ -488,27 +486,27 @@ following the `next` and `prev` links where present. Results are ordered newest first to oldest last. Logs may be automatically purged after a period of time. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param webhookId The unique identifier for the webhook. - @return ApiWebhooksWebhookIdLogsGetRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param webhookId The unique identifier for the webhook. + @return ApiWebhooksWebhookIdLogsGetRequest */ func (a *WebhooksAPIService) WebhooksWebhookIdLogsGet(ctx context.Context, webhookId string) ApiWebhooksWebhookIdLogsGetRequest { return ApiWebhooksWebhookIdLogsGetRequest{ ApiService: a, - ctx: ctx, - webhookId: webhookId, + ctx: ctx, + webhookId: webhookId, } } // Execute executes the request -// @return ListWebhookDeliveryLogsResponse +// +// @return ListWebhookDeliveryLogsResponse func (a *WebhooksAPIService) WebhooksWebhookIdLogsGetExecute(r ApiWebhooksWebhookIdLogsGetRequest) (*ListWebhookDeliveryLogsResponse, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListWebhookDeliveryLogsResponse + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListWebhookDeliveryLogsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.WebhooksWebhookIdLogsGet") @@ -581,9 +579,9 @@ func (a *WebhooksAPIService) WebhooksWebhookIdLogsGetExecute(r ApiWebhooksWebhoo } type ApiWebhooksWebhookIdPingPostRequest struct { - ctx context.Context + ctx context.Context ApiService *WebhooksAPIService - webhookId string + webhookId string } func (r ApiWebhooksWebhookIdPingPostRequest) Execute() (*WebhookEventCallback, *http.Response, error) { @@ -597,27 +595,27 @@ Send a `PING` event to a webhook by providing its unique identifier. This is useful for testing and debugging purposes. The event is delivered asynchronously and its data is returned in the response to this request. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param webhookId The unique identifier for the webhook. - @return ApiWebhooksWebhookIdPingPostRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param webhookId The unique identifier for the webhook. + @return ApiWebhooksWebhookIdPingPostRequest */ func (a *WebhooksAPIService) WebhooksWebhookIdPingPost(ctx context.Context, webhookId string) ApiWebhooksWebhookIdPingPostRequest { return ApiWebhooksWebhookIdPingPostRequest{ ApiService: a, - ctx: ctx, - webhookId: webhookId, + ctx: ctx, + webhookId: webhookId, } } // Execute executes the request -// @return WebhookEventCallback +// +// @return WebhookEventCallback func (a *WebhooksAPIService) WebhooksWebhookIdPingPostExecute(r ApiWebhooksWebhookIdPingPostRequest) (*WebhookEventCallback, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *WebhookEventCallback + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WebhookEventCallback ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.WebhooksWebhookIdPingPost") diff --git a/datafetcher/upclient/client.go b/datafetcher/upclient/client.go index d1ec5f4..a85094b 100644 --- a/datafetcher/upclient/client.go +++ b/datafetcher/upclient/client.go @@ -1,7 +1,7 @@ /* Up API -The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. +The Up API gives you programmatic access to your balances and transaction data. You can request past transactions or set up webhooks to receive real-time events when new transactions hit your account. It’s new, it’s exciting and it’s just the beginning. API version: v1 */ @@ -31,14 +31,13 @@ import ( "strings" "time" "unicode/utf8" - ) var ( JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) // APIClient manages communication with the Up API API vv1 @@ -143,15 +142,15 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } -func parameterValueToString( obj interface{}, key string ) string { +func parameterValueToString(obj interface{}, key string) string { if reflect.TypeOf(obj).Kind() != reflect.Ptr { return fmt.Sprintf("%v", obj) } - var param,ok = obj.(MappedNullable) + var param, ok = obj.(MappedNullable) if !ok { return "" } - dataMap,err := param.ToMap() + dataMap, err := param.ToMap() if err != nil { return "" } @@ -167,81 +166,81 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri value = "null" } else { switch v.Kind() { - case reflect.Invalid: - value = "invalid" + case reflect.Invalid: + value = "invalid" - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { return } - var lenIndValue = indValue.Len() - for i:=0;i