Class: BombBomb::AccountsApi
- Inherits:
-
Object
- Object
- BombBomb::AccountsApi
- Defined in:
- lib/bombbomb/api/accounts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#account_details(opts = {}) ⇒ nil
Get account details.
-
#account_details_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get account details.
-
#create_account(team_id, first_name, last_name, email_address, company_name, phone, opts = {}) ⇒ String
Create Account Creates a new BombBomb account.
-
#create_account_with_http_info(team_id, first_name, last_name, email_address, company_name, phone, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Create Account Creates a new BombBomb account.
-
#get_client_statistics(opts = {}) ⇒ nil
Get Client Statistics Gets general statics for a Client.
-
#get_client_statistics_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get Client Statistics Gets general statics for a Client.
-
#get_user_country(opts = {}) ⇒ nil
Gets user country Gets the users country.
-
#get_user_country_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Gets user country Gets the users country.
-
#initialize(api_client = ApiClient.default) ⇒ AccountsApi
constructor
A new instance of AccountsApi.
-
#reset_api_key(opts = {}) ⇒ nil
Reset API key Resets the current user’s API key and returns the new key.
-
#reset_api_key_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Reset API key Resets the current user's API key and returns the new key.
-
#subscription_purchase_allowed(opts = {}) ⇒ nil
Check if subscription purchase allowed.
-
#subscription_purchase_allowed_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Check if subscription purchase allowed.
-
#update_profile_data(opts = {}) ⇒ nil
Add profile information.
-
#update_profile_data_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Add profile information.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountsApi
Returns a new instance of AccountsApi.
19 20 21 |
# File 'lib/bombbomb/api/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/bombbomb/api/accounts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#account_details(opts = {}) ⇒ nil
Get account details. Get the details of the user’s account.
27 28 29 30 |
# File 'lib/bombbomb/api/accounts_api.rb', line 27 def account_details(opts = {}) account_details_with_http_info(opts) return nil end |
#account_details_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get account details. Get the details of the user's account.
36 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 |
# File 'lib/bombbomb/api/accounts_api.rb', line 36 def account_details_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.account_details ..." end # resource path local_var_path = "/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/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] 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: AccountsApi#account_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_account(team_id, first_name, last_name, email_address, company_name, phone, opts = {}) ⇒ String
Create Account Creates a new BombBomb account. This method is currently only available to paid seat admins.
87 88 89 90 |
# File 'lib/bombbomb/api/accounts_api.rb', line 87 def create_account(team_id, first_name, last_name, email_address, company_name, phone, opts = {}) data, _status_code, _headers = create_account_with_http_info(team_id, first_name, last_name, email_address, company_name, phone, opts) return data end |
#create_account_with_http_info(team_id, first_name, last_name, email_address, company_name, phone, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Create Account Creates a new BombBomb account. This method is currently only available to paid seat admins.
108 109 110 111 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 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/bombbomb/api/accounts_api.rb', line 108 def create_account_with_http_info(team_id, first_name, last_name, email_address, company_name, phone, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.create_account ..." end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling AccountsApi.create_account" end # verify the required parameter 'first_name' is set if @api_client.config.client_side_validation && first_name.nil? fail ArgumentError, "Missing the required parameter 'first_name' when calling AccountsApi.create_account" end # verify the required parameter 'last_name' is set if @api_client.config.client_side_validation && last_name.nil? fail ArgumentError, "Missing the required parameter 'last_name' when calling AccountsApi.create_account" end # verify the required parameter 'email_address' is set if @api_client.config.client_side_validation && email_address.nil? fail ArgumentError, "Missing the required parameter 'email_address' when calling AccountsApi.create_account" end # verify the required parameter 'company_name' is set if @api_client.config.client_side_validation && company_name.nil? fail ArgumentError, "Missing the required parameter 'company_name' when calling AccountsApi.create_account" end # verify the required parameter 'phone' is set if @api_client.config.client_side_validation && phone.nil? fail ArgumentError, "Missing the required parameter 'phone' when calling AccountsApi.create_account" end # resource path local_var_path = "/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/x-www-form-urlencoded']) # form parameters form_params = {} form_params["teamId"] = team_id form_params["firstName"] = first_name form_params["lastName"] = last_name form_params["emailAddress"] = email_address form_params["companyName"] = company_name form_params["phone"] = phone form_params["country"] = opts[:'country'] if !opts[:'country'].nil? form_params["industry"] = opts[:'industry'] if !opts[:'industry'].nil? form_params["address"] = opts[:'address'] if !opts[:'address'].nil? form_params["city"] = opts[:'city'] if !opts[:'city'].nil? form_params["postalCode"] = opts[:'postal_code'] if !opts[:'postal_code'].nil? form_params["preventWelcomeEmail"] = opts[:'prevent_welcome_email'] if !opts[:'prevent_welcome_email'].nil? # http body (model) post_body = nil auth_names = ['BBOAuth2'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#create_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_client_statistics(opts = {}) ⇒ nil
Get Client Statistics Gets general statics for a Client
187 188 189 190 |
# File 'lib/bombbomb/api/accounts_api.rb', line 187 def get_client_statistics(opts = {}) get_client_statistics_with_http_info(opts) return nil end |
#get_client_statistics_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Get Client Statistics Gets general statics for a Client
199 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 235 |
# File 'lib/bombbomb/api/accounts_api.rb', line 199 def get_client_statistics_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_client_statistics ..." end # resource path local_var_path = "/accounts/stats" # query parameters query_params = {} query_params[:'clientId'] = opts[:'client_id'] if !opts[:'client_id'].nil? query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil? query_params[:'statisticValues'] = opts[:'statistic_values'] if !opts[:'statistic_values'].nil? # 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/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] 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: AccountsApi#get_client_statistics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_country(opts = {}) ⇒ nil
Gets user country Gets the users country
241 242 243 244 |
# File 'lib/bombbomb/api/accounts_api.rb', line 241 def get_user_country(opts = {}) get_user_country_with_http_info(opts) return nil end |
#get_user_country_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Gets user country Gets the users country
250 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 |
# File 'lib/bombbomb/api/accounts_api.rb', line 250 def get_user_country_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_user_country ..." end # resource path local_var_path = "/accounts/{clientId}/country" # 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/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] 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: AccountsApi#get_user_country\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reset_api_key(opts = {}) ⇒ nil
Reset API key Resets the current user’s API key and returns the new key
289 290 291 292 |
# File 'lib/bombbomb/api/accounts_api.rb', line 289 def reset_api_key(opts = {}) reset_api_key_with_http_info(opts) return nil end |
#reset_api_key_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Reset API key Resets the current user's API key and returns the new key
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/bombbomb/api/accounts_api.rb', line 298 def reset_api_key_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.reset_api_key ..." end # resource path local_var_path = "/accounts/apikey" # 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/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] 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: AccountsApi#reset_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#subscription_purchase_allowed(opts = {}) ⇒ nil
Check if subscription purchase allowed. Check whether the user can purchase a subscription.
337 338 339 340 |
# File 'lib/bombbomb/api/accounts_api.rb', line 337 def subscription_purchase_allowed(opts = {}) subscription_purchase_allowed_with_http_info(opts) return nil end |
#subscription_purchase_allowed_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Check if subscription purchase allowed. Check whether the user can purchase a subscription.
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 373 374 375 376 377 378 379 |
# File 'lib/bombbomb/api/accounts_api.rb', line 346 def subscription_purchase_allowed_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.subscription_purchase_allowed ..." end # resource path local_var_path = "/accounts/purchaseable" # 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/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['BBOAuth2'] 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: AccountsApi#subscription_purchase_allowed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_profile_data(opts = {}) ⇒ nil
Add profile information. Add profile information to this users account
386 387 388 389 |
# File 'lib/bombbomb/api/accounts_api.rb', line 386 def update_profile_data(opts = {}) update_profile_data_with_http_info(opts) return nil end |
#update_profile_data_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Add profile information. Add profile information to this users account
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/bombbomb/api/accounts_api.rb', line 396 def update_profile_data_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.update_profile_data ..." end # resource path local_var_path = "/account/profile/" # 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/x-www-form-urlencoded']) # form parameters form_params = {} form_params["profileData"] = opts[:'profile_data'] if !opts[:'profile_data'].nil? # http body (model) post_body = nil auth_names = ['BBOAuth2'] 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: AccountsApi#update_profile_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |