dpd_api 0.1.9 → 0.1.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d2a66b51282b428cbd2684bca9bbf2a803e4caa
4
- data.tar.gz: d9676f2c92caf42bb2480c315c939e2d63ea9e2b
3
+ metadata.gz: 823ecdcfc4e394a9f52dcdffa41188005de587e6
4
+ data.tar.gz: 60124cf67885ce24422f9c11c914227546ccbc7c
5
5
  SHA512:
6
- metadata.gz: a7cb41872ce10d3b5f9e2fe2c9cebb3a620290ade82c0e4455550f234c13483c5e76bbfe5fb955d1e5259581512f35541b9d670341ed2efd472cec56a9db3d04
7
- data.tar.gz: 456c57a88cdf9a843eedd41428734b04dca1ed65631494584021691ffe38a6da002f1981003b598673777f333dc78e10be32528ed6fee902ce72c304649f9990
6
+ metadata.gz: 87fb3afc327048bf8d316fdae1742e4908a1bb4ad039b27f33b1dedce998a5b776f4bf5eb7b609695be2f5217125002be29f9ae170e8cad9f605db9ade484ff1
7
+ data.tar.gz: 074c83c738b7ba8ac9dfb6356bcf078306a507648178bfa0fdb11a41b90aee2f368b68f00e8e72f59e805c29ee05e7a20460e6cf5ae691fb460707e987cdacc6
data/README.md CHANGED
@@ -251,13 +251,13 @@ params = {
251
251
  header: {
252
252
  date_pickup: date,
253
253
  sender_address: {
254
- name: fio,
254
+ name: 'Иванов Иван Иваныч',
255
255
  terminal_code: 'ABA',
256
256
  city: 'Москва',
257
257
  street: 'Ленина',
258
258
  street_abbr: 'ул',
259
259
  house: 1,
260
- contact_fio: fio,
260
+ contact_fio: 'Иванов Иван Иваныч',
261
261
  contact_phone: '+79211234567',
262
262
  },
263
263
  },
@@ -271,13 +271,13 @@ params = {
271
271
  cargo_registered: false,
272
272
  cargo_category: 'Одежда',
273
273
  receiver_address: {
274
- name: fio,
274
+ name: 'Иванов Иван Иваныч',
275
275
  terminal_code: '',
276
276
  city: 'Воронеж',
277
277
  street: 'Красноармейская',
278
278
  street_abbr: 'ул',
279
279
  house: 1,
280
- contact_fio: fio,
280
+ contact_fio: 'Иванов Иван Иваныч',
281
281
  contact_phone: '+79211234567',
282
282
  },
283
283
  parcel: [
@@ -303,20 +303,24 @@ DpdApi::Order.create_order(params)
303
303
  ####.order_status
304
304
  matches `getOrderStatus`
305
305
  ```ruby
306
- params = {
307
- order: {
308
- order_number_internal: '123456',
309
- }
306
+ params = { order: [
307
+ { order_number_internal: '1' },
308
+ { order_number_internal: '2' },
309
+ ]
310
310
  }
311
311
 
312
-
313
312
  DpdApi::Order.order_status(params)
314
313
 
315
- # => [{
316
- order_number_internal: "123456",
317
- order_num: "10160001MOW",
318
- status: "OK",
319
- }]
314
+ # =>
315
+ [ { :order_number_internal=>"1",
316
+ :status=>"OrderPending",
317
+ :error_message=>"Заказ обрабатывается нашими сотруниками. Не повторяйте оформление данного заказа.\\n---------------------\\nORA-20815: Улица с названием “Фыва” неизвестна."
318
+ },
319
+ { :order_number_internal=>"2",
320
+ :status=>"OrderError",
321
+ :error_message=>"ORA-20817: Найдено более одной улицы с названием \\\"Ленина\\\""
322
+ }
323
+ ]
320
324
 
321
325
 
322
326
  ```
@@ -326,12 +330,12 @@ matches `createAddress`
326
330
  params = {
327
331
  client_address: {
328
332
  code: '78',
329
- name: fio,
333
+ name: 'Иванов Иван Иваныч',
330
334
  city: 'Воронеж',
331
335
  street: 'Красноармейская',
332
336
  street_abbr: 'ул',
333
337
  house: 1,
334
- contact_fio: fio,
338
+ contact_fio: 'Иванов Иван Иваныч',
335
339
  contact_phone: '+79211234567',
336
340
  },
337
341
  }
@@ -353,12 +357,12 @@ matches `updateAddress`
353
357
  params = {
354
358
  client_address: {
355
359
  code: '78',
356
- name: fio,
360
+ name: 'Иванов Иван Иваныч',
357
361
  city: 'Воронеж',
358
362
  street: 'Красноармейская',
359
363
  street_abbr: 'ул',
360
364
  house: 1,
361
- contact_fio: fio,
365
+ contact_fio: 'Иванов Иван Иваныч',
362
366
  contact_phone: '+79200000000',
363
367
  },
364
368
  }
@@ -476,9 +480,7 @@ matches `/services/tracing1-1?wsdl` in DPD SOAP API
476
480
  ####.states_by_client_order
477
481
  matches `getStatesByClientOrder`
478
482
  ```ruby
479
- params = {
480
- client_order_nr: '12345',
481
- }
483
+ params = { client_order_nr: '12345' }
482
484
 
483
485
  DpdApi::Tracing.states_by_client_order(params)
484
486
 
@@ -6,7 +6,7 @@ module DpdApi
6
6
  class Base
7
7
  class << self
8
8
  def operations
9
- client.operations
9
+ client.client.operations
10
10
  end
11
11
 
12
12
  protected
@@ -6,6 +6,8 @@ module DpdApi
6
6
  class Response
7
7
  include Observable
8
8
 
9
+ attr_reader :client
10
+
9
11
  def initialize(url)
10
12
  @url = url
11
13
  @client = Savon.client(wsdl: @url)
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module DpdApi
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.10"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpd_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ponomarev Nikolay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-26 00:00:00.000000000 Z
11
+ date: 2014-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon