Permalink
Browse files

support MultiUse tokens

  • Loading branch information...
1 parent 0c53e66 commit f64590fd24c6a0ac9fb3b4ad92e1a54eb6095526 @donpdonp donpdonp committed Feb 18, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/boomerang.rb
View
@@ -52,13 +52,19 @@ def cbui_form(pipeline, parameters)
%w[callerReference recipientPaysFee]
when "Recurring"
%w[callerReference recurringPeriod transactionAmount]
+ when "MultiUse"
+ %w[callerReference globalAmountLimit recipientTokenList]
end
required_fields.each do |required_field|
unless parameters[required_field]
fail ArgumentError, "#{required_field} is a required parameter"
end
end
+ if pipeline == "MultiUse" && parameters["recipientTokenList"].is_a?(Array)
+ parameters["recipientTokenList"] = parameters["recipientTokenList"].join(',')
+ end
+
url = ENDPOINTS[use_sandbox? ? :cbui_sandbox : :cbui]
signature = Signature.new("GET", url, parameters)
signature.sign(@access_key_id, @secret_access_key)

0 comments on commit f64590f

Please sign in to comment.