class Pushing::Adapters::FcmGemAdapter::FcmResponse

Attributes

body[R]
code[R]
headers[R]
raw_response[R]
status_code[R]

Public Class Methods

new(body: , headers: , status_code: , raw_response: ) click to toggle source
# File lib/pushing/adapters/fcm/fcm_gem_adapter.rb, line 40
def initialize(body: , headers: , status_code: , raw_response: )
  @body, @headers, @status_code, @raw_response = body, headers, status_code, raw_response
end

Public Instance Methods

json() click to toggle source
# File lib/pushing/adapters/fcm/fcm_gem_adapter.rb, line 44
def json
  @json ||= JSON.parse(body, symbolize_names: true) if body.is_a?(String)
end