1"use strict";(globalThis["webpackChunkindy_frontend"]=globalThis["webpackChunkindy_frontend"]||[]).push([[48956],{48956:(t,e,a)=>{a.r(e),a.d(e,{UpdatePaymentMethodUser:()=>s,default:()=>o});var n=a(75379),i=a(12565);class s extends i.Ay{static define(){const t={id:{type:i.ID,output:!0},token:{type:String},firstName:{type:String,output:!0},lastName:{type:String,output:!0},email:{type:String,output:!0},defaultPaymentMethodBrand:{type:String,output:!0},defaultPaymentMethodLast4:{type:String,output:!0},hasPendingCharge:{type:Boolean,output:!0},lastFailureCode:{type:String,output:!0},lastFailureMessage:{type:String,output:!0},pendingAmount:{type:Number,output:!0,default:0},attachPaymentMethodId:{type:String,input:!0},stripeSetupIntentClientSecret:{type:String,output:!0,excludeFromDefault:!0},action:{type:String,input:!0,default:null}},e={name(){return this.firstName+" "+this.lastName}};return this.queries={findUpdatePaymentMethodUserByToken:{arguments:{token:{type:String,required:!0}},results:{user:s}}},this.fields=t,this.computed=e,{fields:t,computed:e}}async createSetupIntent(t=!1,e){e||(e=t=>{console.log(t)});let a,n=this.errors;if(n)return void e(n);a=t?"create_terminal_setup_intent":"create_setup_intent";const i=new s({token:this.token,action:a},{fields:["token","stripeSetupIntentClientSecret"]});try{const t=await i.save();t.errors.length&&(n=t.errors)}catch(t){n=[t]}if(this.isLocal&&i.isRemote&&(this.id=i.id),!n)return i.stripeSetupIntentClientSecret;e(n)}async updateDefaultPaymentMethodFromStripe(){this.action="update_default_payment_method_from_stripe";try{await this.save()}catch(t){console.log(t)}finally{this.resetField("action")}}async removeDefaultPaymentMethod(){this.action="remove_default_payment_method";try{await this.save()}catch(t){console.log(t)}finally{this.resetField("action")}}async attachPaymentMethod(t){this.attachPaymentMethodId=t,this.action="attach_payment_method";try{await this.save()}catch(t){console.log(t)}finally{this.resetField("action")}}async retryFailedPayments(){this.action="retry_failed_payments";try{await this.save()}catch(t){console.log(t)}finally{this.resetField("action")}}}n(s,"name","UpdatePaymentMethodUser");const o=s}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.