tessitura_rest 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -1
- data/.rubocop.yml +23 -7
- data/.travis.yml +1 -1
- data/lib/tessitura_rest/crm/accounts.rb +4 -3
- data/lib/tessitura_rest/crm/actions.rb +16 -18
- data/lib/tessitura_rest/crm/addresses.rb +79 -80
- data/lib/tessitura_rest/crm/attributes.rb +9 -10
- data/lib/tessitura_rest/crm/constituencies.rb +8 -9
- data/lib/tessitura_rest/crm/constituents.rb +72 -75
- data/lib/tessitura_rest/crm/issues.rb +21 -23
- data/lib/tessitura_rest/crm/phones.rb +12 -13
- data/lib/tessitura_rest/crm/web_logins.rb +2 -4
- data/lib/tessitura_rest/custom/email.rb +15 -15
- data/lib/tessitura_rest/custom/local_procedure.rb +2 -2
- data/lib/tessitura_rest/diagnostics/diagnostics.rb +2 -2
- data/lib/tessitura_rest/finance/appeals.rb +1 -2
- data/lib/tessitura_rest/finance/gift_certificates.rb +1 -2
- data/lib/tessitura_rest/reference_data/countries.rb +2 -3
- data/lib/tessitura_rest/reference_data/sections.rb +1 -2
- data/lib/tessitura_rest/reference_data/states.rb +2 -3
- data/lib/tessitura_rest/security/security_user_groups.rb +2 -3
- data/lib/tessitura_rest/txn/orders.rb +8 -11
- data/lib/tessitura_rest/txn/package.rb +11 -11
- data/lib/tessitura_rest/txn/payments.rb +1 -1
- data/lib/tessitura_rest/txn/performance_extension.rb +15 -14
- data/lib/tessitura_rest/txn/performance_package_mode_of_sales.rb +2 -4
- data/lib/tessitura_rest/txn/price_types.rb +2 -4
- data/lib/tessitura_rest/txn/product_keywords.rb +1 -3
- data/lib/tessitura_rest/txn/production_extension.rb +2 -3
- data/lib/tessitura_rest/txn/production_season.rb +3 -5
- data/lib/tessitura_rest/txn/sub_line_items.rb +4 -4
- data/lib/tessitura_rest/txn/web_contents.rb +1 -3
- data/lib/tessitura_rest/version.rb +1 -1
- data/lib/tessitura_rest/web/cart.rb +141 -143
- data/lib/tessitura_rest/web/login.rb +26 -13
- data/lib/tessitura_rest/web/payment_plan_extension.rb +18 -19
- data/lib/tessitura_rest/web/registration.rb +34 -36
- data/lib/tessitura_rest/web/session.rb +37 -38
- data/lib/tessitura_rest.rb +1 -2
- data/tessitura_rest.gemspec +17 -15
- metadata +19 -19
@@ -1,42 +1,40 @@
|
|
1
1
|
module Issues
|
2
|
-
|
3
|
-
def get_issue(id, options={})
|
2
|
+
def get_issue(id, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("CRM/Issues/#{id}"), options)
|
6
5
|
JSON.parse(response.body)
|
7
6
|
end
|
8
7
|
|
9
|
-
def get_issues(constituent_id, start_date = Date.today, end_date = Date.today + 365, resolved = false, options={})
|
8
|
+
def get_issues(constituent_id, start_date = Date.today, end_date = Date.today + 365, resolved = false, options = {})
|
10
9
|
options.merge!(basic_auth: @auth, headers: @headers)
|
11
10
|
response = self.class.get(base_api_endpoint("CRM/Issues?constituentId=#{constituent_id}"), options)
|
12
11
|
JSON.parse(response.body)
|
13
12
|
end
|
14
13
|
|
15
|
-
def create_issue(activity_type, category_id, constituent_id, contact_type, notes, origin_id, options={})
|
14
|
+
def create_issue(activity_type, category_id, constituent_id, contact_type, notes, origin_id, options = {})
|
16
15
|
parameters =
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
16
|
+
{
|
17
|
+
'ActivityType': {
|
18
|
+
'Id': activity_type,
|
19
|
+
'Category': {
|
20
|
+
'Id': category_id,
|
21
|
+
},
|
22
|
+
},
|
23
|
+
'ContactType': {
|
24
|
+
'Id': contact_type,
|
25
|
+
},
|
26
|
+
'Constituent': {
|
27
|
+
'Id': constituent_id,
|
28
|
+
},
|
29
|
+
'Origin': {
|
30
|
+
'Id': origin_id,
|
31
|
+
},
|
32
|
+
'Notes': notes,
|
33
|
+
}
|
35
34
|
parameters.delete(:Origin) unless origin_id.present?
|
36
35
|
options.merge!(basic_auth: @auth, headers: @headers)
|
37
36
|
options.merge!(:body => parameters)
|
38
37
|
response = self.class.post(base_api_endpoint('CRM/Issues'), options)
|
39
38
|
JSON.parse(response.body)
|
40
39
|
end
|
41
|
-
|
42
40
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
module Phones
|
2
|
-
|
3
|
-
def get_phone(id, options={})
|
2
|
+
def get_phone(id, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("CRM/Phones/#{id}"), options)
|
6
5
|
JSON.parse(response.body)
|
@@ -29,21 +28,21 @@ module Phones
|
|
29
28
|
current = get_phone(id)
|
30
29
|
parameters =
|
31
30
|
{
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
'Address': {
|
32
|
+
'Id': current['Address']['Id'],
|
33
|
+
'AddressType': {
|
34
|
+
'Id': current['Address']['AddressType']['Id'],
|
36
35
|
},
|
37
36
|
},
|
38
|
-
|
39
|
-
|
37
|
+
'Constituent': {
|
38
|
+
'Id': current['Constituent']['Id'],
|
40
39
|
},
|
41
|
-
|
42
|
-
|
40
|
+
'PhoneType': {
|
41
|
+
'Id': current['PhoneType']['Id'],
|
43
42
|
},
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
'Id': current['Id'],
|
44
|
+
'PhoneNumber': phone,
|
45
|
+
'UpdatedDateTime': current['UpdatedDateTime'],
|
47
46
|
}
|
48
47
|
options.merge!(basic_auth: @auth, headers: @headers)
|
49
48
|
options.merge!(:body => parameters)
|
@@ -1,12 +1,11 @@
|
|
1
1
|
module WebLogins
|
2
|
-
|
3
|
-
def get_web_login(email, login_type, options={})
|
2
|
+
def get_web_login(email, login_type, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("CRM/WebLogins/Search?emailAddress=#{email}&loginTypeId=#{login_type}"), options)
|
6
5
|
JSON.parse(response.body)
|
7
6
|
end
|
8
7
|
|
9
|
-
def create_web_login(constituent, email_id, email, login_type, primary, temporary, options={})
|
8
|
+
def create_web_login(constituent, email_id, email, login_type, primary, temporary, options = {})
|
10
9
|
parameters = {
|
11
10
|
'Constituent': {
|
12
11
|
'Id': constituent,
|
@@ -27,5 +26,4 @@ module WebLogins
|
|
27
26
|
options.merge!(:body => parameters)
|
28
27
|
self.class.post(base_api_endpoint('CRM/WebLogins'), options)
|
29
28
|
end
|
30
|
-
|
31
29
|
end
|
@@ -1,29 +1,29 @@
|
|
1
1
|
module Email
|
2
|
-
|
3
|
-
def send_login_credentials(template_id, email, profile_id, params = '', options={})
|
2
|
+
def send_login_credentials(template_id, email, profile_id, params = '', options = {})
|
4
3
|
login_id = get_web_login(email, 1)
|
5
4
|
return false if login_id.empty?
|
5
|
+
|
6
6
|
parameters =
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
{
|
8
|
+
'TemplateId': template_id,
|
9
|
+
'EmailAddress': email,
|
10
|
+
'EmailProfileId': profile_id,
|
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, :headers => { 'Content-Type' => 'application/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
|
17
17
|
|
18
|
-
def send_order_confirmation(template_id, email, profile_id, order_id, params = '', options={})
|
18
|
+
def send_order_confirmation(template_id, email, profile_id, order_id, params = '', options = {})
|
19
19
|
parameters =
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
{
|
21
|
+
'TemplateId': template_id,
|
22
|
+
'EmailAddress': email,
|
23
|
+
'EmailProfileId': profile_id,
|
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, :headers => { 'Content-Type' => 'application/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, :headers => { 'Content-Type' => 'application/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, :headers => { 'Content-Type' => 'application/json' })
|
21
21
|
self.class.post(base_api_endpoint('Custom/Execute/MultipleResultSets'), options)
|
22
22
|
end
|
23
23
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module Diagnostics
|
2
|
-
def diagnostics_status(options={})
|
2
|
+
def diagnostics_status(options = {})
|
3
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
4
4
|
self.class.get(base_api_endpoint('Diagnostics/Status'), options)
|
5
5
|
end
|
6
6
|
|
7
|
-
def seat_server_status(options={})
|
7
|
+
def seat_server_status(options = {})
|
8
8
|
options.merge!(basic_auth: @auth, headers: @headers)
|
9
9
|
self.class.get(base_api_endpoint('Diagnostics/SeatServerStatus'), options)
|
10
10
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
module GiftCertificates
|
2
|
-
|
3
|
-
def get_gift_certificate_info (gift_certificate_number, options={})
|
2
|
+
def get_gift_certificate_info(gift_certificate_number, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("Finance/GiftCertificates/#{gift_certificate_number}"), options)
|
6
5
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Countries
|
2
|
-
|
3
|
-
def get_all_countries (options={})
|
2
|
+
def get_all_countries(options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
|
-
response = self.class.get(base_api_endpoint(
|
4
|
+
response = self.class.get(base_api_endpoint('ReferenceData/Countries'), options)
|
6
5
|
end
|
7
6
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module States
|
2
|
-
|
3
|
-
def get_all_states (options={})
|
2
|
+
def get_all_states(options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
|
-
response = self.class.get(base_api_endpoint(
|
4
|
+
response = self.class.get(base_api_endpoint('ReferenceData/States'), options)
|
6
5
|
end
|
7
6
|
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
module SecurityUserGroups
|
2
|
-
|
3
|
-
def security_user_groups(login, options={})
|
2
|
+
def security_user_groups(login, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("Security/UserGroups/Default?userName=#{login}"), options)
|
6
|
-
JSON.parse(response.body)[
|
5
|
+
JSON.parse(response.body)['UserGroup']
|
7
6
|
end
|
8
7
|
end
|
@@ -1,21 +1,18 @@
|
|
1
1
|
module Orders
|
2
|
-
|
3
|
-
def get_products_view(id, options={})
|
2
|
+
def get_products_view(id, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("TXN/Orders/#{id}/ProductsView"), options)
|
6
5
|
JSON.parse(response.body)
|
7
6
|
end
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
def print_order_ticket_elements(order_id, ticket_design, reprint, new_ticket_no=false, options={})
|
8
|
+
def print_order_ticket_elements(order_id, ticket_design, reprint, new_ticket_no = false, options = {})
|
12
9
|
parameters =
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
10
|
+
{
|
11
|
+
'IncludeReceipts': false,
|
12
|
+
'ReprintTickets': reprint,
|
13
|
+
'TicketDesignId': ticket_design,
|
14
|
+
'NewTicketNoForReprints': new_ticket_no,
|
15
|
+
}
|
19
16
|
options.merge!(basic_auth: @auth, headers: @headers)
|
20
17
|
options.merge!(:body => parameters)
|
21
18
|
self.class.post(base_api_endpoint("/TXN/Orders/#{order_id}/PrintTicketElements"), options)
|
@@ -1,48 +1,48 @@
|
|
1
1
|
module Package
|
2
|
-
|
3
|
-
def get_package_by_id(id, options={})
|
2
|
+
def get_package_by_id(id, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("TXN/Packages/#{id}"), options)
|
6
5
|
JSON.parse(response.body)
|
7
6
|
end
|
8
7
|
|
9
|
-
def packages_by_performance_date(start_date=nil, end_date=nil, options={})
|
8
|
+
def packages_by_performance_date(start_date = nil, end_date = nil, options = {})
|
10
9
|
parameters =
|
11
10
|
{
|
12
11
|
'PerformanceStartDate': start_date,
|
13
|
-
'PerformanceEndDate': end_date
|
12
|
+
'PerformanceEndDate': end_date,
|
14
13
|
}
|
15
14
|
options.merge!(basic_auth: @auth, headers: @headers)
|
16
15
|
options.merge!(:body => parameters)
|
17
16
|
response = self.class.post(base_api_endpoint('TXN/Packages/Search'), options)
|
18
|
-
|
19
17
|
end
|
20
18
|
|
21
|
-
def get_package_detail(id, mode_of_sale, options={})
|
19
|
+
def get_package_detail(id, mode_of_sale, options = {})
|
22
20
|
options.merge!(basic_auth: @auth, headers: @headers)
|
23
21
|
response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/Details?modeOfSaleId=#{mode_of_sale}"), options)
|
24
22
|
JSON.parse(response.body)
|
25
23
|
end
|
26
24
|
|
27
|
-
def get_package_prices(id, mode_of_sale, source_id, options={})
|
25
|
+
def get_package_prices(id, mode_of_sale, source_id, options = {})
|
28
26
|
options.merge!(basic_auth: @auth, headers: @headers)
|
29
27
|
response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/Prices?modeOfSaleId=#{mode_of_sale}&sourceId=#{source_id}"), options)
|
30
28
|
JSON.parse(response.body)
|
31
29
|
end
|
32
30
|
|
33
|
-
def get_package_performance_groups(id, mode_of_sale=nil, options={})
|
31
|
+
def get_package_performance_groups(id, mode_of_sale = nil, options = {})
|
34
32
|
options.merge!(basic_auth: @auth, headers: @headers)
|
35
33
|
response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/PerformanceGroups?modeOfSaleId=#{mode_of_sale}"), options)
|
36
34
|
JSON.parse(response.body)
|
37
35
|
end
|
38
36
|
|
39
|
-
def get_package_seat_summaries(id, mode_of_sale, constituent_id, price_type_ids, options={})
|
37
|
+
def get_package_seat_summaries(id, mode_of_sale, constituent_id, price_type_ids, options = {})
|
40
38
|
options.merge!(basic_auth: @auth, headers: @headers)
|
41
|
-
response = self.class.get(
|
39
|
+
response = self.class.get(
|
40
|
+
base_api_endpoint("TXN/Packages/#{id}/Seats/Summary?modeOfSaleId=#{mode_of_sale}&constituentId=#{constituent_id}&checkPriceTypeIds=#{price_type_ids}"), options
|
41
|
+
)
|
42
42
|
JSON.parse(response.body)
|
43
43
|
end
|
44
44
|
|
45
|
-
def get_package_seats(id, mode_of_sale, constituent_id, section_id, options={})
|
45
|
+
def get_package_seats(id, mode_of_sale, constituent_id, section_id, options = {})
|
46
46
|
options.merge!(basic_auth: @auth, headers: @headers)
|
47
47
|
response = self.class.get(base_api_endpoint("TXN/Packages/#{id}/Seats?modeOfSaleId=#{mode_of_sale}&constituentId=#{constituent_id}§ionIds=#{section_id}"), options)
|
48
48
|
JSON.parse(response.body)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Payments
|
2
|
-
def get_on_account_balance(current_user, payment_method_id, options={})
|
2
|
+
def get_on_account_balance(current_user, payment_method_id, options = {})
|
3
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
4
4
|
response = self.class.get(base_api_endpoint("TXN/Payments/OnAccount?constituentId=#{current_user}&paymentMethodId=#{payment_method_id}"), options)
|
5
5
|
JSON.parse(response.body)
|
@@ -1,58 +1,59 @@
|
|
1
1
|
module PerformanceExtension
|
2
|
-
|
3
|
-
def get_performances_by_production(ids, mode_of_sale=nil, options={})
|
2
|
+
def get_performances_by_production(ids, mode_of_sale = nil, options = {})
|
4
3
|
parameters =
|
5
4
|
{
|
6
5
|
'ProductionSeasonIds': ids,
|
7
6
|
'BusinessUnitId': 1,
|
8
|
-
'ModeOfSaleId': mode_of_sale
|
7
|
+
'ModeOfSaleId': mode_of_sale,
|
9
8
|
}
|
10
9
|
options.merge!(basic_auth: @auth, headers: @headers)
|
11
10
|
options.merge!(:body => parameters)
|
12
11
|
response = self.class.post(base_api_endpoint('TXN/Performances/Search'), options)
|
13
12
|
end
|
14
13
|
|
15
|
-
def get_performance_summaries(production_season_id, performance_ids=nil, season_ids=nil, options={})
|
14
|
+
def get_performance_summaries(production_season_id, performance_ids = nil, season_ids = nil, options = {})
|
16
15
|
options.merge!(basic_auth: @auth, headers: @headers)
|
17
|
-
response = self.class.get(base_api_endpoint("/TXN/Performances/Summary?performanceIds=#{performance_ids}&seasonIds=#{season_ids}&productionSeasonId=#{production_season_id}"),
|
16
|
+
response = self.class.get(base_api_endpoint("/TXN/Performances/Summary?performanceIds=#{performance_ids}&seasonIds=#{season_ids}&productionSeasonId=#{production_season_id}"),
|
17
|
+
options)
|
18
18
|
JSON.parse(response.body)
|
19
19
|
end
|
20
20
|
|
21
|
-
def get_performance_detail(id, options={})
|
21
|
+
def get_performance_detail(id, options = {})
|
22
22
|
options.merge!(basic_auth: @auth, headers: @headers)
|
23
23
|
response = self.class.get(base_api_endpoint("TXN/Performances?performanceIds=#{id}"), options)
|
24
24
|
JSON.parse(response.body)
|
25
25
|
end
|
26
26
|
|
27
|
-
def get_performance_availability(ids, sections_ids=nil, options={})
|
27
|
+
def get_performance_availability(ids, sections_ids = nil, options = {})
|
28
28
|
options.merge!(basic_auth: @auth, headers: @headers)
|
29
29
|
response = self.class.get(base_api_endpoint("TXN/Performances/Zones?performanceIds=#{ids}§ionIds=#{sections_ids}"), options)
|
30
30
|
JSON.parse(response.body)
|
31
31
|
end
|
32
32
|
|
33
|
-
def get_performance_zone_availability(ids, mode_of_sale, constituent_id, options={})
|
33
|
+
def get_performance_zone_availability(ids, mode_of_sale, constituent_id, options = {})
|
34
34
|
options.merge!(basic_auth: @auth, headers: @headers)
|
35
35
|
response = self.class.get(base_api_endpoint("TXN/Performances/ZoneAvailabilities?performanceIds=#{ids}&modeOfSaleId=#{mode_of_sale}&constituentId=#{constituent_id}"), options)
|
36
36
|
JSON.parse(response.body)
|
37
37
|
end
|
38
38
|
|
39
|
-
def get_performance_seats(id, mode_of_sale, constituent_id, section_id, options={})
|
39
|
+
def get_performance_seats(id, mode_of_sale, constituent_id, section_id, options = {})
|
40
40
|
options.merge!(basic_auth: @auth, headers: @headers)
|
41
41
|
response = self.class.get(base_api_endpoint("TXN/Performances/#{id}/Seats?modeOfSaleId=#{mode_of_sale}&constituentId=#{constituent_id}§ionIds=#{section_id}"), options)
|
42
42
|
JSON.parse(response.body)
|
43
43
|
end
|
44
44
|
|
45
|
-
def get_performance_seat_summaries(id, mode_of_sale, constituent_id, price_type_ids, options={})
|
45
|
+
def get_performance_seat_summaries(id, mode_of_sale, constituent_id, price_type_ids, options = {})
|
46
46
|
options.merge!(basic_auth: @auth, headers: @headers)
|
47
|
-
response = self.class.get(
|
47
|
+
response = self.class.get(
|
48
|
+
base_api_endpoint("TXN/Performances/#{id}/Seats/Summary?modeOfSaleId=#{mode_of_sale}&constituentId=#{constituent_id}&checkPriceTypeIds=#{price_type_ids}"), options
|
49
|
+
)
|
48
50
|
JSON.parse(response.body)
|
49
51
|
end
|
50
52
|
|
51
|
-
def get_performance_prices(id, mos, source, options={})
|
53
|
+
def get_performance_prices(id, mos, source, options = {})
|
52
54
|
options.merge!(basic_auth: @auth, headers: @headers)
|
53
|
-
options.merge!(:headers => {'Content-Type' => 'application/json'})
|
55
|
+
options.merge!(:headers => { 'Content-Type' => 'application/json' })
|
54
56
|
response = self.class.get(base_api_endpoint("TXN/Performances/Prices?performanceIds=#{id}&modeOfSaleId=#{mos}&sourceId=#{source}"), options)
|
55
57
|
JSON.parse(response.body)
|
56
58
|
end
|
57
|
-
|
58
59
|
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
module PerformancePackageModeOfSales
|
2
|
-
|
3
|
-
def performance_package_mode_of_sales(mode_of_sale, ids, options={})
|
2
|
+
def performance_package_mode_of_sales(mode_of_sale, ids, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
self.class.get(base_api_endpoint("TXN/PerformancePackageModeOfSales?modeOfSaleId=#{mode_of_sale}&performanceIds=#{ids}"), options)
|
6
5
|
end
|
7
|
-
|
8
|
-
end
|
6
|
+
end
|
@@ -1,15 +1,13 @@
|
|
1
1
|
module PriceTypes
|
2
|
-
|
3
|
-
def get_price_type(id, options={})
|
2
|
+
def get_price_type(id, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("TXN/PriceTypes/#{id}"), options)
|
6
5
|
JSON.parse(response.body)
|
7
6
|
end
|
8
7
|
|
9
|
-
def get_price_type_details(id, mode_of_sale, source, options={})
|
8
|
+
def get_price_type_details(id, mode_of_sale, source, options = {})
|
10
9
|
options.merge!(basic_auth: @auth, headers: @headers)
|
11
10
|
response = self.class.get(base_api_endpoint("TXN/PriceTypes/Details?performanceIds=#{id}&modeOfSaleId=#{mode_of_sale}&sourceId=#{source}"), options)
|
12
11
|
JSON.parse(response.body)
|
13
12
|
end
|
14
|
-
|
15
13
|
end
|
@@ -1,9 +1,7 @@
|
|
1
1
|
module ProductKeywords
|
2
|
-
|
3
|
-
def get_keywords(ids, options={})
|
2
|
+
def get_keywords(ids, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("TXN/ProductKeywords?productionElementIds=#{ids}"), options)
|
6
5
|
JSON.parse(response.body)
|
7
6
|
end
|
8
|
-
|
9
7
|
end
|
@@ -1,12 +1,11 @@
|
|
1
1
|
module ProductionExtension
|
2
|
-
|
3
|
-
def get_production(id, options={})
|
2
|
+
def get_production(id, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("TXN/Productions/#{id}"), options)
|
6
5
|
JSON.parse(response.body)
|
7
6
|
end
|
8
7
|
|
9
|
-
def get_production_details(id, options={})
|
8
|
+
def get_production_details(id, options = {})
|
10
9
|
options.merge!(basic_auth: @auth, headers: @headers)
|
11
10
|
response = self.class.get(base_api_endpoint("TXN/Productions/#{id}"), options)
|
12
11
|
JSON.parse(response.body)
|
@@ -1,20 +1,18 @@
|
|
1
1
|
module ProductionSeason
|
2
|
-
|
3
|
-
def get_production_season(id, options={})
|
2
|
+
def get_production_season(id, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("TXN/ProductionSeasons/#{id}"), options)
|
6
5
|
JSON.parse(response.body)
|
7
6
|
end
|
8
7
|
|
9
|
-
def productions_by_performance_date(start_date=nil, end_date=nil, options={})
|
8
|
+
def productions_by_performance_date(start_date = nil, end_date = nil, options = {})
|
10
9
|
parameters =
|
11
10
|
{
|
12
11
|
'PerformanceStartDate': start_date,
|
13
|
-
'PerformanceEndDate': end_date
|
12
|
+
'PerformanceEndDate': end_date,
|
14
13
|
}
|
15
14
|
options.merge!(basic_auth: @auth, headers: @headers)
|
16
15
|
options.merge!(:body => parameters)
|
17
16
|
response = self.class.post(base_api_endpoint('TXN/ProductionSeasons/Search'), options)
|
18
17
|
end
|
19
|
-
|
20
18
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module SubLineItems
|
2
|
-
|
3
|
-
def get_return_tickets(constituent_id, status_id, performance_start_date, performance_end_date, order_id, options={})
|
2
|
+
def get_return_tickets(constituent_id, status_id, performance_start_date, performance_end_date, order_id, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
|
-
response = self.class.get(
|
4
|
+
response = self.class.get(
|
5
|
+
base_api_endpoint("TXN/SubLineItems?constituentId=#{constituent_id}&orderId=#{order_id}&subLineItemStatusIds=#{status_id}&performanceStartDate=#{performance_start_date}&performanceEndDate=#{performance_end_date}"), options
|
6
|
+
)
|
6
7
|
JSON.parse(response.body)
|
7
8
|
end
|
8
|
-
|
9
9
|
end
|
@@ -1,9 +1,7 @@
|
|
1
1
|
module WebContents
|
2
|
-
|
3
|
-
def get_web_contents(production_ids=nil, package_ids=nil, content_type_ids=nil, options={})
|
2
|
+
def get_web_contents(production_ids = nil, package_ids = nil, content_type_ids = nil, options = {})
|
4
3
|
options.merge!(basic_auth: @auth, headers: @headers)
|
5
4
|
response = self.class.get(base_api_endpoint("TXN/WebContents?productionElementIds=#{production_ids}&packageIds=#{package_ids}&contentTypeIds=#{content_type_ids}"), options)
|
6
5
|
JSON.parse(response.body)
|
7
6
|
end
|
8
|
-
|
9
7
|
end
|