card-management-sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +88 -0
  4. data/lib/shell_card_management_ap_is/api_helper.rb +10 -0
  5. data/lib/shell_card_management_ap_is/client.rb +85 -0
  6. data/lib/shell_card_management_ap_is/configuration.rb +117 -0
  7. data/lib/shell_card_management_ap_is/controllers/base_controller.rb +66 -0
  8. data/lib/shell_card_management_ap_is/controllers/card_controller.rb +1047 -0
  9. data/lib/shell_card_management_ap_is/controllers/customer_controller.rb +538 -0
  10. data/lib/shell_card_management_ap_is/controllers/o_auth_authorization_controller.rb +42 -0
  11. data/lib/shell_card_management_ap_is/controllers/restriction_controller.rb +496 -0
  12. data/lib/shell_card_management_ap_is/exceptions/api_exception.rb +10 -0
  13. data/lib/shell_card_management_ap_is/exceptions/default_error_exception.rb +32 -0
  14. data/lib/shell_card_management_ap_is/exceptions/error_object_exception.rb +54 -0
  15. data/lib/shell_card_management_ap_is/exceptions/error_user_access_error1_exception.rb +32 -0
  16. data/lib/shell_card_management_ap_is/exceptions/o_auth_provider_exception.rb +48 -0
  17. data/lib/shell_card_management_ap_is/http/auth/basic_auth.rb +50 -0
  18. data/lib/shell_card_management_ap_is/http/auth/bearer_token.rb +89 -0
  19. data/lib/shell_card_management_ap_is/http/http_call_back.rb +10 -0
  20. data/lib/shell_card_management_ap_is/http/http_method_enum.rb +10 -0
  21. data/lib/shell_card_management_ap_is/http/http_request.rb +10 -0
  22. data/lib/shell_card_management_ap_is/http/http_response.rb +10 -0
  23. data/lib/shell_card_management_ap_is/models/account_access.rb +128 -0
  24. data/lib/shell_card_management_ap_is/models/account_request.rb +252 -0
  25. data/lib/shell_card_management_ap_is/models/account_response.rb +111 -0
  26. data/lib/shell_card_management_ap_is/models/account_response_accounts_items.rb +750 -0
  27. data/lib/shell_card_management_ap_is/models/account_restriction_request.rb +131 -0
  28. data/lib/shell_card_management_ap_is/models/account_restriction_response.rb +60 -0
  29. data/lib/shell_card_management_ap_is/models/account_velocity_limit.rb +145 -0
  30. data/lib/shell_card_management_ap_is/models/accounts.rb +65 -0
  31. data/lib/shell_card_management_ap_is/models/address.rb +174 -0
  32. data/lib/shell_card_management_ap_is/models/audit_request.rb +256 -0
  33. data/lib/shell_card_management_ap_is/models/audit_response.rb +111 -0
  34. data/lib/shell_card_management_ap_is/models/audit_response_audits_items.rb +450 -0
  35. data/lib/shell_card_management_ap_is/models/auto_renew_card_request.rb +111 -0
  36. data/lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb +98 -0
  37. data/lib/shell_card_management_ap_is/models/auto_renew_card_response.rb +92 -0
  38. data/lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb +64 -0
  39. data/lib/shell_card_management_ap_is/models/bank_account.rb +192 -0
  40. data/lib/shell_card_management_ap_is/models/base_model.rb +62 -0
  41. data/lib/shell_card_management_ap_is/models/bundle_restriction.rb +166 -0
  42. data/lib/shell_card_management_ap_is/models/cancel_card_request.rb +107 -0
  43. data/lib/shell_card_management_ap_is/models/cancel_card_response.rb +127 -0
  44. data/lib/shell_card_management_ap_is/models/card.rb +696 -0
  45. data/lib/shell_card_management_ap_is/models/card_block_schedule.rb +65 -0
  46. data/lib/shell_card_management_ap_is/models/card_day_time_restrictions.rb +159 -0
  47. data/lib/shell_card_management_ap_is/models/card_delivery_contact.rb +230 -0
  48. data/lib/shell_card_management_ap_is/models/card_detail.rb +661 -0
  49. data/lib/shell_card_management_ap_is/models/card_detail_auto_renew_enum.rb +28 -0
  50. data/lib/shell_card_management_ap_is/models/card_details_request.rb +260 -0
  51. data/lib/shell_card_management_ap_is/models/card_details_response.rb +1058 -0
  52. data/lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb +60 -0
  53. data/lib/shell_card_management_ap_is/models/card_details_response_card_delivery_address.rb +227 -0
  54. data/lib/shell_card_management_ap_is/models/card_details_response_fuel_sets_items.rb +58 -0
  55. data/lib/shell_card_management_ap_is/models/card_details_response_international_pos_language_code_enum.rb +118 -0
  56. data/lib/shell_card_management_ap_is/models/card_details_response_international_pos_language_id_enum.rb +118 -0
  57. data/lib/shell_card_management_ap_is/models/card_details_response_local_pos_language_code_enum.rb +118 -0
  58. data/lib/shell_card_management_ap_is/models/card_details_response_local_pos_language_id_enum.rb +118 -0
  59. data/lib/shell_card_management_ap_is/models/card_details_response_non_fuel_sets_items.rb +58 -0
  60. data/lib/shell_card_management_ap_is/models/card_details_response_pin_delivery_address.rb +231 -0
  61. data/lib/shell_card_management_ap_is/models/card_details_response_pin_type_enum.rb +23 -0
  62. data/lib/shell_card_management_ap_is/models/card_details_response_reissue_setting_enum.rb +26 -0
  63. data/lib/shell_card_management_ap_is/models/card_details_response_renewed_card_reissue_setting_enum.rb +25 -0
  64. data/lib/shell_card_management_ap_is/models/card_details_response_status_id_enum.rb +83 -0
  65. data/lib/shell_card_management_ap_is/models/card_group_request.rb +178 -0
  66. data/lib/shell_card_management_ap_is/models/card_group_response.rb +109 -0
  67. data/lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb +301 -0
  68. data/lib/shell_card_management_ap_is/models/card_move_request.rb +163 -0
  69. data/lib/shell_card_management_ap_is/models/card_move_request_cards_items.rb +80 -0
  70. data/lib/shell_card_management_ap_is/models/card_move_response.rb +112 -0
  71. data/lib/shell_card_management_ap_is/models/card_move_response_error_cards_items.rb +112 -0
  72. data/lib/shell_card_management_ap_is/models/card_move_response_successful_requests_items.rb +97 -0
  73. data/lib/shell_card_management_ap_is/models/card_search_response.rb +126 -0
  74. data/lib/shell_card_management_ap_is/models/card_summary_request.rb +52 -0
  75. data/lib/shell_card_management_ap_is/models/card_summary_response.rb +82 -0
  76. data/lib/shell_card_management_ap_is/models/card_type_request.rb +145 -0
  77. data/lib/shell_card_management_ap_is/models/card_type_response.rb +79 -0
  78. data/lib/shell_card_management_ap_is/models/card_type_response_customer_card_types_items.rb +470 -0
  79. data/lib/shell_card_management_ap_is/models/card_type_response_error.rb +60 -0
  80. data/lib/shell_card_management_ap_is/models/card_usage_restrictions.rb +281 -0
  81. data/lib/shell_card_management_ap_is/models/col_co_access.rb +88 -0
  82. data/lib/shell_card_management_ap_is/models/create_bundle_request.rb +167 -0
  83. data/lib/shell_card_management_ap_is/models/create_bundle_request_restrictions.rb +147 -0
  84. data/lib/shell_card_management_ap_is/models/create_bundle_response.rb +98 -0
  85. data/lib/shell_card_management_ap_is/models/create_bundle_response_data_items.rb +125 -0
  86. data/lib/shell_card_management_ap_is/models/create_bundle_response_data_items_cards_items.rb +50 -0
  87. data/lib/shell_card_management_ap_is/models/create_card_group_request.rb +161 -0
  88. data/lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb +84 -0
  89. data/lib/shell_card_management_ap_is/models/create_card_group_response.rb +130 -0
  90. data/lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb +81 -0
  91. data/lib/shell_card_management_ap_is/models/create_card_group_response_successful_requests_items.rb +71 -0
  92. data/lib/shell_card_management_ap_is/models/create_card_response.rb +65 -0
  93. data/lib/shell_card_management_ap_is/models/customer_contract.rb +63 -0
  94. data/lib/shell_card_management_ap_is/models/customer_detail_request.rb +123 -0
  95. data/lib/shell_card_management_ap_is/models/customer_detail_response.rb +437 -0
  96. data/lib/shell_card_management_ap_is/models/day_time_restrictions.rb +162 -0
  97. data/lib/shell_card_management_ap_is/models/default_error_fault.rb +60 -0
  98. data/lib/shell_card_management_ap_is/models/default_error_fault_detail.rb +50 -0
  99. data/lib/shell_card_management_ap_is/models/delete_bundle_request.rb +126 -0
  100. data/lib/shell_card_management_ap_is/models/delete_bundle_response.rb +60 -0
  101. data/lib/shell_card_management_ap_is/models/delivery_address_update.rb +112 -0
  102. data/lib/shell_card_management_ap_is/models/delivery_address_update_references.rb +102 -0
  103. data/lib/shell_card_management_ap_is/models/delivery_address_update_request.rb +129 -0
  104. data/lib/shell_card_management_ap_is/models/delivery_address_update_response.rb +94 -0
  105. data/lib/shell_card_management_ap_is/models/delivery_addresses.rb +258 -0
  106. data/lib/shell_card_management_ap_is/models/eid_access.rb +75 -0
  107. data/lib/shell_card_management_ap_is/models/error_details.rb +81 -0
  108. data/lib/shell_card_management_ap_is/models/error_status.rb +60 -0
  109. data/lib/shell_card_management_ap_is/models/error_user_access.rb +50 -0
  110. data/lib/shell_card_management_ap_is/models/error_user_access_error.rb +60 -0
  111. data/lib/shell_card_management_ap_is/models/finance_currency.rb +98 -0
  112. data/lib/shell_card_management_ap_is/models/generate_pin_key_response.rb +60 -0
  113. data/lib/shell_card_management_ap_is/models/invoice_distribution_method.rb +99 -0
  114. data/lib/shell_card_management_ap_is/models/location_restrictions.rb +125 -0
  115. data/lib/shell_card_management_ap_is/models/location_restrictions_country_restrictions.rb +65 -0
  116. data/lib/shell_card_management_ap_is/models/location_restrictions_network_restrictions_items.rb +77 -0
  117. data/lib/shell_card_management_ap_is/models/location_restrictions_partner_site_restrictions_items.rb +95 -0
  118. data/lib/shell_card_management_ap_is/models/location_restrictions_shell_site_restrictions_items.rb +95 -0
  119. data/lib/shell_card_management_ap_is/models/logged_in_user_request.rb +107 -0
  120. data/lib/shell_card_management_ap_is/models/logged_in_user_response.rb +394 -0
  121. data/lib/shell_card_management_ap_is/models/o_auth_provider_error_enum.rb +45 -0
  122. data/lib/shell_card_management_ap_is/models/o_auth_token.rb +100 -0
  123. data/lib/shell_card_management_ap_is/models/order_card_enquiry.rb +502 -0
  124. data/lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb +208 -0
  125. data/lib/shell_card_management_ap_is/models/order_card_enquiry_req_reference_type_enum.rb +32 -0
  126. data/lib/shell_card_management_ap_is/models/order_card_enquiry_request.rb +51 -0
  127. data/lib/shell_card_management_ap_is/models/order_card_enquiry_response.rb +79 -0
  128. data/lib/shell_card_management_ap_is/models/order_card_request.rb +60 -0
  129. data/lib/shell_card_management_ap_is/models/order_card_response.rb +90 -0
  130. data/lib/shell_card_management_ap_is/models/payer_access.rb +147 -0
  131. data/lib/shell_card_management_ap_is/models/payer_details.rb +1412 -0
  132. data/lib/shell_card_management_ap_is/models/payer_request.rb +126 -0
  133. data/lib/shell_card_management_ap_is/models/payer_response.rb +115 -0
  134. data/lib/shell_card_management_ap_is/models/payers.rb +109 -0
  135. data/lib/shell_card_management_ap_is/models/pin_advice_types.rb +80 -0
  136. data/lib/shell_card_management_ap_is/models/pin_delivery_contact.rb +242 -0
  137. data/lib/shell_card_management_ap_is/models/pin_delivery_details.rb +169 -0
  138. data/lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb +137 -0
  139. data/lib/shell_card_management_ap_is/models/pin_reminder_reference.rb +99 -0
  140. data/lib/shell_card_management_ap_is/models/pin_reminder_request.rb +135 -0
  141. data/lib/shell_card_management_ap_is/models/pin_reminder_response.rb +90 -0
  142. data/lib/shell_card_management_ap_is/models/product_all_of0.rb +62 -0
  143. data/lib/shell_card_management_ap_is/models/product_group.rb +116 -0
  144. data/lib/shell_card_management_ap_is/models/product_restrictions.rb +66 -0
  145. data/lib/shell_card_management_ap_is/models/purchase_categories.rb +114 -0
  146. data/lib/shell_card_management_ap_is/models/purchase_category1_all_of0.rb +140 -0
  147. data/lib/shell_card_management_ap_is/models/purchase_category_request.rb +114 -0
  148. data/lib/shell_card_management_ap_is/models/purchase_category_response.rb +69 -0
  149. data/lib/shell_card_management_ap_is/models/replace_card_settings.rb +641 -0
  150. data/lib/shell_card_management_ap_is/models/restriction_card_request.rb +115 -0
  151. data/lib/shell_card_management_ap_is/models/restriction_card_request_cards_items.rb +220 -0
  152. data/lib/shell_card_management_ap_is/models/restriction_card_response.rb +91 -0
  153. data/lib/shell_card_management_ap_is/models/restriction_card_response_data_items.rb +240 -0
  154. data/lib/shell_card_management_ap_is/models/restriction_search_card_request.rb +50 -0
  155. data/lib/shell_card_management_ap_is/models/restriction_search_card_request_filters.rb +177 -0
  156. data/lib/shell_card_management_ap_is/models/restriction_search_card_request_filters_cards_items.rb +63 -0
  157. data/lib/shell_card_management_ap_is/models/restriction_search_card_response.rb +79 -0
  158. data/lib/shell_card_management_ap_is/models/restriction_search_card_response_data_items.rb +514 -0
  159. data/lib/shell_card_management_ap_is/models/role.rb +102 -0
  160. data/lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb +249 -0
  161. data/lib/shell_card_management_ap_is/models/schedule_card_block_request.rb +77 -0
  162. data/lib/shell_card_management_ap_is/models/schedule_card_block_response.rb +91 -0
  163. data/lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb +89 -0
  164. data/lib/shell_card_management_ap_is/models/search_account_limit_request.rb +50 -0
  165. data/lib/shell_card_management_ap_is/models/search_account_limit_request_filters.rb +118 -0
  166. data/lib/shell_card_management_ap_is/models/search_account_limit_response.rb +70 -0
  167. data/lib/shell_card_management_ap_is/models/search_account_limit_response_data.rb +106 -0
  168. data/lib/shell_card_management_ap_is/models/search_card.rb +66 -0
  169. data/lib/shell_card_management_ap_is/models/search_card_request.rb +72 -0
  170. data/lib/shell_card_management_ap_is/models/search_card_response_restrictions.rb +99 -0
  171. data/lib/shell_card_management_ap_is/models/search_product_restriction.rb +78 -0
  172. data/lib/shell_card_management_ap_is/models/search_request.rb +724 -0
  173. data/lib/shell_card_management_ap_is/models/submitted_card.rb +183 -0
  174. data/lib/shell_card_management_ap_is/models/summary_of_bundle_request.rb +50 -0
  175. data/lib/shell_card_management_ap_is/models/summary_of_bundle_response.rb +79 -0
  176. data/lib/shell_card_management_ap_is/models/summary_of_bundle_response_data_items.rb +123 -0
  177. data/lib/shell_card_management_ap_is/models/summary_of_bundle_response_data_items_card_bundles_items.rb +86 -0
  178. data/lib/shell_card_management_ap_is/models/summary_request.rb +598 -0
  179. data/lib/shell_card_management_ap_is/models/summary_response.rb +184 -0
  180. data/lib/shell_card_management_ap_is/models/summaryof_bundle.rb +126 -0
  181. data/lib/shell_card_management_ap_is/models/update_bundle_request.rb +194 -0
  182. data/lib/shell_card_management_ap_is/models/update_bundle_response.rb +70 -0
  183. data/lib/shell_card_management_ap_is/models/update_card.rb +316 -0
  184. data/lib/shell_card_management_ap_is/models/update_card_group_request.rb +258 -0
  185. data/lib/shell_card_management_ap_is/models/update_card_group_response.rb +130 -0
  186. data/lib/shell_card_management_ap_is/models/update_card_group_response_move_card_references_items.rb +77 -0
  187. data/lib/shell_card_management_ap_is/models/update_card_renewal_address.rb +163 -0
  188. data/lib/shell_card_management_ap_is/models/update_card_status_request.rb +124 -0
  189. data/lib/shell_card_management_ap_is/models/update_card_status_response.rb +133 -0
  190. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request.rb +112 -0
  191. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb +105 -0
  192. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_response.rb +60 -0
  193. data/lib/shell_card_management_ap_is/models/url_enum.rb +23 -0
  194. data/lib/shell_card_management_ap_is/models/usage_restrictions.rb +311 -0
  195. data/lib/shell_card_management_ap_is/utilities/date_time_helper.rb +11 -0
  196. data/lib/shell_card_management_ap_is/utilities/file_wrapper.rb +16 -0
  197. data/lib/shell_card_management_ap_is.rb +288 -0
  198. metadata +283 -0
@@ -0,0 +1,60 @@
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
+ # GeneratePINKeyResponse Model.
8
+ class GeneratePINKeyResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Random generated unique identifier.
13
+ # @return [String]
14
+ attr_accessor :uid
15
+
16
+ # Random generated unique identifier.
17
+ # @return [String]
18
+ attr_accessor :value
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['uid'] = 'uid'
24
+ @_hash['value'] = 'value'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ uid
32
+ value
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(uid = SKIP,
42
+ value = SKIP)
43
+ @uid = uid unless uid == SKIP
44
+ @value = value unless value == SKIP
45
+ end
46
+
47
+ # Creates an instance of the object from a hash.
48
+ def self.from_hash(hash)
49
+ return nil unless hash
50
+
51
+ # Extract variables from the hash.
52
+ uid = hash.key?('uid') ? hash['uid'] : SKIP
53
+ value = hash.key?('value') ? hash['value'] : SKIP
54
+
55
+ # Create object from extracted values.
56
+ GeneratePINKeyResponse.new(uid,
57
+ value)
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,99 @@
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
+ # InvoiceDistributionMethod Model.
8
+ class InvoiceDistributionMethod < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # If True then this distribution method is the default distribution method.
13
+ # @return [TrueClass | FalseClass]
14
+ attr_accessor :is_primary
15
+
16
+ # Frequency type unit Id & description
17
+ # E.g.:
18
+ # 1- Daily
19
+ # 2-Weekly
20
+ # 3-Monthly
21
+ # 4-Invoicing
22
+ # 6-Calendar quarter
23
+ # @return [String]
24
+ attr_accessor :frequency_type
25
+
26
+ # Invoice Distribution Method (Id-Description)
27
+ # E.g.:
28
+ # 1-e-mail
29
+ # 2-Fax
30
+ # 3-Courier to Customer
31
+ # 4-Courier to Client
32
+ # 5-Print
33
+ # 6-FTP
34
+ # 7-SMS
35
+ # @return [String]
36
+ attr_accessor :distribution_method
37
+
38
+ # Invoice output type (Id - Description)
39
+ # @return [String]
40
+ attr_accessor :output_type
41
+
42
+ # A mapping from model property names to API property names.
43
+ def self.names
44
+ @_hash = {} if @_hash.nil?
45
+ @_hash['is_primary'] = 'IsPrimary'
46
+ @_hash['frequency_type'] = 'FrequencyType'
47
+ @_hash['distribution_method'] = 'DistributionMethod'
48
+ @_hash['output_type'] = 'OutputType'
49
+ @_hash
50
+ end
51
+
52
+ # An array for optional fields
53
+ def self.optionals
54
+ %w[
55
+ is_primary
56
+ frequency_type
57
+ distribution_method
58
+ output_type
59
+ ]
60
+ end
61
+
62
+ # An array for nullable fields
63
+ def self.nullables
64
+ %w[
65
+ frequency_type
66
+ distribution_method
67
+ output_type
68
+ ]
69
+ end
70
+
71
+ def initialize(is_primary = true,
72
+ frequency_type = SKIP,
73
+ distribution_method = SKIP,
74
+ output_type = SKIP)
75
+ @is_primary = is_primary unless is_primary == SKIP
76
+ @frequency_type = frequency_type unless frequency_type == SKIP
77
+ @distribution_method = distribution_method unless distribution_method == SKIP
78
+ @output_type = output_type unless output_type == SKIP
79
+ end
80
+
81
+ # Creates an instance of the object from a hash.
82
+ def self.from_hash(hash)
83
+ return nil unless hash
84
+
85
+ # Extract variables from the hash.
86
+ is_primary = hash['IsPrimary'] ||= true
87
+ frequency_type = hash.key?('FrequencyType') ? hash['FrequencyType'] : SKIP
88
+ distribution_method =
89
+ hash.key?('DistributionMethod') ? hash['DistributionMethod'] : SKIP
90
+ output_type = hash.key?('OutputType') ? hash['OutputType'] : SKIP
91
+
92
+ # Create object from extracted values.
93
+ InvoiceDistributionMethod.new(is_primary,
94
+ frequency_type,
95
+ distribution_method,
96
+ output_type)
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,125 @@
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
+ # Location restrictions to be applied on the bundle which either allows or
8
+ # restricts using the cards, which are under the bundle, in the specified
9
+ # locations. Mandatory if respective action is set as “Add”. Details of
10
+ # location restrictions are given below.
11
+ class LocationRestrictions < BaseModel
12
+ SKIP = Object.new
13
+ private_constant :SKIP
14
+
15
+ # An entity that encapsulate the country restrictions.
16
+ # Optional.
17
+ # @return [LocationRestrictionsCountryRestrictions]
18
+ attr_accessor :country_restrictions
19
+
20
+ # A list of NetworkRestriction entity. Each item in the list encapsulates a
21
+ # network restriction in a given country.
22
+ # Optional.
23
+ # The details of the entity are described below:
24
+ # @return [Array[LocationRestrictionsNetworkRestrictionsItems]]
25
+ attr_accessor :network_restrictions
26
+
27
+ # A list of ShellSiteRestriction entity. Each item in the list encapsulates
28
+ # a site restriction of Shell network in a given country.
29
+ # Optional.
30
+ # The details of the entity are described below.
31
+ # @return [Array[LocationRestrictionsShellSiteRestrictionsItems]]
32
+ attr_accessor :shell_site_restrictions
33
+
34
+ # A list of PartnerSiteRestriction entity. Each item in the list
35
+ # encapsulates a site restriction of a given partner network.
36
+ # Optional.
37
+ # The details of the entity are described below.
38
+ # @return [Array[LocationRestrictionsPartnerSiteRestrictionsItems]]
39
+ attr_accessor :partner_site_restrictions
40
+
41
+ # A mapping from model property names to API property names.
42
+ def self.names
43
+ @_hash = {} if @_hash.nil?
44
+ @_hash['country_restrictions'] = 'CountryRestrictions'
45
+ @_hash['network_restrictions'] = 'NetworkRestrictions'
46
+ @_hash['shell_site_restrictions'] = 'ShellSiteRestrictions'
47
+ @_hash['partner_site_restrictions'] = 'PartnerSiteRestrictions'
48
+ @_hash
49
+ end
50
+
51
+ # An array for optional fields
52
+ def self.optionals
53
+ %w[
54
+ country_restrictions
55
+ network_restrictions
56
+ shell_site_restrictions
57
+ partner_site_restrictions
58
+ ]
59
+ end
60
+
61
+ # An array for nullable fields
62
+ def self.nullables
63
+ []
64
+ end
65
+
66
+ def initialize(country_restrictions = SKIP,
67
+ network_restrictions = SKIP,
68
+ shell_site_restrictions = SKIP,
69
+ partner_site_restrictions = SKIP)
70
+ @country_restrictions = country_restrictions unless country_restrictions == SKIP
71
+ @network_restrictions = network_restrictions unless network_restrictions == SKIP
72
+ @shell_site_restrictions = shell_site_restrictions unless shell_site_restrictions == SKIP
73
+ unless partner_site_restrictions == SKIP
74
+ @partner_site_restrictions =
75
+ partner_site_restrictions
76
+ end
77
+ end
78
+
79
+ # Creates an instance of the object from a hash.
80
+ def self.from_hash(hash)
81
+ return nil unless hash
82
+
83
+ # Extract variables from the hash.
84
+ if hash['CountryRestrictions']
85
+ country_restrictions = LocationRestrictionsCountryRestrictions.from_hash(hash['CountryRestrictions'])
86
+ end
87
+ # Parameter is an array, so we need to iterate through it
88
+ network_restrictions = nil
89
+ unless hash['NetworkRestrictions'].nil?
90
+ network_restrictions = []
91
+ hash['NetworkRestrictions'].each do |structure|
92
+ network_restrictions << (LocationRestrictionsNetworkRestrictionsItems.from_hash(structure) if structure)
93
+ end
94
+ end
95
+
96
+ network_restrictions = SKIP unless hash.key?('NetworkRestrictions')
97
+ # Parameter is an array, so we need to iterate through it
98
+ shell_site_restrictions = nil
99
+ unless hash['ShellSiteRestrictions'].nil?
100
+ shell_site_restrictions = []
101
+ hash['ShellSiteRestrictions'].each do |structure|
102
+ shell_site_restrictions << (LocationRestrictionsShellSiteRestrictionsItems.from_hash(structure) if structure)
103
+ end
104
+ end
105
+
106
+ shell_site_restrictions = SKIP unless hash.key?('ShellSiteRestrictions')
107
+ # Parameter is an array, so we need to iterate through it
108
+ partner_site_restrictions = nil
109
+ unless hash['PartnerSiteRestrictions'].nil?
110
+ partner_site_restrictions = []
111
+ hash['PartnerSiteRestrictions'].each do |structure|
112
+ partner_site_restrictions << (LocationRestrictionsPartnerSiteRestrictionsItems.from_hash(structure) if structure)
113
+ end
114
+ end
115
+
116
+ partner_site_restrictions = SKIP unless hash.key?('PartnerSiteRestrictions')
117
+
118
+ # Create object from extracted values.
119
+ LocationRestrictions.new(country_restrictions,
120
+ network_restrictions,
121
+ shell_site_restrictions,
122
+ partner_site_restrictions)
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,65 @@
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
+ # An entity that encapsulate the country restrictions. Optional.
8
+ class LocationRestrictionsCountryRestrictions < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Boolean Flag indicates whether the profile is inclusive or exclusive.
13
+ # Mandatory
14
+ # Example: False - (inclusive), i.e. the “Countries” property lists the
15
+ # countries where the transactions will be allowed.
16
+ # True - (exclusive), i.e. the “Countries” property lists the countries
17
+ # where the transactions will be declined.
18
+ # @return [TrueClass | FalseClass]
19
+ attr_accessor :exclusive
20
+
21
+ # ISO 3166-1 Numeric-3 code of the country where the network restriction is
22
+ # applied.
23
+ # Example: 826 for United Kingdom.
24
+ # Mandatory
25
+ # @return [Array[String]]
26
+ attr_accessor :countries
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['exclusive'] = 'Exclusive'
32
+ @_hash['countries'] = 'Countries'
33
+ @_hash
34
+ end
35
+
36
+ # An array for optional fields
37
+ def self.optionals
38
+ []
39
+ end
40
+
41
+ # An array for nullable fields
42
+ def self.nullables
43
+ []
44
+ end
45
+
46
+ def initialize(exclusive = nil,
47
+ countries = nil)
48
+ @exclusive = exclusive
49
+ @countries = countries
50
+ end
51
+
52
+ # Creates an instance of the object from a hash.
53
+ def self.from_hash(hash)
54
+ return nil unless hash
55
+
56
+ # Extract variables from the hash.
57
+ exclusive = hash.key?('Exclusive') ? hash['Exclusive'] : nil
58
+ countries = hash.key?('Countries') ? hash['Countries'] : nil
59
+
60
+ # Create object from extracted values.
61
+ LocationRestrictionsCountryRestrictions.new(exclusive,
62
+ countries)
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,77 @@
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
+ # LocationRestrictionsNetworkRestrictionsItems Model.
8
+ class LocationRestrictionsNetworkRestrictionsItems < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # ISO 3166-1 Numeric-3 code of the country where the network restriction is
13
+ # applied.
14
+ # Example: 826 for United Kingdom.
15
+ # Mandatory
16
+ # @return [String]
17
+ attr_accessor :country
18
+
19
+ # Flag indicates whether the profile is inclusive or exclusive.
20
+ # Mandatory
21
+ # Example: False - (inclusive), i.e. the “Networks” property lists the
22
+ # networks in which the transaction will be allowed.
23
+ # True - (exclusive), i.e. the “Networks” property lists the networks in
24
+ # which the transactions will be declined.
25
+ # @return [TrueClass | FalseClass]
26
+ attr_accessor :exclusive
27
+
28
+ # A list of Gateway network codes, typically 7 or 10 digits.
29
+ # Example: 0002003250
30
+ # @return [Array[String]]
31
+ attr_accessor :networks
32
+
33
+ # A mapping from model property names to API property names.
34
+ def self.names
35
+ @_hash = {} if @_hash.nil?
36
+ @_hash['country'] = 'Country'
37
+ @_hash['exclusive'] = 'Exclusive'
38
+ @_hash['networks'] = 'Networks'
39
+ @_hash
40
+ end
41
+
42
+ # An array for optional fields
43
+ def self.optionals
44
+ %w[
45
+ networks
46
+ ]
47
+ end
48
+
49
+ # An array for nullable fields
50
+ def self.nullables
51
+ []
52
+ end
53
+
54
+ def initialize(country = nil,
55
+ exclusive = nil,
56
+ networks = SKIP)
57
+ @country = country
58
+ @exclusive = exclusive
59
+ @networks = networks unless networks == SKIP
60
+ end
61
+
62
+ # Creates an instance of the object from a hash.
63
+ def self.from_hash(hash)
64
+ return nil unless hash
65
+
66
+ # Extract variables from the hash.
67
+ country = hash.key?('Country') ? hash['Country'] : nil
68
+ exclusive = hash.key?('Exclusive') ? hash['Exclusive'] : nil
69
+ networks = hash.key?('Networks') ? hash['Networks'] : SKIP
70
+
71
+ # Create object from extracted values.
72
+ LocationRestrictionsNetworkRestrictionsItems.new(country,
73
+ exclusive,
74
+ networks)
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,95 @@
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
+ # LocationRestrictionsPartnerSiteRestrictionsItems Model.
8
+ class LocationRestrictionsPartnerSiteRestrictionsItems < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Gateway network codes, typically 7 or 10 digits, where sites and site
13
+ # groups belong to.
14
+ # Example: 0002003250
15
+ # Mandatory
16
+ # @return [String]
17
+ attr_accessor :network_code
18
+
19
+ # A list of Site IDs in this network which needs to be either restricted or
20
+ # allowed.
21
+ # For example, 97123, 97155
22
+ # A list of values must be passed for either Sites or SiteGroups or both.
23
+ # Max 10 sites are allowed for the Partner site Restriction.
24
+ # @return [Array[String]]
25
+ attr_accessor :sites
26
+
27
+ # A list of site group ids in this network which needs to be either
28
+ # restricted or allowed.
29
+ # For example, 83649200
30
+ # A list of values must be passed for either Sites or SiteGroups or both.
31
+ # Max 10 sites groups are allowed for the Partner site Restriction.
32
+ # @return [Array[String]]
33
+ attr_accessor :site_groups
34
+
35
+ # Flag indicates whether the profile is inclusive or exclusive.
36
+ # Mandatory
37
+ # Example: False - (inclusive), i.e. the “Sites” & “SiteGroups” properties
38
+ # lists the sites & site groups where the transaction will be allowed.
39
+ # True - (exclusive), i.e. the “Sites” & “SiteGroups” properties lists the
40
+ # sites and site groups where the transactions will be declined.
41
+ # @return [TrueClass | FalseClass]
42
+ attr_accessor :exclusive
43
+
44
+ # A mapping from model property names to API property names.
45
+ def self.names
46
+ @_hash = {} if @_hash.nil?
47
+ @_hash['network_code'] = 'NetworkCode'
48
+ @_hash['sites'] = 'Sites'
49
+ @_hash['site_groups'] = 'SiteGroups'
50
+ @_hash['exclusive'] = 'Exclusive'
51
+ @_hash
52
+ end
53
+
54
+ # An array for optional fields
55
+ def self.optionals
56
+ %w[
57
+ sites
58
+ site_groups
59
+ exclusive
60
+ ]
61
+ end
62
+
63
+ # An array for nullable fields
64
+ def self.nullables
65
+ []
66
+ end
67
+
68
+ def initialize(network_code = nil,
69
+ sites = SKIP,
70
+ site_groups = SKIP,
71
+ exclusive = SKIP)
72
+ @network_code = network_code
73
+ @sites = sites unless sites == SKIP
74
+ @site_groups = site_groups unless site_groups == SKIP
75
+ @exclusive = exclusive unless exclusive == SKIP
76
+ end
77
+
78
+ # Creates an instance of the object from a hash.
79
+ def self.from_hash(hash)
80
+ return nil unless hash
81
+
82
+ # Extract variables from the hash.
83
+ network_code = hash.key?('NetworkCode') ? hash['NetworkCode'] : nil
84
+ sites = hash.key?('Sites') ? hash['Sites'] : SKIP
85
+ site_groups = hash.key?('SiteGroups') ? hash['SiteGroups'] : SKIP
86
+ exclusive = hash.key?('Exclusive') ? hash['Exclusive'] : SKIP
87
+
88
+ # Create object from extracted values.
89
+ LocationRestrictionsPartnerSiteRestrictionsItems.new(network_code,
90
+ sites,
91
+ site_groups,
92
+ exclusive)
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,95 @@
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
+ # LocationRestrictionsShellSiteRestrictionsItems Model.
8
+ class LocationRestrictionsShellSiteRestrictionsItems < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # ISO 3166-1 Numeric-3 code of the country where the site restriction is
13
+ # applied.
14
+ # Example: 826 for United Kingdom.
15
+ # @return [String]
16
+ attr_accessor :country
17
+
18
+ # A list of Site IDs in this country, in the format “AA1111” where “AA” is a
19
+ # 2-character country code and “1111” is a 4-digit site number in that
20
+ # country, which needs to be either restricted or allowed.
21
+ # A list of values must be passed for either Sites or SiteGroups or both.
22
+ # Max 10 sites are allowed for the Shell site Restriction.
23
+ # For example, “GB1234”.
24
+ # @return [Array[String]]
25
+ attr_accessor :sites
26
+
27
+ # A list of site group ids in this country which needs to be either
28
+ # restricted or allowed.
29
+ # A list of values must be passed for either Sites or SiteGroups or both.
30
+ # Max 10 sites groups are allowed for the Shell site Restriction.
31
+ # @return [Array[String]]
32
+ attr_accessor :site_groups
33
+
34
+ # Flag indicates whether the profile is inclusive or exclusive.
35
+ # Mandatory
36
+ # Example: False - (inclusive), i.e. the “Sites” & “SiteGroups” properties
37
+ # lists the sites & site groups where the transaction will be allowed.
38
+ # True - (exclusive), i.e. the “Sites” & “SiteGroups” properties lists the
39
+ # sites and site groups where the transactions will be declined.
40
+ # @return [TrueClass | FalseClass]
41
+ attr_accessor :exclusive
42
+
43
+ # A mapping from model property names to API property names.
44
+ def self.names
45
+ @_hash = {} if @_hash.nil?
46
+ @_hash['country'] = 'Country'
47
+ @_hash['sites'] = 'Sites'
48
+ @_hash['site_groups'] = 'SiteGroups'
49
+ @_hash['exclusive'] = 'Exclusive'
50
+ @_hash
51
+ end
52
+
53
+ # An array for optional fields
54
+ def self.optionals
55
+ %w[
56
+ country
57
+ sites
58
+ site_groups
59
+ exclusive
60
+ ]
61
+ end
62
+
63
+ # An array for nullable fields
64
+ def self.nullables
65
+ []
66
+ end
67
+
68
+ def initialize(country = SKIP,
69
+ sites = SKIP,
70
+ site_groups = SKIP,
71
+ exclusive = SKIP)
72
+ @country = country unless country == SKIP
73
+ @sites = sites unless sites == SKIP
74
+ @site_groups = site_groups unless site_groups == SKIP
75
+ @exclusive = exclusive unless exclusive == SKIP
76
+ end
77
+
78
+ # Creates an instance of the object from a hash.
79
+ def self.from_hash(hash)
80
+ return nil unless hash
81
+
82
+ # Extract variables from the hash.
83
+ country = hash.key?('Country') ? hash['Country'] : SKIP
84
+ sites = hash.key?('Sites') ? hash['Sites'] : SKIP
85
+ site_groups = hash.key?('SiteGroups') ? hash['SiteGroups'] : SKIP
86
+ exclusive = hash.key?('Exclusive') ? hash['Exclusive'] : SKIP
87
+
88
+ # Create object from extracted values.
89
+ LocationRestrictionsShellSiteRestrictionsItems.new(country,
90
+ sites,
91
+ site_groups,
92
+ exclusive)
93
+ end
94
+ end
95
+ end