developer:soap-1.6:methods:getsynclog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:soap-1.6:methods:getsynclog [2012/08/04 11:30] (current)
tem created
Line 1: Line 1:
 +<embed ..:​contents/>​
  
 +====== getSyncLog ======
 +
 +Retrieves the log of changes made to data objects (Products, Customers, etc)  on the system
 +
 +===== Description =====
 +
 +This method allows for the intelligent synchronization of data between the gateway and the developer'​s software.  ​
 +
 +
 +
 +See also [[.:​getSyncLogCurrentPosition]]
 +
 +===== Syntax =====
 +
 +[[..:​objects:​synclog]] **getSyncLog** ( [[..:​objects:​ueSecurityToken]],​ ObjectName, FromPosition) ​
 +
 +
 +===== Arguments =====
 +
 +^Type   ​^Name ​  ​^Description ​  ^
 +|[[..:​objects:​ueSecurityToken]] |Token |Merchant security token: used to identify merchant and retrieve the custom fields.|
 +|string|ObjectName |The name of object being synced (leave blank to look at all objects).|
 +|integer |FromPosition |Specifies the log position to start from. |
 +
 +===== Return Value =====
 +
 +|[[..:​objects:​SyncLog]][] |Returns as array of SyncLog objects. |
 +
 +===== Exceptions =====
 +
 +The following exceptions (errors) are applicable to this method. ​
 +
 +^Code ^Message ​ ^Advice ​ ^
 +|41004 |Unknown object |The specified ObjectName was not recognized. ​ ObjectName must either be left blank (for all objects) or must correspond to a valid object (ie Product, Customer, etc). |
 +
 +
 +===== Examples =====
 +
 +
 +==== PHP ====
 +
 +For directions on how to set up the WSDL link, create "​$token"​ and "​$client",​ go to [[..:​howto:​php|PHP Soap How-to]].
 +
 +<code php>
 +<?​php ​
 +
 +
 +
 +?> 
 +</​code>​
 +
 +==== VB ====
 +
 +<code vb>
 +Dim ObjectName As String
 +        ObjectName = "​Product"​
 +        Dim FromPosition As String
 +
 +        Dim log() As usaepay.SyncLog
 +        log = client.getSyncLog(token,​ ObjectName, FromPosition)
 +        MsgBox(log.Length) ​   ​
 +</​code>​
 +
 +==== .NET C# ====
 +<code c>
 +           ​string ObjectName = "​Product";​
 +            string FromPosition = "​0";​
 +
 +            try
 +            {
 +                usaepay.SyncLog[] log = client.getSyncLog(token,​ ObjectName, FromPosition);​
 +                MessageBox.Show(string.Concat(log.Length));​
 +
 +            }
 +            catch (Exception err)
 +            {
 +                MessageBox.Show(err.Message);​
 +            }
 +</​code>​
 +
 +==== XML ====
 +Request:
 +<code xml>
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​
 +<​SOAP-ENV:​Envelope xmlns:​SOAP-ENV="​http://​schemas.xmlsoap.org/​soap/​envelope/" ​
 +xmlns:​ns1="​urn:​usaepay"​ xmlns:​xsd="​http://​www.w3.org/​2001/​XMLSchema" ​
 +xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance" ​
 +xmlns:​SOAP-ENC="​http://​schemas.xmlsoap.org/​soap/​encoding/" ​
 +SOAP-ENV:​encodingStyle="​http://​schemas.xmlsoap.org/​soap/​encoding/">​
 + <​SOAP-ENV:​Body>​
 +  <​ns1:​getSyncLog>​
 +   <​Token xsi:​type="​ns1:​ueSecurityToken">​
 +<​ClientIP xsi:​type="​xsd:​string">​192.168.0.1</​ClientIP>​
 +<PinHash xsi:​type="​ns1:​ueHash">​
 +<​HashValue xsi:​type="​xsd:​string">​11ac55b0a0b59f8f028dbf85bc32266fa973dd0e</​HashValue>​
 +<Seed xsi:​type="​xsd:​string">​12678150211876663375</​Seed>​
 +<Type xsi:​type="​xsd:​string">​sha1</​Type>​
 +</​PinHash>​
 +<​SourceKey xsi:​type="​xsd:​string">​HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</​SourceKey>​
 +</​Token>​
 +   <​ObjectName xsi:​type="​xsd:​string">​
 +    Product
 +   </​ObjectName>​
 +   <​FromPosition xsi:​type="​xsd:​integer">​
 +    181
 +   </​FromPosition>​
 +  </​ns1:​getSyncLog>​
 + </​SOAP-ENV:​Body>​
 +</​SOAP-ENV:​Envelope>​
 +</​code>​
 +
 +Response:
 +
 +<code xml>
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​
 +<​SOAP-ENV:​Envelope xmlns:​SOAP-ENV="​http://​schemas.xmlsoap.org/​soap/​envelope/"​
 + ​xmlns:​ns1="​urn:​usaepay"​ xmlns:​SOAP-ENC="​http://​schemas.xmlsoap.org/​soap/​encoding/"​ xmlns:​xsd="​http://​www.w3.org/​2001/​XMLSchema" ​
 +xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance" ​
 +SOAP-ENV:​encodingStyle="​http://​schemas.xmlsoap.org/​soap/​encoding/">​
 + <​SOAP-ENV:​Body>​
 +  <​ns1:​getSyncLogResponse>​
 +   <​getSyncLogReturn SOAP-ENC:​arrayType="​ns1:​SyncLog[1]"​ xsi:​type="​ns1:​SyncLogArray">​
 +    <item xsi:​type="​ns1:​SyncLog">​
 +     <​SyncPosition xsi:​type="​xsd:​integer">​
 +      181
 +     </​SyncPosition>​
 +     <​ObjectName xsi:​type="​xsd:​string">​
 +      Product
 +     </​ObjectName>​
 +     <​RefNum xsi:​type="​xsd:​string">​
 +      9011780645
 +     </​RefNum>​
 +     <​ChangeDate xsi:​type="​xsd:​dateTime">​
 +      2010-03-23T09:​01:​40
 +     </​ChangeDate>​
 +     <​Action xsi:​type="​xsd:​string">​
 +      Update
 +     </​Action>​
 +    </​item>​
 +   </​getSyncLogReturn>​
 +  </​ns1:​getSyncLogResponse>​
 + </​SOAP-ENV:​Body>​
 +</​SOAP-ENV:​Envelope>​
 +</​code>​
 +
 +===== Change History =====
 +
 +^Version ^Change ^
 +|[[developer:​soap-1.3:​methods:​getsynclog|1.3]] | Method added in this release |
developer/soap-1.6/methods/getsynclog.txt ยท Last modified: 2012/08/04 11:30 by tem

Page Tools