00001 // OSB library ********************************************* -*- C++ -*- 00006 /* 00007 AUTHOR(S): Darryl Kang (dk) 00008 00009 RCS information 00010 $Name: OSB_060808 $ 00011 $Revision: 1.21.2.1 $ 00012 00013 License 00014 OSB rating and billing library for communication networks 00015 Copyright (C) 2004, 2005, 2006 OSB systems 00016 00017 This file may be distributed and/or modify under the terms of the 00018 GNU General Public License (GPL) as published by the Free Software 00019 Foundation which is provided in the file LICENSE.GPL included in the 00020 packaging of this file. 00021 00022 The file is distributed in the hope that it will be useful, but WITHOUT 00023 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00024 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00025 for more details. 00026 00027 Holders of a OSB Commercial License may use this file under the terms 00028 and conditions of this commercial license. 00029 */ 00030 #ifndef CHARGETRAITS_IDL 00031 #define CHARGETRAITS_IDL 00032 // ********************************************************************* 00033 #include "utf8string.idl" 00034 #include "corba_utility.idl" 00035 00036 module corba { 00037 module common { 00039 enum ChargeType { 00044 ct_unknown, 00045 ct_gross, 00046 ct_net 00047 }; 00048 00050 enum AccountType { 00051 Assets, 00052 Liabilities, 00053 Capital 00054 }; 00055 00057 enum RoundRuleType { 00058 rr_unknown, 00059 rr_roundUp, 00060 rr_dontRound 00061 }; 00062 00064 enum TaxKeyType { 00065 tktUnknown, 00066 tktAssociate, 00067 tktContract, 00068 tktProduct 00069 }; 00070 00072 struct AccountId { 00073 long id; 00074 }; 00075 00077 struct UnitId { 00078 long id; 00079 }; 00080 00082 struct ChargeTraitsId { 00083 long id; 00084 }; 00085 00087 struct CurrencyCode { 00088 Utf8String id; 00089 }; 00090 00092 struct RoundRuleId { 00093 long id; 00094 }; 00095 00097 struct TaxKeyId { 00098 long id; 00099 }; 00100 00102 struct Unit { 00104 UnitId id; 00105 00107 Utf8String name; 00108 }; 00109 00111 struct Account { 00113 AccountId id; 00114 00116 Utf8String accCode; 00117 00119 AccountType accType; 00120 }; 00121 00123 struct Currency { 00125 CurrencyCode code; 00126 00128 Utf8String baseName; 00129 00131 Utf8String fractionName; 00132 00134 Utf8String baseSymbol; 00135 00137 Utf8String fractionSymbol; 00138 }; 00139 00144 struct RoundUpDown { 00152 double threshold; 00153 00155 double gridSpace; 00156 }; 00157 00159 struct RoundRule { 00161 RoundRuleId id; 00162 00164 Utf8String name; 00165 00167 Utf8String desc; 00168 00170 RoundRuleType type; 00171 00177 RoundUpDown roundValue; 00178 }; 00179 00181 struct TaxKey { 00183 TaxKeyId id; 00184 00186 Utf8String name; 00187 00189 TaxKeyType tkType; 00190 00192 boolean wildCard; 00193 }; 00194 00196 struct Money { 00198 CurrencyCode currency; 00199 00201 double amount; 00202 }; 00203 00205 struct ChargeTraits { 00207 ChargeTraitsId id; 00208 00210 CurrencyCode currency; 00211 00213 RoundRuleId rrId; 00214 00216 Utf8String accCode; 00217 00219 Utf8String numberFormat; 00220 00222 TaxKeyId tkId; 00223 00225 ChargeType cType; 00226 }; 00227 00229 typedef sequence<Unit> UnitSeq; 00230 00232 typedef sequence<ChargeTraits> ChargeTraitsSeq; 00233 00235 typedef sequence<RoundRule> RoundRuleSeq; 00236 00238 typedef sequence<TaxKey> TaxKeySeq; 00239 00241 typedef sequence<Account> AccountSeq; 00242 00244 typedef sequence<Currency> CurrencySeq; 00245 00250 struct CurrencyBook { 00252 CurrencySeq currSeq; 00253 00255 CurrencyCode baseCurrency; 00256 }; 00257 00267 interface Accounting { 00278 ChargeTraits getChargeTraits(in ChargeTraitsId id) 00279 raises (OsbCorbaException); 00280 00282 ChargeTraitsSeq getChargeTraitses() 00283 raises (OsbCorbaException); 00284 00294 Account getAccount(in Utf8String accCode) 00295 raises (OsbCorbaException); 00296 00298 AccountSeq getAccounts() 00299 raises (OsbCorbaException); 00300 00310 Currency getCurrency(in CurrencyCode code) 00311 raises (OsbCorbaException); 00312 00314 CurrencyBook getCurrencyBook() 00315 raises (OsbCorbaException); 00316 00324 RoundRuleId getRoundRuleByName( 00325 in Utf8String name 00326 ) raises (OsbCorbaException); 00327 00337 RoundRule getRoundRule(in RoundRuleId id) 00338 raises (OsbCorbaException); 00339 00341 RoundRuleSeq getRoundRules() 00342 raises (OsbCorbaException); 00343 00351 TaxKeyId getTaxKeyByName( 00352 in Utf8String name 00353 ) raises (OsbCorbaException); 00354 00364 TaxKey getTaxKey(in TaxKeyId id 00365 ) raises (OsbCorbaException); 00366 00368 TaxKeySeq getTaxKeys() 00369 raises (OsbCorbaException); 00370 00372 TaxKeySeq getAssocTaxKeys() 00373 raises (OsbCorbaException); 00374 00376 TaxKeySeq getContractTaxKeys() 00377 raises (OsbCorbaException); 00378 00380 corba::common::TaxKeySeq getProductTaxKeys() 00381 raises (corba::common::OsbCorbaException); 00382 00390 UnitId getUnitByName( 00391 in Utf8String name 00392 ) raises (OsbCorbaException); 00393 00402 Unit getUnit(in UnitId id) 00403 raises (OsbCorbaException); 00404 00406 UnitSeq getUnits() 00407 raises (OsbCorbaException); 00408 00409 }; 00410 }; 00411 }; 00412 #endif // #ifndef _CHARGETRAITS_IDL