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,70 @@
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
+ # SearchDocumentsRequest Model.
8
+ class SearchDocumentsRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [SearchDocReq]
14
+ attr_accessor :filters
15
+
16
+ # Specify the page of results to be returned.
17
+ # @return [String]
18
+ attr_accessor :page
19
+
20
+ # Specify the number of records to returned; Max 1000
21
+ # @return [String]
22
+ attr_accessor :page_size
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['filters'] = 'Filters'
28
+ @_hash['page'] = 'Page'
29
+ @_hash['page_size'] = 'PageSize'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ filters
37
+ page
38
+ page_size
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ []
45
+ end
46
+
47
+ def initialize(filters = SKIP,
48
+ page = SKIP,
49
+ page_size = SKIP)
50
+ @filters = filters unless filters == SKIP
51
+ @page = page unless page == SKIP
52
+ @page_size = page_size unless page_size == SKIP
53
+ end
54
+
55
+ # Creates an instance of the object from a hash.
56
+ def self.from_hash(hash)
57
+ return nil unless hash
58
+
59
+ # Extract variables from the hash.
60
+ filters = SearchDocReq.from_hash(hash['Filters']) if hash['Filters']
61
+ page = hash.key?('Page') ? hash['Page'] : SKIP
62
+ page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
63
+
64
+ # Create object from extracted values.
65
+ SearchDocumentsRequest.new(filters,
66
+ page,
67
+ page_size)
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,122 @@
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
+ # SearchDocumentsResponse Model.
8
+ class SearchDocumentsResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # UUID (according to RFC 4122 standards) for requests and responses. This
13
+ # will be played back in the response from the request.
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[SearchDocumentsInvoice]]
23
+ attr_accessor :data
24
+
25
+ # Total number of elements corresponding to the request
26
+ # @return [Integer]
27
+ attr_accessor :total_records
28
+
29
+ # Number of elements in the page content. Will be lesser or equal to the
30
+ # size param.
31
+ # @return [Integer]
32
+ attr_accessor :total_records_on_page
33
+
34
+ # True if it is the first page, false otherwise
35
+ # @return [TrueClass | FalseClass]
36
+ attr_accessor :is_first_page
37
+
38
+ # True if it is the last page, false, otherwise.
39
+ # @return [TrueClass | FalseClass]
40
+ attr_accessor :is_last_page
41
+
42
+ # A mapping from model property names to API property names.
43
+ def self.names
44
+ @_hash = {} if @_hash.nil?
45
+ @_hash['request_id'] = 'RequestId'
46
+ @_hash['status'] = 'Status'
47
+ @_hash['data'] = 'Data'
48
+ @_hash['total_records'] = 'TotalRecords'
49
+ @_hash['total_records_on_page'] = 'TotalRecordsOnPage'
50
+ @_hash['is_first_page'] = 'IsFirstPage'
51
+ @_hash['is_last_page'] = 'IsLastPage'
52
+ @_hash
53
+ end
54
+
55
+ # An array for optional fields
56
+ def self.optionals
57
+ %w[
58
+ request_id
59
+ status
60
+ data
61
+ total_records
62
+ total_records_on_page
63
+ is_first_page
64
+ is_last_page
65
+ ]
66
+ end
67
+
68
+ # An array for nullable fields
69
+ def self.nullables
70
+ []
71
+ end
72
+
73
+ def initialize(request_id = SKIP,
74
+ status = SKIP,
75
+ data = SKIP,
76
+ total_records = SKIP,
77
+ total_records_on_page = SKIP,
78
+ is_first_page = SKIP,
79
+ is_last_page = SKIP)
80
+ @request_id = request_id unless request_id == SKIP
81
+ @status = status unless status == SKIP
82
+ @data = data unless data == SKIP
83
+ @total_records = total_records unless total_records == SKIP
84
+ @total_records_on_page = total_records_on_page unless total_records_on_page == SKIP
85
+ @is_first_page = is_first_page unless is_first_page == SKIP
86
+ @is_last_page = is_last_page unless is_last_page == SKIP
87
+ end
88
+
89
+ # Creates an instance of the object from a hash.
90
+ def self.from_hash(hash)
91
+ return nil unless hash
92
+
93
+ # Extract variables from the hash.
94
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
95
+ status = hash.key?('Status') ? hash['Status'] : SKIP
96
+ # Parameter is an array, so we need to iterate through it
97
+ data = nil
98
+ unless hash['Data'].nil?
99
+ data = []
100
+ hash['Data'].each do |structure|
101
+ data << (SearchDocumentsInvoice.from_hash(structure) if structure)
102
+ end
103
+ end
104
+
105
+ data = SKIP unless hash.key?('Data')
106
+ total_records = hash.key?('TotalRecords') ? hash['TotalRecords'] : SKIP
107
+ total_records_on_page =
108
+ hash.key?('TotalRecordsOnPage') ? hash['TotalRecordsOnPage'] : SKIP
109
+ is_first_page = hash.key?('IsFirstPage') ? hash['IsFirstPage'] : SKIP
110
+ is_last_page = hash.key?('IsLastPage') ? hash['IsLastPage'] : SKIP
111
+
112
+ # Create object from extracted values.
113
+ SearchDocumentsResponse.new(request_id,
114
+ status,
115
+ data,
116
+ total_records,
117
+ total_records_on_page,
118
+ is_first_page,
119
+ is_last_page)
120
+ end
121
+ end
122
+ 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
+ # SearchSOAReq Model.
8
+ class SearchSOAReq < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Collecting Company Code of the selected payer.
13
+ # @return [Integer]
14
+ attr_accessor :col_co_code
15
+
16
+ # Payer Number of the selected payer.
17
+ # Optional if PayerId is passed else Mandatory.
18
+ # @return [String]
19
+ attr_accessor :payer_number
20
+
21
+ # Invoice number.
22
+ # Optional.
23
+ # This input is a search criterion, if given.
24
+ # @return [String]
25
+ attr_accessor :invoice_number
26
+
27
+ # SOA searched from this date.
28
+ # Optional.
29
+ # This input is a search criterion, if given.
30
+ # Date format: yyyy/MM/dd
31
+ # @return [String]
32
+ attr_accessor :from_date
33
+
34
+ # Invoice date searched until this date.
35
+ # Optional.
36
+ # This input is a search criterion, if given.
37
+ # @return [String]
38
+ attr_accessor :to_date
39
+
40
+ # Invoice date search period. Valid values -
41
+ # Last 7 days – Issued in last 7 days.
42
+ # Last 30 days – Issued in last 30 days.
43
+ # Last 90 days – Issued in last 90 days.
44
+ # Optional.
45
+ # This input is a search criterion, if given.
46
+ # @return [Integer]
47
+ attr_accessor :period
48
+
49
+ # Date of invoicing.
50
+ # Optional.
51
+ # This input is a search criterion, if given.
52
+ # @return [String]
53
+ attr_accessor :invoice_date
54
+
55
+ # Possible options are:
56
+ # 1. StatementDate ASC
57
+ # 2. StatementDate DESC
58
+ # Optional
59
+ # Note:
60
+ # This option uses a column name with a combination of “ASC or DESC” for
61
+ # sorting.
62
+ # If only the column name is provided, it is sorted by ascending.
63
+ # Sorting is allowed only ASC or DESC, If both provided in the input ASC
64
+ # will be taken as precedence.
65
+ # @return [Array[String]]
66
+ attr_accessor :invoice_status
67
+
68
+ # Possible options are:
69
+ # 1. StatementDate ASC
70
+ # 2. StatementDate DESC
71
+ # Optional
72
+ # Note:
73
+ # This option uses a column name with a combination of “ASC or DESC” for
74
+ # sorting.
75
+ # If only the column name is provided, it is sorted by ascending.
76
+ # Sorting is allowed only ASC or DESC, If both provided in the input ASC
77
+ # will be taken as precedence.
78
+ # @return [Array[Integer]]
79
+ attr_accessor :sort_by
80
+
81
+ # Collecting Company Id of the selected payer.
82
+ # Optional if ColCoCode is passed else Mandatory.
83
+ # Example:
84
+ # 1-Philippines
85
+ # 5-UK
86
+ # @return [Integer]
87
+ attr_accessor :col_co_id
88
+
89
+ # Payer Id of the selected payer.
90
+ # @return [Integer]
91
+ attr_accessor :payer_id
92
+
93
+ # A mapping from model property names to API property names.
94
+ def self.names
95
+ @_hash = {} if @_hash.nil?
96
+ @_hash['col_co_code'] = 'ColCoCode'
97
+ @_hash['payer_number'] = 'PayerNumber'
98
+ @_hash['invoice_number'] = 'InvoiceNumber'
99
+ @_hash['from_date'] = 'FromDate'
100
+ @_hash['to_date'] = 'ToDate'
101
+ @_hash['period'] = 'Period'
102
+ @_hash['invoice_date'] = 'InvoiceDate'
103
+ @_hash['invoice_status'] = 'InvoiceStatus'
104
+ @_hash['sort_by'] = 'SortBy'
105
+ @_hash['col_co_id'] = 'ColCoId'
106
+ @_hash['payer_id'] = 'PayerId'
107
+ @_hash
108
+ end
109
+
110
+ # An array for optional fields
111
+ def self.optionals
112
+ %w[
113
+ col_co_code
114
+ payer_number
115
+ invoice_number
116
+ from_date
117
+ to_date
118
+ period
119
+ invoice_date
120
+ invoice_status
121
+ sort_by
122
+ col_co_id
123
+ payer_id
124
+ ]
125
+ end
126
+
127
+ # An array for nullable fields
128
+ def self.nullables
129
+ %w[
130
+ col_co_code
131
+ payer_number
132
+ invoice_number
133
+ from_date
134
+ to_date
135
+ period
136
+ invoice_date
137
+ col_co_id
138
+ payer_id
139
+ ]
140
+ end
141
+
142
+ def initialize(col_co_code = SKIP,
143
+ payer_number = SKIP,
144
+ invoice_number = SKIP,
145
+ from_date = SKIP,
146
+ to_date = SKIP,
147
+ period = SKIP,
148
+ invoice_date = SKIP,
149
+ invoice_status = SKIP,
150
+ sort_by = SKIP,
151
+ col_co_id = SKIP,
152
+ payer_id = SKIP)
153
+ @col_co_code = col_co_code unless col_co_code == SKIP
154
+ @payer_number = payer_number unless payer_number == SKIP
155
+ @invoice_number = invoice_number unless invoice_number == SKIP
156
+ @from_date = from_date unless from_date == SKIP
157
+ @to_date = to_date unless to_date == SKIP
158
+ @period = period unless period == SKIP
159
+ @invoice_date = invoice_date unless invoice_date == SKIP
160
+ @invoice_status = invoice_status unless invoice_status == SKIP
161
+ @sort_by = sort_by unless sort_by == SKIP
162
+ @col_co_id = col_co_id unless col_co_id == SKIP
163
+ @payer_id = payer_id unless payer_id == SKIP
164
+ end
165
+
166
+ # Creates an instance of the object from a hash.
167
+ def self.from_hash(hash)
168
+ return nil unless hash
169
+
170
+ # Extract variables from the hash.
171
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
172
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
173
+ invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
174
+ from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
175
+ to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
176
+ period = hash.key?('Period') ? hash['Period'] : SKIP
177
+ invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP
178
+ invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP
179
+ sort_by = hash.key?('SortBy') ? hash['SortBy'] : SKIP
180
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
181
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
182
+
183
+ # Create object from extracted values.
184
+ SearchSOAReq.new(col_co_code,
185
+ payer_number,
186
+ invoice_number,
187
+ from_date,
188
+ to_date,
189
+ period,
190
+ invoice_date,
191
+ invoice_status,
192
+ sort_by,
193
+ col_co_id,
194
+ payer_id)
195
+ end
196
+ end
197
+ end
@@ -0,0 +1,220 @@
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
+ # SearchStatementOfAccount Model.
8
+ class SearchStatementOfAccount < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Statement of account identifier
13
+ # @return [Integer]
14
+ attr_accessor :statement_of_account_id
15
+
16
+ # Statement of account reference
17
+ # @return [String]
18
+ attr_accessor :so_a_reference_number
19
+
20
+ # Date on which the SOA was generated.
21
+ # Format: yyyyMMdd
22
+ # @return [String]
23
+ attr_accessor :statement_date
24
+
25
+ # Payment customer id of the customer.
26
+ # @return [Integer]
27
+ attr_accessor :payer_id
28
+
29
+ # Payment customer number.
30
+ # @return [String]
31
+ attr_accessor :payer_number
32
+
33
+ # Invoiced amount and due for payment
34
+ # @return [Float]
35
+ attr_accessor :amount_due
36
+
37
+ # Invoiced amount and overdue for payment.
38
+ # @return [Float]
39
+ attr_accessor :amount_overdue
40
+
41
+ # ISO code of SOA currency.
42
+ # @return [String]
43
+ attr_accessor :currency_code
44
+
45
+ # Symbol of SOA currency.
46
+ # Example: €
47
+ # @return [String]
48
+ attr_accessor :currency_symbol
49
+
50
+ # Due date for payment. Format: yyyyMMdd
51
+ # Note:
52
+ # • Clients to convert this to appropriate DateTime type.
53
+ # • SoA due date is considered as the latest due date of the invoices within
54
+ # the SoA
55
+ # @return [String]
56
+ attr_accessor :due_date
57
+
58
+ # ISO code of the country i.e., UK, DE, MY, etc.
59
+ # This is the value of the first invoice within the SoA. It may not be same
60
+ # for all the invoices within the SoA.
61
+ # @return [String]
62
+ attr_accessor :invoiced_on_behalf_of
63
+
64
+ # Status of the document. Valid values –
65
+ # 1. Paid – Fully paid all Invoices with in the SOA.
66
+ # 2. Overdue – At least one invoice payment due date is less than current
67
+ # date with in the SOA.
68
+ # 3. Due – At least one invoice is due for payment and is within the due
69
+ # date. There is no invoice overdue for payment.
70
+ # @return [String]
71
+ attr_accessor :status
72
+
73
+ # Total gross amount in customer currency.
74
+ # @return [Float]
75
+ attr_accessor :gross_amount_customer_currency
76
+
77
+ # Document reference number fetched
78
+ # @return [String]
79
+ attr_accessor :document_reference_number
80
+
81
+ # A mapping from model property names to API property names.
82
+ def self.names
83
+ @_hash = {} if @_hash.nil?
84
+ @_hash['statement_of_account_id'] = 'StatementOfAccountId'
85
+ @_hash['so_a_reference_number'] = 'SoAReferenceNumber'
86
+ @_hash['statement_date'] = 'StatementDate'
87
+ @_hash['payer_id'] = 'PayerId'
88
+ @_hash['payer_number'] = 'PayerNumber'
89
+ @_hash['amount_due'] = 'AmountDue'
90
+ @_hash['amount_overdue'] = 'AmountOverdue'
91
+ @_hash['currency_code'] = 'CurrencyCode'
92
+ @_hash['currency_symbol'] = 'CurrencySymbol'
93
+ @_hash['due_date'] = 'DueDate'
94
+ @_hash['invoiced_on_behalf_of'] = 'InvoicedOnBehalfOf'
95
+ @_hash['status'] = 'Status'
96
+ @_hash['gross_amount_customer_currency'] = 'GrossAmountCustomerCurrency'
97
+ @_hash['document_reference_number'] = 'DocumentReferenceNumber'
98
+ @_hash
99
+ end
100
+
101
+ # An array for optional fields
102
+ def self.optionals
103
+ %w[
104
+ statement_of_account_id
105
+ so_a_reference_number
106
+ statement_date
107
+ payer_id
108
+ payer_number
109
+ amount_due
110
+ amount_overdue
111
+ currency_code
112
+ currency_symbol
113
+ due_date
114
+ invoiced_on_behalf_of
115
+ status
116
+ gross_amount_customer_currency
117
+ document_reference_number
118
+ ]
119
+ end
120
+
121
+ # An array for nullable fields
122
+ def self.nullables
123
+ %w[
124
+ statement_of_account_id
125
+ so_a_reference_number
126
+ statement_date
127
+ payer_id
128
+ payer_number
129
+ amount_due
130
+ amount_overdue
131
+ currency_code
132
+ currency_symbol
133
+ due_date
134
+ invoiced_on_behalf_of
135
+ status
136
+ gross_amount_customer_currency
137
+ document_reference_number
138
+ ]
139
+ end
140
+
141
+ def initialize(statement_of_account_id = SKIP,
142
+ so_a_reference_number = SKIP,
143
+ statement_date = SKIP,
144
+ payer_id = SKIP,
145
+ payer_number = SKIP,
146
+ amount_due = SKIP,
147
+ amount_overdue = SKIP,
148
+ currency_code = SKIP,
149
+ currency_symbol = SKIP,
150
+ due_date = SKIP,
151
+ invoiced_on_behalf_of = SKIP,
152
+ status = SKIP,
153
+ gross_amount_customer_currency = SKIP,
154
+ document_reference_number = SKIP)
155
+ @statement_of_account_id = statement_of_account_id unless statement_of_account_id == SKIP
156
+ @so_a_reference_number = so_a_reference_number unless so_a_reference_number == SKIP
157
+ @statement_date = statement_date unless statement_date == SKIP
158
+ @payer_id = payer_id unless payer_id == SKIP
159
+ @payer_number = payer_number unless payer_number == SKIP
160
+ @amount_due = amount_due unless amount_due == SKIP
161
+ @amount_overdue = amount_overdue unless amount_overdue == SKIP
162
+ @currency_code = currency_code unless currency_code == SKIP
163
+ @currency_symbol = currency_symbol unless currency_symbol == SKIP
164
+ @due_date = due_date unless due_date == SKIP
165
+ @invoiced_on_behalf_of = invoiced_on_behalf_of unless invoiced_on_behalf_of == SKIP
166
+ @status = status unless status == SKIP
167
+ unless gross_amount_customer_currency == SKIP
168
+ @gross_amount_customer_currency =
169
+ gross_amount_customer_currency
170
+ end
171
+ unless document_reference_number == SKIP
172
+ @document_reference_number =
173
+ document_reference_number
174
+ end
175
+ end
176
+
177
+ # Creates an instance of the object from a hash.
178
+ def self.from_hash(hash)
179
+ return nil unless hash
180
+
181
+ # Extract variables from the hash.
182
+ statement_of_account_id =
183
+ hash.key?('StatementOfAccountId') ? hash['StatementOfAccountId'] : SKIP
184
+ so_a_reference_number =
185
+ hash.key?('SoAReferenceNumber') ? hash['SoAReferenceNumber'] : SKIP
186
+ statement_date = hash.key?('StatementDate') ? hash['StatementDate'] : SKIP
187
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
188
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
189
+ amount_due = hash.key?('AmountDue') ? hash['AmountDue'] : SKIP
190
+ amount_overdue = hash.key?('AmountOverdue') ? hash['AmountOverdue'] : SKIP
191
+ currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP
192
+ currency_symbol =
193
+ hash.key?('CurrencySymbol') ? hash['CurrencySymbol'] : SKIP
194
+ due_date = hash.key?('DueDate') ? hash['DueDate'] : SKIP
195
+ invoiced_on_behalf_of =
196
+ hash.key?('InvoicedOnBehalfOf') ? hash['InvoicedOnBehalfOf'] : SKIP
197
+ status = hash.key?('Status') ? hash['Status'] : SKIP
198
+ gross_amount_customer_currency =
199
+ hash.key?('GrossAmountCustomerCurrency') ? hash['GrossAmountCustomerCurrency'] : SKIP
200
+ document_reference_number =
201
+ hash.key?('DocumentReferenceNumber') ? hash['DocumentReferenceNumber'] : SKIP
202
+
203
+ # Create object from extracted values.
204
+ SearchStatementOfAccount.new(statement_of_account_id,
205
+ so_a_reference_number,
206
+ statement_date,
207
+ payer_id,
208
+ payer_number,
209
+ amount_due,
210
+ amount_overdue,
211
+ currency_code,
212
+ currency_symbol,
213
+ due_date,
214
+ invoiced_on_behalf_of,
215
+ status,
216
+ gross_amount_customer_currency,
217
+ document_reference_number)
218
+ end
219
+ end
220
+ end
@@ -0,0 +1,70 @@
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
+ # SearchStatementOfAccountRequest Model.
8
+ class SearchStatementOfAccountRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [SearchSOAReq]
14
+ attr_accessor :filters
15
+
16
+ # Page number
17
+ # @return [Integer]
18
+ attr_accessor :page
19
+
20
+ # Number of records in page
21
+ # @return [Integer]
22
+ attr_accessor :page_size
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['filters'] = 'Filters'
28
+ @_hash['page'] = 'Page'
29
+ @_hash['page_size'] = 'PageSize'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ filters
37
+ page
38
+ page_size
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ []
45
+ end
46
+
47
+ def initialize(filters = SKIP,
48
+ page = SKIP,
49
+ page_size = SKIP)
50
+ @filters = filters unless filters == SKIP
51
+ @page = page unless page == SKIP
52
+ @page_size = page_size unless page_size == SKIP
53
+ end
54
+
55
+ # Creates an instance of the object from a hash.
56
+ def self.from_hash(hash)
57
+ return nil unless hash
58
+
59
+ # Extract variables from the hash.
60
+ filters = SearchSOAReq.from_hash(hash['Filters']) if hash['Filters']
61
+ page = hash.key?('Page') ? hash['Page'] : SKIP
62
+ page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
63
+
64
+ # Create object from extracted values.
65
+ SearchStatementOfAccountRequest.new(filters,
66
+ page,
67
+ page_size)
68
+ end
69
+ end
70
+ end