lib/processout/invoice.rb in processout-2.9.0 vs lib/processout/invoice.rb in processout-2.10.0
- old
+ new
@@ -29,10 +29,11 @@
attr_reader :statement_descriptor_company
attr_reader :statement_descriptor_url
attr_reader :metadata
attr_reader :return_url
attr_reader :cancel_url
+ attr_reader :webhook_url
attr_reader :sandbox
attr_reader :created_at
def id=(val)
@@ -205,10 +206,14 @@
def cancel_url=(val)
@cancel_url = val
end
+ def webhook_url=(val)
+ @webhook_url = val
+ end
+
def sandbox=(val)
@sandbox = val
end
def created_at=(val)
@@ -245,10 +250,11 @@
self.statement_descriptor_company = data.fetch(:statement_descriptor_company, nil)
self.statement_descriptor_url = data.fetch(:statement_descriptor_url, nil)
self.metadata = data.fetch(:metadata, nil)
self.return_url = data.fetch(:return_url, nil)
self.cancel_url = data.fetch(:cancel_url, nil)
+ self.webhook_url = data.fetch(:webhook_url, nil)
self.sandbox = data.fetch(:sandbox, nil)
self.created_at = data.fetch(:created_at, nil)
end
@@ -334,10 +340,13 @@
self.return_url = data["return_url"]
end
if data.include? "cancel_url"
self.cancel_url = data["cancel_url"]
end
+ if data.include? "webhook_url"
+ self.webhook_url = data["webhook_url"]
+ end
if data.include? "sandbox"
self.sandbox = data["sandbox"]
end
if data.include? "created_at"
self.created_at = data["created_at"]
@@ -375,10 +384,11 @@
self.statement_descriptor_company = data.fetch(:statement_descriptor_company, self.statement_descriptor_company)
self.statement_descriptor_url = data.fetch(:statement_descriptor_url, self.statement_descriptor_url)
self.metadata = data.fetch(:metadata, self.metadata)
self.return_url = data.fetch(:return_url, self.return_url)
self.cancel_url = data.fetch(:cancel_url, self.cancel_url)
+ self.webhook_url = data.fetch(:webhook_url, self.webhook_url)
self.sandbox = data.fetch(:sandbox, self.sandbox)
self.created_at = data.fetch(:created_at, self.created_at)
self
end
@@ -611,10 +621,11 @@
"statement_descriptor_phone" => @statement_descriptor_phone,
"statement_descriptor_city" => @statement_descriptor_city,
"statement_descriptor_company" => @statement_descriptor_company,
"statement_descriptor_url" => @statement_descriptor_url,
"return_url" => @return_url,
- "cancel_url" => @cancel_url
+ "cancel_url" => @cancel_url,
+ "webhook_url" => @webhook_url
}
response = Response.new(request.post(path, data, options))
return_values = Array.new