Set Subscription Status

Parameter name

Datatype

Description

Command

const char *

The command. Must be SetSubscriptionStatus.

OfferID

const char *

The identifier of the offer.

SubscriptionStatus

const char *

Subscription status. Possible values are "T" (enabled), "V" (hidden), and "D" (disabled).

Example: Set subscription status [hide]

    void SetSubscriptionStatus(const char * szOfferID, const char * szStatus)
    {
        using namespace O2G2;
        O2G2Ptr<IO2GRequestFactory> factory = mSession->getRequestFactory();
        O2G2Ptr<IO2GValueMap> valuemap = factory->createValueMap();
        valuemap->setString(O2GRequestParamsEnum::Command, Commands::SetSubscriptionStatus);
        valuemap->setString(O2GRequestParamsEnum::OfferID, szOfferID);
        valuemap->setString(O2GRequestParamsEnum::SubscriptionStatus, szStatus);
        O2G2Ptr<IO2GRequest> request = factory->createOrderRequest(valuemap);
        mSession->sendRequest(request);
    }

back