Sha256: f4b6c5b4aaeae2223a20add38fae7654ec877e5f1c34b9dadc6679793f6dc4a5

Contents?: true

Size: 943 Bytes

Versions: 17

Compression:

Stored size: 943 Bytes

Contents

# frozen_string_literal: true
require_relative "../country"
require_relative "../region"

# declare country to avoid circular dependency
# rubocop:disable Style/ClassAndModuleChildren
class ONEAccess::DataObject::Country; end
class ONEAccess::DataObject::Representer::Country < Representable::Decorator; end
# rubocop:enable Style/ClassAndModuleChildren

module ONEAccess
  module DataObject
    module Representer
      class GlobalRegion < Representable::Decorator
        include Representable::JSON

        property :id, as: :Id, type: Integer
        property :name, as: :Name, type: String
        property :code, as: :Code, type: String
        property :description, as: :Description, type: String
        collection :countries, as: :Countries, decorator: Representer::Country, class: DataObject::Country
        collection :regions, as: :Regions, decorator: Representer::Region, class: DataObject::Region
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
oneaccess-0.4.4 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.4.3 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.4.2 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.4.1 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.4.0 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.3.0 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.2.0 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.1.9 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.1.8 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.1.7 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.1.6 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.1.5 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.1.4 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.1.3 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.1.2 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.1.1 lib/oneaccess/data_object/representer/global_region.rb
oneaccess-0.1.0 lib/oneaccess/data_object/representer/global_region.rb