Class: TripletexRubyClient::LedgervoucherhistoricalApi
- Inherits:
-
Object
- Object
- TripletexRubyClient::LedgervoucherhistoricalApi
- Defined in:
- lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#close_postings(opts = {}) ⇒ nil
- BETA
-
Close postings.
-
#close_postings_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Close postings.
-
#initialize(api_client = ApiClient.default) ⇒ LedgervoucherhistoricalApi
constructor
A new instance of LedgervoucherhistoricalApi.
-
#post_employee(opts = {}) ⇒ ResponseWrapperEmployee
- BETA
-
Create one employee, based on import from external system.
-
#post_employee_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperEmployee, Fixnum, Hash)>
- BETA
-
Create one employee, based on import from external system.
-
#post_historical(opts = {}) ⇒ ListResponseHistoricalVoucher
- BETA
-
API endpoint for creating historical vouchers.
-
#post_historical_with_http_info(opts = {}) ⇒ Array<(ListResponseHistoricalVoucher, Fixnum, Hash)>
- BETA
-
API endpoint for creating historical vouchers.
-
#reverse_historical_vouchers(opts = {}) ⇒ nil
- BETA
-
Deletes all historical vouchers.
-
#reverse_historical_vouchers_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Deletes all historical vouchers.
-
#upload_attachment(voucher_id, file, opts = {}) ⇒ nil
Upload attachment to voucher.
-
#upload_attachment_with_http_info(voucher_id, file, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Upload attachment to voucher.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LedgervoucherhistoricalApi
Returns a new instance of LedgervoucherhistoricalApi.
19 20 21 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#close_postings(opts = {}) ⇒ nil
- BETA
-
Close postings.
27 28 29 30 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 27 def close_postings(opts = {}) close_postings_with_http_info(opts) nil end |
#close_postings_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Close postings.
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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 37 def close_postings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherhistoricalApi.close_postings ...' end # resource path local_var_path = '/ledger/voucher/historical/:closePostings' # query parameters query_params = {} query_params[:'postingIds'] = opts[:'posting_ids'] if !opts[:'posting_ids'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherhistoricalApi#close_postings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_employee(opts = {}) ⇒ ResponseWrapperEmployee
- BETA
-
Create one employee, based on import from external system. Validation is less strict, ie. employee department isn’t required.
73 74 75 76 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 73 def post_employee(opts = {}) data, _status_code, _headers = post_employee_with_http_info(opts) data end |
#post_employee_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperEmployee, Fixnum, Hash)>
- BETA
-
Create one employee, based on import from external system. Validation is less strict, ie. employee department isn't required.
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 112 113 114 115 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 83 def post_employee_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherhistoricalApi.post_employee ...' end # resource path local_var_path = '/ledger/voucher/historical/employee' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperEmployee') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherhistoricalApi#post_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_historical(opts = {}) ⇒ ListResponseHistoricalVoucher
- BETA
-
API endpoint for creating historical vouchers. These are vouchers created outside Tripletex, and should be from closed accounting years. The intended usage is to get access to historical transcations in Tripletex. Also creates postings. All amount fields in postings will be used. VAT postings must be included, these are not generated automatically like they are for normal vouchers in Tripletex. Requires the \"All vouchers\" and \"Advanced Voucher\" permissions.
122 123 124 125 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 122 def post_historical(opts = {}) data, _status_code, _headers = post_historical_with_http_info(opts) data end |
#post_historical_with_http_info(opts = {}) ⇒ Array<(ListResponseHistoricalVoucher, Fixnum, Hash)>
- BETA
-
API endpoint for creating historical vouchers. These are vouchers created outside Tripletex, and should be from closed accounting years. The intended usage is to get access to historical transcations in Tripletex. Also creates postings. All amount fields in postings will be used. VAT postings must be included, these are not generated automatically like they are for normal vouchers in Tripletex. Requires the \"All vouchers\" and \"Advanced Voucher\" permissions.
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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 133 def post_historical_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherhistoricalApi.post_historical ...' end # resource path local_var_path = '/ledger/voucher/historical/historical' # query parameters query_params = {} query_params[:'comment'] = opts[:'comment'] if !opts[:'comment'].nil? # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['tokenAuthScheme'] 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 => 'ListResponseHistoricalVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherhistoricalApi#post_historical\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reverse_historical_vouchers(opts = {}) ⇒ nil
- BETA
-
Deletes all historical vouchers. Requires the "All vouchers" and "Advanced Voucher" permissions.
171 172 173 174 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 171 def reverse_historical_vouchers(opts = {}) reverse_historical_vouchers_with_http_info(opts) nil end |
#reverse_historical_vouchers_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Deletes all historical vouchers. Requires the "All vouchers" and "Advanced Voucher" permissions.
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 180 def reverse_historical_vouchers_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherhistoricalApi.reverse_historical_vouchers ...' end # resource path local_var_path = '/ledger/voucher/historical/:reverseHistoricalVouchers' # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherhistoricalApi#reverse_historical_vouchers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_attachment(voucher_id, file, opts = {}) ⇒ nil
Upload attachment to voucher. If the voucher already has an attachment the content will be appended to the existing attachment as new PDF page(s). Valid document formats are PDF, PNG, JPEG and TIFF. Non PDF formats will be converted to PDF. Send as multipart form.
216 217 218 219 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 216 def (voucher_id, file, opts = {}) (voucher_id, file, opts) nil end |
#upload_attachment_with_http_info(voucher_id, file, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Upload attachment to voucher. If the voucher already has an attachment the content will be appended to the existing attachment as new PDF page(s). Valid document formats are PDF, PNG, JPEG and TIFF. Non PDF formats will be converted to PDF. Send as multipart form.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/tripletex_ruby_client/api/ledgervoucherhistorical_api.rb', line 227 def (voucher_id, file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherhistoricalApi.upload_attachment ...' end # verify the required parameter 'voucher_id' is set if @api_client.config.client_side_validation && voucher_id.nil? fail ArgumentError, "Missing the required parameter 'voucher_id' when calling LedgervoucherhistoricalApi.upload_attachment" end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling LedgervoucherhistoricalApi.upload_attachment" end # resource path local_var_path = '/ledger/voucher/historical/{voucherId}/attachment'.sub('{' + 'voucherId' + '}', voucher_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherhistoricalApi#upload_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |