C# Class cs_api_dotnet.CaseStackApi

API Access into CaseStack Supply Chain Management Suite. For more infor please visit http://docs.casestack.io/
Show file Open project: Propak/cs-api-dotnet Class Usage Examples

Public Methods

Method Description
Authenticate ( String key, String companyId ) : void

Authenticate API Access. Your credentials are available under the 'Settings > CaseStack API'.

GetAddress ( string addressId ) : Address

Get Address by ID

GetCarrier ( string carrierId ) : Carrier

Get Carrier by ID

GetCustomFields ( string parent ) : CustomFields

Get Custom Fields for an object type

GetCustomer ( string customerId ) : Customer

Get Customer by ID

GetShipment ( int shipmentId ) : Shipment

Get Shipment by ID

LockShipment ( int shipmentId, bool isLocked ) : void

Lock a shipment by ID, makes it read-only from the TMS. The shipment can still be updated via the API

SetShipmentStatus ( int shipmentId, ShipmentStatus status ) : void

Set status of shipment

UseProduction ( System.Boolean production ) : void

Toggle between production or test environments

Private Methods

Method Description
GetRestClient ( ) : RestSharp.RestClient

Method Details

Authenticate() public method

Authenticate API Access. Your credentials are available under the 'Settings > CaseStack API'.
public Authenticate ( String key, String companyId ) : void
key String Your API Key
companyId String Your Company ID
return void

GetAddress() public method

Get Address by ID
public GetAddress ( string addressId ) : Address
addressId string Address ID
return Address

GetCarrier() public method

Get Carrier by ID
public GetCarrier ( string carrierId ) : Carrier
carrierId string Carrier ID
return Carrier

GetCustomFields() public method

Get Custom Fields for an object type
public GetCustomFields ( string parent ) : CustomFields
parent string
return CustomFields

GetCustomer() public method

Get Customer by ID
public GetCustomer ( string customerId ) : Customer
customerId string Customer ID
return Customer

GetShipment() public method

Get Shipment by ID
public GetShipment ( int shipmentId ) : Shipment
shipmentId int Shipment ID
return Shipment

LockShipment() public method

Lock a shipment by ID, makes it read-only from the TMS. The shipment can still be updated via the API
public LockShipment ( int shipmentId, bool isLocked ) : void
shipmentId int Shipment ID
isLocked bool Lock or Unlock
return void

SetShipmentStatus() public method

Set status of shipment
public SetShipmentStatus ( int shipmentId, ShipmentStatus status ) : void
shipmentId int Shipment ID
status ShipmentStatus Shipment Status
return void

UseProduction() public method

Toggle between production or test environments
public UseProduction ( System.Boolean production ) : void
production System.Boolean Use production environment
return void