Class: PostfinancecheckoutRubySdk::BogusExpressCheckoutService

Inherits:
Object
  • Object
show all
Defined in:
lib/postfinancecheckout-ruby-sdk/service/bogus_express_checkout_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ BogusExpressCheckoutService

Returns a new instance of BogusExpressCheckoutService.



30
31
32
# File 'lib/postfinancecheckout-ruby-sdk/service/bogus_express_checkout_service.rb', line 30

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



27
28
29
# File 'lib/postfinancecheckout-ruby-sdk/service/bogus_express_checkout_service.rb', line 27

def api_client
  @api_client
end

Instance Method Details

#post_bogus_express_checkout_on_approve(session_token, space, bogus_express_checkout_approval_request, opts = {}) ⇒ ExpressCheckoutApprovalResponse

Approve express checkout wallet payment

Parameters:

  • session_token (String)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • bogus_express_checkout_approval_request (BogusExpressCheckoutApprovalRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



39
40
41
42
# File 'lib/postfinancecheckout-ruby-sdk/service/bogus_express_checkout_service.rb', line 39

def post_bogus_express_checkout_on_approve(session_token, space, bogus_express_checkout_approval_request, opts = {})
  data, _status_code, _headers = post_bogus_express_checkout_on_approve_with_http_info(session_token, space, bogus_express_checkout_approval_request, opts)
  data
end

#post_bogus_express_checkout_on_approve_with_http_info(session_token, space, bogus_express_checkout_approval_request, opts = {}) ⇒ Array<(ExpressCheckoutApprovalResponse, Integer, Hash)>

Returns ExpressCheckoutApprovalResponse data, response status code and response headers.

Parameters:

  • session_token (String)
  • space (Integer)

    Specifies the ID of the space the operation should be executed in.

  • bogus_express_checkout_approval_request (BogusExpressCheckoutApprovalRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
109
110
111
# File 'lib/postfinancecheckout-ruby-sdk/service/bogus_express_checkout_service.rb', line 51

def post_bogus_express_checkout_on_approve_with_http_info(session_token, space, bogus_express_checkout_approval_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BogusExpressCheckoutService.post_bogus_express_checkout_on_approve ...'
  end
  # verify the required parameter 'session_token' is set
  if @api_client.config.client_side_validation && session_token.nil?
    fail ArgumentError, "Missing the required parameter 'session_token' when calling BogusExpressCheckoutService.post_bogus_express_checkout_on_approve"
  end
  # verify the required parameter 'space' is set
  if @api_client.config.client_side_validation && space.nil?
    fail ArgumentError, "Missing the required parameter 'space' when calling BogusExpressCheckoutService.post_bogus_express_checkout_on_approve"
  end
  # verify the required parameter 'bogus_express_checkout_approval_request' is set
  if @api_client.config.client_side_validation && bogus_express_checkout_approval_request.nil?
    fail ArgumentError, "Missing the required parameter 'bogus_express_checkout_approval_request' when calling BogusExpressCheckoutService.post_bogus_express_checkout_on_approve"
  end
  # resource path
  local_var_path = '/bogus-express-checkout/on-approve'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'sessionToken'] = session_token

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'Space'] = space

  # form parameters
  form_params = opts[:form_params] || {}

  # connection timeout
  connection_timeout = @api_client.config.timeout

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(bogus_express_checkout_approval_request)

  # return_type
  return_type = opts[:debug_return_type] || 'ExpressCheckoutApprovalResponse'

  new_options = opts.merge(
    :operation => :"BogusExpressCheckoutService.post_bogus_express_checkout_on_approve",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BogusExpressCheckoutService#post_bogus_express_checkout_on_approve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
  end
  return data, status_code, headers
end