Class: ShellCardManagementApIs::CardDetailsRequest

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

Overview

CardDetailsRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(col_co_code = SKIP, col_co_id = SKIP, col_co_country_code = SKIP, client_reference_id = SKIP, payer_number = SKIP, payer_id = SKIP, account_number = SKIP, account_id = SKIP, pan = SKIP, card_id = SKIP, token_type_id = SKIP, token_type_name = SKIP, creation_date = SKIP, effective_date = SKIP, include_bundle_details = SKIP, include_intermediate_status = SKIP, include_scheduled_card_blocks = SKIP) ⇒ CardDetailsRequest

Returns a new instance of CardDetailsRequest.



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 169

def initialize(col_co_code = SKIP, col_co_id = SKIP,
               col_co_country_code = SKIP, client_reference_id = SKIP,
               payer_number = SKIP, payer_id = SKIP,  = SKIP,
                = SKIP, pan = SKIP, card_id = SKIP,
               token_type_id = SKIP, token_type_name = SKIP,
               creation_date = SKIP, effective_date = SKIP,
               include_bundle_details = SKIP,
               include_intermediate_status = SKIP,
               include_scheduled_card_blocks = SKIP)
  @col_co_code = col_co_code unless col_co_code == SKIP
  @col_co_id = col_co_id unless col_co_id == SKIP
  @col_co_country_code = col_co_country_code unless col_co_country_code == SKIP
  @client_reference_id = client_reference_id unless client_reference_id == SKIP
  @payer_number = payer_number unless payer_number == SKIP
  @payer_id = payer_id unless payer_id == SKIP
  @account_number =  unless  == SKIP
  @account_id =  unless  == SKIP
  @pan = pan unless pan == SKIP
  @card_id = card_id unless card_id == SKIP
  @token_type_id = token_type_id unless token_type_id == SKIP
  @token_type_name = token_type_name unless token_type_name == SKIP
  @creation_date = creation_date unless creation_date == SKIP
  @effective_date = effective_date unless effective_date == SKIP
  @include_bundle_details = include_bundle_details unless include_bundle_details == SKIP
  unless include_intermediate_status == SKIP
    @include_intermediate_status =
      include_intermediate_status
  end
  unless include_scheduled_card_blocks == SKIP
    @include_scheduled_card_blocks =
      include_scheduled_card_blocks
  end
end

Instance Attribute Details

#account_idInteger

Account ID of the customer. Optional if AccountNumber is passed, else mandatory.

Returns:

  • (Integer)


54
55
56
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 54

def 
  @account_id
end

#account_numberString

Account Number of the customer. Optional if AccountId is passed, else mandatory.

Returns:

  • (String)


49
50
51
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 49

def 
  @account_number
end

#card_idInteger

Card Id of the card. Optional if PAN is passed, else Mandatory.

Returns:

  • (Integer)


64
65
66
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 64

def card_id
  @card_id
end

#client_reference_idString

Customer reference number of the card. Optional

Returns:

  • (String)


36
37
38
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 36

def client_reference_id
  @client_reference_id
end

#col_co_codeInteger

Collecting Company Id of the selected payer. Optional if ColCoCode is passed else Mandatory. Example: 1-Philippines 5-UK

Returns:

  • (Integer)


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

def col_co_code
  @col_co_code
end

#col_co_country_codeString

ISO Country code of collecting company

Returns:

  • (String)


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

def col_co_country_code
  @col_co_country_code
end

#col_co_idInteger

Collecting Company Code (Shell Code) of the selected payer. Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia, Ukraine etc. It is optional for other countries if ColCoID is provided. Example: 86-Philippines 5-UK

Returns:

  • (Integer)


27
28
29
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 27

def col_co_id
  @col_co_id
end

#creation_dateString

Card Creation Date time Optional Format: yyyyMMdd

Returns:

  • (String)


80
81
82
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 80

def creation_date
  @creation_date
end

#effective_dateString

Effective date for the Card Optional Format: yyyyMMdd

Returns:

  • (String)


86
87
88
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 86

def effective_date
  @effective_date
end

#include_bundle_detailsTrueClass | FalseClass

When the value is True, API will return bundle Id associated with card in the response, if available. Note: Use ‘Null’ or ‘False’ for optimum performance. A delay in response is expected when set to ‘True’.

Returns:

  • (TrueClass | FalseClass)


93
94
95
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 93

def include_bundle_details
  @include_bundle_details
end

#include_intermediate_statusTrueClass | FalseClass

A flag which indicates if the response can contain intermediate statuses

Returns:

  • (TrueClass | FalseClass)


97
98
99
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 97

def include_intermediate_status
  @include_intermediate_status
end

#include_scheduled_card_blocksTrueClass | FalseClass

A flag which indicates if the response can contain scheduled card blocks details

Returns:

  • (TrueClass | FalseClass)


102
103
104
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 102

def include_scheduled_card_blocks
  @include_scheduled_card_blocks
end

#panString

PAN of the card. Optional if CardId is passed, else Mandatory.

Returns:

  • (String)


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

def pan
  @pan
end

#payer_idInteger

Payer Id (i.e. Customer Id of the Payment of the selected payer.

Returns:

  • (Integer)


44
45
46
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 44

def payer_id
  @payer_id
end

#payer_numberString

Payer Number of the selected payer.

Returns:

  • (String)


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

def payer_number
  @payer_number
end

#token_type_idInteger

Token Type ID for the Card Optional

Returns:

  • (Integer)


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

def token_type_id
  @token_type_id
end

#token_type_nameString

Token Type name for the Card Optional

Returns:

  • (String)


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

def token_type_name
  @token_type_name
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 204

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
  col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
  col_co_country_code =
    hash.key?('ColCoCountryCode') ? hash['ColCoCountryCode'] : SKIP
  client_reference_id =
    hash.key?('ClientReferenceId') ? hash['ClientReferenceId'] : SKIP
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
  token_type_id = hash.key?('TokenTypeID') ? hash['TokenTypeID'] : SKIP
  token_type_name =
    hash.key?('TokenTypeName') ? hash['TokenTypeName'] : SKIP
  creation_date = hash.key?('CreationDate') ? hash['CreationDate'] : SKIP
  effective_date = hash.key?('EffectiveDate') ? hash['EffectiveDate'] : SKIP
  include_bundle_details =
    hash.key?('IncludeBundleDetails') ? hash['IncludeBundleDetails'] : SKIP
  include_intermediate_status =
    hash.key?('IncludeIntermediateStatus') ? hash['IncludeIntermediateStatus'] : SKIP
  include_scheduled_card_blocks =
    hash.key?('IncludeScheduledCardBlocks') ? hash['IncludeScheduledCardBlocks'] : SKIP

  # Create object from extracted values.
  CardDetailsRequest.new(col_co_code,
                         col_co_id,
                         col_co_country_code,
                         client_reference_id,
                         payer_number,
                         payer_id,
                         ,
                         ,
                         pan,
                         card_id,
                         token_type_id,
                         token_type_name,
                         creation_date,
                         effective_date,
                         include_bundle_details,
                         include_intermediate_status,
                         include_scheduled_card_blocks)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['col_co_code'] = 'ColCoCode'
  @_hash['col_co_id'] = 'ColCoId'
  @_hash['col_co_country_code'] = 'ColCoCountryCode'
  @_hash['client_reference_id'] = 'ClientReferenceId'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash['payer_id'] = 'PayerId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['account_id'] = 'AccountId'
  @_hash['pan'] = 'PAN'
  @_hash['card_id'] = 'CardId'
  @_hash['token_type_id'] = 'TokenTypeID'
  @_hash['token_type_name'] = 'TokenTypeName'
  @_hash['creation_date'] = 'CreationDate'
  @_hash['effective_date'] = 'EffectiveDate'
  @_hash['include_bundle_details'] = 'IncludeBundleDetails'
  @_hash['include_intermediate_status'] = 'IncludeIntermediateStatus'
  @_hash['include_scheduled_card_blocks'] = 'IncludeScheduledCardBlocks'
  @_hash
end

.nullablesObject

An array for nullable fields



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 151

def self.nullables
  %w[
    col_co_id
    col_co_country_code
    client_reference_id
    payer_number
    payer_id
    account_number
    account_id
    pan
    card_id
    token_type_id
    token_type_name
    creation_date
    effective_date
  ]
end

.optionalsObject

An array for optional fields



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/shell_card_management_ap_is/models/card_details_request.rb', line 128

def self.optionals
  %w[
    col_co_code
    col_co_id
    col_co_country_code
    client_reference_id
    payer_number
    payer_id
    account_number
    account_id
    pan
    card_id
    token_type_id
    token_type_name
    creation_date
    effective_date
    include_bundle_details
    include_intermediate_status
    include_scheduled_card_blocks
  ]
end