laximo 0.7 → 0.8
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.
- checksums.yaml +4 -4
- data/README.md +32 -44
- data/laximo.gemspec +2 -2
- data/lib/laximo.rb +4 -4
- data/lib/laximo/am.rb +6 -6
- data/lib/laximo/defaults.rb +2 -0
- data/lib/laximo/oem.rb +46 -62
- data/lib/laximo/options.rb +17 -57
- data/lib/laximo/query.rb +69 -136
- data/lib/laximo/request.rb +13 -36
- data/lib/laximo/respond/{find_detail.rb → am/find_detail.rb} +0 -0
- data/lib/laximo/respond/{find_oem.rb → am/find_oem.rb} +0 -0
- data/lib/laximo/respond/{find_oem_correction.rb → am/find_oem_correction.rb} +0 -0
- data/lib/laximo/respond/{find_replacements.rb → am/find_replacements.rb} +7 -2
- data/lib/laximo/respond/{list_manufacturer.rb → am/list_manufacturer.rb} +6 -2
- data/lib/laximo/respond/{manufacturer_info.rb → am/manufacturer_info.rb} +6 -2
- data/lib/laximo/respond/{exec_custom_operation.rb → oem/exec_custom_operation.rb} +1 -0
- data/lib/laximo/respond/oem/find_vehicle.rb +27 -0
- data/lib/laximo/respond/{find_vehicle_by_frame.rb → oem/find_vehicle_by_frame.rb} +1 -0
- data/lib/laximo/respond/{find_vehicle_by_wizard.rb → oem/find_vehicle_by_frame_no.rb} +4 -3
- data/lib/laximo/respond/{find_vehicle_by_vin.rb → oem/find_vehicle_by_vin.rb} +1 -0
- data/lib/laximo/respond/{find_vehicle_by_wizard2.rb → oem/find_vehicle_by_wizard2.rb} +1 -0
- data/lib/laximo/respond/{get_catalog_info.rb → oem/get_catalog_info.rb} +0 -0
- data/lib/laximo/respond/{get_filter_by_detail.rb → oem/get_filter_by_detail.rb} +6 -2
- data/lib/laximo/respond/{get_filter_by_unit.rb → oem/get_filter_by_unit.rb} +1 -0
- data/lib/laximo/respond/{get_unit_info.rb → oem/get_unit_info.rb} +1 -0
- data/lib/laximo/respond/{get_vehicle_info.rb → oem/get_vehicle_info.rb} +1 -0
- data/lib/laximo/respond/{get_wizard2.rb → oem/get_wizard2.rb} +1 -0
- data/lib/laximo/respond/{get_wizard_next_step2.rb → oem/get_wizard_next_step2.rb} +0 -0
- data/lib/laximo/respond/{list_catalogs.rb → oem/list_catalogs.rb} +1 -0
- data/lib/laximo/respond/{list_categories.rb → oem/list_categories.rb} +6 -2
- data/lib/laximo/respond/{list_detail_by_unit.rb → oem/list_detail_by_unit.rb} +1 -0
- data/lib/laximo/respond/{list_image_map_by_unit.rb → oem/list_image_map_by_unit.rb} +6 -2
- data/lib/laximo/respond/{list_quick_detail.rb → oem/list_quick_detail.rb} +1 -0
- data/lib/laximo/respond/{list_quick_group.rb → oem/list_quick_group.rb} +6 -2
- data/lib/laximo/respond/{list_units.rb → oem/list_units.rb} +1 -0
- data/lib/laximo/version.rb +1 -1
- metadata +32 -32
- data/lib/laximo/respond/get_wizard.rb +0 -26
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4dcca4e832fb957b9e61bdb79ccba0ee5a6053a762cf550d8cdc52901e08a090
|
|
4
|
+
data.tar.gz: 5f7f98073c292fd76b13f84c59b490dfb1e04666718f3a5c4850b75674ed7b0d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e023303eea541c70022f2af1ff580442e0b42815b43aa72e4f031c6761e7f26084375f4695cec7baf70bf7b3c0fc20cb7218a42f847f023d3acbc7b1eb3bc9e2
|
|
7
|
+
data.tar.gz: 2db7ce7f5d48488f1cf2ea66bf5d11e91a63945c5223ecc74dd2f5f0f9422d863e7695fdc08bbb0837a59b84f09b4e8f0da2259ded52cd87cbf90cab2aebfaf3
|
data/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* [Laximo.OЕМ](http://laximo.net/index.php/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:%D0%9C%D0%BE%D0%B9_%D1%8F%D0%B7%D1%8B%D0%BA/:Laximo_Web-services:OEM:Laximo.OEM)
|
|
6
6
|
|
|
7
7
|
### Поддерживаемые версии Ruby
|
|
8
|
-
Ruby
|
|
8
|
+
Ruby 2.0+
|
|
9
9
|
|
|
10
10
|
### Установка (Rails)
|
|
11
11
|
1. Добавляем в Gemfile строку:`gem 'laximo'`
|
|
@@ -17,41 +17,28 @@ Laximo.options.password 'mypassword' # должны быть выне
|
|
|
17
17
|
|
|
18
18
|
Laximo.options.timeout 10
|
|
19
19
|
Laximo.options.debug false
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Авторизация по ssl считается устаревшей и в ближайшее время будет удалена:
|
|
23
|
-
```ruby
|
|
24
|
-
Laximo.options.use_ssl true
|
|
25
|
-
Laximo.options.ssl_key ::File.join(Rails.root, 'db', 'ssl', 'client.key')
|
|
26
|
-
Laximo.options.ssl_cert ::File.join(Rails.root, 'db', 'ssl', 'client.pem')
|
|
27
|
-
|
|
28
|
-
Laximo.options.timeout 10
|
|
29
|
-
Laximo.options.debug false
|
|
20
|
+
Laximo.options.locale 'ru_RU'
|
|
30
21
|
```
|
|
31
22
|
|
|
32
23
|
### Конфигурация
|
|
33
|
-
* `Laximo.options.ssl_key "путь_к_файлу"` — путь к открытому ключу ssl-сертификата
|
|
34
|
-
* `Laximo.options.ssl_cert "путь_к_файлу"` — путь к закрытому ключу ssl-сертификата
|
|
35
|
-
* `Laximo.options.ssl_cert true/false` — проверять или нет валидность сертификата. **В случае самоподписанного сертификата, проверку на валидность необходимо отключить**
|
|
36
|
-
* `Laximo.options.use_ssl true/false` - использовать ssl-соединение или нет
|
|
37
|
-
* `Laximo.options.use_login true/false` - использовать авторизацию по подписке или нет
|
|
38
24
|
* `Laximo.options.login` - логин для авторизации по подписке
|
|
39
25
|
* `Laximo.options.password` - пароль для авторизации по подписке
|
|
40
26
|
* `Laximo.options.timeout 30` - таймаут соединения в секундах (по-умочланию, 10)
|
|
41
27
|
* `Laximo.options.user_agent "Ваш_юзер_агент"` - задание произвольного юзер-агента (по-умолчанию, "LaximoRuby [версия_библиотеки]")
|
|
28
|
+
* `Laximo.options.locale` - локаль (по-умолчанию, 'ru_RU')
|
|
42
29
|
* `Laximo.options.debug true/false` - включение/отключение режима отладки (по-умолчанию, выключено)
|
|
43
30
|
* `Laximo.options.am_soap_action 'url'` - soap action для web-сервиса [Laximo.Aftermarket](http://laximo.net/index.php/Laximo_Web-services:AM:Laximo.Aftermarket) (по-умолчанию, `http://Aftermarket.Kito.ec`)
|
|
44
31
|
* `Laximo.options.am_soap_endpoint 'url'` - soap endpoint для web-сервиса [Laximo.Aftermarket](http://laximo.net/index.php/Laximo_Web-services:AM:Laximo.Aftermarket) (по-умолчанию, `https://aws.laximo.net/ec.Kito.Aftermarket/services/Catalog.CatalogHttpSoap12Endpoint/`
|
|
45
32
|
* `Laximo.options.oem_soap_action 'url'` - soap action для web-сервиса [Laximo.OEM](http://laximo.net/index.php/Laximo_Web-services:OEM:Laximo.OEM) (по-умолчанию, `http://WebCatalog.Kito.ec`)
|
|
46
33
|
* `Laximo.options.oem_soap_endpoint 'url'` - soap endpoint для web-сервиса [Laximo.OEM](http://laximo.net/index.php/Laximo_Web-services:OEM:Laximo.OEM) (по-умолчанию, `https://ws.laximo.net/ec.Kito.WebCatalog/services/Catalog.CatalogHttpSoap12Endpoint/`)
|
|
47
34
|
|
|
48
|
-
### Методы web-сервиса [Laximo.Aftermarket](
|
|
49
|
-
* [Laximo.am.find_oem(oem, brand: nil, options: [], locale: 'ru_RU')](http://
|
|
50
|
-
* [Laximo.am.find_replacements(detail_id, locale: 'ru_RU')](http://
|
|
51
|
-
* [Laximo.am.find_detail(detail_id, options: [], locale: 'ru_RU')](http://
|
|
52
|
-
* [Laximo.am.find_oem_correction(oem, brand: nil, locale: 'ru_RU')](http://
|
|
53
|
-
* [Laximo.am.manufacturer_info(manufacturer_id, locale: 'ru_RU')](http://
|
|
54
|
-
* [Laximo.am.list_manufacturer(locale: 'ru_RU')](http://
|
|
35
|
+
### Методы web-сервиса [Laximo.Aftermarket](https://laximo.ru/am/)
|
|
36
|
+
* [Laximo.am.find_oem(oem, brand: nil, options: [], locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:AM:FindOEM)
|
|
37
|
+
* [Laximo.am.find_replacements(detail_id, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:AM:FindReplacements)
|
|
38
|
+
* [Laximo.am.find_detail(detail_id, options: [], locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:AM:FindDetail)
|
|
39
|
+
* [Laximo.am.find_oem_correction(oem, brand: nil, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:AM:FindOEMCorrection)
|
|
40
|
+
* [Laximo.am.manufacturer_info(manufacturer_id, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:AM:ManufacturerInfo)
|
|
41
|
+
* [Laximo.am.list_manufacturer(locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:AM/ListManufacturer)
|
|
55
42
|
|
|
56
43
|
Данные методы возвращают объект, у которого заданы методы:
|
|
57
44
|
|
|
@@ -60,27 +47,27 @@ Laximo.options.debug false
|
|
|
60
47
|
* `error` - возвращает ошибку или `nil`, если ошибки не было
|
|
61
48
|
* `result` - возвращает массив хешей или пустой массив, если ничего не найдено, или если в процессе выполения произошла ошибка.
|
|
62
49
|
|
|
63
|
-
### Методы web-сервиса [Laximo.OEM](
|
|
64
|
-
* [Laximo.oem.list_catalogs(
|
|
65
|
-
* [Laximo.oem.get_catalog_info(catalog:,
|
|
66
|
-
* [Laximo.oem.find_vehicle_by_vin(vin:, catalog: nil,
|
|
67
|
-
* [Laximo.oem.find_vehicle_by_frame(frame:, frame_no:, catalog: nil,
|
|
68
|
-
* [Laximo.oem.
|
|
69
|
-
* [Laximo.oem.
|
|
70
|
-
* [Laximo.oem.
|
|
71
|
-
* [Laximo.oem.
|
|
72
|
-
* [Laximo.oem.find_vehicle_by_wizard2(catalog:, ssd: nil, locale: 'ru_RU')](http://
|
|
73
|
-
* [Laximo.oem.get_vehicle_info(catalog:, vehicle_id:, ssd: nil, localized: true, locale: 'ru_RU')](http://
|
|
74
|
-
* [Laximo.oem.exec_custom_operation(catalog:, operation:, param:, locale: 'ru_RU')](http://
|
|
75
|
-
* [Laximo.oem.list_units(catalog:, vehicle_id:, ssd: nil, category_id: nil, localized: true, locale: 'ru_RU')](http://
|
|
76
|
-
* [Laximo.oem.list_categories(catalog:, vehicle_id:, ssd: nil, category_id: nil, locale: 'ru_RU')](http://
|
|
77
|
-
* [Laximo.oem.get_filter_by_unit(catalog:, unit_id:, vehicle_id:, filter:, ssd: nil, locale: 'ru_RU')](http://
|
|
78
|
-
* [Laximo.oem.get_unit_info(catalog:, unit_id:, ssd: nil, localized: true, locale: 'ru_RU')](http://
|
|
79
|
-
* [Laximo.oem.list_detail_by_unit(catalog:, unit_id:, ssd: nil, localized: true, locale: 'ru_RU')](http://
|
|
80
|
-
* [Laximo.oem.list_image_map_by_unit(catalog:, unit_id:, ssd: nil)](http://
|
|
81
|
-
* [Laximo.oem.get_filter_by_detail(catalog:, unit_id: , detail_id: , filter: , ssd: nil, locale: 'ru_RU')](http://
|
|
82
|
-
* [Laximo.oem.list_quick_group(catalog, vehicle_id, ssd: nil, locale: 'ru_RU')](http://
|
|
83
|
-
* [Laximo.oem.list_quick_detail(catalog:, vehicle_id:, quick_group_id:, all:, ssd: nil, localized: true, locale: 'ru_RU')](http://
|
|
50
|
+
### Методы web-сервиса [Laximo.OEM](https://laximo.ru/oem/)
|
|
51
|
+
* [Laximo.oem.list_catalogs(locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:ListCatalogs)
|
|
52
|
+
* [Laximo.oem.get_catalog_info(catalog:, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:GetCatalogInfo)
|
|
53
|
+
* [Laximo.oem.find_vehicle_by_vin(vin:, catalog: nil, localized: true, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:FindVehicleByVIN)
|
|
54
|
+
* [Laximo.oem.find_vehicle_by_frame(frame:, frame_no:, catalog: nil, localized: true, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:FindVehicleByFrame)
|
|
55
|
+
* [Laximo.oem.find_vehicle_by_frame_no(frame_no:, catalog: nil, localized: true, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:FindVehicleByFrameNo)
|
|
56
|
+
* [Laximo.oem.find_vehicle(ident_string:, catalog: nil, localized: true, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:FindVehicle)
|
|
57
|
+
* [Laximo.oem.get_wizard2(catalog:, ssd: nil, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:GetWizard2)s
|
|
58
|
+
* [Laximo.oem.get_wizard_next_step2(catalog:, ssd: nil, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:GetWizardNextStep2)
|
|
59
|
+
* [Laximo.oem.find_vehicle_by_wizard2(catalog:, ssd: nil, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:FindVehicleByWizard2)
|
|
60
|
+
* [Laximo.oem.get_vehicle_info(catalog:, vehicle_id:, ssd: nil, localized: true, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:GetVehicleInfo)
|
|
61
|
+
* [Laximo.oem.exec_custom_operation(catalog:, operation:, param:, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:ExecCustomOperation)
|
|
62
|
+
* [Laximo.oem.list_units(catalog:, vehicle_id:, ssd: nil, category_id: nil, localized: true, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:ListUnits)
|
|
63
|
+
* [Laximo.oem.list_categories(catalog:, vehicle_id:, ssd: nil, category_id: nil, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:ListCategories)
|
|
64
|
+
* [Laximo.oem.get_filter_by_unit(catalog:, unit_id:, vehicle_id:, filter:, ssd: nil, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:GetFilterByUnit)
|
|
65
|
+
* [Laximo.oem.get_unit_info(catalog:, unit_id:, ssd: nil, localized: true, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:GetUnitInfo)
|
|
66
|
+
* [Laximo.oem.list_detail_by_unit(catalog:, unit_id:, ssd: nil, localized: true, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:ListDetailByUnit)
|
|
67
|
+
* [Laximo.oem.list_image_map_by_unit(catalog:, unit_id:, ssd: nil)](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:ListImageMapByUnit)
|
|
68
|
+
* [Laximo.oem.get_filter_by_detail(catalog:, unit_id: , detail_id: , filter: , ssd: nil, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:GetFilterByDetail)
|
|
69
|
+
* [Laximo.oem.list_quick_group(catalog, vehicle_id, ssd: nil, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:ListQuickGroup)
|
|
70
|
+
* [Laximo.oem.list_quick_detail(catalog:, vehicle_id:, quick_group_id:, all:, ssd: nil, localized: true, locale: 'ru_RU')](http://wiki.technologytrade.ru/index.php/Laximo_Web-services:OEM:ListQuickDetail)
|
|
84
71
|
|
|
85
72
|
Данные методы возвращают объект, у которого заданы методы:
|
|
86
73
|
|
|
@@ -123,6 +110,7 @@ res.result # []
|
|
|
123
110
|
### Лицензия
|
|
124
111
|
|
|
125
112
|
Автор: [Tyralion](mailto:piliaiev@gmail.com)
|
|
113
|
+
|
|
126
114
|
[Список контрибьюторов](https://github.com/dancingbytes/laximo/graphs/contributors)
|
|
127
115
|
|
|
128
116
|
Copyright (c) 2015-2018 DansingBytes.ru, под лицензией BSD
|
data/laximo.gemspec
CHANGED
|
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
20
20
|
spec.require_paths = ["lib"]
|
|
21
21
|
|
|
22
|
-
spec.required_ruby_version = '>=
|
|
22
|
+
spec.required_ruby_version = '>= 2.0'
|
|
23
23
|
|
|
24
|
-
spec.add_dependency "nokogiri", '~> 1.
|
|
24
|
+
spec.add_dependency "nokogiri", '~> 1.8'
|
|
25
25
|
|
|
26
26
|
end
|
data/lib/laximo.rb
CHANGED
|
@@ -26,15 +26,15 @@ module Laximo
|
|
|
26
26
|
|
|
27
27
|
def options
|
|
28
28
|
::Laximo::Options
|
|
29
|
-
end
|
|
29
|
+
end
|
|
30
30
|
|
|
31
31
|
def am
|
|
32
32
|
::Laximo::Am.new
|
|
33
|
-
end
|
|
33
|
+
end
|
|
34
34
|
|
|
35
35
|
def oem
|
|
36
36
|
::Laximo::Oem.new
|
|
37
|
-
end
|
|
37
|
+
end
|
|
38
38
|
|
|
39
39
|
def deprecated!
|
|
40
40
|
|
|
@@ -42,7 +42,7 @@ module Laximo
|
|
|
42
42
|
puts "*** DEPRECATION WARNING! Method `#{caller[0][/`.*'/][1..-2]}` is deprecated and will not support in the future"
|
|
43
43
|
puts "***"
|
|
44
44
|
|
|
45
|
-
end
|
|
45
|
+
end
|
|
46
46
|
|
|
47
47
|
end # Laximo
|
|
48
48
|
|
data/lib/laximo/am.rb
CHANGED
|
@@ -25,7 +25,7 @@ module Laximo
|
|
|
25
25
|
oem,
|
|
26
26
|
brand: nil,
|
|
27
27
|
options: DEFAULT_OPTIONS,
|
|
28
|
-
locale:
|
|
28
|
+
locale: ::Laximo.options.locale
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
resp = ::Laximo::Query.
|
|
@@ -42,7 +42,7 @@ module Laximo
|
|
|
42
42
|
|
|
43
43
|
def find_replacements(
|
|
44
44
|
detail_id,
|
|
45
|
-
locale:
|
|
45
|
+
locale: ::Laximo.options.locale
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
resp = ::Laximo::Query.
|
|
@@ -58,7 +58,7 @@ module Laximo
|
|
|
58
58
|
def find_detail(
|
|
59
59
|
detail_id,
|
|
60
60
|
options: DEFAULT_OPTIONS,
|
|
61
|
-
locale:
|
|
61
|
+
locale: ::Laximo.options.locale
|
|
62
62
|
)
|
|
63
63
|
|
|
64
64
|
resp = ::Laximo::Query.
|
|
@@ -75,7 +75,7 @@ module Laximo
|
|
|
75
75
|
def find_oem_correction(
|
|
76
76
|
oem,
|
|
77
77
|
brand: nil,
|
|
78
|
-
locale:
|
|
78
|
+
locale: ::Laximo.options.locale
|
|
79
79
|
)
|
|
80
80
|
|
|
81
81
|
resp = ::Laximo::Query.
|
|
@@ -91,7 +91,7 @@ module Laximo
|
|
|
91
91
|
|
|
92
92
|
def manufacturer_info(
|
|
93
93
|
manufacturer_id,
|
|
94
|
-
locale:
|
|
94
|
+
locale: ::Laximo.options.locale
|
|
95
95
|
)
|
|
96
96
|
|
|
97
97
|
resp = ::Laximo::Query.
|
|
@@ -105,7 +105,7 @@ module Laximo
|
|
|
105
105
|
end # manufacturer_info
|
|
106
106
|
|
|
107
107
|
def list_manufacturer(
|
|
108
|
-
locale:
|
|
108
|
+
locale: ::Laximo.options.locale
|
|
109
109
|
)
|
|
110
110
|
|
|
111
111
|
resp = ::Laximo::Query.
|
data/lib/laximo/defaults.rb
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Laximo.options.user_agent "LaximoRuby [#{Laximo::VERSION}]"
|
|
4
4
|
Laximo.options.timeout 10
|
|
5
5
|
|
|
6
|
+
Laximo.options.locale 'ru_RU'
|
|
7
|
+
|
|
6
8
|
Laximo.options.am_soap_action 'http://Aftermarket.Kito.ec'
|
|
7
9
|
Laximo.options.am_soap_endpoint 'https://aws.laximo.net/ec.Kito.Aftermarket/services/Catalog.CatalogHttpSoap11Endpoint/'
|
|
8
10
|
|
data/lib/laximo/oem.rb
CHANGED
|
@@ -13,14 +13,12 @@ module Laximo
|
|
|
13
13
|
end # initialize
|
|
14
14
|
|
|
15
15
|
def list_catalogs(
|
|
16
|
-
|
|
17
|
-
locale: 'ru_RU'
|
|
16
|
+
locale: ::Laximo.options.locale
|
|
18
17
|
)
|
|
19
18
|
|
|
20
19
|
resp = ::Laximo::Query.
|
|
21
20
|
new('ListCatalogs').
|
|
22
21
|
locale(locale).
|
|
23
|
-
ssd(ssd).
|
|
24
22
|
call(@request)
|
|
25
23
|
|
|
26
24
|
::Laximo::Respond::ListCatalogs.new(resp)
|
|
@@ -29,14 +27,12 @@ module Laximo
|
|
|
29
27
|
|
|
30
28
|
def get_catalog_info(
|
|
31
29
|
catalog:,
|
|
32
|
-
|
|
33
|
-
locale: 'ru_RU'
|
|
30
|
+
locale: ::Laximo.options.locale
|
|
34
31
|
)
|
|
35
32
|
|
|
36
33
|
resp = ::Laximo::Query.
|
|
37
34
|
new('GetCatalogInfo').
|
|
38
35
|
locale(locale).
|
|
39
|
-
ssd(ssd).
|
|
40
36
|
catalog(catalog).
|
|
41
37
|
call(@request)
|
|
42
38
|
|
|
@@ -47,15 +43,13 @@ module Laximo
|
|
|
47
43
|
def find_vehicle_by_vin(
|
|
48
44
|
vin:,
|
|
49
45
|
catalog: nil,
|
|
50
|
-
ssd: nil,
|
|
51
46
|
localized: true,
|
|
52
|
-
locale:
|
|
47
|
+
locale: ::Laximo.options.locale
|
|
53
48
|
)
|
|
54
49
|
|
|
55
50
|
resp = ::Laximo::Query.
|
|
56
51
|
new('FindVehicleByVIN').
|
|
57
52
|
locale(locale).
|
|
58
|
-
ssd(ssd).
|
|
59
53
|
catalog(catalog).
|
|
60
54
|
vin(vin).
|
|
61
55
|
localized(localized).
|
|
@@ -69,9 +63,8 @@ module Laximo
|
|
|
69
63
|
frame:,
|
|
70
64
|
frame_no:,
|
|
71
65
|
catalog: nil,
|
|
72
|
-
ssd: nil,
|
|
73
66
|
localized: true,
|
|
74
|
-
locale:
|
|
67
|
+
locale: ::Laximo.options.locale
|
|
75
68
|
)
|
|
76
69
|
|
|
77
70
|
resp = ::Laximo::Query.
|
|
@@ -80,7 +73,6 @@ module Laximo
|
|
|
80
73
|
catalog(catalog).
|
|
81
74
|
frame(frame).
|
|
82
75
|
frame_no(frame_no).
|
|
83
|
-
ssd(ssd).
|
|
84
76
|
localized(localized).
|
|
85
77
|
call(@request)
|
|
86
78
|
|
|
@@ -88,32 +80,48 @@ module Laximo
|
|
|
88
80
|
|
|
89
81
|
end # find_vehicle_by_frame
|
|
90
82
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
catalog
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
locale: 'ru_RU'
|
|
83
|
+
def find_vehicle_by_frame_no(
|
|
84
|
+
frame_no:,
|
|
85
|
+
catalog: nil,
|
|
86
|
+
localized: true,
|
|
87
|
+
locale: ::Laximo.options.locale
|
|
97
88
|
)
|
|
98
89
|
|
|
99
|
-
::Laximo.
|
|
90
|
+
resp = ::Laximo::Query.
|
|
91
|
+
new('FindVehicleByFrameNo').
|
|
92
|
+
locale(locale).
|
|
93
|
+
catalog(catalog).
|
|
94
|
+
frame_no(frame_no).
|
|
95
|
+
localized(localized).
|
|
96
|
+
call(@request)
|
|
97
|
+
|
|
98
|
+
::Laximo::Respond::FindVehicleByFrameNo.new(resp)
|
|
99
|
+
|
|
100
|
+
end # find_vehicle_by_frame_no
|
|
101
|
+
|
|
102
|
+
def find_vehicle(
|
|
103
|
+
ident_string:,
|
|
104
|
+
catalog: nil,
|
|
105
|
+
localized: true,
|
|
106
|
+
locale: ::Laximo.options.locale
|
|
107
|
+
)
|
|
100
108
|
|
|
101
109
|
resp = ::Laximo::Query.
|
|
102
|
-
new('
|
|
110
|
+
new('FindVehicle').
|
|
103
111
|
locale(locale).
|
|
104
112
|
catalog(catalog).
|
|
105
|
-
|
|
106
|
-
|
|
113
|
+
ident_string(ident_string).
|
|
114
|
+
localized(localized).
|
|
107
115
|
call(@request)
|
|
108
116
|
|
|
109
|
-
|
|
117
|
+
::Laximo::Respond::FindVehicle.new(resp)
|
|
110
118
|
|
|
111
|
-
end #
|
|
119
|
+
end # find_vehicle
|
|
112
120
|
|
|
113
121
|
def get_wizard2(
|
|
114
122
|
catalog:,
|
|
115
123
|
ssd: nil,
|
|
116
|
-
locale:
|
|
124
|
+
locale: ::Laximo.options.locale
|
|
117
125
|
)
|
|
118
126
|
|
|
119
127
|
resp = ::Laximo::Query.
|
|
@@ -130,7 +138,7 @@ module Laximo
|
|
|
130
138
|
def get_wizard_next_step2(
|
|
131
139
|
catalog:,
|
|
132
140
|
ssd: nil,
|
|
133
|
-
locale:
|
|
141
|
+
locale: ::Laximo.options.locale
|
|
134
142
|
)
|
|
135
143
|
|
|
136
144
|
resp = ::Laximo::Query.
|
|
@@ -144,34 +152,10 @@ module Laximo
|
|
|
144
152
|
|
|
145
153
|
end # get_wizard_next_step2
|
|
146
154
|
|
|
147
|
-
# TODO: Устаревший метод
|
|
148
|
-
def find_vehicle_by_wizard(
|
|
149
|
-
catalog:,
|
|
150
|
-
wizard_id: nil,
|
|
151
|
-
ssd: nil,
|
|
152
|
-
localized: true,
|
|
153
|
-
locale: 'ru_RU'
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
::Laximo.deprecated!
|
|
157
|
-
|
|
158
|
-
resp = ::Laximo::Query.
|
|
159
|
-
new('FindVehicleByWizard').
|
|
160
|
-
locale(locale).
|
|
161
|
-
wizard_id(wizard_id).
|
|
162
|
-
catalog(catalog).
|
|
163
|
-
ssd(ssd).
|
|
164
|
-
localized(localized).
|
|
165
|
-
call(@request)
|
|
166
|
-
|
|
167
|
-
::Laximo::Respond::FindVehicleByWizard.new(resp)
|
|
168
|
-
|
|
169
|
-
end # find_vehicle_by_wizard
|
|
170
|
-
|
|
171
155
|
def find_vehicle_by_wizard2(
|
|
172
156
|
catalog:,
|
|
173
157
|
ssd: nil,
|
|
174
|
-
locale:
|
|
158
|
+
locale: ::Laximo.options.locale
|
|
175
159
|
)
|
|
176
160
|
|
|
177
161
|
resp = ::Laximo::Query.
|
|
@@ -190,7 +174,7 @@ module Laximo
|
|
|
190
174
|
vehicle_id:,
|
|
191
175
|
ssd: nil,
|
|
192
176
|
localized: true,
|
|
193
|
-
locale:
|
|
177
|
+
locale: ::Laximo.options.locale
|
|
194
178
|
)
|
|
195
179
|
|
|
196
180
|
resp = ::Laximo::Query.
|
|
@@ -210,7 +194,7 @@ module Laximo
|
|
|
210
194
|
catalog:,
|
|
211
195
|
operation:,
|
|
212
196
|
param:,
|
|
213
|
-
locale:
|
|
197
|
+
locale: ::Laximo.options.locale
|
|
214
198
|
)
|
|
215
199
|
|
|
216
200
|
resp = ::Laximo::Query.
|
|
@@ -231,7 +215,7 @@ module Laximo
|
|
|
231
215
|
ssd: nil,
|
|
232
216
|
category_id: -1,
|
|
233
217
|
localized: true,
|
|
234
|
-
locale:
|
|
218
|
+
locale: ::Laximo.options.locale
|
|
235
219
|
)
|
|
236
220
|
|
|
237
221
|
resp = ::Laximo::Query.
|
|
@@ -253,7 +237,7 @@ module Laximo
|
|
|
253
237
|
vehicle_id:,
|
|
254
238
|
ssd: nil,
|
|
255
239
|
category_id: -1,
|
|
256
|
-
locale:
|
|
240
|
+
locale: ::Laximo.options.locale
|
|
257
241
|
)
|
|
258
242
|
|
|
259
243
|
resp = ::Laximo::Query.
|
|
@@ -274,8 +258,8 @@ module Laximo
|
|
|
274
258
|
unit_id:,
|
|
275
259
|
vehicle_id:,
|
|
276
260
|
filter:,
|
|
277
|
-
ssd:
|
|
278
|
-
locale:
|
|
261
|
+
ssd: nil,
|
|
262
|
+
locale: ::Laximo.options.locale
|
|
279
263
|
)
|
|
280
264
|
|
|
281
265
|
resp = ::Laximo::Query.
|
|
@@ -297,7 +281,7 @@ module Laximo
|
|
|
297
281
|
unit_id:,
|
|
298
282
|
ssd: nil,
|
|
299
283
|
localized: true,
|
|
300
|
-
locale:
|
|
284
|
+
locale: ::Laximo.options.locale
|
|
301
285
|
)
|
|
302
286
|
|
|
303
287
|
resp = ::Laximo::Query.
|
|
@@ -318,7 +302,7 @@ module Laximo
|
|
|
318
302
|
unit_id:,
|
|
319
303
|
ssd: nil,
|
|
320
304
|
localized: true,
|
|
321
|
-
locale:
|
|
305
|
+
locale: ::Laximo.options.locale
|
|
322
306
|
)
|
|
323
307
|
|
|
324
308
|
resp = ::Laximo::Query.
|
|
@@ -357,7 +341,7 @@ module Laximo
|
|
|
357
341
|
detail_id:,
|
|
358
342
|
filter:,
|
|
359
343
|
ssd: nil,
|
|
360
|
-
locale:
|
|
344
|
+
locale: ::Laximo.options.locale
|
|
361
345
|
)
|
|
362
346
|
|
|
363
347
|
resp = ::Laximo::Query.
|
|
@@ -378,7 +362,7 @@ module Laximo
|
|
|
378
362
|
catalog:,
|
|
379
363
|
vehicle_id:,
|
|
380
364
|
ssd: nil,
|
|
381
|
-
locale:
|
|
365
|
+
locale: ::Laximo.options.locale
|
|
382
366
|
)
|
|
383
367
|
|
|
384
368
|
resp = ::Laximo::Query.
|
|
@@ -400,7 +384,7 @@ module Laximo
|
|
|
400
384
|
all: 1,
|
|
401
385
|
ssd: nil,
|
|
402
386
|
localized: true,
|
|
403
|
-
locale:
|
|
387
|
+
locale: ::Laximo.options.locale
|
|
404
388
|
)
|
|
405
389
|
|
|
406
390
|
resp = ::Laximo::Query.
|