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

chift-oneapi / chift-python-sdk / 9198883380

22 May 2024 09:54PM UTC coverage: 98.49% (-0.01%) from 98.5%
9198883380

push

github

hhertoghe
[FIX] missing PMS

1 of 1 new or added line in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

3326 of 3377 relevant lines covered (98.49%)

0.98 hits per line

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

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

5
from pydantic import BaseModel, Extra
1✔
6

7
from .openapi import (
1✔
8
    AccountingCategoryItem,
9
    AccountItem,
10
    AnalyticAccountItemOutMultiAnalyticPlans,
11
    AnalyticPlanItem,
12
    AppRoutersAccountingVatCode,
13
    AppRoutersCommerceProductItem,
14
    AppRoutersConnectionsConnectionItem,
15
    AppRoutersPosProductCategoryItem,
16
    BalanceItemOut,
17
    CategoryItem,
18
    ClientItemOut,
19
    ClosureItem,
20
    CommerceCustomerItem,
21
    CommerceLocationItemOut,
22
    ConsumerItem,
23
    ContactItemOut,
24
    CountryItem,
25
    DataItem,
26
    DataItemOut,
27
    DataStoreItem,
28
    FinancialEntryItemOut,
29
    IntegrationItem,
30
    InvoiceItemOutMonoAnalyticPlan,
31
    InvoiceItemOutSingle,
32
    Journal,
33
    JournalEntryMultiAnalyticPlan,
34
    LinkItem,
35
    MiscellaneousOperationOut,
36
    ModelsInvoicingVatCode,
37
    OpportunityItem,
38
    OrderItemOut,
39
    OutstandingItem,
40
    PaymentMethodItem,
41
    PaymentMethods,
42
    PMSAccountingCategoryItem,
43
    PMSClosureItem,
44
    PMSLocationItem,
45
    PMSOrderItem,
46
    PMSPaymentItem,
47
    PMSPaymentMethods,
48
    POSCustomerItem,
49
    POSLocationItem,
50
    POSOrderItem,
51
    POSPaymentItem,
52
    POSProductItem,
53
    ProductItemOut,
54
    ReadFlowItem,
55
    ReadSyncItem,
56
    SalesItem,
57
    SupplierItemOut,
58
    SyncConsumerItem,
59
    TaxRateItem,
60
    TransactionItemOut,
61
    VariantItem,
62
    WebhookInstanceGetItem,
63
    WebhookItem,
64
)
65

66
# UNPUBLISHED MODELS
67

68

69
class DatastoreColumn(BaseModel):
1✔
70
    name: str
1✔
71
    title: str
1✔
72
    type: str
1✔
73

74

75
class DatastoreDef(BaseModel):
1✔
76
    columns: List[DatastoreColumn]
1✔
77

78

79
class Datastore(BaseModel):
1✔
80
    id: Optional[str] = None
1✔
81
    name: str
1✔
82
    definition: DatastoreDef
1✔
83

84

85
class LogType(str, Enum):
1✔
86
    INFO = "INFO"
1✔
87
    ERROR = "ERROR"
1✔
88
    WARNING = "WARNING"
1✔
89
    DEBUG = "DEBUG"
1✔
90

91

92
class ConsumerLog(BaseModel):
1✔
93
    logid: str
1✔
94
    type: LogType
1✔
95
    message: str
1✔
96
    when: datetime.datetime
1✔
97
    context: Optional[dict] = None
1✔
98

99

100
class ExecutionType(str, Enum):
1✔
101
    CODE = "code"
1✔
102
    CHAIN = "chain"
1✔
103

104

105
class TriggerType(str, Enum):
1✔
106
    TIMER = "timer"
1✔
107
    EVENT = "event"
1✔
108

109

110
class FlowExecutionCode(BaseModel):
1✔
111
    code: str
1✔
112

113

114
class FlowExecutionChain(BaseModel):
1✔
115
    id: str
1✔
116

117

118
class FlowTriggerTimer(BaseModel):
1✔
119
    cronschedule: str = "*/5 * * * *"
1✔
120

121

122
class FlowTrigger(BaseModel):
1✔
123
    type: TriggerType
1✔
124
    data: Optional[FlowTriggerTimer]
1✔
125

126

127
class FlowConfig(BaseModel):
1✔
128
    definitionFields: Optional[List[dict]]
1✔
129
    doorkeyFields: Optional[List[dict]]
1✔
130
    customFields: Optional[List[dict]]
1✔
131
    datastores: Optional[List[Datastore]] = []
1✔
132

133

134
# consumers
135

136

137
class Consumer(ConsumerItem, extra=Extra.allow):
1✔
138
    connectionid: str = None
1✔
139

140
    @property
1✔
141
    def invoicing(self):
1✔
142
        from chift.models.consumers.invoicing import (
1✔
143
            InvoicingRouter,
144
        )  # avoid circular import
145

146
        return InvoicingRouter(self.consumerid, self.connectionid)
1✔
147

148
    @property
1✔
149
    def accounting(self):
1✔
150
        from chift.models.consumers.accounting import (
1✔
151
            AccountingRouter,
152
        )  # avoid circular import
153

154
        return AccountingRouter(self.consumerid, self.connectionid)
1✔
155

156
    @property
1✔
157
    def pos(self):
1✔
158
        from chift.models.consumers.pos import PosRouter  # avoid circular import
1✔
159

160
        return PosRouter(self.consumerid, self.connectionid)
1✔
161

162
    @property
1✔
163
    def pms(self):
1✔
UNCOV
164
        from chift.models.consumers.pms import PmsRouter  # avoid circular import
×
165

UNCOV
166
        return PmsRouter(self.consumerid, self.connectionid)
×
167

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

174
        return CommerceRouter(self.consumerid, self.connectionid)
1✔
175

176
    @property
1✔
177
    def payment(self):
1✔
178
        from chift.models.consumers.payment import (
1✔
179
            PaymentRouter,
180
        )  # avoid circular import
181

182
        return PaymentRouter(self.consumerid, self.connectionid)
1✔
183

184
    @property
1✔
185
    def custom(self):
1✔
186
        from chift.models.consumers.custom import CustomRouter  # avoid circular import
1✔
187

188
        return CustomRouter(self.consumerid, self.connectionid)
1✔
189

190
    @property
1✔
191
    def Connection(self):
1✔
192
        from chift.models.consumers.connection import (
1✔
193
            Connection,
194
        )  # avoid circular import
195

196
        return Connection(self.consumerid, self.connectionid)
1✔
197

198
    @property
1✔
199
    def Data(self):
1✔
200
        from chift.models.consumers.data import Data  # avoid circular import
1✔
201

202
        return Data(self.consumerid, self.connectionid)
1✔
203

204
    @property
1✔
205
    def Sync(self):
1✔
206
        from chift.models.consumers.sync import Sync  # avoid circular import
1✔
207

208
        return Sync(self.consumerid, self.connectionid)
1✔
209

210
    @property
1✔
211
    def Log(self):
1✔
212
        from chift.models.consumers.log import Log  # avoid circular import
1✔
213

214
        return Log(self.consumerid, self.connectionid)
1✔
215

216

217
# syncs
218

219

220
class Sync(ReadSyncItem):
1✔
221
    pass
1✔
222

223

224
class SyncConsumer(SyncConsumerItem):
1✔
225
    pass
1✔
226

227

228
# flow
229

230

231
class Flow(ReadFlowItem):
1✔
232
    pass
1✔
233

234

235
# datastores
236

237

238
class Datastore(DataStoreItem):
1✔
239
    pass
1✔
240

241

242
class DataIn(DataItem):
1✔
243
    pass
1✔
244

245

246
class Data(DataItemOut):
1✔
247
    id: Optional[str] = None
1✔
248

249

250
# webhook
251

252

253
class WebhookInstance(WebhookInstanceGetItem):
1✔
254
    pass
1✔
255

256

257
class WebhookType(WebhookItem):
1✔
258
    pass
1✔
259

260

261
# connections
262
class Connection(AppRoutersConnectionsConnectionItem):
1✔
263
    pass
1✔
264

265

266
class ConnectionLink(LinkItem):
1✔
267
    pass
1✔
268

269

270
# integrations
271
class Integration(IntegrationItem):
1✔
272
    pass
1✔
273

274

275
# invoicing
276

277

278
class Invoice(InvoiceItemOutSingle):
1✔
279
    pass
1✔
280

281

282
class Contact(ContactItemOut):
1✔
283
    pass
1✔
284

285

286
class Product(ProductItemOut):
1✔
287
    pass
1✔
288

289

290
class Opportunity(OpportunityItem):
1✔
291
    pass
1✔
292

293

294
class Tax(ModelsInvoicingVatCode):
1✔
295
    pass
1✔
296

297

298
# accouting
299
class AnalyticPlan(AnalyticPlanItem):
1✔
300
    pass
1✔
301

302

303
class AnalyticAccountMultiPlan(AnalyticAccountItemOutMultiAnalyticPlans):
1✔
304
    pass
1✔
305

306

307
class TaxAccounting(AppRoutersAccountingVatCode):
1✔
308
    pass
1✔
309

310

311
class MiscellaneousOperation(MiscellaneousOperationOut):
1✔
312
    pass
1✔
313

314

315
class Account(AccountItem):
1✔
316
    pass
1✔
317

318

319
class Supplier(SupplierItemOut):
1✔
320
    pass
1✔
321

322

323
class Client(ClientItemOut):
1✔
324
    pass
1✔
325

326

327
class InvoiceAccounting(InvoiceItemOutMonoAnalyticPlan):
1✔
328
    pass
1✔
329

330

331
class JournalEntry(JournalEntryMultiAnalyticPlan):
1✔
332
    pass
1✔
333

334

335
class FinancialEntry(FinancialEntryItemOut):
1✔
336
    pass
1✔
337

338

339
class Outstanding(OutstandingItem):
1✔
340
    pass
1✔
341

342

343
class Journal(Journal):
1✔
344
    pass
1✔
345

346

347
# log
348
class Log(ConsumerLog):
1✔
349
    pass
1✔
350

351

352
# pos
353
class Customer(POSCustomerItem):
1✔
354
    pass
1✔
355

356

357
class PaymentMethods(PaymentMethods):
1✔
358
    pass
1✔
359

360

361
class Sales(SalesItem):
1✔
362
    pass
1✔
363

364

365
class Payment(POSPaymentItem):
1✔
366
    pass
1✔
367

368

369
class Location(POSLocationItem):
1✔
370
    pass
1✔
371

372

373
class Order(POSOrderItem):
1✔
374
    pass
1✔
375

376

377
class Closure(ClosureItem):
1✔
378
    pass
1✔
379

380

381
class POSProductCategory(AppRoutersPosProductCategoryItem):
1✔
382
    pass
1✔
383

384

385
class POSAccountingCategory(AccountingCategoryItem):
1✔
386
    pass
1✔
387

388

389
class POSProduct(POSProductItem):
1✔
390
    pass
1✔
391

392

393
# pms
394

395

396
class PMSPaymentMethods(PMSPaymentMethods):
1✔
397
    pass
1✔
398

399

400
class PMSPayment(PMSPaymentItem):
1✔
401
    pass
1✔
402

403

404
class PMSLocation(PMSLocationItem):
1✔
405
    pass
1✔
406

407

408
class PMSOrder(PMSOrderItem):
1✔
409
    pass
1✔
410

411

412
class PMSClosure(PMSClosureItem):
1✔
413
    pass
1✔
414

415

416
class PMSAccountingCategory(PMSAccountingCategoryItem):
1✔
417
    pass
1✔
418

419

420
# e-commerce
421
class CommerceCustomer(CommerceCustomerItem):
1✔
422
    pass
1✔
423

424

425
class CommerceProduct(AppRoutersCommerceProductItem):
1✔
426
    pass
1✔
427

428

429
class CommerceLocation(CommerceLocationItemOut):
1✔
430
    pass
1✔
431

432

433
class CommerceOrder(OrderItemOut):
1✔
434
    pass
1✔
435

436

437
class CommerceVariant(VariantItem):
1✔
438
    pass
1✔
439

440

441
class CommercePaymentMethod(PaymentMethodItem):
1✔
442
    pass
1✔
443

444

445
class CommerceProductCategory(CategoryItem):
1✔
446
    pass
1✔
447

448

449
class CommerceCountry(CountryItem):
1✔
450
    pass
1✔
451

452

453
class CommerceTax(TaxRateItem):
1✔
454
    pass
1✔
455

456

457
# payment
458

459

460
class PaymentTransaction(TransactionItemOut):
1✔
461
    pass
1✔
462

463

464
class PaymentBalance(BalanceItemOut):
1✔
465
    pass
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