glide

package module
v3.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 5 Imported by: 2

README

Go Glide API SDK

The SDK and underlaying API are still being developed and current APIs are bound to change, not respecting backward compatibility conventions on versioning

Current SDK Go version 1.18

This SDK is meant to be used to more easily consume Glide's external APIs while using Go after an integration app has been set up for your Brokerage at Glide.

The underlying API's spec is available for both development and production environments on the links below:

Integration App

If you don't have an integration app setup with Glide, please reach out to Glide Engineering ([email protected]) for guidance. The integration app you use will dictate the client key and RS256 key pair values, and the associated brokerage's members are the Glide users you are allowed to impersonate while using these keys.

Instalation

go get github.com/retitle/go-sdk

HTTP Mocks for test development

The goal of this section is to provide snipped code that allows devs to test new resources/methods inside the sdk. Keep in mind that our mission is to verify every HTTP call made by this sdk through unit testing, hence these HTTP calls must be mocked. In order to accomplish this here is a true example that can be found in file user_management_test.go:


func parseStructToIoReadCloser[T any](v *T) io.ReadCloser {
    b, _ := json.Marshal(v)
    stringReader := strings.NewReader(string(b))
    stringReadCloser := io.NopCloser(stringReader)
    return stringReadCloser
}


func TestUserManagement(t *testing.T) {
    var (
        mockedRequest          *http.Request
        mockedResponse         *http.Response
        expectedBodyResponse   *glide.User
        bodyResponse           *glide.User
        httpRequester          *mocks.HttpClientRequester
        client                 glide.Client
        httpClient             core.HttpClient
        userManagementResource glide.UserManagementResource
        expectedErr            error
        method                 string
        err                    error
        someClientKey          = "come-valid-key"
        somePem                = []byte{}
        url                    = "http://api.glide.com/user_management"
        michaelJordanId        = "23"
    )

    ttests := []struct {
    name    string
    arrange func()
    act     func()
    assert  func()
    }{
        {
            name: "Should Call Get successfully",
            arrange: func() {
                method = "GET"
                expectedBodyResponse = &glide.User{
                    Id: michaelJordanId,
                }
                expectedErr = nil

                stringReadCloser := parseStructToIoReadCloser(expectedBodyResponse)
                mockedRequest, _ = http.NewRequest(method, fmt.Sprintf("%v/%v", url, michaelJordanId), nil)
                mockedResponse = &http.Response{StatusCode: http.StatusOK, Body: stringReadCloser}
                // HTTP mock
                httpRequester = &mocks.HttpClientRequester{}
                httpRequester.On("Do", mock.MatchedBy(func(req *http.Request) bool {
                    return req.URL.Host == mockedRequest.URL.Host && req.URL.Path == mockedRequest.URL.Path && req.Method == mockedRequest.Method && req.Body == http.NoBody
                })).
                Return(mockedResponse, nil)

                // Injecting the http mock
                httpClient = core.NewHttpClientWithRequester(httpRequester)
                client = glide.GetClient(someClientKey, core.GetRsa256KeyFromPEMBytes(somePem))
                client.SetHttpClient(httpClient)

                userManagementResource = glide.GetUserManagementResource(client)
            },
            act: func() {
                bodyResponse, err = userManagementResource.GetDetail(michaelJordanId)
            },
            assert: func() {
                assert.Equal(t, expectedErr, err)
                assert.Equal(t, expectedBodyResponse, bodyResponse)
            },
        },
    }

    for _, tt := range ttests {
        t.Run(tt.name, func(t *testing.T) {
            tt.arrange()

            tt.act()

            tt.assert()
        })
    }
}

Testing

To run the test case execute the following command

go test
Execute test covergae

Execute the following command

go test -cover

Example usage

package my_package

import (
    "github.com/retitle/go-sdk/v3"

    "fmt"
)

func main() {
    clientKey := "12345678-9abc-def0-1234-56789abcdef0"
    key := glide.GetRsa256Key("/keys/private.pem")
    /*
        Also posible to get PEM formatted key from memory using
        either `glide.GetRsa256KeyFromPEMBytes` (recives []byte)
        or `glide.GetRsa256KeyFromPEMString` (recives string)
    */
    glideClient := glide.GetClient(clientKey, key,
        glide.WithServer("api.dev.glide.com"),
    }) // exlcude WithServer option for prod (or use "api.glide.com")

    // This will fail because no user is being impersonated
    if _, err := glideClient.Users().Current(); err != nil {
        fmt.Println("This error is expected: ", err)
    }

    aGlideUsername := "[email protected]"
    scopes := []string{}
    /*
       While impersonating a user, the SDK will seamlessly keep the access token refreshed.
       To stop impersonating you can use `glideClient.StopImpersonating()`, or you can use
       `glideClient.StartImpersonating(...)` with different parameters to just change the current impersonated user/scopes.
       At any point in time
       * `glideClient.IsImpersonating()`
       * `glideClient.ImpersonatingSub()`
       * `glideClient.ImpersonatingScopes()`
       can be used to find out whether or not an impersonation session is active, and find out details about it.
    */

    // From here on out, all requests will have impersonated user's objects, but no scopes were requested
    if err := glideClient.StartImpersonating(aGlideUsername, scopes); err != nil {
        panic(err)
    }

    // This works because there is an impersonated user, and the current user endpoint doesn't require any scope to be accessed
    user, err := glideClient.Users().Current()
    if err != nil {
        panic(err)
    }
    fmt.Println(*user)

    // This will fail because accessed resource (Transactions) requires missing TRANSACTIONS scope
    if _, err := glideClient.Transactions().List(); err != nil {
        fmt.Println("This error is expected: ", err)
    }

    // From here on out, all requests will have access to the TRANSACTIONS scope for impersonated user
    scopes = []string{"TRANSACTIONS"}
    if err := glideClient.StartImpersonating(aGlideUsername, scopes); err != nil {
        panic(err)
    }

    // List all transactions avaialble for impersonated user
    txns, err := glideClient.Transactions().List()
    if err != nil {
        panic(err)
    }
    fmt.Println(*txns)

    // Fetch multiple specific transactions avaialble for impersonated user
    transactionIds := []string{"2246", "1486", "490"} // Make sure all these exist, else a 404 error will occur
    txns, err = glideClient.Transactions().GetMulti(transactionIds)
    if err != nil {
        panic(err)
    }
    fmt.Println(*txns)

    // Fetch a single transactions avaialble for impersonated user
    transactionId := transactionIds[0]
    txn, err := glideClient.Transactions().GetDetail(transactionId) // Make sure this exists, else a 404 error will occur
    if err != nil {
        panic(err)
    }
    fmt.Println(*txn)

    // Fetch all parties on a transaction
    parties, err := glideClient.Transactions().Parties().List(txn.Id)
    if err != nil {
        panic(err)
    }
    fmt.Println(*parties)

    // Use page parameters to control List's methods pagination. Pagination has a limit and a cursor.
    // No custom sorting is yet supported. WithPage(nil) is equivalent to not including the option at all.
    // WithPageParams(5, "1486") is an equivalent way of writing this example
    txns, err = glideClient.Transactions().List(glide.WithPage(&glide.PageParams{Limit: 5, StartingAfter: "1486"}))
    if err != nil {
        panic(err)
    }
    fmt.Println(*txns)

    // Simplified approach to only set the Limit without setting cursor
    txns, err = glideClient.Transactions().List(glide.WithPageLimit(5))
    if err != nil {
        panic(err)
    }
    fmt.Println(*txns)

    // Simplified approach to only set the Starting after cursor while using default limit value
    txns, err = glideClient.Transactions().List(glide.WithPageStartingAfter("1486"))
    if err != nil {
        panic(err)
    }
    fmt.Println(*txns)

    // All list objects have `HasMore bool` and `NextPageParams() *PageParams` to figure out next page's attributes
    // If HasMore is false, then NextPageParams() will be nil. Otherwise, NextPageParams() will return the appropriate
    // PageParams data to request the next page.
    txns, err = glideClient.Transactions().List()
    if err != nil {
        panic(err)
    }
    for {
        fmt.Println("Fetched", len(txns.Data), "txns")
        if !txns.HasMore {
            break
        }
        txns, err = glideClient.Transactions().List(WithPage(txns.NextPageParams()))
        if err != nil {
            panic(err)
        }
    }

    // Most nested objects won't be included in the responses by default, but they can be expanded if the
    // option is included.
    // All response objects have an `IsRef() bool` to check if the content corresponds to the actual object
    // or if it's just a reference to it (i.e. it could have been expanded, but it wasn't).
    txn, err = glideClient.Transactions().GetDetail(transactionId) // Make sure this exists, else a 404 error will occur
    if err != nil {
        panic(err)
    }
    if !txn.Folders.IsRef() || !txn.Parties.IsRef() {
        panic("These should be refs!")
    }

    txn, err = glideClient.Transactions().GetDetail(transactionId,
        glide.WithExpand(
            "folders.transaction_documents",
            "parties",
        ),
    ) // Make sure this exists, else a 404 error will occur
    if err != nil {
        panic(err)
    }
    fmt.Println(txn)
    if txn.Folders.IsRef() || txn.Parties.IsRef() {
        panic("These should NOT be refs!")
    }
    for _, folder := range txn.Folders.Data {
        if folder.TransactionDocuments.IsRef() {
            panic("These should NOT be refs!")
        }
        fmt.Println(folder.Title)
        for _, td := range folder.TransactionDocuments.Data {
            fmt.Println(td)
        }
    }

    // Expansion also works for List and GetMulti methods
    _, err = glideClient.Transactions().Folders().List(txn.Id,
        glide.WithExpand(
            "transaction_documents",
        ),
    )
    if err != nil {
        panic(err)
    }

    folderIds := []string{}
    for _, f := range txn.Folders.Data {
        folderIds = append(folderIds, f.Id)
    }
    _, err = glideClient.Transactions().Folders().GetMulti(txn.Id, folderIds,
        glide.WithExpand(
            "transaction_documents",
        ),
    )
    if err != nil {
        panic(err)
    }

    // Most write operations are performed at the Transaction level. Some examples follow
    // Some operations will include some details about the performed action on its Response object,
    // while others will now
    partyCreateRes, err := glideClient.Transactions().PartyCreates(transactionId, glide.PartyCreates{
        Creates: []glide.PartyCreate{{
            Email:     "[email protected]",
            FirstName: "Test",
            LastName:  "Test",
            Roles:     []string{"LISTING_TC"},
        }},
    })
    if err != nil {
        panic(err)
    }
    fmt.Println(partyCreateRes)
    txn, err = glideClient.Transactions().GetDetail(transactionId, glide.WithExpand("parties"))
    if err != nil {
        panic(err)
    }
    var party glide.Party
    for _, p := range txn.Parties.Data {
        if p.Email == "[email protected]" {
            party = p
            break
        }
    }
    partyRemovesRes, err := glideClient.Transactions().PartyRemoves(transactionId, glide.PartyRemoves{
        Removes: []glide.PartyRemove{{
            PartyId: party.Id,
        }},
    })
    if err != nil {
        panic(err)
    }
    fmt.Println(partyRemovesRes)

    // Transaction Fields is currently the only object not included by default (it ahs to be explictly expanded) that
    // does not correspond to a related entity.
    // To include fields when fetching a transaction, the "fields" attribute has to be exapnded. Expanind "fields"
    // only or "fields[*]" will include all fields. To get a subset of fields, the required fileds can be included
    // like this "fields[property/apn,property/address,parties/seller,fieldx,fieldy...]"

    txn, err = glideClient.Transactions().GetDetail(transactionId)
    if err != nil {
        panic(err)
    }
    fmt.Println(txn.Fields) // Empty

    txn, err = glideClient.Transactions().GetDetail(transactionId,
        glide.WithExpand("fields"), // equivalent to WithExpand("fields[*]")
    )
    if err != nil {
        panic(err)
    }
    fmt.Println(txn.Fields) // All fields included

    txn, err = glideClient.Transactions().GetDetail(transactionId,
        glide.WithExpand("fields[property/apn,property/block,property/lot]"),
    )
    if err != nil {
        panic(err)
    }
    fmt.Println(txn.Fields) // Only property/apn,property/block,property/lot included

    // Writing to fields requires a TransactionFieldsWrite object
    // There, each key corresponds to a field_id, and each value is the field value
    // to write, and optionally the control_version. The controlVersion (if included)
    // will make Glide check if that value corresponds to the version # in which that field
    // was last updated, and will fail in case it's not. If not provided (or provided with
    // value 0), then it will always write. In the same TransactionFieldsWrite there could be
    // a combination of some fields having controlVersion and others not having it
    fieldsWrite := glide.TransactionFieldsWrite{
        "property/apn":   glide.GetFieldWrite("12345", 2247),    // Will fail if current version of property/apn != 2247
        "property/block": glide.GetFieldWriteNoControl("67890"), // Will always write to property/block
        "property/lot":   glide.GetFieldWrite("1233", 0),        // This is equivalent to using GetFieldWriteNoControl
    }
    fieldsRes, err := glideClient.Transactions().Fields(txn.Id, fieldsWrite)
    if err != nil {
        // err's params will detail each failing field in case some of the controled ones found a version mismatch
        fmt.Println("err.Params", err.Params)
    } else {
        // Response will detail all the values and latest versions of alterted fields
        fmt.Println("fieldsRes", fieldsRes)
    }

    // TransactionFieldsWrite can be created from txn objects, so you can get the controlVersion values from there
    txn, err = glideClient.Transactions().GetDetail(transactionId, glide.WithExpand("fields"))
    if err != nil {
        panic(err)
    }
    // This TransactionFieldsWrite will include the controlVersion that match whatever there is stored
    // on the specified fields for txn.Fields. IF the field is not present, no cotnrol will be included for it
    fieldsWrite = txn.GetFieldsWrite(glide.TransactionFieldValues{
        "property/apn":   "12345",
        "property/block": "910233",
    })
    fmt.Println("fieldsWrite", fieldsWrite)

    // Multiple TransactionFieldsWrite objects can be combined into one using CombineFieldsWrites
    fieldsWrite = CombineFieldsWrites(
        txn.GetFieldsWrite(glide.TransactionFieldValues{
            "property/apn":   "12345",
            "property/block": "910233",
        }),
        // If the same field is included in more than one of the combined TransactionFieldsWrite,
        // the last provided value will be kept
        glide.TransactionFieldsWrite{
            "property/block": GetFieldWriteNoControl("67890"),
            "property/lot":   GetFieldWrite("1233", 0),
        },
    )
    fmt.Println("fieldsWrite", fieldsWrite)
}

Documentation

Index

Constants

View Source
const JWT_EXPIRES = 60

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	City    string `json:"city"`
	State   string `json:"state"`
	Street  string `json:"street"`
	Unit    string `json:"unit,omitempty"`
	ZipCode string `json:"zip_code"`
	Object  string `json:"object,omitempty"`
}

func (Address) IsRef

func (m Address) IsRef() bool

type Agent

type Agent struct {
	Address              *Address `json:"address,omitempty"`
	CompanyLicenseNumber string   `json:"company_license_number,omitempty"`
	CompanyName          string   `json:"company_name,omitempty"`
	CompanyPhoneNumber   string   `json:"company_phone_number,omitempty"`
	LicenseNumber        string   `json:"license_number,omitempty"`
	LicenseState         string   `json:"license_state,omitempty"`
	NrdsNumber           string   `json:"nrds_number,omitempty"`
	Object               string   `json:"object,omitempty"`
}

func (Agent) IsRef

func (m Agent) IsRef() bool

type AgentRequest

type AgentRequest struct {
	Address              *Address `json:"address,omitempty"`
	AddressId            string   `json:"address_id,omitempty"`
	CompanyLicenseNumber string   `json:"company_license_number,omitempty"`
	CompanyName          string   `json:"company_name,omitempty"`
	CompanyPhoneNumber   string   `json:"company_phone_number,omitempty"`
	LicenseNumber        string   `json:"license_number,omitempty"`
	LicenseState         string   `json:"license_state,omitempty"`
	NrdsNumber           string   `json:"nrds_number,omitempty"`
}

type Client

type Client interface {
	Get(res core.Response, authRequired bool, path string, opts ...core.RequestOption) error
	Post(res core.Response, authRequired bool, path string, payload core.Request, opts ...core.RequestOption) error
	PostWithFiles(res core.Response, authRequired bool, path string, payload core.Request, files []core.File, opts ...core.RequestOption) error
	GetOptions() core.ClientOptions
	SetHttpClient(httpClient core.HttpClient)
	StartImpersonating(sub string, scopes []string) error
	IsImpersonating() bool
	ImpersonatingSub() string
	ImpersonatingScopes() []string
	StopImpersonating()
	// DO NOT remove these comments since they serve as anchors for code autogeneration
	/* Autogenerated-root-resource-interface-defs begins */
	Contacts() ContactsResource
	Documents() DocumentsResource
	Listings() ListingsResource
	Notifications() NotificationsResource
	Transactions() TransactionsResource
	UserManagement() UserManagementResource
	Users() UsersResource
}

func GetClient

func GetClient(clientKey string, key core.Key, opts ...core.ClientOption) Client

type ClientImpl added in v3.0.9

type ClientImpl struct {
	// contains filtered or unexported fields
}

func (*ClientImpl) Contacts added in v3.0.9

func (c *ClientImpl) Contacts() ContactsResource

DO NOT remove these comments since they serve as anchors for code autogeneration

Autogenerated-root-resource-getters begins

func (*ClientImpl) Documents added in v3.0.9

func (c *ClientImpl) Documents() DocumentsResource

func (*ClientImpl) Get added in v3.0.9

func (c *ClientImpl) Get(res core.Response, authRequired bool, path string, opts ...core.RequestOption) error

func (*ClientImpl) GetOptions added in v3.0.9

func (c *ClientImpl) GetOptions() core.ClientOptions

func (*ClientImpl) ImpersonatingScopes added in v3.0.9

func (c *ClientImpl) ImpersonatingScopes() []string

func (*ClientImpl) ImpersonatingSub added in v3.0.9

func (c *ClientImpl) ImpersonatingSub() string

func (*ClientImpl) IsImpersonating added in v3.0.9

func (c *ClientImpl) IsImpersonating() bool

func (*ClientImpl) Listings added in v3.0.9

func (c *ClientImpl) Listings() ListingsResource

func (*ClientImpl) Notifications added in v3.0.9

func (c *ClientImpl) Notifications() NotificationsResource

func (*ClientImpl) Post added in v3.0.9

func (c *ClientImpl) Post(res core.Response, authRequired bool, path string, payload core.Request, opts ...core.RequestOption) error

func (*ClientImpl) PostWithFiles added in v3.0.13

func (c *ClientImpl) PostWithFiles(res core.Response, authRequired bool, path string, payload core.Request, files []core.File, opts ...core.RequestOption) error

func (*ClientImpl) SetHttpClient added in v3.0.9

func (c *ClientImpl) SetHttpClient(httpClient core.HttpClient)

func (*ClientImpl) StartImpersonating added in v3.0.9

func (c *ClientImpl) StartImpersonating(sub string, scopes []string) error

func (*ClientImpl) StopImpersonating added in v3.0.9

func (c *ClientImpl) StopImpersonating()

func (*ClientImpl) Transactions added in v3.0.9

func (c *ClientImpl) Transactions() TransactionsResource

func (*ClientImpl) UserManagement added in v3.0.9

func (c *ClientImpl) UserManagement() UserManagementResource

func (*ClientImpl) Users added in v3.0.9

func (c *ClientImpl) Users() UsersResource

type Contact

type Contact struct {
	Id              string         `json:"id,omitempty"`
	Address         *Address       `json:"address,omitempty"`
	Agent           *Agent         `json:"agent,omitempty"`
	AvatarUrl       string         `json:"avatar_url,omitempty"`
	BrandLogoUrl    string         `json:"brand_logo_url,omitempty"`
	CellPhone       string         `json:"cell_phone,omitempty"`
	ContactSource   *ContactSource `json:"contact_source,omitempty"`
	Email           string         `json:"email,omitempty"`
	EntityName      string         `json:"entity_name,omitempty"`
	EntityType      string         `json:"entity_type,omitempty"`
	FaxPhone        string         `json:"fax_phone,omitempty"`
	FirstName       string         `json:"first_name"`
	LastName        string         `json:"last_name,omitempty"`
	PersonalWebsite string         `json:"personal_website,omitempty"`
	Title           string         `json:"title,omitempty"`
	Object          string         `json:"object,omitempty"`
}

func (Contact) IsRef

func (m Contact) IsRef() bool

type ContactCreate

type ContactCreate struct {
	Contact *ContactRequest `json:"contact"`
}

type ContactCreateResponse

type ContactCreateResponse struct {
	Contact *Contact `json:"contact,omitempty"`
	Object  string   `json:"object,omitempty"`
}

func (ContactCreateResponse) IsRef

func (m ContactCreateResponse) IsRef() bool

type ContactList

type ContactList struct {
	Data       []Contact `json:"data"`
	ListObject string    `json:"list_object"`
	Object     string    `json:"object"`
	HasMore    bool      `json:"has_more"`
}

func (ContactList) IsRef

func (m ContactList) IsRef() bool

func (ContactList) NextPageParams

func (m ContactList) NextPageParams() core.PageParams

type ContactRequest

type ContactRequest struct {
	Address         *Address       `json:"address,omitempty"`
	AddressId       string         `json:"address_id,omitempty"`
	Agent           *AgentRequest  `json:"agent,omitempty"`
	AvatarUrl       string         `json:"avatar_url,omitempty"`
	BrandLogoUrl    string         `json:"brand_logo_url,omitempty"`
	CellPhone       string         `json:"cell_phone,omitempty"`
	ContactSource   *ContactSource `json:"contact_source,omitempty"`
	Email           string         `json:"email,omitempty"`
	EntityName      string         `json:"entity_name,omitempty"`
	EntityType      string         `json:"entity_type,omitempty"`
	FaxPhone        string         `json:"fax_phone,omitempty"`
	FirstName       string         `json:"first_name"`
	LastName        string         `json:"last_name,omitempty"`
	PersonalWebsite string         `json:"personal_website,omitempty"`
	Title           string         `json:"title,omitempty"`
}

type ContactSource

type ContactSource struct {
	Id     string `json:"id,omitempty"`
	Origin string `json:"origin,omitempty"`
	Object string `json:"object,omitempty"`
}

func (ContactSource) IsRef

func (m ContactSource) IsRef() bool

type ContactSourceRequest

type ContactSourceRequest struct {
	Id     string `json:"id,omitempty"`
	Origin string `json:"origin,omitempty"`
}

type ContactUpdate

type ContactUpdate struct {
	Contact *ContactRequest `json:"contact,omitempty"`
	Roles   []string        `json:"roles,omitempty"`
}

type ContactUpdateResponse

type ContactUpdateResponse struct {
	Contact *Contact `json:"contact,omitempty"`
	Id      string   `json:"id_,omitempty"`
	Object  string   `json:"object,omitempty"`
}

func (ContactUpdateResponse) IsRef

func (m ContactUpdateResponse) IsRef() bool

type ContactsResource

type ContactsResource interface {
	GetDetail(id string, opts ...core.RequestOption) (*Contact, error)
	GetMulti(ids []string, opts ...core.RequestOption) (*ContactList, error)
	List(opts ...core.RequestOption) (*ContactList, error)
	Create(contactcreate ContactCreate, opts ...core.RequestOption) (*ContactCreateResponse, error)
	Update(id string, contactupdate ContactUpdate, opts ...core.RequestOption) (*ContactUpdateResponse, error)
}

func GetContactsResource added in v3.0.9

func GetContactsResource(client Client) ContactsResource

type CreateResponse

type CreateResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (CreateResponse) IsRef

func (m CreateResponse) IsRef() bool

type DeletedParties

type DeletedParties struct {
	Data   []*DeletedParty `json:"data,omitempty"`
	Object string          `json:"object,omitempty"`
}

func (DeletedParties) IsRef

func (m DeletedParties) IsRef() bool

type DeletedParty

type DeletedParty struct {
	Contact   *Contact `json:"contact,omitempty"`
	DeletedAt int      `json:"deleted_at,omitempty"`
	PartyId   string   `json:"party_id,omitempty"`
	Roles     []string `json:"roles,omitempty"`
	Object    string   `json:"object,omitempty"`
}

func (DeletedParty) IsRef

func (m DeletedParty) IsRef() bool

type DocumentMergeSchema added in v3.0.33

type DocumentMergeSchema struct {
	DeleteOriginalDocuments       *bool    `json:"delete_original_documents,omitempty"`
	IsAsync                       *bool    `json:"is_async,omitempty"`
	NewDocumentFolderId           string   `json:"new_document_folder_id"`
	NewDocumentTitle              string   `json:"new_document_title"`
	TransactionDocumentVersionIds []string `json:"transaction_document_version_ids,omitempty"`
}

type DocumentSplitAsyncResponse

type DocumentSplitAsyncResponse struct {
	ReqId       string                              `json:"req_id,omitempty"`
	Suggestions map[string]*DocumentSplitSuggestion `json:"suggestions,omitempty"`
	Object      string                              `json:"object,omitempty"`
}

func (DocumentSplitAsyncResponse) IsRef

func (m DocumentSplitAsyncResponse) IsRef() bool

type DocumentSplitResponse

type DocumentSplitResponse struct {
	ReqId  string                      `json:"req_id,omitempty"`
	Result *DocumentSplitAsyncResponse `json:"result,omitempty"`
	Object string                      `json:"object,omitempty"`
}

func (DocumentSplitResponse) IsRef

func (m DocumentSplitResponse) IsRef() bool

type DocumentSplitSchema

type DocumentSplitSchema struct {
	Files   []http.File       `json:"files,omitempty"`
	ReState string            `json:"re_state,omitempty"`
	ReqId   string            `json:"req_id"`
	Uploads []*DocumentUpload `json:"uploads,omitempty"`
}

type DocumentSplitSuggestion

type DocumentSplitSuggestion struct {
	EndPage      int    `json:"end_page,omitempty"`
	Filename     string `json:"filename,omitempty"`
	FormId       string `json:"form_id,omitempty"`
	FormSeriesId string `json:"form_series_id,omitempty"`
	StartPage    int    `json:"start_page,omitempty"`
	Object       string `json:"object,omitempty"`
}

func (DocumentSplitSuggestion) IsRef

func (m DocumentSplitSuggestion) IsRef() bool

type DocumentUpload

type DocumentUpload struct {
	Title string `json:"title,omitempty"`
}

type DocumentZone

type DocumentZone struct {
	Id               string                  `json:"id,omitempty"`
	FormId           string                  `json:"form_id,omitempty"`
	Kind             string                  `json:"kind,omitempty"`
	Name             string                  `json:"name,omitempty"`
	OriginalLocation []*DocumentZoneLocation `json:"original_location,omitempty"`
	Page             int                     `json:"page,omitempty"`
	Vertices         []*DocumentZoneVertex   `json:"vertices,omitempty"`
	Object           string                  `json:"object,omitempty"`
}

func (DocumentZone) IsRef

func (m DocumentZone) IsRef() bool

type DocumentZoneLocation

type DocumentZoneLocation struct {
	XMax   float64 `json:"x_max,omitempty"`
	XMin   float64 `json:"x_min,omitempty"`
	YMax   float64 `json:"y_max,omitempty"`
	YMin   float64 `json:"y_min,omitempty"`
	Object string  `json:"object,omitempty"`
}

func (DocumentZoneLocation) IsRef

func (m DocumentZoneLocation) IsRef() bool

type DocumentZoneVertex

type DocumentZoneVertex struct {
	X      int    `json:"x,omitempty"`
	Y      int    `json:"y,omitempty"`
	Object string `json:"object,omitempty"`
}

func (DocumentZoneVertex) IsRef

func (m DocumentZoneVertex) IsRef() bool

type DocumentsResource

type DocumentsResource interface {
	DocumentSplit(documentsplitschema DocumentSplitSchema, files []core.File, opts ...core.RequestOption) (*DocumentSplitResponse, error)
	SignatureDetection(signaturedetectionschema SignatureDetectionSchema, files []core.File, opts ...core.RequestOption) (*SignatureDetectionResponse, error)
}

func GetDocumentsResource added in v3.0.9

func GetDocumentsResource(client Client) DocumentsResource

type Field

type Field struct {
	Timestamp int                    `json:"timestamp,omitempty"`
	Value     map[string]interface{} `json:"value,omitempty"`
	Object    string                 `json:"object,omitempty"`
}

func (Field) IsRef

func (m Field) IsRef() bool

type FieldOutOfDateDetail

type FieldOutOfDateDetail struct {
	ControlTimestamp int    `json:"control_timestamp,omitempty"`
	Timestamp        int    `json:"timestamp,omitempty"`
	Object           string `json:"object,omitempty"`
}

func (FieldOutOfDateDetail) IsRef

func (m FieldOutOfDateDetail) IsRef() bool

type FieldResponse

type FieldResponse struct {
	Timestamp int                    `json:"timestamp,omitempty"`
	Value     map[string]interface{} `json:"value,omitempty"`
	Object    string                 `json:"object,omitempty"`
}

func (FieldResponse) IsRef

func (m FieldResponse) IsRef() bool

type FieldResponseWarnings

type FieldResponseWarnings struct {
	OutOfDateFields map[string]*FieldOutOfDateDetail `json:"out_of_date_fields,omitempty"`
	Object          string                           `json:"object,omitempty"`
}

func (FieldResponseWarnings) IsRef

func (m FieldResponseWarnings) IsRef() bool

type FieldWrite

type FieldWrite struct {
	ControlTimestamp int                    `json:"control_timestamp,omitempty"`
	Value            map[string]interface{} `json:"value,omitempty"`
}

type FieldWriteDict

type FieldWriteDict struct {
	ControlPolicy string                 `json:"control_policy,omitempty"`
	Fields        TransactionFieldsWrite `json:"fields,omitempty"`
}

type FieldsResponse

type FieldsResponse struct {
	Result        *FieldsResponseResult `json:"result,omitempty"`
	TransactionId string                `json:"transaction_id,omitempty"`
	Object        string                `json:"object,omitempty"`
}

func (FieldsResponse) IsRef

func (m FieldsResponse) IsRef() bool

type FieldsResponseResult

type FieldsResponseResult struct {
	Fields   TransactionFields      `json:"fields,omitempty"`
	Warnings *FieldResponseWarnings `json:"warnings,omitempty"`
	Object   string                 `json:"object,omitempty"`
}

func (FieldsResponseResult) IsRef

func (m FieldsResponseResult) IsRef() bool

type Folder

type Folder struct {
	Id                   string                   `json:"id,omitempty"`
	Kind                 string                   `json:"kind,omitempty"`
	LastModified         int                      `json:"last_modified,omitempty"`
	OrderIndex           int                      `json:"order_index,omitempty"`
	Title                string                   `json:"title,omitempty"`
	TransactionDocuments *TransactionDocumentList `json:"transaction_documents,omitempty"`
	Object               string                   `json:"object,omitempty"`
}

func (Folder) IsRef

func (m Folder) IsRef() bool

type FolderCreate

type FolderCreate struct {
	Title string `json:"title,omitempty"`
}

type FolderCreates

type FolderCreates struct {
	Creates []*FolderCreate `json:"creates,omitempty"`
}

type FolderCreatesResponse

type FolderCreatesResponse struct {
	Result        *FolderCreatesResponseResult `json:"result,omitempty"`
	TransactionId string                       `json:"transaction_id,omitempty"`
	Object        string                       `json:"object,omitempty"`
}

func (FolderCreatesResponse) IsRef

func (m FolderCreatesResponse) IsRef() bool

type FolderCreatesResponseResult

type FolderCreatesResponseResult struct {
	FolderIds []string `json:"folder_ids,omitempty"`
	Object    string   `json:"object,omitempty"`
}

func (FolderCreatesResponseResult) IsRef

type FolderList

type FolderList struct {
	Data       []Folder `json:"data"`
	ListObject string   `json:"list_object"`
	Object     string   `json:"object"`
	HasMore    bool     `json:"has_more"`
}

func (FolderList) IsRef

func (m FolderList) IsRef() bool

func (FolderList) NextPageParams

func (m FolderList) NextPageParams() core.PageParams

type FolderRename

type FolderRename struct {
	FolderId string `json:"folder_id,omitempty"`
	Title    string `json:"title,omitempty"`
}

type FolderRenames

type FolderRenames struct {
	Renames []*FolderRename `json:"renames,omitempty"`
}

type FolderRenamesResponse

type FolderRenamesResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (FolderRenamesResponse) IsRef

func (m FolderRenamesResponse) IsRef() bool

type FoldersResource

type FoldersResource interface {
	GetDetail(transactionId string, id string, opts ...core.RequestOption) (*Folder, error)
	GetMulti(transactionId string, ids []string, opts ...core.RequestOption) (*FolderList, error)
	List(transactionId string, opts ...core.RequestOption) (*FolderList, error)
}

func GetFoldersResource added in v3.0.9

func GetFoldersResource(client Client) FoldersResource

type FormImportsResponse

type FormImportsResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (FormImportsResponse) IsRef

func (m FormImportsResponse) IsRef() bool

type ItemDeletes

type ItemDeletes struct {
	Ids []string `json:"ids,omitempty"`
}

type ItemDeletesResponse

type ItemDeletesResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (ItemDeletesResponse) IsRef

func (m ItemDeletesResponse) IsRef() bool

type LinkListingInfo

type LinkListingInfo struct {
	MlsKind   string `json:"mls_kind"`
	MlsNumber string `json:"mls_number"`
}

type LinkListingInfoResponse

type LinkListingInfoResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (LinkListingInfoResponse) IsRef

func (m LinkListingInfoResponse) IsRef() bool

type Listing

type Listing struct {
	Id                      string    `json:"id,omitempty"`
	Address                 *Location `json:"address,omitempty"`
	Bath                    float64   `json:"bath,omitempty"`
	BathFull                float64   `json:"bath_full,omitempty"`
	BathHalf                float64   `json:"bath_half,omitempty"`
	BathOneQuarter          float64   `json:"bath_one_quarter,omitempty"`
	BathThreeQuarter        float64   `json:"bath_three_quarter,omitempty"`
	Bed                     float64   `json:"bed,omitempty"`
	CloseDate               string    `json:"close_date,omitempty"`
	ClosePrice              float64   `json:"close_price,omitempty"`
	Dom                     float64   `json:"dom,omitempty"`
	ListingDate             string    `json:"listing_date,omitempty"`
	ListingPrice            float64   `json:"listing_price,omitempty"`
	ListingType             string    `json:"listing_type,omitempty"`
	MediaUrls               []string  `json:"media_urls,omitempty"`
	MlsKind                 string    `json:"mls_kind,omitempty"`
	MlsNumber               string    `json:"mls_number,omitempty"`
	MlsStatus               string    `json:"mls_status,omitempty"`
	OriginalListPrice       float64   `json:"original_list_price,omitempty"`
	PropertyType            string    `json:"property_type,omitempty"`
	StatusDate              string    `json:"status_date,omitempty"`
	UsedInActiveTransaction *bool     `json:"used_in_active_transaction,omitempty"`
	YearBuilt               string    `json:"year_built,omitempty"`
	Object                  string    `json:"object,omitempty"`
}

func (Listing) IsRef

func (m Listing) IsRef() bool

type ListingList

type ListingList struct {
	Data       []Listing `json:"data"`
	ListObject string    `json:"list_object"`
	Object     string    `json:"object"`
	HasMore    bool      `json:"has_more"`
}

func (ListingList) IsRef

func (m ListingList) IsRef() bool

func (ListingList) NextPageParams

func (m ListingList) NextPageParams() core.PageParams

type ListingsResource

type ListingsResource interface {
	GetDetail(id string, opts ...core.RequestOption) (*Listing, error)
	GetMulti(ids []string, opts ...core.RequestOption) (*ListingList, error)
	List(opts ...core.RequestOption) (*ListingList, error)
}

func GetListingsResource added in v3.0.9

func GetListingsResource(client Client) ListingsResource

type Location

type Location struct {
	AgentAddress  string `json:"agent_address,omitempty"`
	City          string `json:"city,omitempty"`
	County        string `json:"county,omitempty"`
	PrettyAddress string `json:"pretty_address,omitempty"`
	State         string `json:"state,omitempty"`
	Street        string `json:"street,omitempty"`
	StreetNumber  string `json:"street_number,omitempty"`
	StreetType    string `json:"street_type,omitempty"`
	UnitNumber    string `json:"unit_number,omitempty"`
	UnitType      string `json:"unit_type,omitempty"`
	ZipCode       string `json:"zip_code,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (Location) IsRef

func (m Location) IsRef() bool

type MergeDocumentsResponse added in v3.0.33

type MergeDocumentsResponse struct {
	IsDelayed     *bool  `json:"is_delayed,omitempty"`
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (MergeDocumentsResponse) IsRef added in v3.0.33

func (m MergeDocumentsResponse) IsRef() bool

type Notification

type Notification struct {
	Bcc              []string               `json:"bcc,omitempty"`
	Cc               []string               `json:"cc,omitempty"`
	Context          map[string]interface{} `json:"context,omitempty"`
	IncludeSignature *bool                  `json:"include_signature,omitempty"`
	Recipients       []string               `json:"recipients,omitempty"`
	SeparateEmails   *bool                  `json:"separate_emails,omitempty"`
	Template         string                 `json:"template"`
}

type NotificationResponse

type NotificationResponse struct {
	Results []string `json:"results"`
	Object  string   `json:"object,omitempty"`
}

func (NotificationResponse) IsRef

func (m NotificationResponse) IsRef() bool

type NotificationsResource

type NotificationsResource interface {
	SendEmail(notification Notification, opts ...core.RequestOption) (*NotificationResponse, error)
}

func GetNotificationsResource added in v3.0.9

func GetNotificationsResource(client Client) NotificationsResource

type PartiesResource

type PartiesResource interface {
	GetDetail(transactionId string, id string, opts ...core.RequestOption) (*Party, error)
	GetMulti(transactionId string, ids []string, opts ...core.RequestOption) (*PartyList, error)
	List(transactionId string, opts ...core.RequestOption) (*PartyList, error)
}

func GetPartiesResource added in v3.0.9

func GetPartiesResource(client Client) PartiesResource

type Party

type Party struct {
	Id                string         `json:"id,omitempty"`
	Contact           *Contact       `json:"contact,omitempty"`
	CreatedAt         int            `json:"created_at,omitempty"`
	Roles             []string       `json:"roles,omitempty"`
	Transaction       *Transaction   `json:"transaction,omitempty"`
	UpdatedAt         int            `json:"updated_at,omitempty"`
	UserContactId     string         `json:"user_contact_id,omitempty"`
	UserContactSource *ContactSource `json:"user_contact_source,omitempty"`
	UserId            string         `json:"user_id,omitempty"`
	Object            string         `json:"object,omitempty"`
}

func (Party) IsRef

func (m Party) IsRef() bool

type PartyCreate

type PartyCreate struct {
	Body                  string                `json:"body,omitempty"`
	Contact               *ContactRequest       `json:"contact,omitempty"`
	Invite                *bool                 `json:"invite,omitempty"`
	InviteRestrictions    []string              `json:"invite_restrictions,omitempty"`
	PromoteToPrimaryAgent *bool                 `json:"promote_to_primary_agent,omitempty"`
	Roles                 []string              `json:"roles,omitempty"`
	Subject               string                `json:"subject,omitempty"`
	SuppressInviteEmail   *bool                 `json:"suppress_invite_email,omitempty"`
	UserContactId         string                `json:"user_contact_id,omitempty"`
	UserContactSource     *ContactSourceRequest `json:"user_contact_source,omitempty"`
}

type PartyCreates

type PartyCreates struct {
	Creates []*PartyCreate `json:"creates"`
}

type PartyCreatesResponse

type PartyCreatesResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (PartyCreatesResponse) IsRef

func (m PartyCreatesResponse) IsRef() bool

type PartyInvite

type PartyInvite struct {
	Body                string   `json:"body,omitempty"`
	InviteRestrictions  []string `json:"invite_restrictions,omitempty"`
	PartyId             string   `json:"party_id"`
	Subject             string   `json:"subject,omitempty"`
	SuppressInviteEmail *bool    `json:"suppress_invite_email,omitempty"`
}

type PartyInvites

type PartyInvites struct {
	Invites []*PartyInvite `json:"invites"`
}

type PartyInvitesResponse

type PartyInvitesResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (PartyInvitesResponse) IsRef

func (m PartyInvitesResponse) IsRef() bool

type PartyList

type PartyList struct {
	Data       []Party `json:"data"`
	ListObject string  `json:"list_object"`
	Object     string  `json:"object"`
	HasMore    bool    `json:"has_more"`
}

func (PartyList) IsRef

func (m PartyList) IsRef() bool

func (PartyList) NextPageParams

func (m PartyList) NextPageParams() core.PageParams

type PartyPatch

type PartyPatch struct {
	Contact *ContactRequest `json:"contact,omitempty"`
	PartyId string          `json:"party_id,omitempty"`
	Roles   []string        `json:"roles,omitempty"`
}

type PartyPatches

type PartyPatches struct {
	Patches []*PartyPatch `json:"patches,omitempty"`
}

type PartyPatchesResponse

type PartyPatchesResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (PartyPatchesResponse) IsRef

func (m PartyPatchesResponse) IsRef() bool

type PartyRemove

type PartyRemove struct {
	PartyId string `json:"party_id,omitempty"`
}

type PartyRemoves

type PartyRemoves struct {
	Removes []*PartyRemove `json:"removes,omitempty"`
}

type PartyRemovesResponse

type PartyRemovesResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (PartyRemovesResponse) IsRef

func (m PartyRemovesResponse) IsRef() bool

type PartyRoles

type PartyRoles struct {
	Data   []string `json:"data,omitempty"`
	Object string   `json:"object,omitempty"`
}

func (PartyRoles) IsRef

func (m PartyRoles) IsRef() bool

type PartyUpdateContactDetails

type PartyUpdateContactDetails struct {
	Contact               *ContactRequest `json:"contact,omitempty"`
	PartyId               string          `json:"party_id,omitempty"`
	PromoteToPrimaryAgent *bool           `json:"promote_to_primary_agent,omitempty"`
	Roles                 []string        `json:"roles,omitempty"`
}

type PartyUpdateContactDetailsResponse

type PartyUpdateContactDetailsResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (PartyUpdateContactDetailsResponse) IsRef

type ReorderFoldersResponse added in v3.0.3

type ReorderFoldersResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (ReorderFoldersResponse) IsRef added in v3.0.3

func (m ReorderFoldersResponse) IsRef() bool

type SignatureDetectionAnalysisResult

type SignatureDetectionAnalysisResult struct {
	DocumentZone *DocumentZone `json:"document_zone,omitempty"`
	Score        float64       `json:"score,omitempty"`
	Object       string        `json:"object,omitempty"`
}

func (SignatureDetectionAnalysisResult) IsRef

type SignatureDetectionAsyncResponse

type SignatureDetectionAsyncResponse struct {
	ReqId      string                                       `json:"req_id,omitempty"`
	Signatures map[string]*SignatureDetectionAnalysisResult `json:"signatures,omitempty"`
	Object     string                                       `json:"object,omitempty"`
}

func (SignatureDetectionAsyncResponse) IsRef

type SignatureDetectionResponse

type SignatureDetectionResponse struct {
	ReqId  string                           `json:"req_id,omitempty"`
	Result *SignatureDetectionAsyncResponse `json:"result,omitempty"`
	Object string                           `json:"object,omitempty"`
}

func (SignatureDetectionResponse) IsRef

func (m SignatureDetectionResponse) IsRef() bool

type SignatureDetectionSchema

type SignatureDetectionSchema struct {
	Files   []http.File       `json:"files,omitempty"`
	Uploads []*DocumentUpload `json:"uploads,omitempty"`
}

type Task added in v3.1.2

type Task struct {
	Id          string       `json:"id,omitempty"`
	BoardId     string       `json:"board_id,omitempty"`
	Name        string       `json:"name,omitempty"`
	OrderIndex  int          `json:"order_index,omitempty"`
	Status      string       `json:"status,omitempty"`
	TaskKind    string       `json:"task_kind,omitempty"`
	Title       string       `json:"title,omitempty"`
	Transaction *Transaction `json:"transaction,omitempty"`
	Type        string       `json:"type,omitempty"`
	Object      string       `json:"object,omitempty"`
}

func (Task) IsRef added in v3.1.2

func (m Task) IsRef() bool

type TaskList added in v3.1.2

type TaskList struct {
	Data       []Task `json:"data"`
	ListObject string `json:"list_object"`
	Object     string `json:"object"`
	HasMore    bool   `json:"has_more"`
}

func (TaskList) IsRef added in v3.1.2

func (m TaskList) IsRef() bool

func (TaskList) NextPageParams added in v3.1.2

func (m TaskList) NextPageParams() core.PageParams

type TasksResource added in v3.1.2

type TasksResource interface {
	GetDetail(transactionId string, id string, opts ...core.RequestOption) (*Task, error)
	GetMulti(transactionId string, ids []string, opts ...core.RequestOption) (*TaskList, error)
	List(transactionId string, opts ...core.RequestOption) (*TaskList, error)
}

func GetTasksResource added in v3.1.2

func GetTasksResource(client Client) TasksResource

type Transaction

type Transaction struct {
	Id                    string                   `json:"id,omitempty"`
	Address               *Address                 `json:"address,omitempty"`
	Archived              *bool                    `json:"archived,omitempty"`
	Fields                TransactionFields        `json:"fields,omitempty"`
	Folders               *FolderList              `json:"folders,omitempty"`
	IngestDocumentsEmail  string                   `json:"ingest_documents_email,omitempty"`
	IsLease               *bool                    `json:"is_lease,omitempty"`
	Parties               *PartyList               `json:"parties,omitempty"`
	ReState               string                   `json:"re_state,omitempty"`
	SecondaryAddressesIds []string                 `json:"secondary_addresses_ids,omitempty"`
	Side                  string                   `json:"side,omitempty"`
	Stage                 string                   `json:"stage,omitempty"`
	Tasks                 *TaskList                `json:"tasks,omitempty"`
	Title                 string                   `json:"title,omitempty"`
	TransactionDocuments  *TransactionDocumentList `json:"transaction_documents,omitempty"`
	Object                string                   `json:"object,omitempty"`
}

func (Transaction) GetFields

func (t Transaction) GetFields(fieldIds ...string) TransactionFields

func (Transaction) GetFieldsWrite

func (t Transaction) GetFieldsWrite(fieldValues TransactionFieldValues) TransactionFieldsWrite

func (Transaction) IsRef

func (m Transaction) IsRef() bool

type TransactionArchivalStatus

type TransactionArchivalStatus struct {
	Archived *bool `json:"archived,omitempty"`
}

type TransactionByOrgSchema

type TransactionByOrgSchema struct {
	Cursor  string   `json:"cursor,omitempty"`
	Data    []string `json:"data,omitempty"`
	HasMore *bool    `json:"has_more,omitempty"`
	Total   int      `json:"total,omitempty"`
	Object  string   `json:"object,omitempty"`
}

func (TransactionByOrgSchema) IsRef

func (m TransactionByOrgSchema) IsRef() bool

type TransactionCreate

type TransactionCreate struct {
	AdditionalParties []*PartyCreate      `json:"additional_parties,omitempty"`
	Address           *Address            `json:"address,omitempty"`
	Creator           *TransactionCreator `json:"creator,omitempty"`
	CreatorRoles      []string            `json:"creator_roles,omitempty"`
	IsLease           *bool               `json:"is_lease,omitempty"`
	ReState           string              `json:"re_state,omitempty"`
	Stage             string              `json:"stage,omitempty"`
	Title             string              `json:"title,omitempty"`
}

type TransactionCreator

type TransactionCreator struct {
	UserContactId     string                `json:"user_contact_id,omitempty"`
	UserContactSource *ContactSourceRequest `json:"user_contact_source,omitempty"`
}

type TransactionDocument

type TransactionDocument struct {
	Id              string       `json:"id,omitempty"`
	Folder          *Folder      `json:"folder,omitempty"`
	FolderKind      string       `json:"folder_kind,omitempty"`
	LastModified    int          `json:"last_modified,omitempty"`
	LatestVersionId string       `json:"latest_version_id,omitempty"`
	Order           int          `json:"order,omitempty"`
	Title           string       `json:"title,omitempty"`
	Transaction     *Transaction `json:"transaction,omitempty"`
	Url             string       `json:"url,omitempty"`
	Object          string       `json:"object,omitempty"`
}

func (TransactionDocument) IsRef

func (m TransactionDocument) IsRef() bool

type TransactionDocumentAssignment

type TransactionDocumentAssignment struct {
	FolderId              string `json:"folder_id,omitempty"`
	Order                 int    `json:"order,omitempty"`
	TransactionDocumentId string `json:"transaction_document_id,omitempty"`
}

type TransactionDocumentAssignments

type TransactionDocumentAssignments struct {
	Assignments []*TransactionDocumentAssignment `json:"assignments,omitempty"`
}

type TransactionDocumentAssignmentsResponse

type TransactionDocumentAssignmentsResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (TransactionDocumentAssignmentsResponse) IsRef

type TransactionDocumentList

type TransactionDocumentList struct {
	Data       []TransactionDocument `json:"data"`
	ListObject string                `json:"list_object"`
	Object     string                `json:"object"`
	HasMore    bool                  `json:"has_more"`
}

func (TransactionDocumentList) IsRef

func (m TransactionDocumentList) IsRef() bool

func (TransactionDocumentList) NextPageParams

func (m TransactionDocumentList) NextPageParams() core.PageParams

type TransactionDocumentRename

type TransactionDocumentRename struct {
	Title                 string `json:"title,omitempty"`
	TransactionDocumentId string `json:"transaction_document_id,omitempty"`
}

type TransactionDocumentRenames

type TransactionDocumentRenames struct {
	Renames []*TransactionDocumentRename `json:"renames,omitempty"`
}

type TransactionDocumentRenamesResponse

type TransactionDocumentRenamesResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (TransactionDocumentRenamesResponse) IsRef

type TransactionDocumentReorderFolder added in v3.0.3

type TransactionDocumentReorderFolder struct {
	FolderId   string `json:"folder_id,omitempty"`
	OrderIndex int    `json:"order_index,omitempty"`
}

type TransactionDocumentReorderFolders added in v3.0.3

type TransactionDocumentReorderFolders struct {
	Folders []*TransactionDocumentReorderFolder `json:"folders,omitempty"`
}

type TransactionDocumentRestoresResponse

type TransactionDocumentRestoresResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (TransactionDocumentRestoresResponse) IsRef

type TransactionDocumentTrashes

type TransactionDocumentTrashes struct {
	TransactionDocumentIds []string `json:"transaction_document_ids,omitempty"`
}

type TransactionDocumentTrashesResponse

type TransactionDocumentTrashesResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (TransactionDocumentTrashesResponse) IsRef

type TransactionDocumentUpload

type TransactionDocumentUpload struct {
	FolderId string `json:"folder_id,omitempty"`
	Title    string `json:"title,omitempty"`
}

type TransactionDocumentUploads

type TransactionDocumentUploads struct {
	Files   []http.File                  `json:"files,omitempty"`
	Uploads []*TransactionDocumentUpload `json:"uploads,omitempty"`
}

type TransactionDocumentsResource

type TransactionDocumentsResource interface {
	GetDetail(transactionId string, id string, opts ...core.RequestOption) (*TransactionDocument, error)
	GetMulti(transactionId string, ids []string, opts ...core.RequestOption) (*TransactionDocumentList, error)
	List(transactionId string, opts ...core.RequestOption) (*TransactionDocumentList, error)
	Uploads(transactionId string, transactiondocumentuploads TransactionDocumentUploads, files []core.File, opts ...core.RequestOption) (*UploadsResponse, error)
}

func GetTransactionDocumentsResource added in v3.0.9

func GetTransactionDocumentsResource(client Client) TransactionDocumentsResource

type TransactionDocumentsRestore

type TransactionDocumentsRestore struct {
	FolderId              string `json:"folder_id,omitempty"`
	TransactionDocumentId string `json:"transaction_document_id,omitempty"`
}

type TransactionDocumentsRestores

type TransactionDocumentsRestores struct {
	Restores []*TransactionDocumentsRestore `json:"restores,omitempty"`
}

type TransactionField

type TransactionField struct {
	Value     TransactionFieldValue `json:"value"`
	Timestamp int                   `json:"timestamp"`
}

type TransactionFieldValue

type TransactionFieldValue = interface{}

type TransactionFieldValues

type TransactionFieldValues = map[string]TransactionFieldValue

type TransactionFieldWrite

type TransactionFieldWrite struct {
	Value            TransactionFieldValue `json:"value"`
	ControlTimestamp int                   `json:"control_timestamp"`
}

func GetFieldWrite

func GetFieldWrite(value TransactionFieldValue, controlTimestamp int) TransactionFieldWrite

func GetFieldWriteNoControl

func GetFieldWriteNoControl(value TransactionFieldValue) TransactionFieldWrite

type TransactionFields

type TransactionFields = map[string]TransactionField

type TransactionFieldsWrite

type TransactionFieldsWrite = map[string]TransactionFieldWrite

func CombineFieldsWrites

func CombineFieldsWrites(fieldWrites ...TransactionFieldsWrite) TransactionFieldsWrite

type TransactionFormImport

type TransactionFormImport struct {
	FormId string `json:"form_id"`
	Title  string `json:"title,omitempty"`
}

type TransactionFormImports

type TransactionFormImports struct {
	FolderId string                   `json:"folder_id,omitempty"`
	Imports  []*TransactionFormImport `json:"imports"`
}

type TransactionList

type TransactionList struct {
	Data       []Transaction `json:"data"`
	ListObject string        `json:"list_object"`
	Object     string        `json:"object"`
	HasMore    bool          `json:"has_more"`
}

func (TransactionList) IsRef

func (m TransactionList) IsRef() bool

func (TransactionList) NextPageParams

func (m TransactionList) NextPageParams() core.PageParams

type TransactionMeta

type TransactionMeta struct {
	IsLease *bool  `json:"is_lease,omitempty"`
	Title   string `json:"title,omitempty"`
}

type TransactionMetaUpdate

type TransactionMetaUpdate struct {
	Data *TransactionMeta `json:"data,omitempty"`
}

type TransactionsResource

type TransactionsResource interface {
	Folders() FoldersResource
	Parties() PartiesResource
	Tasks() TasksResource
	TransactionDocuments() TransactionDocumentsResource
	GetDetail(id string, opts ...core.RequestOption) (*Transaction, error)
	GetMulti(ids []string, opts ...core.RequestOption) (*TransactionList, error)
	List(opts ...core.RequestOption) (*TransactionList, error)
	Create(transactioncreate TransactionCreate, opts ...core.RequestOption) (*CreateResponse, error)
	AvailablePartyRoles(opts ...core.RequestOption) (*PartyRoles, error)
	OrgsTransactionsIds(opts ...core.RequestOption) (*TransactionByOrgSchema, error)
	DeletedParties(id string, opts ...core.RequestOption) (*DeletedParties, error)
	Fields(id string, fieldsWrites TransactionFieldsWrite, controlPolicy string, opts ...core.RequestOption) (*FieldsResponse, error)
	FolderCreates(id string, foldercreates FolderCreates, opts ...core.RequestOption) (*FolderCreatesResponse, error)
	FolderRenames(id string, folderrenames FolderRenames, opts ...core.RequestOption) (*FolderRenamesResponse, error)
	FormImports(id string, transactionformimports TransactionFormImports, opts ...core.RequestOption) (*FormImportsResponse, error)
	ItemDeletes(id string, itemdeletes ItemDeletes, opts ...core.RequestOption) (*ItemDeletesResponse, error)
	LinkListingInfo(id string, linklistinginfo LinkListingInfo, opts ...core.RequestOption) (*LinkListingInfoResponse, error)
	MergeDocuments(id string, documentmergeschema DocumentMergeSchema, opts ...core.RequestOption) (*MergeDocumentsResponse, error)
	PartyCreates(id string, partycreates PartyCreates, opts ...core.RequestOption) (*PartyCreatesResponse, error)
	PartyInvites(id string, partyinvites PartyInvites, opts ...core.RequestOption) (*PartyInvitesResponse, error)
	PartyPatches(id string, partypatches PartyPatches, opts ...core.RequestOption) (*PartyPatchesResponse, error)
	PartyRemoves(id string, partyremoves PartyRemoves, opts ...core.RequestOption) (*PartyRemovesResponse, error)
	PartyUpdateContactDetails(id string, partyupdatecontactdetails PartyUpdateContactDetails, opts ...core.RequestOption) (*PartyUpdateContactDetailsResponse, error)
	ReorderFolders(id string, transactiondocumentreorderfolders TransactionDocumentReorderFolders, opts ...core.RequestOption) (*ReorderFoldersResponse, error)
	TransactionDocumentAssignments(id string, transactiondocumentassignments TransactionDocumentAssignments, opts ...core.RequestOption) (*TransactionDocumentAssignmentsResponse, error)
	TransactionDocumentRenames(id string, transactiondocumentrenames TransactionDocumentRenames, opts ...core.RequestOption) (*TransactionDocumentRenamesResponse, error)
	TransactionDocumentRestores(id string, transactiondocumentsrestores TransactionDocumentsRestores, opts ...core.RequestOption) (*TransactionDocumentRestoresResponse, error)
	TransactionDocumentTrashes(id string, transactiondocumenttrashes TransactionDocumentTrashes, opts ...core.RequestOption) (*TransactionDocumentTrashesResponse, error)
	UpdateArchivalStatus(id string, transactionarchivalstatus TransactionArchivalStatus, opts ...core.RequestOption) (*UpdateArchivalStatusResponse, error)
	UpdateTransactionMeta(id string, transactionmetaupdate TransactionMetaUpdate, opts ...core.RequestOption) (*UpdateTransactionMetaResponse, error)
}

func GetTransactionsResource added in v3.0.9

func GetTransactionsResource(client Client) TransactionsResource

type UpdateArchivalStatusResponse

type UpdateArchivalStatusResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (UpdateArchivalStatusResponse) IsRef

type UpdateTransactionMetaResponse

type UpdateTransactionMetaResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (UpdateTransactionMetaResponse) IsRef

type UploadsResponse

type UploadsResponse struct {
	TransactionId string `json:"transaction_id,omitempty"`
	Object        string `json:"object,omitempty"`
}

func (UploadsResponse) IsRef

func (m UploadsResponse) IsRef() bool

type User

type User struct {
	Id           string   `json:"id,omitempty"`
	AgentAddress *Address `json:"agent_address,omitempty"`
	Contact      *Contact `json:"contact,omitempty"`
	Uuid         string   `json:"uuid,omitempty"`
	Object       string   `json:"object,omitempty"`
}

func (User) IsRef

func (m User) IsRef() bool

type UserBillingInfo

type UserBillingInfo struct {
	StripeCustomerId string `json:"stripe_customer_id,omitempty"`
	Object           string `json:"object,omitempty"`
}

func (UserBillingInfo) IsRef

func (m UserBillingInfo) IsRef() bool

type UserList

type UserList struct {
	Data       []User `json:"data"`
	ListObject string `json:"list_object"`
	Object     string `json:"object"`
	HasMore    bool   `json:"has_more"`
}

func (UserList) IsRef

func (m UserList) IsRef() bool

func (UserList) NextPageParams

func (m UserList) NextPageParams() core.PageParams

type UserManagementResource

type UserManagementResource interface {
	GetDetail(id string, opts ...core.RequestOption) (*User, error)
	List(opts ...core.RequestOption) (*UserList, error)
	Upsert(usermanagementschema UserManagementSchema, opts ...core.RequestOption) (*User, error)
}

func GetUserManagementResource added in v3.0.9

func GetUserManagementResource(client Client) UserManagementResource

type UserManagementSchema

type UserManagementSchema struct {
	Email           string   `json:"email"`
	FirstName       string   `json:"first_name"`
	LastName        string   `json:"last_name"`
	LinkedSubjectId string   `json:"linked_subject_id"`
	MarketIds       []string `json:"market_ids,omitempty"`
	SubmarketIds    []string `json:"submarket_ids,omitempty"`
	UsState         string   `json:"us_state,omitempty"`
}

type UsersResource

type UsersResource interface {
	GetDetail(id string, opts ...core.RequestOption) (*User, error)
	Current(opts ...core.RequestOption) (*User, error)
	CurrentBilling(opts ...core.RequestOption) (*UserBillingInfo, error)
}

func GetUsersResource added in v3.0.9

func GetUsersResource(client Client) UsersResource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL