Class: ShellCardManagementApIs::RestrictioncardsRes

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_card_management_ap_is/models/restrictioncards_res.rb

Overview

RestrictioncardsRes Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(account_id = SKIP, account_number = SKIP, card_id = SKIP, pan = SKIP, usage_restriction_status = SKIP, usage_restriction_description = SKIP, day_time_restriction_status = SKIP, day_time_restriction_description = SKIP, product_restriction_status = SKIP, product_restriction_description = SKIP, location_restriction_status = SKIP, location_restriction_status_description = SKIP, validation_error_code = SKIP, validation_error_description = SKIP) ⇒ RestrictioncardsRes

Returns a new instance of RestrictioncardsRes.



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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 128

def initialize( = SKIP,  = SKIP, card_id = SKIP,
               pan = SKIP, usage_restriction_status = SKIP,
               usage_restriction_description = SKIP,
               day_time_restriction_status = SKIP,
               day_time_restriction_description = SKIP,
               product_restriction_status = SKIP,
               product_restriction_description = SKIP,
               location_restriction_status = SKIP,
               location_restriction_status_description = SKIP,
               validation_error_code = SKIP,
               validation_error_description = SKIP)
  @account_id =  unless  == SKIP
  @account_number =  unless  == SKIP
  @card_id = card_id unless card_id == SKIP
  @pan = pan unless pan == SKIP
  @usage_restriction_status = usage_restriction_status unless usage_restriction_status == SKIP
  unless usage_restriction_description == SKIP
    @usage_restriction_description =
      usage_restriction_description
  end
  unless day_time_restriction_status == SKIP
    @day_time_restriction_status =
      day_time_restriction_status
  end
  unless day_time_restriction_description == SKIP
    @day_time_restriction_description =
      day_time_restriction_description
  end
  unless product_restriction_status == SKIP
    @product_restriction_status =
      product_restriction_status
  end
  unless product_restriction_description == SKIP
    @product_restriction_description =
      product_restriction_description
  end
  unless location_restriction_status == SKIP
    @location_restriction_status =
      location_restriction_status
  end
  unless location_restriction_status_description == SKIP
    @location_restriction_status_description =
      location_restriction_status_description
  end
  @validation_error_code = validation_error_code unless validation_error_code == SKIP
  unless validation_error_description == SKIP
    @validation_error_description =
      validation_error_description
  end
end

Instance Attribute Details

#account_idInteger

Account Id of the customer. Example: 123456

Returns:

  • (Integer)


15
16
17
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 15

def 
  @account_id
end

#account_numberString

Account Number of the customer. Example: GB000000123

Returns:

  • (String)


20
21
22
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 20

def 
  @account_number
end

#card_idString

Unique Card Id Example: 275549

Returns:

  • (String)


25
26
27
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 25

def card_id
  @card_id
end

#day_time_restriction_descriptionString

Response for the day/time restriction in case of an error. This field will have a value only when “DayTimeRestrictionStatus” is “Failed”.

Returns:

  • (String)


50
51
52
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 50

def day_time_restriction_description
  @day_time_restriction_description
end

#day_time_restriction_statusString

Status of the card day/time restriction submitted. Based on the response from Gateway value will be set as either “Success” or “Failed”.

Returns:

  • (String)


45
46
47
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 45

def day_time_restriction_status
  @day_time_restriction_status
end

#location_restriction_statusString

Card Location restriction submitted, based on response value set as “Success” or “Failed”.

Returns:

  • (String)


65
66
67
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 65

def location_restriction_status
  @location_restriction_status
end

#location_restriction_status_descriptionString

Response for the location restriction in case of an error. This field will have a value only when “LocationRestrictionStatus” is “Failed”.

Returns:

  • (String)


70
71
72
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 70

def location_restriction_status_description
  @location_restriction_status_description
end

#panString

Card PAN. Example: 7002051006629890645

Returns:

  • (String)


30
31
32
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 30

def pan
  @pan
end

#product_restriction_descriptionString

Response for the product restriction in case of an error. This field will have a value only when “ProductRestrictionStatus” is “Failed”.

Returns:

  • (String)


60
61
62
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 60

def product_restriction_description
  @product_restriction_description
end

#product_restriction_statusString

Status of the card product restriction submitted. Based on the response the value will be set either as “Success” or “Failed”.

Returns:

  • (String)


55
56
57
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 55

def product_restriction_status
  @product_restriction_status
end

#usage_restriction_descriptionString

Response for the usage restriction in case of an error. This field will have a value only when “UsageRestrictionStatus” is “Failed”.

Returns:

  • (String)


40
41
42
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 40

def usage_restriction_description
  @usage_restriction_description
end

#usage_restriction_statusString

Status of the card usage restriction submitted. Based on the response the value will be set as either “Success” or “Failed”.

Returns:

  • (String)


35
36
37
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 35

def usage_restriction_status
  @usage_restriction_status
end

#validation_error_codeString

Error code for validation failure.

Returns:

  • (String)


74
75
76
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 74

def validation_error_code
  @validation_error_code
end

#validation_error_descriptionString

Description of validation failure.

Returns:

  • (String)


78
79
80
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 78

def validation_error_description
  @validation_error_description
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 180

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
  usage_restriction_status =
    hash.key?('UsageRestrictionStatus') ? hash['UsageRestrictionStatus'] : SKIP
  usage_restriction_description =
    hash.key?('UsageRestrictionDescription') ? hash['UsageRestrictionDescription'] : SKIP
  day_time_restriction_status =
    hash.key?('DayTimeRestrictionStatus') ? hash['DayTimeRestrictionStatus'] : SKIP
  day_time_restriction_description =
    hash.key?('DayTimeRestrictionDescription') ? hash['DayTimeRestrictionDescription'] : SKIP
  product_restriction_status =
    hash.key?('ProductRestrictionStatus') ? hash['ProductRestrictionStatus'] : SKIP
  product_restriction_description =
    hash.key?('ProductRestrictionDescription') ? hash['ProductRestrictionDescription'] : SKIP
  location_restriction_status =
    hash.key?('LocationRestrictionStatus') ? hash['LocationRestrictionStatus'] : SKIP
  location_restriction_status_description =
    hash.key?('LocationRestrictionStatusDescription') ? hash['LocationRestrictionStatusDescription'] : SKIP
  validation_error_code =
    hash.key?('ValidationErrorCode') ? hash['ValidationErrorCode'] : SKIP
  validation_error_description =
    hash.key?('ValidationErrorDescription') ? hash['ValidationErrorDescription'] : SKIP

  # Create object from extracted values.
  RestrictioncardsRes.new(,
                          ,
                          card_id,
                          pan,
                          usage_restriction_status,
                          usage_restriction_description,
                          day_time_restriction_status,
                          day_time_restriction_description,
                          product_restriction_status,
                          product_restriction_description,
                          location_restriction_status,
                          location_restriction_status_description,
                          validation_error_code,
                          validation_error_description)
end

.namesObject

A mapping from model property names to API property names.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 81

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['card_id'] = 'CardId'
  @_hash['pan'] = 'PAN'
  @_hash['usage_restriction_status'] = 'UsageRestrictionStatus'
  @_hash['usage_restriction_description'] = 'UsageRestrictionDescription'
  @_hash['day_time_restriction_status'] = 'DayTimeRestrictionStatus'
  @_hash['day_time_restriction_description'] =
    'DayTimeRestrictionDescription'
  @_hash['product_restriction_status'] = 'ProductRestrictionStatus'
  @_hash['product_restriction_description'] =
    'ProductRestrictionDescription'
  @_hash['location_restriction_status'] = 'LocationRestrictionStatus'
  @_hash['location_restriction_status_description'] =
    'LocationRestrictionStatusDescription'
  @_hash['validation_error_code'] = 'ValidationErrorCode'
  @_hash['validation_error_description'] = 'ValidationErrorDescription'
  @_hash
end

.nullablesObject

An array for nullable fields



124
125
126
# File 'lib/shell_card_management_ap_is/models/restrictioncards_res.rb', line 124

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    account_id
    account_number
    card_id
    pan
    usage_restriction_status
    usage_restriction_description
    day_time_restriction_status
    day_time_restriction_description
    product_restriction_status
    product_restriction_description
    location_restriction_status
    location_restriction_status_description
    validation_error_code
    validation_error_description
  ]
end