Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 811 Bytes

CodeGeneratorSettings.md

File metadata and controls

19 lines (12 loc) · 811 Bytes

TalonOne::CodeGeneratorSettings

Properties

Name Type Description Notes
valid_characters Array<String> List of characters used to generate the random parts of a code.
coupon_pattern String The pattern used to generate codes, such as coupon codes, referral codes, and loyalty cards. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set.

Code Sample

require 'TalonOne'

instance = TalonOne::CodeGeneratorSettings.new(valid_characters: [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
                                 coupon_pattern: SUMMER-####-####)