To use the gem you need to add it on your Gemfile
Latest version
gem 'satispay', git: 'https://github.com/ideonetwork/satispay'
Legacy version
gem 'satispay'
To use the API you need to initialize a new instance
satispay = Satispay::Api.new(env, security_bearer)
# NB: env sholud be 'prod' or 'staging'
Allow application to check if bearer is valid.
response = satispay.check_bearer
response = satispay.all_users(*extra_params)
For extra params info watch the official documentation: https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html#get-a-user-list
response = satispay.create_user(phone_number: user_phone_number, *extra_params)
For extra params info watch the official documentation: https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html#create-a-user
response = satispay.get_user(user_id: user_satispay_id)
response = satispay.all_charges(*extra_params)
For extra params info watch the official documentation: https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html#get-a-charge-list
response = satispay.create_charge(user_id: user_id, currency: 'EUR', amount: 100, *extra_params)
For extra params info watch the official documentation: https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html#create-a-charge
response = satispay.get_charge(charge_id: charge_id)
response = satispay.update_charge(charge_id: charge_id, *extra_params)
For extra params info watch the official documentation: https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html#update-a-charge
response = satispay.all_refunds(*extra_params)
For extra params info watch the official documentation: https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html#get-a-refunds-list
To update the rdoc documentation run:
rdoc --op rdoc