worldpay-apimatic-sdk 0.0.1

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 (75) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +147 -0
  4. data/bin/console +15 -0
  5. data/lib/reporting_authorization_summary_api/api_helper.rb +10 -0
  6. data/lib/reporting_authorization_summary_api/apis/authorizations_api.rb +258 -0
  7. data/lib/reporting_authorization_summary_api/apis/base_api.rb +67 -0
  8. data/lib/reporting_authorization_summary_api/client.rb +75 -0
  9. data/lib/reporting_authorization_summary_api/configuration.rb +165 -0
  10. data/lib/reporting_authorization_summary_api/exceptions/api_exception.rb +21 -0
  11. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary0_error_exception.rb +55 -0
  12. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_cardnetwork0_error_exception.rb +55 -0
  13. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_chain0_error_exception.rb +55 -0
  14. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_division0_error_exception.rb +55 -0
  15. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_merchant0_error_exception.rb +55 -0
  16. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_store0_error_exception.rb +55 -0
  17. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_superchain0_error_exception.rb +55 -0
  18. data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_transactiondate0_error_exception.rb +55 -0
  19. data/lib/reporting_authorization_summary_api/http/api_response.rb +19 -0
  20. data/lib/reporting_authorization_summary_api/http/auth/custom_header_authentication.rb +52 -0
  21. data/lib/reporting_authorization_summary_api/http/http_call_back.rb +10 -0
  22. data/lib/reporting_authorization_summary_api/http/http_method_enum.rb +10 -0
  23. data/lib/reporting_authorization_summary_api/http/http_request.rb +10 -0
  24. data/lib/reporting_authorization_summary_api/http/http_response.rb +10 -0
  25. data/lib/reporting_authorization_summary_api/http/proxy_settings.rb +22 -0
  26. data/lib/reporting_authorization_summary_api/logging/configuration/api_logging_configuration.rb +186 -0
  27. data/lib/reporting_authorization_summary_api/logging/sdk_logger.rb +17 -0
  28. data/lib/reporting_authorization_summary_api/models/auth_transactions_request.rb +107 -0
  29. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_chain.rb +116 -0
  30. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_division.rb +116 -0
  31. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_store.rb +116 -0
  32. data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_super_chain.rb +116 -0
  33. data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_card_network.rb +116 -0
  34. data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_merchant.rb +116 -0
  35. data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_transaction_date.rb +116 -0
  36. data/lib/reporting_authorization_summary_api/models/authorizations_summary_cardnetwork_response.rb +233 -0
  37. data/lib/reporting_authorization_summary_api/models/authorizations_summary_transactiondate_response.rb +233 -0
  38. data/lib/reporting_authorization_summary_api/models/base_model.rb +110 -0
  39. data/lib/reporting_authorization_summary_api/models/card_network_type.rb +68 -0
  40. data/lib/reporting_authorization_summary_api/models/code_and_description.rb +98 -0
  41. data/lib/reporting_authorization_summary_api/models/common_summary_detail.rb +161 -0
  42. data/lib/reporting_authorization_summary_api/models/common_summary_responses.rb +213 -0
  43. data/lib/reporting_authorization_summary_api/models/date_range.rb +82 -0
  44. data/lib/reporting_authorization_summary_api/models/date_range_type.rb +85 -0
  45. data/lib/reporting_authorization_summary_api/models/entity.rb +99 -0
  46. data/lib/reporting_authorization_summary_api/models/entity_division_response.rb +94 -0
  47. data/lib/reporting_authorization_summary_api/models/entity_store_response.rb +95 -0
  48. data/lib/reporting_authorization_summary_api/models/error.rb +96 -0
  49. data/lib/reporting_authorization_summary_api/models/error_response.rb +84 -0
  50. data/lib/reporting_authorization_summary_api/models/level.rb +67 -0
  51. data/lib/reporting_authorization_summary_api/models/pagination.rb +87 -0
  52. data/lib/reporting_authorization_summary_api/models/pagination_response.rb +108 -0
  53. data/lib/reporting_authorization_summary_api/models/pagination_type.rb +87 -0
  54. data/lib/reporting_authorization_summary_api/models/summary.rb +183 -0
  55. data/lib/reporting_authorization_summary_api/models/summary1.rb +173 -0
  56. data/lib/reporting_authorization_summary_api/models/summary2.rb +190 -0
  57. data/lib/reporting_authorization_summary_api/models/summary3.rb +189 -0
  58. data/lib/reporting_authorization_summary_api/models/summary4.rb +174 -0
  59. data/lib/reporting_authorization_summary_api/models/summary5.rb +174 -0
  60. data/lib/reporting_authorization_summary_api/models/summary6.rb +173 -0
  61. data/lib/reporting_authorization_summary_api/models/summary_card_network.rb +233 -0
  62. data/lib/reporting_authorization_summary_api/models/summary_detail_chain.rb +233 -0
  63. data/lib/reporting_authorization_summary_api/models/summary_detail_division.rb +233 -0
  64. data/lib/reporting_authorization_summary_api/models/summary_detail_entity_chain.rb +79 -0
  65. data/lib/reporting_authorization_summary_api/models/summary_detail_entity_entity.rb +79 -0
  66. data/lib/reporting_authorization_summary_api/models/summary_detail_entity_super_chain.rb +78 -0
  67. data/lib/reporting_authorization_summary_api/models/summary_detail_merchant.rb +233 -0
  68. data/lib/reporting_authorization_summary_api/models/summary_detail_store.rb +233 -0
  69. data/lib/reporting_authorization_summary_api/models/summary_detail_super_chain.rb +233 -0
  70. data/lib/reporting_authorization_summary_api/models/summary_responses.rb +202 -0
  71. data/lib/reporting_authorization_summary_api/models/summary_transaction_date.rb +233 -0
  72. data/lib/reporting_authorization_summary_api/utilities/date_time_helper.rb +11 -0
  73. data/lib/reporting_authorization_summary_api/utilities/file_wrapper.rb +28 -0
  74. data/lib/reporting_authorization_summary_api.rb +132 -0
  75. metadata +158 -0
@@ -0,0 +1,52 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # Utility class for custom header authorization.
8
+ class CustomHeaderAuthentication < CoreLibrary::HeaderAuth
9
+ # Display error message on occurrence of authentication failure.
10
+ # @returns [String] The oAuth error message.
11
+ def error_message
12
+ 'CustomHeaderAuthentication: authorization is undefined.'
13
+ end
14
+
15
+ # Initialization constructor.
16
+ def initialize(custom_header_authentication_credentials)
17
+ auth_params = {}
18
+ auth_params['Authorization'] = custom_header_authentication_credentials.authorization unless
19
+ custom_header_authentication_credentials.nil? || custom_header_authentication_credentials.authorization.nil?
20
+
21
+ super auth_params
22
+ end
23
+ end
24
+
25
+ # Data class for CustomHeaderAuthenticationCredentials.
26
+ # Data class for CustomHeaderAuthenticationCredentials.
27
+ class CustomHeaderAuthenticationCredentials
28
+ attr_reader :authorization
29
+
30
+ def initialize(authorization:)
31
+ raise ArgumentError, 'authorization cannot be nil' if authorization.nil?
32
+
33
+ @authorization = authorization
34
+ end
35
+
36
+ def self.from_env
37
+ authorization = ENV['AUTHORIZATION']
38
+ all_nil = [
39
+ authorization
40
+ ].all?(&:nil?)
41
+ return nil if all_nil
42
+
43
+ new(authorization: authorization)
44
+ end
45
+
46
+ def clone_with(authorization: nil)
47
+ authorization ||= self.authorization
48
+
49
+ CustomHeaderAuthenticationCredentials.new(authorization: authorization)
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,10 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # HttpCallBack allows defining callables for pre and post API calls.
8
+ class HttpCallBack < CoreLibrary::HttpCallback
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # HTTP Methods Enumeration.
8
+ class HttpMethodEnum < CoreLibrary::HttpMethod
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # Represents a single Http Request.
8
+ class HttpRequest < CoreLibrary::HttpRequest
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # Http response received.
8
+ class HttpResponse < CoreLibrary::HttpResponse
9
+ end
10
+ end
@@ -0,0 +1,22 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ ##
8
+ # ProxySettings encapsulates HTTP proxy configuration for Faraday,
9
+ # including optional basic authentication.
10
+ #
11
+ class ProxySettings < CoreLibrary::ProxySettings
12
+ def self.from_env
13
+ address = ENV['PROXY_ADDRESS']
14
+ port = ENV['PROXY_PORT']
15
+ username = ENV['PROXY_USERNAME']
16
+ password = ENV['PROXY_PASSWORD']
17
+ return nil if address.nil? || address.strip.empty?
18
+
19
+ new(address: address, port: port, username: username, password: password)
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,186 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # Initializes a new instance of RequestLoggingConfiguration.
8
+ class RequestLoggingConfiguration < CoreLibrary::ApiRequestLoggingConfiguration
9
+ # @param log_body [Boolean] Indicates whether the message body should be logged. Default is false.
10
+ # @param log_headers [Boolean] Indicates whether the message headers should be logged. Default is false.
11
+ # @param headers_to_exclude [Array<String>] Array of headers not displayed in logging. Default is an empty array.
12
+ # @param headers_to_include [Array<String>] Array of headers to be displayed in logging. Default is an empty array.
13
+ # @param headers_to_unmask [Array<String>] Array of headers which values are non-sensitive to display in logging.
14
+ # Default is an empty array.
15
+ def initialize(log_body: false, log_headers: false, headers_to_include: nil,
16
+ headers_to_exclude: nil, headers_to_unmask: nil,
17
+ include_query_in_path: false)
18
+ super(
19
+ log_body,
20
+ log_headers,
21
+ headers_to_exclude,
22
+ headers_to_include,
23
+ headers_to_unmask,
24
+ include_query_in_path
25
+ )
26
+ end
27
+
28
+ def clone_with(log_body: nil, log_headers: nil, headers_to_include: nil,
29
+ headers_to_exclude: nil, headers_to_unmask: nil, include_query_in_path: nil)
30
+ log_body ||= self.log_body
31
+ log_headers ||= self.log_headers
32
+ headers_to_include ||= self.headers_to_include
33
+ headers_to_exclude ||= self.headers_to_exclude
34
+ headers_to_unmask ||= self.headers_to_unmask
35
+ include_query_in_path ||= self.include_query_in_path
36
+
37
+ RequestLoggingConfiguration.new(
38
+ log_body: log_body,
39
+ log_headers: log_headers,
40
+ headers_to_include: headers_to_include,
41
+ headers_to_exclude: headers_to_exclude,
42
+ headers_to_unmask: headers_to_unmask,
43
+ include_query_in_path: include_query_in_path
44
+ )
45
+ end
46
+
47
+ def self.from_env
48
+ log_body = ENV['REQUEST_LOG_BODY']
49
+ log_headers = ENV['REQUEST_LOG_HEADERS']
50
+ headers_to_include = ENV['REQUEST_HEADERS_TO_INCLUDE']
51
+ headers_to_exclude = ENV['REQUEST_HEADERS_TO_EXCLUDE']
52
+ headers_to_unmask = ENV['REQUEST_HEADERS_TO_UNMASK']
53
+ include_query_in_path = ENV['REQUEST_INCLUDE_QUERY_IN_PATH']
54
+
55
+ new(
56
+ log_body: log_body,
57
+ log_headers: log_headers,
58
+ headers_to_include: headers_to_include,
59
+ headers_to_exclude: headers_to_exclude,
60
+ headers_to_unmask: headers_to_unmask,
61
+ include_query_in_path: include_query_in_path
62
+ )
63
+ end
64
+
65
+ def self.any_logging_configured?
66
+ %w[
67
+ REQUEST_LOG_BODY
68
+ REQUEST_LOG_HEADERS
69
+ REQUEST_HEADERS_TO_INCLUDE
70
+ REQUEST_HEADERS_TO_EXCLUDE
71
+ REQUEST_HEADERS_TO_UNMASK
72
+ REQUEST_INCLUDE_QUERY_IN_PATH
73
+ ].any? { |key| ENV.key?(key) && !ENV[key].nil? && !ENV[key].empty? }
74
+ end
75
+ end
76
+
77
+ # Initializes a new instance of ResponseLoggingConfiguration.
78
+ class ResponseLoggingConfiguration < CoreLibrary::ApiResponseLoggingConfiguration
79
+ def initialize(log_body: false, log_headers: false, headers_to_include: nil,
80
+ headers_to_exclude: nil, headers_to_unmask: nil)
81
+ super(
82
+ log_body,
83
+ log_headers,
84
+ headers_to_exclude,
85
+ headers_to_include,
86
+ headers_to_unmask
87
+ )
88
+ end
89
+
90
+ def clone_with(log_body: nil, log_headers: nil, headers_to_include: nil,
91
+ headers_to_exclude: nil, headers_to_unmask: nil)
92
+ log_body ||= self.log_body
93
+ log_headers ||= self.log_headers
94
+ headers_to_include ||= self.headers_to_include
95
+ headers_to_exclude ||= self.headers_to_exclude
96
+ headers_to_unmask ||= self.headers_to_unmask
97
+
98
+ ResponseLoggingConfiguration.new(
99
+ log_body: log_body,
100
+ log_headers: log_headers,
101
+ headers_to_include: headers_to_include,
102
+ headers_to_exclude: headers_to_exclude,
103
+ headers_to_unmask: headers_to_unmask
104
+ )
105
+ end
106
+
107
+ def self.from_env
108
+ log_body = ENV['RESPONSE_LOG_BODY']
109
+ log_headers = ENV['RESPONSE_LOG_HEADERS']
110
+ headers_to_include = ENV['RESPONSE_HEADERS_TO_INCLUDE']
111
+ headers_to_exclude = ENV['RESPONSE_HEADERS_TO_EXCLUDE']
112
+ headers_to_unmask = ENV['RESPONSE_HEADERS_TO_UNMASK']
113
+
114
+ new(
115
+ log_body: log_body,
116
+ log_headers: log_headers,
117
+ headers_to_include: headers_to_include,
118
+ headers_to_exclude: headers_to_exclude,
119
+ headers_to_unmask: headers_to_unmask
120
+ )
121
+ end
122
+
123
+ def self.any_logging_configured?
124
+ %w[
125
+ RESPONSE_LOG_BODY
126
+ RESPONSE_LOG_HEADERS
127
+ RESPONSE_HEADERS_TO_INCLUDE
128
+ RESPONSE_HEADERS_TO_EXCLUDE
129
+ RESPONSE_HEADERS_TO_UNMASK
130
+ ].any? { |key| ENV.key?(key) && !ENV[key].nil? && !ENV[key].empty? }
131
+ end
132
+ end
133
+
134
+ # Initializes a new instance of LoggingConfiguration.
135
+ class LoggingConfiguration < CoreLibrary::ApiLoggingConfiguration
136
+ def initialize(logger: nil, log_level: nil, mask_sensitive_headers: true,
137
+ request_logging_config: nil,
138
+ response_logging_config: nil)
139
+ request_logging_config ||= RequestLoggingConfiguration.new
140
+ response_logging_config ||= ResponseLoggingConfiguration.new
141
+ super(
142
+ logger,
143
+ log_level,
144
+ request_logging_config,
145
+ response_logging_config,
146
+ mask_sensitive_headers
147
+ )
148
+ end
149
+
150
+ def clone_with(logger: nil, log_level: nil, mask_sensitive_headers: nil,
151
+ request_logging_config: nil, response_logging_config: nil)
152
+ logger ||= self.logger
153
+ log_level ||= self.log_level
154
+ mask_sensitive_headers ||= self.mask_sensitive_headers
155
+ request_logging_config ||= self.request_logging_config.clone
156
+ response_logging_config ||= self.response_logging_config.clone
157
+
158
+ LoggingConfiguration.new(
159
+ logger: logger,
160
+ log_level: log_level,
161
+ mask_sensitive_headers: mask_sensitive_headers,
162
+ request_logging_config: request_logging_config,
163
+ response_logging_config: response_logging_config
164
+ )
165
+ end
166
+
167
+ def self.from_env
168
+ log_level = ENV['LOG_LEVEL']
169
+ mask_sensitive_headers = ENV['MASK_SENSITIVE_HEADERS']
170
+
171
+ new(
172
+ log_level: log_level,
173
+ mask_sensitive_headers: mask_sensitive_headers,
174
+ request_logging_config: RequestLoggingConfiguration.from_env,
175
+ response_logging_config: ResponseLoggingConfiguration.from_env
176
+ )
177
+ end
178
+
179
+ def self.any_logging_configured?
180
+ RequestLoggingConfiguration.any_logging_configured? ||
181
+ ResponseLoggingConfiguration.any_logging_configured? ||
182
+ ENV.key?('LOG_LEVEL') ||
183
+ ENV.key?('MASK_SENSITIVE_HEADERS')
184
+ end
185
+ end
186
+ end
@@ -0,0 +1,17 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # Represents the generic logger facade
8
+ class AbstractLogger < Logger
9
+ # Logs a message with a specified log level and additional parameters.
10
+ # @param level [Symbol] The log level of the message.
11
+ # @param message [String] The message to log.
12
+ # @param params [Hash] Additional parameters to include in the log message.
13
+ def log(level, message, params)
14
+ raise NotImplementedError, 'This method needs to be implemented in a child class.'
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,107 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # AuthTransactionsRequest Model.
8
+ class AuthTransactionsRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Entity]
14
+ attr_accessor :hierarchy
15
+
16
+ # The category or classification of a payment card based on the issuing
17
+ # network. Default is Credit.<br>Debit isn't supported in this release.
18
+ # @return [String]
19
+ attr_accessor :card_type
20
+
21
+ # The network the card is associated with that facilitates the payment.
22
+ # <br>Default is All Card Networks.
23
+ # @return [Array[CardNetworkType]]
24
+ attr_accessor :card_networks
25
+
26
+ # The network the card is associated with that facilitates the payment.
27
+ # <br>Default is All Card Networks.
28
+ # @return [DateRange]
29
+ attr_accessor :date_range
30
+
31
+ # A mapping from model property names to API property names.
32
+ def self.names
33
+ @_hash = {} if @_hash.nil?
34
+ @_hash['hierarchy'] = 'hierarchy'
35
+ @_hash['card_type'] = 'cardType'
36
+ @_hash['card_networks'] = 'cardNetworks'
37
+ @_hash['date_range'] = 'dateRange'
38
+ @_hash
39
+ end
40
+
41
+ # An array for optional fields
42
+ def self.optionals
43
+ %w[
44
+ card_type
45
+ card_networks
46
+ ]
47
+ end
48
+
49
+ # An array for nullable fields
50
+ def self.nullables
51
+ []
52
+ end
53
+
54
+ def initialize(hierarchy:, date_range:, card_type: SKIP,
55
+ card_networks: SKIP, additional_properties: nil)
56
+ # Add additional model properties to the instance
57
+ additional_properties = {} if additional_properties.nil?
58
+
59
+ @hierarchy = hierarchy
60
+ @card_type = card_type unless card_type == SKIP
61
+ @card_networks = card_networks unless card_networks == SKIP
62
+ @date_range = date_range
63
+ @additional_properties = additional_properties
64
+ end
65
+
66
+ # Creates an instance of the object from a hash.
67
+ def self.from_hash(hash)
68
+ return nil unless hash
69
+
70
+ # Extract variables from the hash.
71
+ hierarchy = Entity.from_hash(hash['hierarchy']) if hash['hierarchy']
72
+ date_range = DateRange.from_hash(hash['dateRange']) if hash['dateRange']
73
+ card_type = hash.key?('cardType') ? hash['cardType'] : SKIP
74
+ card_networks = hash.key?('cardNetworks') ? hash['cardNetworks'] : SKIP
75
+
76
+ # Create a new hash for additional properties, removing known properties.
77
+ new_hash = hash.reject { |k, _| names.value?(k) }
78
+
79
+ additional_properties = APIHelper.get_additional_properties(
80
+ new_hash, proc { |value| value }
81
+ )
82
+
83
+ # Create object from extracted values.
84
+ AuthTransactionsRequest.new(hierarchy: hierarchy,
85
+ date_range: date_range,
86
+ card_type: card_type,
87
+ card_networks: card_networks,
88
+ additional_properties: additional_properties)
89
+ end
90
+
91
+ # Provides a human-readable string representation of the object.
92
+ def to_s
93
+ class_name = self.class.name.split('::').last
94
+ "<#{class_name} hierarchy: #{@hierarchy}, card_type: #{@card_type}, card_networks:"\
95
+ " #{@card_networks}, date_range: #{@date_range}, additional_properties:"\
96
+ " #{@additional_properties}>"
97
+ end
98
+
99
+ # Provides a debugging-friendly string with detailed object information.
100
+ def inspect
101
+ class_name = self.class.name.split('::').last
102
+ "<#{class_name} hierarchy: #{@hierarchy.inspect}, card_type: #{@card_type.inspect},"\
103
+ " card_networks: #{@card_networks.inspect}, date_range: #{@date_range.inspect},"\
104
+ " additional_properties: #{@additional_properties}>"
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,116 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # AuthTransactionsRequestByChain Model.
8
+ class AuthTransactionsRequestByChain < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Pagination]
14
+ attr_accessor :pagination
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Entity]
18
+ attr_accessor :hierarchy
19
+
20
+ # The category or classification of a payment card based on the issuing
21
+ # network. Default is Credit.
22
+ # @return [String]
23
+ attr_accessor :card_type
24
+
25
+ # The network the card is associated with that facilitates the payment.
26
+ # <br>Default is All Card Networks.
27
+ # @return [Array[CardNetworkType]]
28
+ attr_accessor :card_networks
29
+
30
+ # The network the card is associated with that facilitates the payment.
31
+ # <br>Default is All Card Networks.
32
+ # @return [DateRange]
33
+ attr_accessor :date_range
34
+
35
+ # A mapping from model property names to API property names.
36
+ def self.names
37
+ @_hash = {} if @_hash.nil?
38
+ @_hash['pagination'] = 'pagination'
39
+ @_hash['hierarchy'] = 'hierarchy'
40
+ @_hash['card_type'] = 'cardType'
41
+ @_hash['card_networks'] = 'cardNetworks'
42
+ @_hash['date_range'] = 'dateRange'
43
+ @_hash
44
+ end
45
+
46
+ # An array for optional fields
47
+ def self.optionals
48
+ %w[
49
+ pagination
50
+ card_type
51
+ card_networks
52
+ ]
53
+ end
54
+
55
+ # An array for nullable fields
56
+ def self.nullables
57
+ []
58
+ end
59
+
60
+ def initialize(hierarchy:, date_range:, pagination: SKIP, card_type: SKIP,
61
+ card_networks: SKIP, additional_properties: nil)
62
+ # Add additional model properties to the instance
63
+ additional_properties = {} if additional_properties.nil?
64
+
65
+ @pagination = pagination unless pagination == SKIP
66
+ @hierarchy = hierarchy
67
+ @card_type = card_type unless card_type == SKIP
68
+ @card_networks = card_networks unless card_networks == SKIP
69
+ @date_range = date_range
70
+ @additional_properties = additional_properties
71
+ end
72
+
73
+ # Creates an instance of the object from a hash.
74
+ def self.from_hash(hash)
75
+ return nil unless hash
76
+
77
+ # Extract variables from the hash.
78
+ hierarchy = Entity.from_hash(hash['hierarchy']) if hash['hierarchy']
79
+ date_range = DateRange.from_hash(hash['dateRange']) if hash['dateRange']
80
+ pagination = Pagination.from_hash(hash['pagination']) if hash['pagination']
81
+ card_type = hash.key?('cardType') ? hash['cardType'] : SKIP
82
+ card_networks = hash.key?('cardNetworks') ? hash['cardNetworks'] : SKIP
83
+
84
+ # Create a new hash for additional properties, removing known properties.
85
+ new_hash = hash.reject { |k, _| names.value?(k) }
86
+
87
+ additional_properties = APIHelper.get_additional_properties(
88
+ new_hash, proc { |value| value }
89
+ )
90
+
91
+ # Create object from extracted values.
92
+ AuthTransactionsRequestByChain.new(hierarchy: hierarchy,
93
+ date_range: date_range,
94
+ pagination: pagination,
95
+ card_type: card_type,
96
+ card_networks: card_networks,
97
+ additional_properties: additional_properties)
98
+ end
99
+
100
+ # Provides a human-readable string representation of the object.
101
+ def to_s
102
+ class_name = self.class.name.split('::').last
103
+ "<#{class_name} pagination: #{@pagination}, hierarchy: #{@hierarchy}, card_type:"\
104
+ " #{@card_type}, card_networks: #{@card_networks}, date_range: #{@date_range},"\
105
+ " additional_properties: #{@additional_properties}>"
106
+ end
107
+
108
+ # Provides a debugging-friendly string with detailed object information.
109
+ def inspect
110
+ class_name = self.class.name.split('::').last
111
+ "<#{class_name} pagination: #{@pagination.inspect}, hierarchy: #{@hierarchy.inspect},"\
112
+ " card_type: #{@card_type.inspect}, card_networks: #{@card_networks.inspect}, date_range:"\
113
+ " #{@date_range.inspect}, additional_properties: #{@additional_properties}>"
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,116 @@
1
+ # reporting_authorization_summary_api
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module ReportingAuthorizationSummaryApi
7
+ # AuthTransactionsRequestByDivision Model.
8
+ class AuthTransactionsRequestByDivision < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Pagination]
14
+ attr_accessor :pagination
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Entity]
18
+ attr_accessor :hierarchy
19
+
20
+ # The category or classification of a payment card based on the issuing
21
+ # network. Default is Credit.
22
+ # @return [String]
23
+ attr_accessor :card_type
24
+
25
+ # The network the card is associated with that facilitates the payment.
26
+ # <br>Default is All Card Networks.
27
+ # @return [Array[CardNetworkType]]
28
+ attr_accessor :card_networks
29
+
30
+ # The network the card is associated with that facilitates the payment.
31
+ # <br>Default is All Card Networks.
32
+ # @return [DateRange]
33
+ attr_accessor :date_range
34
+
35
+ # A mapping from model property names to API property names.
36
+ def self.names
37
+ @_hash = {} if @_hash.nil?
38
+ @_hash['pagination'] = 'pagination'
39
+ @_hash['hierarchy'] = 'hierarchy'
40
+ @_hash['card_type'] = 'cardType'
41
+ @_hash['card_networks'] = 'cardNetworks'
42
+ @_hash['date_range'] = 'dateRange'
43
+ @_hash
44
+ end
45
+
46
+ # An array for optional fields
47
+ def self.optionals
48
+ %w[
49
+ pagination
50
+ card_type
51
+ card_networks
52
+ ]
53
+ end
54
+
55
+ # An array for nullable fields
56
+ def self.nullables
57
+ []
58
+ end
59
+
60
+ def initialize(hierarchy:, date_range:, pagination: SKIP, card_type: SKIP,
61
+ card_networks: SKIP, additional_properties: nil)
62
+ # Add additional model properties to the instance
63
+ additional_properties = {} if additional_properties.nil?
64
+
65
+ @pagination = pagination unless pagination == SKIP
66
+ @hierarchy = hierarchy
67
+ @card_type = card_type unless card_type == SKIP
68
+ @card_networks = card_networks unless card_networks == SKIP
69
+ @date_range = date_range
70
+ @additional_properties = additional_properties
71
+ end
72
+
73
+ # Creates an instance of the object from a hash.
74
+ def self.from_hash(hash)
75
+ return nil unless hash
76
+
77
+ # Extract variables from the hash.
78
+ hierarchy = Entity.from_hash(hash['hierarchy']) if hash['hierarchy']
79
+ date_range = DateRange.from_hash(hash['dateRange']) if hash['dateRange']
80
+ pagination = Pagination.from_hash(hash['pagination']) if hash['pagination']
81
+ card_type = hash.key?('cardType') ? hash['cardType'] : SKIP
82
+ card_networks = hash.key?('cardNetworks') ? hash['cardNetworks'] : SKIP
83
+
84
+ # Create a new hash for additional properties, removing known properties.
85
+ new_hash = hash.reject { |k, _| names.value?(k) }
86
+
87
+ additional_properties = APIHelper.get_additional_properties(
88
+ new_hash, proc { |value| value }
89
+ )
90
+
91
+ # Create object from extracted values.
92
+ AuthTransactionsRequestByDivision.new(hierarchy: hierarchy,
93
+ date_range: date_range,
94
+ pagination: pagination,
95
+ card_type: card_type,
96
+ card_networks: card_networks,
97
+ additional_properties: additional_properties)
98
+ end
99
+
100
+ # Provides a human-readable string representation of the object.
101
+ def to_s
102
+ class_name = self.class.name.split('::').last
103
+ "<#{class_name} pagination: #{@pagination}, hierarchy: #{@hierarchy}, card_type:"\
104
+ " #{@card_type}, card_networks: #{@card_networks}, date_range: #{@date_range},"\
105
+ " additional_properties: #{@additional_properties}>"
106
+ end
107
+
108
+ # Provides a debugging-friendly string with detailed object information.
109
+ def inspect
110
+ class_name = self.class.name.split('::').last
111
+ "<#{class_name} pagination: #{@pagination.inspect}, hierarchy: #{@hierarchy.inspect},"\
112
+ " card_type: #{@card_type.inspect}, card_networks: #{@card_networks.inspect}, date_range:"\
113
+ " #{@date_range.inspect}, additional_properties: #{@additional_properties}>"
114
+ end
115
+ end
116
+ end