Class CreateKeyRequest
Represents a request to swap a device (initialisation) token for a device key used to sign future requests.
Inherited Members
Namespace: Yort.Humm.InStore
Assembly: Yort.Humm.InStore.dll
Syntax
public sealed class CreateKeyRequest : RequestBase
Constructors
| Improve this Doc View SourceCreateKeyRequest()
Initializes a new instance of the CreateKeyRequest class.
Declaration
public CreateKeyRequest()
Properties
| Improve this Doc View SourceAutoUpdateClientToken
Gets or sets a value indicating whether the client automatically initialises itself with the returned device token (if the request is successful) so it is used on all future requests.
Declaration
[JsonIgnore]
public bool AutoUpdateClientToken { get; set; }
Property Value
Type | Description |
---|---|
Boolean | If true the HummClient performing this request will automatically update itself to use the returned token from a succesful request as well as returning the response to the caller so the token can be persisted for future calls. If false the the response is returned to the caller, and SetDeviceKey(String) must be manually called on whichever client instance should use the new token. |
Remarks
Even when AutoUpdateClientToken is true, it is still up to the calling application to persist the device key returned in the response so it can be used in the event of a process/machine restart etc.
DeviceToken
Required. Gets or sets the one-time use device token generated in the Humm Seller/merchant portal.
Declaration
[JsonProperty("x_device_token")]
public string DeviceToken { get; set; }
Property Value
Type | Description |
---|---|
String | The device token generated in the Humm Seller/merchant portal. |
Remarks
Maximum legth of 64 characters.
PosVendor
Required. Gets or sets the name of the company that suppliers the POS hardware or software.
Declaration
[JsonProperty("x_pos_vendor")]
public string PosVendor { get; set; }
Property Value
Type | Description |
---|---|
String | The company name of the POS supplier. |
Remarks
Maximum length of 100 characters.
Methods
| Improve this Doc View SourceValidate()
Validates this instance.
Declaration
public override void Validate()
Overrides
Remarks
Ensures DeviceToken and PosVendor are not null, empty strings or contain only whitespace. Also ensures they are not longer than allowed.
Also ensures all base properties are valid, see Validate().