• 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 RequestBase

    Contains properties common to all requests.

    Inheritance
    Object
    RequestBase
    CreateKeyRequest
    InviteRequest
    ProcessAuthorisationRequest
    ProcessSalesAdjustmentRequest
    ProcessSalesAdjustmentReversalRequest
    SendReceiptRequest
    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 RequestBase
    Remarks

    Many of these properties have an equivalent property on HummClientConfiguration. If the property on a request is null or emptry string, the value from the configuration instance passed to the HummClient will be copied into the request prior to sending the request. This minimises the number of properties that have to be explicitly set for every request.

    Properties

    | Improve this Doc View Source

    DeviceId

    Required. Gets or sets the device identifier for the POS making the request, must match the device id used when the DeviceKey in use was requested.

    Declaration
    [JsonProperty("x_device_id")]
    public string DeviceId { get; set; }
    Property Value
    Type Description
    String

    The device identifier.

    Remarks

    Maximum length of 64 characters.

    | Improve this Doc View Source

    MerchantId

    Required. Gets or sets the unique merchant identifier assigned by Humm to the retailer/organisation making requests.

    Declaration
    [JsonProperty("x_merchant_id")]
    public string MerchantId { get; set; }
    Property Value
    Type Description
    String

    The merchant identifier assigned by Humm.

    Remarks

    Maximum length of 10 characters.

    | Improve this Doc View Source

    OperatorId

    Gets or sets the unique identifier of the POS operator.

    Declaration
    [JsonProperty("x_operator_id")]
    public string OperatorId { get; set; }
    Property Value
    Type Description
    String

    The operator identifier.

    Remarks

    Maximum length of 64 characters.

    | Improve this Doc View Source

    PosVersion

    Required. Gets or sets the POS version.

    Declaration
    [JsonProperty("x_firmware_version")]
    public string PosVersion { get; set; }
    Property Value
    Type Description
    String

    The POS version.

    Remarks

    Maximum length of 64 characters.

    | Improve this Doc View Source

    TrackingData

    Optional. Gets or sets custom information to return in the 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.

    Remarks

    Tracking data can be used by the POS to provide additional information to return with the response, which can be useful for mapping responses back to specific clients/payments or managing other state.

    Can be set to null (and should be if there is no tracking data). Null is the default value unless explicitly initialised to a new dictionary instance.

    Limit of 1000000 items.

    Methods

    | Improve this Doc View Source

    Validate()

    Validates this instance.

    Declaration
    public virtual void Validate()
    Remarks

    Ensures that MerchantId, DeviceId, PosVersion and OperatorId are not null, empty string or only whitespace. Also ensure no property is larger than it's maximum allowed length (see individual property notes for details).

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if MerchantId, DeviceId, PosVersion, or OperatorId is null.

    ArgumentException

    Thrown if MerchantId, DeviceId, PosVersion, or OperatorId is empty or only whitespace, or longer than their maximum allowed lengths.

    ArgumentOutOfRangeException

    Thrown if TrackingData contains more than 1000000 items.

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