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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46cbfa60c3a4fb4adf36a9338e608c2e7152f7d25cbca1bb94f1a0d636967e72
4
- data.tar.gz: b90446854312d727acf35cced3bd00e97417fdd8e5c8a221923e53aec1474521
3
+ metadata.gz: 7323c8bb120fb5c963d9f25264a5e58b629d5ddcd36df074239bbe8304b39e18
4
+ data.tar.gz: d009691577f05b76c79d0dd4c2b2f929275d21074b0970f6eba4bb9450b3bc6b
5
5
  SHA512:
6
- metadata.gz: 0ce574e5f6b2a0f8ee784996494522bdf59d7d716dadad5b292b074efcf3d9644b3980d0f27c685b6f70362dc36f94013d4998bf56057e395e35452ccde47385
7
- data.tar.gz: 8e023912b296c54081b726ea452c491531ec72f5be133236a7f7469f5337779123ed8d194009da22e333ededc2706fa143b8d8c575cbd18c1014d270d23abcaa
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
@@ -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' => 1,
44
+ 'Gender' => gender,
45
45
  'ConnectionStatusValueId' => connection_status_value_id,
46
- 'RecordStatusValueId' => record_status_value_id,
47
- 'RecordTypeValueId' => record_type_value_id,
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
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '7.1.1'.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.1
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-08-20 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