UpdateServiceChargePlanV2 models
DataSet models for UpdateServiceChargePlanV2.
These typed dataclass models represent the tables and columns within the DataSet parameters for the UpdateServiceChargePlanV2 HQ operation.
IMPORTANT: Update operations require a GET first to populate the original_record field. HQ uses the unchanged row for optimistic concurrency checking.
Usage:
from q2_sdk.hq.hq_api.backoffice import UpdateServiceChargePlanV2
q2_service_charge_plan_edit_v2 = UpdateServiceChargePlanV2.Q2ServiceChargePlanEditV2(
plan_name="...",
description="...",
months_free=1,
base_fee=1.0,
max_usage_fee=1.0,
max_txn_fee=1.0,
sum_usage_and_txn_fees=True,
no_max_usage_fee=True,
no_max_txn_fee=True,
)
q2_service_charge_plan_fee_edit_v2 = UpdateServiceChargePlanV2.Q2ServiceChargePlanFeeEditV2(
service_charge_plan_id=1,
base_fee=1.0,
number_free=1,
additional_use_dollars=1.0,
only_if_used=True,
max_fee=1.0,
fee_type_id=1,
short_name="...",
description="...",
additional_use_percent_of_txn=1.0,
is_usage_fee=True,
)
- class q2_sdk.hq.hq_api.backoffice.UpdateServiceChargePlanV2_models.Q2ServiceChargePlanEditV2(service_charge_plan_id=-1, plan_name='', description='', months_free=0, base_fee=0.0, max_usage_fee=0.0, max_txn_fee=0.0, sum_usage_and_txn_fees=False, no_max_usage_fee=False, no_max_txn_fee=False, original_record=None)[source]
Bases:
objectRepresents a row in the Q2_ServiceChargePlanEditV2 table.
- original_record: Q2ServiceChargePlanEditV2 | None = None
- class q2_sdk.hq.hq_api.backoffice.UpdateServiceChargePlanV2_models.Q2ServiceChargePlanFeeEditV2(service_charge_plan_id=0, base_fee=0.0, number_free=0, additional_use_dollars=0.0, only_if_used=False, max_fee=0.0, fee_type_id=0, short_name='', description='', additional_use_percent_of_txn=0.0, is_usage_fee=False, original_record=None)[source]
Bases:
objectRepresents a row in the Q2_ServiceChargePlanFeeEditV2 table.
- original_record: Q2ServiceChargePlanFeeEditV2 | None = None
- q2_sdk.hq.hq_api.backoffice.UpdateServiceChargePlanV2_models.build_service_charge_plan_edit_dataset(q2_service_charge_plan_edit_v2=None, q2_service_charge_plan_fee_edit_v2=None)[source]
Build the service_charge_plan_edit DataSet parameter for UpdateServiceChargePlanV2.
For update operations, each model instance should have its original_record set to the pre-modification state (from a prior GET call).
For add operations, set auto-increment ID fields to negative values.
- Return type:
- Returns:
DataSetBuilder ready to pass as the ‘service_charge_plan_edit’ parameter