intacct_ruby 1.8.0 → 1.8.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: 94288978f189f8f67b07129def8ad0d71f711b98
4
- data.tar.gz: 22898d8bb78457506c557cd53834fb1c70186e1b
3
+ metadata.gz: 3e89fb4f74bf4278b738c56efa3f508ccf2c4f23
4
+ data.tar.gz: 3ad8978c6d2c94a0098715e3259ebb075d3e1767
5
5
  SHA512:
6
- metadata.gz: c245c5bac43937e578dbe42d8638e54eb5befd9813abed0be88b1b65c02668ac6d89d33386c4b35b3006cb4483fceb244a2b9c433848d39b36b1b280a1b52bca
7
- data.tar.gz: fd5b9fafbf8bb15f34d027682ad3b15c1788950f41c9250cf2f20348ed411fcfac440cbb84fab68b3cedaad33c65a8bec4bd1b3145eb29a14976b5fe12761748
6
+ metadata.gz: 8da0580591b5ba7e8e77c511d5fbde1488f0d6ccd02e9f87631592f7007d076a532dbd2b3c200413abf72e96aaba1ac4c52b6a2d1452844439fe4e707e801481
7
+ data.tar.gz: 64e451c9687c06a0e9d4eed885e18a62a3176ac23dc5e73fbcecdc1c612845a399edd34510fa1b22f3f19836b37db66fbeade311c21bb5f9781b0733210e9a94
@@ -1,3 +1,7 @@
1
+ # 1.8.1 (March 19, 2018)
2
+
3
+ * Escape XML strings for requests as default ([@bezoar17](https://github.com/bezoar17) in [#17](https://github.com/privateprep/intacct-ruby/pull/17))
4
+
1
5
  # 1.8.0 (March 8, 2018)
2
6
 
3
7
  * Allow for varying cases in calls for calls other than :create and :update ([@bezoar17](https://github.com/bezoar17) in [#9](https://github.com/privateprep/intacct-ruby/pull/9) and [#13](https://github.com/privateprep/intacct-ruby/pull/13))
data/README.md CHANGED
@@ -84,15 +84,17 @@ This will fire off a request that looks something like this:
84
84
 
85
85
  ### Read Requests
86
86
 
87
- The read requests follow a slightly different pattern. The object-type is mentioned inside the object tag as seen here [Intacct List Vendors](https://developer.intacct.com/api/accounts-payable/vendors/#list-vendors). The following code will read all vendor objects.
87
+ The read requests follow a slightly different pattern. The object-type is mentioned inside the object tag as seen here [Intacct List Journal Entries](https://developer.intacct.com/api/general-ledger/journal-entries/#list-journal-entry-lines). The following code will read all GLENTRY objects in a specific interval
88
+
89
+ **Note:** The gem encodes the queries to a valid XML so that you don't have to. You can query using the `&, >, <` operators as seen below.
88
90
 
89
91
  ```ruby
90
92
  request = IntacctRuby::Request.new(REQUEST_OPTS)
91
93
 
92
- # Object-Type VENDOR is sent through extra-parameters and not as the first argument.
94
+ # Object-Type GLENTRY is sent through extra-parameters and not as the first argument.
93
95
  request.readByQuery nil, {
94
- object: 'VENDOR',
95
- query: '',
96
+ object: 'GLENTRY',
97
+ query: "BATCH_DATE >= '03-01-2018' AND BATCH_DATE <= '03-15-2018'",
96
98
  fields: '*',
97
99
  pagesize: 100
98
100
  }
@@ -100,9 +102,6 @@ request.readByQuery nil, {
100
102
  request.send
101
103
  ```
102
104
 
103
- **Note:** Clean up the query argument before using it in readByQuery function as mentioned here [Intacct Illegal characters in XML](https://developer.intacct.com/web-services/queries/#illegal-characters-in-xml).
104
- So, something like `query: "BATCH_DATE > '02/14/2018'"` should be `query: "BATCH_DATE &gt; '02/14/2018'"`
105
-
106
105
  This will fire off a request that looks something like this:
107
106
 
108
107
  ```xml
@@ -114,9 +113,9 @@ This will fire off a request that looks something like this:
114
113
  <content>
115
114
  <function controlid="readByQuery-2017-08-03 17:02:40 UTC">
116
115
  <readByQuery>
117
- <object>VENDOR</object>
116
+ <object>GLENTRY</object>
118
117
  <fields>*</fields>
119
- <query></query>
118
+ <query>BATCH_DATE &gt;= '03-01-2018' AND BATCH_DATE &lt;= '03-15-2018'</query>
120
119
  <pagesize>100</pagesize>
121
120
  </readByQuery>
122
121
  </function>
@@ -68,7 +68,7 @@ module IntacctRuby
68
68
  when Array
69
69
  argument_value_list_xml(value) # recursive case
70
70
  else
71
- value.to_s # end case
71
+ value.to_s.encode(xml: :text) # end case
72
72
  end
73
73
  end
74
74
 
@@ -1,3 +1,3 @@
1
1
  module IntacctRuby
2
- VERSION = '1.8.0'.freeze
2
+ VERSION = '1.8.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intacct_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Zornow
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-08 00:00:00.000000000 Z
11
+ date: 2018-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler