Class: ShellCardManagementApIs::CardGroupResponseCardGroupsItems

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

Overview

CardGroupResponseCardGroupsItems 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, account_short_name = SKIP, active_cards = SKIP, blocked_cards = SKIP, cancelled_cards = SKIP, card_delivery_point = SKIP, card_group_id = SKIP, card_group_name = SKIP, card_type_code = SKIP, card_type_id = SKIP, card_type_name = SKIP, expired_cards = SKIP, expiry_date = SKIP, print_on_card = SKIP, renewal_pending_cards = SKIP, replaced_cards = SKIP, status = SKIP, temporary_block_by_customer = SKIP, temporary_block_by_shell = SKIP, terminated_date = SKIP, total_cards = SKIP) ⇒ CardGroupResponseCardGroupsItems

Returns a new instance of CardGroupResponseCardGroupsItems.



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
225
226
227
228
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 191

def initialize( = SKIP,  = SKIP,
                = SKIP, active_cards = SKIP,
               blocked_cards = SKIP, cancelled_cards = SKIP,
               card_delivery_point = SKIP, card_group_id = SKIP,
               card_group_name = SKIP, card_type_code = SKIP,
               card_type_id = SKIP, card_type_name = SKIP,
               expired_cards = SKIP, expiry_date = SKIP,
               print_on_card = SKIP, renewal_pending_cards = SKIP,
               replaced_cards = SKIP, status = SKIP,
               temporary_block_by_customer = SKIP,
               temporary_block_by_shell = SKIP, terminated_date = SKIP,
               total_cards = SKIP)
  @account_id =  unless  == SKIP
  @account_number =  unless  == SKIP
  @account_short_name =  unless  == SKIP
  @active_cards = active_cards unless active_cards == SKIP
  @blocked_cards = blocked_cards unless blocked_cards == SKIP
  @cancelled_cards = cancelled_cards unless cancelled_cards == SKIP
  @card_delivery_point = card_delivery_point unless card_delivery_point == SKIP
  @card_group_id = card_group_id unless card_group_id == SKIP
  @card_group_name = card_group_name unless card_group_name == SKIP
  @card_type_code = card_type_code unless card_type_code == SKIP
  @card_type_id = card_type_id unless card_type_id == SKIP
  @card_type_name = card_type_name unless card_type_name == SKIP
  @expired_cards = expired_cards unless expired_cards == SKIP
  @expiry_date = expiry_date unless expiry_date == SKIP
  @print_on_card = print_on_card unless print_on_card == SKIP
  @renewal_pending_cards = renewal_pending_cards unless renewal_pending_cards == SKIP
  @replaced_cards = replaced_cards unless replaced_cards == SKIP
  @status = status unless status == SKIP
  unless temporary_block_by_customer == SKIP
    @temporary_block_by_customer =
      temporary_block_by_customer
  end
  @temporary_block_by_shell = temporary_block_by_shell unless temporary_block_by_shell == SKIP
  @terminated_date = terminated_date unless terminated_date == SKIP
  @total_cards = total_cards unless total_cards == SKIP
end

Instance Attribute Details

#account_idInteger

Account Id for the associated card group

Returns:

  • (Integer)


14
15
16
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 14

def 
  @account_id
end

#account_numberString

Account number for the associated card group

Returns:

  • (String)


18
19
20
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 18

def 
  @account_number
end

#account_short_nameString

Account short name for the associated card group

Returns:

  • (String)


22
23
24
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 22

def 
  @account_short_name
end

#active_cardsInteger

Total number of active cards for the given search criteria

Returns:

  • (Integer)


26
27
28
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 26

def active_cards
  @active_cards
end

#blocked_cardsInteger

Total number of cards for the given search criteria that are permanently blocked

Returns:

  • (Integer)


31
32
33
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 31

def blocked_cards
  @blocked_cards
end

#cancelled_cardsInteger

Total number of cards for the given search criteria that are cancelled

Returns:

  • (Integer)


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

def cancelled_cards
  @cancelled_cards
end

#card_delivery_pointTrueClass | FalseClass

card delivery point enabled or not

Returns:

  • (TrueClass | FalseClass)


39
40
41
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 39

def card_delivery_point
  @card_delivery_point
end

#card_group_idInteger

Id of the card group matching the search criteria.

Returns:

  • (Integer)


43
44
45
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 43

def card_group_id
  @card_group_id
end

#card_group_nameString

Name of the card group matching the search criteria.

Returns:

  • (String)


47
48
49
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 47

def card_group_name
  @card_group_name
end

#card_type_codeString

Card Type Code

Returns:

  • (String)


51
52
53
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 51

def card_type_code
  @card_type_code
end

#card_type_idInteger

Card Type Id

Returns:

  • (Integer)


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

def card_type_id
  @card_type_id
end

#card_type_nameString

Card Type Name

Returns:

  • (String)


59
60
61
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 59

def card_type_name
  @card_type_name
end

#expired_cardsInteger

Total number of expired cards for the given search criteria

Returns:

  • (Integer)


63
64
65
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 63

def expired_cards
  @expired_cards
end

#expiry_dateString

Expiry date of the card. Format: yyyyMMdd Note: Clients to convert this to appropriate DateTime type.

Returns:

  • (String)


69
70
71
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 69

def expiry_date
  @expiry_date
end

PrintOnCard true/false

Returns:

  • (TrueClass | FalseClass)


73
74
75
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 73

def print_on_card
  @print_on_card
end

#renewal_pending_cardsInteger

Total number of Renewal Pending Cards for the given search criteria

Returns:

  • (Integer)


77
78
79
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 77

def renewal_pending_cards
  @renewal_pending_cards
end

#replaced_cardsInteger

Total number of Renewal Pending Cards for the given search criteria

Returns:

  • (Integer)


81
82
83
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 81

def replaced_cards
  @replaced_cards
end

#statusString

Status of the card group.

Returns:

  • (String)


85
86
87
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 85

def status
  @status
end

#temporary_block_by_customerInteger

Total number of cards for the given search criteria that are temporarily blocked by customer

Returns:

  • (Integer)


90
91
92
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 90

def temporary_block_by_customer
  @temporary_block_by_customer
end

#temporary_block_by_shellInteger

Total number of cards for the given search criteria that are temporarily blocked by Shell

Returns:

  • (Integer)


95
96
97
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 95

def temporary_block_by_shell
  @temporary_block_by_shell
end

#terminated_dateString

Terminated Date. Format: yyyyMMdd Note: Clients to convert this to appropriate Date Time type.

Returns:

  • (String)


101
102
103
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 101

def terminated_date
  @terminated_date
end

#total_cardsInteger

Total number of cards for the given search criteria

Returns:

  • (Integer)


105
106
107
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 105

def total_cards
  @total_cards
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 231

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
   =
    hash.key?('AccountShortName') ? hash['AccountShortName'] : SKIP
  active_cards = hash.key?('ActiveCards') ? hash['ActiveCards'] : SKIP
  blocked_cards = hash.key?('BlockedCards') ? hash['BlockedCards'] : SKIP
  cancelled_cards =
    hash.key?('CancelledCards') ? hash['CancelledCards'] : SKIP
  card_delivery_point =
    hash.key?('CardDeliveryPoint') ? hash['CardDeliveryPoint'] : SKIP
  card_group_id = hash.key?('CardGroupId') ? hash['CardGroupId'] : SKIP
  card_group_name =
    hash.key?('CardGroupName') ? hash['CardGroupName'] : SKIP
  card_type_code = hash.key?('CardTypeCode') ? hash['CardTypeCode'] : SKIP
  card_type_id = hash.key?('CardTypeId') ? hash['CardTypeId'] : SKIP
  card_type_name = hash.key?('CardTypeName') ? hash['CardTypeName'] : SKIP
  expired_cards = hash.key?('ExpiredCards') ? hash['ExpiredCards'] : SKIP
  expiry_date = hash.key?('ExpiryDate') ? hash['ExpiryDate'] : SKIP
  print_on_card = hash.key?('PrintOnCard') ? hash['PrintOnCard'] : SKIP
  renewal_pending_cards =
    hash.key?('RenewalPendingCards') ? hash['RenewalPendingCards'] : SKIP
  replaced_cards = hash.key?('ReplacedCards') ? hash['ReplacedCards'] : SKIP
  status = hash.key?('Status') ? hash['Status'] : SKIP
  temporary_block_by_customer =
    hash.key?('TemporaryBlockByCustomer') ? hash['TemporaryBlockByCustomer'] : SKIP
  temporary_block_by_shell =
    hash.key?('TemporaryBlockByShell') ? hash['TemporaryBlockByShell'] : SKIP
  terminated_date =
    hash.key?('TerminatedDate') ? hash['TerminatedDate'] : SKIP
  total_cards = hash.key?('TotalCards') ? hash['TotalCards'] : SKIP

  # Create object from extracted values.
  CardGroupResponseCardGroupsItems.new(,
                                       ,
                                       ,
                                       active_cards,
                                       blocked_cards,
                                       cancelled_cards,
                                       card_delivery_point,
                                       card_group_id,
                                       card_group_name,
                                       card_type_code,
                                       card_type_id,
                                       card_type_name,
                                       expired_cards,
                                       expiry_date,
                                       print_on_card,
                                       renewal_pending_cards,
                                       replaced_cards,
                                       status,
                                       temporary_block_by_customer,
                                       temporary_block_by_shell,
                                       terminated_date,
                                       total_cards)
end

.namesObject

A mapping from model property names to API property names.



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 108

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['account_short_name'] = 'AccountShortName'
  @_hash['active_cards'] = 'ActiveCards'
  @_hash['blocked_cards'] = 'BlockedCards'
  @_hash['cancelled_cards'] = 'CancelledCards'
  @_hash['card_delivery_point'] = 'CardDeliveryPoint'
  @_hash['card_group_id'] = 'CardGroupId'
  @_hash['card_group_name'] = 'CardGroupName'
  @_hash['card_type_code'] = 'CardTypeCode'
  @_hash['card_type_id'] = 'CardTypeId'
  @_hash['card_type_name'] = 'CardTypeName'
  @_hash['expired_cards'] = 'ExpiredCards'
  @_hash['expiry_date'] = 'ExpiryDate'
  @_hash['print_on_card'] = 'PrintOnCard'
  @_hash['renewal_pending_cards'] = 'RenewalPendingCards'
  @_hash['replaced_cards'] = 'ReplacedCards'
  @_hash['status'] = 'Status'
  @_hash['temporary_block_by_customer'] = 'TemporaryBlockByCustomer'
  @_hash['temporary_block_by_shell'] = 'TemporaryBlockByShell'
  @_hash['terminated_date'] = 'TerminatedDate'
  @_hash['total_cards'] = 'TotalCards'
  @_hash
end

.nullablesObject

An array for nullable fields



164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 164

def self.nullables
  %w[
    account_id
    account_number
    account_short_name
    active_cards
    blocked_cards
    cancelled_cards
    card_delivery_point
    card_group_id
    card_group_name
    card_type_code
    card_type_id
    card_type_name
    expired_cards
    expiry_date
    print_on_card
    renewal_pending_cards
    replaced_cards
    status
    temporary_block_by_customer
    temporary_block_by_shell
    terminated_date
    total_cards
  ]
end

.optionalsObject

An array for optional fields



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
# File 'lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb', line 136

def self.optionals
  %w[
    account_id
    account_number
    account_short_name
    active_cards
    blocked_cards
    cancelled_cards
    card_delivery_point
    card_group_id
    card_group_name
    card_type_code
    card_type_id
    card_type_name
    expired_cards
    expiry_date
    print_on_card
    renewal_pending_cards
    replaced_cards
    status
    temporary_block_by_customer
    temporary_block_by_shell
    terminated_date
    total_cards
  ]
end