• Articles
  • Api Documentation

    Show / Hide Table of Contents
    • Yort.Laybuy.InStore
      • CancelOrderRequest
      • CancelOrderResponse
      • CreateOrderRequest
      • CreateOrderResponse
      • ILaybuyClient
      • LaybuyApiException
      • LaybuyApiResponseBase
      • LaybuyClient
      • LaybuyClientConfiguration
      • LaybuyCredentials
      • LaybuyCustomerAddress
      • LaybuyCustomerBase
      • LaybuyEnvironment
      • LaybuyItem
      • LaybuyOrderRefund
      • LaybuyOrderStatus
      • LaybuyRequestBase
      • LaybuyStatus
      • OrderRequest
      • OrderResponse
      • OrderStatusRequest
      • OrderStatusResponse
      • RefundRequest
      • RefundResponse
      • RequestLaybuyCustomer
      • ResponseLaybuyCustomer
      • StandardOriginData

    Class CreateOrderRequest

    Contains the values/arguments to the Create(CreateOrderRequest) call.

    Inheritance
    Object
    LaybuyRequestBase
    CreateOrderRequest
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Yort.Laybuy.InStore
    Assembly: Yort.Laybuy.InStore.dll
    Syntax
    public class CreateOrderRequest : LaybuyRequestBase

    Properties

    | Improve this Doc View Source

    Amount

    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
    Currency
    | Improve this Doc View Source

    Currency

    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
    Amount
    | Improve this Doc View Source

    Customer

    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.

    | Improve this Doc View Source

    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>
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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
    StandardOriginData
    | Improve this Doc View Source

    Tax

    Optional. The tax included in Amount.

    Declaration
    [JsonProperty("tax")]
    public decimal Tax { get; set; }
    Property Value
    Type Description
    Decimal

    Methods

    | Improve this Doc View Source

    SetDefaults(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
    LaybuyRequestBase.SetDefaults(LaybuyClientConfiguration)
    | Improve this Doc View Source

    Validate()

    Validates the properties for this instance are valid before sending the request to the API.

    Declaration
    public override void Validate()
    Overrides
    LaybuyRequestBase.Validate()
    Remarks

    Provides simple client side validation, such as required fields beign provided and fields under maximum lengths etc.

    See Also

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