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
52 lines (48 loc) • 1.33 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 } from '../schema.js';
import {
DayTimeRestrictions,
dayTimeRestrictionsSchema,
} from './dayTimeRestrictions.js';
import {
LocationRestriction,
locationRestrictionSchema,
} from './locationRestriction.js';
import {
SearchProductRestriction,
searchProductRestrictionSchema,
} from './searchProductRestriction.js';
import {
UsageRestrictionsCard,
usageRestrictionsCardSchema,
} from './usageRestrictionsCard.js';
export interface Restriction {
usageRestrictions?: UsageRestrictionsCard;
dayTimeRestrictions?: DayTimeRestrictions;
productRestrictions?: SearchProductRestriction;
locationRestrictions?: LocationRestriction;
}
export const restrictionSchema: Schema<Restriction> = lazy(() =>
object({
usageRestrictions: [
'UsageRestrictions',
optional(usageRestrictionsCardSchema),
],
dayTimeRestrictions: [
'DayTimeRestrictions',
optional(dayTimeRestrictionsSchema),
],
productRestrictions: [
'ProductRestrictions',
optional(searchProductRestrictionSchema),
],
locationRestrictions: [
'LocationRestrictions',
optional(locationRestrictionSchema),
],
})
);