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
43 lines (39 loc) • 1.17 kB
text/typescript
/**
* Shell Card Management APIsLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import { lazy, object, optional, Schema, unknown } from '../schema';
import {
DayTimeRestrictions,
dayTimeRestrictionsSchema,
} from './dayTimeRestrictions';
import {
LocationRestriction,
locationRestrictionSchema,
} from './locationRestriction';
import {
SearchProductRestriction,
searchProductRestrictionSchema,
} from './searchProductRestriction';
export interface Restriction {
usageRestrictions?: unknown;
dayTimeRestrictions?: DayTimeRestrictions;
productRestrictions?: SearchProductRestriction;
locationRestrictions?: LocationRestriction;
}
export const restrictionSchema: Schema<Restriction> = object({
usageRestrictions: ['UsageRestrictions', optional(unknown())],
dayTimeRestrictions: [
'DayTimeRestrictions',
optional(lazy(() => dayTimeRestrictionsSchema)),
],
productRestrictions: [
'ProductRestrictions',
optional(lazy(() => searchProductRestrictionSchema)),
],
locationRestrictions: [
'LocationRestrictions',
optional(lazy(() => locationRestrictionSchema)),
],
});