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.
8 9 10 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 8 def background_url @background_url end |
#color_background ⇒ Object
Returns the value of attribute color_background.
8 9 10 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 8 def color_background @color_background end |
#color_link ⇒ Object
Returns the value of attribute color_link.
8 9 10 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 8 def color_link @color_link end |
#color_text ⇒ Object
Returns the value of attribute color_text.
8 9 10 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 8 def color_text @color_text end |
#footer_html ⇒ Object
Returns the value of attribute footer_html.
8 9 10 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 8 def @footer_html end |
#header_html ⇒ Object
Returns the value of attribute header_html.
8 9 10 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 8 def header_html @header_html end |
#logo_url ⇒ Object
Returns the value of attribute logo_url.
8 9 10 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 8 def logo_url @logo_url end |
#rename ⇒ Object
Returns the value of attribute rename.
8 9 10 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 8 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.
12 13 14 15 16 17 18 19 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 12 def add_rename(field, name) rename = "#{field},#{name}" unless @rename.nil? @rename = @rename.to_a << rename else @rename = [rename] end end |
#to_hash ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/authorize_net/sim/hosted_payment_form.rb', line 21 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 |