Module: Airwallex::APIOperations::Update
- Included in:
- Customer, Customer, PaymentIntent, PaymentMethod, PaymentMethod
- Defined in:
- lib/airwallex/api_operations/update.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #save ⇒ Object
-
#update(params = {}) ⇒ Object
Instance methods.
Class Method Details
.included(base) ⇒ Object
6 7 8 |
# File 'lib/airwallex/api_operations/update.rb', line 6 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#save ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/airwallex/api_operations/update.rb', line 31 def save return self unless dirty? # Only send changed attributes params = {} changed_attributes.each do |attr| params[attr] = @attributes[attr] end update(params) end |