Show / Hide Table of Contents
    • Yort.Zip.InStore
      • CancelOrderRequest
      • CancelOrderResponse
      • CommitOrderRequest
      • CreateOrderRequest
      • CreateOrderResponse
      • EnrolRequest
      • EnrolResponse
      • IZipClient
      • OrderStatusRequest
      • OrderStatusResponse
      • RefundOrderRequest
      • RefundOrderResponse
      • RollbackOrderRequest
      • ZipApiException
      • ZipClient
      • ZipClientConfiguration
      • ZipEnvironment
      • ZipEnvironment.NewZealand
      • ZipErrorResponse
      • ZipOrder
      • ZipOrderItem
      • ZipOrderStatus
      • ZipPaymentFlow
      • ZipRequestOptionsBase
      • ZipValidationError

    Class ZipRequestOptionsBase

    Base class for request options classes, providing a common and extensible interface for all requests.

    Inheritance
    Object
    ZipRequestOptionsBase
    CancelOrderRequest
    CommitOrderRequest
    CreateOrderRequest
    EnrolRequest
    OrderStatusRequest
    RefundOrderRequest
    RollbackOrderRequest
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Yort.Zip.InStore
    Assembly: Yort.Zip.InStore.dll
    Syntax
    public abstract class ZipRequestOptionsBase

    Methods

    | Improve this Doc View Source

    ApplyDefaults(ZipClientConfiguration)

    Applies default values from the ZipClientConfiguration specified to this request, where appropriate.

    Declaration
    public virtual void ApplyDefaults(ZipClientConfiguration config)
    Parameters
    Type Name Description
    ZipClientConfiguration config

    A ZipClientConfiguration to read default values from.

    Remarks

    Defaults should only be used for values that are not otherwise set (null).

    The base version of this method is a no-op, it must be overridden by derived classes to implement the defaults specific to their request format.

    This method is called (by ZipClient) before the Validate() method, and should be robust to null/missing/out of range values.

    | Improve this Doc View Source

    GetCustomHttpHeaders()

    Returns a list of key value pairs to be applied as HTTP headers to HTTP request for this request type.

    Declaration
    public virtual Dictionary<string, string> GetCustomHttpHeaders()
    Returns
    Type Description
    Dictionary<String, String>

    A dictionary containing key/value pairs to be applied as custom HTTP headers, or null if no custom headers apply.

    Remarks

    By default returns null indicating there are no custom headers. Can be overridden by derived types to specify otherwise.

    | Improve this Doc View Source

    Validate()

    Validates the properties of this request match the known design time requirements, i.e are all required properties provided.

    Declaration
    public abstract void Validate()
    Remarks

    Throws exceptions (typically ArgumentException, ArgumentNullException or ArgumentOutOfRangeException) if any property is in a known invalid state.

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