From 59a39543b1abb16d61ffe8ba58744555b68908c3 Mon Sep 17 00:00:00 2001 From: Victor Dodon Date: Fri, 22 Mar 2024 18:58:26 +0200 Subject: [PATCH] Add helper IsOk for DownloadInvoiceParseZipResponse --- README.md | 4 ++-- rest.go | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fa6006d..eeadd0c 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,8 @@ Construct the required OAuth2 config needed for the Client: ```go oauth2Cfg, err := efactura.MakeOAuth2Config( - OAuth2ConfigCredentials(anafAppClientID, anafApplientSecret), - OAuth2ConfigRedirectURL(anafAppRedirectURL), + efactura.OAuth2ConfigCredentials(anafAppClientID, anafApplientSecret), + efactura.OAuth2ConfigRedirectURL(anafAppRedirectURL), ) if err != nil { // Handle error diff --git a/rest.go b/rest.go index a0ddc64..24e0ea3 100644 --- a/rest.go +++ b/rest.go @@ -351,6 +351,11 @@ func (r *DownloadInvoiceResponse) IsOk() bool { return r != nil && r.Error == nil } +// IsOk returns true if the response corresponding to a download was successful. +func (r *DownloadInvoiceParseZipResponse) IsOk() bool { + return r != nil && r.DownloadResponse.IsOk() +} + // IsOk returns true if the response corresponding to fetching messages list // was successful. func (r *MessagesListResponse) IsOk() bool {