lib/processout/coupon.rb in processout-0.2.0 vs lib/processout/coupon.rb in processout-0.2.1
- old
+ new
@@ -184,18 +184,18 @@
# +options+:: +Hash+ of options
def create(options = nil)
request = Request.new(@client)
path = "/coupons"
data = {
- "id": @id,
- "amount_off": @amount_off,
- "percent_off": @percent_off,
- "currency": @currency,
- "iteration_count": @iteration_count,
- "max_redemptions": @max_redemptions,
- "expires_at": @expires_at,
- "metadata": @metadata
+ "id" => @id,
+ "amount_off" => @amount_off,
+ "percent_off" => @percent_off,
+ "currency" => @currency,
+ "iteration_count" => @iteration_count,
+ "max_redemptions" => @max_redemptions,
+ "expires_at" => @expires_at,
+ "metadata" => @metadata
}
response = Response.new(request.post(path, data, options))
return_values = Array.new
@@ -241,10 +241,10 @@
# +options+:: +Hash+ of options
def save(options = nil)
request = Request.new(@client)
path = "/coupons/" + CGI.escape(@id) + ""
data = {
- "metadata": @metadata
+ "metadata" => @metadata
}
response = Response.new(request.put(path, data, options))
return_values = Array.new