Class: CyberSource::ReportSubscriptionsApi
- Inherits:
-
Object
- Object
- CyberSource::ReportSubscriptionsApi
- Defined in:
- lib/cybersource_rest_client/api/report_subscriptions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_standard_or_classic_subscription(predefined_subscription_request_bean, opts = {}) ⇒ nil
Create a Standard or Classic Subscription Create or update an already existing classic or standard subscription.
-
#create_standard_or_classic_subscription_with_http_info(predefined_subscription_request_bean, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create a Standard or Classic Subscription Create or update an already existing classic or standard subscription.
-
#create_subscription(create_report_subscription_request, opts = {}) ⇒ nil
Create Report Subscription for a Report Name by Organization Create a report subscription for your organization.
-
#create_subscription_with_http_info(create_report_subscription_request, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create Report Subscription for a Report Name by Organization Create a report subscription for your organization.
-
#delete_subscription(report_name, opts = {}) ⇒ nil
Delete Subscription of a Report Name by Organization Delete a report subscription for your organization.
-
#delete_subscription_with_http_info(report_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete Subscription of a Report Name by Organization Delete a report subscription for your organization.
-
#get_all_subscriptions(opts = {}) ⇒ ReportingV3ReportSubscriptionsGet200Response
Get All Subscriptions View a summary of all report subscriptions.
-
#get_all_subscriptions_with_http_info(opts = {}) ⇒ Array<(ReportingV3ReportSubscriptionsGet200Response, Fixnum, Hash)>
Get All Subscriptions View a summary of all report subscriptions.
-
#get_subscription(report_name, opts = {}) ⇒ ReportingV3ReportSubscriptionsGet200ResponseSubscriptions
Get Subscription for Report Name View the details of a report subscription, such as the report format or report frequency, using the report’s unique name.
-
#get_subscription_with_http_info(report_name, opts = {}) ⇒ Array<(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions, Fixnum, Hash)>
Get Subscription for Report Name View the details of a report subscription, such as the report format or report frequency, using the report's unique name.
-
#initialize(api_client = ApiClient.default, config) ⇒ ReportSubscriptionsApi
constructor
A new instance of ReportSubscriptionsApi.
Constructor Details
#initialize(api_client = ApiClient.default, config) ⇒ ReportSubscriptionsApi
Returns a new instance of ReportSubscriptionsApi.
18 19 20 21 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 18 def initialize(api_client = ApiClient.default, config) @api_client = api_client @api_client.set_configuration(config) end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#create_standard_or_classic_subscription(predefined_subscription_request_bean, opts = {}) ⇒ nil
Create a Standard or Classic Subscription Create or update an already existing classic or standard subscription.
30 31 32 33 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 30 def create_standard_or_classic_subscription(predefined_subscription_request_bean, opts = {}) data, status_code, headers = create_standard_or_classic_subscription_with_http_info(predefined_subscription_request_bean, opts) return data, status_code, headers end |
#create_standard_or_classic_subscription_with_http_info(predefined_subscription_request_bean, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create a Standard or Classic Subscription Create or update an already existing classic or standard subscription.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 41 def create_standard_or_classic_subscription_with_http_info(predefined_subscription_request_bean, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ReportSubscriptionsApi.create_standard_or_classic_subscription ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'predefined_subscription_request_bean' is set if @api_client.config.client_side_validation && predefined_subscription_request_bean.nil? fail ArgumentError, "Missing the required parameter 'predefined_subscription_request_bean' when calling ReportSubscriptionsApi.create_standard_or_classic_subscription" end #if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) #fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling ReportSubscriptionsApi.create_standard_or_classic_subscription, must conform to the pattern /[a-zA-Z0-9-_]+/." #end # resource path local_var_path = 'reporting/v3/predefined-report-subscriptions' # query parameters query_params = {} query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(predefined_subscription_request_bean) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PredefinedSubscriptionRequestBean', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_standard_or_classic_subscription","create_standard_or_classic_subscription_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_standard_or_classic_subscription","create_standard_or_classic_subscription_with_http_info"]) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: ReportSubscriptionsApi#create_standard_or_classic_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#create_subscription(create_report_subscription_request, opts = {}) ⇒ nil
Create Report Subscription for a Report Name by Organization Create a report subscription for your organization. The report name must be unique.
117 118 119 120 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 117 def create_subscription(create_report_subscription_request, opts = {}) data, status_code, headers = create_subscription_with_http_info(create_report_subscription_request, opts) return data, status_code, headers end |
#create_subscription_with_http_info(create_report_subscription_request, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create Report Subscription for a Report Name by Organization Create a report subscription for your organization. The report name must be unique.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 128 def create_subscription_with_http_info(create_report_subscription_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ReportSubscriptionsApi.create_subscription ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'create_report_subscription_request' is set if @api_client.config.client_side_validation && create_report_subscription_request.nil? fail ArgumentError, "Missing the required parameter 'create_report_subscription_request' when calling ReportSubscriptionsApi.create_subscription" end #if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) #fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling ReportSubscriptionsApi.create_subscription, must conform to the pattern /[a-zA-Z0-9-_]+/." #end # resource path local_var_path = 'reporting/v3/report-subscriptions' # query parameters query_params = {} query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(create_report_subscription_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateReportSubscriptionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["create_subscription","create_subscription_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["create_subscription","create_subscription_with_http_info"]) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: ReportSubscriptionsApi#create_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#delete_subscription(report_name, opts = {}) ⇒ nil
Delete Subscription of a Report Name by Organization Delete a report subscription for your organization. You must know the unique name of the report you want to delete.
204 205 206 207 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 204 def delete_subscription(report_name, opts = {}) data, status_code, headers = delete_subscription_with_http_info(report_name, opts) return data, status_code, headers end |
#delete_subscription_with_http_info(report_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete Subscription of a Report Name by Organization Delete a report subscription for your organization. You must know the unique name of the report you want to delete.
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 215 def delete_subscription_with_http_info(report_name, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ReportSubscriptionsApi.delete_subscription ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'report_name' is set if @api_client.config.client_side_validation && report_name.nil? fail ArgumentError, "Missing the required parameter 'report_name' when calling ReportSubscriptionsApi.delete_subscription" end #if @api_client.config.client_side_validation && report_name !~ Regexp.new(/[a-zA-Z0-9-_+]+/) #fail ArgumentError, "invalid value for 'report_name' when calling ReportSubscriptionsApi.delete_subscription, must conform to the pattern /[a-zA-Z0-9-_+]+/." #end #if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) #fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling ReportSubscriptionsApi.delete_subscription, must conform to the pattern /[a-zA-Z0-9-_]+/." #end # resource path local_var_path = 'reporting/v3/report-subscriptions/{reportName}'.sub('{' + 'reportName' + '}', report_name.to_s) # query parameters query_params = {} query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) if 'DELETE' == 'POST' post_body = '{}' else post_body = nil end inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_subscription","delete_subscription_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["delete_subscription","delete_subscription_with_http_info"]) auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: ReportSubscriptionsApi#delete_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#get_all_subscriptions(opts = {}) ⇒ ReportingV3ReportSubscriptionsGet200Response
Get All Subscriptions View a summary of all report subscriptions.
296 297 298 299 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 296 def get_all_subscriptions(opts = {}) data, status_code, headers = get_all_subscriptions_with_http_info(opts) return data, status_code, headers end |
#get_all_subscriptions_with_http_info(opts = {}) ⇒ Array<(ReportingV3ReportSubscriptionsGet200Response, Fixnum, Hash)>
Get All Subscriptions View a summary of all report subscriptions.
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 306 def get_all_subscriptions_with_http_info(opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ReportSubscriptionsApi.get_all_subscriptions ...' rescue puts 'Cannot write to log' end end #if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) #fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling ReportSubscriptionsApi.get_all_subscriptions, must conform to the pattern /[a-zA-Z0-9-_]+/." #end # resource path local_var_path = 'reporting/v3/report-subscriptions' # query parameters query_params = {} query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) if 'GET' == 'POST' post_body = '{}' else post_body = nil end inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_all_subscriptions","get_all_subscriptions_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_all_subscriptions","get_all_subscriptions_with_http_info"]) auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ReportingV3ReportSubscriptionsGet200Response', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: ReportSubscriptionsApi#get_all_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#get_subscription(report_name, opts = {}) ⇒ ReportingV3ReportSubscriptionsGet200ResponseSubscriptions
Get Subscription for Report Name View the details of a report subscription, such as the report format or report frequency, using the report’s unique name.
381 382 383 384 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 381 def get_subscription(report_name, opts = {}) data, status_code, headers = get_subscription_with_http_info(report_name, opts) return data, status_code, headers end |
#get_subscription_with_http_info(report_name, opts = {}) ⇒ Array<(ReportingV3ReportSubscriptionsGet200ResponseSubscriptions, Fixnum, Hash)>
Get Subscription for Report Name View the details of a report subscription, such as the report format or report frequency, using the report's unique name.
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'lib/cybersource_rest_client/api/report_subscriptions_api.rb', line 392 def get_subscription_with_http_info(report_name, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: ReportSubscriptionsApi.get_subscription ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'report_name' is set if @api_client.config.client_side_validation && report_name.nil? fail ArgumentError, "Missing the required parameter 'report_name' when calling ReportSubscriptionsApi.get_subscription" end #if @api_client.config.client_side_validation && report_name !~ Regexp.new(/[a-zA-Z0-9-_+]+/) #fail ArgumentError, "invalid value for 'report_name' when calling ReportSubscriptionsApi.get_subscription, must conform to the pattern /[a-zA-Z0-9-_+]+/." #end #if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ Regexp.new(/[a-zA-Z0-9-_]+/) #fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling ReportSubscriptionsApi.get_subscription, must conform to the pattern /[a-zA-Z0-9-_]+/." #end # resource path local_var_path = 'reporting/v3/report-subscriptions/{reportName}'.sub('{' + 'reportName' + '}', report_name.to_s) # query parameters query_params = {} query_params[:'organizationId'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/hal+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) # form parameters form_params = {} # http body (model) if 'GET' == 'POST' post_body = '{}' else post_body = nil end inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_subscription","get_subscription_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_subscription","get_subscription_with_http_info"]) auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ReportingV3ReportSubscriptionsGet200ResponseSubscriptions', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: ReportSubscriptionsApi#get_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |