faker-sfdc 0.1.2
Faker provider for generating mock SFDC data
License: MIT
Requires Python: >=3.8,<3.11

# faker-sfdc

Faker provider for generating mock SFDC data.

## Installation

```shell
$ pip install faker-sfdc
```

## Test

```shell
$ brew install pipx
$ pipx install poetry
$ git clone https://github.com/redbird-labs/faker-sfdc.git
$ cd faker-sfdc
$ poetry install
$ poetry run coverage run -m pytest -v --cov=faker_sfdc
```

## Usage

Not all methods are documented. Please see source code for full list of methods.

### `currency_code()`

Returns an ISO currency code

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.currency_code()}")
# Out: USD
```

### `fx()`

Returns exchange rate

Required Parameters:

- `base_currency`: From currency
- `quote_currency`: To currency

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.fx('USD', 'EUR')}")
# Out: 0.8500
```

### `flag()`

Returns boolean flag

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.flag(0.7)}")
# Out: True
```

### `account_id()`

Returns an account ID

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.account_id()}")
# Out: 0015500000WO1ZIAAL
```

### `account_industry()`

Returns an industry sector for an account

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.account_industry()}")
# Out: Financial Services
```

### `account_ticker_symbol()`

Returns a ticker symbol derived from account name

Required Parameters:

- `account_name`: Name of account

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.account_ticker_symbol('Acme, Co.')}")
# Out: ACME
```

### `account_website()`

Returns a ticker symbol derived from account name

Required Parameters:

- `account_name`: Name of account

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.account_website('Acme, Co.')}")
# Out: acmeco.com
```

### `contact_id()`

Returns a contact ID

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.contact_id()}")
# Out: 0035500000WO1ZIAAL
```

### `contact_deparment()`

Returns a department for a contact

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.contact_deparment()}")
# Out: Marketing
```

### `contact_role()`

Returns a role for a contact

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.contact_role()}")
# Out: Marketing Manager
```

### `user_id()`

Returns a user ID

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.user_id()}")
# Out: 0055500000WO1ZIAAL
```

### `user_role_id()`

Returns a user role ID

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.user_role_id()}")
# Out: 00E5500000WO1ZIAAL
```

### `user_role()`

Returns a role for a user

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.user_role()}")
# Out: Sales Rep.
```

### `opportunity_id()`

Returns an opportunity ID

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.opportunity_id()}")
# Out: 0065500000WO1ZIAAL
```

### `opportunity_line_item()`

Returns an opportunity line item ID

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.opportunity_line_item()}")
# Out: 00K5500000WO1ZIAAL
```

### `product_id()`

Returns a product ID

```python
from faker import Faker
from faker_sfdc import SalesforceProvider

fake = Faker()
fake.add_provider(SalesforceProvider)

print(f"Out: {fake.product_id()}")
# Out: 01T5500000WO1ZIAAL
```