Class: Spaceship::Tunes::B2bUser
- Defined in:
- spaceship/lib/spaceship/tunes/b2b_user.rb
Instance Attribute Summary collapse
-
#add ⇒ Bool
Add the user to b2b list.
-
#delete ⇒ Bool
Delete the user to b2b list.
-
#ds_username ⇒ String
B2b username.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#==(other) ⇒ Object
equality check for the two objects.
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
#add ⇒ Bool
Returns add the user to b2b list.
6 7 8 |
# File 'spaceship/lib/spaceship/tunes/b2b_user.rb', line 6 def add @add end |
#delete ⇒ Bool
Returns delete the user to b2b list.
9 10 11 |
# File 'spaceship/lib/spaceship/tunes/b2b_user.rb', line 9 def delete @delete end |
#ds_username ⇒ String
Returns b2b username.
12 13 14 |
# File 'spaceship/lib/spaceship/tunes/b2b_user.rb', line 12 def ds_username @ds_username end |
Class Method Details
.from_username(username, is_add_type: true) ⇒ Object
20 21 22 |
# File 'spaceship/lib/spaceship/tunes/b2b_user.rb', line 20 def self.from_username(username, is_add_type: true) self.new({ 'value' => { 'add' => is_add_type, 'delete' => !is_add_type, 'dsUsername' => username } }) end |
Instance Method Details
#==(other) ⇒ Object
equality check for the two objects
25 26 27 |
# File 'spaceship/lib/spaceship/tunes/b2b_user.rb', line 25 def ==(other) add == other.add && delete == other.delete && ds_username == other.ds_username end |