com.stripe.model
Class Charge

java.lang.Object
  extended by com.stripe.model.StripeObject
      extended by com.stripe.net.APIResource
          extended by com.stripe.model.Charge
All Implemented Interfaces:
MetadataStore<Charge>

public class Charge
extends APIResource
implements MetadataStore<Charge>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.stripe.net.APIResource
APIResource.RequestMethod
 
Field Summary
 
Fields inherited from class com.stripe.net.APIResource
CHARSET, GSON
 
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
 
Constructor Summary
Charge()
           
 
Method Summary
static ChargeCollection all(Map<String,Object> params)
           
static ChargeCollection all(Map<String,Object> params, String apiKey)
           
 Charge capture()
           
 Charge capture(Map<String,Object> params)
           
 Charge capture(Map<String,Object> params, String apiKey)
           
 Charge capture(String apiKey)
           
 Dispute closeDispute()
           
 Dispute closeDispute(String apiKey)
           
static Charge create(Map<String,Object> params)
           
static Charge create(Map<String,Object> params, String apiKey)
           
 Integer getAmount()
           
 Integer getAmountRefunded()
           
 String getBalanceTransaction()
           
 Boolean getCaptured()
           
 Card getCard()
           
 Long getCreated()
           
 String getCurrency()
           
 String getCustomer()
           
 String getDescription()
           
 Dispute getDispute()
           
 Boolean getDisputed()
          Deprecated. Use `dispute` field (https://stripe.com/docs/upgrades#2012-11-07)
 String getFailureCode()
           
 String getFailureMessage()
           
 String getId()
           
 String getInvoice()
           
 Boolean getLivemode()
           
 Map<String,String> getMetadata()
           
 Boolean getPaid()
           
 Boolean getRefunded()
           
 ChargeRefundCollection getRefunds()
           
 String getStatementDescription()
           
 Charge refund()
           
 Charge refund(Map<String,Object> params)
           
 Charge refund(Map<String,Object> params, String apiKey)
           
 Charge refund(String apiKey)
           
static Charge retrieve(String id)
           
static Charge retrieve(String id, String apiKey)
           
 void setAmount(Integer amount)
           
 void setAmountRefunded(Integer amountRefunded)
           
 void setBalanceTransaction(String balanceTransaction)
           
 void setCaptured(Boolean captured)
           
 void setCard(Card card)
           
 void setCreated(Long created)
           
 void setCurrency(String currency)
           
 void setCustomer(String customer)
           
 void setDescription(String description)
           
 void setDispute(Dispute dispute)
           
 void setDisputed(Boolean disputed)
          Deprecated. Use `dispute` field (https://stripe.com/docs/upgrades#2012-11-07)
 void setFailureCode(String failureCode)
           
 void setFailureMessage(String failureMessage)
           
 void setId(String id)
           
 void setInvoice(String invoice)
           
 void setLivemode(Boolean livemode)
           
 void setMetadata(Map<String,String> metadata)
           
 void setPaid(Boolean paid)
           
 void setRefunded(Boolean refunded)
           
 void setStatementDescription(String statementDescription)
           
 Charge update(Map<String,Object> params)
           
 Charge update(Map<String,Object> params, String apiKey)
           
 Dispute updateDispute(Map<String,Object> params)
           
 Dispute updateDispute(Map<String,Object> params, String apiKey)
           
 
Methods inherited from class com.stripe.net.APIResource
_request, classURL, instanceURL, request, singleClassURL
 
Methods inherited from class com.stripe.model.StripeObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Charge

public Charge()
Method Detail

getId

public String getId()

setId

public void setId(String id)

getAmount

public Integer getAmount()

setAmount

public void setAmount(Integer amount)

getCreated

public Long getCreated()

setCreated

public void setCreated(Long created)

getCurrency

public String getCurrency()

setCurrency

public void setCurrency(String currency)

getLivemode

public Boolean getLivemode()

setLivemode

public void setLivemode(Boolean livemode)

getPaid

public Boolean getPaid()

setPaid

public void setPaid(Boolean paid)

getRefunded

public Boolean getRefunded()

setRefunded

public void setRefunded(Boolean refunded)

getCaptured

public Boolean getCaptured()

setCaptured

public void setCaptured(Boolean captured)

getDisputed

@Deprecated
public Boolean getDisputed()
Deprecated. Use `dispute` field (https://stripe.com/docs/upgrades#2012-11-07)


setDisputed

@Deprecated
public void setDisputed(Boolean disputed)
Deprecated. Use `dispute` field (https://stripe.com/docs/upgrades#2012-11-07)


getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getStatementDescription

public String getStatementDescription()

setStatementDescription

public void setStatementDescription(String statementDescription)

getFailureMessage

public String getFailureMessage()

setFailureMessage

public void setFailureMessage(String failureMessage)

getFailureCode

public String getFailureCode()

setFailureCode

public void setFailureCode(String failureCode)

getAmountRefunded

public Integer getAmountRefunded()

setAmountRefunded

public void setAmountRefunded(Integer amountRefunded)

getCustomer

public String getCustomer()

setCustomer

public void setCustomer(String customer)

getInvoice

public String getInvoice()

setInvoice

public void setInvoice(String invoice)

getRefunds

public ChargeRefundCollection getRefunds()

getCard

public Card getCard()

setCard

public void setCard(Card card)

getDispute

public Dispute getDispute()

setDispute

public void setDispute(Dispute dispute)

getBalanceTransaction

public String getBalanceTransaction()

setBalanceTransaction

public void setBalanceTransaction(String balanceTransaction)

getMetadata

public Map<String,String> getMetadata()
Specified by:
getMetadata in interface MetadataStore<Charge>

setMetadata

public void setMetadata(Map<String,String> metadata)
Specified by:
setMetadata in interface MetadataStore<Charge>

create

public static Charge create(Map<String,Object> params)
                     throws AuthenticationException,
                            InvalidRequestException,
                            APIConnectionException,
                            CardException,
                            APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

retrieve

public static Charge retrieve(String id)
                       throws AuthenticationException,
                              InvalidRequestException,
                              APIConnectionException,
                              CardException,
                              APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

update

public Charge update(Map<String,Object> params)
              throws AuthenticationException,
                     InvalidRequestException,
                     APIConnectionException,
                     CardException,
                     APIException
Specified by:
update in interface MetadataStore<Charge>
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

all

public static ChargeCollection all(Map<String,Object> params)
                            throws AuthenticationException,
                                   InvalidRequestException,
                                   APIConnectionException,
                                   CardException,
                                   APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

refund

public Charge refund()
              throws AuthenticationException,
                     InvalidRequestException,
                     APIConnectionException,
                     CardException,
                     APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

capture

public Charge capture()
               throws AuthenticationException,
                      InvalidRequestException,
                      APIConnectionException,
                      CardException,
                      APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

updateDispute

public Dispute updateDispute(Map<String,Object> params)
                      throws AuthenticationException,
                             InvalidRequestException,
                             APIConnectionException,
                             CardException,
                             APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

closeDispute

public Dispute closeDispute()
                     throws AuthenticationException,
                            InvalidRequestException,
                            APIConnectionException,
                            CardException,
                            APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

refund

public Charge refund(Map<String,Object> params)
              throws AuthenticationException,
                     InvalidRequestException,
                     APIConnectionException,
                     CardException,
                     APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

capture

public Charge capture(Map<String,Object> params)
               throws AuthenticationException,
                      InvalidRequestException,
                      APIConnectionException,
                      CardException,
                      APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

create

public static Charge create(Map<String,Object> params,
                            String apiKey)
                     throws AuthenticationException,
                            InvalidRequestException,
                            APIConnectionException,
                            CardException,
                            APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

retrieve

public static Charge retrieve(String id,
                              String apiKey)
                       throws AuthenticationException,
                              InvalidRequestException,
                              APIConnectionException,
                              CardException,
                              APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

update

public Charge update(Map<String,Object> params,
                     String apiKey)
              throws AuthenticationException,
                     InvalidRequestException,
                     APIConnectionException,
                     CardException,
                     APIException
Specified by:
update in interface MetadataStore<Charge>
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

all

public static ChargeCollection all(Map<String,Object> params,
                                   String apiKey)
                            throws AuthenticationException,
                                   InvalidRequestException,
                                   APIConnectionException,
                                   CardException,
                                   APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

refund

public Charge refund(String apiKey)
              throws AuthenticationException,
                     InvalidRequestException,
                     APIConnectionException,
                     CardException,
                     APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

capture

public Charge capture(String apiKey)
               throws AuthenticationException,
                      InvalidRequestException,
                      APIConnectionException,
                      CardException,
                      APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

refund

public Charge refund(Map<String,Object> params,
                     String apiKey)
              throws AuthenticationException,
                     InvalidRequestException,
                     APIConnectionException,
                     CardException,
                     APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

capture

public Charge capture(Map<String,Object> params,
                      String apiKey)
               throws AuthenticationException,
                      InvalidRequestException,
                      APIConnectionException,
                      CardException,
                      APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

updateDispute

public Dispute updateDispute(Map<String,Object> params,
                             String apiKey)
                      throws AuthenticationException,
                             InvalidRequestException,
                             APIConnectionException,
                             CardException,
                             APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

closeDispute

public Dispute closeDispute(String apiKey)
                     throws AuthenticationException,
                            InvalidRequestException,
                            APIConnectionException,
                            CardException,
                            APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException


Copyright © 2014 Stripe. All rights reserved.