data-and-reporting-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +104 -0
  4. data/lib/shell_data_reporting_ap_is/api_helper.rb +10 -0
  5. data/lib/shell_data_reporting_ap_is/client.rb +84 -0
  6. data/lib/shell_data_reporting_ap_is/configuration.rb +110 -0
  7. data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +66 -0
  8. data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +478 -0
  9. data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +470 -0
  10. data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +42 -0
  11. data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +878 -0
  12. data/lib/shell_data_reporting_ap_is/exceptions/api_exception.rb +10 -0
  13. data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +32 -0
  14. data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +54 -0
  15. data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +32 -0
  16. data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +48 -0
  17. data/lib/shell_data_reporting_ap_is/http/auth/basic_auth.rb +50 -0
  18. data/lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb +89 -0
  19. data/lib/shell_data_reporting_ap_is/http/http_call_back.rb +10 -0
  20. data/lib/shell_data_reporting_ap_is/http/http_method_enum.rb +10 -0
  21. data/lib/shell_data_reporting_ap_is/http/http_request.rb +10 -0
  22. data/lib/shell_data_reporting_ap_is/http/http_response.rb +10 -0
  23. data/lib/shell_data_reporting_ap_is/models/account_access.rb +128 -0
  24. data/lib/shell_data_reporting_ap_is/models/account_request.rb +252 -0
  25. data/lib/shell_data_reporting_ap_is/models/account_response.rb +111 -0
  26. data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +750 -0
  27. data/lib/shell_data_reporting_ap_is/models/accounts.rb +65 -0
  28. data/lib/shell_data_reporting_ap_is/models/address.rb +174 -0
  29. data/lib/shell_data_reporting_ap_is/models/associated_account.rb +98 -0
  30. data/lib/shell_data_reporting_ap_is/models/audit_request.rb +256 -0
  31. data/lib/shell_data_reporting_ap_is/models/audit_response.rb +111 -0
  32. data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +450 -0
  33. data/lib/shell_data_reporting_ap_is/models/bank_account.rb +192 -0
  34. data/lib/shell_data_reporting_ap_is/models/base_model.rb +62 -0
  35. data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +419 -0
  36. data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +444 -0
  37. data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +159 -0
  38. data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +268 -0
  39. data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +178 -0
  40. data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +109 -0
  41. data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +301 -0
  42. data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +145 -0
  43. data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +79 -0
  44. data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +470 -0
  45. data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +60 -0
  46. data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +281 -0
  47. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +159 -0
  48. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +79 -0
  49. data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +88 -0
  50. data/lib/shell_data_reporting_ap_is/models/current_volume.rb +99 -0
  51. data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +63 -0
  52. data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +123 -0
  53. data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +437 -0
  54. data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +200 -0
  55. data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +82 -0
  56. data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +60 -0
  57. data/lib/shell_data_reporting_ap_is/models/default_error_fault_detail.rb +50 -0
  58. data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +258 -0
  59. data/lib/shell_data_reporting_ap_is/models/eid_access.rb +75 -0
  60. data/lib/shell_data_reporting_ap_is/models/eid_document.rb +166 -0
  61. data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +140 -0
  62. data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +86 -0
  63. data/lib/shell_data_reporting_ap_is/models/eid_download_request.rb +50 -0
  64. data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +160 -0
  65. data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +70 -0
  66. data/lib/shell_data_reporting_ap_is/models/error_details.rb +81 -0
  67. data/lib/shell_data_reporting_ap_is/models/error_status.rb +60 -0
  68. data/lib/shell_data_reporting_ap_is/models/error_user_access.rb +50 -0
  69. data/lib/shell_data_reporting_ap_is/models/error_user_access_error.rb +60 -0
  70. data/lib/shell_data_reporting_ap_is/models/exception_product.rb +65 -0
  71. data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +63 -0
  72. data/lib/shell_data_reporting_ap_is/models/fee_item.rb +977 -0
  73. data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +194 -0
  74. data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +153 -0
  75. data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +98 -0
  76. data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +74 -0
  77. data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +85 -0
  78. data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +124 -0
  79. data/lib/shell_data_reporting_ap_is/models/finance_currency.rb +98 -0
  80. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +73 -0
  81. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +267 -0
  82. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +197 -0
  83. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +79 -0
  84. data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +62 -0
  85. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request.rb +50 -0
  86. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +146 -0
  87. data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +80 -0
  88. data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +99 -0
  89. data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +99 -0
  90. data/lib/shell_data_reporting_ap_is/models/invoice_download_request.rb +50 -0
  91. data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +80 -0
  92. data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +913 -0
  93. data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +91 -0
  94. data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +344 -0
  95. data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +127 -0
  96. data/lib/shell_data_reporting_ap_is/models/invoice_summary_details.rb +129 -0
  97. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request.rb +50 -0
  98. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +345 -0
  99. data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +79 -0
  100. data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +221 -0
  101. data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +421 -0
  102. data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +107 -0
  103. data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +394 -0
  104. data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +112 -0
  105. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +360 -0
  106. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +84 -0
  107. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +110 -0
  108. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +1724 -0
  109. data/lib/shell_data_reporting_ap_is/models/o_auth_provider_error_enum.rb +45 -0
  110. data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +100 -0
  111. data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +502 -0
  112. data/lib/shell_data_reporting_ap_is/models/payer_access.rb +147 -0
  113. data/lib/shell_data_reporting_ap_is/models/payer_details.rb +1412 -0
  114. data/lib/shell_data_reporting_ap_is/models/payer_request.rb +126 -0
  115. data/lib/shell_data_reporting_ap_is/models/payer_response.rb +115 -0
  116. data/lib/shell_data_reporting_ap_is/models/payers.rb +109 -0
  117. data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +322 -0
  118. data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +80 -0
  119. data/lib/shell_data_reporting_ap_is/models/price_list.rb +485 -0
  120. data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +477 -0
  121. data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +572 -0
  122. data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +485 -0
  123. data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +2132 -0
  124. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +79 -0
  125. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +242 -0
  126. data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +67 -0
  127. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_invoice_status_enum.rb +27 -0
  128. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_period_enum.rb +27 -0
  129. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_sort_order_enum.rb +37 -0
  130. data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +72 -0
  131. data/lib/shell_data_reporting_ap_is/models/priced_transaction_resp_v2_refund_flag_enum.rb +23 -0
  132. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response.rb +59 -0
  133. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +1719 -0
  134. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +110 -0
  135. data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +115 -0
  136. data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +105 -0
  137. data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +114 -0
  138. data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +217 -0
  139. data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +66 -0
  140. data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +918 -0
  141. data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +110 -0
  142. data/lib/shell_data_reporting_ap_is/models/role.rb +102 -0
  143. data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +269 -0
  144. data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +204 -0
  145. data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +70 -0
  146. data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +122 -0
  147. data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +197 -0
  148. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +220 -0
  149. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +70 -0
  150. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +120 -0
  151. data/lib/shell_data_reporting_ap_is/models/site_location.rb +67 -0
  152. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request.rb +50 -0
  153. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +197 -0
  154. data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +138 -0
  155. data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +80 -0
  156. data/lib/shell_data_reporting_ap_is/models/tier.rb +167 -0
  157. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +1267 -0
  158. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +267 -0
  159. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +100 -0
  160. data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +348 -0
  161. data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +111 -0
  162. data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +62 -0
  163. data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +67 -0
  164. data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +146 -0
  165. data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +93 -0
  166. data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +202 -0
  167. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +118 -0
  168. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +120 -0
  169. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +103 -0
  170. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +120 -0
  171. data/lib/shell_data_reporting_ap_is/utilities/date_time_helper.rb +11 -0
  172. data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +16 -0
  173. data/lib/shell_data_reporting_ap_is.rb +229 -0
  174. data/test/controllers/controller_test_base.rb +34 -0
  175. data/test/controllers/test_invoice_controller.rb +398 -0
  176. data/test/controllers/test_transaction_controller.rb +235 -0
  177. data/test/http_response_catcher.rb +19 -0
  178. metadata +302 -0
@@ -0,0 +1,126 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # PayerRequest Model.
8
+ class PayerRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # List of Payer entity.
13
+ # Optional.
14
+ # Note:
15
+ # • Max number of payers allowed in the input is 10, if it exceeds in the
16
+ # input it will throw an error.
17
+ # • This value is configurable. Initial configuration will be 1000 and will
18
+ # change to 10 once SFH changes are integrated.
19
+ # @return [Array[Payers]]
20
+ attr_accessor :payers
21
+
22
+ # Returns only the high-level basic details of payers. Set this field to
23
+ # ‘true’ when only the basic details are required to get the result quicker.
24
+ # @return [TrueClass | FalseClass]
25
+ attr_accessor :return_basic_details_only
26
+
27
+ # Include address related fields on the response. Set this field to ‘False’
28
+ # when Address fields are not required to get the result quicker.
29
+ # @return [TrueClass | FalseClass]
30
+ attr_accessor :include_addresses
31
+
32
+ # Include the Finance Currency, used for Finance Widget, in the response
33
+ # @return [TrueClass | FalseClass]
34
+ attr_accessor :include_bonus_parameters
35
+
36
+ # Page Number
37
+ # @return [Integer]
38
+ attr_accessor :current_page
39
+
40
+ # Page Size – Number of records to show on a page
41
+ # Default value 50
42
+ # Return 250 rows only in the response if -1 is supplied as page size.
43
+ # Note:
44
+ # • Max page size is 250, if the user provided value is more than 250 then
45
+ # it will throw error.
46
+ # • This value is configurable.
47
+ # @return [Integer]
48
+ attr_accessor :page_size
49
+
50
+ # A mapping from model property names to API property names.
51
+ def self.names
52
+ @_hash = {} if @_hash.nil?
53
+ @_hash['payers'] = 'Payers'
54
+ @_hash['return_basic_details_only'] = 'ReturnBasicDetailsOnly'
55
+ @_hash['include_addresses'] = 'IncludeAddresses'
56
+ @_hash['include_bonus_parameters'] = 'IncludeBonusParameters'
57
+ @_hash['current_page'] = 'CurrentPage'
58
+ @_hash['page_size'] = 'PageSize'
59
+ @_hash
60
+ end
61
+
62
+ # An array for optional fields
63
+ def self.optionals
64
+ %w[
65
+ payers
66
+ return_basic_details_only
67
+ include_addresses
68
+ include_bonus_parameters
69
+ current_page
70
+ page_size
71
+ ]
72
+ end
73
+
74
+ # An array for nullable fields
75
+ def self.nullables
76
+ []
77
+ end
78
+
79
+ def initialize(payers = SKIP,
80
+ return_basic_details_only = false,
81
+ include_addresses = false,
82
+ include_bonus_parameters = false,
83
+ current_page = SKIP,
84
+ page_size = SKIP)
85
+ @payers = payers unless payers == SKIP
86
+ unless return_basic_details_only == SKIP
87
+ @return_basic_details_only =
88
+ return_basic_details_only
89
+ end
90
+ @include_addresses = include_addresses unless include_addresses == SKIP
91
+ @include_bonus_parameters = include_bonus_parameters unless include_bonus_parameters == SKIP
92
+ @current_page = current_page unless current_page == SKIP
93
+ @page_size = page_size unless page_size == SKIP
94
+ end
95
+
96
+ # Creates an instance of the object from a hash.
97
+ def self.from_hash(hash)
98
+ return nil unless hash
99
+
100
+ # Extract variables from the hash.
101
+ # Parameter is an array, so we need to iterate through it
102
+ payers = nil
103
+ unless hash['Payers'].nil?
104
+ payers = []
105
+ hash['Payers'].each do |structure|
106
+ payers << (Payers.from_hash(structure) if structure)
107
+ end
108
+ end
109
+
110
+ payers = SKIP unless hash.key?('Payers')
111
+ return_basic_details_only = hash['ReturnBasicDetailsOnly'] ||= false
112
+ include_addresses = hash['IncludeAddresses'] ||= false
113
+ include_bonus_parameters = hash['IncludeBonusParameters'] ||= false
114
+ current_page = hash.key?('CurrentPage') ? hash['CurrentPage'] : SKIP
115
+ page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
116
+
117
+ # Create object from extracted values.
118
+ PayerRequest.new(payers,
119
+ return_basic_details_only,
120
+ include_addresses,
121
+ include_bonus_parameters,
122
+ current_page,
123
+ page_size)
124
+ end
125
+ end
126
+ end
@@ -0,0 +1,115 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # PayerResponse Model.
8
+ class PayerResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Request Id of the API call
13
+ # @return [String]
14
+ attr_accessor :request_id
15
+
16
+ # Request Id of the API call
17
+ # @return [Array[PayerDetails]]
18
+ attr_accessor :payers
19
+
20
+ # Current Page
21
+ # @return [Integer]
22
+ attr_accessor :current_page
23
+
24
+ # Total row count matched for the given input criteria
25
+ # @return [Integer]
26
+ attr_accessor :row_count
27
+
28
+ # Calculated page count based on page size from the incoming API request and
29
+ # total number of rows matched for the given input criteria. Return 1 if the
30
+ # page size is -1 as all records are returned
31
+ # @return [Integer]
32
+ attr_accessor :total_pages
33
+
34
+ # Calculated page count based on page size from the incoming API request and
35
+ # total number of rows matched for the given input criteria. Return 1 if the
36
+ # page size is -1 as all records are returned
37
+ # @return [ErrorStatus]
38
+ attr_accessor :error
39
+
40
+ # A mapping from model property names to API property names.
41
+ def self.names
42
+ @_hash = {} if @_hash.nil?
43
+ @_hash['request_id'] = 'RequestId'
44
+ @_hash['payers'] = 'Payers'
45
+ @_hash['current_page'] = 'CurrentPage'
46
+ @_hash['row_count'] = 'RowCount'
47
+ @_hash['total_pages'] = 'TotalPages'
48
+ @_hash['error'] = 'Error'
49
+ @_hash
50
+ end
51
+
52
+ # An array for optional fields
53
+ def self.optionals
54
+ %w[
55
+ request_id
56
+ payers
57
+ current_page
58
+ row_count
59
+ total_pages
60
+ error
61
+ ]
62
+ end
63
+
64
+ # An array for nullable fields
65
+ def self.nullables
66
+ %w[
67
+ request_id
68
+ ]
69
+ end
70
+
71
+ def initialize(request_id = SKIP,
72
+ payers = SKIP,
73
+ current_page = SKIP,
74
+ row_count = SKIP,
75
+ total_pages = SKIP,
76
+ error = SKIP)
77
+ @request_id = request_id unless request_id == SKIP
78
+ @payers = payers unless payers == SKIP
79
+ @current_page = current_page unless current_page == SKIP
80
+ @row_count = row_count unless row_count == SKIP
81
+ @total_pages = total_pages unless total_pages == SKIP
82
+ @error = error unless error == SKIP
83
+ end
84
+
85
+ # Creates an instance of the object from a hash.
86
+ def self.from_hash(hash)
87
+ return nil unless hash
88
+
89
+ # Extract variables from the hash.
90
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
91
+ # Parameter is an array, so we need to iterate through it
92
+ payers = nil
93
+ unless hash['Payers'].nil?
94
+ payers = []
95
+ hash['Payers'].each do |structure|
96
+ payers << (PayerDetails.from_hash(structure) if structure)
97
+ end
98
+ end
99
+
100
+ payers = SKIP unless hash.key?('Payers')
101
+ current_page = hash.key?('CurrentPage') ? hash['CurrentPage'] : SKIP
102
+ row_count = hash.key?('RowCount') ? hash['RowCount'] : SKIP
103
+ total_pages = hash.key?('TotalPages') ? hash['TotalPages'] : SKIP
104
+ error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
105
+
106
+ # Create object from extracted values.
107
+ PayerResponse.new(request_id,
108
+ payers,
109
+ current_page,
110
+ row_count,
111
+ total_pages,
112
+ error)
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,109 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # Payers Model.
8
+ class Payers < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Collecting Company Id of the payer
13
+ # @return [Integer]
14
+ attr_accessor :col_co_id
15
+
16
+ # Collecting Company Code (Shell Code) of the selected payer.
17
+ # Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
18
+ # Ukraine etc. It is optional for other countries if ColCoID is provided.
19
+ # @return [Integer]
20
+ attr_accessor :col_co_code
21
+
22
+ # Payer id of the customer.
23
+ # @return [Integer]
24
+ attr_accessor :payer_id
25
+
26
+ # Payer Number of the customer.
27
+ # @return [String]
28
+ attr_accessor :payer_number
29
+
30
+ # Payer Name of the customer.
31
+ # @return [String]
32
+ attr_accessor :payer_name
33
+
34
+ # Payer Group identifier of the customer
35
+ # @return [Integer]
36
+ attr_accessor :payer_group_id
37
+
38
+ # A mapping from model property names to API property names.
39
+ def self.names
40
+ @_hash = {} if @_hash.nil?
41
+ @_hash['col_co_id'] = 'ColCoId'
42
+ @_hash['col_co_code'] = 'ColCoCode'
43
+ @_hash['payer_id'] = 'PayerId'
44
+ @_hash['payer_number'] = 'PayerNumber'
45
+ @_hash['payer_name'] = 'PayerName'
46
+ @_hash['payer_group_id'] = 'PayerGroupId'
47
+ @_hash
48
+ end
49
+
50
+ # An array for optional fields
51
+ def self.optionals
52
+ %w[
53
+ col_co_id
54
+ col_co_code
55
+ payer_id
56
+ payer_number
57
+ payer_name
58
+ payer_group_id
59
+ ]
60
+ end
61
+
62
+ # An array for nullable fields
63
+ def self.nullables
64
+ %w[
65
+ col_co_id
66
+ col_co_code
67
+ payer_id
68
+ payer_number
69
+ payer_name
70
+ payer_group_id
71
+ ]
72
+ end
73
+
74
+ def initialize(col_co_id = SKIP,
75
+ col_co_code = SKIP,
76
+ payer_id = SKIP,
77
+ payer_number = SKIP,
78
+ payer_name = SKIP,
79
+ payer_group_id = SKIP)
80
+ @col_co_id = col_co_id unless col_co_id == SKIP
81
+ @col_co_code = col_co_code unless col_co_code == SKIP
82
+ @payer_id = payer_id unless payer_id == SKIP
83
+ @payer_number = payer_number unless payer_number == SKIP
84
+ @payer_name = payer_name unless payer_name == SKIP
85
+ @payer_group_id = payer_group_id unless payer_group_id == SKIP
86
+ end
87
+
88
+ # Creates an instance of the object from a hash.
89
+ def self.from_hash(hash)
90
+ return nil unless hash
91
+
92
+ # Extract variables from the hash.
93
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
94
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
95
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
96
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
97
+ payer_name = hash.key?('PayerName') ? hash['PayerName'] : SKIP
98
+ payer_group_id = hash.key?('PayerGroupId') ? hash['PayerGroupId'] : SKIP
99
+
100
+ # Create object from extracted values.
101
+ Payers.new(col_co_id,
102
+ col_co_code,
103
+ payer_id,
104
+ payer_number,
105
+ payer_name,
106
+ payer_group_id)
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,322 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # List of payments made by the customer after the latest Statement of Account.
8
+ # Note: All the payments made by the customer will be returned when there is
9
+ # no Statement of Account available for customer.
10
+ class PaymentsSinceLastSOA < BaseModel
11
+ SKIP = Object.new
12
+ private_constant :SKIP
13
+
14
+ # Account Identifier for which payment is made.
15
+ # Example: 12345
16
+ # @return [Integer]
17
+ attr_accessor :account_id
18
+
19
+ # Account number for which payment is made.
20
+ # Example: GB000000123
21
+ # @return [String]
22
+ attr_accessor :account_number
23
+
24
+ # Account Short Name
25
+ # Example: GB Earth Movers-SN
26
+ # @return [String]
27
+ attr_accessor :account_short_name
28
+
29
+ # Summary billing document reference id.
30
+ # Example: 2
31
+ # @return [Integer]
32
+ attr_accessor :summary_document_id
33
+
34
+ # Summary billing document reference number.
35
+ # @return [String]
36
+ attr_accessor :summary_document_number
37
+
38
+ # Summary billing document date.
39
+ # Format: YYYYMMDD
40
+ # @return [String]
41
+ attr_accessor :summary_document_date
42
+
43
+ # Payment due date of the Summary billing document.
44
+ # Format: YYYYMMDD
45
+ # @return [String]
46
+ attr_accessor :summary_document_payment_due_date
47
+
48
+ # Total value in the Summary billing document.
49
+ # @return [Float]
50
+ attr_accessor :summary_document_total_value
51
+
52
+ # Total VAT in the Summary billing document.
53
+ # @return [Float]
54
+ attr_accessor :summary_document_total_vat
55
+
56
+ # Total DD amount in the Summary billing document.
57
+ # @return [Float]
58
+ attr_accessor :summary_document_dd_amount
59
+
60
+ # Date of payment.
61
+ # Format: YYYYMMDD
62
+ # @return [String]
63
+ attr_accessor :payment_date
64
+
65
+ # Reference text of the payment.
66
+ # @return [String]
67
+ attr_accessor :payment_reference
68
+
69
+ # ISO code of payment currency.
70
+ # Example: EUR
71
+ # @return [String]
72
+ attr_accessor :payment_currency_code
73
+
74
+ # Symbol of payment currency.
75
+ # Example: €
76
+ # @return [String]
77
+ attr_accessor :payment_currency_symbol
78
+
79
+ # Amount paid.
80
+ # @return [Float]
81
+ attr_accessor :amount_paid
82
+
83
+ # Balance amount to be settled for the Summary document.
84
+ # @return [Float]
85
+ attr_accessor :balance
86
+
87
+ # True Payment.
88
+ # @return [String]
89
+ attr_accessor :true_payment
90
+
91
+ # Balance in the pre-paid amount.
92
+ # @return [Float]
93
+ attr_accessor :prepaid_balance
94
+
95
+ # Currency ISO code of the local country. It is derived based on CountryCode
96
+ # from microservice configuration. This field is expected to have different
97
+ # value than the previously mentioned field CurrencyCode, only in the case
98
+ # of serviced OUs.
99
+ # Example: EUR
100
+ # @return [String]
101
+ attr_accessor :local_currency_code
102
+
103
+ # Currency Symbol of the local country. It is derived based on CountryCode
104
+ # from microservice configuration. This field is expected to have different
105
+ # value than the previously mentioned field CurrencySymbol, only in the case
106
+ # of serviced OUs.
107
+ # Example: €
108
+ # @return [String]
109
+ attr_accessor :local_currency_symbol
110
+
111
+ # Exchange rate from Payment currency to local currency.
112
+ # @return [String]
113
+ attr_accessor :local_currency_exchange_rate
114
+
115
+ # A mapping from model property names to API property names.
116
+ def self.names
117
+ @_hash = {} if @_hash.nil?
118
+ @_hash['account_id'] = 'AccountId'
119
+ @_hash['account_number'] = 'AccountNumber'
120
+ @_hash['account_short_name'] = 'AccountShortName'
121
+ @_hash['summary_document_id'] = 'SummaryDocumentId'
122
+ @_hash['summary_document_number'] = 'SummaryDocumentNumber'
123
+ @_hash['summary_document_date'] = 'SummaryDocumentDate'
124
+ @_hash['summary_document_payment_due_date'] =
125
+ 'SummaryDocumentPaymentDueDate'
126
+ @_hash['summary_document_total_value'] = 'SummaryDocumentTotalValue'
127
+ @_hash['summary_document_total_vat'] = 'SummaryDocumentTotalVAT'
128
+ @_hash['summary_document_dd_amount'] = 'SummaryDocumentDDAmount'
129
+ @_hash['payment_date'] = 'PaymentDate'
130
+ @_hash['payment_reference'] = 'PaymentReference'
131
+ @_hash['payment_currency_code'] = 'PaymentCurrencyCode'
132
+ @_hash['payment_currency_symbol'] = 'PaymentCurrencySymbol'
133
+ @_hash['amount_paid'] = 'AmountPaid'
134
+ @_hash['balance'] = 'Balance'
135
+ @_hash['true_payment'] = 'TruePayment'
136
+ @_hash['prepaid_balance'] = 'PrepaidBalance'
137
+ @_hash['local_currency_code'] = 'LocalCurrencyCode'
138
+ @_hash['local_currency_symbol'] = 'LocalCurrencySymbol'
139
+ @_hash['local_currency_exchange_rate'] = 'LocalCurrencyExchangeRate'
140
+ @_hash
141
+ end
142
+
143
+ # An array for optional fields
144
+ def self.optionals
145
+ %w[
146
+ account_id
147
+ account_number
148
+ account_short_name
149
+ summary_document_id
150
+ summary_document_number
151
+ summary_document_date
152
+ summary_document_payment_due_date
153
+ summary_document_total_value
154
+ summary_document_total_vat
155
+ summary_document_dd_amount
156
+ payment_date
157
+ payment_reference
158
+ payment_currency_code
159
+ payment_currency_symbol
160
+ amount_paid
161
+ balance
162
+ true_payment
163
+ prepaid_balance
164
+ local_currency_code
165
+ local_currency_symbol
166
+ local_currency_exchange_rate
167
+ ]
168
+ end
169
+
170
+ # An array for nullable fields
171
+ def self.nullables
172
+ %w[
173
+ account_id
174
+ account_number
175
+ account_short_name
176
+ summary_document_id
177
+ summary_document_number
178
+ summary_document_date
179
+ summary_document_payment_due_date
180
+ summary_document_total_value
181
+ summary_document_total_vat
182
+ summary_document_dd_amount
183
+ payment_date
184
+ payment_reference
185
+ payment_currency_code
186
+ payment_currency_symbol
187
+ amount_paid
188
+ balance
189
+ true_payment
190
+ prepaid_balance
191
+ local_currency_code
192
+ local_currency_symbol
193
+ local_currency_exchange_rate
194
+ ]
195
+ end
196
+
197
+ def initialize(account_id = SKIP,
198
+ account_number = SKIP,
199
+ account_short_name = SKIP,
200
+ summary_document_id = SKIP,
201
+ summary_document_number = SKIP,
202
+ summary_document_date = SKIP,
203
+ summary_document_payment_due_date = SKIP,
204
+ summary_document_total_value = SKIP,
205
+ summary_document_total_vat = SKIP,
206
+ summary_document_dd_amount = SKIP,
207
+ payment_date = SKIP,
208
+ payment_reference = SKIP,
209
+ payment_currency_code = SKIP,
210
+ payment_currency_symbol = SKIP,
211
+ amount_paid = SKIP,
212
+ balance = SKIP,
213
+ true_payment = SKIP,
214
+ prepaid_balance = SKIP,
215
+ local_currency_code = SKIP,
216
+ local_currency_symbol = SKIP,
217
+ local_currency_exchange_rate = SKIP)
218
+ @account_id = account_id unless account_id == SKIP
219
+ @account_number = account_number unless account_number == SKIP
220
+ @account_short_name = account_short_name unless account_short_name == SKIP
221
+ @summary_document_id = summary_document_id unless summary_document_id == SKIP
222
+ @summary_document_number = summary_document_number unless summary_document_number == SKIP
223
+ @summary_document_date = summary_document_date unless summary_document_date == SKIP
224
+ unless summary_document_payment_due_date == SKIP
225
+ @summary_document_payment_due_date =
226
+ summary_document_payment_due_date
227
+ end
228
+ unless summary_document_total_value == SKIP
229
+ @summary_document_total_value =
230
+ summary_document_total_value
231
+ end
232
+ unless summary_document_total_vat == SKIP
233
+ @summary_document_total_vat =
234
+ summary_document_total_vat
235
+ end
236
+ unless summary_document_dd_amount == SKIP
237
+ @summary_document_dd_amount =
238
+ summary_document_dd_amount
239
+ end
240
+ @payment_date = payment_date unless payment_date == SKIP
241
+ @payment_reference = payment_reference unless payment_reference == SKIP
242
+ @payment_currency_code = payment_currency_code unless payment_currency_code == SKIP
243
+ @payment_currency_symbol = payment_currency_symbol unless payment_currency_symbol == SKIP
244
+ @amount_paid = amount_paid unless amount_paid == SKIP
245
+ @balance = balance unless balance == SKIP
246
+ @true_payment = true_payment unless true_payment == SKIP
247
+ @prepaid_balance = prepaid_balance unless prepaid_balance == SKIP
248
+ @local_currency_code = local_currency_code unless local_currency_code == SKIP
249
+ @local_currency_symbol = local_currency_symbol unless local_currency_symbol == SKIP
250
+ unless local_currency_exchange_rate == SKIP
251
+ @local_currency_exchange_rate =
252
+ local_currency_exchange_rate
253
+ end
254
+ end
255
+
256
+ # Creates an instance of the object from a hash.
257
+ def self.from_hash(hash)
258
+ return nil unless hash
259
+
260
+ # Extract variables from the hash.
261
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
262
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
263
+ account_short_name =
264
+ hash.key?('AccountShortName') ? hash['AccountShortName'] : SKIP
265
+ summary_document_id =
266
+ hash.key?('SummaryDocumentId') ? hash['SummaryDocumentId'] : SKIP
267
+ summary_document_number =
268
+ hash.key?('SummaryDocumentNumber') ? hash['SummaryDocumentNumber'] : SKIP
269
+ summary_document_date =
270
+ hash.key?('SummaryDocumentDate') ? hash['SummaryDocumentDate'] : SKIP
271
+ summary_document_payment_due_date =
272
+ hash.key?('SummaryDocumentPaymentDueDate') ? hash['SummaryDocumentPaymentDueDate'] : SKIP
273
+ summary_document_total_value =
274
+ hash.key?('SummaryDocumentTotalValue') ? hash['SummaryDocumentTotalValue'] : SKIP
275
+ summary_document_total_vat =
276
+ hash.key?('SummaryDocumentTotalVAT') ? hash['SummaryDocumentTotalVAT'] : SKIP
277
+ summary_document_dd_amount =
278
+ hash.key?('SummaryDocumentDDAmount') ? hash['SummaryDocumentDDAmount'] : SKIP
279
+ payment_date = hash.key?('PaymentDate') ? hash['PaymentDate'] : SKIP
280
+ payment_reference =
281
+ hash.key?('PaymentReference') ? hash['PaymentReference'] : SKIP
282
+ payment_currency_code =
283
+ hash.key?('PaymentCurrencyCode') ? hash['PaymentCurrencyCode'] : SKIP
284
+ payment_currency_symbol =
285
+ hash.key?('PaymentCurrencySymbol') ? hash['PaymentCurrencySymbol'] : SKIP
286
+ amount_paid = hash.key?('AmountPaid') ? hash['AmountPaid'] : SKIP
287
+ balance = hash.key?('Balance') ? hash['Balance'] : SKIP
288
+ true_payment = hash.key?('TruePayment') ? hash['TruePayment'] : SKIP
289
+ prepaid_balance =
290
+ hash.key?('PrepaidBalance') ? hash['PrepaidBalance'] : SKIP
291
+ local_currency_code =
292
+ hash.key?('LocalCurrencyCode') ? hash['LocalCurrencyCode'] : SKIP
293
+ local_currency_symbol =
294
+ hash.key?('LocalCurrencySymbol') ? hash['LocalCurrencySymbol'] : SKIP
295
+ local_currency_exchange_rate =
296
+ hash.key?('LocalCurrencyExchangeRate') ? hash['LocalCurrencyExchangeRate'] : SKIP
297
+
298
+ # Create object from extracted values.
299
+ PaymentsSinceLastSOA.new(account_id,
300
+ account_number,
301
+ account_short_name,
302
+ summary_document_id,
303
+ summary_document_number,
304
+ summary_document_date,
305
+ summary_document_payment_due_date,
306
+ summary_document_total_value,
307
+ summary_document_total_vat,
308
+ summary_document_dd_amount,
309
+ payment_date,
310
+ payment_reference,
311
+ payment_currency_code,
312
+ payment_currency_symbol,
313
+ amount_paid,
314
+ balance,
315
+ true_payment,
316
+ prepaid_balance,
317
+ local_currency_code,
318
+ local_currency_symbol,
319
+ local_currency_exchange_rate)
320
+ end
321
+ end
322
+ end