lib/xero_gateway/contact.rb in xero_gateway-2.0.14 vs lib/xero_gateway/contact.rb in xero_gateway-2.0.15

- old
+ new

@@ -1,12 +1,9 @@ module XeroGateway class Contact include Dates - - class Error < RuntimeError; end - class NoGatewayError < Error; end - + GUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ unless defined?(GUID_REGEX) CONTACT_STATUS = { 'ACTIVE' => 'Active', 'DELETED' => 'Deleted' @@ -124,17 +121,17 @@ update end end # Creates this contact record (using gateway.create_contact) with the associated gateway. - # If no gateway set, raise a Xero::Contact::NoGatewayError exception. + # If no gateway set, raise a NoGatewayError exception. def create raise NoGatewayError unless gateway gateway.create_contact(self) end # Creates this contact record (using gateway.update_contact) with the associated gateway. - # If no gateway set, raise a Xero::Contact::NoGatewayError exception. + # If no gateway set, raise a NoGatewayError exception. def update raise NoGatewayError unless gateway gateway.update_contact(self) end