Class: TestTrack::Remote::VisitorDetail

Inherits:
Object
  • Object
show all
Includes:
TestTrack::RemoteModel
Defined in:
app/models/test_track/remote/visitor_detail.rb

Class Method Summary collapse

Class Method Details

.fake_instance_attributes(_) ⇒ Object



15
16
17
18
19
20
21
22
# File 'app/models/test_track/remote/visitor_detail.rb', line 15

def self.fake_instance_attributes(_)
  {
    assignment_details: [
      TestTrack::Remote::AssignmentDetail.fake_instance_attributes(nil),
      TestTrack::Remote::AssignmentDetail.fake_instance_attributes(nil)
    ]
  }
end

.from_identifier(identifier_type, identifier_value) ⇒ Object



6
7
8
9
10
11
12
13
# File 'app/models/test_track/remote/visitor_detail.rb', line 6

def self.from_identifier(identifier_type, identifier_value)
  # TODO: FakeableHer needs to make this faking a feature of `get`
  if faked?
    new(fake_instance_attributes(nil))
  else
    get("api/v1/identifier_types/#{identifier_type}/identifiers/#{identifier_value}/visitor_detail")
  end
end