Module: AvaTax::Client::AgeVerification
- Included in:
- AvaTax::Client
- Defined in:
- lib/avatax/client/ageverification.rb
Instance Method Summary collapse
- 
  
    
      #find_age_verification(model)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Fetches a previously stored age verification response. 
- 
  
    
      #store_age_verification(model)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Stores an age verification response for the account. 
- 
  
    
      #store_if_verified(model, options = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Conditionally performs an age verification check. 
- 
  
    
      #verify_age(model, options = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Determines whether an individual meets or exceeds the minimum legal drinking age. 
Instance Method Details
#find_age_verification(model) ⇒ Object
Fetches a previously stored age verification response.
The request must meet the following criteria in order to be evaluated:
- firstName, lastName, and address are required fields.
- One of the following sets of attributes are required for the address: - line1, city, region
- line1, postalCode
 
- Optionally, the request may use the following parameters: 
- A DOB (Date of Birth) field. The value should be ISO-8601 compliant (e.g. 2020-07-21). 
- Beyond the required address fields above, a country field is permitted - The valid values for this attribute are [US, USA] Swagger Name: AvaTaxBeverageClient
 
| 21 22 | # File 'lib/avatax/client/ageverification.rb', line 21 def find_age_verification(model) path = "/api/v2/ageverification/store/identity/find" put(path, model, {}, AvaTax::VERSION) end | 
#store_age_verification(model) ⇒ Object
Stores an age verification response for the account.
The request field must meet the following criteria in order to be evaluated:
- firstName, lastName, and address are required fields.
- One of the following sets of attributes are required for the address: - line1, city, region
- line1, postalCode
 
- Optionally, request field may use the following parameters: 
- A DOB (Date of Birth) field. The value should be ISO-8601 compliant (e.g. 2020-07-21). 
- Beyond the required address fields above, a country field is permitted - The valid values for this attribute are [US, USA]
 
The response field must meet the following criteria in order to be evaluated:
- isOfAge, failureCodes are required fields Swagger Name: AvaTaxBeverageClient
| 43 44 | # File 'lib/avatax/client/ageverification.rb', line 43 def store_age_verification(model) path = "/api/v2/ageverification/store/identity" put(path, model, {}, AvaTax::VERSION) end | 
#store_if_verified(model, options = {}) ⇒ Object
Conditionally performs an age verification check. If a record matching the request is found in the internal store, the associated response is returned. Otherwise, an age verification check is performed and the response is stored if the individual is determined to be of age.
The request must meet the following criteria in order to be evaluated:
- firstName, lastName, and address are required fields.
- One of the following sets of attributes are required for the address: - line1, city, region
- line1, postalCode
 
- Optionally, the request may use the following parameters: 
- A DOB (Date of Birth) field. The value should be ISO-8601 compliant (e.g. 2020-07-21). 
- Beyond the required address fields above, a country field is permitted - The valid values for this attribute are [US, USA] Swagger Name: AvaTaxBeverageClient
 
| 62 63 | # File 'lib/avatax/client/ageverification.rb', line 62 def store_if_verified(model, ={}) path = "/api/v2/ageverification/store/identity/storeIfVerified" put(path, model, , AvaTax::VERSION) end | 
#verify_age(model, options = {}) ⇒ Object
Determines whether an individual meets or exceeds the minimum legal drinking age.
The request must meet the following criteria in order to be evaluated:
- firstName, lastName, and address are required fields.
- One of the following sets of attributes are required for the address:
- line1, city, region
- line1, postalCode
 
Optionally, the transaction and its lines may use the following parameters:
- A DOB (Date of Birth) field. The value should be ISO-8601 compliant (e.g. 2020-07-21).
- Beyond the required address fields above, a country field is permitted
- The valid values for this attribute are [US, USA]
 
Security Policies This API depends on the active subscription AgeVerification Swagger Name: AvaTaxBeverageClient
| 84 85 | # File 'lib/avatax/client/ageverification.rb', line 84 def verify_age(model, ={}) path = "/api/v2/ageverification/verify" post(path, model, , AvaTax::VERSION) end |