Sha256: 26753a3b6816470bedbfe14511092c9e13bd773e586d8183b0c93747e0468b25

Contents?: true

Size: 1.56 KB

Versions: 77

Compression:

Stored size: 1.56 KB

Contents

# encoding: UTF-8
#
# Copyright (c) 2010-2017 GoodData Corporation. All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

module GoodData
  class ReportAttachment
    include GoodData::Mixin::RootKeyGetter
    include GoodData::Mixin::DataGetter

    attr_reader :scheduled_email
    attr_accessor :json

    DEFAULT_OPTS = {
      :formats => %w(pdf xls),
      :exportOptions => {
        :pageOrientation => 'landscape'
      }
    }

    def initialize(scheduled_email, json)
      @scheduled_email = scheduled_email
      @json = json
    end

    # Get export options settings
    #
    # @return [Hash] Export options settings
    def export_options
      data['exportOptions']
    end

    # Set export options settings
    #
    # @param [Hash] new_export_options New export options settings to be set
    # @return [Hash] New export options settings
    def export_options=(new_export_options)
      data['exportOptions'] = new_export_options
    end

    # Get formats
    #
    # @return [Array<String>] List of selected formats
    def formats
      data['formats']
    end

    # Set formats
    #
    # @param [String | Array<String>] new_formats New list of selected formats to be set
    # @return [Array<String>] New list of selected formats
    def formats=(new_formats)
      data['formats'] = new_formats.is_a?(Array) ? new_formats : [new_formats]
    end

    # Get attachment URI
    #
    # @return [String] Attachment URI
    def uri
      data['uri']
    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
gooddata-2.3.1-java lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.3.1 lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.3.0-java lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.3.0 lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.2.0-java lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.2.0 lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.19-java lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.19 lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.17-java lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.17 lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.15-java lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.15 lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.14-java lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.14 lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.13-java lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.13 lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.12-java lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.12 lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.11-java lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb
gooddata-2.1.11 lib/gooddata/models/metadata/scheduled_mail/report_attachment.rb