card-management-sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +88 -0
- data/lib/shell_card_management_ap_is/api_helper.rb +10 -0
- data/lib/shell_card_management_ap_is/client.rb +85 -0
- data/lib/shell_card_management_ap_is/configuration.rb +117 -0
- data/lib/shell_card_management_ap_is/controllers/base_controller.rb +66 -0
- data/lib/shell_card_management_ap_is/controllers/card_controller.rb +1047 -0
- data/lib/shell_card_management_ap_is/controllers/customer_controller.rb +538 -0
- data/lib/shell_card_management_ap_is/controllers/o_auth_authorization_controller.rb +42 -0
- data/lib/shell_card_management_ap_is/controllers/restriction_controller.rb +496 -0
- data/lib/shell_card_management_ap_is/exceptions/api_exception.rb +10 -0
- data/lib/shell_card_management_ap_is/exceptions/default_error_exception.rb +32 -0
- data/lib/shell_card_management_ap_is/exceptions/error_object_exception.rb +54 -0
- data/lib/shell_card_management_ap_is/exceptions/error_user_access_error1_exception.rb +32 -0
- data/lib/shell_card_management_ap_is/exceptions/o_auth_provider_exception.rb +48 -0
- data/lib/shell_card_management_ap_is/http/auth/basic_auth.rb +50 -0
- data/lib/shell_card_management_ap_is/http/auth/bearer_token.rb +89 -0
- data/lib/shell_card_management_ap_is/http/http_call_back.rb +10 -0
- data/lib/shell_card_management_ap_is/http/http_method_enum.rb +10 -0
- data/lib/shell_card_management_ap_is/http/http_request.rb +10 -0
- data/lib/shell_card_management_ap_is/http/http_response.rb +10 -0
- data/lib/shell_card_management_ap_is/models/account_access.rb +128 -0
- data/lib/shell_card_management_ap_is/models/account_request.rb +252 -0
- data/lib/shell_card_management_ap_is/models/account_response.rb +111 -0
- data/lib/shell_card_management_ap_is/models/account_response_accounts_items.rb +750 -0
- data/lib/shell_card_management_ap_is/models/account_restriction_request.rb +131 -0
- data/lib/shell_card_management_ap_is/models/account_restriction_response.rb +60 -0
- data/lib/shell_card_management_ap_is/models/account_velocity_limit.rb +145 -0
- data/lib/shell_card_management_ap_is/models/accounts.rb +65 -0
- data/lib/shell_card_management_ap_is/models/address.rb +174 -0
- data/lib/shell_card_management_ap_is/models/audit_request.rb +256 -0
- data/lib/shell_card_management_ap_is/models/audit_response.rb +111 -0
- data/lib/shell_card_management_ap_is/models/audit_response_audits_items.rb +450 -0
- data/lib/shell_card_management_ap_is/models/auto_renew_card_request.rb +111 -0
- data/lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb +98 -0
- data/lib/shell_card_management_ap_is/models/auto_renew_card_response.rb +92 -0
- data/lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb +64 -0
- data/lib/shell_card_management_ap_is/models/bank_account.rb +192 -0
- data/lib/shell_card_management_ap_is/models/base_model.rb +62 -0
- data/lib/shell_card_management_ap_is/models/bundle_restriction.rb +166 -0
- data/lib/shell_card_management_ap_is/models/cancel_card_request.rb +107 -0
- data/lib/shell_card_management_ap_is/models/cancel_card_response.rb +127 -0
- data/lib/shell_card_management_ap_is/models/card.rb +696 -0
- data/lib/shell_card_management_ap_is/models/card_block_schedule.rb +65 -0
- data/lib/shell_card_management_ap_is/models/card_day_time_restrictions.rb +159 -0
- data/lib/shell_card_management_ap_is/models/card_delivery_contact.rb +230 -0
- data/lib/shell_card_management_ap_is/models/card_detail.rb +661 -0
- data/lib/shell_card_management_ap_is/models/card_detail_auto_renew_enum.rb +28 -0
- data/lib/shell_card_management_ap_is/models/card_details_request.rb +260 -0
- data/lib/shell_card_management_ap_is/models/card_details_response.rb +1058 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb +60 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_card_delivery_address.rb +227 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_fuel_sets_items.rb +58 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_international_pos_language_code_enum.rb +118 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_international_pos_language_id_enum.rb +118 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_local_pos_language_code_enum.rb +118 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_local_pos_language_id_enum.rb +118 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_non_fuel_sets_items.rb +58 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_pin_delivery_address.rb +231 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_pin_type_enum.rb +23 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_reissue_setting_enum.rb +26 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_renewed_card_reissue_setting_enum.rb +25 -0
- data/lib/shell_card_management_ap_is/models/card_details_response_status_id_enum.rb +83 -0
- data/lib/shell_card_management_ap_is/models/card_group_request.rb +178 -0
- data/lib/shell_card_management_ap_is/models/card_group_response.rb +109 -0
- data/lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb +301 -0
- data/lib/shell_card_management_ap_is/models/card_move_request.rb +163 -0
- data/lib/shell_card_management_ap_is/models/card_move_request_cards_items.rb +80 -0
- data/lib/shell_card_management_ap_is/models/card_move_response.rb +112 -0
- data/lib/shell_card_management_ap_is/models/card_move_response_error_cards_items.rb +112 -0
- data/lib/shell_card_management_ap_is/models/card_move_response_successful_requests_items.rb +97 -0
- data/lib/shell_card_management_ap_is/models/card_search_response.rb +126 -0
- data/lib/shell_card_management_ap_is/models/card_summary_request.rb +52 -0
- data/lib/shell_card_management_ap_is/models/card_summary_response.rb +82 -0
- data/lib/shell_card_management_ap_is/models/card_type_request.rb +145 -0
- data/lib/shell_card_management_ap_is/models/card_type_response.rb +79 -0
- data/lib/shell_card_management_ap_is/models/card_type_response_customer_card_types_items.rb +470 -0
- data/lib/shell_card_management_ap_is/models/card_type_response_error.rb +60 -0
- data/lib/shell_card_management_ap_is/models/card_usage_restrictions.rb +281 -0
- data/lib/shell_card_management_ap_is/models/col_co_access.rb +88 -0
- data/lib/shell_card_management_ap_is/models/create_bundle_request.rb +167 -0
- data/lib/shell_card_management_ap_is/models/create_bundle_request_restrictions.rb +147 -0
- data/lib/shell_card_management_ap_is/models/create_bundle_response.rb +98 -0
- data/lib/shell_card_management_ap_is/models/create_bundle_response_data_items.rb +125 -0
- data/lib/shell_card_management_ap_is/models/create_bundle_response_data_items_cards_items.rb +50 -0
- data/lib/shell_card_management_ap_is/models/create_card_group_request.rb +161 -0
- data/lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb +84 -0
- data/lib/shell_card_management_ap_is/models/create_card_group_response.rb +130 -0
- data/lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb +81 -0
- data/lib/shell_card_management_ap_is/models/create_card_group_response_successful_requests_items.rb +71 -0
- data/lib/shell_card_management_ap_is/models/create_card_response.rb +65 -0
- data/lib/shell_card_management_ap_is/models/customer_contract.rb +63 -0
- data/lib/shell_card_management_ap_is/models/customer_detail_request.rb +123 -0
- data/lib/shell_card_management_ap_is/models/customer_detail_response.rb +437 -0
- data/lib/shell_card_management_ap_is/models/day_time_restrictions.rb +162 -0
- data/lib/shell_card_management_ap_is/models/default_error_fault.rb +60 -0
- data/lib/shell_card_management_ap_is/models/default_error_fault_detail.rb +50 -0
- data/lib/shell_card_management_ap_is/models/delete_bundle_request.rb +126 -0
- data/lib/shell_card_management_ap_is/models/delete_bundle_response.rb +60 -0
- data/lib/shell_card_management_ap_is/models/delivery_address_update.rb +112 -0
- data/lib/shell_card_management_ap_is/models/delivery_address_update_references.rb +102 -0
- data/lib/shell_card_management_ap_is/models/delivery_address_update_request.rb +129 -0
- data/lib/shell_card_management_ap_is/models/delivery_address_update_response.rb +94 -0
- data/lib/shell_card_management_ap_is/models/delivery_addresses.rb +258 -0
- data/lib/shell_card_management_ap_is/models/eid_access.rb +75 -0
- data/lib/shell_card_management_ap_is/models/error_details.rb +81 -0
- data/lib/shell_card_management_ap_is/models/error_status.rb +60 -0
- data/lib/shell_card_management_ap_is/models/error_user_access.rb +50 -0
- data/lib/shell_card_management_ap_is/models/error_user_access_error.rb +60 -0
- data/lib/shell_card_management_ap_is/models/finance_currency.rb +98 -0
- data/lib/shell_card_management_ap_is/models/generate_pin_key_response.rb +60 -0
- data/lib/shell_card_management_ap_is/models/invoice_distribution_method.rb +99 -0
- data/lib/shell_card_management_ap_is/models/location_restrictions.rb +125 -0
- data/lib/shell_card_management_ap_is/models/location_restrictions_country_restrictions.rb +65 -0
- data/lib/shell_card_management_ap_is/models/location_restrictions_network_restrictions_items.rb +77 -0
- data/lib/shell_card_management_ap_is/models/location_restrictions_partner_site_restrictions_items.rb +95 -0
- data/lib/shell_card_management_ap_is/models/location_restrictions_shell_site_restrictions_items.rb +95 -0
- data/lib/shell_card_management_ap_is/models/logged_in_user_request.rb +107 -0
- data/lib/shell_card_management_ap_is/models/logged_in_user_response.rb +394 -0
- data/lib/shell_card_management_ap_is/models/o_auth_provider_error_enum.rb +45 -0
- data/lib/shell_card_management_ap_is/models/o_auth_token.rb +100 -0
- data/lib/shell_card_management_ap_is/models/order_card_enquiry.rb +502 -0
- data/lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb +208 -0
- data/lib/shell_card_management_ap_is/models/order_card_enquiry_req_reference_type_enum.rb +32 -0
- data/lib/shell_card_management_ap_is/models/order_card_enquiry_request.rb +51 -0
- data/lib/shell_card_management_ap_is/models/order_card_enquiry_response.rb +79 -0
- data/lib/shell_card_management_ap_is/models/order_card_request.rb +60 -0
- data/lib/shell_card_management_ap_is/models/order_card_response.rb +90 -0
- data/lib/shell_card_management_ap_is/models/payer_access.rb +147 -0
- data/lib/shell_card_management_ap_is/models/payer_details.rb +1412 -0
- data/lib/shell_card_management_ap_is/models/payer_request.rb +126 -0
- data/lib/shell_card_management_ap_is/models/payer_response.rb +115 -0
- data/lib/shell_card_management_ap_is/models/payers.rb +109 -0
- data/lib/shell_card_management_ap_is/models/pin_advice_types.rb +80 -0
- data/lib/shell_card_management_ap_is/models/pin_delivery_contact.rb +242 -0
- data/lib/shell_card_management_ap_is/models/pin_delivery_details.rb +169 -0
- data/lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb +137 -0
- data/lib/shell_card_management_ap_is/models/pin_reminder_reference.rb +99 -0
- data/lib/shell_card_management_ap_is/models/pin_reminder_request.rb +135 -0
- data/lib/shell_card_management_ap_is/models/pin_reminder_response.rb +90 -0
- data/lib/shell_card_management_ap_is/models/product_all_of0.rb +62 -0
- data/lib/shell_card_management_ap_is/models/product_group.rb +116 -0
- data/lib/shell_card_management_ap_is/models/product_restrictions.rb +66 -0
- data/lib/shell_card_management_ap_is/models/purchase_categories.rb +114 -0
- data/lib/shell_card_management_ap_is/models/purchase_category1_all_of0.rb +140 -0
- data/lib/shell_card_management_ap_is/models/purchase_category_request.rb +114 -0
- data/lib/shell_card_management_ap_is/models/purchase_category_response.rb +69 -0
- data/lib/shell_card_management_ap_is/models/replace_card_settings.rb +641 -0
- data/lib/shell_card_management_ap_is/models/restriction_card_request.rb +115 -0
- data/lib/shell_card_management_ap_is/models/restriction_card_request_cards_items.rb +220 -0
- data/lib/shell_card_management_ap_is/models/restriction_card_response.rb +91 -0
- data/lib/shell_card_management_ap_is/models/restriction_card_response_data_items.rb +240 -0
- data/lib/shell_card_management_ap_is/models/restriction_search_card_request.rb +50 -0
- data/lib/shell_card_management_ap_is/models/restriction_search_card_request_filters.rb +177 -0
- data/lib/shell_card_management_ap_is/models/restriction_search_card_request_filters_cards_items.rb +63 -0
- data/lib/shell_card_management_ap_is/models/restriction_search_card_response.rb +79 -0
- data/lib/shell_card_management_ap_is/models/restriction_search_card_response_data_items.rb +514 -0
- data/lib/shell_card_management_ap_is/models/role.rb +102 -0
- data/lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb +249 -0
- data/lib/shell_card_management_ap_is/models/schedule_card_block_request.rb +77 -0
- data/lib/shell_card_management_ap_is/models/schedule_card_block_response.rb +91 -0
- data/lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb +89 -0
- data/lib/shell_card_management_ap_is/models/search_account_limit_request.rb +50 -0
- data/lib/shell_card_management_ap_is/models/search_account_limit_request_filters.rb +118 -0
- data/lib/shell_card_management_ap_is/models/search_account_limit_response.rb +70 -0
- data/lib/shell_card_management_ap_is/models/search_account_limit_response_data.rb +106 -0
- data/lib/shell_card_management_ap_is/models/search_card.rb +66 -0
- data/lib/shell_card_management_ap_is/models/search_card_request.rb +72 -0
- data/lib/shell_card_management_ap_is/models/search_card_response_restrictions.rb +99 -0
- data/lib/shell_card_management_ap_is/models/search_product_restriction.rb +78 -0
- data/lib/shell_card_management_ap_is/models/search_request.rb +724 -0
- data/lib/shell_card_management_ap_is/models/submitted_card.rb +183 -0
- data/lib/shell_card_management_ap_is/models/summary_of_bundle_request.rb +50 -0
- data/lib/shell_card_management_ap_is/models/summary_of_bundle_response.rb +79 -0
- data/lib/shell_card_management_ap_is/models/summary_of_bundle_response_data_items.rb +123 -0
- data/lib/shell_card_management_ap_is/models/summary_of_bundle_response_data_items_card_bundles_items.rb +86 -0
- data/lib/shell_card_management_ap_is/models/summary_request.rb +598 -0
- data/lib/shell_card_management_ap_is/models/summary_response.rb +184 -0
- data/lib/shell_card_management_ap_is/models/summaryof_bundle.rb +126 -0
- data/lib/shell_card_management_ap_is/models/update_bundle_request.rb +194 -0
- data/lib/shell_card_management_ap_is/models/update_bundle_response.rb +70 -0
- data/lib/shell_card_management_ap_is/models/update_card.rb +316 -0
- data/lib/shell_card_management_ap_is/models/update_card_group_request.rb +258 -0
- data/lib/shell_card_management_ap_is/models/update_card_group_response.rb +130 -0
- data/lib/shell_card_management_ap_is/models/update_card_group_response_move_card_references_items.rb +77 -0
- data/lib/shell_card_management_ap_is/models/update_card_renewal_address.rb +163 -0
- data/lib/shell_card_management_ap_is/models/update_card_status_request.rb +124 -0
- data/lib/shell_card_management_ap_is/models/update_card_status_response.rb +133 -0
- data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request.rb +112 -0
- data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb +105 -0
- data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_response.rb +60 -0
- data/lib/shell_card_management_ap_is/models/url_enum.rb +23 -0
- data/lib/shell_card_management_ap_is/models/usage_restrictions.rb +311 -0
- data/lib/shell_card_management_ap_is/utilities/date_time_helper.rb +11 -0
- data/lib/shell_card_management_ap_is/utilities/file_wrapper.rb +16 -0
- data/lib/shell_card_management_ap_is.rb +288 -0
- metadata +283 -0
@@ -0,0 +1,496 @@
|
|
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
|
+
# RestrictionController
|
8
|
+
class RestrictionController < BaseController
|
9
|
+
# This API enables clients to create a new card bundle and apply
|
10
|
+
# restrictions.
|
11
|
+
# #### Supported operations
|
12
|
+
# * Create bundle and include mandatory -
|
13
|
+
# * Usage, day/time, product and location restrictions
|
14
|
+
# * List of cards to add to bundle
|
15
|
+
# * Create bundle and include optional identifier of bundle in external
|
16
|
+
# system
|
17
|
+
# #### Validation rules
|
18
|
+
# The following are the key validation rules with the associated error
|
19
|
+
# codes for failed validation-
|
20
|
+
# * `7012` - At least one card must be added to the bundle
|
21
|
+
# * `7011` - The total number of cards passed in the input must be 500 or
|
22
|
+
# less.
|
23
|
+
# * `7014` - All the cards passed in the input are part of the selected
|
24
|
+
# account.
|
25
|
+
# * `7013` - At least one restriction must be applied to the bundle i.e.
|
26
|
+
# either of usage, day/time, location or product restriction.
|
27
|
+
# * `7005` - Day time restriction cannot be set to restrict the use of a
|
28
|
+
# card on all days of the week.
|
29
|
+
# * `7000` - Usage restriction of the bundle is not open ended i.e. all
|
30
|
+
# the limits within the usage restriction must not be set to 0/null.
|
31
|
+
# * `7004` - In the usage restrictions, the limits per transaction should
|
32
|
+
# be less than or equal to Daily, Daily should be less than or equal to
|
33
|
+
# Weekly, Weekly should be less than or equal to Monthly. Exception being
|
34
|
+
# 0/blank will be skipped, i.e. Daily value should be less than equal to
|
35
|
+
# Monthly value if Weekly value is 0/blank.
|
36
|
+
# * `0007` - Error returned if request parameters fail validation e.g.
|
37
|
+
# mandatory check.
|
38
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
39
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
40
|
+
# back in the response from the request.
|
41
|
+
# @param [CreateBundleRequest] body Optional parameter: Create Bundle
|
42
|
+
# Request body
|
43
|
+
# @return [CreateBundleResponse] response from the API call
|
44
|
+
def restriction_bundle_create(request_id,
|
45
|
+
body: nil)
|
46
|
+
new_api_call_builder
|
47
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
48
|
+
'/card-restrictions/v1/bundles/create',
|
49
|
+
Server::DEFAULT)
|
50
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
51
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
52
|
+
.body_param(new_parameter(body))
|
53
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
54
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
55
|
+
.auth(Single.new('BearerToken')))
|
56
|
+
.response(new_response_handler
|
57
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
58
|
+
.deserialize_into(CreateBundleResponse.method(:from_hash))
|
59
|
+
.local_error('400',
|
60
|
+
"The server cannot or will not process the request due to'\
|
61
|
+
' something that is perceived to be a client error (e.g.,'\
|
62
|
+
' malformed request syntax, invalid request message framing, or'\
|
63
|
+
' deceptive request routing).\n",
|
64
|
+
ErrorObjectException)
|
65
|
+
.local_error('401',
|
66
|
+
"The request has not been applied because it lacks valid '\
|
67
|
+
' authentication credentials for the target resource.\n",
|
68
|
+
ErrorObjectException)
|
69
|
+
.local_error('403',
|
70
|
+
'Forbidden',
|
71
|
+
ErrorObjectException)
|
72
|
+
.local_error('404',
|
73
|
+
"The origin server did not find a current representation for'\
|
74
|
+
' the target resource or is not willing to disclose that one'\
|
75
|
+
' exists.\n",
|
76
|
+
ErrorObjectException)
|
77
|
+
.local_error('500',
|
78
|
+
"The server encountered an unexpected condition that prevented'\
|
79
|
+
' it from fulfilling the request.\n",
|
80
|
+
ErrorObjectException))
|
81
|
+
.execute
|
82
|
+
end
|
83
|
+
|
84
|
+
# This API enables clients to update an existing card bundle and its
|
85
|
+
# associated restrictions.
|
86
|
+
# #### Supported operations
|
87
|
+
# * Add new cards to an existing bundle
|
88
|
+
# * Remove cards from existing bundle
|
89
|
+
# * Update restrictions applied to existing bundle
|
90
|
+
# The following are the key validation rules with the associated error
|
91
|
+
# codes for failed validation-
|
92
|
+
# #### Validation rules
|
93
|
+
# * `9007` - The cards must exist in the cards platform for adding or
|
94
|
+
# removing cards.
|
95
|
+
# * `7014` - All the cards passed in the input are part of the selected
|
96
|
+
# account.
|
97
|
+
# * `7018` - All the cards passed in the input are part of the selected
|
98
|
+
# bundle.
|
99
|
+
# * `7011` - The total number of cards passed in the input must be 500 or
|
100
|
+
# less.
|
101
|
+
# * `7012` - The action to remove cards should not result in removing all
|
102
|
+
# the cards from the bundle.
|
103
|
+
# * `7016` - At least one restriction must be modified for “Updateâ€
|
104
|
+
# request action.
|
105
|
+
# * `7013` - All restrictions cannot be marked for “Reset†for
|
106
|
+
# “Update†request action.
|
107
|
+
# * `7005` - Day time restriction cannot be set to restrict the use of a
|
108
|
+
# card on all days of the week. This validation is applicable for Update
|
109
|
+
# request action.
|
110
|
+
# * `7000` - Usage restriction of the bundle is not open ended i.e., all
|
111
|
+
# the limits within the usage restriction must not be set to 0/null. This
|
112
|
+
# validation is applicable for Update request action.
|
113
|
+
# * `7004` - In the usage restrictions, the limits per transaction should
|
114
|
+
# be less than or equal to Daily, Daily should be less than or equal to
|
115
|
+
# Weekly, Weekly should be less than or equal to Monthly. Exception being
|
116
|
+
# 0/blank will be skipped, i.e., Daily value should be less than equal to
|
117
|
+
# Monthly value if Weekly value is 0/blank. This validation is applicable
|
118
|
+
# for Update request action.
|
119
|
+
# * `0007` - Error returned if request parameters fail validation e.g. at
|
120
|
+
# least one card must be provided in the input.
|
121
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
122
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
123
|
+
# back in the response from the request.
|
124
|
+
# @param [UpdateBundleRequest] body Optional parameter: Update Bundle
|
125
|
+
# Request body
|
126
|
+
# @return [UpdateBundleResponse] response from the API call
|
127
|
+
def restriction_bundle_update(request_id,
|
128
|
+
body: nil)
|
129
|
+
new_api_call_builder
|
130
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
131
|
+
'/card-restrictions/v1/bundles/update',
|
132
|
+
Server::DEFAULT)
|
133
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
134
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
135
|
+
.body_param(new_parameter(body))
|
136
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
137
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
138
|
+
.auth(Single.new('BearerToken')))
|
139
|
+
.response(new_response_handler
|
140
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
141
|
+
.deserialize_into(UpdateBundleResponse.method(:from_hash))
|
142
|
+
.local_error('400',
|
143
|
+
"The server cannot or will not process the request due to'\
|
144
|
+
' something that is perceived to be a client error (e.g.,'\
|
145
|
+
' malformed request syntax, invalid request message framing, or'\
|
146
|
+
' deceptive request routing).\n",
|
147
|
+
ErrorObjectException)
|
148
|
+
.local_error('401',
|
149
|
+
"The request has not been applied because it lacks valid '\
|
150
|
+
' authentication credentials for the target resource.\n",
|
151
|
+
ErrorObjectException)
|
152
|
+
.local_error('403',
|
153
|
+
'Forbidden',
|
154
|
+
ErrorObjectException)
|
155
|
+
.local_error('404',
|
156
|
+
"The origin server did not find a current representation for'\
|
157
|
+
' the target resource or is not willing to disclose that one'\
|
158
|
+
' exists.\n",
|
159
|
+
ErrorObjectException)
|
160
|
+
.local_error('500',
|
161
|
+
"The server encountered an unexpected condition that prevented'\
|
162
|
+
' it from fulfilling the request.\n",
|
163
|
+
ErrorObjectException))
|
164
|
+
.execute
|
165
|
+
end
|
166
|
+
|
167
|
+
# This API enables clients to delete an existing card bundle in the Shell
|
168
|
+
# Card Platform. Once the card bundle is deleted the usage and product
|
169
|
+
# restrictions of the cards that were present in the bundle will be reset
|
170
|
+
# based on the request.
|
171
|
+
# #### Supported operations
|
172
|
+
# * Delete card bundle by bundle Id
|
173
|
+
# #### Validation rules
|
174
|
+
# The following are the key validation rules with the associated error
|
175
|
+
# codes for failed validation-
|
176
|
+
# * `7019` - The given card bundle is not available in the Shell Card
|
177
|
+
# Platform.
|
178
|
+
# * `0007` - Error returned if request parameters fail validation e.g.
|
179
|
+
# mandatory check.
|
180
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
181
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
182
|
+
# back in the response from the request.
|
183
|
+
# @param [DeleteBundleRequest] body Optional parameter: Delete Bundle
|
184
|
+
# Request body
|
185
|
+
# @return [DeleteBundleResponse] response from the API call
|
186
|
+
def restriction_bundle_delete(request_id,
|
187
|
+
body: nil)
|
188
|
+
new_api_call_builder
|
189
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
190
|
+
'/card-restrictions/v1/bundles/delete',
|
191
|
+
Server::DEFAULT)
|
192
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
193
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
194
|
+
.body_param(new_parameter(body))
|
195
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
196
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
197
|
+
.auth(Single.new('BearerToken')))
|
198
|
+
.response(new_response_handler
|
199
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
200
|
+
.deserialize_into(DeleteBundleResponse.method(:from_hash))
|
201
|
+
.local_error('400',
|
202
|
+
"The server cannot or will not process the request due to'\
|
203
|
+
' something that is perceived to be a client error (e.g.,'\
|
204
|
+
' malformed request syntax, invalid request message framing, or'\
|
205
|
+
' deceptive request routing).\n",
|
206
|
+
ErrorObjectException)
|
207
|
+
.local_error('401',
|
208
|
+
"The request has not been applied because it lacks valid '\
|
209
|
+
' authentication credentials for the target resource.\n",
|
210
|
+
ErrorObjectException)
|
211
|
+
.local_error('403',
|
212
|
+
'Forbidden',
|
213
|
+
ErrorObjectException)
|
214
|
+
.local_error('404',
|
215
|
+
"The origin server did not find a current representation for'\
|
216
|
+
' the target resource or is not willing to disclose that one'\
|
217
|
+
' exists.\n",
|
218
|
+
ErrorObjectException)
|
219
|
+
.local_error('500',
|
220
|
+
"The server encountered an unexpected condition that prevented'\
|
221
|
+
' it from fulfilling the request.\n",
|
222
|
+
ErrorObjectException))
|
223
|
+
.execute
|
224
|
+
end
|
225
|
+
|
226
|
+
# This API allows clients to get a summary of card bundles associated with
|
227
|
+
# Payer/Account. This API will return the basic bundle details including
|
228
|
+
# card and restriction details. Optionally the API will also include a count
|
229
|
+
# of cards that are not associated with the bundle but returned by the
|
230
|
+
# search criteria.
|
231
|
+
# Note - to include count of cards of an account that are not associated
|
232
|
+
# with any bundles, in the input parameter SearchCardBundles either pass all
|
233
|
+
# the bundles of the account in the list or pass only account with bundle id
|
234
|
+
# left blank/null.
|
235
|
+
# #### Supported operations
|
236
|
+
# * Get summary of bundles by list of bundle Ids
|
237
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
238
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
239
|
+
# back in the response from the request.
|
240
|
+
# @param [SummaryOfBundleRequest] body Optional parameter: Summary Bundle
|
241
|
+
# Request body
|
242
|
+
# @return [SummaryOfBundleResponse] response from the API call
|
243
|
+
def restriction_bundle_summary(request_id,
|
244
|
+
body: nil)
|
245
|
+
new_api_call_builder
|
246
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
247
|
+
'/card-restrictions/v1/bundles/Summary',
|
248
|
+
Server::DEFAULT)
|
249
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
250
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
251
|
+
.body_param(new_parameter(body))
|
252
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
253
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
254
|
+
.auth(Single.new('BearerToken')))
|
255
|
+
.response(new_response_handler
|
256
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
257
|
+
.deserialize_into(SummaryOfBundleResponse.method(:from_hash))
|
258
|
+
.local_error('400',
|
259
|
+
"The server cannot or will not process the request due to'\
|
260
|
+
' something that is perceived to be a client error (e.g.,'\
|
261
|
+
' malformed request syntax, invalid request message framing, or'\
|
262
|
+
' deceptive request routing).\n",
|
263
|
+
ErrorObjectException)
|
264
|
+
.local_error('401',
|
265
|
+
"The request has not been applied because it lacks valid '\
|
266
|
+
' authentication credentials for the target resource.\n",
|
267
|
+
ErrorObjectException)
|
268
|
+
.local_error('403',
|
269
|
+
'Forbidden',
|
270
|
+
ErrorObjectException)
|
271
|
+
.local_error('404',
|
272
|
+
"The origin server did not find a current representation for'\
|
273
|
+
' the target resource or is not willing to disclose that one'\
|
274
|
+
' exists.\n",
|
275
|
+
ErrorObjectException)
|
276
|
+
.local_error('500',
|
277
|
+
"The server encountered an unexpected condition that prevented'\
|
278
|
+
' it from fulfilling the request.\n",
|
279
|
+
ErrorObjectException))
|
280
|
+
.execute
|
281
|
+
end
|
282
|
+
|
283
|
+
# This API allows to set or update the restrictions for existing cards or
|
284
|
+
# newly ordered cards under the same payer.
|
285
|
+
# #### Supported operations
|
286
|
+
# * Set or reset usage restrictions for cards
|
287
|
+
# * Set or reset day/time restrictions for cards
|
288
|
+
# * Set or reset product restrictions for cards
|
289
|
+
# * Set or reset location restrictions for cards
|
290
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
291
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
292
|
+
# back in the response from the request.
|
293
|
+
# @param [RestrictionCardRequest] body Optional parameter: Summary Bundle
|
294
|
+
# Request body
|
295
|
+
# @return [RestrictionCardResponse] response from the API call
|
296
|
+
def card_restriction(request_id,
|
297
|
+
body: nil)
|
298
|
+
new_api_call_builder
|
299
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
300
|
+
'/card-restrictions/v2/card',
|
301
|
+
Server::DEFAULT)
|
302
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
303
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
304
|
+
.body_param(new_parameter(body))
|
305
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
306
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
307
|
+
.auth(Single.new('BearerToken')))
|
308
|
+
.response(new_response_handler
|
309
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
310
|
+
.deserialize_into(RestrictionCardResponse.method(:from_hash))
|
311
|
+
.local_error('400',
|
312
|
+
"The server cannot or will not process the request due to'\
|
313
|
+
' something that is perceived to be a client error (e.g.,'\
|
314
|
+
' malformed request syntax, invalid request message framing, or'\
|
315
|
+
' deceptive request routing).\n",
|
316
|
+
ErrorObjectException)
|
317
|
+
.local_error('401',
|
318
|
+
"The request has not been applied because it lacks valid '\
|
319
|
+
' authentication credentials for the target resource.\n",
|
320
|
+
ErrorObjectException)
|
321
|
+
.local_error('403',
|
322
|
+
'Forbidden',
|
323
|
+
ErrorObjectException)
|
324
|
+
.local_error('404',
|
325
|
+
"The origin server did not find a current representation for'\
|
326
|
+
' the target resource or is not willing to disclose that one'\
|
327
|
+
' exists.\n",
|
328
|
+
ErrorObjectException)
|
329
|
+
.local_error('500',
|
330
|
+
"The server encountered an unexpected condition that prevented'\
|
331
|
+
' it from fulfilling the request.\n",
|
332
|
+
ErrorObjectException))
|
333
|
+
.execute
|
334
|
+
end
|
335
|
+
|
336
|
+
# This operation allows setting or updating the usage restrictions of an
|
337
|
+
# existing account.
|
338
|
+
# #### Validation rules
|
339
|
+
# * The account exists.
|
340
|
+
# * Day time restriction cannot be set to restrict the use of a card, under
|
341
|
+
# the account, on all days of the week.
|
342
|
+
# * Either of the usage, daytime or location is either marked for reset or
|
343
|
+
# new restriction values provided for the account.
|
344
|
+
# * In usage restrictions, the limits per transaction should be less than or
|
345
|
+
# equal to Daily, Daily should be less than or equal to Weekly, Weekly
|
346
|
+
# should be less than or equal to Monthly. Exception being 0/blank will be
|
347
|
+
# skipped, i.e., Daily value should be less than equal to Monthly value if
|
348
|
+
# Weekly value is 0/blank.
|
349
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
350
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
351
|
+
# back in the response from the request.
|
352
|
+
# @param [AccountRestrictionRequest] body Optional parameter: Summary Bundle
|
353
|
+
# Request body
|
354
|
+
# @return [AccountRestrictionResponse] response from the API call
|
355
|
+
def account_restriction(request_id,
|
356
|
+
body: nil)
|
357
|
+
new_api_call_builder
|
358
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
359
|
+
'/card-restrictions/v1/Account',
|
360
|
+
Server::DEFAULT)
|
361
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
362
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
363
|
+
.body_param(new_parameter(body))
|
364
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
365
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
366
|
+
.auth(Single.new('BearerToken')))
|
367
|
+
.response(new_response_handler
|
368
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
369
|
+
.deserialize_into(AccountRestrictionResponse.method(:from_hash))
|
370
|
+
.local_error('400',
|
371
|
+
"The server cannot or will not process the request due to'\
|
372
|
+
' something that is perceived to be a client error (e.g.,'\
|
373
|
+
' malformed request syntax, invalid request message framing, or'\
|
374
|
+
' deceptive request routing).\n",
|
375
|
+
ErrorObjectException)
|
376
|
+
.local_error('401',
|
377
|
+
"The request has not been applied because it lacks valid '\
|
378
|
+
' authentication credentials for the target resource.\n",
|
379
|
+
ErrorObjectException)
|
380
|
+
.local_error('403',
|
381
|
+
'Forbidden',
|
382
|
+
ErrorObjectException)
|
383
|
+
.local_error('404',
|
384
|
+
"The origin server did not find a current representation for'\
|
385
|
+
' the target resource or is not willing to disclose that one'\
|
386
|
+
' exists.\n",
|
387
|
+
ErrorObjectException)
|
388
|
+
.local_error('500',
|
389
|
+
"The server encountered an unexpected condition that prevented'\
|
390
|
+
' it from fulfilling the request.\n",
|
391
|
+
ErrorObjectException))
|
392
|
+
.execute
|
393
|
+
end
|
394
|
+
|
395
|
+
# This operation will allow user to get account level limits for the given
|
396
|
+
# account.
|
397
|
+
# It returns the velocity limits if its overridden at the account else the
|
398
|
+
# values will be null/empty.
|
399
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
400
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
401
|
+
# back in the response from the request.
|
402
|
+
# @param [SearchAccountLimitRequest] body Optional parameter: Summary Bundle
|
403
|
+
# Request body
|
404
|
+
# @return [SearchAccountLimitResponse] response from the API call
|
405
|
+
def search_account_limit(request_id,
|
406
|
+
body: nil)
|
407
|
+
new_api_call_builder
|
408
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
409
|
+
'/card-restrictions/v1/searchaccountlimit',
|
410
|
+
Server::DEFAULT)
|
411
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
412
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
413
|
+
.body_param(new_parameter(body))
|
414
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
415
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
416
|
+
.auth(Single.new('BearerToken')))
|
417
|
+
.response(new_response_handler
|
418
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
419
|
+
.deserialize_into(SearchAccountLimitResponse.method(:from_hash))
|
420
|
+
.local_error('400',
|
421
|
+
"The server cannot or will not process the request due to'\
|
422
|
+
' something that is perceived to be a client error (e.g.,'\
|
423
|
+
' malformed request syntax, invalid request message framing, or'\
|
424
|
+
' deceptive request routing).\n",
|
425
|
+
ErrorObjectException)
|
426
|
+
.local_error('401',
|
427
|
+
"The request has not been applied because it lacks valid '\
|
428
|
+
' authentication credentials for the target resource.\n",
|
429
|
+
ErrorObjectException)
|
430
|
+
.local_error('403',
|
431
|
+
'Forbidden',
|
432
|
+
ErrorObjectException)
|
433
|
+
.local_error('404',
|
434
|
+
"The origin server did not find a current representation for'\
|
435
|
+
' the target resource or is not willing to disclose that one'\
|
436
|
+
' exists.\n",
|
437
|
+
ErrorObjectException)
|
438
|
+
.local_error('500',
|
439
|
+
"The server encountered an unexpected condition that prevented'\
|
440
|
+
' it from fulfilling the request.\n",
|
441
|
+
ErrorObjectException))
|
442
|
+
.execute
|
443
|
+
end
|
444
|
+
|
445
|
+
# This API will allows querying card details including the day/time and
|
446
|
+
# product restrictions.
|
447
|
+
# #### Supported operations
|
448
|
+
# * Search by list of cards or bundle
|
449
|
+
# * Include card bundle details (optional)
|
450
|
+
# @param [String] request_id Required parameter: Mandatory UUID (according
|
451
|
+
# to RFC 4122 standards) for requests and responses. This will be played
|
452
|
+
# back in the response from the request.
|
453
|
+
# @param [RestrictionSearchCardRequest] body Optional parameter: Summary
|
454
|
+
# Bundle Request body
|
455
|
+
# @return [RestrictionSearchCardResponse] response from the API call
|
456
|
+
def search_card_restriction(request_id,
|
457
|
+
body: nil)
|
458
|
+
new_api_call_builder
|
459
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
460
|
+
'/card-restrictions/v2/search',
|
461
|
+
Server::DEFAULT)
|
462
|
+
.header_param(new_parameter(request_id, key: 'RequestId'))
|
463
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
464
|
+
.body_param(new_parameter(body))
|
465
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
466
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
467
|
+
.auth(Single.new('BearerToken')))
|
468
|
+
.response(new_response_handler
|
469
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
470
|
+
.deserialize_into(RestrictionSearchCardResponse.method(:from_hash))
|
471
|
+
.local_error('400',
|
472
|
+
"The server cannot or will not process the request due to'\
|
473
|
+
' something that is perceived to be a client error (e.g.,'\
|
474
|
+
' malformed request syntax, invalid request message framing, or'\
|
475
|
+
' deceptive request routing).\n",
|
476
|
+
ErrorObjectException)
|
477
|
+
.local_error('401',
|
478
|
+
"The request has not been applied because it lacks valid '\
|
479
|
+
' authentication credentials for the target resource.\n",
|
480
|
+
ErrorObjectException)
|
481
|
+
.local_error('403',
|
482
|
+
'Forbidden',
|
483
|
+
ErrorObjectException)
|
484
|
+
.local_error('404',
|
485
|
+
"The origin server did not find a current representation for'\
|
486
|
+
' the target resource or is not willing to disclose that one'\
|
487
|
+
' exists.\n",
|
488
|
+
ErrorObjectException)
|
489
|
+
.local_error('500',
|
490
|
+
"The server encountered an unexpected condition that prevented'\
|
491
|
+
' it from fulfilling the request.\n",
|
492
|
+
ErrorObjectException))
|
493
|
+
.execute
|
494
|
+
end
|
495
|
+
end
|
496
|
+
end
|
@@ -0,0 +1,10 @@
|
|
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
|
+
# Class for exceptions when there is a network error, status code error, etc.
|
8
|
+
class APIException < CoreLibrary::ApiException
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,32 @@
|
|
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
|
+
# Error response
|
8
|
+
class DefaultErrorException < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Error object
|
13
|
+
# @return [DefaultErrorFault]
|
14
|
+
attr_accessor :fault
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
@fault = DefaultErrorFault.from_hash(hash['fault']) if hash['fault']
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,54 @@
|
|
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
|
+
# ErrorObject class.
|
8
|
+
class ErrorObjectException < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Unique request identifier passed from end user. This identifier helps in
|
13
|
+
# tracing a transaction
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :request_id
|
16
|
+
|
17
|
+
# Indicates overall status of the request. Allowed values: SUCCES, FAILED,
|
18
|
+
# PARTIAL_SUCCESS
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :status
|
21
|
+
|
22
|
+
# Indicates overall status of the request. Allowed values: SUCCES, FAILED,
|
23
|
+
# PARTIAL_SUCCESS
|
24
|
+
# @return [Array[ErrorDetails]]
|
25
|
+
attr_accessor :errors
|
26
|
+
|
27
|
+
# The constructor.
|
28
|
+
# @param [String] The reason for raising an exception.
|
29
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
30
|
+
def initialize(reason, response)
|
31
|
+
super(reason, response)
|
32
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
33
|
+
unbox(hash)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Populates this object by extracting properties from a hash.
|
37
|
+
# @param [Hash] The deserialized response sent by the server in the
|
38
|
+
# response body.
|
39
|
+
def unbox(hash)
|
40
|
+
@request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
|
41
|
+
@status = hash.key?('Status') ? hash['Status'] : SKIP
|
42
|
+
# Parameter is an array, so we need to iterate through it
|
43
|
+
@errors = nil
|
44
|
+
unless hash['Errors'].nil?
|
45
|
+
@errors = []
|
46
|
+
hash['Errors'].each do |structure|
|
47
|
+
@errors << (ErrorDetails.from_hash(structure) if structure)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
@errors = SKIP unless hash.key?('Errors')
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,32 @@
|
|
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
|
+
# ErrorUserAccess_Error1 class.
|
8
|
+
class ErrorUserAccessError1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [ErrorUserAccessError]
|
14
|
+
attr_accessor :error
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
@error = ErrorUserAccessError.from_hash(hash['Error']) if hash['Error']
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|