Class ProcessSalesAdjustmentRequest
Represents a request to full or partially refund a previously successful ProcessAuthorisationAsync(ProcessAuthorisationRequest) request.
Inherited Members
Namespace: Yort.Humm.InStore
Assembly: Yort.Humm.InStore.dll
Syntax
public sealed class ProcessSalesAdjustmentRequest : RequestBase
Properties
| Improve this Doc View SourceAmount
Gets or sets the amount of the refund.
Declaration
[JsonProperty("x_amount")]
public decimal Amount { get; set; }
Property Value
Type | Description |
---|---|
Decimal | The refund amount as a dollar value in decimal format. |
Remarks
Although the Humm API requires this value to be sent as a number of cents, this library uses a dollar value and will perform the conversion to cents for you. For example, to send $119.50 set this value to 119.5.
Maximum length of 64 characters.
ClientTransactionReference
Required. Gets or sets the client transaction reference for this adjustment.
Declaration
[JsonProperty("x_pos_transaction_ref")]
public string ClientTransactionReference { get; set; }
Property Value
Type | Description |
---|---|
String | This is the transaction reference of the sales adjustment. |
Remarks
Be sure to read the notes on idempotency and retry logic at https://docs.shophumm.com.au/pos/api_information/retries_and_idempotency/
PurchaseReference
Required. Gets or sets the purchase reference of the original transaction to be refunded.
Declaration
[JsonProperty("x_purchase_ref")]
public string PurchaseReference { get; set; }
Property Value
Type | Description |
---|---|
String | A tranaction reference for the original authorisation to be refunded. |
Remarks
The original transaction reference. It can either be the ClientTransactionReference that was passed through as part of the ProcessAuthorisationAsync(ProcessAuthorisationRequest) request (or the SendReceiptAsync(SendReceiptRequest) request), or the humm purchase number that was returned from the call to ProcessAuthorisationAsync. In the case of the former, the ClientTransactionReference must be unique among all sellers in a chain of sellers (unique among all devices sharing a merchant id). In the case of the latter, the POS software would be required to store the PurchaseNumber retured by ProcessAuthorisationAsync(ProcessAuthorisationRequest).
Maximum length of 64 characters.
Methods
| Improve this Doc View SourceValidate()
Validates this instance.
Declaration
public override void Validate()
Overrides
Remarks
Ensures ClientTransactionReference and PurchaseReference 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().