README.md in dpd_api-0.1.9 vs README.md in dpd_api-0.1.10
- old
+ new
@@ -249,17 +249,17 @@
```ruby
params = {
header: {
date_pickup: date,
sender_address: {
- name: fio,
+ name: 'Иванов Иван Иваныч',
terminal_code: 'ABA',
city: 'Москва',
street: 'Ленина',
street_abbr: 'ул',
house: 1,
- contact_fio: fio,
+ contact_fio: 'Иванов Иван Иваныч',
contact_phone: '+79211234567',
},
},
order: [
{
@@ -269,17 +269,17 @@
cargo_num_pack: '1',
cargo_weight: '1',
cargo_registered: false,
cargo_category: 'Одежда',
receiver_address: {
- name: fio,
+ name: 'Иванов Иван Иваныч',
terminal_code: '',
city: 'Воронеж',
street: 'Красноармейская',
street_abbr: 'ул',
house: 1,
- contact_fio: fio,
+ contact_fio: 'Иванов Иван Иваныч',
contact_phone: '+79211234567',
},
parcel: [
{
number: '123456789',
@@ -301,39 +301,43 @@
```
####.order_status
matches `getOrderStatus`
```ruby
-params = {
- order: {
- order_number_internal: '123456',
- }
+params = { order: [
+ { order_number_internal: '1' },
+ { order_number_internal: '2' },
+ ]
}
-
DpdApi::Order.order_status(params)
-# => [{
- order_number_internal: "123456",
- order_num: "10160001MOW",
- status: "OK",
- }]
+# =>
+[ { :order_number_internal=>"1",
+ :status=>"OrderPending",
+ :error_message=>"Заказ обрабатывается нашими сотруниками. Не повторяйте оформление данного заказа.\\n---------------------\\nORA-20815: Улица с названием “Фыва” неизвестна."
+ },
+ { :order_number_internal=>"2",
+ :status=>"OrderError",
+ :error_message=>"ORA-20817: Найдено более одной улицы с названием \\\"Ленина\\\""
+ }
+]
```
####.create_address
matches `createAddress`
```ruby
params = {
client_address: {
code: '78',
- name: fio,
+ name: 'Иванов Иван Иваныч',
city: 'Воронеж',
street: 'Красноармейская',
street_abbr: 'ул',
house: 1,
- contact_fio: fio,
+ contact_fio: 'Иванов Иван Иваныч',
contact_phone: '+79211234567',
},
}
@@ -351,16 +355,16 @@
matches `updateAddress`
```ruby
params = {
client_address: {
code: '78',
- name: fio,
+ name: 'Иванов Иван Иваныч',
city: 'Воронеж',
street: 'Красноармейская',
street_abbr: 'ул',
house: 1,
- contact_fio: fio,
+ contact_fio: 'Иванов Иван Иваныч',
contact_phone: '+79200000000',
},
}
@@ -474,12 +478,10 @@
matches `/services/tracing1-1?wsdl` in DPD SOAP API
####.states_by_client_order
matches `getStatesByClientOrder`
```ruby
-params = {
- client_order_nr: '12345',
- }
+params = { client_order_nr: '12345' }
DpdApi::Tracing.states_by_client_order(params)
```