Class LaybuyRequestBase
Base class for request objects, used to provide some internal plumbing. Not intended for use from application code.
Inheritance
Inherited Members
Namespace: Yort.Laybuy.InStore
Assembly: Yort.Laybuy.InStore.dll
Syntax
public abstract class LaybuyRequestBase
Methods
| Improve this Doc View SourceSetDefaults(LaybuyClientConfiguration)
Sets any properties on this object that are null to the appropriate defaults, if possible.
Declaration
public virtual 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. |
Remarks
The base implementation of this method does nothing, it should be overriden by derived classes that have defaults which can have suitable defaults applied. This method is not abstract so as not to force derived classes to implement and document an empty versions when there are no defaults that can be applied.
Validate()
Validates the properties for this instance are valid before sending the request to the API.
Declaration
public abstract void Validate()
Remarks
Provides simple client side validation, such as required fields beign provided and fields under maximum lengths etc.