secondrotation-channel_advisor 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. data/README +3 -0
  2. data/lib/channel_advisor.rb +8 -0
  3. data/lib/channel_advisor/auth_handler.rb +21 -0
  4. data/lib/channel_advisor/cart_service.rb +4 -0
  5. data/lib/channel_advisor/cart_service/client.rb +79 -0
  6. data/lib/channel_advisor/cart_service/mapping_registry.rb +344 -0
  7. data/lib/channel_advisor/cart_service/types.rb +385 -0
  8. data/lib/channel_advisor/errors.rb +10 -0
  9. data/lib/channel_advisor/inventory_service.rb +42 -0
  10. data/lib/channel_advisor/inventory_service/client.rb +199 -0
  11. data/lib/channel_advisor/inventory_service/mapping_registry.rb +1651 -0
  12. data/lib/channel_advisor/inventory_service/types.rb +1544 -0
  13. data/lib/channel_advisor/marketplace_ad_service.rb +4 -0
  14. data/lib/channel_advisor/marketplace_ad_service/client.rb +71 -0
  15. data/lib/channel_advisor/marketplace_ad_service/mapping_registry.rb +334 -0
  16. data/lib/channel_advisor/marketplace_ad_service/types.rb +317 -0
  17. data/lib/channel_advisor/message_code.rb +30 -0
  18. data/lib/channel_advisor/order_service.rb +4 -0
  19. data/lib/channel_advisor/order_service/client.rb +87 -0
  20. data/lib/channel_advisor/order_service/mapping_registry.rb +1356 -0
  21. data/lib/channel_advisor/order_service/types.rb +1422 -0
  22. data/lib/channel_advisor/shared_requires.rb +10 -0
  23. data/lib/channel_advisor/shipping_service.rb +4 -0
  24. data/lib/channel_advisor/shipping_service/client.rb +71 -0
  25. data/lib/channel_advisor/shipping_service/mapping_registry.rb +309 -0
  26. data/lib/channel_advisor/shipping_service/types.rb +280 -0
  27. data/lib/channel_advisor/store_service.rb +4 -0
  28. data/lib/channel_advisor/store_service/client.rb +55 -0
  29. data/lib/channel_advisor/store_service/mapping_registry.rb +250 -0
  30. data/lib/channel_advisor/store_service/types.rb +180 -0
  31. data/lib/channel_advisor/tax_service.rb +4 -0
  32. data/lib/channel_advisor/tax_service/client.rb +55 -0
  33. data/lib/channel_advisor/tax_service/mapping_registry.rb +233 -0
  34. data/lib/channel_advisor/tax_service/types.rb +221 -0
  35. data/test/lib/channel_advisor/auth_handler_spec.rb +46 -0
  36. data/test/lib/channel_advisor/inventory_service_spec.rb +62 -0
  37. data/test/lib/channel_advisor/message_code_spec.rb +40 -0
  38. data/test/spec.opts +2 -0
  39. data/test/spec_helper.rb +4 -0
  40. metadata +117 -0
@@ -0,0 +1,4 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), 'shared_requires.rb'))
2
+ require File.expand_path(File.join(File.dirname(__FILE__), 'tax_service', 'types.rb'))
3
+ require File.expand_path(File.join(File.dirname(__FILE__), 'tax_service', 'mapping_registry.rb'))
4
+ require File.expand_path(File.join(File.dirname(__FILE__), 'tax_service', 'client.rb'))
@@ -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
@@ -0,0 +1,233 @@
1
+ module ChannelAdvisor; module TaxServiceSOAP
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::TaxServiceSOAP::APIResultOfTaxRateResult,
10
+ :schema_type => XSD::QName.new(NsWebservices, "APIResultOfTaxRateResult"),
11
+ :schema_element => [
12
+ ["status", ["ChannelAdvisor::TaxServiceSOAP::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::TaxServiceSOAP::TaxRateResult", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
17
+ ]
18
+ )
19
+
20
+ EncodedRegistry.register(
21
+ :class => ChannelAdvisor::TaxServiceSOAP::TaxRateResult,
22
+ :schema_type => XSD::QName.new(NsWebservices, "TaxRateResult"),
23
+ :schema_element => [
24
+ ["taxAmount", ["SOAP::SOAPDecimal", XSD::QName.new(NsWebservices, "TaxAmount")]],
25
+ ["taxType", ["ChannelAdvisor::TaxServiceSOAP::TaxTypeCode", XSD::QName.new(NsWebservices, "TaxType")]],
26
+ ["itemDetailList", ["ChannelAdvisor::TaxServiceSOAP::ArrayOfTaxItemBase", XSD::QName.new(NsWebservices, "ItemDetailList")], [0, 1]]
27
+ ]
28
+ )
29
+
30
+ EncodedRegistry.register(
31
+ :class => ChannelAdvisor::TaxServiceSOAP::ArrayOfTaxItemBase,
32
+ :schema_type => XSD::QName.new(NsWebservices, "ArrayOfTaxItemBase"),
33
+ :schema_element => [
34
+ ["taxItemBase", ["ChannelAdvisor::TaxServiceSOAP::TaxItemBase[]", XSD::QName.new(NsWebservices, "TaxItemBase")], [0, nil]]
35
+ ]
36
+ )
37
+
38
+ EncodedRegistry.register(
39
+ :class => ChannelAdvisor::TaxServiceSOAP::TaxItemVatShipping,
40
+ :schema_type => XSD::QName.new(NsWebservices, "TaxItemVatShipping"),
41
+ :schema_basetype => XSD::QName.new(NsWebservices, "TaxItemBase"),
42
+ :schema_element => [
43
+ ["taxAmount", ["SOAP::SOAPDecimal", XSD::QName.new(NsWebservices, "TaxAmount")]],
44
+ ["taxRate", ["SOAP::SOAPDouble", XSD::QName.new(NsWebservices, "TaxRate")]],
45
+ ["taxType", ["ChannelAdvisor::TaxServiceSOAP::TaxTypeCode", XSD::QName.new(NsWebservices, "TaxType")]],
46
+ ["shippingCost", ["SOAP::SOAPDecimal", XSD::QName.new(NsWebservices, "ShippingCost")]]
47
+ ]
48
+ )
49
+
50
+ EncodedRegistry.register(
51
+ :class => ChannelAdvisor::TaxServiceSOAP::TaxItemProduct,
52
+ :schema_type => XSD::QName.new(NsWebservices, "TaxItemProduct"),
53
+ :schema_basetype => XSD::QName.new(NsWebservices, "TaxItemBase"),
54
+ :schema_element => [
55
+ ["taxAmount", ["SOAP::SOAPDecimal", XSD::QName.new(NsWebservices, "TaxAmount")]],
56
+ ["taxRate", ["SOAP::SOAPDouble", XSD::QName.new(NsWebservices, "TaxRate")]],
57
+ ["taxType", ["ChannelAdvisor::TaxServiceSOAP::TaxTypeCode", XSD::QName.new(NsWebservices, "TaxType")]],
58
+ ["quantity", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "Quantity")]],
59
+ ["unitPrice", ["SOAP::SOAPDecimal", XSD::QName.new(NsWebservices, "UnitPrice")]],
60
+ ["lineItemID", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "LineItemID")]],
61
+ ["title", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Title")], [0, 1]],
62
+ ["sKU", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "SKU")], [0, 1]]
63
+ ]
64
+ )
65
+
66
+ EncodedRegistry.register(
67
+ :class => ChannelAdvisor::TaxServiceSOAP::APICredentials,
68
+ :schema_type => XSD::QName.new(NsWebservices, "APICredentials"),
69
+ :schema_element => [
70
+ ["developerKey", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "DeveloperKey")], [0, 1]],
71
+ ["password", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Password")], [0, 1]]
72
+ ]
73
+ )
74
+
75
+ EncodedRegistry.register(
76
+ :class => ChannelAdvisor::TaxServiceSOAP::APIResultOfString,
77
+ :schema_type => XSD::QName.new(NsWebservices, "APIResultOfString"),
78
+ :schema_element => [
79
+ ["status", ["ChannelAdvisor::TaxServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
80
+ ["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
81
+ ["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
82
+ ["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
83
+ ["resultData", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
84
+ ]
85
+ )
86
+
87
+ EncodedRegistry.register(
88
+ :class => ChannelAdvisor::TaxServiceSOAP::ResultStatus,
89
+ :schema_type => XSD::QName.new(NsWebservices, "ResultStatus")
90
+ )
91
+
92
+ EncodedRegistry.register(
93
+ :class => ChannelAdvisor::TaxServiceSOAP::TaxTypeCode,
94
+ :schema_type => XSD::QName.new(NsWebservices, "TaxTypeCode")
95
+ )
96
+
97
+ LiteralRegistry.register(
98
+ :class => ChannelAdvisor::TaxServiceSOAP::APIResultOfTaxRateResult,
99
+ :schema_type => XSD::QName.new(NsWebservices, "APIResultOfTaxRateResult"),
100
+ :schema_element => [
101
+ ["status", ["ChannelAdvisor::TaxServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
102
+ ["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
103
+ ["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
104
+ ["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
105
+ ["resultData", ["ChannelAdvisor::TaxServiceSOAP::TaxRateResult", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
106
+ ]
107
+ )
108
+
109
+ LiteralRegistry.register(
110
+ :class => ChannelAdvisor::TaxServiceSOAP::TaxRateResult,
111
+ :schema_type => XSD::QName.new(NsWebservices, "TaxRateResult"),
112
+ :schema_element => [
113
+ ["taxAmount", ["SOAP::SOAPDecimal", XSD::QName.new(NsWebservices, "TaxAmount")]],
114
+ ["taxType", ["ChannelAdvisor::TaxServiceSOAP::TaxTypeCode", XSD::QName.new(NsWebservices, "TaxType")]],
115
+ ["itemDetailList", ["ChannelAdvisor::TaxServiceSOAP::ArrayOfTaxItemBase", XSD::QName.new(NsWebservices, "ItemDetailList")], [0, 1]]
116
+ ]
117
+ )
118
+
119
+ LiteralRegistry.register(
120
+ :class => ChannelAdvisor::TaxServiceSOAP::ArrayOfTaxItemBase,
121
+ :schema_type => XSD::QName.new(NsWebservices, "ArrayOfTaxItemBase"),
122
+ :schema_element => [
123
+ ["taxItemBase", ["ChannelAdvisor::TaxServiceSOAP::TaxItemBase[]", XSD::QName.new(NsWebservices, "TaxItemBase")], [0, nil]]
124
+ ]
125
+ )
126
+
127
+ LiteralRegistry.register(
128
+ :class => ChannelAdvisor::TaxServiceSOAP::TaxItemVatShipping,
129
+ :schema_type => XSD::QName.new(NsWebservices, "TaxItemVatShipping"),
130
+ :schema_basetype => XSD::QName.new(NsWebservices, "TaxItemBase"),
131
+ :schema_element => [
132
+ ["taxAmount", ["SOAP::SOAPDecimal", XSD::QName.new(NsWebservices, "TaxAmount")]],
133
+ ["taxRate", ["SOAP::SOAPDouble", XSD::QName.new(NsWebservices, "TaxRate")]],
134
+ ["taxType", ["ChannelAdvisor::TaxServiceSOAP::TaxTypeCode", XSD::QName.new(NsWebservices, "TaxType")]],
135
+ ["shippingCost", ["SOAP::SOAPDecimal", XSD::QName.new(NsWebservices, "ShippingCost")]]
136
+ ]
137
+ )
138
+
139
+ LiteralRegistry.register(
140
+ :class => ChannelAdvisor::TaxServiceSOAP::TaxItemProduct,
141
+ :schema_type => XSD::QName.new(NsWebservices, "TaxItemProduct"),
142
+ :schema_basetype => XSD::QName.new(NsWebservices, "TaxItemBase"),
143
+ :schema_element => [
144
+ ["taxAmount", ["SOAP::SOAPDecimal", XSD::QName.new(NsWebservices, "TaxAmount")]],
145
+ ["taxRate", ["SOAP::SOAPDouble", XSD::QName.new(NsWebservices, "TaxRate")]],
146
+ ["taxType", ["ChannelAdvisor::TaxServiceSOAP::TaxTypeCode", XSD::QName.new(NsWebservices, "TaxType")]],
147
+ ["quantity", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "Quantity")]],
148
+ ["unitPrice", ["SOAP::SOAPDecimal", XSD::QName.new(NsWebservices, "UnitPrice")]],
149
+ ["lineItemID", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "LineItemID")]],
150
+ ["title", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Title")], [0, 1]],
151
+ ["sKU", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "SKU")], [0, 1]]
152
+ ]
153
+ )
154
+
155
+ LiteralRegistry.register(
156
+ :class => ChannelAdvisor::TaxServiceSOAP::APICredentials,
157
+ :schema_type => XSD::QName.new(NsWebservices, "APICredentials"),
158
+ :schema_element => [
159
+ ["developerKey", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "DeveloperKey")], [0, 1]],
160
+ ["password", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Password")], [0, 1]]
161
+ ]
162
+ )
163
+
164
+ LiteralRegistry.register(
165
+ :class => ChannelAdvisor::TaxServiceSOAP::APIResultOfString,
166
+ :schema_type => XSD::QName.new(NsWebservices, "APIResultOfString"),
167
+ :schema_element => [
168
+ ["status", ["ChannelAdvisor::TaxServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
169
+ ["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
170
+ ["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
171
+ ["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
172
+ ["resultData", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
173
+ ]
174
+ )
175
+
176
+ LiteralRegistry.register(
177
+ :class => ChannelAdvisor::TaxServiceSOAP::ResultStatus,
178
+ :schema_type => XSD::QName.new(NsWebservices, "ResultStatus")
179
+ )
180
+
181
+ LiteralRegistry.register(
182
+ :class => ChannelAdvisor::TaxServiceSOAP::TaxTypeCode,
183
+ :schema_type => XSD::QName.new(NsWebservices, "TaxTypeCode")
184
+ )
185
+
186
+ LiteralRegistry.register(
187
+ :class => ChannelAdvisor::TaxServiceSOAP::GetTaxRateList,
188
+ :schema_name => XSD::QName.new(NsWebservices, "GetTaxRateList"),
189
+ :schema_element => [
190
+ ["accountID", "SOAP::SOAPString", [0, 1]],
191
+ ["cartID", "SOAP::SOAPInt"],
192
+ ["street", "SOAP::SOAPString", [0, 1]],
193
+ ["city", "SOAP::SOAPString", [0, 1]],
194
+ ["state", "SOAP::SOAPString", [0, 1]],
195
+ ["postalCode", "SOAP::SOAPString", [0, 1]],
196
+ ["country", "SOAP::SOAPString", [0, 1]],
197
+ ["shippingCost", "SOAP::SOAPDecimal"]
198
+ ]
199
+ )
200
+
201
+ LiteralRegistry.register(
202
+ :class => ChannelAdvisor::TaxServiceSOAP::GetTaxRateListResponse,
203
+ :schema_name => XSD::QName.new(NsWebservices, "GetTaxRateListResponse"),
204
+ :schema_element => [
205
+ ["getTaxRateListResult", ["ChannelAdvisor::TaxServiceSOAP::APIResultOfTaxRateResult", XSD::QName.new(NsWebservices, "GetTaxRateListResult")], [0, 1]]
206
+ ]
207
+ )
208
+
209
+ LiteralRegistry.register(
210
+ :class => ChannelAdvisor::TaxServiceSOAP::APICredentials,
211
+ :schema_name => XSD::QName.new(NsWebservices, "APICredentials"),
212
+ :schema_element => [
213
+ ["developerKey", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "DeveloperKey")], [0, 1]],
214
+ ["password", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Password")], [0, 1]]
215
+ ]
216
+ )
217
+
218
+ LiteralRegistry.register(
219
+ :class => ChannelAdvisor::TaxServiceSOAP::Ping,
220
+ :schema_name => XSD::QName.new(NsWebservices, "Ping"),
221
+ :schema_element => []
222
+ )
223
+
224
+ LiteralRegistry.register(
225
+ :class => ChannelAdvisor::TaxServiceSOAP::PingResponse,
226
+ :schema_name => XSD::QName.new(NsWebservices, "PingResponse"),
227
+ :schema_element => [
228
+ ["pingResult", ["ChannelAdvisor::TaxServiceSOAP::APIResultOfString", XSD::QName.new(NsWebservices, "PingResult")], [0, 1]]
229
+ ]
230
+ )
231
+ end
232
+
233
+ end; end
@@ -0,0 +1,221 @@
1
+ module ChannelAdvisor; module TaxServiceSOAP
2
+
3
+
4
+ # {http://api.channeladvisor.com/webservices/}APIResultOfTaxRateResult
5
+ # status - ChannelAdvisor::TaxServiceSOAP::ResultStatus
6
+ # messageCode - SOAP::SOAPInt
7
+ # message - SOAP::SOAPString
8
+ # data - SOAP::SOAPString
9
+ # resultData - ChannelAdvisor::TaxServiceSOAP::TaxRateResult
10
+ class APIResultOfTaxRateResult
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/}TaxRateResult
27
+ # taxAmount - SOAP::SOAPDecimal
28
+ # taxType - ChannelAdvisor::TaxServiceSOAP::TaxTypeCode
29
+ # itemDetailList - ChannelAdvisor::TaxServiceSOAP::ArrayOfTaxItemBase
30
+ class TaxRateResult
31
+ attr_accessor :taxAmount
32
+ attr_accessor :taxType
33
+ attr_accessor :itemDetailList
34
+
35
+ def initialize(taxAmount = nil, taxType = nil, itemDetailList = nil)
36
+ @taxAmount = taxAmount
37
+ @taxType = taxType
38
+ @itemDetailList = itemDetailList
39
+ end
40
+ end
41
+
42
+ # {http://api.channeladvisor.com/webservices/}ArrayOfTaxItemBase
43
+ class ArrayOfTaxItemBase < ::Array
44
+ end
45
+
46
+ # {http://api.channeladvisor.com/webservices/}TaxItemBase
47
+ # abstract
48
+ # taxAmount - SOAP::SOAPDecimal
49
+ # taxRate - SOAP::SOAPDouble
50
+ # taxType - ChannelAdvisor::TaxServiceSOAP::TaxTypeCode
51
+ class TaxItemBase
52
+ attr_accessor :taxAmount
53
+ attr_accessor :taxRate
54
+ attr_accessor :taxType
55
+
56
+ def initialize(taxAmount = nil, taxRate = nil, taxType = nil)
57
+ @taxAmount = taxAmount
58
+ @taxRate = taxRate
59
+ @taxType = taxType
60
+ end
61
+ end
62
+
63
+ # {http://api.channeladvisor.com/webservices/}TaxItemVatShipping
64
+ # taxAmount - SOAP::SOAPDecimal
65
+ # taxRate - SOAP::SOAPDouble
66
+ # taxType - ChannelAdvisor::TaxServiceSOAP::TaxTypeCode
67
+ # shippingCost - SOAP::SOAPDecimal
68
+ class TaxItemVatShipping < TaxItemBase
69
+ attr_accessor :taxAmount
70
+ attr_accessor :taxRate
71
+ attr_accessor :taxType
72
+ attr_accessor :shippingCost
73
+
74
+ def initialize(taxAmount = nil, taxRate = nil, taxType = nil, shippingCost = nil)
75
+ @taxAmount = taxAmount
76
+ @taxRate = taxRate
77
+ @taxType = taxType
78
+ @shippingCost = shippingCost
79
+ end
80
+ end
81
+
82
+ # {http://api.channeladvisor.com/webservices/}TaxItemProduct
83
+ # taxAmount - SOAP::SOAPDecimal
84
+ # taxRate - SOAP::SOAPDouble
85
+ # taxType - ChannelAdvisor::TaxServiceSOAP::TaxTypeCode
86
+ # quantity - SOAP::SOAPInt
87
+ # unitPrice - SOAP::SOAPDecimal
88
+ # lineItemID - SOAP::SOAPInt
89
+ # title - SOAP::SOAPString
90
+ # sKU - SOAP::SOAPString
91
+ class TaxItemProduct < TaxItemBase
92
+ attr_accessor :taxAmount
93
+ attr_accessor :taxRate
94
+ attr_accessor :taxType
95
+ attr_accessor :quantity
96
+ attr_accessor :unitPrice
97
+ attr_accessor :lineItemID
98
+ attr_accessor :title
99
+ attr_accessor :sKU
100
+
101
+ def initialize(taxAmount = nil, taxRate = nil, taxType = nil, quantity = nil, unitPrice = nil, lineItemID = nil, title = nil, sKU = nil)
102
+ @taxAmount = taxAmount
103
+ @taxRate = taxRate
104
+ @taxType = taxType
105
+ @quantity = quantity
106
+ @unitPrice = unitPrice
107
+ @lineItemID = lineItemID
108
+ @title = title
109
+ @sKU = sKU
110
+ end
111
+ end
112
+
113
+ # {http://api.channeladvisor.com/webservices/}APICredentials
114
+ # developerKey - SOAP::SOAPString
115
+ # password - SOAP::SOAPString
116
+ class APICredentials
117
+ attr_accessor :developerKey
118
+ attr_accessor :password
119
+
120
+ def initialize(developerKey = nil, password = nil)
121
+ @developerKey = developerKey
122
+ @password = password
123
+ end
124
+ end
125
+
126
+ # {http://api.channeladvisor.com/webservices/}APIResultOfString
127
+ # status - ChannelAdvisor::TaxServiceSOAP::ResultStatus
128
+ # messageCode - SOAP::SOAPInt
129
+ # message - SOAP::SOAPString
130
+ # data - SOAP::SOAPString
131
+ # resultData - SOAP::SOAPString
132
+ class APIResultOfString
133
+ attr_accessor :status
134
+ attr_accessor :messageCode
135
+ attr_accessor :message
136
+ attr_accessor :data
137
+ attr_accessor :resultData
138
+
139
+ def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
140
+ @status = status
141
+ @messageCode = messageCode
142
+ @message = message
143
+ @data = data
144
+ @resultData = resultData
145
+ end
146
+ end
147
+
148
+ # {http://api.channeladvisor.com/webservices/}ResultStatus
149
+ class ResultStatus < ::String
150
+ Failure = ResultStatus.new("Failure")
151
+ Success = ResultStatus.new("Success")
152
+ end
153
+
154
+ # {http://api.channeladvisor.com/webservices/}TaxTypeCode
155
+ class TaxTypeCode < ::String
156
+ NoChange = TaxTypeCode.new("NoChange")
157
+ NoTax = TaxTypeCode.new("NoTax")
158
+ TaxUS = TaxTypeCode.new("TaxUS")
159
+ VatExclusive = TaxTypeCode.new("VatExclusive")
160
+ VatInclusive = TaxTypeCode.new("VatInclusive")
161
+ end
162
+
163
+ # {http://api.channeladvisor.com/webservices/}GetTaxRateList
164
+ # accountID - SOAP::SOAPString
165
+ # cartID - SOAP::SOAPInt
166
+ # street - SOAP::SOAPString
167
+ # city - SOAP::SOAPString
168
+ # state - SOAP::SOAPString
169
+ # postalCode - SOAP::SOAPString
170
+ # country - SOAP::SOAPString
171
+ # shippingCost - SOAP::SOAPDecimal
172
+ class GetTaxRateList
173
+ attr_accessor :accountID
174
+ attr_accessor :cartID
175
+ attr_accessor :street
176
+ attr_accessor :city
177
+ attr_accessor :state
178
+ attr_accessor :postalCode
179
+ attr_accessor :country
180
+ attr_accessor :shippingCost
181
+
182
+ def initialize(accountID = nil, cartID = nil, street = nil, city = nil, state = nil, postalCode = nil, country = nil, shippingCost = nil)
183
+ @accountID = accountID
184
+ @cartID = cartID
185
+ @street = street
186
+ @city = city
187
+ @state = state
188
+ @postalCode = postalCode
189
+ @country = country
190
+ @shippingCost = shippingCost
191
+ end
192
+ end
193
+
194
+ # {http://api.channeladvisor.com/webservices/}GetTaxRateListResponse
195
+ # getTaxRateListResult - ChannelAdvisor::TaxServiceSOAP::APIResultOfTaxRateResult
196
+ class GetTaxRateListResponse
197
+ attr_accessor :getTaxRateListResult
198
+
199
+ def initialize(getTaxRateListResult = nil)
200
+ @getTaxRateListResult = getTaxRateListResult
201
+ end
202
+ end
203
+
204
+ # {http://api.channeladvisor.com/webservices/}Ping
205
+ class Ping
206
+ def initialize
207
+ end
208
+ end
209
+
210
+ # {http://api.channeladvisor.com/webservices/}PingResponse
211
+ # pingResult - ChannelAdvisor::TaxServiceSOAP::APIResultOfString
212
+ class PingResponse
213
+ attr_accessor :pingResult
214
+
215
+ def initialize(pingResult = nil)
216
+ @pingResult = pingResult
217
+ end
218
+ end
219
+
220
+
221
+ end; end