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

chift-oneapi / chift-python-sdk / 10928366868

18 Sep 2024 06:53PM UTC coverage: 98.332% (-0.1%) from 98.438%
10928366868

push

github

matthieuchift
fix test refund payments

0 of 4 new or added lines in 1 file covered. (0.0%)

4 existing lines in 2 files now uncovered.

3478 of 3537 relevant lines covered (98.33%)

0.98 hits per line

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

99.06
/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
    BackboneApiAppRoutersAccountingVatCode,
13
    BackboneApiAppRoutersCommerceProductItem,
14
    BackboneApiAppRoutersConnectionsConnectionItem,
15
    BackboneApiAppRoutersPosProductCategoryItem,
16
    BackboneCommonModelsInvoicingVatCode,
17
    BalanceItemOut,
18
    CategoryItem,
19
    ClientItemOut,
20
    ClosureItem,
21
    CommerceCustomerItem,
22
    CommerceLocationItemOut,
23
    ConsumerItem,
24
    ContactItemOut,
25
    CountryItem,
26
    DataItem,
27
    DataItemOut,
28
    DataStoreItem,
29
    EmployeeItem,
30
    FinancialEntryItemOut,
31
    IntegrationItem,
32
    InvoiceItemOutMonoAnalyticPlan,
33
    InvoiceItemOutSingle,
34
    Journal,
35
    JournalEntryMultiAnalyticPlan,
36
    LinkItem,
37
    MatchingIn,
38
    MiscellaneousOperationOut,
39
    OpportunityItem,
40
    OrderItemOut,
41
    OutstandingItem,
42
    PaymentItemOut,
43
    PaymentMethodItem,
44
    PaymentMethods,
45
    PMSAccountingCategoryItem,
46
    PMSClosureItem,
47
    PMSLocationItem,
48
    PMSOrderItem,
49
    PMSPaymentItem,
50
    PMSPaymentMethods,
51
    POSCustomerItem,
52
    POSLocationItem,
53
    POSOrderItem,
54
    POSPaymentItem,
55
    POSProductItem,
56
    ProductItemOut,
57
    ReadFlowItem,
58
    ReadSyncItem,
59
    RefundItemOut,
60
    SalesItem,
61
    SupplierItemOut,
62
    SyncConsumerItem,
63
    TaxRateItem,
64
    TransactionItemOut,
65
    VariantItem,
66
    WebhookInstanceGetItem,
67
    WebhookItem,
68
)
69

70
# UNPUBLISHED MODELS
71

72

73
class DatastoreColumn(BaseModel):
1✔
74
    name: str
1✔
75
    title: str
1✔
76
    type: str
1✔
77

78

79
class DatastoreDef(BaseModel):
1✔
80
    columns: List[DatastoreColumn]
1✔
81

82

83
class Datastore(BaseModel):
1✔
84
    id: Optional[str] = None
1✔
85
    name: str
1✔
86
    definition: DatastoreDef
1✔
87

88

89
class LogType(str, Enum):
1✔
90
    INFO = "INFO"
1✔
91
    ERROR = "ERROR"
1✔
92
    WARNING = "WARNING"
1✔
93
    DEBUG = "DEBUG"
1✔
94

95

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

103

104
class ExecutionType(str, Enum):
1✔
105
    CODE = "code"
1✔
106
    CHAIN = "chain"
1✔
107

108

109
class TriggerType(str, Enum):
1✔
110
    TIMER = "timer"
1✔
111
    EVENT = "event"
1✔
112

113

114
class FlowExecutionCode(BaseModel):
1✔
115
    code: str
1✔
116

117

118
class FlowExecutionChain(BaseModel):
1✔
119
    id: str
1✔
120

121

122
class FlowTriggerTimer(BaseModel):
1✔
123
    cronschedule: str = "*/5 * * * *"
1✔
124

125

126
class FlowTrigger(BaseModel):
1✔
127
    type: TriggerType
1✔
128
    data: Optional[FlowTriggerTimer]
1✔
129

130

131
class FlowConfig(BaseModel):
1✔
132
    definitionFields: Optional[List[dict]]
1✔
133
    doorkeyFields: Optional[List[dict]]
1✔
134
    customFields: Optional[List[dict]]
1✔
135
    datastores: Optional[List[Datastore]] = []
1✔
136

137

138
# consumers
139

140

141
class Consumer(ConsumerItem, extra=Extra.allow):
1✔
142
    connectionid: str = None
1✔
143

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

150
        return InvoicingRouter(self.consumerid, self.connectionid)
1✔
151

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

158
        return AccountingRouter(self.consumerid, self.connectionid)
1✔
159

160
    @property
1✔
161
    def pos(self):
1✔
162
        from chift.models.consumers.pos import PosRouter  # avoid circular import
1✔
163

164
        return PosRouter(self.consumerid, self.connectionid)
1✔
165

166
    @property
1✔
167
    def pms(self):
1✔
UNCOV
168
        from chift.models.consumers.pms import PmsRouter  # avoid circular import
×
169

UNCOV
170
        return PmsRouter(self.consumerid, self.connectionid)
×
171

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

178
        return CommerceRouter(self.consumerid, self.connectionid)
1✔
179

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

186
        return PaymentRouter(self.consumerid, self.connectionid)
1✔
187

188
    @property
1✔
189
    def custom(self):
1✔
190
        from chift.models.consumers.custom import CustomRouter  # avoid circular import
1✔
191

192
        return CustomRouter(self.consumerid, self.connectionid)
1✔
193

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

200
        return Connection(self.consumerid, self.connectionid)
1✔
201

202
    @property
1✔
203
    def Data(self):
1✔
204
        from chift.models.consumers.data import Data  # avoid circular import
1✔
205

206
        return Data(self.consumerid, self.connectionid)
1✔
207

208
    @property
1✔
209
    def Sync(self):
1✔
210
        from chift.models.consumers.sync import Sync  # avoid circular import
1✔
211

212
        return Sync(self.consumerid, self.connectionid)
1✔
213

214
    @property
1✔
215
    def Log(self):
1✔
216
        from chift.models.consumers.log import Log  # avoid circular import
1✔
217

218
        return Log(self.consumerid, self.connectionid)
1✔
219

220

221
# syncs
222

223

224
class Sync(ReadSyncItem):
1✔
225
    pass
1✔
226

227

228
class SyncConsumer(SyncConsumerItem):
1✔
229
    pass
1✔
230

231

232
# flow
233

234

235
class Flow(ReadFlowItem):
1✔
236
    pass
1✔
237

238

239
# datastores
240

241

242
class Datastore(DataStoreItem):
1✔
243
    pass
1✔
244

245

246
class DataIn(DataItem):
1✔
247
    pass
1✔
248

249

250
class Data(DataItemOut):
1✔
251
    id: Optional[str] = None
1✔
252

253

254
# webhook
255

256

257
class WebhookInstance(WebhookInstanceGetItem):
1✔
258
    pass
1✔
259

260

261
class WebhookType(WebhookItem):
1✔
262
    pass
1✔
263

264

265
# connections
266
class Connection(BackboneApiAppRoutersConnectionsConnectionItem):
1✔
267
    pass
1✔
268

269

270
class ConnectionLink(LinkItem):
1✔
271
    pass
1✔
272

273

274
# integrations
275
class Integration(IntegrationItem):
1✔
276
    pass
1✔
277

278

279
# invoicing
280

281

282
class Invoice(InvoiceItemOutSingle):
1✔
283
    pass
1✔
284

285

286
class Contact(ContactItemOut):
1✔
287
    pass
1✔
288

289

290
class Product(ProductItemOut):
1✔
291
    pass
1✔
292

293

294
class Opportunity(OpportunityItem):
1✔
295
    pass
1✔
296

297

298
class Tax(BackboneCommonModelsInvoicingVatCode):
1✔
299
    pass
1✔
300

301

302
# accounting
303
class AnalyticPlan(AnalyticPlanItem):
1✔
304
    pass
1✔
305

306

307
class AnalyticAccountMultiPlan(AnalyticAccountItemOutMultiAnalyticPlans):
1✔
308
    pass
1✔
309

310

311
class TaxAccounting(BackboneApiAppRoutersAccountingVatCode):
1✔
312
    pass
1✔
313

314

315
class MiscellaneousOperation(MiscellaneousOperationOut):
1✔
316
    pass
1✔
317

318

319
class Account(AccountItem):
1✔
320
    pass
1✔
321

322

323
class Supplier(SupplierItemOut):
1✔
324
    pass
1✔
325

326

327
class Client(ClientItemOut):
1✔
328
    pass
1✔
329

330

331
class Employee(EmployeeItem):
1✔
332
    pass
1✔
333

334

335
class InvoiceAccounting(InvoiceItemOutMonoAnalyticPlan):
1✔
336
    pass
1✔
337

338

339
class JournalEntry(JournalEntryMultiAnalyticPlan):
1✔
340
    pass
1✔
341

342

343
class FinancialEntry(FinancialEntryItemOut):
1✔
344
    pass
1✔
345

346

347
class Outstanding(OutstandingItem):
1✔
348
    pass
1✔
349

350

351
class Journal(Journal):
1✔
352
    pass
1✔
353

354

355
class Matching(MatchingIn):
1✔
356
    pass
1✔
357

358

359
# log
360
class Log(ConsumerLog):
1✔
361
    pass
1✔
362

363

364
# pos
365
class Customer(POSCustomerItem):
1✔
366
    pass
1✔
367

368

369
class PaymentMethods(PaymentMethods):
1✔
370
    pass
1✔
371

372

373
class Sales(SalesItem):
1✔
374
    pass
1✔
375

376

377
class Payment(POSPaymentItem):
1✔
378
    pass
1✔
379

380

381
class Location(POSLocationItem):
1✔
382
    pass
1✔
383

384

385
class Order(POSOrderItem):
1✔
386
    pass
1✔
387

388

389
class Closure(ClosureItem):
1✔
390
    pass
1✔
391

392

393
class POSProductCategory(BackboneApiAppRoutersPosProductCategoryItem):
1✔
394
    pass
1✔
395

396

397
class POSAccountingCategory(AccountingCategoryItem):
1✔
398
    pass
1✔
399

400

401
class POSProduct(POSProductItem):
1✔
402
    pass
1✔
403

404

405
# pms
406

407

408
class PMSPaymentMethods(PMSPaymentMethods):
1✔
409
    pass
1✔
410

411

412
class PMSPayment(PMSPaymentItem):
1✔
413
    pass
1✔
414

415

416
class PMSLocation(PMSLocationItem):
1✔
417
    pass
1✔
418

419

420
class PMSOrder(PMSOrderItem):
1✔
421
    pass
1✔
422

423

424
class PMSClosure(PMSClosureItem):
1✔
425
    pass
1✔
426

427

428
class PMSAccountingCategory(PMSAccountingCategoryItem):
1✔
429
    pass
1✔
430

431

432
# e-commerce
433
class CommerceCustomer(CommerceCustomerItem):
1✔
434
    pass
1✔
435

436

437
class CommerceProduct(BackboneApiAppRoutersCommerceProductItem):
1✔
438
    pass
1✔
439

440

441
class CommerceLocation(CommerceLocationItemOut):
1✔
442
    pass
1✔
443

444

445
class CommerceOrder(OrderItemOut):
1✔
446
    pass
1✔
447

448

449
class CommerceVariant(VariantItem):
1✔
450
    pass
1✔
451

452

453
class CommercePaymentMethod(PaymentMethodItem):
1✔
454
    pass
1✔
455

456

457
class CommerceProductCategory(CategoryItem):
1✔
458
    pass
1✔
459

460

461
class CommerceCountry(CountryItem):
1✔
462
    pass
1✔
463

464

465
class CommerceTax(TaxRateItem):
1✔
466
    pass
1✔
467

468

469
# payment
470

471

472
class PaymentTransaction(TransactionItemOut):
1✔
473
    pass
1✔
474

475

476
class PaymentBalance(BalanceItemOut):
1✔
477
    pass
1✔
478

479

480
class PaymentPayment(PaymentItemOut):
1✔
481
    pass
1✔
482

483

484
class PaymentRefund(RefundItemOut):
1✔
485
    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