axiomus_api 0.1 → 0.1.1
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 +2 -1
- data/lib/axiomus_api/order/ems_order.rb +1 -1
- data/lib/axiomus_api/order/post_order.rb +1 -1
- data/lib/axiomus_api/serializable.rb +1 -1
- data/lib/axiomus_api/session.rb +4 -0
- data/lib/axiomus_api/version.rb +1 -1
- data/spec/factories.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e7e56548cb4b9fcbf06900faaa40e7203fea890
|
4
|
+
data.tar.gz: 3edb5f8eafc6c2fa1d8b5e87c374a337d27cac69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ff4fa6ae07e2371c0cbb4de8a79324b6a673297d83966e7c34e1544624de3cc52049372d01ade14a1f767c0e1edbbeea5aa5f40fc23abd9f414e18079987940
|
7
|
+
data.tar.gz: a1a9f6f7590ce9e78de3fab95eedc8566b2097f2846f145fb5f1aec27b59df8fc14488ab980756384d5599375e830b4286771d14d6abc2270c5a48eab2eeaeb4
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Axiomus API
|
2
2
|
|
3
3
|
[](https://travis-ci.org/kinderly/axiomus_api)
|
4
|
+
[](http://badge.fury.io/rb/axiomus_api)
|
4
5
|
[](https://coveralls.io/r/kinderly/axiomus_api)
|
5
6
|
[](https://codeclimate.com/github/kinderly/axiomus_api)
|
6
7
|
[](https://gemnasium.com/kinderly/axiomus_api)
|
@@ -112,7 +113,7 @@ Most orders use `AxiomusApi::Item` as their item type, but some don't. To safely
|
|
112
113
|
|
113
114
|
### Error handling
|
114
115
|
|
115
|
-
Before sending a request, the library will validate your order object to check for missing fields or wrong type of parameters. If there are errors, it will raise an `AxiomusApi::Errors::ValidationError` exception. List of errors can be accessed via the order's `#validation_errors` method. Please note that passing validation doesn't
|
116
|
+
Before sending a request, the library will validate your order object to check for missing fields or wrong type of parameters. If there are errors, it will raise an `AxiomusApi::Errors::ValidationError` exception. List of errors can be accessed via the order's `#validation_errors` method. Please note that passing validation doesn't necessarily mean the order will be accepted by Axiomus.
|
116
117
|
|
117
118
|
If any kind of order request returns with an Axiomus status other than 0, the session will raise an `AxiomusApi::Errors::RequestError` exception.
|
118
119
|
|
@@ -4,7 +4,7 @@ require_relative '../services/post_services'
|
|
4
4
|
|
5
5
|
class AxiomusApi::EmsOrder < AxiomusApi::BaseOrder
|
6
6
|
|
7
|
-
xml_attribute :
|
7
|
+
xml_attribute :b_date
|
8
8
|
xml_attribute :incl_delivery_sum, optional: true
|
9
9
|
xml_field :address, type: AxiomusApi::EmsAddress
|
10
10
|
xml_field :services, type: AxiomusApi::PostServices
|
@@ -4,7 +4,7 @@ require_relative '../services/post_services'
|
|
4
4
|
|
5
5
|
class AxiomusApi::PostOrder < AxiomusApi::BaseOrder
|
6
6
|
#уточнить
|
7
|
-
xml_attribute :
|
7
|
+
xml_attribute :b_date, :post_type
|
8
8
|
xml_attribute :incl_delivery_sum, optional: true
|
9
9
|
xml_field :address, type: AxiomusApi::PostAddress
|
10
10
|
xml_field :services, type: AxiomusApi::PostServices
|
data/lib/axiomus_api/session.rb
CHANGED
data/lib/axiomus_api/version.rb
CHANGED
data/spec/factories.rb
CHANGED
@@ -159,7 +159,7 @@ FactoryGirl.define do
|
|
159
159
|
end
|
160
160
|
|
161
161
|
factory :post_order, class: AxiomusApi::PostOrder, parent: :base_order do
|
162
|
-
|
162
|
+
b_date {Time.now + rand(1..10)*24*60*60}
|
163
163
|
post_type {rand(1..2)}
|
164
164
|
address {build(:post_address)}
|
165
165
|
services {build(:post_services)}
|
@@ -167,7 +167,7 @@ FactoryGirl.define do
|
|
167
167
|
end
|
168
168
|
|
169
169
|
factory :ems_order, class: AxiomusApi::EmsOrder, parent: :base_order do
|
170
|
-
|
170
|
+
b_date {Time.now + rand(1..10)*24*60*60}
|
171
171
|
address {build(:ems_address)}
|
172
172
|
services {build(:post_services)}
|
173
173
|
contacts {generate(:sms)}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axiomus_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kinderly LTD
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|