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.
- checksums.yaml +4 -4
- data/README.md +15 -16
- data/lib/shell_card_management_ap_is/controllers/base_controller.rb +9 -9
- data/lib/shell_card_management_ap_is/controllers/card_controller.rb +383 -378
- data/lib/shell_card_management_ap_is/controllers/customer_controller.rb +234 -225
- data/lib/shell_card_management_ap_is/controllers/o_auth_authorization_controller.rb +9 -9
- data/lib/shell_card_management_ap_is/controllers/restriction_controller.rb +256 -248
- data/lib/shell_card_management_ap_is/exceptions/error_object_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_customer_customer403_error_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_customer_payers400_error_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_customer_payers404_error_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser400_error_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser401_error_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser403_error_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser404_error_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser500_error_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard401_error_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard500_error_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/o_auth_provider_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/models/account_request.rb +11 -11
- data/lib/shell_card_management_ap_is/models/account_response_accounts_items.rb +8 -8
- data/lib/shell_card_management_ap_is/models/account_restriction_request.rb +3 -4
- data/lib/shell_card_management_ap_is/models/audit_request.rb +29 -29
- data/lib/shell_card_management_ap_is/models/audit_response_audits_items.rb +41 -41
- data/lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb +12 -1
- data/lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb +13 -2
- data/lib/shell_card_management_ap_is/models/base_model.rb +76 -28
- data/lib/shell_card_management_ap_is/models/bundle_restriction.rb +35 -22
- data/lib/shell_card_management_ap_is/models/bundle_restriction_update.rb +6 -8
- data/lib/shell_card_management_ap_is/models/bundled_restrictions_list.rb +10 -16
- data/lib/shell_card_management_ap_is/models/card.rb +25 -6
- data/lib/shell_card_management_ap_is/models/card_detail.rb +24 -24
- data/lib/shell_card_management_ap_is/models/card_group_request.rb +3 -3
- data/lib/shell_card_management_ap_is/models/card_settings.rb +10 -10
- data/lib/shell_card_management_ap_is/models/create_bundle_request.rb +2 -3
- data/lib/shell_card_management_ap_is/models/customer_detail_response.rb +18 -18
- data/lib/shell_card_management_ap_is/models/day_time_restriction.rb +2 -2
- data/lib/shell_card_management_ap_is/models/day_time_restrictions.rb +132 -0
- data/lib/shell_card_management_ap_is/models/filters.rb +6 -6
- data/lib/shell_card_management_ap_is/models/filters1.rb +6 -6
- data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_customer_payers400_error1.rb +50 -0
- data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_customer_payers404_error1.rb +50 -0
- data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser400_error1.rb +50 -0
- data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser401_error1.rb +50 -0
- data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser404_error1.rb +50 -0
- data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser500_error1.rb +50 -0
- data/lib/shell_card_management_ap_is/models/fleetmanagement_v2_restriction_searchcard401_error1.rb +50 -0
- data/lib/shell_card_management_ap_is/models/fleetmanagement_v2_restriction_searchcard500_error1.rb +50 -0
- data/lib/shell_card_management_ap_is/models/logged_in_user_response.rb +3 -3
- data/lib/shell_card_management_ap_is/models/order_card_enquiry.rb +27 -6
- data/lib/shell_card_management_ap_is/models/payer_details.rb +10 -10
- data/lib/shell_card_management_ap_is/models/payer_request.rb +6 -6
- data/lib/shell_card_management_ap_is/models/pin_advice_types.rb +4 -4
- data/lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb +11 -11
- data/lib/shell_card_management_ap_is/models/purchase_category1_all_of0.rb +8 -8
- data/lib/shell_card_management_ap_is/models/replace_card_settings.rb +10 -10
- data/lib/shell_card_management_ap_is/models/restriction.rb +10 -16
- data/lib/shell_card_management_ap_is/models/restriction_cards_list.rb +21 -17
- data/lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb +39 -27
- data/lib/shell_card_management_ap_is/models/search_card.rb +13 -2
- data/lib/shell_card_management_ap_is/models/search_request.rb +6 -6
- data/lib/shell_card_management_ap_is/models/submitted_card.rb +22 -1
- data/lib/shell_card_management_ap_is/models/summary_request.rb +6 -6
- data/lib/shell_card_management_ap_is/models/update_bundle_request.rb +7 -7
- data/lib/shell_card_management_ap_is/models/update_card.rb +11 -60
- data/lib/shell_card_management_ap_is/models/update_card_group_request.rb +3 -3
- data/lib/shell_card_management_ap_is/models/update_card_renewal_address.rb +2 -2
- data/lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb +2 -2
- data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb +1 -1
- data/lib/shell_card_management_ap_is/models/usage_restriction.rb +2 -2
- data/lib/shell_card_management_ap_is/utilities/file_wrapper.rb +9 -9
- data/lib/shell_card_management_ap_is.rb +17 -0
- metadata +17 -8
@@ -114,23 +114,23 @@ module ShellCardManagementApIs
|
|
114
114
|
|
115
115
|
# User requested operation.
|
116
116
|
# Possible values:
|
117
|
-
# •
|
118
|
-
# •
|
119
|
-
# •
|
120
|
-
# •
|
121
|
-
# •
|
122
|
-
# •
|
123
|
-
# •
|
124
|
-
# •
|
125
|
-
# •
|
126
|
-
# •
|
127
|
-
# •
|
128
|
-
# •
|
129
|
-
# •
|
130
|
-
# •
|
131
|
-
# •
|
132
|
-
# •
|
133
|
-
# •
|
117
|
+
# • OrderCard
|
118
|
+
# • CreateCardGroup
|
119
|
+
# • PINReminder
|
120
|
+
# • MoveCard
|
121
|
+
# • UpdateCardStatus
|
122
|
+
# • UpdateCardGroup
|
123
|
+
# • AutoRenew
|
124
|
+
# • BulkCardOrder
|
125
|
+
# • BulkCardBlock
|
126
|
+
# • BulkCardOrderMultiAccount
|
127
|
+
# • MobilePaymentRegistration
|
128
|
+
# • UpdateCompanyInfo
|
129
|
+
# • BCOSummary
|
130
|
+
# • BCOMultiAccountSummary
|
131
|
+
# • BCBSummary
|
132
|
+
# • FundTransfer
|
133
|
+
# • DeliveryAddressUpdate
|
134
134
|
# @return [String]
|
135
135
|
attr_accessor :requested_operation
|
136
136
|
|
@@ -140,35 +140,35 @@ module ShellCardManagementApIs
|
|
140
140
|
|
141
141
|
# Request type initiated under the requested operation.
|
142
142
|
# Possible values:
|
143
|
-
# •
|
144
|
-
# •
|
145
|
-
# •
|
146
|
-
# •
|
147
|
-
# •
|
148
|
-
# •
|
149
|
-
# •
|
150
|
-
# •
|
151
|
-
# •
|
152
|
-
# •
|
153
|
-
# •
|
154
|
-
# •
|
155
|
-
# •
|
156
|
-
# •
|
157
|
-
# •
|
158
|
-
# •
|
159
|
-
# •
|
143
|
+
# • OrderCard
|
144
|
+
# • CreateCardGroup
|
145
|
+
# • PINReminder
|
146
|
+
# • MoveCard
|
147
|
+
# • UpdateCardStatus
|
148
|
+
# • UpdateCardGroup
|
149
|
+
# • AutoRenew
|
150
|
+
# • BulkCardOrder
|
151
|
+
# • BulkCardBlock
|
152
|
+
# • BulkCardOrderMultiAccount
|
153
|
+
# • MobilePaymentRegistration
|
154
|
+
# • UpdateCompanyInfo
|
155
|
+
# • BCOSummary
|
156
|
+
# • BCOMultiAccountSummary
|
157
|
+
# • BCBSummary
|
158
|
+
# • FundTransfer
|
159
|
+
# • DeliveryAddressUpdate
|
160
160
|
# @return [String]
|
161
161
|
attr_accessor :request_type
|
162
162
|
|
163
163
|
# Status of the request.
|
164
164
|
# Possible values:
|
165
|
-
# •
|
166
|
-
# •
|
167
|
-
# •
|
168
|
-
# •
|
169
|
-
# •
|
170
|
-
# •
|
171
|
-
# •
|
165
|
+
# • Success
|
166
|
+
# • Failed
|
167
|
+
# • InProgress
|
168
|
+
# • Submitted
|
169
|
+
# • Rejected
|
170
|
+
# • PendingApproval
|
171
|
+
# • MailedToCSC
|
172
172
|
# @return [String]
|
173
173
|
attr_accessor :status
|
174
174
|
|
data/lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb
CHANGED
@@ -24,6 +24,12 @@ module ShellCardManagementApIs
|
|
24
24
|
# @return [String]
|
25
25
|
attr_accessor :pan
|
26
26
|
|
27
|
+
# Card PAN ID.
|
28
|
+
# Optional if CardId is given, else mandatory.
|
29
|
+
# Note: PANID is ignored if CardId is given.
|
30
|
+
# @return [Float]
|
31
|
+
attr_accessor :panid
|
32
|
+
|
27
33
|
# Card Id of the card.
|
28
34
|
# Optional if PAN is passed, else Mandatory.
|
29
35
|
# @return [Integer]
|
@@ -43,6 +49,7 @@ module ShellCardManagementApIs
|
|
43
49
|
@_hash['account_number'] = 'AccountNumber'
|
44
50
|
@_hash['account_id'] = 'AccountId'
|
45
51
|
@_hash['pan'] = 'PAN'
|
52
|
+
@_hash['panid'] = 'PANID'
|
46
53
|
@_hash['card_id'] = 'CardId'
|
47
54
|
@_hash['reissue_setting'] = 'ReissueSetting'
|
48
55
|
@_hash
|
@@ -54,6 +61,7 @@ module ShellCardManagementApIs
|
|
54
61
|
account_number
|
55
62
|
account_id
|
56
63
|
pan
|
64
|
+
panid
|
57
65
|
card_id
|
58
66
|
]
|
59
67
|
end
|
@@ -64,10 +72,11 @@ module ShellCardManagementApIs
|
|
64
72
|
end
|
65
73
|
|
66
74
|
def initialize(reissue_setting = nil, account_number = SKIP,
|
67
|
-
account_id = SKIP, pan = SKIP, card_id = SKIP)
|
75
|
+
account_id = SKIP, pan = SKIP, panid = SKIP, card_id = SKIP)
|
68
76
|
@account_number = account_number unless account_number == SKIP
|
69
77
|
@account_id = account_id unless account_id == SKIP
|
70
78
|
@pan = pan unless pan == SKIP
|
79
|
+
@panid = panid unless panid == SKIP
|
71
80
|
@card_id = card_id unless card_id == SKIP
|
72
81
|
@reissue_setting = reissue_setting
|
73
82
|
end
|
@@ -82,6 +91,7 @@ module ShellCardManagementApIs
|
|
82
91
|
account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
|
83
92
|
account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
|
84
93
|
pan = hash.key?('PAN') ? hash['PAN'] : SKIP
|
94
|
+
panid = hash.key?('PANID') ? hash['PANID'] : SKIP
|
85
95
|
card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
|
86
96
|
|
87
97
|
# Create object from extracted values.
|
@@ -89,6 +99,7 @@ module ShellCardManagementApIs
|
|
89
99
|
account_number,
|
90
100
|
account_id,
|
91
101
|
pan,
|
102
|
+
panid,
|
92
103
|
card_id)
|
93
104
|
end
|
94
105
|
end
|
@@ -17,11 +17,16 @@ module ShellCardManagementApIs
|
|
17
17
|
# @return [String]
|
18
18
|
attr_accessor :card_id_and_pan
|
19
19
|
|
20
|
+
# PANID of the card
|
21
|
+
# @return [Float]
|
22
|
+
attr_accessor :panid
|
23
|
+
|
20
24
|
# A mapping from model property names to API property names.
|
21
25
|
def self.names
|
22
26
|
@_hash = {} if @_hash.nil?
|
23
27
|
@_hash['auto_renew_reference_id'] = 'AutoRenewReferenceId'
|
24
28
|
@_hash['card_id_and_pan'] = 'CardIdAndPAN'
|
29
|
+
@_hash['panid'] = 'PANID'
|
25
30
|
@_hash
|
26
31
|
end
|
27
32
|
|
@@ -30,6 +35,7 @@ module ShellCardManagementApIs
|
|
30
35
|
%w[
|
31
36
|
auto_renew_reference_id
|
32
37
|
card_id_and_pan
|
38
|
+
panid
|
33
39
|
]
|
34
40
|
end
|
35
41
|
|
@@ -38,12 +44,15 @@ module ShellCardManagementApIs
|
|
38
44
|
%w[
|
39
45
|
auto_renew_reference_id
|
40
46
|
card_id_and_pan
|
47
|
+
panid
|
41
48
|
]
|
42
49
|
end
|
43
50
|
|
44
|
-
def initialize(auto_renew_reference_id = SKIP, card_id_and_pan = SKIP
|
51
|
+
def initialize(auto_renew_reference_id = SKIP, card_id_and_pan = SKIP,
|
52
|
+
panid = SKIP)
|
45
53
|
@auto_renew_reference_id = auto_renew_reference_id unless auto_renew_reference_id == SKIP
|
46
54
|
@card_id_and_pan = card_id_and_pan unless card_id_and_pan == SKIP
|
55
|
+
@panid = panid unless panid == SKIP
|
47
56
|
end
|
48
57
|
|
49
58
|
# Creates an instance of the object from a hash.
|
@@ -54,10 +63,12 @@ module ShellCardManagementApIs
|
|
54
63
|
auto_renew_reference_id =
|
55
64
|
hash.key?('AutoRenewReferenceId') ? hash['AutoRenewReferenceId'] : SKIP
|
56
65
|
card_id_and_pan = hash.key?('CardIdAndPAN') ? hash['CardIdAndPAN'] : SKIP
|
66
|
+
panid = hash.key?('PANID') ? hash['PANID'] : SKIP
|
57
67
|
|
58
68
|
# Create object from extracted values.
|
59
69
|
AutoRenewCardResponseDataItems.new(auto_renew_reference_id,
|
60
|
-
card_id_and_pan
|
70
|
+
card_id_and_pan,
|
71
|
+
panid)
|
61
72
|
end
|
62
73
|
end
|
63
74
|
end
|
@@ -5,6 +5,7 @@
|
|
5
5
|
|
6
6
|
module ShellCardManagementApIs
|
7
7
|
# Base model.
|
8
|
+
# rubocop:disable all
|
8
9
|
class BaseModel < CoreLibrary::BaseModel
|
9
10
|
# Returns a Hash representation of the current object.
|
10
11
|
def to_hash
|
@@ -15,48 +16,95 @@ module ShellCardManagementApIs
|
|
15
16
|
instance_variables.each do |name|
|
16
17
|
value = instance_variable_get(name)
|
17
18
|
name = name[1..]
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
if name == 'additional_properties'
|
20
|
+
additional_properties = process_additional_properties(value, self.class.names)
|
21
|
+
hash.merge!(additional_properties)
|
22
|
+
else
|
23
|
+
key = self.class.names.key?(name) ? self.class.names[name] : name
|
24
|
+
optional_fields = self.class.optionals
|
25
|
+
nullable_fields = self.class.nullables
|
26
|
+
if value.nil?
|
27
|
+
next unless nullable_fields.include?(name)
|
28
|
+
|
29
|
+
if !optional_fields.include?(name) && !nullable_fields.include?(name)
|
30
|
+
raise ArgumentError,
|
31
|
+
"`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
|
32
|
+
end
|
27
33
|
end
|
28
|
-
end
|
29
34
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
35
|
+
hash[key] = nil
|
36
|
+
unless value.nil?
|
37
|
+
if respond_to?("to_custom_#{name}")
|
38
|
+
if (value.instance_of? Array) || (value.instance_of? Hash)
|
39
|
+
params = [hash, key]
|
40
|
+
hash[key] = send("to_custom_#{name}", *params)
|
41
|
+
else
|
42
|
+
hash[key] = send("to_custom_#{name}")
|
43
|
+
end
|
44
|
+
elsif respond_to?("to_union_type_#{name}")
|
45
|
+
hash[key] = send("to_union_type_#{name}")
|
46
|
+
elsif value.instance_of? Array
|
47
|
+
hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
48
|
+
elsif value.instance_of? Hash
|
49
|
+
hash[key] = {}
|
50
|
+
value.each do |k, v|
|
51
|
+
hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
|
52
|
+
end
|
36
53
|
else
|
37
|
-
hash[key] =
|
54
|
+
hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
|
38
55
|
end
|
39
|
-
elsif respond_to?("to_union_type_#{name}")
|
40
|
-
hash[key] = send("to_union_type_#{name}")
|
41
|
-
elsif value.instance_of? Array
|
42
|
-
hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
43
|
-
elsif value.instance_of? Hash
|
44
|
-
hash[key] = {}
|
45
|
-
value.each do |k, v|
|
46
|
-
hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
|
47
|
-
end
|
48
|
-
else
|
49
|
-
hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
|
50
56
|
end
|
51
57
|
end
|
52
58
|
end
|
53
59
|
hash
|
54
60
|
end
|
55
61
|
|
62
|
+
# Processes additional properties, ensuring no conflicts with existing properties.
|
63
|
+
def process_additional_properties(additional_properties, existing_prop_names)
|
64
|
+
hash = {}
|
65
|
+
additional_properties.each do |name, value|
|
66
|
+
check_for_conflict(name, existing_prop_names)
|
67
|
+
|
68
|
+
hash[name] = if value.is_a?(Array)
|
69
|
+
process_array(value)
|
70
|
+
elsif value.is_a?(Hash)
|
71
|
+
process_hash(value)
|
72
|
+
else
|
73
|
+
process_basic_value(value)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
hash
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks if an additional property conflicts with a model's existing property.
|
80
|
+
def check_for_conflict(name, existing_prop_names)
|
81
|
+
return unless existing_prop_names.key?(name)
|
82
|
+
|
83
|
+
raise ArgumentError, "An additional property key, '#{name}' conflicts with one of the model's properties"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Processes an array of values, recursively calling `to_hash` on BaseModel objects.
|
87
|
+
def process_array(value)
|
88
|
+
value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
89
|
+
end
|
90
|
+
|
91
|
+
# Processes a hash of values, recursively calling `to_hash` on BaseModel objects.
|
92
|
+
def process_hash(value)
|
93
|
+
value.transform_values do |v|
|
94
|
+
v.is_a?(BaseModel) ? v.to_hash : v
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Processes a basic value (non-array, non-hash).
|
99
|
+
def process_basic_value(value)
|
100
|
+
value.is_a?(BaseModel) ? value.to_hash : value
|
101
|
+
end
|
102
|
+
|
56
103
|
# Returns a JSON representation of the curent object.
|
57
104
|
def to_json(options = {})
|
58
105
|
hash = to_hash
|
59
106
|
hash.to_json(options)
|
60
107
|
end
|
61
108
|
end
|
109
|
+
# rubocop:enable all
|
62
110
|
end
|
@@ -13,8 +13,8 @@ module ShellCardManagementApIs
|
|
13
13
|
# restriction.
|
14
14
|
# Mandatory
|
15
15
|
# Allowed values –
|
16
|
-
# •
|
17
|
-
# •
|
16
|
+
# • Add: Apply the given restriction on the bundle.
|
17
|
+
# • Default: No Day/Time restriction will be applied on the bundle in
|
18
18
|
# Gateway.
|
19
19
|
# @return [String]
|
20
20
|
attr_accessor :day_time_restriction_action
|
@@ -23,8 +23,8 @@ module ShellCardManagementApIs
|
|
23
23
|
# restriction.
|
24
24
|
# Mandatory
|
25
25
|
# Allowed values –
|
26
|
-
# •
|
27
|
-
# •
|
26
|
+
# • Add: Apply the given restriction on the bundle.
|
27
|
+
# • Default: No location restriction will be applied on the bundle in
|
28
28
|
# Gateway.
|
29
29
|
# @return [String]
|
30
30
|
attr_accessor :location_restriction_action
|
@@ -33,24 +33,39 @@ module ShellCardManagementApIs
|
|
33
33
|
# restriction.
|
34
34
|
# Mandatory
|
35
35
|
# Allowed values –
|
36
|
-
# •
|
37
|
-
# •
|
36
|
+
# • Add: Apply the given restriction on the bundle.
|
37
|
+
# • Default: No location restriction will be applied on the bundle in
|
38
38
|
# Gateway.
|
39
|
-
# @return [
|
39
|
+
# @return [Object]
|
40
40
|
attr_accessor :usage_restrictions
|
41
41
|
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
42
|
+
# The value indicates what actions to be performed with respect to location
|
43
|
+
# restriction.
|
44
|
+
# Mandatory
|
45
|
+
# Allowed values –
|
46
|
+
# • Add: Apply the given restriction on the bundle.
|
47
|
+
# • Default: No location restriction will be applied on the bundle in
|
48
|
+
# Gateway.
|
49
|
+
# @return [DayTimeRestrictions]
|
45
50
|
attr_accessor :day_time_restrictions
|
46
51
|
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
52
|
+
# The value indicates what actions to be performed with respect to location
|
53
|
+
# restriction.
|
54
|
+
# Mandatory
|
55
|
+
# Allowed values –
|
56
|
+
# • Add: Apply the given restriction on the bundle.
|
57
|
+
# • Default: No location restriction will be applied on the bundle in
|
58
|
+
# Gateway.
|
59
|
+
# @return [Object]
|
50
60
|
attr_accessor :product_restrictions
|
51
61
|
|
52
|
-
#
|
53
|
-
#
|
62
|
+
# The value indicates what actions to be performed with respect to location
|
63
|
+
# restriction.
|
64
|
+
# Mandatory
|
65
|
+
# Allowed values –
|
66
|
+
# • Add: Apply the given restriction on the bundle.
|
67
|
+
# • Default: No location restriction will be applied on the bundle in
|
68
|
+
# Gateway.
|
54
69
|
# @return [LocationRestriction]
|
55
70
|
attr_accessor :location_restrictions
|
56
71
|
|
@@ -83,8 +98,6 @@ module ShellCardManagementApIs
|
|
83
98
|
%w[
|
84
99
|
day_time_restriction_action
|
85
100
|
location_restriction_action
|
86
|
-
usage_restrictions
|
87
|
-
product_restrictions
|
88
101
|
]
|
89
102
|
end
|
90
103
|
|
@@ -115,12 +128,12 @@ module ShellCardManagementApIs
|
|
115
128
|
hash.key?('DayTimeRestrictionAction') ? hash['DayTimeRestrictionAction'] : SKIP
|
116
129
|
location_restriction_action =
|
117
130
|
hash.key?('LocationRestrictionAction') ? hash['LocationRestrictionAction'] : SKIP
|
118
|
-
usage_restrictions =
|
119
|
-
hash['UsageRestrictions']
|
120
|
-
day_time_restrictions =
|
131
|
+
usage_restrictions =
|
132
|
+
hash.key?('UsageRestrictions') ? hash['UsageRestrictions'] : SKIP
|
133
|
+
day_time_restrictions = DayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
|
121
134
|
hash['DayTimeRestrictions']
|
122
|
-
product_restrictions =
|
123
|
-
hash['ProductRestrictions']
|
135
|
+
product_restrictions =
|
136
|
+
hash.key?('ProductRestrictions') ? hash['ProductRestrictions'] : SKIP
|
124
137
|
location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if
|
125
138
|
hash['LocationRestrictions']
|
126
139
|
|
@@ -38,7 +38,7 @@ module ShellCardManagementApIs
|
|
38
38
|
# bundle.
|
39
39
|
# Optional
|
40
40
|
# Default value is False.
|
41
|
-
# @return [
|
41
|
+
# @return [Object]
|
42
42
|
attr_accessor :usage_restrictions
|
43
43
|
|
44
44
|
# Identifier of the day/time restriction profile to be updated for the
|
@@ -56,7 +56,7 @@ module ShellCardManagementApIs
|
|
56
56
|
# Identifier of the day/time restriction profile to be updated for the
|
57
57
|
# bundle in Gateway.
|
58
58
|
# Optional
|
59
|
-
# @return [
|
59
|
+
# @return [Object]
|
60
60
|
attr_accessor :product_restrictions
|
61
61
|
|
62
62
|
# Identifier of the location restriction profile to be updated for the
|
@@ -109,9 +109,7 @@ module ShellCardManagementApIs
|
|
109
109
|
reset_day_time_restriction
|
110
110
|
reset_location_restriction
|
111
111
|
reset_product_restriction
|
112
|
-
usage_restrictions
|
113
112
|
day_time_restriction_profile_id
|
114
|
-
product_restrictions
|
115
113
|
]
|
116
114
|
end
|
117
115
|
|
@@ -159,14 +157,14 @@ module ShellCardManagementApIs
|
|
159
157
|
hash.key?('ResetLocationRestriction') ? hash['ResetLocationRestriction'] : SKIP
|
160
158
|
reset_product_restriction =
|
161
159
|
hash.key?('ResetProductRestriction') ? hash['ResetProductRestriction'] : SKIP
|
162
|
-
usage_restrictions =
|
163
|
-
hash['UsageRestrictions']
|
160
|
+
usage_restrictions =
|
161
|
+
hash.key?('UsageRestrictions') ? hash['UsageRestrictions'] : SKIP
|
164
162
|
day_time_restriction_profile_id =
|
165
163
|
hash.key?('DayTimeRestrictionProfileId') ? hash['DayTimeRestrictionProfileId'] : SKIP
|
166
164
|
day_time_restrictions = CardDayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
|
167
165
|
hash['DayTimeRestrictions']
|
168
|
-
product_restrictions =
|
169
|
-
hash['ProductRestrictions']
|
166
|
+
product_restrictions =
|
167
|
+
hash.key?('ProductRestrictions') ? hash['ProductRestrictions'] : SKIP
|
170
168
|
location_restriction_profile_id =
|
171
169
|
hash.key?('LocationRestrictionProfileId') ? hash['LocationRestrictionProfileId'] : SKIP
|
172
170
|
location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if
|
@@ -9,23 +9,19 @@ module ShellCardManagementApIs
|
|
9
9
|
SKIP = Object.new
|
10
10
|
private_constant :SKIP
|
11
11
|
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# @return [UsageRestriction]
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Object]
|
15
14
|
attr_accessor :usage_restrictions
|
16
15
|
|
17
|
-
#
|
18
|
-
#
|
19
|
-
# @return [DayTimeRestriction]
|
16
|
+
# TODO: Write general description for this method
|
17
|
+
# @return [DayTimeRestrictions]
|
20
18
|
attr_accessor :day_time_restrictions
|
21
19
|
|
22
|
-
#
|
23
|
-
# which transactions should be allowed on the card.
|
20
|
+
# TODO: Write general description for this method
|
24
21
|
# @return [BundledDetailsProductList]
|
25
22
|
attr_accessor :product_restrictions
|
26
23
|
|
27
|
-
#
|
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
|
-
|
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 =
|
73
|
-
hash['UsageRestrictions']
|
74
|
-
day_time_restrictions =
|
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 = BundledDetailsProductList.from_hash(hash['ProductRestrictions']) if
|
77
71
|
hash['ProductRestrictions']
|
@@ -175,10 +175,18 @@ module ShellCardManagementApIs
|
|
175
175
|
# @return [TrueClass | FalseClass]
|
176
176
|
attr_accessor :odometer_input
|
177
177
|
|
178
|
-
# Card PAN
|
178
|
+
# Card PAN
|
179
179
|
# @return [String]
|
180
180
|
attr_accessor :pan
|
181
181
|
|
182
|
+
# Card PAN Mask PAN (Mask all digits except the Last 6 digits of the PAN)
|
183
|
+
# @return [String]
|
184
|
+
attr_accessor :masked_pan
|
185
|
+
|
186
|
+
# Card PAN ID.
|
187
|
+
# @return [Float]
|
188
|
+
attr_accessor :panid
|
189
|
+
|
182
190
|
# Purchase category code
|
183
191
|
# @return [String]
|
184
192
|
attr_accessor :purchase_category_code
|
@@ -326,6 +334,8 @@ module ShellCardManagementApIs
|
|
326
334
|
@_hash['local_currency_symbol'] = 'LocalCurrencySymbol'
|
327
335
|
@_hash['odometer_input'] = 'OdometerInput'
|
328
336
|
@_hash['pan'] = 'PAN'
|
337
|
+
@_hash['masked_pan'] = 'MaskedPAN'
|
338
|
+
@_hash['panid'] = 'PANID'
|
329
339
|
@_hash['purchase_category_code'] = 'PurchaseCategoryCode'
|
330
340
|
@_hash['purchase_category_id'] = 'PurchaseCategoryId'
|
331
341
|
@_hash['purchase_category_name'] = 'PurchaseCategoryName'
|
@@ -383,6 +393,8 @@ module ShellCardManagementApIs
|
|
383
393
|
local_currency_symbol
|
384
394
|
odometer_input
|
385
395
|
pan
|
396
|
+
masked_pan
|
397
|
+
panid
|
386
398
|
purchase_category_code
|
387
399
|
purchase_category_id
|
388
400
|
purchase_category_name
|
@@ -461,11 +473,12 @@ module ShellCardManagementApIs
|
|
461
473
|
is_virtual_card = SKIP, last_modified_date = SKIP,
|
462
474
|
last_used_date = SKIP, local_currency_code = SKIP,
|
463
475
|
local_currency_symbol = SKIP, odometer_input = SKIP,
|
464
|
-
pan = SKIP,
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
476
|
+
pan = SKIP, masked_pan = SKIP, panid = SKIP,
|
477
|
+
purchase_category_code = SKIP, purchase_category_id = SKIP,
|
478
|
+
purchase_category_name = SKIP, reason = SKIP,
|
479
|
+
reissue_setting = SKIP, status_description = SKIP,
|
480
|
+
status_id = SKIP, token_type_id = SKIP,
|
481
|
+
token_type_name = SKIP, vrn = SKIP,
|
469
482
|
client_reference_id = SKIP, is_emv_contact = SKIP,
|
470
483
|
is_emv_contactless = SKIP, is_rfid = SKIP, rfiduid = SKIP,
|
471
484
|
emaid = SKIP, ev_printed_number = SKIP,
|
@@ -506,6 +519,8 @@ module ShellCardManagementApIs
|
|
506
519
|
@local_currency_symbol = local_currency_symbol unless local_currency_symbol == SKIP
|
507
520
|
@odometer_input = odometer_input unless odometer_input == SKIP
|
508
521
|
@pan = pan unless pan == SKIP
|
522
|
+
@masked_pan = masked_pan unless masked_pan == SKIP
|
523
|
+
@panid = panid unless panid == SKIP
|
509
524
|
@purchase_category_code = purchase_category_code unless purchase_category_code == SKIP
|
510
525
|
@purchase_category_id = purchase_category_id unless purchase_category_id == SKIP
|
511
526
|
@purchase_category_name = purchase_category_name unless purchase_category_name == SKIP
|
@@ -583,6 +598,8 @@ module ShellCardManagementApIs
|
|
583
598
|
hash.key?('LocalCurrencySymbol') ? hash['LocalCurrencySymbol'] : SKIP
|
584
599
|
odometer_input = hash.key?('OdometerInput') ? hash['OdometerInput'] : SKIP
|
585
600
|
pan = hash.key?('PAN') ? hash['PAN'] : SKIP
|
601
|
+
masked_pan = hash.key?('MaskedPAN') ? hash['MaskedPAN'] : SKIP
|
602
|
+
panid = hash.key?('PANID') ? hash['PANID'] : SKIP
|
586
603
|
purchase_category_code =
|
587
604
|
hash.key?('PurchaseCategoryCode') ? hash['PurchaseCategoryCode'] : SKIP
|
588
605
|
purchase_category_id =
|
@@ -646,6 +663,8 @@ module ShellCardManagementApIs
|
|
646
663
|
local_currency_symbol,
|
647
664
|
odometer_input,
|
648
665
|
pan,
|
666
|
+
masked_pan,
|
667
|
+
panid,
|
649
668
|
purchase_category_code,
|
650
669
|
purchase_category_id,
|
651
670
|
purchase_category_name,
|