File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,14 @@ pix = QrcodePixRuby::Payload.new(
4949 repeatable: false
5050)
5151
52+ # If needed, change the attributes value later
53+ pix.pix_key = ' minhaoutrachavepix'
54+ pix.merchant_city = ' BRASILIA'
55+
5256# QRCode copia-e-cola
5357puts pix.payload
5458
55- # QRCode para uso em imagens
59+ # QRCode for images
5660puts pix.base64
5761```
5862
@@ -70,6 +74,10 @@ pix = QrcodePixRuby::Payload.new(
7074 repeatable: false
7175)
7276
77+ # If needed, change the attributes value later
78+ pix.url = ' https://another-example.com'
79+ pix.amount = 1.50
80+
7381# QRCode copia-e-cola
7482puts pix.payload
7583
Original file line number Diff line number Diff line change @@ -71,11 +71,11 @@ def base64
7171 private
7272
7373 def verify_kwargs ( keys )
74- unknows = keys - ATTRIBUTES
74+ unknowns = keys - ATTRIBUTES
7575
76- return unless unknows . any?
76+ return unless unknowns . any?
7777
78- raise QrcodePixRuby ::PayloadArgumentError , "Unknown attributes: #{ unknows . join ( ', ' ) } "
78+ raise QrcodePixRuby ::PayloadArgumentError , "Unknown attributes: #{ unknowns . join ( ', ' ) } "
7979 end
8080
8181 def emv ( id , value )
You can’t perform that action at this time.
0 commit comments