Class: StickyIoRestfulApiV2025731::PaymentRouterController

Inherits:
BaseController
  • Object
show all
Defined in:
lib/sticky_io_restful_api_v2025731/controllers/payment_router_controller.rb

Overview

PaymentRouterController

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 StickyIoRestfulApiV2025731::BaseController

Instance Method Details

#payment_router_gateways(domain, v2_ext, payment_router_id) ⇒ ApiResponse

Fetch payment router’s associated gateways. #### Request Parameters | Parameter | Example | Required | Comments | | — | — | — | — | | ‘page` | 1 | optional | Page number of the gateway list | | per_page | 15 | optional | Number of gateways to list per page.
**Maximum limit : 100** | | `gateway_status` | 1 | optional | 1 or 0, if need payment gateway status in response or not | #### Response Data Response parameters expected in object contained within the `data` field: | Field | Data Type | Description | | — | — | — | | lbc_id | Integer | The ID of payment router. | | gateway_id | Integer | The ID of gateway profile associated with the payment router | | monthly_cap | Integer | This is the monthly cap/limit for the gateway | | initial_order_count | Integer | Count of initial orders | | declines_count | Integer | Count of declined orders | | rebill_order_count | Integer | Count of subscription orders | | gateway | Object | A JSON object for further gateway specific details | | gateway_status | String | Status of gateway if its Active/Inactive/Gateway Decline Limit Met/Maxed Out. | The payload for gateway from the previous table above is returned as a JSON object. The details of gateway is formatted like in the table below. | Field | Data Type | Description | | — | — | — | | account_id | string | The account ID of gateway | | createdOn | String | The date when gateway profile was created | | current_monthly_amount | Integer | This is the current amount for the month on the gateway. | | id | Number | This is the ID of gateway profile | | alias | Number | The Gateway Profile alias. | | account_name | Number | The account alias | | currency | Number | The Gateway Profile currency details | | fields | Number | The Gateway Profile fields | description here

Parameters:

  • domain (String)

    Required parameter: TODO: type description here

  • v2_ext (String)

    Required parameter: TODO: type description here

  • payment_router_id (String)

    Required parameter: TODO: type

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/sticky_io_restful_api_v2025731/controllers/payment_router_controller.rb', line 50

def payment_router_gateways(domain,
                            v2_ext,
                            payment_router_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/.{domain}{v2_ext}payment_router/{payment_router_id}/gateways',
                                 Server::SERVER_1)
               .template_param(new_parameter(domain, key: 'domain')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(v2_ext, key: 'v2_ext')
                                .is_required(true)
                                .should_encode(true))
               .template_param(new_parameter(payment_router_id, key: 'payment_router_id')
                                .is_required(true)
                                .should_encode(true))
               .auth(Single.new('basic')))
    .response(new_response_handler
                .is_response_void(true)
                .is_api_response(true))
    .execute
end