diff options
author | Wim <wim@42.be> | 2020-09-04 23:29:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 23:29:13 +0200 |
commit | 2f59abdda7a1072036ea1fdb4c859cccbb56efa6 (patch) | |
tree | e35393f23d12783ae92f0469085efc7dec953f82 /vendor/github.com/yaegashi/msgraph.go/beta/ActionCompany.go | |
parent | 17747a5c8893fd47ba8eb61dd10477170640caf6 (diff) | |
download | matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.gz matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.bz2 matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.zip |
Update vendor (#1228)
Diffstat (limited to 'vendor/github.com/yaegashi/msgraph.go/beta/ActionCompany.go')
-rw-r--r-- | vendor/github.com/yaegashi/msgraph.go/beta/ActionCompany.go | 107 |
1 files changed, 71 insertions, 36 deletions
diff --git a/vendor/github.com/yaegashi/msgraph.go/beta/ActionCompany.go b/vendor/github.com/yaegashi/msgraph.go/beta/ActionCompany.go index 20c06f5d..3279a6c2 100644 --- a/vendor/github.com/yaegashi/msgraph.go/beta/ActionCompany.go +++ b/vendor/github.com/yaegashi/msgraph.go/beta/ActionCompany.go @@ -1,4 +1,4 @@ -// Code generated by msgraph-generate.go DO NOT EDIT. +// Code generated by msgraph.go/gen DO NOT EDIT. package msgraph @@ -53,9 +53,9 @@ func (r *CompanyAccountsCollectionRequest) Paging(ctx context.Context, method, p } var values []Account for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -68,6 +68,7 @@ func (r *CompanyAccountsCollectionRequest) Paging(ctx context.Context, method, p value []Account ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -155,9 +156,9 @@ func (r *CompanyAgedAccountsPayableCollectionRequest) Paging(ctx context.Context } var values []AgedAccountsPayable for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -170,6 +171,7 @@ func (r *CompanyAgedAccountsPayableCollectionRequest) Paging(ctx context.Context value []AgedAccountsPayable ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -257,9 +259,9 @@ func (r *CompanyAgedAccountsReceivableCollectionRequest) Paging(ctx context.Cont } var values []AgedAccountsReceivable for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -272,6 +274,7 @@ func (r *CompanyAgedAccountsReceivableCollectionRequest) Paging(ctx context.Cont value []AgedAccountsReceivable ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -359,9 +362,9 @@ func (r *CompanyCompanyInformationCollectionRequest) Paging(ctx context.Context, } var values []CompanyInformation for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -374,6 +377,7 @@ func (r *CompanyCompanyInformationCollectionRequest) Paging(ctx context.Context, value []CompanyInformation ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -461,9 +465,9 @@ func (r *CompanyCountriesRegionsCollectionRequest) Paging(ctx context.Context, m } var values []CountryRegion for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -476,6 +480,7 @@ func (r *CompanyCountriesRegionsCollectionRequest) Paging(ctx context.Context, m value []CountryRegion ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -563,9 +568,9 @@ func (r *CompanyCurrenciesCollectionRequest) Paging(ctx context.Context, method, } var values []Currency for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -578,6 +583,7 @@ func (r *CompanyCurrenciesCollectionRequest) Paging(ctx context.Context, method, value []Currency ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -665,9 +671,9 @@ func (r *CompanyCustomerPaymentJournalsCollectionRequest) Paging(ctx context.Con } var values []CustomerPaymentJournal for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -680,6 +686,7 @@ func (r *CompanyCustomerPaymentJournalsCollectionRequest) Paging(ctx context.Con value []CustomerPaymentJournal ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -767,9 +774,9 @@ func (r *CompanyCustomerPaymentsCollectionRequest) Paging(ctx context.Context, m } var values []CustomerPayment for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -782,6 +789,7 @@ func (r *CompanyCustomerPaymentsCollectionRequest) Paging(ctx context.Context, m value []CustomerPayment ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -869,9 +877,9 @@ func (r *CompanyCustomersCollectionRequest) Paging(ctx context.Context, method, } var values []Customer for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -884,6 +892,7 @@ func (r *CompanyCustomersCollectionRequest) Paging(ctx context.Context, method, value []Customer ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -971,9 +980,9 @@ func (r *CompanyDimensionValuesCollectionRequest) Paging(ctx context.Context, me } var values []DimensionValue for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -986,6 +995,7 @@ func (r *CompanyDimensionValuesCollectionRequest) Paging(ctx context.Context, me value []DimensionValue ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1073,9 +1083,9 @@ func (r *CompanyDimensionsCollectionRequest) Paging(ctx context.Context, method, } var values []Dimension for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -1088,6 +1098,7 @@ func (r *CompanyDimensionsCollectionRequest) Paging(ctx context.Context, method, value []Dimension ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1175,9 +1186,9 @@ func (r *CompanyEmployeesCollectionRequest) Paging(ctx context.Context, method, } var values []Employee for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -1190,6 +1201,7 @@ func (r *CompanyEmployeesCollectionRequest) Paging(ctx context.Context, method, value []Employee ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1277,9 +1289,9 @@ func (r *CompanyGeneralLedgerEntriesCollectionRequest) Paging(ctx context.Contex } var values []GeneralLedgerEntry for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -1292,6 +1304,7 @@ func (r *CompanyGeneralLedgerEntriesCollectionRequest) Paging(ctx context.Contex value []GeneralLedgerEntry ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1379,9 +1392,9 @@ func (r *CompanyItemCategoriesCollectionRequest) Paging(ctx context.Context, met } var values []ItemCategory for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -1394,6 +1407,7 @@ func (r *CompanyItemCategoriesCollectionRequest) Paging(ctx context.Context, met value []ItemCategory ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1481,9 +1495,9 @@ func (r *CompanyItemsCollectionRequest) Paging(ctx context.Context, method, path } var values []Item for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -1496,6 +1510,7 @@ func (r *CompanyItemsCollectionRequest) Paging(ctx context.Context, method, path value []Item ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1583,9 +1598,9 @@ func (r *CompanyJournalLinesCollectionRequest) Paging(ctx context.Context, metho } var values []JournalLine for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -1598,6 +1613,7 @@ func (r *CompanyJournalLinesCollectionRequest) Paging(ctx context.Context, metho value []JournalLine ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1685,9 +1701,9 @@ func (r *CompanyJournalsCollectionRequest) Paging(ctx context.Context, method, p } var values []Journal for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -1700,6 +1716,7 @@ func (r *CompanyJournalsCollectionRequest) Paging(ctx context.Context, method, p value []Journal ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1787,9 +1804,9 @@ func (r *CompanyPaymentMethodsCollectionRequest) Paging(ctx context.Context, met } var values []PaymentMethod for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -1802,6 +1819,7 @@ func (r *CompanyPaymentMethodsCollectionRequest) Paging(ctx context.Context, met value []PaymentMethod ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1889,9 +1907,9 @@ func (r *CompanyPaymentTermsCollectionRequest) Paging(ctx context.Context, metho } var values []PaymentTerm for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -1904,6 +1922,7 @@ func (r *CompanyPaymentTermsCollectionRequest) Paging(ctx context.Context, metho value []PaymentTerm ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1991,9 +2010,9 @@ func (r *CompanyPictureCollectionRequest) Paging(ctx context.Context, method, pa } var values []Picture for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -2006,6 +2025,7 @@ func (r *CompanyPictureCollectionRequest) Paging(ctx context.Context, method, pa value []Picture ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2093,9 +2113,9 @@ func (r *CompanyPurchaseInvoiceLinesCollectionRequest) Paging(ctx context.Contex } var values []PurchaseInvoiceLine for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -2108,6 +2128,7 @@ func (r *CompanyPurchaseInvoiceLinesCollectionRequest) Paging(ctx context.Contex value []PurchaseInvoiceLine ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2195,9 +2216,9 @@ func (r *CompanyPurchaseInvoicesCollectionRequest) Paging(ctx context.Context, m } var values []PurchaseInvoice for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -2210,6 +2231,7 @@ func (r *CompanyPurchaseInvoicesCollectionRequest) Paging(ctx context.Context, m value []PurchaseInvoice ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2297,9 +2319,9 @@ func (r *CompanySalesCreditMemoLinesCollectionRequest) Paging(ctx context.Contex } var values []SalesCreditMemoLine for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -2312,6 +2334,7 @@ func (r *CompanySalesCreditMemoLinesCollectionRequest) Paging(ctx context.Contex value []SalesCreditMemoLine ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2399,9 +2422,9 @@ func (r *CompanySalesCreditMemosCollectionRequest) Paging(ctx context.Context, m } var values []SalesCreditMemo for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -2414,6 +2437,7 @@ func (r *CompanySalesCreditMemosCollectionRequest) Paging(ctx context.Context, m value []SalesCreditMemo ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2501,9 +2525,9 @@ func (r *CompanySalesInvoiceLinesCollectionRequest) Paging(ctx context.Context, } var values []SalesInvoiceLine for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -2516,6 +2540,7 @@ func (r *CompanySalesInvoiceLinesCollectionRequest) Paging(ctx context.Context, value []SalesInvoiceLine ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2603,9 +2628,9 @@ func (r *CompanySalesInvoicesCollectionRequest) Paging(ctx context.Context, meth } var values []SalesInvoice for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -2618,6 +2643,7 @@ func (r *CompanySalesInvoicesCollectionRequest) Paging(ctx context.Context, meth value []SalesInvoice ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2705,9 +2731,9 @@ func (r *CompanySalesOrderLinesCollectionRequest) Paging(ctx context.Context, me } var values []SalesOrderLine for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -2720,6 +2746,7 @@ func (r *CompanySalesOrderLinesCollectionRequest) Paging(ctx context.Context, me value []SalesOrderLine ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2807,9 +2834,9 @@ func (r *CompanySalesOrdersCollectionRequest) Paging(ctx context.Context, method } var values []SalesOrder for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -2822,6 +2849,7 @@ func (r *CompanySalesOrdersCollectionRequest) Paging(ctx context.Context, method value []SalesOrder ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2909,9 +2937,9 @@ func (r *CompanySalesQuoteLinesCollectionRequest) Paging(ctx context.Context, me } var values []SalesQuoteLine for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -2924,6 +2952,7 @@ func (r *CompanySalesQuoteLinesCollectionRequest) Paging(ctx context.Context, me value []SalesQuoteLine ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3011,9 +3040,9 @@ func (r *CompanySalesQuotesCollectionRequest) Paging(ctx context.Context, method } var values []SalesQuote for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -3026,6 +3055,7 @@ func (r *CompanySalesQuotesCollectionRequest) Paging(ctx context.Context, method value []SalesQuote ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3113,9 +3143,9 @@ func (r *CompanyShipmentMethodsCollectionRequest) Paging(ctx context.Context, me } var values []ShipmentMethod for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -3128,6 +3158,7 @@ func (r *CompanyShipmentMethodsCollectionRequest) Paging(ctx context.Context, me value []ShipmentMethod ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3215,9 +3246,9 @@ func (r *CompanyTaxAreasCollectionRequest) Paging(ctx context.Context, method, p } var values []TaxArea for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -3230,6 +3261,7 @@ func (r *CompanyTaxAreasCollectionRequest) Paging(ctx context.Context, method, p value []TaxArea ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3317,9 +3349,9 @@ func (r *CompanyTaxGroupsCollectionRequest) Paging(ctx context.Context, method, } var values []TaxGroup for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -3332,6 +3364,7 @@ func (r *CompanyTaxGroupsCollectionRequest) Paging(ctx context.Context, method, value []TaxGroup ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3419,9 +3452,9 @@ func (r *CompanyUnitsOfMeasureCollectionRequest) Paging(ctx context.Context, met } var values []UnitOfMeasure for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -3434,6 +3467,7 @@ func (r *CompanyUnitsOfMeasureCollectionRequest) Paging(ctx context.Context, met value []UnitOfMeasure ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3521,9 +3555,9 @@ func (r *CompanyVendorsCollectionRequest) Paging(ctx context.Context, method, pa } var values []Vendor for { - defer res.Body.Close() if res.StatusCode != http.StatusOK { b, _ := ioutil.ReadAll(res.Body) + res.Body.Close() errRes := &ErrorResponse{Response: res} err := jsonx.Unmarshal(b, errRes) if err != nil { @@ -3536,6 +3570,7 @@ func (r *CompanyVendorsCollectionRequest) Paging(ctx context.Context, method, pa value []Vendor ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } |