rock_rms 7.1.2 → 7.2.0

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
  SHA256:
3
- metadata.gz: 4ce1928f116318b0198fefb0dbc9bd901c09cc827289e28b4f4322741fd82ccd
4
- data.tar.gz: 065f040911ed6e987f399b8f4d0b3d7022d423ce83d433c95a9c76d316bafcf6
3
+ metadata.gz: 7323c8bb120fb5c963d9f25264a5e58b629d5ddcd36df074239bbe8304b39e18
4
+ data.tar.gz: d009691577f05b76c79d0dd4c2b2f929275d21074b0970f6eba4bb9450b3bc6b
5
5
  SHA512:
6
- metadata.gz: 6067ac721c3a5cfc1bbf7c511147ec51ef76100ae072c1ecb3d106bf0adf551756d4b3cff095a21201b20f0ce81d0e19f07bfa3d4b9841a52302897ea9b4e7f5
7
- data.tar.gz: 1f7ae7604ddd2bf988e593d895b93bfa25cc3140f6a92ddce3af04391f08090a1469391ce18d0c612649b9806e6c4b66376c8349fe33963e3c101b60d5303a34
6
+ metadata.gz: 207a643d07eb9c82aa4b55ee8fc7db0c6ce3864045d567e3e8a89c15f5fb0544b72bcffa02f39ee65e5c40ce2800ed565b17c2a1250dec8c73da7171f8d2ced9
7
+ data.tar.gz: a6742080ba41a263ee368e3d54249c7fdc765f7dcac6571a8e16406f8eb636f699cffb8396ebb9c6730840ddc9dde21b119999510e970c2640127d75e728c2e6
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '7.1.2'.freeze
2
+ VERSION = '7.2.0'.freeze
3
3
  end
data/rock_rms.gemspec CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.add_runtime_dependency 'faraday'
24
24
  s.add_runtime_dependency 'faraday_middleware'
25
+ s.add_runtime_dependency 'faraday-multipart'
25
26
  s.add_runtime_dependency 'json'
26
27
  s.add_runtime_dependency 'oj'
27
28
 
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.1.2
4
+ version: 7.2.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-09-02 00:00:00.000000000 Z
11
+ date: 2022-10-04 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