Class: TripletexRubyClient::LedgerpostingApi
- Inherits:
-
Object
- Object
- TripletexRubyClient::LedgerpostingApi
- Defined in:
- lib/tripletex_ruby_client/api/ledgerposting_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get(id, opts = {}) ⇒ ResponseWrapperPosting
Find postings by ID.
-
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperPosting, Fixnum, Hash)>
Find postings by ID.
-
#initialize(api_client = ApiClient.default) ⇒ LedgerpostingApi
constructor
A new instance of LedgerpostingApi.
-
#open_post(date, opts = {}) ⇒ ListResponsePosting
Find open posts corresponding with sent data.
-
#open_post_with_http_info(date, opts = {}) ⇒ Array<(ListResponsePosting, Fixnum, Hash)>
Find open posts corresponding with sent data.
-
#search(date_from, date_to, opts = {}) ⇒ ListResponsePosting
Find postings corresponding with sent data.
-
#search_with_http_info(date_from, date_to, opts = {}) ⇒ Array<(ListResponsePosting, Fixnum, Hash)>
Find postings corresponding with sent data.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LedgerpostingApi
Returns a new instance of LedgerpostingApi.
19 20 21 |
# File 'lib/tripletex_ruby_client/api/ledgerposting_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/ledgerposting_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get(id, opts = {}) ⇒ ResponseWrapperPosting
Find postings by ID.
28 29 30 31 |
# File 'lib/tripletex_ruby_client/api/ledgerposting_api.rb', line 28 def get(id, opts = {}) data, _status_code, _headers = get_with_http_info(id, opts) data end |
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperPosting, Fixnum, Hash)>
Find postings by ID.
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 |
# File 'lib/tripletex_ruby_client/api/ledgerposting_api.rb', line 39 def get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgerpostingApi.get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling LedgerpostingApi.get" end # resource path local_var_path = '/ledger/posting/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].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(: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 => 'ResponseWrapperPosting') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgerpostingApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#open_post(date, opts = {}) ⇒ ListResponsePosting
Find open posts corresponding with sent data.
91 92 93 94 |
# File 'lib/tripletex_ruby_client/api/ledgerposting_api.rb', line 91 def open_post(date, opts = {}) data, _status_code, _headers = open_post_with_http_info(date, opts) data end |
#open_post_with_http_info(date, opts = {}) ⇒ Array<(ListResponsePosting, Fixnum, Hash)>
Find open posts corresponding with sent data.
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 157 158 |
# File 'lib/tripletex_ruby_client/api/ledgerposting_api.rb', line 112 def open_post_with_http_info(date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgerpostingApi.open_post ...' end # verify the required parameter 'date' is set if @api_client.config.client_side_validation && date.nil? fail ArgumentError, "Missing the required parameter 'date' when calling LedgerpostingApi.open_post" end # resource path local_var_path = '/ledger/posting/openPost' # query parameters query_params = {} query_params[:'date'] = date query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? query_params[:'supplierId'] = opts[:'supplier_id'] if !opts[:'supplier_id'].nil? query_params[:'customerId'] = opts[:'customer_id'] if !opts[:'customer_id'].nil? query_params[:'employeeId'] = opts[:'employee_id'] if !opts[:'employee_id'].nil? query_params[:'departmentId'] = opts[:'department_id'] if !opts[:'department_id'].nil? query_params[:'projectId'] = opts[:'project_id'] if !opts[:'project_id'].nil? query_params[:'productId'] = opts[:'product_id'] if !opts[:'product_id'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].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(: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 => 'ListResponsePosting') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgerpostingApi#open_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search(date_from, date_to, opts = {}) ⇒ ListResponsePosting
Find postings corresponding with sent data.
178 179 180 181 |
# File 'lib/tripletex_ruby_client/api/ledgerposting_api.rb', line 178 def search(date_from, date_to, opts = {}) data, _status_code, _headers = search_with_http_info(date_from, date_to, opts) data end |
#search_with_http_info(date_from, date_to, opts = {}) ⇒ Array<(ListResponsePosting, Fixnum, Hash)>
Find postings corresponding with sent data.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 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 |
# File 'lib/tripletex_ruby_client/api/ledgerposting_api.rb', line 202 def search_with_http_info(date_from, date_to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgerpostingApi.search ...' end # verify the required parameter 'date_from' is set if @api_client.config.client_side_validation && date_from.nil? fail ArgumentError, "Missing the required parameter 'date_from' when calling LedgerpostingApi.search" end # verify the required parameter 'date_to' is set if @api_client.config.client_side_validation && date_to.nil? fail ArgumentError, "Missing the required parameter 'date_to' when calling LedgerpostingApi.search" end if @api_client.config.client_side_validation && opts[:'type'] && !['INCOMING_PAYMENT', 'INCOMING_PAYMENT_OPPOSITE', 'INVOICE_EXPENSE', 'OUTGOING_INVOICE_CUSTOMER_POSTING'].include?(opts[:'type']) fail ArgumentError, 'invalid value for "type", must be one of INCOMING_PAYMENT, INCOMING_PAYMENT_OPPOSITE, INVOICE_EXPENSE, OUTGOING_INVOICE_CUSTOMER_POSTING' end # resource path local_var_path = '/ledger/posting' # query parameters query_params = {} query_params[:'dateFrom'] = date_from query_params[:'dateTo'] = date_to query_params[:'openPostings'] = opts[:'open_postings'] if !opts[:'open_postings'].nil? query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? query_params[:'supplierId'] = opts[:'supplier_id'] if !opts[:'supplier_id'].nil? query_params[:'customerId'] = opts[:'customer_id'] if !opts[:'customer_id'].nil? query_params[:'employeeId'] = opts[:'employee_id'] if !opts[:'employee_id'].nil? query_params[:'departmentId'] = opts[:'department_id'] if !opts[:'department_id'].nil? query_params[:'projectId'] = opts[:'project_id'] if !opts[:'project_id'].nil? query_params[:'productId'] = opts[:'product_id'] if !opts[:'product_id'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].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(: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 => 'ListResponsePosting') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgerpostingApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |