adcenter-client 7.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/.autotest +23 -0
  2. data/History.txt +6 -0
  3. data/Manifest.txt +55 -0
  4. data/README.txt +78 -0
  5. data/Rakefile.rb +31 -0
  6. data/TODO +12 -0
  7. data/bin/gen_wsdl_drivers.rb +26 -0
  8. data/bin/wsdl.yml +16 -0
  9. data/lib/AdministrationService.rb +79 -0
  10. data/lib/AdministrationServiceClient.rb +40 -0
  11. data/lib/AdministrationServiceDriver.rb +55 -0
  12. data/lib/AdministrationServiceMappingRegistry.rb +148 -0
  13. data/lib/CampaignManagementService.rb +3458 -0
  14. data/lib/CampaignManagementServiceClient.rb +1370 -0
  15. data/lib/CampaignManagementServiceDriver.rb +719 -0
  16. data/lib/CampaignManagementServiceMappingRegistry.rb +5107 -0
  17. data/lib/CustomerBillingService.rb +390 -0
  18. data/lib/CustomerBillingServiceClient.rb +126 -0
  19. data/lib/CustomerBillingServiceDriver.rb +95 -0
  20. data/lib/CustomerBillingServiceMappingRegistry.rb +676 -0
  21. data/lib/CustomerManagementService.rb +1284 -0
  22. data/lib/CustomerManagementServiceClient.rb +282 -0
  23. data/lib/CustomerManagementServiceDriver.rb +175 -0
  24. data/lib/CustomerManagementServiceMappingRegistry.rb +1471 -0
  25. data/lib/NotificationManagementClient.rb +89 -0
  26. data/lib/ReportingService.rb +2121 -0
  27. data/lib/ReportingServiceClient.rb +42 -0
  28. data/lib/ReportingServiceDriver.rb +55 -0
  29. data/lib/ReportingServiceMappingRegistry.rb +3164 -0
  30. data/lib/SecureDataManagementService.rb +203 -0
  31. data/lib/SecureDataManagementServiceClient.rb +26 -0
  32. data/lib/SecureDataManagementServiceDriver.rb +47 -0
  33. data/lib/SecureDataManagementServiceMappingRegistry.rb +376 -0
  34. data/lib/adcenter_client.rb +103 -0
  35. data/lib/adcenter_service.rb +70 -0
  36. data/lib/administration_service.rb +7 -0
  37. data/lib/campaign_management_service.rb +7 -0
  38. data/lib/custom_assertions.rb +5 -0
  39. data/lib/custom_exceptions.rb +1 -0
  40. data/lib/customer_billing_service.rb +7 -0
  41. data/lib/customer_management_service.rb +9 -0
  42. data/lib/default.rb +636 -0
  43. data/lib/defaultDriver.rb +63 -0
  44. data/lib/defaultMappingRegistry.rb +525 -0
  45. data/lib/notification_management.rb +7 -0
  46. data/lib/reporting_service.rb +7 -0
  47. data/lib/secure_data_management_service.rb +7 -0
  48. data/tasks/doctask.rake +9 -0
  49. data/tasks/testtask.rake +13 -0
  50. data/test/adcenter_client_test.rb +13 -0
  51. data/test/administration_service_test.rb +19 -0
  52. data/test/customer_management_service_test.rb +20 -0
  53. data/test/report_service_test.rb +34 -0
  54. data/test/test_credentials.yml-sample +7 -0
  55. data/test/test_helper.rb +8 -0
  56. metadata +188 -0
@@ -0,0 +1,103 @@
1
+ $: << File.expand_path(File.dirname(__FILE__))
2
+
3
+ require 'rubygems'
4
+ begin
5
+ gem 'soap4r'
6
+ rescue
7
+ require_gem 'soap4r'
8
+ end
9
+
10
+ require 'soap/wsdlDriver'
11
+ require 'soap/header/simplehandler'
12
+ require 'soap/baseData'
13
+
14
+ require 'administration_service'
15
+ require 'campaign_management_service'
16
+ require 'customer_billing_service'
17
+ require 'customer_management_service'
18
+ require 'notification_management'
19
+ require 'reporting_service'
20
+ require 'secure_data_management_service'
21
+
22
+ class AdCenterClient
23
+ VERSION = '7.0.1'
24
+ include SOAP::RPC
25
+
26
+ attr_accessor :options
27
+ # connection to administration service
28
+ attr_accessor :administration_service
29
+ # connection to campaign management service
30
+ attr_accessor :campaign_management_service
31
+ # connection to customer billing service
32
+ attr_accessor :customer_billing_service
33
+ # connection to customer management service
34
+ attr_accessor :customer_management_service
35
+ # connection to notification management
36
+ attr_accessor :notification_management
37
+ # connection to reporting service
38
+ attr_accessor :reporting_service
39
+ # connection to secure data management service
40
+ attr_accessor :secure_data_management_service
41
+
42
+ # endpoints to be used in production
43
+ ENDPOINTS_PRODUCTION = {
44
+ :administration_service => "https://adcenterapi.microsoft.com/Api/Advertiser/v7/Administration/AdministrationService.svc?wsdl",
45
+ :campaign_management_service => "https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?wsdl",
46
+ :customer_billing_service => "https://sharedservices.adcenterapi.microsoft.com/Api/Billing/v7/CustomerBillingService.svc?wsdl",
47
+ :customer_management_service => "https://sharedservices.adcenterapi.microsoft.com/Api/CustomerManagement/v7/CustomerManagementService.svc?wsdl",
48
+ :notification_management => "https://adcenterapi.microsoft.com/Api/Advertiser/v6/NotificationManagement/NotificationManagement.asmx?wsdl",
49
+ :reporting_service => "https://adcenterapi.microsoft.com/Api/Advertiser/v7/Reporting/ReportingService.svc?wsdl",
50
+ :secure_data_management_service => "https://securityservices.adcenterapi.microsoft.com/Api/SecureDataManagement/v7/SecureDataManagementService.svc?wsdl",
51
+ }
52
+
53
+ # endpoints to be used in sandbox
54
+ ENDPOINTS_SANDBOX = {
55
+ :administration_service => "https://sandboxapi.adcenter.microsoft.com/Api/Advertiser/v7/Administration/AdministrationService.svc?wsdl",
56
+ :campaign_management_service => "https://sandboxapi.adcenter.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?wsdl",
57
+ :customer_billing_service => "https://sharedservices-sbx.adcenterapi.microsoft.com/Api/Billing/v7/CustomerBillingService.svc?wsdl",
58
+ :customer_management_service => "https://sharedservices-sbx.adcenterapi.microsoft.com/Api/CustomerManagement/v7/CustomerManagementService.svc?wsdl",
59
+ :notification_management => "https://sandboxapi.adcenter.microsoft.com/Api/Advertiser/v6/NotificationManagement/NotificationManagement.asmx?wsdl",
60
+ :reporting_service => nil,
61
+ :secure_data_management_service => "https://securityservices-sbx.adcenterapi.microsoft.com/Api/SecureDataManagement/v7/SecureDataManagementService.svc?wsdl",
62
+ }
63
+
64
+ # credentials:: Hash of credential data
65
+ # opts:: unused
66
+ # sandbox_flag:: bool value
67
+ def initialize(credentials, opts={}, sandbox_flag=false)
68
+ unless credentials_valid?(credentials)
69
+ warn "*** credentials appear invalid"
70
+ warn credentials.to_yaml
71
+ end
72
+ @options = opts
73
+ @administration_service = AdministrationService.new(select_endpoint('administration_service', sandbox_flag), credentials)
74
+ @campaign_management_service = CampaignManagementService.new(select_endpoint('campaign_management_service', sandbox_flag), credentials)
75
+ @customer_billing_service = CustomerBillingService.new(select_endpoint('customer_billing_service', sandbox_flag), credentials)
76
+ @customer_management_service = CustomerManagementService.new(select_endpoint('customer_management_service', sandbox_flag), credentials)
77
+ @notification_management = NotificationManagement.new(select_endpoint('notification_management', sandbox_flag), credentials)
78
+ @reporting_service = ReportingService.new(select_endpoint('reporting_service', sandbox_flag), credentials)
79
+ @secure_data_management_service = SecureDataManagementService.new(select_endpoint('secure_data_management_service', sandbox_flag), credentials)
80
+ end
81
+
82
+ private
83
+
84
+ def credentials_valid?(creds)
85
+ return false unless creds.kind_of?(Hash)
86
+ return false unless creds['ApplicationToken']
87
+ return false unless creds['CustomerAccountId']
88
+ return false unless creds['CustomerId']
89
+ return false unless creds['DeveloperToken']
90
+ return false unless creds['UserName']
91
+ return false unless creds['Password']
92
+ return true
93
+ end
94
+
95
+ def select_endpoint(service_name, sandbox_flag)
96
+ if sandbox_flag
97
+ return ENDPOINTS_SANDBOX[service_name.to_sym]
98
+ else
99
+ return ENDPOINTS_PRODUCTION[service_name.to_sym]
100
+ end
101
+ end
102
+
103
+ end
@@ -0,0 +1,70 @@
1
+ require 'soap/header/simplehandler'
2
+
3
+ class AdCenterService
4
+ attr_accessor :endpoint
5
+ attr_accessor :service
6
+ attr_accessor :service_namespace
7
+ attr_accessor :required_credentials
8
+
9
+ DEFAULT_REQUIRED_CREDENTIALS = %w[ ApplicationToken CustomerAccountId CustomerId UserName Password DeveloperToken ]
10
+ DEFAULT_SERVICE_NAMESPACE = %w[ ApplicationToken UserName Password DeveloperToken ]
11
+
12
+ def initialize(endpoint, credentials)
13
+ @service_namespace = 'https://adcenter.microsoft.com/v7'
14
+ @required_credentials = DEFAULT_REQUIRED_CREDENTIALS
15
+ @endpoint = endpoint
16
+ initialize_service(@endpoint)
17
+ initialize_authentication_headers(credentials)
18
+ # set options on service after it is built
19
+ @service.wiredump_dev = STDERR if $DEBUG
20
+ @service.options["protocol.http.ssl_config.verify_mode"] = nil
21
+ end
22
+
23
+ def initialize_authentication_headers(creds)
24
+ @required_credentials.each do |key|
25
+ self.headerhandler << HeaderHandler.new(@service_namespace, key, creds[key])
26
+ end
27
+ end
28
+
29
+ def method_missing(method, *args)
30
+ begin
31
+ res = eval "@service.#{method}(*args)"
32
+ raise AdCenterClientException.new(method, res.errors) if res.respond_to?(:errors) && ! res.errors.nil?
33
+ rescue SOAP::FaultError => fault
34
+ detail = fault.detail
35
+ if detail.respond_to?(:adApiFaultDetail)
36
+ detail.adApiFaultDetail.errors.each do |r|
37
+ msg = sprintf("*** SOAP Fault found in '%s()': [%d] %s -- %s", method, r.code, r.errorCode, r.message)
38
+ warn msg
39
+ end
40
+ # TODO: test apiFaultDetail
41
+ elsif detail.respond_to?('apiFaultDetail')
42
+ operationErrors = detail.operationErrors.operationError
43
+ if !operationErrors.respond_to?('each')
44
+ operationErrors = [operationErrors]
45
+ end
46
+ operationErrors.each do |opError|
47
+ warn "Operation error '#{opError.message}' (#{opError.code}) encountered.\n"
48
+ end
49
+ # TODO: test generic SOAP error handling
50
+ else
51
+ warn "Generic SOAP fault '#{detail.exceptionDetail.message}' encountered.\n"
52
+ end
53
+ end
54
+ res
55
+ end
56
+
57
+ class HeaderHandler < SOAP::Header::SimpleHandler
58
+ attr_reader :element
59
+ attr_writer :value
60
+ def initialize(ns, element, value)
61
+ super(XSD::QName.new(ns, element))
62
+ @element = element
63
+ @value = value
64
+ end
65
+ def on_simple_outbound
66
+ @value
67
+ end
68
+ end
69
+
70
+ end
@@ -0,0 +1,7 @@
1
+ require 'adcenter_service'
2
+ require 'AdministrationServiceDriver'
3
+ class AdministrationService < AdCenterService
4
+ def initialize_service(endpoint)
5
+ @service = IAdministrationService.new(endpoint)
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'adcenter_service'
2
+ require 'CampaignManagementServiceDriver'
3
+ class CampaignManagementService < AdCenterService
4
+ def initialize_service(endpoint)
5
+ @service = ICampaignManagementService.new(endpoint)
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ module Test::Unit::Assertions
2
+ def assert_sandboxed(creds)
3
+ assert_match(/SBX/, creds['UserName'], "you appear to be running with production credentials [#{creds.inspect()}]")
4
+ end
5
+ end
@@ -0,0 +1 @@
1
+ class AdCenterClientException < Exception; end
@@ -0,0 +1,7 @@
1
+ require 'adcenter_service'
2
+ require 'CustomerBillingServiceDriver'
3
+ class CustomerBillingService < AdCenterService
4
+ def initialize_service(endpoint)
5
+ @service = ICustomerBillingService.new(endpoint)
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ require 'adcenter_service'
2
+ require 'CustomerManagementServiceDriver'
3
+ class CustomerManagementService < AdCenterService
4
+ def initialize_service(endpoint)
5
+ @service_namespace = 'https://adcenter.microsoft.com/api/customermanagement'
6
+ @required_credentials = %w[ ApplicationToken UserName Password DeveloperToken ]
7
+ @service = ICustomerManagementService.new(endpoint)
8
+ end
9
+ end
data/lib/default.rb ADDED
@@ -0,0 +1,636 @@
1
+ require 'xsd/qname'
2
+
3
+ # {http://adcenter.microsoft.com/syncapis}ArrayOfNotification
4
+ class ArrayOfNotification < ::Array
5
+ end
6
+
7
+ # {http://adcenter.microsoft.com/syncapis}Notification
8
+ # abstract
9
+ # notificationType - NotificationType
10
+ # customerId - SOAP::SOAPInt
11
+ # userLocale - SOAP::SOAPString
12
+ # recipientEmailAddress - SOAP::SOAPString
13
+ # notificationDate - SOAP::SOAPDateTime
14
+ class Notification
15
+ attr_accessor :notificationType
16
+ attr_accessor :customerId
17
+ attr_accessor :userLocale
18
+ attr_accessor :recipientEmailAddress
19
+ attr_accessor :notificationDate
20
+
21
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil)
22
+ @notificationType = notificationType
23
+ @customerId = customerId
24
+ @userLocale = userLocale
25
+ @recipientEmailAddress = recipientEmailAddress
26
+ @notificationDate = notificationDate
27
+ end
28
+ end
29
+
30
+ # {http://adcenter.microsoft.com/syncapis}EditorialRejectionNotification
31
+ # notificationType - NotificationType
32
+ # customerId - SOAP::SOAPInt
33
+ # userLocale - SOAP::SOAPString
34
+ # recipientEmailAddress - SOAP::SOAPString
35
+ # notificationDate - SOAP::SOAPDateTime
36
+ # accountId - SOAP::SOAPInt
37
+ # accountNumber - SOAP::SOAPString
38
+ # accountName - SOAP::SOAPString
39
+ # campaignName - SOAP::SOAPString
40
+ # campaignId - SOAP::SOAPInt
41
+ # orderId - SOAP::SOAPInt
42
+ # orderName - SOAP::SOAPString
43
+ # customerName - SOAP::SOAPString
44
+ # adId - SOAP::SOAPInt
45
+ # adTitle - SOAP::SOAPString
46
+ # adDescription - SOAP::SOAPString
47
+ # displayURL - SOAP::SOAPString
48
+ # destinationURL - SOAP::SOAPString
49
+ # keywordsRejected - SOAP::SOAPInt
50
+ # keywordsAccepted - SOAP::SOAPInt
51
+ # keywordsPending - SOAP::SOAPInt
52
+ # top1Keyword - SOAP::SOAPString
53
+ # top1KeywordReason - SOAP::SOAPString
54
+ # top2Keyword - SOAP::SOAPString
55
+ # top2KeywordReason - SOAP::SOAPString
56
+ # top3Keyword - SOAP::SOAPString
57
+ # top3KeywordReason - SOAP::SOAPString
58
+ # top4Keyword - SOAP::SOAPString
59
+ # top4KeywordReason - SOAP::SOAPString
60
+ # top5Keyword - SOAP::SOAPString
61
+ # top5KeywordReason - SOAP::SOAPString
62
+ class EditorialRejectionNotification < Notification
63
+ attr_accessor :notificationType
64
+ attr_accessor :customerId
65
+ attr_accessor :userLocale
66
+ attr_accessor :recipientEmailAddress
67
+ attr_accessor :notificationDate
68
+ attr_accessor :accountId
69
+ attr_accessor :accountNumber
70
+ attr_accessor :accountName
71
+ attr_accessor :campaignName
72
+ attr_accessor :campaignId
73
+ attr_accessor :orderId
74
+ attr_accessor :orderName
75
+ attr_accessor :customerName
76
+ attr_accessor :adId
77
+ attr_accessor :adTitle
78
+ attr_accessor :adDescription
79
+ attr_accessor :displayURL
80
+ attr_accessor :destinationURL
81
+ attr_accessor :keywordsRejected
82
+ attr_accessor :keywordsAccepted
83
+ attr_accessor :keywordsPending
84
+ attr_accessor :top1Keyword
85
+ attr_accessor :top1KeywordReason
86
+ attr_accessor :top2Keyword
87
+ attr_accessor :top2KeywordReason
88
+ attr_accessor :top3Keyword
89
+ attr_accessor :top3KeywordReason
90
+ attr_accessor :top4Keyword
91
+ attr_accessor :top4KeywordReason
92
+ attr_accessor :top5Keyword
93
+ attr_accessor :top5KeywordReason
94
+
95
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, accountId = nil, accountNumber = nil, accountName = nil, campaignName = nil, campaignId = nil, orderId = nil, orderName = nil, customerName = nil, adId = nil, adTitle = nil, adDescription = nil, displayURL = nil, destinationURL = nil, keywordsRejected = nil, keywordsAccepted = nil, keywordsPending = nil, top1Keyword = nil, top1KeywordReason = nil, top2Keyword = nil, top2KeywordReason = nil, top3Keyword = nil, top3KeywordReason = nil, top4Keyword = nil, top4KeywordReason = nil, top5Keyword = nil, top5KeywordReason = nil)
96
+ @notificationType = notificationType
97
+ @customerId = customerId
98
+ @userLocale = userLocale
99
+ @recipientEmailAddress = recipientEmailAddress
100
+ @notificationDate = notificationDate
101
+ @accountId = accountId
102
+ @accountNumber = accountNumber
103
+ @accountName = accountName
104
+ @campaignName = campaignName
105
+ @campaignId = campaignId
106
+ @orderId = orderId
107
+ @orderName = orderName
108
+ @customerName = customerName
109
+ @adId = adId
110
+ @adTitle = adTitle
111
+ @adDescription = adDescription
112
+ @displayURL = displayURL
113
+ @destinationURL = destinationURL
114
+ @keywordsRejected = keywordsRejected
115
+ @keywordsAccepted = keywordsAccepted
116
+ @keywordsPending = keywordsPending
117
+ @top1Keyword = top1Keyword
118
+ @top1KeywordReason = top1KeywordReason
119
+ @top2Keyword = top2Keyword
120
+ @top2KeywordReason = top2KeywordReason
121
+ @top3Keyword = top3Keyword
122
+ @top3KeywordReason = top3KeywordReason
123
+ @top4Keyword = top4Keyword
124
+ @top4KeywordReason = top4KeywordReason
125
+ @top5Keyword = top5Keyword
126
+ @top5KeywordReason = top5KeywordReason
127
+ end
128
+ end
129
+
130
+ # {http://adcenter.microsoft.com/syncapis}AccountSignupPaymentReceiptNotification
131
+ # notificationType - NotificationType
132
+ # customerId - SOAP::SOAPInt
133
+ # userLocale - SOAP::SOAPString
134
+ # recipientEmailAddress - SOAP::SOAPString
135
+ # notificationDate - SOAP::SOAPDateTime
136
+ # accountId - SOAP::SOAPInt
137
+ # accountNumber - SOAP::SOAPString
138
+ # accountName - SOAP::SOAPString
139
+ # preferredUserName - SOAP::SOAPString
140
+ # creditCardName - SOAP::SOAPString
141
+ # creditCardTypeName - SOAP::SOAPString
142
+ # creditCardLastFour - SOAP::SOAPString
143
+ # accountSetupFee - SOAP::SOAPDouble
144
+ # preferredCurrencyCode - SOAP::SOAPString
145
+ class AccountSignupPaymentReceiptNotification < Notification
146
+ attr_accessor :notificationType
147
+ attr_accessor :customerId
148
+ attr_accessor :userLocale
149
+ attr_accessor :recipientEmailAddress
150
+ attr_accessor :notificationDate
151
+ attr_accessor :accountId
152
+ attr_accessor :accountNumber
153
+ attr_accessor :accountName
154
+ attr_accessor :preferredUserName
155
+ attr_accessor :creditCardName
156
+ attr_accessor :creditCardTypeName
157
+ attr_accessor :creditCardLastFour
158
+ attr_accessor :accountSetupFee
159
+ attr_accessor :preferredCurrencyCode
160
+
161
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, accountId = nil, accountNumber = nil, accountName = nil, preferredUserName = nil, creditCardName = nil, creditCardTypeName = nil, creditCardLastFour = nil, accountSetupFee = nil, preferredCurrencyCode = nil)
162
+ @notificationType = notificationType
163
+ @customerId = customerId
164
+ @userLocale = userLocale
165
+ @recipientEmailAddress = recipientEmailAddress
166
+ @notificationDate = notificationDate
167
+ @accountId = accountId
168
+ @accountNumber = accountNumber
169
+ @accountName = accountName
170
+ @preferredUserName = preferredUserName
171
+ @creditCardName = creditCardName
172
+ @creditCardTypeName = creditCardTypeName
173
+ @creditCardLastFour = creditCardLastFour
174
+ @accountSetupFee = accountSetupFee
175
+ @preferredCurrencyCode = preferredCurrencyCode
176
+ end
177
+ end
178
+
179
+ # {http://adcenter.microsoft.com/syncapis}AccountClosedNotification
180
+ # notificationType - NotificationType
181
+ # customerId - SOAP::SOAPInt
182
+ # userLocale - SOAP::SOAPString
183
+ # recipientEmailAddress - SOAP::SOAPString
184
+ # notificationDate - SOAP::SOAPDateTime
185
+ # accountId - SOAP::SOAPInt
186
+ # accountNumber - SOAP::SOAPString
187
+ # customerName - SOAP::SOAPString
188
+ # statusDate - SOAP::SOAPDateTime
189
+ class AccountClosedNotification < Notification
190
+ attr_accessor :notificationType
191
+ attr_accessor :customerId
192
+ attr_accessor :userLocale
193
+ attr_accessor :recipientEmailAddress
194
+ attr_accessor :notificationDate
195
+ attr_accessor :accountId
196
+ attr_accessor :accountNumber
197
+ attr_accessor :customerName
198
+ attr_accessor :statusDate
199
+
200
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, accountId = nil, accountNumber = nil, customerName = nil, statusDate = nil)
201
+ @notificationType = notificationType
202
+ @customerId = customerId
203
+ @userLocale = userLocale
204
+ @recipientEmailAddress = recipientEmailAddress
205
+ @notificationDate = notificationDate
206
+ @accountId = accountId
207
+ @accountNumber = accountNumber
208
+ @customerName = customerName
209
+ @statusDate = statusDate
210
+ end
211
+ end
212
+
213
+ # {http://adcenter.microsoft.com/syncapis}UnableToChargeCreditCardNotification
214
+ # notificationType - NotificationType
215
+ # customerId - SOAP::SOAPInt
216
+ # userLocale - SOAP::SOAPString
217
+ # recipientEmailAddress - SOAP::SOAPString
218
+ # notificationDate - SOAP::SOAPDateTime
219
+ # accountId - SOAP::SOAPInt
220
+ # accountNumber - SOAP::SOAPString
221
+ # accountFinancialStatus - AccountFinancialStatusType
222
+ # creditCardTypeName - SOAP::SOAPString
223
+ # creditCardLastFour - SOAP::SOAPString
224
+ # preferredCurrencyCode - SOAP::SOAPString
225
+ # balanceAmount - SOAP::SOAPDouble
226
+ class UnableToChargeCreditCardNotification < Notification
227
+ attr_accessor :notificationType
228
+ attr_accessor :customerId
229
+ attr_accessor :userLocale
230
+ attr_accessor :recipientEmailAddress
231
+ attr_accessor :notificationDate
232
+ attr_accessor :accountId
233
+ attr_accessor :accountNumber
234
+ attr_accessor :accountFinancialStatus
235
+ attr_accessor :creditCardTypeName
236
+ attr_accessor :creditCardLastFour
237
+ attr_accessor :preferredCurrencyCode
238
+ attr_accessor :balanceAmount
239
+
240
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, accountId = nil, accountNumber = nil, accountFinancialStatus = nil, creditCardTypeName = nil, creditCardLastFour = nil, preferredCurrencyCode = nil, balanceAmount = nil)
241
+ @notificationType = notificationType
242
+ @customerId = customerId
243
+ @userLocale = userLocale
244
+ @recipientEmailAddress = recipientEmailAddress
245
+ @notificationDate = notificationDate
246
+ @accountId = accountId
247
+ @accountNumber = accountNumber
248
+ @accountFinancialStatus = accountFinancialStatus
249
+ @creditCardTypeName = creditCardTypeName
250
+ @creditCardLastFour = creditCardLastFour
251
+ @preferredCurrencyCode = preferredCurrencyCode
252
+ @balanceAmount = balanceAmount
253
+ end
254
+ end
255
+
256
+ # {http://adcenter.microsoft.com/syncapis}CreditCardNotification
257
+ # abstract
258
+ # notificationType - NotificationType
259
+ # customerId - SOAP::SOAPInt
260
+ # userLocale - SOAP::SOAPString
261
+ # recipientEmailAddress - SOAP::SOAPString
262
+ # notificationDate - SOAP::SOAPDateTime
263
+ # accountId - SOAP::SOAPInt
264
+ # accountNumber - SOAP::SOAPString
265
+ # creditCardTypeName - SOAP::SOAPString
266
+ # creditCardLastFour - SOAP::SOAPString
267
+ # creditCardExpirationDate - SOAP::SOAPDateTime
268
+ # noticeNumber - SOAP::SOAPInt
269
+ class CreditCardNotification < Notification
270
+ attr_accessor :notificationType
271
+ attr_accessor :customerId
272
+ attr_accessor :userLocale
273
+ attr_accessor :recipientEmailAddress
274
+ attr_accessor :notificationDate
275
+ attr_accessor :accountId
276
+ attr_accessor :accountNumber
277
+ attr_accessor :creditCardTypeName
278
+ attr_accessor :creditCardLastFour
279
+ attr_accessor :creditCardExpirationDate
280
+ attr_accessor :noticeNumber
281
+
282
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, accountId = nil, accountNumber = nil, creditCardTypeName = nil, creditCardLastFour = nil, creditCardExpirationDate = nil, noticeNumber = nil)
283
+ @notificationType = notificationType
284
+ @customerId = customerId
285
+ @userLocale = userLocale
286
+ @recipientEmailAddress = recipientEmailAddress
287
+ @notificationDate = notificationDate
288
+ @accountId = accountId
289
+ @accountNumber = accountNumber
290
+ @creditCardTypeName = creditCardTypeName
291
+ @creditCardLastFour = creditCardLastFour
292
+ @creditCardExpirationDate = creditCardExpirationDate
293
+ @noticeNumber = noticeNumber
294
+ end
295
+ end
296
+
297
+ # {http://adcenter.microsoft.com/syncapis}CreditCardExpiredNotification
298
+ # notificationType - NotificationType
299
+ # customerId - SOAP::SOAPInt
300
+ # userLocale - SOAP::SOAPString
301
+ # recipientEmailAddress - SOAP::SOAPString
302
+ # notificationDate - SOAP::SOAPDateTime
303
+ # accountId - SOAP::SOAPInt
304
+ # accountNumber - SOAP::SOAPString
305
+ # creditCardTypeName - SOAP::SOAPString
306
+ # creditCardLastFour - SOAP::SOAPString
307
+ # creditCardExpirationDate - SOAP::SOAPDateTime
308
+ # noticeNumber - SOAP::SOAPInt
309
+ class CreditCardExpiredNotification < CreditCardNotification
310
+ attr_accessor :notificationType
311
+ attr_accessor :customerId
312
+ attr_accessor :userLocale
313
+ attr_accessor :recipientEmailAddress
314
+ attr_accessor :notificationDate
315
+ attr_accessor :accountId
316
+ attr_accessor :accountNumber
317
+ attr_accessor :creditCardTypeName
318
+ attr_accessor :creditCardLastFour
319
+ attr_accessor :creditCardExpirationDate
320
+ attr_accessor :noticeNumber
321
+
322
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, accountId = nil, accountNumber = nil, creditCardTypeName = nil, creditCardLastFour = nil, creditCardExpirationDate = nil, noticeNumber = nil)
323
+ @notificationType = notificationType
324
+ @customerId = customerId
325
+ @userLocale = userLocale
326
+ @recipientEmailAddress = recipientEmailAddress
327
+ @notificationDate = notificationDate
328
+ @accountId = accountId
329
+ @accountNumber = accountNumber
330
+ @creditCardTypeName = creditCardTypeName
331
+ @creditCardLastFour = creditCardLastFour
332
+ @creditCardExpirationDate = creditCardExpirationDate
333
+ @noticeNumber = noticeNumber
334
+ end
335
+ end
336
+
337
+ # {http://adcenter.microsoft.com/syncapis}ApproachingCreditCardExpirationNotification
338
+ # notificationType - NotificationType
339
+ # customerId - SOAP::SOAPInt
340
+ # userLocale - SOAP::SOAPString
341
+ # recipientEmailAddress - SOAP::SOAPString
342
+ # notificationDate - SOAP::SOAPDateTime
343
+ # accountId - SOAP::SOAPInt
344
+ # accountNumber - SOAP::SOAPString
345
+ # creditCardTypeName - SOAP::SOAPString
346
+ # creditCardLastFour - SOAP::SOAPString
347
+ # creditCardExpirationDate - SOAP::SOAPDateTime
348
+ # noticeNumber - SOAP::SOAPInt
349
+ class ApproachingCreditCardExpirationNotification < CreditCardNotification
350
+ attr_accessor :notificationType
351
+ attr_accessor :customerId
352
+ attr_accessor :userLocale
353
+ attr_accessor :recipientEmailAddress
354
+ attr_accessor :notificationDate
355
+ attr_accessor :accountId
356
+ attr_accessor :accountNumber
357
+ attr_accessor :creditCardTypeName
358
+ attr_accessor :creditCardLastFour
359
+ attr_accessor :creditCardExpirationDate
360
+ attr_accessor :noticeNumber
361
+
362
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, accountId = nil, accountNumber = nil, creditCardTypeName = nil, creditCardLastFour = nil, creditCardExpirationDate = nil, noticeNumber = nil)
363
+ @notificationType = notificationType
364
+ @customerId = customerId
365
+ @userLocale = userLocale
366
+ @recipientEmailAddress = recipientEmailAddress
367
+ @notificationDate = notificationDate
368
+ @accountId = accountId
369
+ @accountNumber = accountNumber
370
+ @creditCardTypeName = creditCardTypeName
371
+ @creditCardLastFour = creditCardLastFour
372
+ @creditCardExpirationDate = creditCardExpirationDate
373
+ @noticeNumber = noticeNumber
374
+ end
375
+ end
376
+
377
+ # {http://adcenter.microsoft.com/syncapis}UserNotification
378
+ # abstract
379
+ # notificationType - NotificationType
380
+ # customerId - SOAP::SOAPInt
381
+ # userLocale - SOAP::SOAPString
382
+ # recipientEmailAddress - SOAP::SOAPString
383
+ # notificationDate - SOAP::SOAPDateTime
384
+ # userId - SOAP::SOAPInt
385
+ # userName - SOAP::SOAPString
386
+ # activationCode - SOAP::SOAPString
387
+ class UserNotification < Notification
388
+ attr_accessor :notificationType
389
+ attr_accessor :customerId
390
+ attr_accessor :userLocale
391
+ attr_accessor :recipientEmailAddress
392
+ attr_accessor :notificationDate
393
+ attr_accessor :userId
394
+ attr_accessor :userName
395
+ attr_accessor :activationCode
396
+
397
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, userId = nil, userName = nil, activationCode = nil)
398
+ @notificationType = notificationType
399
+ @customerId = customerId
400
+ @userLocale = userLocale
401
+ @recipientEmailAddress = recipientEmailAddress
402
+ @notificationDate = notificationDate
403
+ @userId = userId
404
+ @userName = userName
405
+ @activationCode = activationCode
406
+ end
407
+ end
408
+
409
+ # {http://adcenter.microsoft.com/syncapis}UserNameReminderNotification
410
+ # notificationType - NotificationType
411
+ # customerId - SOAP::SOAPInt
412
+ # userLocale - SOAP::SOAPString
413
+ # recipientEmailAddress - SOAP::SOAPString
414
+ # notificationDate - SOAP::SOAPDateTime
415
+ # userId - SOAP::SOAPInt
416
+ # userName - SOAP::SOAPString
417
+ # activationCode - SOAP::SOAPString
418
+ class UserNameReminderNotification < UserNotification
419
+ attr_accessor :notificationType
420
+ attr_accessor :customerId
421
+ attr_accessor :userLocale
422
+ attr_accessor :recipientEmailAddress
423
+ attr_accessor :notificationDate
424
+ attr_accessor :userId
425
+ attr_accessor :userName
426
+ attr_accessor :activationCode
427
+
428
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, userId = nil, userName = nil, activationCode = nil)
429
+ @notificationType = notificationType
430
+ @customerId = customerId
431
+ @userLocale = userLocale
432
+ @recipientEmailAddress = recipientEmailAddress
433
+ @notificationDate = notificationDate
434
+ @userId = userId
435
+ @userName = userName
436
+ @activationCode = activationCode
437
+ end
438
+ end
439
+
440
+ # {http://adcenter.microsoft.com/syncapis}UserPasswordResetNotification
441
+ # notificationType - NotificationType
442
+ # customerId - SOAP::SOAPInt
443
+ # userLocale - SOAP::SOAPString
444
+ # recipientEmailAddress - SOAP::SOAPString
445
+ # notificationDate - SOAP::SOAPDateTime
446
+ # userId - SOAP::SOAPInt
447
+ # userName - SOAP::SOAPString
448
+ # activationCode - SOAP::SOAPString
449
+ class UserPasswordResetNotification < UserNotification
450
+ attr_accessor :notificationType
451
+ attr_accessor :customerId
452
+ attr_accessor :userLocale
453
+ attr_accessor :recipientEmailAddress
454
+ attr_accessor :notificationDate
455
+ attr_accessor :userId
456
+ attr_accessor :userName
457
+ attr_accessor :activationCode
458
+
459
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, userId = nil, userName = nil, activationCode = nil)
460
+ @notificationType = notificationType
461
+ @customerId = customerId
462
+ @userLocale = userLocale
463
+ @recipientEmailAddress = recipientEmailAddress
464
+ @notificationDate = notificationDate
465
+ @userId = userId
466
+ @userName = userName
467
+ @activationCode = activationCode
468
+ end
469
+ end
470
+
471
+ # {http://adcenter.microsoft.com/syncapis}NewUserAddedNotification
472
+ # notificationType - NotificationType
473
+ # customerId - SOAP::SOAPInt
474
+ # userLocale - SOAP::SOAPString
475
+ # recipientEmailAddress - SOAP::SOAPString
476
+ # notificationDate - SOAP::SOAPDateTime
477
+ # userId - SOAP::SOAPInt
478
+ # userName - SOAP::SOAPString
479
+ # activationCode - SOAP::SOAPString
480
+ class NewUserAddedNotification < UserNotification
481
+ attr_accessor :notificationType
482
+ attr_accessor :customerId
483
+ attr_accessor :userLocale
484
+ attr_accessor :recipientEmailAddress
485
+ attr_accessor :notificationDate
486
+ attr_accessor :userId
487
+ attr_accessor :userName
488
+ attr_accessor :activationCode
489
+
490
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, userId = nil, userName = nil, activationCode = nil)
491
+ @notificationType = notificationType
492
+ @customerId = customerId
493
+ @userLocale = userLocale
494
+ @recipientEmailAddress = recipientEmailAddress
495
+ @notificationDate = notificationDate
496
+ @userId = userId
497
+ @userName = userName
498
+ @activationCode = activationCode
499
+ end
500
+ end
501
+
502
+ # {http://adcenter.microsoft.com/syncapis}NewCustomerSignupNotification
503
+ # notificationType - NotificationType
504
+ # customerId - SOAP::SOAPInt
505
+ # userLocale - SOAP::SOAPString
506
+ # recipientEmailAddress - SOAP::SOAPString
507
+ # notificationDate - SOAP::SOAPDateTime
508
+ # userId - SOAP::SOAPInt
509
+ # userName - SOAP::SOAPString
510
+ # activationCode - SOAP::SOAPString
511
+ class NewCustomerSignupNotification < UserNotification
512
+ attr_accessor :notificationType
513
+ attr_accessor :customerId
514
+ attr_accessor :userLocale
515
+ attr_accessor :recipientEmailAddress
516
+ attr_accessor :notificationDate
517
+ attr_accessor :userId
518
+ attr_accessor :userName
519
+ attr_accessor :activationCode
520
+
521
+ def initialize(notificationType = nil, customerId = nil, userLocale = nil, recipientEmailAddress = nil, notificationDate = nil, userId = nil, userName = nil, activationCode = nil)
522
+ @notificationType = notificationType
523
+ @customerId = customerId
524
+ @userLocale = userLocale
525
+ @recipientEmailAddress = recipientEmailAddress
526
+ @notificationDate = notificationDate
527
+ @userId = userId
528
+ @userName = userName
529
+ @activationCode = activationCode
530
+ end
531
+ end
532
+
533
+ # {http://adcenter.microsoft.com/syncapis}ApiUserAuthHeader
534
+ # userName - SOAP::SOAPString
535
+ # password - SOAP::SOAPString
536
+ # userAccessKey - SOAP::SOAPString
537
+ class ApiUserAuthHeader
538
+ attr_accessor :userName
539
+ attr_accessor :password
540
+ attr_accessor :userAccessKey
541
+
542
+ def initialize(userName = nil, password = nil, userAccessKey = nil)
543
+ @userName = userName
544
+ @password = password
545
+ @userAccessKey = userAccessKey
546
+ end
547
+ end
548
+
549
+ # {http://adcenter.microsoft.com/syncapis}NotificationType
550
+ class NotificationType < ::String
551
+ AccountClosed = NotificationType.new("AccountClosed")
552
+ AccountSignupPaymentReceipt = NotificationType.new("AccountSignupPaymentReceipt")
553
+ ApproachingCreditCardExpiration = NotificationType.new("ApproachingCreditCardExpiration")
554
+ CreditCardExpired = NotificationType.new("CreditCardExpired")
555
+ EditorialRejection = NotificationType.new("EditorialRejection")
556
+ NewCustomerSignup = NotificationType.new("NewCustomerSignup")
557
+ NewUserAdded = NotificationType.new("NewUserAdded")
558
+ UnableToChargeCreditCard = NotificationType.new("UnableToChargeCreditCard")
559
+ UserNameReminder = NotificationType.new("UserNameReminder")
560
+ UserPasswordReset = NotificationType.new("UserPasswordReset")
561
+ end
562
+
563
+ # {http://adcenter.microsoft.com/syncapis}AccountFinancialStatusType
564
+ class AccountFinancialStatusType < ::String
565
+ CreditHold = AccountFinancialStatusType.new("CreditHold")
566
+ CreditWarning = AccountFinancialStatusType.new("CreditWarning")
567
+ end
568
+
569
+ # {http://adcenter.microsoft.com/syncapis}GetNotifications
570
+ # aPIFlags - SOAP::SOAPInt
571
+ class GetNotifications
572
+ attr_accessor :aPIFlags
573
+
574
+ def initialize(aPIFlags = nil)
575
+ @aPIFlags = aPIFlags
576
+ end
577
+ end
578
+
579
+ # {http://adcenter.microsoft.com/syncapis}GetNotificationsResponse
580
+ # getNotificationsResult - ArrayOfNotification
581
+ class GetNotificationsResponse
582
+ attr_accessor :getNotificationsResult
583
+
584
+ def initialize(getNotificationsResult = nil)
585
+ @getNotificationsResult = getNotificationsResult
586
+ end
587
+ end
588
+
589
+ # {http://adcenter.microsoft.com/syncapis}GetNotificationsByType
590
+ # aPIFlags - SOAP::SOAPInt
591
+ # notificationType - NotificationType
592
+ class GetNotificationsByType
593
+ attr_accessor :aPIFlags
594
+ attr_accessor :notificationType
595
+
596
+ def initialize(aPIFlags = nil, notificationType = nil)
597
+ @aPIFlags = aPIFlags
598
+ @notificationType = notificationType
599
+ end
600
+ end
601
+
602
+ # {http://adcenter.microsoft.com/syncapis}GetNotificationsByTypeResponse
603
+ # getNotificationsByTypeResult - ArrayOfNotification
604
+ class GetNotificationsByTypeResponse
605
+ attr_accessor :getNotificationsByTypeResult
606
+
607
+ def initialize(getNotificationsByTypeResult = nil)
608
+ @getNotificationsByTypeResult = getNotificationsByTypeResult
609
+ end
610
+ end
611
+
612
+ # {http://adcenter.microsoft.com/syncapis}GetArchivedNotifications
613
+ # aPIFlags - SOAP::SOAPInt
614
+ # startDate - SOAP::SOAPDateTime
615
+ # endDate - SOAP::SOAPDateTime
616
+ class GetArchivedNotifications
617
+ attr_accessor :aPIFlags
618
+ attr_accessor :startDate
619
+ attr_accessor :endDate
620
+
621
+ def initialize(aPIFlags = nil, startDate = nil, endDate = nil)
622
+ @aPIFlags = aPIFlags
623
+ @startDate = startDate
624
+ @endDate = endDate
625
+ end
626
+ end
627
+
628
+ # {http://adcenter.microsoft.com/syncapis}GetArchivedNotificationsResponse
629
+ # getArchivedNotificationsResult - ArrayOfNotification
630
+ class GetArchivedNotificationsResponse
631
+ attr_accessor :getArchivedNotificationsResult
632
+
633
+ def initialize(getArchivedNotificationsResult = nil)
634
+ @getArchivedNotificationsResult = getArchivedNotificationsResult
635
+ end
636
+ end