Class: SamplifyAPIClient::EventsApi
- Inherits:
-
Object
- Object
- SamplifyAPIClient::EventsApi
- Defined in:
- lib/samplify_api_client/api/events_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#events_accept(event_id, opts = {}) ⇒ Event
accept events Accept event.
-
#events_accept_with_http_info(event_id, opts = {}) ⇒ Array<(Event, Fixnum, Hash)>
accept events Accept event.
-
#events_get(event_id, opts = {}) ⇒ Event
get events Get event.
-
#events_get_with_http_info(event_id, opts = {}) ⇒ Array<(Event, Fixnum, Hash)>
get events Get event.
-
#events_list(opts = {}) ⇒ Events
list events List events.
-
#events_list_with_http_info(opts = {}) ⇒ Array<(Events, Fixnum, Hash)>
list events List events.
-
#events_reject(event_id, opts = {}) ⇒ Event
reject events Reject event.
-
#events_reject_with_http_info(event_id, opts = {}) ⇒ Array<(Event, Fixnum, Hash)>
reject events Reject event.
-
#events_reprice(payload, opts = {}) ⇒ Reprice
reprice events Line item repricing event.
-
#events_reprice_with_http_info(payload, opts = {}) ⇒ Array<(Reprice, Fixnum, Hash)>
reprice events Line item repricing event.
-
#initialize(api_client = ApiClient.default) ⇒ EventsApi
constructor
A new instance of EventsApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/samplify_api_client/api/events_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#events_accept(event_id, opts = {}) ⇒ Event
accept events Accept event
27 28 29 30 |
# File 'lib/samplify_api_client/api/events_api.rb', line 27 def events_accept(event_id, opts = {}) data, _status_code, _headers = events_accept_with_http_info(event_id, opts) data end |
#events_accept_with_http_info(event_id, opts = {}) ⇒ Array<(Event, Fixnum, Hash)>
accept events Accept event
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/samplify_api_client/api/events_api.rb', line 37 def events_accept_with_http_info(event_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.events_accept ...' end # verify the required parameter 'event_id' is set if @api_client.config.client_side_validation && event_id.nil? fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.events_accept" end # resource path local_var_path = '/sample/v1/events/{eventId}/accept'.sub('{' + 'eventId' + '}', event_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.event+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] 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 => 'Event') if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#events_accept\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#events_get(event_id, opts = {}) ⇒ Event
get events Get event
81 82 83 84 |
# File 'lib/samplify_api_client/api/events_api.rb', line 81 def events_get(event_id, opts = {}) data, _status_code, _headers = events_get_with_http_info(event_id, opts) data end |
#events_get_with_http_info(event_id, opts = {}) ⇒ Array<(Event, Fixnum, Hash)>
get events Get event
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 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/samplify_api_client/api/events_api.rb', line 91 def events_get_with_http_info(event_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.events_get ...' end # verify the required parameter 'event_id' is set if @api_client.config.client_side_validation && event_id.nil? fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.events_get" end # resource path local_var_path = '/sample/v1/events/{eventId}'.sub('{' + 'eventId' + '}', event_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.event+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] 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 => 'Event') if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#events_list(opts = {}) ⇒ Events
list events List events.
140 141 142 143 |
# File 'lib/samplify_api_client/api/events_api.rb', line 140 def events_list(opts = {}) data, _status_code, _headers = events_list_with_http_info(opts) data end |
#events_list_with_http_info(opts = {}) ⇒ Array<(Events, Fixnum, Hash)>
list events List events.
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 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 |
# File 'lib/samplify_api_client/api/events_api.rb', line 155 def events_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.events_list ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EventsApi.events_list, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EventsApi.events_list, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling EventsApi.events_list, must be greater than or equal to 0.' end # resource path local_var_path = '/sample/v1/events' # query parameters query_params = {} query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil? query_params[:'extLineItemId'] = opts[:'ext_line_item_id'] if !opts[:'ext_line_item_id'].nil? query_params[:'extProjectId'] = opts[:'ext_project_id'] if !opts[:'ext_project_id'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.events+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] 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 => 'Events') if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#events_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#events_reject(event_id, opts = {}) ⇒ Event
reject events Reject event
213 214 215 216 |
# File 'lib/samplify_api_client/api/events_api.rb', line 213 def events_reject(event_id, opts = {}) data, _status_code, _headers = events_reject_with_http_info(event_id, opts) data end |
#events_reject_with_http_info(event_id, opts = {}) ⇒ Array<(Event, Fixnum, Hash)>
reject events Reject event
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 259 260 261 |
# File 'lib/samplify_api_client/api/events_api.rb', line 223 def events_reject_with_http_info(event_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.events_reject ...' end # verify the required parameter 'event_id' is set if @api_client.config.client_side_validation && event_id.nil? fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.events_reject" end # resource path local_var_path = '/sample/v1/events/{eventId}/reject'.sub('{' + 'eventId' + '}', event_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.event+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] 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 => 'Event') if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#events_reject\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#events_reprice(payload, opts = {}) ⇒ Reprice
reprice events Line item repricing event.
267 268 269 270 |
# File 'lib/samplify_api_client/api/events_api.rb', line 267 def events_reprice(payload, opts = {}) data, _status_code, _headers = events_reprice_with_http_info(payload, opts) data end |
#events_reprice_with_http_info(payload, opts = {}) ⇒ Array<(Reprice, Fixnum, Hash)>
reprice events Line item repricing event.
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/samplify_api_client/api/events_api.rb', line 277 def events_reprice_with_http_info(payload, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.events_reprice ...' end # verify the required parameter 'payload' is set if @api_client.config.client_side_validation && payload.nil? fail ArgumentError, "Missing the required parameter 'payload' when calling EventsApi.events_reprice" end # resource path local_var_path = '/sample/v1/events/lineItems/reprice' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.reprice+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(payload) 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 => 'Reprice') if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#events_reprice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |