Project

apralib

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby client for the Apra Service
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.1
~> 13.0.0
~> 3.10.0
>= 0

Runtime

~> 2.12.0
 Project Readme

Apralib

Build Status Gem Version

A Ruby library to submit documents to the Apra Service run by Maatalousyrittäjien eläkelaitos

Installation

Add this line to your application's Gemfile:

gem 'apralib'

And then execute:

$ bundle

Or install it yourself as:

$ gem install apralib

Usage

To use this gem you will need credentials from Maatalousyrittäjien eläkelaitos.

Once you have obtained the credentials you can instantiate a client

ApraService::Client.new(username, password)

you can then create one or more notifications to be sent to the server

notification = Notification.new
grantee = Grantee.new
grantee.first_names='Teppo'
grantee.last_name = 'Taiteilija'
grantee.ssn = '111111-111C'
notification.grantee = grantee
notification.granted_to_group = false
notification.expense_amount = 0
notification.amount = 10000
notification.purpose = 'My grant purpose'
notification.grant_date = Date.today << 1
notification.reference = 'My project rede'
notification.work_duration_months = 1
notification.work_duration_days = 2
notification.work_duration_years = 3
notification.work_start_date = Date.today
notification.work_end_date = Date.today >> 1
service.send_notifications(notification)

As the information passed through the notification is dependent on the statutory earnings-related pension of those receiving a grant or a scholarship from Finland, this readme does not explain the meaning of the different fields in the notification object. For further information please refer to the Mela website

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request