ultracart_api 4.1.19 → 4.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -10
- data/docs/CustomDashboardSchedule.md +26 -0
- data/docs/{ChargebackDisputeResponse.md → CustomDashboardScheduleResponse.md} +4 -4
- data/docs/{ChargebackDisputesResponse.md → CustomDashboardSchedulesResponse.md} +4 -4
- data/docs/CustomReport.md +2 -0
- data/docs/DatawarehouseApi.md +220 -0
- data/docs/EmailCampaign.md +4 -0
- data/lib/ultracart_api/api/datawarehouse_api.rb +290 -0
- data/lib/ultracart_api/models/custom_dashboard_schedule.rb +258 -0
- data/lib/ultracart_api/models/{chargeback_dispute_response.rb → custom_dashboard_schedule_response.rb} +13 -13
- data/lib/ultracart_api/models/{chargeback_disputes_response.rb → custom_dashboard_schedules_response.rb} +16 -15
- data/lib/ultracart_api/models/custom_report.rb +10 -1
- data/lib/ultracart_api/models/email_campaign.rb +21 -1
- data/lib/ultracart_api/models/order_payment.rb +2 -2
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -4
- metadata +8 -10
- data/docs/ChargebackApi.md +0 -297
- data/docs/ChargebackDispute.md +0 -62
- data/lib/ultracart_api/api/chargeback_api.rb +0 -410
- data/lib/ultracart_api/models/chargeback_dispute.rb +0 -649
@@ -96,6 +96,76 @@ module UltracartClient
|
|
96
96
|
return data, status_code, headers
|
97
97
|
end
|
98
98
|
|
99
|
+
# Delete a custom dashboard schedule
|
100
|
+
# delete a custom dashboard schedule on the UltraCart account.
|
101
|
+
# @param custom_dashboard_schedule_oid [Integer] The dashboard schedule oid to delete.
|
102
|
+
# @param custom_dashboard_oid [Integer] The dashboard oid that owns the schedule.
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @return [nil]
|
105
|
+
def delete_custom_dashboard_schedule(custom_dashboard_schedule_oid, custom_dashboard_oid, opts = {})
|
106
|
+
delete_custom_dashboard_schedule_with_http_info(custom_dashboard_schedule_oid, custom_dashboard_oid, opts)
|
107
|
+
nil
|
108
|
+
end
|
109
|
+
|
110
|
+
# Delete a custom dashboard schedule
|
111
|
+
# delete a custom dashboard schedule on the UltraCart account.
|
112
|
+
# @param custom_dashboard_schedule_oid [Integer] The dashboard schedule oid to delete.
|
113
|
+
# @param custom_dashboard_oid [Integer] The dashboard oid that owns the schedule.
|
114
|
+
# @param [Hash] opts the optional parameters
|
115
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
116
|
+
def delete_custom_dashboard_schedule_with_http_info(custom_dashboard_schedule_oid, custom_dashboard_oid, opts = {})
|
117
|
+
if @api_client.config.debugging
|
118
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.delete_custom_dashboard_schedule ...'
|
119
|
+
end
|
120
|
+
# verify the required parameter 'custom_dashboard_schedule_oid' is set
|
121
|
+
if @api_client.config.client_side_validation && custom_dashboard_schedule_oid.nil?
|
122
|
+
fail ArgumentError, "Missing the required parameter 'custom_dashboard_schedule_oid' when calling DatawarehouseApi.delete_custom_dashboard_schedule"
|
123
|
+
end
|
124
|
+
# verify the required parameter 'custom_dashboard_oid' is set
|
125
|
+
if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
|
126
|
+
fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.delete_custom_dashboard_schedule"
|
127
|
+
end
|
128
|
+
# resource path
|
129
|
+
local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules/{custom_dashboard_schedule_oid}'.sub('{' + 'custom_dashboard_schedule_oid' + '}', CGI.escape(custom_dashboard_schedule_oid.to_s)).sub('{' + 'custom_dashboard_oid' + '}', CGI.escape(custom_dashboard_oid.to_s))
|
130
|
+
|
131
|
+
# query parameters
|
132
|
+
query_params = opts[:query_params] || {}
|
133
|
+
|
134
|
+
# header parameters
|
135
|
+
header_params = opts[:header_params] || {}
|
136
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
137
|
+
# HTTP header 'Accept' (if needed)
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
139
|
+
|
140
|
+
# form parameters
|
141
|
+
form_params = opts[:form_params] || {}
|
142
|
+
|
143
|
+
# http body (model)
|
144
|
+
post_body = opts[:debug_body]
|
145
|
+
|
146
|
+
# return_type
|
147
|
+
return_type = opts[:debug_return_type]
|
148
|
+
|
149
|
+
# auth_names
|
150
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
151
|
+
|
152
|
+
new_options = opts.merge(
|
153
|
+
:operation => :"DatawarehouseApi.delete_custom_dashboard_schedule",
|
154
|
+
:header_params => header_params,
|
155
|
+
:query_params => query_params,
|
156
|
+
:form_params => form_params,
|
157
|
+
:body => post_body,
|
158
|
+
:auth_names => auth_names,
|
159
|
+
:return_type => return_type
|
160
|
+
)
|
161
|
+
|
162
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
163
|
+
if @api_client.config.debugging
|
164
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#delete_custom_dashboard_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
165
|
+
end
|
166
|
+
return data, status_code, headers
|
167
|
+
end
|
168
|
+
|
99
169
|
# Delete a custom report
|
100
170
|
# Delete a custom report on the UltraCart account.
|
101
171
|
# @param custom_report_oid [Integer] The report oid to delete.
|
@@ -570,6 +640,70 @@ module UltracartClient
|
|
570
640
|
return data, status_code, headers
|
571
641
|
end
|
572
642
|
|
643
|
+
# Get custom dashboards
|
644
|
+
# Retrieve a custom dashboards
|
645
|
+
# @param custom_dashboard_oid [Integer]
|
646
|
+
# @param [Hash] opts the optional parameters
|
647
|
+
# @return [CustomDashboardSchedulesResponse]
|
648
|
+
def get_custom_dashboard_schedules(custom_dashboard_oid, opts = {})
|
649
|
+
data, _status_code, _headers = get_custom_dashboard_schedules_with_http_info(custom_dashboard_oid, opts)
|
650
|
+
data
|
651
|
+
end
|
652
|
+
|
653
|
+
# Get custom dashboards
|
654
|
+
# Retrieve a custom dashboards
|
655
|
+
# @param custom_dashboard_oid [Integer]
|
656
|
+
# @param [Hash] opts the optional parameters
|
657
|
+
# @return [Array<(CustomDashboardSchedulesResponse, Integer, Hash)>] CustomDashboardSchedulesResponse data, response status code and response headers
|
658
|
+
def get_custom_dashboard_schedules_with_http_info(custom_dashboard_oid, opts = {})
|
659
|
+
if @api_client.config.debugging
|
660
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_custom_dashboard_schedules ...'
|
661
|
+
end
|
662
|
+
# verify the required parameter 'custom_dashboard_oid' is set
|
663
|
+
if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
|
664
|
+
fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.get_custom_dashboard_schedules"
|
665
|
+
end
|
666
|
+
# resource path
|
667
|
+
local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules'.sub('{' + 'custom_dashboard_oid' + '}', CGI.escape(custom_dashboard_oid.to_s))
|
668
|
+
|
669
|
+
# query parameters
|
670
|
+
query_params = opts[:query_params] || {}
|
671
|
+
|
672
|
+
# header parameters
|
673
|
+
header_params = opts[:header_params] || {}
|
674
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
675
|
+
# HTTP header 'Accept' (if needed)
|
676
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
677
|
+
|
678
|
+
# form parameters
|
679
|
+
form_params = opts[:form_params] || {}
|
680
|
+
|
681
|
+
# http body (model)
|
682
|
+
post_body = opts[:debug_body]
|
683
|
+
|
684
|
+
# return_type
|
685
|
+
return_type = opts[:debug_return_type] || 'CustomDashboardSchedulesResponse'
|
686
|
+
|
687
|
+
# auth_names
|
688
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
689
|
+
|
690
|
+
new_options = opts.merge(
|
691
|
+
:operation => :"DatawarehouseApi.get_custom_dashboard_schedules",
|
692
|
+
:header_params => header_params,
|
693
|
+
:query_params => query_params,
|
694
|
+
:form_params => form_params,
|
695
|
+
:body => post_body,
|
696
|
+
:auth_names => auth_names,
|
697
|
+
:return_type => return_type
|
698
|
+
)
|
699
|
+
|
700
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
701
|
+
if @api_client.config.debugging
|
702
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_custom_dashboard_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
703
|
+
end
|
704
|
+
return data, status_code, headers
|
705
|
+
end
|
706
|
+
|
573
707
|
# Get custom dashboards
|
574
708
|
# Retrieve a custom dashboards
|
575
709
|
# @param [Hash] opts the optional parameters
|
@@ -1191,6 +1325,81 @@ module UltracartClient
|
|
1191
1325
|
return data, status_code, headers
|
1192
1326
|
end
|
1193
1327
|
|
1328
|
+
# Create a custom dashboard schedule
|
1329
|
+
# Create a new custom dashboard schedule on the UltraCart account.
|
1330
|
+
# @param custom_dashboard_oid [Integer]
|
1331
|
+
# @param dashboard_schedule [CustomDashboardSchedule] Dashboard schedule to create
|
1332
|
+
# @param [Hash] opts the optional parameters
|
1333
|
+
# @return [CustomDashboardScheduleResponse]
|
1334
|
+
def insert_custom_dashboard_schedule(custom_dashboard_oid, dashboard_schedule, opts = {})
|
1335
|
+
data, _status_code, _headers = insert_custom_dashboard_schedule_with_http_info(custom_dashboard_oid, dashboard_schedule, opts)
|
1336
|
+
data
|
1337
|
+
end
|
1338
|
+
|
1339
|
+
# Create a custom dashboard schedule
|
1340
|
+
# Create a new custom dashboard schedule on the UltraCart account.
|
1341
|
+
# @param custom_dashboard_oid [Integer]
|
1342
|
+
# @param dashboard_schedule [CustomDashboardSchedule] Dashboard schedule to create
|
1343
|
+
# @param [Hash] opts the optional parameters
|
1344
|
+
# @return [Array<(CustomDashboardScheduleResponse, Integer, Hash)>] CustomDashboardScheduleResponse data, response status code and response headers
|
1345
|
+
def insert_custom_dashboard_schedule_with_http_info(custom_dashboard_oid, dashboard_schedule, opts = {})
|
1346
|
+
if @api_client.config.debugging
|
1347
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.insert_custom_dashboard_schedule ...'
|
1348
|
+
end
|
1349
|
+
# verify the required parameter 'custom_dashboard_oid' is set
|
1350
|
+
if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
|
1351
|
+
fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.insert_custom_dashboard_schedule"
|
1352
|
+
end
|
1353
|
+
# verify the required parameter 'dashboard_schedule' is set
|
1354
|
+
if @api_client.config.client_side_validation && dashboard_schedule.nil?
|
1355
|
+
fail ArgumentError, "Missing the required parameter 'dashboard_schedule' when calling DatawarehouseApi.insert_custom_dashboard_schedule"
|
1356
|
+
end
|
1357
|
+
# resource path
|
1358
|
+
local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules'.sub('{' + 'custom_dashboard_oid' + '}', CGI.escape(custom_dashboard_oid.to_s))
|
1359
|
+
|
1360
|
+
# query parameters
|
1361
|
+
query_params = opts[:query_params] || {}
|
1362
|
+
|
1363
|
+
# header parameters
|
1364
|
+
header_params = opts[:header_params] || {}
|
1365
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1366
|
+
# HTTP header 'Accept' (if needed)
|
1367
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1368
|
+
# HTTP header 'Content-Type'
|
1369
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
1370
|
+
if !content_type.nil?
|
1371
|
+
header_params['Content-Type'] = content_type
|
1372
|
+
end
|
1373
|
+
|
1374
|
+
# form parameters
|
1375
|
+
form_params = opts[:form_params] || {}
|
1376
|
+
|
1377
|
+
# http body (model)
|
1378
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(dashboard_schedule)
|
1379
|
+
|
1380
|
+
# return_type
|
1381
|
+
return_type = opts[:debug_return_type] || 'CustomDashboardScheduleResponse'
|
1382
|
+
|
1383
|
+
# auth_names
|
1384
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1385
|
+
|
1386
|
+
new_options = opts.merge(
|
1387
|
+
:operation => :"DatawarehouseApi.insert_custom_dashboard_schedule",
|
1388
|
+
:header_params => header_params,
|
1389
|
+
:query_params => query_params,
|
1390
|
+
:form_params => form_params,
|
1391
|
+
:body => post_body,
|
1392
|
+
:auth_names => auth_names,
|
1393
|
+
:return_type => return_type
|
1394
|
+
)
|
1395
|
+
|
1396
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1397
|
+
if @api_client.config.debugging
|
1398
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#insert_custom_dashboard_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1399
|
+
end
|
1400
|
+
return data, status_code, headers
|
1401
|
+
end
|
1402
|
+
|
1194
1403
|
# Create a custom report
|
1195
1404
|
# Create a new custom report on the UltraCart account.
|
1196
1405
|
# @param report [CustomReport] Report to create
|
@@ -1404,6 +1613,87 @@ module UltracartClient
|
|
1404
1613
|
return data, status_code, headers
|
1405
1614
|
end
|
1406
1615
|
|
1616
|
+
# Update a custom dashboard schedule
|
1617
|
+
# Update a custom dashboard schedule on the UltraCart account.
|
1618
|
+
# @param custom_dashboard_schedule_oid [Integer] The dashboard schedule oid to update.
|
1619
|
+
# @param custom_dashboard_oid [Integer] The dashboard oid to update.
|
1620
|
+
# @param dashboard_schedule [CustomDashboardSchedule] Dashboard schedule to update
|
1621
|
+
# @param [Hash] opts the optional parameters
|
1622
|
+
# @return [CustomDashboardResponse]
|
1623
|
+
def update_custom_dashboard_schedule(custom_dashboard_schedule_oid, custom_dashboard_oid, dashboard_schedule, opts = {})
|
1624
|
+
data, _status_code, _headers = update_custom_dashboard_schedule_with_http_info(custom_dashboard_schedule_oid, custom_dashboard_oid, dashboard_schedule, opts)
|
1625
|
+
data
|
1626
|
+
end
|
1627
|
+
|
1628
|
+
# Update a custom dashboard schedule
|
1629
|
+
# Update a custom dashboard schedule on the UltraCart account.
|
1630
|
+
# @param custom_dashboard_schedule_oid [Integer] The dashboard schedule oid to update.
|
1631
|
+
# @param custom_dashboard_oid [Integer] The dashboard oid to update.
|
1632
|
+
# @param dashboard_schedule [CustomDashboardSchedule] Dashboard schedule to update
|
1633
|
+
# @param [Hash] opts the optional parameters
|
1634
|
+
# @return [Array<(CustomDashboardResponse, Integer, Hash)>] CustomDashboardResponse data, response status code and response headers
|
1635
|
+
def update_custom_dashboard_schedule_with_http_info(custom_dashboard_schedule_oid, custom_dashboard_oid, dashboard_schedule, opts = {})
|
1636
|
+
if @api_client.config.debugging
|
1637
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.update_custom_dashboard_schedule ...'
|
1638
|
+
end
|
1639
|
+
# verify the required parameter 'custom_dashboard_schedule_oid' is set
|
1640
|
+
if @api_client.config.client_side_validation && custom_dashboard_schedule_oid.nil?
|
1641
|
+
fail ArgumentError, "Missing the required parameter 'custom_dashboard_schedule_oid' when calling DatawarehouseApi.update_custom_dashboard_schedule"
|
1642
|
+
end
|
1643
|
+
# verify the required parameter 'custom_dashboard_oid' is set
|
1644
|
+
if @api_client.config.client_side_validation && custom_dashboard_oid.nil?
|
1645
|
+
fail ArgumentError, "Missing the required parameter 'custom_dashboard_oid' when calling DatawarehouseApi.update_custom_dashboard_schedule"
|
1646
|
+
end
|
1647
|
+
# verify the required parameter 'dashboard_schedule' is set
|
1648
|
+
if @api_client.config.client_side_validation && dashboard_schedule.nil?
|
1649
|
+
fail ArgumentError, "Missing the required parameter 'dashboard_schedule' when calling DatawarehouseApi.update_custom_dashboard_schedule"
|
1650
|
+
end
|
1651
|
+
# resource path
|
1652
|
+
local_var_path = '/datawarehouse/custom_dashboards/{custom_dashboard_oid}/schedules/{custom_dashboard_schedule_oid}'.sub('{' + 'custom_dashboard_schedule_oid' + '}', CGI.escape(custom_dashboard_schedule_oid.to_s)).sub('{' + 'custom_dashboard_oid' + '}', CGI.escape(custom_dashboard_oid.to_s))
|
1653
|
+
|
1654
|
+
# query parameters
|
1655
|
+
query_params = opts[:query_params] || {}
|
1656
|
+
|
1657
|
+
# header parameters
|
1658
|
+
header_params = opts[:header_params] || {}
|
1659
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1660
|
+
# HTTP header 'Accept' (if needed)
|
1661
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1662
|
+
# HTTP header 'Content-Type'
|
1663
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
1664
|
+
if !content_type.nil?
|
1665
|
+
header_params['Content-Type'] = content_type
|
1666
|
+
end
|
1667
|
+
|
1668
|
+
# form parameters
|
1669
|
+
form_params = opts[:form_params] || {}
|
1670
|
+
|
1671
|
+
# http body (model)
|
1672
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(dashboard_schedule)
|
1673
|
+
|
1674
|
+
# return_type
|
1675
|
+
return_type = opts[:debug_return_type] || 'CustomDashboardResponse'
|
1676
|
+
|
1677
|
+
# auth_names
|
1678
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1679
|
+
|
1680
|
+
new_options = opts.merge(
|
1681
|
+
:operation => :"DatawarehouseApi.update_custom_dashboard_schedule",
|
1682
|
+
:header_params => header_params,
|
1683
|
+
:query_params => query_params,
|
1684
|
+
:form_params => form_params,
|
1685
|
+
:body => post_body,
|
1686
|
+
:auth_names => auth_names,
|
1687
|
+
:return_type => return_type
|
1688
|
+
)
|
1689
|
+
|
1690
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1691
|
+
if @api_client.config.debugging
|
1692
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#update_custom_dashboard_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1693
|
+
end
|
1694
|
+
return data, status_code, headers
|
1695
|
+
end
|
1696
|
+
|
1407
1697
|
# Update a custom report
|
1408
1698
|
# Update a custom report on the UltraCart account.
|
1409
1699
|
# @param custom_report_oid [Integer] The report oid to custom update.
|
@@ -0,0 +1,258 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module UltracartClient
|
17
|
+
class CustomDashboardSchedule
|
18
|
+
attr_accessor :cron_trigger_expression
|
19
|
+
|
20
|
+
attr_accessor :data_warehouse_custom_dashboard_oid
|
21
|
+
|
22
|
+
attr_accessor :data_warehouse_custom_dashboard_schedule_oid
|
23
|
+
|
24
|
+
attr_accessor :emails
|
25
|
+
|
26
|
+
# Date/time that the next send will occur.
|
27
|
+
attr_accessor :next_send_dts
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'cron_trigger_expression' => :'cron_trigger_expression',
|
33
|
+
:'data_warehouse_custom_dashboard_oid' => :'data_warehouse_custom_dashboard_oid',
|
34
|
+
:'data_warehouse_custom_dashboard_schedule_oid' => :'data_warehouse_custom_dashboard_schedule_oid',
|
35
|
+
:'emails' => :'emails',
|
36
|
+
:'next_send_dts' => :'next_send_dts'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'cron_trigger_expression' => :'String',
|
49
|
+
:'data_warehouse_custom_dashboard_oid' => :'Integer',
|
50
|
+
:'data_warehouse_custom_dashboard_schedule_oid' => :'Integer',
|
51
|
+
:'emails' => :'Array<String>',
|
52
|
+
:'next_send_dts' => :'String'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# List of attributes with nullable: true
|
57
|
+
def self.openapi_nullable
|
58
|
+
Set.new([
|
59
|
+
])
|
60
|
+
end
|
61
|
+
|
62
|
+
# Initializes the object
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
64
|
+
def initialize(attributes = {})
|
65
|
+
if (!attributes.is_a?(Hash))
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomDashboardSchedule` initialize method"
|
67
|
+
end
|
68
|
+
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomDashboardSchedule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
|
+
end
|
74
|
+
h[k.to_sym] = v
|
75
|
+
}
|
76
|
+
|
77
|
+
if attributes.key?(:'cron_trigger_expression')
|
78
|
+
self.cron_trigger_expression = attributes[:'cron_trigger_expression']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'data_warehouse_custom_dashboard_oid')
|
82
|
+
self.data_warehouse_custom_dashboard_oid = attributes[:'data_warehouse_custom_dashboard_oid']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'data_warehouse_custom_dashboard_schedule_oid')
|
86
|
+
self.data_warehouse_custom_dashboard_schedule_oid = attributes[:'data_warehouse_custom_dashboard_schedule_oid']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'emails')
|
90
|
+
if (value = attributes[:'emails']).is_a?(Array)
|
91
|
+
self.emails = value
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'next_send_dts')
|
96
|
+
self.next_send_dts = attributes[:'next_send_dts']
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
101
|
+
# @return Array for valid properties with the reasons
|
102
|
+
def list_invalid_properties
|
103
|
+
invalid_properties = Array.new
|
104
|
+
invalid_properties
|
105
|
+
end
|
106
|
+
|
107
|
+
# Check to see if the all the properties in the model are valid
|
108
|
+
# @return true if the model is valid
|
109
|
+
def valid?
|
110
|
+
true
|
111
|
+
end
|
112
|
+
|
113
|
+
# Checks equality by comparing each attribute.
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def ==(o)
|
116
|
+
return true if self.equal?(o)
|
117
|
+
self.class == o.class &&
|
118
|
+
cron_trigger_expression == o.cron_trigger_expression &&
|
119
|
+
data_warehouse_custom_dashboard_oid == o.data_warehouse_custom_dashboard_oid &&
|
120
|
+
data_warehouse_custom_dashboard_schedule_oid == o.data_warehouse_custom_dashboard_schedule_oid &&
|
121
|
+
emails == o.emails &&
|
122
|
+
next_send_dts == o.next_send_dts
|
123
|
+
end
|
124
|
+
|
125
|
+
# @see the `==` method
|
126
|
+
# @param [Object] Object to be compared
|
127
|
+
def eql?(o)
|
128
|
+
self == o
|
129
|
+
end
|
130
|
+
|
131
|
+
# Calculates hash code according to all attributes.
|
132
|
+
# @return [Integer] Hash code
|
133
|
+
def hash
|
134
|
+
[cron_trigger_expression, data_warehouse_custom_dashboard_oid, data_warehouse_custom_dashboard_schedule_oid, emails, next_send_dts].hash
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def self.build_from_hash(attributes)
|
141
|
+
new.build_from_hash(attributes)
|
142
|
+
end
|
143
|
+
|
144
|
+
# Builds the object from hash
|
145
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
146
|
+
# @return [Object] Returns the model itself
|
147
|
+
def build_from_hash(attributes)
|
148
|
+
return nil unless attributes.is_a?(Hash)
|
149
|
+
attributes = attributes.transform_keys(&:to_sym)
|
150
|
+
self.class.openapi_types.each_pair do |key, type|
|
151
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
152
|
+
self.send("#{key}=", nil)
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
154
|
+
# check to ensure the input is an array given that the attribute
|
155
|
+
# is documented as an array but the input is not
|
156
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
157
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
158
|
+
end
|
159
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
160
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
self
|
165
|
+
end
|
166
|
+
|
167
|
+
# Deserializes the data based on type
|
168
|
+
# @param string type Data type
|
169
|
+
# @param string value Value to be deserialized
|
170
|
+
# @return [Object] Deserialized data
|
171
|
+
def _deserialize(type, value)
|
172
|
+
case type.to_sym
|
173
|
+
when :Time
|
174
|
+
Time.parse(value)
|
175
|
+
when :Date
|
176
|
+
Date.parse(value)
|
177
|
+
when :String
|
178
|
+
value.to_s
|
179
|
+
when :Integer
|
180
|
+
value.to_i
|
181
|
+
when :Float
|
182
|
+
value.to_f
|
183
|
+
when :Boolean
|
184
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
185
|
+
true
|
186
|
+
else
|
187
|
+
false
|
188
|
+
end
|
189
|
+
when :Object
|
190
|
+
# generic object (usually a Hash), return directly
|
191
|
+
value
|
192
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
193
|
+
inner_type = Regexp.last_match[:inner_type]
|
194
|
+
value.map { |v| _deserialize(inner_type, v) }
|
195
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
196
|
+
k_type = Regexp.last_match[:k_type]
|
197
|
+
v_type = Regexp.last_match[:v_type]
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each do |k, v|
|
200
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
else # model
|
204
|
+
# models (e.g. Pet) or oneOf
|
205
|
+
klass = UltracartClient.const_get(type)
|
206
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns the string representation of the object
|
211
|
+
# @return [String] String presentation of the object
|
212
|
+
def to_s
|
213
|
+
to_hash.to_s
|
214
|
+
end
|
215
|
+
|
216
|
+
# to_body is an alias to to_hash (backward compatibility)
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
218
|
+
def to_body
|
219
|
+
to_hash
|
220
|
+
end
|
221
|
+
|
222
|
+
# Returns the object in the form of hash
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
224
|
+
def to_hash
|
225
|
+
hash = {}
|
226
|
+
self.class.attribute_map.each_pair do |attr, param|
|
227
|
+
value = self.send(attr)
|
228
|
+
if value.nil?
|
229
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
230
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
231
|
+
end
|
232
|
+
|
233
|
+
hash[param] = _to_hash(value)
|
234
|
+
end
|
235
|
+
hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Outputs non-array value in the form of hash
|
239
|
+
# For object, use to_hash. Otherwise, just return the value
|
240
|
+
# @param [Object] value Any valid value
|
241
|
+
# @return [Hash] Returns the value in the form of hash
|
242
|
+
def _to_hash(value)
|
243
|
+
if value.is_a?(Array)
|
244
|
+
value.compact.map { |v| _to_hash(v) }
|
245
|
+
elsif value.is_a?(Hash)
|
246
|
+
{}.tap do |hash|
|
247
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
248
|
+
end
|
249
|
+
elsif value.respond_to? :to_hash
|
250
|
+
value.to_hash
|
251
|
+
else
|
252
|
+
value
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
257
|
+
|
258
|
+
end
|
@@ -14,13 +14,13 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module UltracartClient
|
17
|
-
class
|
18
|
-
attr_accessor :chargeback
|
19
|
-
|
17
|
+
class CustomDashboardScheduleResponse
|
20
18
|
attr_accessor :error
|
21
19
|
|
22
20
|
attr_accessor :metadata
|
23
21
|
|
22
|
+
attr_accessor :schedule
|
23
|
+
|
24
24
|
# Indicates if API call was successful
|
25
25
|
attr_accessor :success
|
26
26
|
|
@@ -29,9 +29,9 @@ module UltracartClient
|
|
29
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
30
|
def self.attribute_map
|
31
31
|
{
|
32
|
-
:'chargeback' => :'chargeback',
|
33
32
|
:'error' => :'error',
|
34
33
|
:'metadata' => :'metadata',
|
34
|
+
:'schedule' => :'schedule',
|
35
35
|
:'success' => :'success',
|
36
36
|
:'warning' => :'warning'
|
37
37
|
}
|
@@ -45,9 +45,9 @@ module UltracartClient
|
|
45
45
|
# Attribute type mapping.
|
46
46
|
def self.openapi_types
|
47
47
|
{
|
48
|
-
:'chargeback' => :'ChargebackDispute',
|
49
48
|
:'error' => :'Error',
|
50
49
|
:'metadata' => :'ResponseMetadata',
|
50
|
+
:'schedule' => :'CustomDashboardSchedule',
|
51
51
|
:'success' => :'Boolean',
|
52
52
|
:'warning' => :'Warning'
|
53
53
|
}
|
@@ -63,21 +63,17 @@ module UltracartClient
|
|
63
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
64
64
|
def initialize(attributes = {})
|
65
65
|
if (!attributes.is_a?(Hash))
|
66
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomDashboardScheduleResponse` initialize method"
|
67
67
|
end
|
68
68
|
|
69
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
70
70
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
71
|
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomDashboardScheduleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
73
|
end
|
74
74
|
h[k.to_sym] = v
|
75
75
|
}
|
76
76
|
|
77
|
-
if attributes.key?(:'chargeback')
|
78
|
-
self.chargeback = attributes[:'chargeback']
|
79
|
-
end
|
80
|
-
|
81
77
|
if attributes.key?(:'error')
|
82
78
|
self.error = attributes[:'error']
|
83
79
|
end
|
@@ -86,6 +82,10 @@ module UltracartClient
|
|
86
82
|
self.metadata = attributes[:'metadata']
|
87
83
|
end
|
88
84
|
|
85
|
+
if attributes.key?(:'schedule')
|
86
|
+
self.schedule = attributes[:'schedule']
|
87
|
+
end
|
88
|
+
|
89
89
|
if attributes.key?(:'success')
|
90
90
|
self.success = attributes[:'success']
|
91
91
|
end
|
@@ -113,9 +113,9 @@ module UltracartClient
|
|
113
113
|
def ==(o)
|
114
114
|
return true if self.equal?(o)
|
115
115
|
self.class == o.class &&
|
116
|
-
chargeback == o.chargeback &&
|
117
116
|
error == o.error &&
|
118
117
|
metadata == o.metadata &&
|
118
|
+
schedule == o.schedule &&
|
119
119
|
success == o.success &&
|
120
120
|
warning == o.warning
|
121
121
|
end
|
@@ -129,7 +129,7 @@ module UltracartClient
|
|
129
129
|
# Calculates hash code according to all attributes.
|
130
130
|
# @return [Integer] Hash code
|
131
131
|
def hash
|
132
|
-
[
|
132
|
+
[error, metadata, schedule, success, warning].hash
|
133
133
|
end
|
134
134
|
|
135
135
|
# Builds the object from hash
|