Class: Wallee::TransactionTerminalService
- Inherits:
-
Object
- Object
- Wallee::TransactionTerminalService
- Defined in:
- lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ TransactionTerminalService
constructor
A new instance of TransactionTerminalService.
-
#receipt(space_id, transaction_id, type_id, width, opts = {}) ⇒ RenderedTerminalReceipt
getTerminalReceipt Returns the PDF document for the requested terminal receipt with the given page width.
-
#receipt_with_http_info(space_id, transaction_id, type_id, width, opts = {}) ⇒ Array<(RenderedTerminalReceipt, Fixnum, Hash)>
getTerminalReceipt Returns the PDF document for the requested terminal receipt with the given page width.
-
#till_connection_credentials(space_id, transaction_id, terminal_id, opts = {}) ⇒ String
Create Till Connection Credentials This operation creates a set of credentials to use within the WebSocket.
-
#till_connection_credentials_with_http_info(space_id, transaction_id, terminal_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Create Till Connection Credentials This operation creates a set of credentials to use within the WebSocket.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TransactionTerminalService
Returns a new instance of TransactionTerminalService.
24 25 26 |
# File 'lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb', line 24 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
22 23 24 |
# File 'lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb', line 22 def api_client @api_client end |
Instance Method Details
#receipt(space_id, transaction_id, type_id, width, opts = {}) ⇒ RenderedTerminalReceipt
getTerminalReceipt Returns the PDF document for the requested terminal receipt with the given page width.
36 37 38 39 |
# File 'lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb', line 36 def receipt(space_id, transaction_id, type_id, width, opts = {}) data, _status_code, _headers = receipt_with_http_info(space_id, transaction_id, type_id, width, opts) return data end |
#receipt_with_http_info(space_id, transaction_id, type_id, width, opts = {}) ⇒ Array<(RenderedTerminalReceipt, Fixnum, Hash)>
getTerminalReceipt Returns the PDF document for the requested terminal receipt with the given page width.
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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb', line 49 def receipt_with_http_info(space_id, transaction_id, type_id, width, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TransactionTerminalService.receipt ..." end # verify the required parameter 'space_id' is set fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionTerminalService.receipt" if space_id.nil? # verify the required parameter 'transaction_id' is set fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionTerminalService.receipt" if transaction_id.nil? # verify the required parameter 'type_id' is set fail ArgumentError, "Missing the required parameter 'type_id' when calling TransactionTerminalService.receipt" if type_id.nil? # verify the required parameter 'width' is set fail ArgumentError, "Missing the required parameter 'width' when calling TransactionTerminalService.receipt" if width.nil? # resource path local_var_path = "/transaction-terminal/receipt".sub('{format}','json') # query parameters query_params = {} query_params[:'spaceId'] = space_id query_params[:'transactionId'] = transaction_id query_params[:'typeId'] = type_id query_params[:'width'] = width # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json;charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['*/*'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RenderedTerminalReceipt') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionTerminalService#receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#till_connection_credentials(space_id, transaction_id, terminal_id, opts = {}) ⇒ String
Create Till Connection Credentials This operation creates a set of credentials to use within the WebSocket.
109 110 111 112 |
# File 'lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb', line 109 def till_connection_credentials(space_id, transaction_id, terminal_id, opts = {}) data, _status_code, _headers = till_connection_credentials_with_http_info(space_id, transaction_id, terminal_id, opts) return data end |
#till_connection_credentials_with_http_info(space_id, transaction_id, terminal_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Create Till Connection Credentials This operation creates a set of credentials to use within the WebSocket.
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 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb', line 122 def till_connection_credentials_with_http_info(space_id, transaction_id, terminal_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TransactionTerminalService.till_connection_credentials ..." end # verify the required parameter 'space_id' is set fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionTerminalService.till_connection_credentials" if space_id.nil? # verify the required parameter 'transaction_id' is set fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionTerminalService.till_connection_credentials" if transaction_id.nil? # verify the required parameter 'terminal_id' is set fail ArgumentError, "Missing the required parameter 'terminal_id' when calling TransactionTerminalService.till_connection_credentials" if terminal_id.nil? # resource path local_var_path = "/transaction-terminal/till-connection-credentials".sub('{format}','json') # query parameters query_params = {} query_params[:'spaceId'] = space_id query_params[:'transactionId'] = transaction_id query_params[:'terminalId'] = terminal_id query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionTerminalService#till_connection_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |