data-and-reporting-sdk
Version:
Data And Reporting product consists of API's which provides details of transaction and invoice informations about shell cards. The Shell Card Transaction and Invoice API is REST-based and employs Basic authentication in Version 1 and Oauth authentication
178 lines (174 loc) • 7.5 kB
text/typescript
/**
* Shell Data & Reporting APIsLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import {
array,
boolean,
nullable,
number,
object,
optional,
Schema,
string,
} from '../schema';
import {
PricedTransactionReqV2InvoiceStatusEnum,
pricedTransactionReqV2InvoiceStatusEnumSchema,
} from './pricedTransactionReqV2InvoiceStatusEnum';
import {
PricedTransactionReqV2PeriodEnum,
pricedTransactionReqV2PeriodEnumSchema,
} from './pricedTransactionReqV2PeriodEnum';
import {
PricedTransactionReqV2SortOrderEnum,
pricedTransactionReqV2SortOrderEnumSchema,
} from './pricedTransactionReqV2SortOrderEnum';
/** This endpoint allows querying the transaction data (i.e. Priced, Billed and Unbilled sales items) from SFSBI. It provides a flexible search criteria and supports paging */
export interface PricedRequestData {
/** Collecting Company Code (Shell Code) of the selected payer. */
colCoCode: string | null;
/** The Collecting Company Id in the Shell Card Platform. */
colCoId?: number;
/** Invoice status of the transactions. Mandatory Possible options:I - Invoiced, U – Un-Invoiced, A – All */
invoiceStatus: PricedTransactionReqV2InvoiceStatusEnum;
/** Payer Number of the selected payer. */
payerNumber: string | null;
/** Account Id (GFN customer id) */
accountId?: number | null;
/** Account Number of the selected account. */
accountNumber?: string | null;
/** Driver Name (of Card record) */
driverName?: string | null;
/** Unique Card Id in the Shell Card Platform */
cardId?: number;
/** Card Group Id in GFN */
cardGroupId?: number | null;
/** Full Card PAN */
cardPAN?: string | null;
/** Product Code – Global as per GFN configuration */
productCode?: string | null;
/** Product Name – Global as per GFN configuration */
productName?: string | null;
/** Site Code in GFN */
siteCode?: string | null;
/** Site Code as configured in GFN */
incomingSiteNumber?: string | null;
/** Returns the billed transaction for the given invoice date */
invoiceDate?: string | null;
/** Returns the billed transaction for the given invoice number */
invoiceNumber?: string | null;
/** Purchased InCountryCode */
purchasedInCountryCode?: string | null;
/** Network Delco PurchasedCountryName */
purchasedInCountry?: string | null;
/** Site Group Id in GFN */
siteGroupId?: number | null;
/** Vehicle Registration (of Card record) */
vehicleRegistrationNumber?: string | null;
/** Card Id (i.e. Unique Card Id in GFN) */
feeTypeId?: number | null;
/** Item identifier in the transaction. */
lineItemDescription?: string | null;
/**
* This entity accepts the list of CardId to filter in the response.
* Note: The number of cardId allowed to be passed in the request is configurable to a maximum of 500 cards.
*/
cards?: number[];
sortOrder?: PricedTransactionReqV2SortOrderEnum;
/** From transaction delivery date */
fromDate?: string | null;
/** To transaction delivery date */
toDate?: string | null;
/**
* Pass below one of the value as per the required transaction period
* 1. Last 7 Days
* 2. Last 30 Days
* 3. Last 90 Days
*/
period?: PricedTransactionReqV2PeriodEnum;
/** Transaction posting start date and time */
postingDateFrom?: string | null;
/** Transaction posting end date and time */
postingDateTo?: string | null;
/** Unique id of the transaction that may include one or more salesitems */
transactionItemId?: string | null;
/** Is FuelOnly indicator */
fuelOnly?: boolean | null;
/**
* When passed as ‘true’ then all sales items along with fees will be included in the response and the follwoing filteres will be ignored
* * InvoiceNumber
* * InvoiceDate
* * PostingDateFrom
* * PostingDateTo
*/
includeFees?: boolean | null;
/** If true then returns all the data linked tothe payer group of the provided PayerNumberin the request */
isMultipayer?: boolean;
/** When passed as ‘True’ the transactions records with report date not equal to 9999-12-30 will be returned. When passed as ‘False’ the above condition will not be checked. */
validInvoiceDateOnly?: boolean;
/** Invoice From Date, this is a search criterion to filter invoiced transactions with invoice date from this date. */
invoiceFromDate?: string | null;
/** Invoice To Date, this is a search criterion to filter invoiced transactions with invoice date until this date. */
invoiceToDate?: string | null;
/** Hosting Collecting Company Number of the selected payer. */
hostingCollectingCompanyNumber?: string | null;
/** Search based on DriverName or VRN */
search?: string | null;
/** Unique id of the transaction that may include one or more salesitems */
transactionId?: string | null;
}
export const pricedRequestDataSchema: Schema<PricedRequestData> = object({
colCoCode: ['ColCoCode', nullable(string())],
colCoId: ['ColCoId', optional(number())],
invoiceStatus: [
'InvoiceStatus',
pricedTransactionReqV2InvoiceStatusEnumSchema,
],
payerNumber: ['PayerNumber', nullable(string())],
accountId: ['AccountId', optional(nullable(number()))],
accountNumber: ['AccountNumber', optional(nullable(string()))],
driverName: ['DriverName', optional(nullable(string()))],
cardId: ['CardId', optional(number())],
cardGroupId: ['CardGroupId', optional(nullable(number()))],
cardPAN: ['CardPAN', optional(nullable(string()))],
productCode: ['ProductCode', optional(nullable(string()))],
productName: ['ProductName', optional(nullable(string()))],
siteCode: ['SiteCode', optional(nullable(string()))],
incomingSiteNumber: ['IncomingSiteNumber', optional(nullable(string()))],
invoiceDate: ['InvoiceDate', optional(nullable(string()))],
invoiceNumber: ['InvoiceNumber', optional(nullable(string()))],
purchasedInCountryCode: [
'PurchasedInCountryCode',
optional(nullable(string())),
],
purchasedInCountry: ['PurchasedInCountry', optional(nullable(string()))],
siteGroupId: ['SiteGroupId', optional(nullable(number()))],
vehicleRegistrationNumber: [
'VehicleRegistrationNumber',
optional(nullable(string())),
],
feeTypeId: ['FeeTypeId', optional(nullable(number()))],
lineItemDescription: ['LineItemDescription', optional(nullable(string()))],
cards: ['Cards', optional(array(number()))],
sortOrder: ['SortOrder', optional(pricedTransactionReqV2SortOrderEnumSchema)],
fromDate: ['FromDate', optional(nullable(string()))],
toDate: ['ToDate', optional(nullable(string()))],
period: ['Period', optional(pricedTransactionReqV2PeriodEnumSchema)],
postingDateFrom: ['PostingDateFrom', optional(nullable(string()))],
postingDateTo: ['PostingDateTo', optional(nullable(string()))],
transactionItemId: ['TransactionItemId', optional(nullable(string()))],
fuelOnly: ['FuelOnly', optional(nullable(boolean()))],
includeFees: ['IncludeFees', optional(nullable(boolean()))],
isMultipayer: ['IsMultipayer', optional(boolean())],
validInvoiceDateOnly: ['ValidInvoiceDateOnly', optional(boolean())],
invoiceFromDate: ['InvoiceFromDate', optional(nullable(string()))],
invoiceToDate: ['InvoiceToDate', optional(nullable(string()))],
hostingCollectingCompanyNumber: [
'HostingCollectingCompanyNumber',
optional(nullable(string())),
],
search: ['Search', optional(nullable(string()))],
transactionId: ['TransactionId', optional(nullable(string()))],
});