UNPKG

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

440 lines (436 loc) 16.9 kB
/** * Shell Data & Reporting APIsLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { boolean, lazy, nullable, number, object, optional, Schema, string, } from '../schema'; import { ExceptionSiteLocation, exceptionSiteLocationSchema, } from './exceptionSiteLocation'; export interface TransactionExceptions { /** Unique Sales Item Identifier */ salesItemId?: number | null; /** Unique Card Identifier */ cardId?: number | null; /** Product Id */ productId?: number | null; /** Transaction Unique Identifier */ transactionGUID?: string | null; /** * Local Transaction Date of where the transaction took place * Format: yyyyMMdd */ transactionDate?: string | null; /** Total Gross Amount for the Invoice Customer */ customerInvoiceValueTotalGross?: number | null; /** * Card PAN number * Returns masked PAN number when masking is enabled at the Microservices configuration (Mask all digits except the last 6 digits of the PAN) */ cardPAN?: string | null; /** * Card Expiry Date * Format: yyyyMMdd */ cardExpiry?: string | null; /** * Local Transaction Time of where the transaction took place * Format: HH:mm:ss (24 hours format) */ transactionTime?: string | null; /** * UTC Offset extracted from GFN Sales Date time. Note: This may not be accurate for all TPN transactions * Format: +/-HH:mm:ss (24 hours format) */ uTCOffset?: string | null; /** Fleet Id Input as entered by the drivers at the time of transaction */ fleetIdInput?: string | null; /** Odometer Input as entered by the drivers at the time of transaction */ odometerInput?: number | null; /** Driver Name embossed on the card */ driverName?: string | null; /** Vehicle Registration Number embossed on the card */ vehicleRegistration?: string | null; /** ISO currency code (Example: GBP) */ invoiceCurrencyCode?: string | null; /** Currency symbol of the Invoice Currency Code (i.e. £, $, etc.,) */ invoiceCurrencySymbol?: string | null; /** ISO currency code */ transactionCurrencyCode?: string | null; /** Currency symbol of the Transaction Currency Code (i.e. £, $, etc.,) */ transactionCurrencySymbol?: string | null; /** Net Amount */ transactionNetAmount?: number | null; /** Tax Amount */ transactionTax?: number | null; /** Gross Amount */ transactionGrossAmount?: number | null; /** Invoiced Net Amount */ invoiceNetAmount?: number | null; /** Invoiced Tax Amount */ invoiceTax?: number | null; /** Invoice Gross Amount */ invoiceGrossAmount?: number | null; /** Country of Purchase (Ex: France, Germany, etc.,) */ purchasedInCountry?: string | null; /** Account Id */ accountId?: number | null; /** Account Number */ accountNumber?: string | null; /** Account Name */ accountName?: string | null; /** Account Short Name */ accountShortName?: string | null; /** Quantity/Volume */ quantity?: number | null; /** True if the product on transaction is listed as a fuel product else return false */ fuelProduct?: boolean | null; /** Product Unit Price in transaction currency */ unitPriceInTransactionCurrency?: number | null; /** Product Unit Price in invoice currency */ unitPriceInInvoiceCurrency?: number | null; /** Unit Discount in transaction currency */ unitDiscountTransactionCurrency?: number | null; /** Unit Discount in invoice currency */ unitDiscountInvoiceCurrency?: number | null; /** True when the transaction is already invoice, else return False */ isInvoiced?: boolean | null; /** Invoice Number if invoiced */ invoiceNumber?: string | null; /** * Invoice Date * Format: yyyyMMdd HH:mm:ss */ invoiceDate?: string | null; /** Site Code */ siteCode?: string | null; /** Site Name */ siteName?: string | null; /** Site Country */ siteCountry?: string | null; /** Geography Location entity for Site Location */ location?: ExceptionSiteLocation; /** Card Group Name */ cardGroupName?: string | null; /** Receipt Number */ receiptNumber?: string | null; /** Product Code */ productCode?: string | null; /** Product Name */ productName?: string | null; /** Product Group Id */ productGroupId?: number | null; /** Product Group Name */ productGroupName?: string | null; /** DelCo Exchange Rate (Site exchange rate) */ delCoExchangeRate?: number | null; /** ColCo Exchange Rate (Customer exchange rate) */ colCoExchangeRate?: number | null; /** True when transaction occurred at a Shell site else return False */ isShellSite?: boolean | null; /** Network as configured */ network?: string | null; /** Site Group Id */ siteGroupId?: number | null; /** Site GroupName */ siteGroupName?: string | null; /** Site GroupName */ postingDate?: string | null; /** * First digits of the Card PAN * 7002 = Fleet * 7077 = CRT */ issuerCode?: string | null; /** ISO code of the country where the transaction took place */ purchasedInCountryCode?: string | null; /** ISO code of the Customer Country */ customerCountryCode?: string | null; /** Name of the Customer Country */ customerCountry?: string | null; /** Release code, 7th Digit of the Card PAN */ releaseCode?: string | null; /** Card group ID */ cardGroupId?: string | null; /** 3 digits, Card sequence number and Check digit (Digit 16,17 and 18 on the card pan) */ cardSequenceNumber?: string | null; /** Check digit, Last number of the card pan */ checkDigit?: string | null; /** FleetId/CRN description in Card Platform configured at the account level */ fleetIDDescription?: string | null; /** VAT Percentage */ vATRate?: number | null; /** * VAT Category Id-Description * 1-Zero Rated * 2-A1 PH-O 12% Sales Domestic * 3-VAT exempt */ vATCategory?: string | null; /** Effective Discount (excluding VAT, in transaction currency) 4 digits */ effectiveDiscountInTrxCurrency?: string | null; /** Transaction Type */ transactionType?: string | null; /** Pin Indicator (Indicates whether PIN used or not used at the time of transaction) */ pINIndicator?: string | null; /** * Is VAT Applicable for this transaction * “Y” or “N” */ vATApplicable?: string | null; /** * Net Invoice Indicator, Will the customer receive an invoice without VAT? * Example: “Y” or “N” */ netInvoiceIndicator?: string | null; /** Customer currency code */ customerCurrencyCode?: string | null; /** Customer currency Symbol */ customerCurrencySymbol?: string | null; /** Effective Unit Discount */ effectiveUnitDiscountInCustomerCurrency?: number | null; /** Effective Discount */ effectiveDiscountInCustomerCurrency?: number | null; /** VAT on Net Amount */ vATonNetAmountInCustomerCurrency?: number | null; /** * Discount Type * Example: 1-None * 2-Pence per unit * 3-Percentage */ discountType?: string | null; /** * Transaction status "U" or "I" * “U” stands for Uninvoiced * “I” stands for Invoiced */ transactionStatus?: string | null; /** Payer Group applicable for the Large Customer NL+8 digit code */ payerGroup?: string | null; /** Refund Flag “N” for Not Refunded and “Y” for Refunded. */ refundFlag?: string | null; /** Shows Sales Item Id of the original item that was refunded */ originalSalesItemId?: number | null; /** Delco Name */ delcoName?: string | null; /** Delco Code */ delcoCode?: string | null; /** Payer number */ payerNumber?: string | null; /** Payer name */ payerName?: string | null; /** Year/Month of the Card Expiry captured on the transaction */ cardExpiryPeriod?: string | null; /** Authorisation code of the transaction */ authorisationCode?: string | null; /** Unique id of the transaction that may include one or more salesitems */ transactionId?: string | null; /** Transaction line item number */ transactionLine?: string | null; /** * Is the Sales Item allowed for clearing? i.e. not written off * Example: “Y” or “N” */ allowClearing?: string | null; /** CRM Case number if the sales item is in dispute */ cRMNumber?: string | null; /** * Sales Item Dispute Status if disputed * 0 No Dispute * 1 In Dispute * 2 Re-Instated * 3 Adjusted * 4 Written Off by Colco * 5 Written Off by Delco * 6 Charged Back to Site */ disputeStatus?: string | null; /** Unit discount in customer currency */ rebateRate?: number | null; /** Exchange rate from transaction currency to customer currency. */ delCoToColCoExchangeRate?: number | null; /** Net euro amount. */ netEuroAmount?: number | null; /** Euro rebate amount. */ euroRebateAmount?: number | null; /** Euro VAT amount. */ euroVATAmount?: number | null; /** Parent customer number */ parentCustomerNumber?: string | null; /** VAT on Net Amount (in transaction currency) 2 decimals */ vATonNetAmount?: number | null; /** VAT Country */ vATCountry?: string | null; } export const transactionExceptionsSchema: Schema<TransactionExceptions> = object( { salesItemId: ['SalesItemId', optional(nullable(number()))], cardId: ['CardId', optional(nullable(number()))], productId: ['ProductId', optional(nullable(number()))], transactionGUID: ['TransactionGUID', optional(nullable(string()))], transactionDate: ['TransactionDate', optional(nullable(string()))], customerInvoiceValueTotalGross: [ 'CustomerInvoiceValueTotalGross', optional(nullable(number())), ], cardPAN: ['CardPAN', optional(nullable(string()))], cardExpiry: ['CardExpiry', optional(nullable(string()))], transactionTime: ['TransactionTime', optional(nullable(string()))], uTCOffset: ['UTCOffset', optional(nullable(string()))], fleetIdInput: ['FleetIdInput', optional(nullable(string()))], odometerInput: ['OdometerInput', optional(nullable(number()))], driverName: ['DriverName', optional(nullable(string()))], vehicleRegistration: ['VehicleRegistration', optional(nullable(string()))], invoiceCurrencyCode: ['InvoiceCurrencyCode', optional(nullable(string()))], invoiceCurrencySymbol: [ 'InvoiceCurrencySymbol', optional(nullable(string())), ], transactionCurrencyCode: [ 'TransactionCurrencyCode', optional(nullable(string())), ], transactionCurrencySymbol: [ 'TransactionCurrencySymbol', optional(nullable(string())), ], transactionNetAmount: [ 'TransactionNetAmount', optional(nullable(number())), ], transactionTax: ['TransactionTax', optional(nullable(number()))], transactionGrossAmount: [ 'TransactionGrossAmount', optional(nullable(number())), ], invoiceNetAmount: ['InvoiceNetAmount', optional(nullable(number()))], invoiceTax: ['InvoiceTax', optional(nullable(number()))], invoiceGrossAmount: ['InvoiceGrossAmount', optional(nullable(number()))], purchasedInCountry: ['PurchasedInCountry', optional(nullable(string()))], accountId: ['AccountId', optional(nullable(number()))], accountNumber: ['AccountNumber', optional(nullable(string()))], accountName: ['AccountName', optional(nullable(string()))], accountShortName: ['AccountShortName', optional(nullable(string()))], quantity: ['Quantity', optional(nullable(number()))], fuelProduct: ['FuelProduct', optional(nullable(boolean()))], unitPriceInTransactionCurrency: [ 'UnitPriceInTransactionCurrency', optional(nullable(number())), ], unitPriceInInvoiceCurrency: [ 'UnitPriceInInvoiceCurrency', optional(nullable(number())), ], unitDiscountTransactionCurrency: [ 'UnitDiscountTransactionCurrency', optional(nullable(number())), ], unitDiscountInvoiceCurrency: [ 'UnitDiscountInvoiceCurrency', optional(nullable(number())), ], isInvoiced: ['IsInvoiced', optional(nullable(boolean()))], invoiceNumber: ['InvoiceNumber', optional(nullable(string()))], invoiceDate: ['InvoiceDate', optional(nullable(string()))], siteCode: ['SiteCode', optional(nullable(string()))], siteName: ['SiteName', optional(nullable(string()))], siteCountry: ['SiteCountry', optional(nullable(string()))], location: ['Location', optional(lazy(() => exceptionSiteLocationSchema))], cardGroupName: ['CardGroupName', optional(nullable(string()))], receiptNumber: ['ReceiptNumber', optional(nullable(string()))], productCode: ['ProductCode', optional(nullable(string()))], productName: ['ProductName', optional(nullable(string()))], productGroupId: ['ProductGroupId', optional(nullable(number()))], productGroupName: ['ProductGroupName', optional(nullable(string()))], delCoExchangeRate: ['DelCoExchangeRate', optional(nullable(number()))], colCoExchangeRate: ['ColCoExchangeRate', optional(nullable(number()))], isShellSite: ['IsShellSite', optional(nullable(boolean()))], network: ['Network', optional(nullable(string()))], siteGroupId: ['SiteGroupId', optional(nullable(number()))], siteGroupName: ['SiteGroupName', optional(nullable(string()))], postingDate: ['PostingDate', optional(nullable(string()))], issuerCode: ['IssuerCode', optional(nullable(string()))], purchasedInCountryCode: [ 'PurchasedInCountryCode', optional(nullable(string())), ], customerCountryCode: ['CustomerCountryCode', optional(nullable(string()))], customerCountry: ['CustomerCountry', optional(nullable(string()))], releaseCode: ['ReleaseCode', optional(nullable(string()))], cardGroupId: ['CardGroupId', optional(nullable(string()))], cardSequenceNumber: ['CardSequenceNumber', optional(nullable(string()))], checkDigit: ['CheckDigit', optional(nullable(string()))], fleetIDDescription: ['FleetIDDescription', optional(nullable(string()))], vATRate: ['VATRate', optional(nullable(number()))], vATCategory: ['VATCategory', optional(nullable(string()))], effectiveDiscountInTrxCurrency: [ 'EffectiveDiscountInTrxCurrency', optional(nullable(string())), ], transactionType: ['TransactionType', optional(nullable(string()))], pINIndicator: ['PINIndicator', optional(nullable(string()))], vATApplicable: ['VATApplicable', optional(nullable(string()))], netInvoiceIndicator: ['NetInvoiceIndicator', optional(nullable(string()))], customerCurrencyCode: [ 'CustomerCurrencyCode', optional(nullable(string())), ], customerCurrencySymbol: [ 'CustomerCurrencySymbol', optional(nullable(string())), ], effectiveUnitDiscountInCustomerCurrency: [ 'EffectiveUnitDiscountInCustomerCurrency', optional(nullable(number())), ], effectiveDiscountInCustomerCurrency: [ 'EffectiveDiscountInCustomerCurrency', optional(nullable(number())), ], vATonNetAmountInCustomerCurrency: [ 'VATonNetAmountInCustomerCurrency', optional(nullable(number())), ], discountType: ['DiscountType', optional(nullable(string()))], transactionStatus: ['TransactionStatus', optional(nullable(string()))], payerGroup: ['PayerGroup', optional(nullable(string()))], refundFlag: ['RefundFlag', optional(nullable(string()))], originalSalesItemId: ['OriginalSalesItemId', optional(nullable(number()))], delcoName: ['DelcoName', optional(nullable(string()))], delcoCode: ['DelcoCode', optional(nullable(string()))], payerNumber: ['PayerNumber', optional(nullable(string()))], payerName: ['PayerName', optional(nullable(string()))], cardExpiryPeriod: ['CardExpiryPeriod', optional(nullable(string()))], authorisationCode: ['AuthorisationCode', optional(nullable(string()))], transactionId: ['TransactionId', optional(nullable(string()))], transactionLine: ['TransactionLine', optional(nullable(string()))], allowClearing: ['AllowClearing', optional(nullable(string()))], cRMNumber: ['CRMNumber', optional(nullable(string()))], disputeStatus: ['DisputeStatus', optional(nullable(string()))], rebateRate: ['RebateRate', optional(nullable(number()))], delCoToColCoExchangeRate: [ 'DelCoToColCoExchangeRate', optional(nullable(number())), ], netEuroAmount: ['NetEuroAmount', optional(nullable(number()))], euroRebateAmount: ['EuroRebateAmount', optional(nullable(number()))], euroVATAmount: ['EuroVATAmount', optional(nullable(number()))], parentCustomerNumber: [ 'ParentCustomerNumber', optional(nullable(string())), ], vATonNetAmount: ['VATonNetAmount', optional(nullable(number()))], vATCountry: ['VATCountry', optional(nullable(string()))], } );