Class HummClientConfiguration
Provides information to a HummClient about how to operate and default values to use for requests.
Inherited Members
Namespace: Yort.Humm.InStore
Assembly: Yort.Humm.InStore.dll
Syntax
public sealed class HummClientConfiguration
Properties
| Improve this Doc View SourceAutoValidateRequests
Gets or sets a value indicating whether or not HummClient instances automatically perform client side validation of requests before sending them.
Declaration
public bool AutoValidateRequests { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
|
Remarks
The default and recommended value is true, ensuring the simple validation such as required fields and minimum/maximum lengths of values are checked before making a request to Humm. This property exists to disable this feature in the future should Humm change the validation rules and a new, updated version of this library not yet be available.
BaseApiUrl
Required. Gets or sets a Uri which is the base uri of the Humm API to call.
Declaration
public Uri BaseApiUrl { get; set; }
Property Value
Type | Description |
---|---|
Uri | A Uri containing the base address to use. |
Remarks
The API address must be provided so the system knows whether to use a test or live environment, and for which country/region. Use the HummApiUrlSelector to decide on a URL if you'd rather not hard code the addreses yourself.
Changing this property will have no effect on HummClient instances that have already been constructed.
See Also
| Improve this Doc View SourceDeviceId
Optional. Gets or sets the unique device identifier for the POS the HummClient represents.
Declaration
public string DeviceId { get; set; }
Property Value
Type | Description |
---|---|
String | The device identifier. |
Remarks
Any request sent with a null or empty device id will have this value used instead.
See Also
| Improve this Doc View SourceDeviceKey
Optional (when registering a new device, required otherwise). Gets or sets the device key issued by Humm for creating digital signatures.
Declaration
public string DeviceKey { get; set; }
Property Value
Type | Description |
---|---|
String | The device key. |
Remarks
This value is must match the one returned by a prior CreateKeyRequest for the same MerchantId and DeviceId.
If you have not yet initialised the POS device and do not have a device key, use null as the device key property here and then initialise the client instance using a CreateKeyAsync(CreateKeyRequest) call.
Changing this property will have no effect on HummClient instances that have already been constructed.
See Also
| Improve this Doc View SourceHttpClient
Sets or returns an HttpClient instance used to make calls to the Humm API. If null/unset, the system will create it's own instance on first use.
Declaration
public HttpClient HttpClient { get; set; }
Property Value
Type | Description |
---|---|
HttpClient |
Remarks
The library reserves the right to modify the provided client, such as setting default headers and a base address. The primary purpose of this property is to allow a client with injected handlers to be used. If you do not need to inject custom handlers, then leave this blank.
The client is read from the configuration in the constructor of HummClient, changing the HttpClient instance assigned to this property after a client is constructed will have no effect.
Disposing a HummClient instance will dispose it's HttpClient instance, even if it was provided via this property, so do not share clients among instances or with other objects.
MerchantId
Optional. Gets or sets the default merchant identifier for requests.
Declaration
public string MerchantId { get; set; }
Property Value
Type | Description |
---|---|
String | The merchant identifier. |
Remarks
Any request sent with a null or empty merchant id will have this value used instead.
See Also
| Improve this Doc View SourcePosVersion
Optional. Gets or sets the POS version.
Declaration
public string PosVersion { get; set; }
Property Value
Type | Description |
---|---|
String | The POS version. |
Remarks
Any request sent with a null or empty POS version will have this value used instead.
See Also
| Improve this Doc View SourceUserAgentProductName
Optional. Gets or sets the name of the 'product' to use in the user agent header on HTTP calls to Humm.
Declaration
public string UserAgentProductName { get; set; }
Property Value
Type | Description |
---|---|
String | The name of the user agent product. |
Remarks
If not supplied the Yort.Humm.InStore library name is used instead.
Changing this property will have no effect on HummClient instances that have already been constructed.
UserAgentProductVersion
Optional. Gets or sets the version of the 'product' to use in the user agent header on HTTP calls to Humm.
Declaration
public string UserAgentProductVersion { get; set; }
Property Value
Type | Description |
---|---|
String | The user agent product version. |
Remarks
If not supplied the Yort.Humm.InStore library version is used instead.
Changing this property will have no effect on HummClient instances that have already been constructed.