001// Generated by delombok at Wed Nov 11 21:20:25 CET 2020
002/*
003 * Copyright (c) 2010-2020 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;
024
025import com.restfb.Facebook;
026import com.restfb.types.webhook.messaging.payment.Amount;
027import com.restfb.types.webhook.messaging.payment.PaymentCredential;
028import com.restfb.types.webhook.messaging.payment.ReuqestedUserInfo;
029
030/**
031 * Represents the
032 * <a href="https://developers.facebook.com/docs/messenger-platform/webhook-reference/payment">Payment</a> Callback
033 */
034public class PaymentItem implements InnerMessagingItem {
035  /**
036   * Metadata defined in the Buy Button.
037   */
038  @Facebook
039  private String payload;
040  /**
041   * Information that was requested from the user by the Buy Button.
042   */
043  @Facebook("requested_user_info")
044  private ReuqestedUserInfo requestedUserInfo;
045  /**
046   * Payment credentials.
047   */
048  @Facebook("payment_credential")
049  private PaymentCredential paymentCredential;
050  /**
051   * Total amount of transaction.
052   */
053  @Facebook
054  private Amount amount;
055
056  @java.lang.Override
057  @java.lang.SuppressWarnings("all")
058  public java.lang.String toString() {
059    return "PaymentItem(payload=" + this.getPayload() + ", requestedUserInfo=" + this.getRequestedUserInfo() + ", paymentCredential=" + this.getPaymentCredential() + ", amount=" + this.getAmount() + ")";
060  }
061
062  /**
063   * Metadata defined in the Buy Button.
064   */
065  @java.lang.SuppressWarnings("all")
066  public String getPayload() {
067    return this.payload;
068  }
069
070  /**
071   * Metadata defined in the Buy Button.
072   */
073  @java.lang.SuppressWarnings("all")
074  public void setPayload(final String payload) {
075    this.payload = payload;
076  }
077
078  /**
079   * Information that was requested from the user by the Buy Button.
080   */
081  @java.lang.SuppressWarnings("all")
082  public ReuqestedUserInfo getRequestedUserInfo() {
083    return this.requestedUserInfo;
084  }
085
086  /**
087   * Information that was requested from the user by the Buy Button.
088   */
089  @java.lang.SuppressWarnings("all")
090  public void setRequestedUserInfo(final ReuqestedUserInfo requestedUserInfo) {
091    this.requestedUserInfo = requestedUserInfo;
092  }
093
094  /**
095   * Payment credentials.
096   */
097  @java.lang.SuppressWarnings("all")
098  public PaymentCredential getPaymentCredential() {
099    return this.paymentCredential;
100  }
101
102  /**
103   * Payment credentials.
104   */
105  @java.lang.SuppressWarnings("all")
106  public void setPaymentCredential(final PaymentCredential paymentCredential) {
107    this.paymentCredential = paymentCredential;
108  }
109
110  /**
111   * Total amount of transaction.
112   */
113  @java.lang.SuppressWarnings("all")
114  public Amount getAmount() {
115    return this.amount;
116  }
117
118  /**
119   * Total amount of transaction.
120   */
121  @java.lang.SuppressWarnings("all")
122  public void setAmount(final Amount amount) {
123    this.amount = amount;
124  }
125}