camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [camel] 01/02: CAMEL-13614 - Camel-yammer component doesn't deserialize correctly phone number field in the users endpoint
Date Wed, 05 Jun 2019 13:05:27 GMT
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 192d5c2bf38199da7eff6be4392e330c95230bda
Author: Andrea Cosentino <ancosen@gmail.com>
AuthorDate: Wed Jun 5 15:02:12 2019 +0200

    CAMEL-13614 - Camel-yammer component doesn't deserialize correctly phone number field
in the users endpoint
---
 .../camel/component/yammer/model/Contact.java      |  6 +--
 .../camel/component/yammer/model/PhoneNumber.java  | 44 ++++++++++++++++++++++
 2 files changed, 47 insertions(+), 3 deletions(-)

diff --git a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Contact.java
b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Contact.java
index 8182466..fba2c81 100644
--- a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Contact.java
+++ b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Contact.java
@@ -29,7 +29,7 @@ public class Contact {
     private Boolean hasFakeEmail;
     private Im im;
     @JsonProperty("phone_numbers")
-    private List<String> phoneNumbers;
+    private List<PhoneNumber> phoneNumbers;
 
     public List<EmailAddress> getEmailAddresses() {
         return emailAddresses;
@@ -55,11 +55,11 @@ public class Contact {
         this.im = im;
     }
 
-    public List<String> getPhoneNumbers() {
+    public List<PhoneNumber> getPhoneNumbers() {
         return phoneNumbers;
     }
 
-    public void setPhoneNumbers(List<String> phoneNumbers) {
+    public void setPhoneNumbers(List<PhoneNumber> phoneNumbers) {
         this.phoneNumbers = phoneNumbers;
     }
 
diff --git a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/PhoneNumber.java
b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/PhoneNumber.java
new file mode 100644
index 0000000..1ac94bc
--- /dev/null
+++ b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/PhoneNumber.java
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.yammer.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class PhoneNumber {
+
+    private String type;
+    private String number;
+    
+	public String getType() {
+		return type;
+	}
+	public void setType(String type) {
+		this.type = type;
+	}
+	public String getNumber() {
+		return number;
+	}
+	public void setNumber(String number) {
+		this.number = number;
+	}
+	@Override
+	public String toString() {
+		return "PhoneNumber [type=" + type + ", number=" + number + "]";
+	}
+
+}


Mime
View raw message