lib/processout/invoice.rb in processout-0.2.0 vs lib/processout/invoice.rb in processout-0.2.1
- old
+ new
@@ -205,11 +205,11 @@
# +options+:: +Hash+ of options
def authorize(source, options = nil)
request = Request.new(@client)
path = "/invoices/" + CGI.escape(@id) + "/authorize"
data = {
- 'source': source
+ "source" => source
}
response = Response.new(request.post(path, data, options))
return_values = Array.new
@@ -228,11 +228,11 @@
# +options+:: +Hash+ of options
def capture(source, options = nil)
request = Request.new(@client)
path = "/invoices/" + CGI.escape(@id) + "/capture"
data = {
- 'source': source
+ "source" => source
}
response = Response.new(request.post(path, data, options))
return_values = Array.new
@@ -273,11 +273,11 @@
# +options+:: +Hash+ of options
def assign_customer(customer_id, options = nil)
request = Request.new(@client)
path = "/invoices/" + CGI.escape(@id) + "/customers"
data = {
- 'customer_id': customer_id
+ "customer_id" => customer_id
}
response = Response.new(request.post(path, data, options))
return_values = Array.new
@@ -367,18 +367,18 @@
# +options+:: +Hash+ of options
def create(options = nil)
request = Request.new(@client)
path = "/invoices"
data = {
- "name": @name,
- "amount": @amount,
- "currency": @currency,
- "metadata": @metadata,
- "request_email": @request_email,
- "request_shipping": @request_shipping,
- "return_url": @return_url,
- "cancel_url": @cancel_url
+ "name" => @name,
+ "amount" => @amount,
+ "currency" => @currency,
+ "metadata" => @metadata,
+ "request_email" => @request_email,
+ "request_shipping" => @request_shipping,
+ "return_url" => @return_url,
+ "cancel_url" => @cancel_url
}
response = Response.new(request.post(path, data, options))
return_values = Array.new
@@ -399,18 +399,18 @@
# +options+:: +Hash+ of options
def create_for_customer(customer_id, options = nil)
request = Request.new(@client)
path = "/invoices"
data = {
- "name": @name,
- "amount": @amount,
- "currency": @currency,
- "metadata": @metadata,
- "request_email": @request_email,
- "request_shipping": @request_shipping,
- "return_url": @return_url,
- "cancel_url": @cancel_url,
- 'customer_id': customer_id
+ "name" => @name,
+ "amount" => @amount,
+ "currency" => @currency,
+ "metadata" => @metadata,
+ "request_email" => @request_email,
+ "request_shipping" => @request_shipping,
+ "return_url" => @return_url,
+ "cancel_url" => @cancel_url,
+ "customer_id" => customer_id
}
response = Response.new(request.post(path, data, options))
return_values = Array.new