class Bfwd::AnalyticsApi
Attributes
Public Class Methods
# File lib/bf_ruby2/api/analytics_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Gets outstanding debts per account, within a date range. {"nickname" : "Get account debts","response" : "getAccountDebts.html"} @param debts_per_account The payments-per-account object. @param [Hash] opts the optional parameters @return [AccountPaymentsResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 28 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
Gets outstanding debts per account, within a date range. {"nickname" : "Get account debts","response" : "getAccountDebts.html"} @param debts_per_account The payments-per-account object. @param [Hash] opts the optional parameters @return [Array<(AccountPaymentsResultPagedMetadata
, Fixnum, Hash)>] AccountPaymentsResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 38 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 if @api_client.config.client_side_validation && debts_per_account.nil? fail ArgumentError, "Missing the required parameter 'debts_per_account' when calling AnalyticsApi.get_account_debts" end # resource path local_var_path = "/analytics/payments/accounts/outstanding" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # 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
Gets an account's life-time value, as of a given end date. {"nickname":"Get account life-time value","response":"getAccountLTV.html"} @param account_id The id of the account. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 8766) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order The direction of any ordering, either ASC or DESC. (default to ASC) @return [AccountLTVResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 89 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
Gets an account's life-time value, as of a given end date. {"nickname":"Get account life-time value","response":"getAccountLTV.html"} @param account_id The id of the account. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order The direction of any ordering, either ASC or DESC. @return [Array<(AccountLTVResultPagedMetadata
, Fixnum, Hash)>] AccountLTVResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 105 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 if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AnalyticsApi.get_account_ltv" end # verify the required parameter 'end_datetime' is set if @api_client.config.client_side_validation && end_datetime.nil? fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_account_ltv" end if @api_client.config.client_side_validation && 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('{' + '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) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # 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
Gets hourly payments per product, within a date range. {"nickname" : "Get payments per account","response" : "getAccountPayments.html"} @param payments_per_account The payments-per-account object. @param [Hash] opts the optional parameters @return [AccountPaymentsResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 160 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
Gets hourly payments per product, within a date range. {"nickname" : "Get payments per account","response" : "getAccountPayments.html"} @param payments_per_account The payments-per-account object. @param [Hash] opts the optional parameters @return [Array<(AccountPaymentsResultPagedMetadata
, Fixnum, Hash)>] AccountPaymentsResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 170 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 if @api_client.config.client_side_validation && payments_per_account.nil? fail ArgumentError, "Missing the required parameter 'payments_per_account' when calling AnalyticsApi.get_account_payments" end # resource path local_var_path = "/analytics/payments/accounts" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # 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
Gets all payments managed by BillForward, within a date range. {"nickname":"Get managed payments","response":"getManagedPayments.html"} @param start_datetime The UTC DateTime specifying the start of the result period. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 8766) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order The direction of any ordering, either ASC or DESC. (default to ASC) @return [BillforwardManagedPaymentsResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 221 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
Gets all payments managed by BillForward, within a date range. {"nickname":"Get managed payments","response":"getManagedPayments.html"} @param start_datetime The UTC DateTime specifying the start of the result period. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order The direction of any ordering, either ASC or DESC. @return [Array<(BillforwardManagedPaymentsResultPagedMetadata
, Fixnum, Hash)>] BillforwardManagedPaymentsResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 237 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 if @api_client.config.client_side_validation && start_datetime.nil? fail ArgumentError, "Missing the required parameter 'start_datetime' when calling AnalyticsApi.get_billforward_managed_payments" end # verify the required parameter 'end_datetime' is set if @api_client.config.client_side_validation && end_datetime.nil? fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_billforward_managed_payments" end if @api_client.config.client_side_validation && 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('{' + '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) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # 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
Gets churn, within a date range. {"nickname":"Get churn","response":"getChurn.html"} @param start_datetime The UTC DateTime specifying the start of the result period. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 8766) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order The direction of any ordering, either ASC or DESC. (default to ASC) @return [CassChurnResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 298 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
Gets churn, within a date range. {"nickname":"Get churn","response":"getChurn.html"} @param start_datetime The UTC DateTime specifying the start of the result period. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order The direction of any ordering, either ASC or DESC. @return [Array<(CassChurnResultPagedMetadata
, Fixnum, Hash)>] CassChurnResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 314 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 if @api_client.config.client_side_validation && start_datetime.nil? fail ArgumentError, "Missing the required parameter 'start_datetime' when calling AnalyticsApi.get_churn" end # verify the required parameter 'end_datetime' is set if @api_client.config.client_side_validation && end_datetime.nil? fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_churn" end if @api_client.config.client_side_validation && 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('{' + '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) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # 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
Gets debts within a date range. {"nickname":"Get debts","response":"getDebts.html"} @param start_datetime The UTC DateTime specifying the start of the result period. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 8766) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order The direction of any ordering, either ASC or DESC. (default to ASC) @return [DebtsResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 375 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
Gets debts within a date range. {"nickname":"Get debts","response":"getDebts.html"} @param start_datetime The UTC DateTime specifying the start of the result period. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order The direction of any ordering, either ASC or DESC. @return [Array<(DebtsResultPagedMetadata
, Fixnum, Hash)>] DebtsResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 391 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 if @api_client.config.client_side_validation && start_datetime.nil? fail ArgumentError, "Missing the required parameter 'start_datetime' when calling AnalyticsApi.get_debts" end # verify the required parameter 'end_datetime' is set if @api_client.config.client_side_validation && end_datetime.nil? fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_debts" end if @api_client.config.client_side_validation && 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('{' + '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) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # 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
Gets payments within a date range. {"nickname":"Get all payments","response":"getPayments.html"} @param start_datetime The UTC DateTime specifying the start of the result period. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 8766) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order The direction of any ordering, either ASC or DESC. (default to ASC) @return [CassPaymentResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 452 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
Gets payments within a date range. {"nickname":"Get all payments","response":"getPayments.html"} @param start_datetime The UTC DateTime specifying the start of the result period. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order The direction of any ordering, either ASC or DESC. @return [Array<(CassPaymentResultPagedMetadata
, Fixnum, Hash)>] CassPaymentResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 468 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 if @api_client.config.client_side_validation && start_datetime.nil? fail ArgumentError, "Missing the required parameter 'start_datetime' when calling AnalyticsApi.get_payments" end # verify the required parameter 'end_datetime' is set if @api_client.config.client_side_validation && end_datetime.nil? fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_payments" end if @api_client.config.client_side_validation && 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('{' + '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) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # 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
Gets hourly payments per product, within a date range. {"nickname" : "Get payments per product","response" : "getProductPayments.html"} @param payments_per_product The payments-per-product object. @param [Hash] opts the optional parameters @return [ProductPaymentsResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 523 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
Gets hourly payments per product, within a date range. {"nickname" : "Get payments per product","response" : "getProductPayments.html"} @param payments_per_product The payments-per-product object. @param [Hash] opts the optional parameters @return [Array<(ProductPaymentsResultPagedMetadata
, Fixnum, Hash)>] ProductPaymentsResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 533 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 if @api_client.config.client_side_validation && payments_per_product.nil? fail ArgumentError, "Missing the required parameter 'payments_per_product' when calling AnalyticsApi.get_product_payments" end # resource path local_var_path = "/analytics/payments-per-product" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # 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
Gets hourly payments per product, within a date range. {"nickname" : "Get payments per rate plan","response" : "getRatePlanPayments.html"} @param payments_per_product_rate_plan The payments-per-product-rate-plan object. @param [Hash] opts the optional parameters @return [ProductRatePlanPaymentsResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 578 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
Gets hourly payments per product, within a date range. {"nickname" : "Get payments per rate plan","response" : "getRatePlanPayments.html"} @param payments_per_product_rate_plan The payments-per-product-rate-plan object. @param [Hash] opts the optional parameters @return [Array<(ProductRatePlanPaymentsResultPagedMetadata
, Fixnum, Hash)>] ProductRatePlanPaymentsResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 588 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 if @api_client.config.client_side_validation && payments_per_product_rate_plan.nil? fail ArgumentError, "Missing the required parameter 'payments_per_product_rate_plan' when calling AnalyticsApi.get_product_rate_plan_payments" end # resource path local_var_path = "/analytics/payments/product-rate-plan" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # 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
Gets a subscription's life-time value, as of a given end date. {"nickname":"Get sub life-time value","response":"getSubscriptionLTV.html"} @param subscription_id The id of the subscription. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 8766) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order The direction of any ordering, either ASC or DESC. (default to ASC) @return [SubscriptionLTVResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 639 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
Gets a subscription's life-time value, as of a given end date. {"nickname":"Get sub life-time value","response":"getSubscriptionLTV.html"} @param subscription_id The id of the subscription. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order The direction of any ordering, either ASC or DESC. @return [Array<(SubscriptionLTVResultPagedMetadata
, Fixnum, Hash)>] SubscriptionLTVResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 655 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 if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling AnalyticsApi.get_subscription_ltv" end # verify the required parameter 'end_datetime' is set if @api_client.config.client_side_validation && end_datetime.nil? fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_subscription_ltv" end if @api_client.config.client_side_validation && 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('{' + '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) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # 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
Gets upgrades, within a date range. {"nickname":"Get upgrades","response":"getUpgrades.html"} @param start_datetime The UTC DateTime specifying the start of the result period. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. (default to 0) @option opts [Integer] :records The maximum number of amendments to return. (default to 8766) @option opts [String] :order_by Specify a field used to order the result set. (default to created) @option opts [String] :order The direction of any ordering, either ASC or DESC. (default to ASC) @return [CassUpgradeResultPagedMetadata]
# File lib/bf_ruby2/api/analytics_api.rb, line 716 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
Gets upgrades, within a date range. {"nickname":"Get upgrades","response":"getUpgrades.html"} @param start_datetime The UTC DateTime specifying the start of the result period. @param end_datetime The UTC DateTime specifying the end of the result period. @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @option opts [Integer] :offset The offset from the first amendment to return. @option opts [Integer] :records The maximum number of amendments to return. @option opts [String] :order_by Specify a field used to order the result set. @option opts [String] :order The direction of any ordering, either ASC or DESC. @return [Array<(CassUpgradeResultPagedMetadata
, Fixnum, Hash)>] CassUpgradeResultPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/analytics_api.rb, line 732 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 if @api_client.config.client_side_validation && start_datetime.nil? fail ArgumentError, "Missing the required parameter 'start_datetime' when calling AnalyticsApi.get_upgrades" end # verify the required parameter 'end_datetime' is set if @api_client.config.client_side_validation && end_datetime.nil? fail ArgumentError, "Missing the required parameter 'end_datetime' when calling AnalyticsApi.get_upgrades" end if @api_client.config.client_side_validation && 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('{' + '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) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # 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