• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

chift-oneapi / chift-python-sdk / 17119913421

21 Aug 2025 07:16AM UTC coverage: 94.156% (+0.03%) from 94.129%
17119913421

Pull #56

github

web-flow
Merge ffdd89d58 into ec79e6ac4
Pull Request #56: feat(accounting): Add AnalyticMultiPlan routes and testing + cleaning

78 of 81 new or added lines in 5 files covered. (96.3%)

16 existing lines in 2 files now uncovered.

4141 of 4398 relevant lines covered (94.16%)

0.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.82
/chift/openapi/models.py
1
import datetime
1✔
2
from enum import Enum
1✔
3
from typing import Generic, List, Optional, TypeVar
1✔
4

5
from pydantic import BaseModel, ConfigDict
1✔
6

7
from .openapi import (
1✔
8
    AccountBalance as AccountBalanceModel,
9
    AccountingCategoryItem,
10
    AccountingVatCode,
11
    AccountItem,
12
    AnalyticAccountItemOutMultiAnalyticPlans,
13
    AnalyticPlanItem,
14
    AttachmentItemOut,
15
    BackboneApiAppRoutersConnectionsConnectionItem,
16
    BackboneCommonModelsPosCommonProductCategoryItem,
17
    BalanceItemOut,
18
    BankAccountItemOut,
19
    CategoryItem,
20
    ClientItemOut,
21
    ClosureItem,
22
    CommerceCustomerItem,
23
    CommerceLocationItemOut,
24
    ConsumerItem,
25
    ContactItemOut,
26
    CountryItem,
27
    DataItem,
28
    DataItemOut,
29
    DataStoreItem,
30
    EmployeeItem,
31
    FinancialEntryItemOut,
32
    IntegrationItem,
33
    InvoiceItemOutMonoAnalyticPlan,
34
    InvoiceItemOutMultiAnalyticPlans,
35
    InvoiceItemOutSingle,
36
    InvoicingPaymentItem,
37
    InvoicingPaymentMethodItem,
38
    InvoicingVatCode,
39
    Journal as JournalModel,
40
    JournalEntryMultiAnalyticPlan,
41
    LinkItem,
42
    MatchingOut,
43
    MiscellaneousOperationOut,
44
    MultipleMatchingOut,
45
    OpportunityItem,
46
    OrderItemOut,
47
    OutstandingItem,
48
    Payment as PaymentModel,
49
    PaymentItemOut,
50
    PaymentMethodItem,
51
    PaymentMethods as PaymentMethodsModel,
52
    PMSAccountingCategoryItem,
53
    PMSClosureItem,
54
    PMSCustomerItem,
55
    PMSInvoiceFullItem,
56
    PMSLocationItem,
57
    PMSOrderItem,
58
    PMSPaymentItem,
59
    PMSPaymentMethods as PMSPaymentMethodsModel,
60
    PMSTaxRateItem,
61
    POSCustomerItem,
62
    POSLocationItem,
63
    POSOrderItem,
64
    POSPaymentItem,
65
    POSProductItem,
66
    ProductItemOut,
67
    ProductItemOutput,
68
    ReadFlowItem,
69
    ReadSyncItem,
70
    RefundItemOut,
71
    SalesItem,
72
    SupplierItemOut,
73
    SyncConsumerItem,
74
    TaxRateItem,
75
    TransactionItemOut,
76
    VariantItem,
77
    WebhookInstanceGetItem,
78
    WebhookItem,
79
)
80

81
VarModel = TypeVar("VarModel", bound=BaseModel)
1✔
82

83
# UNPUBLISHED MODELS
84

85

86
class DatastoreColumn(BaseModel):
1✔
87
    name: str
1✔
88
    title: str
1✔
89
    type: str
1✔
90

91

92
class DatastoreDef(BaseModel):
1✔
93
    columns: List[DatastoreColumn]
1✔
94

95

96
class DatastoreModel(BaseModel):
1✔
97
    id: Optional[str] = None
1✔
98
    name: str
1✔
99
    definition: DatastoreDef
1✔
100

101

102
class LogType(str, Enum):
1✔
103
    INFO = "INFO"
1✔
104
    ERROR = "ERROR"
1✔
105
    WARNING = "WARNING"
1✔
106
    DEBUG = "DEBUG"
1✔
107

108

109
class ConsumerLog(BaseModel):
1✔
110
    logid: str
1✔
111
    type: LogType
1✔
112
    message: str
1✔
113
    when: datetime.datetime
1✔
114
    context: Optional[dict] = None
1✔
115

116
    model_config = ConfigDict(coerce_numbers_to_str=True)
1✔
117

118

119
class ExecutionType(str, Enum):
1✔
120
    CODE = "code"
1✔
121
    CHAIN = "chain"
1✔
122

123

124
class TriggerType(str, Enum):
1✔
125
    TIMER = "timer"
1✔
126
    EVENT = "event"
1✔
127

128

129
class FlowExecutionCode(BaseModel):
1✔
130
    code: str
1✔
131

132

133
class FlowExecutionChain(BaseModel):
1✔
134
    id: str
1✔
135

136

137
class FlowTriggerTimer(BaseModel):
1✔
138
    cronschedule: str = "*/5 * * * *"
1✔
139

140

141
class FlowTrigger(BaseModel):
1✔
142
    type: TriggerType
1✔
143
    data: Optional[FlowTriggerTimer] = None
1✔
144

145

146
class FlowConfig(BaseModel):
1✔
147
    definitionFields: Optional[List[dict]] = None
1✔
148
    doorkeyFields: Optional[List[dict]] = None
1✔
149
    customFields: Optional[List[dict]] = None
1✔
150
    datastores: Optional[List[DatastoreModel]] = []
1✔
151

152

153
# consumers
154

155

156
class Consumer(ConsumerItem, extra="allow"):
1✔
157
    connectionid: Optional[str] = None
1✔
158

159
    @property
1✔
160
    def invoicing(self):
1✔
161
        from chift.models.consumers.invoicing import (
1✔
162
            InvoicingRouter,
163
        )  # avoid circular import
164

165
        return InvoicingRouter(self.consumerid, self.connectionid)
1✔
166

167
    @property
1✔
168
    def accounting(self):
1✔
169
        from chift.models.consumers.accounting import (
1✔
170
            AccountingRouter,
171
        )  # avoid circular import
172

173
        return AccountingRouter(self.consumerid, self.connectionid)
1✔
174

175
    @property
1✔
176
    def pos(self):
1✔
177
        from chift.models.consumers.pos import PosRouter  # avoid circular import
1✔
178

179
        return PosRouter(self.consumerid, self.connectionid)
1✔
180

181
    @property
1✔
182
    def pms(self):
1✔
UNCOV
183
        from chift.models.consumers.pms import PmsRouter  # avoid circular import
×
184

UNCOV
185
        return PmsRouter(self.consumerid, self.connectionid)
×
186

187
    @property
1✔
188
    def commerce(self):
1✔
189
        from chift.models.consumers.commerce import (
1✔
190
            CommerceRouter,
191
        )  # avoid circular import
192

193
        return CommerceRouter(self.consumerid, self.connectionid)
1✔
194

195
    @property
1✔
196
    def payment(self):
1✔
197
        from chift.models.consumers.payment import (
1✔
198
            PaymentRouter,
199
        )  # avoid circular import
200

201
        return PaymentRouter(self.consumerid, self.connectionid)
1✔
202

203
    @property
1✔
204
    def custom(self):
1✔
UNCOV
205
        from chift.models.consumers.custom import CustomRouter  # avoid circular import
×
206

UNCOV
207
        return CustomRouter(self.consumerid, self.connectionid)
×
208

209
    @property
1✔
210
    def Connection(self):
1✔
UNCOV
211
        from chift.models.consumers.connection import (
×
212
            Connection,
213
        )  # avoid circular import
214

UNCOV
215
        return Connection(self.consumerid, self.connectionid)
×
216

217
    @property
1✔
218
    def Data(self):
1✔
UNCOV
219
        from chift.models.consumers.data import Data  # avoid circular import
×
220

UNCOV
221
        return Data(self.consumerid, self.connectionid)
×
222

223
    @property
1✔
224
    def Sync(self):
1✔
UNCOV
225
        from chift.models.consumers.sync import Sync  # avoid circular import
×
226

UNCOV
227
        return Sync(self.consumerid, self.connectionid)
×
228

229
    @property
1✔
230
    def Log(self):
1✔
231
        from chift.models.consumers.log import Log  # avoid circular import
1✔
232

233
        return Log(self.consumerid, self.connectionid)
1✔
234

235

236
# syncs
237

238

239
class Sync(ReadSyncItem):
1✔
240
    pass
1✔
241

242

243
class SyncConsumer(SyncConsumerItem):
1✔
244
    pass
1✔
245

246

247
# flow
248

249

250
class Flow(ReadFlowItem):
1✔
251
    pass
1✔
252

253

254
# datastores
255

256

257
class Datastore(DataStoreItem):
1✔
258
    pass
1✔
259

260

261
class DataIn(DataItem):
1✔
262
    pass
1✔
263

264

265
class Data(DataItemOut):
1✔
266
    id: Optional[str] = None
1✔
267

268

269
# webhook
270

271

272
class WebhookInstance(WebhookInstanceGetItem):
1✔
273
    pass
1✔
274

275

276
class WebhookType(WebhookItem):
1✔
277
    pass
1✔
278

279

280
# connections
281
class Connection(BackboneApiAppRoutersConnectionsConnectionItem):
1✔
282
    pass
1✔
283

284

285
class ConnectionLink(LinkItem):
1✔
286
    pass
1✔
287

288

289
# integrations
290
class Integration(IntegrationItem):
1✔
291
    pass
1✔
292

293

294
# invoicing
295

296

297
class Invoice(InvoiceItemOutSingle):
1✔
298
    pass
1✔
299

300

301
class Contact(ContactItemOut):
1✔
302
    pass
1✔
303

304

305
class Product(ProductItemOut):
1✔
306
    pass
1✔
307

308

309
class Opportunity(OpportunityItem):
1✔
310
    pass
1✔
311

312

313
class Tax(InvoicingVatCode):
1✔
314
    pass
1✔
315

316

317
class InvoicingPayment(InvoicingPaymentItem):
1✔
318
    pass
1✔
319

320

321
class InvoicingPaymentMethod(InvoicingPaymentMethodItem):
1✔
322
    pass
1✔
323

324

325
# accounting
326
class AnalyticPlan(AnalyticPlanItem):
1✔
327
    pass
1✔
328

329

330
class AnalyticAccountMultiPlan(AnalyticAccountItemOutMultiAnalyticPlans):
1✔
331
    pass
1✔
332

333

334
class TaxAccounting(AccountingVatCode):
1✔
335
    pass
1✔
336

337

338
class MiscellaneousOperation(MiscellaneousOperationOut):
1✔
339
    pass
1✔
340

341

342
class Account(AccountItem):
1✔
343
    pass
1✔
344

345

346
class Supplier(SupplierItemOut):
1✔
347
    pass
1✔
348

349

350
class Client(ClientItemOut):
1✔
351
    pass
1✔
352

353

354
class Employee(EmployeeItem):
1✔
355
    pass
1✔
356

357

358
class InvoiceAccounting(InvoiceItemOutMonoAnalyticPlan):
1✔
359
    pass
1✔
360

361

362
class InvoiceMultiPlanAccounting(InvoiceItemOutMultiAnalyticPlans):
1✔
363
    pass
1✔
364

365

366
class JournalEntry(JournalEntryMultiAnalyticPlan):
1✔
367
    pass
1✔
368

369

370
class FinancialEntry(FinancialEntryItemOut):
1✔
371
    pass
1✔
372

373

374
class Outstanding(OutstandingItem):
1✔
375
    pass
1✔
376

377

378
class Journal(JournalModel):
1✔
379
    pass
1✔
380

381

382
class Matching(MatchingOut):
1✔
383
    pass
1✔
384

385

386
class MultipleMatching(MultipleMatchingOut):
1✔
387
    pass
1✔
388

389

390
class Attachment(AttachmentItemOut):
1✔
391
    pass
1✔
392

393

394
class BankAccount(BankAccountItemOut):
1✔
395
    pass
1✔
396

397

398
class AccountBalance(AccountBalanceModel):
1✔
399
    pass
1✔
400

401

402
class AccountingPayment(PaymentModel):
1✔
403
    pass
1✔
404

405

406
# log
407
class Log(ConsumerLog):
1✔
408
    pass
1✔
409

410

411
# pos
412
class Customer(POSCustomerItem):
1✔
413
    pass
1✔
414

415

416
class PaymentMethods(PaymentMethodsModel):
1✔
417
    pass
1✔
418

419

420
class Sales(SalesItem):
1✔
421
    pass
1✔
422

423

424
class Payment(POSPaymentItem):
1✔
425
    pass
1✔
426

427

428
class Location(POSLocationItem):
1✔
429
    pass
1✔
430

431

432
class Order(POSOrderItem):
1✔
433
    pass
1✔
434

435

436
class Closure(ClosureItem):
1✔
437
    pass
1✔
438

439

440
class POSProductCategory(BackboneCommonModelsPosCommonProductCategoryItem):
1✔
441
    pass
1✔
442

443

444
class POSAccountingCategory(AccountingCategoryItem):
1✔
445
    pass
1✔
446

447

448
class POSProduct(POSProductItem):
1✔
449
    pass
1✔
450

451

452
# pms
453

454

455
class PMSPaymentMethods(PMSPaymentMethodsModel):
1✔
456
    pass
1✔
457

458

459
class PMSPayment(PMSPaymentItem):
1✔
460
    pass
1✔
461

462

463
class PMSLocation(PMSLocationItem):
1✔
464
    pass
1✔
465

466

467
class PMSOrder(PMSOrderItem):
1✔
468
    pass
1✔
469

470

471
class PMSClosure(PMSClosureItem):
1✔
472
    pass
1✔
473

474

475
class PMSAccountingCategory(PMSAccountingCategoryItem):
1✔
476
    pass
1✔
477

478

479
class PMSInvoiceFull(PMSInvoiceFullItem):
1✔
480
    pass
1✔
481

482

483
class PMSCustomer(PMSCustomerItem):
1✔
484
    pass
1✔
485

486

487
class PMSTax(PMSTaxRateItem):
1✔
488
    pass
1✔
489

490

491
# e-commerce
492
class CommerceCustomer(CommerceCustomerItem):
1✔
493
    pass
1✔
494

495

496
class CommerceProduct(ProductItemOutput):
1✔
497
    pass
1✔
498

499

500
class CommerceLocation(CommerceLocationItemOut):
1✔
501
    pass
1✔
502

503

504
class CommerceOrder(OrderItemOut):
1✔
505
    pass
1✔
506

507

508
class CommerceVariant(VariantItem):
1✔
509
    pass
1✔
510

511

512
class CommercePaymentMethod(PaymentMethodItem):
1✔
513
    pass
1✔
514

515

516
class CommerceProductCategory(CategoryItem):
1✔
517
    pass
1✔
518

519

520
class CommerceCountry(CountryItem):
1✔
521
    pass
1✔
522

523

524
class CommerceTax(TaxRateItem):
1✔
525
    pass
1✔
526

527

528
# payment
529

530

531
class PaymentTransaction(TransactionItemOut):
1✔
532
    pass
1✔
533

534

535
class PaymentBalance(BalanceItemOut):
1✔
536
    pass
1✔
537

538

539
class PaymentPayment(PaymentItemOut):
1✔
540
    pass
1✔
541

542

543
class PaymentRefund(RefundItemOut):
1✔
544
    pass
1✔
545

546

547
class ObjectWithRawData(BaseModel, Generic[VarModel]):
1✔
548
    chift_data: VarModel
1✔
549
    raw_data: dict
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc