Class: WalmartApIs::ProductTypeDefinitionsApi
- Defined in:
- lib/walmart_ap_is/apis/product_type_definitions_api.rb
Overview
ProductTypeDefinitionsApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#get_product_type_definition(product_type, seller_id: nil, locale: 'en_US') ⇒ ApiResponse
Placeholder — not yet implemented. here here.
-
#search_product_type_definitions(keywords: nil, item_name: nil, locale: 'en_US') ⇒ ApiResponse
Placeholder — not yet implemented. here.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from WalmartApIs::BaseApi
Instance Method Details
#get_product_type_definition(product_type, seller_id: nil, locale: 'en_US') ⇒ ApiResponse
Placeholder — not yet implemented. here here
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/walmart_ap_is/apis/product_type_definitions_api.rb', line 53 def get_product_type_definition(product_type, seller_id: nil, locale: 'en_US') @api_call .request(new_request_builder(HttpMethodEnum::GET, '/definitions/v4/productTypes/{productType}', Server::DEFAULT1) .template_param(new_parameter(product_type, key: 'productType') .is_required(true) .should_encode(true)) .query_param(new_parameter(seller_id, key: 'sellerId')) .query_param(new_parameter(locale, key: 'locale')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('walletAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ProductTypeDefinition.method(:from_hash)) .is_api_response(true) .local_error('400', 'Bad Request', ErrorListErrorException) .local_error('403', 'Forbidden', ErrorListErrorException) .local_error('404', 'Not Found', ErrorListErrorException) .local_error('429', 'Rate limit exceeded', ErrorListErrorException) .local_error('500', 'Internal Server Error', ErrorListErrorException)) .execute end |
#search_product_type_definitions(keywords: nil, item_name: nil, locale: 'en_US') ⇒ ApiResponse
Placeholder — not yet implemented. here
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/walmart_ap_is/apis/product_type_definitions_api.rb', line 15 def search_product_type_definitions(keywords: nil, item_name: nil, locale: 'en_US') @api_call .request(new_request_builder(HttpMethodEnum::GET, '/definitions/v4/productTypes', Server::DEFAULT1) .query_param(new_parameter(keywords, key: 'keywords')) .query_param(new_parameter(item_name, key: 'itemName')) .query_param(new_parameter(locale, key: 'locale')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('walletAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ProductTypeList.method(:from_hash)) .is_api_response(true) .local_error('400', 'Bad Request', ErrorListErrorException) .local_error('403', 'Forbidden', ErrorListErrorException) .local_error('429', 'Rate limit exceeded', ErrorListErrorException) .local_error('500', 'Internal Server Error', ErrorListErrorException)) .execute end |