diff --git a/Source/Model/User/Phone.swift b/Source/Model/User/Phone.swift index 73088b0..8c1ee81 100644 --- a/Source/Model/User/Phone.swift +++ b/Source/Model/User/Phone.swift @@ -10,12 +10,6 @@ public class Phone: Mappable { /// The E.164 phone mask. public private(set) final var e164Masked: String? - /// The international phone mask. - public private(set) final var internationalMasked: String? - - /// The national phone mask. - public private(set) final var nationalMasked: String? - /// A boolean indicating if the phone is the primary user phone. public private(set) final var primary: Bool? @@ -27,16 +21,12 @@ public class Phone: Mappable { - parameter id: The contact id. - parameter e164Masked: The E.164 phone mask. - - parameter internationalMasked: The international phone mask. - - parameter nationalMasked: The national phone mask. - parameter primary: A boolean indicating if the phone is the primary user phone. - parameter verified: A boolean indicating if the phone is verified. */ - public init(id: String, e164Masked: String, internationalMasked: String, nationalMasked: String, primary: Bool, verified: Bool) { + public init(id: String, e164Masked: String, primary: Bool, verified: Bool) { self.id = id self.e164Masked = e164Masked - self.internationalMasked = internationalMasked - self.nationalMasked = nationalMasked self.primary = primary self.verified = verified } @@ -59,8 +49,6 @@ public class Phone: Mappable { public func mapping(map: Map) { self.id <- map["id"] self.e164Masked <- map["e164Masked"] - self.internationalMasked <- map["internationalMasked"] - self.nationalMasked <- map["nationalMasked"] self.primary <- map["primary"] self.verified <- map["verified"] } diff --git a/Tests/Integration/Model/UserTest.swift b/Tests/Integration/Model/UserTest.swift index e5c9364..5d38efd 100644 --- a/Tests/Integration/Model/UserTest.swift +++ b/Tests/Integration/Model/UserTest.swift @@ -453,9 +453,7 @@ class UserTest: UpholdTestCase { "\"id\": \"foobar\"," + "\"verified\": true," + "\"primary\": true," + - "\"e164Masked\": \"+XXXXXXXXX04\"," + - "\"nationalMasked\": \"(XXX) XXX-XX04\"," + - "\"internationalMasked\": \"+X XXX-XXX-XX04\"" + + "\"e164Masked\": \"+XXXXXXXXX04\"" + "}]" let user: User = Fixtures.loadUser() user.adapter = MockRestAdapter(body: json) @@ -464,8 +462,6 @@ class UserTest: UpholdTestCase { XCTAssertEqual(phones.count, 1, "Failed: Wrong number of phone objects.") XCTAssertEqual(phones[0].e164Masked, "+XXXXXXXXX04", "Failed: Wrong phone e164Masked field.") XCTAssertEqual(phones[0].id, "foobar", "Failed: Wrong phone id.") - XCTAssertEqual(phones[0].internationalMasked, "+X XXX-XXX-XX04", "Failed: Wrong phone internationalMasked field.") - XCTAssertEqual(phones[0].nationalMasked, "(XXX) XXX-XX04", "Failed: Wrong phone nationalMasked field.") XCTAssertTrue(phones[0].primary!, "Failed: Wrong phone primary field.") XCTAssertTrue(phones[0].verified!, "Failed: Wrong phone verified field.")