Sha256: fdd1a19b21a43079ed7e4a5b6355ee66bc66efd1278fac9c57f7045c9f3edf7d

Contents?: true

Size: 905 Bytes

Versions: 1

Compression:

Stored size: 905 Bytes

Contents

module SynapsePay
  class Card < APIResource
    attr_accessor :routing_number_string
    attr_accessor :account_class
    attr_accessor :account_number_string
    attr_accessor :account_type
    attr_accessor :id
    attr_accessor :name_on_account
    attr_accessor :resource_uri

    def update(params={}, headers={})
      params = ParamsBuilder.merge({
        :id => id,
      }, params)
      method = APIMethod.new(:post, "/card/edit", params, headers, self)
      json = @client.execute(method)
      self.refresh_from(json[:card], method)
    end

    # Everything below here is used behind the scenes.
    APIResource.register_api_subclass(self, "card")
    @api_attributes = {
      :routing_number_string => {},
      :account_class => {},
      :account_number_string => {},
      :account_type => {},
      :id => {},
      :name_on_account => {},
      :resource_uri => {},
    }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
synapse_pay-0.0.1 lib/synapse_pay/resources/card.rb