Class: Centaman::Object::Effect

Inherits:
Centaman::Object show all
Defined in:
lib/centaman/object/effect.rb

Instance Method Summary collapse

Methods inherited from Centaman::Object

#after_init, #define_variables, #initialize

Constructor Details

This class inherits a constructor from Centaman::Object

Instance Method Details

#attributesObject

rubocop:disable Metrics/MethodLength



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/centaman/object/effect.rb', line 4

def attributes
  [
    Centaman::Attribute.new(
      centaman_key: 'Valid',
      app_key: :valid,
      type: :boolean
    ),
    Centaman::Attribute.new(
      centaman_key: 'ProductType',
      app_key: :product_type,
      type: :string
    ),
    Centaman::Attribute.new(
      centaman_key: 'ProductCode',
      app_key: :product_code,
      type: :integer
    ),
    Centaman::Attribute.new(
      centaman_key: 'EffectType',
      app_key: :effect_type,
      type: :string
    ),
    Centaman::Attribute.new(
      centaman_key: 'Amount',
      app_key: :amount,
      type: :float
    ),
    Centaman::Attribute.new(
      centaman_key: 'ReasonInvalid',
      app_key: :reason_invalid,
      type: :string
    ),
    Centaman::Attribute.new(
      centaman_key: 'ValidFrom',
      app_key: :valid_from,
      type: :datetime
    ),
    Centaman::Attribute.new(
      centaman_key: 'ValidUntil',
      app_key: :valid_until,
      type: :datetime
    ),
    Centaman::Attribute.new(
      centaman_key: 'WaiveTicketFee',
      app_key: :waive_ticket_fee,
      type: :boolean
    )
  ]
end