001// Generated by delombok at Wed Feb 12 09:04:33 CET 2025 002/* 003 * Copyright (c) 2010-2025 Mark Allen, Norbert Bartels. 004 * 005 * Permission is hereby granted, free of charge, to any person obtaining a copy 006 * of this software and associated documentation files (the "Software"), to deal 007 * in the Software without restriction, including without limitation the rights 008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 009 * copies of the Software, and to permit persons to whom the Software is 010 * furnished to do so, subject to the following conditions: 011 * 012 * The above copyright notice and this permission notice shall be included in 013 * all copies or substantial portions of the Software. 014 * 015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 021 * THE SOFTWARE. 022 */ 023package com.restfb.types.webhook.messaging.payment; 024 025import java.io.Serializable; 026import com.restfb.Facebook; 027 028public class PaymentCredential implements Serializable { 029 /** 030 * The "stripe" provider type. 031 */ 032 public static final String STRIPE = "stripe"; 033 /** 034 * The "paypal" provider type. 035 */ 036 public static final String PAYPAL = "paypal"; 037 /** 038 * The "token" provider type. 039 */ 040 public static final String TOKEN = "token"; 041 /** 042 * Payment provider type 043 */ 044 @Facebook("provider_type") 045 private String providerType; 046 /** 047 * Payment provider charge id 048 */ 049 @Facebook("charge_id") 050 private String chargeId; 051 052 /** 053 * convenience method to check if the provider type is stripe 054 * 055 * @return {@code true} if stripe, {@code false} if not stripe 056 */ 057 public boolean isStripe() { 058 return STRIPE.equals(providerType); 059 } 060 061 /** 062 * convenience method to check if the provider type is paypal 063 * 064 * @return {@code true} if paypal, {@code false} if not paypal 065 */ 066 public boolean isPaypal() { 067 return PAYPAL.equals(providerType); 068 } 069 070 /** 071 * convenience method to check if the provider type is token 072 * 073 * @return {@code true} if token, {@code false} if not token 074 */ 075 public boolean isToken() { 076 return TOKEN.equals(providerType); 077 } 078 079 @java.lang.Override 080 @java.lang.SuppressWarnings("all") 081 public java.lang.String toString() { 082 return "PaymentCredential(providerType=" + this.getProviderType() + ", chargeId=" + this.getChargeId() + ")"; 083 } 084 085 /** 086 * Payment provider type 087 */ 088 @java.lang.SuppressWarnings("all") 089 public String getProviderType() { 090 return this.providerType; 091 } 092 093 /** 094 * Payment provider type 095 */ 096 @java.lang.SuppressWarnings("all") 097 public void setProviderType(final String providerType) { 098 this.providerType = providerType; 099 } 100 101 /** 102 * Payment provider charge id 103 */ 104 @java.lang.SuppressWarnings("all") 105 public String getChargeId() { 106 return this.chargeId; 107 } 108 109 /** 110 * Payment provider charge id 111 */ 112 @java.lang.SuppressWarnings("all") 113 public void setChargeId(final String chargeId) { 114 this.chargeId = chargeId; 115 } 116}