Class: Blockchain0xX402::Server::PricingEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/blockchain0x_x402/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(amount_usdc:, pay_to_address:, payment_request_id:, network: nil) ⇒ PricingEntry

Optional ‘network` defaults to nil so the middleware can fall back to the global DefaultNetwork. Struct’s keyword_init already nils unspecified fields; this initialiser only exists to enforce the three required ones.



55
56
57
# File 'lib/blockchain0x_x402/server.rb', line 55

def initialize(amount_usdc:, pay_to_address:, payment_request_id:, network: nil)
  super
end

Instance Attribute Details

#amount_usdcObject

Returns the value of attribute amount_usdc

Returns:

  • (Object)

    the current value of amount_usdc



44
45
46
# File 'lib/blockchain0x_x402/server.rb', line 44

def amount_usdc
  @amount_usdc
end

#networkObject

Returns the value of attribute network

Returns:

  • (Object)

    the current value of network



44
45
46
# File 'lib/blockchain0x_x402/server.rb', line 44

def network
  @network
end

#pay_to_addressObject

Returns the value of attribute pay_to_address

Returns:

  • (Object)

    the current value of pay_to_address



44
45
46
# File 'lib/blockchain0x_x402/server.rb', line 44

def pay_to_address
  @pay_to_address
end

#payment_request_idObject

Returns the value of attribute payment_request_id

Returns:

  • (Object)

    the current value of payment_request_id



44
45
46
# File 'lib/blockchain0x_x402/server.rb', line 44

def payment_request_id
  @payment_request_id
end