Class: NewStoreApi::OAuthScopeEnum
- Inherits:
-
Object
- Object
- NewStoreApi::OAuthScopeEnum
- Defined in:
- lib/new_store_api/models/o_auth_scope_enum.rb
Overview
OAuth 2 scopes supported by the API
Constant Summary collapse
- O_AUTH_SCOPE_ENUM =
[ # Grants privileges to read import schema CATALOGIMPORT_SCHEMASREAD = 'catalog:import-schemas:read'.freeze, # Grants privileges to write import schema CATALOGIMPORT_SCHEMASWRITE = 'catalog:import-schemas:write'.freeze, # Grants privileges to export pricebook data CATALOGPRICEBOOK_EXPORTREAD = 'catalog:pricebook-export:read'.freeze, # Grants privileges to export product data CATALOGPRODUCT_EXPORTREAD = 'catalog:product-export:read'.freeze, # Grants privileges to read cart data CHECKOUTCARTSREAD = 'checkout:carts:read'.freeze, # Grants privileges to write cart data CHECKOUTCARTSWRITE = 'checkout:carts:write'.freeze, # Processing RTBF notifications RTBFNOTIFICATIONSWRITE = 'rtbf:notifications:write'.freeze, # Grants privileges to read clienteling profiles CLIENTELINGPROFILEREAD = 'clienteling:profile:read'.freeze, # Grants privileges to read API customer data CUSTOMERPROFILEREAD = 'customer:profile:read'.freeze, # Grants privileges to modify API customer data CUSTOMERPROFILEWRITE = 'customer:profile:write'.freeze, # Grants privileges to read API segmentation tags CUSTOMERSEGMENTATIONREAD = 'customer:segmentation:read'.freeze, # Grants privileges to modify API segmentation tags CUSTOMERSEGMENTATIONWRITE = 'customer:segmentation:write'.freeze, # Grants privileges to read configuration NEWSTORECONFIGURATIONREAD = 'newstore:configuration:read'.freeze, # Grants privileges to write configuration NEWSTORECONFIGURATIONWRITE = 'newstore:configuration:write'.freeze, # Read access on Datasets DATA_EXPORTSDATASETSREAD = 'data-exports:datasets:read'.freeze, # Read access on Jobs DATA_EXPORTSJOBSREAD = 'data-exports:jobs:read'.freeze, # Write access on Jobs DATA_EXPORTSJOBSWRITE = 'data-exports:jobs:write'.freeze, # Retry (re-publish) events from the event store WRITEEVENTS = 'write:events'.freeze, # View orders with fiscal transactions and signatures FISCALIZATIONORDERSREAD = 'fiscalization:orders:read'.freeze, # Create orders with fiscal transactions and signatures FISCALIZATIONORDERSWRITE = 'fiscalization:orders:write'.freeze, # Allows access to retrieve fulfillment requests FULFILLMENTREQUESTSREAD = 'fulfillment:requests:read'.freeze, # Allows access to update fulfillment requests FULFILLMENTREQUESTSWRITE = 'fulfillment:requests:write'.freeze, # Read Shipping Options and Audits SHIPMENTSREAD = 'shipments:read'.freeze, # Create, Buy Shipping Options SHIPMENTSWRITE = 'shipments:write'.freeze, # Grants privileges to read API client data IAMCLIENTSREAD = 'iam:clients:read'.freeze, # Grants privileges to modify API client data IAMCLIENTSWRITE = 'iam:clients:write'.freeze, # Grants read privileges to provider resources IAMPROVIDERSREAD = 'iam:providers:read'.freeze, # Grants write privileges to provider resources IAMPROVIDERSWRITE = 'iam:providers:write'.freeze, # Grants privileges to read roles data IAMROLESREAD = 'iam:roles:read'.freeze, # Grants privileges to write roles data IAMROLESWRITE = 'iam:roles:write'.freeze, # Grants privileges to read support users data IAMSUPPORT_USERSREAD = 'iam:support-users:read'.freeze, # Grants privileges to write support users data IAMSUPPORT_USERSWRITE = 'iam:support-users:write'.freeze, # Grants privileges to read user data IAMUSERSREAD = 'iam:users:read'.freeze, # Grants privileges to write user data IAMUSERSWRITE = 'iam:users:write'.freeze, # Grants privileges to read <resource> data INSIGHTSSALES_GOALS_MANAGEMENTREAD = 'insights:sales-goals-management:read'.freeze, # Grants privileges to write <resource> data INSIGHTSSALES_GOALS_MANAGEMENTWRITE = 'insights:sales-goals-management:write'.freeze, # Grants privileges to read <resource> data INSIGHTSSTORE_REPORTING_CONFIGREAD = 'insights:store-reporting-config:read'.freeze, # Grants privileges to write <resource> data INSIGHTSSTORE_REPORTING_CONFIGWRITE = 'insights:store-reporting-config:write'.freeze, # TODO: Write general description for NOSCOPES NOSCOPES = 'NoScopes'.freeze, # Allows access to retrieve reservations INVENTORYRESERVATIONSREAD = 'inventory:reservations:read'.freeze, # Allows access to create and update reservations INVENTORYRESERVATIONSWRITE = 'inventory:reservations:write'.freeze, # Grants privileges to create notifications ORDER_MANAGEMENTNOTIFICATIONSWRITE = 'order-management:notifications:write'.freeze, # Grants privileges to capture orders ORDER_MANAGEMENTORDERSWRITE = 'order-management:orders:write'.freeze, # Grants privileges to place orders. ORDERSWRITE = 'orders:write'.freeze, # Grants privileges to read Adyen notifications data PAYMENTADYEN_NOTIFICATIONSREAD = 'payment:adyen-notifications:read'.freeze, # Grants privileges to charge payment accounts PAYMENTPAYMENT_ACCOUNT_CHARGESWRITE = 'payment:payment-account-charges:write'.freeze, # Grants privileges to calculate cart discount PROMOTIONSCART_DISCOUNTSWRITE = 'promotions:cart-discounts:write'.freeze, # Grants privileges to read configuration PROMOTIONSCONFIGREAD = 'promotions:config:read'.freeze, # Grants privileges to write into configuration PROMOTIONSCONFIGWRITE = 'promotions:config:write'.freeze, # Grants privileges to list reason codes PROMOTIONSREASON_CODESREAD = 'promotions:reason-codes:read'.freeze, # Grants privileges to create and update reason codes PROMOTIONSREASON_CODESWRITE = 'promotions:reason-codes:write'.freeze, # Complete address ADDRESS_COMPLETIONCOMPLETIONREAD = 'address-completion:completion:read'.freeze, # Read experiments ASSOCIATE_APP_EXPERIMENTSEXPERIMENTSREAD = 'associate-app-experiments:experiments:read'.freeze, # Create experiments ASSOCIATE_APP_EXPERIMENTSEXPERIMENTSWRITE = 'associate-app-experiments:experiments:write'.freeze, # Create notification DEVICE_NOTIFICATIONSNOTIFICATIONSWRITE = 'device-notifications:notifications:write'.freeze, # Create registration DEVICE_REGISTRATIONSREGISTRATIONSWRITE = 'device-registrations:registrations:write'.freeze, # Read subscription DEVICE_SUBSCRIPTIONSSUBSCRIPTIONSREAD = 'device-subscriptions:subscriptions:read'.freeze, # Create subscription DEVICE_SUBSCRIPTIONSSUBSCRIPTIONSWRITE = 'device-subscriptions:subscriptions:write'.freeze, # Read tenant configuration settings. PLATFORMSETTINGSREAD = 'platform:settings:read'.freeze, # Write tenant configuration settings. PLATFORMSETTINGSWRITE = 'platform:settings:write'.freeze, # Grants read access to the tenant's audit events. AUDIT_EVENTSREAD = 'audit-events:read'.freeze, # Read tax exemption classes TAXESEXEMPTION_CLASSESREAD = 'taxes:exemption-classes:read'.freeze, # Preview tax transactions TAXESPREVIEW_TRANSACTIONSWRITE = 'taxes:preview-transactions:write'.freeze, # Read tax transactions TAXESTRANSACTIONSREAD = 'taxes:transactions:read'.freeze, # Write tax transactions TAXESTRANSACTIONSWRITE = 'taxes:transactions:write'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = CATALOGIMPORT_SCHEMASREAD) ⇒ Object
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/new_store_api/models/o_auth_scope_enum.rb', line 212 def self.from_value(value, default_value = CATALOGIMPORT_SCHEMASREAD) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'catalogimport_schemasread' then CATALOGIMPORT_SCHEMASREAD when 'catalogimport_schemaswrite' then CATALOGIMPORT_SCHEMASWRITE when 'catalogpricebook_exportread' then CATALOGPRICEBOOK_EXPORTREAD when 'catalogproduct_exportread' then CATALOGPRODUCT_EXPORTREAD when 'checkoutcartsread' then CHECKOUTCARTSREAD when 'checkoutcartswrite' then CHECKOUTCARTSWRITE when 'rtbfnotificationswrite' then RTBFNOTIFICATIONSWRITE when 'clientelingprofileread' then CLIENTELINGPROFILEREAD when 'customerprofileread' then CUSTOMERPROFILEREAD when 'customerprofilewrite' then CUSTOMERPROFILEWRITE when 'customersegmentationread' then CUSTOMERSEGMENTATIONREAD when 'customersegmentationwrite' then CUSTOMERSEGMENTATIONWRITE when 'newstoreconfigurationread' then NEWSTORECONFIGURATIONREAD when 'newstoreconfigurationwrite' then NEWSTORECONFIGURATIONWRITE when 'data_exportsdatasetsread' then DATA_EXPORTSDATASETSREAD when 'data_exportsjobsread' then DATA_EXPORTSJOBSREAD when 'data_exportsjobswrite' then DATA_EXPORTSJOBSWRITE when 'writeevents' then WRITEEVENTS when 'fiscalizationordersread' then FISCALIZATIONORDERSREAD when 'fiscalizationorderswrite' then FISCALIZATIONORDERSWRITE when 'fulfillmentrequestsread' then FULFILLMENTREQUESTSREAD when 'fulfillmentrequestswrite' then FULFILLMENTREQUESTSWRITE when 'shipmentsread' then SHIPMENTSREAD when 'shipmentswrite' then SHIPMENTSWRITE when 'iamclientsread' then IAMCLIENTSREAD when 'iamclientswrite' then IAMCLIENTSWRITE when 'iamprovidersread' then IAMPROVIDERSREAD when 'iamproviderswrite' then IAMPROVIDERSWRITE when 'iamrolesread' then IAMROLESREAD when 'iamroleswrite' then IAMROLESWRITE when 'iamsupport_usersread' then IAMSUPPORT_USERSREAD when 'iamsupport_userswrite' then IAMSUPPORT_USERSWRITE when 'iamusersread' then IAMUSERSREAD when 'iamuserswrite' then IAMUSERSWRITE when 'insightssales_goals_managementread' then INSIGHTSSALES_GOALS_MANAGEMENTREAD when 'insightssales_goals_managementwrite' then INSIGHTSSALES_GOALS_MANAGEMENTWRITE when 'insightsstore_reporting_configread' then INSIGHTSSTORE_REPORTING_CONFIGREAD when 'insightsstore_reporting_configwrite' then INSIGHTSSTORE_REPORTING_CONFIGWRITE when 'noscopes' then NOSCOPES when 'inventoryreservationsread' then INVENTORYRESERVATIONSREAD when 'inventoryreservationswrite' then INVENTORYRESERVATIONSWRITE when 'order_managementnotificationswrite' then ORDER_MANAGEMENTNOTIFICATIONSWRITE when 'order_managementorderswrite' then ORDER_MANAGEMENTORDERSWRITE when 'orderswrite' then ORDERSWRITE when 'paymentadyen_notificationsread' then PAYMENTADYEN_NOTIFICATIONSREAD when 'paymentpayment_account_chargeswrite' then PAYMENTPAYMENT_ACCOUNT_CHARGESWRITE when 'promotionscart_discountswrite' then PROMOTIONSCART_DISCOUNTSWRITE when 'promotionsconfigread' then PROMOTIONSCONFIGREAD when 'promotionsconfigwrite' then PROMOTIONSCONFIGWRITE when 'promotionsreason_codesread' then PROMOTIONSREASON_CODESREAD when 'promotionsreason_codeswrite' then PROMOTIONSREASON_CODESWRITE when 'address_completioncompletionread' then ADDRESS_COMPLETIONCOMPLETIONREAD when 'associate_app_experimentsexperimentsread' then ASSOCIATE_APP_EXPERIMENTSEXPERIMENTSREAD when 'associate_app_experimentsexperimentswrite' then ASSOCIATE_APP_EXPERIMENTSEXPERIMENTSWRITE when 'device_notificationsnotificationswrite' then DEVICE_NOTIFICATIONSNOTIFICATIONSWRITE when 'device_registrationsregistrationswrite' then DEVICE_REGISTRATIONSREGISTRATIONSWRITE when 'device_subscriptionssubscriptionsread' then DEVICE_SUBSCRIPTIONSSUBSCRIPTIONSREAD when 'device_subscriptionssubscriptionswrite' then DEVICE_SUBSCRIPTIONSSUBSCRIPTIONSWRITE when 'platformsettingsread' then PLATFORMSETTINGSREAD when 'platformsettingswrite' then PLATFORMSETTINGSWRITE when 'audit_eventsread' then AUDIT_EVENTSREAD when 'taxesexemption_classesread' then TAXESEXEMPTION_CLASSESREAD when 'taxespreview_transactionswrite' then TAXESPREVIEW_TRANSACTIONSWRITE when 'taxestransactionsread' then TAXESTRANSACTIONSREAD when 'taxestransactionswrite' then TAXESTRANSACTIONSWRITE else default_value end end |
.validate(value) ⇒ Object
206 207 208 209 210 |
# File 'lib/new_store_api/models/o_auth_scope_enum.rb', line 206 def self.validate(value) return false if value.nil? O_AUTH_SCOPE_ENUM.include?(value) end |