card-management-sdk 1.0.0 → 1.2.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 +27 -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/base_controller.rb +9 -9
- data/lib/shell_card_management_ap_is/controllers/card_controller.rb +434 -434
- data/lib/shell_card_management_ap_is/controllers/customer_controller.rb +261 -262
- data/lib/shell_card_management_ap_is/controllers/o_auth_authorization_controller.rb +11 -11
- data/lib/shell_card_management_ap_is/controllers/restriction_controller.rb +421 -291
- data/lib/shell_card_management_ap_is/exceptions/error_object_exception.rb +15 -15
- data/lib/shell_card_management_ap_is/exceptions/{error_user_access_error1_exception.rb → fleetmanagement_v1_customer_customer403_error_exception.rb} +17 -17
- data/lib/shell_card_management_ap_is/exceptions/{default_error_exception.rb → fleetmanagement_v1_customer_payers400_error_exception.rb} +20 -20
- 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/exceptions/o_auth_provider_exception.rb +15 -15
- 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 +17 -26
- 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 +29 -53
- data/lib/shell_card_management_ap_is/models/account_restriction_request.rb +28 -10
- 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 +37 -33
- 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 +50 -63
- 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 +13 -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 +13 -3
- 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 +86 -103
- data/lib/shell_card_management_ap_is/models/bundle_restriction_update.rb +185 -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 +82 -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 +43 -51
- 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 +50 -61
- 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 +52 -89
- 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 +6 -12
- 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 +64 -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 +31 -45
- data/lib/shell_card_management_ap_is/models/day_time_restriction.rb +133 -0
- data/lib/shell_card_management_ap_is/models/day_time_restrictions.rb +52 -82
- 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/detail.rb +50 -0
- 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 +200 -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/{restriction_search_card_request.rb → fleetmanagement_v1_customer_payers400_error1.rb} +10 -10
- 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_v1_user_loggedinuser_request.rb +104 -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/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 +12 -25
- 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 +48 -45
- data/lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb +5 -12
- 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 +55 -96
- data/lib/shell_card_management_ap_is/models/payer_request.rb +9 -12
- 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 +5 -6
- 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 +19 -17
- 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 +10 -15
- 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 +25 -40
- data/lib/shell_card_management_ap_is/models/restriction.rb +82 -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} +69 -82
- 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 +42 -39
- 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 +13 -3
- 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 +25 -47
- 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 +24 -9
- data/lib/shell_card_management_ap_is/models/summary_request.rb +21 -39
- 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 +65 -70
- 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 +31 -20
- data/lib/shell_card_management_ap_is/models/update_card_group_request.rb +9 -17
- 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 +5 -11
- 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 +3 -5
- 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/utilities/file_wrapper.rb +9 -9
- data/lib/shell_card_management_ap_is.rb +139 -95
- metadata +74 -38
- 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/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
@@ -0,0 +1,104 @@
|
|
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
|
+
# CardManagementV1CancelRequest Model.
|
8
|
+
class CardManagementV1CancelRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# List of CancelCardRequest entity.
|
13
|
+
# Each card in the list will be Cancelled.
|
14
|
+
# The details of the entity are given below.
|
15
|
+
# @return [Array[UpdateCard]]
|
16
|
+
attr_accessor :cards
|
17
|
+
|
18
|
+
# Reason id for cancelling the card.<br />
|
19
|
+
# Optional if ReasonText is passed, else mandatory<br />
|
20
|
+
# When passed, the reason Id will be validated with the allowed reason id’s
|
21
|
+
# configured for the card type of the card.<br />
|
22
|
+
# If the reason Id is not allowed, then it will be included on the error
|
23
|
+
# cards response.
|
24
|
+
# Possible values:
|
25
|
+
# 1 (Lost)
|
26
|
+
# 2 (Stolen)
|
27
|
+
# 3 (Card no longer required)
|
28
|
+
# @return [Integer]
|
29
|
+
attr_accessor :reason_id
|
30
|
+
|
31
|
+
# Reason text for cancelling the card.<br />
|
32
|
+
# Optional if ReasonId is passed, else mandatory<br />
|
33
|
+
# When Reason Id is not known to the client, the reason text can be
|
34
|
+
# passed.<br />
|
35
|
+
# When Reason Text is passed and the Target Status is either Block or
|
36
|
+
# Damaged, the text will be validated with the allowed list of values
|
37
|
+
# configured for the card type of the card.
|
38
|
+
# If the text is not allowed, then it will be included on the error cards
|
39
|
+
# response.
|
40
|
+
# However, if the Target status is Temporary block or Unblock then the text
|
41
|
+
# will be submitted
|
42
|
+
# Possible Values:
|
43
|
+
# 1) Lost
|
44
|
+
# 2) Stolen
|
45
|
+
# 3) Card no longer required
|
46
|
+
# @return [String]
|
47
|
+
attr_accessor :reason_text
|
48
|
+
|
49
|
+
# A mapping from model property names to API property names.
|
50
|
+
def self.names
|
51
|
+
@_hash = {} if @_hash.nil?
|
52
|
+
@_hash['cards'] = 'Cards'
|
53
|
+
@_hash['reason_id'] = 'ReasonId'
|
54
|
+
@_hash['reason_text'] = 'ReasonText'
|
55
|
+
@_hash
|
56
|
+
end
|
57
|
+
|
58
|
+
# An array for optional fields
|
59
|
+
def self.optionals
|
60
|
+
%w[
|
61
|
+
reason_id
|
62
|
+
reason_text
|
63
|
+
]
|
64
|
+
end
|
65
|
+
|
66
|
+
# An array for nullable fields
|
67
|
+
def self.nullables
|
68
|
+
%w[
|
69
|
+
reason_id
|
70
|
+
reason_text
|
71
|
+
]
|
72
|
+
end
|
73
|
+
|
74
|
+
def initialize(cards = nil, reason_id = SKIP, reason_text = SKIP)
|
75
|
+
@cards = cards
|
76
|
+
@reason_id = reason_id unless reason_id == SKIP
|
77
|
+
@reason_text = reason_text unless reason_text == SKIP
|
78
|
+
end
|
79
|
+
|
80
|
+
# Creates an instance of the object from a hash.
|
81
|
+
def self.from_hash(hash)
|
82
|
+
return nil unless hash
|
83
|
+
|
84
|
+
# Extract variables from the hash.
|
85
|
+
# Parameter is an array, so we need to iterate through it
|
86
|
+
cards = nil
|
87
|
+
unless hash['Cards'].nil?
|
88
|
+
cards = []
|
89
|
+
hash['Cards'].each do |structure|
|
90
|
+
cards << (UpdateCard.from_hash(structure) if structure)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
cards = nil unless hash.key?('Cards')
|
95
|
+
reason_id = hash.key?('ReasonId') ? hash['ReasonId'] : SKIP
|
96
|
+
reason_text = hash.key?('ReasonText') ? hash['ReasonText'] : SKIP
|
97
|
+
|
98
|
+
# Create object from extracted values.
|
99
|
+
CardManagementV1CancelRequest.new(cards,
|
100
|
+
reason_id,
|
101
|
+
reason_text)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,59 @@
|
|
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
|
+
# CardManagementV1OrdercardRequest Model.
|
8
|
+
class CardManagementV1OrdercardRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# List of CardOrder entity. The fields in this entity are described below.
|
13
|
+
# @return [Array[CardDetail]]
|
14
|
+
attr_accessor :card_details
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['card_details'] = 'CardDetails'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
# An array for optional fields
|
24
|
+
def self.optionals
|
25
|
+
%w[
|
26
|
+
card_details
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
# An array for nullable fields
|
31
|
+
def self.nullables
|
32
|
+
[]
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(card_details = SKIP)
|
36
|
+
@card_details = card_details unless card_details == 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
|
+
# Parameter is an array, so we need to iterate through it
|
45
|
+
card_details = nil
|
46
|
+
unless hash['CardDetails'].nil?
|
47
|
+
card_details = []
|
48
|
+
hash['CardDetails'].each do |structure|
|
49
|
+
card_details << (CardDetail.from_hash(structure) if structure)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
card_details = SKIP unless hash.key?('CardDetails')
|
54
|
+
|
55
|
+
# Create object from extracted values.
|
56
|
+
CardManagementV1OrdercardRequest.new(card_details)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,130 @@
|
|
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
|
+
# CardManagementV1PinreminderRequest Model.
|
8
|
+
class CardManagementV1PinreminderRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Account Id of the customer.<br />
|
13
|
+
# Optional if AccountNumber is passed, else Mandatory.<br />
|
14
|
+
# This input is a search criterion, if given.
|
15
|
+
# @return [Integer]
|
16
|
+
attr_accessor :account_id
|
17
|
+
|
18
|
+
# Account Number of the customer.<br />
|
19
|
+
# Optional if AccountId is passed, else Mandatory.<br />
|
20
|
+
# This input is a search criterion, if given.
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :account_number
|
23
|
+
|
24
|
+
# Collecting Company Code (Shell Code) of the selected payer. <br />
|
25
|
+
# Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
|
26
|
+
# Ukraine etc. <br />
|
27
|
+
# It is optional for other countries if ColCoID is provided.
|
28
|
+
# @return [Integer]
|
29
|
+
attr_accessor :col_co_code
|
30
|
+
|
31
|
+
# Collecting Company Id of the selected payer<br />
|
32
|
+
# Optional if ColCoCode is passed else Mandatory.
|
33
|
+
# @return [Integer]
|
34
|
+
attr_accessor :col_co_id
|
35
|
+
|
36
|
+
# Payer Id (i.e. Customer Id of the Payment Customer of the selected
|
37
|
+
# payer.<br />
|
38
|
+
# Optional if PayerNumber is passed else Mandatory
|
39
|
+
# @return [Integer]
|
40
|
+
attr_accessor :payer_id
|
41
|
+
|
42
|
+
# Payer Number (Ex: GB000000123) of the selected payer.<br />
|
43
|
+
# Optional if PayerId is passed else Mandatory
|
44
|
+
# @return [String]
|
45
|
+
attr_accessor :payer_number
|
46
|
+
|
47
|
+
# List of PINReminderCardDetails entity. The fields of this entity are
|
48
|
+
# described below.
|
49
|
+
# @return [Array[PINReminderCardDetails]]
|
50
|
+
attr_accessor :pin_reminder_card_details
|
51
|
+
|
52
|
+
# A mapping from model property names to API property names.
|
53
|
+
def self.names
|
54
|
+
@_hash = {} if @_hash.nil?
|
55
|
+
@_hash['account_id'] = 'AccountId'
|
56
|
+
@_hash['account_number'] = 'AccountNumber'
|
57
|
+
@_hash['col_co_code'] = 'ColCoCode'
|
58
|
+
@_hash['col_co_id'] = 'ColCoId'
|
59
|
+
@_hash['payer_id'] = 'PayerId'
|
60
|
+
@_hash['payer_number'] = 'PayerNumber'
|
61
|
+
@_hash['pin_reminder_card_details'] = 'PINReminderCardDetails'
|
62
|
+
@_hash
|
63
|
+
end
|
64
|
+
|
65
|
+
# An array for optional fields
|
66
|
+
def self.optionals
|
67
|
+
%w[
|
68
|
+
account_id
|
69
|
+
account_number
|
70
|
+
col_co_code
|
71
|
+
col_co_id
|
72
|
+
payer_id
|
73
|
+
payer_number
|
74
|
+
pin_reminder_card_details
|
75
|
+
]
|
76
|
+
end
|
77
|
+
|
78
|
+
# An array for nullable fields
|
79
|
+
def self.nullables
|
80
|
+
[]
|
81
|
+
end
|
82
|
+
|
83
|
+
def initialize(account_id = SKIP, account_number = SKIP, col_co_code = SKIP,
|
84
|
+
col_co_id = SKIP, payer_id = SKIP, payer_number = SKIP,
|
85
|
+
pin_reminder_card_details = SKIP)
|
86
|
+
@account_id = account_id unless account_id == SKIP
|
87
|
+
@account_number = account_number unless account_number == SKIP
|
88
|
+
@col_co_code = col_co_code unless col_co_code == SKIP
|
89
|
+
@col_co_id = col_co_id unless col_co_id == SKIP
|
90
|
+
@payer_id = payer_id unless payer_id == SKIP
|
91
|
+
@payer_number = payer_number unless payer_number == SKIP
|
92
|
+
unless pin_reminder_card_details == SKIP
|
93
|
+
@pin_reminder_card_details =
|
94
|
+
pin_reminder_card_details
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Creates an instance of the object from a hash.
|
99
|
+
def self.from_hash(hash)
|
100
|
+
return nil unless hash
|
101
|
+
|
102
|
+
# Extract variables from the hash.
|
103
|
+
account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
|
104
|
+
account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
|
105
|
+
col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
|
106
|
+
col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
|
107
|
+
payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
|
108
|
+
payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
|
109
|
+
# Parameter is an array, so we need to iterate through it
|
110
|
+
pin_reminder_card_details = nil
|
111
|
+
unless hash['PINReminderCardDetails'].nil?
|
112
|
+
pin_reminder_card_details = []
|
113
|
+
hash['PINReminderCardDetails'].each do |structure|
|
114
|
+
pin_reminder_card_details << (PINReminderCardDetails.from_hash(structure) if structure)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
pin_reminder_card_details = SKIP unless hash.key?('PINReminderCardDetails')
|
119
|
+
|
120
|
+
# Create object from extracted values.
|
121
|
+
CardManagementV1PinreminderRequest.new(account_id,
|
122
|
+
account_number,
|
123
|
+
col_co_code,
|
124
|
+
col_co_id,
|
125
|
+
payer_id,
|
126
|
+
payer_number,
|
127
|
+
pin_reminder_card_details)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
@@ -0,0 +1,122 @@
|
|
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
|
+
# CardManagementV1UpdatestatusRequest Model.
|
8
|
+
class CardManagementV1UpdatestatusRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# List of UpdateCardRequest entity. Each card in the list will be updated to
|
13
|
+
# the given target status. The details of the entity are given below.
|
14
|
+
# @return [Array[UpdateCard]]
|
15
|
+
attr_accessor :cards
|
16
|
+
|
17
|
+
# Reason id for updating the card status.<br />
|
18
|
+
# Optional<br />
|
19
|
+
# Either Reason ID or Text is madatory when TargetStatus is ‘Block’ or
|
20
|
+
# ‘Damaged’. Else ignored.<br />
|
21
|
+
# Possible values:<br />
|
22
|
+
# -Lost <br />
|
23
|
+
# -Stolen <br />
|
24
|
+
# -Card no longer required<br />
|
25
|
+
# When passed, the reason Id will be validated with the allowed reason ids
|
26
|
+
# configured for the card type of the card.<br />
|
27
|
+
# . If the given reason Id is not allowed for certain card types, then the
|
28
|
+
# request will be rejected as invalid ResonId.
|
29
|
+
# @return [Integer]
|
30
|
+
attr_accessor :reason_id
|
31
|
+
|
32
|
+
# Reason text for updating the card status.<br />
|
33
|
+
# Optional Either Reason ID or Text is madatory when TargetStatus is ‘Block’
|
34
|
+
# or ‘Damaged’. Else ignored.<br />
|
35
|
+
# Possible values:<br />
|
36
|
+
# -Lost <br />
|
37
|
+
# -Stolen <br />
|
38
|
+
# -Card no longer required <br />
|
39
|
+
# Optional – However, either Reason ID or Text is madatory when
|
40
|
+
# TargetStatus is ‘Block’ or ‘Damaged’.<br />
|
41
|
+
# When Reason Text is passed and the Target Status is either Block or
|
42
|
+
# Damaged, the text will be validated with the allowed list of values
|
43
|
+
# configured for the card type of the card.<br />
|
44
|
+
# If the text is not allowed, request will be rejected as invaid
|
45
|
+
# ResonText.<br />
|
46
|
+
# Note:<br />
|
47
|
+
# Customer blocked’ will be used as the reason for ‘Temporary Block’.
|
48
|
+
# @return [String]
|
49
|
+
attr_accessor :reason_text
|
50
|
+
|
51
|
+
# The list of cards passed in Cards parameter will be updated to this
|
52
|
+
# status.<br />
|
53
|
+
# Mandatory<br />
|
54
|
+
# Allowed values:<br />
|
55
|
+
# -TemporaryBlock<br />
|
56
|
+
# -Unblock<br />
|
57
|
+
# -Block<br />
|
58
|
+
# -Damaged<br />
|
59
|
+
# @return [String]
|
60
|
+
attr_accessor :target_status
|
61
|
+
|
62
|
+
# A mapping from model property names to API property names.
|
63
|
+
def self.names
|
64
|
+
@_hash = {} if @_hash.nil?
|
65
|
+
@_hash['cards'] = 'Cards'
|
66
|
+
@_hash['reason_id'] = 'ReasonId'
|
67
|
+
@_hash['reason_text'] = 'ReasonText'
|
68
|
+
@_hash['target_status'] = 'TargetStatus'
|
69
|
+
@_hash
|
70
|
+
end
|
71
|
+
|
72
|
+
# An array for optional fields
|
73
|
+
def self.optionals
|
74
|
+
%w[
|
75
|
+
reason_id
|
76
|
+
reason_text
|
77
|
+
]
|
78
|
+
end
|
79
|
+
|
80
|
+
# An array for nullable fields
|
81
|
+
def self.nullables
|
82
|
+
%w[
|
83
|
+
reason_id
|
84
|
+
reason_text
|
85
|
+
]
|
86
|
+
end
|
87
|
+
|
88
|
+
def initialize(cards = nil, target_status = nil, reason_id = SKIP,
|
89
|
+
reason_text = SKIP)
|
90
|
+
@cards = cards
|
91
|
+
@reason_id = reason_id unless reason_id == SKIP
|
92
|
+
@reason_text = reason_text unless reason_text == SKIP
|
93
|
+
@target_status = target_status
|
94
|
+
end
|
95
|
+
|
96
|
+
# Creates an instance of the object from a hash.
|
97
|
+
def self.from_hash(hash)
|
98
|
+
return nil unless hash
|
99
|
+
|
100
|
+
# Extract variables from the hash.
|
101
|
+
# Parameter is an array, so we need to iterate through it
|
102
|
+
cards = nil
|
103
|
+
unless hash['Cards'].nil?
|
104
|
+
cards = []
|
105
|
+
hash['Cards'].each do |structure|
|
106
|
+
cards << (UpdateCard.from_hash(structure) if structure)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
cards = nil unless hash.key?('Cards')
|
111
|
+
target_status = hash.key?('TargetStatus') ? hash['TargetStatus'] : nil
|
112
|
+
reason_id = hash.key?('ReasonId') ? hash['ReasonId'] : SKIP
|
113
|
+
reason_text = hash.key?('ReasonText') ? hash['ReasonText'] : SKIP
|
114
|
+
|
115
|
+
# Create object from extracted values.
|
116
|
+
CardManagementV1UpdatestatusRequest.new(cards,
|
117
|
+
target_status,
|
118
|
+
reason_id,
|
119
|
+
reason_text)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
@@ -92,15 +92,10 @@ module ShellCardManagementApIs
|
|
92
92
|
]
|
93
93
|
end
|
94
94
|
|
95
|
-
def initialize(col_co_code = SKIP,
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
payer_id = SKIP,
|
100
|
-
cards = SKIP,
|
101
|
-
target_account_id = SKIP,
|
102
|
-
target_account_number = SKIP,
|
103
|
-
target_card_group_id = SKIP,
|
95
|
+
def initialize(col_co_code = SKIP, col_co_id = SKIP,
|
96
|
+
col_co_country_code = SKIP, payer_number = SKIP,
|
97
|
+
payer_id = SKIP, cards = SKIP, target_account_id = SKIP,
|
98
|
+
target_account_number = SKIP, target_card_group_id = SKIP,
|
104
99
|
target_new_card_group_name = SKIP)
|
105
100
|
@col_co_code = col_co_code unless col_co_code == SKIP
|
106
101
|
@col_co_id = col_co_id unless col_co_id == SKIP
|
@@ -50,9 +50,7 @@ module ShellCardManagementApIs
|
|
50
50
|
[]
|
51
51
|
end
|
52
52
|
|
53
|
-
def initialize(account_number = SKIP,
|
54
|
-
account_id = SKIP,
|
55
|
-
pan = SKIP,
|
53
|
+
def initialize(account_number = SKIP, account_id = SKIP, pan = SKIP,
|
56
54
|
card_id = SKIP)
|
57
55
|
@account_number = account_number unless account_number == SKIP
|
58
56
|
@account_id = account_id unless account_id == SKIP
|
@@ -57,10 +57,8 @@ module ShellCardManagementApIs
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def initialize(move_card_request_reference = SKIP,
|
60
|
-
successful_requests = SKIP,
|
61
|
-
|
62
|
-
request_id = SKIP,
|
63
|
-
error = SKIP)
|
60
|
+
successful_requests = SKIP, error_cards = SKIP,
|
61
|
+
request_id = SKIP, error = SKIP)
|
64
62
|
unless move_card_request_reference == SKIP
|
65
63
|
@move_card_request_reference =
|
66
64
|
move_card_request_reference
|
@@ -69,11 +69,8 @@ module ShellCardManagementApIs
|
|
69
69
|
]
|
70
70
|
end
|
71
71
|
|
72
|
-
def initialize(account_number = SKIP,
|
73
|
-
|
74
|
-
pan = SKIP,
|
75
|
-
card_id = SKIP,
|
76
|
-
validation_error_code = SKIP,
|
72
|
+
def initialize(account_number = SKIP, account_id = SKIP, pan = SKIP,
|
73
|
+
card_id = SKIP, validation_error_code = SKIP,
|
77
74
|
validation_error_description = SKIP)
|
78
75
|
@account_number = account_number unless account_number == SKIP
|
79
76
|
@account_id = account_id unless account_id == SKIP
|
@@ -62,11 +62,8 @@ module ShellCardManagementApIs
|
|
62
62
|
]
|
63
63
|
end
|
64
64
|
|
65
|
-
def initialize(account_number = SKIP,
|
66
|
-
|
67
|
-
pan = SKIP,
|
68
|
-
card_id = SKIP,
|
69
|
-
move_card_reference = SKIP)
|
65
|
+
def initialize(account_number = SKIP, account_id = SKIP, pan = SKIP,
|
66
|
+
card_id = SKIP, move_card_reference = SKIP)
|
70
67
|
@account_number = account_number unless account_number == SKIP
|
71
68
|
@account_id = account_id unless account_id == SKIP
|
72
69
|
@pan = pan unless pan == SKIP
|
data/lib/shell_card_management_ap_is/models/{restriction_card_request.rb → card_restriction_req.rb}
RENAMED
@@ -4,8 +4,8 @@
|
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
6
|
module ShellCardManagementApIs
|
7
|
-
#
|
8
|
-
class
|
7
|
+
# CardRestrictionReq Model.
|
8
|
+
class CardRestrictionReq < BaseModel
|
9
9
|
SKIP = Object.new
|
10
10
|
private_constant :SKIP
|
11
11
|
|
@@ -17,13 +17,14 @@ module ShellCardManagementApIs
|
|
17
17
|
# @return [Integer]
|
18
18
|
attr_accessor :col_co_id
|
19
19
|
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
|
20
|
+
# Collecting Company Code of the selected payer.
|
21
|
+
# Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
|
22
|
+
# Ukraine etc. It is optional for other countries if ColCoID is provided.
|
23
|
+
# Example:
|
24
|
+
# 86 for Philippines
|
25
|
+
# 5 for UK
|
26
|
+
# @return [Integer]
|
27
|
+
attr_accessor :col_co_code
|
27
28
|
|
28
29
|
# Payer Id of the selected payer.
|
29
30
|
# Optional if PayerNumber is passed else Mandatory
|
@@ -31,28 +32,26 @@ module ShellCardManagementApIs
|
|
31
32
|
# @return [Integer]
|
32
33
|
attr_accessor :payer_id
|
33
34
|
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
|
35
|
+
# Payer Number of the selected payer.
|
36
|
+
# Optional if PayerId is passed else Mandatory
|
37
|
+
# Example: GB000000123
|
38
|
+
# @return [String]
|
39
|
+
attr_accessor :payer_number
|
38
40
|
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
|
44
|
-
# 5 for UK
|
45
|
-
# @return [Integer]
|
46
|
-
attr_accessor :col_co_code
|
41
|
+
# Payer Number of the selected payer.
|
42
|
+
# Optional if PayerId is passed else Mandatory
|
43
|
+
# Example: GB000000123
|
44
|
+
# @return [RestrictionCardsList]
|
45
|
+
attr_accessor :cards
|
47
46
|
|
48
47
|
# A mapping from model property names to API property names.
|
49
48
|
def self.names
|
50
49
|
@_hash = {} if @_hash.nil?
|
51
50
|
@_hash['col_co_id'] = 'ColCoId'
|
52
|
-
@_hash['
|
51
|
+
@_hash['col_co_code'] = 'ColCoCode'
|
53
52
|
@_hash['payer_id'] = 'PayerId'
|
53
|
+
@_hash['payer_number'] = 'PayerNumber'
|
54
54
|
@_hash['cards'] = 'Cards'
|
55
|
-
@_hash['col_co_code'] = 'ColCoCode'
|
56
55
|
@_hash
|
57
56
|
end
|
58
57
|
|
@@ -60,28 +59,30 @@ module ShellCardManagementApIs
|
|
60
59
|
def self.optionals
|
61
60
|
%w[
|
62
61
|
col_co_id
|
63
|
-
|
62
|
+
col_co_code
|
64
63
|
payer_id
|
64
|
+
payer_number
|
65
65
|
cards
|
66
|
-
col_co_code
|
67
66
|
]
|
68
67
|
end
|
69
68
|
|
70
69
|
# An array for nullable fields
|
71
70
|
def self.nullables
|
72
|
-
[
|
71
|
+
%w[
|
72
|
+
col_co_id
|
73
|
+
col_co_code
|
74
|
+
payer_id
|
75
|
+
payer_number
|
76
|
+
]
|
73
77
|
end
|
74
78
|
|
75
|
-
def initialize(col_co_id = SKIP,
|
76
|
-
payer_number = SKIP,
|
77
|
-
payer_id = SKIP,
|
78
|
-
cards = SKIP,
|
79
|
-
col_co_code = SKIP)
|
79
|
+
def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
|
80
|
+
payer_number = SKIP, cards = SKIP)
|
80
81
|
@col_co_id = col_co_id unless col_co_id == SKIP
|
81
|
-
@
|
82
|
+
@col_co_code = col_co_code unless col_co_code == SKIP
|
82
83
|
@payer_id = payer_id unless payer_id == SKIP
|
84
|
+
@payer_number = payer_number unless payer_number == SKIP
|
83
85
|
@cards = cards unless cards == SKIP
|
84
|
-
@col_co_code = col_co_code unless col_co_code == SKIP
|
85
86
|
end
|
86
87
|
|
87
88
|
# Creates an instance of the object from a hash.
|
@@ -90,26 +91,17 @@ module ShellCardManagementApIs
|
|
90
91
|
|
91
92
|
# Extract variables from the hash.
|
92
93
|
col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
|
93
|
-
payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
|
94
|
-
payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
|
95
|
-
# Parameter is an array, so we need to iterate through it
|
96
|
-
cards = nil
|
97
|
-
unless hash['Cards'].nil?
|
98
|
-
cards = []
|
99
|
-
hash['Cards'].each do |structure|
|
100
|
-
cards << (RestrictionCardRequestCardsItems.from_hash(structure) if structure)
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
cards = SKIP unless hash.key?('Cards')
|
105
94
|
col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
|
95
|
+
payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
|
96
|
+
payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
|
97
|
+
cards = RestrictionCardsList.from_hash(hash['Cards']) if hash['Cards']
|
106
98
|
|
107
99
|
# Create object from extracted values.
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
100
|
+
CardRestrictionReq.new(col_co_id,
|
101
|
+
col_co_code,
|
102
|
+
payer_id,
|
103
|
+
payer_number,
|
104
|
+
cards)
|
113
105
|
end
|
114
106
|
end
|
115
107
|
end
|