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) • 6.05 kB
text/typescript
/**
* Shell Data & Reporting APIsLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import {
array,
lazy,
nullable,
number,
object,
optional,
Schema,
string,
} from '../schema';
import {
AssociatedAccount,
associatedAccountSchema,
} from './associatedAccount';
import { FeeRuleLocation, feeRuleLocationSchema } from './feeRuleLocation';
import { FeeRuleProduct, feeRuleProductSchema } from './feeRuleProduct';
import { FeeRuleTier, feeRuleTierSchema } from './feeRuleTier';
export interface BonusConfiguration {
/** Account identifier of the Pricing Account associated with the Payer. */
pricingAccountId?: number | null;
/** Account number of the Pricing Account associated with the Payer. */
pricingAccountNumber?: string | null;
/** Short name of the Pricing Account associated with the Payer. */
pricingAccountShortName?: string | null;
/** Full name of the Pricing Account associated with the Payer. */
pricingAccountFullName?: string | null;
/** Bonus or association bonus configuration identifier that is associated to the payer. */
feeRuleId?: number | null;
/** Bonus or association bonus configuration description that is associated to the payer. */
feeRuleDescription?: string | null;
/**
* The bonus or association bonus configuration becomes effective on the payer from this date.
* Format: YYYYMMDD
*/
feeRuleDateEffective?: string | null;
/**
* The bonus or association bonus configuration is terminated for the payer on this date.
* Format: YYYYMMDD
*/
feeRuleDateTerminated?: string | null;
/**
* Configuration to specify how the bonus is paid.
* Format: ID-Description
* Example:
* 1-Pay to Payer
* 2-Pay to invoice levels before the payer
* 3-Pay to specific customer
* 4-Pay to Association Customer
* 5-Pay to Associated Customers
*/
bonusPaidTo?: string | null;
/** Account identifier of the specific account to which the bonus is paid back */
bonusPaidToAccountId?: number | null;
/** Account number of the specific account to which the bonus is paid back */
bonusPaidToAccountNumber?: string | null;
/** Short name of the specific account to which the bonus is paid back */
bonusPaidToAccountShortName?: string | null;
/** Full name of the specific account to which the bonus is paid back */
bonusPaidToAccountFullName?: string | null;
/**
* Frequency of the configuration.
* Format: ID-Description
* Examples:
* 1-Daily (all days)
* 2-Daily (only working days)
* 3-Weekly – Monday
*/
frequency?: string | null;
/**
* The next bonus is calculated for the payer on this date.
* Format: YYYYMMDD
*/
nextCalculationDate?: string | null;
/**
* The previous bonus was calculated for the payer on this date.
* Format: YYYYMMDD
*/
previousCalculatedDate?: string | null;
/**
* Fee Rule Basis configured.
* Format: ID-Description
* Example:
* 1-Currency Per Unit
* 2-Percentage of Uplift
* 3-Lump Sum
*/
feeRuleBasis?: string | null;
/** ISO currency code of the currency configured in the Bonus Configuration, if any. */
feeRuleCurrencyCode?: string | null;
/** Currency symbol of the currency configured in the Bonus Configuration, if any. */
feeRuleCurrencySymbol?: string | null;
/**
* This bonus or association bonus is available from this date.
* Format: YYYYMMDD
*/
feeRuleAvailableFrom?: string | null;
/**
* This bonus or association bonus configuration will not be available from this date.
* Format: YYYYMMDD
*/
feeRuleAvailableTo?: string | null;
feeRuleLocations?: FeeRuleLocation[];
feeRuleTiers?: FeeRuleTier[];
associatedAccounts?: AssociatedAccount[];
feeRuleProducts?: FeeRuleProduct[];
}
export const bonusConfigurationSchema: Schema<BonusConfiguration> = object({
pricingAccountId: ['PricingAccountId', optional(nullable(number()))],
pricingAccountNumber: ['PricingAccountNumber', optional(nullable(string()))],
pricingAccountShortName: [
'PricingAccountShortName',
optional(nullable(string())),
],
pricingAccountFullName: [
'PricingAccountFullName',
optional(nullable(string())),
],
feeRuleId: ['FeeRuleId', optional(nullable(number()))],
feeRuleDescription: ['FeeRuleDescription', optional(nullable(string()))],
feeRuleDateEffective: ['FeeRuleDateEffective', optional(nullable(string()))],
feeRuleDateTerminated: [
'FeeRuleDateTerminated',
optional(nullable(string())),
],
bonusPaidTo: ['BonusPaidTo', optional(nullable(string()))],
bonusPaidToAccountId: ['BonusPaidToAccountId', optional(nullable(number()))],
bonusPaidToAccountNumber: [
'BonusPaidToAccountNumber',
optional(nullable(string())),
],
bonusPaidToAccountShortName: [
'BonusPaidToAccountShortName',
optional(nullable(string())),
],
bonusPaidToAccountFullName: [
'BonusPaidToAccountFullName',
optional(nullable(string())),
],
frequency: ['Frequency', optional(nullable(string()))],
nextCalculationDate: ['NextCalculationDate', optional(nullable(string()))],
previousCalculatedDate: [
'PreviousCalculatedDate',
optional(nullable(string())),
],
feeRuleBasis: ['FeeRuleBasis', optional(nullable(string()))],
feeRuleCurrencyCode: ['FeeRuleCurrencyCode', optional(nullable(string()))],
feeRuleCurrencySymbol: [
'FeeRuleCurrencySymbol',
optional(nullable(string())),
],
feeRuleAvailableFrom: ['FeeRuleAvailableFrom', optional(nullable(string()))],
feeRuleAvailableTo: ['FeeRuleAvailableTo', optional(nullable(string()))],
feeRuleLocations: [
'FeeRuleLocations',
optional(array(lazy(() => feeRuleLocationSchema))),
],
feeRuleTiers: [
'FeeRuleTiers',
optional(array(lazy(() => feeRuleTierSchema))),
],
associatedAccounts: [
'AssociatedAccounts',
optional(array(lazy(() => associatedAccountSchema))),
],
feeRuleProducts: [
'FeeRuleProducts',
optional(array(lazy(() => feeRuleProductSchema))),
],
});