Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment data sources #34

Merged
merged 4 commits into from
Jun 5, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove potential sensitive information
  • Loading branch information
gaetanfl committed May 22, 2018
commit 73497ee822b2ae90001b80c30ec3481757c71d74
45 changes: 0 additions & 45 deletions ovh/data_source_ovh_bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,42 +55,6 @@ func dataSourceBankAccount() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"validation_document_link": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"unique_reference": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"creation_date": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"mandate_signature_date": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"owner_name": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"owner_address": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"iban": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"bic": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"id": &schema.Schema{
Type: schema.TypeInt,
Computed: true,
},
"default": &schema.Schema{
Type: schema.TypeBool,
Computed: true,
Expand Down Expand Up @@ -167,16 +131,7 @@ func dataSourceBankAccountRead(d *schema.ResourceData, meta interface{}) error {
// Set data
d.Set("description", (*the_bank_account).Description)
d.Set("state", (*the_bank_account).State)
d.Set("id", (*the_bank_account).Id)
d.Set("default", (*the_bank_account).Default)
d.Set("validation_document_link", (*the_bank_account).ValidationDocumentLink)
d.Set("unique_reference", (*the_bank_account).UniqueReference)
d.Set("creation_date", (*the_bank_account).CreationDate)
d.Set("mandate_signature_date", (*the_bank_account).MandateSignatureDate)
d.Set("owner_name", (*the_bank_account).OwnerName)
d.Set("owner_address", (*the_bank_account).OwnerAddress)
d.Set("iban", (*the_bank_account).Iban)
d.Set("bic", (*the_bank_account).Bic)

d.SetId(fmt.Sprintf("%d", (*the_bank_account).Id))
return nil
Expand Down
25 changes: 0 additions & 25 deletions ovh/data_source_ovh_creditcard.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,34 +53,14 @@ func dataSourceCreditCard() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"number": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"expiration_date": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"type": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"state": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"id": &schema.Schema{
Type: schema.TypeInt,
Computed: true,
},
"default": &schema.Schema{
Type: schema.TypeBool,
Computed: true,
},
"threeds_validated": &schema.Schema{
Type: schema.TypeBool,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -164,13 +144,8 @@ func dataSourceCreditCardRead(d *schema.ResourceData, meta interface{}) error {
}
// Set data
d.Set("description", (*the_credit_card).Description)
d.Set("number", (*the_credit_card).Number)
d.Set("expiration_date", (*the_credit_card).Expiration)
d.Set("type", (*the_credit_card).Type)
d.Set("state", (*the_credit_card).State)
d.Set("id", (*the_credit_card).Id)
d.Set("default", (*the_credit_card).Default)
d.Set("threeds_validated", (*the_credit_card).ThreeDSValidated)
d.SetId(fmt.Sprintf("%d", (*the_credit_card).Id))
return nil
}