tessitura_rest 2.0.7 → 2.0.8

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: 45cffcb1a334766eebd38a9f224faacf7340895585f74d4b4acc3c62245a90f1
4
- data.tar.gz: 28d8fa018e555a8ae55c47458b83118f56354d9bf5512b7610629976d2890fc1
3
+ metadata.gz: 1ce13f389ba623e3a2ef3df3907665bce79cdccefbd812a13320e74848c37085
4
+ data.tar.gz: d8282b8ed80d2d1fde8251f8b489a2ca067c1b741bc221c4db2b9590584d2882
5
5
  SHA512:
6
- metadata.gz: 395a33fb5c9266370b7ce9a669904dd1d97602cd9f10d825d6c4b830441975bbf8305ec2acc262f83b8384065ad51ee68cae09fb8b9e30eb21101f2a471210fd
7
- data.tar.gz: 388503522387d0774637898e8e1fded14a0ea74ee88849dbe6ce57d60a4f55a8e0b17b3eb8ec9686d2ea6f4c4db1ec8e582067d9db3589e8853763a096487df5
6
+ metadata.gz: c4d99a8c11de1ba0e7d1a27a1a2fde2b25c21c65dff718e4037dd1ecc5d00514f01edd2e70d372a656d177b9841ce0a700d5f81ec835cb9bc1e9c3a7e695a035
7
+ data.tar.gz: 68b0b4ed64bd16ef7db75dbb968f289c3fbe2fc5e0bc676e93b7c5381cbc9562334ac23f1eebd36a208291fc470fad52c32dc85a61d7b3c708c310ecf543721b
@@ -1,4 +1,9 @@
1
1
  module Issues
2
+ def get_issue(issue_id, options = {})
3
+ options.merge!(basic_auth: @auth, headers: @headers)
4
+ self.class.get(base_api_endpoint("CRM/Issues/#{issue_id}"), options)
5
+ end
6
+
2
7
  def create_issue(activity_type, category_id, constituent_id, contact_type, notes, origin_id, options = {})
3
8
  parameters =
4
9
  {
@@ -25,4 +30,54 @@ module Issues
25
30
  response = self.class.post(base_api_endpoint('CRM/Issues'), options)
26
31
  JSON.parse(response.body)
27
32
  end
33
+
34
+ def create_issue_step(constituent_id, issue_id, options = {})
35
+ parameters =
36
+ {
37
+ 'Issue': {
38
+ 'Id': issue_id,
39
+ },
40
+ 'Constituent': {
41
+ 'Id': constituent_id,
42
+ },
43
+ 'Type': {
44
+ 'Id': 330,
45
+ },
46
+ 'Priority': {
47
+ 'Id': 2,
48
+ },
49
+ 'Recurrence': 'N',
50
+ 'Description': 'Email Sent',
51
+ 'StepDateTime': DateTime.now.strftime('%m/%d/%Y %H:%M:%S'),
52
+ 'CompletedOnDateTime': DateTime.now.strftime('%m/%d/%Y %H:%M:%S'),
53
+ 'Notes': "See Email for IsAc_no: #{issue_id}",
54
+ }
55
+ options.merge!(basic_auth: @auth, headers: @headers)
56
+ options.merge!(:body => parameters.to_json)
57
+ self.class.post(base_api_endpoint('CRM/IssueSteps'), options)
58
+ end
59
+
60
+ def update_issue(issue_id, is_closed, activity_type, category_id, contact_type, constituent_id, updated_datetime, options = {})
61
+ parameters =
62
+ {
63
+ 'Id': issue_id,
64
+ 'IsClosed': is_closed,
65
+ 'UpdatedDateTime': updated_datetime,
66
+ 'ActivityType': {
67
+ 'Id': activity_type,
68
+ 'Category': {
69
+ 'Id': category_id,
70
+ },
71
+ },
72
+ 'ContactType': {
73
+ 'Id': contact_type,
74
+ },
75
+ 'Constituent': {
76
+ 'Id': constituent_id,
77
+ },
78
+ }
79
+ options.merge!(basic_auth: @auth, headers: @headers)
80
+ options.merge!(:body => parameters.to_json)
81
+ self.class.put(base_api_endpoint("CRM/Issues/#{issue_id}"), options)
82
+ end
28
83
  end
@@ -27,4 +27,18 @@ module Email
27
27
  post = self.class.post(base_api_endpoint("Emails/OrderConfirmation/#{order_id}/Send"), options)
28
28
  post.success?
29
29
  end
30
+
31
+ def send_email(recipient, body, subject, sender, options = {})
32
+ parameters =
33
+ {
34
+ 'RecipientAddress': recipient,
35
+ 'HtmlBody': body,
36
+ 'FromAddress': sender,
37
+ 'Subject': subject,
38
+ 'EmailProfileId': 2,
39
+ }
40
+ options.merge!(basic_auth: @auth, headers: @headers)
41
+ options.merge!(:body => parameters.to_json)
42
+ self.class.post(base_api_endpoint('Emails/Send'), options)
43
+ end
30
44
  end
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = '2.0.7'.freeze
2
+ VERSION = '2.0.8'.freeze
3
3
  end
@@ -320,7 +320,7 @@ module Cart
320
320
  'ECommerce': true,
321
321
  'AuthorizationCode': order_authorization_code,
322
322
  'PaymentId': payment_id,
323
- 'PaymentReference': payment_reference
323
+ 'PaymentReference': payment_reference,
324
324
  }
325
325
  options.merge!(basic_auth: @auth, headers: @headers)
326
326
  options.merge!(:body => parameters.to_json)
@@ -6,18 +6,18 @@ require 'tessitura_rest/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.required_ruby_version = '>= 2.6.0'
9
- spec.name = 'tessitura_rest'
10
- spec.version = TessituraRest::VERSION
11
- spec.authors = ['Brittany Martin, Danielle Greaves, Craig Donavin, Patrick FitzGerald']
12
- spec.email = ['webteam@trustarts.org']
9
+ spec.name = 'tessitura_rest'
10
+ spec.version = TessituraRest::VERSION
11
+ spec.authors = ['Brittany Martin, Danielle Greaves, Craig Donavin, Patrick FitzGerald']
12
+ spec.email = ['webteam@trustarts.org']
13
13
 
14
- spec.summary = 'Rest API Endpoint for the Tessitura Rest API (v14+).'
15
- spec.description = 'TessituraRest is an enterprise-wide, fully integrated software system for arts & cultural organizations.'
16
- spec.homepage = 'https://github.com/pgharts/tessitura'
17
- spec.license = 'MIT'
18
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
- spec.bindir = 'exe'
20
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
14
+ spec.summary = 'Rest API Endpoint for the Tessitura Rest API (v16+).'
15
+ spec.description = 'TessituraRest is an enterprise-wide, fully integrated software system for arts & cultural organizations.'
16
+ spec.homepage = 'https://github.com/pgharts/tessitura'
17
+ spec.license = 'MIT'
18
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ spec.bindir = 'exe'
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ['lib']
22
22
 
23
23
  spec.add_development_dependency 'bundler', '~> 2.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tessitura_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brittany Martin, Danielle Greaves, Craig Donavin, Patrick FitzGerald
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-30 00:00:00.000000000 Z
11
+ date: 2024-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -194,5 +194,5 @@ requirements: []
194
194
  rubygems_version: 3.0.3.1
195
195
  signing_key:
196
196
  specification_version: 4
197
- summary: Rest API Endpoint for the Tessitura Rest API (v14+).
197
+ summary: Rest API Endpoint for the Tessitura Rest API (v16+).
198
198
  test_files: []