Class: Vendors::Restaurants::SerializerHelper

Inherits:
Object
  • Object
show all
Defined in:
app/my_lib/vendors/restaurants/serializer_helper.rb

Instance Method Summary collapse

Instance Method Details

#format_rounded(cents, currency) ⇒ Object



7
8
9
# File 'app/my_lib/vendors/restaurants/serializer_helper.rb', line 7

def format_rounded(cents, currency)
  HhMoney.format_rounded(cents, currency || 'THB', round: :down)
end

#is_openrice?(vendor_name) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'app/my_lib/vendors/restaurants/serializer_helper.rb', line 3

def is_openrice?(vendor_name)
  vendor_name == ApiVendorV1::Constants::OPEN_RICE_VENDOR_NAME
end