class Faker::Commerce

def promotion_code(digits: 6)

Returns:
  • (String) -

Parameters:
  • digits (Integer) -- Updates the number of numerical digits used to generate the promotion code.
def promotion_code(digits: 6)
  [
    fetch('commerce.promotion_code.adjective'),
    fetch('commerce.promotion_code.noun'),
    Faker::Number.number(digits: digits)
  ].join
end