Let me apologize for the wall of text first, I am a relatively new RoR developer in need of some assistance.
My company is building a RoR application that will utilize Dwolla services to request and send funds.
The functional nature of our application doesn’t require any user login through the OAuth flow, it relies on the application being capable to authenticate as itself and execute funding requests and outbound transfers.
After going through the documentation, an application was created on the UAT website this provided an API key and secret along with the ability to generate new token pairs.
A configuration object was implemented to securely store these values and make an initial hand-shake request with Dwolla API to validate the entered API config data is valid. The class “DwollaConfiguration” works for both the storage for API sensitive information and the execution of all web calls to Dwolla.
For the sake of simplicity, the validation will be done by exchanging the refresh token for a new token pair using the provided key and secret.
After some more research, the “Dwolla V2” gem will be used, instead of “Dwolla Swagger”, to implement the functionality described above. The gem is installed and can be referenced properly.
Here are some questions based on the gem documentation:
- Is there a suggested model structure for storing the token information?
- Is there a code sample for “YourSampleToken” class?
- To which “account_id” is the above code referring?
- Can I use my existing “DwollaConfiguration” object (as “YourTokenData”) by implementing an interface?
Thanks in advance for any help you can provide, I will appreciate any suggestions.