Class: RSpreedly::Transaction
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#description ⇒ Object
Returns the value of attribute description.
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#detail_type ⇒ Object
Returns the value of attribute detail_type.
-
#expires ⇒ Object
Returns the value of attribute expires.
-
#id ⇒ Object
Returns the value of attribute id.
-
#invoice_id ⇒ Object
Returns the value of attribute invoice_id.
-
#price ⇒ Object
Returns the value of attribute price.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#subscriber_customer_id ⇒ Object
Returns the value of attribute subscriber_customer_id.
-
#terms ⇒ Object
Returns the value of attribute terms.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Attributes inherited from Base
Class Method Summary collapse
-
.all(opts = {}) ⇒ Object
Get a list of 50 transactions Passing :since => id will get the 50 transactions since that one GET /api/v4/[short site name]/transactions.xml.
Methods inherited from Base
api_request, #api_request, #attributes=, do_request, #initialize, #to_xml
Constructor Details
This class inherits a constructor from RSpreedly::Base
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def active @active end |
#amount ⇒ Object
Returns the value of attribute amount.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def amount @amount end |
#created_at ⇒ Object
Returns the value of attribute created_at.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def created_at @created_at end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def currency_code @currency_code end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def description @description end |
#detail ⇒ Object
Returns the value of attribute detail.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def detail @detail end |
#detail_type ⇒ Object
Returns the value of attribute detail_type.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def detail_type @detail_type end |
#expires ⇒ Object
Returns the value of attribute expires.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def expires @expires end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def id @id end |
#invoice_id ⇒ Object
Returns the value of attribute invoice_id.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def invoice_id @invoice_id end |
#price ⇒ Object
Returns the value of attribute price.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def price @price end |
#start_time ⇒ Object
Returns the value of attribute start_time.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def start_time @start_time end |
#subscriber_customer_id ⇒ Object
Returns the value of attribute subscriber_customer_id.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def subscriber_customer_id @subscriber_customer_id end |
#terms ⇒ Object
Returns the value of attribute terms.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def terms @terms end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
5 6 7 |
# File 'lib/rspreedly/transaction.rb', line 5 def updated_at @updated_at end |
Class Method Details
.all(opts = {}) ⇒ Object
Get a list of 50 transactions Passing :since => id will get the 50 transactions since that one GET /api/v4/[short site name]/transactions.xml
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rspreedly/transaction.rb', line 26 def all(opts={}) query_opts = {} if opts[:since] query_opts[:query] = {:since_id => opts[:since]} end response = api_request(:get, "/transactions.xml", query_opts) return [] unless response.has_key?("transactions") response["transactions"].collect{|data| Transaction.new(data)} end |