Actions
components.payment_gateway.subcomponents.rules.business_logic.actions.expense_limit_rule_actions ¶
ExpenseLimitRuleActions ¶
This class contains all the actions related to expense limit rules.
Implements the following Nullable patterns: - Nullables: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#nullables ⧉ - Parameterless instantiation: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#instantiation ⧉
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/expense_limit_rule_actions.py
create
classmethod
¶
Normal factory
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/expense_limit_rule_actions.py
create_expense_limit_rule ¶
create_expense_limit_rule(
session,
/,
description,
reference,
card_id,
amount,
currency,
period,
criteria,
first_day=None,
is_active=False,
start=None,
end=None,
)
Create an expense limit rule for a card.
Note
This operation is currently only supported for Adyen.
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/expense_limit_rule_actions.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
create_null
classmethod
¶
Null factory
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/expense_limit_rule_actions.py
set_expense_limit_rule_status ¶
Activate or deactivate an expense limit rule.
Activating a rule will also set the start date to the current date.
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/expense_limit_rule_actions.py
set_expense_limit_rule_validity_period ¶
Set an expense limit rule validity period.
Note
This operation is currently only supported for Adyen.
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/expense_limit_rule_actions.py
terminate_expense_limit_rule ¶
Terminate an expense limit rule.
The operation is idempotent, i.e. it has no effect on already terminated entities.
Rules in terminal state cannot be modified or used anymore. Any attempt
to use or retrieve a terminated expense limit rule will raise an
ExpenseLimitRuleTerminatedException.
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/expense_limit_rule_actions.py
update_expense_limit_rule_amount ¶
Update the amount of an expense limit rule.
This operation can be safely performed in the middle of a validity period. The new limit will be applied to all future transactions.
Note
This operation is currently only supported for Adyen.
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/expense_limit_rule_actions.py
update_expense_limit_rule_criteria ¶
Update the criteria of an expense limit rule.
Warning: we don't know yet how this will behave when performed in the middle of a validity period with respect to the cumulated amount so far. Use with caution.
Note
This operation is currently only supported for Adyen.
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/expense_limit_rule_actions.py
components.payment_gateway.subcomponents.rules.business_logic.actions.usage_restriction_rule_actions ¶
UsageRestrictionRuleActions ¶
This class contains all the actions related to usage restriction rules.
Implements the following Nullable patterns: - Nullables: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#nullables ⧉ - Parameterless instantiation: https://www.jamesshore.com/v2/projects/nullables/testing-without-mocks#instantiation ⧉
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/usage_restriction_rule_actions.py
create
classmethod
¶
Normal factory
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/usage_restriction_rule_actions.py
create_null
classmethod
¶
Null factory
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/usage_restriction_rule_actions.py
create_usage_restriction_rule ¶
create_usage_restriction_rule(
session,
/,
description,
reference,
account_id,
criteria,
is_active=False,
start=None,
end=None,
)
Create a usage restriction rule for an account.
Note
This operation is currently only supported for Adyen.
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/usage_restriction_rule_actions.py
set_usage_restriction_rule_status ¶
Activate or deactivate a usage restriction rule.
Activating a rule will also set the start date to the current date.
Note
This operation is currently only supported for Adyen.
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/usage_restriction_rule_actions.py
set_usage_restriction_rule_validity_period ¶
Set a usage restriction rule validity period.
Note
This operation is currently only supported for Adyen.
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/usage_restriction_rule_actions.py
terminate_usage_restriction_rule ¶
Terminate a usage restriction rule.
The operation is idempotent, i.e. it has no effect on already terminated entities.
Rules in terminal state cannot be modified or used anymore. Any attempt
to use or retrieve a terminated usage restriction rule will raise a
UsageRestrictionRuleTerminatedException.
Source code in components/payment_gateway/subcomponents/rules/business_logic/actions/usage_restriction_rule_actions.py
update_usage_restriction_rule_criteria ¶
Update the criteria of a usage restriction rule.
Note
This operation is currently only supported for Adyen.