Sha256: 7fff03e35bb40cdfa5d5676066d26e16e9ce5782298a0e49f9464860558a24e3
Contents?: true
Size: 1.15 KB
Versions: 14
Compression:
Stored size: 1.15 KB
Contents
require_relative 'resource' require_relative 'resource/environment_aware' module Contentful module Management # Resource class for Locale. class Locale include Contentful::Management::Resource include Contentful::Management::Resource::SystemProperties include Contentful::Management::Resource::Refresher include Contentful::Management::Resource::EnvironmentAware property :code, :string property :name, :string property :publish, :boolean property :default, :boolean property :optional, :boolean property :fallbackCode, :string property :contentDeliveryApi, :boolean property :contentManagementApi, :boolean # @private def self.create_attributes(_client, attributes) { 'name' => attributes.fetch(:name), 'code' => attributes.fetch(:code), 'optional' => attributes.fetch(:optional, false), 'fallbackCode' => attributes.fetch(:fallback_code, nil) } end protected def query_attributes(attributes) attributes.each_with_object({}) { |(k, v), result| result[k.to_sym] = v } end end end end
Version data entries
14 entries across 14 versions & 1 rubygems