card-management-sdk
Version:
The Shell Card Management API is REST-based and employs OAUTH 2.0,Basic and ApiKey authentication. The API endpoints accept JSON-encoded request bodies, return JSON-encoded responses and use standard HTTP response codes. All resources are located in the S
54 lines (50 loc) • 2.02 kB
text/typescript
/**
* Shell Card Management APIsLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import { boolean, object, optional, Schema, string } from '../schema';
/** Details of the day/time restrictions such as weekdays and time range in which transactions should be allowed on the card. */
export interface DayTimeRestriction {
/** True if card could be used on a Monday, else false */
monday?: boolean;
/** True if card could be used on a Tuesday, else false. */
tuesday?: boolean;
/** True if card could be used on a Wednesday, else false. */
wednesday?: boolean;
/** True if card could be used on a Thursday, else false */
thursday?: boolean;
/** True if card could be used on a Friday, else false */
friday?: boolean;
/** True if card could be used on a Saturday, else false */
saturday?: boolean;
/** True if card could be used on a Sunday, else false. */
sunday?: boolean;
/**
* Card could be used from this time in a day.
* Format: HH:mm (24-hour format)
* Note:
* 1. Clients to convert this to appropriate DateTime or TimeSpan type.
* “00:00” is the lowest time value and “23:59” is the highest time value.
*/
timeFrom?: string;
/**
* Card could be used up to this time in a day.
* Format: HH:mm (24-hour format)
* Note:
* 1. Clients to convert this to appropriate DateTime or TimeSpan type.
* “00:00” is the lowest time value and “23:59” is the highest time value.
*/
timeTo?: string;
}
export const dayTimeRestrictionSchema: Schema<DayTimeRestriction> = object({
monday: ['Monday', optional(boolean())],
tuesday: ['Tuesday', optional(boolean())],
wednesday: ['Wednesday', optional(boolean())],
thursday: ['Thursday', optional(boolean())],
friday: ['Friday', optional(boolean())],
saturday: ['Saturday', optional(boolean())],
sunday: ['Sunday', optional(boolean())],
timeFrom: ['TimeFrom', optional(string())],
timeTo: ['TimeTo', optional(string())],
});