Skip to content

Update Customer class to allow nullable networkAddress and countryCod…#103

Merged
kotivuori merged 1 commit intopaytrail:masterfrom
OttiaDevsPT:PP6-125
Dec 10, 2025
Merged

Update Customer class to allow nullable networkAddress and countryCod…#103
kotivuori merged 1 commit intopaytrail:masterfrom
OttiaDevsPT:PP6-125

Conversation

@OttiaDevsPT
Copy link
Contributor

@OttiaDevsPT OttiaDevsPT commented Nov 14, 2025

This update enhances the customer data handling logic by ensuring that the setNetworkAddress() and setCountryCode() methods are only executed when their respective properties are explicitly provided.

Changes Made:
Added conditional checks for $customer->network_address and $customer->country_code.
The setters are now called only if the properties exist and are not null.
Prevents unintentional overwriting of existing values with null.

Technical Summary:

if ($customer->network_address) {
    $this->setNetworkAddress($customer->network_address);
}

if ($customer->country_code) {
    $this->setCountryCode($customer->country_code);
}

Testing Notes:
Verified with and without network_address and country_code fields.
Confirmed that the setters trigger correctly only when valid values are passed.

@kotivuori kotivuori merged commit 8ad3fbb into paytrail:master Dec 10, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants