Skip to content

Commit 747706b

Browse files
Bump SDK to match Merge API, April 2024 (#19)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 2a582a8 commit 747706b

File tree

259 files changed

+4589
-2352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+4589
-2352
lines changed

accounting/accountdetails/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ func NewClient(opts ...core.ClientOption) *Client {
2929

3030
// Get details for a linked account.
3131
func (c *Client) Retrieve(ctx context.Context) (*accounting.AccountDetails, error) {
32-
baseURL := "https://api.merge.dev"
32+
baseURL := "https://api.merge.dev/api"
3333
if c.baseURL != "" {
3434
baseURL = c.baseURL
3535
}
36-
endpointURL := baseURL + "/" + "api/accounting/v1/account-details"
36+
endpointURL := baseURL + "/" + "accounting/v1/account-details"
3737

3838
var response *accounting.AccountDetails
3939
if err := c.caller.Call(

accounting/accountingperiods/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ func NewClient(opts ...core.ClientOption) *Client {
3131

3232
// Returns a list of `AccountingPeriod` objects.
3333
func (c *Client) List(ctx context.Context, request *accounting.AccountingPeriodsListRequest) (*accounting.PaginatedAccountingPeriodList, error) {
34-
baseURL := "https://api.merge.dev"
34+
baseURL := "https://api.merge.dev/api"
3535
if c.baseURL != "" {
3636
baseURL = c.baseURL
3737
}
38-
endpointURL := baseURL + "/" + "api/accounting/v1/accounting-periods"
38+
endpointURL := baseURL + "/" + "accounting/v1/accounting-periods"
3939

4040
queryParams := make(url.Values)
4141
if request.Cursor != nil {
@@ -71,11 +71,11 @@ func (c *Client) List(ctx context.Context, request *accounting.AccountingPeriods
7171

7272
// Returns an `AccountingPeriod` object with the given `id`.
7373
func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.AccountingPeriodsRetrieveRequest) (*accounting.AccountingPeriod, error) {
74-
baseURL := "https://api.merge.dev"
74+
baseURL := "https://api.merge.dev/api"
7575
if c.baseURL != "" {
7676
baseURL = c.baseURL
7777
}
78-
endpointURL := fmt.Sprintf(baseURL+"/"+"api/accounting/v1/accounting-periods/%v", id)
78+
endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/accounting-periods/%v", id)
7979

8080
queryParams := make(url.Values)
8181
if request.IncludeRemoteData != nil {

accounting/accounts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type AccountsListRequest struct {
4040
RemoteFields *AccountsListRequestRemoteFields `json:"-"`
4141
// The API provider's ID for the given object.
4242
RemoteId *string `json:"-"`
43-
// Which fields should be returned in non-normalized form.
43+
// A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
4444
ShowEnumOrigins *AccountsListRequestShowEnumOrigins `json:"-"`
4545
}
4646

@@ -51,7 +51,7 @@ type AccountsRetrieveRequest struct {
5151
IncludeRemoteData *bool `json:"-"`
5252
// Deprecated. Use show_enum_origins.
5353
RemoteFields *AccountsRetrieveRequestRemoteFields `json:"-"`
54-
// Which fields should be returned in non-normalized form.
54+
// A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
5555
ShowEnumOrigins *AccountsRetrieveRequestShowEnumOrigins `json:"-"`
5656
}
5757

accounting/accounts/client.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ func NewClient(opts ...core.ClientOption) *Client {
3232

3333
// Returns a list of `Account` objects.
3434
func (c *Client) List(ctx context.Context, request *accounting.AccountsListRequest) (*accounting.PaginatedAccountList, error) {
35-
baseURL := "https://api.merge.dev"
35+
baseURL := "https://api.merge.dev/api"
3636
if c.baseURL != "" {
3737
baseURL = c.baseURL
3838
}
39-
endpointURL := baseURL + "/" + "api/accounting/v1/accounts"
39+
endpointURL := baseURL + "/" + "accounting/v1/accounts"
4040

4141
queryParams := make(url.Values)
4242
if request.CompanyId != nil {
@@ -99,11 +99,11 @@ func (c *Client) List(ctx context.Context, request *accounting.AccountsListReque
9999

100100
// Creates an `Account` object with the given values.
101101
func (c *Client) Create(ctx context.Context, request *accounting.AccountEndpointRequest) (*accounting.AccountResponse, error) {
102-
baseURL := "https://api.merge.dev"
102+
baseURL := "https://api.merge.dev/api"
103103
if c.baseURL != "" {
104104
baseURL = c.baseURL
105105
}
106-
endpointURL := baseURL + "/" + "api/accounting/v1/accounts"
106+
endpointURL := baseURL + "/" + "accounting/v1/accounts"
107107

108108
queryParams := make(url.Values)
109109
if request.IsDebugMode != nil {
@@ -134,11 +134,11 @@ func (c *Client) Create(ctx context.Context, request *accounting.AccountEndpoint
134134

135135
// Returns an `Account` object with the given `id`.
136136
func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.AccountsRetrieveRequest) (*accounting.Account, error) {
137-
baseURL := "https://api.merge.dev"
137+
baseURL := "https://api.merge.dev/api"
138138
if c.baseURL != "" {
139139
baseURL = c.baseURL
140140
}
141-
endpointURL := fmt.Sprintf(baseURL+"/"+"api/accounting/v1/accounts/%v", id)
141+
endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/accounts/%v", id)
142142

143143
queryParams := make(url.Values)
144144
if request.Expand != nil {
@@ -174,11 +174,11 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Ac
174174

175175
// Returns metadata for `Account` POSTs.
176176
func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) {
177-
baseURL := "https://api.merge.dev"
177+
baseURL := "https://api.merge.dev/api"
178178
if c.baseURL != "" {
179179
baseURL = c.baseURL
180180
}
181-
endpointURL := baseURL + "/" + "api/accounting/v1/accounts/meta/post"
181+
endpointURL := baseURL + "/" + "accounting/v1/accounts/meta/post"
182182

183183
var response *accounting.MetaResponse
184184
if err := c.caller.Call(

accounting/accounttoken/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ func NewClient(opts ...core.ClientOption) *Client {
3030

3131
// Returns the account token for the end user with the provided public token.
3232
func (c *Client) Retrieve(ctx context.Context, publicToken string) (*accounting.AccountToken, error) {
33-
baseURL := "https://api.merge.dev"
33+
baseURL := "https://api.merge.dev/api"
3434
if c.baseURL != "" {
3535
baseURL = c.baseURL
3636
}
37-
endpointURL := fmt.Sprintf(baseURL+"/"+"api/accounting/v1/account-token/%v", publicToken)
37+
endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/account-token/%v", publicToken)
3838

3939
var response *accounting.AccountToken
4040
if err := c.caller.Call(

accounting/addresses.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ type AddressesRetrieveRequest struct {
77
IncludeRemoteData *bool `json:"-"`
88
// Deprecated. Use show_enum_origins.
99
RemoteFields *string `json:"-"`
10-
// Which fields should be returned in non-normalized form.
10+
// A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
1111
ShowEnumOrigins *string `json:"-"`
1212
}

accounting/addresses/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ func NewClient(opts ...core.ClientOption) *Client {
3131

3232
// Returns an `Address` object with the given `id`.
3333
func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.AddressesRetrieveRequest) (*accounting.Address, error) {
34-
baseURL := "https://api.merge.dev"
34+
baseURL := "https://api.merge.dev/api"
3535
if c.baseURL != "" {
3636
baseURL = c.baseURL
3737
}
38-
endpointURL := fmt.Sprintf(baseURL+"/"+"api/accounting/v1/addresses/%v", id)
38+
endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/addresses/%v", id)
3939

4040
queryParams := make(url.Values)
4141
if request.IncludeRemoteData != nil {

accounting/asyncpassthrough/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ func NewClient(opts ...core.ClientOption) *Client {
3030

3131
// Asynchronously pull data from an endpoint not currently supported by Merge.
3232
func (c *Client) Create(ctx context.Context, request *accounting.DataPassthroughRequest) (*accounting.AsyncPassthroughReciept, error) {
33-
baseURL := "https://api.merge.dev"
33+
baseURL := "https://api.merge.dev/api"
3434
if c.baseURL != "" {
3535
baseURL = c.baseURL
3636
}
37-
endpointURL := baseURL + "/" + "api/accounting/v1/async-passthrough"
37+
endpointURL := baseURL + "/" + "accounting/v1/async-passthrough"
3838

3939
var response *accounting.AsyncPassthroughReciept
4040
if err := c.caller.Call(
@@ -54,11 +54,11 @@ func (c *Client) Create(ctx context.Context, request *accounting.DataPassthrough
5454

5555
// Retrieves data from earlier async-passthrough POST request
5656
func (c *Client) Retrieve(ctx context.Context, asyncPassthroughReceiptId string) (*accounting.RemoteResponse, error) {
57-
baseURL := "https://api.merge.dev"
57+
baseURL := "https://api.merge.dev/api"
5858
if c.baseURL != "" {
5959
baseURL = c.baseURL
6060
}
61-
endpointURL := fmt.Sprintf(baseURL+"/"+"api/accounting/v1/async-passthrough/%v", asyncPassthroughReceiptId)
61+
endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/async-passthrough/%v", asyncPassthroughReceiptId)
6262

6363
var response *accounting.RemoteResponse
6464
if err := c.caller.Call(

accounting/attachments/client.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ func NewClient(opts ...core.ClientOption) *Client {
3232

3333
// Returns a list of `AccountingAttachment` objects.
3434
func (c *Client) List(ctx context.Context, request *accounting.AttachmentsListRequest) (*accounting.PaginatedAccountingAttachmentList, error) {
35-
baseURL := "https://api.merge.dev"
35+
baseURL := "https://api.merge.dev/api"
3636
if c.baseURL != "" {
3737
baseURL = c.baseURL
3838
}
39-
endpointURL := baseURL + "/" + "api/accounting/v1/attachments"
39+
endpointURL := baseURL + "/" + "accounting/v1/attachments"
4040

4141
queryParams := make(url.Values)
4242
if request.CompanyId != nil {
@@ -90,11 +90,11 @@ func (c *Client) List(ctx context.Context, request *accounting.AttachmentsListRe
9090

9191
// Creates an `AccountingAttachment` object with the given values.
9292
func (c *Client) Create(ctx context.Context, request *accounting.AccountingAttachmentEndpointRequest) (*accounting.AccountingAttachmentResponse, error) {
93-
baseURL := "https://api.merge.dev"
93+
baseURL := "https://api.merge.dev/api"
9494
if c.baseURL != "" {
9595
baseURL = c.baseURL
9696
}
97-
endpointURL := baseURL + "/" + "api/accounting/v1/attachments"
97+
endpointURL := baseURL + "/" + "accounting/v1/attachments"
9898

9999
queryParams := make(url.Values)
100100
if request.IsDebugMode != nil {
@@ -125,11 +125,11 @@ func (c *Client) Create(ctx context.Context, request *accounting.AccountingAttac
125125

126126
// Returns an `AccountingAttachment` object with the given `id`.
127127
func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.AttachmentsRetrieveRequest) (*accounting.AccountingAttachment, error) {
128-
baseURL := "https://api.merge.dev"
128+
baseURL := "https://api.merge.dev/api"
129129
if c.baseURL != "" {
130130
baseURL = c.baseURL
131131
}
132-
endpointURL := fmt.Sprintf(baseURL+"/"+"api/accounting/v1/attachments/%v", id)
132+
endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/attachments/%v", id)
133133

134134
queryParams := make(url.Values)
135135
if request.IncludeRemoteData != nil {
@@ -156,11 +156,11 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.At
156156

157157
// Returns metadata for `AccountingAttachment` POSTs.
158158
func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) {
159-
baseURL := "https://api.merge.dev"
159+
baseURL := "https://api.merge.dev/api"
160160
if c.baseURL != "" {
161161
baseURL = c.baseURL
162162
}
163-
endpointURL := baseURL + "/" + "api/accounting/v1/attachments/meta/post"
163+
endpointURL := baseURL + "/" + "accounting/v1/attachments/meta/post"
164164

165165
var response *accounting.MetaResponse
166166
if err := c.caller.Call(

accounting/audit_trail.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type AuditTrailListRequest struct {
77
Cursor *string `json:"-"`
88
// If included, will only include audit trail events that occurred before this time
99
EndDate *string `json:"-"`
10-
// If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`
10+
// If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`
1111
EventType *string `json:"-"`
1212
// Number of results to return per page.
1313
PageSize *int `json:"-"`

0 commit comments

Comments
 (0)