From 8b677fbbad5fe3bbcd0a2b93e30e8040543b8f61 Mon Sep 17 00:00:00 2001 From: Javier Su Date: Thu, 4 Mar 2021 16:06:44 +0800 Subject: [PATCH] [ISSUE-28] Updated create promotion with missing request fields (#29) --- pyproject.toml | 2 +- xendit/models/creditcard/credit_card.py | 4 ++++ xendit/models/creditcard/credit_card_promotion.py | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aaa1826e..3b1473d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "xendit-python" -version = "0.1.0" +version = "0.1.1" description = "Xendit REST API Client for Python - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services https://xendit.github.io/apireference/" authors = ["Adyaksa Wisanggeni "] license = "MIT" diff --git a/xendit/models/creditcard/credit_card.py b/xendit/models/creditcard/credit_card.py index dd2eccd3..e563503f 100644 --- a/xendit/models/creditcard/credit_card.py +++ b/xendit/models/creditcard/credit_card.py @@ -430,6 +430,8 @@ def create_promotion( discount_percent=None, discount_amount=None, currency=None, + max_discount_amount=None, + min_original_amount=None, x_idempotency_key=None, for_user_id=None, x_api_version=None, @@ -447,6 +449,8 @@ def create_promotion( - **channel_code (str) - **discount_percent (float) - **discount_amount (float) + - **max_discount_amount (float) + - **min_original_amount (float) - **currency (str) - **x_idempotency_key (str) - **for_user_id (str) diff --git a/xendit/models/creditcard/credit_card_promotion.py b/xendit/models/creditcard/credit_card_promotion.py index 271b7e9f..5f6d1899 100644 --- a/xendit/models/creditcard/credit_card_promotion.py +++ b/xendit/models/creditcard/credit_card_promotion.py @@ -19,6 +19,8 @@ class CreditCardPromotion(BaseModel): - currency (str) - start_time (str) - end_time (str) + - min_original_amount (float) + - max_discount_amount (float) """ id: str @@ -34,3 +36,5 @@ class CreditCardPromotion(BaseModel): currency: str start_time: str end_time: str + min_original_amount: float + max_discount_amount: float