Class: Youlend::Lead
- Inherits:
-
Object
- Object
- Youlend::Lead
- Defined in:
- lib/youlend/lead.rb
Class Method Summary collapse
- .accept_offer(lead_id, offer_id) ⇒ Object
- .create(params) ⇒ Object
- .details(lead_id) ⇒ Object
- .offers(lead_id) ⇒ Object
- .onboard_link(lead_id, email_address) ⇒ Object
- .update(lead_id, params) ⇒ Object
Class Method Details
.accept_offer(lead_id, offer_id) ⇒ Object
22 23 24 |
# File 'lib/youlend/lead.rb', line 22 def self.accept_offer(lead_id, offer_id) Youlend.connection.post("/onboarding/Leads/#{lead_id}/offers/#{offer_id}/acceptance", :onboarding) end |
.create(params) ⇒ Object
6 7 8 |
# File 'lib/youlend/lead.rb', line 6 def self.create(params) Youlend.connection.post('/onboarding/Leads', :onboarding, params) end |
.details(lead_id) ⇒ Object
14 15 16 |
# File 'lib/youlend/lead.rb', line 14 def self.details(lead_id) Youlend.connection.get("/onboarding/Leads/#{lead_id}/details", :onboarding) end |
.offers(lead_id) ⇒ Object
18 19 20 |
# File 'lib/youlend/lead.rb', line 18 def self.offers(lead_id) Youlend.connection.get("/onboarding/Leads/#{lead_id}/offers", :onboarding) end |
.onboard_link(lead_id, email_address) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/youlend/lead.rb', line 26 def self.onboard_link(lead_id, email_address) domain = Youlend.configuration.domain url = Addressable::Template.new("#{domain}/dashboard/youlendapisignup{?query*}") url.(query: { emailAddress: email_address, leadId: lead_id }).to_s end |
.update(lead_id, params) ⇒ Object
10 11 12 |
# File 'lib/youlend/lead.rb', line 10 def self.update(lead_id, params) Youlend.connection.put("/onboarding/Leads/#{lead_id}/organisationdetails", :onboarding, params) end |