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.
Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -19
  3. data/lib/shell_card_management_ap_is/client.rb +2 -3
  4. data/lib/shell_card_management_ap_is/configuration.rb +15 -22
  5. data/lib/shell_card_management_ap_is/controllers/base_controller.rb +9 -9
  6. data/lib/shell_card_management_ap_is/controllers/card_controller.rb +434 -434
  7. data/lib/shell_card_management_ap_is/controllers/customer_controller.rb +261 -262
  8. data/lib/shell_card_management_ap_is/controllers/o_auth_authorization_controller.rb +11 -11
  9. data/lib/shell_card_management_ap_is/controllers/restriction_controller.rb +421 -291
  10. data/lib/shell_card_management_ap_is/exceptions/error_object_exception.rb +15 -15
  11. data/lib/shell_card_management_ap_is/exceptions/{error_user_access_error1_exception.rb → fleetmanagement_v1_customer_customer403_error_exception.rb} +17 -17
  12. data/lib/shell_card_management_ap_is/exceptions/{default_error_exception.rb → fleetmanagement_v1_customer_payers400_error_exception.rb} +20 -20
  13. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_customer_payers404_error_exception.rb +32 -0
  14. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser400_error_exception.rb +32 -0
  15. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser401_error_exception.rb +32 -0
  16. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser403_error_exception.rb +32 -0
  17. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser404_error_exception.rb +32 -0
  18. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser500_error_exception.rb +32 -0
  19. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard401_error_exception.rb +32 -0
  20. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard500_error_exception.rb +32 -0
  21. data/lib/shell_card_management_ap_is/exceptions/o_auth_provider_exception.rb +15 -15
  22. data/lib/shell_card_management_ap_is/http/auth/bearer_token.rb +54 -10
  23. data/lib/shell_card_management_ap_is/models/account_access.rb +3 -8
  24. data/lib/shell_card_management_ap_is/models/account_request.rb +17 -26
  25. data/lib/shell_card_management_ap_is/models/account_response.rb +2 -6
  26. data/lib/shell_card_management_ap_is/models/account_response_accounts_items.rb +29 -53
  27. data/lib/shell_card_management_ap_is/models/account_restriction_request.rb +28 -10
  28. data/lib/shell_card_management_ap_is/models/account_restriction_response.rb +60 -11
  29. data/lib/shell_card_management_ap_is/models/account_velocity_limit.rb +11 -19
  30. data/lib/shell_card_management_ap_is/models/accounts.rb +1 -2
  31. data/lib/shell_card_management_ap_is/models/address.rb +4 -11
  32. data/lib/shell_card_management_ap_is/models/audit_request.rb +37 -33
  33. data/lib/shell_card_management_ap_is/models/audit_response.rb +2 -6
  34. data/lib/shell_card_management_ap_is/models/audit_response_audits_items.rb +50 -63
  35. data/lib/shell_card_management_ap_is/models/auto_renew_card_request.rb +2 -5
  36. data/lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb +13 -5
  37. data/lib/shell_card_management_ap_is/models/auto_renew_card_response.rb +1 -3
  38. data/lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb +13 -3
  39. data/lib/shell_card_management_ap_is/models/bank_account.rb +5 -13
  40. data/lib/shell_card_management_ap_is/models/{search_account_limit_request_filters.rb → budle_details_request.rb} +29 -22
  41. data/lib/shell_card_management_ap_is/models/{create_bundle_response_data_items_cards_items.rb → bundle_card_restriction_status.rb} +4 -3
  42. data/lib/shell_card_management_ap_is/models/bundle_details_response.rb +181 -0
  43. data/lib/shell_card_management_ap_is/models/bundle_restriction.rb +86 -103
  44. data/lib/shell_card_management_ap_is/models/bundle_restriction_update.rb +185 -0
  45. data/lib/shell_card_management_ap_is/models/bundled_details_product_list.rb +116 -0
  46. data/lib/shell_card_management_ap_is/models/bundled_restrictions_list.rb +82 -0
  47. data/lib/shell_card_management_ap_is/models/cancel_card_request.rb +1 -3
  48. data/lib/shell_card_management_ap_is/models/cancel_card_response.rb +3 -6
  49. data/lib/shell_card_management_ap_is/models/card.rb +43 -51
  50. data/lib/shell_card_management_ap_is/models/card_block_schedule.rb +1 -2
  51. data/lib/shell_card_management_ap_is/models/{summary_of_bundle_response_data_items_card_bundles_items.rb → card_bundle.rb} +11 -18
  52. data/lib/shell_card_management_ap_is/models/card_contact.rb +222 -0
  53. data/lib/shell_card_management_ap_is/models/card_day_time_restrictions.rb +3 -9
  54. data/lib/shell_card_management_ap_is/models/card_delivery_address.rb +218 -0
  55. data/lib/shell_card_management_ap_is/models/card_delivery_contact.rb +7 -14
  56. data/lib/shell_card_management_ap_is/models/card_detail.rb +50 -61
  57. data/lib/shell_card_management_ap_is/models/card_details_request.rb +6 -14
  58. data/lib/shell_card_management_ap_is/models/card_details_response.rb +52 -89
  59. data/lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb +1 -2
  60. data/lib/shell_card_management_ap_is/models/card_details_response_card_delivery_address.rb +6 -15
  61. data/lib/shell_card_management_ap_is/models/card_details_response_fuel_sets_items.rb +1 -2
  62. data/lib/shell_card_management_ap_is/models/card_details_response_non_fuel_sets_items.rb +1 -2
  63. data/lib/shell_card_management_ap_is/models/card_details_response_pin_delivery_address.rb +6 -15
  64. data/lib/shell_card_management_ap_is/models/card_group_request.rb +6 -12
  65. data/lib/shell_card_management_ap_is/models/card_group_response.rb +2 -6
  66. data/lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb +10 -20
  67. data/lib/shell_card_management_ap_is/models/card_management_v1_cancel_request.rb +104 -0
  68. data/lib/shell_card_management_ap_is/models/card_management_v1_ordercard_request.rb +59 -0
  69. data/lib/shell_card_management_ap_is/models/card_management_v1_pinreminder_request.rb +130 -0
  70. data/lib/shell_card_management_ap_is/models/card_management_v1_updatestatus_request.rb +122 -0
  71. data/lib/shell_card_management_ap_is/models/card_move_request.rb +4 -9
  72. data/lib/shell_card_management_ap_is/models/card_move_request_cards_items.rb +1 -3
  73. data/lib/shell_card_management_ap_is/models/card_move_response.rb +2 -4
  74. data/lib/shell_card_management_ap_is/models/card_move_response_error_cards_items.rb +2 -5
  75. data/lib/shell_card_management_ap_is/models/card_move_response_successful_requests_items.rb +2 -5
  76. data/lib/shell_card_management_ap_is/models/{restriction_card_request.rb → card_restriction_req.rb} +42 -50
  77. data/lib/shell_card_management_ap_is/models/card_restriction_response.rb +96 -0
  78. data/lib/shell_card_management_ap_is/models/card_search_response.rb +2 -7
  79. data/lib/shell_card_management_ap_is/models/card_settings.rb +626 -0
  80. data/lib/shell_card_management_ap_is/models/card_summary_request.rb +3 -5
  81. data/lib/shell_card_management_ap_is/models/card_summary_response.rb +1 -3
  82. data/lib/shell_card_management_ap_is/models/card_type_request.rb +3 -7
  83. data/lib/shell_card_management_ap_is/models/card_type_response.rb +1 -3
  84. data/lib/shell_card_management_ap_is/models/card_type_response_customer_card_types_items.rb +15 -31
  85. data/lib/shell_card_management_ap_is/models/card_type_response_error.rb +1 -2
  86. data/lib/shell_card_management_ap_is/models/card_usage_restrictions.rb +5 -10
  87. data/lib/shell_card_management_ap_is/models/col_co_access.rb +2 -4
  88. data/lib/shell_card_management_ap_is/models/{location_restrictions_country_restrictions.rb → country_restriction.rb} +20 -21
  89. data/lib/shell_card_management_ap_is/models/create_bundle_request.rb +64 -62
  90. data/lib/shell_card_management_ap_is/models/create_bundle_response.rb +122 -47
  91. data/lib/shell_card_management_ap_is/models/create_card_group_request.rb +3 -9
  92. data/lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb +1 -3
  93. data/lib/shell_card_management_ap_is/models/create_card_group_response.rb +2 -5
  94. data/lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb +1 -3
  95. data/lib/shell_card_management_ap_is/models/create_card_group_response_successful_requests_items.rb +1 -3
  96. data/lib/shell_card_management_ap_is/models/create_card_response.rb +1 -2
  97. data/lib/shell_card_management_ap_is/models/customer_contract.rb +1 -2
  98. data/lib/shell_card_management_ap_is/models/customer_detail_request.rb +2 -5
  99. data/lib/shell_card_management_ap_is/models/customer_detail_response.rb +31 -45
  100. data/lib/shell_card_management_ap_is/models/day_time_restriction.rb +133 -0
  101. data/lib/shell_card_management_ap_is/models/day_time_restrictions.rb +52 -82
  102. data/lib/shell_card_management_ap_is/models/{summary_of_bundle_request.rb → default_error.rb} +10 -10
  103. data/lib/shell_card_management_ap_is/models/default_error_fault.rb +4 -5
  104. data/lib/shell_card_management_ap_is/models/delete_bundle_request.rb +14 -16
  105. data/lib/shell_card_management_ap_is/models/delete_bundle_response.rb +9 -10
  106. data/lib/shell_card_management_ap_is/models/delivery_address_update.rb +13 -11
  107. data/lib/shell_card_management_ap_is/models/delivery_address_update_references.rb +2 -5
  108. data/lib/shell_card_management_ap_is/models/delivery_address_update_references2.rb +98 -0
  109. data/lib/shell_card_management_ap_is/models/delivery_address_update_request.rb +3 -7
  110. data/lib/shell_card_management_ap_is/models/delivery_address_update_response.rb +5 -14
  111. data/lib/shell_card_management_ap_is/models/delivery_addresses.rb +7 -18
  112. data/lib/shell_card_management_ap_is/models/detail.rb +50 -0
  113. data/lib/shell_card_management_ap_is/models/eid_access.rb +1 -2
  114. data/lib/shell_card_management_ap_is/models/error_details.rb +1 -3
  115. data/lib/shell_card_management_ap_is/models/error_status.rb +1 -2
  116. data/lib/shell_card_management_ap_is/models/error_user_access_error.rb +1 -2
  117. data/lib/shell_card_management_ap_is/models/fault.rb +59 -0
  118. data/lib/shell_card_management_ap_is/models/filters.rb +702 -0
  119. data/lib/shell_card_management_ap_is/models/filters1.rb +579 -0
  120. data/lib/shell_card_management_ap_is/models/filters2.rb +200 -0
  121. data/lib/shell_card_management_ap_is/models/finance_currency.rb +1 -2
  122. data/lib/shell_card_management_ap_is/models/finance_currency2.rb +96 -0
  123. data/lib/shell_card_management_ap_is/models/{restriction_search_card_request.rb → fleetmanagement_v1_customer_payers400_error1.rb} +10 -10
  124. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_customer_payers404_error1.rb +50 -0
  125. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser400_error1.rb +50 -0
  126. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser401_error1.rb +50 -0
  127. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser404_error1.rb +50 -0
  128. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser500_error1.rb +50 -0
  129. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb +104 -0
  130. data/lib/shell_card_management_ap_is/models/fleetmanagement_v2_restriction_searchcard401_error1.rb +50 -0
  131. data/lib/shell_card_management_ap_is/models/fleetmanagement_v2_restriction_searchcard500_error1.rb +50 -0
  132. data/lib/shell_card_management_ap_is/models/generate_pin_key_response.rb +1 -2
  133. data/lib/shell_card_management_ap_is/models/invoice_distribution_method.rb +2 -4
  134. data/lib/shell_card_management_ap_is/models/{location_restrictions.rb → location_restriction.rb} +20 -35
  135. data/lib/shell_card_management_ap_is/models/logged_in_user_request.rb +2 -4
  136. data/lib/shell_card_management_ap_is/models/logged_in_user_response.rb +12 -25
  137. data/lib/shell_card_management_ap_is/models/{location_restrictions_network_restrictions_items.rb → network_restriction.rb} +18 -20
  138. data/lib/shell_card_management_ap_is/models/o_auth_token.rb +2 -6
  139. data/lib/shell_card_management_ap_is/models/order_card_enquiry.rb +48 -45
  140. data/lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb +5 -12
  141. data/lib/shell_card_management_ap_is/models/order_card_enquiry_request.rb +3 -4
  142. data/lib/shell_card_management_ap_is/models/order_card_enquiry_response.rb +1 -3
  143. data/lib/shell_card_management_ap_is/models/order_card_response.rb +1 -3
  144. data/lib/shell_card_management_ap_is/models/{location_restrictions_partner_site_restrictions_items.rb → partner_site_restriction.rb} +10 -12
  145. data/lib/shell_card_management_ap_is/models/payer_access.rb +3 -8
  146. data/lib/shell_card_management_ap_is/models/payer_details.rb +55 -96
  147. data/lib/shell_card_management_ap_is/models/payer_request.rb +9 -12
  148. data/lib/shell_card_management_ap_is/models/payer_response.rb +2 -6
  149. data/lib/shell_card_management_ap_is/models/payers.rb +2 -5
  150. data/lib/shell_card_management_ap_is/models/pin_advice_types.rb +5 -6
  151. data/lib/shell_card_management_ap_is/models/pin_contact.rb +234 -0
  152. data/lib/shell_card_management_ap_is/models/pin_deliver_to.rb +161 -0
  153. data/lib/shell_card_management_ap_is/models/pin_delivery_address.rb +222 -0
  154. data/lib/shell_card_management_ap_is/models/pin_delivery_contact.rb +7 -14
  155. data/lib/shell_card_management_ap_is/models/pin_delivery_details.rb +4 -11
  156. data/lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb +19 -17
  157. data/lib/shell_card_management_ap_is/models/pin_reminder_reference.rb +2 -5
  158. data/lib/shell_card_management_ap_is/models/pin_reminder_request.rb +2 -6
  159. data/lib/shell_card_management_ap_is/models/pin_reminder_response.rb +1 -3
  160. data/lib/shell_card_management_ap_is/models/product_all_of0.rb +1 -2
  161. data/lib/shell_card_management_ap_is/models/product_group.rb +2 -6
  162. data/lib/shell_card_management_ap_is/models/{product_restrictions.rb → product_restriction_card.rb} +9 -12
  163. data/lib/shell_card_management_ap_is/models/purchase_categories.rb +1 -4
  164. data/lib/shell_card_management_ap_is/models/purchase_category1_all_of0.rb +10 -15
  165. data/lib/shell_card_management_ap_is/models/purchase_category_request.rb +2 -5
  166. data/lib/shell_card_management_ap_is/models/purchase_category_response.rb +1 -2
  167. data/lib/shell_card_management_ap_is/models/replace_card_settings.rb +25 -40
  168. data/lib/shell_card_management_ap_is/models/restriction.rb +82 -0
  169. data/lib/shell_card_management_ap_is/models/{restriction_search_card_response_data_items.rb → restriction_card_list.rb} +284 -328
  170. data/lib/shell_card_management_ap_is/models/{restriction_card_request_cards_items.rb → restriction_cards_list.rb} +69 -82
  171. data/lib/shell_card_management_ap_is/models/restriction_product.rb +62 -0
  172. data/lib/shell_card_management_ap_is/models/{restriction_card_response_data_items.rb → restrictioncards_res.rb} +100 -114
  173. data/lib/shell_card_management_ap_is/models/role.rb +3 -6
  174. data/lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb +42 -39
  175. data/lib/shell_card_management_ap_is/models/schedule_card_block_request.rb +1 -2
  176. data/lib/shell_card_management_ap_is/models/schedule_card_block_response.rb +1 -3
  177. data/lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb +1 -3
  178. data/lib/shell_card_management_ap_is/models/search_account_limit_request.rb +79 -10
  179. data/lib/shell_card_management_ap_is/models/search_account_limit_response.rb +74 -20
  180. data/lib/shell_card_management_ap_is/models/search_card.rb +13 -3
  181. data/lib/shell_card_management_ap_is/models/search_card_request.rb +4 -6
  182. data/lib/shell_card_management_ap_is/models/{restriction_search_card_request_filters_cards_items.rb → search_card_restriction.rb} +19 -16
  183. data/lib/shell_card_management_ap_is/models/{restriction_search_card_request_filters.rb → search_card_restriction_req.rb} +72 -71
  184. data/lib/shell_card_management_ap_is/models/search_card_restriction_res.rb +89 -0
  185. data/lib/shell_card_management_ap_is/models/search_product_restriction.rb +3 -4
  186. data/lib/shell_card_management_ap_is/models/search_request.rb +25 -47
  187. data/lib/shell_card_management_ap_is/models/{location_restrictions_shell_site_restrictions_items.rb → shell_site_restriction.rb} +10 -17
  188. data/lib/shell_card_management_ap_is/models/submitted_card.rb +24 -9
  189. data/lib/shell_card_management_ap_is/models/summary_request.rb +21 -39
  190. data/lib/shell_card_management_ap_is/models/summary_response.rb +5 -11
  191. data/lib/shell_card_management_ap_is/models/{summary_of_bundle_response_data_items.rb → summaryofbundle_response.rb} +36 -33
  192. data/lib/shell_card_management_ap_is/models/{summaryof_bundle.rb → summaryofbundler_request.rb} +43 -36
  193. data/lib/shell_card_management_ap_is/models/update_bundle_request.rb +65 -70
  194. data/lib/shell_card_management_ap_is/models/update_bundle_response.rb +75 -21
  195. data/lib/shell_card_management_ap_is/models/update_card.rb +31 -20
  196. data/lib/shell_card_management_ap_is/models/update_card_group_request.rb +9 -17
  197. data/lib/shell_card_management_ap_is/models/update_card_group_response.rb +3 -6
  198. data/lib/shell_card_management_ap_is/models/update_card_group_response_move_card_references_items.rb +1 -3
  199. data/lib/shell_card_management_ap_is/models/update_card_renewal_address.rb +5 -11
  200. data/lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb +155 -0
  201. data/lib/shell_card_management_ap_is/models/update_card_status_request.rb +1 -3
  202. data/lib/shell_card_management_ap_is/models/update_card_status_response.rb +2 -5
  203. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request.rb +2 -5
  204. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb +3 -5
  205. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_response.rb +1 -2
  206. data/lib/shell_card_management_ap_is/models/usage_restriction.rb +1127 -0
  207. data/lib/shell_card_management_ap_is/models/{usage_restrictions.rb → usage_restrictions_card.rb} +74 -131
  208. data/lib/shell_card_management_ap_is/utilities/file_wrapper.rb +9 -9
  209. data/lib/shell_card_management_ap_is.rb +139 -95
  210. metadata +74 -38
  211. data/lib/shell_card_management_ap_is/models/create_bundle_request_restrictions.rb +0 -147
  212. data/lib/shell_card_management_ap_is/models/create_bundle_response_data_items.rb +0 -125
  213. data/lib/shell_card_management_ap_is/models/restriction_card_response.rb +0 -91
  214. data/lib/shell_card_management_ap_is/models/restriction_search_card_response.rb +0 -79
  215. data/lib/shell_card_management_ap_is/models/search_account_limit_response_data.rb +0 -106
  216. data/lib/shell_card_management_ap_is/models/search_card_response_restrictions.rb +0 -99
  217. data/lib/shell_card_management_ap_is/models/summary_of_bundle_response.rb +0 -79
  218. data/lib/shell_card_management_ap_is/models/url_enum.rb +0 -23
@@ -13,15 +13,15 @@ module ShellCardManagementApIs
13
13
  # @return [String]
14
14
  attr_accessor :request_id
15
15
 
16
- # API Response Status
17
- # @return [String]
18
- attr_accessor :status
16
+ # API Request Id
17
+ # @return [ErrorStatus]
18
+ attr_accessor :error
19
19
 
20
20
  # A mapping from model property names to API property names.
21
21
  def self.names
22
22
  @_hash = {} if @_hash.nil?
23
23
  @_hash['request_id'] = 'RequestId'
24
- @_hash['status'] = 'Status'
24
+ @_hash['error'] = 'Error'
25
25
  @_hash
26
26
  end
27
27
 
@@ -29,7 +29,7 @@ module ShellCardManagementApIs
29
29
  def self.optionals
30
30
  %w[
31
31
  request_id
32
- status
32
+ error
33
33
  ]
34
34
  end
35
35
 
@@ -38,10 +38,9 @@ module ShellCardManagementApIs
38
38
  []
39
39
  end
40
40
 
41
- def initialize(request_id = SKIP,
42
- status = SKIP)
41
+ def initialize(request_id = SKIP, error = SKIP)
43
42
  @request_id = request_id unless request_id == SKIP
44
- @status = status unless status == SKIP
43
+ @error = error unless error == SKIP
45
44
  end
46
45
 
47
46
  # Creates an instance of the object from a hash.
@@ -50,11 +49,11 @@ module ShellCardManagementApIs
50
49
 
51
50
  # Extract variables from the hash.
52
51
  request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
53
- status = hash.key?('Status') ? hash['Status'] : SKIP
52
+ error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
54
53
 
55
54
  # Create object from extracted values.
56
55
  DeleteBundleResponse.new(request_id,
57
- status)
56
+ error)
58
57
  end
59
58
  end
60
59
  end
@@ -39,11 +39,14 @@ module ShellCardManagementApIs
39
39
  # @return [TrueClass | FalseClass]
40
40
  attr_accessor :use_customer_default_address
41
41
 
42
- # Delivery address of card. This address will be used for card reissue and
43
- # PIN reminders in future.
44
- # Note: Mandatory when ‘UseCustomerDefaultAddress’ is set to ‘false’. The
45
- # field is ignored otherwise.
46
- # @return [UpdateCardRenewalAddress]
42
+ # Whether to use the default delivery address configured at customer (or
43
+ # card group) level as the delivery address for this card.
44
+ # Mandatory
45
+ # Note: If value is false then ‘UpdateCardRenewalAddress’ is mandatory. If
46
+ # value set to ‘True’ then
47
+ # ‘UpdateCardRenewalAddress’ may be null/empty. It will be ignored if
48
+ # provided.
49
+ # @return [UpdateCardRenewalAddress2]
47
50
  attr_accessor :update_card_renewal_address
48
51
 
49
52
  # A mapping from model property names to API property names.
@@ -72,10 +75,8 @@ module ShellCardManagementApIs
72
75
  []
73
76
  end
74
77
 
75
- def initialize(use_customer_default_address = false,
76
- card_id = SKIP,
77
- pan = SKIP,
78
- card_expiry_date = SKIP,
78
+ def initialize(use_customer_default_address = nil, card_id = SKIP,
79
+ pan = SKIP, card_expiry_date = SKIP,
79
80
  update_card_renewal_address = SKIP)
80
81
  @card_id = card_id unless card_id == SKIP
81
82
  @pan = pan unless pan == SKIP
@@ -92,13 +93,14 @@ module ShellCardManagementApIs
92
93
  return nil unless hash
93
94
 
94
95
  # Extract variables from the hash.
95
- use_customer_default_address = hash['UseCustomerDefaultAddress'] ||= false
96
+ use_customer_default_address =
97
+ hash.key?('UseCustomerDefaultAddress') ? hash['UseCustomerDefaultAddress'] : nil
96
98
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
97
99
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
98
100
  card_expiry_date =
99
101
  hash.key?('CardExpiryDate') ? hash['CardExpiryDate'] : SKIP
100
102
  if hash['UpdateCardRenewalAddress']
101
- update_card_renewal_address = UpdateCardRenewalAddress.from_hash(hash['UpdateCardRenewalAddress'])
103
+ update_card_renewal_address = UpdateCardRenewalAddress2.from_hash(hash['UpdateCardRenewalAddress'])
102
104
  end
103
105
 
104
106
  # Create object from extracted values.
@@ -64,11 +64,8 @@ module ShellCardManagementApIs
64
64
  []
65
65
  end
66
66
 
67
- def initialize(card_id = SKIP,
68
- card_pan = SKIP,
69
- account_id = SKIP,
70
- account_number = SKIP,
71
- reference_id = SKIP,
67
+ def initialize(card_id = SKIP, card_pan = SKIP, account_id = SKIP,
68
+ account_number = SKIP, reference_id = SKIP,
72
69
  error_info = SKIP)
73
70
  @card_id = card_id unless card_id == SKIP
74
71
  @card_pan = card_pan unless card_pan == SKIP
@@ -0,0 +1,98 @@
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
+ # DeliveryAddressUpdateReferences2 Model.
8
+ class DeliveryAddressUpdateReferences2 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # CardId
13
+ # @return [Integer]
14
+ attr_accessor :card_id
15
+
16
+ # PAN of the card.
17
+ # @return [String]
18
+ attr_accessor :card_pan
19
+
20
+ # AccountId
21
+ # @return [Integer]
22
+ attr_accessor :account_id
23
+
24
+ # Account number
25
+ # @return [String]
26
+ attr_accessor :account_number
27
+
28
+ # Individual delivery address update reference number for the delivery
29
+ # address update request.
30
+ # @return [Integer]
31
+ attr_accessor :reference_id
32
+
33
+ # Individual error information for the delivery address update request.
34
+ # @return [String]
35
+ attr_accessor :error_info
36
+
37
+ # A mapping from model property names to API property names.
38
+ def self.names
39
+ @_hash = {} if @_hash.nil?
40
+ @_hash['card_id'] = 'CardId'
41
+ @_hash['card_pan'] = 'CardPAN'
42
+ @_hash['account_id'] = 'AccountId'
43
+ @_hash['account_number'] = 'AccountNumber'
44
+ @_hash['reference_id'] = 'ReferenceId'
45
+ @_hash['error_info'] = 'ErrorInfo'
46
+ @_hash
47
+ end
48
+
49
+ # An array for optional fields
50
+ def self.optionals
51
+ %w[
52
+ card_id
53
+ card_pan
54
+ account_id
55
+ account_number
56
+ reference_id
57
+ error_info
58
+ ]
59
+ end
60
+
61
+ # An array for nullable fields
62
+ def self.nullables
63
+ []
64
+ end
65
+
66
+ def initialize(card_id = SKIP, card_pan = SKIP, account_id = SKIP,
67
+ account_number = SKIP, reference_id = SKIP,
68
+ error_info = SKIP)
69
+ @card_id = card_id unless card_id == SKIP
70
+ @card_pan = card_pan unless card_pan == SKIP
71
+ @account_id = account_id unless account_id == SKIP
72
+ @account_number = account_number unless account_number == SKIP
73
+ @reference_id = reference_id unless reference_id == SKIP
74
+ @error_info = error_info unless error_info == SKIP
75
+ end
76
+
77
+ # Creates an instance of the object from a hash.
78
+ def self.from_hash(hash)
79
+ return nil unless hash
80
+
81
+ # Extract variables from the hash.
82
+ card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
83
+ card_pan = hash.key?('CardPAN') ? hash['CardPAN'] : SKIP
84
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
85
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
86
+ reference_id = hash.key?('ReferenceId') ? hash['ReferenceId'] : SKIP
87
+ error_info = hash.key?('ErrorInfo') ? hash['ErrorInfo'] : SKIP
88
+
89
+ # Create object from extracted values.
90
+ DeliveryAddressUpdateReferences2.new(card_id,
91
+ card_pan,
92
+ account_id,
93
+ account_number,
94
+ reference_id,
95
+ error_info)
96
+ end
97
+ end
98
+ end
@@ -78,13 +78,9 @@ module ShellCardManagementApIs
78
78
  []
79
79
  end
80
80
 
81
- def initialize(col_co_id = SKIP,
82
- col_co_code = SKIP,
83
- payer_id = SKIP,
84
- payer_number = SKIP,
85
- account_id = SKIP,
86
- account_number = SKIP,
87
- delivery_address_updates = SKIP)
81
+ def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
82
+ payer_number = SKIP, account_id = SKIP,
83
+ account_number = SKIP, delivery_address_updates = SKIP)
88
84
  @col_co_id = col_co_id unless col_co_id == SKIP
89
85
  @col_co_code = col_co_code unless col_co_code == SKIP
90
86
  @payer_id = payer_id unless payer_id == SKIP
@@ -18,7 +18,7 @@ module ShellCardManagementApIs
18
18
  attr_accessor :service_reference
19
19
 
20
20
  # Service reference number for tracking.
21
- # @return [Array[DeliveryAddressUpdateReferences]]
21
+ # @return [DeliveryAddressUpdateReferences2]
22
22
  attr_accessor :delivery_address_update_references
23
23
 
24
24
  # Service reference number for tracking.
@@ -51,10 +51,8 @@ module ShellCardManagementApIs
51
51
  []
52
52
  end
53
53
 
54
- def initialize(request_id = SKIP,
55
- service_reference = SKIP,
56
- delivery_address_update_references = SKIP,
57
- error = SKIP)
54
+ def initialize(request_id = SKIP, service_reference = SKIP,
55
+ delivery_address_update_references = SKIP, error = SKIP)
58
56
  @request_id = request_id unless request_id == SKIP
59
57
  @service_reference = service_reference unless service_reference == SKIP
60
58
  unless delivery_address_update_references == SKIP
@@ -72,16 +70,9 @@ module ShellCardManagementApIs
72
70
  request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
73
71
  service_reference =
74
72
  hash.key?('ServiceReference') ? hash['ServiceReference'] : SKIP
75
- # Parameter is an array, so we need to iterate through it
76
- delivery_address_update_references = nil
77
- unless hash['DeliveryAddressUpdateReferences'].nil?
78
- delivery_address_update_references = []
79
- hash['DeliveryAddressUpdateReferences'].each do |structure|
80
- delivery_address_update_references << (DeliveryAddressUpdateReferences.from_hash(structure) if structure)
81
- end
73
+ if hash['DeliveryAddressUpdateReferences']
74
+ delivery_address_update_references = DeliveryAddressUpdateReferences2.from_hash(hash['DeliveryAddressUpdateReferences'])
82
75
  end
83
-
84
- delivery_address_update_references = SKIP unless hash.key?('DeliveryAddressUpdateReferences')
85
76
  error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
86
77
 
87
78
  # Create object from extracted values.
@@ -164,24 +164,13 @@ module ShellCardManagementApIs
164
164
  ]
165
165
  end
166
166
 
167
- def initialize(address_id = SKIP,
168
- address_line1 = SKIP,
169
- address_line2 = SKIP,
170
- address_line3 = SKIP,
171
- city = SKIP,
172
- company_name = SKIP,
173
- contact_fore_name = SKIP,
174
- contact_last_name = SKIP,
175
- contact_middle_name = SKIP,
176
- contact_title = SKIP,
177
- country = SKIP,
178
- country_id = SKIP,
179
- country_iso_code = SKIP,
180
- fax = SKIP,
181
- region = SKIP,
182
- region_id = SKIP,
183
- telephone = SKIP,
184
- zip_code = SKIP,
167
+ def initialize(address_id = SKIP, address_line1 = SKIP,
168
+ address_line2 = SKIP, address_line3 = SKIP, city = SKIP,
169
+ company_name = SKIP, contact_fore_name = SKIP,
170
+ contact_last_name = SKIP, contact_middle_name = SKIP,
171
+ contact_title = SKIP, country = SKIP, country_id = SKIP,
172
+ country_iso_code = SKIP, fax = SKIP, region = SKIP,
173
+ region_id = SKIP, telephone = SKIP, zip_code = SKIP,
185
174
  address_type = SKIP)
186
175
  @address_id = address_id unless address_id == SKIP
187
176
  @address_line1 = address_line1 unless address_line1 == SKIP
@@ -0,0 +1,50 @@
1
+ # shell_card_management_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellCardManagementApIs
7
+ # Detail Model.
8
+ class Detail < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Error code
13
+ # @return [String]
14
+ attr_accessor :errorcode
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['errorcode'] = 'errorcode'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ errorcode
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(errorcode = SKIP)
36
+ @errorcode = errorcode unless errorcode == 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
+ errorcode = hash.key?('errorcode') ? hash['errorcode'] : SKIP
45
+
46
+ # Create object from extracted values.
47
+ Detail.new(errorcode)
48
+ end
49
+ end
50
+ end
@@ -48,8 +48,7 @@ module ShellCardManagementApIs
48
48
  ]
49
49
  end
50
50
 
51
- def initialize(col_co_id = SKIP,
52
- col_co_code = SKIP,
51
+ def initialize(col_co_id = SKIP, col_co_code = SKIP,
53
52
  account_group_id = SKIP)
54
53
  @col_co_id = col_co_id unless col_co_id == SKIP
55
54
  @col_co_code = col_co_code unless col_co_code == SKIP
@@ -50,9 +50,7 @@ module ShellCardManagementApIs
50
50
  []
51
51
  end
52
52
 
53
- def initialize(code = SKIP,
54
- title = SKIP,
55
- detail = SKIP,
53
+ def initialize(code = SKIP, title = SKIP, detail = SKIP,
56
54
  additional_info = SKIP)
57
55
  @code = code unless code == SKIP
58
56
  @title = title unless title == SKIP
@@ -38,8 +38,7 @@ module ShellCardManagementApIs
38
38
  []
39
39
  end
40
40
 
41
- def initialize(code = SKIP,
42
- description = SKIP)
41
+ def initialize(code = SKIP, description = SKIP)
43
42
  @code = code unless code == SKIP
44
43
  @description = description unless description == SKIP
45
44
  end
@@ -38,8 +38,7 @@ module ShellCardManagementApIs
38
38
  []
39
39
  end
40
40
 
41
- def initialize(code = SKIP,
42
- description = SKIP)
41
+ def initialize(code = SKIP, description = SKIP)
43
42
  @code = code unless code == SKIP
44
43
  @description = description unless description == SKIP
45
44
  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
+ # Fault Model.
8
+ class Fault < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Error Description
13
+ # @return [String]
14
+ attr_accessor :faultstring
15
+
16
+ # Error Description
17
+ # @return [Detail]
18
+ attr_accessor :detail
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['faultstring'] = 'faultstring'
24
+ @_hash['detail'] = 'detail'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ faultstring
32
+ detail
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(faultstring = SKIP, detail = SKIP)
42
+ @faultstring = faultstring unless faultstring == SKIP
43
+ @detail = detail unless detail == SKIP
44
+ end
45
+
46
+ # Creates an instance of the object from a hash.
47
+ def self.from_hash(hash)
48
+ return nil unless hash
49
+
50
+ # Extract variables from the hash.
51
+ faultstring = hash.key?('faultstring') ? hash['faultstring'] : SKIP
52
+ detail = Detail.from_hash(hash['detail']) if hash['detail']
53
+
54
+ # Create object from extracted values.
55
+ Fault.new(faultstring,
56
+ detail)
57
+ end
58
+ end
59
+ end