C# 클래스 ShipStationAccess.V2.Services.WebRequestServices

파일 보기 프로젝트 열기: skuvault/shipStationAccess

공개 메소드들

메소드 설명
CanSkipException ( WebException e ) : bool
GetApiKey ( ) : string
GetResponse ( ShipStationCommand command, string commandParams, CancellationToken token, int? operationTimeout = null ) : T

Get response from ShipStation's endpoint

GetResponseAsync ( ShipStationCommand command, string commandParams, CancellationToken token, int? operationTimeout = null ) : Task

Get response from ShipStation's endpoint async

PostData ( ShipStationCommand command, string jsonContent, CancellationToken token, int? operationTimeout = null ) : void

Post data to ShipStation's endpoint

PostDataAndGetResponse ( ShipStationCommand command, string jsonContent, CancellationToken token, bool shouldGetExceptionMessage = false, int? operationTimeout = null ) : T

Post data to ShipStation's endpoint and read response

PostDataAndGetResponseAsync ( ShipStationCommand command, string jsonContent, CancellationToken token, bool shouldGetExceptionMessage = false, int? operationTimeout = null ) : Task

Post data to ShipStation's endpoint and read response async

PostDataAndGetResponseWithShipstationHeader ( ShipStationCommand command, string jsonContent, CancellationToken token, bool shouldGetExceptionMessage = false, int? operationTimeout = null ) : T

Post data to ShipStation's endpoint with specific partner header value

PostDataAsync ( ShipStationCommand command, string jsonContent, CancellationToken token, int? operationTimeout = null ) : Task

Post data to ShipStation's endpoint async

WebRequestServices ( ShipStationCredentials credentials ) : System

비공개 메소드들

메소드 설명
CreateAuthenticationHeader ( ) : string
GetExceptionMessageFromResponse ( WebException ex, string responseString ) : string
GetRawResponseAsync ( string url, CancellationToken token, int? operationTimeout = null ) : Task

Get data from ShipStation's endpoint async

InitSecurityProtocol ( ) : void
IsRequestThrottled ( HttpResponseMessage responseMessage, string responseContent, int &rateResetInSeconds ) : bool
LogPostError ( string apiKey, string url, HttpStatusCode statusCode, string jsonContent, WebException x ) : void
LogPostError ( string apiKey, string url, HttpStatusCode statusCode, string jsonContent, string responseString, int? operationTimeout ) : void
LogPostInfo ( string apiKey, string url, string jsonContent, int? operationTimeout ) : void
LogUpdateInfo ( string apiKey, string url, HttpStatusCode statusCode, string jsonContent, int? operationTimeout ) : void
ParseResponse ( string jsonData ) : T
PostRawDataAsync ( string url, string payload, CancellationToken token, bool shouldGetExceptionMessage = false, int? operationTimeout = null, bool useShipStationPartnerHeader = false ) : Task

Post data to ShipStation's API endpoint async

RefreshLastNetworkActivityTime ( ) : void

This method is used to update service's last network activity time. It's called every time before making API request to server or after handling the response.

SetAuthorizationHeader ( bool useShipStationPartnerHeader = false ) : void
ThrowIfError ( string url, HttpResponseMessage responseMessage, string responseContent ) : void

메소드 상세

CanSkipException() 공개 메소드

public CanSkipException ( WebException e ) : bool
e WebException
리턴 bool

GetApiKey() 공개 메소드

public GetApiKey ( ) : string
리턴 string

GetResponse() 공개 메소드

Get response from ShipStation's endpoint
public GetResponse ( ShipStationCommand command, string commandParams, CancellationToken token, int? operationTimeout = null ) : T
command ShipStationCommand
commandParams string
token CancellationToken
operationTimeout int?
리턴 T

GetResponseAsync() 공개 메소드

Get response from ShipStation's endpoint async
public GetResponseAsync ( ShipStationCommand command, string commandParams, CancellationToken token, int? operationTimeout = null ) : Task
command ShipStationCommand
commandParams string
token CancellationToken
operationTimeout int?
리턴 Task

PostData() 공개 메소드

Post data to ShipStation's endpoint
public PostData ( ShipStationCommand command, string jsonContent, CancellationToken token, int? operationTimeout = null ) : void
command ShipStationCommand
jsonContent string
token CancellationToken
operationTimeout int?
리턴 void

PostDataAndGetResponse() 공개 메소드

Post data to ShipStation's endpoint and read response
public PostDataAndGetResponse ( ShipStationCommand command, string jsonContent, CancellationToken token, bool shouldGetExceptionMessage = false, int? operationTimeout = null ) : T
command ShipStationCommand
jsonContent string
token CancellationToken
shouldGetExceptionMessage bool
operationTimeout int?
리턴 T

PostDataAndGetResponseAsync() 공개 메소드

Post data to ShipStation's endpoint and read response async
public PostDataAndGetResponseAsync ( ShipStationCommand command, string jsonContent, CancellationToken token, bool shouldGetExceptionMessage = false, int? operationTimeout = null ) : Task
command ShipStationCommand
jsonContent string
token CancellationToken
shouldGetExceptionMessage bool
operationTimeout int?
리턴 Task

PostDataAndGetResponseWithShipstationHeader() 공개 메소드

Post data to ShipStation's endpoint with specific partner header value
public PostDataAndGetResponseWithShipstationHeader ( ShipStationCommand command, string jsonContent, CancellationToken token, bool shouldGetExceptionMessage = false, int? operationTimeout = null ) : T
command ShipStationCommand
jsonContent string
token CancellationToken
shouldGetExceptionMessage bool
operationTimeout int?
리턴 T

PostDataAsync() 공개 메소드

Post data to ShipStation's endpoint async
public PostDataAsync ( ShipStationCommand command, string jsonContent, CancellationToken token, int? operationTimeout = null ) : Task
command ShipStationCommand
jsonContent string
token CancellationToken
operationTimeout int?
리턴 Task

WebRequestServices() 공개 메소드

public WebRequestServices ( ShipStationCredentials credentials ) : System
credentials ShipStationCredentials
리턴 System