Class: Stripe::SourceTransaction

Inherits:
StripeObject show all
Defined in:
lib/stripe/resources/source_transaction.rb

Overview

Some payment methods have no required amount that a customer must send. Customers can be instructed to send any amount, and it can be made up of multiple transactions. As such, sources can have multiple associated transactions.

Defined Under Namespace

Classes: AchCreditTransfer, ChfCreditTransfer, GbpCreditTransfer, PaperCheck, SepaCreditTransfer

Constant Summary collapse

OBJECT_NAME =
"source_transaction"

Constants inherited from StripeObject

Stripe::StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#ach_credit_transferObject (readonly)

Attribute for field ach_credit_transfer



112
113
114
# File 'lib/stripe/resources/source_transaction.rb', line 112

def ach_credit_transfer
  @ach_credit_transfer
end

#amountObject (readonly)

A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver.



114
115
116
# File 'lib/stripe/resources/source_transaction.rb', line 114

def amount
  @amount
end

#chf_credit_transferObject (readonly)

Attribute for field chf_credit_transfer



116
117
118
# File 'lib/stripe/resources/source_transaction.rb', line 116

def chf_credit_transfer
  @chf_credit_transfer
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



118
119
120
# File 'lib/stripe/resources/source_transaction.rb', line 118

def created
  @created
end

#currencyObject (readonly)

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



120
121
122
# File 'lib/stripe/resources/source_transaction.rb', line 120

def currency
  @currency
end

#gbp_credit_transferObject (readonly)

Attribute for field gbp_credit_transfer



122
123
124
# File 'lib/stripe/resources/source_transaction.rb', line 122

def gbp_credit_transfer
  @gbp_credit_transfer
end

#idObject (readonly)

Unique identifier for the object.



124
125
126
# File 'lib/stripe/resources/source_transaction.rb', line 124

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



126
127
128
# File 'lib/stripe/resources/source_transaction.rb', line 126

def livemode
  @livemode
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



128
129
130
# File 'lib/stripe/resources/source_transaction.rb', line 128

def object
  @object
end

#paper_checkObject (readonly)

Attribute for field paper_check



130
131
132
# File 'lib/stripe/resources/source_transaction.rb', line 130

def paper_check
  @paper_check
end

#sepa_credit_transferObject (readonly)

Attribute for field sepa_credit_transfer



132
133
134
# File 'lib/stripe/resources/source_transaction.rb', line 132

def sepa_credit_transfer
  @sepa_credit_transfer
end

#sourceObject (readonly)

The ID of the source this transaction is attached to.



134
135
136
# File 'lib/stripe/resources/source_transaction.rb', line 134

def source
  @source
end

#statusObject (readonly)

The status of the transaction, one of ‘succeeded`, `pending`, or `failed`.



136
137
138
# File 'lib/stripe/resources/source_transaction.rb', line 136

def status
  @status
end

#typeObject (readonly)

The type of source this transaction is attached to.



138
139
140
# File 'lib/stripe/resources/source_transaction.rb', line 138

def type
  @type
end

Class Method Details

.field_remappingsObject



150
151
152
# File 'lib/stripe/resources/source_transaction.rb', line 150

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



140
141
142
143
144
145
146
147
148
# File 'lib/stripe/resources/source_transaction.rb', line 140

def self.inner_class_types
  @inner_class_types = {
    ach_credit_transfer: AchCreditTransfer,
    chf_credit_transfer: ChfCreditTransfer,
    gbp_credit_transfer: GbpCreditTransfer,
    paper_check: PaperCheck,
    sepa_credit_transfer: SepaCreditTransfer,
  }
end

.object_nameObject



11
12
13
# File 'lib/stripe/resources/source_transaction.rb', line 11

def self.object_name
  "source_transaction"
end