lib/fawry.rb in fawry-0.3.0 vs lib/fawry.rb in fawry-1.0.0
- old
+ new
@@ -19,23 +19,23 @@
# Sends a charge request to Fawry API
# performs param validation and builds
# the request signature
#
# @param params [Hash] list of params to send to fawry
- # required(:merchant_code).value(:string)
# required(:merchant_ref_num).value(:string)
# required(:customer_profile_id).value(:string)
# required(:amount).value(:decimal)
# required(:description).value(:string)
# required(:customer_mobile).value(:string)
- # required(:fawry_secure_key).value(:string)
# required(:charge_items).array(:hash) do
# required(:item_id).value(:string)
# required(:description).value(:string)
# required(:price).value(:decimal)
# required(:quantity).value(:integer)
# end
+ # optional(:merchant_code).value(:string)
+ # optional(:fawry_secure_key).value(:string)
# optional(:currency_code).value(:string)
# optional(:card_token).value(:string)
# optional(:customer_email).value(:string)
# optional(:payment_method).value(:string)
# optional(:payment_expiry).value(:integer)
@@ -61,14 +61,14 @@
# Sends a refund request to Fawry API
# performs param validation and builds
# the request signature
#
# @param params [Hash] list of params to send to fawry
- # required(:merchant_code).value(:string)
# required(:reference_number).value(:string)
# required(:refund_amount).value(:decimal)
- # required(:fawry_secure_key).value(:string)
+ # optional(:merchant_code).value(:string)
+ # optional(:fawry_secure_key).value(:string)
# optional(:reason).value(:string)
#
# @param opts [Hash] list of options to
# configure the request
# @option opts :sandbox [Boolean] whether to
@@ -89,13 +89,13 @@
# Sends a payment status request to Fawry API
# performs param validation and builds
# the request signature
#
# @param params [Hash] list of params to send to fawry
- # required(:merchant_code).value(:string)
# required(:merchant_ref_number).value(:string)
- # required(:fawry_secure_key).value(:string)
+ # optional(:merchant_code).value(:string)
+ # optional(:fawry_secure_key).value(:string)
#
# @param opts [Hash] list of options to
# configure the request
# @option opts :sandbox [Boolean] whether to
# send the request to fawry sandbox env or not
@@ -126,10 +126,10 @@
# @raise [Fawry::InvalidSignatureError] raised when
# request signature cannot be verified
#
# @return [Fawry::FawryCallback] an object that
# has Fawry server callback params' keys as instance methods
- def parse_callback(params, fawry_secure_key, opts = {})
- FawryCallback.new(params, fawry_secure_key, opts).parse
+ def parse_callback(params, opts = {})
+ FawryCallback.new(params, opts).parse
end
end
end