Class: WalmartApIs::OauthScopeSellerAuthAuthorizationCode
- Inherits:
-
Object
- Object
- WalmartApIs::OauthScopeSellerAuthAuthorizationCode
- Defined in:
- lib/walmart_ap_is/models/oauth_scope_seller_auth_authorization_code.rb
Overview
OAuth 2 scopes supported by the API
Constant Summary collapse
- OAUTH_SCOPE_SELLER_AUTH_AUTHORIZATION_CODE =
[ # Read product catalog items, attributes, and metadata SELLER_APICATALOGREAD = 'seller-api:catalog:read'.freeze, # Create and update catalog items SELLER_APICATALOGWRITE = 'seller-api:catalog:write'.freeze, # Read listing items and listing restrictions SELLER_APILISTINGSREAD = 'seller-api:listings:read'.freeze, # Create and update listing items SELLER_APILISTINGSWRITE = 'seller-api:listings:write'.freeze, # Read seller orders, order lines, and order status SELLER_APIORDERSREAD = 'seller-api:orders:read'.freeze, # Acknowledge, ship, and cancel order lines SELLER_APIORDERSWRITE = 'seller-api:orders:write'.freeze, # Read WFS fulfillment orders and shipment status SELLER_APIFULFILLMENTREAD = 'seller-api:fulfillment:read'.freeze, # Create, update, and cancel WFS fulfillment orders SELLER_APIFULFILLMENTWRITE = 'seller-api:fulfillment:write'.freeze, # Read merchant-fulfilled shipment rates and labels SELLER_APIMERCHANT_FULFILLMENTREAD = 'seller-api:merchant-fulfillment:read'.freeze, # Create merchant-fulfilled shipment labels SELLER_APIMERCHANT_FULFILLMENTWRITE = 'seller-api:merchant-fulfillment:write'.freeze, # Read inventory levels and supply detail SELLER_APIINVENTORYREAD = 'seller-api:inventory:read'.freeze, # Update inventory quantities and fulfillment center feeds SELLER_APIINVENTORYWRITE = 'seller-api:inventory:write'.freeze, # Read product pricing and competitive price data SELLER_APIPRICINGREAD = 'seller-api:pricing:read'.freeze, # Update product pricing rules SELLER_APIPRICINGWRITE = 'seller-api:pricing:write'.freeze, # Read feed processing status and feed document metadata SELLER_APIFEEDSREAD = 'seller-api:feeds:read'.freeze, # Submit bulk feeds for catalog, inventory, and pricing updates SELLER_APIFEEDSWRITE = 'seller-api:feeds:write'.freeze, # Create upload destinations (pre-signed URLs) for feed documents SELLER_APIUPLOADSWRITE = 'seller-api:uploads:write'.freeze, # Request and download seller performance and analytics reports SELLER_APIREPORTSREAD = 'seller-api:reports:read'.freeze, # Submit and retrieve Data Kiosk analytics queries and documents SELLER_APIANALYTICSREAD = 'seller-api:analytics:read'.freeze, # Read seller account information and marketplace participation SELLER_APISELLERSREAD = 'seller-api:sellers:read'.freeze, # Read financial events, settlements, and transaction history SELLER_APIFINANCESREAD = 'seller-api:finances:read'.freeze, # Read notification subscriptions and delivery status SELLER_APINOTIFICATIONSREAD = 'seller-api:notifications:read'.freeze, # Create, update, and delete notification subscriptions SELLER_APINOTIFICATIONSWRITE = 'seller-api:notifications:write'.freeze, # Issue a refresh token (OIDC-standard; enables long-lived delegated # access) OFFLINE_ACCESS = 'offline_access'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = SELLER_APICATALOGREAD) ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/walmart_ap_is/models/oauth_scope_seller_auth_authorization_code.rb', line 90 def self.from_value(value, default_value = SELLER_APICATALOGREAD) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'seller_apicatalogread' then SELLER_APICATALOGREAD when 'seller_apicatalogwrite' then SELLER_APICATALOGWRITE when 'seller_apilistingsread' then SELLER_APILISTINGSREAD when 'seller_apilistingswrite' then SELLER_APILISTINGSWRITE when 'seller_apiordersread' then SELLER_APIORDERSREAD when 'seller_apiorderswrite' then SELLER_APIORDERSWRITE when 'seller_apifulfillmentread' then SELLER_APIFULFILLMENTREAD when 'seller_apifulfillmentwrite' then SELLER_APIFULFILLMENTWRITE when 'seller_apimerchant_fulfillmentread' then SELLER_APIMERCHANT_FULFILLMENTREAD when 'seller_apimerchant_fulfillmentwrite' then SELLER_APIMERCHANT_FULFILLMENTWRITE when 'seller_apiinventoryread' then SELLER_APIINVENTORYREAD when 'seller_apiinventorywrite' then SELLER_APIINVENTORYWRITE when 'seller_apipricingread' then SELLER_APIPRICINGREAD when 'seller_apipricingwrite' then SELLER_APIPRICINGWRITE when 'seller_apifeedsread' then SELLER_APIFEEDSREAD when 'seller_apifeedswrite' then SELLER_APIFEEDSWRITE when 'seller_apiuploadswrite' then SELLER_APIUPLOADSWRITE when 'seller_apireportsread' then SELLER_APIREPORTSREAD when 'seller_apianalyticsread' then SELLER_APIANALYTICSREAD when 'seller_apisellersread' then SELLER_APISELLERSREAD when 'seller_apifinancesread' then SELLER_APIFINANCESREAD when 'seller_apinotificationsread' then SELLER_APINOTIFICATIONSREAD when 'seller_apinotificationswrite' then SELLER_APINOTIFICATIONSWRITE when 'offline_access' then OFFLINE_ACCESS else default_value end end |
.validate(value) ⇒ Object
84 85 86 87 88 |
# File 'lib/walmart_ap_is/models/oauth_scope_seller_auth_authorization_code.rb', line 84 def self.validate(value) return false if value.nil? OAUTH_SCOPE_SELLER_AUTH_AUTHORIZATION_CODE.include?(value) end |