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
68 lines (64 loc) • 1.92 kB
text/typescript
/**
* Shell Card Management APIsLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import {
lazy,
nullable,
object,
optional,
Schema,
string,
unknown,
} from '../schema';
import {
DayTimeRestrictions,
dayTimeRestrictionsSchema,
} from './dayTimeRestrictions';
import {
LocationRestriction,
locationRestrictionSchema,
} from './locationRestriction';
export interface BundleRestriction {
/**
* The value indicates what actions to be performed with respect to day time restriction.
* Mandatory
* Allowed values –
* • Add: Apply the given restriction on the bundle.
* • Default: No Day/Time restriction will be applied on the bundle in Gateway.
*/
dayTimeRestrictionAction?: string | null;
/**
* The value indicates what actions to be performed with respect to location restriction.
* Mandatory
* Allowed values –
* • Add: Apply the given restriction on the bundle.
* • Default: No location restriction will be applied on the bundle in Gateway.
*/
locationRestrictionAction?: string | null;
usageRestrictions?: unknown;
dayTimeRestrictions?: DayTimeRestrictions;
productRestrictions?: unknown;
locationRestrictions?: LocationRestriction;
}
export const bundleRestrictionSchema: Schema<BundleRestriction> = object({
dayTimeRestrictionAction: [
'DayTimeRestrictionAction',
optional(nullable(string())),
],
locationRestrictionAction: [
'LocationRestrictionAction',
optional(nullable(string())),
],
usageRestrictions: ['UsageRestrictions', optional(unknown())],
dayTimeRestrictions: [
'DayTimeRestrictions',
optional(lazy(() => dayTimeRestrictionsSchema)),
],
productRestrictions: ['ProductRestrictions', optional(unknown())],
locationRestrictions: [
'LocationRestrictions',
optional(lazy(() => locationRestrictionSchema)),
],
});