tessitura_rest 0.7.8 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tessitura_rest.rb +1 -0
- data/lib/tessitura_rest/crm/constituencies.rb +44 -1
- data/lib/tessitura_rest/crm/web_logins.rb +23 -0
- data/lib/tessitura_rest/txn/performance_extension.rb +2 -1
- data/lib/tessitura_rest/version.rb +1 -1
- data/lib/tessitura_rest/web/registration.rb +41 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7180fa16baa7e12443722d75a26127004f30df244579a60d688f73ceb5465ac
|
4
|
+
data.tar.gz: 5df18feb43210fba6e53b72172df7e1ffad63eae18e62928073d24de3e154284
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 393cfdb9c868f4c2df8bb4d27164303e5238e99e7610ed02c9949a744abd996c3d15463b7ec92562dcb43dd3e4ea595a3ab762231c7d735985375f8d38bf7a80
|
7
|
+
data.tar.gz: 2ccc82a0f23fcefb3ba9c978a991a2ffcaa3f2b124176cac09888d6a51ec2c394ddce4fb2833d18f604ff1decf8f214f040db881d2f4367ccb613553841aff35
|
data/lib/tessitura_rest.rb
CHANGED
@@ -12,6 +12,49 @@ module Constituencies
|
|
12
12
|
JSON.parse(response.body)
|
13
13
|
end
|
14
14
|
|
15
|
+
def create_constituent_by_snapshot(first_name, last_name, email, constituent_type, source, city, zip, state, street1, country, options={})
|
16
|
+
parameters = {
|
17
|
+
"ConstituentType": {
|
18
|
+
"Id": constituent_type,
|
19
|
+
"Inactive": false,
|
20
|
+
},
|
21
|
+
"DisplayName": "#{first_name} #{last_name}",
|
22
|
+
"FirstName": first_name,
|
23
|
+
"LastName": last_name,
|
24
|
+
"ElectronicAddress": {
|
25
|
+
"Address": email,
|
26
|
+
"ElectronicAddressType": {
|
27
|
+
"Id": 1,
|
28
|
+
},
|
29
|
+
"AllowHtmlFormat": true,
|
30
|
+
"Inactive": false,
|
31
|
+
"AllowMarketing": false,
|
32
|
+
"Months": 'YYYYYYYYYYYY',
|
33
|
+
"PrimaryIndicator": true,
|
34
|
+
},
|
35
|
+
"OriginalSource": {
|
36
|
+
"Id": source,
|
37
|
+
},
|
38
|
+
"Address": {
|
39
|
+
"AddressType": {
|
40
|
+
"Id": 3,
|
41
|
+
},
|
42
|
+
"City": city,
|
43
|
+
"PostalCode": zip,
|
44
|
+
"State": {
|
45
|
+
"Id": state,
|
46
|
+
},
|
47
|
+
"Street1": street1,
|
48
|
+
"Country": {
|
49
|
+
"Id": country,
|
50
|
+
},
|
51
|
+
}
|
52
|
+
}
|
53
|
+
options.merge!(basic_auth: @auth, headers: @headers)
|
54
|
+
options.merge!(:body => parameters)
|
55
|
+
response = self.class.post(base_api_endpoint('CRM/Constituents/Snapshot'), options)
|
56
|
+
end
|
57
|
+
|
15
58
|
def create_constituencies(constituency, id, options={})
|
16
59
|
parameters =
|
17
60
|
{
|
@@ -26,4 +69,4 @@ module Constituencies
|
|
26
69
|
options.merge!(:body => parameters)
|
27
70
|
response = self.class.post(base_api_endpoint('CRM/Constituencies'), options)
|
28
71
|
end
|
29
|
-
end
|
72
|
+
end
|
@@ -5,4 +5,27 @@ module WebLogins
|
|
5
5
|
response = self.class.get(base_api_endpoint("CRM/WebLogins/Search?emailAddress=#{email}&loginTypeId=#{login_type}"), options)
|
6
6
|
JSON.parse(response.body)
|
7
7
|
end
|
8
|
+
|
9
|
+
def create_web_login(constituent, email_id, email, login_type, primary, temporary, options={})
|
10
|
+
parameters = {
|
11
|
+
'Constituent': {
|
12
|
+
'Id': constituent,
|
13
|
+
},
|
14
|
+
'Email': {
|
15
|
+
'Id': email_id,
|
16
|
+
},
|
17
|
+
'FailedAttempts': 3,
|
18
|
+
'Inactive': false,
|
19
|
+
'Login': email,
|
20
|
+
'LoginType': {
|
21
|
+
'Id': login_type,
|
22
|
+
},
|
23
|
+
'PrimaryIndicator': primary,
|
24
|
+
'TemporaryIndicator': temporary,
|
25
|
+
}
|
26
|
+
options.merge!(basic_auth: @auth, headers: @headers)
|
27
|
+
options.merge!(:body => parameters)
|
28
|
+
self.class.post(base_api_endpoint('CRM/WebLogins'), options)
|
29
|
+
end
|
30
|
+
|
8
31
|
end
|
@@ -3,7 +3,8 @@ module PerformanceExtension
|
|
3
3
|
def get_performances_by_production(ids, mode_of_sale=nil, options={})
|
4
4
|
parameters =
|
5
5
|
{
|
6
|
-
'ProductionSeasonIds': ids,
|
6
|
+
'ProductionSeasonIds': ids,
|
7
|
+
'BusinessUnitId': 1,
|
7
8
|
'ModeOfSaleId': mode_of_sale
|
8
9
|
}
|
9
10
|
options.merge!(basic_auth: @auth, headers: @headers)
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Registration
|
2
|
+
|
3
|
+
def register_user(session_key, address, first_name, last_name, email, password, special_offer, phone, options={})
|
4
|
+
parameters =
|
5
|
+
{
|
6
|
+
'FirstName': first_name,
|
7
|
+
'LastName': last_name,
|
8
|
+
'ElectronicAddress': {
|
9
|
+
'Address': email,
|
10
|
+
'AllowMarketing': special_offer || 0,
|
11
|
+
},
|
12
|
+
'WebLogin': {
|
13
|
+
'Login': email,
|
14
|
+
'LoginTypeId': 1,
|
15
|
+
'Password': password
|
16
|
+
},
|
17
|
+
'Address': {
|
18
|
+
'AddressTypeId': 3,
|
19
|
+
'City': address.city,
|
20
|
+
'PostalCode': address.postal_code,
|
21
|
+
'StateId': address.state,
|
22
|
+
'Street1': address.street1,
|
23
|
+
'Street2': address.street2,
|
24
|
+
'CountryId': address.country
|
25
|
+
},
|
26
|
+
'ConstituentTypeId': 1,
|
27
|
+
'OriginalSourceId': 3,
|
28
|
+
'Phones':
|
29
|
+
[
|
30
|
+
{
|
31
|
+
'PhoneNumber': phone,
|
32
|
+
'PhoneTypeId': 1
|
33
|
+
},
|
34
|
+
],
|
35
|
+
}
|
36
|
+
options.merge!(basic_auth: @auth, headers: @headers)
|
37
|
+
options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
|
38
|
+
self.class.post(base_api_endpoint("Web/Registration/#{session_key}/Register"), options)
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
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: 0.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brittany Martin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -161,6 +161,7 @@ files:
|
|
161
161
|
- lib/tessitura_rest/web/cart.rb
|
162
162
|
- lib/tessitura_rest/web/login.rb
|
163
163
|
- lib/tessitura_rest/web/payment_plan_extension.rb
|
164
|
+
- lib/tessitura_rest/web/registration.rb
|
164
165
|
- lib/tessitura_rest/web/session.rb
|
165
166
|
- tessitura_rest.gemspec
|
166
167
|
homepage: https://github.com/pgharts/tessitura
|