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

chift-oneapi / chift-python-sdk / 15810519605

22 Jun 2025 08:23PM UTC coverage: 94.823%. Remained the same
15810519605

push

github

hhertoghe
fix (pagination): make sure it stops

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

4011 of 4230 relevant lines covered (94.82%)

0.95 hits per line

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

91.18
/chift/models/consumers/invoicing/__init__.py
1
from __future__ import annotations
1✔
2

3
from typing import ClassVar
1✔
4

5
from chift.api.mixins import CreateMixin, PaginationMixin, ReadMixin, UpdateMixin
1✔
6
from chift.openapi.models import Contact as ContactModel
1✔
7
from chift.openapi.models import Invoice as InvoiceModel
1✔
8
from chift.openapi.models import InvoicingPayment as PaymentModel
1✔
9
from chift.openapi.models import InvoicingPaymentMethod as PaymentMethodModel
1✔
10
from chift.openapi.models import Opportunity as OpportunityModel
1✔
11
from chift.openapi.models import Product as ProductModel
1✔
12
from chift.openapi.models import Tax as TaxModel
1✔
13

14

15
class InvoicingRouter:
1✔
16
    def __init__(self, consumer_id, connection_id):
1✔
17
        self.Product = Product(consumer_id, connection_id)
1✔
18
        self.Invoice = Invoice(consumer_id, connection_id)
1✔
19
        self.Contact = Contact(consumer_id, connection_id)
1✔
20
        self.Opportunity = Opportunity(consumer_id, connection_id)
1✔
21
        self.Tax = Tax(consumer_id, connection_id)
1✔
22
        self.Payment = Payment(consumer_id, connection_id)
1✔
23
        self.PaymentMethod = PaymentMethod(consumer_id, connection_id)
1✔
24
        self.UploadDocument = UploadDocument(consumer_id, connection_id)
1✔
25
        self.Custom = Custom(consumer_id, connection_id)
1✔
26

27

28
class Product(
1✔
29
    ReadMixin[ProductModel],
30
    PaginationMixin[ProductModel],
31
    CreateMixin[ProductModel],
32
):
33
    chift_vertical: ClassVar = "invoicing"
1✔
34
    chift_model: ClassVar = "products"
1✔
35
    model = ProductModel
1✔
36

37

38
class Invoice(
1✔
39
    ReadMixin[InvoiceModel],
40
    CreateMixin[InvoiceModel],
41
    PaginationMixin[InvoiceModel],
42
):
43
    chift_vertical: ClassVar = "invoicing"
1✔
44
    chift_model: ClassVar = "invoices"
1✔
45
    model = InvoiceModel
1✔
46

47

48
class Contact(
1✔
49
    ReadMixin[ContactModel],
50
    CreateMixin[ContactModel],
51
    PaginationMixin[ContactModel],
52
):
53
    chift_vertical: ClassVar = "invoicing"
1✔
54
    chift_model: ClassVar = "contacts"
1✔
55
    model = ContactModel
1✔
56

57

58
class Opportunity(
1✔
59
    ReadMixin[OpportunityModel],
60
    CreateMixin[OpportunityModel],
61
    PaginationMixin[OpportunityModel],
62
):
63
    chift_vertical: ClassVar = "invoicing"
1✔
64
    chift_model: ClassVar = "opportunities"
1✔
65
    model = OpportunityModel
1✔
66

67

68
class Tax(ReadMixin[TaxModel], PaginationMixin[TaxModel]):
1✔
69
    chift_vertical: ClassVar = "invoicing"
1✔
70
    chift_model: ClassVar = "taxes"
1✔
71
    model = TaxModel
1✔
72

73

74
class Payment(
1✔
75
    PaginationMixin[PaymentModel],
76
):
77
    chift_vertical: ClassVar = "invoicing"
1✔
78
    chift_model: ClassVar = "payments"
1✔
79
    model = PaymentModel
1✔
80

81

82
class PaymentMethod(
1✔
83
    PaginationMixin[PaymentMethodModel],
84
):
85
    chift_vertical: ClassVar = "invoicing"
1✔
86
    chift_model: ClassVar = "payment-methods"
1✔
87
    model = PaymentMethodModel
1✔
88

89

90
class UploadDocument(CreateMixin):
1✔
91
    chift_vertical: ClassVar = "invoicing"
1✔
92
    chift_model: ClassVar = "upload-document"
1✔
93
    model = InvoiceModel
1✔
94

95

96
class Custom(ReadMixin, CreateMixin, UpdateMixin, PaginationMixin):
1✔
97
    chift_vertical: ClassVar = "invoicing"
1✔
98
    chift_model: ClassVar = "custom"
1✔
99

100
    def all(self, custom_path, params=None, client=None, limit=None):
1✔
101
        self.extra_path = custom_path
1✔
102
        return super().all(params=params, map_model=False, client=client, limit=limit)
1✔
103

104
    def create(self, custom_path, data, client=None, params=None):
1✔
105
        self.extra_path = custom_path
×
106
        return super().create(data, map_model=False, client=client, params=params)
×
107

108
    def update(self, custom_path, chift_id, data, client=None, params=None):
1✔
109
        self.extra_path = f"{custom_path}/{chift_id}"
×
110
        return super().update(None, data, map_model=False, client=client, params=params)
×
111

112
    def get(self, custom_path, chift_id, params=None, client=None):
1✔
113
        self.extra_path = f"{custom_path}/{chift_id}"
×
114
        return super().get(chift_id=None, map_model=False, params=params, client=client)
×
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

© 2025 Coveralls, Inc