soapy_bing 0.4.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +87 -0
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +19 -0
  5. data/lib/soapy_bing/accounts.rb +1 -1
  6. data/lib/soapy_bing/ads/campaign_performance_report.rb +2 -1
  7. data/lib/soapy_bing/ads/campaigns.rb +1 -1
  8. data/lib/soapy_bing/ads/report.rb +2 -1
  9. data/lib/soapy_bing/oauth_credentials.rb +6 -2
  10. data/lib/soapy_bing/service.rb +6 -2
  11. data/lib/soapy_bing/version.rb +1 -1
  12. data/lib/soapy_bing/wsdl/ad_insight.wsdl +1 -1
  13. data/lib/soapy_bing/wsdl/bulk.wsdl +1 -1
  14. data/lib/soapy_bing/wsdl/campaign_management.wsdl +1 -1
  15. data/lib/soapy_bing/wsdl/customer_billing.wsdl +1 -1
  16. data/lib/soapy_bing/wsdl/customer_management.wsdl +1 -1
  17. data/lib/soapy_bing/wsdl/reporting.wsdl +1 -1
  18. data/lib/tasks/upate_wsdl_files.rake +24 -7
  19. data/soapy_bing.gemspec +3 -3
  20. data/spec/fixtures/ads/campaign_performance_report.csv +8 -31
  21. data/spec/fixtures/ads/campaign_performance_report.json +5 -166
  22. data/spec/fixtures/ads/campaigns_by_account_id.csv +4 -7
  23. data/spec/fixtures/ads/campaigns_by_account_id.json +175 -718
  24. data/spec/fixtures/ads/campaigns_by_campaign_ids.csv +3 -5
  25. data/spec/fixtures/ads/campaigns_by_campaign_ids.json +112 -474
  26. data/spec/fixtures/vcr_cassettes/SoapyBing_Accounts/_list/returns_a_list_of_SoapyBing_Account_objects.yml +20 -20
  27. data/spec/fixtures/vcr_cassettes/SoapyBing_Ads/_campaigns/by_account_id/returns_parsed_rows.yml +61 -91
  28. data/spec/fixtures/vcr_cassettes/SoapyBing_Ads/_campaigns/by_campaign_ids/returns_parsed_rows.yml +60 -90
  29. data/spec/fixtures/vcr_cassettes/SoapyBing_CampaignManagement/_get_geo_locations/returns_a_list_of_geo_locations_hashes.yml +29 -25
  30. data/spec/fixtures/vcr_cassettes/campaign_performance_report/with_pending_status.yml +30 -28
  31. data/spec/fixtures/vcr_cassettes/campaign_performance_report/with_successful_empty_response.yml +37 -361
  32. data/spec/fixtures/vcr_cassettes/campaign_performance_report/with_successful_response.yml +45 -203
  33. data/spec/fixtures/vcr_cassettes/oauth_credentials/access_token/with_successful_status.yml +14 -8
  34. data/spec/integration/soapy_bing/accounts_spec.rb +1 -1
  35. data/spec/integration/soapy_bing/ads_campaigns_spec.rb +3 -4
  36. data/spec/soapy_bing/ads/campaign_performance_report_spec.rb +1 -3
  37. data/spec/soapy_bing/ads/campaigns_spec.rb +8 -10
  38. data/spec/soapy_bing/oauth_credentials_spec.rb +3 -4
  39. data/spec/soapy_bing/service_spec.rb +30 -2
  40. data/spec/spec_helper.rb +1 -0
  41. data/spec/support/vcr.rb +6 -4
  42. data/spec/wsdl/ad_insight.wsdl +1 -0
  43. data/spec/wsdl/bulk.wsdl +1 -0
  44. data/spec/wsdl/campaign_management.wsdl +1 -0
  45. data/spec/wsdl/customer_billing.wsdl +1 -0
  46. data/spec/wsdl/customer_management.wsdl +1 -0
  47. data/spec/wsdl/reporting.wsdl +1 -0
  48. metadata +39 -12
  49. data/circle.yml +0 -6
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://login.live.com/oauth20_token.srf
5
+ uri: https://login.live-int.com/oauth20_token.srf
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: client_id=bing-ads-oauth-client-id&client_secret=bing-ads-oauth-client-secret&grant_type=refresh_token&refresh_token=bing-ads-oauth-refresh-token
@@ -22,12 +22,14 @@ http_interactions:
22
22
  - no-store
23
23
  Pragma:
24
24
  - no-cache
25
- Content-Length:
26
- - '1509'
27
25
  Content-Type:
28
26
  - application/json
29
27
  Server:
30
28
  - Microsoft-IIS/8.5
29
+ Liveidtestresp:
30
+ - ''
31
+ Ppserver:
32
+ - 'PPV: 30 H: BY2INTIDSLGN11 V: 0'
31
33
  X-Content-Type-Options:
32
34
  - nosniff
33
35
  Strict-Transport-Security:
@@ -35,124 +37,31 @@ http_interactions:
35
37
  X-Xss-Protection:
36
38
  - 1; mode=block
37
39
  Date:
38
- - Wed, 07 Jun 2017 22:12:19 GMT
39
- Connection:
40
- - close
41
- body:
42
- encoding: UTF-8
43
- string: '{"token_type":"bearer","expires_in":3600,"scope":"bingads.manage","access_token":"bing-ads-oauth-authentication-token","refresh_token":"bing-ads-oauth-refresh-token","user_id":"bing-ads-oauth-user-id"}'
44
- http_version:
45
- recorded_at: Wed, 07 Jun 2017 22:12:19 GMT
46
- - request:
47
- method: post
48
- uri: https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V11/ReportingService.svc
49
- body:
50
- encoding: UTF-8
51
- string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
52
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v11"
53
- xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header><tns:Action>SubmitGenerateReport</tns:Action><tns:AuthenticationToken>bing-ads-oauth-authentication-token</tns:AuthenticationToken><tns:DeveloperToken>bing-ads-developer-token</tns:DeveloperToken><tns:CustomerAccountId>bing-ads-account-id</tns:CustomerAccountId></env:Header><env:Body><tns:SubmitGenerateReportRequest><tns:ReportRequest
54
- xsi:type="tns:CampaignPerformanceReportRequest"><tns:Format>Csv</tns:Format><tns:Language>English</tns:Language><tns:ReportName>MyReport</tns:ReportName><tns:ReturnOnlyCompletedData>false</tns:ReturnOnlyCompletedData><tns:Aggregation>Hourly</tns:Aggregation><tns:Columns><tns:CampaignPerformanceReportColumn>TimePeriod</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Impressions</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Clicks</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Spend</tns:CampaignPerformanceReportColumn></tns:Columns><tns:Scope><tns:AccountIds
55
- xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><a1:long>bing-ads-account-id</a1:long></tns:AccountIds></tns:Scope><tns:Time><tns:CustomDateRangeEnd><tns:Day>14</tns:Day><tns:Month>5</tns:Month><tns:Year>2017</tns:Year></tns:CustomDateRangeEnd><tns:CustomDateRangeStart><tns:Day>14</tns:Day><tns:Month>5</tns:Month><tns:Year>2017</tns:Year></tns:CustomDateRangeStart></tns:Time></tns:ReportRequest></tns:SubmitGenerateReportRequest></env:Body></env:Envelope>
56
- headers:
57
- Soapaction:
58
- - '"SubmitGenerateReport"'
59
- Content-Type:
60
- - text/xml;charset=UTF-8
40
+ - Fri, 25 Jan 2019 13:55:24 GMT
61
41
  Content-Length:
62
- - '2682'
63
- Accept-Encoding:
64
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
65
- Accept:
66
- - "*/*"
67
- User-Agent:
68
- - Ruby
69
- response:
70
- status:
71
- code: 200
72
- message: OK
73
- headers:
74
- Content-Type:
75
- - text/xml; charset=utf-8
76
- Vary:
77
- - Accept-Encoding
78
- Server:
79
- - Microsoft-IIS/8.5
80
- X-Powered-By:
81
- - ASP.NET
82
- Date:
83
- - Wed, 07 Jun 2017 22:12:20 GMT
84
- Content-Length:
85
- - '347'
86
- body:
87
- encoding: ASCII-8BIT
88
- string: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId
89
- xmlns:h="https://bingads.microsoft.com/Reporting/v11">bing-ads-report-tracking-id</h:TrackingId></s:Header><s:Body><SubmitGenerateReportResponse
90
- xmlns="https://bingads.microsoft.com/Reporting/v11"><ReportRequestId>bing-ads-report-request-id</ReportRequestId></SubmitGenerateReportResponse></s:Body></s:Envelope>
91
- http_version:
92
- recorded_at: Wed, 07 Jun 2017 22:12:20 GMT
93
- - request:
94
- method: post
95
- uri: https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V11/ReportingService.svc
42
+ - '1606'
96
43
  body:
97
44
  encoding: UTF-8
98
- string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
99
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v11"
100
- xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header><tns:Action>PollGenerateReport</tns:Action><tns:AuthenticationToken>bing-ads-oauth-authentication-token</tns:AuthenticationToken><tns:DeveloperToken>bing-ads-developer-token</tns:DeveloperToken><tns:CustomerAccountId>bing-ads-account-id</tns:CustomerAccountId></env:Header><env:Body><tns:PollGenerateReportRequest><tns:ReportRequestId>bing-ads-report-request-id</tns:ReportRequestId></tns:PollGenerateReportRequest></env:Body></env:Envelope>
101
- headers:
102
- Soapaction:
103
- - '"PollGenerateReport"'
104
- Content-Type:
105
- - text/xml;charset=UTF-8
106
- Content-Length:
107
- - '1666'
108
- Accept-Encoding:
109
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
110
- Accept:
111
- - "*/*"
112
- User-Agent:
113
- - Ruby
114
- response:
115
- status:
116
- code: 200
117
- message: OK
118
- headers:
119
- Content-Type:
120
- - text/xml; charset=utf-8
121
- Vary:
122
- - Accept-Encoding
123
- Server:
124
- - Microsoft-IIS/8.5
125
- X-Powered-By:
126
- - ASP.NET
127
- Date:
128
- - Wed, 07 Jun 2017 22:12:20 GMT
129
- Content-Length:
130
- - '407'
131
- body:
132
- encoding: ASCII-8BIT
133
- string: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId
134
- xmlns:h="https://bingads.microsoft.com/Reporting/v11">bing-ads-report-tracking-id</h:TrackingId></s:Header><s:Body><PollGenerateReportResponse
135
- xmlns="https://bingads.microsoft.com/Reporting/v11"><ReportRequestStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ReportDownloadUrl
136
- i:nil="true"/><Status>Pending</Status></ReportRequestStatus></PollGenerateReportResponse></s:Body></s:Envelope>
45
+ string: '{"token_type":"bearer","expires_in":3600,"scope":"bingads.manage","access_token":"bing-ads-oauth-authentication-token","refresh_token":"bing-ads-oauth-refresh-token","user_id":"bing-ads-oauth-user-id"}'
137
46
  http_version:
138
- recorded_at: Wed, 07 Jun 2017 22:12:22 GMT
47
+ recorded_at: Fri, 25 Jan 2019 13:55:24 GMT
139
48
  - request:
140
49
  method: post
141
- uri: https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V11/ReportingService.svc
50
+ uri: https://reporting.api.sandbox.bingads.microsoft.com/Api/Advertiser/Reporting/V12/ReportingService.svc
142
51
  body:
143
52
  encoding: UTF-8
144
53
  string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
145
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v11"
54
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v12"
146
55
  xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header><tns:Action>SubmitGenerateReport</tns:Action><tns:AuthenticationToken>bing-ads-oauth-authentication-token</tns:AuthenticationToken><tns:DeveloperToken>bing-ads-developer-token</tns:DeveloperToken><tns:CustomerAccountId>bing-ads-account-id</tns:CustomerAccountId></env:Header><env:Body><tns:SubmitGenerateReportRequest><tns:ReportRequest
147
- xsi:type="tns:CampaignPerformanceReportRequest"><tns:Format>Csv</tns:Format><tns:Language>English</tns:Language><tns:ReportName>MyReport</tns:ReportName><tns:ReturnOnlyCompletedData>false</tns:ReturnOnlyCompletedData><tns:Aggregation>Hourly</tns:Aggregation><tns:Columns><tns:CampaignPerformanceReportColumn>TimePeriod</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Impressions</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Clicks</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Spend</tns:CampaignPerformanceReportColumn></tns:Columns><tns:Scope><tns:AccountIds
148
- xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><a1:long>bing-ads-account-id</a1:long></tns:AccountIds></tns:Scope><tns:Time><tns:CustomDateRangeEnd><tns:Day>14</tns:Day><tns:Month>5</tns:Month><tns:Year>2017</tns:Year></tns:CustomDateRangeEnd><tns:CustomDateRangeStart><tns:Day>14</tns:Day><tns:Month>5</tns:Month><tns:Year>2017</tns:Year></tns:CustomDateRangeStart></tns:Time></tns:ReportRequest></tns:SubmitGenerateReportRequest></env:Body></env:Envelope>
56
+ xsi:type="tns:CampaignPerformanceReportRequest"><tns:Format>Csv</tns:Format><tns:Language>English</tns:Language><tns:ReportName>MyReport</tns:ReportName><tns:ReturnOnlyCompletedData>false</tns:ReturnOnlyCompletedData><tns:Aggregation>Hourly</tns:Aggregation><tns:Columns><tns:CampaignPerformanceReportColumn>CampaignName</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>TimePeriod</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Impressions</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Clicks</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Spend</tns:CampaignPerformanceReportColumn></tns:Columns><tns:Scope><tns:AccountIds
57
+ xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><a1:long>bing-ads-account-id</a1:long></tns:AccountIds></tns:Scope><tns:Time><tns:CustomDateRangeEnd><tns:Day>23</tns:Day><tns:Month>1</tns:Month><tns:Year>2019</tns:Year></tns:CustomDateRangeEnd><tns:CustomDateRangeStart><tns:Day>23</tns:Day><tns:Month>1</tns:Month><tns:Year>2019</tns:Year></tns:CustomDateRangeStart></tns:Time><tns:ReportTimeZone>GreenwichMeanTimeDublinEdinburghLisbonLondon</tns:ReportTimeZone></tns:ReportRequest></tns:SubmitGenerateReportRequest></env:Body></env:Envelope>
149
58
  headers:
150
59
  Soapaction:
151
60
  - '"SubmitGenerateReport"'
152
61
  Content-Type:
153
62
  - text/xml;charset=UTF-8
154
63
  Content-Length:
155
- - '2682'
64
+ - '2915'
156
65
  Accept-Encoding:
157
66
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
158
67
  Accept:
@@ -169,27 +78,27 @@ http_interactions:
169
78
  Vary:
170
79
  - Accept-Encoding
171
80
  Server:
172
- - Microsoft-IIS/8.5
81
+ - Microsoft-IIS/10.0
173
82
  X-Powered-By:
174
83
  - ASP.NET
175
84
  Date:
176
- - Wed, 07 Jun 2017 22:12:24 GMT
85
+ - Fri, 25 Jan 2019 13:55:26 GMT
177
86
  Content-Length:
178
- - '348'
87
+ - '343'
179
88
  body:
180
89
  encoding: ASCII-8BIT
181
90
  string: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId
182
- xmlns:h="https://bingads.microsoft.com/Reporting/v11">bing-ads-report-tracking-id</h:TrackingId></s:Header><s:Body><SubmitGenerateReportResponse
183
- xmlns="https://bingads.microsoft.com/Reporting/v11"><ReportRequestId>bing-ads-report-request-id</ReportRequestId></SubmitGenerateReportResponse></s:Body></s:Envelope>
91
+ xmlns:h="https://bingads.microsoft.com/Reporting/v12">bing-ads-report-tracking-id</h:TrackingId></s:Header><s:Body><SubmitGenerateReportResponse
92
+ xmlns="https://bingads.microsoft.com/Reporting/v12"><ReportRequestId>bing-ads-report-request-id</ReportRequestId></SubmitGenerateReportResponse></s:Body></s:Envelope>
184
93
  http_version:
185
- recorded_at: Wed, 07 Jun 2017 22:12:25 GMT
94
+ recorded_at: Fri, 25 Jan 2019 13:55:26 GMT
186
95
  - request:
187
96
  method: post
188
- uri: https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V11/ReportingService.svc
97
+ uri: https://reporting.api.sandbox.bingads.microsoft.com/Api/Advertiser/Reporting/V12/ReportingService.svc
189
98
  body:
190
99
  encoding: UTF-8
191
100
  string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
192
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v11"
101
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v12"
193
102
  xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header><tns:Action>PollGenerateReport</tns:Action><tns:AuthenticationToken>bing-ads-oauth-authentication-token</tns:AuthenticationToken><tns:DeveloperToken>bing-ads-developer-token</tns:DeveloperToken><tns:CustomerAccountId>bing-ads-account-id</tns:CustomerAccountId></env:Header><env:Body><tns:PollGenerateReportRequest><tns:ReportRequestId>bing-ads-report-request-id</tns:ReportRequestId></tns:PollGenerateReportRequest></env:Body></env:Envelope>
194
103
  headers:
195
104
  Soapaction:
@@ -197,7 +106,7 @@ http_interactions:
197
106
  Content-Type:
198
107
  - text/xml;charset=UTF-8
199
108
  Content-Length:
200
- - '1666'
109
+ - '1725'
201
110
  Accept-Encoding:
202
111
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
203
112
  Accept:
@@ -214,75 +123,28 @@ http_interactions:
214
123
  Vary:
215
124
  - Accept-Encoding
216
125
  Server:
217
- - Microsoft-IIS/8.5
126
+ - Microsoft-IIS/10.0
218
127
  X-Powered-By:
219
128
  - ASP.NET
220
129
  Date:
221
- - Wed, 07 Jun 2017 22:12:25 GMT
130
+ - Fri, 25 Jan 2019 13:55:26 GMT
222
131
  Content-Length:
223
- - '408'
132
+ - '406'
224
133
  body:
225
134
  encoding: ASCII-8BIT
226
135
  string: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId
227
- xmlns:h="https://bingads.microsoft.com/Reporting/v11">bing-ads-report-tracking-id</h:TrackingId></s:Header><s:Body><PollGenerateReportResponse
228
- xmlns="https://bingads.microsoft.com/Reporting/v11"><ReportRequestStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ReportDownloadUrl
136
+ xmlns:h="https://bingads.microsoft.com/Reporting/v12">bing-ads-report-tracking-id</h:TrackingId></s:Header><s:Body><PollGenerateReportResponse
137
+ xmlns="https://bingads.microsoft.com/Reporting/v12"><ReportRequestStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ReportDownloadUrl
229
138
  i:nil="true"/><Status>Pending</Status></ReportRequestStatus></PollGenerateReportResponse></s:Body></s:Envelope>
230
139
  http_version:
231
- recorded_at: Wed, 07 Jun 2017 22:12:26 GMT
140
+ recorded_at: Fri, 25 Jan 2019 13:55:27 GMT
232
141
  - request:
233
142
  method: post
234
- uri: https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V11/ReportingService.svc
143
+ uri: https://reporting.api.sandbox.bingads.microsoft.com/Api/Advertiser/Reporting/V12/ReportingService.svc
235
144
  body:
236
145
  encoding: UTF-8
237
146
  string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
238
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v11"
239
- xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header><tns:Action>SubmitGenerateReport</tns:Action><tns:AuthenticationToken>bing-ads-oauth-authentication-token</tns:AuthenticationToken><tns:DeveloperToken>bing-ads-developer-token</tns:DeveloperToken><tns:CustomerAccountId>bing-ads-account-id</tns:CustomerAccountId></env:Header><env:Body><tns:SubmitGenerateReportRequest><tns:ReportRequest
240
- xsi:type="tns:CampaignPerformanceReportRequest"><tns:Format>Csv</tns:Format><tns:Language>English</tns:Language><tns:ReportName>MyReport</tns:ReportName><tns:ReturnOnlyCompletedData>false</tns:ReturnOnlyCompletedData><tns:Aggregation>Hourly</tns:Aggregation><tns:Columns><tns:CampaignPerformanceReportColumn>TimePeriod</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Impressions</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Clicks</tns:CampaignPerformanceReportColumn><tns:CampaignPerformanceReportColumn>Spend</tns:CampaignPerformanceReportColumn></tns:Columns><tns:Scope><tns:AccountIds
241
- xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"><a1:long>bing-ads-account-id</a1:long></tns:AccountIds></tns:Scope><tns:Time><tns:CustomDateRangeEnd><tns:Day>14</tns:Day><tns:Month>5</tns:Month><tns:Year>2017</tns:Year></tns:CustomDateRangeEnd><tns:CustomDateRangeStart><tns:Day>14</tns:Day><tns:Month>5</tns:Month><tns:Year>2017</tns:Year></tns:CustomDateRangeStart></tns:Time></tns:ReportRequest></tns:SubmitGenerateReportRequest></env:Body></env:Envelope>
242
- headers:
243
- Soapaction:
244
- - '"SubmitGenerateReport"'
245
- Content-Type:
246
- - text/xml;charset=UTF-8
247
- Content-Length:
248
- - '2682'
249
- Accept-Encoding:
250
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
251
- Accept:
252
- - "*/*"
253
- User-Agent:
254
- - Ruby
255
- response:
256
- status:
257
- code: 200
258
- message: OK
259
- headers:
260
- Content-Type:
261
- - text/xml; charset=utf-8
262
- Vary:
263
- - Accept-Encoding
264
- Server:
265
- - Microsoft-IIS/8.5
266
- X-Powered-By:
267
- - ASP.NET
268
- Date:
269
- - Wed, 07 Jun 2017 22:12:28 GMT
270
- Content-Length:
271
- - '345'
272
- body:
273
- encoding: ASCII-8BIT
274
- string: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId
275
- xmlns:h="https://bingads.microsoft.com/Reporting/v11">bing-ads-report-tracking-id</h:TrackingId></s:Header><s:Body><SubmitGenerateReportResponse
276
- xmlns="https://bingads.microsoft.com/Reporting/v11"><ReportRequestId>bing-ads-report-request-id</ReportRequestId></SubmitGenerateReportResponse></s:Body></s:Envelope>
277
- http_version:
278
- recorded_at: Wed, 07 Jun 2017 22:12:29 GMT
279
- - request:
280
- method: post
281
- uri: https://reporting.api.bingads.microsoft.com/Api/Advertiser/Reporting/V11/ReportingService.svc
282
- body:
283
- encoding: UTF-8
284
- string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
285
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v11"
147
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://bingads.microsoft.com/Reporting/v12"
286
148
  xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header><tns:Action>PollGenerateReport</tns:Action><tns:AuthenticationToken>bing-ads-oauth-authentication-token</tns:AuthenticationToken><tns:DeveloperToken>bing-ads-developer-token</tns:DeveloperToken><tns:CustomerAccountId>bing-ads-account-id</tns:CustomerAccountId></env:Header><env:Body><tns:PollGenerateReportRequest><tns:ReportRequestId>bing-ads-report-request-id</tns:ReportRequestId></tns:PollGenerateReportRequest></env:Body></env:Envelope>
287
149
  headers:
288
150
  Soapaction:
@@ -290,7 +152,7 @@ http_interactions:
290
152
  Content-Type:
291
153
  - text/xml;charset=UTF-8
292
154
  Content-Length:
293
- - '1666'
155
+ - '1725'
294
156
  Accept-Encoding:
295
157
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
296
158
  Accept:
@@ -307,23 +169,23 @@ http_interactions:
307
169
  Vary:
308
170
  - Accept-Encoding
309
171
  Server:
310
- - Microsoft-IIS/8.5
172
+ - Microsoft-IIS/10.0
311
173
  X-Powered-By:
312
174
  - ASP.NET
313
175
  Date:
314
- - Wed, 07 Jun 2017 22:12:29 GMT
176
+ - Fri, 25 Jan 2019 13:57:29 GMT
315
177
  Content-Length:
316
- - '1531'
178
+ - '1341'
317
179
  body:
318
180
  encoding: ASCII-8BIT
319
181
  string: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:TrackingId
320
- xmlns:h="https://bingads.microsoft.com/Reporting/v11">bing-ads-report-tracking-id</h:TrackingId></s:Header><s:Body><PollGenerateReportResponse
321
- xmlns="https://bingads.microsoft.com/Reporting/v11"><ReportRequestStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ReportDownloadUrl>https://dvsrdl.api.bingads.microsoft.com/ReportDownload/Download.aspx?q=bing-ads-report-download-id</ReportDownloadUrl><Status>Success</Status></ReportRequestStatus></PollGenerateReportResponse></s:Body></s:Envelope>
182
+ xmlns:h="https://bingads.microsoft.com/Reporting/v12">bing-ads-report-tracking-id</h:TrackingId></s:Header><s:Body><PollGenerateReportResponse
183
+ xmlns="https://bingads.microsoft.com/Reporting/v12"><ReportRequestStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ReportDownloadUrl>https://dvsrdl.api.si.bingads.microsoft.com/ReportDownload/Download.aspx?q=bing-ads-report-download-id</ReportDownloadUrl><Status>Success</Status></ReportRequestStatus></PollGenerateReportResponse></s:Body></s:Envelope>
322
184
  http_version:
323
- recorded_at: Wed, 07 Jun 2017 22:12:31 GMT
185
+ recorded_at: Fri, 25 Jan 2019 13:57:29 GMT
324
186
  - request:
325
187
  method: get
326
- uri: https://dvsrdl.api.bingads.microsoft.com/ReportDownload/Download.aspx?q=bing-ads-report-download-id
188
+ uri: https://dvsrdl.api.si.bingads.microsoft.com/ReportDownload/Download.aspx?q=bing-ads-report-download-id
327
189
  body:
328
190
  encoding: US-ASCII
329
191
  string: ''
@@ -342,11 +204,11 @@ http_interactions:
342
204
  Cache-Control:
343
205
  - private
344
206
  Content-Length:
345
- - '920'
207
+ - '680'
346
208
  Content-Type:
347
209
  - application/x-zip-compressed
348
210
  Server:
349
- - Microsoft-IIS/8.5
211
+ - Microsoft-IIS/10.0
350
212
  Content-Disposition:
351
213
  - attachment; filename="MyReport.zip"
352
214
  X-Aspnet-Version:
@@ -354,31 +216,11 @@ http_interactions:
354
216
  X-Powered-By:
355
217
  - ASP.NET
356
218
  Date:
357
- - Wed, 07 Jun 2017 22:12:32 GMT
219
+ - Fri, 25 Jan 2019 13:57:29 GMT
358
220
  body:
359
221
  encoding: ASCII-8BIT
360
222
  string: !binary |-
361
- UEsDBBQAAAAIAI95x0o7OJxUQgIAAFIFAAAVAFIAMzAwMDAwMDA3NjgzNzM0
362
- MDguY3N2TlUwAE5VQ1gVADMAMAAwADAAMAAwADAAMAA3ADYAOAAzADcAMwA0
363
- ADAAOAAuAGMAcwB2AHVwGgAB0h3aWjMwMDAwMDAwNzY4MzczNDA4LmNzdoRU
364
- S47UMBDdI3EHq1cgMW6X/86uNYhhJBqNYMSCXeg2TUQ6aTnpQXMkzsACiQtx
365
- BVzlQUI4gkXs2H71XO+V7Z/fvq/exNOYZva6PcaGbe/LcPX40e+F2w4XzBr0
366
- WgpwuIJT7P045Pl3berG84Szr9ppZpfj8dTHOe7Z5q7t+vZDH9nz9r5hdu0o
367
- nvnGmEYIdrNlT662t0//GfpyPKf/xD6kuTkcUjy0czcODYX193+svuj6OWYm
368
- nLoZ5zjMXduz62H3sGfOcW4bNqdzpKjxy9QwqfN/Hl1l4jF17ZBBcfVshey5
369
- uz6eUpymvOGUR5d9t/uMP29PcdgjCWZ8IcwF6Dwr8ie1N7kD4XzuguU6VDhA
370
- nDEFF6DgnKlwkvhswXmKFJp7XQEVEQLiITMioeJQb0wUwSPOB6R1i3S0ofaY
371
- mFPYGsOVq2AW9wkoWhvKQnJZoxwiA5qhIFCeXMsKhes6OBIsKEueDfwbhfFa
372
- EUp6SpL72jZAAqXRFPCYJCju68QAlSlBpllX2ATUMKoCeQZSFtiCTFBkJ7aK
373
- KqYcV7XO0hg6I06iHhO4WaCjGlhLHlNFneFu4SiRPqtkORzYBVhUSwp9sQ0E
374
- WuQlt6IGUqk0mQhOUBgYDgvOYFrKG1uMDiQPuFT1QaaKgBVFFOUgBQ/17rLc
375
- jXLmtVDlivBQCyq1cA4DrKXTnS9RnaUkjuCoPiTH5Lthy63/8ZWenG23S+M0
376
- fsT3KeW3hF4YzjZ9z1J3+DRPLD8CMd3FPcfX5RcAAAD//wMAUEsBAi0AFAAA
377
- AAgAj3nHSjs4nFRCAgAAUgUAABUAeAAAAAAAAAAAAAAAAAAAADMwMDAwMDAw
378
- NzY4MzczNDA4LmNzdk5VMgBOVUNYFQAAADMAMAAwADAAMAAwADAAMAA3ADYA
379
- OAAzADcAMwA0ADAAOAAuAGMAcwB2AAoAIAAAAAAAAQAYANfPkSfb39IB18+R
380
- J9vf0gGQWpEn29/SAXVwGgAB0h3aWjMwMDAwMDAwNzY4MzczNDA4LmNzdlBL
381
- BQYAAAAAAQABALsAAADHAgAAAAA=
223
+ UEsDBBQAAAAIAO4uOU4fitkBUgEAAB8CAAAVAFIAMzAwMDAwMDAwMDE1NjI4MDEuY3N2TlUwAE5VQ1gVADMAMAAwADAAMAAwADAAMAAwADAAMQA1ADYAMgA4ADAAMQAuAGMAcwB2AHVwGgABcOymrzMwMDAwMDAwMDAxNTYyODAxLmNzdoWRz07CQBDG7ya+w8hJIoGWCmpvFaOSWEOAePC2tGPZsH+a3QXSxBfyGTiY+EK+grMLGk96me7Mt7Pf/Kafu/fWFGttHDwyiSnkzT5tHR99C3PuhbjXT3r9KL7yii/Bs1ZUP73L52dRnEZRGzJpHZqSyQ5coxFchS/FqZbYgZnTxWqpBclPHJVi/qkHZh2MtKwFOiwh2zAu2EIg3LAmuA6CK8RpMiATmOTBsv1n771em/+aD3RZVRmsmONapaFPNL/UWy6IKAVfmmiHynEmYKyKgylN6VgKzqwxdOmtJV86UjJisma8Un6xrU7Y2QQN1yUlY1kbtJZMLWUjwYuVP8xqVGUg03oFzIFsgPwN91BbXFju8ITu/fwMiPvE5dGy/DWOSbpIzikml0OKw6ibDPbDfLyF6zkvjLb6xa/NEGHg7kImBBheLZ0FGgvNBsuuZ/4CUEsBAi0AFAAAAAgA7i45Th+K2QFSAQAAHwIAABUAeAAAAAAAAAAAAAAAAAAAADMwMDAwMDAwMDAxNTYyODAxLmNzdk5VMgBOVUNYFQAAADMAMAAwADAAMAAwADAAMAAwADAAMQA1ADYAMgA4ADAAMQAuAGMAcwB2AAoAIAAAAAAAAQAYADgN8aG1tNQBOA3xobW01AE4DfGhtbTUAXVwGgABcOymrzMwMDAwMDAwMDAxNTYyODAxLmNzdlBLBQYAAAAAAQABALsAAADXAQAAAAA=
382
224
  http_version:
383
- recorded_at: Wed, 07 Jun 2017 22:12:32 GMT
384
- recorded_with: VCR 3.0.3
225
+ recorded_at: Fri, 25 Jan 2019 13:57:30 GMT
226
+ recorded_with: VCR 4.0.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://login.live.com/oauth20_token.srf
5
+ uri: https://login.live-int.com/oauth20_token.srf
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: client_id=bing-ads-oauth-client-id&client_secret=bing-ads-oauth-client-secret&grant_type=refresh_token&refresh_token=bing-ads-oauth-refresh-token
@@ -22,21 +22,27 @@ http_interactions:
22
22
  - no-store
23
23
  Pragma:
24
24
  - no-cache
25
- Content-Length:
26
- - '1317'
27
25
  Content-Type:
28
26
  - application/json
29
27
  Server:
30
28
  - Microsoft-IIS/8.5
29
+ Liveidtestresp:
30
+ - ''
31
+ Ppserver:
32
+ - 'PPV: 30 H: BY2INTIDSLGN11 V: 0'
31
33
  X-Content-Type-Options:
32
34
  - nosniff
35
+ Strict-Transport-Security:
36
+ - max-age=31536000
37
+ X-Xss-Protection:
38
+ - 1; mode=block
33
39
  Date:
34
- - Fri, 13 Nov 2015 14:23:33 GMT
35
- Connection:
36
- - close
40
+ - Thu, 24 Jan 2019 11:47:30 GMT
41
+ Content-Length:
42
+ - '1630'
37
43
  body:
38
44
  encoding: UTF-8
39
45
  string: '{"token_type":"bearer","expires_in":3600,"scope":"bingads.manage","access_token":"bing-ads-oauth-authentication-token","refresh_token":"bing-ads-oauth-refresh-token","user_id":"bing-ads-oauth-user-id"}'
40
46
  http_version:
41
- recorded_at: Fri, 13 Nov 2015 14:23:33 GMT
42
- recorded_with: VCR 3.0.0
47
+ recorded_at: Thu, 24 Jan 2019 11:47:31 GMT
48
+ recorded_with: VCR 4.0.0
@@ -7,7 +7,7 @@ RSpec.describe SoapyBing::Accounts do
7
7
  subject(:list) { instance.list }
8
8
 
9
9
  it 'returns a list of SoapyBing::Account objects' do
10
- expect(list.size).to eq(3)
10
+ expect(list.size).to eq(1)
11
11
  expect(list).to all(be_an_instance_of(SoapyBing::Account))
12
12
  end
13
13
  end
@@ -39,10 +39,9 @@ RSpec.describe SoapyBing::Ads do
39
39
  end
40
40
 
41
41
  describe '#campaign_performance_report' do
42
- let(:date) { '2016-10-14' }
42
+ let(:date) { '2019-01-22' }
43
43
  let(:settings) do
44
- # CampaignName is considered to be a sensitive data, lets not record it
45
- { columns: %w[TimePeriod Impressions Clicks Spend] }
44
+ { columns: %w[CampaignName TimePeriod Impressions Clicks Spend] }
46
45
  end
47
46
  let(:params) do
48
47
  {
@@ -61,7 +60,7 @@ RSpec.describe SoapyBing::Ads do
61
60
  end
62
61
 
63
62
  context 'when there is a successful response during polling' do
64
- let(:date) { '2017-05-14' }
63
+ let(:date) { '2019-01-23' }
65
64
 
66
65
  it 'responds with report rows',
67
66
  vcr: { cassette_name: 'campaign_performance_report/with_successful_response' } do
@@ -45,9 +45,7 @@ RSpec.describe SoapyBing::Ads::CampaignPerformanceReport do
45
45
 
46
46
  before do
47
47
  allow(SoapyBing::Service).to receive(:reporting).and_return(service_double)
48
- allow(service_double).to receive(:submit_generate_report) do
49
- { report_request_id: '123' }
50
- end
48
+ allow(service_double).to receive(:submit_generate_report).and_return(report_request_id: '123')
51
49
  allow(service_double).to receive(:poll_generate_report) do
52
50
  {
53
51
  report_request_status: { status: status }