Class: PaysecureApiDocumentationLive::Api
- Defined in:
- lib/paysecure_api_documentation_live/apis/api.rb
Overview
Api
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#partial_refund_api(accept, body) ⇒ ApiResponse
Refund Scenarios ### Partial Refund Purchase Amount: 10 Refund Amount: 8 Result: - Refunded Amount: 8.
-
#partial_refund_status_api(body) ⇒ ApiResponse
TODO: type endpoint description here description here.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from PaysecureApiDocumentationLive::BaseApi
Instance Method Details
#partial_refund_api(accept, body) ⇒ ApiResponse
Refund Scenarios
Partial Refund
Purchase Amount: 10 Refund Amount: 8 Result:
-
Refunded Amount: 8
-
Remaining Refundable Amount: 2
-
Transaction Status: PARTIALLY_REFUNDED
Full Refund Using Partial Refund API Purchase Amount: 10 Refund Amount: 10 Result:
-
Refunded Amount: 10
-
Remaining Refundable Amount: 0
-
Transaction Status: PARTIAL REFUNDED
Multiple Partial Refunds
Purchase Amount: 10
-
Refund #1: 3
-
Refund #2: 2
-
Refund #3: 5
Result:
-
Total Refunded Amount: 10
-
Remaining Refundable Amount: 0
Final Transaction Status: PARTIAL REFUNDED description here
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/paysecure_api_documentation_live/apis/api.rb', line 48 def partial_refund_api(accept, body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/api/v1/purchases/purchaseid/refund', Server::SERVER_3) .header_param(new_parameter('application/json', key: 'Content-Type')) .header_param(new_parameter(accept, key: 'Accept') .is_required(true)) .body_param(new_parameter(body) .is_required(true)) .body_serializer(proc do |param| param.to_json unless param.nil? end)) .response(new_response_handler .is_response_void(true) .is_api_response(true) .local_error('401', 'Unauthorized', Success51Exception)) .execute end |
#partial_refund_status_api(body) ⇒ ApiResponse
TODO: type endpoint description here description here
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/paysecure_api_documentation_live/apis/api.rb', line 73 def partial_refund_status_api(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/api/v1/refundStatus/purchaseid', Server::SERVER_3) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .body_serializer(proc do |param| param.to_json unless param.nil? end)) .response(new_response_handler .is_response_void(true) .is_api_response(true) .local_error('401', 'Unauthorized', Success51Exception)) .execute end |