Skip to content

Commit

Permalink
Add support for RecacheSensitiveData transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
duff committed Jul 7, 2014
1 parent 3c7c0c9 commit 06202ed
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Expand Up @@ -5,6 +5,7 @@
* Check attributes for non-nil before sending [markabe]
* Add supports_verify option to Gateway [duff]
* Add support for verify_on_gateway API call [duff]
* Add support for RecacheSensitiveData transaction [duff]

## 2.0.11
* Add support for ThirdPartyTokens [duff]
Expand Down
17 changes: 17 additions & 0 deletions lib/spreedly/transactions/recache_sensitive_data.rb
@@ -0,0 +1,17 @@
module Spreedly

class RecacheSensitiveData < Transaction

field :data
attr_reader :payment_method

def initialize(xml_doc)
super
@payment_method = PaymentMethod.new_from(xml_doc.at_xpath('.//payment_method'))
end

end

end


2 changes: 2 additions & 0 deletions lib/spreedly/transactions/transaction.rb
Expand Up @@ -28,6 +28,8 @@ def self.new_from(xml_doc)
return RedactPaymentMethod.new(xml_doc)
when 'RedactGateway'
return RedactGateway.new(xml_doc)
when 'RecacheSensitiveData'
return RecacheSensitiveData.new(xml_doc)
else
Transaction.new(xml_doc)
end
Expand Down

0 comments on commit 06202ed

Please sign in to comment.