Package com.restfb.types
Class Payment
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.FacebookType
-
- com.restfb.types.Payment
-
- All Implemented Interfaces:
HasCreatedTime
,Serializable
public class Payment extends FacebookType implements HasCreatedTime
Represents the Payment Graph API type.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Payment.Action
The list of different action types that have occurred in this payment.static class
Payment.Dispute
Contains the information related to a dispute, including the user_comment and user_email which is provided by the consumer when the dispute is initiated.static class
Payment.Item
The items associated with the payment.-
Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata
-
-
Constructor Summary
Constructors Constructor Description Payment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAction(Payment.Action action)
boolean
addDispute(Payment.Dispute dispute)
boolean
addItem(Payment.Item item)
List<Payment.Action>
getActions()
The list of different action types that have occurred in this payment.Application
getApplication()
The app associated with this paymentString
getCountry()
Buyer's ISO Country Code, for tax purposes.Date
getCreatedTime()
The time the payment was originally created.List<Payment.Dispute>
getDisputes()
Contains the information related to a dispute, including theuser_comment
anduser_email
which is provided by the consumer when the dispute is initiated.List<Payment.Item>
getItems()
The items associated with the payment.Double
getPayoutForeignExchangeRate()
Exchange rate used to calculate payout amount which is remitted in USD.Integer
getQuantity()
The quantity of the product contained in the orderString
getRequestId()
The unique, optional app-created identifier passed into the JS function (255 character maximum)String
getTax()
The tax parameter specifies if a payment is subject to VAT and, if so, how the tax was paid.String
getTaxCountry()
The country determined by Facebook for tax calculation of this purchase, given as an ISO 3166-1 alpha-2 country code.Boolean
getTest()
Optional parameter that shows up when a payment is made by a payment tester listed in the app's dashboard.User
getUser()
The consumer's first and last name along with their user id.boolean
removeAction(Payment.Action action)
boolean
removeDispute(Payment.Dispute dispute)
boolean
removeItem(Payment.Item item)
void
setApplication(Application application)
The app associated with this paymentvoid
setCountry(String country)
Buyer's ISO Country Code, for tax purposes.void
setCreatedTime(Date createdTime)
The time the payment was originally created.void
setPayoutForeignExchangeRate(Double payoutForeignExchangeRate)
Exchange rate used to calculate payout amount which is remitted in USD.void
setQuantity(Integer quantity)
The quantity of the product contained in the ordervoid
setRequestId(String requestId)
The unique, optional app-created identifier passed into the JS function (255 character maximum)void
setTax(String tax)
The tax parameter specifies if a payment is subject to VAT and, if so, how the tax was paid.void
setTaxCountry(String taxCountry)
The country determined by Facebook for tax calculation of this purchase, given as an ISO 3166-1 alpha-2 country code.void
setTest(Boolean test)
Optional parameter that shows up when a payment is made by a payment tester listed in the app's dashboard.void
setUser(User user)
The consumer's first and last name along with their user id.-
Methods inherited from class com.restfb.types.FacebookType
getId, getMetadata, getType, setId, setMetadata, setType
-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
Payment
public Payment()
-
-
Method Detail
-
getItems
public List<Payment.Item> getItems()
The items associated with the payment.- Returns:
- list of items
-
addItem
public boolean addItem(Payment.Item item)
-
removeItem
public boolean removeItem(Payment.Item item)
-
getActions
public List<Payment.Action> getActions()
The list of different action types that have occurred in this payment.- Returns:
- list of actions
-
addAction
public boolean addAction(Payment.Action action)
-
removeAction
public boolean removeAction(Payment.Action action)
-
getDisputes
public List<Payment.Dispute> getDisputes()
Contains the information related to a dispute, including theuser_comment
anduser_email
which is provided by the consumer when the dispute is initiated. Additionally, contains the current status of the dispute, the time the dispute was created an an resolution reason, if available.- Returns:
- list of disputes
-
addDispute
public boolean addDispute(Payment.Dispute dispute)
-
removeDispute
public boolean removeDispute(Payment.Dispute dispute)
-
getUser
public User getUser()
The consumer's first and last name along with their user id. May be omitted in some cases.
-
setUser
public void setUser(User user)
The consumer's first and last name along with their user id. May be omitted in some cases.
-
getQuantity
public Integer getQuantity()
The quantity of the product contained in the order
-
setQuantity
public void setQuantity(Integer quantity)
The quantity of the product contained in the order
-
getRequestId
public String getRequestId()
The unique, optional app-created identifier passed into the JS function (255 character maximum)
-
setRequestId
public void setRequestId(String requestId)
The unique, optional app-created identifier passed into the JS function (255 character maximum)
-
getApplication
public Application getApplication()
The app associated with this payment
-
setApplication
public void setApplication(Application application)
The app associated with this payment
-
getCountry
public String getCountry()
Buyer's ISO Country Code, for tax purposes.
-
setCountry
public void setCountry(String country)
Buyer's ISO Country Code, for tax purposes.
-
getTax
public String getTax()
The tax parameter specifies if a payment is subject to VAT and, if so, how the tax was paid.This can take on the following values:
not_taxed
: There's no VAT on this payment because it came from outside the European Union.already_paid
: The tax on this payment has already been paid by the user's mobile carrier or other upstream partytax_remitted
: Facebook paid the VAT on this payment on your behalf. The tax amount will be deducted from your payout.
-
setTax
public void setTax(String tax)
The tax parameter specifies if a payment is subject to VAT and, if so, how the tax was paid.This can take on the following values:
not_taxed
: There's no VAT on this payment because it came from outside the European Union.already_paid
: The tax on this payment has already been paid by the user's mobile carrier or other upstream partytax_remitted
: Facebook paid the VAT on this payment on your behalf. The tax amount will be deducted from your payout.
-
getTaxCountry
public String getTaxCountry()
The country determined by Facebook for tax calculation of this purchase, given as an ISO 3166-1 alpha-2 country code. Note: This field is for your information only, and it should not be used for any recalculation or reconciliation purposes. If tax is equal to not_taxed or already_paid this field will be omitted.
-
setTaxCountry
public void setTaxCountry(String taxCountry)
The country determined by Facebook for tax calculation of this purchase, given as an ISO 3166-1 alpha-2 country code. Note: This field is for your information only, and it should not be used for any recalculation or reconciliation purposes. If tax is equal to not_taxed or already_paid this field will be omitted.
-
getCreatedTime
public Date getCreatedTime()
The time the payment was originally created.- Specified by:
getCreatedTime
in interfaceHasCreatedTime
-
setCreatedTime
public void setCreatedTime(Date createdTime)
The time the payment was originally created.
-
getPayoutForeignExchangeRate
public Double getPayoutForeignExchangeRate()
Exchange rate used to calculate payout amount which is remitted in USD.
-
setPayoutForeignExchangeRate
public void setPayoutForeignExchangeRate(Double payoutForeignExchangeRate)
Exchange rate used to calculate payout amount which is remitted in USD.
-
getTest
public Boolean getTest()
Optional parameter that shows up when a payment is made by a payment tester listed in the app's dashboard. This represents a transaction that has not been charged to the consumer's payment instrument
-
-