Class: StorecoveApi::ShopAccountsApi
- Inherits:
-
Object
- Object
- StorecoveApi::ShopAccountsApi
- Defined in:
- lib/storecove/api/shop_accounts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_shop_account(shop_account, opts = {}) ⇒ ShopAccountResult
Create ShopAccount Create a new ShopAccount.
-
#create_shop_account_with_http_info(shop_account, opts = {}) ⇒ Array<(ShopAccountResult, Fixnum, Hash)>
Create ShopAccount Create a new ShopAccount.
-
#delete_shop_account(id, opts = {}) ⇒ nil
Delete ShopAccount Delete a specific ShopAccount.
-
#delete_shop_account_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete ShopAccount Delete a specific ShopAccount.
-
#get_shop_account(id, opts = {}) ⇒ ShopAccountResult
Get ShopAccount Get a specific ShopAccount.
-
#get_shop_account_with_http_info(id, opts = {}) ⇒ Array<(ShopAccountResult, Fixnum, Hash)>
Get ShopAccount Get a specific ShopAccount.
-
#initialize(api_client = ApiClient.default) ⇒ ShopAccountsApi
constructor
A new instance of ShopAccountsApi.
-
#shop_accounts_auth_failures(opts = {}) ⇒ Array<ShopAccountResult>
Get ShopAccounts with authorization failures Get ShopAccounts with authorization failures.
-
#shop_accounts_auth_failures_with_http_info(opts = {}) ⇒ Array<(Array<ShopAccountResult>, Fixnum, Hash)>
Get ShopAccounts with authorization failures Get ShopAccounts with authorization failures.
-
#shop_accounts_index(external_user_id, opts = {}) ⇒ Array<ShopAccountResult>
Get ShopAccounts for an entity Retrieve all active ShopAccounts for one of your entities.
-
#shop_accounts_index_with_http_info(external_user_id, opts = {}) ⇒ Array<(Array<ShopAccountResult>, Fixnum, Hash)>
Get ShopAccounts for an entity Retrieve all active ShopAccounts for one of your entities.
-
#update_shop_account(id, shop_account, opts = {}) ⇒ ShopAccountResult
Update ShopAccount Update a specific ShopAccount.
-
#update_shop_account_with_http_info(id, shop_account, opts = {}) ⇒ Array<(ShopAccountResult, Fixnum, Hash)>
Update ShopAccount Update a specific ShopAccount.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ShopAccountsApi
Returns a new instance of ShopAccountsApi.
19 20 21 |
# File 'lib/storecove/api/shop_accounts_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/storecove/api/shop_accounts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_shop_account(shop_account, opts = {}) ⇒ ShopAccountResult
Create ShopAccount Create a new ShopAccount. include::examples/shop_accounts/create_shop_account/tabs.adoc[]
28 29 30 31 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 28 def create_shop_account(shop_account, opts = {}) data, _status_code, _headers = create_shop_account_with_http_info(shop_account, opts) return data end |
#create_shop_account_with_http_info(shop_account, opts = {}) ⇒ Array<(ShopAccountResult, Fixnum, Hash)>
Create ShopAccount Create a new ShopAccount. include::examples/shop_accounts/create_shop_account/tabs.adoc[]
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 76 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 38 def create_shop_account_with_http_info(shop_account, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ShopAccountsApi.create_shop_account ..." end # verify the required parameter 'shop_account' is set if @api_client.config.client_side_validation && shop_account.nil? fail ArgumentError, "Missing the required parameter 'shop_account' when calling ShopAccountsApi.create_shop_account" end # resource path local_var_path = "/shop_accounts" # 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(shop_account) auth_names = ['Bearer'] 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 => 'ShopAccountResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ShopAccountsApi#create_shop_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_shop_account(id, opts = {}) ⇒ nil
Delete ShopAccount Delete a specific ShopAccount. include::examples/shop_accounts/delete_shop_account/tabs.adoc[]
83 84 85 86 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 83 def delete_shop_account(id, opts = {}) delete_shop_account_with_http_info(id, opts) return nil end |
#delete_shop_account_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete ShopAccount Delete a specific ShopAccount. include::examples/shop_accounts/delete_shop_account/tabs.adoc[]
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 130 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 93 def delete_shop_account_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ShopAccountsApi.delete_shop_account ..." 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 ShopAccountsApi.delete_shop_account" end # resource path local_var_path = "/shop_accounts/{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']) # 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 = nil auth_names = ['Bearer'] 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: ShopAccountsApi#delete_shop_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_shop_account(id, opts = {}) ⇒ ShopAccountResult
Get ShopAccount Get a specific ShopAccount. include::examples/shop_accounts/get_shop_account/tabs.adoc[]
137 138 139 140 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 137 def get_shop_account(id, opts = {}) data, _status_code, _headers = get_shop_account_with_http_info(id, opts) return data end |
#get_shop_account_with_http_info(id, opts = {}) ⇒ Array<(ShopAccountResult, Fixnum, Hash)>
Get ShopAccount Get a specific ShopAccount. include::examples/shop_accounts/get_shop_account/tabs.adoc[]
147 148 149 150 151 152 153 154 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 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 147 def get_shop_account_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ShopAccountsApi.get_shop_account ..." 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 ShopAccountsApi.get_shop_account" end # resource path local_var_path = "/shop_accounts/{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']) # 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 = nil auth_names = ['Bearer'] 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 => 'ShopAccountResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ShopAccountsApi#get_shop_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#shop_accounts_auth_failures(opts = {}) ⇒ Array<ShopAccountResult>
Get ShopAccounts with authorization failures Get ShopAccounts with authorization failures. include::examples/shop_accounts/shop_accounts_auth_failures/tabs.adoc[]
191 192 193 194 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 191 def shop_accounts_auth_failures(opts = {}) data, _status_code, _headers = shop_accounts_auth_failures_with_http_info(opts) return data end |
#shop_accounts_auth_failures_with_http_info(opts = {}) ⇒ Array<(Array<ShopAccountResult>, Fixnum, Hash)>
Get ShopAccounts with authorization failures Get ShopAccounts with authorization failures. include::examples/shop_accounts/shop_accounts_auth_failures/tabs.adoc[]
200 201 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 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 200 def shop_accounts_auth_failures_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ShopAccountsApi.shop_accounts_auth_failures ..." end # resource path local_var_path = "/shop_accounts/auth_failures" # 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 = nil auth_names = ['Bearer'] 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<ShopAccountResult>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ShopAccountsApi#shop_accounts_auth_failures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#shop_accounts_index(external_user_id, opts = {}) ⇒ Array<ShopAccountResult>
Get ShopAccounts for an entity Retrieve all active ShopAccounts for one of your entities. include::examples/shop_accounts/shop_accounts_index/tabs.adoc[]
241 242 243 244 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 241 def shop_accounts_index(external_user_id, opts = {}) data, _status_code, _headers = shop_accounts_index_with_http_info(external_user_id, opts) return data end |
#shop_accounts_index_with_http_info(external_user_id, opts = {}) ⇒ Array<(Array<ShopAccountResult>, Fixnum, Hash)>
Get ShopAccounts for an entity Retrieve all active ShopAccounts for one of your entities. include::examples/shop_accounts/shop_accounts_index/tabs.adoc[]
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 251 def shop_accounts_index_with_http_info(external_user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ShopAccountsApi.shop_accounts_index ..." end # verify the required parameter 'external_user_id' is set if @api_client.config.client_side_validation && external_user_id.nil? fail ArgumentError, "Missing the required parameter 'external_user_id' when calling ShopAccountsApi.shop_accounts_index" end # resource path local_var_path = "/shop_accounts" # query parameters query_params = {} query_params[:'external_user_id'] = external_user_id # 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 = nil auth_names = ['Bearer'] 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<ShopAccountResult>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ShopAccountsApi#shop_accounts_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_shop_account(id, shop_account, opts = {}) ⇒ ShopAccountResult
Update ShopAccount Update a specific ShopAccount. include::examples/shop_accounts/update_shop_account/tabs.adoc[]
298 299 300 301 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 298 def update_shop_account(id, shop_account, opts = {}) data, _status_code, _headers = update_shop_account_with_http_info(id, shop_account, opts) return data end |
#update_shop_account_with_http_info(id, shop_account, opts = {}) ⇒ Array<(ShopAccountResult, Fixnum, Hash)>
Update ShopAccount Update a specific ShopAccount. include::examples/shop_accounts/update_shop_account/tabs.adoc[]
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/storecove/api/shop_accounts_api.rb', line 309 def update_shop_account_with_http_info(id, shop_account, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ShopAccountsApi.update_shop_account ..." 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 ShopAccountsApi.update_shop_account" end # verify the required parameter 'shop_account' is set if @api_client.config.client_side_validation && shop_account.nil? fail ArgumentError, "Missing the required parameter 'shop_account' when calling ShopAccountsApi.update_shop_account" end # resource path local_var_path = "/shop_accounts/{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']) # 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(shop_account) auth_names = ['Bearer'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ShopAccountResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ShopAccountsApi#update_shop_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |