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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ca9d95588d2a465168cb3c258446e2e66be7ee43b4d0b4067d033243f99c9d5
4
- data.tar.gz: 3407dc2bff454f7612262186786f204550d6127d2386538a7458c7a09ce135ad
3
+ metadata.gz: 13604ccbc3d66c08e47b8c0478f289d413bb54f65c5bd41e6b3ea8e96de234de
4
+ data.tar.gz: 9320bdfe4d3516ce09297c82bbe81d2cd70bbee81492159feda889049f261a20
5
5
  SHA512:
6
- metadata.gz: 306a28c45ed59203f4d48ac8828c879d6c018b12b211af67c9774114e9f69e24bb3f51787a961d4ababc612baff14ed5e369ee0ec6d6a35e86188a09608d98e6
7
- data.tar.gz: 869c413f4380846ca07e9324d10a34475431884e1c8ccd1da67b203e1636e9cecfd5436916e4a9758171d10890c93957fd2bc6edb6efae844d4dfa55ba994551
6
+ metadata.gz: d86d5b7239fbef5f40a4396243a6e7120a7125469947d3c49a8304f44f818bacc9c8296a96bed46104143c4654a677a4e9e48a4f700115e14af68755f7cd139b
7
+ data.tar.gz: 7c7b45987db21ed4edf25b59ceaaa86a766e572ffb45a1d5bf68f9b12f27de0b078c57b0e255c570aa8ffb481583bb59d98d026f1bf53af71a1fb423162b1a60
@@ -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.5'
2
+ VERSION = '0.8'
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,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.7.5
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-08-04 00:00:00.000000000 Z
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: []