-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #3 - attempt to add functionaltiy for addresses
It does not work, because now AddressesFind and ContactFind both return a ResultSet, of which the member Result has a distinct type. Note: If you want to add an address, you must provide a LocationTypeId.
- Loading branch information
Johan Vervloet
committed
Sep 16, 2013
1 parent
0f59825
commit 4ed6656
Showing
8 changed files
with
181 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
Copyright 2013 Chirojeugd-Vlaanderen vzw | ||
Licensed 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. | ||
*/ | ||
|
||
using System.Xml.Serialization; | ||
|
||
namespace Chiro.CiviCrm.ServiceContracts.DataContracts | ||
{ | ||
public class Address | ||
{ | ||
[XmlElement("id")] | ||
public int Id { get; set; } | ||
|
||
[XmlElement("contact_id")] | ||
public int ContactId { get; set; } | ||
|
||
[XmlElement("location_type_id")] | ||
public int LocationTypeId { get; set; } | ||
|
||
[XmlElement("is_primary")] | ||
public bool IsPrimary { get; set; } | ||
|
||
[XmlElement("is_billing")] | ||
public bool IsBilling { get; set; } | ||
|
||
[XmlElement("street_address")] | ||
public string StreetAddress { get; set; } | ||
|
||
[XmlElement("city")] | ||
public string City { get; set; } | ||
|
||
[XmlElement("state_province_id")] | ||
public int StateProvinceId { get; set; } | ||
|
||
[XmlElement("postal_code")] | ||
public int PostalCode { get; set; } | ||
|
||
[XmlElement("postal_code_suffix")] | ||
public string PostalCodeSuffix { get; set; } | ||
|
||
[XmlElement("country_id")] | ||
public int CountryId { get; set; } | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
Chiro.CiviCrm.ServiceContracts/DataContracts/AddressSet.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
Copyright 2013 Chirojeugd-Vlaanderen vzw | ||
Licensed 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. | ||
*/ | ||
|
||
using System.Xml.Serialization; | ||
|
||
namespace Chiro.CiviCrm.ServiceContracts.DataContracts | ||
{ | ||
[XmlRoot(ElementName = "ResultSet")] | ||
public class AddressSet | ||
{ | ||
[XmlElement("Result")] | ||
public Address[] Adresses { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters