intacct 0 → 1.0.0
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/.yardopts +6 -0
- data/CHANGELOG.md +33 -0
- data/README.md +262 -20
- data/Rakefile +15 -51
- data/lib/intacct/authentication_methods/credentials.rb +3 -1
- data/lib/intacct/authentication_methods/session.rb +3 -1
- data/lib/intacct/authentication_result.rb +4 -2
- data/lib/intacct/config.rb +19 -9
- data/lib/intacct/exceptions/client_exception.rb +2 -0
- data/lib/intacct/exceptions/function_failure_exception.rb +2 -0
- data/lib/intacct/exceptions/missing_authentication_exception.rb +2 -0
- data/lib/intacct/function_result.rb +7 -5
- data/lib/intacct/functions/create.rb +2 -0
- data/lib/intacct/functions/create_ar_adjustment.rb +2 -0
- data/lib/intacct/functions/get_api_session.rb +2 -0
- data/lib/intacct/functions/query.rb +4 -2
- data/lib/intacct/functions/read.rb +4 -2
- data/lib/intacct/functions/retrieve_pdf.rb +2 -0
- data/lib/intacct/functions/reverse_payment.rb +2 -0
- data/lib/intacct/functions/update.rb +2 -1
- data/lib/intacct/gateway.rb +5 -3
- data/lib/intacct/request.rb +5 -3
- data/lib/intacct/response.rb +34 -6
- data/lib/intacct/utils.rb +5 -3
- data/lib/intacct/version.rb +4 -1
- data/lib/intacct.rb +53 -14
- metadata +34 -148
- data/.document +0 -5
- data/.rspec +0 -1
- data/.rubocop.yml +0 -19
- data/.travis.yml +0 -8
- data/Gemfile +0 -20
- data/intacct.gemspec +0 -79
- data/spec/intacct/client_spec.rb +0 -5
- data/spec/intacct_spec.rb +0 -7
- data/spec/spec_helper.rb +0 -34
data/lib/intacct/response.rb
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "intacct/function_result"
|
|
4
|
+
require "intacct/authentication_result"
|
|
3
5
|
|
|
4
6
|
module Intacct
|
|
7
|
+
# Parses and provides access to Intacct API XML responses.
|
|
8
|
+
#
|
|
9
|
+
# Wraps the HTTP response from Intacct and provides convenient methods
|
|
10
|
+
# to check status and extract function results.
|
|
11
|
+
#
|
|
12
|
+
# @example Parse a response
|
|
13
|
+
# response = Intacct::Response.new(http_response)
|
|
14
|
+
# if response.successful?
|
|
15
|
+
# result = response.get_function_result("my-control-id")
|
|
16
|
+
# puts result.data
|
|
17
|
+
# end
|
|
5
18
|
class Response
|
|
19
|
+
# @return [Nokogiri::XML::Document] the parsed XML response body
|
|
6
20
|
attr_reader :response_body
|
|
7
21
|
|
|
22
|
+
# Initialize a new Response from an HTTP response
|
|
23
|
+
#
|
|
24
|
+
# @param http_response [Net::HTTPResponse] the HTTP response from Intacct API
|
|
25
|
+
# @raise [Net::HTTPError] if the response status is not 2xx
|
|
8
26
|
def initialize(http_response)
|
|
9
27
|
@response_body = Nokogiri::XML(http_response.body)
|
|
10
28
|
|
|
@@ -12,27 +30,37 @@ module Intacct
|
|
|
12
30
|
http_response.value
|
|
13
31
|
end
|
|
14
32
|
|
|
33
|
+
# Check if the overall response was successful
|
|
34
|
+
#
|
|
35
|
+
# @return [Boolean] true if the response control status is "success"
|
|
15
36
|
def successful?
|
|
16
|
-
@response_body.xpath(
|
|
37
|
+
@response_body.xpath("//response/control/status").text == "success"
|
|
17
38
|
end
|
|
18
39
|
|
|
40
|
+
# Get the function result for a specific control ID
|
|
41
|
+
#
|
|
42
|
+
# @param control_id [String, Symbol] the control ID of the function
|
|
43
|
+
# @return [FunctionResult, nil] the function result or nil if not found
|
|
19
44
|
def get_function_result(control_id)
|
|
20
45
|
@function_results ||= build_function_results
|
|
21
46
|
@function_results[control_id.to_s]
|
|
22
47
|
end
|
|
23
48
|
|
|
49
|
+
# Get the authentication result from the response
|
|
50
|
+
#
|
|
51
|
+
# @return [AuthenticationResult] the authentication result
|
|
24
52
|
def get_authentication_result
|
|
25
|
-
Intacct::AuthenticationResult.new(@response_body.xpath(
|
|
53
|
+
Intacct::AuthenticationResult.new(@response_body.xpath("//response/operation/authentication"))
|
|
26
54
|
end
|
|
27
55
|
|
|
28
56
|
private
|
|
29
57
|
|
|
30
58
|
def build_function_results
|
|
31
|
-
@response_body.xpath("//result").
|
|
59
|
+
@response_body.xpath("//result").to_h do |xml_entry|
|
|
32
60
|
function_result = Intacct::FunctionResult.new(xml_entry)
|
|
33
61
|
|
|
34
62
|
[function_result.control_id, function_result]
|
|
35
|
-
end
|
|
63
|
+
end
|
|
36
64
|
end
|
|
37
65
|
end
|
|
38
66
|
end
|
data/lib/intacct/utils.rb
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Intacct
|
|
2
4
|
module Utils
|
|
3
|
-
YEAR_FORMAT = "%Y"
|
|
4
|
-
MONTH_FORMAT = "%m"
|
|
5
|
-
DAY_FORMAT = "%d"
|
|
5
|
+
YEAR_FORMAT = "%Y"
|
|
6
|
+
MONTH_FORMAT = "%m"
|
|
7
|
+
DAY_FORMAT = "%d"
|
|
6
8
|
DATE_FORMAT = "#{MONTH_FORMAT}/#{DAY_FORMAT}/#{YEAR_FORMAT}".freeze
|
|
7
9
|
DATETIME_FORMAT = "#{MONTH_FORMAT}/#{DAY_FORMAT}/#{YEAR_FORMAT} %H:%M:%S".freeze
|
|
8
10
|
|
data/lib/intacct/version.rb
CHANGED
data/lib/intacct.rb
CHANGED
|
@@ -1,18 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
require_relative
|
|
4
|
-
require_relative
|
|
5
|
-
require_relative
|
|
6
|
-
require_relative
|
|
7
|
-
require_relative
|
|
8
|
-
require_relative
|
|
9
|
-
require_relative
|
|
10
|
-
require_relative
|
|
11
|
-
require_relative
|
|
12
|
-
require_relative
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "intacct/version"
|
|
4
|
+
require_relative "intacct/utils"
|
|
5
|
+
require_relative "intacct/config"
|
|
6
|
+
require_relative "intacct/gateway"
|
|
7
|
+
require_relative "intacct/request"
|
|
8
|
+
require_relative "intacct/functions/create"
|
|
9
|
+
require_relative "intacct/functions/create_ar_adjustment"
|
|
10
|
+
require_relative "intacct/functions/update"
|
|
11
|
+
require_relative "intacct/functions/get_api_session"
|
|
12
|
+
require_relative "intacct/functions/query"
|
|
13
|
+
require_relative "intacct/functions/read"
|
|
14
|
+
require_relative "intacct/functions/retrieve_pdf"
|
|
15
|
+
require_relative "intacct/functions/reverse_payment"
|
|
13
16
|
|
|
14
17
|
module Intacct
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
class << self
|
|
19
|
+
# Returns the global configuration instance.
|
|
20
|
+
#
|
|
21
|
+
# @return [Config] the current configuration object
|
|
22
|
+
def config
|
|
23
|
+
@config ||= Config.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Configures the Intacct client globally.
|
|
27
|
+
#
|
|
28
|
+
# @example Configure with credentials
|
|
29
|
+
# Intacct.configure do |config|
|
|
30
|
+
# config.sender_id = ENV["INTACCT_SENDER_ID"]
|
|
31
|
+
# config.sender_password = ENV["INTACCT_SENDER_PASSWORD"]
|
|
32
|
+
# config.user_id = ENV["INTACCT_USER_ID"]
|
|
33
|
+
# config.user_password = ENV["INTACCT_USER_PASSWORD"]
|
|
34
|
+
# config.company_id = ENV["INTACCT_COMPANY_ID"]
|
|
35
|
+
# end
|
|
36
|
+
#
|
|
37
|
+
# @yield [config] Gives the configuration object to the block
|
|
38
|
+
# @yieldparam config [Config] the configuration instance to modify
|
|
39
|
+
# @return [void]
|
|
40
|
+
def configure
|
|
41
|
+
yield(config)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Resets the global configuration to nil.
|
|
45
|
+
#
|
|
46
|
+
# Primarily used for testing to ensure a clean configuration state.
|
|
47
|
+
#
|
|
48
|
+
# @return [void]
|
|
49
|
+
def reset_configuration!
|
|
50
|
+
@config = nil
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def logger
|
|
54
|
+
config.logger
|
|
55
|
+
end
|
|
17
56
|
end
|
|
18
57
|
end
|
metadata
CHANGED
|
@@ -1,228 +1,111 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: intacct
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Paluy
|
|
8
8
|
- Yaroslav Konovets
|
|
9
|
-
bindir:
|
|
9
|
+
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: builder
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: '3.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: '3.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: minitest
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
34
|
-
type: :runtime
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - "~>"
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '2.7'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: bundler
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - ">="
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0'
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - ">="
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: juwelier
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: 2.4.9
|
|
33
|
+
version: '5.0'
|
|
62
34
|
type: :development
|
|
63
35
|
prerelease: false
|
|
64
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
37
|
requirements:
|
|
66
38
|
- - "~>"
|
|
67
39
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
40
|
+
version: '5.0'
|
|
69
41
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - ">="
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: rdoc
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - "~>"
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: '6.0'
|
|
90
|
-
type: :development
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - "~>"
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: '6.0'
|
|
97
|
-
- !ruby/object:Gem::Dependency
|
|
98
|
-
name: rspec
|
|
42
|
+
name: rake
|
|
99
43
|
requirement: !ruby/object:Gem::Requirement
|
|
100
44
|
requirements:
|
|
101
45
|
- - "~>"
|
|
102
46
|
- !ruby/object:Gem::Version
|
|
103
|
-
version:
|
|
47
|
+
version: '13.0'
|
|
104
48
|
type: :development
|
|
105
49
|
prerelease: false
|
|
106
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
51
|
requirements:
|
|
108
52
|
- - "~>"
|
|
109
53
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
54
|
+
version: '13.0'
|
|
111
55
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
56
|
+
name: rubocop
|
|
113
57
|
requirement: !ruby/object:Gem::Requirement
|
|
114
58
|
requirements:
|
|
115
59
|
- - "~>"
|
|
116
60
|
- !ruby/object:Gem::Version
|
|
117
|
-
version:
|
|
61
|
+
version: '1.21'
|
|
118
62
|
type: :development
|
|
119
63
|
prerelease: false
|
|
120
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
65
|
requirements:
|
|
122
66
|
- - "~>"
|
|
123
67
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
68
|
+
version: '1.21'
|
|
125
69
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - ">="
|
|
130
|
-
- !ruby/object:Gem::Version
|
|
131
|
-
version: 0.21.0
|
|
132
|
-
type: :development
|
|
133
|
-
prerelease: false
|
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
-
requirements:
|
|
136
|
-
- - ">="
|
|
137
|
-
- !ruby/object:Gem::Version
|
|
138
|
-
version: 0.21.0
|
|
139
|
-
- !ruby/object:Gem::Dependency
|
|
140
|
-
name: timecop
|
|
70
|
+
name: webmock
|
|
141
71
|
requirement: !ruby/object:Gem::Requirement
|
|
142
72
|
requirements:
|
|
143
73
|
- - "~>"
|
|
144
74
|
- !ruby/object:Gem::Version
|
|
145
|
-
version:
|
|
75
|
+
version: '3.23'
|
|
146
76
|
type: :development
|
|
147
77
|
prerelease: false
|
|
148
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
79
|
requirements:
|
|
150
80
|
- - "~>"
|
|
151
81
|
- !ruby/object:Gem::Version
|
|
152
|
-
version:
|
|
82
|
+
version: '3.23'
|
|
153
83
|
- !ruby/object:Gem::Dependency
|
|
154
|
-
name:
|
|
84
|
+
name: yard
|
|
155
85
|
requirement: !ruby/object:Gem::Requirement
|
|
156
86
|
requirements:
|
|
157
87
|
- - "~>"
|
|
158
88
|
- !ruby/object:Gem::Version
|
|
159
|
-
version:
|
|
89
|
+
version: '0.9'
|
|
160
90
|
type: :development
|
|
161
91
|
prerelease: false
|
|
162
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
163
93
|
requirements:
|
|
164
94
|
- - "~>"
|
|
165
95
|
- !ruby/object:Gem::Version
|
|
166
|
-
version:
|
|
167
|
-
- !ruby/object:Gem::Dependency
|
|
168
|
-
name: codeclimate-test-reporter
|
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
|
170
|
-
requirements:
|
|
171
|
-
- - ">="
|
|
172
|
-
- !ruby/object:Gem::Version
|
|
173
|
-
version: '0'
|
|
174
|
-
type: :development
|
|
175
|
-
prerelease: false
|
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
177
|
-
requirements:
|
|
178
|
-
- - ">="
|
|
179
|
-
- !ruby/object:Gem::Version
|
|
180
|
-
version: '0'
|
|
181
|
-
- !ruby/object:Gem::Dependency
|
|
182
|
-
name: coveralls
|
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
|
184
|
-
requirements:
|
|
185
|
-
- - ">="
|
|
186
|
-
- !ruby/object:Gem::Version
|
|
187
|
-
version: '0'
|
|
188
|
-
type: :development
|
|
189
|
-
prerelease: false
|
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
191
|
-
requirements:
|
|
192
|
-
- - ">="
|
|
193
|
-
- !ruby/object:Gem::Version
|
|
194
|
-
version: '0'
|
|
195
|
-
- !ruby/object:Gem::Dependency
|
|
196
|
-
name: rubocop
|
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
|
198
|
-
requirements:
|
|
199
|
-
- - ">="
|
|
200
|
-
- !ruby/object:Gem::Version
|
|
201
|
-
version: '0'
|
|
202
|
-
type: :development
|
|
203
|
-
prerelease: false
|
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
205
|
-
requirements:
|
|
206
|
-
- - ">="
|
|
207
|
-
- !ruby/object:Gem::Version
|
|
208
|
-
version: '0'
|
|
209
|
-
description: Sage Intacct API wrapper
|
|
210
|
-
email: dpaluy@users.noreply.github.com
|
|
96
|
+
version: '0.9'
|
|
211
97
|
executables: []
|
|
212
98
|
extensions: []
|
|
213
99
|
extra_rdoc_files:
|
|
100
|
+
- CHANGELOG.md
|
|
214
101
|
- LICENSE.txt
|
|
215
102
|
- README.md
|
|
216
103
|
files:
|
|
217
|
-
- ".
|
|
218
|
-
-
|
|
219
|
-
- ".rubocop.yml"
|
|
220
|
-
- ".travis.yml"
|
|
221
|
-
- Gemfile
|
|
104
|
+
- ".yardopts"
|
|
105
|
+
- CHANGELOG.md
|
|
222
106
|
- LICENSE.txt
|
|
223
107
|
- README.md
|
|
224
108
|
- Rakefile
|
|
225
|
-
- intacct.gemspec
|
|
226
109
|
- lib/intacct.rb
|
|
227
110
|
- lib/intacct/authentication_methods/credentials.rb
|
|
228
111
|
- lib/intacct/authentication_methods/session.rb
|
|
@@ -245,13 +128,16 @@ files:
|
|
|
245
128
|
- lib/intacct/response.rb
|
|
246
129
|
- lib/intacct/utils.rb
|
|
247
130
|
- lib/intacct/version.rb
|
|
248
|
-
|
|
249
|
-
- spec/intacct_spec.rb
|
|
250
|
-
- spec/spec_helper.rb
|
|
251
|
-
homepage: http://github.com/dpaluy/intacct
|
|
131
|
+
homepage: https://github.com/dpaluy/intacct
|
|
252
132
|
licenses:
|
|
253
133
|
- MIT
|
|
254
|
-
metadata:
|
|
134
|
+
metadata:
|
|
135
|
+
rubygems_mfa_required: 'true'
|
|
136
|
+
homepage_uri: https://github.com/dpaluy/intacct
|
|
137
|
+
documentation_uri: https://rubydoc.info/gems/intacct
|
|
138
|
+
source_code_uri: https://github.com/dpaluy/intacct
|
|
139
|
+
changelog_uri: https://github.com/dpaluy/intacct/blob/master/CHANGELOG.md
|
|
140
|
+
bug_tracker_uri: https://github.com/dpaluy/intacct/issues
|
|
255
141
|
rdoc_options: []
|
|
256
142
|
require_paths:
|
|
257
143
|
- lib
|
|
@@ -259,14 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
259
145
|
requirements:
|
|
260
146
|
- - ">="
|
|
261
147
|
- !ruby/object:Gem::Version
|
|
262
|
-
version:
|
|
148
|
+
version: 3.2.0
|
|
263
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
150
|
requirements:
|
|
265
151
|
- - ">="
|
|
266
152
|
- !ruby/object:Gem::Version
|
|
267
153
|
version: '0'
|
|
268
154
|
requirements: []
|
|
269
|
-
rubygems_version: 3.
|
|
155
|
+
rubygems_version: 3.6.9
|
|
270
156
|
specification_version: 4
|
|
271
|
-
summary:
|
|
157
|
+
summary: A Ruby wrapper for the Intacct API
|
|
272
158
|
test_files: []
|
data/.document
DELETED
data/.rspec
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--color
|
data/.rubocop.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
AllCops:
|
|
2
|
-
NewCops: enable
|
|
3
|
-
SuggestExtensions: false
|
|
4
|
-
Exclude:
|
|
5
|
-
- '*.gemspec'
|
|
6
|
-
- 'Rakefile'
|
|
7
|
-
- 'spec/spec_helper.rb'
|
|
8
|
-
|
|
9
|
-
Metrics/MethodLength:
|
|
10
|
-
Max: 20
|
|
11
|
-
|
|
12
|
-
Style/Documentation:
|
|
13
|
-
Enabled: false
|
|
14
|
-
|
|
15
|
-
Style/StringConcatenation:
|
|
16
|
-
Enabled: false
|
|
17
|
-
|
|
18
|
-
Style/FrozenStringLiteralComment:
|
|
19
|
-
Enabled: false
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
source 'https://rubygems.org'
|
|
2
|
-
|
|
3
|
-
gem 'faraday', '~> 1.10.0'
|
|
4
|
-
gem 'json', '~> 2.7'
|
|
5
|
-
|
|
6
|
-
group :development do
|
|
7
|
-
gem 'bundler'
|
|
8
|
-
gem 'juwelier', '~> 2.4.9'
|
|
9
|
-
gem 'pry-byebug'
|
|
10
|
-
gem 'rdoc', '~> 6.0'
|
|
11
|
-
gem 'rspec', '~> 3.11.0'
|
|
12
|
-
gem 'shoulda', '~> 4.0.0'
|
|
13
|
-
gem 'simplecov', '>= 0.21.0'
|
|
14
|
-
gem 'timecop', '~> 0.9.0'
|
|
15
|
-
gem 'webmock', '~> 3.18.0'
|
|
16
|
-
|
|
17
|
-
gem 'codeclimate-test-reporter', require: false
|
|
18
|
-
gem 'coveralls', require: false
|
|
19
|
-
gem 'rubocop', require: false
|
|
20
|
-
end
|
data/intacct.gemspec
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Generated by juwelier
|
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
-
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
|
-
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: intacct 0 ruby lib
|
|
6
|
-
|
|
7
|
-
Gem::Specification.new do |s|
|
|
8
|
-
s.name = "intacct".freeze
|
|
9
|
-
s.version = "0".freeze
|
|
10
|
-
|
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
12
|
-
s.require_paths = ["lib".freeze]
|
|
13
|
-
s.authors = ["David Paluy".freeze, "Yaroslav Konovets".freeze]
|
|
14
|
-
s.date = "1980-01-02"
|
|
15
|
-
s.description = "Sage Intacct API wrapper".freeze
|
|
16
|
-
s.email = "dpaluy@users.noreply.github.com".freeze
|
|
17
|
-
s.extra_rdoc_files = [
|
|
18
|
-
"LICENSE.txt",
|
|
19
|
-
"README.md"
|
|
20
|
-
]
|
|
21
|
-
s.files = [
|
|
22
|
-
".document",
|
|
23
|
-
".rspec",
|
|
24
|
-
".rubocop.yml",
|
|
25
|
-
".travis.yml",
|
|
26
|
-
"Gemfile",
|
|
27
|
-
"LICENSE.txt",
|
|
28
|
-
"README.md",
|
|
29
|
-
"Rakefile",
|
|
30
|
-
"intacct.gemspec",
|
|
31
|
-
"lib/intacct.rb",
|
|
32
|
-
"lib/intacct/authentication_methods/credentials.rb",
|
|
33
|
-
"lib/intacct/authentication_methods/session.rb",
|
|
34
|
-
"lib/intacct/authentication_result.rb",
|
|
35
|
-
"lib/intacct/config.rb",
|
|
36
|
-
"lib/intacct/exceptions/client_exception.rb",
|
|
37
|
-
"lib/intacct/exceptions/function_failure_exception.rb",
|
|
38
|
-
"lib/intacct/exceptions/missing_authentication_exception.rb",
|
|
39
|
-
"lib/intacct/function_result.rb",
|
|
40
|
-
"lib/intacct/functions/create.rb",
|
|
41
|
-
"lib/intacct/functions/create_ar_adjustment.rb",
|
|
42
|
-
"lib/intacct/functions/get_api_session.rb",
|
|
43
|
-
"lib/intacct/functions/query.rb",
|
|
44
|
-
"lib/intacct/functions/read.rb",
|
|
45
|
-
"lib/intacct/functions/retrieve_pdf.rb",
|
|
46
|
-
"lib/intacct/functions/reverse_payment.rb",
|
|
47
|
-
"lib/intacct/functions/update.rb",
|
|
48
|
-
"lib/intacct/gateway.rb",
|
|
49
|
-
"lib/intacct/request.rb",
|
|
50
|
-
"lib/intacct/response.rb",
|
|
51
|
-
"lib/intacct/utils.rb",
|
|
52
|
-
"lib/intacct/version.rb",
|
|
53
|
-
"spec/intacct/client_spec.rb",
|
|
54
|
-
"spec/intacct_spec.rb",
|
|
55
|
-
"spec/spec_helper.rb"
|
|
56
|
-
]
|
|
57
|
-
s.homepage = "http://github.com/dpaluy/intacct".freeze
|
|
58
|
-
s.licenses = ["MIT".freeze]
|
|
59
|
-
s.rubygems_version = "3.7.2".freeze
|
|
60
|
-
s.summary = "Sage Intacct API wrapper".freeze
|
|
61
|
-
|
|
62
|
-
s.specification_version = 4
|
|
63
|
-
|
|
64
|
-
s.add_runtime_dependency(%q<faraday>.freeze, ["~> 1.10.0".freeze])
|
|
65
|
-
s.add_runtime_dependency(%q<json>.freeze, ["~> 2.7".freeze])
|
|
66
|
-
s.add_development_dependency(%q<bundler>.freeze, [">= 0".freeze])
|
|
67
|
-
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.4.9".freeze])
|
|
68
|
-
s.add_development_dependency(%q<pry-byebug>.freeze, [">= 0".freeze])
|
|
69
|
-
s.add_development_dependency(%q<rdoc>.freeze, ["~> 6.0".freeze])
|
|
70
|
-
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.11.0".freeze])
|
|
71
|
-
s.add_development_dependency(%q<shoulda>.freeze, ["~> 4.0.0".freeze])
|
|
72
|
-
s.add_development_dependency(%q<simplecov>.freeze, [">= 0.21.0".freeze])
|
|
73
|
-
s.add_development_dependency(%q<timecop>.freeze, ["~> 0.9.0".freeze])
|
|
74
|
-
s.add_development_dependency(%q<webmock>.freeze, ["~> 3.18.0".freeze])
|
|
75
|
-
s.add_development_dependency(%q<codeclimate-test-reporter>.freeze, [">= 0".freeze])
|
|
76
|
-
s.add_development_dependency(%q<coveralls>.freeze, [">= 0".freeze])
|
|
77
|
-
s.add_development_dependency(%q<rubocop>.freeze, [">= 0".freeze])
|
|
78
|
-
end
|
|
79
|
-
|
data/spec/intacct/client_spec.rb
DELETED
data/spec/intacct_spec.rb
DELETED
data/spec/spec_helper.rb
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
require 'codeclimate-test-reporter'
|
|
2
|
-
require 'simplecov'
|
|
3
|
-
require 'coveralls'
|
|
4
|
-
|
|
5
|
-
require 'webmock/rspec'
|
|
6
|
-
|
|
7
|
-
if ENV['COVERAGE']
|
|
8
|
-
WebMock.disable_net_connect!(allow: 'codeclimate.com')
|
|
9
|
-
|
|
10
|
-
Coveralls.wear!
|
|
11
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
12
|
-
SimpleCov::Formatter::HTMLFormatter,
|
|
13
|
-
Coveralls::SimpleCov::Formatter
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
# SimpleCov.start
|
|
17
|
-
CodeClimate::TestReporter.start
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
21
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
22
|
-
|
|
23
|
-
require 'intacct'
|
|
24
|
-
require 'byebug'
|
|
25
|
-
require 'timecop'
|
|
26
|
-
require 'rspec'
|
|
27
|
-
|
|
28
|
-
# Requires supporting files with custom matchers and macros, etc,
|
|
29
|
-
# in ./support/ and its subdirectories.
|
|
30
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
|
31
|
-
|
|
32
|
-
RSpec.configure do |config|
|
|
33
|
-
config.order = 'random'
|
|
34
|
-
end
|