Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.125.1
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Dec 5, 2023
1 parent 8d25623 commit ee348b2
Show file tree
Hide file tree
Showing 1,369 changed files with 14,113 additions and 11,272 deletions.
Empty file modified lending/.gitattributes
100755 → 100644
Empty file.
731 changes: 521 additions & 210 deletions lending/README.md

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion lending/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,14 @@ Based on:
### Generated
- [go v4.3.0] lending
### Releases
- [Go v4.3.0] https://github.com/codatio/client-sdk-go/releases/tag/lending/v4.3.0 - lending
- [Go v4.3.0] https://github.com/codatio/client-sdk-go/releases/tag/lending/v4.3.0 - lending

## 2023-12-05 11:21:43
### Changes
Based on:
- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Lending.yaml
- Speakeasy CLI 1.125.1 (2.210.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v5.0.0] lending
### Releases
- [Go v5.0.0] https://github.com/codatio/client-sdk-go/releases/tag/lending/v5.0.0 - lending
23 changes: 8 additions & 15 deletions lending/USAGE.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<!-- Start SDK Example Usage -->


<!-- Start SDK Example Usage [usage] -->
```go
package main

import (
"context"
lending "github.com/codatio/client-sdk-go/lending/v4"
"github.com/codatio/client-sdk-go/lending/v4/pkg/models/operations"
"github.com/codatio/client-sdk-go/lending/v4/pkg/models/shared"
lending "github.com/codatio/client-sdk-go/lending/v5"
"github.com/codatio/client-sdk-go/lending/v5/pkg/models/shared"
"log"
)

Expand All @@ -20,22 +17,18 @@ func main() {
)

ctx := context.Background()
res, err := s.AccountingBankData.ListTransactions(ctx, operations.ListAccountingBankAccountTransactionsRequest{
AccountID: "Anchorage Product",
CompanyID: "8a210b68-6988-11ed-a1eb-0242ac120002",
ConnectionID: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
OrderBy: lending.String("-modifiedDate"),
Page: lending.Int(1),
PageSize: lending.Int(100),
res, err := s.Companies.Create(ctx, &shared.CompanyRequestBody{
Description: lending.String("Requested early access to the new financing scheme."),
Name: "Bank of Dave",
})
if err != nil {
log.Fatal(err)
}

if res.AccountingBankTransactions != nil {
if res.Company != nil {
// handle response
}
}

```
<!-- End SDK Example Usage -->
<!-- End SDK Example Usage [usage] -->
35 changes: 24 additions & 11 deletions lending/bankingaccountbalances.go → lending/accountbalances.go
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import (
"bytes"
"context"
"fmt"
"github.com/codatio/client-sdk-go/lending/v4/pkg/models/operations"
"github.com/codatio/client-sdk-go/lending/v4/pkg/models/sdkerrors"
"github.com/codatio/client-sdk-go/lending/v4/pkg/models/shared"
"github.com/codatio/client-sdk-go/lending/v4/pkg/utils"
"github.com/codatio/client-sdk-go/lending/v5/pkg/models/operations"
"github.com/codatio/client-sdk-go/lending/v5/pkg/models/sdkerrors"
"github.com/codatio/client-sdk-go/lending/v5/pkg/models/shared"
"github.com/codatio/client-sdk-go/lending/v5/pkg/utils"
"io"
"net/http"
)

type bankingAccountBalances struct {
type AccountBalances struct {
sdkConfiguration sdkConfiguration
}

func newBankingAccountBalances(sdkConfig sdkConfiguration) *bankingAccountBalances {
return &bankingAccountBalances{
func newAccountBalances(sdkConfig sdkConfiguration) *AccountBalances {
return &AccountBalances{
sdkConfiguration: sdkConfig,
}
}
Expand All @@ -30,7 +30,7 @@ func newBankingAccountBalances(sdkConfig sdkConfiguration) *bankingAccountBalanc
// [Account balances](https://docs.codat.io/lending-api#/schemas/AccountBalance) are balances for a bank account, including end-of-day batch balance or running balances per transaction.
//
// Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
func (s *bankingAccountBalances) List(ctx context.Context, request operations.ListBankingAccountBalancesRequest, opts ...operations.Option) (*operations.ListBankingAccountBalancesResponse, error) {
func (s *AccountBalances) List(ctx context.Context, request operations.ListBankingAccountBalancesRequest, opts ...operations.Option) (*operations.ListBankingAccountBalancesResponse, error) {
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
Expand Down Expand Up @@ -127,20 +127,33 @@ func (s *bankingAccountBalances) List(ctx context.Context, request operations.Li
fallthrough
case httpRes.StatusCode == 401:
fallthrough
case httpRes.StatusCode == 402:
fallthrough
case httpRes.StatusCode == 403:
fallthrough
case httpRes.StatusCode == 404:
fallthrough
case httpRes.StatusCode == 409:
fallthrough
case httpRes.StatusCode == 429:
fallthrough
case httpRes.StatusCode == 500:
fallthrough
case httpRes.StatusCode == 503:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out shared.ErrorMessage
var out sdkerrors.ErrorMessage
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}

res.ErrorMessage = &out
return nil, &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
}

return res, nil
Expand Down
54 changes: 39 additions & 15 deletions lending/accountingbankdataaccounts.go → lending/accounts.go
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import (
"bytes"
"context"
"fmt"
"github.com/codatio/client-sdk-go/lending/v4/pkg/models/operations"
"github.com/codatio/client-sdk-go/lending/v4/pkg/models/sdkerrors"
"github.com/codatio/client-sdk-go/lending/v4/pkg/models/shared"
"github.com/codatio/client-sdk-go/lending/v4/pkg/utils"
"github.com/codatio/client-sdk-go/lending/v5/pkg/models/operations"
"github.com/codatio/client-sdk-go/lending/v5/pkg/models/sdkerrors"
"github.com/codatio/client-sdk-go/lending/v5/pkg/models/shared"
"github.com/codatio/client-sdk-go/lending/v5/pkg/utils"
"io"
"net/http"
)

type accountingBankDataAccounts struct {
type Accounts struct {
sdkConfiguration sdkConfiguration
}

func newAccountingBankDataAccounts(sdkConfig sdkConfiguration) *accountingBankDataAccounts {
return &accountingBankDataAccounts{
func newAccounts(sdkConfig sdkConfiguration) *Accounts {
return &Accounts{
sdkConfiguration: sdkConfig,
}
}
Expand All @@ -32,7 +32,7 @@ func newAccountingBankDataAccounts(sdkConfig sdkConfiguration) *accountingBankDa
// Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support getting a specific bank account.
//
// Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
func (s *accountingBankDataAccounts) Get(ctx context.Context, request operations.GetAccountingBankAccountRequest, opts ...operations.Option) (*operations.GetAccountingBankAccountResponse, error) {
func (s *Accounts) Get(ctx context.Context, request operations.GetAccountingBankAccountRequest, opts ...operations.Option) (*operations.GetAccountingBankAccountResponse, error) {
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
Expand Down Expand Up @@ -123,22 +123,33 @@ func (s *accountingBankDataAccounts) Get(ctx context.Context, request operations
}
case httpRes.StatusCode == 401:
fallthrough
case httpRes.StatusCode == 402:
fallthrough
case httpRes.StatusCode == 403:
fallthrough
case httpRes.StatusCode == 404:
fallthrough
case httpRes.StatusCode == 409:
fallthrough
case httpRes.StatusCode == 429:
fallthrough
case httpRes.StatusCode == 500:
fallthrough
case httpRes.StatusCode == 503:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out shared.ErrorMessage
var out sdkerrors.ErrorMessage
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}

res.ErrorMessage = &out
return nil, &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
}

return res, nil
Expand All @@ -150,7 +161,7 @@ func (s *accountingBankDataAccounts) Get(ctx context.Context, request operations
// [Bank accounts](https://docs.codat.io/lending-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
//
// Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/lending-api#/operations/refresh-company-data).
func (s *accountingBankDataAccounts) List(ctx context.Context, request operations.ListAccountingBankAccountsRequest, opts ...operations.Option) (*operations.ListAccountingBankAccountsResponse, error) {
func (s *Accounts) List(ctx context.Context, request operations.ListAccountingBankAccountsRequest, opts ...operations.Option) (*operations.ListAccountingBankAccountsResponse, error) {
o := operations.Options{}
supportedOptions := []string{
operations.SupportedOptionRetries,
Expand Down Expand Up @@ -247,20 +258,33 @@ func (s *accountingBankDataAccounts) List(ctx context.Context, request operation
fallthrough
case httpRes.StatusCode == 401:
fallthrough
case httpRes.StatusCode == 402:
fallthrough
case httpRes.StatusCode == 403:
fallthrough
case httpRes.StatusCode == 404:
fallthrough
case httpRes.StatusCode == 409:
fallthrough
case httpRes.StatusCode == 429:
fallthrough
case httpRes.StatusCode == 500:
fallthrough
case httpRes.StatusCode == 503:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out shared.ErrorMessage
var out sdkerrors.ErrorMessage
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}

res.ErrorMessage = &out
return nil, &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
}

return res, nil
Expand Down
22 changes: 11 additions & 11 deletions lending/accountspayable.go
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

package lending

type accountsPayable struct {
BillCreditNotes *accountsPayableBillCreditNotes
BillPayments *accountsPayableBillPayments
Bills *accountsPayableBills
Suppliers *accountsPayableSuppliers
type AccountsPayable struct {
Bills *Bills
Suppliers *Suppliers
BillCreditNotes *BillCreditNotes
BillPayments *BillPayments

sdkConfiguration sdkConfiguration
}

func newAccountsPayable(sdkConfig sdkConfiguration) *accountsPayable {
return &accountsPayable{
func newAccountsPayable(sdkConfig sdkConfiguration) *AccountsPayable {
return &AccountsPayable{
sdkConfiguration: sdkConfig,
BillCreditNotes: newAccountsPayableBillCreditNotes(sdkConfig),
BillPayments: newAccountsPayableBillPayments(sdkConfig),
Bills: newAccountsPayableBills(sdkConfig),
Suppliers: newAccountsPayableSuppliers(sdkConfig),
Bills: newBills(sdkConfig),
Suppliers: newSuppliers(sdkConfig),
BillCreditNotes: newBillCreditNotes(sdkConfig),
BillPayments: newBillPayments(sdkConfig),
}
}
30 changes: 15 additions & 15 deletions lending/accountsreceivable.go
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

package lending

type accountsReceivable struct {
CreditNotes *accountsReceivableCreditNotes
Customers *accountsReceivableCustomers
DirectIncomes *accountsReceivableDirectIncomes
Invoices *accountsReceivableInvoices
Payments *accountsReceivablePayments
Reports *accountsReceivableReports
type AccountsReceivable struct {
Customers *Customers
DirectIncomes *DirectIncomes
Invoices *Invoices
CreditNotes *CreditNotes
Payments *Payments
Reports *Reports

sdkConfiguration sdkConfiguration
}

func newAccountsReceivable(sdkConfig sdkConfiguration) *accountsReceivable {
return &accountsReceivable{
func newAccountsReceivable(sdkConfig sdkConfiguration) *AccountsReceivable {
return &AccountsReceivable{
sdkConfiguration: sdkConfig,
CreditNotes: newAccountsReceivableCreditNotes(sdkConfig),
Customers: newAccountsReceivableCustomers(sdkConfig),
DirectIncomes: newAccountsReceivableDirectIncomes(sdkConfig),
Invoices: newAccountsReceivableInvoices(sdkConfig),
Payments: newAccountsReceivablePayments(sdkConfig),
Reports: newAccountsReceivableReports(sdkConfig),
Customers: newCustomers(sdkConfig),
DirectIncomes: newDirectIncomes(sdkConfig),
Invoices: newInvoices(sdkConfig),
CreditNotes: newCreditNotes(sdkConfig),
Payments: newPayments(sdkConfig),
Reports: newReports(sdkConfig),
}
}
Loading

0 comments on commit ee348b2

Please sign in to comment.