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,91 @@
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
+ # InvoiceSearchRequest Model.
8
+ class InvoiceSearchRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [InvoiceSearchRequestFilters]
14
+ attr_accessor :filters
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Integer]
18
+ attr_accessor :page_size
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Integer]
22
+ attr_accessor :page
23
+
24
+ # Sort option –
25
+ # 1. InvoiceDate ASC
26
+ # 2. InvoiceDate DESC
27
+ # 3. NetAmountCustomerCurrency ASC
28
+ # 4. NetAmountCustomerCurrency DESC
29
+ # Optional
30
+ # Note:
31
+ # This option uses a column name with a combination of “ASC or DESC” for
32
+ # sorting.
33
+ # If only the column name is provided, it is sorted by ascending.
34
+ # Example values to be passed:
35
+ # [“InvoiceDate”, “NetAmountCustomerCurrency DESC”]
36
+ # @return [Array[Integer]]
37
+ attr_accessor :sort_by
38
+
39
+ # A mapping from model property names to API property names.
40
+ def self.names
41
+ @_hash = {} if @_hash.nil?
42
+ @_hash['filters'] = 'Filters'
43
+ @_hash['page_size'] = 'PageSize'
44
+ @_hash['page'] = 'Page'
45
+ @_hash['sort_by'] = 'SortBy'
46
+ @_hash
47
+ end
48
+
49
+ # An array for optional fields
50
+ def self.optionals
51
+ %w[
52
+ filters
53
+ page_size
54
+ page
55
+ sort_by
56
+ ]
57
+ end
58
+
59
+ # An array for nullable fields
60
+ def self.nullables
61
+ []
62
+ end
63
+
64
+ def initialize(filters = SKIP,
65
+ page_size = SKIP,
66
+ page = SKIP,
67
+ sort_by = SKIP)
68
+ @filters = filters unless filters == SKIP
69
+ @page_size = page_size unless page_size == SKIP
70
+ @page = page unless page == SKIP
71
+ @sort_by = sort_by unless sort_by == SKIP
72
+ end
73
+
74
+ # Creates an instance of the object from a hash.
75
+ def self.from_hash(hash)
76
+ return nil unless hash
77
+
78
+ # Extract variables from the hash.
79
+ filters = InvoiceSearchRequestFilters.from_hash(hash['Filters']) if hash['Filters']
80
+ page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
81
+ page = hash.key?('Page') ? hash['Page'] : SKIP
82
+ sort_by = hash.key?('SortBy') ? hash['SortBy'] : SKIP
83
+
84
+ # Create object from extracted values.
85
+ InvoiceSearchRequest.new(filters,
86
+ page_size,
87
+ page,
88
+ sort_by)
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,344 @@
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
+ # InvoiceSearchRequestFilters Model.
8
+ class InvoiceSearchRequestFilters < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Collecting Company Id of the selected payer.
13
+ # Optional.
14
+ # Example:
15
+ # 1-Philippines
16
+ # 5-UK
17
+ # @return [Integer]
18
+ attr_accessor :col_co_id
19
+
20
+ # Payer Id of the selected payer.
21
+ # Optional if PayerNumber is passed else Mandatory
22
+ # Example: 123456
23
+ # @return [Integer]
24
+ attr_accessor :payer_id
25
+
26
+ # Payer Number of the selected payer.
27
+ # Optional if PayerId is passed else Mandatory
28
+ # Example: GB000000123
29
+ # @return [String]
30
+ attr_accessor :payer_number
31
+
32
+ # Invoice id.
33
+ # Optional.
34
+ # This input is a search criterion, if given.
35
+ # Example: 1
36
+ # @return [Integer]
37
+ attr_accessor :invoice_id
38
+
39
+ # Invoice number.
40
+ # Optional.
41
+ # This input is a search criterion, if given.
42
+ # Example: 0123456789
43
+ # @return [String]
44
+ attr_accessor :invoice_number
45
+
46
+ # Invoice date searched from this date.
47
+ # Optional.
48
+ # This input is a search criterion, if given.
49
+ # Date format: yyyyMMdd
50
+ # Example: 20170830
51
+ # Note: This criterion is ignored if ‘Period’ is given.
52
+ # Also, this criterion is ignored if ‘ToDate’ is not provided.
53
+ # @return [String]
54
+ attr_accessor :from_date
55
+
56
+ # Invoice date searched until this date.
57
+ # Optional.
58
+ # This input is a search criterion, if given.
59
+ # Date format: yyyyMMdd
60
+ # Example: 20170830
61
+ # Note: This criterion is ignored if ‘Period’ is given.
62
+ # Also, this criterion is ignored if ‘FromDate’ is not provided.
63
+ # @return [String]
64
+ attr_accessor :to_date
65
+
66
+ # Date of invoicing.
67
+ # Optional.
68
+ # This input is a search criterion, if given.
69
+ # Date format: yyyyMMdd
70
+ # Example: 20170830
71
+ # @return [String]
72
+ attr_accessor :invoice_date
73
+
74
+ # Summary document id
75
+ # Optional.
76
+ # This input is a search criterion, if given.
77
+ # Example: 1
78
+ # @return [Integer]
79
+ attr_accessor :summary_document_id
80
+
81
+ # Summary document number
82
+ # Optional.
83
+ # This input is a search criterion, if given.
84
+ # Example: ‘0/CZ0000000123456/2017’
85
+ # @return [String]
86
+ attr_accessor :summary_document_number
87
+
88
+ # Statement of Account Id of the payment customer.
89
+ # Optional.
90
+ # This input is a search criterion, if given.
91
+ # Example: 1
92
+ # @return [String]
93
+ attr_accessor :statement_of_account_id
94
+
95
+ # Statement of Account reference number of the payment customer.
96
+ # Optional.
97
+ # This input is a search criterion, if given.
98
+ # Example: 123
99
+ # @return [String]
100
+ attr_accessor :so_a_reference_number
101
+
102
+ # Invoice date search period. Valid values –
103
+ # 1. Last 7 days – Issued in last 7 days.
104
+ # 2. Last 30 days – Issued in last 30 days.
105
+ # 3. Last 90 days – Issued in last 90 days.
106
+ # Optional.
107
+ # This input is a search criterion, if given.
108
+ # Example: 1
109
+ # @return [Integer]
110
+ attr_accessor :period
111
+
112
+ # Status of the invoice. Valid values –
113
+ # • Due – Invoices due for payment and is within the due date.
114
+ # • Paid – Fully paid Invoices.
115
+ # • Overdue – Invoices due of payment and has crossed the due date.
116
+ # • CreditNote – Credit notes
117
+ # • CreditStatement
118
+ # Optional.
119
+ # This input is a search criterion, if given.
120
+ # @return [String]
121
+ attr_accessor :invoice_status
122
+
123
+ # ISO code of the country i.e., UK, DE, MY, etc.
124
+ # Optional
125
+ # @return [String]
126
+ attr_accessor :invoiced_on_behalf_of
127
+
128
+ # Whether to include the additional invoice details in the API response.
129
+ # Optional. Default value “False”.
130
+ # The parameters that are populated
131
+ # • DocumentReference
132
+ # • AdditionalDocuments
133
+ # The above fields will not be present in the response when the respective
134
+ # data is not available in the source system.
135
+ # @return [TrueClass | FalseClass]
136
+ attr_accessor :include_e_invoice_details
137
+
138
+ # Collecting Company Code of the selected payer.
139
+ # Mandatory - It is mandatory field to external source ATOS for E-invoicing.
140
+ #
141
+ # Example:
142
+ # 86-Philippines
143
+ # 5-UK
144
+ # @return [Integer]
145
+ attr_accessor :col_co_code
146
+
147
+ # Collecting Company Code of the selected payer.
148
+ # Mandatory - It is mandatory field to external source ATOS for E-invoicing.
149
+ #
150
+ # Example:
151
+ # 86-Philippines
152
+ # 5-UK
153
+ # @return [Array[Accounts]]
154
+ attr_accessor :accounts
155
+
156
+ # Invoice type. Allowed values –
157
+ # • Original – Original document.
158
+ # • Reversal – Reversed document.
159
+ # • Replacement – Replaced document.
160
+ # Optional. (When not passed all invoice, types are considered for search)
161
+ # This input is a search criterion, if given.
162
+ # Example: Original
163
+ # @return [String]
164
+ attr_accessor :type
165
+
166
+ # A mapping from model property names to API property names.
167
+ def self.names
168
+ @_hash = {} if @_hash.nil?
169
+ @_hash['col_co_id'] = 'ColCoId'
170
+ @_hash['payer_id'] = 'PayerId'
171
+ @_hash['payer_number'] = 'PayerNumber'
172
+ @_hash['invoice_id'] = 'InvoiceId'
173
+ @_hash['invoice_number'] = 'InvoiceNumber'
174
+ @_hash['from_date'] = 'FromDate'
175
+ @_hash['to_date'] = 'ToDate'
176
+ @_hash['invoice_date'] = 'InvoiceDate'
177
+ @_hash['summary_document_id'] = 'SummaryDocumentId'
178
+ @_hash['summary_document_number'] = 'SummaryDocumentNumber'
179
+ @_hash['statement_of_account_id'] = 'StatementOfAccountId'
180
+ @_hash['so_a_reference_number'] = 'SoAReferenceNumber'
181
+ @_hash['period'] = 'Period'
182
+ @_hash['invoice_status'] = 'InvoiceStatus'
183
+ @_hash['invoiced_on_behalf_of'] = 'InvoicedOnBehalfOf'
184
+ @_hash['include_e_invoice_details'] = 'IncludeEInvoiceDetails'
185
+ @_hash['col_co_code'] = 'ColCoCode'
186
+ @_hash['accounts'] = 'Accounts'
187
+ @_hash['type'] = 'Type'
188
+ @_hash
189
+ end
190
+
191
+ # An array for optional fields
192
+ def self.optionals
193
+ %w[
194
+ col_co_id
195
+ payer_id
196
+ payer_number
197
+ invoice_id
198
+ invoice_number
199
+ from_date
200
+ to_date
201
+ invoice_date
202
+ summary_document_id
203
+ summary_document_number
204
+ statement_of_account_id
205
+ so_a_reference_number
206
+ period
207
+ invoice_status
208
+ invoiced_on_behalf_of
209
+ include_e_invoice_details
210
+ col_co_code
211
+ accounts
212
+ type
213
+ ]
214
+ end
215
+
216
+ # An array for nullable fields
217
+ def self.nullables
218
+ %w[
219
+ col_co_id
220
+ payer_id
221
+ payer_number
222
+ invoice_id
223
+ invoice_number
224
+ from_date
225
+ to_date
226
+ invoice_date
227
+ summary_document_id
228
+ summary_document_number
229
+ statement_of_account_id
230
+ so_a_reference_number
231
+ period
232
+ invoice_status
233
+ invoiced_on_behalf_of
234
+ include_e_invoice_details
235
+ col_co_code
236
+ ]
237
+ end
238
+
239
+ def initialize(col_co_id = SKIP,
240
+ payer_id = SKIP,
241
+ payer_number = SKIP,
242
+ invoice_id = SKIP,
243
+ invoice_number = SKIP,
244
+ from_date = SKIP,
245
+ to_date = SKIP,
246
+ invoice_date = SKIP,
247
+ summary_document_id = SKIP,
248
+ summary_document_number = SKIP,
249
+ statement_of_account_id = SKIP,
250
+ so_a_reference_number = SKIP,
251
+ period = SKIP,
252
+ invoice_status = SKIP,
253
+ invoiced_on_behalf_of = SKIP,
254
+ include_e_invoice_details = SKIP,
255
+ col_co_code = SKIP,
256
+ accounts = SKIP,
257
+ type = SKIP)
258
+ @col_co_id = col_co_id unless col_co_id == SKIP
259
+ @payer_id = payer_id unless payer_id == SKIP
260
+ @payer_number = payer_number unless payer_number == SKIP
261
+ @invoice_id = invoice_id unless invoice_id == SKIP
262
+ @invoice_number = invoice_number unless invoice_number == SKIP
263
+ @from_date = from_date unless from_date == SKIP
264
+ @to_date = to_date unless to_date == SKIP
265
+ @invoice_date = invoice_date unless invoice_date == SKIP
266
+ @summary_document_id = summary_document_id unless summary_document_id == SKIP
267
+ @summary_document_number = summary_document_number unless summary_document_number == SKIP
268
+ @statement_of_account_id = statement_of_account_id unless statement_of_account_id == SKIP
269
+ @so_a_reference_number = so_a_reference_number unless so_a_reference_number == SKIP
270
+ @period = period unless period == SKIP
271
+ @invoice_status = invoice_status unless invoice_status == SKIP
272
+ @invoiced_on_behalf_of = invoiced_on_behalf_of unless invoiced_on_behalf_of == SKIP
273
+ unless include_e_invoice_details == SKIP
274
+ @include_e_invoice_details =
275
+ include_e_invoice_details
276
+ end
277
+ @col_co_code = col_co_code unless col_co_code == SKIP
278
+ @accounts = accounts unless accounts == SKIP
279
+ @type = type unless type == SKIP
280
+ end
281
+
282
+ # Creates an instance of the object from a hash.
283
+ def self.from_hash(hash)
284
+ return nil unless hash
285
+
286
+ # Extract variables from the hash.
287
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
288
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
289
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
290
+ invoice_id = hash.key?('InvoiceId') ? hash['InvoiceId'] : SKIP
291
+ invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP
292
+ from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
293
+ to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
294
+ invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP
295
+ summary_document_id =
296
+ hash.key?('SummaryDocumentId') ? hash['SummaryDocumentId'] : SKIP
297
+ summary_document_number =
298
+ hash.key?('SummaryDocumentNumber') ? hash['SummaryDocumentNumber'] : SKIP
299
+ statement_of_account_id =
300
+ hash.key?('StatementOfAccountId') ? hash['StatementOfAccountId'] : SKIP
301
+ so_a_reference_number =
302
+ hash.key?('SoAReferenceNumber') ? hash['SoAReferenceNumber'] : SKIP
303
+ period = hash.key?('Period') ? hash['Period'] : SKIP
304
+ invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP
305
+ invoiced_on_behalf_of =
306
+ hash.key?('InvoicedOnBehalfOf') ? hash['InvoicedOnBehalfOf'] : SKIP
307
+ include_e_invoice_details =
308
+ hash.key?('IncludeEInvoiceDetails') ? hash['IncludeEInvoiceDetails'] : SKIP
309
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
310
+ # Parameter is an array, so we need to iterate through it
311
+ accounts = nil
312
+ unless hash['Accounts'].nil?
313
+ accounts = []
314
+ hash['Accounts'].each do |structure|
315
+ accounts << (Accounts.from_hash(structure) if structure)
316
+ end
317
+ end
318
+
319
+ accounts = SKIP unless hash.key?('Accounts')
320
+ type = hash.key?('Type') ? hash['Type'] : SKIP
321
+
322
+ # Create object from extracted values.
323
+ InvoiceSearchRequestFilters.new(col_co_id,
324
+ payer_id,
325
+ payer_number,
326
+ invoice_id,
327
+ invoice_number,
328
+ from_date,
329
+ to_date,
330
+ invoice_date,
331
+ summary_document_id,
332
+ summary_document_number,
333
+ statement_of_account_id,
334
+ so_a_reference_number,
335
+ period,
336
+ invoice_status,
337
+ invoiced_on_behalf_of,
338
+ include_e_invoice_details,
339
+ col_co_code,
340
+ accounts,
341
+ type)
342
+ end
343
+ end
344
+ end
@@ -0,0 +1,127 @@
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
+ # InvoiceSearchResponse Model.
8
+ class InvoiceSearchResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # API Request Id
13
+ # @return [String]
14
+ attr_accessor :request_id
15
+
16
+ # Indicates overall status of the request. Allowed values: SUCCES, FAILED
17
+ # @return [String]
18
+ attr_accessor :status
19
+
20
+ # Indicates overall status of the request. Allowed values: SUCCES, FAILED
21
+ # @return [Array[InvoiceSearchDetails]]
22
+ attr_accessor :data
23
+
24
+ # Specifies the returned page of the results
25
+ # @return [Integer]
26
+ attr_accessor :page
27
+
28
+ # Specifies the number of records to be returned which could be less than
29
+ # the PageSize in the request
30
+ # @return [Integer]
31
+ attr_accessor :page_size
32
+
33
+ # Specifies the total records available in the result
34
+ # @return [Integer]
35
+ attr_accessor :total_records
36
+
37
+ # Specifies the total pages available in the result
38
+ # @return [Integer]
39
+ attr_accessor :total_pages
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['page_size'] = 'PageSize'
49
+ @_hash['total_records'] = 'TotalRecords'
50
+ @_hash['total_pages'] = 'TotalPages'
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
+ page_size
62
+ total_records
63
+ total_pages
64
+ ]
65
+ end
66
+
67
+ # An array for nullable fields
68
+ def self.nullables
69
+ %w[
70
+ request_id
71
+ status
72
+ page
73
+ page_size
74
+ total_records
75
+ total_pages
76
+ ]
77
+ end
78
+
79
+ def initialize(request_id = SKIP,
80
+ status = SKIP,
81
+ data = SKIP,
82
+ page = SKIP,
83
+ page_size = SKIP,
84
+ total_records = SKIP,
85
+ total_pages = SKIP)
86
+ @request_id = request_id unless request_id == SKIP
87
+ @status = status unless status == SKIP
88
+ @data = data unless data == SKIP
89
+ @page = page unless page == SKIP
90
+ @page_size = page_size unless page_size == SKIP
91
+ @total_records = total_records unless total_records == SKIP
92
+ @total_pages = total_pages unless total_pages == SKIP
93
+ end
94
+
95
+ # Creates an instance of the object from a hash.
96
+ def self.from_hash(hash)
97
+ return nil unless hash
98
+
99
+ # Extract variables from the hash.
100
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
101
+ status = hash.key?('Status') ? hash['Status'] : SKIP
102
+ # Parameter is an array, so we need to iterate through it
103
+ data = nil
104
+ unless hash['Data'].nil?
105
+ data = []
106
+ hash['Data'].each do |structure|
107
+ data << (InvoiceSearchDetails.from_hash(structure) if structure)
108
+ end
109
+ end
110
+
111
+ data = SKIP unless hash.key?('Data')
112
+ page = hash.key?('Page') ? hash['Page'] : SKIP
113
+ page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
114
+ total_records = hash.key?('TotalRecords') ? hash['TotalRecords'] : SKIP
115
+ total_pages = hash.key?('TotalPages') ? hash['TotalPages'] : SKIP
116
+
117
+ # Create object from extracted values.
118
+ InvoiceSearchResponse.new(request_id,
119
+ status,
120
+ data,
121
+ page,
122
+ page_size,
123
+ total_records,
124
+ total_pages)
125
+ end
126
+ end
127
+ end
@@ -0,0 +1,129 @@
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
+ # InvoiceSummaryDetails Model.
8
+ class InvoiceSummaryDetails < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Total number of invoices matching with the given search criteria.
13
+ # @return [Integer]
14
+ attr_accessor :total_invoices
15
+
16
+ # Total gross amount in customer currency combined from all the invoices
17
+ # matching with the given search criteria.
18
+ # @return [Float]
19
+ attr_accessor :total_gross_amount_customer_currency
20
+
21
+ # Total net amount in customer currency combined from all the invoices
22
+ # matching with the given search criteria.
23
+ # @return [Float]
24
+ attr_accessor :total_net_amount_customer_currency
25
+
26
+ # Total VAT amount in customer currency combined from all the invoices
27
+ # matching with the given search criteria.
28
+ # @return [Float]
29
+ attr_accessor :total_vat_amount_customer_currency
30
+
31
+ # Customer currency ISO code.
32
+ # Example: EUR
33
+ # @return [String]
34
+ attr_accessor :customer_currency_code
35
+
36
+ # Customer currency code.
37
+ # Example: €
38
+ # @return [String]
39
+ attr_accessor :customer_currency_symbol
40
+
41
+ # A mapping from model property names to API property names.
42
+ def self.names
43
+ @_hash = {} if @_hash.nil?
44
+ @_hash['total_invoices'] = 'TotalInvoices'
45
+ @_hash['total_gross_amount_customer_currency'] =
46
+ 'TotalGrossAmountCustomerCurrency'
47
+ @_hash['total_net_amount_customer_currency'] =
48
+ 'TotalNetAmountCustomerCurrency'
49
+ @_hash['total_vat_amount_customer_currency'] =
50
+ 'TotalVATAmountCustomerCurrency'
51
+ @_hash['customer_currency_code'] = 'CustomerCurrencyCode'
52
+ @_hash['customer_currency_symbol'] = 'CustomerCurrencySymbol'
53
+ @_hash
54
+ end
55
+
56
+ # An array for optional fields
57
+ def self.optionals
58
+ %w[
59
+ total_invoices
60
+ total_gross_amount_customer_currency
61
+ total_net_amount_customer_currency
62
+ total_vat_amount_customer_currency
63
+ customer_currency_code
64
+ customer_currency_symbol
65
+ ]
66
+ end
67
+
68
+ # An array for nullable fields
69
+ def self.nullables
70
+ %w[
71
+ total_invoices
72
+ total_gross_amount_customer_currency
73
+ total_net_amount_customer_currency
74
+ total_vat_amount_customer_currency
75
+ customer_currency_code
76
+ customer_currency_symbol
77
+ ]
78
+ end
79
+
80
+ def initialize(total_invoices = SKIP,
81
+ total_gross_amount_customer_currency = SKIP,
82
+ total_net_amount_customer_currency = SKIP,
83
+ total_vat_amount_customer_currency = SKIP,
84
+ customer_currency_code = SKIP,
85
+ customer_currency_symbol = SKIP)
86
+ @total_invoices = total_invoices unless total_invoices == SKIP
87
+ unless total_gross_amount_customer_currency == SKIP
88
+ @total_gross_amount_customer_currency =
89
+ total_gross_amount_customer_currency
90
+ end
91
+ unless total_net_amount_customer_currency == SKIP
92
+ @total_net_amount_customer_currency =
93
+ total_net_amount_customer_currency
94
+ end
95
+ unless total_vat_amount_customer_currency == SKIP
96
+ @total_vat_amount_customer_currency =
97
+ total_vat_amount_customer_currency
98
+ end
99
+ @customer_currency_code = customer_currency_code unless customer_currency_code == SKIP
100
+ @customer_currency_symbol = customer_currency_symbol unless customer_currency_symbol == SKIP
101
+ end
102
+
103
+ # Creates an instance of the object from a hash.
104
+ def self.from_hash(hash)
105
+ return nil unless hash
106
+
107
+ # Extract variables from the hash.
108
+ total_invoices = hash.key?('TotalInvoices') ? hash['TotalInvoices'] : SKIP
109
+ total_gross_amount_customer_currency =
110
+ hash.key?('TotalGrossAmountCustomerCurrency') ? hash['TotalGrossAmountCustomerCurrency'] : SKIP
111
+ total_net_amount_customer_currency =
112
+ hash.key?('TotalNetAmountCustomerCurrency') ? hash['TotalNetAmountCustomerCurrency'] : SKIP
113
+ total_vat_amount_customer_currency =
114
+ hash.key?('TotalVATAmountCustomerCurrency') ? hash['TotalVATAmountCustomerCurrency'] : SKIP
115
+ customer_currency_code =
116
+ hash.key?('CustomerCurrencyCode') ? hash['CustomerCurrencyCode'] : SKIP
117
+ customer_currency_symbol =
118
+ hash.key?('CustomerCurrencySymbol') ? hash['CustomerCurrencySymbol'] : SKIP
119
+
120
+ # Create object from extracted values.
121
+ InvoiceSummaryDetails.new(total_invoices,
122
+ total_gross_amount_customer_currency,
123
+ total_net_amount_customer_currency,
124
+ total_vat_amount_customer_currency,
125
+ customer_currency_code,
126
+ customer_currency_symbol)
127
+ end
128
+ end
129
+ end