class Starling::Resources::CardResource

A resource representing a response from the Card API

Public Instance Methods

activated() click to toggle source

@return [true, false] whether the card has been activated

# File lib/starling/resources/card_resource.rb, line 36
def activated
  parsed_data['activated']
end
activation_requested() click to toggle source

@return [true, false] whether the card's activation has been requested

# File lib/starling/resources/card_resource.rb, line 31
def activation_requested
  parsed_data['activationRequested']
end
cancelled() click to toggle source

@return [true, false] whether the card has been cancelled

# File lib/starling/resources/card_resource.rb, line 26
def cancelled
  parsed_data['cancelled']
end
dispatch_date() click to toggle source

@return [Date] when the card was dispatched by post to the user

# File lib/starling/resources/card_resource.rb, line 41
def dispatch_date
  present_date(parsed_data['dispatchDate'])
end
enabled() click to toggle source

@return [true, false] whether the card is enabled

# File lib/starling/resources/card_resource.rb, line 21
def enabled
  parsed_data['enabled']
end
id() click to toggle source

@return [String] the Starling internal ID of the card

# File lib/starling/resources/card_resource.rb, line 6
def id
  parsed_data['id']
end
name_on_card() click to toggle source

@return [String] the name on the front of the card

# File lib/starling/resources/card_resource.rb, line 11
def name_on_card
  parsed_data['nameOnCard']
end
type() click to toggle source

@return [String] the type of the card (e.g. “ContactlessDebitMastercard”)

# File lib/starling/resources/card_resource.rb, line 16
def type
  parsed_data['type']
end