00001 // OSB library ********************************************* -*- IDL -*- 00006 /* 00007 AUTHOR(S): Darryl Kang (dk) 00008 00009 RCS information 00010 $Name: OSB_060808 $ 00011 $Revision: 1.23.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 BALANCESHEET_IDL 00031 #define BALANCESHEET_IDL 00032 // ********************************************************************* 00033 #include "cadmin.idl" 00034 #include "chargetraits.idl" 00035 #include "corba_status.idl" 00036 #include "corba_utility.idl" 00037 #include "productpart.idl" 00038 00039 module corba { 00040 module cadmin { 00041 module contract{ 00043 enum BpStatus { 00044 bpUnknown, //<! Unknown status. 00045 bpNormal, //<! Normal state. 00046 bpRerate, //<! Re-rating required. 00047 bpBillingFailed, //<! Billing failed for the page. 00048 bpDontBill //<! Don't bill the balance page. 00049 }; 00050 00052 struct SubTotal { 00054 common::CurrencyCode currency; 00055 00057 double usageCharges; 00058 00060 double otCharges; 00061 00063 double advCharges; 00064 }; 00065 00066 typedef sequence<SubTotal> BsTotal; 00067 00083 struct AdvanceCharge { 00085 AdvId id; 00086 00088 double amount; 00089 00091 common::ChargeTraitsId ctId; 00092 00094 cadmin::PersProdId persId; 00095 00097 pcat::pp::ProductPartId ppId; 00098 00100 common::Date periodStart; 00101 00103 common::Date periodEnd; 00104 00106 common::DateTime assigned; 00107 00109 common::Utf8String remark; 00110 }; 00111 00118 struct OnetimeCharge { 00120 OtcId id; 00121 00123 StatusChange sc; 00124 00126 cadmin::PersProdId persId; 00127 00129 pcat::pp::ProductPartId ppId; 00130 00132 common::Money charge; 00133 00135 common::ChargeTraitsId ctId; 00136 00138 common::DateTime assigned; 00139 00141 common::Utf8String remark; 00142 }; 00143 00145 struct UsageCharge { 00147 common::CurrencyCode currency; 00148 00150 double amount; 00151 }; 00152 00161 typedef sequence<UsageCharge> UsageChargeSeq; 00162 00164 typedef sequence<OnetimeCharge> OnetimeChargeSeq; 00165 00167 typedef sequence<AdvanceCharge> AdvanceChargeSeq; 00168 00172 interface BsPageWriter { 00174 readonly attribute BsPageId id; 00175 00177 BpStatus status() 00178 raises (common::OsbCorbaException); 00179 00181 void setRerate( 00182 in boolean noWait 00183 ) raises (common::OsbCorbaException); 00184 00186 void setDontBill( 00187 in boolean noWait 00188 ) raises (common::OsbCorbaException); 00189 00191 void setNormal( 00192 in boolean noWait 00193 ) raises (common::OsbCorbaException); 00194 00196 common::Date startDate() 00197 raises (common::OsbCorbaException); 00198 00200 common::Date endDate() 00201 raises (common::OsbCorbaException); 00202 00204 common::DateTime opened() 00205 raises (common::OsbCorbaException); 00206 00208 common::DateTime closed() 00209 raises (common::OsbCorbaException); 00210 00212 common::DateTime lastCharged() 00213 raises (common::OsbCorbaException); 00214 00216 BsTotal charges() 00217 raises (common::OsbCorbaException); 00218 00220 OnetimeCharge getOnetimeCharge( 00221 in OtcId id, 00222 in boolean noWait 00223 ) raises (common::OsbCorbaException); 00224 00226 OnetimeChargeSeq getOnetimeCharges( 00227 in boolean noWait 00228 ) raises (common::OsbCorbaException); 00229 00234 OnetimeChargeSeq getOtcOfPersProd( 00235 in cadmin::PersProdId persId, 00236 in boolean noWait 00237 ) raises (common::OsbCorbaException); 00238 00243 OnetimeChargeSeq getOtcOfPersProdNode( 00244 in pcat::pp::ProductPartId ppId, 00245 in boolean noWait 00246 ) raises (common::OsbCorbaException); 00247 00249 readonly attribute AdvanceChargeSeq getAdvanceCharges; 00250 00252 boolean removeOtc( 00253 in OtcId id, 00254 in boolean noWait 00255 ) raises (common::OsbCorbaException); 00256 }; // interface BsPageWriter 00257 00258 interface BalanceSheetWriter { 00260 BsPageWriter getBsPage( 00261 in BsPageId id 00262 ) raises (common::OsbCorbaException); 00263 00265 BsPageSeq getBsPages() 00266 raises (common::OsbCorbaException); 00267 00269 BsTotal totalCharges(); 00270 00272 BsPageId addOtc( 00273 in OnetimeCharge otc, 00274 in boolean noWait 00275 ) raises (common::OsbCorbaException); 00276 00278 readonly attribute boolean hasOtc; 00279 00281 readonly attribute boolean hasAdvCharges; 00282 }; // interface BalanceSheet 00283 }; 00284 }; 00285 }; 00286 #endif // #ifndef BALANCESHEET_IDL