tessitura_rest 1.4.6 → 1.5.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: cfd03bad771ec24b1b7125005d0cba971a4ea1f3cd4cd92c08941f62ce25fbaa
4
- data.tar.gz: 654d72ed5d4ad89217334ed976448abc17132d3d6397ac6c5d94187f8b651489
3
+ metadata.gz: fccd55ec5ad82fbb2c6265ffe58f50f9b724b00abf82da753ad0b738645f5e40
4
+ data.tar.gz: b5f549a8e3b4c5a40bc0ecd3f07b2144e3b6da13777b0b7e178eef73b08ae5cf
5
5
  SHA512:
6
- metadata.gz: 262692f5654d1663c6de36f7eae45fe9cb6e05148bfc6e7632924e17c8d3a2919229e0df73661ee09be91e11b331535545a51e1a57a07d4c994b1a51da880e13
7
- data.tar.gz: 1544e459caa96ecbab467935c8a2acfb8b39b6642ceae657b7b8044357afa02ce7bc22d1ec41e3909b51a648c448eb9a7fe40d1208f2bb82fe3424187efb1d47
6
+ metadata.gz: 9fb08860ab04fb2605ef77db2da31c6f2d7dc56b04bd66f439a34d4d470f236542435b1e7a4c03325e82dd101428d94da9f7c3d4af77874747ed8011ff137198
7
+ data.tar.gz: 9f40edbbc7c96b8a423e7ee28224e084924f3f48d8591c42a208937621397b6a826731a4eccf5f563f46c2533a815205f00fe3b4d6a7c912cf977dbc81bc518e
@@ -39,7 +39,7 @@ module Addresses
39
39
  },
40
40
  }
41
41
  options.merge!(basic_auth: @auth, headers: @headers)
42
- options.merge!(:body => parameters)
42
+ options.merge!(:body => parameters.to_json)
43
43
  response = self.class.post(base_api_endpoint('CRM/Addresses'), options)
44
44
  JSON.parse(response.body)
45
45
  end
@@ -75,7 +75,7 @@ module Addresses
75
75
  },
76
76
  }
77
77
  options.merge!(basic_auth: @auth, headers: @headers)
78
- options.merge!(:body => parameters)
78
+ options.merge!(:body => parameters.to_json)
79
79
  response = self.class.put(base_api_endpoint("CRM/Addresses/#{id}"), options)
80
80
  JSON.parse(response.body)
81
81
  end
@@ -110,7 +110,7 @@ module Addresses
110
110
  },
111
111
  }
112
112
  options.merge!(basic_auth: @auth, headers: @headers)
113
- options.merge!(:body => parameters)
113
+ options.merge!(:body => parameters.to_json)
114
114
  self.class.put(base_api_endpoint("CRM/Addresses/#{id}"), options)
115
115
  end
116
116
 
@@ -12,7 +12,7 @@ module Attributes
12
12
  'UpdatedDateTime' => DateTime.now.to_s,
13
13
  }
14
14
  options.merge!(basic_auth: @auth, headers: @headers)
15
- options.merge!(:body => parameters)
15
+ options.merge!(:body => parameters.to_json)
16
16
  response = self.class.post(base_api_endpoint('CRM/Attributes'), options)
17
17
  JSON.parse(response.body)
18
18
  end
@@ -16,7 +16,7 @@ module Constituencies
16
16
  },
17
17
  }
18
18
  options.merge!(basic_auth: @auth, headers: @headers)
19
- options.merge!(:body => parameters)
19
+ options.merge!(:body => parameters.to_json)
20
20
  response = self.class.post(base_api_endpoint('CRM/Constituencies'), options)
21
21
  end
22
22
  end
@@ -56,7 +56,7 @@ module Constituents
56
56
  }
57
57
  parameters.delete(:PrimaryPhoneNumbers) unless phone.present?
58
58
  options.merge!(basic_auth: @auth, headers: @headers)
59
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
59
+ options.merge!(:body => parameters.to_json)
60
60
  self.class.post(base_api_endpoint('CRM/Constituents/Snapshot'), options)
61
61
  end
62
62
 
@@ -93,7 +93,7 @@ module Constituents
93
93
  parameters.delete(:Prefix) unless params[:prefix].present?
94
94
  parameters.delete(:Suffix) unless params[:suffix].present?
95
95
  options.merge!(basic_auth: @auth, headers: @headers)
96
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
96
+ options.merge!(:body => parameters.to_json)
97
97
  self.class.put(base_api_endpoint("CRM/Constituents/#{constituent_id}"), options)
98
98
  end
99
99
  end
@@ -132,7 +132,7 @@ module Constituents
132
132
  },
133
133
  }
134
134
  options.merge!(basic_auth: @auth, headers: @headers)
135
- options.merge!(:body => parameters)
135
+ options.merge!(:body => parameters.to_json)
136
136
  update << self.class.put(base_api_endpoint("CRM/Constituents/#{constituent}"), options)
137
137
  end
138
138
  update.last if update.present?
@@ -21,7 +21,7 @@ module Issues
21
21
  }
22
22
  parameters.delete(:Origin) unless origin_id.present?
23
23
  options.merge!(basic_auth: @auth, headers: @headers)
24
- options.merge!(:body => parameters)
24
+ options.merge!(:body => parameters.to_json)
25
25
  response = self.class.post(base_api_endpoint('CRM/Issues'), options)
26
26
  JSON.parse(response.body)
27
27
  end
@@ -19,7 +19,7 @@ module Phones
19
19
  },
20
20
  }
21
21
  options.merge!(basic_auth: @auth, headers: @headers)
22
- options.merge!(:body => parameters)
22
+ options.merge!(:body => parameters.to_json)
23
23
  response = self.class.post(base_api_endpoint('CRM/Phones'), options)
24
24
  JSON.parse(response.body)
25
25
  end
@@ -39,7 +39,7 @@ module Phones
39
39
  'UpdatedDateTime': current['UpdatedDateTime'],
40
40
  }
41
41
  options.merge!(basic_auth: @auth, headers: @headers)
42
- options.merge!(:body => parameters)
42
+ options.merge!(:body => parameters.to_json)
43
43
  self.class.put(base_api_endpoint("CRM/Phones/#{id}"), options)
44
44
  end
45
45
  end
@@ -23,7 +23,7 @@ module WebLogins
23
23
  'TemporaryIndicator': temporary,
24
24
  }
25
25
  options.merge!(basic_auth: @auth, headers: @headers)
26
- options.merge!(:body => parameters)
26
+ options.merge!(:body => parameters.to_json)
27
27
  self.class.post(base_api_endpoint('CRM/WebLogins'), options)
28
28
  end
29
29
  end
@@ -10,7 +10,7 @@ module Email
10
10
  'EmailProfileId': profile_id,
11
11
  }
12
12
  options.merge!(basic_auth: @auth, headers: @headers)
13
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
13
+ options.merge!(:body => parameters.to_json)
14
14
  post = self.class.post(base_api_endpoint("Emails/LoginCredentials/#{login_id.first['Id']}/Send"), options)
15
15
  post.success?
16
16
  end
@@ -23,7 +23,7 @@ module Email
23
23
  'EmailProfileId': profile_id,
24
24
  }
25
25
  options.merge!(basic_auth: @auth, headers: @headers)
26
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
26
+ options.merge!(:body => parameters.to_json)
27
27
  post = self.class.post(base_api_endpoint("Emails/OrderConfirmation/#{order_id}/Send"), options)
28
28
  post.success?
29
29
  end
@@ -6,7 +6,7 @@ module LocalProcedure
6
6
  'ParameterValues' => params,
7
7
  }
8
8
  options.merge!(basic_auth: @auth, headers: @headers)
9
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
9
+ options.merge!(:body => parameters.to_json)
10
10
  self.class.post(base_api_endpoint('Custom/Execute'), options)
11
11
  end
12
12
 
@@ -17,7 +17,7 @@ module LocalProcedure
17
17
  'ParameterValues' => parameter_values,
18
18
  }
19
19
  options.merge!(basic_auth: @auth, headers: @headers)
20
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
20
+ options.merge!(:body => parameters.to_json)
21
21
  self.class.post(base_api_endpoint('Custom/Execute/MultipleResultSets'), options)
22
22
  end
23
23
  end
@@ -8,7 +8,7 @@ module PaymentComponent
8
8
  'CardBrandsToInclude': card_brands,
9
9
  }
10
10
  options.merge!(basic_auth: @auth, headers: @headers)
11
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
11
+ options.merge!(:body => parameters.to_json)
12
12
  self.class.post(base_api_endpoint('PaymentGateway/PaymentComponent'), options)
13
13
  end
14
14
  end
@@ -1,5 +1,5 @@
1
1
  module PaymentGateway
2
- def authorize_payment(amount, store_card, payload, payment_id, return_url, constituent_id, shopper_ip, address, options = {})
2
+ def authorize_payment(amount, store_card, payload, payment_id, return_url, constituent_id, shopper_ip, address, delivery_date, options = {})
3
3
  parameters = {
4
4
  'Amount': amount,
5
5
  'StoreAccount': store_card,
@@ -19,9 +19,10 @@ module PaymentGateway
19
19
  'AddressId': address.id,
20
20
  'Country': address.country_iso2_code,
21
21
  },
22
+ 'DeliveryDate': delivery_date,
22
23
  }
23
24
  options.merge!(basic_auth: @auth, headers: @headers)
24
- options.merge!(:body => parameters)
25
+ options.merge!(:body => parameters.to_json)
25
26
  self.class.post(base_api_endpoint('PaymentGateway/Authorization/Authorize'), options)
26
27
  end
27
28
 
@@ -32,7 +33,7 @@ module PaymentGateway
32
33
  'StoreAccount': store_account,
33
34
  }
34
35
  options.merge!(basic_auth: @auth, headers: @headers)
35
- options.merge!(:body => parameters)
36
+ options.merge!(:body => parameters.to_json)
36
37
  self.class.post(base_api_endpoint('PaymentGateway/Authorization/Finalize'), options)
37
38
  end
38
39
 
@@ -44,7 +45,7 @@ module PaymentGateway
44
45
  'PaymentMethodId': 606,
45
46
  }
46
47
  options.merge!(basic_auth: @auth, headers: @headers)
47
- options.merge!(:body => parameters)
48
+ options.merge!(:body => parameters.to_json)
48
49
  self.class.post(base_api_endpoint("PaymentGateway/Authorization/#{reference_number}/Reverse"), options)
49
50
  end
50
51
  end
@@ -12,7 +12,7 @@ module Package
12
12
  'PerformanceEndDate': end_date,
13
13
  }
14
14
  options.merge!(basic_auth: @auth, headers: @headers)
15
- options.merge!(:body => parameters)
15
+ options.merge!(:body => parameters.to_json)
16
16
  response = self.class.post(base_api_endpoint('TXN/Packages/Search'), options)
17
17
  end
18
18
 
@@ -10,7 +10,7 @@ module Payments
10
10
  'Increment': 1,
11
11
  }
12
12
  options.merge!(basic_auth: @auth, headers: @headers)
13
- options.merge!(:body => parameters)
13
+ options.merge!(:body => parameters.to_json)
14
14
  self.class.post(base_api_endpoint('TXN/Payments/ReserveIds'), options)
15
15
  end
16
16
  end
@@ -7,7 +7,7 @@ module PerformanceExtension
7
7
  'ModeOfSaleId': mode_of_sale,
8
8
  }
9
9
  options.merge!(basic_auth: @auth, headers: @headers)
10
- options.merge!(:body => parameters)
10
+ options.merge!(:body => parameters.to_json)
11
11
  response = self.class.post(base_api_endpoint('TXN/Performances/Search'), options)
12
12
  end
13
13
 
@@ -12,7 +12,7 @@ module ProductionSeason
12
12
  'PerformanceEndDate': end_date,
13
13
  }
14
14
  options.merge!(basic_auth: @auth, headers: @headers)
15
- options.merge!(:body => parameters)
15
+ options.merge!(:body => parameters.to_json)
16
16
  response = self.class.post(base_api_endpoint('TXN/ProductionSeasons/Search'), options)
17
17
  end
18
18
  end
@@ -6,7 +6,7 @@ module TicketProtectionPerformances
6
6
  'PerformanceTypeIds': 27,
7
7
  }
8
8
  options.merge!(basic_auth: @auth, headers: @headers)
9
- options.merge!(:body => parameters)
9
+ options.merge!(:body => parameters.to_json)
10
10
  response = self.class.post(base_api_endpoint('TXN/Performances/Search'), options)
11
11
  JSON.parse(response.body)
12
12
  end
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = '1.4.6'.freeze
2
+ VERSION = '1.5.0'.freeze
3
3
  end
@@ -20,7 +20,7 @@ module Cart
20
20
  'ModeOfSaleId': code,
21
21
  }
22
22
  options.merge!(basic_auth: @auth, headers: @headers)
23
- options.merge!(:body => parameters)
23
+ options.merge!(:body => parameters.to_json)
24
24
  self.class.put(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
25
25
  end
26
26
 
@@ -33,7 +33,7 @@ module Cart
33
33
  'Name': name,
34
34
  }
35
35
  options.merge!(basic_auth: @auth, headers: @headers)
36
- options.merge!(:body => parameters)
36
+ options.merge!(:body => parameters.to_json)
37
37
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/GiftCertificates"), options)
38
38
  end
39
39
 
@@ -49,7 +49,7 @@ module Cart
49
49
  'GiftCertificateNumber': gift_certificate_number,
50
50
  }
51
51
  options.merge!(basic_auth: @auth, headers: @headers)
52
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
52
+ options.merge!(:body => parameters.to_json)
53
53
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Payments/GiftCertificate"), options)
54
54
  end
55
55
 
@@ -68,7 +68,7 @@ module Cart
68
68
  'MembershipLevelId': membership_level,
69
69
  }
70
70
  options.merge!(basic_auth: @auth, headers: @headers)
71
- options.merge!(:body => parameters)
71
+ options.merge!(:body => parameters.to_json)
72
72
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Contributions"), options)
73
73
  end
74
74
 
@@ -84,7 +84,7 @@ module Cart
84
84
  'PaymentMethodId': payment_method_id,
85
85
  }
86
86
  options.merge!(basic_auth: @auth, headers: @headers)
87
- options.merge!(:body => parameters)
87
+ options.merge!(:body => parameters.to_json)
88
88
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/OnAccount"), options)
89
89
  end
90
90
 
@@ -95,7 +95,7 @@ module Cart
95
95
  'PaymentMethodId': payment_method_id,
96
96
  }
97
97
  options.merge!(basic_auth: @auth, headers: @headers)
98
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
98
+ options.merge!(:body => parameters.to_json)
99
99
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Payments/OnAccount"), options)
100
100
  end
101
101
 
@@ -111,7 +111,7 @@ module Cart
111
111
 
112
112
  def update_properties(session_key, get_properties_response, options = {})
113
113
  options.merge!(basic_auth: @auth, headers: @headers)
114
- options.merge!(:body => get_properties_response)
114
+ options.merge!(:body => get_properties_response.to_json)
115
115
  self.class.put(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
116
116
  end
117
117
 
@@ -122,7 +122,7 @@ module Cart
122
122
  'Solicitor': solicitor,
123
123
  'Notes': notes,
124
124
  }
125
- options.merge!(:body => parameters)
125
+ options.merge!(:body => parameters.to_json)
126
126
  self.class.put(base_api_endpoint("Web/Cart/#{session_key}/Properties"), options)
127
127
  end
128
128
 
@@ -138,7 +138,7 @@ module Cart
138
138
  'RequestedSeats': requested_seats,
139
139
  }
140
140
  options.merge!(basic_auth: @auth, headers: @headers)
141
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
141
+ options.merge!(:body => parameters.to_json)
142
142
  self.class.post(base_api_endpoint("/Web/Cart/#{session_key}/Tickets"), options)
143
143
  end
144
144
 
@@ -149,7 +149,7 @@ module Cart
149
149
  'ReturnOrDonate': return_or_donate,
150
150
  }
151
151
  options.merge!(basic_auth: @auth, headers: @headers)
152
- options.merge!(:body => parameters)
152
+ options.merge!(:body => parameters.to_json)
153
153
  self.class.post(base_api_endpoint("/Web/Cart/#{session_key}/Tickets/Return"), options)
154
154
  end
155
155
 
@@ -166,7 +166,7 @@ module Cart
166
166
  'Unseated': unseated,
167
167
  }
168
168
  options.merge!(basic_auth: @auth, headers: @headers)
169
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
169
+ options.merge!(:body => parameters.to_json)
170
170
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Packages/Fixed"), options)
171
171
  end
172
172
 
@@ -189,7 +189,7 @@ module Cart
189
189
  'Unseated': unseated,
190
190
  }
191
191
  options.merge!(basic_auth: @auth, headers: @headers)
192
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
192
+ options.merge!(:body => parameters.to_json)
193
193
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Packages/Nfs"), options)
194
194
  end
195
195
 
@@ -212,7 +212,7 @@ module Cart
212
212
  'Unseated': unseated,
213
213
  }
214
214
  options.merge!(basic_auth: @auth, headers: @headers)
215
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
215
+ options.merge!(:body => parameters.to_json)
216
216
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Packages/Super"), options)
217
217
  end
218
218
 
@@ -231,7 +231,7 @@ module Cart
231
231
  'Mode': mode,
232
232
  }
233
233
  options.merge!(basic_auth: @auth, headers: @headers)
234
- options.merge!(:body => parameters)
234
+ options.merge!(:body => parameters.to_json)
235
235
  self.class.post(base_api_endpoint("/Web/Cart/#{session_key}/Print/TicketElements"), options)
236
236
  end
237
237
 
@@ -249,7 +249,7 @@ module Cart
249
249
  'Amount': amount,
250
250
  }
251
251
  options.merge!(basic_auth: @auth, headers: @headers)
252
- options.merge!(:body => parameters)
252
+ options.merge!(:body => parameters.to_json)
253
253
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Fees"), options)
254
254
  end
255
255
 
@@ -262,7 +262,7 @@ module Cart
262
262
  'ValidatePaymentPlan': plan,
263
263
  }
264
264
  options.merge!(basic_auth: @auth, headers: @headers)
265
- options.merge!(:body => parameters)
265
+ options.merge!(:body => parameters.to_json)
266
266
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Validate"), options)
267
267
  end
268
268
 
@@ -273,7 +273,7 @@ module Cart
273
273
  'Value': value,
274
274
  }
275
275
  options.merge!(basic_auth: @auth, headers: @headers)
276
- options.merge!(:body => parameters)
276
+ options.merge!(:body => parameters.to_json)
277
277
  put = self.class.put(base_api_endpoint("Web/Cart/#{session_key}/CustomData/#{index}"), options)
278
278
  put.success?
279
279
  end
@@ -293,7 +293,7 @@ module Cart
293
293
  'AuthorizationCode': order_authorization_code,
294
294
  }
295
295
  options.merge!(basic_auth: @auth, headers: @headers)
296
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
296
+ options.merge!(:body => parameters.to_json)
297
297
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Checkout"), options)
298
298
  end
299
299
 
@@ -309,7 +309,7 @@ module Cart
309
309
  'PaymentReference': payment_reference
310
310
  }
311
311
  options.merge!(basic_auth: @auth, headers: @headers)
312
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
312
+ options.merge!(:body => parameters.to_json)
313
313
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Checkout"), options)
314
314
  end
315
315
 
@@ -330,7 +330,7 @@ module Cart
330
330
  'ZipCode': zip_code,
331
331
  }
332
332
  options.merge!(basic_auth: @auth, headers: @headers)
333
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
333
+ options.merge!(:body => parameters.to_json)
334
334
  self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Checkout"), options)
335
335
  end
336
336
  end
@@ -15,7 +15,7 @@ module Login
15
15
  'PersistSessionOnFailure': true,
16
16
  }
17
17
  options.merge!(basic_auth: @auth, headers: @headers)
18
- options.merge!(:body => parameters)
18
+ options.merge!(:body => parameters.to_json)
19
19
  post = self.class.post(base_api_endpoint("Web/Session/#{session_key}/Login"), options)
20
20
  post['IsLoggedIn']
21
21
  end
@@ -28,7 +28,7 @@ module Login
28
28
  'PromotionCode': promotion,
29
29
  }
30
30
  options.merge!(basic_auth: @auth, headers: @headers)
31
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
31
+ options.merge!(:body => parameters.to_json)
32
32
  post = self.class.post(base_api_endpoint("Web/Session/#{session_key}/Login/External"), options)
33
33
  post.success?
34
34
  end
@@ -42,7 +42,7 @@ module Login
42
42
  'PromotionCode': promotion,
43
43
  }
44
44
  options.merge!(basic_auth: @auth, headers: @headers)
45
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
45
+ options.merge!(:body => parameters.to_json)
46
46
  post = self.class.post(base_api_endpoint("Web/Session/#{session_key}/Login/Token"), options)
47
47
  post['IsLoggedIn']
48
48
  end
@@ -56,14 +56,14 @@ module Login
56
56
  'LoginTypeId': 1,
57
57
  }
58
58
  options.merge!(basic_auth: @auth, headers: @headers)
59
- options.merge!(body: parameters)
59
+ options.merge!(body: parameters.to_json)
60
60
  response = self.class.post(base_api_endpoint("Web/Session/#{key}/LoginAsGuest"), options)
61
61
  JSON.parse(response.body)
62
62
  end
63
63
 
64
64
  def logout(session_key, options = {})
65
65
  options.merge!(basic_auth: @auth, headers: @headers)
66
- options.merge!(:body => {}, :headers => { 'Content-Type' => 'application/json' })
66
+ options.merge!(:body => {})
67
67
  self.class.post(base_api_endpoint("/Web/Session/#{session_key}/Logout"), options)
68
68
  end
69
69
  end
@@ -14,7 +14,7 @@ module PaymentPlanExtension
14
14
  },
15
15
  }
16
16
  options.merge!(basic_auth: @auth, headers: @headers)
17
- options.merge!(:body => parameters)
17
+ options.merge!(:body => parameters.to_json)
18
18
  response = self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Payments/Plan/Schedule"), options)
19
19
  JSON.parse(response.body)
20
20
  end
@@ -29,7 +29,7 @@ module PaymentPlanExtension
29
29
  'AccountId': account_id,
30
30
  }
31
31
  options.merge!(basic_auth: @auth, headers: @headers)
32
- options.merge!(:body => parameters)
32
+ options.merge!(:body => parameters.to_json)
33
33
  response = self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Payments/Plan/Schedule"), options)
34
34
  JSON.parse(response.body)
35
35
  end
@@ -42,7 +42,7 @@ module PaymentPlanExtension
42
42
  'EndDate': end_date,
43
43
  }
44
44
  options.merge!(basic_auth: @auth, headers: @headers)
45
- options.merge!(:body => parameters)
45
+ options.merge!(:body => parameters.to_json)
46
46
  response = self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Payments/Plan/Schedule/Preview"), options)
47
47
  JSON.parse(response.body)
48
48
  end
@@ -53,7 +53,7 @@ module PaymentPlanExtension
53
53
  'ValidatePaymentPlan': true,
54
54
  }
55
55
  options.merge!(basic_auth: @auth, headers: @headers)
56
- options.merge!(:body => parameters)
56
+ options.merge!(:body => parameters.to_json)
57
57
  response = self.class.post(base_api_endpoint("Web/Cart/#{session_key}/Validate"), options)
58
58
  JSON.parse(response.body)
59
59
  end
@@ -65,7 +65,7 @@ module PaymentPlanExtension
65
65
  'BillingTypeId': billing_type_id,
66
66
  }
67
67
  options.merge!(basic_auth: @auth, headers: @headers)
68
- options.merge!(:body => parameters)
68
+ options.merge!(:body => parameters.to_json)
69
69
  self.class.put(base_api_endpoint("Web/Cart/#{session_key}/Payments/Plan"), options)
70
70
  end
71
71
 
@@ -34,7 +34,7 @@ module Registration
34
34
  ],
35
35
  }
36
36
  options.merge!(basic_auth: @auth, headers: @headers)
37
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
37
+ options.merge!(:body => parameters.to_json)
38
38
  self.class.post(base_api_endpoint("Web/Registration/#{session_key}/Register"), options)
39
39
  end
40
40
  end
@@ -12,7 +12,7 @@ module Session
12
12
  'Organization': 'Tessitura Web',
13
13
  }
14
14
  options.merge!(basic_auth: @auth, headers: @headers)
15
- options.merge!(body: parameters)
15
+ options.merge!(body: parameters.to_json)
16
16
  response = self.class.post(base_api_endpoint('Web/Session'), options)
17
17
  JSON.parse(response.body)
18
18
  end
@@ -29,7 +29,7 @@ module Session
29
29
  'NewSessionKey': new_session_key,
30
30
  }
31
31
  options.merge!(basic_auth: @auth, headers: @headers)
32
- options.merge!(body: parameters)
32
+ options.merge!(body: parameters.to_json)
33
33
  self.class.post(base_api_endpoint("Web/Session/#{session_key}/Transfer"), options)
34
34
  end
35
35
 
@@ -46,7 +46,7 @@ module Session
46
46
  'TimeOffset': timeoffset,
47
47
  }
48
48
  options.merge!(basic_auth: @auth, headers: @headers)
49
- options.merge!(:body => parameters)
49
+ options.merge!(:body => parameters.to_json)
50
50
  response = self.class.put(base_api_endpoint("Web/Session/#{key}/Expiration"), options)
51
51
  JSON.parse(response.body)
52
52
  end
@@ -63,7 +63,7 @@ module Session
63
63
  'PromoCodeString': code_string,
64
64
  }
65
65
  options.merge!(basic_auth: @auth, headers: @headers)
66
- options.merge!(:body => parameters)
66
+ options.merge!(:body => parameters.to_json)
67
67
  response = self.class.post(base_api_endpoint("Web/Session/#{key}/PromoCode"), options)
68
68
  JSON.parse(response.body)
69
69
  end
@@ -82,7 +82,7 @@ module Session
82
82
  'EmailAddress': email,
83
83
  }
84
84
  options.merge!(basic_auth: @auth, headers: @headers)
85
- options.merge!(:body => parameters)
85
+ options.merge!(:body => parameters.to_json)
86
86
  self.class.post(base_api_endpoint("/Web/Session/#{key}/Login/SendCredentials"), options)
87
87
  end
88
88
 
@@ -99,7 +99,7 @@ module Session
99
99
  'PromotionCode': 0,
100
100
  }
101
101
  options.merge!(basic_auth: @auth, headers: @headers)
102
- options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' })
102
+ options.merge!(:body => parameters.to_json)
103
103
  self.class.put(base_api_endpoint("Web/Session/#{key}/WebLogins"), options)
104
104
  end
105
105
 
@@ -48,7 +48,7 @@ class TessituraRest
48
48
  def initialize(_options = {})
49
49
  @auth = { username: ENV.fetch('TESSITURA_USERNAME'),
50
50
  password: ENV.fetch('TESSITURA_PASSWORD') }
51
- @headers = { 'Accept': 'application/json' }
51
+ @headers = { 'Accept': 'application/json', 'Content-Type': 'application/json' }
52
52
  end
53
53
 
54
54
  def base_api_endpoint(end_point)
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: 1.4.6
4
+ version: 1.5.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: 2024-02-22 00:00:00.000000000 Z
11
+ date: 2024-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler