Class ResponseBase
Provides properties common to all Humm responses.
Inheritance
Inherited Members
Namespace: Yort.Humm.InStore.Infrastructure
Assembly: Yort.Humm.InStore.dll
Syntax
public abstract class ResponseBase
Properties
| Improve this Doc View SourceCode
A code providing more details about the Status, suitable for using user code to take programmtic action on or log as a language neutral description of the outcome.
Declaration
[JsonProperty("x_code")]
public string Code { get; set; }
Property Value
Type | Description |
---|---|
String | The code returned by Humm. |
Remarks
See Also
| Improve this Doc View SourceMessage
Gets or sets a human readable message providing more details about the Status.
Declaration
[JsonProperty("x_message")]
public string Message { get; set; }
Property Value
Type | Description |
---|---|
String | The message. |
Signature
Gets or sets the signature of this response, used to verify the response is authentic.
Declaration
[JsonProperty("signature")]
public string Signature { get; set; }
Property Value
Type | Description |
---|---|
String | The signature as a string. |
See Also
| Improve this Doc View SourceStatus
Gets or sets the status of the request, used to determine if the request was successful, declined, cancelled or resulted in an error.
Declaration
[JsonProperty("x_status")]
public string Status { get; set; }
Property Value
Type | Description |
---|---|
String | A string containig the status of the request. |
See Also
| Improve this Doc View SourceTrackingData
Gets the tracking data that was sent with the request that generated this response.
Declaration
[JsonProperty("tracking_data")]
public Dictionary<string, string> TrackingData { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<String, String> | A dictionary of strings containing the tracking data. |
See Also
Methods
| Improve this Doc View SourceVerifySignature(ISignatureGenerator)
Verifies the signature of this response matches the expected signature using the ISignatureGenerator provided.
Declaration
public void VerifySignature(ISignatureGenerator signatureGenerator)
Parameters
Type | Name | Description |
---|---|---|
ISignatureGenerator | signatureGenerator | The signature generator to use to confirm the response signature. |
Remarks
The HummClient automatically calls this method when a reponse is received, application code does not need to call this method explicitly unless performing it's own calls without using a HummClient instance.
The signatureGenerator
must have been created/initialised with the same device key as the request that generated this response.
If the Signature property is null or empty, this call is a no-op and will return without throwing an exception.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
HummResponseSignatureException | Thrown if the signature of the response does not match the expected signature. |