Class OfferRequestBodyPassengerWithType

java.lang.Object
com.duffel.sdk.model.OfferRequestBodyPassengerWithType

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2022-08-28T15:18:14.926970+07:00[Asia/Bangkok]") public class OfferRequestBodyPassengerWithType extends Object
A passenger specified by their type
  • Field Details

  • Constructor Details

    • OfferRequestBodyPassengerWithType

      public OfferRequestBodyPassengerWithType()
  • Method Details

    • familyName

      public OfferRequestBodyPassengerWithType familyName(String familyName)
    • getFamilyName

      @Nullable public String getFamilyName()
      The passenger's family name. Only `space`, `-`, `'`, and letters from the [`ASCII`](https://www.unicode.org/charts/PDF/U0000.pdf), [`Latin-1 Supplement`](https://www.unicode.org/charts/PDF/U0080.pdf) and [`Latin Extended-A`](https://www.unicode.org/charts/PDF/U0100.pdf) (with the exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters. This is only required if you're also including __Loyalty Programme Accounts__.
      Returns:
      familyName
    • setFamilyName

      public void setFamilyName(String familyName)
    • givenName

      public OfferRequestBodyPassengerWithType givenName(String givenName)
    • getGivenName

      @Nullable public String getGivenName()
      The passenger's given name. Only `space`, `-`, `'`, and letters from the [`ASCII`](https://www.unicode.org/charts/PDF/U0000.pdf), [`Latin-1 Supplement`](https://www.unicode.org/charts/PDF/U0080.pdf) and [`Latin Extended-A`](https://www.unicode.org/charts/PDF/U0100.pdf) (with the exceptions of `Æ`, `æ`, `IJ`, `ij`, `Œ`, `œ`, `Þ`, and `ð`) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters. This is only required if you're also including __Loyalty Programme Accounts__.
      Returns:
      givenName
    • setGivenName

      public void setGivenName(String givenName)
    • loyaltyProgrammeAccounts

      public OfferRequestBodyPassengerWithType loyaltyProgrammeAccounts(List<LoyaltyProgrammeAccount> loyaltyProgrammeAccounts)
    • addLoyaltyProgrammeAccountsItem

      public OfferRequestBodyPassengerWithType addLoyaltyProgrammeAccountsItem(LoyaltyProgrammeAccount loyaltyProgrammeAccountsItem)
    • getLoyaltyProgrammeAccounts

      @Nullable @Valid public @Valid List<LoyaltyProgrammeAccount> getLoyaltyProgrammeAccounts()
      The __Loyalty Programme Accounts__ for this passenger
      Returns:
      loyaltyProgrammeAccounts
    • setLoyaltyProgrammeAccounts

      public void setLoyaltyProgrammeAccounts(List<LoyaltyProgrammeAccount> loyaltyProgrammeAccounts)
    • type

    • getType

      @Nonnull @NotNull public @NotNull OfferRequestBodyPassengerWithType.TypeEnum getType()
      The type of the passenger. If the passenger is aged 18 or over, you should specify a `type` of `adult`. If a passenger is aged under 18, you should specify their `age` instead of a `type`. A passenger can have only a type or an age, but not both.
      Returns:
      type
    • setType

      public void setType(OfferRequestBodyPassengerWithType.TypeEnum type)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object