tessitura_rest 0.7.6 → 0.8.1

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: 77495e673ab54b7273f6723546a2bd7a6a2c67bc4e6c4bdcd8d9ae1ecd340d43
4
- data.tar.gz: aa73f16e91d0d0e17ceb67b3973e60391e62ccc329155b21a7ac45273b907bff
3
+ metadata.gz: 5a7e221c3479bb06ea467f5ff8b6a4bc4414157116ae4d361bbeedd34e069313
4
+ data.tar.gz: 39ae040d981bfdafd8d229ee8e91a6fc22d6f88ca7476fa23d53fa7a967a2fba
5
5
  SHA512:
6
- metadata.gz: 2e26798761a71b1490b0f5570d1f60bb8a5f1d42cc79ac3f37caa38b6318199ec8f8396c97512ab8406fcad7afa209d038fbcc47746b7cb6ddc02af693eca2fa
7
- data.tar.gz: b771aeb29ace0f44dc6663c4da7a0850fe0121449c84bedf5d4f8b532339e02c3bb7df2986ef68253cf408e56a872d9eb7e3bf6cc4880b4d6fab6b6ca58593c2
6
+ metadata.gz: 271151ecb6c19230ee6f8812af937c3f2a10ce6d026e2db807e11d1f54e9cfa542aad930a4cdd6fc3b144f5e61d8c7cc4183067bf7076bc94849ddc36cb00c6d
7
+ data.tar.gz: d09ceb5abf1f4e70fc1594286dea50fb1305e04ab1b9db099e358716ba3d38b4eadd0120807cb55ef2bd78cd94208006f3a44394dd2738552ce777a81dff0560
@@ -31,6 +31,7 @@ class TessituraRest
31
31
  include ProductionExtension
32
32
  include ProductKeywords
33
33
  include ProductionSeason
34
+ include Registration
34
35
  include Sections
35
36
  include Session
36
37
  include SecurityUserGroups
@@ -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)
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = '0.7.6'
2
+ VERSION = '0.8.1'
3
3
  end
@@ -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
- end
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
@@ -91,7 +91,7 @@ module Session
91
91
  parameters =
92
92
  {
93
93
  'LoginName': user_name,
94
- 'NewLoginName': user_name,
94
+ 'NewLoginName': new_email,
95
95
  'Password': old_password,
96
96
  'NewPassword': new_password,
97
97
  'EmailAddress': email,
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.7.6
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-08-07 00:00:00.000000000 Z
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: []