Class: AbacatePay::Resources::Transparents
- Defined in:
- lib/abacate_pay/resources/transparents.rb
Overview
Represents a transparent checkout (PIX or boleto) in the AbacatePay system.
Constant Summary collapse
- RESOURCE_PROPERTIES =
{ customer: "AbacatePay::Resources::Customers" }.freeze
- DATETIME_PROPERTIES =
%w[created_at updated_at expires_at].freeze
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#bar_code ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#br_code ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#br_code_base64 ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#created_at ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#customer ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#description ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#dev_mode ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#due_date ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#expires_at ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#expires_in ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#id ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#metadata ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#method ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#platform_fee ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#qr_code ⇒ String?
readonly
The API returns the copy-and-paste payload as
brCodeand the image asbrCodeBase64. -
#qr_code_image ⇒ String?
readonly
PIX QR code image as a data URI.
-
#receipt_url ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#status ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#updated_at ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
-
#url ⇒ Object
readonly
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
Instance Method Summary collapse
- #dev_mode? ⇒ Boolean
-
#initialize(data) ⇒ Transparents
constructor
A new instance of Transparents.
Constructor Details
#initialize(data) ⇒ Transparents
Returns a new instance of Transparents.
24 25 26 |
# File 'lib/abacate_pay/resources/transparents.rb', line 24 def initialize(data) fill(data) end |
Instance Attribute Details
#amount ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def amount @amount end |
#bar_code ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def @bar_code end |
#br_code ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def br_code @br_code end |
#br_code_base64 ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def br_code_base64 @br_code_base64 end |
#created_at ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def created_at @created_at end |
#customer ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def customer @customer end |
#description ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def description @description end |
#dev_mode ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def dev_mode @dev_mode end |
#due_date ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def due_date @due_date end |
#expires_at ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def expires_at @expires_at end |
#expires_in ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def expires_in @expires_in end |
#id ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def id @id end |
#metadata ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def @metadata end |
#method ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def method @method end |
#platform_fee ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def platform_fee @platform_fee end |
#qr_code ⇒ String?
The API returns the copy-and-paste payload as brCode and the image as
brCodeBase64. Older documentation used qrCode/qrCodeImage, so both
spellings are accepted: the reader prefers the qr* value when the API
sends one and falls back to br*.
34 35 36 |
# File 'lib/abacate_pay/resources/transparents.rb', line 34 def qr_code @qr_code || br_code end |
#qr_code_image ⇒ String?
Returns PIX QR code image as a data URI.
39 40 41 |
# File 'lib/abacate_pay/resources/transparents.rb', line 39 def qr_code_image @qr_code_image || br_code_base64 end |
#receipt_url ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def receipt_url @receipt_url end |
#status ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def status @status end |
#updated_at ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def updated_at @updated_at end |
#url ⇒ Object
qr_code and qr_code_image are defined below rather than generated here: they fall back to the br_code fields the API actually sends.
15 16 17 |
# File 'lib/abacate_pay/resources/transparents.rb', line 15 def url @url end |
Instance Method Details
#dev_mode? ⇒ Boolean
43 44 45 |
# File 'lib/abacate_pay/resources/transparents.rb', line 43 def dev_mode? @dev_mode end |