class MoneyMover::Dwolla::VerifiedBusinessCustomer
Private Instance Methods
create_params()
click to toggle source
validates_inclusion_of :businessType, in: COMPANY_TYPES
# File lib/money_mover/dwolla/models/verified_business_customer.rb, line 20 def create_params create_attrs = { firstName: firstName, lastName: lastName, email: email, address1: address1, address2: address2, city: city, state: state, postalCode: postalCode, dateOfBirth: dateOfBirth, ssn: ssn, phone: phone, businessClassification: businessClassification, businessType: businessType, businessName: businessName, ein: ein, doingBusinessAs: doingBusinessAs, website: website_with_protocol, ipAddress: ipAddress, type: 'business' } # hack to fix bug on dwolla's side with funding sources being removed if no dba is sent create_attrs[:doingBusinessAs] = businessName unless doingBusinessAs.present? create_attrs.reject{|_key, val| !val.present? } end