Class: Greensky::LongApplication
- Inherits:
-
Object
- Object
- Greensky::LongApplication
- Defined in:
- lib/greensky/long_application.rb
Instance Method Summary collapse
- #accept!(offer_id) ⇒ Object
- #agreement ⇒ Object
- #application_status ⇒ Object
-
#as_json(*args) ⇒ Object
Greensky::LongApplication # as_json.
- #decision ⇒ Object
- #download_document(&block) ⇒ Object
- #offers ⇒ Object
- #recalculate_offer ⇒ Object
- #referral ⇒ Object
- #state ⇒ Object
- #submit! ⇒ Object
Instance Method Details
#accept!(offer_id) ⇒ Object
103 104 105 |
# File 'lib/greensky/long_application.rb', line 103 def accept!(offer_id) Greensky.create(self, offer_id) end |
#agreement ⇒ Object
99 100 101 |
# File 'lib/greensky/long_application.rb', line 99 def agreement Greensky.agreement(self) end |
#application_status ⇒ Object
115 116 117 |
# File 'lib/greensky/long_application.rb', line 115 def application_status decision['status'] end |
#as_json(*args) ⇒ Object
Greensky::LongApplication # as_json
76 77 78 79 80 81 |
# File 'lib/greensky/long_application.rb', line 76 def as_json(*args) attributes.merge({ applicantDateOfBirth: format_date_json(applicantDateOfBirth), coApplicantDateOfBirth: format_date_json(coApplicantDateOfBirth) }) end |
#decision ⇒ Object
111 112 113 |
# File 'lib/greensky/long_application.rb', line 111 def decision Greensky.decision(self) end |
#download_document(&block) ⇒ Object
107 108 109 |
# File 'lib/greensky/long_application.rb', line 107 def download_document(&block) Greensky.download_document(self, &block) end |
#offers ⇒ Object
91 92 93 |
# File 'lib/greensky/long_application.rb', line 91 def offers Greensky.offers(self) end |
#recalculate_offer ⇒ Object
87 88 89 |
# File 'lib/greensky/long_application.rb', line 87 def recalculate_offer Greensky.recalculate_offer(self) end |
#referral ⇒ Object
119 120 121 |
# File 'lib/greensky/long_application.rb', line 119 def referral super || ('%s-%s' % [merchantNumber, plan]) end |
#state ⇒ Object
95 96 97 |
# File 'lib/greensky/long_application.rb', line 95 def state Greensky.state(self) end |
#submit! ⇒ Object
83 84 85 |
# File 'lib/greensky/long_application.rb', line 83 def submit! self.attributes = Greensky.submit_async(self) end |