Class: ShopifyApiBruv::Clients::HttpResponse
- Inherits:
-
Object
- Object
- ShopifyApiBruv::Clients::HttpResponse
- Defined in:
- lib/shopify_api_bruv/clients/http_response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(code:, headers:, body:) ⇒ HttpResponse
constructor
A new instance of HttpResponse.
Constructor Details
#initialize(code:, headers:, body:) ⇒ HttpResponse
Returns a new instance of HttpResponse.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/shopify_api_bruv/clients/http_response.rb', line 8 def initialize(code:, headers:, body:) @code = code @headers = headers @body = body validate ShopifyApiBruv.logger( method: :info, message: "Shopify API Response (Code: #{code}):\nHeaders:\n#{headers}\n\nBody:\n#{body}" ) end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/shopify_api_bruv/clients/http_response.rb', line 6 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/shopify_api_bruv/clients/http_response.rb', line 6 def code @code end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
6 7 8 |
# File 'lib/shopify_api_bruv/clients/http_response.rb', line 6 def headers @headers end |