# TalonOne::LoyaltyProgram ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **Integer** | The ID of loyalty program. | **created** | **DateTime** | The time this entity was created. | **title** | **String** | The display title for the Loyalty Program. | **description** | **String** | Description of our Loyalty Program. | **subscribed_applications** | **Array<Integer>** | A list containing the IDs of all applications that are subscribed to this Loyalty Program. | **default_validity** | **String** | The default duration after which new loyalty points should expire. Can be 'unlimited' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. | **default_pending** | **String** | The default duration of the pending time after which points should be valid. Can be 'immediate' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. | **allow_subledger** | **Boolean** | Indicates if this program supports subledgers inside the program. | **users_per_card_limit** | **Integer** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] **sandbox** | **Boolean** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | **program_join_policy** | **String** | The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. | [optional] **tiers_expiration_policy** | **String** | The policy that defines how tier expiration, used to reevaluate the customer's current tier, is determined. - `tier_start_date`: The tier expiration is relative to when the customer joined the current tier. - `program_join_date`: The tier expiration is relative to when the customer joined the loyalty program. - `customer_attribute`: The tier expiration is determined by a custom customer attribute. - `absolute_expiration`: The tier is reevaluated at the start of each tier cycle. For this policy, it is required to provide a `tierCycleStartDate`. | [optional] **tier_cycle_start_date** | **DateTime** | Timestamp at which the tier cycle starts for all customers in the loyalty program. **Note**: This is only required when the tier expiration policy is set to `absolute_expiration`. | [optional] **tiers_expire_in** | **String** | The amount of time after which the tier expires and is reevaluated. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] **tiers_downgrade_policy** | **String** | The policy that defines how customer tiers are downgraded in the loyalty program after tier reevaluation. - `one_down`: If the customer doesn't have enough points to stay in the current tier, they are downgraded by one tier. - `balance_based`: The customer's tier is reevaluated based on the amount of active points they have at the moment. | [optional] **card_code_settings** | [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **return_policy** | **String** | The policy that defines the rollback of points in case of a partially returned, cancelled, or reopened [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). - `only_pending`: Only pending points can be rolled back. - `within_balance`: Available active points can be rolled back if there aren't enough pending points. The active balance of the customer cannot be negative. | [optional] **account_id** | **Integer** | The ID of the Talon.One account that owns this program. | **name** | **String** | The internal name for the Loyalty Program. This is an immutable value. | **tiers** | [**Array<LoyaltyTier>**](LoyaltyTier.md) | The tiers in this loyalty program. | [optional] **timezone** | **String** | A string containing an IANA timezone descriptor. | **card_based** | **Boolean** | Defines the type of loyalty program: - `true`: the program is a card-based. - `false`: the program is profile-based. | [default to false] **can_update_tiers** | **Boolean** | `True` if the tier definitions can be updated. | [optional] [default to false] **can_update_join_policy** | **Boolean** | `True` if the program join policy can be updated. | [optional] **can_update_tier_expiration_policy** | **Boolean** | `True` if the tier expiration policy can be updated. | [optional] **can_upgrade_to_advanced_tiers** | **Boolean** | `True` if the program can be upgraded to use the `tiersExpireIn` and `tiersDowngradePolicy` properties. | [optional] [default to false] **can_update_subledgers** | **Boolean** | `True` if the `allowSubledger` property can be updated in the loyalty program. | [optional] [default to false] ## Code Sample ```ruby require 'TalonOne' instance = TalonOne::LoyaltyProgram.new(id: 139, created: 2020-06-10T09:05:27.993483Z, title: Point collection, description: Customers collect 10 points per 1$ spent, subscribed_applications: [132, 97], default_validity: 2W_U, default_pending: immediate, allow_subledger: false, users_per_card_limit: 111, sandbox: true, program_join_policy: null, tiers_expiration_policy: null, tier_cycle_start_date: 2021-09-12T10:12:42Z, tiers_expire_in: 27W_U, tiers_downgrade_policy: null, card_code_settings: null, return_policy: null, account_id: 1, name: my_program, tiers: [{name=Gold, minPoints=300, id=3, created=2021-06-10T09:05:27.993483Z, programID=139}, {name=Silver, minPoints=200, id=2, created=2021-06-10T09:04:59.355258Z, programID=139}, {name=Bronze, minPoints=100, id=1, created=2021-06-10T09:04:39.355258Z, programID=139}], timezone: Europe/Berlin, card_based: true, can_update_tiers: true, can_update_join_policy: true, can_update_tier_expiration_policy: true, can_upgrade_to_advanced_tiers: true, can_update_subledgers: true) ```