Class: GriffNode::SystemApi
- Inherits:
-
Object
- Object
- GriffNode::SystemApi
- Defined in:
- lib/griffnode/api/system_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_health(opts = {}) ⇒ GetHealth200Response
API health check.
-
#get_health_with_http_info(opts = {}) ⇒ Array<(GetHealth200Response, Integer, Hash)>
API health check.
-
#hosted_checkout_redirect(pk, amount, crypto, opts = {}) ⇒ nil
Hosted-checkout redirect (browser flow, publishable key) Browser-facing redirect to the hosted payment page, authenticated by a publishable key in the query string (safe to expose client-side).
-
#hosted_checkout_redirect_with_http_info(pk, amount, crypto, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Hosted-checkout redirect (browser flow, publishable key) Browser-facing redirect to the hosted payment page, authenticated by a publishable key in the query string (safe to expose client-side).
-
#initialize(api_client = ApiClient.default) ⇒ SystemApi
constructor
A new instance of SystemApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/griffnode/api/system_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_health(opts = {}) ⇒ GetHealth200Response
API health check
25 26 27 28 |
# File 'lib/griffnode/api/system_api.rb', line 25 def get_health(opts = {}) data, _status_code, _headers = get_health_with_http_info(opts) data end |
#get_health_with_http_info(opts = {}) ⇒ Array<(GetHealth200Response, Integer, Hash)>
API health check
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 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/griffnode/api/system_api.rb', line 33 def get_health_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SystemApi.get_health ...' end # resource path local_var_path = '/health' # query parameters query_params = opts[:query_params] || {} # 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'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetHealth200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"SystemApi.get_health", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SystemApi#get_health\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#hosted_checkout_redirect(pk, amount, crypto, opts = {}) ⇒ nil
Hosted-checkout redirect (browser flow, publishable key) Browser-facing redirect to the hosted payment page, authenticated by a publishable key in the query string (safe to expose client-side). Not used by the server-side SDKs — included for completeness.
85 86 87 88 |
# File 'lib/griffnode/api/system_api.rb', line 85 def hosted_checkout_redirect(pk, amount, crypto, opts = {}) hosted_checkout_redirect_with_http_info(pk, amount, crypto, opts) nil end |
#hosted_checkout_redirect_with_http_info(pk, amount, crypto, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Hosted-checkout redirect (browser flow, publishable key) Browser-facing redirect to the hosted payment page, authenticated by a publishable key in the query string (safe to expose client-side). Not used by the server-side SDKs — included for completeness.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 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 |
# File 'lib/griffnode/api/system_api.rb', line 98 def hosted_checkout_redirect_with_http_info(pk, amount, crypto, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SystemApi.hosted_checkout_redirect ...' end # verify the required parameter 'pk' is set if @api_client.config.client_side_validation && pk.nil? fail ArgumentError, "Missing the required parameter 'pk' when calling SystemApi.hosted_checkout_redirect" end # verify the required parameter 'amount' is set if @api_client.config.client_side_validation && amount.nil? fail ArgumentError, "Missing the required parameter 'amount' when calling SystemApi.hosted_checkout_redirect" end # verify the required parameter 'crypto' is set if @api_client.config.client_side_validation && crypto.nil? fail ArgumentError, "Missing the required parameter 'crypto' when calling SystemApi.hosted_checkout_redirect" end # resource path local_var_path = '/pay' # query parameters query_params = opts[:query_params] || {} query_params[:'pk'] = pk query_params[:'amount'] = amount query_params[:'crypto'] = crypto query_params[:'link'] = opts[:'link'] if !opts[:'link'].nil? # 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'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"SystemApi.hosted_checkout_redirect", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SystemApi#hosted_checkout_redirect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |