Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.6.1 - 2026-05-15
- payments: add payout endpoint
- banking: add custom endpoint

## 0.6.0 - 2026-05-08
- models: allow extra fields

Expand All @@ -25,10 +29,10 @@
## 0.5.13 - 2026-03-13
- pms: add transactions model

# 0.5.12 - 2026-03-13
## 0.5.12 - 2026-03-13
- Fix exception raising when response status is 401

# 0.5.11 - 2026-03-13
## 0.5.11 - 2026-03-13
- add create/update/delete endpoints in the Invoicing API

## 0.5.10 - 2026-03-09
Expand Down
16 changes: 15 additions & 1 deletion chift/models/consumers/banking/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import ClassVar

from chift.api.mixins import ListMixin, PaginationMixin
from chift.api.mixins import CreateMixin, ListMixin, PaginationMixin
from chift.openapi.models import BankingAccount as BankingAccountModel
from chift.openapi.models import BankingAttachment as BankingAttachmentModel
from chift.openapi.models import BankingCounterpart as BankingCounterpartModel
Expand All @@ -17,6 +17,7 @@ def __init__(self, consumer_id, connection_id):
self.Transaction = Transaction(consumer_id, connection_id)
self.Counterpart = Counterpart(consumer_id, connection_id)
self.Attachment = Attachment(consumer_id, connection_id)
self.Custom = Custom(consumer_id, connection_id)


class FinancialInstitution(PaginationMixin[FinancialInstitutionModel]):
Expand Down Expand Up @@ -47,3 +48,16 @@ class Attachment(ListMixin[BankingAttachmentModel]):
chift_vertical: ClassVar = "banking"
chift_model: ClassVar = "attachments"
model = BankingAttachmentModel


class Custom(CreateMixin):
chift_vertical: ClassVar = "banking"

def __init__(self, consumer_id, connection_id, model="custom"):
super().__init__(consumer_id, connection_id)
self.chift_model = model

def create(self, custom_path, data, client=None, params=None):
self.chift_model = custom_path
self.chift_model_create = custom_path
return super().create(data, map_model=False, client=client, params=params)
8 changes: 8 additions & 0 deletions chift/models/consumers/payment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
)
from chift.openapi.models import PaymentBalance as PaymentBalanceModel
from chift.openapi.models import PaymentPayment as PaymentItemModel
from chift.openapi.models import PaymentPayout as PayoutItemModel
from chift.openapi.models import PaymentRefund as RefundItemModel
from chift.openapi.models import PaymentTransaction as TransactionModel

Expand All @@ -19,6 +20,7 @@ def __init__(self, consumer_id, connection_id):
self.Balance = Balance(consumer_id, connection_id)
self.Payment = Payment(consumer_id, connection_id)
self.Refund = Refund(consumer_id, connection_id)
self.Payout = Payout(consumer_id, connection_id)


class Transaction(PaginationMixin[TransactionModel]):
Expand All @@ -43,3 +45,9 @@ class Refund(PaginationMixin[RefundItemModel]):
chift_vertical: ClassVar = "payment"
chift_model: ClassVar = "refunds"
model = RefundItemModel


class Payout(PaginationMixin[PayoutItemModel]):
chift_vertical: ClassVar = "payment"
chift_model: ClassVar = "payouts"
model = PayoutItemModel
5 changes: 5 additions & 0 deletions chift/openapi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
from .openapi import PaymentItemOut, PaymentMethodItem
from .openapi import PaymentMethods as PaymentMethodsModel
from .openapi import (
PayoutItemOut,
PMSAccountingCategoryItem,
PMSAccountingTransactionItem,
PMSClosureItem,
Expand Down Expand Up @@ -603,6 +604,10 @@ class PaymentRefund(RefundItemOut):
pass


class PaymentPayout(PayoutItemOut):
pass


# Banking


Expand Down
Loading
Loading