Sha256: 37ea8ac7970fc7ef539ccc3f9034c1271a3dd381458b2b8e2b1f067933534d43
Contents?: true
Size: 701 Bytes
Versions: 21
Compression:
Stored size: 701 Bytes
Contents
module PagSeguro class Shipping include ActiveModel::Validations extend Forwardable def_delegators :address, :country, :postal_code, :street, :number def_delegators :address, :complement, :district, :city, :state validates_presence_of :address validates_inclusion_of :type_id, in: %w( 1 2 3 ), allow_blank: true validates_numericality_of :cost, greater_than: 0, allow_nil: true # Set the shipping type attr_accessor :type_id # Set the credit card holder bithdate. attr_accessor :cost # Get the sender address. attr_accessor :address def initialize(type_id = nil, cost = nil) @type_id = type_id @cost = cost end end end
Version data entries
21 entries across 21 versions & 1 rubygems