From f13a09b5bf5b1e61e5ca775e44a98888574dfb94 Mon Sep 17 00:00:00 2001 From: maxio-sdk Date: Tue, 5 Mar 2024 08:01:28 +0000 Subject: [PATCH] Automated commit message --- advancedbilling/models/coupon.py | 8 ++++++++ .../models/create_or_update_flat_amount_coupon.py | 10 +++++++++- .../models/create_or_update_percentage_coupon.py | 10 +++++++++- doc/models/coupon.md | 1 + doc/models/create-or-update-flat-amount-coupon.md | 1 + doc/models/create-or-update-percentage-coupon.md | 1 + 6 files changed, 29 insertions(+), 2 deletions(-) diff --git a/advancedbilling/models/coupon.py b/advancedbilling/models/coupon.py index 2886a70f..17163e46 100644 --- a/advancedbilling/models/coupon.py +++ b/advancedbilling/models/coupon.py @@ -46,6 +46,7 @@ class Coupon(object): discount_type (DiscountType): TODO: type description here. exclude_mid_period_allocations (bool): TODO: type description here. apply_on_cancel_at_end_of_period (bool): TODO: type description here. + apply_on_subscription_expiration (bool): TODO: type description here. coupon_restrictions (List[CouponRestriction]): TODO: type description here. @@ -81,6 +82,7 @@ class Coupon(object): "discount_type": 'discount_type', "exclude_mid_period_allocations": 'exclude_mid_period_allocations', "apply_on_cancel_at_end_of_period": 'apply_on_cancel_at_end_of_period', + "apply_on_subscription_expiration": 'apply_on_subscription_expiration', "coupon_restrictions": 'coupon_restrictions' } @@ -113,6 +115,7 @@ class Coupon(object): 'discount_type', 'exclude_mid_period_allocations', 'apply_on_cancel_at_end_of_period', + 'apply_on_subscription_expiration', 'coupon_restrictions', ] @@ -159,6 +162,7 @@ def __init__(self, discount_type=APIHelper.SKIP, exclude_mid_period_allocations=APIHelper.SKIP, apply_on_cancel_at_end_of_period=APIHelper.SKIP, + apply_on_subscription_expiration=APIHelper.SKIP, coupon_restrictions=APIHelper.SKIP, additional_properties={}): """Constructor for the Coupon class""" @@ -220,6 +224,8 @@ def __init__(self, self.exclude_mid_period_allocations = exclude_mid_period_allocations if apply_on_cancel_at_end_of_period is not APIHelper.SKIP: self.apply_on_cancel_at_end_of_period = apply_on_cancel_at_end_of_period + if apply_on_subscription_expiration is not APIHelper.SKIP: + self.apply_on_subscription_expiration = apply_on_subscription_expiration if coupon_restrictions is not APIHelper.SKIP: self.coupon_restrictions = coupon_restrictions @@ -280,6 +286,7 @@ def from_dictionary(cls, discount_type = dictionary.get("discount_type") if dictionary.get("discount_type") else APIHelper.SKIP exclude_mid_period_allocations = dictionary.get("exclude_mid_period_allocations") if "exclude_mid_period_allocations" in dictionary.keys() else APIHelper.SKIP apply_on_cancel_at_end_of_period = dictionary.get("apply_on_cancel_at_end_of_period") if "apply_on_cancel_at_end_of_period" in dictionary.keys() else APIHelper.SKIP + apply_on_subscription_expiration = dictionary.get("apply_on_subscription_expiration") if "apply_on_subscription_expiration" in dictionary.keys() else APIHelper.SKIP coupon_restrictions = None if dictionary.get('coupon_restrictions') is not None: coupon_restrictions = [CouponRestriction.from_dictionary(x) for x in dictionary.get('coupon_restrictions')] @@ -318,5 +325,6 @@ def from_dictionary(cls, discount_type, exclude_mid_period_allocations, apply_on_cancel_at_end_of_period, + apply_on_subscription_expiration, coupon_restrictions, dictionary) diff --git a/advancedbilling/models/create_or_update_flat_amount_coupon.py b/advancedbilling/models/create_or_update_flat_amount_coupon.py index 7ca7dc34..0d88b721 100644 --- a/advancedbilling/models/create_or_update_flat_amount_coupon.py +++ b/advancedbilling/models/create_or_update_flat_amount_coupon.py @@ -31,6 +31,7 @@ class CreateOrUpdateFlatAmountCoupon(object): here. exclude_mid_period_allocations (bool): TODO: type description here. apply_on_cancel_at_end_of_period (bool): TODO: type description here. + apply_on_subscription_expiration (bool): TODO: type description here. """ @@ -47,7 +48,8 @@ class CreateOrUpdateFlatAmountCoupon(object): "stackable": 'stackable', "compounding_strategy": 'compounding_strategy', "exclude_mid_period_allocations": 'exclude_mid_period_allocations', - "apply_on_cancel_at_end_of_period": 'apply_on_cancel_at_end_of_period' + "apply_on_cancel_at_end_of_period": 'apply_on_cancel_at_end_of_period', + "apply_on_subscription_expiration": 'apply_on_subscription_expiration' } _optionals = [ @@ -60,6 +62,7 @@ class CreateOrUpdateFlatAmountCoupon(object): 'compounding_strategy', 'exclude_mid_period_allocations', 'apply_on_cancel_at_end_of_period', + 'apply_on_subscription_expiration', ] def __init__(self, @@ -75,6 +78,7 @@ def __init__(self, compounding_strategy=APIHelper.SKIP, exclude_mid_period_allocations=APIHelper.SKIP, apply_on_cancel_at_end_of_period=APIHelper.SKIP, + apply_on_subscription_expiration=APIHelper.SKIP, additional_properties={}): """Constructor for the CreateOrUpdateFlatAmountCoupon class""" @@ -100,6 +104,8 @@ def __init__(self, self.exclude_mid_period_allocations = exclude_mid_period_allocations if apply_on_cancel_at_end_of_period is not APIHelper.SKIP: self.apply_on_cancel_at_end_of_period = apply_on_cancel_at_end_of_period + if apply_on_subscription_expiration is not APIHelper.SKIP: + self.apply_on_subscription_expiration = apply_on_subscription_expiration # Add additional model properties to the instance self.additional_properties = additional_properties @@ -135,6 +141,7 @@ def from_dictionary(cls, compounding_strategy = dictionary.get("compounding_strategy") if dictionary.get("compounding_strategy") else APIHelper.SKIP exclude_mid_period_allocations = dictionary.get("exclude_mid_period_allocations") if "exclude_mid_period_allocations" in dictionary.keys() else APIHelper.SKIP apply_on_cancel_at_end_of_period = dictionary.get("apply_on_cancel_at_end_of_period") if "apply_on_cancel_at_end_of_period" in dictionary.keys() else APIHelper.SKIP + apply_on_subscription_expiration = dictionary.get("apply_on_subscription_expiration") if "apply_on_subscription_expiration" in dictionary.keys() else APIHelper.SKIP # Clean out expected properties from dictionary for key in cls._names.values(): if key in dictionary: @@ -152,6 +159,7 @@ def from_dictionary(cls, compounding_strategy, exclude_mid_period_allocations, apply_on_cancel_at_end_of_period, + apply_on_subscription_expiration, dictionary) @classmethod diff --git a/advancedbilling/models/create_or_update_percentage_coupon.py b/advancedbilling/models/create_or_update_percentage_coupon.py index 063f8fe4..a8a7896d 100644 --- a/advancedbilling/models/create_or_update_percentage_coupon.py +++ b/advancedbilling/models/create_or_update_percentage_coupon.py @@ -31,6 +31,7 @@ class CreateOrUpdatePercentageCoupon(object): here. exclude_mid_period_allocations (bool): TODO: type description here. apply_on_cancel_at_end_of_period (bool): TODO: type description here. + apply_on_subscription_expiration (bool): TODO: type description here. """ @@ -47,7 +48,8 @@ class CreateOrUpdatePercentageCoupon(object): "stackable": 'stackable', "compounding_strategy": 'compounding_strategy', "exclude_mid_period_allocations": 'exclude_mid_period_allocations', - "apply_on_cancel_at_end_of_period": 'apply_on_cancel_at_end_of_period' + "apply_on_cancel_at_end_of_period": 'apply_on_cancel_at_end_of_period', + "apply_on_subscription_expiration": 'apply_on_subscription_expiration' } _optionals = [ @@ -60,6 +62,7 @@ class CreateOrUpdatePercentageCoupon(object): 'compounding_strategy', 'exclude_mid_period_allocations', 'apply_on_cancel_at_end_of_period', + 'apply_on_subscription_expiration', ] def __init__(self, @@ -75,6 +78,7 @@ def __init__(self, compounding_strategy=APIHelper.SKIP, exclude_mid_period_allocations=APIHelper.SKIP, apply_on_cancel_at_end_of_period=APIHelper.SKIP, + apply_on_subscription_expiration=APIHelper.SKIP, additional_properties={}): """Constructor for the CreateOrUpdatePercentageCoupon class""" @@ -100,6 +104,8 @@ def __init__(self, self.exclude_mid_period_allocations = exclude_mid_period_allocations if apply_on_cancel_at_end_of_period is not APIHelper.SKIP: self.apply_on_cancel_at_end_of_period = apply_on_cancel_at_end_of_period + if apply_on_subscription_expiration is not APIHelper.SKIP: + self.apply_on_subscription_expiration = apply_on_subscription_expiration # Add additional model properties to the instance self.additional_properties = additional_properties @@ -136,6 +142,7 @@ def from_dictionary(cls, compounding_strategy = dictionary.get("compounding_strategy") if dictionary.get("compounding_strategy") else APIHelper.SKIP exclude_mid_period_allocations = dictionary.get("exclude_mid_period_allocations") if "exclude_mid_period_allocations" in dictionary.keys() else APIHelper.SKIP apply_on_cancel_at_end_of_period = dictionary.get("apply_on_cancel_at_end_of_period") if "apply_on_cancel_at_end_of_period" in dictionary.keys() else APIHelper.SKIP + apply_on_subscription_expiration = dictionary.get("apply_on_subscription_expiration") if "apply_on_subscription_expiration" in dictionary.keys() else APIHelper.SKIP # Clean out expected properties from dictionary for key in cls._names.values(): if key in dictionary: @@ -153,6 +160,7 @@ def from_dictionary(cls, compounding_strategy, exclude_mid_period_allocations, apply_on_cancel_at_end_of_period, + apply_on_subscription_expiration, dictionary) @classmethod diff --git a/doc/models/coupon.md b/doc/models/coupon.md index 953150d7..7c6fd2bc 100644 --- a/doc/models/coupon.md +++ b/doc/models/coupon.md @@ -37,6 +37,7 @@ | `discount_type` | [`DiscountType`](../../doc/models/discount-type.md) | Optional | - | | `exclude_mid_period_allocations` | `bool` | Optional | - | | `apply_on_cancel_at_end_of_period` | `bool` | Optional | - | +| `apply_on_subscription_expiration` | `bool` | Optional | - | | `coupon_restrictions` | [`List[CouponRestriction]`](../../doc/models/coupon-restriction.md) | Optional | - | ## Example (as JSON) diff --git a/doc/models/create-or-update-flat-amount-coupon.md b/doc/models/create-or-update-flat-amount-coupon.md index fa27725b..561240f5 100644 --- a/doc/models/create-or-update-flat-amount-coupon.md +++ b/doc/models/create-or-update-flat-amount-coupon.md @@ -21,6 +21,7 @@ | `compounding_strategy` | [`CompoundingStrategy`](../../doc/models/compounding-strategy.md) | Optional | - | | `exclude_mid_period_allocations` | `bool` | Optional | - | | `apply_on_cancel_at_end_of_period` | `bool` | Optional | - | +| `apply_on_subscription_expiration` | `bool` | Optional | - | ## Example (as JSON) diff --git a/doc/models/create-or-update-percentage-coupon.md b/doc/models/create-or-update-percentage-coupon.md index 5dbe074e..0fd44928 100644 --- a/doc/models/create-or-update-percentage-coupon.md +++ b/doc/models/create-or-update-percentage-coupon.md @@ -21,6 +21,7 @@ | `compounding_strategy` | [`CompoundingStrategy`](../../doc/models/compounding-strategy.md) | Optional | - | | `exclude_mid_period_allocations` | `bool` | Optional | - | | `apply_on_cancel_at_end_of_period` | `bool` | Optional | - | +| `apply_on_subscription_expiration` | `bool` | Optional | - | ## Example (as JSON)