All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.payments.commands.updateactions.SetAmountPaid Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.payments.commands.updateactions;

import io.sphere.sdk.commands.UpdateActionImpl;
import io.sphere.sdk.payments.Payment;

import javax.annotation.Nullable;
import javax.money.MonetaryAmount;

/**
 * Sets the amount of money that has been paid by the customer. If no amount is provided, the amount is unset.
 *
 * {@doc.gen intro}
 *
 * {@include.example io.sphere.sdk.payments.commands.PaymentUpdateCommandTest#setAuthorization()} 
 *
 * @see Payment
 *
 *
 */
public class SetAmountPaid extends UpdateActionImpl {
    @Nullable
    private final MonetaryAmount amount;

    private SetAmountPaid(@Nullable final MonetaryAmount amount) {
        super("setAmountPaid");
        this.amount = amount;
    }

    public static SetAmountPaid of(@Nullable final MonetaryAmount amount) {
        return new SetAmountPaid(amount);
    }

    @Nullable
    public MonetaryAmount getAmount() {
        return amount;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy