class HermesAPI::PrintInStoreQrCode
Public Instance Methods
load(attributes, remove_root = false, persisted = false)
click to toggle source
Calls superclass method
HermesAPI::JsonBase#load
# File lib/hermes_api/resources/print_in_store_qr_code.rb, line 6 def load(attributes, remove_root = false, persisted = false) # remove the outer array before parsing the response body attributes = attributes[0] if attributes.is_a?(Array) && attributes.length == 1 super end
qr_code_image()
click to toggle source
# File lib/hermes_api/resources/print_in_store_qr_code.rb, line 12 def qr_code_image base64_data = as_json.dig("qr_code", "base64_encoded_bytes") Base64.decode64(base64_data) if base64_data end