stone_ecommerce 1.0.3 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/lib/gateway/Address/billing_address.rb +25 -23
 - data/lib/gateway/Address/buyer_address.rb +28 -25
 - data/lib/gateway/Address/delivery_address.rb +24 -22
 - data/lib/gateway/BoletoTransaction/boleto_transaction.rb +28 -30
 - data/lib/gateway/BoletoTransaction/boleto_transaction_options.rb +14 -11
 - data/lib/gateway/BoletoTransaction/boleto_transaction_report_file.rb +20 -17
 - data/lib/gateway/CreditCardTransaction/credit_card.rb +19 -18
 - data/lib/gateway/CreditCardTransaction/credit_card_transaction.rb +21 -19
 - data/lib/gateway/CreditCardTransaction/credit_card_transaction_options.rb +17 -15
 - data/lib/gateway/CreditCardTransaction/credit_card_transaction_report_file.rb +29 -26
 - data/lib/gateway/CreditCardTransaction/manage_credit_card_transaction.rb +11 -8
 - data/lib/gateway/CreditCardTransaction/retry_sale_credit_card_transaction.rb +10 -8
 - data/lib/gateway/Gateway.rb +514 -334
 - data/lib/gateway/InstantBuyData/create_instant_buy_data_request.rb +31 -0
 - data/lib/gateway/InstantBuyData/update_instant_buy_data_request.rb +11 -0
 - data/lib/gateway/Merchant/merchant.rb +10 -8
 - data/lib/gateway/OnlineDebit/online_debit_transaction_report_file.rb +19 -16
 - data/lib/gateway/Order/order.rb +11 -8
 - data/lib/gateway/Order/order_transaction_report_file.rb +8 -5
 - data/lib/gateway/Parsers/boleto_transaction_parser.rb +28 -25
 - data/lib/gateway/Parsers/credit_card_transaction_parser.rb +37 -34
 - data/lib/gateway/Parsers/header_parser.rb +13 -10
 - data/lib/gateway/Parsers/online_debit_transaction_parser.rb +26 -23
 - data/lib/gateway/Parsers/trailer_parser.rb +13 -11
 - data/lib/gateway/Person/buyer.rb +22 -22
 - data/lib/gateway/Person/create_buyer_request.rb +23 -0
 - data/lib/gateway/Person/person.rb +34 -32
 - data/lib/gateway/Recurrency/recurrency.rb +18 -16
 - data/lib/gateway/Sale/create_sale_request.rb +26 -24
 - data/lib/gateway/Sale/manage_sale_request.rb +13 -11
 - data/lib/gateway/Sale/query_sale_request.rb +27 -25
 - data/lib/gateway/Sale/request_data.rb +16 -14
 - data/lib/gateway/Sale/retry_sale_options.rb +12 -10
 - data/lib/gateway/Sale/retry_sale_request.rb +15 -14
 - data/lib/gateway/Sale/sale_data.rb +0 -2
 - data/lib/gateway/Sale/sale_order_data.rb +14 -12
 - data/lib/gateway/SalesOption.rb +13 -11
 - data/lib/gateway/ShoppingCart/shopping_cart.rb +18 -16
 - data/lib/gateway/ShoppingCart/shopping_cart_item.rb +15 -13
 - data/lib/gateway/Trailer.rb +8 -5
 - data/lib/gateway/header.rb +7 -4
 - data/lib/gateway/post_notification.rb +23 -20
 - data/lib/gateway/transaction_report_file.rb +43 -40
 - data/lib/stone_ecommerce.rb +6 -14
 - data/spec/integration/gateway_spec.rb +376 -85
 - data/spec/spec_helper.rb +96 -96
 - data/stone_ecommerce.gemspec +2 -2
 - metadata +6 -20
 - data/lib/gateway/AntiFraud/anti_fraud_analysis_result.rb +0 -47
 - data/lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_data.rb +0 -51
 - data/lib/gateway/AntiFraud/query_sale_anti_fraud_analysis_history_data.rb +0 -41
 - data/lib/gateway/BaseRequest.rb +0 -11
 - data/lib/gateway/BaseResponse.rb +0 -17
 - data/lib/gateway/BoletoTransaction/boleto_transaction_data.rb +0 -44
 - data/lib/gateway/BoletoTransaction/boleto_transaction_result.rb +0 -35
 - data/lib/gateway/CreditCardTransaction/credit_card_transaction_data.rb +0 -104
 - data/lib/gateway/ErrorItem.rb +0 -17
 - data/lib/gateway/ErrorReport.rb +0 -18
 - data/lib/gateway/InstantBuy/credit_card_data.rb +0 -41
 - data/lib/gateway/InstantBuy/get_instant_buy_data_response.rb +0 -18
 - data/lib/gateway/Sale/create_sale_response.rb +0 -25
 - data/lib/gateway/Sale/manage_sale_response.rb +0 -15
 - data/lib/gateway/Sale/query_sale_response.rb +0 -18
 - data/lib/gateway/Sale/retry_sale_response.rb +0 -14
 - data/lib/gateway/address.rb +0 -25
 
| 
         @@ -1,44 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class BoletoTransactionData
         
     | 
| 
       2 
     | 
    
         
            -
              # Url para visualiza��o do boleto
         
     | 
| 
       3 
     | 
    
         
            -
              attr_accessor :BoletoUrl
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              # C�digo de barras do boleto
         
     | 
| 
       6 
     | 
    
         
            -
              attr_accessor :Barcode
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
              # Status do boleto
         
     | 
| 
       9 
     | 
    
         
            -
              attr_accessor :BoletoTransactionStatus
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
              # Chave da transa��o. Utilizada para identificar a transa��o de boleto no gateway
         
     | 
| 
       12 
     | 
    
         
            -
              attr_accessor :TransactionKey
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
              # Valor original do boleto em centavos
         
     | 
| 
       15 
     | 
    
         
            -
              attr_accessor :AmountInCents
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
              # N�mero do documento
         
     | 
| 
       18 
     | 
    
         
            -
              attr_accessor :DocumentNumber
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
              # Identificador da transa��o no sistema da loja
         
     | 
| 
       21 
     | 
    
         
            -
              attr_accessor :TransactionReference
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
              # Data de expira��o do boleto
         
     | 
| 
       24 
     | 
    
         
            -
              attr_accessor :ExpirationDate
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
              # N�mero do banco
         
     | 
| 
       27 
     | 
    
         
            -
              attr_accessor :BankNumber
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
              # Valor total pago em centavos
         
     | 
| 
       30 
     | 
    
         
            -
              attr_accessor :AmountPaidInCents
         
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
              # Data de cria��o do boleto no gateway
         
     | 
| 
       33 
     | 
    
         
            -
              attr_accessor :CreateDate
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
              # Identificador do boleto
         
     | 
| 
       36 
     | 
    
         
            -
              attr_accessor :NossoNumero
         
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
              def to_json
         
     | 
| 
       39 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       40 
     | 
    
         
            -
                instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       41 
     | 
    
         
            -
                hash
         
     | 
| 
       42 
     | 
    
         
            -
              end
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,35 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class BoletoTransactionResult
         
     | 
| 
       2 
     | 
    
         
            -
              # Url para visualiza��o do boleto
         
     | 
| 
       3 
     | 
    
         
            -
              attr_accessor :BoletoUrl
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              # C�digo de barras
         
     | 
| 
       6 
     | 
    
         
            -
              attr_accessor :Barcode
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
              # Status do boleto
         
     | 
| 
       9 
     | 
    
         
            -
              attr_accessor :BoletoTransactionStatus
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
              # Chave da transa��o. Utilizada para identificar a transa��o de boleto no gateway
         
     | 
| 
       12 
     | 
    
         
            -
              attr_accessor :TransactionKey
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
              # Valor original da transa��o em centavos
         
     | 
| 
       15 
     | 
    
         
            -
              attr_accessor :AmountInCents
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
              # N�mero do documento
         
     | 
| 
       18 
     | 
    
         
            -
              attr_accessor :DocumentNumber
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
              # Identificador da transa��o no sistema da loja
         
     | 
| 
       21 
     | 
    
         
            -
              attr_accessor :TransactionReference
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
              # Indica se houve sucesso na gera��o do boleto
         
     | 
| 
       24 
     | 
    
         
            -
              attr_accessor :Success
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
              # N�mero de identifica��o do boleto
         
     | 
| 
       27 
     | 
    
         
            -
              attr_accessor :NossoNumero
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
              def to_json
         
     | 
| 
       30 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       31 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       32 
     | 
    
         
            -
                hash
         
     | 
| 
       33 
     | 
    
         
            -
              end
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,104 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require_relative '../../gateway/InstantBuy/credit_card_data'
         
     | 
| 
       2 
     | 
    
         
            -
            class CreditCardTransactionData
         
     | 
| 
       3 
     | 
    
         
            -
              # Dados do cart�o de cr�dito
         
     | 
| 
       4 
     | 
    
         
            -
              attr_accessor :CreditCard
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
              # Status da transa��o de cart�o de cr�dito
         
     | 
| 
       7 
     | 
    
         
            -
              attr_accessor :CreditCardTransactionStatus
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
              @@CreditCardTransactionStatusEnum = {
         
     | 
| 
       10 
     | 
    
         
            -
                  :AuthorizedPendingCapture => '1',
         
     | 
| 
       11 
     | 
    
         
            -
                  :NotAuthorized => '2',
         
     | 
| 
       12 
     | 
    
         
            -
                  :ChargebackPreview => '3',
         
     | 
| 
       13 
     | 
    
         
            -
                  :RefundPreview => '4',
         
     | 
| 
       14 
     | 
    
         
            -
                  :DepositPreview => '5',
         
     | 
| 
       15 
     | 
    
         
            -
                  :Captured => '6',
         
     | 
| 
       16 
     | 
    
         
            -
                  :PartialCapture => '7',
         
     | 
| 
       17 
     | 
    
         
            -
                  :Refunded => '8',
         
     | 
| 
       18 
     | 
    
         
            -
                  :Voided => '9',
         
     | 
| 
       19 
     | 
    
         
            -
                  :Deposited => '10',
         
     | 
| 
       20 
     | 
    
         
            -
                  :Chargeback => '12',
         
     | 
| 
       21 
     | 
    
         
            -
                  :PendingVoid => '13',
         
     | 
| 
       22 
     | 
    
         
            -
                  :Invalid => '14',
         
     | 
| 
       23 
     | 
    
         
            -
                  :PartialAlthorize => '15',
         
     | 
| 
       24 
     | 
    
         
            -
                  :PartialRefunded => '16',
         
     | 
| 
       25 
     | 
    
         
            -
                  :OverCapture => '17',
         
     | 
| 
       26 
     | 
    
         
            -
                  :PartialVoid => '18',
         
     | 
| 
       27 
     | 
    
         
            -
                  :PendingRefund => '19',
         
     | 
| 
       28 
     | 
    
         
            -
                  :UnScheduled => '20',
         
     | 
| 
       29 
     | 
    
         
            -
                  :Created => '21',
         
     | 
| 
       30 
     | 
    
         
            -
                  :PartialAuthorized => '22',
         
     | 
| 
       31 
     | 
    
         
            -
                  :NotFoundInAcquirer => '23',
         
     | 
| 
       32 
     | 
    
         
            -
                  :PendingAuthorize => '24',
         
     | 
| 
       33 
     | 
    
         
            -
                  :WithError => '99'
         
     | 
| 
       34 
     | 
    
         
            -
              }
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
              # Chave da transa��o. Utilizada para identificar a transa��o de cart�o de cr�dito no gateway
         
     | 
| 
       37 
     | 
    
         
            -
              attr_accessor :TransactionKey
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
              # Identificador da transa��o gerado pela loja.
         
     | 
| 
       40 
     | 
    
         
            -
              attr_accessor :TransactionIdentifier
         
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
              # C�digo de autoriza��o retornado pela adquirente
         
     | 
| 
       43 
     | 
    
         
            -
              attr_accessor :AcquirerAuthorizationCode
         
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
              # Identificador �nico retornado pela adquirente
         
     | 
| 
       46 
     | 
    
         
            -
              attr_accessor :UniqueSequentialNumber
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
              # Valor original da transa��o em centavos
         
     | 
| 
       49 
     | 
    
         
            -
              attr_accessor :AmountInCents
         
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
              # Valor autorizado em centavos
         
     | 
| 
       52 
     | 
    
         
            -
              attr_accessor :AuthorizedAmountInCents
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
              # Valor capturado em centavos
         
     | 
| 
       55 
     | 
    
         
            -
              attr_accessor :CapturedAmountInCents
         
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
              # Valor estornado em centavos
         
     | 
| 
       58 
     | 
    
         
            -
              attr_accessor :RefundedAmountInCents
         
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
     | 
    
         
            -
              # Valor cancelado em centavos
         
     | 
| 
       61 
     | 
    
         
            -
              attr_accessor :VoidedAmountInCents
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
              # Data da recorr�ncia (poder� ser futura)
         
     | 
| 
       64 
     | 
    
         
            -
              attr_accessor :DueDate
         
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
              # Identificador da transa��o no sistema da loja
         
     | 
| 
       67 
     | 
    
         
            -
              attr_accessor :TransactionReference
         
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
              # Data de cria��o da transa��o no gatewaya
         
     | 
| 
       70 
     | 
    
         
            -
              attr_accessor :CreateDate
         
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
              # Nome da adquirente que processou a transa��o
         
     | 
| 
       73 
     | 
    
         
            -
              attr_accessor :AcquirerName
         
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
              # Indica se � uma recorr�ncia
         
     | 
| 
       76 
     | 
    
         
            -
              attr_accessor :IsRecurrency
         
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
              # Total de parcelas na transa��o
         
     | 
| 
       79 
     | 
    
         
            -
              attr_accessor :InstallmentCount
         
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
              # C�digo de filia��o da loja na adquirente
         
     | 
| 
       82 
     | 
    
         
            -
              attr_accessor :AffiliationCode
         
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
              # C�digo do m�todo de pagamento
         
     | 
| 
       85 
     | 
    
         
            -
              attr_accessor :PaymentMethodName
         
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
              # Chave da transa��o na adquirente, enviada pelo gateway
         
     | 
| 
       88 
     | 
    
         
            -
              attr_accessor :TransactionKeyToAcquirer
         
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
              # Data limite para a captura da transa��o na adquirente
         
     | 
| 
       91 
     | 
    
         
            -
              attr_accessor :CaptureExpirationDate
         
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
              def initialize
         
     | 
| 
       94 
     | 
    
         
            -
                @CreditCard = CreditCardData.new
         
     | 
| 
       95 
     | 
    
         
            -
                @CreditCardTransactionStatus = self.CreditCardTransactionStatusEnum
         
     | 
| 
       96 
     | 
    
         
            -
              end
         
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
              def to_json
         
     | 
| 
       99 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       100 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       101 
     | 
    
         
            -
                hash
         
     | 
| 
       102 
     | 
    
         
            -
              end
         
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
            end
         
     | 
    
        data/lib/gateway/ErrorItem.rb
    DELETED
    
    | 
         @@ -1,17 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class ErrorItem
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              attr_accessor :ErrorCode
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              attr_accessor :ErrorField
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
              attr_accessor :Description
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
              attr_accessor :SeverityCode
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
              def to_json
         
     | 
| 
       12 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       13 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       14 
     | 
    
         
            -
                hash
         
     | 
| 
       15 
     | 
    
         
            -
              end
         
     | 
| 
       16 
     | 
    
         
            -
              
         
     | 
| 
       17 
     | 
    
         
            -
            end
         
     | 
    
        data/lib/gateway/ErrorReport.rb
    DELETED
    
    | 
         @@ -1,18 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class ErrorReport
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              attr_accessor :Category
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              attr_accessor :ErrorItemCollection
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
              def initialize
         
     | 
| 
       9 
     | 
    
         
            -
                @ErrorItemCollection = Array.new;
         
     | 
| 
       10 
     | 
    
         
            -
              end
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
              def to_json
         
     | 
| 
       13 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       14 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       15 
     | 
    
         
            -
                hash
         
     | 
| 
       16 
     | 
    
         
            -
              end
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,41 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class CreditCardData
         
     | 
| 
       2 
     | 
    
         
            -
              # N�mero mascardo do cart�o de cr�dito
         
     | 
| 
       3 
     | 
    
         
            -
              attr_accessor :MaskedCreditCardNumber
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              # Bandeira do cart�o de cr�dito
         
     | 
| 
       6 
     | 
    
         
            -
              attr_accessor :CreditCardBrand
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
              @@CreditCardBrandEnum = {
         
     | 
| 
       9 
     | 
    
         
            -
                  :Visa => '1',
         
     | 
| 
       10 
     | 
    
         
            -
                  :MasterCard => '2',
         
     | 
| 
       11 
     | 
    
         
            -
                  :HiperCard => '3',
         
     | 
| 
       12 
     | 
    
         
            -
                  :Amex => '4',
         
     | 
| 
       13 
     | 
    
         
            -
                  :Diners => '5',
         
     | 
| 
       14 
     | 
    
         
            -
                  :Elo => '6',
         
     | 
| 
       15 
     | 
    
         
            -
                  :Aura => '7',
         
     | 
| 
       16 
     | 
    
         
            -
                  :Discover => '8',
         
     | 
| 
       17 
     | 
    
         
            -
                  :CasaShow => '9',
         
     | 
| 
       18 
     | 
    
         
            -
                  :Havan => '10',
         
     | 
| 
       19 
     | 
    
         
            -
                  :HugCard => '11',
         
     | 
| 
       20 
     | 
    
         
            -
                  :AndarAki => '12',
         
     | 
| 
       21 
     | 
    
         
            -
                  :LeaderCard => '13',
         
     | 
| 
       22 
     | 
    
         
            -
                  :Submarino => '14'
         
     | 
| 
       23 
     | 
    
         
            -
              }
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
              # Chave do cart�o de cr�dito. Utilizada para identificar um cart�o de cr�dito no gateway
         
     | 
| 
       26 
     | 
    
         
            -
              attr_accessor :InstantBuyerKey
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
              # Informa se o cart�o de cr�dito expirou
         
     | 
| 
       29 
     | 
    
         
            -
              attr_accessor :IsExpiredCreditCard
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
              def initialize
         
     | 
| 
       32 
     | 
    
         
            -
                @CreditCardBrand = self.CreditCardBrandEnum
         
     | 
| 
       33 
     | 
    
         
            -
              end
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
              def to_json
         
     | 
| 
       36 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       37 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       38 
     | 
    
         
            -
                hash
         
     | 
| 
       39 
     | 
    
         
            -
              end
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,18 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class GetInstantBuyDataResponse
         
     | 
| 
       2 
     | 
    
         
            -
              # Lista de cart�es de cr�dito
         
     | 
| 
       3 
     | 
    
         
            -
              attr_accessor :CreditCardDataCollection
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              # Total de cart�es de cr�dito retornados
         
     | 
| 
       6 
     | 
    
         
            -
              attr_accessor :CreditCardDataCount
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
              def initialize
         
     | 
| 
       9 
     | 
    
         
            -
                @CreditCardDataCollection = Array.new
         
     | 
| 
       10 
     | 
    
         
            -
              end
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
              def to_json
         
     | 
| 
       13 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       14 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       15 
     | 
    
         
            -
                hash
         
     | 
| 
       16 
     | 
    
         
            -
              end
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,25 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class CreateSaleResponse
         
     | 
| 
       2 
     | 
    
         
            -
              # Lista as transa��es de Cart�o de Cr�dito
         
     | 
| 
       3 
     | 
    
         
            -
              attr_accessor :CreditCardTransactionResultCollection
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              # Lista as transa��es de boleto
         
     | 
| 
       6 
     | 
    
         
            -
              attr_accessor :BoletoTransactionResultCollection
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
              # Dados de retorno do pedido
         
     | 
| 
       9 
     | 
    
         
            -
              attr_accessor :OrderResult
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
              # Chave do comprador. Utilizada para identificar um comprador no gateway
         
     | 
| 
       12 
     | 
    
         
            -
              attr_accessor :BuyerKey
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
              def initialize
         
     | 
| 
       15 
     | 
    
         
            -
                @CreditCardTransactionResultCollection = Array.new
         
     | 
| 
       16 
     | 
    
         
            -
                @BoletoTransactionResultCollection = Array.new
         
     | 
| 
       17 
     | 
    
         
            -
              end
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
              def to_json
         
     | 
| 
       20 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       21 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       22 
     | 
    
         
            -
                hash
         
     | 
| 
       23 
     | 
    
         
            -
              end
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,15 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class ManageSaleResponse
         
     | 
| 
       2 
     | 
    
         
            -
              # Cole��o de transa��es de cart�o de cr�dito
         
     | 
| 
       3 
     | 
    
         
            -
              attr_accessor :CreditCardTransactionResultCollection
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              def initialize
         
     | 
| 
       6 
     | 
    
         
            -
                @CreditCardTransactionResultCollection = Array.new
         
     | 
| 
       7 
     | 
    
         
            -
              end
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
              def to_json
         
     | 
| 
       10 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       11 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       12 
     | 
    
         
            -
                hash
         
     | 
| 
       13 
     | 
    
         
            -
              end
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,18 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class QuerySaleResponse
         
     | 
| 
       2 
     | 
    
         
            -
              # Lista de vendas
         
     | 
| 
       3 
     | 
    
         
            -
              attr_accessor :SaleDataCollection
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              # Indicador do total de vendas
         
     | 
| 
       6 
     | 
    
         
            -
              attr_accessor :SaleDataCount
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
              def initialize
         
     | 
| 
       9 
     | 
    
         
            -
                @SaleDataCollection = Array.new
         
     | 
| 
       10 
     | 
    
         
            -
              end
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
              def to_json
         
     | 
| 
       13 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       14 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       15 
     | 
    
         
            -
                hash
         
     | 
| 
       16 
     | 
    
         
            -
              end
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,14 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class RetrySaleResponse
         
     | 
| 
       2 
     | 
    
         
            -
              attr_accessor :CreditCardTransactionResultCollection
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
              def initialize
         
     | 
| 
       5 
     | 
    
         
            -
                @CreditCardTransactionResultCollection = Array.new
         
     | 
| 
       6 
     | 
    
         
            -
              end
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
              def to_json
         
     | 
| 
       9 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       10 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       11 
     | 
    
         
            -
                hash
         
     | 
| 
       12 
     | 
    
         
            -
              end
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
            end
         
     | 
    
        data/lib/gateway/address.rb
    DELETED
    
    | 
         @@ -1,25 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            class Address
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              attr_accessor :Country
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              attr_accessor :State
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
              attr_accessor :City
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
              attr_accessor :District
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
              attr_accessor :Street
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
              attr_accessor :Number
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
              attr_accessor :Complement
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
              attr_accessor :ZipCode
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
              def to_json
         
     | 
| 
       20 
     | 
    
         
            -
                hash = {}
         
     | 
| 
       21 
     | 
    
         
            -
                instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
         
     | 
| 
       22 
     | 
    
         
            -
                hash
         
     | 
| 
       23 
     | 
    
         
            -
              end
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
            end
         
     |