Sha256: 31099d7126bdd11bd53207dc221422ad308dd1e79a3b95a341b5f0b4a26a4e06

Contents?: true

Size: 564 Bytes

Versions: 9

Compression:

Stored size: 564 Bytes

Contents

class Gillbus
  class Tariff
    class ReturnCause
      extend Fields
      include UpdateAttrs

      field :lossless, :bool

      field :cause, :string

      # rubocop:disable Lint/UnusedMethodArgument
      def self.parse(doc, instance: nil, parent: nil, options: {})
        instance = super
        if doc.is_a? Hash
          instance.cause = doc['__content__']
          instance.lossless = doc['lossless'] == 'true'
        else
          instance.cause = doc
          instance.lossless = false
        end
        instance
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gillbus-0.17.6 lib/gillbus/structs/tariff/return_cause.rb
gillbus-0.17.5 lib/gillbus/structs/tariff/return_cause.rb
gillbus-0.17.4 lib/gillbus/structs/tariff/return_cause.rb
gillbus-0.17.3 lib/gillbus/structs/tariff/return_cause.rb
gillbus-0.17.2 lib/gillbus/structs/tariff/return_cause.rb
gillbus-0.17.1 lib/gillbus/structs/tariff/return_cause.rb
gillbus-0.16.10 lib/gillbus/structs/tariff/return_cause.rb
gillbus-0.16.9 lib/gillbus/structs/tariff/return_cause.rb
gillbus-0.16.8 lib/gillbus/structs/tariff/return_cause.rb