portal

package
v0.0.0-...-34e6f9c Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MasterAgent is the admin of this agency
	MasterAgent = iota
	// RegularAgent is a regular member of an agency
	RegularAgent = iota
)
View Source
const CreateProspectFromContact = prospectEndpoint + "/createFromContact"
View Source
const GetCompanyByExtIdEndpoint = companyEndpoint + "/getByExternalId"
View Source
const GetContactByEmailEndpoint = contactEndpoint + "/getbyemail"
View Source
const GetListingByExtIdEndpoint = listingEndpoint + "/getByExternalId"
View Source
const GetOfferByExtIdEndpoint = offerEndpoint + "/getByExternalId"
View Source
const GetUserByExtIdEndpoint = userEndpoint + "/getByExternalId"

Variables

This section is empty.

Functions

func ErrorFile

func ErrorFile() string

func ErrorLine

func ErrorLine() int

Types

type Account

type Account struct {
	ID              string           `json:"id"`
	Phone           string           `json:"phone"`
	Mobile          string           `json:"mobile"`
	Email           string           `json:"email"`
	Name            string           `json:"accountname"`
	Type            string           `json:"accounttype"`
	Industry        string           `json:"industry"`
	Website         string           `json:"website"`
	AddressID       string           `json:"addressid"`
	Address         Address          `json:"address"`
	ReferralCode    string           `json:"referralcode"`
	OwnerID         string           `json:"ownerid"`
	Owner           Company          `json:"owner"`
	AgentID         string           `json:"agentid"`
	Agent           Agent            `json:"agent"`
	Notes           string           `json:"notes"`
	AccountContacts []AccountContact `json:"accountcontacts"`
	S               Session          `json:"S"`
}

func (*Account) Delete

func (a *Account) Delete() error

Delete DELETEs an Account, using their ID

func (*Account) GetOwnedContacts

func (a *Account) GetOwnedContacts() ([]*AccountContact, error)

GetOwnedContacts GETs a list of AccountContacts that belong to the Account, using their ID

func (*Account) GetOwnedDeposits

func (a *Account) GetOwnedDeposits() ([]*Deposit, error)

GetAccountDeposits GETs a list of all DepositResponses belonging to the Account, using their ID

func (*Account) Update

func (a *Account) Update() error

UpdateAccount PUTs new Account data to an existing Account, using their ID

type AccountContact

type AccountContact struct {
	ID        string
	AgentID   string
	AccountID string
	Account   Account
	ContactID string
	Contact   Contact
}

type Address

type Address struct {
	ID           string `json:"id"`
	AddressLine1 string `json:"address_line_1"`
	AddressLine2 string `json:"address_line_2"`
	City         string `json:"city"`
	Country      string `json:"country"`
	Postcode     string `json:"postcode"`
	State        string `json:"state"`
}

Address holds any address information

type Agent

type Agent struct {
	ID           string `json:"id"`
	Firstname    string `json:"firstname"`
	Lastname     string `json:"lastname"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	Email        string `json:"email"`
	Active       bool   `json:"active"`
	Superuser    bool   `json:"superuser"`
	LastLoggedIn string `json:"lastloggedin"`
	CreatedDate  string `json:"createddate"`
	ArchivedOn   string `json:"archivedon"`
}

Agent 'User' holds the agent details

type AllocationGroupAgency

type AllocationGroupAgency struct {
	ID   string
	Name string
}

AllocationGroupAgency holds information about a AllocationGroupAgency

type Aspect

type Aspect struct {
	String string `json:"string"`
}

type Auth

type Auth struct {
	APIKey         string
	UserAPIKey     string
	Company        string
	PortalEndpoint string
}

Auth contains what is necessary to auth to the portal

type Availability

type Availability struct {
	String string `json:"string"`
}

type Bathrooms

type Bathrooms struct {
	String string `json:"string"`
}

type Bedrooms

type Bedrooms struct {
	String string `json:"string"`
}

type Building

type Building struct {
	String string `json:"string"`
}

type Carspaces

type Carspaces struct {
	String string `json:"string"`
}
type Study struct {
	String string `json:"string"`
}

type Company

type Company struct {
	ID              string        `json:"id"`
	Name            string        `json:"name"`
	Active          bool          `json:"active"`
	StripeAccountID string        `json:"stripeaccountid"`
	CreatedByID     string        `json:"createdbyid"`
	CreatedDate     string        `json:"createddate"`
	CreatedBy       Agent         `json:"createdby"`
	Projects        []Project     `json:"projects"`
	UserCompanies   []UserCompany `json:"usercompanies"`
	Events          []Event       `json:"events"`
	ExternalID      string        `json:"externalid"`
	S               Session       `json:"S"`
}

Company holds information about companies

func (*Company) AddUser

func (c *Company) AddUser(u *User, permissionlevel int64) error

AddUser adds a single user to a company

func (*Company) AddUsers

func (c *Company) AddUsers(u []*UserAdd) error

AddCompanyUser adds an Agent 'user' to the company

func (*Company) Delete

func (c *Company) Delete() error

DeleteCompany removes an existing company (using ID) from the portal

func (*Company) GetAccountsContacts

func (c *Company) GetAccountsContacts() ([]*Account, []*Contact, error)

GetCompanyAccountsContacts GETs all existing accounts and contacts for this company

func (*Company) GetAssignedProjects

func (c *Company) GetAssignedProjects() ([]*CompanyProject, error)

func (*Company) Update

func (c *Company) Update() error

Update PUTs new company details to an existing company (using ID) in the portal

type CompanyProject

type CompanyProject struct {
	OwnerID   string
	CompanyID string
	ProjectID string
}

type Contact

type Contact struct {
	ID          string  `json:"id"`
	Firstname   string  `json:"firstname"`
	Lastname    string  `json:"lastname"`
	Mobile      string  `json:"mobile"`
	Phone       string  `json:"phone"`
	Email       string  `json:"email"`
	DOB         string  `json:"dob"`
	Nationality string  `json:"nationality"`
	HasDeposit  bool    `json:"hasdeposit"`
	AddressID   string  `json:"addressid"`
	Address     Address `json:"address"`
	AgentID     string  `json:"agentid"`
	ManageByID  string  `json:"managebyid"`
	OwnerID     string  `json:"ownerid"`
	FIRB        int     `json:"firb"`
	ExternalID  string  `json:"externalid"`
	// contains filtered or unexported fields
}

Contact holds information of a contact

func (*Contact) Update

func (c *Contact) Update() (*Contact, error)

Update saves changes made to contact

type CreateProspectPayload

type CreateProspectPayload struct {
	ContactId string `json:"contactId"`
	AgentId   string `json:"userId"`
	AgencyId  string `json:"companyId"`
	ListingId string `json:"listingId"`
}

type Deposit

type Deposit struct {
	ID              string
	CompanyID       string
	ProjectID       string
	AccountID       string
	ProspectID      string
	ProspectBuyerID string
	Amount          int
	DepositType     string
	DepositStatus   string
	StripeChargeID  string
	CreatedDate     string
}

Deposit holds the deposit data

type Event

type Event struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	CompanyID   string `json:"companyid"`
	Company     Company
	ProjectID   string `json:"projectid"`
	Project     Project
	Terminals   int32  `json:"terminals"`
	CreatedDate string `json:"createddate"`
	TZInfo      string `json:"timezoneinfoid"`
	Dates       []EventDate
	ArchivedOn  string `json:"archivedon"`
	// contains filtered or unexported fields
}

Event holds information about an event

func (*Event) Delete

func (e *Event) Delete() error

DeleteEventByID DELETEs an existing event using it's ID

func (*Event) Update

func (e *Event) Update() error

UpdateEventByID PUTs new data to an existing event using it's ID

type EventDate

type EventDate struct {
	ID          string
	StartDate   string
	EndDate     string
	TimeWindow  string
	BreakLength string
	Schedules   []Schedule
	CompanyID   string
	ProjectID   string
	EventID     string
}

type ExportListing

type ExportListing struct {
	ID            ID            `json:"id"`
	ExternalID    ExternalID    `json:"externalid"`
	Name          Name          `json:"Name"`
	Availability  Availability  `json:"Sale_Stage__c"`
	Floor         Floor         `json:"ds_rep_level"`
	Building      Building      `json:"Building__r"`
	Price         Price         `json:"ds_live_price"`
	OriginalPrice OriginalPrice `json:"Sales_Price__c"`
	MarketingPlan MarketingPlan `json:"marketing_plan"`
	Bedrooms      Bedrooms      `json:"Bedrooms__c"`
	Bathrooms     Bathrooms     `json:"Bathrooms__c"`
	Carspaces     Carspaces     `json:"Parking_Allocations__c"`
	Aspect        Aspect        `json:"Aspect__c"`
	InternalArea  InternalArea  `json:"Interior_Space__c"`
	ExternalArea  ExternalArea  `json:"Exterior_Space__c"`
	TotalArea     TotalArea     `json:"Total_Space_M__c"`
	LotNumber     LotNumber     `json:"Lot_Number__c"`
	S             Session       `json:"S"`
}

type ExternalArea

type ExternalArea struct {
	Float float32 `json:"float"`
}

type ExternalID

type ExternalID struct {
	String string `json:"string"`
}

type Floor

type Floor struct {
	String string `json:"string"`
}

type ID

type ID struct {
	String string `json:"string"`
}

type InternalArea

type InternalArea struct {
	Float float32 `json:"float"`
}

type Listing

type Listing struct {
	ID            string  `json:"id"`
	ExternalID    string  `json:"externalid"`
	Name          string  `json:"listing_name"`
	Availability  string  `json:"availability"`
	Floor         string  `json:"floor"`
	Building      string  `json:"building"`
	Price         float32 `json:"live_price"`
	OriginalPrice float32 `json:"price"`
	Bedrooms      string  `json:"bedrooms"`
	Bathrooms     string  `json:"bathrooms"`
	Study         string  `json:"study"`
	Carspaces     string  `json:"carspaces"`
	Aspect        string  `json:"aspect_orientation"`
	MarketingPlan string  `json:"marketing_plan"`
	InternalArea  float32 `json:"internal_area"`
	ExternalArea  float32 `json:"external_area"`
	TotalArea     float32 `json:"total_area"`
	LotNumber     int     `json:"Lot_Number__c"`
	S             Session `json:"S"`
}

func (*Listing) Delete

func (l *Listing) Delete() error

DeleteListings removes the referenced listing from Listings

func (*Listing) Update

func (l *Listing) Update() error

SendUpdate saves changes to listing

type ListingActivity

type ListingActivity struct {
	ID           string `json:"id"`
	Timestamp    string `json:"timestamp"`
	User         string `json:"user"`
	ChangedField string `json:"changedfield"`
}

ListingActivity handles the returned JSON listing activity

type ListingStatusActivity

type ListingStatusActivity struct {
	ID        string `json:"id"`
	Timestamp string `json:"timestamp"`
	User      string `json:"user"`
}

ListingStatusActivity handles the specifically returned JSON listing status activity

type LotNumber

type LotNumber struct {
	Int int `json:"int"`
}

type MarketingPlan

type MarketingPlan struct {
	String string `json:"string"`
}

type Name

type Name struct {
	String string `json:"string"`
}

type Offer

type Offer struct {
	ID                     string
	CompanyID              string
	Company                Company
	ProjectID              string
	Project                Project
	ListingID              string
	Listing                Listing
	AgentID                string
	Agent                  Agent
	ProspectID             string
	Prospect               Prospect
	Attachments            []OfferAttachment
	TimeOfOffer            string
	Price                  string
	FundsReceived          float64
	Status                 string
	OfferStatusChangedDate string
	// contains filtered or unexported fields
}

func (*Offer) Cancel

func (o *Offer) Cancel() (*Offer, error)

CancelOffer sets an offer's status to cancelled and reverts a listing to available

func (*Offer) Complete

func (o *Offer) Complete() (*Offer, error)

CompleteOffer PUTs new data to an existing offer, changing the offer status to complete and the relevant listing to sold.

func (*Offer) Update

func (o *Offer) Update() (*Offer, error)

UpdateOffer PUTs new data to an existing offer, using an offer ID

type OfferAttachment

type OfferAttachment struct {
	ID          string
	ProjectID   string
	CompanyID   string
	OfferID     string
	FileName    string
	Size        int64
	Type        string
	DateCreated string
	Folder      string
}

type OpportunityPayload

type OpportunityPayload struct {
	ID            string `json:"id"`
	StageName     string `json:"StageName"`
	ListingStatus string `json:"ListingStatus"`
}

type OriginalPrice

type OriginalPrice struct {
	Float float32 `json:"float"`
}

type PermissionGroup

type PermissionGroup struct {
	ID        string `json:"id"`
	ProjectID string `json:"projectid"`
	CompanyID string `json:"companyid"`
	GroupType string `json:"type"`
	GroupName string `json:"groupname"`
}

type Price

type Price struct {
	Float float32 `json:"float"`
}

type Project

type Project struct {
	ID         string    `json:"id"`
	Name       string    `json:"name"`
	CompanyID  string    `json:"companyid"`
	Company    Company   `json:"omitempty"`
	Active     bool      `json:"active"`
	Listings   []Listing `json:"omitempty"`
	Events     []Event   `json:"omitempty"`
	Offers     []Offer   `json:"omitempty"`
	ExternalID string    `json:"externalid"`
	S          Session   `json:"S"`
}

TODO: Not all modelled fields have yet been included Project holds information about a project

func (*Project) AddCompany

func (p *Project) AddCompany(id string) error

AddCompany includes a company in a project

type ProjectPayload

type ProjectPayload struct {
	ID        string  `json:"ID"`
	Name      string  `json:"Name"`
	CompanyID string  `json:"CompanyID"`
	S         Session `json:"-"`
}

type Prospect

type Prospect struct {
	ID string `json:"id"`
	//BuyerCode   string “
	OwnerID     string `json:"ownerid"`
	Owner       Company
	CompanyID   string `json:"companyid"`
	Company     Company
	ProjectID   string `json:"projectid"`
	Project     Project
	AgentID     string `json:"agentid"`
	Agent       Agent
	SolicitorID string `json:"solicitorid"`
	Solicitor   ProspectSolicitor
	DateCreated string `json:"DateCreated"`
	Buyers      []ProspectBuyer
	EventID     string `json:"eventid"`
	SeatCount   int    `json:"seatcount"`
	// ScheduleID   string
	// Schedule     Schedule
	WasScheduled bool `json:"wasscheduled"`
	HasPaid      bool `json:"haspaid"`
	//HasArrived   string `json:"hasarrived"`
	//ArrivalSent bool
	//ArrivalTime string
	Offers      []Offer
	Attachments []ProspectAttachment
	Deposits    []Deposit
	// contains filtered or unexported fields
}

Prospect holds the data for a prospect

func (*Prospect) Update

func (p *Prospect) Update() error

UpdateProspect PUTs updates a prospect with new data, using the prospect object

func (*Prospect) UpdateAgent

func (p *Prospect) UpdateAgent(a *Agent) error

UpdateAgent POSTs a newly assigned Agent to the Prospect

func (*Prospect) UpdateSchedule

func (p *Prospect) UpdateSchedule(s *Schedule) error

UpdateSchedule updates the schedules assigned to a prospect

type ProspectAttachment

type ProspectAttachment struct {
	ID          string
	ProjectID   string
	CompanyID   string
	ProspectID  string
	FileName    string
	Size        int64
	Type        string
	DateCreated string
	Folder      string
}

type ProspectBuyer

type ProspectBuyer struct {
	ID                 string `json:"id"`
	Phone              string `json:"phone"`
	Mobile             string `json:"mobile"`
	Email              string `json:"email"`
	Firstname          string `json:"firstname"`
	Lastname           string `json:"lastname"`
	DOB                string `json:"dob"`
	Nationality        string `json:"nationality"`
	AddressID          string `json:"addressid"`
	Address            Address
	ProspectID         string `json:"prospectid"`
	Prospect           Prospect
	CompanyID          string `json:"company"`
	ProjectID          string `json:"project"`
	FIRB               int    `json:"firb"`
	Primary            bool   `json:"primary"`
	OriginContactUser  string `json:"origincontactuser"`
	OriginatingContact string `json:"originatingcontact"`
	OriginAccountUser  string `json:"originaccountuser"`
	OriginatingAccount string `json:"originatingaccount"`
}

type ProspectSolicitor

type ProspectSolicitor struct {
	ID          string `json:"id"`
	Phone       string `json:"phone"`
	Mobile      string `json:"mobile"`
	Email       string `json:"email"`
	CompanyName string `json:"company_name"`
	FullName    string `json:"full_name"`
	AddressID   string `json:"addressid"`
	Address     Address
	CompanyID   string `json:"companyid"`
	ProjectID   string `json:"projectid"`
	// contains filtered or unexported fields
}

func (*ProspectSolicitor) Create

func (ps *ProspectSolicitor) Create() error

Create POSTs new solicitor information to a Prospect

func (*ProspectSolicitor) Update

func (ps *ProspectSolicitor) Update() error

Update PUTs new information to an existing solicitor

type Schedule

type Schedule struct {
	ID           string `json:"id"`
	EventID      string `json:"eventId"`
	EventDateID  string `json:"eventDateId"`
	EventDate    EventDate
	ScheduleTime string `json:"scheduleTime"`
}

type Session

type Session struct {
	Auth              Auth
	ProjectID         string
	CompanyID         string
	DumpErrorPayloads bool
}

Session holds information about the current session

func (*Session) CreateAccount

func (s *Session) CreateAccount(account *Account) error

CreateAccount POSTs a new Account to the portal

func (*Session) CreateCompany

func (s *Session) CreateCompany(company *Company) (*Company, error)

CreateCompany POSTs a new company to the portal

func (*Session) CreateContact

func (s *Session) CreateContact(c *Contact) error

Create generates a new contact from the supplied data Create should return the contact that was just created.

func (*Session) CreateEvent

func (s *Session) CreateEvent(e *Event) error

CreateEvent POSTs new event data to the endpoint

func (*Session) CreateListing

func (s *Session) CreateListing(l *ExportListing) (error, string)

CreateListing POSTs a new Listing to the portal

func (*Session) CreateOffer

func (s *Session) CreateOffer(o *Offer) (*Offer, error)

CreateOffer POSTs a new offer and reserves the relevant listing

func (*Session) CreateProject

func (s *Session) CreateProject(p *ProjectPayload) error

func (*Session) CreateProspect

func (s *Session) CreateProspect(payload CreateProspectPayload) (*Prospect, error)

UpdateProspect POSTs updates a prospect with new data, using the prospect object

func (*Session) CreateUser

func (s *Session) CreateUser(u *User) (*User, int, error)

Create generates a new contact from the supplied data Create should return the user that was just created.

func (*Session) CreateUserProject

func (s *Session) CreateUserProject(up *UserProject) error

func (*Session) Delete

func (s *Session) Delete(list []*Account) error

Delete DELETEs Accounts using a list of Account IDs

func (*Session) GetAccount

func (s *Session) GetAccount(id string) (*Account, error)

GetAccount GETs one account, using their ID

func (*Session) GetActivityByID

func (s *Session) GetActivityByID(l *Listing) (*ListingActivity, error)

GetActivityByID GETs all the activity data for a particular listing (using ID)

func (*Session) GetAllAccounts

func (s *Session) GetAllAccounts() ([]*Account, error)

GetAllAccounts GETs a list of all accounts

func (*Session) GetAllActivity

func (s *Session) GetAllActivity() ([]*ListingActivity, error)

GetAllActivity GETs all the activity for all portal listings

func (*Session) GetAllCompanies

func (s *Session) GetAllCompanies() ([]*Company, error)

GetAllCompanies creates the appropriate get request and calls the service function to execute and handle the request

func (*Session) GetAllEventProspects

func (s *Session) GetAllEventProspects(eventID string) ([]*Prospect, error)

GetAllEventProspects GETs a list of all prospects for an event

func (*Session) GetAllOffers

func (s *Session) GetAllOffers() ([]*Offer, error)

GetAllOffers returns a list of Offers -- this won't work yet

func (*Session) GetAllProjects

func (s *Session) GetAllProjects() ([]*Project, error)

func (*Session) GetAllStatusActivity

func (s *Session) GetAllStatusActivity() ([]*ListingStatusActivity, error)

GetAllStatusActivity GETs all listing status activity for every portal listing

func (*Session) GetAllUserCompanies

func (s *Session) GetAllUserCompanies() ([]*UserCompany, error)

GetAllCompanies creates the appropriate get request and calls the service function to execute and handle the request

func (*Session) GetAvailableProspectBuyers

func (s *Session) GetAvailableProspectBuyers() ([]*ProspectBuyer, error)

GetAvailableProspectBuyers GETs a list of ProspectBuyers where none of their Offers have been cancelled that belong to the session

func (*Session) GetCompany

func (s *Session) GetCompany(id string) (*Company, error)

GetCompany creates the appropriate get request and calls the service function to execute and handle the request

func (*Session) GetCompanyByExtId

func (s *Session) GetCompanyByExtId(extId string) (*Company, error)

GetCompany creates the appropriate get request and calls the service function to execute and handle the request

func (*Session) GetCompletedOffers

func (s *Session) GetCompletedOffers() ([]*Offer, error)

GetCompletedOffers returns a list of offers where status is complete

func (*Session) GetContactByEmail

func (s *Session) GetContactByEmail(email string) (*Contact, error)

GetContactByEmail gets the first contact that matches the provided email

func (*Session) GetContactByID

func (s *Session) GetContactByID(id string) (*Contact, error)

GetContactByID gets a single contact by its ID

func (*Session) GetContactByName

func (s *Session) GetContactByName(firstname string, lastname string) (*Contact, error)

GetContactByName gets the first contact that matches the provided name

func (*Session) GetContacts

func (s *Session) GetContacts() ([]*Contact, error)

GetContacts gets all contacts

func (*Session) GetEOIUsers

func (s *Session) GetEOIUsers() ([]*User, error)

////EOIUSers

func (*Session) GetEventByID

func (s *Session) GetEventByID(id string) (*Event, error)

GetEventByID GETs an individual event using the event ID

func (*Session) GetEvents

func (s *Session) GetEvents() ([]*Event, error)

GetEvents GETs a list of all Events

func (*Session) GetListingByExtId

func (s *Session) GetListingByExtId(extId string) (*Listing, error)

GetListings returns a slice of all Listing

func (*Session) GetListings

func (s *Session) GetListings() ([]*Listing, error)

GetListings returns a slice of all Listing

func (*Session) GetOfferByExtID

func (s *Session) GetOfferByExtID(extId string) (*Offer, error)

GetOfferByID returns a single offer given the offer ID

func (*Session) GetOfferByID

func (s *Session) GetOfferByID(id string) (*Offer, error)

GetOfferByID returns a single offer given the offer ID

func (*Session) GetPendingOffers

func (s *Session) GetPendingOffers() ([]*Offer, error)

GetPendingOffers returns a list of offers where status is pending

func (*Session) GetProjectByID

func (s *Session) GetProjectByID(id string) (*Project, error)

GetProjectByID returns a project qußeried by ID

func (*Session) GetProjectByName

func (s *Session) GetProjectByName(name string) (*Project, error)

GetProjectByName returns a project queried by name

func (*Session) GetProspectBuyers

func (s *Session) GetProspectBuyers() ([]*ProspectBuyer, error)

GetProspectBuyers GETs a list of ProspectBuyers that belong to the session

func (*Session) GetSolicitor

func (s *Session) GetSolicitor() (*ProspectSolicitor, error)

GetSolicitor GETs a Solicitor

func (*Session) GetUserByExtId

func (s *Session) GetUserByExtId(extId string) (*User, error)

GetUserByID gets a single contact by its ID

func (*Session) GetUserByID

func (s *Session) GetUserByID(id string) (*User, error)

GetUserByID gets a single contact by its ID

func (*Session) GetUserProjects

func (s *Session) GetUserProjects() ([]*UserProject, error)

func (*Session) GetUsers

func (s *Session) GetUsers() ([]*User, error)

GetUsers gets all users

func (*Session) UpdateListingContractStatus

func (s *Session) UpdateListingContractStatus(payload OpportunityPayload, listingId string, prospectId string) (error, string)

UpdateListingContractStatus POSTs a new opportunity status to the portal

type TotalArea

type TotalArea struct {
	Float float32 `json:"float"`
}

type User

type User struct {
	ID           string  `json:"id"`
	Active       bool    `json:"active"`
	SuperUser    bool    `json:"superuser"`
	Firstname    string  `json:"firstname"`
	Lastname     string  `json:"lastname"`
	Email        string  `json:"email"`
	Username     string  `json:"username"`
	Password     string  `json:"password"`
	ArchivedOn   string  `json:"archivedon"`
	LastLoggedIn string  `json:"lastloggedin"`
	CreatedDate  string  `json:"createddate"`
	ExternalID   string  `json:"externalid"`
	S            Session `json:"S"`
}

User holds information of a user

func (*User) Delete

func (u *User) Delete() error

func (*User) GetAccountsContacts

func (u *User) GetAccountsContacts() ([]*Account, []*Contact, error)

func (*User) GetCompanyUsers

func (u *User) GetCompanyUsers() ([]*User, error)

func (*User) TriggerPasswordResetEmail

func (u *User) TriggerPasswordResetEmail() error

TriggerPasswordResetEmail sends the user a password reset email

func (*User) Update

func (u *User) Update() error

Update saves changes made to contact

type UserAdd

type UserAdd struct {
	Level string `json:"Level"`
}

type UserCompany

type UserCompany struct {
	User        User    `json:"user, omitempty"`
	Company     Company `json:"company, omitempty"`
	ID          string  `json:"id"`
	UserID      string  `json:"userid"`
	CompanyID   string  `json:"companyid"`
	Role        int     `json:"role"`
	CreatedDate string  `json:"createddate"`
}

UserCompany holds information about a UserCompany

type UserProject

type UserProject struct {
	ID                string          `json:"Id"`
	User              User            `json:"user"`
	UserID            string          `json:"userid"`
	CompanyID         string          `json:"companyid"`
	Project           Project         `json:"project"`
	ProjectID         string          `json:"projectid"`
	AddedBy           User            `json:"addedby"`
	AddedByID         string          `json:"addedbyid"`
	ManagedBy         User            `json:"managedby"`
	ManagedByID       string          `json:"managedbyid"`
	PermissionGroup   PermissionGroup `json:"permissiongroup"`
	PermissionGroupID string          `json:"permissiongroupid"`
	CreatedDate       string          `json:"createddate"`
	S                 Session         `json:"S"`
}

func (*UserProject) DeleteUserProject

func (up *UserProject) DeleteUserProject() error

func (*UserProject) GetAccountsContacts

func (up *UserProject) GetAccountsContacts() ([]*Account, []*Contact, error)

func (*UserProject) Update

func (up *UserProject) Update() (*User, error)

Jump to

Keyboard shortcuts

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