zenefits

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BanksRef

type BanksRef struct {
	Data []EmployeeBanks `json:"data"`
	MetaRef
}

type Client

type Client struct {
	BaseURL   *url.URL
	UserAgent string

	People        *PeopleService
	Companies     *CompaniesService
	Departments   *DepartmentsService
	Employments   *EmploymentsService
	EmployeeBanks *EmployeeBanksService
	CompanyBanks  *CompanyBanksService
	Locations     *LocationsService
	Me            *MeService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient *http.Client) *Client

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)

func (*Client) NewRequest

func (c *Client) NewRequest(method, path string, body interface{}) (*http.Request, error)

type Companies

type Companies struct {
	CompanyBanks CompanyBanksRef `json:"company_banks"`
	Departments  DepartmentsRef  `json:"departments"`
	Ein          string          `json:"ein"`
	Id           string          `json:"id"`
	LegalCity    string          `json:"legal_city"`
	LegalName    string          `json:"legal_name"`
	LegalState   string          `json:"legal_state"`
	LegalStreet1 string          `json:"legal_street1"`
	LegalStreet2 string          `json:"legal_street2"`
	LegalZip     string          `json:"legal_zip"`
	Locations    LocationsRef    `json:"locations"`
	LogoUrl      string          `json:"logo_url"`
	Name         string          `json:"name"`
	Object       string          `json:"object"`
	People       MetaRef         `json:"people"`
	RefObject    string          `json:"ref_object"`
	Url          string          `json:"url"`
}

type CompaniesQueryParams

type CompaniesQueryParams struct {
	EndingBefore  int      `url:"ending_before,omitempty"`
	Includes      []string `url:"includes,space,omitempty"`
	Limit         int      `url:"limit,omitempty"`
	Name          string   `url:"name,omitempty"`
	StartingAfter int      `url:"starting_after,omitempty"`
}

type CompaniesService

type CompaniesService service

func (*CompaniesService) List

type CompanyBanks

type CompanyBanks struct {
	AccountNumber string     `json:"account_number"`
	BankName      string     `json:"bank_name"`
	Company       CompanyRef `json:"company"`
	Id            string     `json:"id"`
	RefObject     string     `json:"ref_object"`
	RoutingNumber string     `json:"routing_number"`
}

type CompanyBanksQueryParams

type CompanyBanksQueryParams struct {
	Company       int      `url:"company,omitempty"`
	EndingBefore  int      `url:"ending_before,omitempty"`
	Includes      []string `url:"includes,space,omitempty"`
	Limit         int      `url:"limit,omitempty"`
	StartingAfter int      `url:"starting_after,omitempty"`
}

type CompanyBanksRef

type CompanyBanksRef struct {
	Data []CompanyBanks `json:"data"`
	MetaRef
}

type CompanyBanksService

type CompanyBanksService service

func (*CompanyBanksService) List

type CompanyRef

type CompanyRef struct {
	Companies
	MetaRef
}

type DepartmentQueryParams

type DepartmentQueryParams struct {
	Company       int      `url:"company,omitempty"`
	EndingBefore  int      `url:"ending_before,omitempty"`
	Includes      []string `url:"includes,space,omitempty"`
	Limit         int      `url:"limit,omitempty"`
	Name          string   `url:"name,omitempty"`
	StartingAfter int      `url:"starting_after,omitempty"`
}

type Departments

type Departments struct {
	Company   Companies `json:"company"`
	Id        string    `json:"id"`
	Name      string    `json:"name"`
	Object    string    `json:"object"`
	People    MetaRef   `json:"people"`
	RefObject string    `json:"ref_object"`
	Url       string    `json:"url"`
}

type DepartmentsRef

type DepartmentsRef struct {
	Data []Locations `json:"data"`
	MetaRef
}

type DepartmentsService

type DepartmentsService service

func (*DepartmentsService) List

func (s *DepartmentsService) List(ctx context.Context, companyId int, opt *DepartmentQueryParams) ([]*Departments, *Response, error)

type EmployeeBanks

type EmployeeBanks struct {
	AccountNumber string `json:"account_number"`
	AccountType   string `json:"account_type"`
	BankName      string `json:"bank_name"`
	Id            string `json:"id"`
	IsVerified    bool   `json:"is_verified"`
	Object        string `json:"object"`
	Person        People `json:"person"`
	RefObject     string `json:"ref_object"`
	RoutingNumber string `json:"routing_number"`
	Url           string `json:"url"`
}

type EmployeeBanksQueryParams

type EmployeeBanksQueryParams struct {
	EndingBefore  int      `url:"ending_before,omitempty"`
	Includes      []string `url:"includes,space,omitempty"`
	Limit         int      `url:"limit,omitempty"`
	Person        int      `url:"person,omitempty"`
	StartingAfter int      `url:"starting_after,omitempty"`
}

type EmployeeBanksService

type EmployeeBanksService service

func (*EmployeeBanksService) List

type EmploymentQueryParams

type EmploymentQueryParams struct {
	EndingBefore  int      `url:"ending_before,omitempty"`
	Includes      []string `url:"includes,space,omitempty"`
	Limit         int      `url:"limit,omitempty"`
	Person        int      `url:"person,omitempty"`
	StartingAfter int      `url:"starting_after,omitempty"`
}

type Employments

type Employments struct {
	AnnualSalary        string `json:"annual_salary"`
	CompType            string `json:"comp_type"`
	EmploymentType      string `json:"employment_type"`
	HireDate            string `json:"hire_date"`
	Id                  string `json:"id"`
	Object              string `json:"object"`
	PayRate             string `json:"pay_rate"`
	Person              People `json:"person"`
	RefObject           string `json:"ref_object"`
	TerminationDate     string `json:"termination_date"`
	TerminationType     string `json:"termination_type"`
	Url                 string `json:"url"`
	WorkingHoursPerWeek string `json:"working_hours_per_week"`
}

type EmploymentsRef

type EmploymentsRef struct {
	Data []Employments `json:"data"`
	MetaRef
}

type EmploymentsService

type EmploymentsService service

func (*EmploymentsService) List

type LocationQueryParams

type LocationQueryParams struct {
	Company       int      `url:"company,omitempty"`
	EndingBefore  int      `url:"ending_before,omitempty"`
	Includes      []string `url:"includes,space,omitempty"`
	Limit         int      `url:"limit,omitempty"`
	Name          string   `url:"name,omitempty"`
	StartingAfter int      `url:"starting_after,omitempty"`
}

type Locations

type Locations struct {
	City      string    `json:"city"`
	Company   Companies `json:"company"`
	Country   string    `json:"country"`
	Id        string    `json:"id"`
	Name      string    `json:"name"`
	Object    string    `json:"object"`
	People    MetaRef   `json:"people"`
	Phone     string    `json:"phone"`
	RefObject string    `json:"ref_object"`
	State     string    `json:"state"`
	Street1   string    `json:"street1"`
	Street2   string    `json:"street2"`
	Url       string    `json:"url"`
}

type LocationsRef

type LocationsRef struct {
	Data []Departments `json:"data"`
	MetaRef
}

type LocationsService

type LocationsService service

func (*LocationsService) List

func (s *LocationsService) List(ctx context.Context, companyId int, opt *LocationQueryParams) ([]*Locations, *Response, error)

type Me

type Me struct {
	Company     Companies `json:"company"`
	Expires     time.Time `json:"expires"`
	Object      string    `json:"object"`
	Person      People    `json:"person"`
	Scopes      []string  `json:"scopes"`
	Uninstalled bool      `json:"uninstalled"`
	Url         string    `json:"url"`
}

type MeQueryParams

type MeQueryParams struct {
	EndingBefore  int      `url:"ending_before,omitempty"`
	Includes      []string `url:"includes,space,omitempty"`
	Limit         int      `url:"limit,omitempty"`
	StartingAfter int      `url:"starting_after,omitempty"`
}

type MeService

type MeService service

func (*MeService) Get

func (s *MeService) Get(ctx context.Context, opt *MeQueryParams) (*Me, *Response, error)

type MetaList

type MetaList struct {
	Data    interface{} `json:"data"`
	NextUrl string      `json:"next_url"`
	Object  string      `json:"object"`
	Url     string      `json:"url"`
}

type MetaRef

type MetaRef struct {
	Object    string `json:"object"`
	RefObject string `json:"ref_object"`
	Url       string `json:"url"`
}

type MetaResponse

type MetaResponse struct {
	Object string   `json:"object"`
	Page   MetaList `json:"data"`
	Status int      `json:"status"`
}

type Pagination

type Pagination struct {
	EndingBefore  int `url:"ending_before,omitempty"`
	Limit         int `url:"limit,omitempty"`
	StartingAfter int `url:"starting_after,omitempty"`
}

type People

type People struct {
	Object               string         `json:"object"`
	RefObject            string         `json:"ref_object"`
	Lastname             string         `json:"last_name"`
	PreferredName        string         `json:"preferred_name"`
	Manager              *People        `json:"manager"`
	PostalCode           string         `json:"postal_code"`
	Id                   string         `json:"id"`
	City                 string         `json:"city"`
	FirstName            string         `json:"first_name"`
	MiddleName           string         `json:"middle_name"`
	Title                string         `json:"title"`
	WorkPhone            string         `json:"work_phone"`
	PersonalEmail        string         `json:"personal_email"`
	State                string         `json:"state"`
	DateOfBirth          string         `json:"date_of_birth"`
	Location             Locations      `json:"location"`
	Subordinates         MetaRef        `json:"subordinates"`
	Department           Departments    `json:"department"`
	Employments          EmploymentsRef `json:"employments"`
	Type                 string         `json:"type"`
	Company              Companies      `json:"company"`
	Status               string         `json:"status"`
	Street1              string         `json:"street1"`
	Street2              string         `json:"street2"`
	PersonalPhone        string         `json:"personal_phone"`
	SocialSecurityNumber string         `json:"social_security_number"`
	FederalFilingStatus  string         `json:"federal_filing_status"`
	WorkEmail            string         `json:"work_email"`
	Url                  string         `json:"url"`
	Country              string         `json:"country"`
	Gender               string         `json:"gender"`
	Banks                BanksRef       `json:"banks"`
}

type PeopleQueryParams

type PeopleQueryParams struct {
	Company       int      `url:"company,omitempty"`
	Department    int      `url:"department,omitempty"`
	EndingBefore  int      `url:"ending_before,omitempty"`
	FirstName     string   `url:"first_name,omitempty"`
	Includes      []string `url:"includes,space,omitempty"`
	LastName      string   `url:"lastname,omitempty"`
	Limit         int      `url:"limit,omitempty"`
	Location      int      `url:"location,omitempty"`
	Manager       int      `url:"manager,omitempty"`
	StartingAfter int      `url:"starting_after,omitempty"`
	Status        string   `url:"status,omitempty"`
}

type PeopleService

type PeopleService service

func (*PeopleService) List

func (s *PeopleService) List(ctx context.Context, companyId int, opt *PeopleQueryParams) ([]*People, *Response, error)

func (*PeopleService) ListAll

func (s *PeopleService) ListAll(ctx context.Context, opt *PeopleQueryParams) ([]*People, *Response, error)

type Response

type Response struct {
	*http.Response

	NextPage int
	PrevPage int
}

Response is a Zenefits response.

Jump to

Keyboard shortcuts

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