syntax = "proto3";

package wix.payment.api.pay.v3;

import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "wix/payment/api/pay/v3/resources/payment-details.proto";

option java_package = "com.wix.payment.api.pay.v3";

message Refund {

    string id                               = 1;

    // Amount and currency of refund
    CurrencyAmount amount                   = 2;

    // Updated refund status
    RefundStatus status                     = 3;

    // Reason provided for status change
    google.protobuf.StringValue reason_code = 4;

    // Refund creation date
    google.protobuf.Timestamp created_at    = 10;

    enum RefundStatus {
        UNDEFINED            = 0;
        APPROVED             = 1;
        PENDING              = 2;
        DECLINED             = 3;
    }
}

