Class: Eddy::Rails::TSetControlNumber

Inherits:
ApplicationRecord show all
Defined in:
app/models/eddy/rails/t_set_control_number.rb

Overview

Transaction Set Control Number

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#numberInteger

Returns:

  • (Integer)


12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/models/eddy/rails/t_set_control_number.rb', line 12

validates(
  :t_set,
  presence: true,
  format: {
    with: /\A[1-9][0-9]{2}\z/,
    message: "%{value} is not a valid Transaction Set",
  },
  # inclusion: {
  #   in: Eddy::Rails.valid_transaction_sets(),
  #   message: "%{value} is not a valid Transaction Set",
  # },
)

#receivedBoolean

Returns:

  • (Boolean)


12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/models/eddy/rails/t_set_control_number.rb', line 12

validates(
  :t_set,
  presence: true,
  format: {
    with: /\A[1-9][0-9]{2}\z/,
    message: "%{value} is not a valid Transaction Set",
  },
  # inclusion: {
  #   in: Eddy::Rails.valid_transaction_sets(),
  #   message: "%{value} is not a valid Transaction Set",
  # },
)

#sentBoolean

Returns:

  • (Boolean)


12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/models/eddy/rails/t_set_control_number.rb', line 12

validates(
  :t_set,
  presence: true,
  format: {
    with: /\A[1-9][0-9]{2}\z/,
    message: "%{value} is not a valid Transaction Set",
  },
  # inclusion: {
  #   in: Eddy::Rails.valid_transaction_sets(),
  #   message: "%{value} is not a valid Transaction Set",
  # },
)

#t_setString

Returns:

  • (String)


12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/models/eddy/rails/t_set_control_number.rb', line 12

validates(
  :t_set,
  presence: true,
  format: {
    with: /\A[1-9][0-9]{2}\z/,
    message: "%{value} is not a valid Transaction Set",
  },
  # inclusion: {
  #   in: Eddy::Rails.valid_transaction_sets(),
  #   message: "%{value} is not a valid Transaction Set",
  # },
)

Class Method Details

.create!self

Parameters:

  • number (Integer)
  • t_set (String)
  • sent (Boolean)

    (false)

  • received (Boolean)

    (false)

Returns:

  • (self)


# File 'app/models/eddy/rails/t_set_control_number.rb', line 32