data-and-reporting-sdk 2.0.0 → 3.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 (184) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +67 -17
  4. data/bin/console +15 -0
  5. data/lib/shell_data_reporting_ap_is/client.rb +17 -2
  6. data/lib/shell_data_reporting_ap_is/configuration.rb +132 -6
  7. data/lib/shell_data_reporting_ap_is/controllers/customer_controller.rb +97 -97
  8. data/lib/shell_data_reporting_ap_is/controllers/invoice_controller.rb +45 -45
  9. data/lib/shell_data_reporting_ap_is/controllers/transaction_controller.rb +66 -66
  10. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_accounts400_error_exception.rb +69 -0
  11. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_accounts401_error_exception.rb +69 -0
  12. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_accounts403_error_exception.rb +69 -0
  13. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_accounts404_error_exception.rb +69 -0
  14. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_accounts500_error_exception.rb +69 -0
  15. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_auditreport400_error_exception.rb +69 -0
  16. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_auditreport401_error_exception.rb +69 -0
  17. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_auditreport403_error_exception.rb +69 -0
  18. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_auditreport404_error_exception.rb +69 -0
  19. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_auditreport500_error_exception.rb +69 -0
  20. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_cardgroups400_error_exception.rb +69 -0
  21. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_cardgroups401_error_exception.rb +69 -0
  22. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_cardgroups403_error_exception.rb +69 -0
  23. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_cardgroups404_error_exception.rb +69 -0
  24. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_cardgroups500_error_exception.rb +69 -0
  25. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_customer400_error_exception.rb +69 -0
  26. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_customer401_error_exception.rb +69 -0
  27. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_customer403_error_exception.rb +69 -0
  28. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_customer404_error_exception.rb +69 -0
  29. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_customer500_error_exception.rb +69 -0
  30. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_payers400_error_exception.rb +69 -0
  31. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_payers401_error_exception.rb +69 -0
  32. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_payers403_error_exception.rb +69 -0
  33. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_payers404_error_exception.rb +69 -0
  34. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_payers500_error_exception.rb +69 -0
  35. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_pricelist400_error_exception.rb +69 -0
  36. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_pricelist401_error_exception.rb +69 -0
  37. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_pricelist403_error_exception.rb +69 -0
  38. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_pricelist404_error_exception.rb +69 -0
  39. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v1_pricelist500_error_exception.rb +69 -0
  40. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v2_cardtype400_error_exception.rb +69 -0
  41. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v2_cardtype401_error_exception.rb +69 -0
  42. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v2_cardtype403_error_exception.rb +69 -0
  43. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v2_cardtype404_error_exception.rb +69 -0
  44. data/lib/shell_data_reporting_ap_is/exceptions/customer_management_v2_cardtype500_error_exception.rb +69 -0
  45. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_dates400_error_exception.rb +69 -0
  46. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_dates401_error_exception.rb +69 -0
  47. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_dates403_error_exception.rb +69 -0
  48. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_dates404_error_exception.rb +69 -0
  49. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_dates500_error_exception.rb +69 -0
  50. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_download400_error_exception.rb +69 -0
  51. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_download401_error_exception.rb +69 -0
  52. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_download403_error_exception.rb +69 -0
  53. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_download404_error_exception.rb +69 -0
  54. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_download500_error_exception.rb +69 -0
  55. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_eiddownload400_error_exception.rb +69 -0
  56. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_eiddownload401_error_exception.rb +69 -0
  57. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_eiddownload403_error_exception.rb +69 -0
  58. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_eiddownload404_error_exception.rb +69 -0
  59. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_eiddownload500_error_exception.rb +69 -0
  60. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_eidsearch400_error_exception.rb +69 -0
  61. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_eidsearch401_error_exception.rb +69 -0
  62. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_eidsearch403_error_exception.rb +69 -0
  63. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_eidsearch404_error_exception.rb +69 -0
  64. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_eidsearch500_error_exception.rb +69 -0
  65. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_search400_error_exception.rb +69 -0
  66. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_search401_error_exception.rb +69 -0
  67. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_search403_error_exception.rb +69 -0
  68. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_search404_error_exception.rb +69 -0
  69. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_search500_error_exception.rb +69 -0
  70. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchdocuments400_error_exception.rb +69 -0
  71. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchdocuments401_error_exception.rb +69 -0
  72. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchdocuments403_error_exception.rb +69 -0
  73. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchdocuments404_error_exception.rb +69 -0
  74. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchdocuments500_error_exception.rb +69 -0
  75. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount400_error_exception.rb +69 -0
  76. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount401_error_exception.rb +69 -0
  77. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount403_error_exception.rb +69 -0
  78. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount404_error_exception.rb +69 -0
  79. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_searchstatementofaccount500_error_exception.rb +69 -0
  80. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_statementofaccount400_error_exception.rb +69 -0
  81. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_statementofaccount401_error_exception.rb +69 -0
  82. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_statementofaccount403_error_exception.rb +69 -0
  83. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_statementofaccount404_error_exception.rb +69 -0
  84. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_statementofaccount500_error_exception.rb +69 -0
  85. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_summary400_error_exception.rb +69 -0
  86. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_summary401_error_exception.rb +69 -0
  87. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_summary403_error_exception.rb +69 -0
  88. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_summary404_error_exception.rb +69 -0
  89. data/lib/shell_data_reporting_ap_is/exceptions/invoice_management_v1_summary500_error_exception.rb +69 -0
  90. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_cardusagesummary400_error_exception.rb +69 -0
  91. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_cardusagesummary401_error_exception.rb +69 -0
  92. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_cardusagesummary403_error_exception.rb +69 -0
  93. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_cardusagesummary404_error_exception.rb +69 -0
  94. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_cardusagesummary500_error_exception.rb +69 -0
  95. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_exceptions400_error_exception.rb +69 -0
  96. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_exceptions401_error_exception.rb +69 -0
  97. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_exceptions403_error_exception.rb +69 -0
  98. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_exceptions404_error_exception.rb +69 -0
  99. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_exceptions500_error_exception.rb +69 -0
  100. data/lib/shell_data_reporting_ap_is/exceptions/{error_object_exception.rb → transaction_data_v1_fees400_error_exception.rb} +2 -2
  101. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_fees401_error_exception.rb +69 -0
  102. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_fees403_error_exception.rb +69 -0
  103. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_fees404_error_exception.rb +69 -0
  104. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_fees500_error_exception.rb +69 -0
  105. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_feessummary400_error_exception.rb +69 -0
  106. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_feessummary401_error_exception.rb +69 -0
  107. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_feessummary403_error_exception.rb +69 -0
  108. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_feessummary404_error_exception.rb +69 -0
  109. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_feessummary500_error_exception.rb +69 -0
  110. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_fuelconsumption400_error_exception.rb +69 -0
  111. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_fuelconsumption401_error_exception.rb +69 -0
  112. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_fuelconsumption403_error_exception.rb +69 -0
  113. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_fuelconsumption404_error_exception.rb +69 -0
  114. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_fuelconsumption500_error_exception.rb +69 -0
  115. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_multipayerspricedtransactions400_error_exception.rb +69 -0
  116. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_multipayerspricedtransactions401_error_exception.rb +69 -0
  117. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_multipayerspricedtransactions403_error_exception.rb +69 -0
  118. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_multipayerspricedtransactions404_error_exception.rb +69 -0
  119. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_multipayerspricedtransactions500_error_exception.rb +69 -0
  120. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_priced400_error_exception.rb +69 -0
  121. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_priced401_error_exception.rb +69 -0
  122. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_priced403_error_exception.rb +69 -0
  123. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_priced404_error_exception.rb +69 -0
  124. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_priced500_error_exception.rb +69 -0
  125. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_pricedtransaction400_error_exception.rb +69 -0
  126. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_pricedtransaction401_error_exception.rb +69 -0
  127. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_pricedtransaction403_error_exception.rb +69 -0
  128. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_pricedtransaction404_error_exception.rb +69 -0
  129. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_pricedtransaction500_error_exception.rb +69 -0
  130. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_pricedtransactionssummary400_error_exception.rb +69 -0
  131. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_pricedtransactionssummary401_error_exception.rb +69 -0
  132. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_pricedtransactionssummary403_error_exception.rb +69 -0
  133. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_pricedtransactionssummary404_error_exception.rb +69 -0
  134. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_pricedtransactionssummary500_error_exception.rb +69 -0
  135. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_recent400_error_exception.rb +69 -0
  136. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_recent401_error_exception.rb +69 -0
  137. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_recent403_error_exception.rb +69 -0
  138. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_recent404_error_exception.rb +69 -0
  139. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_recent500_error_exception.rb +69 -0
  140. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_updateodometer400_error_exception.rb +69 -0
  141. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_updateodometer401_error_exception.rb +69 -0
  142. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_updateodometer403_error_exception.rb +69 -0
  143. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_updateodometer404_error_exception.rb +69 -0
  144. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_updateodometer500_error_exception.rb +69 -0
  145. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_volumebasedbonus400_error_exception.rb +69 -0
  146. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_volumebasedbonus401_error_exception.rb +69 -0
  147. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_volumebasedbonus403_error_exception.rb +69 -0
  148. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_volumebasedbonus404_error_exception.rb +69 -0
  149. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_volumebasedbonus500_error_exception.rb +69 -0
  150. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_volumebasedpricing400_error_exception.rb +69 -0
  151. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_volumebasedpricing401_error_exception.rb +69 -0
  152. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_volumebasedpricing403_error_exception.rb +69 -0
  153. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_volumebasedpricing404_error_exception.rb +69 -0
  154. data/lib/shell_data_reporting_ap_is/exceptions/transaction_data_v1_volumebasedpricing500_error_exception.rb +69 -0
  155. data/lib/shell_data_reporting_ap_is/exceptions/user_management_v1_loggedinuser400_error_exception.rb +69 -0
  156. data/lib/shell_data_reporting_ap_is/exceptions/user_management_v1_loggedinuser401_error_exception.rb +69 -0
  157. data/lib/shell_data_reporting_ap_is/exceptions/user_management_v1_loggedinuser403_error_exception.rb +69 -0
  158. data/lib/shell_data_reporting_ap_is/exceptions/user_management_v1_loggedinuser404_error_exception.rb +69 -0
  159. data/lib/shell_data_reporting_ap_is/exceptions/user_management_v1_loggedinuser500_error_exception.rb +69 -0
  160. data/lib/shell_data_reporting_ap_is/http/auth/o_auth2.rb +15 -0
  161. data/lib/shell_data_reporting_ap_is/http/proxy_settings.rb +9 -0
  162. data/lib/shell_data_reporting_ap_is/models/card_type_response_customer_card_types_items.rb +164 -289
  163. data/lib/shell_data_reporting_ap_is/models/cart_type_account.rb +161 -0
  164. data/lib/shell_data_reporting_ap_is/models/eid_document.rb +5 -21
  165. data/lib/shell_data_reporting_ap_is/models/eid_document_response.rb +18 -18
  166. data/lib/shell_data_reporting_ap_is/models/eid_search_req.rb +4 -20
  167. data/lib/shell_data_reporting_ap_is/models/error_object.rb +93 -0
  168. data/lib/shell_data_reporting_ap_is/models/filters.rb +4 -1
  169. data/lib/shell_data_reporting_ap_is/models/o_auth_provider_error_enum.rb +17 -0
  170. data/lib/shell_data_reporting_ap_is/models/priced_request_data.rb +4 -1
  171. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_invoice_status_enum.rb +14 -0
  172. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_period_enum.rb +20 -0
  173. data/lib/shell_data_reporting_ap_is/models/priced_transaction_req_v2_sort_order_enum.rb +17 -0
  174. data/lib/shell_data_reporting_ap_is/models/priced_transaction_resp_v2_refund_flag_enum.rb +13 -0
  175. data/lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb +1 -1
  176. data/lib/shell_data_reporting_ap_is/models/search_doc_req.rb +16 -35
  177. data/lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb +20 -19
  178. data/lib/shell_data_reporting_ap_is/models/search_documents_response.rb +15 -15
  179. data/lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb +57 -16
  180. data/lib/shell_data_reporting_ap_is.rb +317 -1
  181. data/test/controllers/controller_test_base.rb +3 -8
  182. data/test/controllers/test_invoice_controller.rb +25 -27
  183. data/test/controllers/test_transaction_controller.rb +8 -8
  184. metadata +159 -7
@@ -0,0 +1,161 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by
4
+ # APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # CartTypeAccount Model.
8
+ class CartTypeAccount < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Account Id of the customer.
13
+ # @return [Integer]
14
+ attr_accessor :account_id
15
+
16
+ # Account Number of the customer.
17
+ # @return [String]
18
+ attr_accessor :account_number
19
+
20
+ # Whether card type is default or not.
21
+ # @return [TrueClass | FalseClass]
22
+ attr_accessor :is_default
23
+
24
+ # Customer Card Type Id in Cards Platform.
25
+ # @return [Integer]
26
+ attr_accessor :customer_card_type_id
27
+
28
+ # True/False – Whether the card type can be used for card ordering. <br><br>
29
+ # Note - IsVisibleToCustomers will be set as ‘false’ when the card type is
30
+ # not active or. configured in MS to be not visible.
31
+ # @return [TrueClass | FalseClass]
32
+ attr_accessor :is_visible_to_customers
33
+
34
+ # Default Name to be embossed on the card.
35
+ # @return [String]
36
+ attr_accessor :emboss_account_name
37
+
38
+ # Default Purchase category of the card type.
39
+ # @return [Integer]
40
+ attr_accessor :default_purchase_category_id
41
+
42
+ # Default Purchase category of the card type.
43
+ # @return [CardUsageRestrictions]
44
+ attr_accessor :usage_restrictions
45
+
46
+ # Default Purchase category of the card type.
47
+ # @return [CardDayTimeRestrictions]
48
+ attr_accessor :day_time_restrictions
49
+
50
+ # A mapping from model property names to API property names.
51
+ def self.names
52
+ @_hash = {} if @_hash.nil?
53
+ @_hash['account_id'] = 'AccountId'
54
+ @_hash['account_number'] = 'AccountNumber'
55
+ @_hash['is_default'] = 'IsDefault'
56
+ @_hash['customer_card_type_id'] = 'CustomerCardTypeId'
57
+ @_hash['is_visible_to_customers'] = 'IsVisibleToCustomers'
58
+ @_hash['emboss_account_name'] = 'EmbossAccountName'
59
+ @_hash['default_purchase_category_id'] = 'DefaultPurchaseCategoryId'
60
+ @_hash['usage_restrictions'] = 'UsageRestrictions'
61
+ @_hash['day_time_restrictions'] = 'DayTimeRestrictions'
62
+ @_hash
63
+ end
64
+
65
+ # An array for optional fields
66
+ def self.optionals
67
+ %w[
68
+ account_id
69
+ account_number
70
+ is_default
71
+ customer_card_type_id
72
+ is_visible_to_customers
73
+ emboss_account_name
74
+ default_purchase_category_id
75
+ usage_restrictions
76
+ day_time_restrictions
77
+ ]
78
+ end
79
+
80
+ # An array for nullable fields
81
+ def self.nullables
82
+ %w[
83
+ account_id
84
+ ]
85
+ end
86
+
87
+ def initialize(account_id = SKIP, account_number = SKIP, is_default = SKIP,
88
+ customer_card_type_id = SKIP, is_visible_to_customers = SKIP,
89
+ emboss_account_name = SKIP,
90
+ default_purchase_category_id = SKIP,
91
+ usage_restrictions = SKIP, day_time_restrictions = SKIP)
92
+ @account_id = account_id unless account_id == SKIP
93
+ @account_number = account_number unless account_number == SKIP
94
+ @is_default = is_default unless is_default == SKIP
95
+ @customer_card_type_id = customer_card_type_id unless customer_card_type_id == SKIP
96
+ @is_visible_to_customers = is_visible_to_customers unless is_visible_to_customers == SKIP
97
+ @emboss_account_name = emboss_account_name unless emboss_account_name == SKIP
98
+ unless default_purchase_category_id == SKIP
99
+ @default_purchase_category_id =
100
+ default_purchase_category_id
101
+ end
102
+ @usage_restrictions = usage_restrictions unless usage_restrictions == SKIP
103
+ @day_time_restrictions = day_time_restrictions unless day_time_restrictions == SKIP
104
+ end
105
+
106
+ # Creates an instance of the object from a hash.
107
+ def self.from_hash(hash)
108
+ return nil unless hash
109
+
110
+ # Extract variables from the hash.
111
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
112
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
113
+ is_default = hash.key?('IsDefault') ? hash['IsDefault'] : SKIP
114
+ customer_card_type_id =
115
+ hash.key?('CustomerCardTypeId') ? hash['CustomerCardTypeId'] : SKIP
116
+ is_visible_to_customers =
117
+ hash.key?('IsVisibleToCustomers') ? hash['IsVisibleToCustomers'] : SKIP
118
+ emboss_account_name =
119
+ hash.key?('EmbossAccountName') ? hash['EmbossAccountName'] : SKIP
120
+ default_purchase_category_id =
121
+ hash.key?('DefaultPurchaseCategoryId') ? hash['DefaultPurchaseCategoryId'] : SKIP
122
+ usage_restrictions = CardUsageRestrictions.from_hash(hash['UsageRestrictions']) if
123
+ hash['UsageRestrictions']
124
+ day_time_restrictions = CardDayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
125
+ hash['DayTimeRestrictions']
126
+
127
+ # Create object from extracted values.
128
+ CartTypeAccount.new(account_id,
129
+ account_number,
130
+ is_default,
131
+ customer_card_type_id,
132
+ is_visible_to_customers,
133
+ emboss_account_name,
134
+ default_purchase_category_id,
135
+ usage_restrictions,
136
+ day_time_restrictions)
137
+ end
138
+
139
+ # Provides a human-readable string representation of the object.
140
+ def to_s
141
+ class_name = self.class.name.split('::').last
142
+ "<#{class_name} account_id: #{@account_id}, account_number: #{@account_number}, is_default:"\
143
+ " #{@is_default}, customer_card_type_id: #{@customer_card_type_id}, is_visible_to_customers:"\
144
+ " #{@is_visible_to_customers}, emboss_account_name: #{@emboss_account_name},"\
145
+ " default_purchase_category_id: #{@default_purchase_category_id}, usage_restrictions:"\
146
+ " #{@usage_restrictions}, day_time_restrictions: #{@day_time_restrictions}>"
147
+ end
148
+
149
+ # Provides a debugging-friendly string with detailed object information.
150
+ def inspect
151
+ class_name = self.class.name.split('::').last
152
+ "<#{class_name} account_id: #{@account_id.inspect}, account_number:"\
153
+ " #{@account_number.inspect}, is_default: #{@is_default.inspect}, customer_card_type_id:"\
154
+ " #{@customer_card_type_id.inspect}, is_visible_to_customers:"\
155
+ " #{@is_visible_to_customers.inspect}, emboss_account_name: #{@emboss_account_name.inspect},"\
156
+ " default_purchase_category_id: #{@default_purchase_category_id.inspect},"\
157
+ " usage_restrictions: #{@usage_restrictions.inspect}, day_time_restrictions:"\
158
+ " #{@day_time_restrictions.inspect}>"
159
+ end
160
+ end
161
+ end
@@ -46,15 +46,6 @@ module ShellDataReportingApIs
46
46
  # @return [Integer]
47
47
  attr_accessor :file_size
48
48
 
49
- # Document status.
50
- # Possible values:
51
- # • NEW
52
- # • VIEWED
53
- # • DOWNLOADED
54
- # • RESTORED
55
- # @return [String]
56
- attr_accessor :document_status
57
-
58
49
  # Document file name.
59
50
  # @return [String]
60
51
  attr_accessor :document_name
@@ -70,7 +61,6 @@ module ShellDataReportingApIs
70
61
  @_hash['document_date'] = 'DocumentDate'
71
62
  @_hash['number_of_invoices'] = 'NumberOfInvoices'
72
63
  @_hash['file_size'] = 'FileSize'
73
- @_hash['document_status'] = 'DocumentStatus'
74
64
  @_hash['document_name'] = 'DocumentName'
75
65
  @_hash
76
66
  end
@@ -86,7 +76,6 @@ module ShellDataReportingApIs
86
76
  document_date
87
77
  number_of_invoices
88
78
  file_size
89
- document_status
90
79
  document_name
91
80
  ]
92
81
  end
@@ -102,7 +91,6 @@ module ShellDataReportingApIs
102
91
  document_date
103
92
  number_of_invoices
104
93
  file_size
105
- document_status
106
94
  document_name
107
95
  ]
108
96
  end
@@ -111,7 +99,7 @@ module ShellDataReportingApIs
111
99
  account_group_name = SKIP, document_type = SKIP,
112
100
  document_format = SKIP, document_date = SKIP,
113
101
  number_of_invoices = SKIP, file_size = SKIP,
114
- document_status = SKIP, document_name = SKIP)
102
+ document_name = SKIP)
115
103
  @document_id = document_id unless document_id == SKIP
116
104
  @account_group_id = account_group_id unless account_group_id == SKIP
117
105
  @account_group_name = account_group_name unless account_group_name == SKIP
@@ -120,7 +108,6 @@ module ShellDataReportingApIs
120
108
  @document_date = document_date unless document_date == SKIP
121
109
  @number_of_invoices = number_of_invoices unless number_of_invoices == SKIP
122
110
  @file_size = file_size unless file_size == SKIP
123
- @document_status = document_status unless document_status == SKIP
124
111
  @document_name = document_name unless document_name == SKIP
125
112
  end
126
113
 
@@ -141,8 +128,6 @@ module ShellDataReportingApIs
141
128
  number_of_invoices =
142
129
  hash.key?('NumberOfInvoices') ? hash['NumberOfInvoices'] : SKIP
143
130
  file_size = hash.key?('FileSize') ? hash['FileSize'] : SKIP
144
- document_status =
145
- hash.key?('DocumentStatus') ? hash['DocumentStatus'] : SKIP
146
131
  document_name = hash.key?('DocumentName') ? hash['DocumentName'] : SKIP
147
132
 
148
133
  # Create object from extracted values.
@@ -154,7 +139,6 @@ module ShellDataReportingApIs
154
139
  document_date,
155
140
  number_of_invoices,
156
141
  file_size,
157
- document_status,
158
142
  document_name)
159
143
  end
160
144
 
@@ -164,8 +148,8 @@ module ShellDataReportingApIs
164
148
  "<#{class_name} document_id: #{@document_id}, account_group_id: #{@account_group_id},"\
165
149
  " account_group_name: #{@account_group_name}, document_type: #{@document_type},"\
166
150
  " document_format: #{@document_format}, document_date: #{@document_date},"\
167
- " number_of_invoices: #{@number_of_invoices}, file_size: #{@file_size}, document_status:"\
168
- " #{@document_status}, document_name: #{@document_name}>"
151
+ " number_of_invoices: #{@number_of_invoices}, file_size: #{@file_size}, document_name:"\
152
+ " #{@document_name}>"
169
153
  end
170
154
 
171
155
  # Provides a debugging-friendly string with detailed object information.
@@ -175,8 +159,8 @@ module ShellDataReportingApIs
175
159
  " #{@account_group_id.inspect}, account_group_name: #{@account_group_name.inspect},"\
176
160
  " document_type: #{@document_type.inspect}, document_format: #{@document_format.inspect},"\
177
161
  " document_date: #{@document_date.inspect}, number_of_invoices:"\
178
- " #{@number_of_invoices.inspect}, file_size: #{@file_size.inspect}, document_status:"\
179
- " #{@document_status.inspect}, document_name: #{@document_name.inspect}>"
162
+ " #{@number_of_invoices.inspect}, file_size: #{@file_size.inspect}, document_name:"\
163
+ " #{@document_name.inspect}>"
180
164
  end
181
165
  end
182
166
  end
@@ -20,7 +20,7 @@ module ShellDataReportingApIs
20
20
 
21
21
  # Indicates overall status of the request. Allowed values: SUCCESS, FAILED
22
22
  # @return [Array[EIDDocument]]
23
- attr_accessor :data
23
+ attr_accessor :document
24
24
 
25
25
  # Number of records returned in the response
26
26
  # @return [Integer]
@@ -51,7 +51,7 @@ module ShellDataReportingApIs
51
51
  @_hash = {} if @_hash.nil?
52
52
  @_hash['request_id'] = 'RequestId'
53
53
  @_hash['status'] = 'Status'
54
- @_hash['data'] = 'Data'
54
+ @_hash['document'] = 'Document'
55
55
  @_hash['page_size'] = 'PageSize'
56
56
  @_hash['page'] = 'Page'
57
57
  @_hash['total_pages'] = 'TotalPages'
@@ -66,7 +66,7 @@ module ShellDataReportingApIs
66
66
  %w[
67
67
  request_id
68
68
  status
69
- data
69
+ document
70
70
  page_size
71
71
  page
72
72
  total_pages
@@ -81,13 +81,13 @@ module ShellDataReportingApIs
81
81
  []
82
82
  end
83
83
 
84
- def initialize(request_id = SKIP, status = SKIP, data = SKIP,
84
+ def initialize(request_id = SKIP, status = SKIP, document = SKIP,
85
85
  page_size = SKIP, page = SKIP, total_pages = SKIP,
86
86
  total_records = SKIP, is_first_page = SKIP,
87
87
  is_last_page = SKIP)
88
88
  @request_id = request_id unless request_id == SKIP
89
89
  @status = status unless status == SKIP
90
- @data = data unless data == SKIP
90
+ @document = document unless document == SKIP
91
91
  @page_size = page_size unless page_size == SKIP
92
92
  @page = page unless page == SKIP
93
93
  @total_pages = total_pages unless total_pages == SKIP
@@ -104,15 +104,15 @@ module ShellDataReportingApIs
104
104
  request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
105
105
  status = hash.key?('Status') ? hash['Status'] : SKIP
106
106
  # Parameter is an array, so we need to iterate through it
107
- data = nil
108
- unless hash['Data'].nil?
109
- data = []
110
- hash['Data'].each do |structure|
111
- data << (EIDDocument.from_hash(structure) if structure)
107
+ document = nil
108
+ unless hash['Document'].nil?
109
+ document = []
110
+ hash['Document'].each do |structure|
111
+ document << (EIDDocument.from_hash(structure) if structure)
112
112
  end
113
113
  end
114
114
 
115
- data = SKIP unless hash.key?('Data')
115
+ document = SKIP unless hash.key?('Document')
116
116
  page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
117
117
  page = hash.key?('Page') ? hash['Page'] : SKIP
118
118
  total_pages = hash.key?('TotalPages') ? hash['TotalPages'] : SKIP
@@ -123,7 +123,7 @@ module ShellDataReportingApIs
123
123
  # Create object from extracted values.
124
124
  EIDDocumentResponse.new(request_id,
125
125
  status,
126
- data,
126
+ document,
127
127
  page_size,
128
128
  page,
129
129
  total_pages,
@@ -135,18 +135,18 @@ module ShellDataReportingApIs
135
135
  # Provides a human-readable string representation of the object.
136
136
  def to_s
137
137
  class_name = self.class.name.split('::').last
138
- "<#{class_name} request_id: #{@request_id}, status: #{@status}, data: #{@data}, page_size:"\
139
- " #{@page_size}, page: #{@page}, total_pages: #{@total_pages}, total_records:"\
138
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, document: #{@document},"\
139
+ " page_size: #{@page_size}, page: #{@page}, total_pages: #{@total_pages}, total_records:"\
140
140
  " #{@total_records}, is_first_page: #{@is_first_page}, is_last_page: #{@is_last_page}>"
141
141
  end
142
142
 
143
143
  # Provides a debugging-friendly string with detailed object information.
144
144
  def inspect
145
145
  class_name = self.class.name.split('::').last
146
- "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, data:"\
147
- " #{@data.inspect}, page_size: #{@page_size.inspect}, page: #{@page.inspect}, total_pages:"\
148
- " #{@total_pages.inspect}, total_records: #{@total_records.inspect}, is_first_page:"\
149
- " #{@is_first_page.inspect}, is_last_page: #{@is_last_page.inspect}>"
146
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, document:"\
147
+ " #{@document.inspect}, page_size: #{@page_size.inspect}, page: #{@page.inspect},"\
148
+ " total_pages: #{@total_pages.inspect}, total_records: #{@total_records.inspect},"\
149
+ " is_first_page: #{@is_first_page.inspect}, is_last_page: #{@is_last_page.inspect}>"
150
150
  end
151
151
  end
152
152
  end
@@ -48,16 +48,6 @@ module ShellDataReportingApIs
48
48
  # @return [String]
49
49
  attr_accessor :invoice_type
50
50
 
51
- # Status of the document.
52
- # Optional.
53
- # Possible values:
54
- # • NEW
55
- # • VIEWED
56
- # • DOWNLOADED
57
- # • RESTORED
58
- # @return [String]
59
- attr_accessor :invoice_status
60
-
61
51
  # Sort option –
62
52
  # • InvoiceNumber ASC
63
53
  # • InvoiceDate ASC
@@ -77,7 +67,6 @@ module ShellDataReportingApIs
77
67
  @_hash['from_date'] = 'FromDate'
78
68
  @_hash['to_date'] = 'ToDate'
79
69
  @_hash['invoice_type'] = 'InvoiceType'
80
- @_hash['invoice_status'] = 'InvoiceStatus'
81
70
  @_hash['sort_by'] = 'SortBy'
82
71
  @_hash
83
72
  end
@@ -89,7 +78,6 @@ module ShellDataReportingApIs
89
78
  from_date
90
79
  to_date
91
80
  invoice_type
92
- invoice_status
93
81
  sort_by
94
82
  ]
95
83
  end
@@ -103,14 +91,13 @@ module ShellDataReportingApIs
103
91
  from_date
104
92
  to_date
105
93
  invoice_type
106
- invoice_status
107
94
  ]
108
95
  end
109
96
 
110
97
  def initialize(col_co_code = nil, account_group_country = nil,
111
98
  account_group_id = nil, account_group_name = SKIP,
112
99
  from_date = SKIP, to_date = SKIP, invoice_type = SKIP,
113
- invoice_status = SKIP, sort_by = SKIP)
100
+ sort_by = SKIP)
114
101
  @col_co_code = col_co_code
115
102
  @account_group_country = account_group_country
116
103
  @account_group_id = account_group_id
@@ -118,7 +105,6 @@ module ShellDataReportingApIs
118
105
  @from_date = from_date unless from_date == SKIP
119
106
  @to_date = to_date unless to_date == SKIP
120
107
  @invoice_type = invoice_type unless invoice_type == SKIP
121
- @invoice_status = invoice_status unless invoice_status == SKIP
122
108
  @sort_by = sort_by unless sort_by == SKIP
123
109
  end
124
110
 
@@ -137,7 +123,6 @@ module ShellDataReportingApIs
137
123
  from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
138
124
  to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
139
125
  invoice_type = hash.key?('InvoiceType') ? hash['InvoiceType'] : SKIP
140
- invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP
141
126
  sort_by = hash.key?('SortBy') ? hash['SortBy'] : SKIP
142
127
 
143
128
  # Create object from extracted values.
@@ -148,7 +133,6 @@ module ShellDataReportingApIs
148
133
  from_date,
149
134
  to_date,
150
135
  invoice_type,
151
- invoice_status,
152
136
  sort_by)
153
137
  end
154
138
 
@@ -158,7 +142,7 @@ module ShellDataReportingApIs
158
142
  "<#{class_name} col_co_code: #{@col_co_code}, account_group_country:"\
159
143
  " #{@account_group_country}, account_group_id: #{@account_group_id}, account_group_name:"\
160
144
  " #{@account_group_name}, from_date: #{@from_date}, to_date: #{@to_date}, invoice_type:"\
161
- " #{@invoice_type}, invoice_status: #{@invoice_status}, sort_by: #{@sort_by}>"
145
+ " #{@invoice_type}, sort_by: #{@sort_by}>"
162
146
  end
163
147
 
164
148
  # Provides a debugging-friendly string with detailed object information.
@@ -167,8 +151,8 @@ module ShellDataReportingApIs
167
151
  "<#{class_name} col_co_code: #{@col_co_code.inspect}, account_group_country:"\
168
152
  " #{@account_group_country.inspect}, account_group_id: #{@account_group_id.inspect},"\
169
153
  " account_group_name: #{@account_group_name.inspect}, from_date: #{@from_date.inspect},"\
170
- " to_date: #{@to_date.inspect}, invoice_type: #{@invoice_type.inspect}, invoice_status:"\
171
- " #{@invoice_status.inspect}, sort_by: #{@sort_by.inspect}>"
154
+ " to_date: #{@to_date.inspect}, invoice_type: #{@invoice_type.inspect}, sort_by:"\
155
+ " #{@sort_by.inspect}>"
172
156
  end
173
157
  end
174
158
  end
@@ -0,0 +1,93 @@
1
+ # shell_data_reporting_ap_is
2
+ #
3
+ # This file was automatically generated by
4
+ # APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ShellDataReportingApIs
7
+ # ErrorObject Model.
8
+ class ErrorObject < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Unique request identifier passed from end user. This identifier helps in
13
+ # tracing a transaction
14
+ # @return [String]
15
+ attr_accessor :request_id
16
+
17
+ # Indicates overall status of the request. Allowed values: SUCCES, FAILED,
18
+ # PARTIAL_SUCCESS
19
+ # @return [String]
20
+ attr_accessor :status
21
+
22
+ # Indicates overall status of the request. Allowed values: SUCCES, FAILED,
23
+ # PARTIAL_SUCCESS
24
+ # @return [Array[ErrorDetails]]
25
+ attr_accessor :errors
26
+
27
+ # A mapping from model property names to API property names.
28
+ def self.names
29
+ @_hash = {} if @_hash.nil?
30
+ @_hash['request_id'] = 'RequestId'
31
+ @_hash['status'] = 'Status'
32
+ @_hash['errors'] = 'Errors'
33
+ @_hash
34
+ end
35
+
36
+ # An array for optional fields
37
+ def self.optionals
38
+ %w[
39
+ request_id
40
+ status
41
+ errors
42
+ ]
43
+ end
44
+
45
+ # An array for nullable fields
46
+ def self.nullables
47
+ []
48
+ end
49
+
50
+ def initialize(request_id = SKIP, status = SKIP, errors = SKIP)
51
+ @request_id = request_id unless request_id == SKIP
52
+ @status = status unless status == SKIP
53
+ @errors = errors unless errors == SKIP
54
+ end
55
+
56
+ # Creates an instance of the object from a hash.
57
+ def self.from_hash(hash)
58
+ return nil unless hash
59
+
60
+ # Extract variables from the hash.
61
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
62
+ status = hash.key?('Status') ? hash['Status'] : SKIP
63
+ # Parameter is an array, so we need to iterate through it
64
+ errors = nil
65
+ unless hash['Errors'].nil?
66
+ errors = []
67
+ hash['Errors'].each do |structure|
68
+ errors << (ErrorDetails.from_hash(structure) if structure)
69
+ end
70
+ end
71
+
72
+ errors = SKIP unless hash.key?('Errors')
73
+
74
+ # Create object from extracted values.
75
+ ErrorObject.new(request_id,
76
+ status,
77
+ errors)
78
+ end
79
+
80
+ # Provides a human-readable string representation of the object.
81
+ def to_s
82
+ class_name = self.class.name.split('::').last
83
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, errors: #{@errors}>"
84
+ end
85
+
86
+ # Provides a debugging-friendly string with detailed object information.
87
+ def inspect
88
+ class_name = self.class.name.split('::').last
89
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, errors:"\
90
+ " #{@errors.inspect}>"
91
+ end
92
+ end
93
+ end
@@ -117,7 +117,10 @@ module ShellDataReportingApIs
117
117
  # @return [String]
118
118
  attr_accessor :to_date
119
119
 
120
- # To transaction delivery date
120
+ # Pass below one of the value as per the required transaction period
121
+ # 1. Last 7 Days
122
+ # 2. Last 30 Days
123
+ # 3. Last 90 Days
121
124
  # @return [PricedTransactionReqV2PeriodEnum]
122
125
  attr_accessor :period
123
126
 
@@ -41,5 +41,22 @@ module ShellDataReportingApIs
41
41
 
42
42
  O_AUTH_PROVIDER_ERROR_ENUM.include?(value)
43
43
  end
44
+
45
+ def self.from_value(value, default_value = INVALID_REQUEST)
46
+ return default_value if value.nil?
47
+
48
+ str = value.to_s.strip
49
+
50
+ case str.downcase
51
+ when 'invalid_request' then INVALID_REQUEST
52
+ when 'invalid_client' then INVALID_CLIENT
53
+ when 'invalid_grant' then INVALID_GRANT
54
+ when 'unauthorized_client' then UNAUTHORIZED_CLIENT
55
+ when 'unsupported_grant_type' then UNSUPPORTED_GRANT_TYPE
56
+ when 'invalid_scope' then INVALID_SCOPE
57
+ else
58
+ default_value
59
+ end
60
+ end
44
61
  end
45
62
  end
@@ -119,7 +119,10 @@ module ShellDataReportingApIs
119
119
  # @return [String]
120
120
  attr_accessor :to_date
121
121
 
122
- # To transaction delivery date
122
+ # Pass below one of the value as per the required transaction period
123
+ # 1. Last 7 Days
124
+ # 2. Last 30 Days
125
+ # 3. Last 90 Days
123
126
  # @return [PricedTransactionReqV2PeriodEnum]
124
127
  attr_accessor :period
125
128
 
@@ -23,5 +23,19 @@ module ShellDataReportingApIs
23
23
 
24
24
  PRICED_TRANSACTION_REQ_V2_INVOICE_STATUS_ENUM.include?(value)
25
25
  end
26
+
27
+ def self.from_value(value, default_value = I)
28
+ return default_value if value.nil?
29
+
30
+ str = value.to_s.strip
31
+
32
+ case str.downcase
33
+ when 'i' then I
34
+ when 'u' then U
35
+ when 'a' then A
36
+ else
37
+ default_value
38
+ end
39
+ end
26
40
  end
27
41
  end
@@ -23,5 +23,25 @@ module ShellDataReportingApIs
23
23
 
24
24
  PRICED_TRANSACTION_REQ_V2_PERIOD_ENUM.include?(value)
25
25
  end
26
+
27
+ def self.from_value(value, default_value = ENUM_1)
28
+ return default_value if value.nil?
29
+
30
+ str = value.to_s.strip
31
+ if str.match?(/\A\d+\z/)
32
+ num = str.to_i
33
+ return num if PRICED_TRANSACTION_REQ_V2_PERIOD_ENUM.include?(num)
34
+
35
+ return default_value
36
+ end
37
+
38
+ case str.downcase
39
+ when 'enum_1' then ENUM_1
40
+ when 'enum_2' then ENUM_2
41
+ when 'enum_3' then ENUM_3
42
+ else
43
+ default_value
44
+ end
45
+ end
26
46
  end
27
47
  end
@@ -33,5 +33,22 @@ module ShellDataReportingApIs
33
33
 
34
34
  PRICED_TRANSACTION_REQ_V2_SORT_ORDER_ENUM.include?(value)
35
35
  end
36
+
37
+ def self.from_value(value, default_value = ENUM_1)
38
+ return default_value if value.nil?
39
+
40
+ str = value.to_s.strip
41
+
42
+ case str.downcase
43
+ when 'enum_1' then ENUM_1
44
+ when 'enum_2' then ENUM_2
45
+ when 'enum_3' then ENUM_3
46
+ when 'enum_4' then ENUM_4
47
+ when 'enum_5' then ENUM_5
48
+ when 'enum_6' then ENUM_6
49
+ else
50
+ default_value
51
+ end
52
+ end
36
53
  end
37
54
  end
@@ -19,5 +19,18 @@ module ShellDataReportingApIs
19
19
 
20
20
  PRICED_TRANSACTION_RESP_V2_REFUND_FLAG_ENUM.include?(value)
21
21
  end
22
+
23
+ def self.from_value(value, default_value = Y)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'y' then Y
30
+ when 'n' then N
31
+ else
32
+ default_value
33
+ end
34
+ end
22
35
  end
23
36
  end