tessitura_rest 0.7.4 → 0.7.9

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: 21e59b420a3c2259ad858f79c7224a4309892fdc63e23599c7f5f7d0b376629a
4
- data.tar.gz: c8d812b49493cccca8d46a2178b5467baa45f9a20da7de043bd026b8ce656bdd
3
+ metadata.gz: 3ceea7ad3329bc14ce2cb3227f84a6169102a15b475deb8a909b81d47bb1de7d
4
+ data.tar.gz: 1f8e1059a28a178259cc459817d1c90ccd99f90fd694223f0a011efc1e8163ec
5
5
  SHA512:
6
- metadata.gz: 11c63f54d3a47b1ef68796c13e658413f36287ac3434b404ec7a4ddabb76c16b27b2d4c93b562b640873bad0d8bebc2e87cb7afdacb77b3d9a030ec0833aa746
7
- data.tar.gz: ec9f8cedbabb6066a67ce0e11307706932c8cf9a95b8739a229cdfd95c184d733541f3de2258a6808cc4dad24e532b4acc0ae1ad62fd8282519c7a51f5e4dbf7
6
+ metadata.gz: 77a696486fa373479de3d2ae1916d2bee9c9001c86d8dc5b72fc4115e4265996e74b8a21da05b15a4636b56f5f9d9cd50cc31e7affb25685d34fc0d23edb3b00
7
+ data.tar.gz: a31ec251bf695c1bb2d7a60ef5176f5d16a379953c15ea94364b237aa63d739289a9560a35cc4c6fe56ad977863335be11f2b7238333e8e5ef2a8131c856986e
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  .env
11
+ .idea/
data/README.md CHANGED
@@ -43,8 +43,8 @@ followed by the method and arguments you would like to use.
43
43
  3. Create a .env file and set these values:
44
44
 
45
45
  * TESSITURA_URL # the url to your Test/Staging TessituraRest REST instance
46
- * TESSITURA_USERNAME # the username to authenticate to your TessituraRest REST instance
47
- * TESSITURA_PASSWORD # the password to authenticate to your TessituraRest REST instance
46
+ * USERNAME # the username to authenticate to your TessituraRest REST instance
47
+ * PASSWORD # the password to authenticate to your TessituraRest REST instance
48
48
  * WEB_CART_TEXT # the ID to the pricing rule you have setup for Cart
49
49
  * ORDER_CONFIRM_TEXT # the ID to the pricing rule you have setup for Order Confirmations
50
50
  * SESSION_KEY # an existing session key in your TessituraRest instance
@@ -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.4'
2
+ VERSION = '0.7.9'
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
@@ -8,16 +8,26 @@ module Session
8
8
 
9
9
  def create_session(ip, options={})
10
10
  parameters =
11
- {
12
- 'IpAddress': ip,
13
- 'Organization': 'Tessitura Web'
14
- }
11
+ {
12
+ 'IpAddress': ip,
13
+ 'Organization': 'Tessitura Web'
14
+ }
15
15
  options.merge!(basic_auth: @auth, headers: @headers)
16
16
  options.merge!(body: parameters)
17
17
  response = self.class.post(base_api_endpoint('Web/Session'), options)
18
18
  JSON.parse(response.body)
19
19
  end
20
20
 
21
+ def transfer_session(session_key, new_session_key, options={})
22
+ parameters =
23
+ {
24
+ 'NewSessionKey': new_session_key,
25
+ }
26
+ options.merge!(basic_auth: @auth, headers: @headers)
27
+ options.merge!(body: parameters)
28
+ self.class.post(base_api_endpoint("Web/Session/#{session_key}/Transfer"), options)
29
+ end
30
+
21
31
  def get_expiration(key, options={})
22
32
  options.merge!(basic_auth: @auth, headers: @headers)
23
33
  response = self.class.get(base_api_endpoint("Web/Session/#{key}/Expiration"), options)
@@ -77,6 +87,23 @@ module Session
77
87
  self.class.post(base_api_endpoint("/Web/Session/#{key}/Login/SendCredentials"), options)
78
88
  end
79
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
+
80
107
  def get_shipping_methods(key, options={})
81
108
  options.merge!(basic_auth: @auth, headers: @headers)
82
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.4
4
+ version: 0.7.9
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-07-21 00:00:00.000000000 Z
11
+ date: 2020-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -167,7 +167,7 @@ homepage: https://github.com/pgharts/tessitura
167
167
  licenses:
168
168
  - MIT
169
169
  metadata: {}
170
- post_install_message:
170
+ post_install_message:
171
171
  rdoc_options: []
172
172
  require_paths:
173
173
  - lib
@@ -182,8 +182,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  - !ruby/object:Gem::Version
183
183
  version: '0'
184
184
  requirements: []
185
- rubygems_version: 3.1.2
186
- signing_key:
185
+ rubygems_version: 3.0.3
186
+ signing_key:
187
187
  specification_version: 4
188
188
  summary: Rest API Endpoint for the Tessitura Rest API (v14+).
189
189
  test_files: []