From 9e7d21ade5e94c0de8bfe59a2cecacd80b65f71f Mon Sep 17 00:00:00 2001 From: Kyle Le Date: Sun, 25 Feb 2024 22:43:38 +0700 Subject: [PATCH] Add CustomFields to PaymentMethod and Transactions --- lib/killbill_client/models/payment_method.rb | 2 ++ lib/killbill_client/models/transaction.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/killbill_client/models/payment_method.rb b/lib/killbill_client/models/payment_method.rb index aeafb9a..0a73d79 100644 --- a/lib/killbill_client/models/payment_method.rb +++ b/lib/killbill_client/models/payment_method.rb @@ -2,6 +2,7 @@ module KillBillClient module Model class PaymentMethod < PaymentMethodAttributes + include KillBillClient::Model::CustomFieldHelper include KillBillClient::Model::AuditLogWithHistoryHelper KILLBILL_API_PAYMENT_METHODS_PREFIX = "#{KILLBILL_API_PREFIX}/paymentMethods" @@ -10,6 +11,7 @@ class PaymentMethod < PaymentMethodAttributes has_many :audit_logs, KillBillClient::Model::AuditLog has_audit_logs_with_history KILLBILL_API_PAYMENT_METHODS_PREFIX, :payment_method_id + has_custom_fields KILLBILL_API_PAYMENT_METHODS_PREFIX, :payment_method_id class << self def find_by_id(payment_method_id, with_plugin_info = false, options = {}) diff --git a/lib/killbill_client/models/transaction.rb b/lib/killbill_client/models/transaction.rb index 716b8cc..7af8614 100644 --- a/lib/killbill_client/models/transaction.rb +++ b/lib/killbill_client/models/transaction.rb @@ -4,6 +4,7 @@ module KillBillClient module Model class Transaction < PaymentTransactionAttributes + include KillBillClient::Model::CustomFieldHelper include KillBillClient::Model::AuditLogWithHistoryHelper KILLBILL_API_TRANSACTIONS_PREFIX = "#{KILLBILL_API_PREFIX}/paymentTransactions" @@ -12,6 +13,7 @@ class Transaction < PaymentTransactionAttributes has_many :audit_logs, KillBillClient::Model::AuditLog has_audit_logs_with_history KILLBILL_API_TRANSACTIONS_PREFIX, :transaction_id + has_custom_fields KILLBILL_API_TRANSACTIONS_PREFIX, :transaction_id def auth(account_id, payment_method_id = nil, user = nil, reason = nil, comment = nil, options = {}, refresh_options = nil) @transaction_type = 'AUTHORIZE'