channel_advisor 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/README +46 -0
  2. data/lib/channel_advisor/admin_service/client.rb +63 -0
  3. data/lib/channel_advisor/admin_service/mapping_registry.rb +206 -0
  4. data/lib/channel_advisor/admin_service/types.rb +175 -0
  5. data/lib/channel_advisor/admin_service.rb +14 -0
  6. data/lib/channel_advisor/auth_handler.rb +21 -0
  7. data/lib/channel_advisor/cart_service/client.rb +79 -0
  8. data/lib/channel_advisor/cart_service/mapping_registry.rb +344 -0
  9. data/lib/channel_advisor/cart_service/types.rb +386 -0
  10. data/lib/channel_advisor/cart_service.rb +14 -0
  11. data/lib/channel_advisor/errors.rb +13 -0
  12. data/lib/channel_advisor/inventory_service/client.rb +223 -0
  13. data/lib/channel_advisor/inventory_service/mapping_registry.rb +1765 -0
  14. data/lib/channel_advisor/inventory_service/types.rb +1708 -0
  15. data/lib/channel_advisor/inventory_service.rb +14 -0
  16. data/lib/channel_advisor/listing_service/client.rb +55 -0
  17. data/lib/channel_advisor/listing_service/mapping_registry.rb +153 -0
  18. data/lib/channel_advisor/listing_service/types.rb +125 -0
  19. data/lib/channel_advisor/listing_service.rb +14 -0
  20. data/lib/channel_advisor/marketplace_ad_service/client.rb +71 -0
  21. data/lib/channel_advisor/marketplace_ad_service/mapping_registry.rb +334 -0
  22. data/lib/channel_advisor/marketplace_ad_service/types.rb +317 -0
  23. data/lib/channel_advisor/marketplace_ad_service.rb +14 -0
  24. data/lib/channel_advisor/message_code.rb +30 -0
  25. data/lib/channel_advisor/order_service/client.rb +111 -0
  26. data/lib/channel_advisor/order_service/mapping_registry.rb +1696 -0
  27. data/lib/channel_advisor/order_service/types.rb +1781 -0
  28. data/lib/channel_advisor/order_service.rb +14 -0
  29. data/lib/channel_advisor/service_proxy.rb +62 -0
  30. data/lib/channel_advisor/shared_requires.rb +11 -0
  31. data/lib/channel_advisor/shipping_service/client.rb +79 -0
  32. data/lib/channel_advisor/shipping_service/mapping_registry.rb +500 -0
  33. data/lib/channel_advisor/shipping_service/types.rb +431 -0
  34. data/lib/channel_advisor/shipping_service.rb +14 -0
  35. data/lib/channel_advisor/store_service/client.rb +55 -0
  36. data/lib/channel_advisor/store_service/mapping_registry.rb +250 -0
  37. data/lib/channel_advisor/store_service/types.rb +180 -0
  38. data/lib/channel_advisor/store_service.rb +14 -0
  39. data/lib/channel_advisor/tax_service/client.rb +55 -0
  40. data/lib/channel_advisor/tax_service/mapping_registry.rb +233 -0
  41. data/lib/channel_advisor/tax_service/types.rb +221 -0
  42. data/lib/channel_advisor/tax_service.rb +14 -0
  43. data/lib/channel_advisor.rb +4 -0
  44. data/spec/integration/inventory_sync_spec.rb +55 -0
  45. data/spec/lib/channel_advisor/admin_service_spec.rb +12 -0
  46. data/spec/lib/channel_advisor/auth_handler_spec.rb +46 -0
  47. data/spec/lib/channel_advisor/cart_service_spec.rb +12 -0
  48. data/spec/lib/channel_advisor/errors_spec.rb +23 -0
  49. data/spec/lib/channel_advisor/inventory_service_spec.rb +12 -0
  50. data/spec/lib/channel_advisor/marketplace_ad_service_spec.rb +12 -0
  51. data/spec/lib/channel_advisor/message_code_spec.rb +40 -0
  52. data/spec/lib/channel_advisor/order_service_spec.rb +12 -0
  53. data/spec/lib/channel_advisor/service_proxy_spec.rb +130 -0
  54. data/spec/lib/channel_advisor/shipping_service_spec.rb +12 -0
  55. data/spec/lib/channel_advisor/store_service_spec.rb +12 -0
  56. data/spec/lib/channel_advisor/tax_service_spec.rb +12 -0
  57. data/spec/spec.opts +2 -0
  58. data/spec/spec_helper.rb +4 -0
  59. metadata +170 -0
@@ -0,0 +1,386 @@
1
+ module ChannelAdvisor; module CartServiceSOAP
2
+
3
+
4
+ # {http://api.channeladvisor.com/webservices/}APIResultOfCart
5
+ # status - ChannelAdvisor::CartServiceSOAP::ResultStatus
6
+ # messageCode - SOAP::SOAPInt
7
+ # message - SOAP::SOAPString
8
+ # data - SOAP::SOAPString
9
+ # resultData - ChannelAdvisor::CartServiceSOAP::Cart
10
+ class APIResultOfCart
11
+ attr_accessor :status
12
+ attr_accessor :messageCode
13
+ attr_accessor :message
14
+ attr_accessor :data
15
+ attr_accessor :resultData
16
+
17
+ def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
18
+ @status = status
19
+ @messageCode = messageCode
20
+ @message = message
21
+ @data = data
22
+ @resultData = resultData
23
+ end
24
+ end
25
+
26
+ # {http://api.channeladvisor.com/webservices/}APICredentials
27
+ # developerKey - SOAP::SOAPString
28
+ # password - SOAP::SOAPString
29
+ class APICredentials
30
+ attr_accessor :developerKey
31
+ attr_accessor :password
32
+
33
+ def initialize(developerKey = nil, password = nil)
34
+ @developerKey = developerKey
35
+ @password = password
36
+ end
37
+ end
38
+
39
+ # {http://api.channeladvisor.com/webservices/}APIResultOfInt32
40
+ # status - ChannelAdvisor::CartServiceSOAP::ResultStatus
41
+ # messageCode - SOAP::SOAPInt
42
+ # message - SOAP::SOAPString
43
+ # data - SOAP::SOAPString
44
+ # resultData - SOAP::SOAPInt
45
+ class APIResultOfInt32
46
+ attr_accessor :status
47
+ attr_accessor :messageCode
48
+ attr_accessor :message
49
+ attr_accessor :data
50
+ attr_accessor :resultData
51
+
52
+ def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
53
+ @status = status
54
+ @messageCode = messageCode
55
+ @message = message
56
+ @data = data
57
+ @resultData = resultData
58
+ end
59
+ end
60
+
61
+ # {http://api.channeladvisor.com/webservices/}ArrayOfCartItemRequest
62
+ class ArrayOfCartItemRequest < ::Array
63
+ end
64
+
65
+ # {http://api.channeladvisor.com/webservices/}APIResultOfString
66
+ # status - ChannelAdvisor::CartServiceSOAP::ResultStatus
67
+ # messageCode - SOAP::SOAPInt
68
+ # message - SOAP::SOAPString
69
+ # data - SOAP::SOAPString
70
+ # resultData - SOAP::SOAPString
71
+ class APIResultOfString
72
+ attr_accessor :status
73
+ attr_accessor :messageCode
74
+ attr_accessor :message
75
+ attr_accessor :data
76
+ attr_accessor :resultData
77
+
78
+ def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
79
+ @status = status
80
+ @messageCode = messageCode
81
+ @message = message
82
+ @data = data
83
+ @resultData = resultData
84
+ end
85
+ end
86
+
87
+ # {http://api.channeladvisor.com/datacontracts/orders}Cart
88
+ # cartID - SOAP::SOAPInt
89
+ # checkoutURL - SOAP::SOAPString
90
+ # lineItemList - ChannelAdvisor::CartServiceSOAP::ArrayOfCartItem
91
+ class Cart
92
+ attr_accessor :cartID
93
+ attr_accessor :checkoutURL
94
+ attr_accessor :lineItemList
95
+
96
+ def initialize(cartID = nil, checkoutURL = nil, lineItemList = nil)
97
+ @cartID = cartID
98
+ @checkoutURL = checkoutURL
99
+ @lineItemList = lineItemList
100
+ end
101
+ end
102
+
103
+ # {http://api.channeladvisor.com/datacontracts/orders}ArrayOfCartItem
104
+ class ArrayOfCartItem < ::Array
105
+ end
106
+
107
+ # {http://api.channeladvisor.com/datacontracts/orders}InventoryItemBase
108
+ # abstract
109
+ # sKU - SOAP::SOAPString
110
+ # title - SOAP::SOAPString
111
+ class InventoryItemBase
112
+ attr_accessor :sKU
113
+ attr_accessor :title
114
+
115
+ def initialize(sKU = nil, title = nil)
116
+ @sKU = sKU
117
+ @title = title
118
+ end
119
+ end
120
+
121
+ # {http://api.channeladvisor.com/datacontracts/orders}CartItem
122
+ # abstract
123
+ # sKU - SOAP::SOAPString
124
+ # title - SOAP::SOAPString
125
+ # lineItemID - SOAP::SOAPInt
126
+ # quantity - SOAP::SOAPInt
127
+ # itemSaleSource - ChannelAdvisor::CartServiceSOAP::SiteToken
128
+ # unitPrice - SOAP::SOAPDecimal
129
+ class CartItem < InventoryItemBase
130
+ attr_accessor :sKU
131
+ attr_accessor :title
132
+ attr_accessor :lineItemID
133
+ attr_accessor :quantity
134
+ attr_accessor :itemSaleSource
135
+ attr_accessor :unitPrice
136
+
137
+ def initialize(sKU = nil, title = nil, lineItemID = nil, quantity = nil, itemSaleSource = nil, unitPrice = nil)
138
+ @sKU = sKU
139
+ @title = title
140
+ @lineItemID = lineItemID
141
+ @quantity = quantity
142
+ @itemSaleSource = itemSaleSource
143
+ @unitPrice = unitPrice
144
+ end
145
+ end
146
+
147
+ # {http://api.channeladvisor.com/datacontracts/orders}CartItemResponse
148
+ # sKU - SOAP::SOAPString
149
+ # title - SOAP::SOAPString
150
+ # lineItemID - SOAP::SOAPInt
151
+ # quantity - SOAP::SOAPInt
152
+ # itemSaleSource - ChannelAdvisor::CartServiceSOAP::SiteToken
153
+ # unitPrice - SOAP::SOAPDecimal
154
+ # currencyCode - SOAP::SOAPString
155
+ # unitWeight - ChannelAdvisor::CartServiceSOAP::ItemWeight
156
+ class CartItemResponse < CartItem
157
+ attr_accessor :sKU
158
+ attr_accessor :title
159
+ attr_accessor :lineItemID
160
+ attr_accessor :quantity
161
+ attr_accessor :itemSaleSource
162
+ attr_accessor :unitPrice
163
+ attr_accessor :currencyCode
164
+ attr_accessor :unitWeight
165
+
166
+ def initialize(sKU = nil, title = nil, lineItemID = nil, quantity = nil, itemSaleSource = nil, unitPrice = nil, currencyCode = nil, unitWeight = nil)
167
+ @sKU = sKU
168
+ @title = title
169
+ @lineItemID = lineItemID
170
+ @quantity = quantity
171
+ @itemSaleSource = itemSaleSource
172
+ @unitPrice = unitPrice
173
+ @currencyCode = currencyCode
174
+ @unitWeight = unitWeight
175
+ end
176
+ end
177
+
178
+ # {http://api.channeladvisor.com/datacontracts/orders}CartItemRequest
179
+ # sKU - SOAP::SOAPString
180
+ # title - SOAP::SOAPString
181
+ # lineItemID - SOAP::SOAPInt
182
+ # quantity - SOAP::SOAPInt
183
+ # itemSaleSource - ChannelAdvisor::CartServiceSOAP::SiteToken
184
+ # unitPrice - SOAP::SOAPDecimal
185
+ # allowNegativeQuantity - SOAP::SOAPBoolean
186
+ class CartItemRequest < CartItem
187
+ attr_accessor :sKU
188
+ attr_accessor :title
189
+ attr_accessor :lineItemID
190
+ attr_accessor :quantity
191
+ attr_accessor :itemSaleSource
192
+ attr_accessor :unitPrice
193
+ attr_accessor :allowNegativeQuantity
194
+
195
+ def initialize(sKU = nil, title = nil, lineItemID = nil, quantity = nil, itemSaleSource = nil, unitPrice = nil, allowNegativeQuantity = nil)
196
+ @sKU = sKU
197
+ @title = title
198
+ @lineItemID = lineItemID
199
+ @quantity = quantity
200
+ @itemSaleSource = itemSaleSource
201
+ @unitPrice = unitPrice
202
+ @allowNegativeQuantity = allowNegativeQuantity
203
+ end
204
+ end
205
+
206
+ # {http://api.channeladvisor.com/datacontracts/orders}ItemWeight
207
+ # xmlattr_UnitOfMeasure - SOAP::SOAPString
208
+ class ItemWeight < ::String
209
+ AttrUnitOfMeasure = XSD::QName.new(nil, "UnitOfMeasure")
210
+
211
+ def __xmlattr
212
+ @__xmlattr ||= {}
213
+ end
214
+
215
+ def xmlattr_UnitOfMeasure
216
+ __xmlattr[AttrUnitOfMeasure]
217
+ end
218
+
219
+ def xmlattr_UnitOfMeasure=(value)
220
+ __xmlattr[AttrUnitOfMeasure] = value
221
+ end
222
+
223
+ def initialize(*arg)
224
+ super
225
+ @__xmlattr = {}
226
+ end
227
+ end
228
+
229
+ # {http://api.channeladvisor.com/webservices/}ResultStatus
230
+ class ResultStatus < ::String
231
+ Failure = ResultStatus.new("Failure")
232
+ Success = ResultStatus.new("Success")
233
+ end
234
+
235
+ # {http://api.channeladvisor.com/datacontracts/orders}SiteToken
236
+ class SiteToken < ::String
237
+ AMAZON_AUCTIONS = SiteToken.new("AMAZON_AUCTIONS")
238
+ AMAZON_MARKETPLACE = SiteToken.new("AMAZON_MARKETPLACE")
239
+ AMAZON_MERCHANTSAT = SiteToken.new("AMAZON_MERCHANTSAT")
240
+ AMAZON_UK = SiteToken.new("AMAZON_UK")
241
+ AMAZON_US = SiteToken.new("AMAZON_US")
242
+ BUY_DOT_COM = SiteToken.new("BUY_DOT_COM")
243
+ CHANNELADVISOR_STORE = SiteToken.new("CHANNELADVISOR_STORE")
244
+ DEMANDWARE_STORE = SiteToken.new("DEMANDWARE_STORE")
245
+ DIRECT_SALE = SiteToken.new("DIRECT_SALE")
246
+ EBAY_AU = SiteToken.new("EBAY_AU")
247
+ EBAY_CA = SiteToken.new("EBAY_CA")
248
+ EBAY_DE = SiteToken.new("EBAY_DE")
249
+ EBAY_ES = SiteToken.new("EBAY_ES")
250
+ EBAY_FR = SiteToken.new("EBAY_FR")
251
+ EBAY_IE = SiteToken.new("EBAY_IE")
252
+ EBAY_IT = SiteToken.new("EBAY_IT")
253
+ EBAY_MOTORS = SiteToken.new("EBAY_MOTORS")
254
+ EBAY_MOTORS_FIXED_PRICE = SiteToken.new("EBAY_MOTORS_FIXED_PRICE")
255
+ EBAY_STORES = SiteToken.new("EBAY_STORES")
256
+ EBAY_UK = SiteToken.new("EBAY_UK")
257
+ EBAY_US = SiteToken.new("EBAY_US")
258
+ OVERSTOCK = SiteToken.new("OVERSTOCK")
259
+ OVERSTOCK_SHOPPING = SiteToken.new("OVERSTOCK_SHOPPING")
260
+ PIXMANIA = SiteToken.new("PIXMANIA")
261
+ STOREADVISOR_PREMIUM = SiteToken.new("STOREADVISOR_PREMIUM")
262
+ TRADING_POST = SiteToken.new("TRADING_POST")
263
+ UNKNOWN = SiteToken.new("UNKNOWN")
264
+ YAHOO = SiteToken.new("YAHOO")
265
+ YAHOO_STORES = SiteToken.new("YAHOO_STORES")
266
+ end
267
+
268
+ # {http://api.channeladvisor.com/webservices/}GetCart
269
+ # accountID - SOAP::SOAPString
270
+ # cartID - SOAP::SOAPInt
271
+ class GetCart
272
+ attr_accessor :accountID
273
+ attr_accessor :cartID
274
+
275
+ def initialize(accountID = nil, cartID = nil)
276
+ @accountID = accountID
277
+ @cartID = cartID
278
+ end
279
+ end
280
+
281
+ # {http://api.channeladvisor.com/webservices/}GetCartResponse
282
+ # getCartResult - ChannelAdvisor::CartServiceSOAP::APIResultOfCart
283
+ class GetCartResponse
284
+ attr_accessor :getCartResult
285
+
286
+ def initialize(getCartResult = nil)
287
+ @getCartResult = getCartResult
288
+ end
289
+ end
290
+
291
+ # {http://api.channeladvisor.com/webservices/}DeleteCart
292
+ # accountID - SOAP::SOAPString
293
+ # cartID - SOAP::SOAPInt
294
+ class DeleteCart
295
+ attr_accessor :accountID
296
+ attr_accessor :cartID
297
+
298
+ def initialize(accountID = nil, cartID = nil)
299
+ @accountID = accountID
300
+ @cartID = cartID
301
+ end
302
+ end
303
+
304
+ # {http://api.channeladvisor.com/webservices/}DeleteCartResponse
305
+ # deleteCartResult - ChannelAdvisor::CartServiceSOAP::APIResultOfInt32
306
+ class DeleteCartResponse
307
+ attr_accessor :deleteCartResult
308
+
309
+ def initialize(deleteCartResult = nil)
310
+ @deleteCartResult = deleteCartResult
311
+ end
312
+ end
313
+
314
+ # {http://api.channeladvisor.com/webservices/}CreateCart
315
+ # accountID - SOAP::SOAPString
316
+ # buyerEmail - SOAP::SOAPString
317
+ # lineItem - ChannelAdvisor::CartServiceSOAP::ArrayOfCartItemRequest
318
+ class CreateCart
319
+ attr_accessor :accountID
320
+ attr_accessor :buyerEmail
321
+ attr_accessor :lineItem
322
+
323
+ def initialize(accountID = nil, buyerEmail = nil, lineItem = nil)
324
+ @accountID = accountID
325
+ @buyerEmail = buyerEmail
326
+ @lineItem = lineItem
327
+ end
328
+ end
329
+
330
+ # {http://api.channeladvisor.com/webservices/}CreateCartResponse
331
+ # createCartResult - ChannelAdvisor::CartServiceSOAP::APIResultOfCart
332
+ class CreateCartResponse
333
+ attr_accessor :createCartResult
334
+
335
+ def initialize(createCartResult = nil)
336
+ @createCartResult = createCartResult
337
+ end
338
+ end
339
+
340
+ # {http://api.channeladvisor.com/webservices/}ModifyCart
341
+ # accountID - SOAP::SOAPString
342
+ # cartID - SOAP::SOAPInt
343
+ # buyerEmail - SOAP::SOAPString
344
+ # lineItem - ChannelAdvisor::CartServiceSOAP::ArrayOfCartItemRequest
345
+ class ModifyCart
346
+ attr_accessor :accountID
347
+ attr_accessor :cartID
348
+ attr_accessor :buyerEmail
349
+ attr_accessor :lineItem
350
+
351
+ def initialize(accountID = nil, cartID = nil, buyerEmail = nil, lineItem = nil)
352
+ @accountID = accountID
353
+ @cartID = cartID
354
+ @buyerEmail = buyerEmail
355
+ @lineItem = lineItem
356
+ end
357
+ end
358
+
359
+ # {http://api.channeladvisor.com/webservices/}ModifyCartResponse
360
+ # modifyCartResult - ChannelAdvisor::CartServiceSOAP::APIResultOfCart
361
+ class ModifyCartResponse
362
+ attr_accessor :modifyCartResult
363
+
364
+ def initialize(modifyCartResult = nil)
365
+ @modifyCartResult = modifyCartResult
366
+ end
367
+ end
368
+
369
+ # {http://api.channeladvisor.com/webservices/}Ping
370
+ class Ping
371
+ def initialize
372
+ end
373
+ end
374
+
375
+ # {http://api.channeladvisor.com/webservices/}PingResponse
376
+ # pingResult - ChannelAdvisor::CartServiceSOAP::APIResultOfString
377
+ class PingResponse
378
+ attr_accessor :pingResult
379
+
380
+ def initialize(pingResult = nil)
381
+ @pingResult = pingResult
382
+ end
383
+ end
384
+
385
+
386
+ end; end
@@ -0,0 +1,14 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), 'shared_requires.rb'))
2
+ ['types.rb', 'mapping_registry.rb', 'client.rb'].each do |required|
3
+ require File.expand_path(File.join(File.dirname(__FILE__), 'cart_service', required))
4
+ end
5
+
6
+ module ChannelAdvisor
7
+ class CartService
8
+ include ChannelAdvisor::ServiceProxy
9
+ define_service_methods(
10
+ ChannelAdvisor::CartServiceSOAP,
11
+ ChannelAdvisor::CartServiceSOAP::CartServiceSoap
12
+ )
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ module ChannelAdvisor
2
+ class Error < Exception
3
+ attr_accessor :response, :message_code
4
+
5
+ def initialize(response, message_code)
6
+ @response = response
7
+ @message_code = message_code
8
+ if @message_code && @response
9
+ super("[#{message_code.code}]: #{message_code.message} - #{response.message}")
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,223 @@
1
+ module ChannelAdvisor::InventoryServiceSOAP
2
+
3
+ class InventoryServiceSoap < ::SOAP::RPC::Driver
4
+ DefaultEndpointUrl = "https://api.channeladvisor.com/ChannelAdvisorAPI/v1/InventoryService.asmx"
5
+
6
+ Methods = [
7
+ [ "http://api.channeladvisor.com/webservices/DoesSkuExist",
8
+ "doesSkuExist",
9
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "DoesSkuExist"]],
10
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "DoesSkuExistResponse"]] ],
11
+ { :request_style => :document, :request_use => :literal,
12
+ :response_style => :document, :response_use => :literal,
13
+ :faults => {} }
14
+ ],
15
+ [ "http://api.channeladvisor.com/webservices/DoesSkuExistList",
16
+ "doesSkuExistList",
17
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "DoesSkuExistList"]],
18
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "DoesSkuExistListResponse"]] ],
19
+ { :request_style => :document, :request_use => :literal,
20
+ :response_style => :document, :response_use => :literal,
21
+ :faults => {} }
22
+ ],
23
+ [ "http://api.channeladvisor.com/webservices/GetInventoryItemList",
24
+ "getInventoryItemList",
25
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemList"]],
26
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemListResponse"]] ],
27
+ { :request_style => :document, :request_use => :literal,
28
+ :response_style => :document, :response_use => :literal,
29
+ :faults => {} }
30
+ ],
31
+ [ "http://api.channeladvisor.com/webservices/GetInventoryItemListWithFullDetail",
32
+ "getInventoryItemListWithFullDetail",
33
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemListWithFullDetail"]],
34
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemListWithFullDetailResponse"]] ],
35
+ { :request_style => :document, :request_use => :literal,
36
+ :response_style => :document, :response_use => :literal,
37
+ :faults => {} }
38
+ ],
39
+ [ "http://api.channeladvisor.com/webservices/GetFilteredInventoryItemList",
40
+ "getFilteredInventoryItemList",
41
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetFilteredInventoryItemList"]],
42
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetFilteredInventoryItemListResponse"]] ],
43
+ { :request_style => :document, :request_use => :literal,
44
+ :response_style => :document, :response_use => :literal,
45
+ :faults => {} }
46
+ ],
47
+ [ "http://api.channeladvisor.com/webservices/GetFilteredSkuList",
48
+ "getFilteredSkuList",
49
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetFilteredSkuList"]],
50
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetFilteredSkuListResponse"]] ],
51
+ { :request_style => :document, :request_use => :literal,
52
+ :response_style => :document, :response_use => :literal,
53
+ :faults => {} }
54
+ ],
55
+ [ "http://api.channeladvisor.com/webservices/GetInventoryItemShippingInfo",
56
+ "getInventoryItemShippingInfo",
57
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemShippingInfo"]],
58
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemShippingInfoResponse"]] ],
59
+ { :request_style => :document, :request_use => :literal,
60
+ :response_style => :document, :response_use => :literal,
61
+ :faults => {} }
62
+ ],
63
+ [ "http://api.channeladvisor.com/webservices/GetInventoryItemQuantityInfo",
64
+ "getInventoryItemQuantityInfo",
65
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemQuantityInfo"]],
66
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemQuantityInfoResponse"]] ],
67
+ { :request_style => :document, :request_use => :literal,
68
+ :response_style => :document, :response_use => :literal,
69
+ :faults => {} }
70
+ ],
71
+ [ "http://api.channeladvisor.com/webservices/GetClassificationConfigurationInformation",
72
+ "getClassificationConfigurationInformation",
73
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetClassificationConfigurationInformation"]],
74
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetClassificationConfigurationInformationResponse"]] ],
75
+ { :request_style => :document, :request_use => :literal,
76
+ :response_style => :document, :response_use => :literal,
77
+ :faults => {} }
78
+ ],
79
+ [ "http://api.channeladvisor.com/webservices/GetInventoryItemClassificationAttributeList",
80
+ "getInventoryItemClassificationAttributeList",
81
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemClassificationAttributeList"]],
82
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemClassificationAttributeListResponse"]] ],
83
+ { :request_style => :document, :request_use => :literal,
84
+ :response_style => :document, :response_use => :literal,
85
+ :faults => {} }
86
+ ],
87
+ [ "http://api.channeladvisor.com/webservices/GetInventoryItemVariationInfo",
88
+ "getInventoryItemVariationInfo",
89
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemVariationInfo"]],
90
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemVariationInfoResponse"]] ],
91
+ { :request_style => :document, :request_use => :literal,
92
+ :response_style => :document, :response_use => :literal,
93
+ :faults => {} }
94
+ ],
95
+ [ "http://api.channeladvisor.com/webservices/GetInventoryItemStoreInfo",
96
+ "getInventoryItemStoreInfo",
97
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemStoreInfo"]],
98
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemStoreInfoResponse"]] ],
99
+ { :request_style => :document, :request_use => :literal,
100
+ :response_style => :document, :response_use => :literal,
101
+ :faults => {} }
102
+ ],
103
+ [ "http://api.channeladvisor.com/webservices/GetInventoryItemImageList",
104
+ "getInventoryItemImageList",
105
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemImageList"]],
106
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryItemImageListResponse"]] ],
107
+ { :request_style => :document, :request_use => :literal,
108
+ :response_style => :document, :response_use => :literal,
109
+ :faults => {} }
110
+ ],
111
+ [ "http://api.channeladvisor.com/webservices/GetInventoryQuantity",
112
+ "getInventoryQuantity",
113
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryQuantity"]],
114
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryQuantityResponse"]] ],
115
+ { :request_style => :document, :request_use => :literal,
116
+ :response_style => :document, :response_use => :literal,
117
+ :faults => {} }
118
+ ],
119
+ [ "http://api.channeladvisor.com/webservices/GetInventoryQuantityList",
120
+ "getInventoryQuantityList",
121
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryQuantityList"]],
122
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetInventoryQuantityListResponse"]] ],
123
+ { :request_style => :document, :request_use => :literal,
124
+ :response_style => :document, :response_use => :literal,
125
+ :faults => {} }
126
+ ],
127
+ [ "http://api.channeladvisor.com/webservices/DeleteInventoryItem",
128
+ "deleteInventoryItem",
129
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "DeleteInventoryItem"]],
130
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "DeleteInventoryItemResponse"]] ],
131
+ { :request_style => :document, :request_use => :literal,
132
+ :response_style => :document, :response_use => :literal,
133
+ :faults => {} }
134
+ ],
135
+ [ "http://api.channeladvisor.com/webservices/SynchInventoryItem",
136
+ "synchInventoryItem",
137
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "SynchInventoryItem"]],
138
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "SynchInventoryItemResponse"]] ],
139
+ { :request_style => :document, :request_use => :literal,
140
+ :response_style => :document, :response_use => :literal,
141
+ :faults => {} }
142
+ ],
143
+ [ "http://api.channeladvisor.com/webservices/SynchInventoryItemList",
144
+ "synchInventoryItemList",
145
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "SynchInventoryItemList"]],
146
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "SynchInventoryItemListResponse"]] ],
147
+ { :request_style => :document, :request_use => :literal,
148
+ :response_style => :document, :response_use => :literal,
149
+ :faults => {} }
150
+ ],
151
+ [ "http://api.channeladvisor.com/webservices/UpdateInventoryItemQuantityAndPrice",
152
+ "updateInventoryItemQuantityAndPrice",
153
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "UpdateInventoryItemQuantityAndPrice"]],
154
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "UpdateInventoryItemQuantityAndPriceResponse"]] ],
155
+ { :request_style => :document, :request_use => :literal,
156
+ :response_style => :document, :response_use => :literal,
157
+ :faults => {} }
158
+ ],
159
+ [ "http://api.channeladvisor.com/webservices/UpdateInventoryItemQuantityAndPriceList",
160
+ "updateInventoryItemQuantityAndPriceList",
161
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "UpdateInventoryItemQuantityAndPriceList"]],
162
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "UpdateInventoryItemQuantityAndPriceListResponse"]] ],
163
+ { :request_style => :document, :request_use => :literal,
164
+ :response_style => :document, :response_use => :literal,
165
+ :faults => {} }
166
+ ],
167
+ [ "http://api.channeladvisor.com/webservices/AssignLabelListToInventoryItemList",
168
+ "assignLabelListToInventoryItemList",
169
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "AssignLabelListToInventoryItemList"]],
170
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "AssignLabelListToInventoryItemListResponse"]] ],
171
+ { :request_style => :document, :request_use => :literal,
172
+ :response_style => :document, :response_use => :literal,
173
+ :faults => {} }
174
+ ],
175
+ [ "http://api.channeladvisor.com/webservices/RemoveLabelListFromInventoryItemList",
176
+ "removeLabelListFromInventoryItemList",
177
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "RemoveLabelListFromInventoryItemList"]],
178
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "RemoveLabelListFromInventoryItemListResponse"]] ],
179
+ { :request_style => :document, :request_use => :literal,
180
+ :response_style => :document, :response_use => :literal,
181
+ :faults => {} }
182
+ ],
183
+ [ "http://api.channeladvisor.com/webservices/Ping",
184
+ "ping",
185
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "Ping"]],
186
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "PingResponse"]] ],
187
+ { :request_style => :document, :request_use => :literal,
188
+ :response_style => :document, :response_use => :literal,
189
+ :faults => {} }
190
+ ]
191
+ ]
192
+
193
+ def initialize(endpoint_url = nil)
194
+ endpoint_url ||= DefaultEndpointUrl
195
+ super(endpoint_url, nil)
196
+ self.mapping_registry = DefaultMappingRegistry::EncodedRegistry
197
+ self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry
198
+ init_methods
199
+ end
200
+
201
+ private
202
+
203
+ def init_methods
204
+ Methods.each do |definitions|
205
+ opt = definitions.last
206
+ if opt[:request_style] == :document
207
+ add_document_operation(*definitions)
208
+ else
209
+ add_rpc_operation(*definitions)
210
+ qname = definitions[0]
211
+ name = definitions[2]
212
+ if qname.name != name and qname.name.capitalize == name.capitalize
213
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
214
+ __send__(name, *arg)
215
+ end
216
+ end
217
+ end
218
+ end
219
+ end
220
+ end
221
+
222
+
223
+ end