From 9b062f874e1de68363ef8747d758ac7e4197c636 Mon Sep 17 00:00:00 2001 From: Colin Hall Date: Sat, 1 Feb 2020 13:47:13 +0000 Subject: [PATCH] uupdate PaymentMethod --- src/PaymentMethod.php | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/PaymentMethod.php b/src/PaymentMethod.php index bc97c44..c72476a 100644 --- a/src/PaymentMethod.php +++ b/src/PaymentMethod.php @@ -14,8 +14,26 @@ class PaymentMethod extends StripeModel protected $allowedMethods = ['get', 'find', 'insert', 'update']; + public $insertAttributes = [ + 'type', + 'card', + 'billing_details', + 'metadata' + ]; + + public $updateAttributes = [ + 'card', + 'billing_details', + 'metadata' + ]; + + public $requiredAttributes = [ + 'type', + 'card' + ]; + public $oneRelationships = [ - 'billing_detail' => BillingDetail::class, + 'billing_details' => BillingDetail::class, 'card' => Card::class, 'card_present' => CardPresent::class ]; @@ -25,10 +43,6 @@ class PaymentMethod extends StripeModel 'type' => ['='], ]; - public $requiredAttributes = [ - 'type' - ]; - public $requiredQueryAttributes = [ 'type', 'customer'