Class: Lightrail::Refund
- Inherits:
-
LightrailObject
- Object
- LightrailObject
- Lightrail::Refund
- Defined in:
- lib/lightrail_stripe/wrappers/refund.rb
Instance Attribute Summary collapse
-
#cardId ⇒ Object
Returns the value of attribute cardId.
-
#codeLastFour ⇒ Object
Returns the value of attribute codeLastFour.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#dateCreated ⇒ Object
Returns the value of attribute dateCreated.
-
#giftbitUserId ⇒ Object
Returns the value of attribute giftbitUserId.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#parentTransactionId ⇒ Object
Returns the value of attribute parentTransactionId.
-
#transactionAccessMethod ⇒ Object
Returns the value of attribute transactionAccessMethod.
-
#transactionId ⇒ Object
Returns the value of attribute transactionId.
-
#transactionType ⇒ Object
Returns the value of attribute transactionType.
-
#userSuppliedId ⇒ Object
Returns the value of attribute userSuppliedId.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Attribute Details
#cardId ⇒ Object
Returns the value of attribute cardId.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def cardId @cardId end |
#codeLastFour ⇒ Object
Returns the value of attribute codeLastFour.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def codeLastFour @codeLastFour end |
#currency ⇒ Object
Returns the value of attribute currency.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def currency @currency end |
#dateCreated ⇒ Object
Returns the value of attribute dateCreated.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def dateCreated @dateCreated end |
#giftbitUserId ⇒ Object
Returns the value of attribute giftbitUserId.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def giftbitUserId @giftbitUserId end |
#metadata ⇒ Object
Returns the value of attribute metadata.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def @metadata end |
#parentTransactionId ⇒ Object
Returns the value of attribute parentTransactionId.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def parentTransactionId @parentTransactionId end |
#transactionAccessMethod ⇒ Object
Returns the value of attribute transactionAccessMethod.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def transactionAccessMethod @transactionAccessMethod end |
#transactionId ⇒ Object
Returns the value of attribute transactionId.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def transactionId @transactionId end |
#transactionType ⇒ Object
Returns the value of attribute transactionType.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def transactionType @transactionType end |
#userSuppliedId ⇒ Object
Returns the value of attribute userSuppliedId.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def userSuppliedId @userSuppliedId end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 3 def value @value end |
Class Method Details
.create(original_transaction_response, new_request_body = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/lightrail_stripe/wrappers/refund.rb', line 5 def self.create(original_transaction_response, new_request_body = {}) hash_of_original_transaction_response = original_transaction_response.clone hash_of_original_transaction_response = Lightrail::Translator.charge_instance_to_hash!(hash_of_original_transaction_response) Lightrail::Validator.validate_transaction_response! (hash_of_original_transaction_response) transaction_id = Lightrail::Validator.get_transaction_id(hash_of_original_transaction_response) body = new_request_body body[:userSuppliedId] ||= Lightrail::Validator.get_or_create_user_supplied_id_with_action_suffix(body, transaction_id, 'refund') response = Lightrail::Transaction.handle_transaction(hash_of_original_transaction_response, :refund, body) self.new(response) end |