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,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
+ # CurrentPrice Model.
8
+ class CurrentPrice < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :currency
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Integer]
18
+ attr_accessor :amount
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['currency'] = 'currency'
24
+ @_hash['amount'] = 'amount'
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(currency:, amount:, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @currency = currency
43
+ @amount = amount
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
+ currency = hash.key?('currency') ? hash['currency'] : nil
53
+ amount = hash.key?('amount') ? hash['amount'] : 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
+ CurrentPrice.new(currency: currency,
64
+ amount: amount,
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} currency: #{@currency}, amount: #{@amount}, 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} currency: #{@currency.inspect}, amount: #{@amount.inspect},"\
79
+ " additional_properties: #{@additional_properties}>"
80
+ end
81
+ end
82
+ 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
+ # Filter Model.
8
+ class Filter < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :name
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :operator
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Array[Integer]]
22
+ attr_accessor :value
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['name'] = 'name'
28
+ @_hash['operator'] = 'operator'
29
+ @_hash['value'] = 'value'
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(name:, operator:, value:, additional_properties: nil)
44
+ # Add additional model properties to the instance
45
+ additional_properties = {} if additional_properties.nil?
46
+
47
+ @name = name
48
+ @operator = operator
49
+ @value = value
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
+ name = hash.key?('name') ? hash['name'] : nil
59
+ operator = hash.key?('operator') ? hash['operator'] : nil
60
+ value = hash.key?('value') ? hash['value'] : 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
+ Filter.new(name: name,
71
+ operator: operator,
72
+ value: value,
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} name: #{@name}, operator: #{@operator}, value: #{@value},"\
80
+ " additional_properties: #{@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} name: #{@name.inspect}, operator: #{@operator.inspect}, value:"\
87
+ " #{@value.inspect}, additional_properties: #{@additional_properties}>"
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,109 @@
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
+ # GetPricingInsightsRequest Model.
8
+ class GetPricingInsightsRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[Filter]]
14
+ attr_accessor :filter
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [SearchCriteria]
18
+ attr_accessor :search_criteria
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Sort]
22
+ attr_accessor :sort
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Integer]
26
+ attr_accessor :page_number
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['filter'] = 'filter'
32
+ @_hash['search_criteria'] = 'searchCriteria'
33
+ @_hash['sort'] = 'sort'
34
+ @_hash['page_number'] = 'pageNumber'
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(filter:, search_criteria:, sort:, page_number:,
49
+ additional_properties: nil)
50
+ # Add additional model properties to the instance
51
+ additional_properties = {} if additional_properties.nil?
52
+
53
+ @filter = filter
54
+ @search_criteria = search_criteria
55
+ @sort = sort
56
+ @page_number = page_number
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
+ # Parameter is an array, so we need to iterate through it
66
+ filter = nil
67
+ unless hash['filter'].nil?
68
+ filter = []
69
+ hash['filter'].each do |structure|
70
+ filter << (Filter.from_hash(structure) if structure)
71
+ end
72
+ end
73
+
74
+ filter = nil unless hash.key?('filter')
75
+ search_criteria = SearchCriteria.from_hash(hash['searchCriteria']) if hash['searchCriteria']
76
+ sort = Sort.from_hash(hash['sort']) if hash['sort']
77
+ page_number = hash.key?('pageNumber') ? hash['pageNumber'] : nil
78
+
79
+ # Create a new hash for additional properties, removing known properties.
80
+ new_hash = hash.reject { |k, _| names.value?(k) }
81
+
82
+ additional_properties = APIHelper.get_additional_properties(
83
+ new_hash, proc { |value| value }
84
+ )
85
+
86
+ # Create object from extracted values.
87
+ GetPricingInsightsRequest.new(filter: filter,
88
+ search_criteria: search_criteria,
89
+ sort: sort,
90
+ page_number: page_number,
91
+ additional_properties: additional_properties)
92
+ end
93
+
94
+ # Provides a human-readable string representation of the object.
95
+ def to_s
96
+ class_name = self.class.name.split('::').last
97
+ "<#{class_name} filter: #{@filter}, search_criteria: #{@search_criteria}, sort: #{@sort},"\
98
+ " page_number: #{@page_number}, additional_properties: #{@additional_properties}>"
99
+ end
100
+
101
+ # Provides a debugging-friendly string with detailed object information.
102
+ def inspect
103
+ class_name = self.class.name.split('::').last
104
+ "<#{class_name} filter: #{@filter.inspect}, search_criteria: #{@search_criteria.inspect},"\
105
+ " sort: #{@sort.inspect}, page_number: #{@page_number.inspect}, additional_properties:"\
106
+ " #{@additional_properties}>"
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,95 @@
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
+ # IncentivesEnrollment Model.
8
+ class IncentivesEnrollment < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :referral_fee_incentive_enrollment
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :incentive_type
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :incentive_id
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['referral_fee_incentive_enrollment'] =
28
+ 'referralFeeIncentiveEnrollment'
29
+ @_hash['incentive_type'] = 'incentiveType'
30
+ @_hash['incentive_id'] = 'incentiveId'
31
+ @_hash
32
+ end
33
+
34
+ # An array for optional fields
35
+ def self.optionals
36
+ []
37
+ end
38
+
39
+ # An array for nullable fields
40
+ def self.nullables
41
+ []
42
+ end
43
+
44
+ def initialize(referral_fee_incentive_enrollment:, incentive_type:,
45
+ incentive_id:, additional_properties: nil)
46
+ # Add additional model properties to the instance
47
+ additional_properties = {} if additional_properties.nil?
48
+
49
+ @referral_fee_incentive_enrollment = referral_fee_incentive_enrollment
50
+ @incentive_type = incentive_type
51
+ @incentive_id = incentive_id
52
+ @additional_properties = additional_properties
53
+ end
54
+
55
+ # Creates an instance of the object from a hash.
56
+ def self.from_hash(hash)
57
+ return nil unless hash
58
+
59
+ # Extract variables from the hash.
60
+ referral_fee_incentive_enrollment =
61
+ hash.key?('referralFeeIncentiveEnrollment') ? hash['referralFeeIncentiveEnrollment'] : nil
62
+ incentive_type = hash.key?('incentiveType') ? hash['incentiveType'] : nil
63
+ incentive_id = hash.key?('incentiveId') ? hash['incentiveId'] : 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
+ IncentivesEnrollment.new(referral_fee_incentive_enrollment: referral_fee_incentive_enrollment,
74
+ incentive_type: incentive_type,
75
+ incentive_id: incentive_id,
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} referral_fee_incentive_enrollment: #{@referral_fee_incentive_enrollment},"\
83
+ " incentive_type: #{@incentive_type}, incentive_id: #{@incentive_id}, additional_properties:"\
84
+ " #{@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} referral_fee_incentive_enrollment:"\
91
+ " #{@referral_fee_incentive_enrollment.inspect}, incentive_type: #{@incentive_type.inspect},"\
92
+ " incentive_id: #{@incentive_id.inspect}, additional_properties: #{@additional_properties}>"
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,239 @@
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
+ # Item Model.
8
+ class Item < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :item_id
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :product_name
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :product_url
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_accessor :product_image_url
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :sku_id
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [Float]
34
+ attr_accessor :current_price
35
+
36
+ # TODO: Write general description for this method
37
+ # @return [Integer]
38
+ attr_accessor :target_price
39
+
40
+ # TODO: Write general description for this method
41
+ # @return [Integer]
42
+ attr_accessor :shipping_price
43
+
44
+ # TODO: Write general description for this method
45
+ # @return [String]
46
+ attr_accessor :incentive_type
47
+
48
+ # TODO: Write general description for this method
49
+ # @return [Integer]
50
+ attr_accessor :base_referral_fee
51
+
52
+ # TODO: Write general description for this method
53
+ # @return [Integer]
54
+ attr_accessor :reduced_referral_fee
55
+
56
+ # TODO: Write general description for this method
57
+ # @return [String]
58
+ attr_accessor :enrollment_type
59
+
60
+ # TODO: Write general description for this method
61
+ # @return [String]
62
+ attr_accessor :enrollment_date
63
+
64
+ # TODO: Write general description for this method
65
+ # @return [String]
66
+ attr_accessor :incentive_status
67
+
68
+ # TODO: Write general description for this method
69
+ # @return [Float]
70
+ attr_accessor :inventory_count
71
+
72
+ # TODO: Write general description for this method
73
+ # @return [String]
74
+ attr_accessor :start_date
75
+
76
+ # TODO: Write general description for this method
77
+ # @return [String]
78
+ attr_accessor :expiration_date
79
+
80
+ # TODO: Write general description for this method
81
+ # @return [String]
82
+ attr_accessor :incentive_id
83
+
84
+ # A mapping from model property names to API property names.
85
+ def self.names
86
+ @_hash = {} if @_hash.nil?
87
+ @_hash['item_id'] = 'itemId'
88
+ @_hash['product_name'] = 'productName'
89
+ @_hash['product_url'] = 'productUrl'
90
+ @_hash['product_image_url'] = 'productImageUrl'
91
+ @_hash['sku_id'] = 'skuId'
92
+ @_hash['current_price'] = 'currentPrice'
93
+ @_hash['target_price'] = 'targetPrice'
94
+ @_hash['shipping_price'] = 'shippingPrice'
95
+ @_hash['incentive_type'] = 'incentiveType'
96
+ @_hash['base_referral_fee'] = 'baseReferralFee'
97
+ @_hash['reduced_referral_fee'] = 'reducedReferralFee'
98
+ @_hash['enrollment_type'] = 'enrollmentType'
99
+ @_hash['enrollment_date'] = 'enrollmentDate'
100
+ @_hash['incentive_status'] = 'incentiveStatus'
101
+ @_hash['inventory_count'] = 'inventoryCount'
102
+ @_hash['start_date'] = 'startDate'
103
+ @_hash['expiration_date'] = 'expirationDate'
104
+ @_hash['incentive_id'] = 'incentiveId'
105
+ @_hash
106
+ end
107
+
108
+ # An array for optional fields
109
+ def self.optionals
110
+ []
111
+ end
112
+
113
+ # An array for nullable fields
114
+ def self.nullables
115
+ []
116
+ end
117
+
118
+ def initialize(item_id:, product_name:, product_url:, product_image_url:,
119
+ sku_id:, current_price:, target_price:, shipping_price:,
120
+ incentive_type:, base_referral_fee:, reduced_referral_fee:,
121
+ enrollment_type:, enrollment_date:, incentive_status:,
122
+ inventory_count:, start_date:, expiration_date:,
123
+ incentive_id:, additional_properties: nil)
124
+ # Add additional model properties to the instance
125
+ additional_properties = {} if additional_properties.nil?
126
+
127
+ @item_id = item_id
128
+ @product_name = product_name
129
+ @product_url = product_url
130
+ @product_image_url = product_image_url
131
+ @sku_id = sku_id
132
+ @current_price = current_price
133
+ @target_price = target_price
134
+ @shipping_price = shipping_price
135
+ @incentive_type = incentive_type
136
+ @base_referral_fee = base_referral_fee
137
+ @reduced_referral_fee = reduced_referral_fee
138
+ @enrollment_type = enrollment_type
139
+ @enrollment_date = enrollment_date
140
+ @incentive_status = incentive_status
141
+ @inventory_count = inventory_count
142
+ @start_date = start_date
143
+ @expiration_date = expiration_date
144
+ @incentive_id = incentive_id
145
+ @additional_properties = additional_properties
146
+ end
147
+
148
+ # Creates an instance of the object from a hash.
149
+ def self.from_hash(hash)
150
+ return nil unless hash
151
+
152
+ # Extract variables from the hash.
153
+ item_id = hash.key?('itemId') ? hash['itemId'] : nil
154
+ product_name = hash.key?('productName') ? hash['productName'] : nil
155
+ product_url = hash.key?('productUrl') ? hash['productUrl'] : nil
156
+ product_image_url =
157
+ hash.key?('productImageUrl') ? hash['productImageUrl'] : nil
158
+ sku_id = hash.key?('skuId') ? hash['skuId'] : nil
159
+ current_price = hash.key?('currentPrice') ? hash['currentPrice'] : nil
160
+ target_price = hash.key?('targetPrice') ? hash['targetPrice'] : nil
161
+ shipping_price = hash.key?('shippingPrice') ? hash['shippingPrice'] : nil
162
+ incentive_type = hash.key?('incentiveType') ? hash['incentiveType'] : nil
163
+ base_referral_fee =
164
+ hash.key?('baseReferralFee') ? hash['baseReferralFee'] : nil
165
+ reduced_referral_fee =
166
+ hash.key?('reducedReferralFee') ? hash['reducedReferralFee'] : nil
167
+ enrollment_type =
168
+ hash.key?('enrollmentType') ? hash['enrollmentType'] : nil
169
+ enrollment_date =
170
+ hash.key?('enrollmentDate') ? hash['enrollmentDate'] : nil
171
+ incentive_status =
172
+ hash.key?('incentiveStatus') ? hash['incentiveStatus'] : nil
173
+ inventory_count =
174
+ hash.key?('inventoryCount') ? hash['inventoryCount'] : nil
175
+ start_date = hash.key?('startDate') ? hash['startDate'] : nil
176
+ expiration_date =
177
+ hash.key?('expirationDate') ? hash['expirationDate'] : nil
178
+ incentive_id = hash.key?('incentiveId') ? hash['incentiveId'] : nil
179
+
180
+ # Create a new hash for additional properties, removing known properties.
181
+ new_hash = hash.reject { |k, _| names.value?(k) }
182
+
183
+ additional_properties = APIHelper.get_additional_properties(
184
+ new_hash, proc { |value| value }
185
+ )
186
+
187
+ # Create object from extracted values.
188
+ Item.new(item_id: item_id,
189
+ product_name: product_name,
190
+ product_url: product_url,
191
+ product_image_url: product_image_url,
192
+ sku_id: sku_id,
193
+ current_price: current_price,
194
+ target_price: target_price,
195
+ shipping_price: shipping_price,
196
+ incentive_type: incentive_type,
197
+ base_referral_fee: base_referral_fee,
198
+ reduced_referral_fee: reduced_referral_fee,
199
+ enrollment_type: enrollment_type,
200
+ enrollment_date: enrollment_date,
201
+ incentive_status: incentive_status,
202
+ inventory_count: inventory_count,
203
+ start_date: start_date,
204
+ expiration_date: expiration_date,
205
+ incentive_id: incentive_id,
206
+ additional_properties: additional_properties)
207
+ end
208
+
209
+ # Provides a human-readable string representation of the object.
210
+ def to_s
211
+ class_name = self.class.name.split('::').last
212
+ "<#{class_name} item_id: #{@item_id}, product_name: #{@product_name}, product_url:"\
213
+ " #{@product_url}, product_image_url: #{@product_image_url}, sku_id: #{@sku_id},"\
214
+ " current_price: #{@current_price}, target_price: #{@target_price}, shipping_price:"\
215
+ " #{@shipping_price}, incentive_type: #{@incentive_type}, base_referral_fee:"\
216
+ " #{@base_referral_fee}, reduced_referral_fee: #{@reduced_referral_fee}, enrollment_type:"\
217
+ " #{@enrollment_type}, enrollment_date: #{@enrollment_date}, incentive_status:"\
218
+ " #{@incentive_status}, inventory_count: #{@inventory_count}, start_date: #{@start_date},"\
219
+ " expiration_date: #{@expiration_date}, incentive_id: #{@incentive_id},"\
220
+ " additional_properties: #{@additional_properties}>"
221
+ end
222
+
223
+ # Provides a debugging-friendly string with detailed object information.
224
+ def inspect
225
+ class_name = self.class.name.split('::').last
226
+ "<#{class_name} item_id: #{@item_id.inspect}, product_name: #{@product_name.inspect},"\
227
+ " product_url: #{@product_url.inspect}, product_image_url: #{@product_image_url.inspect},"\
228
+ " sku_id: #{@sku_id.inspect}, current_price: #{@current_price.inspect}, target_price:"\
229
+ " #{@target_price.inspect}, shipping_price: #{@shipping_price.inspect}, incentive_type:"\
230
+ " #{@incentive_type.inspect}, base_referral_fee: #{@base_referral_fee.inspect},"\
231
+ " reduced_referral_fee: #{@reduced_referral_fee.inspect}, enrollment_type:"\
232
+ " #{@enrollment_type.inspect}, enrollment_date: #{@enrollment_date.inspect},"\
233
+ " incentive_status: #{@incentive_status.inspect}, inventory_count:"\
234
+ " #{@inventory_count.inspect}, start_date: #{@start_date.inspect}, expiration_date:"\
235
+ " #{@expiration_date.inspect}, incentive_id: #{@incentive_id.inspect},"\
236
+ " additional_properties: #{@additional_properties}>"
237
+ end
238
+ end
239
+ end
@@ -0,0 +1,73 @@
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
+ # Item1 Model.
8
+ class Item1 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Strategy5]
14
+ attr_accessor :strategy
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['strategy'] = 'Strategy'
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(strategy:, additional_properties: nil)
34
+ # Add additional model properties to the instance
35
+ additional_properties = {} if additional_properties.nil?
36
+
37
+ @strategy = strategy
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
+ strategy = Strategy5.from_hash(hash['Strategy']) if hash['Strategy']
47
+
48
+ # Create a new hash for additional properties, removing known properties.
49
+ new_hash = hash.reject { |k, _| names.value?(k) }
50
+
51
+ additional_properties = APIHelper.get_additional_properties(
52
+ new_hash, proc { |value| value }
53
+ )
54
+
55
+ # Create object from extracted values.
56
+ Item1.new(strategy: strategy,
57
+ additional_properties: additional_properties)
58
+ end
59
+
60
+ # Provides a human-readable string representation of the object.
61
+ def to_s
62
+ class_name = self.class.name.split('::').last
63
+ "<#{class_name} strategy: #{@strategy}, additional_properties: #{@additional_properties}>"
64
+ end
65
+
66
+ # Provides a debugging-friendly string with detailed object information.
67
+ def inspect
68
+ class_name = self.class.name.split('::').last
69
+ "<#{class_name} strategy: #{@strategy.inspect}, additional_properties:"\
70
+ " #{@additional_properties}>"
71
+ end
72
+ end
73
+ end