Class: VisaAcceptanceMergedSpec::Features24

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/visa_acceptance_merged_spec/models/features24.rb

Overview

Features24 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(account_funding_source: SKIP, account_funding_source_sub_type: SKIP, card_product: SKIP, message_type: SKIP, acceptance_level: SKIP, card_platform: SKIP, combo_card: SKIP, additional_properties: nil) ⇒ Features24

Returns a new instance of Features24.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 104

def initialize(account_funding_source: SKIP,
               account_funding_source_sub_type: SKIP, card_product: SKIP,
               message_type: SKIP, acceptance_level: SKIP,
               card_platform: SKIP, combo_card: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @account_funding_source =  unless  == SKIP
  unless  == SKIP
    @account_funding_source_sub_type =
      
  end
  @card_product = card_product unless card_product == SKIP
  @message_type = message_type unless message_type == SKIP
  @acceptance_level = acceptance_level unless acceptance_level == SKIP
  @card_platform = card_platform unless card_platform == SKIP
  @combo_card = combo_card unless combo_card == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#acceptance_levelString

This field contains the acceptance level of the PAN. Possible values:

- `0` : Normal
- `1` : Monitor
- `2` : Refuse
- `3` : Not Allowed
- `4` : Private
- `5` : Test

Returns:

  • (String)


53
54
55
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 53

def acceptance_level
  @acceptance_level
end

#account_funding_sourceString

This field contains the account funding source. Possible values:

- `CREDIT`
- `DEBIT`
- `PREPAID`
- `DEFERRED DEBIT`
- `CHARGE`

Returns:

  • (String)


20
21
22
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 20

def 
  @account_funding_source
end

#account_funding_source_sub_typeString

This field contains the type of prepaid card. Possible values:

- `Reloadable`
- `Non-reloadable`

Returns:

  • (String)


27
28
29
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 27

def 
  @account_funding_source_sub_type
end

#card_platformString

This field contains the type of card platform. Possible values:

- `BUSINESS`
- `CONSUMER`
- `COMMERCIAL`
- `GOVERNMENT`

Returns:

  • (String)


62
63
64
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 62

def card_platform
  @card_platform
end

#card_productString

This field contains the type of issuer product. Example values:

- Visa Classic
- Visa Signature
- Visa Infinite

Returns:

  • (String)


35
36
37
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 35

def card_product
  @card_product
end

#combo_cardString

This field indicates the type of combo card. Possible values:

- 0 (Not a combo card)
- 1 (Credit and Prepaid Combo card)
- 2 (Credit and Debit Combo card)

Returns:

  • (String)


70
71
72
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 70

def combo_card
  @combo_card
end

#message_typeString

This field contains the type of BIN based authentication. Possible values:

- `S`: Single Message
- `D`: Dual Message

Returns:

  • (String)


42
43
44
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 42

def message_type
  @message_type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 126

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   =
    hash.key?('accountFundingSource') ? hash['accountFundingSource'] : SKIP
   =
    hash.key?('accountFundingSourceSubType') ? hash['accountFundingSourceSubType'] : SKIP
  card_product = hash.key?('cardProduct') ? hash['cardProduct'] : SKIP
  message_type = hash.key?('messageType') ? hash['messageType'] : SKIP
  acceptance_level =
    hash.key?('acceptanceLevel') ? hash['acceptanceLevel'] : SKIP
  card_platform = hash.key?('cardPlatform') ? hash['cardPlatform'] : SKIP
  combo_card = hash.key?('comboCard') ? hash['comboCard'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  Features24.new(account_funding_source: ,
                 account_funding_source_sub_type: ,
                 card_product: card_product,
                 message_type: message_type,
                 acceptance_level: acceptance_level,
                 card_platform: card_platform,
                 combo_card: combo_card,
                 additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 73

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_funding_source'] = 'accountFundingSource'
  @_hash['account_funding_source_sub_type'] =
    'accountFundingSourceSubType'
  @_hash['card_product'] = 'cardProduct'
  @_hash['message_type'] = 'messageType'
  @_hash['acceptance_level'] = 'acceptanceLevel'
  @_hash['card_platform'] = 'cardPlatform'
  @_hash['combo_card'] = 'comboCard'
  @_hash
end

.nullablesObject

An array for nullable fields



100
101
102
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 100

def self.nullables
  []
end

.optionalsObject

An array for optional fields



87
88
89
90
91
92
93
94
95
96
97
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 87

def self.optionals
  %w[
    account_funding_source
    account_funding_source_sub_type
    card_product
    message_type
    acceptance_level
    card_platform
    combo_card
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



170
171
172
173
174
175
176
177
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 170

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} account_funding_source: #{@account_funding_source.inspect},"\
  " account_funding_source_sub_type: #{@account_funding_source_sub_type.inspect},"\
  " card_product: #{@card_product.inspect}, message_type: #{@message_type.inspect},"\
  " acceptance_level: #{@acceptance_level.inspect}, card_platform: #{@card_platform.inspect},"\
  " combo_card: #{@combo_card.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



160
161
162
163
164
165
166
167
# File 'lib/visa_acceptance_merged_spec/models/features24.rb', line 160

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} account_funding_source: #{@account_funding_source},"\
  " account_funding_source_sub_type: #{@account_funding_source_sub_type}, card_product:"\
  " #{@card_product}, message_type: #{@message_type}, acceptance_level: #{@acceptance_level},"\
  " card_platform: #{@card_platform}, combo_card: #{@combo_card}, additional_properties:"\
  " #{@additional_properties}>"
end