Class: AuthorizeNetReporting::Report

Inherits:
Gateway
  • Object
show all
Defined in:
lib/authorize_net_reporting/report.rb

Overview

Initialize AuthorizeNetReporting::Report class

report = AuthorizeNetReporting::Report.new({ :mode => [‘test’|‘live’], :key => ‘your api key’, :login => ‘your api_login’ })

Constant Summary

Constants inherited from Gateway

Gateway::LIVE_URL, Gateway::TEST_URL, Gateway::XMLNS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Gateway

#api_url, #mode, #send_xml

Constructor Details

#initialize(options = {}) ⇒ Report

Set API login, password and mode(live/test)

AuthorizeNetReporting::Report.new({ :mode => [‘test’|‘live’], :key => ‘your api key’, :login => ‘your api_login’ })

Parameters:

  • { (Hash)

    :mode => [‘test’|‘live’], :key => ‘your api key’, :login => ‘your api_login’ }



14
15
16
17
# File 'lib/authorize_net_reporting/report.rb', line 14

def initialize(options = {})
  requires!(options, :mode, :key, :login)
  @mode, @key, @login = options[:mode], options[:key], options[:login]
end

Instance Attribute Details

#debugObject

Returns the value of attribute debug.



9
10
11
# File 'lib/authorize_net_reporting/report.rb', line 9

def debug
  @debug
end

Instance Method Details

#batch_statistics(batch_id) ⇒ Object

Authorize.net API function getBatchStatisticsRequest

Returns statistics for a single batch, specified by the batch ID.

Parameters:

  • batch_id (Integer)


34
35
36
# File 'lib/authorize_net_reporting/report.rb', line 34

def batch_statistics(batch_id)
  process_request(__method__, {:batch_id => batch_id})
end

#settled_batch_list(options = {}) ⇒ Object

Authorize.net API function: getSettledBatchListRequest

This function returns Batch ID, Settlement Time, & Settlement State for all settled batches with a range of dates. optionally you can include __:include_statistics => true__ to receive batch statistics by payment type and batch totals.

If no dates are specified, then the default is the last 24 hours.

Parameters:

  • options (Hash) (defaults to: {})

    { :first_settlement_date => “2011/04/20”, :last_settlement_date => “2011/05/20”, :include_statistics => true }



26
27
28
# File 'lib/authorize_net_reporting/report.rb', line 26

def settled_batch_list(options = {})
  process_request(__method__, options)
end

#transaction_details(transaction_id) ⇒ Object

Authorize.net API function getTransactionDetailsRequest

Get detailed information about one specific transaction

Parameters:

  • transaction_id, (Integer)

    The transaction ID



57
58
59
# File 'lib/authorize_net_reporting/report.rb', line 57

def transaction_details(transaction_id)
  process_request(__method__, {:transaction_id => transaction_id})
end

#transaction_list(batch_id) ⇒ Object

Authorize.net API function getTransactionListRequest

Returns data for all transactions in a specified batch.

Parameters:

  • batch_id (Integer)


42
43
44
# File 'lib/authorize_net_reporting/report.rb', line 42

def transaction_list(batch_id)
  process_request(__method__, {:batch_id => batch_id})
end

#unsettled_transaction_listObject

Authorize.net API function getUnsettledTransactionListRequest

Returns data for unsettled transactions. This API function return data for up to 1000 of the most recent transactions



49
50
51
# File 'lib/authorize_net_reporting/report.rb', line 49

def unsettled_transaction_list
  process_request(__method__)
end