tessitura_rest 0.7.6 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tessitura_rest.rb +1 -0
- data/lib/tessitura_rest/txn/performance_extension.rb +2 -1
- data/lib/tessitura_rest/version.rb +1 -1
- data/lib/tessitura_rest/web/cart.rb +21 -1
- data/lib/tessitura_rest/web/registration.rb +41 -0
- data/lib/tessitura_rest/web/session.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a7e221c3479bb06ea467f5ff8b6a4bc4414157116ae4d361bbeedd34e069313
|
4
|
+
data.tar.gz: 39ae040d981bfdafd8d229ee8e91a6fc22d6f88ca7476fa23d53fa7a967a2fba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 271151ecb6c19230ee6f8812af937c3f2a10ce6d026e2db807e11d1f54e9cfa542aad930a4cdd6fc3b144f5e61d8c7cc4183067bf7076bc94849ddc36cb00c6d
|
7
|
+
data.tar.gz: d09ceb5abf1f4e70fc1594286dea50fb1305e04ab1b9db099e358716ba3d38b4eadd0120807cb55ef2bd78cd94208006f3a44394dd2738552ce777a81dff0560
|
data/lib/tessitura_rest.rb
CHANGED
@@ -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)
|
@@ -290,4 +290,24 @@ module Cart
|
|
290
290
|
put = self.class.put(base_api_endpoint("Web/Cart/#{session_key}/CustomData/#{index}"), options)
|
291
291
|
put.success?
|
292
292
|
end
|
293
|
-
|
293
|
+
|
294
|
+
def checkout(session_key, name_on_card, credit_card_number, cvv_number, credit_card_type, expiration_month, expiration_year, is_order_authorized, order_authorization_code, order_amount, allow_under_payment, options={})
|
295
|
+
parameters =
|
296
|
+
{
|
297
|
+
"CreditCardOwner": name_on_card,
|
298
|
+
"CreditCardNumber": credit_card_number,
|
299
|
+
"CreditCardType": credit_card_type,
|
300
|
+
"CreditCardMonth": expiration_month,
|
301
|
+
"CreditCardYear": expiration_year,
|
302
|
+
"Amount": order_amount,
|
303
|
+
"AllowUnderPayment": allow_under_payment,
|
304
|
+
"CreditCardAuthenticationCode": cvv_number,
|
305
|
+
"Authorize": is_order_authorized,
|
306
|
+
"AuthorizationCode": order_authorization_code,
|
307
|
+
}
|
308
|
+
options.merge!(basic_auth: @auth, headers: @headers)
|
309
|
+
options.merge!(:body => parameters)
|
310
|
+
self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Checkout"), options)
|
311
|
+
end
|
312
|
+
|
313
|
+
end
|
@@ -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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brittany Martin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -161,13 +161,14 @@ 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
|
167
168
|
licenses:
|
168
169
|
- MIT
|
169
170
|
metadata: {}
|
170
|
-
post_install_message:
|
171
|
+
post_install_message:
|
171
172
|
rdoc_options: []
|
172
173
|
require_paths:
|
173
174
|
- lib
|
@@ -183,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
184
|
version: '0'
|
184
185
|
requirements: []
|
185
186
|
rubygems_version: 3.0.3
|
186
|
-
signing_key:
|
187
|
+
signing_key:
|
187
188
|
specification_version: 4
|
188
189
|
summary: Rest API Endpoint for the Tessitura Rest API (v14+).
|
189
190
|
test_files: []
|