C# Class Foretagsplatsen.Api.Resources.CompanyResource

Company REST resource: https://web.foretagsplatsen.se/Api/Company/ Notes: * Agency directors (administrator) has access to all the Agency's customers. * Agency consultants have access to only those customers assigned to them. * Company user have access to the companies they created/owns and those assigned/connected to them. * A company user can only delete a company if he is the one who owns (created) the company.
Mostra file Open project: foretagsplatsen/Foretagsplatsen-DotNet-API

Public Methods

Method Description
CompanyResource ( ApiClient client ) : System

Instantiates a new CompanyResource object.

Create ( CompanyInfo company ) : void

Create an empty company.

Delete ( CompanyInfo company ) : void

Delete a company.

Get ( string businessIdentityCode ) : CompanyInfo

Get company

GetCollectionUrl ( ) : string

Url for the company resource.

GetUrl ( CompanyInfo companyInfo ) : string

Url for the company collection resource

List ( bool showAll ) : List

List companies.

Update ( CompanyInfo company ) : void

Update a company.

Business identity code can not be edited. If the identity code is edited, the system assumes it´s a new company.

Method Details

CompanyResource() public method

Instantiates a new CompanyResource object.
public CompanyResource ( ApiClient client ) : System
client ApiClient REST client to use.
return System

Create() public method

Create an empty company.
public Create ( CompanyInfo company ) : void
company Foretagsplatsen.Api.Entities.CompanyInfo Company to create.
return void

Delete() public method

Delete a company.
public Delete ( CompanyInfo company ) : void
company Foretagsplatsen.Api.Entities.CompanyInfo Company to delete.
return void

Get() public method

Get company
public Get ( string businessIdentityCode ) : CompanyInfo
businessIdentityCode string Business identity code for company.
return Foretagsplatsen.Api.Entities.CompanyInfo

GetCollectionUrl() public method

Url for the company resource.
public GetCollectionUrl ( ) : string
return string

GetUrl() public method

Url for the company collection resource
public GetUrl ( CompanyInfo companyInfo ) : string
companyInfo Foretagsplatsen.Api.Entities.CompanyInfo Company to get the url for.
return string

List() public method

List companies.
public List ( bool showAll ) : List
showAll bool Get all companies for agency if and is /// an AgencyDirector otherwise the companies attached to the user
return List

Update() public method

Update a company.
Business identity code can not be edited. If the identity code is edited, the system assumes it´s a new company.
public Update ( CompanyInfo company ) : void
company Foretagsplatsen.Api.Entities.CompanyInfo New company information.
return void