Class: SubskribeDevClient::EntitiesApi
- Inherits:
-
Object
- Object
- SubskribeDevClient::EntitiesApi
- Defined in:
- lib/subskribe_dev/api/entities_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create(opts = {}) ⇒ nil
Create an entity Create an entity.
-
#create_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create an entity Create an entity.
-
#delete_entity(id, opts = {}) ⇒ nil
Delete entity Delete the entity if there is no data associated with it.
-
#delete_entity_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete entity Delete the entity if there is no data associated with it.
-
#get_entities(opts = {}) ⇒ Array<EntityJson>
Gets entities Gets all entities.
-
#get_entities_with_http_info(opts = {}) ⇒ Array<(Array<EntityJson>, Fixnum, Hash)>
Gets entities Gets all entities.
-
#get_entity_by_id(id, opts = {}) ⇒ Entity
Gets entity details Gets the entity details of the specified entity id.
-
#get_entity_by_id_with_http_info(id, opts = {}) ⇒ Array<(Entity, Fixnum, Hash)>
Gets entity details Gets the entity details of the specified entity id.
-
#get_logo(entity_id, opts = {}) ⇒ nil
Get entity logo Get the current logo stored for the given entity.
-
#get_logo_with_http_info(entity_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get entity logo Get the current logo stored for the given entity.
-
#initialize(api_client = ApiClient.default) ⇒ EntitiesApi
constructor
A new instance of EntitiesApi.
-
#order_entity_migration(opts = {}) ⇒ nil
Update order entity Move order to a target entity.
-
#order_entity_migration_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update order entity Move order to a target entity.
-
#subscription_entity_migration(opts = {}) ⇒ nil
Move subscription to a target entity Move subscription and associated transactions to a target entity.
-
#subscription_entity_migration_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Move subscription to a target entity Move subscription and associated transactions to a target entity.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ EntitiesApi
Returns a new instance of EntitiesApi.
19 20 21 |
# File 'lib/subskribe_dev/api/entities_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/subskribe_dev/api/entities_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create(opts = {}) ⇒ nil
Create an entity Create an entity. On success return the created entity.
27 28 29 30 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 27 def create(opts = {}) create_with_http_info(opts) nil end |
#create_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create an entity Create an entity. On success return the created entity.
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 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 37 def create_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitiesApi.create ...' end # resource path local_var_path = '/entities' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['ApiKeyAuth'] 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: EntitiesApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_entity(id, opts = {}) ⇒ nil
Delete entity Delete the entity if there is no data associated with it.
76 77 78 79 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 76 def delete_entity(id, opts = {}) delete_entity_with_http_info(id, opts) nil end |
#delete_entity_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete entity Delete the entity if there is no data associated with it.
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 116 117 118 119 120 121 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 86 def delete_entity_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitiesApi.delete_entity ...' 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 EntitiesApi.delete_entity" end # resource path local_var_path = '/entities/{id}'.sub('{' + 'id' + '}', 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/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:DELETE, 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: EntitiesApi#delete_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_entities(opts = {}) ⇒ Array<EntityJson>
Gets entities Gets all entities
126 127 128 129 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 126 def get_entities(opts = {}) data, _status_code, _headers = get_entities_with_http_info(opts) data end |
#get_entities_with_http_info(opts = {}) ⇒ Array<(Array<EntityJson>, Fixnum, Hash)>
Gets entities Gets all entities
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 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 135 def get_entities_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitiesApi.get_entities ...' end # resource path local_var_path = '/entities' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'Array<EntityJson>') if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitiesApi#get_entities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_entity_by_id(id, opts = {}) ⇒ Entity
Gets entity details Gets the entity details of the specified entity id
173 174 175 176 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 173 def get_entity_by_id(id, opts = {}) data, _status_code, _headers = get_entity_by_id_with_http_info(id, opts) data end |
#get_entity_by_id_with_http_info(id, opts = {}) ⇒ Array<(Entity, Fixnum, Hash)>
Gets entity details Gets the entity details of the specified entity id
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 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 183 def get_entity_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitiesApi.get_entity_by_id ...' 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 EntitiesApi.get_entity_by_id" end # resource path local_var_path = '/entities/{id}'.sub('{' + 'id' + '}', 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/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'Entity') if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitiesApi#get_entity_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_logo(entity_id, opts = {}) ⇒ nil
Get entity logo Get the current logo stored for the given entity
225 226 227 228 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 225 def get_logo(entity_id, opts = {}) get_logo_with_http_info(entity_id, opts) nil end |
#get_logo_with_http_info(entity_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get entity logo Get the current logo stored for the given entity
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 268 269 270 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 235 def get_logo_with_http_info(entity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitiesApi.get_logo ...' end # verify the required parameter 'entity_id' is set if @api_client.config.client_side_validation && entity_id.nil? fail ArgumentError, "Missing the required parameter 'entity_id' when calling EntitiesApi.get_logo" end # resource path local_var_path = '/entities/logo/{entityId}'.sub('{' + 'entityId' + '}', entity_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['image/png', 'application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: EntitiesApi#get_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#order_entity_migration(opts = {}) ⇒ nil
Update order entity Move order to a target entity
277 278 279 280 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 277 def order_entity_migration(opts = {}) order_entity_migration_with_http_info(opts) nil end |
#order_entity_migration_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update order entity Move order to a target entity
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 316 317 318 319 320 321 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 288 def order_entity_migration_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitiesApi.order_entity_migration ...' end # resource path local_var_path = '/entities/migrate/order' # query parameters query_params = {} query_params[:'targetEntityId'] = opts[:'target_entity_id'] if !opts[:'target_entity_id'].nil? query_params[:'orderId'] = opts[:'order_id'] if !opts[:'order_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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: EntitiesApi#order_entity_migration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#subscription_entity_migration(opts = {}) ⇒ nil
Move subscription to a target entity Move subscription and associated transactions to a target entity
328 329 330 331 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 328 def subscription_entity_migration(opts = {}) subscription_entity_migration_with_http_info(opts) nil end |
#subscription_entity_migration_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Move subscription to a target entity Move subscription and associated transactions to a target entity
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/subskribe_dev/api/entities_api.rb', line 339 def subscription_entity_migration_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EntitiesApi.subscription_entity_migration ...' end # resource path local_var_path = '/entities/migrate/subscription' # query parameters query_params = {} query_params[:'targetEntityId'] = opts[:'target_entity_id'] if !opts[:'target_entity_id'].nil? query_params[:'subscriptionId'] = opts[:'subscription_id'] if !opts[:'subscription_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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: EntitiesApi#subscription_entity_migration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |