Skip to content

Commit

Permalink
add form_fields to Customer
Browse files Browse the repository at this point in the history
- vendor open PR from bigcommerce#156
- replacing existing vendor of https://github.com/watermelonexpress/bigcommerce-api-ruby (renaming repo) to ensure the fork remote is bigcommerce's rather than a github user's.

Form fields exist on Customer but are missing from the customer resource object.

Schema definition:

  $ curl https://developer.bigcommerce.com/api-reference/store-management/customers-v2/BigCommerce_Customers_API.oas2.json | jq '.definitions.Customer.properties.form_fields'

  {
    "description": "Array of custom fields. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.",
    "type": "array",
    "items": {
      "title": "Form Fields",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the form field",
          "type": "string",
          "example": "License Id"
        },
        "value": {
          "description": "Value of the form field",
          "type": "string",
          "example": "123BAF"
        }
      }
    }
  }
  • Loading branch information
millerjs committed Oct 10, 2023
1 parent eec22ad commit 920b3b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/bigcommerce/resources/customers/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Customer < Resource
property :addresses
property :tax_exempt_category
property :accepts_marketing
property :form_fields

def self.count(params = {})
get 'customers/count', params
Expand Down

0 comments on commit 920b3b9

Please sign in to comment.