Class: KhipuRails::Config
- Inherits:
-
Struct
- Object
- Struct
- KhipuRails::Config
- Defined in:
- lib/khipu_rails/config.rb
Instance Attribute Summary collapse
-
#button_defaults ⇒ Object
Returns the value of attribute button_defaults.
-
#button_images ⇒ Object
Returns the value of attribute button_images.
-
#receivers ⇒ Object
Returns the value of attribute receivers.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#button_defaults ⇒ Object
Returns the value of attribute button_defaults
2 3 4 |
# File 'lib/khipu_rails/config.rb', line 2 def @button_defaults end |
#button_images ⇒ Object
Returns the value of attribute button_images
2 3 4 |
# File 'lib/khipu_rails/config.rb', line 2 def @button_images end |
#receivers ⇒ Object
Returns the value of attribute receivers
2 3 4 |
# File 'lib/khipu_rails/config.rb', line 2 def receivers @receivers end |
Class Method Details
.default ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/khipu_rails/config.rb', line 4 def self.default config = new config.receivers = [] config. = { "50x25" => "https://s3.amazonaws.com/static.khipu.com/buttons/50x25.png", "100x25" => "https://s3.amazonaws.com/static.khipu.com/buttons/100x25.png", "100x50" => "https://s3.amazonaws.com/static.khipu.com/buttons/100x50.png", "150x25" => "https://s3.amazonaws.com/static.khipu.com/buttons/150x25.png", "150x50" => "https://s3.amazonaws.com/static.khipu.com/buttons/150x50.png", "150x75" => "https://s3.amazonaws.com/static.khipu.com/buttons/150x75.png", "150x75-B" => "https://s3.amazonaws.com/static.khipu.com/buttons/150x75-B.png", "200x50" => "https://s3.amazonaws.com/static.khipu.com/buttons/200x50.png", "200x75" => "https://s3.amazonaws.com/static.khipu.com/buttons/200x75.png" } config. = { subject: '', amount: 1, body: '', return_url: '', cancel_url: '', transaction_id: '', payer_email: '', picture_url: '', custom: '', button_image: '50x25' } config end |
Instance Method Details
#add_receiver(id, key, mode = :prod) ⇒ Object
37 38 39 |
# File 'lib/khipu_rails/config.rb', line 37 def add_receiver id, key, mode = :prod self.receivers << KhipuRails::Receiver.new(id, key, mode) end |