• Articles
  • Api Documentation

    Show / Hide Table of Contents
    • Yort.Humm.InStore
      • CreateKeyRequest
      • CreateKeyResponse
      • HummApiUrlSelector
      • HummClient
      • HummClientConfiguration
      • HummCountry
      • HummEnvironment
      • HummResponseSignatureException
      • HummStatusCodes
      • IHummApiUrlSelector
      • IHummClient
      • InviteRequest
      • InviteResponse
      • PendingAuthorisationEventArgs
      • ProcessAuthorisationRequest
      • ProcessAuthorisationResponse
      • ProcessSalesAdjustmentRequest
      • ProcessSalesAdjustmentResponse
      • ProcessSalesAdjustmentReversalRequest
      • ProcessSalesAdjustmentReversalResponse
      • PurchaseItemsCollection
      • RequestStates
      • SendReceiptRequest
      • SendReceiptResponse
    • Yort.Humm.InStore.Infrastructure
      • Hmac256SignatureGenerator
      • ISignatureGenerator
      • RequestBase
      • ResponseBase
      • SignedRequestWriter

    Class ResponseBase

    Provides properties common to all Humm responses.

    Inheritance
    Object
    ResponseBase
    CreateKeyResponse
    InviteResponse
    ProcessAuthorisationResponse
    ProcessSalesAdjustmentResponse
    ProcessSalesAdjustmentReversalResponse
    SendReceiptResponse
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Yort.Humm.InStore.Infrastructure
    Assembly: Yort.Humm.InStore.dll
    Syntax
    public abstract class ResponseBase

    Properties

    | Improve this Doc View Source

    Code

    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 for a list of codes returned by Humm.

    See Also
    Status
    Message
    | Improve this Doc View Source

    Message

    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.

    | Improve this Doc View Source

    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
    VerifySignature(ISignatureGenerator)
    | Improve this Doc View Source

    Status

    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
    RequestStates
    Code
    Message
    | Improve this Doc View Source

    TrackingData

    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
    TrackingData

    Methods

    | Improve this Doc View Source

    VerifySignature(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 signatureGenerator is null.

    HummResponseSignatureException

    Thrown if the signature of the response does not match the expected signature.

    • Improve this Doc
    • View Source
    Back to top Copyright (c) 2020 Troy Willmot