Skip to content

Instantly share code, notes, and snippets.

Avatar

Augusto AugustoPedraza

View GitHub Profile
View gql_opt_in_form_results.json
{
"data": {
"optInForm": {
"account": {
"avatarUrl": "https://cdn.filestackcontent.com/KCfpYP8sTWqIRU6DRCvf",
"isVerified": "true",
"name": {
"values": "{\"en\":\"Brian White\"}"
}
},
View create_member_mutation_with_errors.gql
//
// The mutation
//
mutation test($createMember: CreateMemberViaOptInFormInput) {
createMemberViaOptInForm(input: $createMember) {
member {
createdVia
data
insertedAt
View create_member_mutation.gql
//
// GQL query
//
mutation test($createMember: CreateMemberViaOptInFormInput) {
createMemberViaOptInForm(input: $createMember) {
member {
createdVia
data
insertedAt
View get_opt_in form.gql
/////////////////
// The query
/////////////////
query {
optInForm(shortId: "an id") {
account {
avatarUrl
View capture_form.gql
query {
captureForm(shortId: "an id") {
account {
avatarUrl
isVerified
}
afterSubmission
avatarMedia {
extensionType
sourceUuid
@AugustoPedraza
AugustoPedraza / poc_account_registration.rb
Created Mar 3, 2016
Yodlee Account Registration Code Sketch
View poc_account_registration.rb
# app/controllers/institution_controller.rb
class InstitutionsController < ApplicationController
def create
if uses_intuit?
#existing code
else
service_response = Services::YodleeAccount::Register.call(current_user, params, id)
redirect to_some_place_after_success_login and return if service_response[:status] == :complete
render 'mfa_form', mfa_form: service_response[:mfa_form] and return if service_response[:status] == :missing_mfa
@AugustoPedraza
AugustoPedraza / ugly_yodlee_example.rb
Created Mar 3, 2016
Official Yodlee code example
View ugly_yodlee_example.rb
#Code downloaded from https://developer.yodlee.com/Aggregation_API/Sample_Apps/RUBY
require './aggregation/SiteApp'
require './util/Encryption'
$encryptCall = Encryption.new
$siteCall = SiteApp.new
$providerAccountId = ''
class AddSiteAccount
@AugustoPedraza
AugustoPedraza / yodlee_providers_sync.rb
Last active Feb 16, 2016
Code sketch for yodlee providers synchronization
View yodlee_providers_sync.rb
# lib/yodlee/api/v1/provider.rb
class Yodlee::Api::V1::Provider < Yodlee::Api::V1::Base
# [ {id: 1, lastModified: 2013-01-02T00:39:52Z}, {id: 3, lastModified: 2013-01-02T00:39:52Z}, {id: 4, lastModified: 2013-01-02T00:39:52Z} ]
def list_all
caller_result = for_session.list_providers
list = []
caller_result.provider.map do |provider|
partial_provider = {}
@AugustoPedraza
AugustoPedraza / yodlee_user_integration_poc.rb
Last active Feb 3, 2016
Yodlee user registration (complete stack)
View yodlee_user_integration_poc.rb
# app/models/user.rb
class User
include YodleeRegistrable
end
# app/models/concers/yodlee_registrable.rb
module YodleeRegistrable
extend ActiveSupport::Concern
included do
View api_integration_poc.rb
class Yodlee:Api::V1::RequestBuilder
METADATA_REQUESTS =
{
get_user_info: { method: :get, path: '/user' },
list_accounts: { method: :get, path: '/accounts' },
create_user: { method: :post, path: '/user/register' }
}
attr_accessor :cobrand_session, :user_session