Class: Lightrail::LightrailFund

Inherits:
LightrailObject
  • Object
show all
Defined in:
lib/lightrail_stripe/wrappers/lightrail_fund.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#cardIdObject

Returns the value of attribute cardId.



3
4
5
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 3

def cardId
  @cardId
end

#codeLastFourObject

Returns the value of attribute codeLastFour.



3
4
5
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 3

def codeLastFour
  @codeLastFour
end

#currencyObject

Returns the value of attribute currency.



3
4
5
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 3

def currency
  @currency
end

#dateCreatedObject

Returns the value of attribute dateCreated.



3
4
5
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 3

def dateCreated
  @dateCreated
end

#giftbitUserIdObject

Returns the value of attribute giftbitUserId.



3
4
5
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 3

def giftbitUserId
  @giftbitUserId
end

#transactionAccessMethodObject

Returns the value of attribute transactionAccessMethod.



3
4
5
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 3

def transactionAccessMethod
  @transactionAccessMethod
end

#transactionIdObject

Returns the value of attribute transactionId.



3
4
5
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 3

def transactionId
  @transactionId
end

#transactionTypeObject

Returns the value of attribute transactionType.



3
4
5
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 3

def transactionType
  @transactionType
end

#userSuppliedIdObject

Returns the value of attribute userSuppliedId.



3
4
5
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 3

def userSuppliedId
  @userSuppliedId
end

#valueObject

Returns the value of attribute value.



3
4
5
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 3

def value
  @value
end

Class Method Details

.create(fund_object) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/lightrail_stripe/wrappers/lightrail_fund.rb', line 5

def self.create(fund_object)
  Lightrail::Validator.validate_fund_object!(fund_object)

  fund_object_to_send_to_lightrail = Lightrail::Translator.fund_params_stripe_to_lightrail(fund_object)

  response = Lightrail::Card.fund(fund_object_to_send_to_lightrail)

  self.new(response)
end