lib/processout/payout_item.rb in processout-2.8.0 vs lib/processout/payout_item.rb in processout-2.9.0
- old
+ new
@@ -13,12 +13,13 @@
attr_reader :payout
attr_reader :payout_id
attr_reader :transaction
attr_reader :transaction_id
attr_reader :type
- attr_reader :gateway_id
- attr_reader :fee
+ attr_reader :gateway_resource_id
+ attr_reader :amount
+ attr_reader :fees
attr_reader :metadata
attr_reader :created_at
def id=(val)
@@ -87,18 +88,22 @@
def type=(val)
@type = val
end
- def gateway_id=(val)
- @gateway_id = val
+ def gateway_resource_id=(val)
+ @gateway_resource_id = val
end
- def fee=(val)
- @fee = val
+ def amount=(val)
+ @amount = val
end
+ def fees=(val)
+ @fees = val
+ end
+
def metadata=(val)
@metadata = val
end
def created_at=(val)
@@ -119,12 +124,13 @@
self.payout = data.fetch(:payout, nil)
self.payout_id = data.fetch(:payout_id, nil)
self.transaction = data.fetch(:transaction, nil)
self.transaction_id = data.fetch(:transaction_id, nil)
self.type = data.fetch(:type, nil)
- self.gateway_id = data.fetch(:gateway_id, nil)
- self.fee = data.fetch(:fee, nil)
+ self.gateway_resource_id = data.fetch(:gateway_resource_id, nil)
+ self.amount = data.fetch(:amount, nil)
+ self.fees = data.fetch(:fees, nil)
self.metadata = data.fetch(:metadata, nil)
self.created_at = data.fetch(:created_at, nil)
end
@@ -162,16 +168,19 @@
self.transaction_id = data["transaction_id"]
end
if data.include? "type"
self.type = data["type"]
end
- if data.include? "gateway_id"
- self.gateway_id = data["gateway_id"]
+ if data.include? "gateway_resource_id"
+ self.gateway_resource_id = data["gateway_resource_id"]
end
- if data.include? "fee"
- self.fee = data["fee"]
+ if data.include? "amount"
+ self.amount = data["amount"]
end
+ if data.include? "fees"
+ self.fees = data["fees"]
+ end
if data.include? "metadata"
self.metadata = data["metadata"]
end
if data.include? "created_at"
self.created_at = data["created_at"]
@@ -193,11 +202,12 @@
self.payout = data.fetch(:payout, self.payout)
self.payout_id = data.fetch(:payout_id, self.payout_id)
self.transaction = data.fetch(:transaction, self.transaction)
self.transaction_id = data.fetch(:transaction_id, self.transaction_id)
self.type = data.fetch(:type, self.type)
- self.gateway_id = data.fetch(:gateway_id, self.gateway_id)
- self.fee = data.fetch(:fee, self.fee)
+ self.gateway_resource_id = data.fetch(:gateway_resource_id, self.gateway_resource_id)
+ self.amount = data.fetch(:amount, self.amount)
+ self.fees = data.fetch(:fees, self.fees)
self.metadata = data.fetch(:metadata, self.metadata)
self.created_at = data.fetch(:created_at, self.created_at)
self
end