Home » getPayoutGroup

getPayoutGroup

Description

Gets payout with given id

Attributes

FieldTypeDescription Required
advertiserIdintA unique number to identify an advertiserTrue
channelIdintA unique number to identify the channelTrue
campaignIdintA unique number to identify the campaignTrue
publisherIdintA unique number to identify the publisherTrue
dimensionIdintA unique number to identify the dimension. Default is 0.False

Samples

Java

import com.zedo.zapi.*;
import com.zedo.zapi.ZEDOAPIStub.*;
import java.lang.reflect.Method;
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;

public class GetPayoutGroupTest {

    public static void main(String[] args) {
        GetPayoutGroupTest.getPayoutGroupTest();
    }

    private static void getPayoutGroupTest() {
        
        try {
          
            ZEDOAPIStub stub = new ZEDOAPIStub("http://api.zedo.com/v8/?wsdl&java");
            
                stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "user", "zedoapi"),     "example@example.com");
                stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "password", "zedoapi"),     "password");
            stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "network", "zedoapi"),  "809");
          
            GetPayoutGroup getPayGroup = new GetPayoutGroup();
                
            ZEDOAPIStub.PayoutGroupKey pgKey = new ZEDOAPIStub.PayoutGroupKey();
            pgKey.setPublisherId(-3);
            pgKey.setAdvertiserId(476080);
            pgKey.setCampaignId(476081);
            pgKey.setChannelId(425276);
            pgKey.setDimensionId(1);
            getPayGroup.setParam0(pgKey);
            
            Thread.sleep(5000);
            PayoutGroup payoutGroup = stub.getPayoutGroup(getPayGroup).get_return();
            
            System.out.println("GET_PAYOUT_GROUP COMPLETE!");
            printObject(payoutGroup);
    
        } catch (Exception e) {
            System.err.println("ERROR: GET_PAYOUT_GROUP FAILED!");
            System.err.println("Exception: " + e.getMessage());
            if (e instanceof AxisFault) {
                AxisFault af = (AxisFault) e;
                System.err.println("AxisFault's detail: " + af.getDetail());
                af.printStackTrace();
            } else {
                e.printStackTrace();
            }
        }
    }
    
    public static void printObject(Object obj) {
        System.out.print(printObject(obj, 1));

PHP

include_once './zlib/ZEDOAPI.php';
        
        /**
         *Create Client Stub
         */
        $config = Array();
        $config['location'] = 'http://api.zedo.com/v8/?wsdl&php';       //URL of the SOAP server to send the request to
        $config['exceptions'] = true;                                                                                                   //Enable Exception Handling
        
        $stub = new ZEDOAPI($config);
        
        $header = Array();
        $header[0] = new SoapHeader('http://api.zedo.com','user', 'example@example.com');
        $header[1] = new SoapHeader('http://api.zedo.com','password', 'password');
        $header[2] = new SoapHeader('http://api.zedo.com','network','525');
        $header[3] = new SoapHeader('http://api.zedo.com','callinfo','zapiCall');
        
        $stub->__setSoapHeaders($header);
        
        /**
         *Define Call Parameters 
         */
        $payoutGroupKey = new PayoutGroupKey();
        $payoutGroupKey->advertiserId=1350037;
        $payoutGroupKey->campaignId=1350038;
        $payoutGroupKey->channelId=1350041;
        $payoutGroupKey->dimensionId=13;
        $payoutGroupKey->publisherId=1350039;
        
        $param = new getPayoutGroup($payoutGroupKey);
                
        /**
         *Execute API Call 
         */
        try {
                $response = $stub->getPayoutGroup($param);
        }catch (SoapFault $ex) {
          var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
                echo "GET PAYOUTGROUP FAILED\n";
            die();
        }
        
        /**
         * Response
         */
        $tmp = new getPayoutGroupResponse($response);
        $payoutGroup = $tmp->return;
        echo "GET PAYOUTGROUP COMPLETE - RESPONSE : \n";
        print_r($payoutGroup);

SOAP

Request

Response