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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +147 -0
- data/bin/console +15 -0
- data/lib/reporting_authorization_summary_api/api_helper.rb +10 -0
- data/lib/reporting_authorization_summary_api/apis/authorizations_api.rb +258 -0
- data/lib/reporting_authorization_summary_api/apis/base_api.rb +67 -0
- data/lib/reporting_authorization_summary_api/client.rb +75 -0
- data/lib/reporting_authorization_summary_api/configuration.rb +165 -0
- data/lib/reporting_authorization_summary_api/exceptions/api_exception.rb +21 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_cardnetwork0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_chain0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_division0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_merchant0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_store0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_superchain0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/exceptions/authorizations_summary_transactiondate0_error_exception.rb +55 -0
- data/lib/reporting_authorization_summary_api/http/api_response.rb +19 -0
- data/lib/reporting_authorization_summary_api/http/auth/custom_header_authentication.rb +52 -0
- data/lib/reporting_authorization_summary_api/http/http_call_back.rb +10 -0
- data/lib/reporting_authorization_summary_api/http/http_method_enum.rb +10 -0
- data/lib/reporting_authorization_summary_api/http/http_request.rb +10 -0
- data/lib/reporting_authorization_summary_api/http/http_response.rb +10 -0
- data/lib/reporting_authorization_summary_api/http/proxy_settings.rb +22 -0
- data/lib/reporting_authorization_summary_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/reporting_authorization_summary_api/logging/sdk_logger.rb +17 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_request.rb +107 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_chain.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_division.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_store.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_request_by_super_chain.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_card_network.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_merchant.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/auth_transactions_summary_request_by_transaction_date.rb +116 -0
- data/lib/reporting_authorization_summary_api/models/authorizations_summary_cardnetwork_response.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/authorizations_summary_transactiondate_response.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/base_model.rb +110 -0
- data/lib/reporting_authorization_summary_api/models/card_network_type.rb +68 -0
- data/lib/reporting_authorization_summary_api/models/code_and_description.rb +98 -0
- data/lib/reporting_authorization_summary_api/models/common_summary_detail.rb +161 -0
- data/lib/reporting_authorization_summary_api/models/common_summary_responses.rb +213 -0
- data/lib/reporting_authorization_summary_api/models/date_range.rb +82 -0
- data/lib/reporting_authorization_summary_api/models/date_range_type.rb +85 -0
- data/lib/reporting_authorization_summary_api/models/entity.rb +99 -0
- data/lib/reporting_authorization_summary_api/models/entity_division_response.rb +94 -0
- data/lib/reporting_authorization_summary_api/models/entity_store_response.rb +95 -0
- data/lib/reporting_authorization_summary_api/models/error.rb +96 -0
- data/lib/reporting_authorization_summary_api/models/error_response.rb +84 -0
- data/lib/reporting_authorization_summary_api/models/level.rb +67 -0
- data/lib/reporting_authorization_summary_api/models/pagination.rb +87 -0
- data/lib/reporting_authorization_summary_api/models/pagination_response.rb +108 -0
- data/lib/reporting_authorization_summary_api/models/pagination_type.rb +87 -0
- data/lib/reporting_authorization_summary_api/models/summary.rb +183 -0
- data/lib/reporting_authorization_summary_api/models/summary1.rb +173 -0
- data/lib/reporting_authorization_summary_api/models/summary2.rb +190 -0
- data/lib/reporting_authorization_summary_api/models/summary3.rb +189 -0
- data/lib/reporting_authorization_summary_api/models/summary4.rb +174 -0
- data/lib/reporting_authorization_summary_api/models/summary5.rb +174 -0
- data/lib/reporting_authorization_summary_api/models/summary6.rb +173 -0
- data/lib/reporting_authorization_summary_api/models/summary_card_network.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_chain.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_division.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_entity_chain.rb +79 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_entity_entity.rb +79 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_entity_super_chain.rb +78 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_merchant.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_store.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_detail_super_chain.rb +233 -0
- data/lib/reporting_authorization_summary_api/models/summary_responses.rb +202 -0
- data/lib/reporting_authorization_summary_api/models/summary_transaction_date.rb +233 -0
- data/lib/reporting_authorization_summary_api/utilities/date_time_helper.rb +11 -0
- data/lib/reporting_authorization_summary_api/utilities/file_wrapper.rb +28 -0
- data/lib/reporting_authorization_summary_api.rb +132 -0
- metadata +158 -0
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
# Entity Model.
|
|
8
|
+
class Entity < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Level]
|
|
14
|
+
attr_accessor :level
|
|
15
|
+
|
|
16
|
+
# Refers to hierarchy id. Accepts a list of ids.
|
|
17
|
+
# @return [Array[String]]
|
|
18
|
+
attr_accessor :values
|
|
19
|
+
|
|
20
|
+
# The level of the merchant hierarchy that groups merchant identifiers
|
|
21
|
+
# (MIDs) and any related roll-up values under a common identifier for
|
|
22
|
+
# settlement, billing, and reporting. Chain Code is the primary identifier
|
|
23
|
+
# for merchants boarded in a MDB (Merchant Database) system. <br> Chain code
|
|
24
|
+
# is mandatory when the hierarchy level selected is Store or Division.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :chain_code
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['level'] = 'level'
|
|
32
|
+
@_hash['values'] = 'values'
|
|
33
|
+
@_hash['chain_code'] = 'chainCode'
|
|
34
|
+
@_hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# An array for optional fields
|
|
38
|
+
def self.optionals
|
|
39
|
+
%w[
|
|
40
|
+
level
|
|
41
|
+
values
|
|
42
|
+
chain_code
|
|
43
|
+
]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# An array for nullable fields
|
|
47
|
+
def self.nullables
|
|
48
|
+
[]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def initialize(level: SKIP, values: SKIP, chain_code: SKIP,
|
|
52
|
+
additional_properties: nil)
|
|
53
|
+
# Add additional model properties to the instance
|
|
54
|
+
additional_properties = {} if additional_properties.nil?
|
|
55
|
+
|
|
56
|
+
@level = level unless level == SKIP
|
|
57
|
+
@values = values unless values == SKIP
|
|
58
|
+
@chain_code = chain_code unless chain_code == SKIP
|
|
59
|
+
@additional_properties = additional_properties
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Creates an instance of the object from a hash.
|
|
63
|
+
def self.from_hash(hash)
|
|
64
|
+
return nil unless hash
|
|
65
|
+
|
|
66
|
+
# Extract variables from the hash.
|
|
67
|
+
level = hash.key?('level') ? hash['level'] : SKIP
|
|
68
|
+
values = hash.key?('values') ? hash['values'] : SKIP
|
|
69
|
+
chain_code = hash.key?('chainCode') ? hash['chainCode'] : SKIP
|
|
70
|
+
|
|
71
|
+
# Create a new hash for additional properties, removing known properties.
|
|
72
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
73
|
+
|
|
74
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
75
|
+
new_hash, proc { |value| value }
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
# Create object from extracted values.
|
|
79
|
+
Entity.new(level: level,
|
|
80
|
+
values: values,
|
|
81
|
+
chain_code: chain_code,
|
|
82
|
+
additional_properties: additional_properties)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Provides a human-readable string representation of the object.
|
|
86
|
+
def to_s
|
|
87
|
+
class_name = self.class.name.split('::').last
|
|
88
|
+
"<#{class_name} level: #{@level}, values: #{@values}, chain_code: #{@chain_code},"\
|
|
89
|
+
" additional_properties: #{@additional_properties}>"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
93
|
+
def inspect
|
|
94
|
+
class_name = self.class.name.split('::').last
|
|
95
|
+
"<#{class_name} level: #{@level.inspect}, values: #{@values.inspect}, chain_code:"\
|
|
96
|
+
" #{@chain_code.inspect}, additional_properties: #{@additional_properties}>"
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
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
|
+
# EntityDivisionResponse Model.
|
|
8
|
+
class EntityDivisionResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The level of the merchant hierarchy that groups merchant identifiers
|
|
13
|
+
# (MIDs) and any related roll-up values under a common identifier for
|
|
14
|
+
# settlement, billing, and reporting. Chain Code is the primary identifier
|
|
15
|
+
# for merchants boarded in a MDB (Merchant Database) system.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :chain_code
|
|
18
|
+
|
|
19
|
+
# The hierarchy level that enables merchants to roll-up child entities for
|
|
20
|
+
# Stores/Locations into different groups under a Chain. It is an optional
|
|
21
|
+
# hierarchy level, but if created, is required for all child entities under
|
|
22
|
+
# the Division Number which is unique to that particular Chain. <br>
|
|
23
|
+
# Supports entities Chain, National.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :division_number
|
|
26
|
+
|
|
27
|
+
# A mapping from model property names to API property names.
|
|
28
|
+
def self.names
|
|
29
|
+
@_hash = {} if @_hash.nil?
|
|
30
|
+
@_hash['chain_code'] = 'chainCode'
|
|
31
|
+
@_hash['division_number'] = 'divisionNumber'
|
|
32
|
+
@_hash
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for optional fields
|
|
36
|
+
def self.optionals
|
|
37
|
+
%w[
|
|
38
|
+
chain_code
|
|
39
|
+
division_number
|
|
40
|
+
]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for nullable fields
|
|
44
|
+
def self.nullables
|
|
45
|
+
[]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def initialize(chain_code: SKIP, division_number: SKIP,
|
|
49
|
+
additional_properties: nil)
|
|
50
|
+
# Add additional model properties to the instance
|
|
51
|
+
additional_properties = {} if additional_properties.nil?
|
|
52
|
+
|
|
53
|
+
@chain_code = chain_code unless chain_code == SKIP
|
|
54
|
+
@division_number = division_number unless division_number == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
chain_code = hash.key?('chainCode') ? hash['chainCode'] : SKIP
|
|
64
|
+
division_number =
|
|
65
|
+
hash.key?('divisionNumber') ? hash['divisionNumber'] : SKIP
|
|
66
|
+
|
|
67
|
+
# Create a new hash for additional properties, removing known properties.
|
|
68
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
+
|
|
70
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
+
new_hash, proc { |value| value }
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Create object from extracted values.
|
|
75
|
+
EntityDivisionResponse.new(chain_code: chain_code,
|
|
76
|
+
division_number: division_number,
|
|
77
|
+
additional_properties: additional_properties)
|
|
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} chain_code: #{@chain_code}, division_number: #{@division_number},"\
|
|
84
|
+
" additional_properties: #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
88
|
+
def inspect
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} chain_code: #{@chain_code.inspect}, division_number:"\
|
|
91
|
+
" #{@division_number.inspect}, additional_properties: #{@additional_properties}>"
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
# EntityStoreResponse Model.
|
|
8
|
+
class EntityStoreResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The level of the merchant hierarchy that groups merchant identifiers
|
|
13
|
+
# (MIDs) and any related roll-up values under a common identifier for
|
|
14
|
+
# settlement, billing, and reporting. Chain Code is the primary identifier
|
|
15
|
+
# for merchants boarded in a MDB (Merchant Database) system.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :chain_code
|
|
18
|
+
|
|
19
|
+
# The lowest roll-up level in the hierarchy system, grouping multiple
|
|
20
|
+
# merchant account numbers (MIDs) used in a single merchant location
|
|
21
|
+
# assigned to different terminals and/or business lines (MCCs). A Store
|
|
22
|
+
# Number is nine digits and unique to a particular Chain, meaning the same
|
|
23
|
+
# Store Number can exist for a Store under a different Divison/Chain, but
|
|
24
|
+
# not duplicates under the same Divison/Chain. <br> Supports entities Chain,
|
|
25
|
+
# National.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :store_number
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['chain_code'] = 'chainCode'
|
|
33
|
+
@_hash['store_number'] = 'storeNumber'
|
|
34
|
+
@_hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# An array for optional fields
|
|
38
|
+
def self.optionals
|
|
39
|
+
%w[
|
|
40
|
+
chain_code
|
|
41
|
+
store_number
|
|
42
|
+
]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# An array for nullable fields
|
|
46
|
+
def self.nullables
|
|
47
|
+
[]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def initialize(chain_code: SKIP, store_number: SKIP,
|
|
51
|
+
additional_properties: nil)
|
|
52
|
+
# Add additional model properties to the instance
|
|
53
|
+
additional_properties = {} if additional_properties.nil?
|
|
54
|
+
|
|
55
|
+
@chain_code = chain_code unless chain_code == SKIP
|
|
56
|
+
@store_number = store_number unless store_number == SKIP
|
|
57
|
+
@additional_properties = additional_properties
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
chain_code = hash.key?('chainCode') ? hash['chainCode'] : SKIP
|
|
66
|
+
store_number = hash.key?('storeNumber') ? hash['storeNumber'] : SKIP
|
|
67
|
+
|
|
68
|
+
# Create a new hash for additional properties, removing known properties.
|
|
69
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
70
|
+
|
|
71
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
72
|
+
new_hash, proc { |value| value }
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# Create object from extracted values.
|
|
76
|
+
EntityStoreResponse.new(chain_code: chain_code,
|
|
77
|
+
store_number: store_number,
|
|
78
|
+
additional_properties: additional_properties)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Provides a human-readable string representation of the object.
|
|
82
|
+
def to_s
|
|
83
|
+
class_name = self.class.name.split('::').last
|
|
84
|
+
"<#{class_name} chain_code: #{@chain_code}, store_number: #{@store_number},"\
|
|
85
|
+
" additional_properties: #{@additional_properties}>"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
89
|
+
def inspect
|
|
90
|
+
class_name = self.class.name.split('::').last
|
|
91
|
+
"<#{class_name} chain_code: #{@chain_code.inspect}, store_number: #{@store_number.inspect},"\
|
|
92
|
+
" additional_properties: #{@additional_properties}>"
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
# Error Message
|
|
8
|
+
class Error < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The error code.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :error_code
|
|
15
|
+
|
|
16
|
+
# Error message
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :error_message
|
|
19
|
+
|
|
20
|
+
# Error target
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :target
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['error_code'] = 'errorCode'
|
|
28
|
+
@_hash['error_message'] = 'errorMessage'
|
|
29
|
+
@_hash['target'] = 'target'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
error_code
|
|
37
|
+
error_message
|
|
38
|
+
target
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(error_code: SKIP, error_message: SKIP, target: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@error_code = error_code unless error_code == SKIP
|
|
53
|
+
@error_message = error_message unless error_message == SKIP
|
|
54
|
+
@target = target unless target == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
|
64
|
+
error_message = hash.key?('errorMessage') ? hash['errorMessage'] : SKIP
|
|
65
|
+
target = hash.key?('target') ? hash['target'] : SKIP
|
|
66
|
+
|
|
67
|
+
# Create a new hash for additional properties, removing known properties.
|
|
68
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
+
|
|
70
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
+
new_hash, proc { |value| value }
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Create object from extracted values.
|
|
75
|
+
Error.new(error_code: error_code,
|
|
76
|
+
error_message: error_message,
|
|
77
|
+
target: target,
|
|
78
|
+
additional_properties: additional_properties)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Provides a human-readable string representation of the object.
|
|
82
|
+
def to_s
|
|
83
|
+
class_name = self.class.name.split('::').last
|
|
84
|
+
"<#{class_name} error_code: #{@error_code}, error_message: #{@error_message}, target:"\
|
|
85
|
+
" #{@target}, additional_properties: #{@additional_properties}>"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
89
|
+
def inspect
|
|
90
|
+
class_name = self.class.name.split('::').last
|
|
91
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_message:"\
|
|
92
|
+
" #{@error_message.inspect}, target: #{@target.inspect}, additional_properties:"\
|
|
93
|
+
" #{@additional_properties}>"
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
# ErrorResponse Model.
|
|
8
|
+
class ErrorResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The list of errors.
|
|
13
|
+
# @return [Array[Error]]
|
|
14
|
+
attr_accessor :errors
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['errors'] = 'errors'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
errors
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(errors: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@errors = errors unless errors == SKIP
|
|
40
|
+
@additional_properties = additional_properties
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Creates an instance of the object from a hash.
|
|
44
|
+
def self.from_hash(hash)
|
|
45
|
+
return nil unless hash
|
|
46
|
+
|
|
47
|
+
# Extract variables from the hash.
|
|
48
|
+
# Parameter is an array, so we need to iterate through it
|
|
49
|
+
errors = nil
|
|
50
|
+
unless hash['errors'].nil?
|
|
51
|
+
errors = []
|
|
52
|
+
hash['errors'].each do |structure|
|
|
53
|
+
errors << (Error.from_hash(structure) if structure)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
errors = SKIP unless hash.key?('errors')
|
|
58
|
+
|
|
59
|
+
# Create a new hash for additional properties, removing known properties.
|
|
60
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
61
|
+
|
|
62
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
63
|
+
new_hash, proc { |value| value }
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# Create object from extracted values.
|
|
67
|
+
ErrorResponse.new(errors: errors,
|
|
68
|
+
additional_properties: additional_properties)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Provides a human-readable string representation of the object.
|
|
72
|
+
def to_s
|
|
73
|
+
class_name = self.class.name.split('::').last
|
|
74
|
+
"<#{class_name} errors: #{@errors}, additional_properties: #{@additional_properties}>"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
78
|
+
def inspect
|
|
79
|
+
class_name = self.class.name.split('::').last
|
|
80
|
+
"<#{class_name} errors: #{@errors.inspect}, additional_properties:"\
|
|
81
|
+
" #{@additional_properties}>"
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
# Supports entities such as Independent Sales Organization and Independent
|
|
8
|
+
# Sales Channel with a limit of one entity, <br>National, SuperChain, Partner
|
|
9
|
+
# with a maximum limit of 10 entities, <br>Chain, Division, Store, and
|
|
10
|
+
# Merchant with a maximum limit of 2000 entities.
|
|
11
|
+
class Level
|
|
12
|
+
LEVEL = [
|
|
13
|
+
# TODO: Write general description for MERCHANT
|
|
14
|
+
MERCHANT = 'MERCHANT'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for STORE
|
|
17
|
+
STORE = 'STORE'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for DIVISION
|
|
20
|
+
DIVISION = 'DIVISION'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for CHAIN
|
|
23
|
+
CHAIN = 'CHAIN'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for PARTNER
|
|
26
|
+
PARTNER = 'PARTNER'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for SUPERCHAIN
|
|
29
|
+
SUPERCHAIN = 'SUPERCHAIN'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for NATIONAL
|
|
32
|
+
NATIONAL = 'NATIONAL'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for INDEPENDENT_SALES_CHANNEL
|
|
35
|
+
INDEPENDENT_SALES_CHANNEL = 'INDEPENDENT_SALES_CHANNEL'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for INDEPENDENT_SALES_ORGANIZATION
|
|
38
|
+
INDEPENDENT_SALES_ORGANIZATION = 'INDEPENDENT_SALES_ORGANIZATION'.freeze
|
|
39
|
+
].freeze
|
|
40
|
+
|
|
41
|
+
def self.validate(value)
|
|
42
|
+
return false if value.nil?
|
|
43
|
+
|
|
44
|
+
LEVEL.include?(value)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def self.from_value(value, default_value = MERCHANT)
|
|
48
|
+
return default_value if value.nil?
|
|
49
|
+
|
|
50
|
+
str = value.to_s.strip
|
|
51
|
+
|
|
52
|
+
case str.downcase
|
|
53
|
+
when 'merchant' then MERCHANT
|
|
54
|
+
when 'store' then STORE
|
|
55
|
+
when 'division' then DIVISION
|
|
56
|
+
when 'chain' then CHAIN
|
|
57
|
+
when 'partner' then PARTNER
|
|
58
|
+
when 'superchain' then SUPERCHAIN
|
|
59
|
+
when 'national' then NATIONAL
|
|
60
|
+
when 'independent_sales_channel' then INDEPENDENT_SALES_CHANNEL
|
|
61
|
+
when 'independent_sales_organization' then INDEPENDENT_SALES_ORGANIZATION
|
|
62
|
+
else
|
|
63
|
+
default_value
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
# Pagination Model.
|
|
8
|
+
class Pagination < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The number of the specific page you want to retrieve. <br>Default is page
|
|
13
|
+
# number 01.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :page_number
|
|
16
|
+
|
|
17
|
+
# The number of records that you would want to retrieve per page.
|
|
18
|
+
# <br>Default is 25 items per page.
|
|
19
|
+
# @return [Integer]
|
|
20
|
+
attr_accessor :page_size
|
|
21
|
+
|
|
22
|
+
# A mapping from model property names to API property names.
|
|
23
|
+
def self.names
|
|
24
|
+
@_hash = {} if @_hash.nil?
|
|
25
|
+
@_hash['page_number'] = 'pageNumber'
|
|
26
|
+
@_hash['page_size'] = 'pageSize'
|
|
27
|
+
@_hash
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for optional fields
|
|
31
|
+
def self.optionals
|
|
32
|
+
%w[
|
|
33
|
+
page_number
|
|
34
|
+
page_size
|
|
35
|
+
]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for nullable fields
|
|
39
|
+
def self.nullables
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(page_number: 1, page_size: 25, additional_properties: nil)
|
|
44
|
+
# Add additional model properties to the instance
|
|
45
|
+
additional_properties = {} if additional_properties.nil?
|
|
46
|
+
|
|
47
|
+
@page_number = page_number unless page_number == SKIP
|
|
48
|
+
@page_size = page_size unless page_size == SKIP
|
|
49
|
+
@additional_properties = additional_properties
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Creates an instance of the object from a hash.
|
|
53
|
+
def self.from_hash(hash)
|
|
54
|
+
return nil unless hash
|
|
55
|
+
|
|
56
|
+
# Extract variables from the hash.
|
|
57
|
+
page_number = hash['pageNumber'] ||= 1
|
|
58
|
+
page_size = hash['pageSize'] ||= 25
|
|
59
|
+
|
|
60
|
+
# Create a new hash for additional properties, removing known properties.
|
|
61
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
62
|
+
|
|
63
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
64
|
+
new_hash, proc { |value| value }
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# Create object from extracted values.
|
|
68
|
+
Pagination.new(page_number: page_number,
|
|
69
|
+
page_size: page_size,
|
|
70
|
+
additional_properties: additional_properties)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Provides a human-readable string representation of the object.
|
|
74
|
+
def to_s
|
|
75
|
+
class_name = self.class.name.split('::').last
|
|
76
|
+
"<#{class_name} page_number: #{@page_number}, page_size: #{@page_size},"\
|
|
77
|
+
" additional_properties: #{@additional_properties}>"
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
81
|
+
def inspect
|
|
82
|
+
class_name = self.class.name.split('::').last
|
|
83
|
+
"<#{class_name} page_number: #{@page_number.inspect}, page_size: #{@page_size.inspect},"\
|
|
84
|
+
" additional_properties: #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|