Skip to content

Commit

Permalink
AYS-646 | AysPhoneNumberRequest.toString() Method Has Been Refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
agitrubard committed Jan 3, 2025
1 parent 3dc8fe5 commit e34f987
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ public class AysPhoneNumberRequest {
private String lineNumber;

/**
* This method returns a JSON representation of the object for validation exception messages.
* Converts the phone number object into a JSON-like string representation.
* <p>
* This method is primarily used for logging or validation exception messages.
* It concatenates the country code and line number into a single string.
* </p>
*
* @return A string representation of the phone number in the format: {@code countryCode + lineNumber}.
*/
@Override
public String toString() {
return "{\"countryCode\":\"%s\",\"lineNumber\":\"%s\"}"
.formatted(this.countryCode, this.lineNumber);
return this.countryCode + this.lineNumber;
}

public boolean isBlank() {
Expand Down

0 comments on commit e34f987

Please sign in to comment.