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

com.stripe.model.OrderItem Maven / Gradle / Ivy

package com.stripe.model;

import com.stripe.net.APIResource;

import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public class OrderItem extends APIResource {
  String object;
  Long amount;
  String currency;
  String description;
  @Getter(AccessLevel.NONE) @Setter(AccessLevel.NONE) ExpandableField parent;
  Integer quantity;
  String type;

  // 
  public String getParent() {
    return (this.parent != null) ? this.parent.getId() : null;
  }

  public void setParent(String parentID) {
    this.parent = setExpandableFieldID(parentID, this.parent);
  }

  public HasId getParentObject() {
    return (this.parent != null) ? this.parent.getExpanded() : null;
  }

  public void setParentObject(HasId o) {
    this.parent = new ExpandableField(o.getId(), o);
  }

  @SuppressWarnings("unchecked")
  public  O getParentObjectAs() {
    return (this.parent != null) ? (O) this.parent.getExpanded() : null;
  }
  // 
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy