lib/processout/transaction.rb in processout-2.24.0 vs lib/processout/transaction.rb in processout-2.25.0

- old
+ new

@@ -35,10 +35,12 @@ attr_reader :captured_amount_local attr_reader :refunded_amount attr_reader :refunded_amount_local attr_reader :available_amount attr_reader :available_amount_local + attr_reader :voided_amount + attr_reader :voided_amount_local attr_reader :currency attr_reader :error_code attr_reader :error_message attr_reader :acquirer_name attr_reader :gateway_name @@ -311,10 +313,18 @@ def available_amount_local=(val) @available_amount_local = val end + def voided_amount=(val) + @voided_amount = val + end + + def voided_amount_local=(val) + @voided_amount_local = val + end + def currency=(val) @currency = val end def error_code=(val) @@ -480,10 +490,12 @@ self.captured_amount_local = data.fetch(:captured_amount_local, nil) self.refunded_amount = data.fetch(:refunded_amount, nil) self.refunded_amount_local = data.fetch(:refunded_amount_local, nil) self.available_amount = data.fetch(:available_amount, nil) self.available_amount_local = data.fetch(:available_amount_local, nil) + self.voided_amount = data.fetch(:voided_amount, nil) + self.voided_amount_local = data.fetch(:voided_amount_local, nil) self.currency = data.fetch(:currency, nil) self.error_code = data.fetch(:error_code, nil) self.error_message = data.fetch(:error_message, nil) self.acquirer_name = data.fetch(:acquirer_name, nil) self.gateway_name = data.fetch(:gateway_name, nil) @@ -550,10 +562,12 @@ "captured_amount_local": self.captured_amount_local, "refunded_amount": self.refunded_amount, "refunded_amount_local": self.refunded_amount_local, "available_amount": self.available_amount, "available_amount_local": self.available_amount_local, + "voided_amount": self.voided_amount, + "voided_amount_local": self.voided_amount_local, "currency": self.currency, "error_code": self.error_code, "error_message": self.error_message, "acquirer_name": self.acquirer_name, "gateway_name": self.gateway_name, @@ -677,10 +691,16 @@ self.available_amount = data["available_amount"] end if data.include? "available_amount_local" self.available_amount_local = data["available_amount_local"] end + if data.include? "voided_amount" + self.voided_amount = data["voided_amount"] + end + if data.include? "voided_amount_local" + self.voided_amount_local = data["voided_amount_local"] + end if data.include? "currency" self.currency = data["currency"] end if data.include? "error_code" self.error_code = data["error_code"] @@ -807,9 +827,11 @@ self.captured_amount_local = data.fetch(:captured_amount_local, self.captured_amount_local) self.refunded_amount = data.fetch(:refunded_amount, self.refunded_amount) self.refunded_amount_local = data.fetch(:refunded_amount_local, self.refunded_amount_local) self.available_amount = data.fetch(:available_amount, self.available_amount) self.available_amount_local = data.fetch(:available_amount_local, self.available_amount_local) + self.voided_amount = data.fetch(:voided_amount, self.voided_amount) + self.voided_amount_local = data.fetch(:voided_amount_local, self.voided_amount_local) self.currency = data.fetch(:currency, self.currency) self.error_code = data.fetch(:error_code, self.error_code) self.error_message = data.fetch(:error_message, self.error_message) self.acquirer_name = data.fetch(:acquirer_name, self.acquirer_name) self.gateway_name = data.fetch(:gateway_name, self.gateway_name)