bookingstudio-ruby 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ /pkg/
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Andi Bade
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,19 @@
1
+ = bookingstudio-ruby
2
+
3
+ Ruby interface to the Bookingstudio SOAP Interface.
4
+
5
+ Generated via wsdl2ruby (soap4r) and changed naming to ruby-style.
6
+
7
+ == Note on Patches/Pull Requests
8
+
9
+ * Fork the project.
10
+ * Make your feature addition or bug fix.
11
+ * Add tests for it. This is important so I don't break it in a
12
+ future version unintentionally.
13
+ * Commit, do not mess with rakefile, version, or history.
14
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
15
+ * Send me a pull request. Bonus points for topic branches.
16
+
17
+ == Copyright
18
+
19
+ Copyright (c) 2011 Andi Bade. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,52 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "bookingstudio-ruby"
8
+ gem.summary = %Q{ruby interface to the Bookingstudio SOAP Interface}
9
+ gem.description = %Q{ruby interface to the Bookingstudio SOAP Interface}
10
+ gem.email = "andi@galaxycats.com"
11
+ gem.homepage = "http://www.fejo.dk"
12
+ gem.authors = ["Andi Bade", "Dirk Breuer", "Dominik Ehret"]
13
+ gem.add_dependency "soap4r", ">= 0"
14
+ end
15
+ Jeweler::GemcutterTasks.new
16
+ rescue LoadError
17
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
18
+ end
19
+
20
+ require 'rake/testtask'
21
+ Rake::TestTask.new(:test) do |test|
22
+ test.libs << 'lib' << 'test'
23
+ test.pattern = 'test/**/test_*.rb'
24
+ test.verbose = true
25
+ end
26
+
27
+ begin
28
+ require 'rcov/rcovtask'
29
+ Rcov::RcovTask.new do |test|
30
+ test.libs << 'test'
31
+ test.pattern = 'test/**/test_*.rb'
32
+ test.verbose = true
33
+ end
34
+ rescue LoadError
35
+ task :rcov do
36
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
37
+ end
38
+ end
39
+
40
+ task :test => :check_dependencies
41
+
42
+ task :default => :test
43
+
44
+ require 'rake/rdoctask'
45
+ Rake::RDocTask.new do |rdoc|
46
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
47
+
48
+ rdoc.rdoc_dir = 'rdoc'
49
+ rdoc.title = "bookingstudio-ruby #{version}"
50
+ rdoc.rdoc_files.include('README*')
51
+ rdoc.rdoc_files.include('lib/**/*.rb')
52
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,55 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{bookingstudio-ruby}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Andi Bade", "Dirk Breuer", "Dominik Ehret"]
12
+ s.date = %q{2011-01-18}
13
+ s.description = %q{ruby interface to the Bookingstudio SOAP Interface}
14
+ s.email = %q{andi@galaxycats.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".gitignore",
21
+ "LICENSE",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "bookingstudio-ruby.gemspec",
26
+ "lib/bookingstudio-ruby.rb",
27
+ "lib/bookingstudio_ruby.rb",
28
+ "lib/bookingstudio_ruby/web_service.rb",
29
+ "lib/bookingstudio_ruby/web_service/booking_service.rb",
30
+ "lib/bookingstudio_ruby/web_service/booking_service_driver.rb",
31
+ "lib/bookingstudio_ruby/web_service/booking_service_mapping_registry.rb",
32
+ "lib/bookingstudio_ruby/web_service/search_service.rb",
33
+ "lib/bookingstudio_ruby/web_service/search_service_driver.rb",
34
+ "lib/bookingstudio_ruby/web_service/search_service_mapping_registry.rb"
35
+ ]
36
+ s.homepage = %q{http://www.fejo.dk}
37
+ s.rdoc_options = ["--charset=UTF-8"]
38
+ s.require_paths = ["lib"]
39
+ s.rubygems_version = %q{1.3.6}
40
+ s.summary = %q{ruby interface to the Bookingstudio SOAP Interface}
41
+
42
+ if s.respond_to? :specification_version then
43
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
44
+ s.specification_version = 3
45
+
46
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
47
+ s.add_runtime_dependency(%q<soap4r>, [">= 0"])
48
+ else
49
+ s.add_dependency(%q<soap4r>, [">= 0"])
50
+ end
51
+ else
52
+ s.add_dependency(%q<soap4r>, [">= 0"])
53
+ end
54
+ end
55
+
@@ -0,0 +1 @@
1
+ require "bookingstudio_ruby"
@@ -0,0 +1,4 @@
1
+ module BookingstudioRuby
2
+ end
3
+
4
+ require "bookingstudio_ruby/web_service"
@@ -0,0 +1,14 @@
1
+ module BookingstudioRuby::WebService
2
+ # {http://schemas.datacontract.org/2004/07/BookingStudio.Public}ItemTypes
3
+ class ItemTypes < ::String
4
+ Cleaning = ItemTypes.new("Cleaning")
5
+ Consumption = ItemTypes.new("Consumption")
6
+ Deposit = ItemTypes.new("Deposit")
7
+ Insurance = ItemTypes.new("Insurance")
8
+ Standard = ItemTypes.new("Standard")
9
+ Transportation = ItemTypes.new("Transportation")
10
+ end
11
+ end
12
+
13
+ require 'bookingstudio_ruby/web_service/booking_service_driver'
14
+ require 'bookingstudio_ruby/web_service/search_service_driver'
@@ -0,0 +1,352 @@
1
+ require 'xsd/qname'
2
+
3
+ module BookingstudioRuby::WebService
4
+
5
+
6
+ # {http://bookingstudio.dk/public/datacontracts/2008/06/}BookingRequest
7
+ # languageId - SOAP::SOAPString
8
+ # bookingOptions - BookingstudioRuby::WebService::ArrayOfBookingOption
9
+ # customer - BookingstudioRuby::WebService::Customer
10
+ # noteFromCustomer - SOAP::SOAPString
11
+ # numberOfInfants - SOAP::SOAPInt
12
+ # numberOfPets - SOAP::SOAPInt
13
+ # affiliateId - SOAP::SOAPInt
14
+ class BookingRequest
15
+ attr_accessor :languageId
16
+ attr_accessor :bookingOptions
17
+ attr_accessor :customer
18
+ attr_accessor :noteFromCustomer
19
+ attr_accessor :numberOfInfants
20
+ attr_accessor :numberOfPets
21
+ attr_accessor :affiliateId
22
+
23
+ def initialize(languageId = nil, bookingOptions = nil, customer = nil, noteFromCustomer = nil, numberOfInfants = nil, numberOfPets = nil, affiliateId = nil)
24
+ @languageId = languageId
25
+ @bookingOptions = bookingOptions
26
+ @customer = customer
27
+ @noteFromCustomer = noteFromCustomer
28
+ @numberOfInfants = numberOfInfants
29
+ @numberOfPets = numberOfPets
30
+ @affiliateId = affiliateId
31
+ end
32
+ end
33
+
34
+ # {http://bookingstudio.dk/public/datacontracts/2008/06/}ArrayOfBookingOption
35
+ class ArrayOfBookingOption < ::Array
36
+ end
37
+
38
+ # {http://bookingstudio.dk/public/datacontracts/2008/06/}BookingOption
39
+ # lodgingUnitTypeId - (any)
40
+ # arrivalDate - SOAP::SOAPDateTime
41
+ # departureDate - SOAP::SOAPDateTime
42
+ # boardTypeId - SOAP::SOAPInt
43
+ # children - SOAP::SOAPInt
44
+ # adults - SOAP::SOAPInt
45
+ # changeDay - SOAP::SOAPShort
46
+ # normalPrice - SOAP::SOAPDecimal
47
+ # price - SOAP::SOAPDecimal
48
+ # currencyId - SOAP::SOAPString
49
+ # hasDicount - SOAP::SOAPBoolean
50
+ # bookingVPath - SOAP::SOAPString
51
+ # itemBasket - BookingstudioRuby::WebService::ArrayOfItem
52
+ # discountInternalName - SOAP::SOAPString
53
+ # discountName - SOAP::SOAPString
54
+ # discountTags - BookingstudioRuby::WebService::ArrayOfstring
55
+ # bookingVPathSalesChannel - SOAP::SOAPString
56
+ class BookingOption
57
+ attr_accessor :lodgingUnitTypeId
58
+ attr_accessor :arrivalDate
59
+ attr_accessor :departureDate
60
+ attr_accessor :boardTypeId
61
+ attr_accessor :children
62
+ attr_accessor :adults
63
+ attr_accessor :changeDay
64
+ attr_accessor :normalPrice
65
+ attr_accessor :price
66
+ attr_accessor :currencyId
67
+ attr_accessor :hasDicount
68
+ attr_accessor :bookingVPath
69
+ attr_accessor :itemBasket
70
+ attr_accessor :discountInternalName
71
+ attr_accessor :discountName
72
+ attr_accessor :discountTags
73
+ attr_accessor :bookingVPathSalesChannel
74
+
75
+ def initialize(lodgingUnitTypeId = nil, arrivalDate = nil, departureDate = nil, boardTypeId = nil, children = nil, adults = nil, changeDay = nil, normalPrice = nil, price = nil, currencyId = nil, hasDicount = nil, bookingVPath = nil, itemBasket = nil, discountInternalName = nil, discountName = nil, discountTags = nil, bookingVPathSalesChannel = nil)
76
+ @lodgingUnitTypeId = lodgingUnitTypeId
77
+ @arrivalDate = arrivalDate
78
+ @departureDate = departureDate
79
+ @boardTypeId = boardTypeId
80
+ @children = children
81
+ @adults = adults
82
+ @changeDay = changeDay
83
+ @normalPrice = normalPrice
84
+ @price = price
85
+ @currencyId = currencyId
86
+ @hasDicount = hasDicount
87
+ @bookingVPath = bookingVPath
88
+ @itemBasket = itemBasket
89
+ @discountInternalName = discountInternalName
90
+ @discountName = discountName
91
+ @discountTags = discountTags
92
+ @bookingVPathSalesChannel = bookingVPathSalesChannel
93
+ end
94
+ end
95
+
96
+ # {http://bookingstudio.dk/public/datacontracts/2008/06/}ArrayOfItem
97
+ class ArrayOfItem < ::Array
98
+ end
99
+
100
+ # {http://bookingstudio.dk/public/datacontracts/2008/06/}Item
101
+ # id - SOAP::SOAPInt
102
+ # itemNumber - SOAP::SOAPInt
103
+ # unitPrice - SOAP::SOAPDecimal
104
+ # currencyId - SOAP::SOAPString
105
+ # showPrice - SOAP::SOAPBoolean
106
+ # minQuantity - SOAP::SOAPInt
107
+ # maxQuantity - SOAP::SOAPInt
108
+ # type - BookingstudioRuby::WebService::ItemTypes
109
+ # name - SOAP::SOAPString
110
+ # shortDescription - SOAP::SOAPString
111
+ # longDescription - SOAP::SOAPString
112
+ # quantity - SOAP::SOAPInt
113
+ # isExternalItem - SOAP::SOAPBoolean
114
+ # externalProviderId - SOAP::SOAPString
115
+ # europaeiskeDetails - BookingstudioRuby::WebService::EuropaeiskeDetails
116
+ class Item
117
+ attr_accessor :id
118
+ attr_accessor :itemNumber
119
+ attr_accessor :unitPrice
120
+ attr_accessor :currencyId
121
+ attr_accessor :showPrice
122
+ attr_accessor :minQuantity
123
+ attr_accessor :maxQuantity
124
+ attr_accessor :type
125
+ attr_accessor :name
126
+ attr_accessor :shortDescription
127
+ attr_accessor :longDescription
128
+ attr_accessor :quantity
129
+ attr_accessor :isExternalItem
130
+ attr_accessor :externalProviderId
131
+ attr_accessor :europaeiskeDetails
132
+
133
+ def initialize(id = nil, itemNumber = nil, unitPrice = nil, currencyId = nil, showPrice = nil, minQuantity = nil, maxQuantity = nil, type = nil, name = nil, shortDescription = nil, longDescription = nil, quantity = nil, isExternalItem = nil, externalProviderId = nil, europaeiskeDetails = nil)
134
+ @id = id
135
+ @itemNumber = itemNumber
136
+ @unitPrice = unitPrice
137
+ @currencyId = currencyId
138
+ @showPrice = showPrice
139
+ @minQuantity = minQuantity
140
+ @maxQuantity = maxQuantity
141
+ @type = type
142
+ @name = name
143
+ @shortDescription = shortDescription
144
+ @longDescription = longDescription
145
+ @quantity = quantity
146
+ @isExternalItem = isExternalItem
147
+ @externalProviderId = externalProviderId
148
+ @europaeiskeDetails = europaeiskeDetails
149
+ end
150
+ end
151
+
152
+ # {http://bookingstudio.dk/public/datacontracts/2008/06/}EuropaeiskeDetails
153
+ # tripStartDate - SOAP::SOAPDateTime
154
+ # tripEndDate - SOAP::SOAPDateTime
155
+ # tripArea - BookingstudioRuby::WebService::TripArea
156
+ # tripValue - SOAP::SOAPDecimal
157
+ # currencyId - SOAP::SOAPString
158
+ # persons - BookingstudioRuby::WebService::ArrayOfEuropaeiskePerson
159
+ class EuropaeiskeDetails
160
+ attr_accessor :tripStartDate
161
+ attr_accessor :tripEndDate
162
+ attr_accessor :tripArea
163
+ attr_accessor :tripValue
164
+ attr_accessor :currencyId
165
+ attr_accessor :persons
166
+
167
+ def initialize(tripStartDate = nil, tripEndDate = nil, tripArea = nil, tripValue = nil, currencyId = nil, persons = nil)
168
+ @tripStartDate = tripStartDate
169
+ @tripEndDate = tripEndDate
170
+ @tripArea = tripArea
171
+ @tripValue = tripValue
172
+ @currencyId = currencyId
173
+ @persons = persons
174
+ end
175
+ end
176
+
177
+ # {http://bookingstudio.dk/public/datacontracts/2008/06/}ArrayOfEuropaeiskePerson
178
+ class ArrayOfEuropaeiskePerson < ::Array
179
+ end
180
+
181
+ # {http://bookingstudio.dk/public/datacontracts/2008/06/}EuropaeiskePerson
182
+ # firstName - SOAP::SOAPString
183
+ # lastName - SOAP::SOAPString
184
+ # age - SOAP::SOAPInt
185
+ class EuropaeiskePerson
186
+ attr_accessor :firstName
187
+ attr_accessor :lastName
188
+ attr_accessor :age
189
+
190
+ def initialize(firstName = nil, lastName = nil, age = nil)
191
+ @firstName = firstName
192
+ @lastName = lastName
193
+ @age = age
194
+ end
195
+ end
196
+
197
+ # {http://bookingstudio.dk/public/datacontracts/2008/06/}Customer
198
+ # firstName - SOAP::SOAPString
199
+ # lastName - SOAP::SOAPString
200
+ # address - SOAP::SOAPString
201
+ # postalCode - SOAP::SOAPString
202
+ # city - SOAP::SOAPString
203
+ # country - SOAP::SOAPString
204
+ # workPhone - SOAP::SOAPString
205
+ # privatePhone - SOAP::SOAPString
206
+ # privateMobile - SOAP::SOAPString
207
+ # email - SOAP::SOAPString
208
+ # subscribeCatalog - SOAP::SOAPBoolean
209
+ class Customer
210
+ attr_accessor :firstName
211
+ attr_accessor :lastName
212
+ attr_accessor :address
213
+ attr_accessor :postalCode
214
+ attr_accessor :city
215
+ attr_accessor :country
216
+ attr_accessor :workPhone
217
+ attr_accessor :privatePhone
218
+ attr_accessor :privateMobile
219
+ attr_accessor :email
220
+ attr_accessor :subscribeCatalog
221
+
222
+ def initialize(firstName = nil, lastName = nil, address = nil, postalCode = nil, city = nil, country = nil, workPhone = nil, privatePhone = nil, privateMobile = nil, email = nil, subscribeCatalog = nil)
223
+ @firstName = firstName
224
+ @lastName = lastName
225
+ @address = address
226
+ @postalCode = postalCode
227
+ @city = city
228
+ @country = country
229
+ @workPhone = workPhone
230
+ @privatePhone = privatePhone
231
+ @privateMobile = privateMobile
232
+ @email = email
233
+ @subscribeCatalog = subscribeCatalog
234
+ end
235
+ end
236
+
237
+ # {http://bookingstudio.dk/public/datacontracts/2008/06/}TermsAndConditions
238
+ # text - SOAP::SOAPString
239
+ class TermsAndConditions
240
+ attr_accessor :text
241
+
242
+ def initialize(text = nil)
243
+ @text = text
244
+ end
245
+ end
246
+
247
+ # {http://schemas.microsoft.com/2003/10/Serialization/Arrays}ArrayOfstring
248
+ class ArrayOfstring < ::Array
249
+ end
250
+
251
+ # {http://schemas.datacontract.org/2004/07/BookingStudio.Public}TripArea
252
+ class TripArea < ::String
253
+ Europe = TripArea.new("Europe")
254
+ EuropeExtended = TripArea.new("EuropeExtended")
255
+ Scandinavia = TripArea.new("Scandinavia")
256
+ World = TripArea.new("World")
257
+ end
258
+
259
+ # {http://bookingstudio.dk/public/servicecontracts/2008/06/}MakeBooking
260
+ # token - (any)
261
+ # bookingRequest - BookingstudioRuby::WebService::BookingRequest
262
+ class MakeBooking
263
+ attr_accessor :token
264
+ attr_accessor :bookingRequest
265
+
266
+ def initialize(token = nil, bookingRequest = nil)
267
+ @token = token
268
+ @bookingRequest = bookingRequest
269
+ end
270
+ end
271
+
272
+ # {http://bookingstudio.dk/public/servicecontracts/2008/06/}MakeBookingResponse
273
+ # makeBookingResult - SOAP::SOAPInt
274
+ class MakeBookingResponse
275
+ attr_accessor :makeBookingResult
276
+
277
+ def initialize(makeBookingResult = nil)
278
+ @makeBookingResult = makeBookingResult
279
+ end
280
+ end
281
+
282
+ # {http://bookingstudio.dk/public/servicecontracts/2008/06/}GetTermsAndConditions
283
+ # token - (any)
284
+ # bookingRequest - BookingstudioRuby::WebService::BookingRequest
285
+ class GetTermsAndConditions
286
+ attr_accessor :token
287
+ attr_accessor :bookingRequest
288
+
289
+ def initialize(token = nil, bookingRequest = nil)
290
+ @token = token
291
+ @bookingRequest = bookingRequest
292
+ end
293
+ end
294
+
295
+ # {http://bookingstudio.dk/public/servicecontracts/2008/06/}GetTermsAndConditionsResponse
296
+ # getTermsAndConditionsResult - BookingstudioRuby::WebService::TermsAndConditions
297
+ class GetTermsAndConditionsResponse
298
+ attr_accessor :getTermsAndConditionsResult
299
+
300
+ def initialize(getTermsAndConditionsResult = nil)
301
+ @getTermsAndConditionsResult = getTermsAndConditionsResult
302
+ end
303
+ end
304
+
305
+ # {http://bookingstudio.dk/public/servicecontracts/2008/06/}GetItems
306
+ # token - (any)
307
+ # bookingRequest - BookingstudioRuby::WebService::BookingRequest
308
+ class GetItems
309
+ attr_accessor :token
310
+ attr_accessor :bookingRequest
311
+
312
+ def initialize(token = nil, bookingRequest = nil)
313
+ @token = token
314
+ @bookingRequest = bookingRequest
315
+ end
316
+ end
317
+
318
+ # {http://bookingstudio.dk/public/servicecontracts/2008/06/}GetItemsResponse
319
+ # getItemsResult - BookingstudioRuby::WebService::ArrayOfItem
320
+ class GetItemsResponse
321
+ attr_accessor :getItemsResult
322
+
323
+ def initialize(getItemsResult = nil)
324
+ @getItemsResult = getItemsResult
325
+ end
326
+ end
327
+
328
+ # {http://bookingstudio.dk/public/servicecontracts/2008/06/}GetEuropaeiskeItemPrice
329
+ # token - (any)
330
+ # item - BookingstudioRuby::WebService::Item
331
+ class GetEuropaeiskeItemPrice
332
+ attr_accessor :token
333
+ attr_accessor :item
334
+
335
+ def initialize(token = nil, item = nil)
336
+ @token = token
337
+ @item = item
338
+ end
339
+ end
340
+
341
+ # {http://bookingstudio.dk/public/servicecontracts/2008/06/}GetEuropaeiskeItemPriceResponse
342
+ # getEuropaeiskeItemPriceResult - BookingstudioRuby::WebService::Item
343
+ class GetEuropaeiskeItemPriceResponse
344
+ attr_accessor :getEuropaeiskeItemPriceResult
345
+
346
+ def initialize(getEuropaeiskeItemPriceResult = nil)
347
+ @getEuropaeiskeItemPriceResult = getEuropaeiskeItemPriceResult
348
+ end
349
+ end
350
+
351
+
352
+ end