qbwc_requests 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55e98a7c49505aa0fe9b0fac41e7073849a55636
4
- data.tar.gz: d272895bce72dfa14c73e32040ffc40773b59658
3
+ metadata.gz: 837a76e81e77e6e655b533aae80673b459a53943
4
+ data.tar.gz: 390511435ae2a7fcc47bd10972b0c93dc94068b2
5
5
  SHA512:
6
- metadata.gz: 10dc09cfdeac01e7f944bd673e54f73dc381ba63b74a8fcf6a3790ed007e9063f269e29914ad4448780669431e19a99c97e26278ea2ef02f60d9c05b41b26dc3
7
- data.tar.gz: 2d30beb012534d3fe8ad7f511636315ac7f809ab6e1921bcf239575b1aa9f4172339022d7ab6e4d297a3454df1522a4260762c1a7a4743db67dc8d86e979a0a1
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
- * Query Requisitions
25
+ ### Query
26
26
 
27
27
  ```ruby
28
- Qbwc::Request::V07::Account.query
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
- * Add Requisitions
47
+ ### Add
48
48
 
49
49
  ```ruby
50
- Qbwc::Request::V07::Account.new(name: 'Some Account name').add("2")
50
+ AccountQbxml::Add.factory(name: 'Some Account name').to_xml("2")
51
51
  ```
52
52
 
53
- result
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 see the required fields.
73
+ You can also call <tt>valid?</tt> on the object to check if the object is valid.
74
74
 
75
- * Delete Requisitions
75
+ ### Delete
76
76
 
77
77
  Not Implemented
78
78
 
79
- * Update Requisitions
79
+ ### Update
80
80
 
81
- Not Implemented
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
 
@@ -1,3 +1,3 @@
1
1
  module QbwcRequests
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -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.2.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.0
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-25 00:00:00.000000000 Z
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.2.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.2.4
40
+ version: '4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: colorize
43
43
  requirement: !ruby/object:Gem::Requirement