rock_rms 7.1.1 → 7.2.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/binary_file.rb +16 -0
- data/lib/rock_rms/resources/person.rb +4 -4
- data/lib/rock_rms/resources/transaction_image.rb +23 -0
- data/lib/rock_rms/version.rb +1 -1
- data/rock_rms.gemspec +1 -0
- 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: 7323c8bb120fb5c963d9f25264a5e58b629d5ddcd36df074239bbe8304b39e18
|
4
|
+
data.tar.gz: d009691577f05b76c79d0dd4c2b2f929275d21074b0970f6eba4bb9450b3bc6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 207a643d07eb9c82aa4b55ee8fc7db0c6ce3864045d567e3e8a89c15f5fb0544b72bcffa02f39ee65e5c40ce2800ed565b17c2a1250dec8c73da7171f8d2ced9
|
7
|
+
data.tar.gz: a6742080ba41a263ee368e3d54249c7fdc765f7dcac6571a8e16406f8eb636f699cffb8396ebb9c6730840ddc9dde21b119999510e970c2640127d75e728c2e6
|
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
|
@@ -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
|
@@ -35,16 +35,16 @@ module RockRMS
|
|
35
35
|
)
|
36
36
|
end
|
37
37
|
|
38
|
-
def create_person(first_name:, last_name:, email:, connection_status_value_id: nil, record_status_value_id: nil, record_type_value_id: 1)
|
38
|
+
def create_person(first_name:, last_name:, email:, gender: 1, connection_status_value_id: nil, record_status_value_id: nil, record_type_value_id: 1)
|
39
39
|
options = {
|
40
40
|
'IsSystem' => false,
|
41
41
|
'FirstName' => first_name,
|
42
42
|
'LastName' => last_name,
|
43
43
|
'Email' => email,
|
44
|
-
'Gender' =>
|
44
|
+
'Gender' => gender,
|
45
45
|
'ConnectionStatusValueId' => connection_status_value_id,
|
46
|
-
'RecordStatusValueId'
|
47
|
-
'RecordTypeValueId'
|
46
|
+
'RecordStatusValueId' => record_status_value_id,
|
47
|
+
'RecordTypeValueId' => record_type_value_id
|
48
48
|
}
|
49
49
|
|
50
50
|
# RecordTypeValueId 1 = Person
|
@@ -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
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.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-
|
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
|