Table of Contents

Class Batch

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

Attributes for the Batch resource.

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

Constructors

Batch()

public Batch()

Batch(Batch)

protected Batch(Batch original)

Parameters

original Batch

Properties

CommittedAt

The date and time that a batch was committed at. If it's null, the batch is still in progress or updating. Example: 2000-01-01T12:00:00Z

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

Property Value

DateTime?

CreatedAt

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

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

Property Value

DateTime?

Description

A brief description of what a batch is for. This is displayed in Giving to help differentiate different batches from one another. If no description is provided for a batch, it will be referred to as Untitled batch within Giving.

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

Property Value

string

DonationsCount

Only available when requested with the ?fields param

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("donations_count")]
public int? DonationsCount { get; init; }

Property Value

int?

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Status

One of in_progress, updating, or committed. The updating state is temporary and describes a Batch that is currently being changed in some way (e.g. moving from in_progress to committed). Certain changes to Batches in this state (or their Donations) will be restricted until the Batch has finished updating.

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

Property Value

string

TotalCents

The gross total of cents donated within the batch.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("total_cents")]
public int? TotalCents { get; init; }

Property Value

int?

TotalCurrency

The currency used to calculate total_cents.

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

Property Value

string

UpdatedAt

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

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

Property Value

DateTime?

Methods

Equals(Batch?)

public virtual bool Equals(Batch? other)

Parameters

other Batch

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 ==(Batch?, Batch?)

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

Parameters

left Batch
right Batch

Returns

bool

operator !=(Batch?, Batch?)

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

Parameters

left Batch
right Batch

Returns

bool