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

chift-oneapi / chift-python-sdk / 10458239059

19 Aug 2024 05:40PM UTC coverage: 98.438% (+0.005%) from 98.433%
10458239059

push

github

matthieuchift
ecommerce: add removed tag on fees

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

2 existing lines in 1 file now uncovered.

3402 of 3456 relevant lines covered (98.44%)

0.98 hits per line

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

99.03
/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
    MatchingIn,
36
    MiscellaneousOperationOut,
37
    ModelsInvoicingVatCode,
38
    OpportunityItem,
39
    OrderItemOut,
40
    OutstandingItem,
41
    PaymentMethodItem,
42
    PaymentMethods,
43
    PMSAccountingCategoryItem,
44
    PMSClosureItem,
45
    PMSLocationItem,
46
    PMSOrderItem,
47
    PMSPaymentItem,
48
    PMSPaymentMethods,
49
    POSCustomerItem,
50
    POSLocationItem,
51
    POSOrderItem,
52
    POSPaymentItem,
53
    POSProductItem,
54
    ProductItemOut,
55
    ReadFlowItem,
56
    ReadSyncItem,
57
    SalesItem,
58
    SupplierItemOut,
59
    SyncConsumerItem,
60
    TaxRateItem,
61
    TransactionItemOut,
62
    VariantItem,
63
    WebhookInstanceGetItem,
64
    WebhookItem,
65
)
66

67
# UNPUBLISHED MODELS
68

69

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

75

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

79

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

85

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

92

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

100

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

105

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

110

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

114

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

118

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

122

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

127

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

134

135
# consumers
136

137

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

217

218
# syncs
219

220

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

224

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

228

229
# flow
230

231

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

235

236
# datastores
237

238

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

242

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

246

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

250

251
# webhook
252

253

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

257

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

261

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

266

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

270

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

275

276
# invoicing
277

278

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

282

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

286

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

290

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

294

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

298

299
# accounting
300
class AnalyticPlan(AnalyticPlanItem):
1✔
301
    pass
1✔
302

303

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

307

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

311

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

315

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

319

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

323

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

327

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

331

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

335

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

339

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

343

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

347

348
class Matching(MatchingIn):
1✔
349
    pass
1✔
350

351

352
# log
353
class Log(ConsumerLog):
1✔
354
    pass
1✔
355

356

357
# pos
358
class Customer(POSCustomerItem):
1✔
359
    pass
1✔
360

361

362
class PaymentMethods(PaymentMethods):
1✔
363
    pass
1✔
364

365

366
class Sales(SalesItem):
1✔
367
    pass
1✔
368

369

370
class Payment(POSPaymentItem):
1✔
371
    pass
1✔
372

373

374
class Location(POSLocationItem):
1✔
375
    pass
1✔
376

377

378
class Order(POSOrderItem):
1✔
379
    pass
1✔
380

381

382
class Closure(ClosureItem):
1✔
383
    pass
1✔
384

385

386
class POSProductCategory(AppRoutersPosProductCategoryItem):
1✔
387
    pass
1✔
388

389

390
class POSAccountingCategory(AccountingCategoryItem):
1✔
391
    pass
1✔
392

393

394
class POSProduct(POSProductItem):
1✔
395
    pass
1✔
396

397

398
# pms
399

400

401
class PMSPaymentMethods(PMSPaymentMethods):
1✔
402
    pass
1✔
403

404

405
class PMSPayment(PMSPaymentItem):
1✔
406
    pass
1✔
407

408

409
class PMSLocation(PMSLocationItem):
1✔
410
    pass
1✔
411

412

413
class PMSOrder(PMSOrderItem):
1✔
414
    pass
1✔
415

416

417
class PMSClosure(PMSClosureItem):
1✔
418
    pass
1✔
419

420

421
class PMSAccountingCategory(PMSAccountingCategoryItem):
1✔
422
    pass
1✔
423

424

425
# e-commerce
426
class CommerceCustomer(CommerceCustomerItem):
1✔
427
    pass
1✔
428

429

430
class CommerceProduct(AppRoutersCommerceProductItem):
1✔
431
    pass
1✔
432

433

434
class CommerceLocation(CommerceLocationItemOut):
1✔
435
    pass
1✔
436

437

438
class CommerceOrder(OrderItemOut):
1✔
439
    pass
1✔
440

441

442
class CommerceVariant(VariantItem):
1✔
443
    pass
1✔
444

445

446
class CommercePaymentMethod(PaymentMethodItem):
1✔
447
    pass
1✔
448

449

450
class CommerceProductCategory(CategoryItem):
1✔
451
    pass
1✔
452

453

454
class CommerceCountry(CountryItem):
1✔
455
    pass
1✔
456

457

458
class CommerceTax(TaxRateItem):
1✔
459
    pass
1✔
460

461

462
# payment
463

464

465
class PaymentTransaction(TransactionItemOut):
1✔
466
    pass
1✔
467

468

469
class PaymentBalance(BalanceItemOut):
1✔
470
    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