Class: Iterable::Device
- Inherits:
-
ApiResource
- Object
- ApiResource
- Iterable::Device
- Defined in:
- lib/iterable/device.rb
Overview
Interact with user device API endpoints
Constant Summary collapse
- PLATFORMS =
[ APNS = 'APNS'.freeze, APNS_SANDBOX = 'APNS_SANDBOX'.freeze, GCM = 'GCM'.freeze ].freeze
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#data_fields ⇒ Object
readonly
Returns the value of attribute data_fields.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Attributes inherited from ApiResource
Instance Method Summary collapse
-
#initialize(token, app, platform, data_fields = {}, conf = nil) ⇒ Device
constructor
A new instance of Device.
- #register(email, user_id = nil) ⇒ Object
Methods inherited from ApiResource
default_config, #default_config
Constructor Details
#initialize(token, app, platform, data_fields = {}, conf = nil) ⇒ Device
Returns a new instance of Device.
45 46 47 48 49 50 51 |
# File 'lib/iterable/device.rb', line 45 def initialize(token, app, platform, data_fields = {}, conf = nil) @token = token @app = app @platform = platform @data_fields = data_fields super conf end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
23 24 25 |
# File 'lib/iterable/device.rb', line 23 def app @app end |
#data_fields ⇒ Object (readonly)
Returns the value of attribute data_fields.
23 24 25 |
# File 'lib/iterable/device.rb', line 23 def data_fields @data_fields end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
23 24 25 |
# File 'lib/iterable/device.rb', line 23 def platform @platform end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
23 24 25 |
# File 'lib/iterable/device.rb', line 23 def token @token end |