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,91 @@
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
+ # SuccessfulOperation5 Model.
8
+ class SuccessfulOperation5 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [PageContext]
14
+ attr_accessor :page_context
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Array[Item]]
18
+ attr_accessor :items
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['page_context'] = 'pageContext'
24
+ @_hash['items'] = 'items'
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(page_context:, items:, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @page_context = page_context
43
+ @items = items
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
+ page_context = PageContext.from_hash(hash['pageContext']) if hash['pageContext']
53
+ # Parameter is an array, so we need to iterate through it
54
+ items = nil
55
+ unless hash['items'].nil?
56
+ items = []
57
+ hash['items'].each do |structure|
58
+ items << (Item.from_hash(structure) if structure)
59
+ end
60
+ end
61
+
62
+ items = nil unless hash.key?('items')
63
+
64
+ # Create a new hash for additional properties, removing known properties.
65
+ new_hash = hash.reject { |k, _| names.value?(k) }
66
+
67
+ additional_properties = APIHelper.get_additional_properties(
68
+ new_hash, proc { |value| value }
69
+ )
70
+
71
+ # Create object from extracted values.
72
+ SuccessfulOperation5.new(page_context: page_context,
73
+ items: items,
74
+ additional_properties: additional_properties)
75
+ end
76
+
77
+ # Provides a human-readable string representation of the object.
78
+ def to_s
79
+ class_name = self.class.name.split('::').last
80
+ "<#{class_name} page_context: #{@page_context}, items: #{@items}, additional_properties:"\
81
+ " #{@additional_properties}>"
82
+ end
83
+
84
+ # Provides a debugging-friendly string with detailed object information.
85
+ def inspect
86
+ class_name = self.class.name.split('::').last
87
+ "<#{class_name} page_context: #{@page_context.inspect}, items: #{@items.inspect},"\
88
+ " additional_properties: #{@additional_properties}>"
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,93 @@
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
+ # SuccessfulOperation6 Model.
8
+ class SuccessfulOperation6 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [PageContext]
14
+ attr_accessor :page_context
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Array[PricingInsightsResponseList]]
18
+ attr_accessor :pricing_insights_response_list
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['page_context'] = 'pageContext'
24
+ @_hash['pricing_insights_response_list'] = 'pricingInsightsResponseList'
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(page_context:, pricing_insights_response_list:,
39
+ additional_properties: nil)
40
+ # Add additional model properties to the instance
41
+ additional_properties = {} if additional_properties.nil?
42
+
43
+ @page_context = page_context
44
+ @pricing_insights_response_list = pricing_insights_response_list
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
+ page_context = PageContext.from_hash(hash['pageContext']) if hash['pageContext']
54
+ # Parameter is an array, so we need to iterate through it
55
+ pricing_insights_response_list = nil
56
+ unless hash['pricingInsightsResponseList'].nil?
57
+ pricing_insights_response_list = []
58
+ hash['pricingInsightsResponseList'].each do |structure|
59
+ pricing_insights_response_list << (PricingInsightsResponseList.from_hash(structure) if structure)
60
+ end
61
+ end
62
+
63
+ pricing_insights_response_list = nil unless hash.key?('pricingInsightsResponseList')
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
+ SuccessfulOperation6.new(page_context: page_context,
74
+ pricing_insights_response_list: pricing_insights_response_list,
75
+ additional_properties: additional_properties)
76
+ end
77
+
78
+ # Provides a human-readable string representation of the object.
79
+ def to_s
80
+ class_name = self.class.name.split('::').last
81
+ "<#{class_name} page_context: #{@page_context}, pricing_insights_response_list:"\
82
+ " #{@pricing_insights_response_list}, additional_properties: #{@additional_properties}>"
83
+ end
84
+
85
+ # Provides a debugging-friendly string with detailed object information.
86
+ def inspect
87
+ class_name = self.class.name.split('::').last
88
+ "<#{class_name} page_context: #{@page_context.inspect}, pricing_insights_response_list:"\
89
+ " #{@pricing_insights_response_list.inspect}, additional_properties:"\
90
+ " #{@additional_properties}>"
91
+ end
92
+ end
93
+ 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
+ # SuccessfulOperation7 Model.
8
+ class SuccessfulOperation7 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [ItemPriceResponse]
14
+ attr_accessor :item_price_response
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['item_price_response'] = 'ItemPriceResponse'
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(item_price_response:, additional_properties: nil)
34
+ # Add additional model properties to the instance
35
+ additional_properties = {} if additional_properties.nil?
36
+
37
+ @item_price_response = item_price_response
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
+ item_price_response = ItemPriceResponse.from_hash(hash['ItemPriceResponse']) if
47
+ hash['ItemPriceResponse']
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
+ SuccessfulOperation7.new(item_price_response: item_price_response,
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} item_price_response: #{@item_price_response}, 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} item_price_response: #{@item_price_response.inspect},"\
72
+ " additional_properties: #{@additional_properties}>"
73
+ end
74
+ end
75
+ 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
+ # SuccessfulOperation8 Model.
8
+ class SuccessfulOperation8 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :feed_id
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['feed_id'] = 'feedId'
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(feed_id:, additional_properties: nil)
34
+ # Add additional model properties to the instance
35
+ additional_properties = {} if additional_properties.nil?
36
+
37
+ @feed_id = feed_id
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
+ feed_id = hash.key?('feedId') ? hash['feedId'] : nil
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
+ SuccessfulOperation8.new(feed_id: feed_id,
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} feed_id: #{@feed_id}, 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} feed_id: #{@feed_id.inspect}, additional_properties:"\
70
+ " #{@additional_properties}>"
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,122 @@
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
+ # TokenApiAuthorizationCode Model.
8
+ class TokenApiAuthorizationCode < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [ClientCredentialsRes]
14
+ attr_accessor :client_credentials_res
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [TokenApiRes]
18
+ attr_accessor :token_api_res
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [RefreshTokenRes]
22
+ attr_accessor :refresh_token_res
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_accessor :access_token
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :token_type
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [Integer]
34
+ attr_accessor :expires_in
35
+
36
+ # A mapping from model property names to API property names.
37
+ def self.names
38
+ @_hash = {} if @_hash.nil?
39
+ @_hash['client_credentials_res'] = 'clientCredentialsRes'
40
+ @_hash['token_api_res'] = 'tokenAPIRes'
41
+ @_hash['refresh_token_res'] = 'refreshTokenRes'
42
+ @_hash['access_token'] = 'access_token'
43
+ @_hash['token_type'] = 'token_type'
44
+ @_hash['expires_in'] = 'expires_in'
45
+ @_hash
46
+ end
47
+
48
+ # An array for optional fields
49
+ def self.optionals
50
+ []
51
+ end
52
+
53
+ # An array for nullable fields
54
+ def self.nullables
55
+ []
56
+ end
57
+
58
+ def initialize(client_credentials_res:, token_api_res:, refresh_token_res:,
59
+ access_token:, token_type:, expires_in:,
60
+ additional_properties: nil)
61
+ # Add additional model properties to the instance
62
+ additional_properties = {} if additional_properties.nil?
63
+
64
+ @client_credentials_res = client_credentials_res
65
+ @token_api_res = token_api_res
66
+ @refresh_token_res = refresh_token_res
67
+ @access_token = access_token
68
+ @token_type = token_type
69
+ @expires_in = expires_in
70
+ @additional_properties = additional_properties
71
+ end
72
+
73
+ # Creates an instance of the object from a hash.
74
+ def self.from_hash(hash)
75
+ return nil unless hash
76
+
77
+ # Extract variables from the hash.
78
+ client_credentials_res = ClientCredentialsRes.from_hash(hash['clientCredentialsRes']) if
79
+ hash['clientCredentialsRes']
80
+ token_api_res = TokenApiRes.from_hash(hash['tokenAPIRes']) if hash['tokenAPIRes']
81
+ refresh_token_res = RefreshTokenRes.from_hash(hash['refreshTokenRes']) if
82
+ hash['refreshTokenRes']
83
+ access_token = hash.key?('access_token') ? hash['access_token'] : nil
84
+ token_type = hash.key?('token_type') ? hash['token_type'] : nil
85
+ expires_in = hash.key?('expires_in') ? hash['expires_in'] : nil
86
+
87
+ # Create a new hash for additional properties, removing known properties.
88
+ new_hash = hash.reject { |k, _| names.value?(k) }
89
+
90
+ additional_properties = APIHelper.get_additional_properties(
91
+ new_hash, proc { |value| value }
92
+ )
93
+
94
+ # Create object from extracted values.
95
+ TokenApiAuthorizationCode.new(client_credentials_res: client_credentials_res,
96
+ token_api_res: token_api_res,
97
+ refresh_token_res: refresh_token_res,
98
+ access_token: access_token,
99
+ token_type: token_type,
100
+ expires_in: expires_in,
101
+ additional_properties: additional_properties)
102
+ end
103
+
104
+ # Provides a human-readable string representation of the object.
105
+ def to_s
106
+ class_name = self.class.name.split('::').last
107
+ "<#{class_name} client_credentials_res: #{@client_credentials_res}, token_api_res:"\
108
+ " #{@token_api_res}, refresh_token_res: #{@refresh_token_res}, access_token:"\
109
+ " #{@access_token}, token_type: #{@token_type}, expires_in: #{@expires_in},"\
110
+ " additional_properties: #{@additional_properties}>"
111
+ end
112
+
113
+ # Provides a debugging-friendly string with detailed object information.
114
+ def inspect
115
+ class_name = self.class.name.split('::').last
116
+ "<#{class_name} client_credentials_res: #{@client_credentials_res.inspect}, token_api_res:"\
117
+ " #{@token_api_res.inspect}, refresh_token_res: #{@refresh_token_res.inspect}, access_token:"\
118
+ " #{@access_token.inspect}, token_type: #{@token_type.inspect}, expires_in:"\
119
+ " #{@expires_in.inspect}, additional_properties: #{@additional_properties}>"
120
+ end
121
+ end
122
+ end
@@ -0,0 +1,122 @@
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
+ # TokenApiClientCredentials Model.
8
+ class TokenApiClientCredentials < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [ClientCredentialsRes]
14
+ attr_accessor :client_credentials_res
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [TokenApiRes]
18
+ attr_accessor :token_api_res
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [RefreshTokenRes]
22
+ attr_accessor :refresh_token_res
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [String]
26
+ attr_accessor :access_token
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :token_type
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [Integer]
34
+ attr_accessor :expires_in
35
+
36
+ # A mapping from model property names to API property names.
37
+ def self.names
38
+ @_hash = {} if @_hash.nil?
39
+ @_hash['client_credentials_res'] = 'clientCredentialsRes'
40
+ @_hash['token_api_res'] = 'tokenAPIRes'
41
+ @_hash['refresh_token_res'] = 'refreshTokenRes'
42
+ @_hash['access_token'] = 'access_token'
43
+ @_hash['token_type'] = 'token_type'
44
+ @_hash['expires_in'] = 'expires_in'
45
+ @_hash
46
+ end
47
+
48
+ # An array for optional fields
49
+ def self.optionals
50
+ []
51
+ end
52
+
53
+ # An array for nullable fields
54
+ def self.nullables
55
+ []
56
+ end
57
+
58
+ def initialize(client_credentials_res:, token_api_res:, refresh_token_res:,
59
+ access_token:, token_type:, expires_in:,
60
+ additional_properties: nil)
61
+ # Add additional model properties to the instance
62
+ additional_properties = {} if additional_properties.nil?
63
+
64
+ @client_credentials_res = client_credentials_res
65
+ @token_api_res = token_api_res
66
+ @refresh_token_res = refresh_token_res
67
+ @access_token = access_token
68
+ @token_type = token_type
69
+ @expires_in = expires_in
70
+ @additional_properties = additional_properties
71
+ end
72
+
73
+ # Creates an instance of the object from a hash.
74
+ def self.from_hash(hash)
75
+ return nil unless hash
76
+
77
+ # Extract variables from the hash.
78
+ client_credentials_res = ClientCredentialsRes.from_hash(hash['clientCredentialsRes']) if
79
+ hash['clientCredentialsRes']
80
+ token_api_res = TokenApiRes.from_hash(hash['tokenAPIRes']) if hash['tokenAPIRes']
81
+ refresh_token_res = RefreshTokenRes.from_hash(hash['refreshTokenRes']) if
82
+ hash['refreshTokenRes']
83
+ access_token = hash.key?('access_token') ? hash['access_token'] : nil
84
+ token_type = hash.key?('token_type') ? hash['token_type'] : nil
85
+ expires_in = hash.key?('expires_in') ? hash['expires_in'] : nil
86
+
87
+ # Create a new hash for additional properties, removing known properties.
88
+ new_hash = hash.reject { |k, _| names.value?(k) }
89
+
90
+ additional_properties = APIHelper.get_additional_properties(
91
+ new_hash, proc { |value| value }
92
+ )
93
+
94
+ # Create object from extracted values.
95
+ TokenApiClientCredentials.new(client_credentials_res: client_credentials_res,
96
+ token_api_res: token_api_res,
97
+ refresh_token_res: refresh_token_res,
98
+ access_token: access_token,
99
+ token_type: token_type,
100
+ expires_in: expires_in,
101
+ additional_properties: additional_properties)
102
+ end
103
+
104
+ # Provides a human-readable string representation of the object.
105
+ def to_s
106
+ class_name = self.class.name.split('::').last
107
+ "<#{class_name} client_credentials_res: #{@client_credentials_res}, token_api_res:"\
108
+ " #{@token_api_res}, refresh_token_res: #{@refresh_token_res}, access_token:"\
109
+ " #{@access_token}, token_type: #{@token_type}, expires_in: #{@expires_in},"\
110
+ " additional_properties: #{@additional_properties}>"
111
+ end
112
+
113
+ # Provides a debugging-friendly string with detailed object information.
114
+ def inspect
115
+ class_name = self.class.name.split('::').last
116
+ "<#{class_name} client_credentials_res: #{@client_credentials_res.inspect}, token_api_res:"\
117
+ " #{@token_api_res.inspect}, refresh_token_res: #{@refresh_token_res.inspect}, access_token:"\
118
+ " #{@access_token.inspect}, token_type: #{@token_type.inspect}, expires_in:"\
119
+ " #{@expires_in.inspect}, additional_properties: #{@additional_properties}>"
120
+ end
121
+ end
122
+ end