class Paymill::Webhook

Attributes

active[RW]
email[R]
event_types[RW]
livemode[R]
url[R]

Protected Class Methods

allowed_arguments() click to toggle source
# File lib/paymill/models/webhook.rb, line 29
def self.allowed_arguments
  [:event_types, :active]
end
create_with?( incoming_arguments ) click to toggle source
Calls superclass method Paymill::Base::create_with?
# File lib/paymill/models/webhook.rb, line 20
def self.create_with?( incoming_arguments )
  raise ArgumentError unless incoming_arguments.any? { |e| mutual_excluded_arguments.include? e } && ( incoming_arguments & mutual_excluded_arguments ).size == 1
  super( incoming_arguments - mutual_excluded_arguments )
end
mandatory_arguments() click to toggle source
# File lib/paymill/models/webhook.rb, line 25
def self.mandatory_arguments
  [:event_types]
end
mutual_excluded_arguments() click to toggle source
# File lib/paymill/models/webhook.rb, line 33
def self.mutual_excluded_arguments
  [:email, :url]
end

Public Instance Methods

email=( email ) click to toggle source
# File lib/paymill/models/webhook.rb, line 9
def email=( email )
  @url = nil
  @email = email
end
url=( url ) click to toggle source
# File lib/paymill/models/webhook.rb, line 14
def url=( url )
  @url = url
  @email = nil
end