Sha256: 33072fb0705f21020bba48fc5cca60ad25eb686fe5f1a14dab5d91f68f127040

Contents?: true

Size: 1.18 KB

Versions: 183

Compression:

Stored size: 1.18 KB

Contents

require_relative 'tunes_base'
module Spaceship
  module Tunes
    class B2bOrganization < TunesBase
      # @return (String) add or remove
      attr_accessor :type

      # @return (String) customer id
      attr_accessor :dep_customer_id

      # @return (String) organization id
      attr_accessor :dep_organization_id

      # @return (String) organization name
      attr_accessor :name

      # enum for types
      class TYPE
        ADD = "ADD"
        REMOVE = "REMOVE"
        NO_CHANGE = "NO_CHANGE"
      end

      attr_mapping(
        'value.type' => :type,
        'value.depCustomerId' => :dep_customer_id,
        'value.organizationId' => :dep_organization_id,
        'value.name' => :name
      )

      def self.from_id_info(dep_id: nil, dep_org_id: nil, dep_name: nil, type: TYPE::NO_CHANGE)
        self.new({ "value" => { "type" => type, "depCustomerId" => dep_id, "organizationId" => dep_org_id, "name" => dep_name } })
      end

      def ==(other)
        other.class == self.class && other.state == self.state
      end

      def state
        return [type, dep_customer_id, name]
      end

      alias eql? ==

      def hash
        state.hash
      end
    end
  end
end

Version data entries

183 entries across 183 versions & 4 rubygems

Version Path
fastlane-2.132.0.beta.20190919200100 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.132.0.beta.20190918200023 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.132.0.beta.20190917200011 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.132.0.beta.20190916200055 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.132.0.beta.20190915200038 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.132.0.beta.20190914200034 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.132.0.beta.20190913200058 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.132.0.beta.20190912200052 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190911200010 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190910200104 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190909200058 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190908200041 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190907200030 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190906200026 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190905200113 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190904200040 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190903200013 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190902200022 spaceship/lib/spaceship/tunes/b2b_organization.rb
fastlane-2.131.0.beta.20190901200035 spaceship/lib/spaceship/tunes/b2b_organization.rb