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,85 @@
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
+ # SetUpCapSkuAllLegacyRequest Model.
8
+ class SetUpCapSkuAllLegacyRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [TrueClass | FalseClass]
14
+ attr_accessor :subsidy_enrolled
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [TrueClass | FalseClass]
18
+ attr_accessor :subsidy_preference
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['subsidy_enrolled'] = 'subsidyEnrolled'
24
+ @_hash['subsidy_preference'] = 'subsidyPreference'
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(subsidy_enrolled:, subsidy_preference:,
39
+ additional_properties: nil)
40
+ # Add additional model properties to the instance
41
+ additional_properties = {} if additional_properties.nil?
42
+
43
+ @subsidy_enrolled = subsidy_enrolled
44
+ @subsidy_preference = subsidy_preference
45
+ @additional_properties = additional_properties
46
+ end
47
+
48
+ # Creates an instance of the object from a hash.
49
+ def self.from_hash(hash)
50
+ return nil unless hash
51
+
52
+ # Extract variables from the hash.
53
+ subsidy_enrolled =
54
+ hash.key?('subsidyEnrolled') ? hash['subsidyEnrolled'] : nil
55
+ subsidy_preference =
56
+ hash.key?('subsidyPreference') ? hash['subsidyPreference'] : nil
57
+
58
+ # Create a new hash for additional properties, removing known properties.
59
+ new_hash = hash.reject { |k, _| names.value?(k) }
60
+
61
+ additional_properties = APIHelper.get_additional_properties(
62
+ new_hash, proc { |value| value }
63
+ )
64
+
65
+ # Create object from extracted values.
66
+ SetUpCapSkuAllLegacyRequest.new(subsidy_enrolled: subsidy_enrolled,
67
+ subsidy_preference: subsidy_preference,
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} subsidy_enrolled: #{@subsidy_enrolled}, subsidy_preference:"\
75
+ " #{@subsidy_preference}, additional_properties: #{@additional_properties}>"
76
+ end
77
+
78
+ # Provides a debugging-friendly string with detailed object information.
79
+ def inspect
80
+ class_name = self.class.name.split('::').last
81
+ "<#{class_name} subsidy_enrolled: #{@subsidy_enrolled.inspect}, subsidy_preference:"\
82
+ " #{@subsidy_preference.inspect}, additional_properties: #{@additional_properties}>"
83
+ end
84
+ end
85
+ 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
+ # Sort Model.
8
+ class Sort < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :sort_field
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :sort_order
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['sort_field'] = 'sortField'
24
+ @_hash['sort_order'] = 'sortOrder'
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(sort_field:, sort_order:, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @sort_field = sort_field
43
+ @sort_order = sort_order
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
+ sort_field = hash.key?('sortField') ? hash['sortField'] : nil
53
+ sort_order = hash.key?('sortOrder') ? hash['sortOrder'] : 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
+ Sort.new(sort_field: sort_field,
64
+ sort_order: sort_order,
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} sort_field: #{@sort_field}, sort_order: #{@sort_order},"\
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} sort_field: #{@sort_field.inspect}, sort_order: #{@sort_order.inspect},"\
79
+ " additional_properties: #{@additional_properties}>"
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,85 @@
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
+ # StatusInfo Model.
8
+ class StatusInfo < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [TrueClass | FalseClass]
14
+ attr_accessor :subsidy_enrolled
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [TrueClass | FalseClass]
18
+ attr_accessor :subsidy_preference
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['subsidy_enrolled'] = 'subsidyEnrolled'
24
+ @_hash['subsidy_preference'] = 'subsidyPreference'
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(subsidy_enrolled:, subsidy_preference:,
39
+ additional_properties: nil)
40
+ # Add additional model properties to the instance
41
+ additional_properties = {} if additional_properties.nil?
42
+
43
+ @subsidy_enrolled = subsidy_enrolled
44
+ @subsidy_preference = subsidy_preference
45
+ @additional_properties = additional_properties
46
+ end
47
+
48
+ # Creates an instance of the object from a hash.
49
+ def self.from_hash(hash)
50
+ return nil unless hash
51
+
52
+ # Extract variables from the hash.
53
+ subsidy_enrolled =
54
+ hash.key?('subsidyEnrolled') ? hash['subsidyEnrolled'] : nil
55
+ subsidy_preference =
56
+ hash.key?('subsidyPreference') ? hash['subsidyPreference'] : nil
57
+
58
+ # Create a new hash for additional properties, removing known properties.
59
+ new_hash = hash.reject { |k, _| names.value?(k) }
60
+
61
+ additional_properties = APIHelper.get_additional_properties(
62
+ new_hash, proc { |value| value }
63
+ )
64
+
65
+ # Create object from extracted values.
66
+ StatusInfo.new(subsidy_enrolled: subsidy_enrolled,
67
+ subsidy_preference: subsidy_preference,
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} subsidy_enrolled: #{@subsidy_enrolled}, subsidy_preference:"\
75
+ " #{@subsidy_preference}, additional_properties: #{@additional_properties}>"
76
+ end
77
+
78
+ # Provides a debugging-friendly string with detailed object information.
79
+ def inspect
80
+ class_name = self.class.name.split('::').last
81
+ "<#{class_name} subsidy_enrolled: #{@subsidy_enrolled.inspect}, subsidy_preference:"\
82
+ " #{@subsidy_preference.inspect}, additional_properties: #{@additional_properties}>"
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,94 @@
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
+ # Strategy Model.
8
+ class Strategy < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :strategy_type
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :adjustment_type
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Float]
22
+ attr_accessor :adjustment_value
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['strategy_type'] = 'strategyType'
28
+ @_hash['adjustment_type'] = 'adjustmentType'
29
+ @_hash['adjustment_value'] = 'adjustmentValue'
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(strategy_type:, adjustment_type:, adjustment_value:,
44
+ additional_properties: nil)
45
+ # Add additional model properties to the instance
46
+ additional_properties = {} if additional_properties.nil?
47
+
48
+ @strategy_type = strategy_type
49
+ @adjustment_type = adjustment_type
50
+ @adjustment_value = adjustment_value
51
+ @additional_properties = additional_properties
52
+ end
53
+
54
+ # Creates an instance of the object from a hash.
55
+ def self.from_hash(hash)
56
+ return nil unless hash
57
+
58
+ # Extract variables from the hash.
59
+ strategy_type = hash.key?('strategyType') ? hash['strategyType'] : nil
60
+ adjustment_type =
61
+ hash.key?('adjustmentType') ? hash['adjustmentType'] : nil
62
+ adjustment_value =
63
+ hash.key?('adjustmentValue') ? hash['adjustmentValue'] : nil
64
+
65
+ # Create a new hash for additional properties, removing known properties.
66
+ new_hash = hash.reject { |k, _| names.value?(k) }
67
+
68
+ additional_properties = APIHelper.get_additional_properties(
69
+ new_hash, proc { |value| value }
70
+ )
71
+
72
+ # Create object from extracted values.
73
+ Strategy.new(strategy_type: strategy_type,
74
+ adjustment_type: adjustment_type,
75
+ adjustment_value: adjustment_value,
76
+ additional_properties: additional_properties)
77
+ end
78
+
79
+ # Provides a human-readable string representation of the object.
80
+ def to_s
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} strategy_type: #{@strategy_type}, adjustment_type: #{@adjustment_type},"\
83
+ " adjustment_value: #{@adjustment_value}, additional_properties: #{@additional_properties}>"
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} strategy_type: #{@strategy_type.inspect}, adjustment_type:"\
90
+ " #{@adjustment_type.inspect}, adjustment_value: #{@adjustment_value.inspect},"\
91
+ " additional_properties: #{@additional_properties}>"
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,106 @@
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
+ # Strategy5 Model.
8
+ class Strategy5 < 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 [String]
18
+ attr_accessor :repricer_strategy
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Float]
22
+ attr_accessor :minimum_seller_allowed_price
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Integer]
26
+ attr_accessor :maximum_seller_allowed_price
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['sku'] = 'sku'
32
+ @_hash['repricer_strategy'] = 'repricerStrategy'
33
+ @_hash['minimum_seller_allowed_price'] = 'minimumSellerAllowedPrice'
34
+ @_hash['maximum_seller_allowed_price'] = 'maximumSellerAllowedPrice'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ []
41
+ end
42
+
43
+ # An array for nullable fields
44
+ def self.nullables
45
+ []
46
+ end
47
+
48
+ def initialize(sku:, repricer_strategy:, minimum_seller_allowed_price:,
49
+ maximum_seller_allowed_price:, additional_properties: nil)
50
+ # Add additional model properties to the instance
51
+ additional_properties = {} if additional_properties.nil?
52
+
53
+ @sku = sku
54
+ @repricer_strategy = repricer_strategy
55
+ @minimum_seller_allowed_price = minimum_seller_allowed_price
56
+ @maximum_seller_allowed_price = maximum_seller_allowed_price
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
+ sku = hash.key?('sku') ? hash['sku'] : nil
66
+ repricer_strategy =
67
+ hash.key?('repricerStrategy') ? hash['repricerStrategy'] : nil
68
+ minimum_seller_allowed_price =
69
+ hash.key?('minimumSellerAllowedPrice') ? hash['minimumSellerAllowedPrice'] : nil
70
+ maximum_seller_allowed_price =
71
+ hash.key?('maximumSellerAllowedPrice') ? hash['maximumSellerAllowedPrice'] : nil
72
+
73
+ # Create a new hash for additional properties, removing known properties.
74
+ new_hash = hash.reject { |k, _| names.value?(k) }
75
+
76
+ additional_properties = APIHelper.get_additional_properties(
77
+ new_hash, proc { |value| value }
78
+ )
79
+
80
+ # Create object from extracted values.
81
+ Strategy5.new(sku: sku,
82
+ repricer_strategy: repricer_strategy,
83
+ minimum_seller_allowed_price: minimum_seller_allowed_price,
84
+ maximum_seller_allowed_price: maximum_seller_allowed_price,
85
+ additional_properties: additional_properties)
86
+ end
87
+
88
+ # Provides a human-readable string representation of the object.
89
+ def to_s
90
+ class_name = self.class.name.split('::').last
91
+ "<#{class_name} sku: #{@sku}, repricer_strategy: #{@repricer_strategy},"\
92
+ " minimum_seller_allowed_price: #{@minimum_seller_allowed_price},"\
93
+ " maximum_seller_allowed_price: #{@maximum_seller_allowed_price}, additional_properties:"\
94
+ " #{@additional_properties}>"
95
+ end
96
+
97
+ # Provides a debugging-friendly string with detailed object information.
98
+ def inspect
99
+ class_name = self.class.name.split('::').last
100
+ "<#{class_name} sku: #{@sku.inspect}, repricer_strategy: #{@repricer_strategy.inspect},"\
101
+ " minimum_seller_allowed_price: #{@minimum_seller_allowed_price.inspect},"\
102
+ " maximum_seller_allowed_price: #{@maximum_seller_allowed_price.inspect},"\
103
+ " additional_properties: #{@additional_properties}>"
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,169 @@
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
+ # StrategyCollection Model.
8
+ class StrategyCollection < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :repricer_strategy
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :strategy_collection_id
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [TrueClass | FalseClass]
22
+ attr_accessor :enabled
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Integer]
26
+ attr_accessor :assigned_count
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [TrueClass | FalseClass]
30
+ attr_accessor :enable_repricer_for_promotion
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [TrueClass | FalseClass]
34
+ attr_accessor :restore_seller_price_without_target
35
+
36
+ # TODO: Write general description for this method
37
+ # @return [TrueClass | FalseClass]
38
+ attr_accessor :enable_buybox_meet_external
39
+
40
+ # TODO: Write general description for this method
41
+ # @return [TrueClass | FalseClass]
42
+ attr_accessor :compare_with3p_offer_only
43
+
44
+ # TODO: Write general description for this method
45
+ # @return [Array[Strategy]]
46
+ attr_accessor :strategies
47
+
48
+ # A mapping from model property names to API property names.
49
+ def self.names
50
+ @_hash = {} if @_hash.nil?
51
+ @_hash['repricer_strategy'] = 'repricerStrategy'
52
+ @_hash['strategy_collection_id'] = 'strategyCollectionId'
53
+ @_hash['enabled'] = 'enabled'
54
+ @_hash['assigned_count'] = 'assignedCount'
55
+ @_hash['enable_repricer_for_promotion'] = 'enableRepricerForPromotion'
56
+ @_hash['restore_seller_price_without_target'] =
57
+ 'restoreSellerPriceWithoutTarget'
58
+ @_hash['enable_buybox_meet_external'] = 'enableBuyboxMeetExternal'
59
+ @_hash['compare_with3p_offer_only'] = 'compareWith3pOfferOnly'
60
+ @_hash['strategies'] = 'strategies'
61
+ @_hash
62
+ end
63
+
64
+ # An array for optional fields
65
+ def self.optionals
66
+ []
67
+ end
68
+
69
+ # An array for nullable fields
70
+ def self.nullables
71
+ []
72
+ end
73
+
74
+ def initialize(repricer_strategy:, strategy_collection_id:, enabled:,
75
+ assigned_count:, enable_repricer_for_promotion:,
76
+ restore_seller_price_without_target:,
77
+ enable_buybox_meet_external:, compare_with3p_offer_only:,
78
+ strategies:, additional_properties: nil)
79
+ # Add additional model properties to the instance
80
+ additional_properties = {} if additional_properties.nil?
81
+
82
+ @repricer_strategy = repricer_strategy
83
+ @strategy_collection_id = strategy_collection_id
84
+ @enabled = enabled
85
+ @assigned_count = assigned_count
86
+ @enable_repricer_for_promotion = enable_repricer_for_promotion
87
+ @restore_seller_price_without_target = restore_seller_price_without_target
88
+ @enable_buybox_meet_external = enable_buybox_meet_external
89
+ @compare_with3p_offer_only = compare_with3p_offer_only
90
+ @strategies = strategies
91
+ @additional_properties = additional_properties
92
+ end
93
+
94
+ # Creates an instance of the object from a hash.
95
+ def self.from_hash(hash)
96
+ return nil unless hash
97
+
98
+ # Extract variables from the hash.
99
+ repricer_strategy =
100
+ hash.key?('repricerStrategy') ? hash['repricerStrategy'] : nil
101
+ strategy_collection_id =
102
+ hash.key?('strategyCollectionId') ? hash['strategyCollectionId'] : nil
103
+ enabled = hash.key?('enabled') ? hash['enabled'] : nil
104
+ assigned_count = hash.key?('assignedCount') ? hash['assignedCount'] : nil
105
+ enable_repricer_for_promotion =
106
+ hash.key?('enableRepricerForPromotion') ? hash['enableRepricerForPromotion'] : nil
107
+ restore_seller_price_without_target =
108
+ hash.key?('restoreSellerPriceWithoutTarget') ? hash['restoreSellerPriceWithoutTarget'] : nil
109
+ enable_buybox_meet_external =
110
+ hash.key?('enableBuyboxMeetExternal') ? hash['enableBuyboxMeetExternal'] : nil
111
+ compare_with3p_offer_only =
112
+ hash.key?('compareWith3pOfferOnly') ? hash['compareWith3pOfferOnly'] : nil
113
+ # Parameter is an array, so we need to iterate through it
114
+ strategies = nil
115
+ unless hash['strategies'].nil?
116
+ strategies = []
117
+ hash['strategies'].each do |structure|
118
+ strategies << (Strategy.from_hash(structure) if structure)
119
+ end
120
+ end
121
+
122
+ strategies = nil unless hash.key?('strategies')
123
+
124
+ # Create a new hash for additional properties, removing known properties.
125
+ new_hash = hash.reject { |k, _| names.value?(k) }
126
+
127
+ additional_properties = APIHelper.get_additional_properties(
128
+ new_hash, proc { |value| value }
129
+ )
130
+
131
+ # Create object from extracted values.
132
+ StrategyCollection.new(repricer_strategy: repricer_strategy,
133
+ strategy_collection_id: strategy_collection_id,
134
+ enabled: enabled,
135
+ assigned_count: assigned_count,
136
+ enable_repricer_for_promotion: enable_repricer_for_promotion,
137
+ restore_seller_price_without_target: restore_seller_price_without_target,
138
+ enable_buybox_meet_external: enable_buybox_meet_external,
139
+ compare_with3p_offer_only: compare_with3p_offer_only,
140
+ strategies: strategies,
141
+ additional_properties: additional_properties)
142
+ end
143
+
144
+ # Provides a human-readable string representation of the object.
145
+ def to_s
146
+ class_name = self.class.name.split('::').last
147
+ "<#{class_name} repricer_strategy: #{@repricer_strategy}, strategy_collection_id:"\
148
+ " #{@strategy_collection_id}, enabled: #{@enabled}, assigned_count: #{@assigned_count},"\
149
+ " enable_repricer_for_promotion: #{@enable_repricer_for_promotion},"\
150
+ " restore_seller_price_without_target: #{@restore_seller_price_without_target},"\
151
+ " enable_buybox_meet_external: #{@enable_buybox_meet_external}, compare_with3p_offer_only:"\
152
+ " #{@compare_with3p_offer_only}, strategies: #{@strategies}, additional_properties:"\
153
+ " #{@additional_properties}>"
154
+ end
155
+
156
+ # Provides a debugging-friendly string with detailed object information.
157
+ def inspect
158
+ class_name = self.class.name.split('::').last
159
+ "<#{class_name} repricer_strategy: #{@repricer_strategy.inspect}, strategy_collection_id:"\
160
+ " #{@strategy_collection_id.inspect}, enabled: #{@enabled.inspect}, assigned_count:"\
161
+ " #{@assigned_count.inspect}, enable_repricer_for_promotion:"\
162
+ " #{@enable_repricer_for_promotion.inspect}, restore_seller_price_without_target:"\
163
+ " #{@restore_seller_price_without_target.inspect}, enable_buybox_meet_external:"\
164
+ " #{@enable_buybox_meet_external.inspect}, compare_with3p_offer_only:"\
165
+ " #{@compare_with3p_offer_only.inspect}, strategies: #{@strategies.inspect},"\
166
+ " additional_properties: #{@additional_properties}>"
167
+ end
168
+ end
169
+ end