lib/braintree/transaction.rb in braintree-3.3.0 vs lib/braintree/transaction.rb in braintree-3.4.0
- old
+ new
@@ -2,22 +2,22 @@
class Transaction
include BaseModule
include Braintree::Util::IdEquality
module CreatedUsing
- FullInformation = 'full_information'
- Token = 'token'
- Unrecognized = 'unrecognized'
+ FullInformation = "full_information"
+ Token = "token"
+ Unrecognized = "unrecognized"
end
module EscrowStatus
- HoldPending = 'hold_pending'
- Held = 'held'
- ReleasePending = 'release_pending'
- Released = 'released'
- Refunded = 'refunded'
- Unrecognized = 'unrecognized'
+ HoldPending = "hold_pending"
+ Held = "held"
+ ReleasePending = "release_pending"
+ Released = "released"
+ Refunded = "refunded"
+ Unrecognized = "unrecognized"
end
module GatewayRejectionReason
ApplicationIncomplete = "application_incomplete"
AVS = "avs"
@@ -30,24 +30,24 @@
TokenIssuance = "token_issuance"
Unrecognized = "unrecognized"
end
module Status
- AuthorizationExpired = 'authorization_expired'
- Authorizing = 'authorizing'
- Authorized = 'authorized'
- GatewayRejected = 'gateway_rejected'
- Failed = 'failed'
- ProcessorDeclined = 'processor_declined'
- Settled = 'settled'
- SettlementConfirmed = 'settlement_confirmed'
- SettlementDeclined = 'settlement_declined'
- SettlementPending = 'settlement_pending'
- Settling = 'settling'
- SubmittedForSettlement = 'submitted_for_settlement'
- Voided = 'voided'
- Unrecognized = 'unrecognized'
+ AuthorizationExpired = "authorization_expired"
+ Authorizing = "authorizing"
+ Authorized = "authorized"
+ GatewayRejected = "gateway_rejected"
+ Failed = "failed"
+ ProcessorDeclined = "processor_declined"
+ Settled = "settled"
+ SettlementConfirmed = "settlement_confirmed"
+ SettlementDeclined = "settlement_declined"
+ SettlementPending = "settlement_pending"
+ Settling = "settling"
+ SubmittedForSettlement = "submitted_for_settlement"
+ Voided = "voided"
+ Unrecognized = "unrecognized"
All = constants.map { |c| const_get(c) }
end
module Source
@@ -167,10 +167,18 @@
attr_reader :us_bank_account_details
attr_reader :venmo_account_details
attr_reader :visa_checkout_card_details
attr_reader :voice_referral_number
+ def self.adjust_authorization(*args)
+ Configuration.gateway.transaction.adjust_authorization(*args)
+ end
+
+ def self.adjust_authorization!(*args)
+ Configuration.gateway.transaction.adjust_authorization!(*args)
+ end
+
def self.create(*args)
Configuration.gateway.transaction.create(*args)
end
def self.create!(*args)
@@ -384,10 +392,10 @@
end
class << self
protected :new
def _new(*args) # :nodoc:
- self.new *args
+ self.new(*args)
end
end
def self._attributes # :nodoc:
[:amount, :created_at, :credit_card_details, :customer_details, :id, :status, :subscription_details, :type, :updated_at, :processed_with_network_token?]