Class: ChargeBee::Transaction

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

Defined Under Namespace

Classes: LinkedInvoice, LinkedRefund

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

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

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.



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

def amount
  @amount
end

#amount_unusedObject

Returns the value of attribute amount_unused.



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

def amount_unused
  @amount_unused
end

#currency_codeObject

Returns the value of attribute currency_code.



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

def currency_code
  @currency_code
end

#customer_idObject

Returns the value of attribute customer_id.



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

def customer_id
  @customer_id
end

#dateObject

Returns the value of attribute date.



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

def date
  @date
end

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#error_codeObject

Returns the value of attribute error_code.



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

def error_code
  @error_code
end

#error_textObject

Returns the value of attribute error_text.



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

def error_text
  @error_text
end

#gatewayObject

Returns the value of attribute gateway.



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

def gateway
  @gateway
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#id_at_gatewayObject

Returns the value of attribute id_at_gateway.



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

def id_at_gateway
  @id_at_gateway
end

#linked_invoicesObject

Returns the value of attribute linked_invoices.



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

def linked_invoices
  @linked_invoices
end

#linked_refundsObject

Returns the value of attribute linked_refunds.



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

def linked_refunds
  @linked_refunds
end

#masked_card_numberObject

Returns the value of attribute masked_card_number.



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

def masked_card_number
  @masked_card_number
end

#payment_methodObject

Returns the value of attribute payment_method.



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

def payment_method
  @payment_method
end

#reference_numberObject

Returns the value of attribute reference_number.



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

def reference_number
  @reference_number
end

#reference_transaction_idObject

Returns the value of attribute reference_transaction_id.



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

def reference_transaction_id
  @reference_transaction_id
end

#refunded_txn_idObject

Returns the value of attribute refunded_txn_id.



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

def refunded_txn_id
  @refunded_txn_id
end

#reversal_transaction_idObject

Returns the value of attribute reversal_transaction_id.



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

def reversal_transaction_id
  @reversal_transaction_id
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#subscription_idObject

Returns the value of attribute subscription_id.



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

def subscription_id
  @subscription_id
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

#void_descriptionObject

Returns the value of attribute void_description.



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

def void_description
  @void_description
end

#voided_atObject

Returns the value of attribute voided_at.



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

def voided_at
  @voided_at
end

Class Method Details

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

OPERATIONS




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

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

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



40
41
42
# File 'lib/chargebee/models/transaction.rb', line 40

def self.record_payment(id, params, env=nil, headers={})
  Request.send('post', uri_path("invoices",id.to_s,"record_payment"), params, env, headers)
end

.retrieve(id, env = nil, headers = {}) ⇒ Object



36
37
38
# File 'lib/chargebee/models/transaction.rb', line 36

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

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



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

def self.transactions_for_customer(id, params={}, env=nil, headers={})
  Request.send('get', uri_path("customers",id.to_s,"transactions"), params, env, headers)
end

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



32
33
34
# File 'lib/chargebee/models/transaction.rb', line 32

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

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



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

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