Class: MarketingCloudSDK::Response
- Inherits:
-
Object
- Object
- MarketingCloudSDK::Response
- Defined in:
- lib/marketingcloudsdk/client.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
not doing accessor so user, can’t update these values from response.
-
#code ⇒ Object
readonly
not doing accessor so user, can’t update these values from response.
-
#message ⇒ Object
readonly
not doing accessor so user, can’t update these values from response.
-
#raw ⇒ Object
readonly
not doing accessor so user, can’t update these values from response.
-
#request_id ⇒ Object
readonly
not doing accessor so user, can’t update these values from response.
-
#results ⇒ Object
readonly
not doing accessor so user, can’t update these values from response.
Instance Method Summary collapse
- #continue ⇒ Object
-
#initialize(raw, client) ⇒ Response
constructor
A new instance of Response.
- #more ⇒ Object (also: #more?)
-
#success ⇒ Object
(also: #success?, #status)
some defaults.
Constructor Details
#initialize(raw, client) ⇒ Response
Returns a new instance of Response.
58 59 60 61 62 63 64 65 66 |
# File 'lib/marketingcloudsdk/client.rb', line 58 def initialize raw, client @client = client # keep connection with client in case we request more @results = [] @raw = raw unpack raw rescue => ex # all else fails return raw puts ex. raw end |
Instance Attribute Details
#body ⇒ Object (readonly)
not doing accessor so user, can’t update these values from response. You will see in the code some of these items are being updated via back doors and such.
44 45 46 |
# File 'lib/marketingcloudsdk/client.rb', line 44 def body @body end |
#code ⇒ Object (readonly)
not doing accessor so user, can’t update these values from response. You will see in the code some of these items are being updated via back doors and such.
44 45 46 |
# File 'lib/marketingcloudsdk/client.rb', line 44 def code @code end |
#message ⇒ Object (readonly)
not doing accessor so user, can’t update these values from response. You will see in the code some of these items are being updated via back doors and such.
44 45 46 |
# File 'lib/marketingcloudsdk/client.rb', line 44 def @message end |
#raw ⇒ Object (readonly)
not doing accessor so user, can’t update these values from response. You will see in the code some of these items are being updated via back doors and such.
44 45 46 |
# File 'lib/marketingcloudsdk/client.rb', line 44 def raw @raw end |
#request_id ⇒ Object (readonly)
not doing accessor so user, can’t update these values from response. You will see in the code some of these items are being updated via back doors and such.
44 45 46 |
# File 'lib/marketingcloudsdk/client.rb', line 44 def request_id @request_id end |
#results ⇒ Object (readonly)
not doing accessor so user, can’t update these values from response. You will see in the code some of these items are being updated via back doors and such.
44 45 46 |
# File 'lib/marketingcloudsdk/client.rb', line 44 def results @results end |
Instance Method Details
#continue ⇒ Object
68 69 70 |
# File 'lib/marketingcloudsdk/client.rb', line 68 def continue raise NotImplementedError end |
#more ⇒ Object Also known as: more?
53 54 55 |
# File 'lib/marketingcloudsdk/client.rb', line 53 def more @more ||= false end |
#success ⇒ Object Also known as: success?, status
some defaults
47 48 49 |
# File 'lib/marketingcloudsdk/client.rb', line 47 def success @success ||= false end |