FMPTransaction.Builder

Description

The FMPTransaction.Builder class is a builder for the FMPTransaction class.

class Builder

Methods

Method Description
id(_:) Save transaction identifier to variable.
func id(_ id: String) -> Builder

Parameters:

  • id. Transaction identifier.

resource(_:) Save transaction resource to variable.
func resource(_ resource: FMPResource) -> Builder

Parameters:

  • resource. Transaction resource.

build() Build an instance of the FMPTransaction class. It returns the object of the FMPTransaction type.
func build() -> FMPTransaction

Example

Build an instance of the FMPTransaction class:

// Build an instance of the FMPResource class. For details see examples for FMPResource.Builder.
let resource: FNPResource = fmp.resource.build()
  
// Build an instance of the FMPTransaction class
let transaction: FMPTransaction = fmp.transaction
    .id("id") //  By default ""
    .resource(resource) //  By default nil
    .build()

See also:

FMPWrapper Framework | Classes