Class: CatarsePagarme::AntifraudOrderWrapper

Inherits:
Object
  • Object
show all
Defined in:
app/models/catarse_pagarme/antifraud_order_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes, transaction) ⇒ AntifraudOrderWrapper

Returns a new instance of AntifraudOrderWrapper.



5
6
7
8
# File 'app/models/catarse_pagarme/antifraud_order_wrapper.rb', line 5

def initialize(attributes, transaction)
  self.attributes = attributes
  self.transaction = transaction
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



3
4
5
# File 'app/models/catarse_pagarme/antifraud_order_wrapper.rb', line 3

def attributes
  @attributes
end

#transactionObject

Returns the value of attribute transaction.



3
4
5
# File 'app/models/catarse_pagarme/antifraud_order_wrapper.rb', line 3

def transaction
  @transaction
end

Instance Method Details

#send(analyze:) ⇒ Object



10
11
12
13
# File 'app/models/catarse_pagarme/antifraud_order_wrapper.rb', line 10

def send(analyze:)
  order = build_order(analyze: analyze)
  client.analyze(order)
end