rock_rms 7.1.2 → 7.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rock_rms/client.rb +4 -0
- data/lib/rock_rms/resources/batch.rb +6 -2
- data/lib/rock_rms/resources/binary_file.rb +16 -0
- data/lib/rock_rms/resources/transaction_image.rb +23 -0
- data/lib/rock_rms/version.rb +1 -1
- data/rock_rms.gemspec +1 -0
- data/spec/rock_rms/resources/batch_spec.rb +3 -1
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87962faade54c951292f412649222278b4d7e9d3cdea878968d4cf0225ca31d7
|
4
|
+
data.tar.gz: 2740371cefede487dd3a09ac1ebbcaf38c34283dbc87e79526ff97196814771f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be74b67ddb5f61875f1be334c9d9091018ab8d491d86baf7fe7b8c9d24e0a736b2eea5c45310182ce6686e5417bc0157614327b5e205572d74157cf842441d78
|
7
|
+
data.tar.gz: 951407986077dd0e82781a69044344ed007dc2a6d81be329052fa9209d4f3decdb6b5864ebaa4bb7aeeffbc6cb1dfeca1e9e0e283ffac00175f787180237213c
|
data/lib/rock_rms/client.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'faraday_middleware'
|
3
|
+
require 'faraday/multipart'
|
3
4
|
|
4
5
|
Dir[File.expand_path('../resources/*.rb', __FILE__)].each { |f| require f }
|
5
6
|
require File.expand_path('../response/base.rb', __FILE__)
|
@@ -12,6 +13,7 @@ module RockRMS
|
|
12
13
|
include RockRMS::Client::Attribute
|
13
14
|
include RockRMS::Client::AttributeValue
|
14
15
|
include RockRMS::Client::Batch
|
16
|
+
include RockRMS::Client::BinaryFile
|
15
17
|
include RockRMS::Client::Block
|
16
18
|
include RockRMS::Client::BlockType
|
17
19
|
include RockRMS::Client::Fund
|
@@ -35,6 +37,7 @@ module RockRMS
|
|
35
37
|
include RockRMS::Client::ServiceJob
|
36
38
|
include RockRMS::Client::Transaction
|
37
39
|
include RockRMS::Client::TransactionDetail
|
40
|
+
include RockRMS::Client::TransactionImage
|
38
41
|
include RockRMS::Client::UserLogin
|
39
42
|
include RockRMS::Client::Utility
|
40
43
|
include RockRMS::Client::WorkflowActionType
|
@@ -112,6 +115,7 @@ module RockRMS
|
|
112
115
|
client_opts[:ssl] = ssl if ssl
|
113
116
|
|
114
117
|
Faraday.new(client_opts) do |conn|
|
118
|
+
conn.request :multipart
|
115
119
|
conn.request :json
|
116
120
|
conn.response :logger if logger
|
117
121
|
conn.response :oj
|
@@ -17,7 +17,9 @@ module RockRMS
|
|
17
17
|
end_time:,
|
18
18
|
foreign_key: nil,
|
19
19
|
campus_id: nil,
|
20
|
-
status: 1
|
20
|
+
status: 1,
|
21
|
+
control_amount: nil,
|
22
|
+
control_count: nil
|
21
23
|
)
|
22
24
|
options = {
|
23
25
|
'Name' => name,
|
@@ -25,7 +27,9 @@ module RockRMS
|
|
25
27
|
'CampusId' => campus_id,
|
26
28
|
'BatchEndDateTime' => end_time,
|
27
29
|
'ForeignKey' => foreign_key,
|
28
|
-
'Status' => status
|
30
|
+
'Status' => status,
|
31
|
+
'ControlAmount' => control_amount,
|
32
|
+
'ControlItemCount' => control_count
|
29
33
|
}
|
30
34
|
|
31
35
|
post(batches_path, options)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module RockRMS
|
2
|
+
class Client
|
3
|
+
module BinaryFile
|
4
|
+
def upload_binary_file(
|
5
|
+
file:,
|
6
|
+
mime_type:,
|
7
|
+
binary_file_type_id:
|
8
|
+
)
|
9
|
+
query_string = "BinaryFileTypeId=#{binary_file_type_id}"
|
10
|
+
converted_file = Faraday::UploadIO.new(file, mime_type)
|
11
|
+
|
12
|
+
post("BinaryFiles/Upload?#{query_string}", { file: converted_file })
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module RockRMS
|
2
|
+
class Client
|
3
|
+
module TransactionImage
|
4
|
+
def create_transaction_image(
|
5
|
+
binary_file_id:,
|
6
|
+
transaction_id:
|
7
|
+
)
|
8
|
+
options = {
|
9
|
+
'BinaryFileId' => binary_file_id,
|
10
|
+
'Transactionid' => transaction_id
|
11
|
+
}
|
12
|
+
|
13
|
+
post(transaction_image_path, options)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def transaction_image_path(id = nil)
|
19
|
+
id ? "FinancialTransactionImages/#{id}" : 'FinancialTransactionImages'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/rock_rms/version.rb
CHANGED
data/rock_rms.gemspec
CHANGED
@@ -75,7 +75,9 @@ RSpec.describe RockRMS::Client::Batch, type: :model do
|
|
75
75
|
'BatchStartDateTime' => '1',
|
76
76
|
'BatchEndDateTime' => '1',
|
77
77
|
'ForeignKey' => 1,
|
78
|
-
'Status' => 1
|
78
|
+
'Status' => 1,
|
79
|
+
'ControlAmount' => nil,
|
80
|
+
'ControlItemCount' => nil
|
79
81
|
}
|
80
82
|
).and_call_original
|
81
83
|
resource
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rock_rms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taylor Brooks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday-multipart
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: json
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -190,6 +204,7 @@ files:
|
|
190
204
|
- lib/rock_rms/resources/attribute.rb
|
191
205
|
- lib/rock_rms/resources/attribute_value.rb
|
192
206
|
- lib/rock_rms/resources/batch.rb
|
207
|
+
- lib/rock_rms/resources/binary_file.rb
|
193
208
|
- lib/rock_rms/resources/block.rb
|
194
209
|
- lib/rock_rms/resources/block_type.rb
|
195
210
|
- lib/rock_rms/resources/campus.rb
|
@@ -213,6 +228,7 @@ files:
|
|
213
228
|
- lib/rock_rms/resources/service_job.rb
|
214
229
|
- lib/rock_rms/resources/transaction.rb
|
215
230
|
- lib/rock_rms/resources/transaction_detail.rb
|
231
|
+
- lib/rock_rms/resources/transaction_image.rb
|
216
232
|
- lib/rock_rms/resources/user_login.rb
|
217
233
|
- lib/rock_rms/resources/version.rb
|
218
234
|
- lib/rock_rms/resources/workflow_action_type.rb
|