tessitura_rest 0.9.1 → 1.0.0

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: 1b3d828c520826413664d4dd12ae907741ae5bac1adfa0fa486844fccad64693
4
- data.tar.gz: 027d5cd8f75619dda5543eed74eac8106610ccff9a4747209ec0a2692cc27a7a
3
+ metadata.gz: b1c0cb85f1eabd6b4fe356d497a173d7600f968c13008bf6cee84fa7eb12eff0
4
+ data.tar.gz: 782de30cd862804e7da8179e7c26852ee67eee9400a69a76a92bbce0984a8f4c
5
5
  SHA512:
6
- metadata.gz: 1575edd920bba88f9674b58bead5cbd2cde3cbb61fc2a2912929b574758fb8433a6f5d2b11ee8293e24207f0ae0565f725916bfdb6376d282f2b75e204d9a63b
7
- data.tar.gz: 6766aa8e6fbeb6fd7f3b3d657d8b990f88b90cc82a19db8c699df022b908ca9e727dc3eaeeef7f6e606799cad8e5c105587cc0b4f7a11934dbc84999fa01bf6a
6
+ metadata.gz: 938a9745855bf0cb45589fa64a712e5fedf1e1c7e713f559a99ac50344e984e3d9e8ea2b2dea981dba0ec266d08631a460d86dff54ec0e4095b4b159aefb636e
7
+ data.tar.gz: 6482c7ecb1ca489cd3aaa4df17758d299123de07eb54f23a04f5e1432d3a4128284cd77e11e26425c5a1ea78d287493ea3f8167698313e5825eddc543b00a952
@@ -6,9 +6,9 @@ module PriceTypes
6
6
  JSON.parse(response.body)
7
7
  end
8
8
 
9
- def get_price_type_details(id, mode_of_sale, options={})
9
+ def get_price_type_details(id, mode_of_sale, source, options={})
10
10
  options.merge!(basic_auth: @auth, headers: @headers)
11
- response = self.class.get(base_api_endpoint("TXN/PriceTypes/Details?performanceIds=#{id}&modeOfSaleId=#{mode_of_sale}"), options)
11
+ response = self.class.get(base_api_endpoint("TXN/PriceTypes/Details?performanceIds=#{id}&modeOfSaleId=#{mode_of_sale}&sourceId=#{source}"), options)
12
12
  JSON.parse(response.body)
13
13
  end
14
14
 
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = '0.9.1'.freeze
2
+ VERSION = '1.0.0'.freeze
3
3
  end
@@ -2,7 +2,7 @@ module Cart
2
2
 
3
3
  def get_cart(session_key, options={})
4
4
  options.merge!(basic_auth: @auth, headers: @headers)
5
- self.class.get(base_api_endpoint("Web/Cart/#{session_key}"), options)
5
+ self.class.get(base_api_endpoint("Web/Cart/#{session_key}?messageTypes=-11"), options)
6
6
  end
7
7
 
8
8
  def get_checkout_complete(session_key, options={})
@@ -14,12 +14,7 @@ module Cart
14
14
  options.merge!(basic_auth: @auth, headers: @headers)
15
15
  self.class.delete(base_api_endpoint("Web/Cart/#{session_key}"), options)
16
16
  end
17
-
18
- def web_cart_text(session_key, options={})
19
- options.merge!(basic_auth: @auth, headers: @headers)
20
- self.class.get(base_api_endpoint("Web/Cart/#{session_key}/Messages?messageTypes=#{ENV['WEB_CART_TEXT']}&savedCart=false"), options)
21
- end
22
-
17
+
23
18
  def order_confirm_text(session_key, options={})
24
19
  options.merge!(basic_auth: @auth, headers: @headers)
25
20
  self.class.get(base_api_endpoint("Web/Cart/#{session_key}?messageTypes=#{ENV['ORDER_CONFIRM_TEXT']}&savedCart=true"), options)
@@ -109,26 +104,9 @@ module Cart
109
104
  self.class.get(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
110
105
  end
111
106
 
112
- def update_properties(session_key, category=0, solicitor='webapi', channel=0, options={})
113
- options.merge!(basic_auth: @auth, headers: @headers)
114
- parameters =
115
- {
116
- "Solicitor": solicitor,
117
- "ChannelId": channel
118
- }
119
- parameters["CategoryId"] = category if category != 0
120
- options.merge!(:body => parameters)
121
- self.class.put(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
122
- end
123
-
124
- def update_source(session_key, source_no, solicitor='webapi', options={})
107
+ def update_properties(session_key, get_properties_response, options={})
125
108
  options.merge!(basic_auth: @auth, headers: @headers)
126
- parameters =
127
- {
128
- "Solicitor": solicitor,
129
- "SourceId": source_no
130
- }
131
- options.merge!(:body => parameters)
109
+ options.merge!(:body => get_properties_response)
132
110
  self.class.put(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
133
111
  end
134
112
 
@@ -310,7 +288,7 @@ module Cart
310
288
  "AuthorizationCode": order_authorization_code,
311
289
  }
312
290
  options.merge!(basic_auth: @auth, headers: @headers)
313
- options.merge!(:body => parameters)
291
+ options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
314
292
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Checkout"), options)
315
293
  end
316
294
 
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.9.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brittany Martin, Danielle Greaves, Craig Donavin, Patrick FitzGerald
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-26 00:00:00.000000000 Z
11
+ date: 2021-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  requirements: []
189
- rubygems_version: 3.2.15
189
+ rubygems_version: 3.2.16
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Rest API Endpoint for the Tessitura Rest API (v14+).