Class: CrowdPay::Transaction

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::AttributeMethods, ActiveModel::Validations, CrowdPay
Defined in:
lib/crowd_pay/transaction.rb

Constant Summary

Constants included from CrowdPay

VERSION

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from CrowdPay

included

Instance Attribute Details

#account_idObject

Returns the value of attribute account_id.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def 
  @account_id
end

#amountObject

Returns the value of attribute amount.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def amount
  @amount
end

#asset_idObject

Returns the value of attribute asset_id.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def asset_id
  @asset_id
end

#created_by_ip_addressObject

Returns the value of attribute created_by_ip_address.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def created_by_ip_address
  @created_by_ip_address
end

#cusip_numberObject

Returns the value of attribute cusip_number.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def cusip_number
  @cusip_number
end

#dateObject

Returns the value of attribute date.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def date
  @date
end

#descriptionObject

Returns the value of attribute description.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def description
  @description
end

#effective_dateObject

Returns the value of attribute effective_date.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def effective_date
  @effective_date
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def id
  @id
end

#maturity_dateObject

Returns the value of attribute maturity_date.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def maturity_date
  @maturity_date
end

#referenceObject

Returns the value of attribute reference.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def reference
  @reference
end

#statusObject

Returns the value of attribute status.



7
8
9
# File 'lib/crowd_pay/transaction.rb', line 7

def status
  @status
end

Class Method Details

.debt_pay(data) ⇒ Object



42
43
44
45
46
# File 'lib/crowd_pay/transaction.rb', line 42

def self.debt_pay(data)
  url = "Crowdfunding/api/Account/#{data[:account_id]}/Transaction/DebtPay"
  response = post(url, data)
  parse(response)
end

.find(account_id, id) ⇒ Object



18
19
20
21
22
# File 'lib/crowd_pay/transaction.rb', line 18

def self.find(, id)
  url = "Crowdfunding/api/Account/#{}/Transaction/#{id}"
  response = get(url)
  parse(response)
end

.fund_account(data) ⇒ Object



36
37
38
39
40
# File 'lib/crowd_pay/transaction.rb', line 36

def self.(data)
  url = "Crowdfunding/api/Account/#{data[:account_id]}/Transaction/FundAccount"
  response = post(url, data)
  parse(response)
end

.fund_debt_escrow(data) ⇒ Object



30
31
32
33
34
# File 'lib/crowd_pay/transaction.rb', line 30

def self.fund_debt_escrow(data)
  url = "Crowdfunding/api/Account/#{data[:account_id]}/Transaction/FundDebtEscrow"
  response = post(url, data)
  parse(response)
end

.reinvest_debt(data) ⇒ Object



48
49
50
51
52
# File 'lib/crowd_pay/transaction.rb', line 48

def self.reinvest_debt(data)
  url = "Crowdfunding/api/Account/#{data[:account_id]}/Transaction/ReinvestDebt"
  response = post(url, data)
  parse(response)
end

.withdraw_funds(data) ⇒ Object



24
25
26
27
28
# File 'lib/crowd_pay/transaction.rb', line 24

def self.withdraw_funds(data)
  url = "Crowdfunding/api/Account/#{data[:account_id]}/Transaction/WithdrawFunds"
  response = post(url, data)
  parse(response)
end