Class: CyberSourceMergedSpec::NetFundingsController

Inherits:
BaseController show all
Defined in:
lib/cyber_source_merged_spec/controllers/net_fundings_controller.rb

Overview

NetFundingsController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters

Constructor Details

This class inherits a constructor from CyberSourceMergedSpec::BaseController

Instance Method Details

#get_net_funding_details(start_time, end_time, organization_id: nil, group_name: nil) ⇒ ApiResponse

Get Netfunding information for an account or a merchant. in ISO 8601 format Please refer the following link to know more about ISO 8601 format.[Rfc Date Format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor 14) Example date format: - yyyy-MM-dd'T'HH:mm:ss.SSSZ (e.g. 2018-01-01T00:00:00.000Z) ISO 8601 format Please refer the following link to know more about ISO 8601 format.[Rfc Date Format](https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor 14) Example date format: - yyyy-MM-dd'T'HH:mm:ss.SSSZ (e.g. 2018-01-01T00:00:00.000Z) Id Name.

Parameters:

  • start_time (DateTime)

    Required parameter: Valid report Start Time

  • end_time (DateTime)

    Required parameter: Valid report End Time in

  • organization_id (String) (defaults to: nil)

    Optional parameter: Valid Organization

  • group_name (String) (defaults to: nil)

    Optional parameter: Valid CyberSource Group

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/cyber_source_merged_spec/controllers/net_fundings_controller.rb', line 27

def get_net_funding_details(start_time,
                            end_time,
                            organization_id: nil,
                            group_name: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/reporting/v3/net-fundings',
                                 Server::DEFAULT)
               .query_param(new_parameter(start_time, key: 'startTime')
                             .is_required(true))
               .query_param(new_parameter(end_time, key: 'endTime')
                             .is_required(true))
               .query_param(new_parameter(organization_id, key: 'organizationId'))
               .query_param(new_parameter(group_name, key: 'groupName'))
               .header_param(new_parameter('application/json', key: 'accept')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(ReportingV3NetFundingsGet200Response.method(:from_hash))
                .is_api_response(true)
                .local_error('400',
                             'Invalid request',
                             ReportingV3NetFundingsGet400ResponseException)
                .local_error('401',
                             'Unauthorized',
                             APIException)
                .local_error('403',
                             'Forbidden',
                             APIException)
                .local_error('404',
                             'Report not found',
                             APIException)
                .local_error('500',
                             'Internal Server Error',
                             ReportingV3NetFundingsGet500ResponseException))
    .execute
end