tessitura_rest 0.7.5 → 0.8
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/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 +40 -0
- data/lib/tessitura_rest/web/session.rb +17 -0
- 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: 13604ccbc3d66c08e47b8c0478f289d413bb54f65c5bd41e6b3ea8e96de234de
|
4
|
+
data.tar.gz: 9320bdfe4d3516ce09297c82bbe81d2cd70bbee81492159feda889049f261a20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d86d5b7239fbef5f40a4396243a6e7120a7125469947d3c49a8304f44f818bacc9c8296a96bed46104143c4654a677a4e9e48a4f700115e14af68755f7cd139b
|
7
|
+
data.tar.gz: 7c7b45987db21ed4edf25b59ceaaa86a766e572ffb45a1d5bf68f9b12f27de0b078c57b0e255c570aa8ffb481583bb59d98d026f1bf53af71a1fb423162b1a60
|
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,40 @@
|
|
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
|
+
},
|
11
|
+
'EmarketIndicatorId': special_offer,
|
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
|
+
'PhoneNumber': phone,
|
31
|
+
'PhoneTypeId': 1
|
32
|
+
},
|
33
|
+
],
|
34
|
+
}
|
35
|
+
options.merge!(basic_auth: @auth, headers: @headers)
|
36
|
+
options.merge!(body: parameters)
|
37
|
+
self.class.post(base_api_endpoint("Web/Registration/#{session_key}/Register"), options)
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -87,6 +87,23 @@ module Session
|
|
87
87
|
self.class.post(base_api_endpoint("/Web/Session/#{key}/Login/SendCredentials"), options)
|
88
88
|
end
|
89
89
|
|
90
|
+
def update_login(key, user_name, old_password, new_password, email, new_email, options={})
|
91
|
+
parameters =
|
92
|
+
{
|
93
|
+
'LoginName': user_name,
|
94
|
+
'NewLoginName': new_email,
|
95
|
+
'Password': old_password,
|
96
|
+
'NewPassword': new_password,
|
97
|
+
'EmailAddress': email,
|
98
|
+
'NewEmailAddress': new_email,
|
99
|
+
'LoginTypeId': 1,
|
100
|
+
'PromotionCode': 0,
|
101
|
+
}
|
102
|
+
options.merge!(basic_auth: @auth, headers: @headers)
|
103
|
+
options.merge!(:body => parameters)
|
104
|
+
self.class.put(base_api_endpoint("Web/Session/#{key}/WebLogins"), options)
|
105
|
+
end
|
106
|
+
|
90
107
|
def get_shipping_methods(key, options={})
|
91
108
|
options.merge!(basic_auth: @auth, headers: @headers)
|
92
109
|
response = self.class.get(base_api_endpoint("Web/Session/#{key}/DeliveryMethods"), options)
|
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'
|
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-02 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: []
|