Class: ForitPostBackService
- Inherits:
-
ApplicationService
- Object
- ApplicationService
- ForitPostBackService
- Defined in:
- app/services/forit_post_back_service.rb
Instance Attribute Summary collapse
-
#click_id ⇒ Object
readonly
Returns the value of attribute click_id.
-
#reservation ⇒ Object
readonly
Returns the value of attribute reservation.
Attributes inherited from ApplicationService
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(reservation_id, click_id, adv_partner) ⇒ ForitPostBackService
constructor
A new instance of ForitPostBackService.
Methods inherited from ApplicationService
Constructor Details
#initialize(reservation_id, click_id, adv_partner) ⇒ ForitPostBackService
Returns a new instance of ForitPostBackService.
4 5 6 7 8 |
# File 'app/services/forit_post_back_service.rb', line 4 def initialize(reservation_id, click_id, adv_partner) @reservation = Reservation.fetch reservation_id @click_id = click_id @adv_partner = validate_adv_partner(adv_partner) end |
Instance Attribute Details
#click_id ⇒ Object (readonly)
Returns the value of attribute click_id.
2 3 4 |
# File 'app/services/forit_post_back_service.rb', line 2 def click_id @click_id end |
#reservation ⇒ Object (readonly)
Returns the value of attribute reservation.
2 3 4 |
# File 'app/services/forit_post_back_service.rb', line 2 def reservation @reservation end |
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/services/forit_post_back_service.rb', line 10 def execute if @adv_partner == 'forit' Faraday.get forit_to_url else raise ArgumentError, "Invalid adv_partner: #{@adv_partner}" end end |