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,250 @@
1
+ module ChannelAdvisor; module StoreServiceSOAP
2
+
3
+ module DefaultMappingRegistry
4
+ EncodedRegistry = ::SOAP::Mapping::EncodedRegistry.new
5
+ LiteralRegistry = ::SOAP::Mapping::LiteralRegistry.new
6
+ NsWebservices = "http://api.channeladvisor.com/webservices/"
7
+
8
+ EncodedRegistry.register(
9
+ :class => ChannelAdvisor::StoreServiceSOAP::APIResultOfStoreSearchAnalysisResult,
10
+ :schema_type => XSD::QName.new(NsWebservices, "APIResultOfStoreSearchAnalysisResult"),
11
+ :schema_element => [
12
+ ["status", ["ChannelAdvisor::StoreServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
13
+ ["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
14
+ ["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
15
+ ["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
16
+ ["resultData", ["ChannelAdvisor::StoreServiceSOAP::StoreSearchAnalysisResult", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
17
+ ]
18
+ )
19
+
20
+ EncodedRegistry.register(
21
+ :class => ChannelAdvisor::StoreServiceSOAP::StoreSearchAnalysisResult,
22
+ :schema_type => XSD::QName.new(NsWebservices, "StoreSearchAnalysisResult"),
23
+ :schema_element => [
24
+ ["totalSearches", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "TotalSearches")]],
25
+ ["phraseOccurrenceList", ["ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchPhraseOccurrence", XSD::QName.new(NsWebservices, "PhraseOccurrenceList")], [0, 1]],
26
+ ["termOccurrenceList", ["ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchTermOccurrence", XSD::QName.new(NsWebservices, "TermOccurrenceList")], [0, 1]],
27
+ ["skuOccurrenceList", ["ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchSkuOccurrence", XSD::QName.new(NsWebservices, "SkuOccurrenceList")], [0, 1]]
28
+ ]
29
+ )
30
+
31
+ EncodedRegistry.register(
32
+ :class => ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchPhraseOccurrence,
33
+ :schema_type => XSD::QName.new(NsWebservices, "ArrayOfSearchPhraseOccurrence"),
34
+ :schema_element => [
35
+ ["searchPhraseOccurrence", ["ChannelAdvisor::StoreServiceSOAP::SearchPhraseOccurrence[]", XSD::QName.new(NsWebservices, "SearchPhraseOccurrence")], [0, nil]]
36
+ ]
37
+ )
38
+
39
+ EncodedRegistry.register(
40
+ :class => ChannelAdvisor::StoreServiceSOAP::SearchPhraseOccurrence,
41
+ :schema_type => XSD::QName.new(NsWebservices, "SearchPhraseOccurrence"),
42
+ :schema_element => [
43
+ ["phrase", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Phrase")], [0, 1]],
44
+ ["count", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "Count")]]
45
+ ]
46
+ )
47
+
48
+ EncodedRegistry.register(
49
+ :class => ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchTermOccurrence,
50
+ :schema_type => XSD::QName.new(NsWebservices, "ArrayOfSearchTermOccurrence"),
51
+ :schema_element => [
52
+ ["searchTermOccurrence", ["ChannelAdvisor::StoreServiceSOAP::SearchTermOccurrence[]", XSD::QName.new(NsWebservices, "SearchTermOccurrence")], [0, nil]]
53
+ ]
54
+ )
55
+
56
+ EncodedRegistry.register(
57
+ :class => ChannelAdvisor::StoreServiceSOAP::SearchTermOccurrence,
58
+ :schema_type => XSD::QName.new(NsWebservices, "SearchTermOccurrence"),
59
+ :schema_element => [
60
+ ["term", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Term")], [0, 1]],
61
+ ["count", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "Count")]]
62
+ ]
63
+ )
64
+
65
+ EncodedRegistry.register(
66
+ :class => ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchSkuOccurrence,
67
+ :schema_type => XSD::QName.new(NsWebservices, "ArrayOfSearchSkuOccurrence"),
68
+ :schema_element => [
69
+ ["searchSkuOccurrence", ["ChannelAdvisor::StoreServiceSOAP::SearchSkuOccurrence[]", XSD::QName.new(NsWebservices, "SearchSkuOccurrence")], [0, nil]]
70
+ ]
71
+ )
72
+
73
+ EncodedRegistry.register(
74
+ :class => ChannelAdvisor::StoreServiceSOAP::SearchSkuOccurrence,
75
+ :schema_type => XSD::QName.new(NsWebservices, "SearchSkuOccurrence"),
76
+ :schema_element => [
77
+ ["sku", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Sku")], [0, 1]],
78
+ ["count", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "Count")]]
79
+ ]
80
+ )
81
+
82
+ EncodedRegistry.register(
83
+ :class => ChannelAdvisor::StoreServiceSOAP::APICredentials,
84
+ :schema_type => XSD::QName.new(NsWebservices, "APICredentials"),
85
+ :schema_element => [
86
+ ["developerKey", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "DeveloperKey")], [0, 1]],
87
+ ["password", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Password")], [0, 1]]
88
+ ]
89
+ )
90
+
91
+ EncodedRegistry.register(
92
+ :class => ChannelAdvisor::StoreServiceSOAP::APIResultOfString,
93
+ :schema_type => XSD::QName.new(NsWebservices, "APIResultOfString"),
94
+ :schema_element => [
95
+ ["status", ["ChannelAdvisor::StoreServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
96
+ ["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
97
+ ["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
98
+ ["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
99
+ ["resultData", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
100
+ ]
101
+ )
102
+
103
+ EncodedRegistry.register(
104
+ :class => ChannelAdvisor::StoreServiceSOAP::ResultStatus,
105
+ :schema_type => XSD::QName.new(NsWebservices, "ResultStatus")
106
+ )
107
+
108
+ LiteralRegistry.register(
109
+ :class => ChannelAdvisor::StoreServiceSOAP::APIResultOfStoreSearchAnalysisResult,
110
+ :schema_type => XSD::QName.new(NsWebservices, "APIResultOfStoreSearchAnalysisResult"),
111
+ :schema_element => [
112
+ ["status", ["ChannelAdvisor::StoreServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
113
+ ["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
114
+ ["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
115
+ ["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
116
+ ["resultData", ["ChannelAdvisor::StoreServiceSOAP::StoreSearchAnalysisResult", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
117
+ ]
118
+ )
119
+
120
+ LiteralRegistry.register(
121
+ :class => ChannelAdvisor::StoreServiceSOAP::StoreSearchAnalysisResult,
122
+ :schema_type => XSD::QName.new(NsWebservices, "StoreSearchAnalysisResult"),
123
+ :schema_element => [
124
+ ["totalSearches", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "TotalSearches")]],
125
+ ["phraseOccurrenceList", ["ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchPhraseOccurrence", XSD::QName.new(NsWebservices, "PhraseOccurrenceList")], [0, 1]],
126
+ ["termOccurrenceList", ["ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchTermOccurrence", XSD::QName.new(NsWebservices, "TermOccurrenceList")], [0, 1]],
127
+ ["skuOccurrenceList", ["ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchSkuOccurrence", XSD::QName.new(NsWebservices, "SkuOccurrenceList")], [0, 1]]
128
+ ]
129
+ )
130
+
131
+ LiteralRegistry.register(
132
+ :class => ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchPhraseOccurrence,
133
+ :schema_type => XSD::QName.new(NsWebservices, "ArrayOfSearchPhraseOccurrence"),
134
+ :schema_element => [
135
+ ["searchPhraseOccurrence", ["ChannelAdvisor::StoreServiceSOAP::SearchPhraseOccurrence[]", XSD::QName.new(NsWebservices, "SearchPhraseOccurrence")], [0, nil]]
136
+ ]
137
+ )
138
+
139
+ LiteralRegistry.register(
140
+ :class => ChannelAdvisor::StoreServiceSOAP::SearchPhraseOccurrence,
141
+ :schema_type => XSD::QName.new(NsWebservices, "SearchPhraseOccurrence"),
142
+ :schema_element => [
143
+ ["phrase", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Phrase")], [0, 1]],
144
+ ["count", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "Count")]]
145
+ ]
146
+ )
147
+
148
+ LiteralRegistry.register(
149
+ :class => ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchTermOccurrence,
150
+ :schema_type => XSD::QName.new(NsWebservices, "ArrayOfSearchTermOccurrence"),
151
+ :schema_element => [
152
+ ["searchTermOccurrence", ["ChannelAdvisor::StoreServiceSOAP::SearchTermOccurrence[]", XSD::QName.new(NsWebservices, "SearchTermOccurrence")], [0, nil]]
153
+ ]
154
+ )
155
+
156
+ LiteralRegistry.register(
157
+ :class => ChannelAdvisor::StoreServiceSOAP::SearchTermOccurrence,
158
+ :schema_type => XSD::QName.new(NsWebservices, "SearchTermOccurrence"),
159
+ :schema_element => [
160
+ ["term", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Term")], [0, 1]],
161
+ ["count", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "Count")]]
162
+ ]
163
+ )
164
+
165
+ LiteralRegistry.register(
166
+ :class => ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchSkuOccurrence,
167
+ :schema_type => XSD::QName.new(NsWebservices, "ArrayOfSearchSkuOccurrence"),
168
+ :schema_element => [
169
+ ["searchSkuOccurrence", ["ChannelAdvisor::StoreServiceSOAP::SearchSkuOccurrence[]", XSD::QName.new(NsWebservices, "SearchSkuOccurrence")], [0, nil]]
170
+ ]
171
+ )
172
+
173
+ LiteralRegistry.register(
174
+ :class => ChannelAdvisor::StoreServiceSOAP::SearchSkuOccurrence,
175
+ :schema_type => XSD::QName.new(NsWebservices, "SearchSkuOccurrence"),
176
+ :schema_element => [
177
+ ["sku", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Sku")], [0, 1]],
178
+ ["count", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "Count")]]
179
+ ]
180
+ )
181
+
182
+ LiteralRegistry.register(
183
+ :class => ChannelAdvisor::StoreServiceSOAP::APICredentials,
184
+ :schema_type => XSD::QName.new(NsWebservices, "APICredentials"),
185
+ :schema_element => [
186
+ ["developerKey", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "DeveloperKey")], [0, 1]],
187
+ ["password", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Password")], [0, 1]]
188
+ ]
189
+ )
190
+
191
+ LiteralRegistry.register(
192
+ :class => ChannelAdvisor::StoreServiceSOAP::APIResultOfString,
193
+ :schema_type => XSD::QName.new(NsWebservices, "APIResultOfString"),
194
+ :schema_element => [
195
+ ["status", ["ChannelAdvisor::StoreServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
196
+ ["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
197
+ ["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
198
+ ["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
199
+ ["resultData", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
200
+ ]
201
+ )
202
+
203
+ LiteralRegistry.register(
204
+ :class => ChannelAdvisor::StoreServiceSOAP::ResultStatus,
205
+ :schema_type => XSD::QName.new(NsWebservices, "ResultStatus")
206
+ )
207
+
208
+ LiteralRegistry.register(
209
+ :class => ChannelAdvisor::StoreServiceSOAP::GetSearchAnalysisStats,
210
+ :schema_name => XSD::QName.new(NsWebservices, "GetSearchAnalysisStats"),
211
+ :schema_element => [
212
+ ["accountID", "SOAP::SOAPString"],
213
+ ["startDateUTC", "SOAP::SOAPDateTime"],
214
+ ["endDateUTC", "SOAP::SOAPDateTime"]
215
+ ]
216
+ )
217
+
218
+ LiteralRegistry.register(
219
+ :class => ChannelAdvisor::StoreServiceSOAP::GetSearchAnalysisStatsResponse,
220
+ :schema_name => XSD::QName.new(NsWebservices, "GetSearchAnalysisStatsResponse"),
221
+ :schema_element => [
222
+ ["getSearchAnalysisStatsResult", ["ChannelAdvisor::StoreServiceSOAP::APIResultOfStoreSearchAnalysisResult", XSD::QName.new(NsWebservices, "GetSearchAnalysisStatsResult")], [0, 1]]
223
+ ]
224
+ )
225
+
226
+ LiteralRegistry.register(
227
+ :class => ChannelAdvisor::StoreServiceSOAP::APICredentials,
228
+ :schema_name => XSD::QName.new(NsWebservices, "APICredentials"),
229
+ :schema_element => [
230
+ ["developerKey", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "DeveloperKey")], [0, 1]],
231
+ ["password", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Password")], [0, 1]]
232
+ ]
233
+ )
234
+
235
+ LiteralRegistry.register(
236
+ :class => ChannelAdvisor::StoreServiceSOAP::Ping,
237
+ :schema_name => XSD::QName.new(NsWebservices, "Ping"),
238
+ :schema_element => []
239
+ )
240
+
241
+ LiteralRegistry.register(
242
+ :class => ChannelAdvisor::StoreServiceSOAP::PingResponse,
243
+ :schema_name => XSD::QName.new(NsWebservices, "PingResponse"),
244
+ :schema_element => [
245
+ ["pingResult", ["ChannelAdvisor::StoreServiceSOAP::APIResultOfString", XSD::QName.new(NsWebservices, "PingResult")], [0, 1]]
246
+ ]
247
+ )
248
+ end
249
+
250
+ end; end
@@ -0,0 +1,180 @@
1
+ module ChannelAdvisor; module StoreServiceSOAP
2
+
3
+
4
+ # {http://api.channeladvisor.com/webservices/}APIResultOfStoreSearchAnalysisResult
5
+ # status - ChannelAdvisor::StoreServiceSOAP::ResultStatus
6
+ # messageCode - SOAP::SOAPInt
7
+ # message - SOAP::SOAPString
8
+ # data - SOAP::SOAPString
9
+ # resultData - ChannelAdvisor::StoreServiceSOAP::StoreSearchAnalysisResult
10
+ class APIResultOfStoreSearchAnalysisResult
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/}StoreSearchAnalysisResult
27
+ # totalSearches - SOAP::SOAPInt
28
+ # phraseOccurrenceList - ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchPhraseOccurrence
29
+ # termOccurrenceList - ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchTermOccurrence
30
+ # skuOccurrenceList - ChannelAdvisor::StoreServiceSOAP::ArrayOfSearchSkuOccurrence
31
+ class StoreSearchAnalysisResult
32
+ attr_accessor :totalSearches
33
+ attr_accessor :phraseOccurrenceList
34
+ attr_accessor :termOccurrenceList
35
+ attr_accessor :skuOccurrenceList
36
+
37
+ def initialize(totalSearches = nil, phraseOccurrenceList = nil, termOccurrenceList = nil, skuOccurrenceList = nil)
38
+ @totalSearches = totalSearches
39
+ @phraseOccurrenceList = phraseOccurrenceList
40
+ @termOccurrenceList = termOccurrenceList
41
+ @skuOccurrenceList = skuOccurrenceList
42
+ end
43
+ end
44
+
45
+ # {http://api.channeladvisor.com/webservices/}ArrayOfSearchPhraseOccurrence
46
+ class ArrayOfSearchPhraseOccurrence < ::Array
47
+ end
48
+
49
+ # {http://api.channeladvisor.com/webservices/}SearchPhraseOccurrence
50
+ # phrase - SOAP::SOAPString
51
+ # count - SOAP::SOAPInt
52
+ class SearchPhraseOccurrence
53
+ attr_accessor :phrase
54
+ attr_accessor :count
55
+
56
+ def initialize(phrase = nil, count = nil)
57
+ @phrase = phrase
58
+ @count = count
59
+ end
60
+ end
61
+
62
+ # {http://api.channeladvisor.com/webservices/}ArrayOfSearchTermOccurrence
63
+ class ArrayOfSearchTermOccurrence < ::Array
64
+ end
65
+
66
+ # {http://api.channeladvisor.com/webservices/}SearchTermOccurrence
67
+ # term - SOAP::SOAPString
68
+ # count - SOAP::SOAPInt
69
+ class SearchTermOccurrence
70
+ attr_accessor :term
71
+ attr_accessor :count
72
+
73
+ def initialize(term = nil, count = nil)
74
+ @term = term
75
+ @count = count
76
+ end
77
+ end
78
+
79
+ # {http://api.channeladvisor.com/webservices/}ArrayOfSearchSkuOccurrence
80
+ class ArrayOfSearchSkuOccurrence < ::Array
81
+ end
82
+
83
+ # {http://api.channeladvisor.com/webservices/}SearchSkuOccurrence
84
+ # sku - SOAP::SOAPString
85
+ # count - SOAP::SOAPInt
86
+ class SearchSkuOccurrence
87
+ attr_accessor :sku
88
+ attr_accessor :count
89
+
90
+ def initialize(sku = nil, count = nil)
91
+ @sku = sku
92
+ @count = count
93
+ end
94
+ end
95
+
96
+ # {http://api.channeladvisor.com/webservices/}APICredentials
97
+ # developerKey - SOAP::SOAPString
98
+ # password - SOAP::SOAPString
99
+ class APICredentials
100
+ attr_accessor :developerKey
101
+ attr_accessor :password
102
+
103
+ def initialize(developerKey = nil, password = nil)
104
+ @developerKey = developerKey
105
+ @password = password
106
+ end
107
+ end
108
+
109
+ # {http://api.channeladvisor.com/webservices/}APIResultOfString
110
+ # status - ChannelAdvisor::StoreServiceSOAP::ResultStatus
111
+ # messageCode - SOAP::SOAPInt
112
+ # message - SOAP::SOAPString
113
+ # data - SOAP::SOAPString
114
+ # resultData - SOAP::SOAPString
115
+ class APIResultOfString
116
+ attr_accessor :status
117
+ attr_accessor :messageCode
118
+ attr_accessor :message
119
+ attr_accessor :data
120
+ attr_accessor :resultData
121
+
122
+ def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
123
+ @status = status
124
+ @messageCode = messageCode
125
+ @message = message
126
+ @data = data
127
+ @resultData = resultData
128
+ end
129
+ end
130
+
131
+ # {http://api.channeladvisor.com/webservices/}ResultStatus
132
+ class ResultStatus < ::String
133
+ Failure = ResultStatus.new("Failure")
134
+ Success = ResultStatus.new("Success")
135
+ end
136
+
137
+ # {http://api.channeladvisor.com/webservices/}GetSearchAnalysisStats
138
+ # accountID - SOAP::SOAPString
139
+ # startDateUTC - SOAP::SOAPDateTime
140
+ # endDateUTC - SOAP::SOAPDateTime
141
+ class GetSearchAnalysisStats
142
+ attr_accessor :accountID
143
+ attr_accessor :startDateUTC
144
+ attr_accessor :endDateUTC
145
+
146
+ def initialize(accountID = nil, startDateUTC = nil, endDateUTC = nil)
147
+ @accountID = accountID
148
+ @startDateUTC = startDateUTC
149
+ @endDateUTC = endDateUTC
150
+ end
151
+ end
152
+
153
+ # {http://api.channeladvisor.com/webservices/}GetSearchAnalysisStatsResponse
154
+ # getSearchAnalysisStatsResult - ChannelAdvisor::StoreServiceSOAP::APIResultOfStoreSearchAnalysisResult
155
+ class GetSearchAnalysisStatsResponse
156
+ attr_accessor :getSearchAnalysisStatsResult
157
+
158
+ def initialize(getSearchAnalysisStatsResult = nil)
159
+ @getSearchAnalysisStatsResult = getSearchAnalysisStatsResult
160
+ end
161
+ end
162
+
163
+ # {http://api.channeladvisor.com/webservices/}Ping
164
+ class Ping
165
+ def initialize
166
+ end
167
+ end
168
+
169
+ # {http://api.channeladvisor.com/webservices/}PingResponse
170
+ # pingResult - ChannelAdvisor::StoreServiceSOAP::APIResultOfString
171
+ class PingResponse
172
+ attr_accessor :pingResult
173
+
174
+ def initialize(pingResult = nil)
175
+ @pingResult = pingResult
176
+ end
177
+ end
178
+
179
+
180
+ 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__), 'store_service', required))
4
+ end
5
+
6
+ module ChannelAdvisor
7
+ class StoreService
8
+ include ChannelAdvisor::ServiceProxy
9
+ define_service_methods(
10
+ ChannelAdvisor::StoreServiceSOAP,
11
+ ChannelAdvisor::StoreServiceSOAP::StoreServiceSoap
12
+ )
13
+ end
14
+ end
@@ -0,0 +1,55 @@
1
+ module ChannelAdvisor::TaxServiceSOAP
2
+
3
+ class TaxServiceSoap < ::SOAP::RPC::Driver
4
+ DefaultEndpointUrl = "https://api.channeladvisor.com/ChannelAdvisorAPI/v1/TaxService.asmx"
5
+
6
+ Methods = [
7
+ [ "http://api.channeladvisor.com/webservices/GetTaxRateList",
8
+ "getTaxRateList",
9
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetTaxRateList"]],
10
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetTaxRateListResponse"]] ],
11
+ { :request_style => :document, :request_use => :literal,
12
+ :response_style => :document, :response_use => :literal,
13
+ :faults => {} }
14
+ ],
15
+ [ "http://api.channeladvisor.com/webservices/Ping",
16
+ "ping",
17
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "Ping"]],
18
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "PingResponse"]] ],
19
+ { :request_style => :document, :request_use => :literal,
20
+ :response_style => :document, :response_use => :literal,
21
+ :faults => {} }
22
+ ]
23
+ ]
24
+
25
+ def initialize(endpoint_url = nil)
26
+ endpoint_url ||= DefaultEndpointUrl
27
+ super(endpoint_url, nil)
28
+ self.mapping_registry = DefaultMappingRegistry::EncodedRegistry
29
+ self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry
30
+ init_methods
31
+ end
32
+
33
+ private
34
+
35
+ def init_methods
36
+ Methods.each do |definitions|
37
+ opt = definitions.last
38
+ if opt[:request_style] == :document
39
+ add_document_operation(*definitions)
40
+ else
41
+ add_rpc_operation(*definitions)
42
+ qname = definitions[0]
43
+ name = definitions[2]
44
+ if qname.name != name and qname.name.capitalize == name.capitalize
45
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
46
+ __send__(name, *arg)
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+
55
+ end