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,120 @@
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
+ # SearchStatementOfAccountResponse Model.
8
+ class SearchStatementOfAccountResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Mandatory UUID (according to RFC 4122 standards) for requests and
13
+ # responses. This will be played back in the response from the req
14
+ # @return [String]
15
+ attr_accessor :request_id
16
+
17
+ # Indicates overall status of the request
18
+ # @return [String]
19
+ attr_accessor :status
20
+
21
+ # Indicates overall status of the request
22
+ # @return [Array[SearchStatementOfAccount]]
23
+ attr_accessor :data
24
+
25
+ # Current page
26
+ # @return [Integer]
27
+ attr_accessor :page
28
+
29
+ # Total Number of records in response
30
+ # @return [Integer]
31
+ attr_accessor :total_records
32
+
33
+ # Total number of pages available for the requested data
34
+ # @return [Integer]
35
+ attr_accessor :total_pages
36
+
37
+ # Number of records returned in the response
38
+ # @return [Integer]
39
+ attr_accessor :page_size
40
+
41
+ # A mapping from model property names to API property names.
42
+ def self.names
43
+ @_hash = {} if @_hash.nil?
44
+ @_hash['request_id'] = 'RequestId'
45
+ @_hash['status'] = 'Status'
46
+ @_hash['data'] = 'Data'
47
+ @_hash['page'] = 'Page'
48
+ @_hash['total_records'] = 'TotalRecords'
49
+ @_hash['total_pages'] = 'TotalPages'
50
+ @_hash['page_size'] = 'PageSize'
51
+ @_hash
52
+ end
53
+
54
+ # An array for optional fields
55
+ def self.optionals
56
+ %w[
57
+ request_id
58
+ status
59
+ data
60
+ page
61
+ total_records
62
+ total_pages
63
+ page_size
64
+ ]
65
+ end
66
+
67
+ # An array for nullable fields
68
+ def self.nullables
69
+ []
70
+ end
71
+
72
+ def initialize(request_id = SKIP,
73
+ status = SKIP,
74
+ data = SKIP,
75
+ page = SKIP,
76
+ total_records = SKIP,
77
+ total_pages = SKIP,
78
+ page_size = SKIP)
79
+ @request_id = request_id unless request_id == SKIP
80
+ @status = status unless status == SKIP
81
+ @data = data unless data == SKIP
82
+ @page = page unless page == SKIP
83
+ @total_records = total_records unless total_records == SKIP
84
+ @total_pages = total_pages unless total_pages == SKIP
85
+ @page_size = page_size unless page_size == 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
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
94
+ status = hash.key?('Status') ? hash['Status'] : SKIP
95
+ # Parameter is an array, so we need to iterate through it
96
+ data = nil
97
+ unless hash['Data'].nil?
98
+ data = []
99
+ hash['Data'].each do |structure|
100
+ data << (SearchStatementOfAccount.from_hash(structure) if structure)
101
+ end
102
+ end
103
+
104
+ data = SKIP unless hash.key?('Data')
105
+ page = hash.key?('Page') ? hash['Page'] : SKIP
106
+ total_records = hash.key?('TotalRecords') ? hash['TotalRecords'] : SKIP
107
+ total_pages = hash.key?('TotalPages') ? hash['TotalPages'] : SKIP
108
+ page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
109
+
110
+ # Create object from extracted values.
111
+ SearchStatementOfAccountResponse.new(request_id,
112
+ status,
113
+ data,
114
+ page,
115
+ total_records,
116
+ total_pages,
117
+ page_size)
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,67 @@
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
+ # Geography Location entity for Site Location
8
+ class SiteLocation < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Latitude for the Site Geographic Location
13
+ # Example: 37.4224764
14
+ # Note: - The value could be null/blank for fees item.
15
+ # @return [String]
16
+ attr_accessor :latitude
17
+
18
+ # Longitude for the Site Geographic Location
19
+ # Example: 122.0842499
20
+ # Note: - The value could be null/blank for fees item.
21
+ # @return [String]
22
+ attr_accessor :longitude
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['latitude'] = 'Latitude'
28
+ @_hash['longitude'] = 'Longitude'
29
+ @_hash
30
+ end
31
+
32
+ # An array for optional fields
33
+ def self.optionals
34
+ %w[
35
+ latitude
36
+ longitude
37
+ ]
38
+ end
39
+
40
+ # An array for nullable fields
41
+ def self.nullables
42
+ %w[
43
+ latitude
44
+ longitude
45
+ ]
46
+ end
47
+
48
+ def initialize(latitude = SKIP,
49
+ longitude = SKIP)
50
+ @latitude = latitude unless latitude == SKIP
51
+ @longitude = longitude unless longitude == SKIP
52
+ end
53
+
54
+ # Creates an instance of the object from a hash.
55
+ def self.from_hash(hash)
56
+ return nil unless hash
57
+
58
+ # Extract variables from the hash.
59
+ latitude = hash.key?('Latitude') ? hash['Latitude'] : SKIP
60
+ longitude = hash.key?('Longitude') ? hash['Longitude'] : SKIP
61
+
62
+ # Create object from extracted values.
63
+ SiteLocation.new(latitude,
64
+ longitude)
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,50 @@
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
+ # StatementOfAccountRequest Model.
8
+ class StatementOfAccountRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [StatementOfAccountRequestFilters]
14
+ attr_accessor :filters
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['filters'] = 'Filters'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ filters
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(filters = SKIP)
36
+ @filters = filters unless filters == 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
+ filters = StatementOfAccountRequestFilters.from_hash(hash['Filters']) if hash['Filters']
45
+
46
+ # Create object from extracted values.
47
+ StatementOfAccountRequest.new(filters)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,197 @@
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
+ # StatementOfAccountRequestFilters Model.
8
+ class StatementOfAccountRequestFilters < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Collecting Company Code (Shell Code) of the selected payer.
13
+ # Optional If ColCo Id is passed else Mandatory.
14
+ # @return [Integer]
15
+ attr_accessor :col_co_code
16
+
17
+ # Payer Id of the selected payer.
18
+ # Optional if PayerNumber is passed else Mandatory.
19
+ # @return [Integer]
20
+ attr_accessor :payer_id
21
+
22
+ # Payer Number of the selected payer.
23
+ # Optional if PayerId is passed else Mandatory.
24
+ # @return [String]
25
+ attr_accessor :payer_number
26
+
27
+ # True/False.
28
+ # Optional. Default is False.
29
+ # True if the past 13 monthly invoice trend to be included as part of the
30
+ # response. Else false.
31
+ # @return [TrueClass | FalseClass]
32
+ attr_accessor :include_monthly_invoice_trend
33
+
34
+ # True/False.
35
+ # Optional. Default is False.
36
+ # True if the past X SOA documents are to be included as part of the
37
+ # response. Else false.
38
+ # @return [TrueClass | FalseClass]
39
+ attr_accessor :include_past_statement_of_accounts
40
+
41
+ # True/False
42
+ # Optional Default is False.
43
+ # If true PastStatementOfAccounts entity on this API output should contain
44
+ # the SOA documents that are due or overdue only.
45
+ # @return [TrueClass | FalseClass]
46
+ attr_accessor :due_or_over_due_soa_documents_only
47
+
48
+ # This parameter is only applicable when “IncludePastStatementOfAccounts”
49
+ # parameter is set to True.
50
+ # @return [Integer]
51
+ attr_accessor :number_of_soa_documents
52
+
53
+ # True/False
54
+ # Optional.
55
+ # Default value is false.
56
+ # When true InvoicesSummaries list will be returned in the API output.
57
+ # @return [TrueClass | FalseClass]
58
+ attr_accessor :include_account_invoices_summary
59
+
60
+ # Collecting Company Id of the selected payer.
61
+ # Optional If ColCo Code is passed else Mandatory.
62
+ # @return [Integer]
63
+ attr_accessor :col_co_id
64
+
65
+ # Collecting Company Id of the selected payer.
66
+ # Optional If ColCo Code is passed else Mandatory.
67
+ # @return [Array[Accounts]]
68
+ attr_accessor :accounts
69
+
70
+ # A mapping from model property names to API property names.
71
+ def self.names
72
+ @_hash = {} if @_hash.nil?
73
+ @_hash['col_co_code'] = 'ColCoCode'
74
+ @_hash['payer_id'] = 'PayerId'
75
+ @_hash['payer_number'] = 'PayerNumber'
76
+ @_hash['include_monthly_invoice_trend'] = 'IncludeMonthlyInvoiceTrend'
77
+ @_hash['include_past_statement_of_accounts'] =
78
+ 'IncludePastStatementOfAccounts'
79
+ @_hash['due_or_over_due_soa_documents_only'] =
80
+ 'DueOrOverDueSOADocumentsOnly'
81
+ @_hash['number_of_soa_documents'] = 'NumberOfSOADocuments'
82
+ @_hash['include_account_invoices_summary'] =
83
+ 'IncludeAccountInvoicesSummary'
84
+ @_hash['col_co_id'] = 'ColCoId'
85
+ @_hash['accounts'] = 'Accounts'
86
+ @_hash
87
+ end
88
+
89
+ # An array for optional fields
90
+ def self.optionals
91
+ %w[
92
+ col_co_code
93
+ payer_id
94
+ payer_number
95
+ include_monthly_invoice_trend
96
+ include_past_statement_of_accounts
97
+ due_or_over_due_soa_documents_only
98
+ number_of_soa_documents
99
+ include_account_invoices_summary
100
+ col_co_id
101
+ accounts
102
+ ]
103
+ end
104
+
105
+ # An array for nullable fields
106
+ def self.nullables
107
+ %w[
108
+ col_co_code
109
+ payer_id
110
+ payer_number
111
+ include_monthly_invoice_trend
112
+ include_past_statement_of_accounts
113
+ due_or_over_due_soa_documents_only
114
+ number_of_soa_documents
115
+ include_account_invoices_summary
116
+ col_co_id
117
+ ]
118
+ end
119
+
120
+ def initialize(col_co_code = SKIP,
121
+ payer_id = SKIP,
122
+ payer_number = SKIP,
123
+ include_monthly_invoice_trend = SKIP,
124
+ include_past_statement_of_accounts = SKIP,
125
+ due_or_over_due_soa_documents_only = SKIP,
126
+ number_of_soa_documents = SKIP,
127
+ include_account_invoices_summary = SKIP,
128
+ col_co_id = SKIP,
129
+ accounts = SKIP)
130
+ @col_co_code = col_co_code unless col_co_code == SKIP
131
+ @payer_id = payer_id unless payer_id == SKIP
132
+ @payer_number = payer_number unless payer_number == SKIP
133
+ unless include_monthly_invoice_trend == SKIP
134
+ @include_monthly_invoice_trend =
135
+ include_monthly_invoice_trend
136
+ end
137
+ unless include_past_statement_of_accounts == SKIP
138
+ @include_past_statement_of_accounts =
139
+ include_past_statement_of_accounts
140
+ end
141
+ unless due_or_over_due_soa_documents_only == SKIP
142
+ @due_or_over_due_soa_documents_only =
143
+ due_or_over_due_soa_documents_only
144
+ end
145
+ @number_of_soa_documents = number_of_soa_documents unless number_of_soa_documents == SKIP
146
+ unless include_account_invoices_summary == SKIP
147
+ @include_account_invoices_summary =
148
+ include_account_invoices_summary
149
+ end
150
+ @col_co_id = col_co_id unless col_co_id == SKIP
151
+ @accounts = accounts unless accounts == SKIP
152
+ end
153
+
154
+ # Creates an instance of the object from a hash.
155
+ def self.from_hash(hash)
156
+ return nil unless hash
157
+
158
+ # Extract variables from the hash.
159
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
160
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
161
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
162
+ include_monthly_invoice_trend =
163
+ hash.key?('IncludeMonthlyInvoiceTrend') ? hash['IncludeMonthlyInvoiceTrend'] : SKIP
164
+ include_past_statement_of_accounts =
165
+ hash.key?('IncludePastStatementOfAccounts') ? hash['IncludePastStatementOfAccounts'] : SKIP
166
+ due_or_over_due_soa_documents_only =
167
+ hash.key?('DueOrOverDueSOADocumentsOnly') ? hash['DueOrOverDueSOADocumentsOnly'] : SKIP
168
+ number_of_soa_documents =
169
+ hash.key?('NumberOfSOADocuments') ? hash['NumberOfSOADocuments'] : SKIP
170
+ include_account_invoices_summary =
171
+ hash.key?('IncludeAccountInvoicesSummary') ? hash['IncludeAccountInvoicesSummary'] : SKIP
172
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
173
+ # Parameter is an array, so we need to iterate through it
174
+ accounts = nil
175
+ unless hash['Accounts'].nil?
176
+ accounts = []
177
+ hash['Accounts'].each do |structure|
178
+ accounts << (Accounts.from_hash(structure) if structure)
179
+ end
180
+ end
181
+
182
+ accounts = SKIP unless hash.key?('Accounts')
183
+
184
+ # Create object from extracted values.
185
+ StatementOfAccountRequestFilters.new(col_co_code,
186
+ payer_id,
187
+ payer_number,
188
+ include_monthly_invoice_trend,
189
+ include_past_statement_of_accounts,
190
+ due_or_over_due_soa_documents_only,
191
+ number_of_soa_documents,
192
+ include_account_invoices_summary,
193
+ col_co_id,
194
+ accounts)
195
+ end
196
+ end
197
+ end
@@ -0,0 +1,138 @@
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
+ # StatementOfAccountResp Model.
8
+ class StatementOfAccountResp < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Latest statement of the account generated for the given Payer.
13
+ # @return [LastStatementOfAccount]
14
+ attr_accessor :last_statement_of_account
15
+
16
+ # Latest statement of the account generated for the given Payer.
17
+ # @return [Array[MonthlyInvoiceTrend]]
18
+ attr_accessor :monthly_invoice_trend
19
+
20
+ # Latest statement of the account generated for the given Payer.
21
+ # @return [Array[PastStatementOfAccounts]]
22
+ attr_accessor :past_statement_of_accounts
23
+
24
+ # Latest statement of the account generated for the given Payer.
25
+ # @return [Array[PaymentsSinceLastSOA]]
26
+ attr_accessor :payments_since_last_soa
27
+
28
+ # Latest statement of the account generated for the given Payer.
29
+ # @return [Array[InvoicesSummaries]]
30
+ attr_accessor :invoices_summaries
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['last_statement_of_account'] = 'LastStatementOfAccount'
36
+ @_hash['monthly_invoice_trend'] = 'MonthlyInvoiceTrend'
37
+ @_hash['past_statement_of_accounts'] = 'PastStatementOfAccounts'
38
+ @_hash['payments_since_last_soa'] = 'PaymentsSinceLastSOA'
39
+ @_hash['invoices_summaries'] = 'InvoicesSummaries'
40
+ @_hash
41
+ end
42
+
43
+ # An array for optional fields
44
+ def self.optionals
45
+ %w[
46
+ last_statement_of_account
47
+ monthly_invoice_trend
48
+ past_statement_of_accounts
49
+ payments_since_last_soa
50
+ invoices_summaries
51
+ ]
52
+ end
53
+
54
+ # An array for nullable fields
55
+ def self.nullables
56
+ %w[
57
+ monthly_invoice_trend
58
+ payments_since_last_soa
59
+ invoices_summaries
60
+ ]
61
+ end
62
+
63
+ def initialize(last_statement_of_account = SKIP,
64
+ monthly_invoice_trend = SKIP,
65
+ past_statement_of_accounts = SKIP,
66
+ payments_since_last_soa = SKIP,
67
+ invoices_summaries = SKIP)
68
+ unless last_statement_of_account == SKIP
69
+ @last_statement_of_account =
70
+ last_statement_of_account
71
+ end
72
+ @monthly_invoice_trend = monthly_invoice_trend unless monthly_invoice_trend == SKIP
73
+ unless past_statement_of_accounts == SKIP
74
+ @past_statement_of_accounts =
75
+ past_statement_of_accounts
76
+ end
77
+ @payments_since_last_soa = payments_since_last_soa unless payments_since_last_soa == SKIP
78
+ @invoices_summaries = invoices_summaries unless invoices_summaries == 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
+ if hash['LastStatementOfAccount']
87
+ last_statement_of_account = LastStatementOfAccount.from_hash(hash['LastStatementOfAccount'])
88
+ end
89
+ # Parameter is an array, so we need to iterate through it
90
+ monthly_invoice_trend = nil
91
+ unless hash['MonthlyInvoiceTrend'].nil?
92
+ monthly_invoice_trend = []
93
+ hash['MonthlyInvoiceTrend'].each do |structure|
94
+ monthly_invoice_trend << (MonthlyInvoiceTrend.from_hash(structure) if structure)
95
+ end
96
+ end
97
+
98
+ monthly_invoice_trend = SKIP unless hash.key?('MonthlyInvoiceTrend')
99
+ # Parameter is an array, so we need to iterate through it
100
+ past_statement_of_accounts = nil
101
+ unless hash['PastStatementOfAccounts'].nil?
102
+ past_statement_of_accounts = []
103
+ hash['PastStatementOfAccounts'].each do |structure|
104
+ past_statement_of_accounts << (PastStatementOfAccounts.from_hash(structure) if structure)
105
+ end
106
+ end
107
+
108
+ past_statement_of_accounts = SKIP unless hash.key?('PastStatementOfAccounts')
109
+ # Parameter is an array, so we need to iterate through it
110
+ payments_since_last_soa = nil
111
+ unless hash['PaymentsSinceLastSOA'].nil?
112
+ payments_since_last_soa = []
113
+ hash['PaymentsSinceLastSOA'].each do |structure|
114
+ payments_since_last_soa << (PaymentsSinceLastSOA.from_hash(structure) if structure)
115
+ end
116
+ end
117
+
118
+ payments_since_last_soa = SKIP unless hash.key?('PaymentsSinceLastSOA')
119
+ # Parameter is an array, so we need to iterate through it
120
+ invoices_summaries = nil
121
+ unless hash['InvoicesSummaries'].nil?
122
+ invoices_summaries = []
123
+ hash['InvoicesSummaries'].each do |structure|
124
+ invoices_summaries << (InvoicesSummaries.from_hash(structure) if structure)
125
+ end
126
+ end
127
+
128
+ invoices_summaries = SKIP unless hash.key?('InvoicesSummaries')
129
+
130
+ # Create object from extracted values.
131
+ StatementOfAccountResp.new(last_statement_of_account,
132
+ monthly_invoice_trend,
133
+ past_statement_of_accounts,
134
+ payments_since_last_soa,
135
+ invoices_summaries)
136
+ end
137
+ end
138
+ end
@@ -0,0 +1,80 @@
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
+ # StatementOfAccountResponse Model.
8
+ class StatementOfAccountResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Unique request identifier passed from end user. This identifier helps in
13
+ # tracing a transaction
14
+ # @return [String]
15
+ attr_accessor :request_id
16
+
17
+ # Indicates overall status of the request. Allowed values: SUCCES, FAILED
18
+ # @return [String]
19
+ attr_accessor :status
20
+
21
+ # Indicates overall status of the request. Allowed values: SUCCES, FAILED
22
+ # @return [Array[StatementOfAccountResp]]
23
+ attr_accessor :data
24
+
25
+ # A mapping from model property names to API property names.
26
+ def self.names
27
+ @_hash = {} if @_hash.nil?
28
+ @_hash['request_id'] = 'RequestId'
29
+ @_hash['status'] = 'Status'
30
+ @_hash['data'] = 'Data'
31
+ @_hash
32
+ end
33
+
34
+ # An array for optional fields
35
+ def self.optionals
36
+ %w[
37
+ request_id
38
+ status
39
+ data
40
+ ]
41
+ end
42
+
43
+ # An array for nullable fields
44
+ def self.nullables
45
+ []
46
+ end
47
+
48
+ def initialize(request_id = SKIP,
49
+ status = SKIP,
50
+ data = SKIP)
51
+ @request_id = request_id unless request_id == SKIP
52
+ @status = status unless status == SKIP
53
+ @data = data unless data == SKIP
54
+ end
55
+
56
+ # Creates an instance of the object from a hash.
57
+ def self.from_hash(hash)
58
+ return nil unless hash
59
+
60
+ # Extract variables from the hash.
61
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
62
+ status = hash.key?('Status') ? hash['Status'] : SKIP
63
+ # Parameter is an array, so we need to iterate through it
64
+ data = nil
65
+ unless hash['Data'].nil?
66
+ data = []
67
+ hash['Data'].each do |structure|
68
+ data << (StatementOfAccountResp.from_hash(structure) if structure)
69
+ end
70
+ end
71
+
72
+ data = SKIP unless hash.key?('Data')
73
+
74
+ # Create object from extracted values.
75
+ StatementOfAccountResponse.new(request_id,
76
+ status,
77
+ data)
78
+ end
79
+ end
80
+ end