Class: Bfwd::AnalyticsApi
- Inherits:
-
Object
- Object
- Bfwd::AnalyticsApi
- Defined in:
- lib/bf_ruby2/api/analytics_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_account_debts(debts_per_account, opts = {}) ⇒ AccountPaymentsResultPagedMetadata
Gets outstanding debts per account, within a date range.
-
#get_account_debts_with_http_info(debts_per_account, opts = {}) ⇒ Array<(AccountPaymentsResultPagedMetadata, Fixnum, Hash)>
Gets outstanding debts per account, within a date range.
-
#get_account_ltv(account_id, end_datetime, opts = {}) ⇒ AccountLTVResultPagedMetadata
Gets an account’s life-time value, as of a given end date.
-
#get_account_ltv_with_http_info(account_id, end_datetime, opts = {}) ⇒ Array<(AccountLTVResultPagedMetadata, Fixnum, Hash)>
Gets an account's life-time value, as of a given end date.
-
#get_account_payments(payments_per_account, opts = {}) ⇒ AccountPaymentsResultPagedMetadata
Gets hourly payments per product, within a date range.
-
#get_account_payments_with_http_info(payments_per_account, opts = {}) ⇒ Array<(AccountPaymentsResultPagedMetadata, Fixnum, Hash)>
Gets hourly payments per product, within a date range.
-
#get_billforward_managed_payments(start_datetime, end_datetime, opts = {}) ⇒ BillforwardManagedPaymentsResultPagedMetadata
Gets all payments managed by BillForward, within a date range.
-
#get_billforward_managed_payments_with_http_info(start_datetime, end_datetime, opts = {}) ⇒ Array<(BillforwardManagedPaymentsResultPagedMetadata, Fixnum, Hash)>
Gets all payments managed by BillForward, within a date range.
-
#get_churn(start_datetime, end_datetime, opts = {}) ⇒ CassChurnResultPagedMetadata
Gets churn, within a date range.
-
#get_churn_with_http_info(start_datetime, end_datetime, opts = {}) ⇒ Array<(CassChurnResultPagedMetadata, Fixnum, Hash)>
Gets churn, within a date range.
-
#get_debts(start_datetime, end_datetime, opts = {}) ⇒ DebtsResultPagedMetadata
Gets debts within a date range.
-
#get_debts_with_http_info(start_datetime, end_datetime, opts = {}) ⇒ Array<(DebtsResultPagedMetadata, Fixnum, Hash)>
Gets debts within a date range.
-
#get_payments(start_datetime, end_datetime, opts = {}) ⇒ CassPaymentResultPagedMetadata
Gets payments within a date range.
-
#get_payments_with_http_info(start_datetime, end_datetime, opts = {}) ⇒ Array<(CassPaymentResultPagedMetadata, Fixnum, Hash)>
Gets payments within a date range.
-
#get_product_payments(payments_per_product, opts = {}) ⇒ ProductPaymentsResultPagedMetadata
Gets hourly payments per product, within a date range.
-
#get_product_payments_with_http_info(payments_per_product, opts = {}) ⇒ Array<(ProductPaymentsResultPagedMetadata, Fixnum, Hash)>
Gets hourly payments per product, within a date range.
-
#get_product_rate_plan_payments(payments_per_product_rate_plan, opts = {}) ⇒ ProductRatePlanPaymentsResultPagedMetadata
Gets hourly payments per product, within a date range.
-
#get_product_rate_plan_payments_with_http_info(payments_per_product_rate_plan, opts = {}) ⇒ Array<(ProductRatePlanPaymentsResultPagedMetadata, Fixnum, Hash)>
Gets hourly payments per product, within a date range.
-
#get_subscription_ltv(subscription_id, end_datetime, opts = {}) ⇒ SubscriptionLTVResultPagedMetadata
Gets a subscription’s life-time value, as of a given end date.
-
#get_subscription_ltv_with_http_info(subscription_id, end_datetime, opts = {}) ⇒ Array<(SubscriptionLTVResultPagedMetadata, Fixnum, Hash)>
Gets a subscription's life-time value, as of a given end date.
-
#get_upgrades(start_datetime, end_datetime, opts = {}) ⇒ CassUpgradeResultPagedMetadata
Gets upgrades, within a date range.
-
#get_upgrades_with_http_info(start_datetime, end_datetime, opts = {}) ⇒ Array<(CassUpgradeResultPagedMetadata, Fixnum, Hash)>
Gets upgrades, within a date range.
-
#initialize(api_client = ApiClient.default) ⇒ AnalyticsApi
constructor
A new instance of AnalyticsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AnalyticsApi
Returns a new instance of AnalyticsApi.
30 31 32 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
28 29 30 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 28 def api_client @api_client end |
Instance Method Details
#get_account_debts(debts_per_account, opts = {}) ⇒ AccountPaymentsResultPagedMetadata
Gets outstanding debts per account, within a date range. : "Get account debts","response" : "getAccountDebts.html"
39 40 41 42 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 39 def get_account_debts(debts_per_account, opts = {}) data, _status_code, _headers = get_account_debts_with_http_info(debts_per_account, opts) return data end |
#get_account_debts_with_http_info(debts_per_account, opts = {}) ⇒ Array<(AccountPaymentsResultPagedMetadata, Fixnum, Hash)>
Gets outstanding debts per account, within a date range. : "Get account debts","response" : "getAccountDebts.html"
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 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 49 def get_account_debts_with_http_info(debts_per_account, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_account_debts ..." end # verify the required parameter 'debts_per_account' is set fail ArgumentError, "Missing the required parameter 'debts_per_account' when calling AnalyticsApi.get_account_debts" if debts_per_account.nil? # resource path local_var_path = "/analytics/payments/accounts/outstanding".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(debts_per_account) 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 => 'AccountPaymentsResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_account_debts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_account_ltv(account_id, end_datetime, opts = {}) ⇒ AccountLTVResultPagedMetadata
Gets an account’s life-time value, as of a given end date. account life-time value","response":"getAccountLTV.html"
102 103 104 105 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 102 def get_account_ltv(account_id, end_datetime, opts = {}) data, _status_code, _headers = get_account_ltv_with_http_info(account_id, end_datetime, opts) return data end |
#get_account_ltv_with_http_info(account_id, end_datetime, opts = {}) ⇒ Array<(AccountLTVResultPagedMetadata, Fixnum, Hash)>
Gets an account's life-time value, as of a given end date. account life-time value","response":"getAccountLTV.html"
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 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 118 def get_account_ltv_with_http_info(account_id, end_datetime, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_account_ltv ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AnalyticsApi.get_account_ltv" if account_id.nil? # verify the required parameter 'end_datetime' is set fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_account_ltv" if end_datetime.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/analytics/account-ltv/{account-id}/{end-datetime}".sub('{format}','json').sub('{' + 'account-id' + '}', account_id.to_s).sub('{' + 'end-datetime' + '}', end_datetime.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'AccountLTVResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_account_ltv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_account_payments(payments_per_account, opts = {}) ⇒ AccountPaymentsResultPagedMetadata
Gets hourly payments per product, within a date range. : "Get payments per account","response" : "getAccountPayments.html"
175 176 177 178 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 175 def get_account_payments(payments_per_account, opts = {}) data, _status_code, _headers = get_account_payments_with_http_info(payments_per_account, opts) return data end |
#get_account_payments_with_http_info(payments_per_account, opts = {}) ⇒ Array<(AccountPaymentsResultPagedMetadata, Fixnum, Hash)>
Gets hourly payments per product, within a date range. : "Get payments per account","response" : "getAccountPayments.html"
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 220 221 222 223 224 225 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 185 def get_account_payments_with_http_info(payments_per_account, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_account_payments ..." end # verify the required parameter 'payments_per_account' is set fail ArgumentError, "Missing the required parameter 'payments_per_account' when calling AnalyticsApi.get_account_payments" if payments_per_account.nil? # resource path local_var_path = "/analytics/payments/accounts".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(payments_per_account) 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 => 'AccountPaymentsResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_account_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_billforward_managed_payments(start_datetime, end_datetime, opts = {}) ⇒ BillforwardManagedPaymentsResultPagedMetadata
Gets all payments managed by BillForward, within a date range. managed payments","response":"getManagedPayments.html"
238 239 240 241 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 238 def get_billforward_managed_payments(start_datetime, end_datetime, opts = {}) data, _status_code, _headers = get_billforward_managed_payments_with_http_info(start_datetime, end_datetime, opts) return data end |
#get_billforward_managed_payments_with_http_info(start_datetime, end_datetime, opts = {}) ⇒ Array<(BillforwardManagedPaymentsResultPagedMetadata, Fixnum, Hash)>
Gets all payments managed by BillForward, within a date range. managed payments","response":"getManagedPayments.html"
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 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 254 def get_billforward_managed_payments_with_http_info(start_datetime, end_datetime, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_billforward_managed_payments ..." end # verify the required parameter 'start_datetime' is set fail ArgumentError, "Missing the required parameter 'start_datetime' when calling AnalyticsApi.get_billforward_managed_payments" if start_datetime.nil? # verify the required parameter 'end_datetime' is set fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_billforward_managed_payments" if end_datetime.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/analytics/billforward-managed-payments/{start-datetime}/{end-datetime}".sub('{format}','json').sub('{' + 'start-datetime' + '}', start_datetime.to_s).sub('{' + 'end-datetime' + '}', end_datetime.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'BillforwardManagedPaymentsResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_billforward_managed_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_churn(start_datetime, end_datetime, opts = {}) ⇒ CassChurnResultPagedMetadata
Gets churn, within a date range. churn","response":"getChurn.html"
317 318 319 320 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 317 def get_churn(start_datetime, end_datetime, opts = {}) data, _status_code, _headers = get_churn_with_http_info(start_datetime, end_datetime, opts) return data end |
#get_churn_with_http_info(start_datetime, end_datetime, opts = {}) ⇒ Array<(CassChurnResultPagedMetadata, Fixnum, Hash)>
Gets churn, within a date range. churn","response":"getChurn.html"
333 334 335 336 337 338 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 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 333 def get_churn_with_http_info(start_datetime, end_datetime, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_churn ..." end # verify the required parameter 'start_datetime' is set fail ArgumentError, "Missing the required parameter 'start_datetime' when calling AnalyticsApi.get_churn" if start_datetime.nil? # verify the required parameter 'end_datetime' is set fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_churn" if end_datetime.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/analytics/churn/{start-datetime}/{end-datetime}".sub('{format}','json').sub('{' + 'start-datetime' + '}', start_datetime.to_s).sub('{' + 'end-datetime' + '}', end_datetime.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'CassChurnResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_churn\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_debts(start_datetime, end_datetime, opts = {}) ⇒ DebtsResultPagedMetadata
Gets debts within a date range. debts","response":"getDebts.html"
396 397 398 399 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 396 def get_debts(start_datetime, end_datetime, opts = {}) data, _status_code, _headers = get_debts_with_http_info(start_datetime, end_datetime, opts) return data end |
#get_debts_with_http_info(start_datetime, end_datetime, opts = {}) ⇒ Array<(DebtsResultPagedMetadata, Fixnum, Hash)>
Gets debts within a date range. debts","response":"getDebts.html"
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 412 def get_debts_with_http_info(start_datetime, end_datetime, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_debts ..." end # verify the required parameter 'start_datetime' is set fail ArgumentError, "Missing the required parameter 'start_datetime' when calling AnalyticsApi.get_debts" if start_datetime.nil? # verify the required parameter 'end_datetime' is set fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_debts" if end_datetime.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/analytics/payments/outstanding/{start-datetime}/{end-datetime}".sub('{format}','json').sub('{' + 'start-datetime' + '}', start_datetime.to_s).sub('{' + 'end-datetime' + '}', end_datetime.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'DebtsResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_debts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_payments(start_datetime, end_datetime, opts = {}) ⇒ CassPaymentResultPagedMetadata
Gets payments within a date range. all payments","response":"getPayments.html"
475 476 477 478 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 475 def get_payments(start_datetime, end_datetime, opts = {}) data, _status_code, _headers = get_payments_with_http_info(start_datetime, end_datetime, opts) return data end |
#get_payments_with_http_info(start_datetime, end_datetime, opts = {}) ⇒ Array<(CassPaymentResultPagedMetadata, Fixnum, Hash)>
Gets payments within a date range. all payments","response":"getPayments.html"
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 491 def get_payments_with_http_info(start_datetime, end_datetime, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_payments ..." end # verify the required parameter 'start_datetime' is set fail ArgumentError, "Missing the required parameter 'start_datetime' when calling AnalyticsApi.get_payments" if start_datetime.nil? # verify the required parameter 'end_datetime' is set fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_payments" if end_datetime.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/analytics/payments/{start-datetime}/{end-datetime}".sub('{format}','json').sub('{' + 'start-datetime' + '}', start_datetime.to_s).sub('{' + 'end-datetime' + '}', end_datetime.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'CassPaymentResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_product_payments(payments_per_product, opts = {}) ⇒ ProductPaymentsResultPagedMetadata
Gets hourly payments per product, within a date range. : "Get payments per product","response" : "getProductPayments.html"
548 549 550 551 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 548 def get_product_payments(payments_per_product, opts = {}) data, _status_code, _headers = get_product_payments_with_http_info(payments_per_product, opts) return data end |
#get_product_payments_with_http_info(payments_per_product, opts = {}) ⇒ Array<(ProductPaymentsResultPagedMetadata, Fixnum, Hash)>
Gets hourly payments per product, within a date range. : "Get payments per product","response" : "getProductPayments.html"
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 558 def get_product_payments_with_http_info(payments_per_product, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_product_payments ..." end # verify the required parameter 'payments_per_product' is set fail ArgumentError, "Missing the required parameter 'payments_per_product' when calling AnalyticsApi.get_product_payments" if payments_per_product.nil? # resource path local_var_path = "/analytics/payments-per-product".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(payments_per_product) 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 => 'ProductPaymentsResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_product_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_product_rate_plan_payments(payments_per_product_rate_plan, opts = {}) ⇒ ProductRatePlanPaymentsResultPagedMetadata
Gets hourly payments per product, within a date range. : "Get payments per rate plan","response" : "getRatePlanPayments.html"
605 606 607 608 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 605 def get_product_rate_plan_payments(payments_per_product_rate_plan, opts = {}) data, _status_code, _headers = get_product_rate_plan_payments_with_http_info(payments_per_product_rate_plan, opts) return data end |
#get_product_rate_plan_payments_with_http_info(payments_per_product_rate_plan, opts = {}) ⇒ Array<(ProductRatePlanPaymentsResultPagedMetadata, Fixnum, Hash)>
Gets hourly payments per product, within a date range. : "Get payments per rate plan","response" : "getRatePlanPayments.html"
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 615 def get_product_rate_plan_payments_with_http_info(payments_per_product_rate_plan, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_product_rate_plan_payments ..." end # verify the required parameter 'payments_per_product_rate_plan' is set fail ArgumentError, "Missing the required parameter 'payments_per_product_rate_plan' when calling AnalyticsApi.get_product_rate_plan_payments" if payments_per_product_rate_plan.nil? # resource path local_var_path = "/analytics/payments/product-rate-plan".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(payments_per_product_rate_plan) 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 => 'ProductRatePlanPaymentsResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_product_rate_plan_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_subscription_ltv(subscription_id, end_datetime, opts = {}) ⇒ SubscriptionLTVResultPagedMetadata
Gets a subscription’s life-time value, as of a given end date. sub life-time value","response":"getSubscriptionLTV.html"
668 669 670 671 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 668 def get_subscription_ltv(subscription_id, end_datetime, opts = {}) data, _status_code, _headers = get_subscription_ltv_with_http_info(subscription_id, end_datetime, opts) return data end |
#get_subscription_ltv_with_http_info(subscription_id, end_datetime, opts = {}) ⇒ Array<(SubscriptionLTVResultPagedMetadata, Fixnum, Hash)>
Gets a subscription's life-time value, as of a given end date. sub life-time value","response":"getSubscriptionLTV.html"
684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 684 def get_subscription_ltv_with_http_info(subscription_id, end_datetime, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_subscription_ltv ..." end # verify the required parameter 'subscription_id' is set fail ArgumentError, "Missing the required parameter 'subscription_id' when calling AnalyticsApi.get_subscription_ltv" if subscription_id.nil? # verify the required parameter 'end_datetime' is set fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_subscription_ltv" if end_datetime.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/analytics/subscription-ltv/{subscription-id}/{end-datetime}".sub('{format}','json').sub('{' + 'subscription-id' + '}', subscription_id.to_s).sub('{' + 'end-datetime' + '}', end_datetime.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'SubscriptionLTVResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_subscription_ltv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_upgrades(start_datetime, end_datetime, opts = {}) ⇒ CassUpgradeResultPagedMetadata
Gets upgrades, within a date range. upgrades","response":"getUpgrades.html"
747 748 749 750 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 747 def get_upgrades(start_datetime, end_datetime, opts = {}) data, _status_code, _headers = get_upgrades_with_http_info(start_datetime, end_datetime, opts) return data end |
#get_upgrades_with_http_info(start_datetime, end_datetime, opts = {}) ⇒ Array<(CassUpgradeResultPagedMetadata, Fixnum, Hash)>
Gets upgrades, within a date range. upgrades","response":"getUpgrades.html"
763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 |
# File 'lib/bf_ruby2/api/analytics_api.rb', line 763 def get_upgrades_with_http_info(start_datetime, end_datetime, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi.get_upgrades ..." end # verify the required parameter 'start_datetime' is set fail ArgumentError, "Missing the required parameter 'start_datetime' when calling AnalyticsApi.get_upgrades" if start_datetime.nil? # verify the required parameter 'end_datetime' is set fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_upgrades" if end_datetime.nil? if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/analytics/upgrades/{start-datetime}/{end-datetime}".sub('{format}','json').sub('{' + 'start-datetime' + '}', start_datetime.to_s).sub('{' + 'end-datetime' + '}', end_datetime.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json; charset=utf-8'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'CassUpgradeResultPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#get_upgrades\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |