Class CreateOrderRequest
Contains the values/arguments to the Create(CreateOrderRequest) call.
Inherited Members
Namespace: Yort.Laybuy.InStore
Assembly: Yort.Laybuy.InStore.dll
Syntax
public class CreateOrderRequest : LaybuyRequestBase
Properties
| Improve this Doc View SourceAmount
Required. The amount of money to request.
Declaration
[JsonProperty("amount")]
public decimal Amount { get; set; }
Property Value
Type | Description |
---|---|
Decimal |
Remarks
The total for the customer to pay. This amount is validated against the sum of the amounts in the items attribute.
See Also
| Improve this Doc View SourceCurrency
Optional (but recommended). The currency the Amount is in.
Declaration
[JsonProperty("currency")]
public string Currency { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
If omitted then the default currency associated with the merchant id is used. It is highly recommended a specific currency be provided rather than relying on defaults.
See Also
| Improve this Doc View SourceCustomer
Required (must provide Phone). Sets or returns a RequestLaybuyCustomer instance representing details of the customer for this request.
Declaration
[JsonProperty("customer")]
public RequestLaybuyCustomer Customer { get; set; }
Property Value
Type | Description |
---|---|
RequestLaybuyCustomer |
Remarks
Requests made by systems for physical stores/branches *must* provide a value for the customer phone number.
Items
Optional. Null or a collection of LaybuyItem objects being purchased. Default value is null.
Declaration
[JsonProperty("items")]
public IList<LaybuyItem> Items { get; set; }
Property Value
Type | Description |
---|---|
IList<LaybuyItem> |
MerchantReference
Required. A client generated reference for this request, used for idempotency.
Declaration
[JsonProperty("merchantReference")]
public string MerchantReference { get; set; }
Property Value
Type | Description |
---|---|
String |
Origin
Required. A string identifying the calling system. Must be pre-registered with Laybuy.
Declaration
[JsonProperty("origin")]
public string Origin { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Uses a default of POS if not specified and no default is specified via the DefaultOrigin value.
OriginData
Required. An object to be serialised as json containing data specific to the Origin value provided.
Declaration
[JsonProperty("originData")]
public object OriginData { get; set; }
Property Value
Type | Description |
---|---|
Object |
See Also
| Improve this Doc View SourceTax
Optional. The tax included in Amount.
Declaration
[JsonProperty("tax")]
public decimal Tax { get; set; }
Property Value
Type | Description |
---|---|
Decimal |
Methods
| Improve this Doc View SourceSetDefaults(LaybuyClientConfiguration)
Sets any properties on this object that are null to the appropriate defaults, if possible.
Declaration
public override void SetDefaults(LaybuyClientConfiguration settings)
Parameters
Type | Name | Description |
---|---|---|
LaybuyClientConfiguration | settings | The settings used to construct the LaybuyClient instance that is about to send this request. |
Overrides
| Improve this Doc View SourceValidate()
Validates the properties for this instance are valid before sending the request to the API.
Declaration
public override void Validate()
Overrides
Remarks
Provides simple client side validation, such as required fields beign provided and fields under maximum lengths etc.