glide

package module
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MIT Imports: 10 Imported by: 0

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

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 (engineering@glide.com) 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

Example usage

package my_package

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

    "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 := "your.user@domain.com"
    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:     "some@test.com",
            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 == "some@test.com" {
            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

func GetExpandFields added in v0.1.5

func GetExpandFields(fieldIds ...string) string

func GetRsa256Key added in v0.1.2

func GetRsa256Key(privateKeyFilePath string) rsa256Key

func GetRsa256KeyFromPEMBytes added in v0.1.2

func GetRsa256KeyFromPEMBytes(privateKeyBytes []byte) rsa256Key

func GetRsa256KeyFromPEMString added in v0.1.2

func GetRsa256KeyFromPEMString(privateKeyString string) rsa256Key

func WithAudience added in v0.1.2

func WithAudience(audience string) clientOption

func WithBasePath added in v0.1.2

func WithBasePath(basePath string) clientOption

func WithExpand added in v0.1.2

func WithExpand(paths ...string) requestOption

func WithHost added in v0.1.2

func WithHost(host string) clientOption

func WithPage added in v0.1.2

func WithPage(pageParams *PageParams) requestOption

func WithPageLimit added in v0.1.2

func WithPageLimit(limit int) requestOption

func WithPageParams added in v0.1.2

func WithPageParams(limit int, startingAfter string) requestOption

func WithPageStartingAfter added in v0.1.2

func WithPageStartingAfter(startingAfter string) requestOption

func WithProtocol added in v0.1.2

func WithProtocol(protocol string) clientOption

func WithQueryParam added in v0.1.5

func WithQueryParam(qParam string, value string) requestOption

func WithQueryParamList added in v0.1.5

func WithQueryParamList(qParam string, values ...string) requestOption

func WithURL added in v0.1.2

func WithURL(URL string) clientOption

func WithUpdatedAfter added in v0.1.8

func WithUpdatedAfter(ts int) requestOption

Types

type Address added in v0.1.2

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 added in v0.1.2

func (m Address) IsRef() bool

type Agent added in v0.1.2

type Agent struct {
	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 added in v0.1.2

func (m Agent) IsRef() bool

type AgentRequest added in v0.1.17

type AgentRequest struct {
	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 ApiError added in v0.1.2

type ApiError struct {
	Description     string
	StatusCode      int
	ResponseHeaders http.Header
	Params          map[string]interface{}
	Err             error
}

func GetApiError added in v0.1.2

func GetApiError(e error) *ApiError

func (*ApiError) Error added in v0.1.2

func (e *ApiError) Error() string

func (*ApiError) GetMissingScopes added in v0.1.2

func (e *ApiError) GetMissingScopes() []string

func (*ApiError) HasToRequestScopes added in v0.1.2

func (e *ApiError) HasToRequestScopes() bool

func (*ApiError) IsMissingScopes added in v0.1.2

func (e *ApiError) IsMissingScopes() bool

func (*ApiError) RequestScopesUrl added in v0.1.2

func (e *ApiError) RequestScopesUrl() string

func (*ApiError) Unwrap added in v0.1.5

func (e *ApiError) Unwrap() error

type Client added in v0.1.5

type Client interface {
	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
	// contains filtered or unexported methods
}

func GetClient

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

type Contact added in v0.1.2

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"`
	Email           string   `json:"email,omitempty"`
	EntityName      string   `json:"entity_name,omitempty"`
	EntityType      string   `json:"entity_type,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 added in v0.1.2

func (m Contact) IsRef() bool

type ContactCreate added in v0.1.17

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

type ContactCreateResponse added in v0.1.17

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

func (ContactCreateResponse) IsRef added in v0.1.17

func (m ContactCreateResponse) IsRef() bool

type ContactList added in v0.1.17

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

func (ContactList) IsRef added in v0.1.17

func (m ContactList) IsRef() bool

func (ContactList) NextPageParams added in v0.1.17

func (m ContactList) NextPageParams() *PageParams

type ContactRequest added in v0.1.17

type ContactRequest struct {
	Address         *Address      `json:"address,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"`
	Email           string        `json:"email,omitempty"`
	EntityName      string        `json:"entity_name,omitempty"`
	EntityType      string        `json:"entity_type,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 added in v0.1.21

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

func (ContactSource) IsRef added in v0.1.21

func (m ContactSource) IsRef() bool

type ContactSourceRequest added in v0.1.22

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

type ContactUpdate added in v0.1.17

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

type ContactUpdateResponse added in v0.1.17

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

func (ContactUpdateResponse) IsRef added in v0.1.17

func (m ContactUpdateResponse) IsRef() bool

type ContactsResource added in v0.1.17

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

type CreateResponse added in v0.1.5

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

func (CreateResponse) IsRef added in v0.1.5

func (m CreateResponse) IsRef() bool

type DocumentSplitAsyncResponse added in v0.1.15

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

func (DocumentSplitAsyncResponse) IsRef added in v0.1.15

func (m DocumentSplitAsyncResponse) IsRef() bool

type DocumentSplitResponse added in v0.1.15

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

func (DocumentSplitResponse) IsRef added in v0.1.15

func (m DocumentSplitResponse) IsRef() bool

type DocumentSplitSchema added in v0.1.15

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 added in v0.1.15

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 added in v0.1.15

func (m DocumentSplitSuggestion) IsRef() bool

type DocumentUpload added in v0.1.15

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

type DocumentZone added in v0.1.15

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 added in v0.1.15

func (m DocumentZone) IsRef() bool

type DocumentZoneLocation added in v0.1.15

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 added in v0.1.15

func (m DocumentZoneLocation) IsRef() bool

type DocumentZoneVertex added in v0.1.15

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

func (DocumentZoneVertex) IsRef added in v0.1.15

func (m DocumentZoneVertex) IsRef() bool

type DocumentsResource added in v0.1.15

type DocumentsResource interface {
	DocumentSplit(documentSplitSchema DocumentSplitSchema, opts ...requestOption) (*DocumentSplitResponse, error)
	SignatureDetection(signatureDetectionSchema SignatureDetectionSchema, opts ...requestOption) (*SignatureDetectionResponse, error)
}

type Field added in v0.1.12

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

func (Field) IsRef added in v0.1.12

func (m Field) IsRef() bool

type FieldOutOfDateDetail added in v0.1.12

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

func (FieldOutOfDateDetail) IsRef added in v0.1.12

func (m FieldOutOfDateDetail) IsRef() bool

type FieldResponse added in v0.1.12

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

func (FieldResponse) IsRef added in v0.1.12

func (m FieldResponse) IsRef() bool

type FieldResponseWarnings added in v0.1.12

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

func (FieldResponseWarnings) IsRef added in v0.1.12

func (m FieldResponseWarnings) IsRef() bool

type FieldWrite added in v0.1.12

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

type FieldWriteDict added in v0.1.2

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

type FieldsResponse added in v0.1.2

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

func (FieldsResponse) IsRef added in v0.1.2

func (m FieldsResponse) IsRef() bool

type FieldsResponseResult added in v0.1.2

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

func (FieldsResponseResult) IsRef added in v0.1.2

func (m FieldsResponseResult) IsRef() bool

type Folder added in v0.1.2

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

func (Folder) IsRef added in v0.1.2

func (m Folder) IsRef() bool

type FolderCreate added in v0.1.2

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

type FolderCreates added in v0.1.2

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

type FolderCreatesResponse added in v0.1.2

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

func (FolderCreatesResponse) IsRef added in v0.1.2

func (m FolderCreatesResponse) IsRef() bool

type FolderCreatesResponseResult added in v0.1.2

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

func (FolderCreatesResponseResult) IsRef added in v0.1.2

type FolderList added in v0.1.2

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

func (FolderList) IsRef added in v0.1.2

func (m FolderList) IsRef() bool

func (FolderList) NextPageParams added in v0.1.2

func (m FolderList) NextPageParams() *PageParams

type FolderRename added in v0.1.2

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

type FolderRenames added in v0.1.2

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

type FolderRenamesResponse added in v0.1.2

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

func (FolderRenamesResponse) IsRef added in v0.1.2

func (m FolderRenamesResponse) IsRef() bool

type FoldersResource added in v0.1.2

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

type FormImportsResponse added in v0.1.5

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

func (FormImportsResponse) IsRef added in v0.1.5

func (m FormImportsResponse) IsRef() bool

type HttpReqFuncType added in v0.1.2

type HttpReqFuncType func(string) (*http.Response, error)

type ItemDeletes added in v0.1.2

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

type ItemDeletesResponse added in v0.1.2

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

func (ItemDeletesResponse) IsRef added in v0.1.2

func (m ItemDeletesResponse) IsRef() bool

type Key added in v0.1.2

type Key interface {
	GetJwtSigningMethod() jwt.SigningMethod
	GetDecoded() (crypto.PrivateKey, error)
}

type LinkListingInfo added in v0.1.15

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

type LinkListingInfoResponse added in v0.1.15

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

func (LinkListingInfoResponse) IsRef added in v0.1.15

func (m LinkListingInfoResponse) IsRef() bool

type Listing added in v0.1.13

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 added in v0.1.13

func (m Listing) IsRef() bool

type ListingList added in v0.1.13

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

func (ListingList) IsRef added in v0.1.13

func (m ListingList) IsRef() bool

func (ListingList) NextPageParams added in v0.1.13

func (m ListingList) NextPageParams() *PageParams

type ListingsResource added in v0.1.13

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

type Location added in v0.1.13

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 added in v0.1.13

func (m Location) IsRef() bool

type Notification added in v0.1.15

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 added in v0.1.15

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

func (NotificationResponse) IsRef added in v0.1.15

func (m NotificationResponse) IsRef() bool

type NotificationsResource added in v0.1.15

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

type PageParams added in v0.1.2

type PageParams struct {
	StartingAfter string
	Limit         int
}

func (PageParams) GetQueryParams added in v0.1.2

func (p PageParams) GetQueryParams() map[string]string

type PartiesResource added in v0.1.2

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

type Party added in v0.1.2

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 added in v0.1.2

func (m Party) IsRef() bool

type PartyCreate added in v0.1.2

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 added in v0.1.2

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

type PartyCreatesResponse added in v0.1.2

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

func (PartyCreatesResponse) IsRef added in v0.1.2

func (m PartyCreatesResponse) IsRef() bool

type PartyInvite added in v0.1.14

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 added in v0.1.14

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

type PartyInvitesResponse added in v0.1.14

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

func (PartyInvitesResponse) IsRef added in v0.1.14

func (m PartyInvitesResponse) IsRef() bool

type PartyList added in v0.1.2

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

func (PartyList) IsRef added in v0.1.2

func (m PartyList) IsRef() bool

func (PartyList) NextPageParams added in v0.1.2

func (m PartyList) NextPageParams() *PageParams

type PartyPatch added in v0.1.2

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

type PartyPatches added in v0.1.2

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

type PartyPatchesResponse added in v0.1.2

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

func (PartyPatchesResponse) IsRef added in v0.1.2

func (m PartyPatchesResponse) IsRef() bool

type PartyRemove added in v0.1.2

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

type PartyRemoves added in v0.1.2

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

type PartyRemovesResponse added in v0.1.2

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

func (PartyRemovesResponse) IsRef added in v0.1.2

func (m PartyRemovesResponse) IsRef() bool

type PartyRoles added in v0.1.17

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

func (PartyRoles) IsRef added in v0.1.17

func (m PartyRoles) IsRef() bool

type PartyUpdateContactDetails added in v1.0.13

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 added in v1.0.13

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

func (PartyUpdateContactDetailsResponse) IsRef added in v1.0.13

type QueryParams added in v0.1.2

type QueryParams map[string]string

type Request added in v0.1.2

type Request interface{}

type Response added in v0.1.2

type Response interface {
	IsRef() bool
}

type SignatureDetectionAnalysisResult added in v0.1.15

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

func (SignatureDetectionAnalysisResult) IsRef added in v0.1.15

type SignatureDetectionAsyncResponse added in v0.1.15

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

func (SignatureDetectionAsyncResponse) IsRef added in v0.1.15

type SignatureDetectionResponse added in v0.1.15

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

func (SignatureDetectionResponse) IsRef added in v0.1.15

func (m SignatureDetectionResponse) IsRef() bool

type SignatureDetectionSchema added in v0.1.15

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

type Transaction added in v0.1.2

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"`
	Title                 string                   `json:"title,omitempty"`
	TransactionDocuments  *TransactionDocumentList `json:"transaction_documents,omitempty"`
	Object                string                   `json:"object,omitempty"`
}

func (Transaction) GetFields added in v0.1.2

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

func (Transaction) GetFieldsWrite added in v0.1.2

func (t Transaction) GetFieldsWrite(fieldValues TransactionFieldValues) TransactionFieldsWrite

func (Transaction) IsRef added in v0.1.2

func (m Transaction) IsRef() bool

type TransactionArchivalStatus added in v0.1.5

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

type TransactionByOrgSchema added in v1.0.9

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 added in v1.0.9

func (m TransactionByOrgSchema) IsRef() bool

type TransactionCreate added in v0.1.5

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 added in v1.0.5

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

type TransactionDocument added in v0.1.2

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"`
	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 added in v0.1.2

func (m TransactionDocument) IsRef() bool

type TransactionDocumentAssignment added in v0.1.2

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

type TransactionDocumentAssignments added in v0.1.2

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

type TransactionDocumentAssignmentsResponse added in v0.1.5

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

func (TransactionDocumentAssignmentsResponse) IsRef added in v0.1.5

type TransactionDocumentList added in v0.1.2

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

func (TransactionDocumentList) IsRef added in v0.1.2

func (m TransactionDocumentList) IsRef() bool

func (TransactionDocumentList) NextPageParams added in v0.1.2

func (m TransactionDocumentList) NextPageParams() *PageParams

type TransactionDocumentRename added in v0.1.2

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

type TransactionDocumentRenames added in v0.1.2

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

type TransactionDocumentRenamesResponse added in v0.1.2

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

func (TransactionDocumentRenamesResponse) IsRef added in v0.1.2

type TransactionDocumentRestoresResponse added in v0.1.2

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

func (TransactionDocumentRestoresResponse) IsRef added in v0.1.2

type TransactionDocumentTrashes added in v0.1.2

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

type TransactionDocumentTrashesResponse added in v0.1.2

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

func (TransactionDocumentTrashesResponse) IsRef added in v0.1.2

type TransactionDocumentUpload added in v0.1.5

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

type TransactionDocumentUploads added in v0.1.5

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

type TransactionDocumentsResource added in v0.1.2

type TransactionDocumentsResource interface {
	GetDetail(transactionId string, id string, opts ...requestOption) (*TransactionDocument, error)
	GetMulti(transactionId string, ids []string, opts ...requestOption) (*TransactionDocumentList, error)
	List(transactionId string, opts ...requestOption) (*TransactionDocumentList, error)
	Uploads(transactionId string, transactionDocumentUploads TransactionDocumentUploads, opts ...requestOption) (*UploadsResponse, error)
}

type TransactionDocumentsRestore added in v0.1.2

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

type TransactionDocumentsRestores added in v0.1.2

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

type TransactionField added in v0.1.2

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

type TransactionFieldValue added in v0.1.2

type TransactionFieldValue = interface{}

type TransactionFieldValues added in v0.1.2

type TransactionFieldValues = map[string]TransactionFieldValue

type TransactionFieldWrite added in v0.1.2

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

func GetFieldWrite added in v0.1.2

func GetFieldWrite(value TransactionFieldValue, controlTimestamp int) TransactionFieldWrite

func GetFieldWriteNoControl added in v0.1.2

func GetFieldWriteNoControl(value TransactionFieldValue) TransactionFieldWrite

type TransactionFields added in v0.1.2

type TransactionFields = map[string]TransactionField

type TransactionFieldsWrite added in v0.1.2

type TransactionFieldsWrite = map[string]TransactionFieldWrite

func CombineFieldsWrites added in v0.1.2

func CombineFieldsWrites(fieldWrites ...TransactionFieldsWrite) TransactionFieldsWrite

type TransactionFormImport added in v0.1.5

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

type TransactionFormImports added in v0.1.5

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

type TransactionList added in v0.1.2

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

func (TransactionList) IsRef added in v0.1.2

func (m TransactionList) IsRef() bool

func (TransactionList) NextPageParams added in v0.1.2

func (m TransactionList) NextPageParams() *PageParams

type TransactionMeta added in v0.1.11

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

type TransactionMetaUpdate added in v0.1.11

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

type TransactionsResource added in v0.1.2

type TransactionsResource interface {
	Folders() FoldersResource
	Parties() PartiesResource
	TransactionDocuments() TransactionDocumentsResource
	GetDetail(id string, opts ...requestOption) (*Transaction, error)
	GetMulti(ids []string, opts ...requestOption) (*TransactionList, error)
	List(opts ...requestOption) (*TransactionList, error)
	Create(transactionCreate TransactionCreate, opts ...requestOption) (*CreateResponse, error)
	AvailablePartyRoles(opts ...requestOption) (*PartyRoles, error)
	OrgsTransactionsIds(opts ...requestOption) (*TransactionByOrgSchema, error)
	Fields(id string, fieldsWrites TransactionFieldsWrite, controlPolicy string, opts ...requestOption) (*FieldsResponse, error)
	FolderCreates(id string, folderCreates FolderCreates, opts ...requestOption) (*FolderCreatesResponse, error)
	FolderRenames(id string, folderRenames FolderRenames, opts ...requestOption) (*FolderRenamesResponse, error)
	FormImports(id string, transactionFormImports TransactionFormImports, opts ...requestOption) (*FormImportsResponse, error)
	ItemDeletes(id string, itemDeletes ItemDeletes, opts ...requestOption) (*ItemDeletesResponse, error)
	LinkListingInfo(id string, linkListingInfo LinkListingInfo, opts ...requestOption) (*LinkListingInfoResponse, error)
	PartyCreates(id string, partyCreates PartyCreates, opts ...requestOption) (*PartyCreatesResponse, error)
	PartyInvites(id string, partyInvites PartyInvites, opts ...requestOption) (*PartyInvitesResponse, error)
	PartyPatches(id string, partyPatches PartyPatches, opts ...requestOption) (*PartyPatchesResponse, error)
	PartyRemoves(id string, partyRemoves PartyRemoves, opts ...requestOption) (*PartyRemovesResponse, error)
	PartyUpdateContactDetails(id string, partyUpdateContactDetails PartyUpdateContactDetails, opts ...requestOption) (*PartyUpdateContactDetailsResponse, error)
	TransactionDocumentAssignments(id string, transactionDocumentAssignments TransactionDocumentAssignments, opts ...requestOption) (*TransactionDocumentAssignmentsResponse, error)
	TransactionDocumentRenames(id string, transactionDocumentRenames TransactionDocumentRenames, opts ...requestOption) (*TransactionDocumentRenamesResponse, error)
	TransactionDocumentRestores(id string, transactionDocumentsRestores TransactionDocumentsRestores, opts ...requestOption) (*TransactionDocumentRestoresResponse, error)
	TransactionDocumentTrashes(id string, transactionDocumentTrashes TransactionDocumentTrashes, opts ...requestOption) (*TransactionDocumentTrashesResponse, error)
	UpdateArchivalStatus(id string, transactionArchivalStatus TransactionArchivalStatus, opts ...requestOption) (*UpdateArchivalStatusResponse, error)
	UpdateTransactionMeta(id string, transactionMetaUpdate TransactionMetaUpdate, opts ...requestOption) (*UpdateTransactionMetaResponse, error)
}

type UpdateArchivalStatusResponse added in v0.1.5

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

func (UpdateArchivalStatusResponse) IsRef added in v0.1.5

type UpdateTransactionMetaResponse added in v0.1.11

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

func (UpdateTransactionMetaResponse) IsRef added in v0.1.11

type UploadsResponse added in v0.1.5

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

func (UploadsResponse) IsRef added in v0.1.5

func (m UploadsResponse) IsRef() bool

type User added in v0.1.2

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 added in v0.1.2

func (m User) IsRef() bool

type UserBillingInfo added in v0.1.15

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

func (UserBillingInfo) IsRef added in v0.1.15

func (m UserBillingInfo) IsRef() bool

type UserList added in v0.1.17

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

func (UserList) IsRef added in v0.1.17

func (m UserList) IsRef() bool

func (UserList) NextPageParams added in v0.1.17

func (m UserList) NextPageParams() *PageParams

type UserManagementResource added in v0.1.17

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

type UserManagementSchema added in v0.1.17

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 added in v0.1.2

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

Jump to

Keyboard shortcuts

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