data-and-reporting-sdk 1.0.0 → 1.2.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 (153) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -16
  3. data/lib/shell_data_reporting_ap_is/controllers/base_controller.rb +9 -9
  4. data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +210 -210
  5. data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +221 -221
  6. data/lib/shell_data_reporting_ap_is/controllers/o_auth_authorization_controller.rb +9 -9
  7. data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +354 -354
  8. data/lib/shell_data_reporting_ap_is/exceptions/default_error_exception.rb +15 -15
  9. data/lib/shell_data_reporting_ap_is/exceptions/error_object_exception.rb +15 -15
  10. data/lib/shell_data_reporting_ap_is/exceptions/error_user_access_error1_exception.rb +15 -15
  11. data/lib/shell_data_reporting_ap_is/exceptions/o_auth_provider_exception.rb +15 -15
  12. data/lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb +54 -10
  13. data/lib/shell_data_reporting_ap_is/models/account_access.rb +3 -8
  14. data/lib/shell_data_reporting_ap_is/models/account_request.rb +17 -26
  15. data/lib/shell_data_reporting_ap_is/models/account_response.rb +2 -6
  16. data/lib/shell_data_reporting_ap_is/models/account_response_accounts_items.rb +29 -53
  17. data/lib/shell_data_reporting_ap_is/models/accounts.rb +1 -2
  18. data/lib/shell_data_reporting_ap_is/models/address.rb +4 -11
  19. data/lib/shell_data_reporting_ap_is/models/audit_request.rb +17 -25
  20. data/lib/shell_data_reporting_ap_is/models/audit_response.rb +2 -6
  21. data/lib/shell_data_reporting_ap_is/models/audit_response_audits_items.rb +50 -63
  22. data/lib/shell_data_reporting_ap_is/models/bank_account.rb +5 -13
  23. data/lib/shell_data_reporting_ap_is/models/base_model.rb +76 -28
  24. data/lib/shell_data_reporting_ap_is/models/bonus_configuration.rb +9 -18
  25. data/lib/shell_data_reporting_ap_is/models/bonus_history.rb +14 -29
  26. data/lib/shell_data_reporting_ap_is/models/card_day_time_restrictions.rb +3 -9
  27. data/lib/shell_data_reporting_ap_is/models/card_exceptions.rb +8 -19
  28. data/lib/shell_data_reporting_ap_is/models/card_group_request.rb +6 -12
  29. data/lib/shell_data_reporting_ap_is/models/card_group_response.rb +2 -6
  30. data/lib/shell_data_reporting_ap_is/models/card_group_response_card_groups_items.rb +10 -20
  31. data/lib/shell_data_reporting_ap_is/models/card_type_request.rb +3 -7
  32. data/lib/shell_data_reporting_ap_is/models/card_type_response.rb +1 -3
  33. data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +15 -31
  34. data/lib/shell_data_reporting_ap_is/models/card_type_response_error.rb +1 -2
  35. data/lib/shell_data_reporting_ap_is/models/card_usage_restrictions.rb +5 -10
  36. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_request.rb +3 -8
  37. data/lib/shell_data_reporting_ap_is/models/card_usage_summary_response.rb +1 -3
  38. data/lib/shell_data_reporting_ap_is/models/col_co_access.rb +2 -4
  39. data/lib/shell_data_reporting_ap_is/models/current_volume.rb +2 -5
  40. data/lib/shell_data_reporting_ap_is/models/customer_contract.rb +1 -2
  41. data/lib/shell_data_reporting_ap_is/models/customer_detail_request.rb +2 -5
  42. data/lib/shell_data_reporting_ap_is/models/customer_detail_response.rb +31 -45
  43. data/lib/shell_data_reporting_ap_is/models/customer_price_list_request.rb +5 -12
  44. data/lib/shell_data_reporting_ap_is/models/customer_price_list_response.rb +1 -3
  45. data/lib/shell_data_reporting_ap_is/models/default_error_fault.rb +1 -2
  46. data/lib/shell_data_reporting_ap_is/models/delivery_addresses.rb +7 -18
  47. data/lib/shell_data_reporting_ap_is/models/eid_access.rb +1 -2
  48. data/lib/shell_data_reporting_ap_is/models/eid_document.rb +11 -16
  49. data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +3 -8
  50. data/lib/shell_data_reporting_ap_is/models/eid_download_req.rb +2 -4
  51. data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +10 -15
  52. data/lib/shell_data_reporting_ap_is/models/eid_search_request.rb +2 -4
  53. data/lib/shell_data_reporting_ap_is/models/error_details.rb +1 -3
  54. data/lib/shell_data_reporting_ap_is/models/error_status.rb +11 -2
  55. data/lib/shell_data_reporting_ap_is/models/error_user_access_error.rb +1 -2
  56. data/lib/shell_data_reporting_ap_is/models/exception_product.rb +1 -2
  57. data/lib/shell_data_reporting_ap_is/models/exception_site_location.rb +1 -2
  58. data/lib/shell_data_reporting_ap_is/models/fee_item.rb +35 -71
  59. data/lib/shell_data_reporting_ap_is/models/fee_item_summary_all_of0.rb +5 -11
  60. data/lib/shell_data_reporting_ap_is/models/fee_rule_location.rb +4 -10
  61. data/lib/shell_data_reporting_ap_is/models/fee_rule_product.rb +2 -5
  62. data/lib/shell_data_reporting_ap_is/models/fee_rule_tier.rb +1 -3
  63. data/lib/shell_data_reporting_ap_is/models/fee_summary_response.rb +1 -3
  64. data/lib/shell_data_reporting_ap_is/models/fees_fee_rule_tiers.rb +3 -7
  65. data/lib/shell_data_reporting_ap_is/models/finance_currency.rb +1 -2
  66. data/lib/shell_data_reporting_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb +104 -0
  67. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_card.rb +1 -3
  68. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_data.rb +9 -20
  69. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_request.rb +7 -14
  70. data/lib/shell_data_reporting_ap_is/models/fuel_consumption_response.rb +1 -3
  71. data/lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb +1 -2
  72. data/lib/shell_data_reporting_ap_is/models/invoice_dates_request_filters.rb +2 -6
  73. data/lib/shell_data_reporting_ap_is/models/invoice_dates_response_data.rb +1 -3
  74. data/lib/shell_data_reporting_ap_is/models/invoice_distribution_method.rb +2 -4
  75. data/lib/shell_data_reporting_ap_is/models/invoice_download_req.rb +2 -5
  76. data/lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb +2 -4
  77. data/lib/shell_data_reporting_ap_is/models/invoice_search_details.rb +86 -107
  78. data/lib/shell_data_reporting_ap_is/models/invoice_search_request.rb +5 -7
  79. data/lib/shell_data_reporting_ap_is/models/invoice_search_request_filters.rb +21 -31
  80. data/lib/shell_data_reporting_ap_is/models/invoice_search_response.rb +2 -7
  81. data/lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb +21 -31
  82. data/lib/shell_data_reporting_ap_is/models/invoice_summary_response.rb +1 -3
  83. data/lib/shell_data_reporting_ap_is/models/invoices_summaries.rb +5 -10
  84. data/lib/shell_data_reporting_ap_is/models/last_statement_of_account.rb +39 -48
  85. data/lib/shell_data_reporting_ap_is/models/logged_in_user_request.rb +2 -4
  86. data/lib/shell_data_reporting_ap_is/models/logged_in_user_response.rb +12 -25
  87. data/lib/shell_data_reporting_ap_is/models/monthly_invoice_trend.rb +2 -5
  88. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb +21 -32
  89. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request_accounts_items.rb +1 -3
  90. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response.rb +2 -6
  91. data/lib/shell_data_reporting_ap_is/models/multi_priced_transaction_response_transactions_items.rb +70 -122
  92. data/lib/shell_data_reporting_ap_is/models/o_auth_token.rb +2 -6
  93. data/lib/shell_data_reporting_ap_is/models/past_statement_of_accounts.rb +11 -22
  94. data/lib/shell_data_reporting_ap_is/models/payer_access.rb +3 -8
  95. data/lib/shell_data_reporting_ap_is/models/payer_details.rb +49 -92
  96. data/lib/shell_data_reporting_ap_is/models/payer_request.rb +9 -12
  97. data/lib/shell_data_reporting_ap_is/models/payer_response.rb +2 -6
  98. data/lib/shell_data_reporting_ap_is/models/payers.rb +2 -5
  99. data/lib/shell_data_reporting_ap_is/models/payments_since_last_soa.rb +8 -17
  100. data/lib/shell_data_reporting_ap_is/models/pin_advice_types.rb +5 -6
  101. data/lib/shell_data_reporting_ap_is/models/price_list.rb +25 -45
  102. data/lib/shell_data_reporting_ap_is/models/price_trans_summary_request.rb +28 -44
  103. data/lib/shell_data_reporting_ap_is/models/price_transaction_request.rb +41 -59
  104. data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +20 -46
  105. data/lib/shell_data_reporting_ap_is/models/priced_response_data.rb +91 -201
  106. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response.rb +1 -3
  107. data/lib/shell_data_reporting_ap_is/models/priced_trans_summary_response_transactions_summary_items.rb +22 -28
  108. data/lib/shell_data_reporting_ap_is/models/priced_transaction_items_location_items.rb +11 -2
  109. data/lib/shell_data_reporting_ap_is/models/priced_transaction_request_v2.rb +1 -3
  110. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_transactions_items.rb +91 -141
  111. data/lib/shell_data_reporting_ap_is/models/priced_transaction_response_v2.rb +2 -6
  112. data/lib/shell_data_reporting_ap_is/models/pricing_current_volume.rb +3 -6
  113. data/lib/shell_data_reporting_ap_is/models/pricing_history.rb +2 -5
  114. data/lib/shell_data_reporting_ap_is/models/purchase_categories.rb +1 -4
  115. data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +6 -14
  116. data/lib/shell_data_reporting_ap_is/models/recent_transaction_request.rb +1 -3
  117. data/lib/shell_data_reporting_ap_is/models/recent_transactions.rb +29 -60
  118. data/lib/shell_data_reporting_ap_is/models/recent_transactions_response.rb +2 -6
  119. data/lib/shell_data_reporting_ap_is/models/role.rb +3 -6
  120. data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +19 -27
  121. data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +9 -16
  122. data/lib/shell_data_reporting_ap_is/models/search_documents_request.rb +1 -3
  123. data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +3 -7
  124. data/lib/shell_data_reporting_ap_is/models/search_soa_req.rb +4 -11
  125. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account.rb +11 -18
  126. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_request.rb +1 -3
  127. data/lib/shell_data_reporting_ap_is/models/search_statement_of_account_response.rb +2 -7
  128. data/lib/shell_data_reporting_ap_is/models/site_location.rb +11 -2
  129. data/lib/shell_data_reporting_ap_is/models/statement_of_account_request_filters.rb +2 -5
  130. data/lib/shell_data_reporting_ap_is/models/statement_of_account_resp.rb +1 -2
  131. data/lib/shell_data_reporting_ap_is/models/statement_of_account_response.rb +1 -3
  132. data/lib/shell_data_reporting_ap_is/models/tier.rb +8 -12
  133. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions.rb +47 -92
  134. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb +12 -21
  135. data/lib/shell_data_reporting_ap_is/models/transaction_exceptions_response.rb +2 -4
  136. data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +21 -33
  137. data/lib/shell_data_reporting_ap_is/models/transaction_fees_response.rb +2 -6
  138. data/lib/shell_data_reporting_ap_is/models/update_odometer.rb +1 -2
  139. data/lib/shell_data_reporting_ap_is/models/update_odometer_reference.rb +1 -2
  140. data/lib/shell_data_reporting_ap_is/models/update_odometer_request.rb +3 -8
  141. data/lib/shell_data_reporting_ap_is/models/update_odometer_response.rb +2 -4
  142. data/lib/shell_data_reporting_ap_is/models/usage_summary.rb +6 -14
  143. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_request.rb +2 -5
  144. data/lib/shell_data_reporting_ap_is/models/volume_based_bonus_response.rb +2 -4
  145. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_request.rb +2 -5
  146. data/lib/shell_data_reporting_ap_is/models/volume_based_pricing_response.rb +2 -5
  147. data/lib/shell_data_reporting_ap_is/utilities/file_wrapper.rb +9 -9
  148. data/lib/shell_data_reporting_ap_is/utilities/union_type_lookup.rb +35 -0
  149. data/lib/shell_data_reporting_ap_is.rb +3 -0
  150. data/test/controllers/controller_test_base.rb +0 -5
  151. data/test/controllers/test_invoice_controller.rb +1 -1
  152. data/test/controllers/test_transaction_controller.rb +83 -75
  153. metadata +12 -16
@@ -168,16 +168,11 @@ module ShellDataReportingApIs
168
168
  ]
169
169
  end
170
170
 
171
- def initialize(level = SKIP,
172
- daily_spend_limit = SKIP,
173
- weekly_spend_limit = SKIP,
174
- monthly_spend_limit = SKIP,
175
- annual_spend_limit = SKIP,
176
- life_time_spend_limit = SKIP,
177
- daily_volume_limit = SKIP,
178
- weekly_volume_limit = SKIP,
179
- monthly_volume_limit = SKIP,
180
- annual_volume_limit = 0,
171
+ def initialize(level = SKIP, daily_spend_limit = SKIP,
172
+ weekly_spend_limit = SKIP, monthly_spend_limit = SKIP,
173
+ annual_spend_limit = SKIP, life_time_spend_limit = SKIP,
174
+ daily_volume_limit = SKIP, weekly_volume_limit = SKIP,
175
+ monthly_volume_limit = SKIP, annual_volume_limit = 0,
181
176
  life_time_volume_limit = SKIP,
182
177
  transaction_spend_limit = SKIP,
183
178
  transaction_volume_limit = SKIP,
@@ -108,14 +108,9 @@ module ShellDataReportingApIs
108
108
  ]
109
109
  end
110
110
 
111
- def initialize(col_co_id = SKIP,
112
- col_co_code = SKIP,
113
- payer_id = SKIP,
114
- payer_number = SKIP,
115
- account_id = SKIP,
116
- account_number = SKIP,
117
- card_id = SKIP,
118
- pan = SKIP,
111
+ def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
112
+ payer_number = SKIP, account_id = SKIP,
113
+ account_number = SKIP, card_id = SKIP, pan = SKIP,
119
114
  card_expiry_date = SKIP)
120
115
  @col_co_id = col_co_id unless col_co_id == SKIP
121
116
  @col_co_code = col_co_code unless col_co_code == SKIP
@@ -44,9 +44,7 @@ module ShellDataReportingApIs
44
44
  []
45
45
  end
46
46
 
47
- def initialize(usage_summary = SKIP,
48
- request_id = SKIP,
49
- error = SKIP)
47
+ def initialize(usage_summary = SKIP, request_id = SKIP, error = SKIP)
50
48
  @usage_summary = usage_summary unless usage_summary == SKIP
51
49
  @request_id = request_id unless request_id == SKIP
52
50
  @error = error unless error == SKIP
@@ -56,10 +56,8 @@ module ShellDataReportingApIs
56
56
  ]
57
57
  end
58
58
 
59
- def initialize(col_co_id = SKIP,
60
- col_co_code = SKIP,
61
- col_co_country_name = SKIP,
62
- issuing_country_number = SKIP)
59
+ def initialize(col_co_id = SKIP, col_co_code = SKIP,
60
+ col_co_country_name = SKIP, issuing_country_number = SKIP)
63
61
  @col_co_id = col_co_id unless col_co_id == SKIP
64
62
  @col_co_code = col_co_code unless col_co_code == SKIP
65
63
  @col_co_country_name = col_co_country_name unless col_co_country_name == SKIP
@@ -64,11 +64,8 @@ module ShellDataReportingApIs
64
64
  ]
65
65
  end
66
66
 
67
- def initialize(fee_rule_id = SKIP,
68
- fee_rule_description = SKIP,
69
- month = SKIP,
70
- year = SKIP,
71
- total_volume = SKIP)
67
+ def initialize(fee_rule_id = SKIP, fee_rule_description = SKIP,
68
+ month = SKIP, year = SKIP, total_volume = SKIP)
72
69
  @fee_rule_id = fee_rule_id unless fee_rule_id == SKIP
73
70
  @fee_rule_description = fee_rule_description unless fee_rule_description == SKIP
74
71
  @month = month unless month == SKIP
@@ -41,8 +41,7 @@ module ShellDataReportingApIs
41
41
  ]
42
42
  end
43
43
 
44
- def initialize(partner_id = SKIP,
45
- partner_name = SKIP)
44
+ def initialize(partner_id = SKIP, partner_name = SKIP)
46
45
  @partner_id = partner_id unless partner_id == SKIP
47
46
  @partner_name = partner_name unless partner_name == SKIP
48
47
  end
@@ -85,11 +85,8 @@ module ShellDataReportingApIs
85
85
  ]
86
86
  end
87
87
 
88
- def initialize(col_co_id = SKIP,
89
- col_co_code = SKIP,
90
- payer_id = SKIP,
91
- payer_number = SKIP,
92
- account_id = SKIP,
88
+ def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
89
+ payer_number = SKIP, account_id = SKIP,
93
90
  account_number = SKIP)
94
91
  @col_co_id = col_co_id unless col_co_id == SKIP
95
92
  @col_co_code = col_co_code unless col_co_code == SKIP
@@ -54,20 +54,20 @@ module ShellDataReportingApIs
54
54
  attr_accessor :billing_address
55
55
 
56
56
  # Card group position at –
57
- # • Payer – Payer level
58
- # • Account – Account level
57
+ # • Payer – Payer level
58
+ # • Account – Account level
59
59
  # @return [String]
60
60
  attr_accessor :card_group_position
61
61
 
62
62
  # Card group position at –
63
- # • Payer – Payer level
64
- # • Account – Account level
63
+ # • Payer – Payer level
64
+ # • Account – Account level
65
65
  # @return [Address]
66
66
  attr_accessor :correspondence_address
67
67
 
68
68
  # Card group position at –
69
- # • Payer – Payer level
70
- # • Account – Account level
69
+ # • Payer – Payer level
70
+ # • Account – Account level
71
71
  # @return [Array[DeliveryAddresses]]
72
72
  attr_accessor :delivery_addresses
73
73
 
@@ -132,28 +132,28 @@ module ShellDataReportingApIs
132
132
 
133
133
  # Default PIN AdviceType of the customer.
134
134
  # Possible Values:
135
- # 1. Paper
136
- # 2. Email
137
- # 3. SMS
138
- # 4. None
135
+ # 1. Paper
136
+ # 2. Email
137
+ # 3. SMS
138
+ # 4. None
139
139
  # @return [Integer]
140
140
  attr_accessor :default_pin_advice_type
141
141
 
142
142
  # Default PIN AdviceType of the customer.
143
143
  # Possible Values:
144
- # 1. Paper
145
- # 2. Email
146
- # 3. SMS
147
- # 4. None
144
+ # 1. Paper
145
+ # 2. Email
146
+ # 3. SMS
147
+ # 4. None
148
148
  # @return [Array[PINAdviceTypes]]
149
149
  attr_accessor :pin_advice_types
150
150
 
151
151
  # Default PIN AdviceType of the customer.
152
152
  # Possible Values:
153
- # 1. Paper
154
- # 2. Email
155
- # 3. SMS
156
- # 4. None
153
+ # 1. Paper
154
+ # 2. Email
155
+ # 3. SMS
156
+ # 4. None
157
157
  # @return [ErrorStatus]
158
158
  attr_accessor :error
159
159
 
@@ -267,33 +267,19 @@ module ShellDataReportingApIs
267
267
  ]
268
268
  end
269
269
 
270
- def initialize(account_id = SKIP,
271
- account_name = SKIP,
272
- account_number = SKIP,
273
- account_short_name = SKIP,
274
- account_trading_name = SKIP,
275
- allow_fleet_id_input = SKIP,
276
- band = SKIP,
277
- billing_address = SKIP,
278
- card_group_position = SKIP,
279
- correspondence_address = SKIP,
280
- delivery_addresses = SKIP,
281
- fleet_pin = SKIP,
282
- full_name = SKIP,
283
- invoice_customer_id = SKIP,
284
- invoice_customer_short_name = SKIP,
285
- is_invoice_point = SKIP,
286
- marketing_segmentation = SKIP,
287
- vat_number = SKIP,
288
- payer_id = SKIP,
289
- payer_name = SKIP,
290
- payer_number = SKIP,
291
- self_selected_pin = SKIP,
292
- status = SKIP,
293
- default_pin_advice_type = SKIP,
294
- pin_advice_types = SKIP,
295
- error = SKIP,
296
- request_id = SKIP,
270
+ def initialize(account_id = SKIP, account_name = SKIP,
271
+ account_number = SKIP, account_short_name = SKIP,
272
+ account_trading_name = SKIP, allow_fleet_id_input = SKIP,
273
+ band = SKIP, billing_address = SKIP,
274
+ card_group_position = SKIP, correspondence_address = SKIP,
275
+ delivery_addresses = SKIP, fleet_pin = SKIP,
276
+ full_name = SKIP, invoice_customer_id = SKIP,
277
+ invoice_customer_short_name = SKIP, is_invoice_point = SKIP,
278
+ marketing_segmentation = SKIP, vat_number = SKIP,
279
+ payer_id = SKIP, payer_name = SKIP, payer_number = SKIP,
280
+ self_selected_pin = SKIP, status = SKIP,
281
+ default_pin_advice_type = SKIP, pin_advice_types = SKIP,
282
+ error = SKIP, request_id = SKIP,
297
283
  pin_change_allowed_by_cardholder = SKIP,
298
284
  pin_change_allowed_from_fleet_pin = SKIP)
299
285
  @account_id = account_id unless account_id == SKIP
@@ -132,18 +132,11 @@ module ShellDataReportingApIs
132
132
  ]
133
133
  end
134
134
 
135
- def initialize(from_date = nil,
136
- to_date = nil,
137
- col_co_id = SKIP,
138
- col_co_code = SKIP,
139
- payer_id = SKIP,
140
- payer_number = SKIP,
141
- account_id = SKIP,
142
- account_number = SKIP,
143
- customer_specific_list = SKIP,
144
- price_list_type = SKIP,
145
- del_co_id = SKIP,
146
- include_pump_price_discounts = SKIP)
135
+ def initialize(from_date = nil, to_date = nil, col_co_id = SKIP,
136
+ col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP,
137
+ account_id = SKIP, account_number = SKIP,
138
+ customer_specific_list = SKIP, price_list_type = SKIP,
139
+ del_co_id = SKIP, include_pump_price_discounts = SKIP)
147
140
  @col_co_id = col_co_id unless col_co_id == SKIP
148
141
  @col_co_code = col_co_code unless col_co_code == SKIP
149
142
  @payer_id = payer_id unless payer_id == SKIP
@@ -47,9 +47,7 @@ module ShellDataReportingApIs
47
47
  []
48
48
  end
49
49
 
50
- def initialize(request_id = SKIP,
51
- price_list = SKIP,
52
- error = SKIP)
50
+ def initialize(request_id = SKIP, price_list = SKIP, error = SKIP)
53
51
  @request_id = request_id unless request_id == SKIP
54
52
  @price_list = price_list unless price_list == SKIP
55
53
  @error = error unless error == SKIP
@@ -38,8 +38,7 @@ module ShellDataReportingApIs
38
38
  []
39
39
  end
40
40
 
41
- def initialize(faultstring = SKIP,
42
- detail = SKIP)
41
+ def initialize(faultstring = SKIP, detail = SKIP)
43
42
  @faultstring = faultstring unless faultstring == SKIP
44
43
  @detail = detail unless detail == SKIP
45
44
  end
@@ -164,24 +164,13 @@ module ShellDataReportingApIs
164
164
  ]
165
165
  end
166
166
 
167
- def initialize(address_id = SKIP,
168
- address_line1 = SKIP,
169
- address_line2 = SKIP,
170
- address_line3 = SKIP,
171
- city = SKIP,
172
- company_name = SKIP,
173
- contact_fore_name = SKIP,
174
- contact_last_name = SKIP,
175
- contact_middle_name = SKIP,
176
- contact_title = SKIP,
177
- country = SKIP,
178
- country_id = SKIP,
179
- country_iso_code = SKIP,
180
- fax = SKIP,
181
- region = SKIP,
182
- region_id = SKIP,
183
- telephone = SKIP,
184
- zip_code = SKIP,
167
+ def initialize(address_id = SKIP, address_line1 = SKIP,
168
+ address_line2 = SKIP, address_line3 = SKIP, city = SKIP,
169
+ company_name = SKIP, contact_fore_name = SKIP,
170
+ contact_last_name = SKIP, contact_middle_name = SKIP,
171
+ contact_title = SKIP, country = SKIP, country_id = SKIP,
172
+ country_iso_code = SKIP, fax = SKIP, region = SKIP,
173
+ region_id = SKIP, telephone = SKIP, zip_code = SKIP,
185
174
  address_type = SKIP)
186
175
  @address_id = address_id unless address_id == SKIP
187
176
  @address_line1 = address_line1 unless address_line1 == SKIP
@@ -48,8 +48,7 @@ module ShellDataReportingApIs
48
48
  ]
49
49
  end
50
50
 
51
- def initialize(col_co_id = SKIP,
52
- col_co_code = SKIP,
51
+ def initialize(col_co_id = SKIP, col_co_code = SKIP,
53
52
  account_group_id = SKIP)
54
53
  @col_co_id = col_co_id unless col_co_id == SKIP
55
54
  @col_co_code = col_co_code unless col_co_code == SKIP
@@ -24,8 +24,8 @@ module ShellDataReportingApIs
24
24
 
25
25
  # Document type.
26
26
  # Possible values:
27
- # • NAT (National)
28
- # • INT (International)
27
+ # • NAT (National)
28
+ # • INT (International)
29
29
  # @return [String]
30
30
  attr_accessor :document_type
31
31
 
@@ -48,10 +48,10 @@ module ShellDataReportingApIs
48
48
 
49
49
  # Document status.
50
50
  # Possible values:
51
- # • NEW
52
- # • VIEWED
53
- # • DOWNLOADED
54
- # • RESTORED
51
+ # • NEW
52
+ # • VIEWED
53
+ # • DOWNLOADED
54
+ # • RESTORED
55
55
  # @return [String]
56
56
  attr_accessor :document_status
57
57
 
@@ -107,16 +107,11 @@ module ShellDataReportingApIs
107
107
  ]
108
108
  end
109
109
 
110
- def initialize(document_id = SKIP,
111
- account_group_id = SKIP,
112
- account_group_name = SKIP,
113
- document_type = SKIP,
114
- document_format = SKIP,
115
- document_date = SKIP,
116
- number_of_invoices = SKIP,
117
- file_size = SKIP,
118
- document_status = SKIP,
119
- document_name = SKIP)
110
+ def initialize(document_id = SKIP, account_group_id = SKIP,
111
+ account_group_name = SKIP, document_type = SKIP,
112
+ document_format = SKIP, document_date = SKIP,
113
+ number_of_invoices = SKIP, file_size = SKIP,
114
+ document_status = SKIP, document_name = SKIP)
120
115
  @document_id = document_id unless document_id == SKIP
121
116
  @account_group_id = account_group_id unless account_group_id == SKIP
122
117
  @account_group_name = account_group_name unless account_group_name == SKIP
@@ -81,14 +81,9 @@ module ShellDataReportingApIs
81
81
  []
82
82
  end
83
83
 
84
- def initialize(request_id = SKIP,
85
- status = SKIP,
86
- data = SKIP,
87
- page_size = SKIP,
88
- page = SKIP,
89
- total_pages = SKIP,
90
- total_records = SKIP,
91
- is_first_page = SKIP,
84
+ def initialize(request_id = SKIP, status = SKIP, data = SKIP,
85
+ page_size = SKIP, page = SKIP, total_pages = SKIP,
86
+ total_records = SKIP, is_first_page = SKIP,
92
87
  is_last_page = SKIP)
93
88
  @request_id = request_id unless request_id == SKIP
94
89
  @status = status unless status == SKIP
@@ -54,10 +54,8 @@ module ShellDataReportingApIs
54
54
  ]
55
55
  end
56
56
 
57
- def initialize(col_co_code = nil,
58
- eid_list = nil,
59
- account_group_country = nil,
60
- account_group_id_list = nil)
57
+ def initialize(col_co_code = nil, eid_list = nil,
58
+ account_group_country = nil, account_group_id_list = nil)
61
59
  @col_co_code = col_co_code
62
60
  @eid_list = eid_list
63
61
  @account_group_country = account_group_country
@@ -43,18 +43,18 @@ module ShellDataReportingApIs
43
43
  # Invoice type.
44
44
  # Optional.
45
45
  # Possible values:
46
- # • NAT (National)
47
- # • INT (International)
46
+ # • NAT (National)
47
+ # • INT (International)
48
48
  # @return [String]
49
49
  attr_accessor :invoice_type
50
50
 
51
51
  # Status of the document.
52
52
  # Optional.
53
53
  # Possible values:
54
- # • NEW
55
- # • VIEWED
56
- # • DOWNLOADED
57
- # • RESTORED
54
+ # • NEW
55
+ # • VIEWED
56
+ # • DOWNLOADED
57
+ # • RESTORED
58
58
  # @return [String]
59
59
  attr_accessor :invoice_status
60
60
 
@@ -107,15 +107,10 @@ module ShellDataReportingApIs
107
107
  ]
108
108
  end
109
109
 
110
- def initialize(col_co_code = nil,
111
- account_group_country = nil,
112
- account_group_id = nil,
113
- account_group_name = SKIP,
114
- from_date = SKIP,
115
- to_date = SKIP,
116
- invoice_type = SKIP,
117
- invoice_status = SKIP,
118
- sort_by = SKIP)
110
+ def initialize(col_co_code = nil, account_group_country = nil,
111
+ account_group_id = nil, account_group_name = SKIP,
112
+ from_date = SKIP, to_date = SKIP, invoice_type = SKIP,
113
+ invoice_status = SKIP, sort_by = SKIP)
119
114
  @col_co_code = col_co_code
120
115
  @account_group_country = account_group_country
121
116
  @account_group_id = account_group_id
@@ -17,7 +17,7 @@ module ShellDataReportingApIs
17
17
  # @return [Integer]
18
18
  attr_accessor :page
19
19
 
20
- # Specify the number of records to returned; Max 1000
20
+ # Specify the number of records to returned; Max 100
21
21
  # @return [Integer]
22
22
  attr_accessor :page_size
23
23
 
@@ -44,9 +44,7 @@ module ShellDataReportingApIs
44
44
  []
45
45
  end
46
46
 
47
- def initialize(filters = SKIP,
48
- page = SKIP,
49
- page_size = SKIP)
47
+ def initialize(filters = SKIP, page = SKIP, page_size = SKIP)
50
48
  @filters = filters unless filters == SKIP
51
49
  @page = page unless page == SKIP
52
50
  @page_size = page_size unless page_size == SKIP
@@ -50,9 +50,7 @@ module ShellDataReportingApIs
50
50
  []
51
51
  end
52
52
 
53
- def initialize(code = SKIP,
54
- title = SKIP,
55
- detail = SKIP,
53
+ def initialize(code = SKIP, title = SKIP, detail = SKIP,
56
54
  additional_info = SKIP)
57
55
  @code = code unless code == SKIP
58
56
  @title = title unless title == SKIP
@@ -38,8 +38,7 @@ module ShellDataReportingApIs
38
38
  []
39
39
  end
40
40
 
41
- def initialize(code = SKIP,
42
- description = SKIP)
41
+ def initialize(code = SKIP, description = SKIP)
43
42
  @code = code unless code == SKIP
44
43
  @description = description unless description == SKIP
45
44
  end
@@ -56,5 +55,15 @@ module ShellDataReportingApIs
56
55
  ErrorStatus.new(code,
57
56
  description)
58
57
  end
58
+
59
+ # Validates an instance of the object from a given value.
60
+ # @param [ErrorStatus | Hash] The value against the validation is performed.
61
+ def self.validate(value)
62
+ return true if value.instance_of? self
63
+
64
+ return false unless value.instance_of? Hash
65
+
66
+ true
67
+ end
59
68
  end
60
69
  end
@@ -38,8 +38,7 @@ module ShellDataReportingApIs
38
38
  []
39
39
  end
40
40
 
41
- def initialize(code = SKIP,
42
- description = SKIP)
41
+ def initialize(code = SKIP, description = SKIP)
43
42
  @code = code unless code == SKIP
44
43
  @description = description unless description == SKIP
45
44
  end
@@ -43,8 +43,7 @@ module ShellDataReportingApIs
43
43
  ]
44
44
  end
45
45
 
46
- def initialize(productid = SKIP,
47
- product_code = SKIP)
46
+ def initialize(productid = SKIP, product_code = SKIP)
48
47
  @productid = productid unless productid == SKIP
49
48
  @product_code = product_code unless product_code == SKIP
50
49
  end
@@ -41,8 +41,7 @@ module ShellDataReportingApIs
41
41
  ]
42
42
  end
43
43
 
44
- def initialize(lat = SKIP,
45
- lng = SKIP)
44
+ def initialize(lat = SKIP, lng = SKIP)
46
45
  @lat = lat unless lat == SKIP
47
46
  @lng = lng unless lng == SKIP
48
47
  end