Class: ChargeBee::Transaction

Inherits:
Model
  • Object
show all
Defined in:
lib/chargebee/models/transaction.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

construct, #initialize, #inspect, #load, #method_missing, #to_s

Constructor Details

This class inherits a constructor from ChargeBee::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ChargeBee::Model

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def amount
  @amount
end

#dateObject

Returns the value of attribute date.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def date
  @date
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def description
  @description
end

#error_codeObject

Returns the value of attribute error_code.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def error_code
  @error_code
end

#error_textObject

Returns the value of attribute error_text.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def error_text
  @error_text
end

#gatewayObject

Returns the value of attribute gateway.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def gateway
  @gateway
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def id
  @id
end

#id_at_gatewayObject

Returns the value of attribute id_at_gateway.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def id_at_gateway
  @id_at_gateway
end

#masked_card_numberObject

Returns the value of attribute masked_card_number.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def masked_card_number
  @masked_card_number
end

#payment_methodObject

Returns the value of attribute payment_method.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def payment_method
  @payment_method
end

#refunded_txn_idObject

Returns the value of attribute refunded_txn_id.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def refunded_txn_id
  @refunded_txn_id
end

#statusObject

Returns the value of attribute status.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def status
  @status
end

#subscription_idObject

Returns the value of attribute subscription_id.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def subscription_id
  @subscription_id
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def type
  @type
end

#void_descriptionObject

Returns the value of attribute void_description.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def void_description
  @void_description
end

#voided_atObject

Returns the value of attribute voided_at.



4
5
6
# File 'lib/chargebee/models/transaction.rb', line 4

def voided_at
  @voided_at
end

Class Method Details

.list(params = {}, env = nil) ⇒ Object

OPERATIONS




11
12
13
# File 'lib/chargebee/models/transaction.rb', line 11

def self.list(params={}, env=nil)
  Request.send('get', "/transactions", params, env)
end

.refund(id, params = {}, env = nil) ⇒ Object



27
28
29
# File 'lib/chargebee/models/transaction.rb', line 27

def self.refund(id, params={}, env=nil)
  Request.send('post', "/transactions/#{id.to_s}/refund", params, env)
end

.retrieve(id, env = nil) ⇒ Object



23
24
25
# File 'lib/chargebee/models/transaction.rb', line 23

def self.retrieve(id, env=nil)
  Request.send('get', "/transactions/#{id.to_s}", {}, env)
end

.transactions_for_invoice(id, params = {}, env = nil) ⇒ Object



19
20
21
# File 'lib/chargebee/models/transaction.rb', line 19

def self.transactions_for_invoice(id, params={}, env=nil)
  Request.send('get', "/invoices/#{id.to_s}/transactions", params, env)
end

.transactions_for_subscription(id, params = {}, env = nil) ⇒ Object



15
16
17
# File 'lib/chargebee/models/transaction.rb', line 15

def self.transactions_for_subscription(id, params={}, env=nil)
  Request.send('get', "/subscriptions/#{id.to_s}/transactions", params, env)
end