Table of Contents

Class PaymentMethod

Namespace
Crews.PlanningCenter.Api.Giving.V2018_08_01
Assembly
Crews.PlanningCenter.Api.dll

Attributes for the PaymentMethod resource.

public record PaymentMethod : IEquatable<PaymentMethod>
Inheritance
PaymentMethod
Implements
Inherited Members

Constructors

PaymentMethod()

public PaymentMethod()

PaymentMethod(PaymentMethod)

protected PaymentMethod(PaymentMethod original)

Parameters

original PaymentMethod

Properties

Brand

For cards, this is the card brand (eg Visa, Mastercard, etc). For bank accounts, this is the bank name.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("brand")]
public string? Brand { get; init; }

Property Value

string

CreatedAt

The date and time at which a payment method was created. Example: 2000-01-01T12:00:00Z

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("created_at")]
public DateTime? CreatedAt { get; init; }

Property Value

DateTime?

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Expiration

For cards only. String representation of the expiration date in the MM/YYYY form (without leading zeros). Will be null for bank accounts.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("expiration")]
public string? Expiration { get; init; }

Property Value

string

Last4

The last 4 digits of the payment method's number. For cards, this is the last 4 digits of the card number. For bank accounts, this is the last 4 digits of the bank account number. Note: In cases where we don't have all 4 digits on file, a * will be used to pad the number. For example: *321

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("last4")]
public string? Last4 { get; init; }

Property Value

string

MethodSubtype

For cards, either credit, debit, prepaid, or unknown. For bank accounts, either checking or savings.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("method_subtype")]
public string? MethodSubtype { get; init; }

Property Value

string

MethodType

Determines whether or not the payment method is a card or bank account.

Possible values: card, us_bank_account, or au_becs_debit

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("method_type")]
public string? MethodType { get; init; }

Property Value

string

UpdatedAt

The date and time at which a payment method was last updated. Example: 2000-01-01T12:00:00Z

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("updated_at")]
public DateTime? UpdatedAt { get; init; }

Property Value

DateTime?

Verified

For bank accounts only. Will be null for cards.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("verified")]
public bool? Verified { get; init; }

Property Value

bool?

Methods

Equals(PaymentMethod?)

public virtual bool Equals(PaymentMethod? other)

Parameters

other PaymentMethod

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(PaymentMethod?, PaymentMethod?)

public static bool operator ==(PaymentMethod? left, PaymentMethod? right)

Parameters

left PaymentMethod
right PaymentMethod

Returns

bool

operator !=(PaymentMethod?, PaymentMethod?)

public static bool operator !=(PaymentMethod? left, PaymentMethod? right)

Parameters

left PaymentMethod
right PaymentMethod

Returns

bool