card-management-sdk 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -16
  3. data/lib/shell_card_management_ap_is/controllers/base_controller.rb +9 -9
  4. data/lib/shell_card_management_ap_is/controllers/card_controller.rb +383 -378
  5. data/lib/shell_card_management_ap_is/controllers/customer_controller.rb +234 -225
  6. data/lib/shell_card_management_ap_is/controllers/o_auth_authorization_controller.rb +9 -9
  7. data/lib/shell_card_management_ap_is/controllers/restriction_controller.rb +256 -248
  8. data/lib/shell_card_management_ap_is/exceptions/error_object_exception.rb +15 -15
  9. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_customer_customer403_error_exception.rb +15 -15
  10. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_customer_payers400_error_exception.rb +15 -15
  11. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_customer_payers404_error_exception.rb +15 -15
  12. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser400_error_exception.rb +15 -15
  13. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser401_error_exception.rb +15 -15
  14. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser403_error_exception.rb +15 -15
  15. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser404_error_exception.rb +15 -15
  16. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser500_error_exception.rb +15 -15
  17. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard401_error_exception.rb +15 -15
  18. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard500_error_exception.rb +15 -15
  19. data/lib/shell_card_management_ap_is/exceptions/o_auth_provider_exception.rb +15 -15
  20. data/lib/shell_card_management_ap_is/models/account_request.rb +11 -11
  21. data/lib/shell_card_management_ap_is/models/account_response_accounts_items.rb +8 -8
  22. data/lib/shell_card_management_ap_is/models/account_restriction_request.rb +3 -4
  23. data/lib/shell_card_management_ap_is/models/audit_request.rb +29 -29
  24. data/lib/shell_card_management_ap_is/models/audit_response_audits_items.rb +41 -41
  25. data/lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb +12 -1
  26. data/lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb +13 -2
  27. data/lib/shell_card_management_ap_is/models/base_model.rb +76 -28
  28. data/lib/shell_card_management_ap_is/models/bundle_restriction.rb +35 -22
  29. data/lib/shell_card_management_ap_is/models/bundle_restriction_update.rb +6 -8
  30. data/lib/shell_card_management_ap_is/models/bundled_restrictions_list.rb +10 -16
  31. data/lib/shell_card_management_ap_is/models/card.rb +25 -6
  32. data/lib/shell_card_management_ap_is/models/card_detail.rb +24 -24
  33. data/lib/shell_card_management_ap_is/models/card_group_request.rb +3 -3
  34. data/lib/shell_card_management_ap_is/models/card_settings.rb +10 -10
  35. data/lib/shell_card_management_ap_is/models/create_bundle_request.rb +2 -3
  36. data/lib/shell_card_management_ap_is/models/customer_detail_response.rb +18 -18
  37. data/lib/shell_card_management_ap_is/models/day_time_restriction.rb +2 -2
  38. data/lib/shell_card_management_ap_is/models/day_time_restrictions.rb +132 -0
  39. data/lib/shell_card_management_ap_is/models/filters.rb +6 -6
  40. data/lib/shell_card_management_ap_is/models/filters1.rb +6 -6
  41. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_customer_payers400_error1.rb +50 -0
  42. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_customer_payers404_error1.rb +50 -0
  43. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser400_error1.rb +50 -0
  44. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser401_error1.rb +50 -0
  45. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser404_error1.rb +50 -0
  46. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser500_error1.rb +50 -0
  47. data/lib/shell_card_management_ap_is/models/fleetmanagement_v2_restriction_searchcard401_error1.rb +50 -0
  48. data/lib/shell_card_management_ap_is/models/fleetmanagement_v2_restriction_searchcard500_error1.rb +50 -0
  49. data/lib/shell_card_management_ap_is/models/logged_in_user_response.rb +3 -3
  50. data/lib/shell_card_management_ap_is/models/order_card_enquiry.rb +27 -6
  51. data/lib/shell_card_management_ap_is/models/payer_details.rb +10 -10
  52. data/lib/shell_card_management_ap_is/models/payer_request.rb +6 -6
  53. data/lib/shell_card_management_ap_is/models/pin_advice_types.rb +4 -4
  54. data/lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb +11 -11
  55. data/lib/shell_card_management_ap_is/models/purchase_category1_all_of0.rb +8 -8
  56. data/lib/shell_card_management_ap_is/models/replace_card_settings.rb +10 -10
  57. data/lib/shell_card_management_ap_is/models/restriction.rb +10 -16
  58. data/lib/shell_card_management_ap_is/models/restriction_cards_list.rb +21 -17
  59. data/lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb +39 -27
  60. data/lib/shell_card_management_ap_is/models/search_card.rb +13 -2
  61. data/lib/shell_card_management_ap_is/models/search_request.rb +6 -6
  62. data/lib/shell_card_management_ap_is/models/submitted_card.rb +22 -1
  63. data/lib/shell_card_management_ap_is/models/summary_request.rb +6 -6
  64. data/lib/shell_card_management_ap_is/models/update_bundle_request.rb +7 -7
  65. data/lib/shell_card_management_ap_is/models/update_card.rb +11 -60
  66. data/lib/shell_card_management_ap_is/models/update_card_group_request.rb +3 -3
  67. data/lib/shell_card_management_ap_is/models/update_card_renewal_address.rb +2 -2
  68. data/lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb +2 -2
  69. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb +1 -1
  70. data/lib/shell_card_management_ap_is/models/usage_restriction.rb +2 -2
  71. data/lib/shell_card_management_ap_is/utilities/file_wrapper.rb +9 -9
  72. data/lib/shell_card_management_ap_is.rb +17 -0
  73. metadata +17 -8
@@ -0,0 +1,50 @@
1
+ # shell_card_management_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellCardManagementApIs
7
+ # FleetmanagementV1UserLoggedinuser404Error1 Model.
8
+ class FleetmanagementV1UserLoggedinuser404Error1 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Fault]
14
+ attr_accessor :fault
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['fault'] = 'fault'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ fault
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(fault = SKIP)
36
+ @fault = fault unless fault == SKIP
37
+ end
38
+
39
+ # Creates an instance of the object from a hash.
40
+ def self.from_hash(hash)
41
+ return nil unless hash
42
+
43
+ # Extract variables from the hash.
44
+ fault = Fault.from_hash(hash['fault']) if hash['fault']
45
+
46
+ # Create object from extracted values.
47
+ FleetmanagementV1UserLoggedinuser404Error1.new(fault)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,50 @@
1
+ # shell_card_management_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellCardManagementApIs
7
+ # FleetmanagementV1UserLoggedinuser500Error1 Model.
8
+ class FleetmanagementV1UserLoggedinuser500Error1 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Fault]
14
+ attr_accessor :fault
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['fault'] = 'fault'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ fault
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(fault = SKIP)
36
+ @fault = fault unless fault == SKIP
37
+ end
38
+
39
+ # Creates an instance of the object from a hash.
40
+ def self.from_hash(hash)
41
+ return nil unless hash
42
+
43
+ # Extract variables from the hash.
44
+ fault = Fault.from_hash(hash['fault']) if hash['fault']
45
+
46
+ # Create object from extracted values.
47
+ FleetmanagementV1UserLoggedinuser500Error1.new(fault)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,50 @@
1
+ # shell_card_management_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellCardManagementApIs
7
+ # FleetmanagementV2RestrictionSearchcard401Error1 Model.
8
+ class FleetmanagementV2RestrictionSearchcard401Error1 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Fault]
14
+ attr_accessor :fault
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['fault'] = 'fault'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ fault
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(fault = SKIP)
36
+ @fault = fault unless fault == SKIP
37
+ end
38
+
39
+ # Creates an instance of the object from a hash.
40
+ def self.from_hash(hash)
41
+ return nil unless hash
42
+
43
+ # Extract variables from the hash.
44
+ fault = Fault.from_hash(hash['fault']) if hash['fault']
45
+
46
+ # Create object from extracted values.
47
+ FleetmanagementV2RestrictionSearchcard401Error1.new(fault)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,50 @@
1
+ # shell_card_management_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellCardManagementApIs
7
+ # FleetmanagementV2RestrictionSearchcard500Error1 Model.
8
+ class FleetmanagementV2RestrictionSearchcard500Error1 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Fault]
14
+ attr_accessor :fault
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['fault'] = 'fault'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ fault
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(fault = SKIP)
36
+ @fault = fault unless fault == SKIP
37
+ end
38
+
39
+ # Creates an instance of the object from a hash.
40
+ def self.from_hash(hash)
41
+ return nil unless hash
42
+
43
+ # Extract variables from the hash.
44
+ fault = Fault.from_hash(hash['fault']) if hash['fault']
45
+
46
+ # Create object from extracted values.
47
+ FleetmanagementV2RestrictionSearchcard500Error1.new(fault)
48
+ end
49
+ end
50
+ end
@@ -71,9 +71,9 @@ module ShellCardManagementApIs
71
71
  attr_accessor :roles
72
72
 
73
73
  # List of payers which the user has access to.
74
- # • It will return 250 payers only and it is configurable. If the user has
75
- # more than that, the remaining will be ignored.
76
- # • The payer which is marked as default will be the first item in the
74
+ # • It will return 250 payers only and it is configurable. If the user
75
+ # has more than that, the remaining will be ignored.
76
+ # • The payer which is marked as default will be the first item in the
77
77
  # output.
78
78
  # Note: This list will be empty for users mapped with roles which has either
79
79
  # IsShellAdmin or IsServiceAccount set to true as their access level is
@@ -48,6 +48,14 @@ module ShellCardManagementApIs
48
48
  # @return [String]
49
49
  attr_accessor :card_pan
50
50
 
51
+ # Card PAN
52
+ # @return [String]
53
+ attr_accessor :masked_pan
54
+
55
+ # Card PAN ID as a unique number for each PAN
56
+ # @return [Float]
57
+ attr_accessor :panid
58
+
51
59
  # CardTypeCode<br />
52
60
  # ISO code of the card i.e. first 7 digits of the PAN
53
61
  # @return [String]
@@ -109,11 +117,11 @@ module ShellCardManagementApIs
109
117
  # Possible values:<br />
110
118
  # P Pending<br />
111
119
  # I Picked up for processing<br />
112
- # PX Failed at Queue but retry attempts pending<br />
113
- # X Failed at Queue<br />
114
- # R Card is processed, awaiting for PAN update.<br />
115
- # S Processed<br />
116
- # F Failed
120
+ # PX Failed at Queue but retry attempts pending<br />
121
+ # X Failed at Queue<br />
122
+ # R Card is processed, awaiting for PAN update.<br />
123
+ # S Processed<br />
124
+ # F Failed
117
125
  # @return [String]
118
126
  attr_accessor :order_status
119
127
 
@@ -223,6 +231,8 @@ module ShellCardManagementApIs
223
231
  @_hash['card_group_name'] = 'CardGroupName'
224
232
  @_hash['card_id'] = 'CardId'
225
233
  @_hash['card_pan'] = 'CardPAN'
234
+ @_hash['masked_pan'] = 'MaskedPAN'
235
+ @_hash['panid'] = 'PANID'
226
236
  @_hash['card_type_code'] = 'CardTypeCode'
227
237
  @_hash['card_type_id'] = 'CardTypeId'
228
238
  @_hash['card_type_name'] = 'CardTypeName'
@@ -264,6 +274,8 @@ module ShellCardManagementApIs
264
274
  card_group_name
265
275
  card_id
266
276
  card_pan
277
+ masked_pan
278
+ panid
267
279
  card_type_code
268
280
  card_type_id
269
281
  card_type_name
@@ -305,6 +317,8 @@ module ShellCardManagementApIs
305
317
  card_group_name
306
318
  card_id
307
319
  card_pan
320
+ masked_pan
321
+ panid
308
322
  card_type_code
309
323
  card_type_id
310
324
  card_type_name
@@ -335,7 +349,8 @@ module ShellCardManagementApIs
335
349
  def initialize(account_id = SKIP, account_number = SKIP,
336
350
  bco_reference = SKIP, bco_row_number = SKIP,
337
351
  card_group_id = SKIP, card_group_name = SKIP, card_id = SKIP,
338
- card_pan = SKIP, card_type_code = SKIP, card_type_id = SKIP,
352
+ card_pan = SKIP, masked_pan = SKIP, panid = SKIP,
353
+ card_type_code = SKIP, card_type_id = SKIP,
339
354
  card_type_name = SKIP, driver_name = SKIP, error_code = SKIP,
340
355
  error_description = SKIP, gateway_sync_error_code = SKIP,
341
356
  gateway_sync_error_description = SKIP,
@@ -356,6 +371,8 @@ module ShellCardManagementApIs
356
371
  @card_group_name = card_group_name unless card_group_name == SKIP
357
372
  @card_id = card_id unless card_id == SKIP
358
373
  @card_pan = card_pan unless card_pan == SKIP
374
+ @masked_pan = masked_pan unless masked_pan == SKIP
375
+ @panid = panid unless panid == SKIP
359
376
  @card_type_code = card_type_code unless card_type_code == SKIP
360
377
  @card_type_id = card_type_id unless card_type_id == SKIP
361
378
  @card_type_name = card_type_name unless card_type_name == SKIP
@@ -402,6 +419,8 @@ module ShellCardManagementApIs
402
419
  hash.key?('CardGroupName') ? hash['CardGroupName'] : SKIP
403
420
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
404
421
  card_pan = hash.key?('CardPAN') ? hash['CardPAN'] : SKIP
422
+ masked_pan = hash.key?('MaskedPAN') ? hash['MaskedPAN'] : SKIP
423
+ panid = hash.key?('PANID') ? hash['PANID'] : SKIP
405
424
  card_type_code = hash.key?('CardTypeCode') ? hash['CardTypeCode'] : SKIP
406
425
  card_type_id = hash.key?('CardTypeId') ? hash['CardTypeId'] : SKIP
407
426
  card_type_name = hash.key?('CardTypeName') ? hash['CardTypeName'] : SKIP
@@ -452,6 +471,8 @@ module ShellCardManagementApIs
452
471
  card_group_name,
453
472
  card_id,
454
473
  card_pan,
474
+ masked_pan,
475
+ panid,
455
476
  card_type_code,
456
477
  card_type_id,
457
478
  card_type_name,
@@ -143,10 +143,10 @@ module ShellCardManagementApIs
143
143
  # Billing/Invoice frequency. The frequency in which the transactions will be
144
144
  # considered for invoicing in a bulling run
145
145
  # E.g.:
146
- # 1 Daily (all days)
147
- # 2 Daily (only working days)
148
- # 3 Weekly - Monday
149
- # 4 Weekly – Tuesday
146
+ # 1 Daily (all days)
147
+ # 2 Daily (only working days)
148
+ # 3 Weekly - Monday
149
+ # 4 Weekly – Tuesday
150
150
  # Etc.
151
151
  # @return [String]
152
152
  attr_accessor :billing_frequency_type
@@ -157,10 +157,10 @@ module ShellCardManagementApIs
157
157
  attr_accessor :billing_run_frequency_type_id
158
158
 
159
159
  # Frequency at which the billing process is triggered.E.g.:
160
- # 1 Daily (all days)
161
- # 2 Daily (only working days)
162
- # 3 Weekly - Monday
163
- # 4 Weekly – Tuesday
160
+ # 1 Daily (all days)
161
+ # 2 Daily (only working days)
162
+ # 3 Weekly - Monday
163
+ # 4 Weekly – Tuesday
164
164
  # Etc.
165
165
  # @return [String]
166
166
  attr_accessor :billing_run_frequnecy
@@ -482,13 +482,13 @@ module ShellCardManagementApIs
482
482
  # @return [String]
483
483
  attr_accessor :tolls_customer_id
484
484
 
485
- # String Colco country type id in e-TM system
485
+ # String Colco country type id in e-TM system
486
486
  # This field will have value only when ReturnTollsCustomerId is set to true
487
487
  # in the request else set to null or empty.
488
488
  # @return [String]
489
489
  attr_accessor :tolls_colco_country_type_id
490
490
 
491
- # String Colco country type id in e-TM system
491
+ # String Colco country type id in e-TM system
492
492
  # This field will have value only when ReturnTollsCustomerId is set to true
493
493
  # in the request else set to null or empty.
494
494
  # @return [Array[CustomerContract]]
@@ -12,10 +12,10 @@ module ShellCardManagementApIs
12
12
  # List of Payer entity.
13
13
  # Optional.
14
14
  # Note:
15
- # • Max number of payers allowed in the input is 10, if it exceeds in the
15
+ # • Max number of payers allowed in the input is 10, if it exceeds in the
16
16
  # input it will throw an error.
17
- # • This value is configurable. Initial configuration will be 1000 and will
18
- # change to 10 once SFH changes are integrated.
17
+ # • This value is configurable. Initial configuration will be 1000 and
18
+ # will change to 10 once SFH changes are integrated.
19
19
  # @return [Array[Payers]]
20
20
  attr_accessor :payers
21
21
 
@@ -41,9 +41,9 @@ module ShellCardManagementApIs
41
41
  # Default value 50
42
42
  # Return 250 rows only in the response if -1 is supplied as page size.
43
43
  # Note:
44
- # • Max page size is 250, if the user provided value is more than 250 then
45
- # it will throw error.
46
- # • This value is configurable.
44
+ # • Max page size is 250, if the user provided value is more than 250
45
+ # then it will throw error.
46
+ # • This value is configurable.
47
47
  # @return [Integer]
48
48
  attr_accessor :page_size
49
49
 
@@ -11,10 +11,10 @@ module ShellCardManagementApIs
11
11
 
12
12
  # Id of of PIN advice type.
13
13
  # Possible Values:
14
- # 1. Paper
15
- # 2. Email
16
- # 3. SMS
17
- # 4. None
14
+ # 1. Paper
15
+ # 2. Email
16
+ # 3. SMS
17
+ # 4. None
18
18
  # @return [Integer]
19
19
  attr_accessor :pin_advice_type_id
20
20
 
@@ -39,19 +39,19 @@ module ShellCardManagementApIs
39
39
  # PIN delivery method.
40
40
  # Mandatory
41
41
  # Allowed Values:
42
- # 1. Paper
43
- # 2. Email
44
- # 3. SMS
42
+ # 1. Paper
43
+ # 2. Email
44
+ # 3. SMS
45
45
  # @return [Integer]
46
46
  attr_accessor :pin_advice_type
47
47
 
48
48
  # PIN Contact Type.
49
49
  # Mandatory
50
50
  # Allowed Values:
51
- # 1. Use PIN Delivery contact details stored previously for this card
52
- # 2. Use Card Delivery contact details stored previously for this card
53
- # 3. Use default PIN Delivery contact details stored for this customer
54
- # 4. Use new specific contact for PIN Reminder only
51
+ # 1. Use PIN Delivery contact details stored previously for this card
52
+ # 2. Use Card Delivery contact details stored previously for this card
53
+ # 3. Use default PIN Delivery contact details stored for this customer
54
+ # 4. Use new specific contact for PIN Reminder only
55
55
  # Note: - PINContactType “3” is only allowed for Paper delivery
56
56
  # @return [Integer]
57
57
  attr_accessor :pin_contact_type
@@ -59,10 +59,10 @@ module ShellCardManagementApIs
59
59
  # PIN Contact Type.
60
60
  # Mandatory
61
61
  # Allowed Values:
62
- # 1. Use PIN Delivery contact details stored previously for this card
63
- # 2. Use Card Delivery contact details stored previously for this card
64
- # 3. Use default PIN Delivery contact details stored for this customer
65
- # 4. Use new specific contact for PIN Reminder only
62
+ # 1. Use PIN Delivery contact details stored previously for this card
63
+ # 2. Use Card Delivery contact details stored previously for this card
64
+ # 3. Use default PIN Delivery contact details stored for this customer
65
+ # 4. Use new specific contact for PIN Reminder only
66
66
  # Note: - PINContactType “3” is only allowed for Paper delivery
67
67
  # @return [PINDeliverTo]
68
68
  attr_accessor :pin_deliver_to
@@ -31,14 +31,14 @@ module ShellCardManagementApIs
31
31
  attr_accessor :product_groups
32
32
 
33
33
  # Purchase category Title by given language code.
34
- # 1. Basic
35
- # 2. Essentials
36
- # 3. Extra
37
- # 4. Premium
38
- # 5. Basic and LNG
39
- # 6. Essentials and LNG
40
- # 7. Extra and LNG
41
- # 8. Premium and LNG
34
+ # 1. Basic
35
+ # 2. Essentials
36
+ # 3. Extra
37
+ # 4. Premium
38
+ # 5. Basic and LNG
39
+ # 6. Essentials and LNG
40
+ # 7. Extra and LNG
41
+ # 8. Premium and LNG
42
42
  # Note: Purchase Category name (GFN) is returned when Title does not exist
43
43
  # for the given language Code and default language code (en-GB).
44
44
  # @return [String]
@@ -58,9 +58,9 @@ module ShellCardManagementApIs
58
58
  # Card delivery type.<br />
59
59
  # Mandatory <br />
60
60
  # Allowed Value: <br />
61
- # 1. Customer Address(Default) <br />
62
- # 2. New Delivery Address <br />
63
- # 3. Old Card Address
61
+ # 1. Customer Address(Default) <br />
62
+ # 2. New Delivery Address <br />
63
+ # 3. Old Card Address
64
64
  # @return [Integer]
65
65
  attr_accessor :card_delivery_type
66
66
 
@@ -153,19 +153,19 @@ module ShellCardManagementApIs
153
153
  # PIN delivery address type selection.<br />
154
154
  # Optional<br />
155
155
  # Allowed Values:<br />
156
- # 1. Customer Address(Default)<br />
157
- # 2. Card Address<br />
158
- # 3. New Delivery Address
156
+ # 1. Customer Address(Default)<br />
157
+ # 2. Card Address<br />
158
+ # 3. New Delivery Address
159
159
  # @return [Integer]
160
160
  attr_accessor :pin_delivery_address_type
161
161
 
162
162
  # PIN delivery method.<br />
163
163
  # Mandatory when OrderReplacement Is true.<br />
164
164
  # Allowed Values:<br />
165
- # 1. Paper<br />
166
- # 2. Email<br />
167
- # 3. SMS<br />
168
- # 4. None
165
+ # 1. Paper<br />
166
+ # 2. Email<br />
167
+ # 3. SMS<br />
168
+ # 4. None
169
169
  # @return [Integer]
170
170
  attr_accessor :pin_advice_type
171
171
 
@@ -9,23 +9,19 @@ module ShellCardManagementApIs
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # Details of the usage restrictions such as day/week/month value and volume
13
- # restrictions applied on the card.
14
- # @return [UsageRestriction]
12
+ # TODO: Write general description for this method
13
+ # @return [Object]
15
14
  attr_accessor :usage_restrictions
16
15
 
17
- # Details of the day/time restrictions such as weekdays and time range in
18
- # which transactions should be allowed on the card.
19
- # @return [DayTimeRestriction]
16
+ # TODO: Write general description for this method
17
+ # @return [DayTimeRestrictions]
20
18
  attr_accessor :day_time_restrictions
21
19
 
22
- # Details of the day/time restrictions such as weekdays and time range in
23
- # which transactions should be allowed on the card.
20
+ # TODO: Write general description for this method
24
21
  # @return [SearchProductRestriction]
25
22
  attr_accessor :product_restrictions
26
23
 
27
- # Details of the day/time restrictions such as weekdays and time range in
28
- # which transactions should be allowed on the card.
24
+ # TODO: Write general description for this method
29
25
  # @return [LocationRestriction]
30
26
  attr_accessor :location_restrictions
31
27
 
@@ -51,9 +47,7 @@ module ShellCardManagementApIs
51
47
 
52
48
  # An array for nullable fields
53
49
  def self.nullables
54
- %w[
55
- usage_restrictions
56
- ]
50
+ []
57
51
  end
58
52
 
59
53
  def initialize(usage_restrictions = SKIP, day_time_restrictions = SKIP,
@@ -69,9 +63,9 @@ module ShellCardManagementApIs
69
63
  return nil unless hash
70
64
 
71
65
  # Extract variables from the hash.
72
- usage_restrictions = UsageRestriction.from_hash(hash['UsageRestrictions']) if
73
- hash['UsageRestrictions']
74
- day_time_restrictions = DayTimeRestriction.from_hash(hash['DayTimeRestrictions']) if
66
+ usage_restrictions =
67
+ hash.key?('UsageRestrictions') ? hash['UsageRestrictions'] : SKIP
68
+ day_time_restrictions = DayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
75
69
  hash['DayTimeRestrictions']
76
70
  product_restrictions = SearchProductRestriction.from_hash(hash['ProductRestrictions']) if
77
71
  hash['ProductRestrictions']
@@ -24,7 +24,7 @@ module ShellCardManagementApIs
24
24
  # Optional if CardId is given, else mandatory.
25
25
  # Example: 7002051006629890645
26
26
  # Note:
27
- # • PAN is ignored if CardId is given.
27
+ # • PAN is ignored if CardId is given.
28
28
  # When PAN matches with multiple cards, the restriction will be applied on
29
29
  # the latest issued card.
30
30
  # @return [String]
@@ -66,21 +66,27 @@ module ShellCardManagementApIs
66
66
  # If true, the location restrictions applied on the card will be deleted.
67
67
  # Else, the card restrictions will be updated with the location restrictions
68
68
  # provided in the API.
69
- # @return [UsageRestrictionsCard]
69
+ # @return [Object]
70
70
  attr_accessor :usage_restrictions
71
71
 
72
- # Details of the day/time restrictions such as weekdays and time range in
73
- # which transactions should be allowed on the card.
74
- # @return [DayTimeRestriction]
72
+ # True/False.
73
+ # If true, the location restrictions applied on the card will be deleted.
74
+ # Else, the card restrictions will be updated with the location restrictions
75
+ # provided in the API.
76
+ # @return [DayTimeRestrictions]
75
77
  attr_accessor :day_time_restrictions
76
78
 
77
- # Details of the day/time restrictions such as weekdays and time range in
78
- # which transactions should be allowed on the card.
79
- # @return [ProductRestrictionCard]
79
+ # True/False.
80
+ # If true, the location restrictions applied on the card will be deleted.
81
+ # Else, the card restrictions will be updated with the location restrictions
82
+ # provided in the API.
83
+ # @return [Object]
80
84
  attr_accessor :product_restrictions
81
85
 
82
- # Details of the day/time restrictions such as weekdays and time range in
83
- # which transactions should be allowed on the card.
86
+ # True/False.
87
+ # If true, the location restrictions applied on the card will be deleted.
88
+ # Else, the card restrictions will be updated with the location restrictions
89
+ # provided in the API.
84
90
  # @return [LocationRestriction]
85
91
  attr_accessor :location_restrictions
86
92
 
@@ -127,8 +133,6 @@ module ShellCardManagementApIs
127
133
  reset_day_time_restrictions
128
134
  reset_product_restrictions
129
135
  reset_location_restrictions
130
- usage_restrictions
131
- product_restrictions
132
136
  ]
133
137
  end
134
138
 
@@ -177,12 +181,12 @@ module ShellCardManagementApIs
177
181
  hash.key?('ResetProductRestrictions') ? hash['ResetProductRestrictions'] : SKIP
178
182
  reset_location_restrictions =
179
183
  hash.key?('ResetLocationRestrictions') ? hash['ResetLocationRestrictions'] : SKIP
180
- usage_restrictions = UsageRestrictionsCard.from_hash(hash['UsageRestrictions']) if
181
- hash['UsageRestrictions']
182
- day_time_restrictions = DayTimeRestriction.from_hash(hash['DayTimeRestrictions']) if
184
+ usage_restrictions =
185
+ hash.key?('UsageRestrictions') ? hash['UsageRestrictions'] : SKIP
186
+ day_time_restrictions = DayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
183
187
  hash['DayTimeRestrictions']
184
- product_restrictions = ProductRestrictionCard.from_hash(hash['ProductRestrictions']) if
185
- hash['ProductRestrictions']
188
+ product_restrictions =
189
+ hash.key?('ProductRestrictions') ? hash['ProductRestrictions'] : SKIP
186
190
  location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if
187
191
  hash['LocationRestrictions']
188
192