secondrotation-channel_advisor 0.0.3 → 0.0.4
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.
- data/README +35 -1
- data/lib/channel_advisor/admin_service.rb +14 -0
- data/lib/channel_advisor/admin_service/client.rb +63 -0
- data/lib/channel_advisor/admin_service/mapping_registry.rb +218 -0
- data/lib/channel_advisor/admin_service/types.rb +245 -0
- data/lib/channel_advisor/inventory_service/client.rb +32 -16
- data/lib/channel_advisor/inventory_service/mapping_registry.rb +234 -137
- data/lib/channel_advisor/inventory_service/types.rb +253 -115
- data/lib/channel_advisor/marketplace_ad_service/mapping_registry.rb +3 -3
- data/lib/channel_advisor/order_service/client.rb +8 -0
- data/lib/channel_advisor/order_service/mapping_registry.rb +103 -14
- data/lib/channel_advisor/order_service/types.rb +98 -9
- data/lib/channel_advisor/store_service/mapping_registry.rb +1 -1
- data/spec/lib/channel_advisor/admin_service_spec.rb +12 -0
- data/{test → spec}/lib/channel_advisor/auth_handler_spec.rb +0 -0
- data/{test → spec}/lib/channel_advisor/cart_service_spec.rb +0 -0
- data/{test → spec}/lib/channel_advisor/inventory_service_spec.rb +0 -0
- data/{test → spec}/lib/channel_advisor/marketplace_ad_service_spec.rb +0 -0
- data/{test → spec}/lib/channel_advisor/message_code_spec.rb +0 -0
- data/{test → spec}/lib/channel_advisor/order_service_spec.rb +0 -0
- data/{test → spec}/lib/channel_advisor/service_proxy_spec.rb +0 -0
- data/{test → spec}/lib/channel_advisor/shipping_service_spec.rb +0 -0
- data/{test → spec}/lib/channel_advisor/store_service_spec.rb +0 -0
- data/{test → spec}/lib/channel_advisor/tax_service_spec.rb +0 -0
- data/{test → spec}/spec.opts +0 -0
- data/{test → spec}/spec_helper.rb +0 -0
- metadata +40 -32
data/README
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
1
|
README
|
|
2
2
|
========================================================================
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
This gem provides access to data from Channel Advisor (CA). It contains files generated by soap4r using the WSDL files
|
|
5
|
+
provided on the Channel Advisor Developer Network web site and a thin wrapper to help with authorization and
|
|
6
|
+
error handling.
|
|
7
|
+
|
|
8
|
+
How to Access CA
|
|
9
|
+
----------
|
|
10
|
+
|
|
11
|
+
require 'rubygems'
|
|
12
|
+
require 'channel_advisor/inventory_service'
|
|
13
|
+
|
|
14
|
+
configatron.channel_advisor.account_id = 'YOUR ACCOUNT ID'
|
|
15
|
+
configatron.channel_advisor.developer_key = 'YOUR DEVELOPER KEY'
|
|
16
|
+
configatron.channel_advisor.password = 'YOUR API PASSWORD'
|
|
17
|
+
|
|
18
|
+
criteria = ChannelAdvisor::InventoryServiceSOAP::InventoryItemCriteria.new
|
|
19
|
+
criteria.skuStartsWith = 'SR123'
|
|
20
|
+
criteria.pageNumber = 1
|
|
21
|
+
criteria.pageSize = 10
|
|
22
|
+
|
|
23
|
+
inventory = ChannelAdvisor::InventoryService.new
|
|
24
|
+
result = inventory.getFilteredSkuList(criteria)
|
|
25
|
+
["SR123756282", "SR123666418", "SR1232641972"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
How to Generate the API Classes
|
|
29
|
+
----------
|
|
30
|
+
|
|
31
|
+
* If there is a new service, add it to "services = %w(admin_service inventory_service ...)" in Rakefile
|
|
32
|
+
* Execute "rake generate"
|
|
33
|
+
* Remove all the "require" statements from the generated files.
|
|
34
|
+
|
|
35
|
+
Resources
|
|
36
|
+
----------
|
|
37
|
+
http://developer.channeladvisor.com/display/cadn/ChannelAdvisor+Developer+Network
|
|
@@ -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__), 'admin_service', required))
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
module ChannelAdvisor
|
|
7
|
+
class AdminService
|
|
8
|
+
include ChannelAdvisor::ServiceProxy
|
|
9
|
+
define_service_methods(
|
|
10
|
+
ChannelAdvisor::AdminServiceSOAP,
|
|
11
|
+
ChannelAdvisor::AdminServiceSOAP::AdminServiceSoap
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
module ChannelAdvisor::AdminServiceSOAP
|
|
2
|
+
|
|
3
|
+
class AdminServiceSoap < ::SOAP::RPC::Driver
|
|
4
|
+
DefaultEndpointUrl = "https://api.channeladvisor.com/ChannelAdvisorAPI/v1/AdminService.asmx"
|
|
5
|
+
|
|
6
|
+
Methods = [
|
|
7
|
+
[ "http://api.channeladvisor.com/webservices/GetAuthorizationList",
|
|
8
|
+
"getAuthorizationList",
|
|
9
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetAuthorizationList"]],
|
|
10
|
+
["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "GetAuthorizationListResponse"]] ],
|
|
11
|
+
{ :request_style => :document, :request_use => :literal,
|
|
12
|
+
:response_style => :document, :response_use => :literal,
|
|
13
|
+
:faults => {} }
|
|
14
|
+
],
|
|
15
|
+
[ "http://api.channeladvisor.com/webservices/RequestAccess",
|
|
16
|
+
"requestAccess",
|
|
17
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "RequestAccess"]],
|
|
18
|
+
["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "RequestAccessResponse"]] ],
|
|
19
|
+
{ :request_style => :document, :request_use => :literal,
|
|
20
|
+
:response_style => :document, :response_use => :literal,
|
|
21
|
+
:faults => {} }
|
|
22
|
+
],
|
|
23
|
+
[ "http://api.channeladvisor.com/webservices/Ping",
|
|
24
|
+
"ping",
|
|
25
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "Ping"]],
|
|
26
|
+
["out", "parameters", ["::SOAP::SOAPElement", "http://api.channeladvisor.com/webservices/", "PingResponse"]] ],
|
|
27
|
+
{ :request_style => :document, :request_use => :literal,
|
|
28
|
+
:response_style => :document, :response_use => :literal,
|
|
29
|
+
:faults => {} }
|
|
30
|
+
]
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
def initialize(endpoint_url = nil)
|
|
34
|
+
endpoint_url ||= DefaultEndpointUrl
|
|
35
|
+
super(endpoint_url, nil)
|
|
36
|
+
self.mapping_registry = DefaultMappingRegistry::EncodedRegistry
|
|
37
|
+
self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry
|
|
38
|
+
init_methods
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
private
|
|
42
|
+
|
|
43
|
+
def init_methods
|
|
44
|
+
Methods.each do |definitions|
|
|
45
|
+
opt = definitions.last
|
|
46
|
+
if opt[:request_style] == :document
|
|
47
|
+
add_document_operation(*definitions)
|
|
48
|
+
else
|
|
49
|
+
add_rpc_operation(*definitions)
|
|
50
|
+
qname = definitions[0]
|
|
51
|
+
name = definitions[2]
|
|
52
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
|
53
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
|
54
|
+
__send__(name, *arg)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
end
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
module ChannelAdvisor; module AdminServiceSOAP
|
|
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::AdminServiceSOAP::APIResultOfArrayOfAuthorizationResponse,
|
|
10
|
+
:schema_type => XSD::QName.new(NsWebservices, "APIResultOfArrayOfAuthorizationResponse"),
|
|
11
|
+
:schema_element => [
|
|
12
|
+
["status", ["ChannelAdvisor::AdminServiceSOAP::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::AdminServiceSOAP::ArrayOfAuthorizationResponse", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
|
|
17
|
+
]
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
EncodedRegistry.register(
|
|
21
|
+
:class => ChannelAdvisor::AdminServiceSOAP::ArrayOfAuthorizationResponse,
|
|
22
|
+
:schema_type => XSD::QName.new(NsWebservices, "ArrayOfAuthorizationResponse"),
|
|
23
|
+
:schema_element => [
|
|
24
|
+
["authorizationResponse", ["ChannelAdvisor::AdminServiceSOAP::AuthorizationResponse[]", XSD::QName.new(NsWebservices, "AuthorizationResponse")], [0, nil]]
|
|
25
|
+
]
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
EncodedRegistry.register(
|
|
29
|
+
:class => ChannelAdvisor::AdminServiceSOAP::AuthorizationResponse,
|
|
30
|
+
:schema_type => XSD::QName.new(NsWebservices, "AuthorizationResponse"),
|
|
31
|
+
:schema_element => [
|
|
32
|
+
["accountID", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "AccountID")], [0, 1]],
|
|
33
|
+
["localID", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "LocalID")]],
|
|
34
|
+
["accountName", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "AccountName")], [0, 1]],
|
|
35
|
+
["accountType", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "AccountType")], [0, 1]],
|
|
36
|
+
["resourceName", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "ResourceName")], [0, 1]],
|
|
37
|
+
["status", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Status")], [0, 1]],
|
|
38
|
+
["messageCode", ["ChannelAdvisor::AdminServiceSOAP::ErrorCode", XSD::QName.new(NsWebservices, "MessageCode")]],
|
|
39
|
+
["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]]
|
|
40
|
+
]
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
EncodedRegistry.register(
|
|
44
|
+
:class => ChannelAdvisor::AdminServiceSOAP::APICredentials,
|
|
45
|
+
:schema_type => XSD::QName.new(NsWebservices, "APICredentials"),
|
|
46
|
+
:schema_element => [
|
|
47
|
+
["developerKey", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "DeveloperKey")], [0, 1]],
|
|
48
|
+
["password", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Password")], [0, 1]]
|
|
49
|
+
]
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
EncodedRegistry.register(
|
|
53
|
+
:class => ChannelAdvisor::AdminServiceSOAP::APIResultOfBoolean,
|
|
54
|
+
:schema_type => XSD::QName.new(NsWebservices, "APIResultOfBoolean"),
|
|
55
|
+
:schema_element => [
|
|
56
|
+
["status", ["ChannelAdvisor::AdminServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
|
|
57
|
+
["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
|
|
58
|
+
["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
|
|
59
|
+
["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
|
|
60
|
+
["resultData", ["SOAP::SOAPBoolean", XSD::QName.new(NsWebservices, "ResultData")]]
|
|
61
|
+
]
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
EncodedRegistry.register(
|
|
65
|
+
:class => ChannelAdvisor::AdminServiceSOAP::APIResultOfString,
|
|
66
|
+
:schema_type => XSD::QName.new(NsWebservices, "APIResultOfString"),
|
|
67
|
+
:schema_element => [
|
|
68
|
+
["status", ["ChannelAdvisor::AdminServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
|
|
69
|
+
["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
|
|
70
|
+
["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
|
|
71
|
+
["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
|
|
72
|
+
["resultData", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
|
|
73
|
+
]
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
EncodedRegistry.register(
|
|
77
|
+
:class => ChannelAdvisor::AdminServiceSOAP::ResultStatus,
|
|
78
|
+
:schema_type => XSD::QName.new(NsWebservices, "ResultStatus")
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
EncodedRegistry.register(
|
|
82
|
+
:class => ChannelAdvisor::AdminServiceSOAP::ErrorCode,
|
|
83
|
+
:schema_type => XSD::QName.new(NsWebservices, "ErrorCode")
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
LiteralRegistry.register(
|
|
87
|
+
:class => ChannelAdvisor::AdminServiceSOAP::APIResultOfArrayOfAuthorizationResponse,
|
|
88
|
+
:schema_type => XSD::QName.new(NsWebservices, "APIResultOfArrayOfAuthorizationResponse"),
|
|
89
|
+
:schema_element => [
|
|
90
|
+
["status", ["ChannelAdvisor::AdminServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
|
|
91
|
+
["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
|
|
92
|
+
["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
|
|
93
|
+
["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
|
|
94
|
+
["resultData", ["ChannelAdvisor::AdminServiceSOAP::ArrayOfAuthorizationResponse", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
|
|
95
|
+
]
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
LiteralRegistry.register(
|
|
99
|
+
:class => ChannelAdvisor::AdminServiceSOAP::ArrayOfAuthorizationResponse,
|
|
100
|
+
:schema_type => XSD::QName.new(NsWebservices, "ArrayOfAuthorizationResponse"),
|
|
101
|
+
:schema_element => [
|
|
102
|
+
["authorizationResponse", ["ChannelAdvisor::AdminServiceSOAP::AuthorizationResponse[]", XSD::QName.new(NsWebservices, "AuthorizationResponse")], [0, nil]]
|
|
103
|
+
]
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
LiteralRegistry.register(
|
|
107
|
+
:class => ChannelAdvisor::AdminServiceSOAP::AuthorizationResponse,
|
|
108
|
+
:schema_type => XSD::QName.new(NsWebservices, "AuthorizationResponse"),
|
|
109
|
+
:schema_element => [
|
|
110
|
+
["accountID", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "AccountID")], [0, 1]],
|
|
111
|
+
["localID", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "LocalID")]],
|
|
112
|
+
["accountName", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "AccountName")], [0, 1]],
|
|
113
|
+
["accountType", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "AccountType")], [0, 1]],
|
|
114
|
+
["resourceName", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "ResourceName")], [0, 1]],
|
|
115
|
+
["status", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Status")], [0, 1]],
|
|
116
|
+
["messageCode", ["ChannelAdvisor::AdminServiceSOAP::ErrorCode", XSD::QName.new(NsWebservices, "MessageCode")]],
|
|
117
|
+
["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]]
|
|
118
|
+
]
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
LiteralRegistry.register(
|
|
122
|
+
:class => ChannelAdvisor::AdminServiceSOAP::APICredentials,
|
|
123
|
+
:schema_type => XSD::QName.new(NsWebservices, "APICredentials"),
|
|
124
|
+
:schema_element => [
|
|
125
|
+
["developerKey", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "DeveloperKey")], [0, 1]],
|
|
126
|
+
["password", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Password")], [0, 1]]
|
|
127
|
+
]
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
LiteralRegistry.register(
|
|
131
|
+
:class => ChannelAdvisor::AdminServiceSOAP::APIResultOfBoolean,
|
|
132
|
+
:schema_type => XSD::QName.new(NsWebservices, "APIResultOfBoolean"),
|
|
133
|
+
:schema_element => [
|
|
134
|
+
["status", ["ChannelAdvisor::AdminServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
|
|
135
|
+
["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
|
|
136
|
+
["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
|
|
137
|
+
["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
|
|
138
|
+
["resultData", ["SOAP::SOAPBoolean", XSD::QName.new(NsWebservices, "ResultData")]]
|
|
139
|
+
]
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
LiteralRegistry.register(
|
|
143
|
+
:class => ChannelAdvisor::AdminServiceSOAP::APIResultOfString,
|
|
144
|
+
:schema_type => XSD::QName.new(NsWebservices, "APIResultOfString"),
|
|
145
|
+
:schema_element => [
|
|
146
|
+
["status", ["ChannelAdvisor::AdminServiceSOAP::ResultStatus", XSD::QName.new(NsWebservices, "Status")]],
|
|
147
|
+
["messageCode", ["SOAP::SOAPInt", XSD::QName.new(NsWebservices, "MessageCode")]],
|
|
148
|
+
["message", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Message")], [0, 1]],
|
|
149
|
+
["data", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Data")], [0, 1]],
|
|
150
|
+
["resultData", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "ResultData")], [0, 1]]
|
|
151
|
+
]
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
LiteralRegistry.register(
|
|
155
|
+
:class => ChannelAdvisor::AdminServiceSOAP::ResultStatus,
|
|
156
|
+
:schema_type => XSD::QName.new(NsWebservices, "ResultStatus")
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
LiteralRegistry.register(
|
|
160
|
+
:class => ChannelAdvisor::AdminServiceSOAP::ErrorCode,
|
|
161
|
+
:schema_type => XSD::QName.new(NsWebservices, "ErrorCode")
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
LiteralRegistry.register(
|
|
165
|
+
:class => ChannelAdvisor::AdminServiceSOAP::GetAuthorizationList,
|
|
166
|
+
:schema_name => XSD::QName.new(NsWebservices, "GetAuthorizationList"),
|
|
167
|
+
:schema_element => []
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
LiteralRegistry.register(
|
|
171
|
+
:class => ChannelAdvisor::AdminServiceSOAP::GetAuthorizationListResponse,
|
|
172
|
+
:schema_name => XSD::QName.new(NsWebservices, "GetAuthorizationListResponse"),
|
|
173
|
+
:schema_element => [
|
|
174
|
+
["getAuthorizationListResult", ["ChannelAdvisor::AdminServiceSOAP::APIResultOfArrayOfAuthorizationResponse", XSD::QName.new(NsWebservices, "GetAuthorizationListResult")], [0, 1]]
|
|
175
|
+
]
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
LiteralRegistry.register(
|
|
179
|
+
:class => ChannelAdvisor::AdminServiceSOAP::APICredentials,
|
|
180
|
+
:schema_name => XSD::QName.new(NsWebservices, "APICredentials"),
|
|
181
|
+
:schema_element => [
|
|
182
|
+
["developerKey", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "DeveloperKey")], [0, 1]],
|
|
183
|
+
["password", ["SOAP::SOAPString", XSD::QName.new(NsWebservices, "Password")], [0, 1]]
|
|
184
|
+
]
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
LiteralRegistry.register(
|
|
188
|
+
:class => ChannelAdvisor::AdminServiceSOAP::RequestAccess,
|
|
189
|
+
:schema_name => XSD::QName.new(NsWebservices, "RequestAccess"),
|
|
190
|
+
:schema_element => [
|
|
191
|
+
["localID", "SOAP::SOAPInt"]
|
|
192
|
+
]
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
LiteralRegistry.register(
|
|
196
|
+
:class => ChannelAdvisor::AdminServiceSOAP::RequestAccessResponse,
|
|
197
|
+
:schema_name => XSD::QName.new(NsWebservices, "RequestAccessResponse"),
|
|
198
|
+
:schema_element => [
|
|
199
|
+
["requestAccessResult", ["ChannelAdvisor::AdminServiceSOAP::APIResultOfBoolean", XSD::QName.new(NsWebservices, "RequestAccessResult")], [0, 1]]
|
|
200
|
+
]
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
LiteralRegistry.register(
|
|
204
|
+
:class => ChannelAdvisor::AdminServiceSOAP::Ping,
|
|
205
|
+
:schema_name => XSD::QName.new(NsWebservices, "Ping"),
|
|
206
|
+
:schema_element => []
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
LiteralRegistry.register(
|
|
210
|
+
:class => ChannelAdvisor::AdminServiceSOAP::PingResponse,
|
|
211
|
+
:schema_name => XSD::QName.new(NsWebservices, "PingResponse"),
|
|
212
|
+
:schema_element => [
|
|
213
|
+
["pingResult", ["ChannelAdvisor::AdminServiceSOAP::APIResultOfString", XSD::QName.new(NsWebservices, "PingResult")], [0, 1]]
|
|
214
|
+
]
|
|
215
|
+
)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end; end
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
module ChannelAdvisor; module AdminServiceSOAP
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# {http://api.channeladvisor.com/webservices/}APIResultOfArrayOfAuthorizationResponse
|
|
5
|
+
# status - ChannelAdvisor::AdminServiceSOAP::ResultStatus
|
|
6
|
+
# messageCode - SOAP::SOAPInt
|
|
7
|
+
# message - SOAP::SOAPString
|
|
8
|
+
# data - SOAP::SOAPString
|
|
9
|
+
# resultData - ChannelAdvisor::AdminServiceSOAP::ArrayOfAuthorizationResponse
|
|
10
|
+
class APIResultOfArrayOfAuthorizationResponse
|
|
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/}ArrayOfAuthorizationResponse
|
|
27
|
+
class ArrayOfAuthorizationResponse < ::Array
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# {http://api.channeladvisor.com/webservices/}AuthorizationResponse
|
|
31
|
+
# accountID - SOAP::SOAPString
|
|
32
|
+
# localID - SOAP::SOAPInt
|
|
33
|
+
# accountName - SOAP::SOAPString
|
|
34
|
+
# accountType - SOAP::SOAPString
|
|
35
|
+
# resourceName - SOAP::SOAPString
|
|
36
|
+
# status - SOAP::SOAPString
|
|
37
|
+
# messageCode - ChannelAdvisor::AdminServiceSOAP::ErrorCode
|
|
38
|
+
# message - SOAP::SOAPString
|
|
39
|
+
class AuthorizationResponse
|
|
40
|
+
attr_accessor :accountID
|
|
41
|
+
attr_accessor :localID
|
|
42
|
+
attr_accessor :accountName
|
|
43
|
+
attr_accessor :accountType
|
|
44
|
+
attr_accessor :resourceName
|
|
45
|
+
attr_accessor :status
|
|
46
|
+
attr_accessor :messageCode
|
|
47
|
+
attr_accessor :message
|
|
48
|
+
|
|
49
|
+
def initialize(accountID = nil, localID = nil, accountName = nil, accountType = nil, resourceName = nil, status = nil, messageCode = nil, message = nil)
|
|
50
|
+
@accountID = accountID
|
|
51
|
+
@localID = localID
|
|
52
|
+
@accountName = accountName
|
|
53
|
+
@accountType = accountType
|
|
54
|
+
@resourceName = resourceName
|
|
55
|
+
@status = status
|
|
56
|
+
@messageCode = messageCode
|
|
57
|
+
@message = message
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# {http://api.channeladvisor.com/webservices/}APICredentials
|
|
62
|
+
# developerKey - SOAP::SOAPString
|
|
63
|
+
# password - SOAP::SOAPString
|
|
64
|
+
class APICredentials
|
|
65
|
+
attr_accessor :developerKey
|
|
66
|
+
attr_accessor :password
|
|
67
|
+
|
|
68
|
+
def initialize(developerKey = nil, password = nil)
|
|
69
|
+
@developerKey = developerKey
|
|
70
|
+
@password = password
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# {http://api.channeladvisor.com/webservices/}APIResultOfBoolean
|
|
75
|
+
# status - ChannelAdvisor::AdminServiceSOAP::ResultStatus
|
|
76
|
+
# messageCode - SOAP::SOAPInt
|
|
77
|
+
# message - SOAP::SOAPString
|
|
78
|
+
# data - SOAP::SOAPString
|
|
79
|
+
# resultData - SOAP::SOAPBoolean
|
|
80
|
+
class APIResultOfBoolean
|
|
81
|
+
attr_accessor :status
|
|
82
|
+
attr_accessor :messageCode
|
|
83
|
+
attr_accessor :message
|
|
84
|
+
attr_accessor :data
|
|
85
|
+
attr_accessor :resultData
|
|
86
|
+
|
|
87
|
+
def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
|
|
88
|
+
@status = status
|
|
89
|
+
@messageCode = messageCode
|
|
90
|
+
@message = message
|
|
91
|
+
@data = data
|
|
92
|
+
@resultData = resultData
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# {http://api.channeladvisor.com/webservices/}APIResultOfString
|
|
97
|
+
# status - ChannelAdvisor::AdminServiceSOAP::ResultStatus
|
|
98
|
+
# messageCode - SOAP::SOAPInt
|
|
99
|
+
# message - SOAP::SOAPString
|
|
100
|
+
# data - SOAP::SOAPString
|
|
101
|
+
# resultData - SOAP::SOAPString
|
|
102
|
+
class APIResultOfString
|
|
103
|
+
attr_accessor :status
|
|
104
|
+
attr_accessor :messageCode
|
|
105
|
+
attr_accessor :message
|
|
106
|
+
attr_accessor :data
|
|
107
|
+
attr_accessor :resultData
|
|
108
|
+
|
|
109
|
+
def initialize(status = nil, messageCode = nil, message = nil, data = nil, resultData = nil)
|
|
110
|
+
@status = status
|
|
111
|
+
@messageCode = messageCode
|
|
112
|
+
@message = message
|
|
113
|
+
@data = data
|
|
114
|
+
@resultData = resultData
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# {http://api.channeladvisor.com/webservices/}ResultStatus
|
|
119
|
+
class ResultStatus < ::String
|
|
120
|
+
Failure = ResultStatus.new("Failure")
|
|
121
|
+
Success = ResultStatus.new("Success")
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# {http://api.channeladvisor.com/webservices/}ErrorCode
|
|
125
|
+
class ErrorCode < ::String
|
|
126
|
+
AccountIDIsBlank = ErrorCode.new("AccountIDIsBlank")
|
|
127
|
+
AccountIDIsNull = ErrorCode.new("AccountIDIsNull")
|
|
128
|
+
AccountIDNotExists = ErrorCode.new("AccountIDNotExists")
|
|
129
|
+
CartIDNull = ErrorCode.new("CartIDNull")
|
|
130
|
+
CartNotFound = ErrorCode.new("CartNotFound")
|
|
131
|
+
DataIntegrityViolation = ErrorCode.new("DataIntegrityViolation")
|
|
132
|
+
EMailAddressBadFormat = ErrorCode.new("EMailAddressBadFormat")
|
|
133
|
+
EmptyCartSubmit = ErrorCode.new("EmptyCartSubmit")
|
|
134
|
+
ErrorInvoiceCreation = ErrorCode.new("ErrorInvoiceCreation")
|
|
135
|
+
Error_AuctionWinnerValidation = ErrorCode.new("Error_AuctionWinnerValidation")
|
|
136
|
+
Error_NotValidCartID = ErrorCode.new("Error_NotValidCartID")
|
|
137
|
+
Error_PromotionNotFound = ErrorCode.new("Error_PromotionNotFound")
|
|
138
|
+
Error_SKUDuplicated = ErrorCode.new("Error_SKUDuplicated")
|
|
139
|
+
Error_SavingBillingData = ErrorCode.new("Error_SavingBillingData")
|
|
140
|
+
Error_SavingOrderShippingData = ErrorCode.new("Error_SavingOrderShippingData")
|
|
141
|
+
FetchFilterInfoNull = ErrorCode.new("FetchFilterInfoNull")
|
|
142
|
+
InvalidArguments = ErrorCode.new("InvalidArguments")
|
|
143
|
+
InvalidCartID = ErrorCode.new("InvalidCartID")
|
|
144
|
+
InvalidSaleSource = ErrorCode.new("InvalidSaleSource")
|
|
145
|
+
Invalid_AddressLength = ErrorCode.new("Invalid_AddressLength")
|
|
146
|
+
Invalid_CCLast4 = ErrorCode.new("Invalid_CCLast4")
|
|
147
|
+
Invalid_CarrierClassData = ErrorCode.new("Invalid_CarrierClassData")
|
|
148
|
+
Invalid_CityLength = ErrorCode.new("Invalid_CityLength")
|
|
149
|
+
Invalid_CompanyNameLength = ErrorCode.new("Invalid_CompanyNameLength")
|
|
150
|
+
Invalid_CountryLength = ErrorCode.new("Invalid_CountryLength")
|
|
151
|
+
Invalid_CustomFieldValue = ErrorCode.new("Invalid_CustomFieldValue")
|
|
152
|
+
Invalid_FirstNameLength = ErrorCode.new("Invalid_FirstNameLength")
|
|
153
|
+
Invalid_JobTitleLength = ErrorCode.new("Invalid_JobTitleLength")
|
|
154
|
+
Invalid_LastNameLength = ErrorCode.new("Invalid_LastNameLength")
|
|
155
|
+
Invalid_OrderId = ErrorCode.new("Invalid_OrderId")
|
|
156
|
+
Invalid_OrderNumberLength = ErrorCode.new("Invalid_OrderNumberLength")
|
|
157
|
+
Invalid_OrderStatus = ErrorCode.new("Invalid_OrderStatus")
|
|
158
|
+
Invalid_PhoneLength = ErrorCode.new("Invalid_PhoneLength")
|
|
159
|
+
Invalid_PostalCodeLength = ErrorCode.new("Invalid_PostalCodeLength")
|
|
160
|
+
Invalid_ShippingInstructionsLgth = ErrorCode.new("Invalid_ShippingInstructionsLgth")
|
|
161
|
+
Invalid_SuffixLength = ErrorCode.new("Invalid_SuffixLength")
|
|
162
|
+
Invalid_TitleLength = ErrorCode.new("Invalid_TitleLength")
|
|
163
|
+
Invalid_TrackingNumberLgth = ErrorCode.new("Invalid_TrackingNumberLgth")
|
|
164
|
+
LineItemIDNotFound = ErrorCode.new("LineItemIDNotFound")
|
|
165
|
+
LineItemOrSKUEmpty = ErrorCode.new("LineItemOrSKUEmpty")
|
|
166
|
+
MissingEmailAddress = ErrorCode.new("MissingEmailAddress")
|
|
167
|
+
MultiplePromoCodesSpecified = ErrorCode.new("MultiplePromoCodesSpecified")
|
|
168
|
+
NegativeQuantity = ErrorCode.new("NegativeQuantity")
|
|
169
|
+
OrderCollectionNull = ErrorCode.new("OrderCollectionNull")
|
|
170
|
+
OrderIdIsNullOrEmpty = ErrorCode.new("OrderIdIsNullOrEmpty")
|
|
171
|
+
PromoAmountOutOfRange = ErrorCode.new("PromoAmountOutOfRange")
|
|
172
|
+
QuantityNotEnough = ErrorCode.new("QuantityNotEnough")
|
|
173
|
+
RoverRegionNotFound = ErrorCode.new("RoverRegionNotFound")
|
|
174
|
+
SKUNotFound = ErrorCode.new("SKUNotFound")
|
|
175
|
+
ShippingCostNegative = ErrorCode.new("ShippingCostNegative")
|
|
176
|
+
SkuIsBlank = ErrorCode.new("SkuIsBlank")
|
|
177
|
+
SkuIsNull = ErrorCode.new("SkuIsNull")
|
|
178
|
+
Success = ErrorCode.new("Success")
|
|
179
|
+
TooManyInsuranceAmounts = ErrorCode.new("TooManyInsuranceAmounts")
|
|
180
|
+
TooManySKUsRequested = ErrorCode.new("TooManySKUsRequested")
|
|
181
|
+
TooManyShippingAmounts = ErrorCode.new("TooManyShippingAmounts")
|
|
182
|
+
TooManyTaxAmounts = ErrorCode.new("TooManyTaxAmounts")
|
|
183
|
+
TooManyVATShippingAmounts = ErrorCode.new("TooManyVATShippingAmounts")
|
|
184
|
+
Unexpected = ErrorCode.new("Unexpected")
|
|
185
|
+
VATRangeOutOfRange = ErrorCode.new("VATRangeOutOfRange")
|
|
186
|
+
WrongAccountSettings = ErrorCode.new("WrongAccountSettings")
|
|
187
|
+
WrongCountryInfo = ErrorCode.new("WrongCountryInfo")
|
|
188
|
+
WrongStateInfo = ErrorCode.new("WrongStateInfo")
|
|
189
|
+
ZeroQuantity = ErrorCode.new("ZeroQuantity")
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# {http://api.channeladvisor.com/webservices/}GetAuthorizationList
|
|
193
|
+
class GetAuthorizationList
|
|
194
|
+
def initialize
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# {http://api.channeladvisor.com/webservices/}GetAuthorizationListResponse
|
|
199
|
+
# getAuthorizationListResult - ChannelAdvisor::AdminServiceSOAP::APIResultOfArrayOfAuthorizationResponse
|
|
200
|
+
class GetAuthorizationListResponse
|
|
201
|
+
attr_accessor :getAuthorizationListResult
|
|
202
|
+
|
|
203
|
+
def initialize(getAuthorizationListResult = nil)
|
|
204
|
+
@getAuthorizationListResult = getAuthorizationListResult
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# {http://api.channeladvisor.com/webservices/}RequestAccess
|
|
209
|
+
# localID - SOAP::SOAPInt
|
|
210
|
+
class RequestAccess
|
|
211
|
+
attr_accessor :localID
|
|
212
|
+
|
|
213
|
+
def initialize(localID = nil)
|
|
214
|
+
@localID = localID
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# {http://api.channeladvisor.com/webservices/}RequestAccessResponse
|
|
219
|
+
# requestAccessResult - ChannelAdvisor::AdminServiceSOAP::APIResultOfBoolean
|
|
220
|
+
class RequestAccessResponse
|
|
221
|
+
attr_accessor :requestAccessResult
|
|
222
|
+
|
|
223
|
+
def initialize(requestAccessResult = nil)
|
|
224
|
+
@requestAccessResult = requestAccessResult
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# {http://api.channeladvisor.com/webservices/}Ping
|
|
229
|
+
class Ping
|
|
230
|
+
def initialize
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# {http://api.channeladvisor.com/webservices/}PingResponse
|
|
235
|
+
# pingResult - ChannelAdvisor::AdminServiceSOAP::APIResultOfString
|
|
236
|
+
class PingResponse
|
|
237
|
+
attr_accessor :pingResult
|
|
238
|
+
|
|
239
|
+
def initialize(pingResult = nil)
|
|
240
|
+
@pingResult = pingResult
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
end; end
|