Skip to content

Commit

Permalink
Merge pull request #61 from erikduisheev/add-with-fee-rule-argumant-a…
Browse files Browse the repository at this point in the history
…nd-header-to-create-credit-card-charge

Add with-fee-rule argument and header to create_charge method of CreditCard class
  • Loading branch information
flamehamster authored Feb 9, 2023
2 parents d89a3ca + 8890b2d commit 2bc1ef9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "xendit-python"
version = "0.2.0"
version = "0.2.1"
description = "Xendit REST API Client for Python - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets, Payments API, Services https://xendit.github.io/apireference/"
authors = ["Maahir Ur Rahman <[email protected]>"]
license = "MIT"
Expand Down
6 changes: 4 additions & 2 deletions xendit/models/creditcard/credit_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def create_charge(
for_user_id=None,
x_api_version=None,
metadata=None,
with_fee_rule=None,
**kwargs,
):
"""Send POST Request to create Credit Card Charge (API Reference: Credit Card/Create Charge)
Expand All @@ -276,7 +277,8 @@ def create_charge(
- **promotion (CreditCardCharge.Promotion.Query)
- **installment (CreditCardCharge.Installment.Query)
- **x_idempotency_key (str)
- **for_user_id (str)
- **for_user_id (str) (XenPlatforms only)
- **with_fee_rule (str) (XenPlatforms only)
- **x_api_version (str)
- **metadata (dict)
Expand All @@ -291,7 +293,7 @@ def create_charge(
headers, body = _extract_params(
locals(),
func_object=CreditCard.create_charge,
headers_params=["for_user_id", "x_idempotency_key", "x_api_version"],
headers_params=["for_user_id", "x_idempotency_key", "x_api_version", "with_fee_rule"],
)
kwargs["headers"] = headers
kwargs["body"] = body
Expand Down

0 comments on commit 2bc1ef9

Please sign in to comment.