Class: Fixably::Customer

Inherits:
ApplicationResource show all
Defined in:
lib/fixably/resources/customer.rb

Direct Known Subclasses

Child

Defined Under Namespace

Classes: BillingAddress, Child, ShippingAddress

Instance Attribute Summary

Attributes inherited from ApplicationResource

#parent_association

Instance Method Summary collapse

Methods inherited from ApplicationResource

#initialize, site

Methods included from Authorization

#headers

Methods included from LoadFromResponse

#load

Methods included from Encoding

#encode

Methods included from Actions

#destroy, included, #save, #save!

Constructor Details

This class inherits a constructor from Fixably::ApplicationResource

Instance Method Details

#either_email_or_phone_setObject



26
27
28
29
30
# File 'lib/fixably/resources/customer.rb', line 26

def either_email_or_phone_set
  return if email.present? || phone.present?

  errors.add(:base, "Either email or phone must be present")
end

#remove_on_encodeObject



32
# File 'lib/fixably/resources/customer.rb', line 32

def remove_on_encode = super().concat(%w[tags])