walmart-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 (96) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +176 -0
  4. data/bin/console +15 -0
  5. data/lib/walmart_ap_is/api_helper.rb +10 -0
  6. data/lib/walmart_ap_is/apis/base_api.rb +67 -0
  7. data/lib/walmart_ap_is/apis/cppreference_api.rb +60 -0
  8. data/lib/walmart_ap_is/apis/detail_api.rb +58 -0
  9. data/lib/walmart_ap_is/apis/feeds_api.rb +79 -0
  10. data/lib/walmart_ap_is/apis/feeds_feed_type_incentive_enrollment_api.rb +66 -0
  11. data/lib/walmart_ap_is/apis/feeds_feed_type_price_and_promotion_api.rb +86 -0
  12. data/lib/walmart_ap_is/apis/feeds_feed_type_walmart_funded_incentives_enrollment_api.rb +75 -0
  13. data/lib/walmart_ap_is/apis/get_pricing_insights_api.rb +60 -0
  14. data/lib/walmart_ap_is/apis/incentives_api.rb +93 -0
  15. data/lib/walmart_ap_is/apis/m_strategy_collection_id_api.rb +118 -0
  16. data/lib/walmart_ap_is/apis/misc_api.rb +23 -0
  17. data/lib/walmart_ap_is/apis/price_api.rb +63 -0
  18. data/lib/walmart_ap_is/apis/repricer_feeds_api.rb +64 -0
  19. data/lib/walmart_ap_is/apis/strategies_api.rb +56 -0
  20. data/lib/walmart_ap_is/apis/strategy_api.rb +63 -0
  21. data/lib/walmart_ap_is/apis/token_api.rb +98 -0
  22. data/lib/walmart_ap_is/apis/wfpreference_api.rb +68 -0
  23. data/lib/walmart_ap_is/client.rb +163 -0
  24. data/lib/walmart_ap_is/configuration.rb +165 -0
  25. data/lib/walmart_ap_is/exceptions/api_exception.rb +21 -0
  26. data/lib/walmart_ap_is/http/api_response.rb +19 -0
  27. data/lib/walmart_ap_is/http/auth/basic_auth.rb +62 -0
  28. data/lib/walmart_ap_is/http/http_call_back.rb +10 -0
  29. data/lib/walmart_ap_is/http/http_method_enum.rb +10 -0
  30. data/lib/walmart_ap_is/http/http_request.rb +10 -0
  31. data/lib/walmart_ap_is/http/http_response.rb +10 -0
  32. data/lib/walmart_ap_is/http/proxy_settings.rb +22 -0
  33. data/lib/walmart_ap_is/logging/configuration/api_logging_configuration.rb +186 -0
  34. data/lib/walmart_ap_is/logging/sdk_logger.rb +17 -0
  35. data/lib/walmart_ap_is/models/assign_unassign_items_to_from_repricer_strategy_request.rb +92 -0
  36. data/lib/walmart_ap_is/models/base_model.rb +110 -0
  37. data/lib/walmart_ap_is/models/client_credentials_res.rb +82 -0
  38. data/lib/walmart_ap_is/models/create_repricer_strategy_request.rb +149 -0
  39. data/lib/walmart_ap_is/models/current_price.rb +82 -0
  40. data/lib/walmart_ap_is/models/filter.rb +90 -0
  41. data/lib/walmart_ap_is/models/get_pricing_insights_request.rb +109 -0
  42. data/lib/walmart_ap_is/models/incentives_enrollment.rb +95 -0
  43. data/lib/walmart_ap_is/models/item.rb +239 -0
  44. data/lib/walmart_ap_is/models/item1.rb +73 -0
  45. data/lib/walmart_ap_is/models/item_feed_header.rb +119 -0
  46. data/lib/walmart_ap_is/models/item_identifiers.rb +72 -0
  47. data/lib/walmart_ap_is/models/item_price_response.rb +90 -0
  48. data/lib/walmart_ap_is/models/json1.rb +73 -0
  49. data/lib/walmart_ap_is/models/mp_item.rb +74 -0
  50. data/lib/walmart_ap_is/models/mp_item_feed_header.rb +91 -0
  51. data/lib/walmart_ap_is/models/page_context.rb +102 -0
  52. data/lib/walmart_ap_is/models/pricing.rb +84 -0
  53. data/lib/walmart_ap_is/models/pricing_insights_response_list.rb +328 -0
  54. data/lib/walmart_ap_is/models/program_action.rb +83 -0
  55. data/lib/walmart_ap_is/models/program_action1.rb +83 -0
  56. data/lib/walmart_ap_is/models/program_action_feed_header.rb +147 -0
  57. data/lib/walmart_ap_is/models/programs.rb +80 -0
  58. data/lib/walmart_ap_is/models/programs1.rb +75 -0
  59. data/lib/walmart_ap_is/models/promo_discount.rb +90 -0
  60. data/lib/walmart_ap_is/models/refresh_token_res.rb +82 -0
  61. data/lib/walmart_ap_is/models/scopes.rb +142 -0
  62. data/lib/walmart_ap_is/models/search_criteria.rb +82 -0
  63. data/lib/walmart_ap_is/models/set_up_cap_sku_all_legacy_request.rb +85 -0
  64. data/lib/walmart_ap_is/models/sort.rb +82 -0
  65. data/lib/walmart_ap_is/models/status_info.rb +85 -0
  66. data/lib/walmart_ap_is/models/strategy.rb +94 -0
  67. data/lib/walmart_ap_is/models/strategy5.rb +106 -0
  68. data/lib/walmart_ap_is/models/strategy_collection.rb +169 -0
  69. data/lib/walmart_ap_is/models/successful_operation.rb +159 -0
  70. data/lib/walmart_ap_is/models/successful_operation1.rb +73 -0
  71. data/lib/walmart_ap_is/models/successful_operation11.rb +82 -0
  72. data/lib/walmart_ap_is/models/successful_operation12.rb +82 -0
  73. data/lib/walmart_ap_is/models/successful_operation2.rb +100 -0
  74. data/lib/walmart_ap_is/models/successful_operation3.rb +92 -0
  75. data/lib/walmart_ap_is/models/successful_operation4.rb +84 -0
  76. data/lib/walmart_ap_is/models/successful_operation5.rb +91 -0
  77. data/lib/walmart_ap_is/models/successful_operation6.rb +93 -0
  78. data/lib/walmart_ap_is/models/successful_operation7.rb +75 -0
  79. data/lib/walmart_ap_is/models/successful_operation8.rb +73 -0
  80. data/lib/walmart_ap_is/models/token_api_authorization_code.rb +122 -0
  81. data/lib/walmart_ap_is/models/token_api_client_credentials.rb +122 -0
  82. data/lib/walmart_ap_is/models/token_api_refresh_token.rb +122 -0
  83. data/lib/walmart_ap_is/models/token_api_res.rb +82 -0
  84. data/lib/walmart_ap_is/models/update_pricing_for_a_single_item_request.rb +91 -0
  85. data/lib/walmart_ap_is/models/update_pricing_for_multiple_items_in_bulk_new_request.rb +92 -0
  86. data/lib/walmart_ap_is/models/update_reduced_referral_fee_incentives_enrollment_request.rb +95 -0
  87. data/lib/walmart_ap_is/models/update_repricer_strategy_request.rb +149 -0
  88. data/lib/walmart_ap_is/models/update_walmart_funded_incentives_enrollment_for_specific_items_request.rb +95 -0
  89. data/lib/walmart_ap_is/models/value.rb +91 -0
  90. data/lib/walmart_ap_is/models/value1.rb +101 -0
  91. data/lib/walmart_ap_is/models/walmart_funded_incentives_enrollment.rb +79 -0
  92. data/lib/walmart_ap_is/models/xml1.rb +73 -0
  93. data/lib/walmart_ap_is/utilities/date_time_helper.rb +11 -0
  94. data/lib/walmart_ap_is/utilities/file_wrapper.rb +28 -0
  95. data/lib/walmart_ap_is.rb +122 -0
  96. metadata +179 -0
@@ -0,0 +1,147 @@
1
+ # walmart_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module WalmartApIs
7
+ # ProgramActionFeedHeader Model.
8
+ class ProgramActionFeedHeader < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :request_id
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :request_batch_id
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :process_mode
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_accessor :subset
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :selling_channel
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [String]
34
+ attr_accessor :version
35
+
36
+ # TODO: Write general description for this method
37
+ # @return [String]
38
+ attr_accessor :locale
39
+
40
+ # TODO: Write general description for this method
41
+ # @return [String]
42
+ attr_accessor :feed_date
43
+
44
+ # TODO: Write general description for this method
45
+ # @return [String]
46
+ attr_accessor :feed_type
47
+
48
+ # A mapping from model property names to API property names.
49
+ def self.names
50
+ @_hash = {} if @_hash.nil?
51
+ @_hash['request_id'] = 'requestId'
52
+ @_hash['request_batch_id'] = 'requestBatchId'
53
+ @_hash['process_mode'] = 'processMode'
54
+ @_hash['subset'] = 'subset'
55
+ @_hash['selling_channel'] = 'sellingChannel'
56
+ @_hash['version'] = 'version'
57
+ @_hash['locale'] = 'locale'
58
+ @_hash['feed_date'] = 'feedDate'
59
+ @_hash['feed_type'] = 'feedType'
60
+ @_hash
61
+ end
62
+
63
+ # An array for optional fields
64
+ def self.optionals
65
+ []
66
+ end
67
+
68
+ # An array for nullable fields
69
+ def self.nullables
70
+ []
71
+ end
72
+
73
+ def initialize(request_id:, request_batch_id:, process_mode:, subset:,
74
+ selling_channel:, version:, locale:, feed_date:, feed_type:,
75
+ additional_properties: nil)
76
+ # Add additional model properties to the instance
77
+ additional_properties = {} if additional_properties.nil?
78
+
79
+ @request_id = request_id
80
+ @request_batch_id = request_batch_id
81
+ @process_mode = process_mode
82
+ @subset = subset
83
+ @selling_channel = selling_channel
84
+ @version = version
85
+ @locale = locale
86
+ @feed_date = feed_date
87
+ @feed_type = feed_type
88
+ @additional_properties = additional_properties
89
+ end
90
+
91
+ # Creates an instance of the object from a hash.
92
+ def self.from_hash(hash)
93
+ return nil unless hash
94
+
95
+ # Extract variables from the hash.
96
+ request_id = hash.key?('requestId') ? hash['requestId'] : nil
97
+ request_batch_id =
98
+ hash.key?('requestBatchId') ? hash['requestBatchId'] : nil
99
+ process_mode = hash.key?('processMode') ? hash['processMode'] : nil
100
+ subset = hash.key?('subset') ? hash['subset'] : nil
101
+ selling_channel =
102
+ hash.key?('sellingChannel') ? hash['sellingChannel'] : nil
103
+ version = hash.key?('version') ? hash['version'] : nil
104
+ locale = hash.key?('locale') ? hash['locale'] : nil
105
+ feed_date = hash.key?('feedDate') ? hash['feedDate'] : nil
106
+ feed_type = hash.key?('feedType') ? hash['feedType'] : nil
107
+
108
+ # Create a new hash for additional properties, removing known properties.
109
+ new_hash = hash.reject { |k, _| names.value?(k) }
110
+
111
+ additional_properties = APIHelper.get_additional_properties(
112
+ new_hash, proc { |value| value }
113
+ )
114
+
115
+ # Create object from extracted values.
116
+ ProgramActionFeedHeader.new(request_id: request_id,
117
+ request_batch_id: request_batch_id,
118
+ process_mode: process_mode,
119
+ subset: subset,
120
+ selling_channel: selling_channel,
121
+ version: version,
122
+ locale: locale,
123
+ feed_date: feed_date,
124
+ feed_type: feed_type,
125
+ additional_properties: additional_properties)
126
+ end
127
+
128
+ # Provides a human-readable string representation of the object.
129
+ def to_s
130
+ class_name = self.class.name.split('::').last
131
+ "<#{class_name} request_id: #{@request_id}, request_batch_id: #{@request_batch_id},"\
132
+ " process_mode: #{@process_mode}, subset: #{@subset}, selling_channel: #{@selling_channel},"\
133
+ " version: #{@version}, locale: #{@locale}, feed_date: #{@feed_date}, feed_type:"\
134
+ " #{@feed_type}, additional_properties: #{@additional_properties}>"
135
+ end
136
+
137
+ # Provides a debugging-friendly string with detailed object information.
138
+ def inspect
139
+ class_name = self.class.name.split('::').last
140
+ "<#{class_name} request_id: #{@request_id.inspect}, request_batch_id:"\
141
+ " #{@request_batch_id.inspect}, process_mode: #{@process_mode.inspect}, subset:"\
142
+ " #{@subset.inspect}, selling_channel: #{@selling_channel.inspect}, version:"\
143
+ " #{@version.inspect}, locale: #{@locale.inspect}, feed_date: #{@feed_date.inspect},"\
144
+ " feed_type: #{@feed_type.inspect}, additional_properties: #{@additional_properties}>"
145
+ end
146
+ end
147
+ end
@@ -0,0 +1,80 @@
1
+ # walmart_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module WalmartApIs
7
+ # Programs Model.
8
+ class Programs < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [WalmartFundedIncentivesEnrollment]
14
+ attr_accessor :walmart_funded_incentives_enrollment
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['walmart_funded_incentives_enrollment'] =
20
+ 'WalmartFundedIncentivesEnrollment'
21
+ @_hash
22
+ end
23
+
24
+ # An array for optional fields
25
+ def self.optionals
26
+ []
27
+ end
28
+
29
+ # An array for nullable fields
30
+ def self.nullables
31
+ []
32
+ end
33
+
34
+ def initialize(walmart_funded_incentives_enrollment:,
35
+ additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @walmart_funded_incentives_enrollment = walmart_funded_incentives_enrollment
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
+ if hash['WalmartFundedIncentivesEnrollment']
49
+ walmart_funded_incentives_enrollment = WalmartFundedIncentivesEnrollment.from_hash(hash['WalmartFundedIncentivesEnrollment'])
50
+ end
51
+
52
+ # Create a new hash for additional properties, removing known properties.
53
+ new_hash = hash.reject { |k, _| names.value?(k) }
54
+
55
+ additional_properties = APIHelper.get_additional_properties(
56
+ new_hash, proc { |value| value }
57
+ )
58
+
59
+ # Create object from extracted values.
60
+ Programs.new(walmart_funded_incentives_enrollment: walmart_funded_incentives_enrollment,
61
+ additional_properties: additional_properties)
62
+ end
63
+
64
+ # Provides a human-readable string representation of the object.
65
+ def to_s
66
+ class_name = self.class.name.split('::').last
67
+ "<#{class_name} walmart_funded_incentives_enrollment:"\
68
+ " #{@walmart_funded_incentives_enrollment}, additional_properties:"\
69
+ " #{@additional_properties}>"
70
+ end
71
+
72
+ # Provides a debugging-friendly string with detailed object information.
73
+ def inspect
74
+ class_name = self.class.name.split('::').last
75
+ "<#{class_name} walmart_funded_incentives_enrollment:"\
76
+ " #{@walmart_funded_incentives_enrollment.inspect}, additional_properties:"\
77
+ " #{@additional_properties}>"
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,75 @@
1
+ # walmart_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module WalmartApIs
7
+ # Programs1 Model.
8
+ class Programs1 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [IncentivesEnrollment]
14
+ attr_accessor :incentives_enrollment
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['incentives_enrollment'] = 'IncentivesEnrollment'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ []
26
+ end
27
+
28
+ # An array for nullable fields
29
+ def self.nullables
30
+ []
31
+ end
32
+
33
+ def initialize(incentives_enrollment:, additional_properties: nil)
34
+ # Add additional model properties to the instance
35
+ additional_properties = {} if additional_properties.nil?
36
+
37
+ @incentives_enrollment = incentives_enrollment
38
+ @additional_properties = additional_properties
39
+ end
40
+
41
+ # Creates an instance of the object from a hash.
42
+ def self.from_hash(hash)
43
+ return nil unless hash
44
+
45
+ # Extract variables from the hash.
46
+ incentives_enrollment = IncentivesEnrollment.from_hash(hash['IncentivesEnrollment']) if
47
+ hash['IncentivesEnrollment']
48
+
49
+ # Create a new hash for additional properties, removing known properties.
50
+ new_hash = hash.reject { |k, _| names.value?(k) }
51
+
52
+ additional_properties = APIHelper.get_additional_properties(
53
+ new_hash, proc { |value| value }
54
+ )
55
+
56
+ # Create object from extracted values.
57
+ Programs1.new(incentives_enrollment: incentives_enrollment,
58
+ additional_properties: additional_properties)
59
+ end
60
+
61
+ # Provides a human-readable string representation of the object.
62
+ def to_s
63
+ class_name = self.class.name.split('::').last
64
+ "<#{class_name} incentives_enrollment: #{@incentives_enrollment}, additional_properties:"\
65
+ " #{@additional_properties}>"
66
+ end
67
+
68
+ # Provides a debugging-friendly string with detailed object information.
69
+ def inspect
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} incentives_enrollment: #{@incentives_enrollment.inspect},"\
72
+ " additional_properties: #{@additional_properties}>"
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,90 @@
1
+ # walmart_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module WalmartApIs
7
+ # PromoDiscount Model.
8
+ class PromoDiscount < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :sku
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Integer]
18
+ attr_accessor :price
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Integer]
22
+ attr_accessor :msrp
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['sku'] = 'sku'
28
+ @_hash['price'] = 'price'
29
+ @_hash['msrp'] = 'msrp'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ []
36
+ end
37
+
38
+ # An array for nullable fields
39
+ def self.nullables
40
+ []
41
+ end
42
+
43
+ def initialize(sku:, price:, msrp:, additional_properties: nil)
44
+ # Add additional model properties to the instance
45
+ additional_properties = {} if additional_properties.nil?
46
+
47
+ @sku = sku
48
+ @price = price
49
+ @msrp = msrp
50
+ @additional_properties = additional_properties
51
+ end
52
+
53
+ # Creates an instance of the object from a hash.
54
+ def self.from_hash(hash)
55
+ return nil unless hash
56
+
57
+ # Extract variables from the hash.
58
+ sku = hash.key?('sku') ? hash['sku'] : nil
59
+ price = hash.key?('price') ? hash['price'] : nil
60
+ msrp = hash.key?('msrp') ? hash['msrp'] : nil
61
+
62
+ # Create a new hash for additional properties, removing known properties.
63
+ new_hash = hash.reject { |k, _| names.value?(k) }
64
+
65
+ additional_properties = APIHelper.get_additional_properties(
66
+ new_hash, proc { |value| value }
67
+ )
68
+
69
+ # Create object from extracted values.
70
+ PromoDiscount.new(sku: sku,
71
+ price: price,
72
+ msrp: msrp,
73
+ additional_properties: additional_properties)
74
+ end
75
+
76
+ # Provides a human-readable string representation of the object.
77
+ def to_s
78
+ class_name = self.class.name.split('::').last
79
+ "<#{class_name} sku: #{@sku}, price: #{@price}, msrp: #{@msrp}, additional_properties:"\
80
+ " #{@additional_properties}>"
81
+ end
82
+
83
+ # Provides a debugging-friendly string with detailed object information.
84
+ def inspect
85
+ class_name = self.class.name.split('::').last
86
+ "<#{class_name} sku: #{@sku.inspect}, price: #{@price.inspect}, msrp: #{@msrp.inspect},"\
87
+ " additional_properties: #{@additional_properties}>"
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,82 @@
1
+ # walmart_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module WalmartApIs
7
+ # RefreshTokenRes Model.
8
+ class RefreshTokenRes < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :summary
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Value]
18
+ attr_accessor :value
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['summary'] = 'summary'
24
+ @_hash['value'] = 'value'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(summary:, value:, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @summary = summary
43
+ @value = value
44
+ @additional_properties = additional_properties
45
+ end
46
+
47
+ # Creates an instance of the object from a hash.
48
+ def self.from_hash(hash)
49
+ return nil unless hash
50
+
51
+ # Extract variables from the hash.
52
+ summary = hash.key?('summary') ? hash['summary'] : nil
53
+ value = Value.from_hash(hash['value']) if hash['value']
54
+
55
+ # Create a new hash for additional properties, removing known properties.
56
+ new_hash = hash.reject { |k, _| names.value?(k) }
57
+
58
+ additional_properties = APIHelper.get_additional_properties(
59
+ new_hash, proc { |value| value }
60
+ )
61
+
62
+ # Create object from extracted values.
63
+ RefreshTokenRes.new(summary: summary,
64
+ value: value,
65
+ additional_properties: additional_properties)
66
+ end
67
+
68
+ # Provides a human-readable string representation of the object.
69
+ def to_s
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} summary: #{@summary}, value: #{@value}, additional_properties:"\
72
+ " #{@additional_properties}>"
73
+ end
74
+
75
+ # Provides a debugging-friendly string with detailed object information.
76
+ def inspect
77
+ class_name = self.class.name.split('::').last
78
+ "<#{class_name} summary: #{@summary.inspect}, value: #{@value.inspect},"\
79
+ " additional_properties: #{@additional_properties}>"
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,142 @@
1
+ # walmart_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module WalmartApIs
7
+ # Scopes Model.
8
+ class Scopes < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :reports
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :item
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :price
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_accessor :lagtime
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :feeds
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [String]
34
+ attr_accessor :returns
35
+
36
+ # TODO: Write general description for this method
37
+ # @return [String]
38
+ attr_accessor :orders
39
+
40
+ # TODO: Write general description for this method
41
+ # @return [String]
42
+ attr_accessor :inventory
43
+
44
+ # TODO: Write general description for this method
45
+ # @return [String]
46
+ attr_accessor :content
47
+
48
+ # A mapping from model property names to API property names.
49
+ def self.names
50
+ @_hash = {} if @_hash.nil?
51
+ @_hash['reports'] = 'reports'
52
+ @_hash['item'] = 'item'
53
+ @_hash['price'] = 'price'
54
+ @_hash['lagtime'] = 'lagtime'
55
+ @_hash['feeds'] = 'feeds'
56
+ @_hash['returns'] = 'returns'
57
+ @_hash['orders'] = 'orders'
58
+ @_hash['inventory'] = 'inventory'
59
+ @_hash['content'] = 'content'
60
+ @_hash
61
+ end
62
+
63
+ # An array for optional fields
64
+ def self.optionals
65
+ []
66
+ end
67
+
68
+ # An array for nullable fields
69
+ def self.nullables
70
+ []
71
+ end
72
+
73
+ def initialize(reports:, item:, price:, lagtime:, feeds:, returns:, orders:,
74
+ inventory:, content:, additional_properties: nil)
75
+ # Add additional model properties to the instance
76
+ additional_properties = {} if additional_properties.nil?
77
+
78
+ @reports = reports
79
+ @item = item
80
+ @price = price
81
+ @lagtime = lagtime
82
+ @feeds = feeds
83
+ @returns = returns
84
+ @orders = orders
85
+ @inventory = inventory
86
+ @content = content
87
+ @additional_properties = additional_properties
88
+ end
89
+
90
+ # Creates an instance of the object from a hash.
91
+ def self.from_hash(hash)
92
+ return nil unless hash
93
+
94
+ # Extract variables from the hash.
95
+ reports = hash.key?('reports') ? hash['reports'] : nil
96
+ item = hash.key?('item') ? hash['item'] : nil
97
+ price = hash.key?('price') ? hash['price'] : nil
98
+ lagtime = hash.key?('lagtime') ? hash['lagtime'] : nil
99
+ feeds = hash.key?('feeds') ? hash['feeds'] : nil
100
+ returns = hash.key?('returns') ? hash['returns'] : nil
101
+ orders = hash.key?('orders') ? hash['orders'] : nil
102
+ inventory = hash.key?('inventory') ? hash['inventory'] : nil
103
+ content = hash.key?('content') ? hash['content'] : nil
104
+
105
+ # Create a new hash for additional properties, removing known properties.
106
+ new_hash = hash.reject { |k, _| names.value?(k) }
107
+
108
+ additional_properties = APIHelper.get_additional_properties(
109
+ new_hash, proc { |value| value }
110
+ )
111
+
112
+ # Create object from extracted values.
113
+ Scopes.new(reports: reports,
114
+ item: item,
115
+ price: price,
116
+ lagtime: lagtime,
117
+ feeds: feeds,
118
+ returns: returns,
119
+ orders: orders,
120
+ inventory: inventory,
121
+ content: content,
122
+ additional_properties: additional_properties)
123
+ end
124
+
125
+ # Provides a human-readable string representation of the object.
126
+ def to_s
127
+ class_name = self.class.name.split('::').last
128
+ "<#{class_name} reports: #{@reports}, item: #{@item}, price: #{@price}, lagtime:"\
129
+ " #{@lagtime}, feeds: #{@feeds}, returns: #{@returns}, orders: #{@orders}, inventory:"\
130
+ " #{@inventory}, content: #{@content}, additional_properties: #{@additional_properties}>"
131
+ end
132
+
133
+ # Provides a debugging-friendly string with detailed object information.
134
+ def inspect
135
+ class_name = self.class.name.split('::').last
136
+ "<#{class_name} reports: #{@reports.inspect}, item: #{@item.inspect}, price:"\
137
+ " #{@price.inspect}, lagtime: #{@lagtime.inspect}, feeds: #{@feeds.inspect}, returns:"\
138
+ " #{@returns.inspect}, orders: #{@orders.inspect}, inventory: #{@inventory.inspect},"\
139
+ " content: #{@content.inspect}, additional_properties: #{@additional_properties}>"
140
+ end
141
+ end
142
+ end
@@ -0,0 +1,82 @@
1
+ # walmart_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module WalmartApIs
7
+ # SearchCriteria Model.
8
+ class SearchCriteria < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :search_field
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Array[String]]
18
+ attr_accessor :search_value
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['search_field'] = 'searchField'
24
+ @_hash['search_value'] = 'searchValue'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(search_field:, search_value:, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @search_field = search_field
43
+ @search_value = search_value
44
+ @additional_properties = additional_properties
45
+ end
46
+
47
+ # Creates an instance of the object from a hash.
48
+ def self.from_hash(hash)
49
+ return nil unless hash
50
+
51
+ # Extract variables from the hash.
52
+ search_field = hash.key?('searchField') ? hash['searchField'] : nil
53
+ search_value = hash.key?('searchValue') ? hash['searchValue'] : nil
54
+
55
+ # Create a new hash for additional properties, removing known properties.
56
+ new_hash = hash.reject { |k, _| names.value?(k) }
57
+
58
+ additional_properties = APIHelper.get_additional_properties(
59
+ new_hash, proc { |value| value }
60
+ )
61
+
62
+ # Create object from extracted values.
63
+ SearchCriteria.new(search_field: search_field,
64
+ search_value: search_value,
65
+ additional_properties: additional_properties)
66
+ end
67
+
68
+ # Provides a human-readable string representation of the object.
69
+ def to_s
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} search_field: #{@search_field}, search_value: #{@search_value},"\
72
+ " additional_properties: #{@additional_properties}>"
73
+ end
74
+
75
+ # Provides a debugging-friendly string with detailed object information.
76
+ def inspect
77
+ class_name = self.class.name.split('::').last
78
+ "<#{class_name} search_field: #{@search_field.inspect}, search_value:"\
79
+ " #{@search_value.inspect}, additional_properties: #{@additional_properties}>"
80
+ end
81
+ end
82
+ end