qbwc_requests 0.3.0 → 0.3.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 +40 -10
- data/lib/qbwc_requests/version.rb +1 -1
- data/qbwc_requests.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 837a76e81e77e6e655b533aae80673b459a53943
|
4
|
+
data.tar.gz: 390511435ae2a7fcc47bd10972b0c93dc94068b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88f20647fdc54acec42b9edd22468e8977b71effec26ade55c99e15ca581c0a0c163e1469732d89f4959061e893f012bf487b225a23ba7ae5d8b3d4f6ddabbce
|
7
|
+
data.tar.gz: b0893a4d64d1626caa43093812a2b32bfe40c0629dff10e0ef7824066b2b283ca7add46723cb64153f2d20dd8444f94effe2db25c810f52552e43a50788ea6a7
|
data/README.md
CHANGED
@@ -22,10 +22,10 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
### Query
|
26
26
|
|
27
27
|
```ruby
|
28
|
-
|
28
|
+
AccountQbxml::Query.factory({max_returned: 2000}).to_xml("request_id")
|
29
29
|
```
|
30
30
|
|
31
31
|
result
|
@@ -35,7 +35,7 @@ Or install it yourself as:
|
|
35
35
|
<?qbxml version="7.0"?>
|
36
36
|
<QBXML>
|
37
37
|
<QBXMLMsgsRq onError="stopOnError">
|
38
|
-
<AccountQueryRq>
|
38
|
+
<AccountQueryRq requestID="request_id">
|
39
39
|
<MaxReturned>2000</MaxReturned>
|
40
40
|
</AccountQueryRq>
|
41
41
|
</QBXMLMsgsRq>
|
@@ -44,13 +44,13 @@ Or install it yourself as:
|
|
44
44
|
|
45
45
|
That will create an Account query for the qbxml version 7.0
|
46
46
|
|
47
|
-
|
47
|
+
### Add
|
48
48
|
|
49
49
|
```ruby
|
50
|
-
|
50
|
+
AccountQbxml::Add.factory(name: 'Some Account name').to_xml("2")
|
51
51
|
```
|
52
52
|
|
53
|
-
|
53
|
+
Result
|
54
54
|
|
55
55
|
```xml
|
56
56
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
@@ -70,16 +70,46 @@ That will create an Account query for the qbxml version 7.0
|
|
70
70
|
Note that <tt>name</tt> is mandatory in order to create an Account.
|
71
71
|
If no name is provided, the result will be a hash of errors.
|
72
72
|
|
73
|
-
You can also call <tt>valid?</tt> on the object to
|
73
|
+
You can also call <tt>valid?</tt> on the object to check if the object is valid.
|
74
74
|
|
75
|
-
|
75
|
+
### Delete
|
76
76
|
|
77
77
|
Not Implemented
|
78
78
|
|
79
|
-
|
79
|
+
### Update
|
80
80
|
|
81
|
-
|
81
|
+
```ruby
|
82
|
+
VendorQbxml::Mod.factory({name: "Vendor Name"}).to_xml("request_id")
|
83
|
+
```
|
82
84
|
|
85
|
+
```xml
|
86
|
+
<?xml version="1.0" encoding="ISO-8859-1"?>
|
87
|
+
<?qbxml version="7.0"?>
|
88
|
+
<QBXML>
|
89
|
+
<QBXMLMsgsRq onError="stopOnError">
|
90
|
+
<VendorModRq requestID="request_id">
|
91
|
+
<VendorMod>
|
92
|
+
<Name>Vendor Name</Name>
|
93
|
+
</VendorMod>
|
94
|
+
</VendorModRq>
|
95
|
+
</QBXMLMsgsRq>
|
96
|
+
</QBXML>
|
97
|
+
```
|
98
|
+
|
99
|
+
### Change Version
|
100
|
+
|
101
|
+
You can use diferent versions of versions of the QBXML in two ways.
|
102
|
+
|
103
|
+
- Extra Parameter
|
104
|
+
```ruby
|
105
|
+
VendorQbxml::Mod.factory({name: "Vendor Name"}, "13").to_xml("request_id")
|
106
|
+
```
|
107
|
+
|
108
|
+
- General Configuration
|
109
|
+
```ruby
|
110
|
+
QbwcRequests.QBXML_VERSION = "13"
|
111
|
+
VendorQbxml::Mod.factory({name: "Vendor Name"}).to_xml("request_id")
|
112
|
+
```
|
83
113
|
|
84
114
|
Right now we just have the following models on this gem.
|
85
115
|
|
data/qbwc_requests.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_runtime_dependency "qbxml", "~> 0.3.0"
|
22
|
-
spec.add_runtime_dependency "activemodel", "~> 4
|
22
|
+
spec.add_runtime_dependency "activemodel", "~> 4"
|
23
23
|
spec.add_development_dependency "colorize", "~> 0.7.7"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.3"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qbwc_requests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Mondaini Calvão
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: qbxml
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4
|
33
|
+
version: '4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4
|
40
|
+
version: '4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: colorize
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|