Created
June 19, 2013 15:15
-
-
Save andyjeffries/5815114 to your computer and use it in GitHub Desktop.
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
» CustomerManagementRenewal.find_simple_offer("413AIJ") | |
HTTPI GET request to cmr-integration-lb.which.co.uk (httpclient) | |
SOAP request: https://cmr-integration-lb.which.co.uk/marketing-services | |
SOAPAction: "", Content-Type: text/xml;charset=UTF-8, Content-Length: 400 | |
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="which-cmr-1.0" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:findSimpleOffer><simpleOfferQuery><advertCode>413AIJ</advertCode><channel>WEB</channel></simpleOfferQuery></tns:findSimpleOffer></env:Body></env:Envelope> | |
HTTPI POST request to cmr-integration-lb.which.co.uk (httpclient) | |
SOAP response (status 200) | |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:findSimpleOfferResponse xmlns:ns2="which-cmr-1.0"><campaignedOffers><campaignedOffer><campaignId>1110</campaignId><campaignName>5KY975</campaignName><offerId>1655</offerId><offerType>TRIAL</offerType><offerName>£5.00 WJL Test Online</offerName><productNames><productName>Which? </productName><productName>which.co.uk</productName><productName>Which? Legal Consumer Advice </productName></productNames><oneOffPrice><amount>500</amount><currencyId>0</currencyId><priceId>3534</priceId><trial>true</trial></oneOffPrice><offerInformationURL></offerInformationURL><recurringPrices><recurringPrice><amount>975</amount><currencyId>0</currencyId><priceId>3535</priceId><trial>false</trial><deferredStartCount>1</deferredStartCount><deferredStartUnit>MONTH</deferredStartUnit><frequency><description>Monthly</description><frequencyCount>1</frequencyCount><frequencyId>0</frequencyId><frequencyTimeUnit>MONTH</frequencyTimeUnit></frequency></recurringPrice></recurringPrices><subscribable>true</subscribable></campaignedOffer></campaignedOffers></ns2:findSimpleOfferResponse></soap:Body></soap:Envelope> | |
=> { | |
:find_simple_offer_response => { | |
:campaigned_offers => { | |
:campaigned_offer => { | |
:campaign_id => "1110", | |
:campaign_name => "5KY975", | |
:offer_id => "1655", | |
:offer_type => "TRIAL", | |
:offer_name => "£5.00 WJL Test Online", | |
:product_names => { | |
:product_name => [ | |
[0] "Which? ", | |
[1] "which.co.uk", | |
[2] "Which? Legal Consumer Advice " | |
] | |
}, | |
:one_off_price => { | |
:amount => "500", | |
:currency_id => "0", | |
:price_id => "3534", | |
:trial => true | |
}, | |
:offer_information_url => nil, | |
:recurring_prices => { | |
:recurring_price => { | |
:amount => "975", | |
:currency_id => "0", | |
:price_id => "3535", | |
:trial => false, | |
:deferred_start_count => "1", | |
:deferred_start_unit => "MONTH", | |
:frequency => { | |
:description => "Monthly", | |
:frequency_count => "1", | |
:frequency_id => "0", | |
:frequency_time_unit => "MONTH" | |
} | |
} | |
}, | |
:subscribable => true | |
} | |
}, | |
:"@xmlns:ns2" => "which-cmr-1.0" | |
} | |
} | |
» CustomerManagementRenewal.get_campaign("1110") | |
HTTPI GET request to cmr-integration-lb.which.co.uk (httpclient) | |
SOAP request: https://cmr-integration-lb.which.co.uk/marketing-services | |
SOAPAction: "", Content-Type: text/xml;charset=UTF-8, Content-Length: 331 | |
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="which-cmr-1.0" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:getCampaign><campaignId>1110</campaignId></tns:getCampaign></env:Body></env:Envelope> | |
HTTPI POST request to cmr-integration-lb.which.co.uk (httpclient) | |
SOAP response (status 200) | |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getCampaignResponse xmlns:ns2="which-cmr-1.0"><campaign><campaignId>1110</campaignId><name>5KY975</name><startDate>2013-05-02T00:00:00+01:00</startDate><customerGroupIds><customerGroupId>16</customerGroupId><customerGroupId>18</customerGroupId></customerGroupIds><advertIds><advertId>3704</advertId></advertIds><offerIds><offerId>1655</offerId></offerIds><mandatoryOfferTypes><mandatoryOfferType>TRIAL</mandatoryOfferType></mandatoryOfferTypes><onlineCMSOfferTemplate><id>253349</id><name>Which? Online and Legal offer</name></onlineCMSOfferTemplate><onlineCMSEmailTemplate><id>257187</id><name>Online entry - WJL1 product</name></onlineCMSEmailTemplate><campaignCommissions/></campaign></ns2:getCampaignResponse></soap:Body></soap:Envelope> | |
=> { | |
:get_campaign_response => { | |
:campaign => { | |
:campaign_id => "1110", | |
:name => "5KY975", | |
:start_date => Thu, 02 May 2013 00:00:00 +0100, | |
:customer_group_ids => { | |
:customer_group_id => [ | |
[0] "16", | |
[1] "18" | |
] | |
}, | |
:advert_ids => { | |
:advert_id => "3704" | |
}, | |
:offer_ids => { | |
:offer_id => "1655" | |
}, | |
:mandatory_offer_types => { | |
:mandatory_offer_type => "TRIAL" | |
}, | |
:online_cms_offer_template => { | |
:id => "253349", | |
:name => "Which? Online and Legal offer" | |
}, | |
:online_cms_email_template => { | |
:id => "257187", | |
:name => "Online entry - WJL1 product" | |
}, | |
:campaign_commissions => nil | |
}, | |
:"@xmlns:ns2" => "which-cmr-1.0" | |
} | |
} | |
» CustomerManagementRenewal.get_advert_by_code("413AIJ") | |
HTTPI GET request to cmr-integration-lb.which.co.uk (httpclient) | |
SOAP request: https://cmr-integration-lb.which.co.uk/marketing-services | |
SOAPAction: "", Content-Type: text/xml;charset=UTF-8, Content-Length: 341 | |
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="which-cmr-1.0" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:getAdvertByCode><advertCode>413AIJ</advertCode></tns:getAdvertByCode></env:Body></env:Envelope> | |
HTTPI POST request to cmr-integration-lb.which.co.uk (httpclient) | |
SOAP response (status 200) | |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getAdvertByCodeResponse xmlns:ns2="which-cmr-1.0"><advert><advertDate>2013-05-02T00:00:00+01:00</advertDate><advertId>3704</advertId><campaignId>1110</campaignId><channels><channel>WEB</channel></channels><code>413AIJ</code><ddiNumber></ddiNumber><description>£5 WJL1 for 1 month - Ongoing £9.75</description><mediaSourceId>1466</mediaSourceId><mediaSourceName>PPC Test</mediaSourceName><startUseDate>2013-05-02T00:00:00+01:00</startUseDate></advert></ns2:getAdvertByCodeResponse></soap:Body></soap:Envelope> | |
=> { | |
:get_advert_by_code_response => { | |
:advert => { | |
:advert_date => Thu, 02 May 2013 00:00:00 +0100, | |
:advert_id => "3704", | |
:campaign_id => "1110", | |
:channels => { | |
:channel => "WEB" | |
}, | |
:code => "413AIJ", | |
:ddi_number => nil, | |
:description => "£5 WJL1 for 1 month - Ongoing £9.75", | |
:media_source_id => "1466", | |
:media_source_name => "PPC Test", | |
:start_use_date => Thu, 02 May 2013 00:00:00 +0100 | |
}, | |
:"@xmlns:ns2" => "which-cmr-1.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment