card-management-sdk 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -19
- data/lib/shell_card_management_ap_is/client.rb +2 -3
- data/lib/shell_card_management_ap_is/configuration.rb +15 -22
- data/lib/shell_card_management_ap_is/controllers/card_controller.rb +227 -232
- data/lib/shell_card_management_ap_is/controllers/customer_controller.rb +135 -145
- data/lib/shell_card_management_ap_is/controllers/o_auth_authorization_controller.rb +2 -2
- data/lib/shell_card_management_ap_is/controllers/restriction_controller.rb +351 -229
- data/lib/shell_card_management_ap_is/exceptions/{error_user_access_error1_exception.rb → fleetmanagement_v1_customer_customer403_error_exception.rb} +2 -2
- data/lib/shell_card_management_ap_is/exceptions/{default_error_exception.rb → fleetmanagement_v1_customer_payers400_error_exception.rb} +5 -5
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_customer_payers404_error_exception.rb +32 -0
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser400_error_exception.rb +32 -0
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser401_error_exception.rb +32 -0
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser403_error_exception.rb +32 -0
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser404_error_exception.rb +32 -0
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser500_error_exception.rb +32 -0
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard401_error_exception.rb +32 -0
- data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard500_error_exception.rb +32 -0
- data/lib/shell_card_management_ap_is/http/auth/bearer_token.rb +54 -10
- data/lib/shell_card_management_ap_is/models/account_access.rb +3 -8
- data/lib/shell_card_management_ap_is/models/account_request.rb +6 -15
- data/lib/shell_card_management_ap_is/models/account_response.rb +2 -6
- data/lib/shell_card_management_ap_is/models/account_response_accounts_items.rb +21 -45
- data/lib/shell_card_management_ap_is/models/account_restriction_request.rb +28 -9
- data/lib/shell_card_management_ap_is/models/account_restriction_response.rb +60 -11
- data/lib/shell_card_management_ap_is/models/account_velocity_limit.rb +11 -19
- data/lib/shell_card_management_ap_is/models/accounts.rb +1 -2
- data/lib/shell_card_management_ap_is/models/address.rb +4 -11
- data/lib/shell_card_management_ap_is/models/audit_request.rb +25 -21
- data/lib/shell_card_management_ap_is/models/audit_response.rb +2 -6
- data/lib/shell_card_management_ap_is/models/audit_response_audits_items.rb +9 -22
- data/lib/shell_card_management_ap_is/models/auto_renew_card_request.rb +2 -5
- data/lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb +2 -5
- data/lib/shell_card_management_ap_is/models/auto_renew_card_response.rb +1 -3
- data/lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb +1 -2
- data/lib/shell_card_management_ap_is/models/bank_account.rb +5 -13
- data/lib/shell_card_management_ap_is/models/{search_account_limit_request_filters.rb → budle_details_request.rb} +29 -22
- data/lib/shell_card_management_ap_is/models/{create_bundle_response_data_items_cards_items.rb → bundle_card_restriction_status.rb} +4 -3
- data/lib/shell_card_management_ap_is/models/bundle_details_response.rb +181 -0
- data/lib/shell_card_management_ap_is/models/bundle_restriction.rb +73 -103
- data/lib/shell_card_management_ap_is/models/bundle_restriction_update.rb +187 -0
- data/lib/shell_card_management_ap_is/models/bundled_details_product_list.rb +116 -0
- data/lib/shell_card_management_ap_is/models/bundled_restrictions_list.rb +88 -0
- data/lib/shell_card_management_ap_is/models/cancel_card_request.rb +1 -3
- data/lib/shell_card_management_ap_is/models/cancel_card_response.rb +3 -6
- data/lib/shell_card_management_ap_is/models/card.rb +23 -50
- data/lib/shell_card_management_ap_is/models/card_block_schedule.rb +1 -2
- data/lib/shell_card_management_ap_is/models/{summary_of_bundle_response_data_items_card_bundles_items.rb → card_bundle.rb} +11 -18
- data/lib/shell_card_management_ap_is/models/card_contact.rb +222 -0
- data/lib/shell_card_management_ap_is/models/card_day_time_restrictions.rb +3 -9
- data/lib/shell_card_management_ap_is/models/card_delivery_address.rb +218 -0
- data/lib/shell_card_management_ap_is/models/card_delivery_contact.rb +7 -14
- data/lib/shell_card_management_ap_is/models/card_detail.rb +36 -49
- data/lib/shell_card_management_ap_is/models/card_details_request.rb +6 -14
- data/lib/shell_card_management_ap_is/models/card_details_response.rb +60 -249
- data/lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb +1 -2
- data/lib/shell_card_management_ap_is/models/card_details_response_card_delivery_address.rb +6 -15
- data/lib/shell_card_management_ap_is/models/card_details_response_fuel_sets_items.rb +1 -2
- data/lib/shell_card_management_ap_is/models/card_details_response_non_fuel_sets_items.rb +1 -2
- data/lib/shell_card_management_ap_is/models/card_details_response_pin_delivery_address.rb +6 -15
- data/lib/shell_card_management_ap_is/models/card_group_request.rb +3 -9
- data/lib/shell_card_management_ap_is/models/card_group_response.rb +2 -6
- data/lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb +10 -20
- data/lib/shell_card_management_ap_is/models/card_management_v1_cancel_request.rb +104 -0
- data/lib/shell_card_management_ap_is/models/card_management_v1_ordercard_request.rb +59 -0
- data/lib/shell_card_management_ap_is/models/card_management_v1_pinreminder_request.rb +130 -0
- data/lib/shell_card_management_ap_is/models/card_management_v1_updatestatus_request.rb +122 -0
- data/lib/shell_card_management_ap_is/models/card_move_request.rb +4 -9
- data/lib/shell_card_management_ap_is/models/card_move_request_cards_items.rb +1 -3
- data/lib/shell_card_management_ap_is/models/card_move_response.rb +2 -4
- data/lib/shell_card_management_ap_is/models/card_move_response_error_cards_items.rb +2 -5
- data/lib/shell_card_management_ap_is/models/card_move_response_successful_requests_items.rb +2 -5
- data/lib/shell_card_management_ap_is/models/{restriction_card_request.rb → card_restriction_req.rb} +42 -50
- data/lib/shell_card_management_ap_is/models/card_restriction_response.rb +96 -0
- data/lib/shell_card_management_ap_is/models/card_search_response.rb +2 -7
- data/lib/shell_card_management_ap_is/models/card_settings.rb +626 -0
- data/lib/shell_card_management_ap_is/models/card_summary_request.rb +3 -5
- data/lib/shell_card_management_ap_is/models/card_summary_response.rb +1 -3
- data/lib/shell_card_management_ap_is/models/card_type_request.rb +3 -7
- data/lib/shell_card_management_ap_is/models/card_type_response.rb +1 -3
- data/lib/shell_card_management_ap_is/models/card_type_response_customer_card_types_items.rb +15 -31
- data/lib/shell_card_management_ap_is/models/card_type_response_error.rb +1 -2
- data/lib/shell_card_management_ap_is/models/card_usage_restrictions.rb +5 -10
- data/lib/shell_card_management_ap_is/models/col_co_access.rb +2 -4
- data/lib/shell_card_management_ap_is/models/{location_restrictions_country_restrictions.rb → country_restriction.rb} +20 -21
- data/lib/shell_card_management_ap_is/models/create_bundle_request.rb +65 -62
- data/lib/shell_card_management_ap_is/models/create_bundle_response.rb +122 -47
- data/lib/shell_card_management_ap_is/models/create_card_group_request.rb +3 -9
- data/lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb +1 -3
- data/lib/shell_card_management_ap_is/models/create_card_group_response.rb +2 -5
- data/lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb +1 -3
- data/lib/shell_card_management_ap_is/models/create_card_group_response_successful_requests_items.rb +1 -3
- data/lib/shell_card_management_ap_is/models/create_card_response.rb +1 -2
- data/lib/shell_card_management_ap_is/models/customer_contract.rb +1 -2
- data/lib/shell_card_management_ap_is/models/customer_detail_request.rb +2 -5
- data/lib/shell_card_management_ap_is/models/customer_detail_response.rb +13 -27
- data/lib/shell_card_management_ap_is/models/day_time_restriction.rb +133 -0
- data/lib/shell_card_management_ap_is/models/{summary_of_bundle_request.rb → default_error.rb} +10 -10
- data/lib/shell_card_management_ap_is/models/default_error_fault.rb +4 -5
- data/lib/shell_card_management_ap_is/models/delete_bundle_request.rb +14 -16
- data/lib/shell_card_management_ap_is/models/delete_bundle_response.rb +9 -10
- data/lib/shell_card_management_ap_is/models/delivery_address_update.rb +13 -11
- data/lib/shell_card_management_ap_is/models/delivery_address_update_references.rb +2 -5
- data/lib/shell_card_management_ap_is/models/delivery_address_update_references2.rb +98 -0
- data/lib/shell_card_management_ap_is/models/delivery_address_update_request.rb +3 -7
- data/lib/shell_card_management_ap_is/models/delivery_address_update_response.rb +5 -14
- data/lib/shell_card_management_ap_is/models/delivery_addresses.rb +7 -18
- data/lib/shell_card_management_ap_is/models/{restriction_search_card_request.rb → detail.rb} +11 -11
- data/lib/shell_card_management_ap_is/models/eid_access.rb +1 -2
- data/lib/shell_card_management_ap_is/models/error_details.rb +1 -3
- data/lib/shell_card_management_ap_is/models/error_status.rb +1 -2
- data/lib/shell_card_management_ap_is/models/error_user_access_error.rb +1 -2
- data/lib/shell_card_management_ap_is/models/fault.rb +59 -0
- data/lib/shell_card_management_ap_is/models/filters.rb +702 -0
- data/lib/shell_card_management_ap_is/models/filters1.rb +579 -0
- data/lib/shell_card_management_ap_is/models/filters2.rb +194 -0
- data/lib/shell_card_management_ap_is/models/finance_currency.rb +1 -2
- data/lib/shell_card_management_ap_is/models/finance_currency2.rb +96 -0
- data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb +104 -0
- data/lib/shell_card_management_ap_is/models/generate_pin_key_response.rb +1 -2
- data/lib/shell_card_management_ap_is/models/invoice_distribution_method.rb +2 -4
- data/lib/shell_card_management_ap_is/models/{location_restrictions.rb → location_restriction.rb} +20 -35
- data/lib/shell_card_management_ap_is/models/logged_in_user_request.rb +2 -4
- data/lib/shell_card_management_ap_is/models/logged_in_user_response.rb +9 -22
- data/lib/shell_card_management_ap_is/models/{location_restrictions_network_restrictions_items.rb → network_restriction.rb} +18 -20
- data/lib/shell_card_management_ap_is/models/o_auth_token.rb +2 -6
- data/lib/shell_card_management_ap_is/models/order_card_enquiry.rb +22 -40
- data/lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb +8 -21
- data/lib/shell_card_management_ap_is/models/order_card_enquiry_request.rb +3 -4
- data/lib/shell_card_management_ap_is/models/order_card_enquiry_response.rb +1 -3
- data/lib/shell_card_management_ap_is/models/order_card_response.rb +1 -3
- data/lib/shell_card_management_ap_is/models/{location_restrictions_partner_site_restrictions_items.rb → partner_site_restriction.rb} +10 -12
- data/lib/shell_card_management_ap_is/models/payer_access.rb +3 -8
- data/lib/shell_card_management_ap_is/models/payer_details.rb +45 -86
- data/lib/shell_card_management_ap_is/models/payer_request.rb +3 -6
- data/lib/shell_card_management_ap_is/models/payer_response.rb +2 -6
- data/lib/shell_card_management_ap_is/models/payers.rb +2 -5
- data/lib/shell_card_management_ap_is/models/pin_advice_types.rb +1 -2
- data/lib/shell_card_management_ap_is/models/pin_contact.rb +234 -0
- data/lib/shell_card_management_ap_is/models/pin_deliver_to.rb +161 -0
- data/lib/shell_card_management_ap_is/models/pin_delivery_address.rb +222 -0
- data/lib/shell_card_management_ap_is/models/pin_delivery_contact.rb +7 -14
- data/lib/shell_card_management_ap_is/models/pin_delivery_details.rb +4 -11
- data/lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb +12 -10
- data/lib/shell_card_management_ap_is/models/pin_reminder_reference.rb +2 -5
- data/lib/shell_card_management_ap_is/models/pin_reminder_request.rb +2 -6
- data/lib/shell_card_management_ap_is/models/pin_reminder_response.rb +1 -3
- data/lib/shell_card_management_ap_is/models/product_all_of0.rb +1 -2
- data/lib/shell_card_management_ap_is/models/product_group.rb +2 -6
- data/lib/shell_card_management_ap_is/models/{product_restrictions.rb → product_restriction_card.rb} +9 -12
- data/lib/shell_card_management_ap_is/models/purchase_categories.rb +1 -4
- data/lib/shell_card_management_ap_is/models/purchase_category1_all_of0.rb +2 -7
- data/lib/shell_card_management_ap_is/models/purchase_category_request.rb +2 -5
- data/lib/shell_card_management_ap_is/models/purchase_category_response.rb +1 -2
- data/lib/shell_card_management_ap_is/models/replace_card_settings.rb +15 -30
- data/lib/shell_card_management_ap_is/models/restriction.rb +88 -0
- data/lib/shell_card_management_ap_is/models/{restriction_search_card_response_data_items.rb → restriction_card_list.rb} +284 -328
- data/lib/shell_card_management_ap_is/models/{restriction_card_request_cards_items.rb → restriction_cards_list.rb} +66 -83
- data/lib/shell_card_management_ap_is/models/restriction_product.rb +62 -0
- data/lib/shell_card_management_ap_is/models/{restriction_card_response_data_items.rb → restrictioncards_res.rb} +100 -114
- data/lib/shell_card_management_ap_is/models/role.rb +3 -6
- data/lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb +5 -14
- data/lib/shell_card_management_ap_is/models/schedule_card_block_request.rb +1 -2
- data/lib/shell_card_management_ap_is/models/schedule_card_block_response.rb +1 -3
- data/lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb +1 -3
- data/lib/shell_card_management_ap_is/models/search_account_limit_request.rb +79 -10
- data/lib/shell_card_management_ap_is/models/search_account_limit_response.rb +74 -20
- data/lib/shell_card_management_ap_is/models/search_card.rb +1 -2
- data/lib/shell_card_management_ap_is/models/search_card_request.rb +4 -6
- data/lib/shell_card_management_ap_is/models/{restriction_search_card_request_filters_cards_items.rb → search_card_restriction.rb} +19 -16
- data/lib/shell_card_management_ap_is/models/{restriction_search_card_request_filters.rb → search_card_restriction_req.rb} +72 -71
- data/lib/shell_card_management_ap_is/models/search_card_restriction_res.rb +89 -0
- data/lib/shell_card_management_ap_is/models/search_product_restriction.rb +3 -4
- data/lib/shell_card_management_ap_is/models/search_request.rb +19 -41
- data/lib/shell_card_management_ap_is/models/{location_restrictions_shell_site_restrictions_items.rb → shell_site_restriction.rb} +10 -17
- data/lib/shell_card_management_ap_is/models/submitted_card.rb +4 -10
- data/lib/shell_card_management_ap_is/models/summary_request.rb +15 -33
- data/lib/shell_card_management_ap_is/models/summary_response.rb +5 -11
- data/lib/shell_card_management_ap_is/models/{summary_of_bundle_response_data_items.rb → summaryofbundle_response.rb} +36 -33
- data/lib/shell_card_management_ap_is/models/{summaryof_bundle.rb → summaryofbundler_request.rb} +43 -36
- data/lib/shell_card_management_ap_is/models/update_bundle_request.rb +58 -63
- data/lib/shell_card_management_ap_is/models/update_bundle_response.rb +75 -21
- data/lib/shell_card_management_ap_is/models/update_card.rb +21 -20
- data/lib/shell_card_management_ap_is/models/update_card_group_request.rb +6 -14
- data/lib/shell_card_management_ap_is/models/update_card_group_response.rb +3 -6
- data/lib/shell_card_management_ap_is/models/update_card_group_response_move_card_references_items.rb +1 -3
- data/lib/shell_card_management_ap_is/models/update_card_renewal_address.rb +3 -9
- data/lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb +155 -0
- data/lib/shell_card_management_ap_is/models/update_card_status_request.rb +1 -3
- data/lib/shell_card_management_ap_is/models/update_card_status_response.rb +2 -5
- data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request.rb +2 -5
- data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb +2 -4
- data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_response.rb +1 -2
- data/lib/shell_card_management_ap_is/models/usage_restriction.rb +1127 -0
- data/lib/shell_card_management_ap_is/models/{usage_restrictions.rb → usage_restrictions_card.rb} +74 -131
- data/lib/shell_card_management_ap_is.rb +128 -101
- metadata +60 -33
- data/lib/shell_card_management_ap_is/models/create_bundle_request_restrictions.rb +0 -147
- data/lib/shell_card_management_ap_is/models/create_bundle_response_data_items.rb +0 -125
- data/lib/shell_card_management_ap_is/models/day_time_restrictions.rb +0 -162
- data/lib/shell_card_management_ap_is/models/restriction_card_response.rb +0 -91
- data/lib/shell_card_management_ap_is/models/restriction_search_card_response.rb +0 -79
- data/lib/shell_card_management_ap_is/models/search_account_limit_response_data.rb +0 -106
- data/lib/shell_card_management_ap_is/models/search_card_response_restrictions.rb +0 -99
- data/lib/shell_card_management_ap_is/models/summary_of_bundle_response.rb +0 -79
- data/lib/shell_card_management_ap_is/models/url_enum.rb +0 -23
@@ -56,9 +56,15 @@ module ShellCardManagementApIs
|
|
56
56
|
# @return [Integer]
|
57
57
|
attr_accessor :pin_contact_type
|
58
58
|
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
59
|
+
# PIN Contact Type.
|
60
|
+
# Mandatory
|
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
|
66
|
+
# Note: - PINContactType “3” is only allowed for Paper delivery
|
67
|
+
# @return [PINDeliverTo]
|
62
68
|
attr_accessor :pin_deliver_to
|
63
69
|
|
64
70
|
# A mapping from model property names to API property names.
|
@@ -93,12 +99,8 @@ module ShellCardManagementApIs
|
|
93
99
|
]
|
94
100
|
end
|
95
101
|
|
96
|
-
def initialize(pin_advice_type = nil,
|
97
|
-
|
98
|
-
panid = SKIP,
|
99
|
-
pan = SKIP,
|
100
|
-
card_expiry_date = SKIP,
|
101
|
-
pin_contact_type = SKIP,
|
102
|
+
def initialize(pin_advice_type = nil, card_id = SKIP, panid = SKIP,
|
103
|
+
pan = SKIP, card_expiry_date = SKIP, pin_contact_type = SKIP,
|
102
104
|
pin_deliver_to = SKIP)
|
103
105
|
@card_id = card_id unless card_id == SKIP
|
104
106
|
@panid = panid unless panid == SKIP
|
@@ -122,7 +124,7 @@ module ShellCardManagementApIs
|
|
122
124
|
hash.key?('CardExpiryDate') ? hash['CardExpiryDate'] : SKIP
|
123
125
|
pin_contact_type =
|
124
126
|
hash.key?('PINContactType') ? hash['PINContactType'] : SKIP
|
125
|
-
pin_deliver_to =
|
127
|
+
pin_deliver_to = PINDeliverTo.from_hash(hash['PINDeliverTo']) if hash['PINDeliverTo']
|
126
128
|
|
127
129
|
# Create object from extracted values.
|
128
130
|
PINReminderCardDetails.new(pin_advice_type,
|
@@ -64,11 +64,8 @@ module ShellCardManagementApIs
|
|
64
64
|
]
|
65
65
|
end
|
66
66
|
|
67
|
-
def initialize(card_id = SKIP,
|
68
|
-
|
69
|
-
pan = SKIP,
|
70
|
-
card_expiry_date = SKIP,
|
71
|
-
reference_id = SKIP)
|
67
|
+
def initialize(card_id = SKIP, panid = SKIP, pan = SKIP,
|
68
|
+
card_expiry_date = SKIP, reference_id = SKIP)
|
72
69
|
@card_id = card_id unless card_id == SKIP
|
73
70
|
@panid = panid unless panid == SKIP
|
74
71
|
@pan = pan unless pan == SKIP
|
@@ -81,12 +81,8 @@ module ShellCardManagementApIs
|
|
81
81
|
[]
|
82
82
|
end
|
83
83
|
|
84
|
-
def initialize(account_id = SKIP,
|
85
|
-
|
86
|
-
col_co_code = SKIP,
|
87
|
-
col_co_id = SKIP,
|
88
|
-
payer_id = SKIP,
|
89
|
-
payer_number = SKIP,
|
84
|
+
def initialize(account_id = SKIP, account_number = SKIP, col_co_code = SKIP,
|
85
|
+
col_co_id = SKIP, payer_id = SKIP, payer_number = SKIP,
|
90
86
|
pin_reminder_card_details = SKIP)
|
91
87
|
@account_id = account_id unless account_id == SKIP
|
92
88
|
@account_number = account_number unless account_number == SKIP
|
@@ -51,9 +51,7 @@ module ShellCardManagementApIs
|
|
51
51
|
[]
|
52
52
|
end
|
53
53
|
|
54
|
-
def initialize(request_id = SKIP,
|
55
|
-
main_reference = SKIP,
|
56
|
-
status = SKIP,
|
54
|
+
def initialize(request_id = SKIP, main_reference = SKIP, status = SKIP,
|
57
55
|
data = SKIP)
|
58
56
|
@request_id = request_id unless request_id == SKIP
|
59
57
|
@main_reference = main_reference unless main_reference == SKIP
|
@@ -39,8 +39,7 @@ module ShellCardManagementApIs
|
|
39
39
|
]
|
40
40
|
end
|
41
41
|
|
42
|
-
def initialize(global_product_code = nil,
|
43
|
-
description = nil)
|
42
|
+
def initialize(global_product_code = nil, description = nil)
|
44
43
|
@global_product_code = global_product_code
|
45
44
|
@description = description
|
46
45
|
end
|
@@ -68,12 +68,8 @@ module ShellCardManagementApIs
|
|
68
68
|
[]
|
69
69
|
end
|
70
70
|
|
71
|
-
def initialize(reference_id = SKIP,
|
72
|
-
|
73
|
-
name = SKIP,
|
74
|
-
is_default = SKIP,
|
75
|
-
is_fuel_type = SKIP,
|
76
|
-
products = SKIP)
|
71
|
+
def initialize(reference_id = SKIP, product_group_id = SKIP, name = SKIP,
|
72
|
+
is_default = SKIP, is_fuel_type = SKIP, products = SKIP)
|
77
73
|
@reference_id = reference_id unless reference_id == SKIP
|
78
74
|
@product_group_id = product_group_id unless product_group_id == SKIP
|
79
75
|
@name = name unless name == SKIP
|
data/lib/shell_card_management_ap_is/models/{product_restrictions.rb → product_restriction_card.rb}
RENAMED
@@ -4,21 +4,19 @@
|
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
6
|
module ShellCardManagementApIs
|
7
|
-
#
|
8
|
-
class
|
7
|
+
# ProductRestrictionCard Model.
|
8
|
+
class ProductRestrictionCard < BaseModel
|
9
9
|
SKIP = Object.new
|
10
10
|
private_constant :SKIP
|
11
11
|
|
12
12
|
# An array of 3-digit global product codes.
|
13
|
-
# Optional.
|
14
|
-
#
|
15
|
-
# Example: [ "033", "021", "023" ]
|
13
|
+
# Optional.
|
14
|
+
# Example: [ "033", "021", "023”]
|
16
15
|
# @return [Array[String]]
|
17
16
|
attr_accessor :products
|
18
17
|
|
19
|
-
# An array of product group
|
20
|
-
# Optional.
|
21
|
-
# are migrated to Gateway and Products are not provided.
|
18
|
+
# An array of product group IDs.
|
19
|
+
# Optional.
|
22
20
|
# Example: [ "670246404", "40557126" ]
|
23
21
|
# @return [Array[String]]
|
24
22
|
attr_accessor :product_groups
|
@@ -44,8 +42,7 @@ module ShellCardManagementApIs
|
|
44
42
|
[]
|
45
43
|
end
|
46
44
|
|
47
|
-
def initialize(products = SKIP,
|
48
|
-
product_groups = SKIP)
|
45
|
+
def initialize(products = SKIP, product_groups = SKIP)
|
49
46
|
@products = products unless products == SKIP
|
50
47
|
@product_groups = product_groups unless product_groups == SKIP
|
51
48
|
end
|
@@ -59,8 +56,8 @@ module ShellCardManagementApIs
|
|
59
56
|
product_groups = hash.key?('ProductGroups') ? hash['ProductGroups'] : SKIP
|
60
57
|
|
61
58
|
# Create object from extracted values.
|
62
|
-
|
63
|
-
|
59
|
+
ProductRestrictionCard.new(products,
|
60
|
+
product_groups)
|
64
61
|
end
|
65
62
|
end
|
66
63
|
end
|
@@ -80,10 +80,7 @@ module ShellCardManagementApIs
|
|
80
80
|
[]
|
81
81
|
end
|
82
82
|
|
83
|
-
def initialize(id = SKIP,
|
84
|
-
code = SKIP,
|
85
|
-
name = SKIP,
|
86
|
-
is_visible = SKIP,
|
83
|
+
def initialize(id = SKIP, code = SKIP, name = SKIP, is_visible = SKIP,
|
87
84
|
product_groups = SKIP)
|
88
85
|
@id = id unless id == SKIP
|
89
86
|
@code = code unless code == SKIP
|
@@ -89,13 +89,8 @@ module ShellCardManagementApIs
|
|
89
89
|
]
|
90
90
|
end
|
91
91
|
|
92
|
-
def initialize(id = nil,
|
93
|
-
|
94
|
-
name = nil,
|
95
|
-
is_visible = nil,
|
96
|
-
product_groups = nil,
|
97
|
-
title = SKIP,
|
98
|
-
description = SKIP)
|
92
|
+
def initialize(id = nil, code = nil, name = nil, is_visible = nil,
|
93
|
+
product_groups = nil, title = SKIP, description = SKIP)
|
99
94
|
@id = id
|
100
95
|
@code = code
|
101
96
|
@name = name
|
@@ -75,11 +75,8 @@ module ShellCardManagementApIs
|
|
75
75
|
]
|
76
76
|
end
|
77
77
|
|
78
|
-
def initialize(request_id = SKIP,
|
79
|
-
|
80
|
-
col_co_id = SKIP,
|
81
|
-
card_type_id = SKIP,
|
82
|
-
purchase_category_id = SKIP,
|
78
|
+
def initialize(request_id = SKIP, col_co_code = SKIP, col_co_id = SKIP,
|
79
|
+
card_type_id = SKIP, purchase_category_id = SKIP,
|
83
80
|
language_code = SKIP)
|
84
81
|
@request_id = request_id unless request_id == SKIP
|
85
82
|
@col_co_code = col_co_code unless col_co_code == SKIP
|
@@ -38,8 +38,7 @@ module ShellCardManagementApIs
|
|
38
38
|
[]
|
39
39
|
end
|
40
40
|
|
41
|
-
def initialize(purchase_categories = SKIP,
|
42
|
-
error = SKIP)
|
41
|
+
def initialize(purchase_categories = SKIP, error = SKIP)
|
43
42
|
@purchase_categories = purchase_categories unless purchase_categories == SKIP
|
44
43
|
@error = error unless error == SKIP
|
45
44
|
end
|
@@ -410,44 +410,29 @@ module ShellCardManagementApIs
|
|
410
410
|
]
|
411
411
|
end
|
412
412
|
|
413
|
-
def initialize(card_delivery_type = nil,
|
414
|
-
self_selected_encrypted_pin = SKIP,
|
413
|
+
def initialize(card_delivery_type = nil, self_selected_encrypted_pin = SKIP,
|
415
414
|
self_selected_pin_key_id = SKIP,
|
416
415
|
self_selected_pin_session_key = SKIP,
|
417
|
-
validate_fleet_id = SKIP,
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
delivery_city = SKIP,
|
427
|
-
delivery_region_id = SKIP,
|
428
|
-
delivery_region = SKIP,
|
429
|
-
delivery_country = SKIP,
|
430
|
-
delivery_country_id = SKIP,
|
431
|
-
phone_number = SKIP,
|
432
|
-
email_address = SKIP,
|
433
|
-
pin_delivery_address_type = SKIP,
|
434
|
-
pin_advice_type = SKIP,
|
416
|
+
validate_fleet_id = SKIP, card_group_id = SKIP,
|
417
|
+
delivery_contact_title = SKIP, delivery_contact_name = SKIP,
|
418
|
+
delivery_company_name = SKIP, delivery_address_line1 = SKIP,
|
419
|
+
delivery_address_line2 = SKIP, delivery_address_line3 = SKIP,
|
420
|
+
delivery_zip_code = SKIP, delivery_city = SKIP,
|
421
|
+
delivery_region_id = SKIP, delivery_region = SKIP,
|
422
|
+
delivery_country = SKIP, delivery_country_id = SKIP,
|
423
|
+
phone_number = SKIP, email_address = SKIP,
|
424
|
+
pin_delivery_address_type = SKIP, pin_advice_type = SKIP,
|
435
425
|
pin_delivery_contact_title = SKIP,
|
436
426
|
pin_delivery_contact_name = SKIP,
|
437
427
|
pin_delivery_company_name = SKIP,
|
438
428
|
pin_delivery_address_line1 = SKIP,
|
439
429
|
pin_delivery_address_line2 = SKIP,
|
440
430
|
pin_delivery_address_line3 = SKIP,
|
441
|
-
pin_delivery_zip_code = SKIP,
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
pin_delivery_country_id = SKIP,
|
447
|
-
pin_phone_number = SKIP,
|
448
|
-
pin_email_address = SKIP,
|
449
|
-
save_for_pin_reminder = SKIP,
|
450
|
-
save_for_card_reissue = SKIP,
|
431
|
+
pin_delivery_zip_code = SKIP, pin_delivery_city = SKIP,
|
432
|
+
pin_delivery_region_id = SKIP, pin_delivery_region = SKIP,
|
433
|
+
pin_delivery_country = SKIP, pin_delivery_country_id = SKIP,
|
434
|
+
pin_phone_number = SKIP, pin_email_address = SKIP,
|
435
|
+
save_for_pin_reminder = SKIP, save_for_card_reissue = SKIP,
|
451
436
|
expiry_date = SKIP)
|
452
437
|
unless self_selected_encrypted_pin == SKIP
|
453
438
|
@self_selected_encrypted_pin =
|
@@ -0,0 +1,88 @@
|
|
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
|
+
# Restriction Model.
|
8
|
+
class Restriction < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Details of the usage restrictions such as day/week/month value and volume
|
13
|
+
# restrictions applied on the card.
|
14
|
+
# @return [UsageRestriction]
|
15
|
+
attr_accessor :usage_restrictions
|
16
|
+
|
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]
|
20
|
+
attr_accessor :day_time_restrictions
|
21
|
+
|
22
|
+
# Details of the day/time restrictions such as weekdays and time range in
|
23
|
+
# which transactions should be allowed on the card.
|
24
|
+
# @return [SearchProductRestriction]
|
25
|
+
attr_accessor :product_restrictions
|
26
|
+
|
27
|
+
# Details of the day/time restrictions such as weekdays and time range in
|
28
|
+
# which transactions should be allowed on the card.
|
29
|
+
# @return [LocationRestriction]
|
30
|
+
attr_accessor :location_restrictions
|
31
|
+
|
32
|
+
# A mapping from model property names to API property names.
|
33
|
+
def self.names
|
34
|
+
@_hash = {} if @_hash.nil?
|
35
|
+
@_hash['usage_restrictions'] = 'UsageRestrictions'
|
36
|
+
@_hash['day_time_restrictions'] = 'DayTimeRestrictions'
|
37
|
+
@_hash['product_restrictions'] = 'ProductRestrictions'
|
38
|
+
@_hash['location_restrictions'] = 'LocationRestrictions'
|
39
|
+
@_hash
|
40
|
+
end
|
41
|
+
|
42
|
+
# An array for optional fields
|
43
|
+
def self.optionals
|
44
|
+
%w[
|
45
|
+
usage_restrictions
|
46
|
+
day_time_restrictions
|
47
|
+
product_restrictions
|
48
|
+
location_restrictions
|
49
|
+
]
|
50
|
+
end
|
51
|
+
|
52
|
+
# An array for nullable fields
|
53
|
+
def self.nullables
|
54
|
+
%w[
|
55
|
+
usage_restrictions
|
56
|
+
]
|
57
|
+
end
|
58
|
+
|
59
|
+
def initialize(usage_restrictions = SKIP, day_time_restrictions = SKIP,
|
60
|
+
product_restrictions = SKIP, location_restrictions = SKIP)
|
61
|
+
@usage_restrictions = usage_restrictions unless usage_restrictions == SKIP
|
62
|
+
@day_time_restrictions = day_time_restrictions unless day_time_restrictions == SKIP
|
63
|
+
@product_restrictions = product_restrictions unless product_restrictions == SKIP
|
64
|
+
@location_restrictions = location_restrictions unless location_restrictions == SKIP
|
65
|
+
end
|
66
|
+
|
67
|
+
# Creates an instance of the object from a hash.
|
68
|
+
def self.from_hash(hash)
|
69
|
+
return nil unless hash
|
70
|
+
|
71
|
+
# 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
|
75
|
+
hash['DayTimeRestrictions']
|
76
|
+
product_restrictions = SearchProductRestriction.from_hash(hash['ProductRestrictions']) if
|
77
|
+
hash['ProductRestrictions']
|
78
|
+
location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if
|
79
|
+
hash['LocationRestrictions']
|
80
|
+
|
81
|
+
# Create object from extracted values.
|
82
|
+
Restriction.new(usage_restrictions,
|
83
|
+
day_time_restrictions,
|
84
|
+
product_restrictions,
|
85
|
+
location_restrictions)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|