Class: EML::UK::Parameters::Card::Show

Inherits:
EML::UK::Parameters show all
Defined in:
lib/eml/uk/parameters/card/show.rb

Constant Summary collapse

REQUIRED_CONFIG =
T.let(%i[program].freeze, T::Array[Symbol])
OPTIONAL_CONFIG =
T.let(%i[search_parameter].freeze, T::Array[Symbol])
FIELDS_OPTIONS =
T.let(%i[
  account_expiration_date
  activating_merchant_group_name
  activating_merchant_group_uniquetag
  activation_amount
  activation_country
  activation_date
  activation_transaction_Id
  actual_balance
  adjusted_balance
  agreement_txt
  agreement_pdf
  agreement_pdf_fileName
  amf_amount
  amf_start_date
  amf_next_date
  available_balance
  bank_name
  barcode_image
  can_activate
  can_redeem
  card_image
  card_type
  client_tracking_id
  currency
  cvv2
  distributor_refund
  expiration_date
  has_atm_access
  has_pin
  id
  is_icc_card
  is_organization_registration
  is_registered
  is_reloadable
  is_virtual
  pan
  pan_last_four
  pin_enabled
  print_text
  program_can_register
  program_name
  program_uniquetag
  promotion_balance
  promotion_expiration
  promotion_type_id
  security_code
  status
  uri
  unload_to_ach_fee
].freeze, T::Array[Symbol])

Constants inherited from Parameters

Parameters::ENDPOINT_CLASS_TYPE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from EML::UK::Parameters

convert

Methods inherited from Parameters

convert, #to_h

Constructor Details

#initialize(params) ⇒ Show

Returns a new instance of Show.



65
66
67
68
69
70
71
# File 'lib/eml/uk/parameters/card/show.rb', line 65

def initialize(params)
  super

  @fields = T.let(nil, T.nilable(String))
  @log_balance_inquiry = T.let(nil, T.nilable(String))
  @only_valid_status = T.let(nil, T.nilable(String))
end

Instance Attribute Details

#programObject

Returns the value of attribute program.



95
96
97
# File 'lib/eml/uk/parameters/card/show.rb', line 95

def program
  @program
end

#security_codeObject

Returns the value of attribute security_code.



104
105
106
# File 'lib/eml/uk/parameters/card/show.rb', line 104

def security_code
  @security_code
end

Instance Method Details

#fields=(fields) ⇒ Object



74
75
76
77
78
79
80
81
82
# File 'lib/eml/uk/parameters/card/show.rb', line 74

def fields=(fields)
  unless fields.first == :all
    fields.each do |field|
      validate_array(:fields, field, FIELDS_OPTIONS)
    end
  end

  @fields = fields.join(",")
end

#log_balance_inquiry=(log_balance_inquiry) ⇒ Object



85
86
87
# File 'lib/eml/uk/parameters/card/show.rb', line 85

def log_balance_inquiry=(log_balance_inquiry)
  @log_balance_inquiry = log_balance_inquiry.inspect
end

#only_valid_status=(only_valid_status) ⇒ Object



90
91
92
# File 'lib/eml/uk/parameters/card/show.rb', line 90

def only_valid_status=(only_valid_status)
  @only_valid_status = only_valid_status.inspect
end

#search_parameter=(search_parameter) ⇒ Object



98
99
100
101
# File 'lib/eml/uk/parameters/card/show.rb', line 98

def search_parameter=(search_parameter)
  validate_search_parameter(search_parameter)
  @search_parameter = search_parameter
end