Class: AuthorizeNet::SIM::HostedPaymentForm
- Inherits:
-
Object
- Object
- AuthorizeNet::SIM::HostedPaymentForm
- Includes:
- Model
- Defined in:
- lib/authorize_net/sim/hosted_payment_form.rb
Overview
Models a hosted payment form.
Instance Attribute Summary collapse
-
#background_url ⇒ Object
Returns the value of attribute background_url.
-
#color_background ⇒ Object
Returns the value of attribute color_background.
-
#color_link ⇒ Object
Returns the value of attribute color_link.
-
#color_text ⇒ Object
Returns the value of attribute color_text.
-
#footer_html ⇒ Object
Returns the value of attribute footer_html.
-
#header_html ⇒ Object
Returns the value of attribute header_html.
-
#logo_url ⇒ Object
Returns the value of attribute logo_url.
-
#rename ⇒ Object
Returns the value of attribute rename.
Instance Method Summary collapse
-
#add_rename(field, name) ⇒ Object
Convenience method for adding field rename requests to the transaction.
- #to_hash ⇒ Object
Methods included from Model
Instance Attribute Details
#background_url ⇒ Object
Returns the value of attribute background_url.
6 7 8 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 6 def background_url @background_url end |
#color_background ⇒ Object
Returns the value of attribute color_background.
6 7 8 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 6 def color_background @color_background end |
#color_link ⇒ Object
Returns the value of attribute color_link.
6 7 8 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 6 def color_link @color_link end |
#color_text ⇒ Object
Returns the value of attribute color_text.
6 7 8 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 6 def color_text @color_text end |
#footer_html ⇒ Object
Returns the value of attribute footer_html.
6 7 8 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 6 def @footer_html end |
#header_html ⇒ Object
Returns the value of attribute header_html.
6 7 8 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 6 def header_html @header_html end |
#logo_url ⇒ Object
Returns the value of attribute logo_url.
6 7 8 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 6 def logo_url @logo_url end |
#rename ⇒ Object
Returns the value of attribute rename.
6 7 8 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 6 def rename @rename end |
Instance Method Details
#add_rename(field, name) ⇒ Object
Convenience method for adding field rename requests to the transaction. This renames a field shown on the hosted payment form.
10 11 12 13 14 15 16 17 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 10 def add_rename(field, name) rename = "#{field},#{name}" if @rename.nil? @rename = [rename] else @rename = @rename.to_a << rename end end |
#to_hash ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 19 def to_hash hash = { header_html_payment_form: @header_html, footer_html_payment_form: @footer_html, color_background: @color_background, color_link: @color_link, color_text: @color_text, logo_url: @logo_url, background_url: @background_url, rename: @rename } hash.delete_if { |_k, v| v.nil? } hash end |