2021-04-29 16:53:32 +00:00
|
|
|
json.id resource.display_id
|
|
|
|
json.title resource.title
|
2021-04-30 13:15:24 +00:00
|
|
|
json.description resource.description
|
2021-04-29 16:53:32 +00:00
|
|
|
json.account_id resource.account_id
|
|
|
|
json.inbox do
|
|
|
|
json.partial! 'api/v1/models/inbox.json.jbuilder', resource: resource.inbox
|
|
|
|
end
|
|
|
|
json.sender do
|
|
|
|
json.partial! 'api/v1/models/agent.json.jbuilder', resource: resource.sender if resource.sender.present?
|
|
|
|
end
|
2021-04-30 13:15:24 +00:00
|
|
|
json.message resource.message
|
2021-07-14 06:54:09 +00:00
|
|
|
json.campaign_status resource.campaign_status
|
2021-04-30 13:15:24 +00:00
|
|
|
json.enabled resource.enabled
|
2021-07-14 06:54:09 +00:00
|
|
|
json.campaign_type resource.campaign_type
|
|
|
|
if resource.campaign_type == 'one_off'
|
2022-02-14 05:50:31 +00:00
|
|
|
json.scheduled_at resource.scheduled_at.to_i
|
2021-07-14 06:54:09 +00:00
|
|
|
json.audience resource.audience
|
|
|
|
end
|
2021-04-30 13:15:24 +00:00
|
|
|
json.trigger_rules resource.trigger_rules
|
2021-10-12 12:28:33 +00:00
|
|
|
json.trigger_only_during_business_hours resource.trigger_only_during_business_hours
|
2021-04-29 16:53:32 +00:00
|
|
|
json.created_at resource.created_at
|
|
|
|
json.updated_at resource.updated_at
|