Class: Spaceship::Tunes::B2bOrganization
- Defined in:
- spaceship/lib/spaceship/tunes/b2b_organization.rb
Defined Under Namespace
Classes: TYPE
Instance Attribute Summary collapse
-
#dep_customer_id ⇒ String
Customer id.
-
#dep_organization_id ⇒ String
Organization id.
-
#name ⇒ String
Organization name.
-
#type ⇒ String
Add or remove.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
- #state ⇒ Object
Methods inherited from TunesBase
Methods inherited from Base
attr_accessor, attr_mapping, attributes, #attributes, factory, #initialize, #inspect, mapping_module, method_missing, set_client, #setup, #to_s
Constructor Details
This class inherits a constructor from Spaceship::Base
Instance Attribute Details
#dep_customer_id ⇒ String
Returns customer id.
9 10 11 |
# File 'spaceship/lib/spaceship/tunes/b2b_organization.rb', line 9 def dep_customer_id @dep_customer_id end |
#dep_organization_id ⇒ String
Returns organization id.
12 13 14 |
# File 'spaceship/lib/spaceship/tunes/b2b_organization.rb', line 12 def dep_organization_id @dep_organization_id end |
#name ⇒ String
Returns organization name.
15 16 17 |
# File 'spaceship/lib/spaceship/tunes/b2b_organization.rb', line 15 def name @name end |
#type ⇒ String
Returns add or remove.
6 7 8 |
# File 'spaceship/lib/spaceship/tunes/b2b_organization.rb', line 6 def type @type end |
Class Method Details
.from_id_info(dep_id: nil, dep_org_id: nil, dep_name: nil, type: TYPE::NO_CHANGE) ⇒ Object
31 32 33 |
# File 'spaceship/lib/spaceship/tunes/b2b_organization.rb', line 31 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 |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
35 36 37 |
# File 'spaceship/lib/spaceship/tunes/b2b_organization.rb', line 35 def ==(other) other.class == self.class && other.state == self.state end |
#hash ⇒ Object
45 46 47 |
# File 'spaceship/lib/spaceship/tunes/b2b_organization.rb', line 45 def hash state.hash end |
#state ⇒ Object
39 40 41 |
# File 'spaceship/lib/spaceship/tunes/b2b_organization.rb', line 39 def state return [type, dep_customer_id, name] end |