Class: Dune::Api::ContributionSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/dune/api/contribution_serializer.rb

Instance Method Summary collapse

Instance Method Details

#rightsObject



3
4
5
6
7
8
9
10
11
12
13
# File 'app/serializers/dune/api/contribution_serializer.rb', line 3

def rights
  {
    can_pendent: object.can_pendent?,
    can_wait_confirmation: object.can_wait_confirmation?,
    can_confirm: object.can_confirm?,
    can_cancel: object.can_cancel?,
    can_request_refund: object.can_request_refund?,
    can_refund: object.can_refund?,
    can_push_to_trash: object.can_push_to_trash?
  }
end